Commit 9e052200 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh Committed by Manuel Jander
Browse files

Fix for 3GPP issue 1466: Large deviations observed with the extrapolation of...

Fix for 3GPP issue 1466: Large deviations observed with the extrapolation of shifted channel by TD-ITD compensation in stereo

Link #1466, #1463
parent 64d5ce21
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -575,9 +575,12 @@ void stereo_td_itd_mdct_stereo_fx(
        /*call ITD function*/
        stereo_dft_enc_compute_itd_fx( hCPE, DFT_fx[0], DFT_tmp_e[0], DFT_fx[1], DFT_tmp_e[1], STEREO_DFT_OFFSET, input_frame, vad_flag_dtx, vad_hover_flag, bin_nrgL_fx, bin_nrgL_e, bin_nrgR_fx, bin_nrgR_e );

        q_com = MAX_16;
        move16();

        FOR( n = 0; n < CPE_CHANNELS; n++ )
        {
            q_com = add( norm_arr( hCPE->hCoreCoder[n]->input_fx, input_frame ), hCPE->hCoreCoder[n]->q_inp );
            q_com = s_min( q_com, add( norm_arr( hCPE->hCoreCoder[n]->input_fx, input_frame ), hCPE->hCoreCoder[n]->q_inp ) );
            q_com = s_min( q_com, add( norm_arr( hCPE->hCoreCoder[n]->old_input_signal_fx, input_frame ), hCPE->hCoreCoder[n]->q_old_inp ) );
            q_com = s_min( q_com, add( norm_arr( hCPE->input_mem_fx[n], hStereoMdct->hDft_ana->dft_ovl ), hCPE->q_input_mem[n] ) );

@@ -586,7 +589,10 @@ void stereo_td_itd_mdct_stereo_fx(
                q_com = 0;
                move16();
            }
        }

        FOR( n = 0; n < CPE_CHANNELS; n++ )
        {
            scale_sig( hCPE->hCoreCoder[n]->input_fx, input_frame, sub( q_com, hCPE->hCoreCoder[n]->q_inp ) );
            hCPE->hCoreCoder[n]->q_inp = q_com;
            move16();