diff --git a/lib_com/options.h b/lib_com/options.h index 4d90bd9f27989137e35f2707905baa06a2b13de3..5aa3ec18d8999a901e5cf0e81920c308361dd033 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -176,6 +176,7 @@ #define NONBE_FIX_949_MC_5MS_FRAMING /* Dlb: issue 949: fix for issue 949, distorted output in MC mode with 5ms framing*/ #define NONBE_FIX_952_MC_PARAMUPMIX_5MS /* Dlb : issue 952 : Differences between 5ms and 20ms rendering for ParamUpmix*/ #define NONBE_FIX_968_ISM_BRIR_WITH_HEADROTATION_5MS_FIX /* FhG : issue #968: differences between 5ms and 20ms rendering for discrete ISM with BRIR and head rotation*/ +#define NONBE_FIX_977_OSBA_GAIN_MISMATCH /* Dlb : issue 977 : Output gain mismatch for different bit rates in OSBA */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/ivas_osba_enc.c b/lib_enc/ivas_osba_enc.c index 675b89c6d67a42ac884755923b26923232b9987f..bcff38b21db11cc68cb1927dab2389d7455dfe2d 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 NONBE_FIX_977_OSBA_GAIN_MISMATCH + 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 } } @@ -443,7 +447,9 @@ static void ivas_osba_render_ism_to_sba( int16_t azimuth, elevation; float gains[MAX_INPUT_CHANNELS]; float g1, g2; +#ifndef NONBE_FIX_977_OSBA_GAIN_MISMATCH float output_gain; +#endif int16_t nchan_sba; @@ -478,6 +484,7 @@ static void ivas_osba_render_ism_to_sba( } /* Gain with loudness-matching gains */ +#ifndef NONBE_FIX_977_OSBA_GAIN_MISMATCH output_gain = 0.7499f; for ( j = 0; j < nchan_sba; j++ ) { @@ -486,6 +493,7 @@ static void ivas_osba_render_ism_to_sba( data_out_f[j][k] *= output_gain; } } +#endif return; }