diff --git a/lib_com/options.h b/lib_com/options.h index 04285e2094381d56b262fe2abaa01d1058ebce11..ae52bff8fee20036c6b695c38b087da96c94ce73 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -133,7 +133,7 @@ #define FIX_1452_DEFAULT_REVERB /* Nokia/Philips/FhG: Fix default room presets and their usage in renderer */ #define FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC /* VA : Basop issue 2547: Align conditions in core sw dec */ #define FIX_2547_ALIGN_CONDITIONS_IN_CORE_SW_DEC_EVS /* VA : Basop issue 2547: Align conditions in core sw dec, condition that could affect EVS as well, but adapted to keep EVS BE */ - +#define FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN /* FhG: fixes obvious bug for IVAS path. For EVS path, issue is still not resolved */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_enc/tcx_utils_enc_fx.c b/lib_enc/tcx_utils_enc_fx.c index 0e38df6b237f0fe071476c6db9ae2c8721a00e63..97d17c11d206c02ef1b6b105b65dc935043a2f08 100644 --- a/lib_enc/tcx_utils_enc_fx.c +++ b/lib_enc/tcx_utils_enc_fx.c @@ -3602,7 +3602,19 @@ void ProcessIGF_fx( } test(); - tns_predictionGain = L_deposit_l( hIGFEnc->tns_predictionGain ); // todo: mul, 2026-03-12: check, why this is in Q23 +#ifdef FIX_BASOP_2548_ProcessIGF_fx_PREDICTIONGAIN + IF( EQ_16( st->element_mode, EVS_MONO ) ) + { + // this is a bug in the EVS legacy code, the IVAS branch is correct - don't fix for now, to keep EVS bit-exact + tns_predictionGain = L_deposit_l( hIGFEnc->tns_predictionGain ); + } + ELSE + { + tns_predictionGain = L_deposit_h( hIGFEnc->tns_predictionGain ); + } +#else + tns_predictionGain = L_deposit_l( hIGFEnc->tns_predictionGain ); +#endif IF( LT_32( tns_predictionGain, ONE_POINT_ONE_FIVE_Q23 ) && LT_16( predictionGain, ONE_POINT_ONE_FIVE_Q7 ) ) { hIGFEnc->flatteningTrigger = 1;