Commit 5c1535eb authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for 3GPP issue 1251: Basop Encoder: Spectral holes between 2-4 kHz and...

Fix for 3GPP issue 1251: Basop Encoder: Spectral holes between 2-4 kHz and spectral differences for Unified Stereo @24kbps - 2

Link #1251
parent 2b068b61
Loading
Loading
Loading
Loading
Loading
+2 −9
Original line number Diff line number Diff line
@@ -1337,16 +1337,9 @@ static void estDownmixGain_fx(
    }
    ELSE IF( GT_16( hStereoTCA->LRTD_G_ATT_cnt, 1 ) ) /* lrtd_mode == 1 but tdm_LRTD_flag still 0 */
    {
        currentGain = BASOP_Util_Divide1616_Scale( currentGain, hStereoTCA->LRTD_G_ATT_cnt, &currentGain_e ); // Q = 15 + 0 - (15 - exp)
        /* Division result Q has to be got back to the Q of initial currentGain hence the shift operation below */
        IF( currentGain_e != 0 )
        {
            currentGain = shr( currentGain, sub( Q15, currentGain_e ) ); /* Q15 */
            currentGain_e = 0;
            move16();
        currentGain = BASOP_Util_Divide1616_Scale( currentGain, hStereoTCA->LRTD_G_ATT_cnt, &exp );
        currentGain_e = add( exp, sub( currentGain_e, 15 ) );
    }
    }


    IF( GE_16( norm_s( currentGain ), sub( currentGain_e, 1 ) ) )
    {