Commit 2483db0a authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_ISSUE_2618_PLC_RES_ATT_SCALING

parent 9a3b899d
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -93,7 +93,6 @@
/* any switch which is non-be wrt. TS 26.251 V3.0 */

#define FIX_1576_LCLD_CRASH_DIFFERENT_CODEC_ISAR_FRAME_SIZE  /* Dolby: float issue 1576: fix for crash in LCLD mode when codec frame size is less than isar frame size */
#define FIX_ISSUE_2618_PLC_RES_ATT_SCALING              /* FhG: BASOP #2618: residual PLC burst attenuation, apply divide/Sqrt32 exponent so fac tracks exponent correctly */
#define NONBE_FIX2614_LP_CNG_ASSERT                     /* FhG: */
#define FIX_FLOAT_1600_OMASA_WRONG_RENDER_PATH          /* Nokia: float issue 1600: fix initialization condition of stereo type detection for OMASA */
#define FIX_BASOP_1765_MASA1TC_CNG_MISMATCH             /* Nokia: BASOP issue 1765: Improve accuracy of FD CNG noise estimation */
+0 −15
Original line number Diff line number Diff line
@@ -738,37 +738,22 @@ void stereo_dft_res_ecu_burst_att_fx(
)
{
    Word32 fac;
#ifndef FIX_ISSUE_2618_PLC_RES_ATT_SCALING
    Word16 q_fac;
#endif
    Word16 exponent;

#ifndef FIX_ISSUE_2618_PLC_RES_ATT_SCALING
    q_fac = 0;
    move16();
#endif
    exponent = 0;
    move16();

    /* attenuation of residual; follow attenuation of DMX */
    IF( hStereoDft->core_hist[0] == ACELP_CORE )
    {
#ifdef FIX_ISSUE_2618_PLC_RES_ATT_SCALING
        fac = L_deposit_h( BASOP_Util_Divide3232_Scale( dmx_nrg, hStereoDft->past_dmx_nrg_fx, &exponent ) );
        fac = Sqrt32( fac, &exponent );
        fac = Mpy_32_16_1( fac, (Word16) ( 0x0CCD ) ); /* * 0.1f (Q15) */
        fac = L_shl_sat( fac, exponent );              /* Q31 */
#else
        fac = Mpy_32_16_1( Sqrt32( L_deposit_h( BASOP_Util_Divide3232_Scale( dmx_nrg, hStereoDft->past_dmx_nrg_fx, &q_fac ) ), &exponent ), (Word16) ( 0x0CCD ) ); /* Q0 */
#endif
    }
    ELSE
    {
#ifdef FIX_ISSUE_2618_PLC_RES_ATT_SCALING
        fac = L_sub( MAX_32, L_deposit_h( BASOP_Util_Divide3232_Scale( L_sub( hStereoDft->time_offs, L_ana ), L_add( hStereoDft->time_offs, L_ana ), &exponent ) ) ); /* Q31 */
#else
        fac = L_sub( MAX_32, L_deposit_h( BASOP_Util_Divide3232_Scale( L_sub( hStereoDft->time_offs, L_ana ), L_add( hStereoDft->time_offs, L_ana ), &q_fac ) ) ); /* Q0 */
#endif
    }

    v_multc_fx( pDFT_RES, fac, pDFT_RES, shl( L_res, 1 ) );