Commit ac07b6ee authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Fix for high MLD observed with some STV test cases

parent 2442c7da
Loading
Loading
Loading
Loading
Loading
+5 −6
Original line number Diff line number Diff line
@@ -962,6 +962,11 @@ UWord8 apa_exec_ivas_fx(
    }
    ELSE
    {
        Word16 a_tmp[APA_BUF];
        Word16 *buf_out_ptr = &( ps->buf_out_fx[ps->l_buf_out - ps->l_frm] );

        Q_a_out = s_min( Q_a_out, ps->Q_buf_out );
        Scale_sig( ps->buf_out_fx, ps->buf_out_capacity, sub( Q_a_out, ps->Q_buf_out ) ); // Q_buf_out -> Q_a_out
        IF( EQ_32( ps->scale, 100 ) )
        {
            FOR( i = 0; i < ps->num_channels * APA_BUF_PER_CHANNEL; i++ )
@@ -974,19 +979,13 @@ UWord8 apa_exec_ivas_fx(
        }
        ELSE
        {

            Word16 a_tmp[APA_BUF];
            Word16 *buf_out_ptr = &( ps->buf_out_fx[ps->l_buf_out - ps->l_frm] );
            Word16 *frm_in_ptr = &( frm_in[ps->l_frm] );

            Q_a_out = s_min( Q_a_out, ps->Q_buf_out );
            FOR( i = 0; i < ps->num_channels * APA_BUF_PER_CHANNEL; i++ )
            {
                a_tmp[i] = extract_h( L_shl( a_in[i], add( Q_a_out, Q5 ) ) ); // Q_a_out
                move16();
            }
            Scale_sig( ps->buf_out_fx, ps->buf_out_capacity, sub( Q_a_out, ps->Q_buf_out ) ); // Q_buf_out -> Q_a_out

            /* fill input frame */
            /* 1st input frame: previous output samples */
            FOR( i = 0; i < ps->l_frm; i++ )