Commit 08b34f2e authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

Basop added and comments clean up for 1237 changes

parent 77a2b7ae
Loading
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -1595,7 +1595,7 @@ static void ivas_spec_ana_fx(
#else
            Copy_Scale_sig_16_32_DEPREC( &xfp[*pPlocs], xfp_32, 3, Q16 );           // Q + 16
#endif
            acc = L_deposit_h( *pPlocs );                                           // Q16                     //VA2ITTIAM -> this and the lines below need to be checked
            acc = L_deposit_h( *pPlocs );                                           // Q16
            *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16
            move32();
            pPlocs++;
@@ -1610,7 +1610,7 @@ static void ivas_spec_ana_fx(
#else
            Copy_Scale_sig_16_32_DEPREC( &xfp[*pPlocs - 1], xfp_32, 3, Q16 );       // Q + 16
#endif
            acc = L_deposit_h( sub( *pPlocs, 1 ) );                                 // Q16                      // VA2ITTIAM -> this and the lines below need to be checked
            acc = L_deposit_h( sub( *pPlocs, 1 ) );                                 // Q16
            *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16
            move32();
            currPlocs = *pPlocs++; // Q16
@@ -1660,7 +1660,7 @@ static void ivas_spec_ana_fx(
#else
                Copy_Scale_sig_16_32_DEPREC( &xfp[currPlocs - 1], xfp_32, 3, Q16 ); // Q + 16
#endif
                acc = L_deposit_h( sub( currPlocs, 1 ) );                               // Q16          // VA2ITTIAM -> this and the lines below need to be checked
                acc = L_deposit_h( sub( currPlocs, 1 ) );                               // Q16
                *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16
                move32();
                currPlocs = *pPlocs++; // Q16
@@ -1678,7 +1678,7 @@ static void ivas_spec_ana_fx(
#else
                Copy_Scale_sig_16_32_DEPREC( &xfp[currPlocs - 2], xfp_32, 3, Q16 ); // Q + 16
#endif
                acc = L_deposit_h( sub( currPlocs, 2 ) );                               // Q16       // VA2ITTIAM -> this and the lines below need to be checked
                acc = L_deposit_h( sub( currPlocs, 2 ) );                               // Q16
                *pPlocsi++ = L_add( acc, L_shl( imax_pos_fx( xfp_32 ) /* Q15 */, 1 ) ); // Q16
                move32();
                currPlocs = *pPlocs++; // Q16
@@ -4131,7 +4131,7 @@ static void fec_ecu_dft_fx(
        Word16 loctmp = *exp;
        move16();
        loctmp = s_min( 15, loctmp );
        Copy_Scale_sig_16_32_DEPREC( Tfr16, Tfr32, *Nfft, loctmp ); /*Qin+exp; */ /*Even with limiting loctmp, if Copy_Scale_sig_16_32_no_sat() is used, can lead to 1 difference */
        Copy_Scale_sig_16_32_DEPREC( Tfr16, Tfr32, *Nfft, loctmp ); /*Qin+exp; */ /*Even with limiting loctmp, if Copy_Scale_sig_16_32_no_sat() is used, can lead to 1 difference */
#else
        Copy_Scale_sig_16_32_no_sat( Tfr16, Tfr32, *Nfft, *exp ); /*Qin+exp; */
#endif
@@ -4139,6 +4139,7 @@ static void fec_ecu_dft_fx(
#else
    Copy_Scale_sig_16_32_DEPREC( Tfr16, Tfr32, *Nfft, *exp ); /*Qin+exp; */
#endif

    DoRTFTn_fx( Tfr32, Tfi32, *Nfft );
    N_LP = shr( *Nfft, 1 );

+0 −1
Original line number Diff line number Diff line
@@ -678,7 +678,6 @@ void generate_stereo_masking_noise_fx(

        IF( !fadeOut )
        {

#ifdef FIX_ISSUE_1237
            Copy_Scale_sig_16_32_no_sat( hStereoCng->olapBufferSynth22_fx, hStereoCng->olapBufferSynth22_32fx, hFdCngCom->fftlen, sub( Q15, st->Q_syn ) ); /*Q15*/
#else
+13 −14
Original line number Diff line number Diff line
@@ -550,7 +550,6 @@ ivas_error ivas_core_dec_fx(
                    return error;
                }
            }

#ifdef FIX_ISSUE_1237
            Copy_Scale_sig_16_32_no_sat( output_16_fx[n], output_32_fx[n], L_FRAME48k, sub( Q11, st->Q_syn2 ) ); // Q_syn2->Q11
#else
@@ -689,7 +688,6 @@ ivas_error ivas_core_dec_fx(

            td_stereo_param_updt_fx( st->lsp_old_fx, st->lsf_old_fx, st->old_pitch_buf_16_fx + st->nb_subfr,
                                     tdm_lspQ_PCh_fx, tdm_lsfQ_PCh_fx, hStereoTD->tdm_Pri_pitch_buf_fx, st->flag_ACELP16k, hStereoTD->tdm_use_IAWB_Ave_lpc );

#ifdef FIX_ISSUE_1237
            Copy_Scale_sig_16_32_no_sat( hCPE->hCoreCoder[0]->old_pitch_buf_16_fx, hCPE->hCoreCoder[0]->old_pitch_buf_fx, add( imult1616( 2, NB_SUBFR16k ), 2 ), Q10 ); // Q16
#else
@@ -1119,28 +1117,28 @@ ivas_error ivas_core_dec_fx(
        Copy_Scale_sig_16_32_no_sat( hb_synth_16_fx[n], hb_synth_32_fx[n], L_FRAME48k, sub( Q11, Q_hb_synth_fx ) ); // Q11
        Copy_Scale_sig_16_32_no_sat( output_16_fx[n], output_32_fx[n], L_FRAME48k, sub( Q11, Q_input ) );           // Q11    // Q_input can get value <= -5
        Copy_Scale_sig_16_32_no_sat( synth_16_fx[n], synth_32_fx[n], L_FRAME48k, sub( Q11, Q_synth_fx ) );          // Q11
        IF( hBWE_FD != NULL )
        {
            Copy_Scale_sig_16_32_no_sat( hBWE_FD->L_old_wtda_swb_fx, hBWE_FD->L_old_wtda_swb_fx32, L_FRAME48k, sub( Q11, hBWE_FD->old_wtda_swb_fx_exp ) ); // Q11
        }
        IF( st->hBWE_TD != NULL )
        {
            Copy_Scale_sig_16_32_no_sat( st->hBWE_TD->old_tbe_synth_fx, st->hBWE_TD->old_tbe_synth_fx_32, L_SHB_TRANSITION_LENGTH, sub( Q11, st->prev_Qx ) ); // Q11
        }
#else
        Copy_Scale_sig_16_32_DEPREC( hb_synth_16_fx[n], hb_synth_32_fx[n], L_FRAME48k, sub( Q11, Q_hb_synth_fx ) );                                           // Q11
        Copy_Scale_sig_16_32_DEPREC( output_16_fx[n], output_32_fx[n], L_FRAME48k, sub( Q11, Q_input ) );                                                     // Q11
        Copy_Scale_sig_16_32_DEPREC( synth_16_fx[n], synth_32_fx[n], L_FRAME48k, sub( Q11, Q_synth_fx ) );                                                    // Q11
#endif

        IF( hBWE_FD != NULL )
        {
#ifdef FIX_ISSUE_1237
            Copy_Scale_sig_16_32_no_sat( hBWE_FD->L_old_wtda_swb_fx, hBWE_FD->L_old_wtda_swb_fx32, L_FRAME48k, sub( Q11, hBWE_FD->old_wtda_swb_fx_exp ) ); // Q11
#else
            Copy_Scale_sig_16_32_DEPREC( hBWE_FD->L_old_wtda_swb_fx, hBWE_FD->L_old_wtda_swb_fx32, L_FRAME48k, sub( Q11, hBWE_FD->old_wtda_swb_fx_exp ) );    // Q11
#endif
        }
        IF( st->hBWE_TD != NULL )
        {
#ifdef FIX_ISSUE_1237
            Copy_Scale_sig_16_32_no_sat( st->hBWE_TD->old_tbe_synth_fx, st->hBWE_TD->old_tbe_synth_fx_32, L_SHB_TRANSITION_LENGTH, sub( Q11, st->prev_Qx ) ); // Q11
#else
            Copy_Scale_sig_16_32_DEPREC( st->hBWE_TD->old_tbe_synth_fx, st->hBWE_TD->old_tbe_synth_fx_32, L_SHB_TRANSITION_LENGTH, sub( Q11, st->prev_Qx ) ); // Q11
        }
#endif

        }

        /*---------------------------------------------------------------------*
         * SWB(FB) TBE decoding
@@ -1527,6 +1525,7 @@ ivas_error ivas_core_dec_fx(
#ifdef FIX_ISSUE_1237
                        Copy_Scale_sig_16_32_no_sat( hCPE->hCoreCoder[ch_ind]->hHQ_core->old_out_LB_fx, hCPE->hCoreCoder[ch_ind]->hHQ_core->old_outLB_fx, L_FRAME32k, sub( Q11, hCPE->hCoreCoder[ch_ind]->hHQ_core->Q_old_wtda_LB ) ); // Q11
                        Copy_Scale_sig_16_32_no_sat( hCPE->hCoreCoder[ch_ind]->hHQ_core->old_out_fx, hCPE->hCoreCoder[ch_ind]->hHQ_core->oldOut_fx, L_FRAME48k, sub( Q11, hCPE->hCoreCoder[ch_ind]->hHQ_core->Q_old_wtda ) );          // Q11

#else
                        Copy_Scale_sig_16_32_DEPREC( hCPE->hCoreCoder[ch_ind]->hHQ_core->old_out_LB_fx, hCPE->hCoreCoder[ch_ind]->hHQ_core->old_outLB_fx, L_FRAME32k, sub( Q11, hCPE->hCoreCoder[ch_ind]->hHQ_core->Q_old_wtda_LB ) ); // Q11
                        Copy_Scale_sig_16_32_DEPREC( hCPE->hCoreCoder[ch_ind]->hHQ_core->old_out_fx, hCPE->hCoreCoder[ch_ind]->hHQ_core->oldOut_fx, L_FRAME48k, sub( Q11, hCPE->hCoreCoder[ch_ind]->hHQ_core->Q_old_wtda ) );          // Q11
+2 −5
Original line number Diff line number Diff line
@@ -334,10 +334,9 @@ ivas_error ivas_mct_dec_fx(
            x_fx[n][0] = output_fx[n + ( cpe_id * CPE_CHANNELS )];                      // Q11
            x_fx[n][1] = output_fx[n + ( cpe_id * CPE_CHANNELS )] + ( L_FRAME48k / 2 ); // Q11
        }

#ifdef FIX_ISSUE_1237
        Copy_Scale_sig_16_32_no_sat( hCPE->hCoreCoder[0]->old_Aq_12_8_fx, hCPE->hCoreCoder[0]->old_Aq_12_8_fx_32, add( M, 1 ), sub( 28, sub( 15, norm_s( sub( hCPE->hCoreCoder[0]->old_Aq_12_8_fx[0], 1 ) ) ) ) ); // VA2ITTIAM tbc
        Copy_Scale_sig_16_32_no_sat( hCPE->hCoreCoder[1]->old_Aq_12_8_fx, hCPE->hCoreCoder[1]->old_Aq_12_8_fx_32, add( M, 1 ), sub( 28, sub( 15, norm_s( sub( hCPE->hCoreCoder[0]->old_Aq_12_8_fx[0], 1 ) ) ) ) );
        Copy_Scale_sig_16_32_no_sat( hCPE->hCoreCoder[0]->old_Aq_12_8_fx, hCPE->hCoreCoder[0]->old_Aq_12_8_fx_32, add( M, 1 ), sub( 28, sub( 15, norm_s( sub( hCPE->hCoreCoder[0]->old_Aq_12_8_fx[0], 1 ) ) ) ) );
        Copy_Scale_sig_16_32_no_sat( hCPE->hCoreCoder[1]->old_Aq_12_8_fx, hCPE->hCoreCoder[1]->old_Aq_12_8_fx_32, add( M, 1 ), sub( 28, sub( 15, norm_s( sub( hCPE->hCoreCoder[1]->old_Aq_12_8_fx[0], 1 ) ) ) ) );
#else
        Copy_Scale_sig_16_32_DEPREC( hCPE->hCoreCoder[0]->old_Aq_12_8_fx, hCPE->hCoreCoder[0]->old_Aq_12_8_fx_32, add( M, 1 ), sub( 28, norm_s( sub( hCPE->hCoreCoder[0]->old_Aq_12_8_fx[0], 1 ) ) ) );
        Copy_Scale_sig_16_32_DEPREC( hCPE->hCoreCoder[1]->old_Aq_12_8_fx, hCPE->hCoreCoder[1]->old_Aq_12_8_fx_32, add( M, 1 ), sub( 28, norm_s( sub( hCPE->hCoreCoder[1]->old_Aq_12_8_fx[0], 1 ) ) ) );
@@ -384,7 +383,6 @@ ivas_error ivas_mct_dec_fx(
            test();
            IF( ( st_ivas->sba_dirac_stereo_flag != 0 ) && ( NE_16( st_ivas->ivas_format, SBA_ISM_FORMAT ) || GE_16( cpe_id, sub( nCPE, 2 ) ) ) )
            {

#ifdef FIX_ISSUE_1237
                Copy_Scale_sig_16_32_no_sat( synth_fx[n], synth_fx_32[n], L_FRAME48k, sub( Q11, ( sub( 15, e_sig[n] ) ) ) ); // Q11
                Copy_Scale_sig_16_32_no_sat( 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 ) );
@@ -428,7 +426,6 @@ ivas_error ivas_mct_dec_fx(
            {
                return error;
            }

#ifdef FIX_ISSUE_1237
            Copy_Scale_sig_16_32_no_sat( synth_fx[n], output_fx[( cpe_id * CPE_CHANNELS ) + n], output_frame, sub( Q11, Q_synth ) ); // Q11
#else
+0 −1
Original line number Diff line number Diff line
@@ -1404,7 +1404,6 @@ void ivas_mdct_core_reconstruct_fx(
        move16();
        st->last_coder_type = st->coder_type;
        move16();

#ifdef FIX_ISSUE_1237
        Copy_Scale_sig_16_32_no_sat( x_fx_16, x_fx[ch][0], st->L_frame, sub( q_x, q_syn ) ); // q_syn -> Q_x
#else
Loading