diff --git a/lib_com/options.h b/lib_com/options.h index 48db83ad0e0862cf02d43c09d2b9d5fd21602de3..6a07f86b9873807d5bc90848feaeff791b83bac8 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -128,6 +128,7 @@ #define FIX_2252_LP_CNG_STARTS_SID /* VA: issues 2251 and 2252: fix LP CNG uninitialized value in bitstream that starts with an SID */ #define FIX_1381_BWD /* VA: issue 1381: apply no hysteresis in BWD at higher bitrates also in mono MASA and OMASA */ #define FIX_2285_CODE_DECODER_INIT_BW /* VA: basop issue 2285: fix core-decoder initialization bandwidth */ +#define FIX_2306_MISSING_UPDATE_LOWRATE_PITCH_GAIN /* Dolby: Fix missing update of low-rate pitch gain in the S/M classifier */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/enc_gen_voic_fx.c b/lib_enc/enc_gen_voic_fx.c index bfe50a588edf8c5f1fe5f0313c815d22fc7b6f77..1cf5c793e8a08245c98ceb8257308a97699727a3 100644 --- a/lib_enc/enc_gen_voic_fx.c +++ b/lib_enc/enc_gen_voic_fx.c @@ -645,6 +645,11 @@ void encod_gen_voic_ivas_fx( push_indice( hBstr, IND_LP_FILT_SELECT, lp_select, 1 ); } +#ifdef FIX_2306_MISSING_UPDATE_LOWRATE_PITCH_GAIN + /*st_fx->lowrate_pitchGain = 0.9f * st_fx->lowrate_pitchGain + 0.1f * gain_pit_fx;*/ + st_fx->hSpMusClas->lowrate_pitchGain = round_fx_sat( L_mac_sat( L_mult( 29491, st_fx->hSpMusClas->lowrate_pitchGain ), 6554, gain_pit_fx ) ); /*Q14*Q16(0.1) + Q15 -> Q15*/ +#endif + /*-----------------------------------------------------------------* * Transform domain contribution encoding - active frames *-----------------------------------------------------------------*/