diff --git a/lib_com/options.h b/lib_com/options.h index bf55847d1b1bc5d7954e48d301fd0e0ee673f2b8..1a7b596d5309b846680d83f511711c50f1bc7674 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -95,7 +95,7 @@ #define FIX_1454_FIX_STEREO_TO_FOA_JBM /* VA: issue 1454: fix buggy stereo to FOA in JBM */ #define FIX_2015_PREMPH_SAT_ALT_PART2 /* VA: Add missing scaling factor to be passed to AVQ_cod() */ #define FIX_2253_CORRECT_GSC_MINIMUM_PIT_SEARCH /* VA: Fix Issue 2253 where the encoder and decoder could get out of sync */ - +#define NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES /* Dolby: Fix basop issue 1967 */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/dec_tcx_fx.c b/lib_dec/dec_tcx_fx.c index f9377d53f0c13846986a9bdc12fea6940b908d60..3cb3a6d150422f18b322eb21cb51d4001ae185d5 100644 --- a/lib_dec/dec_tcx_fx.c +++ b/lib_dec/dec_tcx_fx.c @@ -4043,8 +4043,12 @@ void decoder_tcx_ivas_fx( decoder_tcx_tns_fx( st, L_frame_glob, L_spec, L_frame, L_frameTCX, x_fx, fUseTns, &tnsData, bfi, frame_cnt, 0, NULL ); - Scale_sig32( x_fx, N_MAX, sub( x_e, 20 ) ); // Scaling x_fx to Q11 + Scale_sig32( x_fx, N_MAX, sub( x_e, 20 ) ); // Scaling x_fx to Q11 +#ifdef NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES + Scale_sig( xn_buf_fx, L_MDCT_OVLP_MAX + L_FRAME_PLUS + L_MDCT_OVLP_MAX, -( Q14 - 2 ) ); // Scaling xn_buf_fx to Q(-2) +#else Scale_sig( xn_buf_fx, L_MDCT_OVLP_MAX + L_FRAME_PLUS + L_MDCT_OVLP_MAX, sub( st->Q_syn, 14 ) ); // Scaling xn_buf_fx to Q_syn +#endif x_e = sub( 31, 11 ); IF( st->igf != 0 ) @@ -5645,7 +5649,11 @@ void decoder_tcx_imdct_fx( generate_masking_noise_mdct_ivas_fx( x_fx, &x_e, st->hFdCngDec->hFdCngCom ); FOR( Word16 ind = 0; ind < L_frame; ind++ ) { - x_fx[ind] = L_shr( x_fx[ind], sub( 31, add( x_e, q_x ) ) ); // q_x +#ifdef NONBE_FIX_1967_SBA_DECODER_MONO_OUT_BIG_DIFFERENCES + x_fx[ind] = L_shl( x_fx[ind], sub( 31, add( x_e, q_x ) ) ); // q_x +#else + x_fx[ind] = L_shr( x_fx[ind], sub( 31, add( x_e, q_x ) ) ); // q_x +#endif } }