Commit 2a809756 authored by multrus's avatar multrus
Browse files

Merge branch 'basop-2548-check-suspicious-q-format-in-processigf_fx' into 'main'

Resolve "Check suspicious Q format in ProcessIGF_fx()"

Closes #2548

See merge request !2966
parents 132c37aa f5d502e8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 ########################### */

+13 −1
Original line number Diff line number Diff line
@@ -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;