Commit 8adcc59e authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Merge branch '3gpp_issue_1006_fix' into 'main'

Fix for 3GPP issue 1006: Very high MLD for 7_1_4, 160kbps, -26LKFS input, with...

See merge request !773
parents be145e8a 030ac1b8
Loading
Loading
Loading
Loading
Loading
+4 −8
Original line number Diff line number Diff line
@@ -1201,7 +1201,7 @@ static void recover_samples_fx(
    Word16 d_r_q_fx[LFE_PLC_LPCORD + 1], d_a_q_fx[LFE_PLC_LPCORD + 1];
    Word32 d_r_fx[LFE_PLC_LPCORD + 1], zeroes_fx[LFE_PLC_RECLEN];
    Word32 delta_fx, fac_fx, att_fx, temp;
    Word16 delta_q_fx, fac_q_fx, att_q_fx, temp_q, exp1, exp2;
    Word16 delta_q_fx, fac_q_fx, temp_q, exp1, exp2;

    Copy32( outbuf_fx, d_outbuf_fx, LFE_PLC_BUFLEN );

@@ -1229,17 +1229,14 @@ static void recover_samples_fx(
        fac_q_fx = Q29;
        move16();
    }
    att_fx = ONE_IN_Q30;
    att_fx = ONE_IN_Q31;
    move32();
    att_q_fx = Q30;
    move16();

    IF( GE_16( bfi_count, LFE_PLC_MUTE_THR ) )
    {
        att_fx = LFE_PLC_BURST_ATT_Q31;
        move32();
        fac_fx = Mpy_32_32( fac_fx, att_fx );
        fac_q_fx = sub( add( fac_q_fx, att_q_fx ), 31 );
    }

    FOR( i = 1; i <= LFE_PLC_LPCORD; i++ )
@@ -1265,10 +1262,9 @@ static void recover_samples_fx(
            temp_q = Q30;
            move16();
        }
        exp1 = norm_l( att_fx );
        exp2 = norm_l( temp );
        temp = Mpy_32_32( L_shl( att_fx, exp1 ), L_shl( temp, exp2 ) );
        temp_q = sub( add( add( att_q_fx, exp1 ), add( temp_q, exp2 ) ), 31 );
        temp = Mpy_32_32( att_fx, L_shl( temp, exp2 ) );
        temp_q = add( temp_q, exp2 );

        exp1 = norm_l( fac_fx );
        exp2 = norm_l( temp );