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

Fix for 3GPP issue 895: Bitrate switching quality issue, low level square wave

link #895
parent 61c7cfea
Loading
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -7299,3 +7299,14 @@ Flag is_zero_arr( Word32 *arr, Word16 size )

    return 1;
}

Flag is_zero_arr16( Word16 *arr, Word16 size )
{
    FOR( Word16 i = 0; i < size; i++ )
    IF( arr[i] != 0 )
    {
        return 0;
    }

    return 1;
}
 No newline at end of file
+1 −0
Original line number Diff line number Diff line
@@ -4557,6 +4557,7 @@ Word16 L_norm_arr( Word32 *arr, Word16 size );
Word16 get_min_scalefactor( Word32 x, Word32 y );
Flag is_zero_arr( Word32 *arr, Word16 size );
Flag is_zero_arr16( Word16 *arr, Word16 size );
void edct2_fx_ivas(
    const Word16 n,
+6 −1
Original line number Diff line number Diff line
@@ -1168,7 +1168,12 @@ void ivas_mdct_core_reconstruct_fx(
        }
        synth_fx = synth_buf_fx + st->hTcxDec->old_synth_len;
        synthFB_fx = synth_bufFB_fx + st->hTcxDec->old_synth_lenFB;

        test();
        if ( is_zero_arr16( st->hTcxDec->old_synth, st->hTcxDec->old_synth_len ) && is_zero_arr16( st->hTcxDec->old_synthFB_fx, st->hTcxDec->old_synth_lenFB ) )
        {
            st->hTcxDec->q_old_synth = 0;
            move16();
        }
        Copy( st->hTcxDec->old_synth, synth_buf_fx, st->hTcxDec->old_synth_len );                                                                // Q = st->hTcxDec->q_old_synth
        Copy_Scale_sig( st->hTcxDec->old_synthFB_fx, synth_bufFB_fx, st->hTcxDec->old_synth_lenFB, sub( st->hTcxDec->q_old_synth, st->Q_syn ) ); // Q = st->hTcxDec->q_old_synth
        q_syn = st->hTcxDec->q_old_synth;