diff --git a/lib_com/options.h b/lib_com/options.h index c7407e532a9204fe239bd76e6e89f9070938286c..e7fd49fc6948e62fe0ee5d05d8e5d1e275ca9460 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -80,4 +80,5 @@ #define CR_2109_to_2112_cd0_ce0 /* This is related to the CRs include in the 26.444 package of 21-12. Concerns lead_deindexing and */ #define FIX_QMETADATA_PENALTY /* Nokia: transform penalty calculation in qmetadata into integer operations */ #define FIX_1013_CRASH_HQ_CORE_DEC /* Ittiam: Saturation added on the lines of EVS */ +#define NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS /* DLB: adjust prerendering and mixing gain in OSBA encoder. This is fix to float codes*/ #endif diff --git a/lib_enc/ivas_osba_enc.c b/lib_enc/ivas_osba_enc.c index c78b21d5028b29da7ee1eb682de48781b34db71b..f018f250a9f7e980b6db552c8a5b639278879213 100644 --- a/lib_enc/ivas_osba_enc.c +++ b/lib_enc/ivas_osba_enc.c @@ -79,7 +79,11 @@ static void ivas_merge_sba_transports_fx( { FOR( j = 0; j < input_frame; j++ ) { +#ifdef NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS + data_out_f[i][j] = L_shr( L_add( L_shr( data_in_f1[i][j], 1 ), L_shr( data_in_f2[i][j], sub( Q_f2, sub( Q_f1, 1 ) ) ) ), Q1 ); +#else data_out_f[i][j] = L_add( L_shr( data_in_f1[i][j], 1 ), L_shr( data_in_f2[i][j], sub( Q_f2, sub( Q_f1, 1 ) ) ) ); +#endif move32(); } } @@ -477,7 +481,9 @@ static void ivas_osba_render_ism_to_sba_fx( Word16 azimuth_fx, elevation_fx; Word32 gains_fx[MAX_INPUT_CHANNELS]; Word32 g1_fx, g2_fx; +#ifndef NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS Word32 output_gain_fx; +#endif Word16 nchan_sba; nchan_sba = imult1616( add( sba_analysis_order, 1 ), add( sba_analysis_order, 1 ) ); @@ -518,6 +524,8 @@ static void ivas_osba_render_ism_to_sba_fx( } } *Q_data = sub( *Q_data, 2 ); + +#ifndef NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS /* Gain with loudness-matching gains */ // output_gain = 0.7499f; output_gain_fx = 1610397988; // 0.7499f in Q31 @@ -531,6 +539,7 @@ static void ivas_osba_render_ism_to_sba_fx( move32(); } } +#endif return; }