From ba2472fa636e88f3ce3bbe81f22a8d6e4b85c290 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Tue, 6 Jan 2026 15:24:24 +0100 Subject: [PATCH 1/3] Fix missing update of low-rate pitch gain in the S/M classifier --- lib_com/options.h | 1 + lib_enc/enc_gen_voic_fx.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 2c70dd14f..86d85731c 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -103,6 +103,7 @@ #define FIX_1904_HARM_GSC_ENC /* VA: #1904 Harmonization of EVS and IVAS GSC code */ #define FIX_2271_OOB_INDEXING_IN_PIT_OL2 /* VA: Fix for issue 2271, to silence clang18 */ #define FIX_2273_OOB_INDEXING_IN_PIT_FR4 /* VA: Fix to silence clang on ptr init */ +#define FIX_2306_MISSING_UPDATE_LOWRATE_PITCH_GAIN /* Dolby: Fix missing update of low-rate pitch gain in the S/M classifier */ /* #################### End BE switches ################################## */ diff --git a/lib_enc/enc_gen_voic_fx.c b/lib_enc/enc_gen_voic_fx.c index bfe50a588..79ca13c7a 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;*/ + hSpMusClas->lowrate_pitchGain = round_fx_sat( L_mac_sat( L_mult( 29491, hSpMusClas->lowrate_pitchGain ), 6554, gain_pit_fx ) ); /*Q14*Q16(0.1) + Q15 -> Q15*/ +#endif + /*-----------------------------------------------------------------* * Transform domain contribution encoding - active frames *-----------------------------------------------------------------*/ -- GitLab From 7e16d3d637eff8687dc186e907b04e210954f6c6 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Tue, 6 Jan 2026 15:34:49 +0100 Subject: [PATCH 2/3] correction of class spec --- lib_enc/enc_gen_voic_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/enc_gen_voic_fx.c b/lib_enc/enc_gen_voic_fx.c index 79ca13c7a..1cf5c793e 100644 --- a/lib_enc/enc_gen_voic_fx.c +++ b/lib_enc/enc_gen_voic_fx.c @@ -647,7 +647,7 @@ void encod_gen_voic_ivas_fx( #ifdef FIX_2306_MISSING_UPDATE_LOWRATE_PITCH_GAIN /*st_fx->lowrate_pitchGain = 0.9f * st_fx->lowrate_pitchGain + 0.1f * gain_pit_fx;*/ - hSpMusClas->lowrate_pitchGain = round_fx_sat( L_mac_sat( L_mult( 29491, hSpMusClas->lowrate_pitchGain ), 6554, gain_pit_fx ) ); /*Q14*Q16(0.1) + Q15 -> Q15*/ + 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 /*-----------------------------------------------------------------* -- GitLab From dc6e57749916320958e3a82b1ca76617331ce5f2 Mon Sep 17 00:00:00 2001 From: Vladimir Malenovsky Date: Wed, 7 Jan 2026 09:53:58 +0100 Subject: [PATCH 3/3] move macro to non-BE section --- lib_com/options.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/options.h b/lib_com/options.h index 86d85731c..e4b766b7f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -103,7 +103,6 @@ #define FIX_1904_HARM_GSC_ENC /* VA: #1904 Harmonization of EVS and IVAS GSC code */ #define FIX_2271_OOB_INDEXING_IN_PIT_OL2 /* VA: Fix for issue 2271, to silence clang18 */ #define FIX_2273_OOB_INDEXING_IN_PIT_FR4 /* VA: Fix to silence clang on ptr init */ -#define FIX_2306_MISSING_UPDATE_LOWRATE_PITCH_GAIN /* Dolby: Fix missing update of low-rate pitch gain in the S/M classifier */ /* #################### End BE switches ################################## */ @@ -120,6 +119,7 @@ #define FIX_1466_EXTREND /* FhG: float issue 1466: enable rendering of mono/stereo to other formats in the external renderer */ #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 ########################### */ -- GitLab