diff --git a/lib_com/options.h b/lib_com/options.h index 680c582156a2b1e5eebb6bc5ac8c73384cd931a2..f2859e80f00ac36cfda56f8b9c5a929125fdb8e4 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -171,6 +171,7 @@ #define NONBE_FIX_1213_SBA_DET_MAT_INV_3BY3 /*Dolby: issue 1213: fix for inverse of det < 0*/ #define NONBE_FIX_1204_MDCT_STEREO_NOISE_EST_SCALING /* FhG: fixes for decoder-side noise level estimation in MDCT-Stereo to prevent noise bursts in stereo switching */ +#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*/ /* #################### End FIXES switches ############################ */ #define BASOP_NOGLOB /* Disable global symbols in BASOPs, Overflow/Carry in BASOPs disabled, additional BASOPs in case of Overflow */ diff --git a/lib_enc/ivas_osba_enc.c b/lib_enc/ivas_osba_enc.c index 675b89c6d67a42ac884755923b26923232b9987f..dffebcf19d5d66046731cc3f86559ead7a2a6cda 100644 --- a/lib_enc/ivas_osba_enc.c +++ b/lib_enc/ivas_osba_enc.c @@ -72,7 +72,11 @@ static void ivas_merge_sba_transports( { for ( j = 0; j < input_frame; j++ ) { +#ifdef NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS + data_out_f[i][j] = 0.5f * ( data_in_f1[i][j] + data_in_f2[i][j] ); +#else data_out_f[i][j] = ( data_in_f1[i][j] + data_in_f2[i][j] ); +#endif } } @@ -477,6 +481,7 @@ static void ivas_osba_render_ism_to_sba( } } +#ifndef NONE_BE_FIX_BASOP_1044_OSBA_PRERENDER_MIX_GAINS /* Gain with loudness-matching gains */ output_gain = 0.7499f; for ( j = 0; j < nchan_sba; j++ ) @@ -486,6 +491,7 @@ static void ivas_osba_render_ism_to_sba( data_out_f[j][k] *= output_gain; } } +#endif return; }