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

Fix for 3GPP issue 948: High MLD value due to high energy in transients for MC 5.1 in MCT

parent 4a08961e
Loading
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -579,15 +579,15 @@ ivas_error ivas_mct_dec_fx(
        hdrm = getScaleFactor16( synth_fx[0], hCPE->hCoreCoder[0]->hTcxDec->L_frameTCX );
        IF( hdrm != 0 )
        {
            sh = s_min( sub( e_sig[0], 15 ), hdrm );
            sh = s_min( sub( e_sig[0], 16 ), hdrm );
            Scale_sig( synth_fx[0], hCPE->hCoreCoder[0]->hTcxDec->L_frameTCX, sh );
            e_sig[0] = sub( e_sig[0], sh );
            move16();
        }

        hdrm = getScaleFactor16( synth_fx[1], hCPE->hCoreCoder[0]->hTcxDec->L_frameTCX );
        IF( hdrm != 0 )
        {
            sh = s_min( sub( e_sig[1], 15 ), hdrm );
            sh = s_min( sub( e_sig[1], 16 ), hdrm );
            Scale_sig( synth_fx[1], hCPE->hCoreCoder[1]->hTcxDec->L_frameTCX, sh );
            e_sig[1] = sub( e_sig[1], sh );
            move16();
@@ -616,11 +616,11 @@ ivas_error ivas_mct_dec_fx(
            IF( ( st_ivas->sba_dirac_stereo_flag != 0 ) && ( NE_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) || GE_16( cpe_id, sub( nCPE, 2 ) ) ) )
            {

                Copy_Scale_sig_16_32( synth_fx[n], synth_fx_32[n], L_FRAME48k, Q11 - 0 ); // Q11
                Copy_Scale_sig_16_32( synth_fx[n], synth_fx_32[n], L_FRAME48k, sub( Q11, ( sub( 15, e_sig[n] ) ) ) ); // Q11
                Copy_Scale_sig_16_32( hCPE->hCoreCoder[n]->hHQ_core->old_out_fx, hCPE->hCoreCoder[n]->hHQ_core->oldOut_fx, output_frame, sub( Q11, hCPE->hCoreCoder[n]->hHQ_core->Q_old_wtda ) );
                ivas_post_proc_fx( NULL, hCPE, n, synth_fx_32[n], NULL, output_frame, 1, Q11 );
#ifdef MSAN_FIX
                Copy_Scale_sig_32_16( synth_fx_32[n], synth_fx[n], output_frame, 0 - Q11 ); // Q0
                Copy_Scale_sig_32_16( synth_fx_32[n], synth_fx[n], output_frame, sub( sub( 15, e_sig[n] ), Q11 ) ); // Q0
#else
                Copy_Scale_sig_32_16( synth_fx_32[n], synth_fx[n], L_FRAME48k, 0 - Q11 );
#endif
@@ -630,7 +630,7 @@ ivas_error ivas_mct_dec_fx(
            Word16 output_mem_fx[L_FRAME48k];
            IF( hCPE->output_mem_fx[1] != NULL )
            {
                Copy_Scale_sig_32_16( hCPE->output_mem_fx[1], output_mem_fx, NS2SA( sts[n]->output_Fs, 3125000 ), 0 - Q11 );
                Copy_Scale_sig_32_16( hCPE->output_mem_fx[1], output_mem_fx, NS2SA( sts[n]->output_Fs, 3125000 ), -Q11 );
            }
            ELSE
            {