Loading lib_com/cng_exc_fx.c +2 −3 Original line number Diff line number Diff line Loading @@ -295,10 +295,9 @@ IF( NE_16( Opt_AMR_WB, 1 ) ) /* calculate the spectrum of random excitation signal */ Copy( exc2, fft_io, L_frame ); Word16 Q_new_inp, mem_decim_size; // TO be removed IF( EQ_16( L_frame, L_FRAME16k ) ) { modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, exc_mem1, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, exc_mem1, 0 ); } /* fft_rel(fft_io, L_FFT, LOG2_L_FFT); */ Loading Loading @@ -411,7 +410,7 @@ IF( NE_16( Opt_AMR_WB, 1 ) ) IF( EQ_16( L_frame, L_FRAME16k ) ) { modify_Fs_fx( fft_io, L_FFT, 12800, fft_io, 16000, exc_mem, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( fft_io, L_FFT, 12800, fft_io, 16000, exc_mem, 0 ); } /* enr1 = dotp( fft_io, fft_io, L_frame ) / L_frame; */ Loading lib_com/modif_fs_fx.c +8 −26 Original line number Diff line number Diff line Loading @@ -330,9 +330,7 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ Word16 sigOut_fx[], /* o : decimated signal Q0 */ const Word32 fout, /* i : frequency of output Q0 */ Word16 mem_fx[], /* i/o: filter memory Q0 */ const Word16 nblp, /* i : flag indicating if NB low-pass is applied */ Word16 *Q_new_inp, // TO be removed Word16 *mem_decim_size // TO be removed const Word16 nblp /* i : flag indicating if NB low-pass is applied */ ) { Word16 i; Loading Loading @@ -364,17 +362,13 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ /*-------------------------------------------------------------------* * Find the resampling configuration *-------------------------------------------------------------------*/ *Q_new_inp = 0; move16(); /* check if fin and fout are the same */ IF( EQ_32( fin, fout ) ) { /* just copy the signal_fx and quit */ Copy( sigIn_fx, sigOut_fx, lg ); *mem_decim_size = 0; *Q_new_inp = 0; move16(); move16(); return lg; } ELSE Loading Loading @@ -439,8 +433,6 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ } mem_len = shl( filt_len, 1 ); *mem_decim_size = mem_len; move16(); signal_fx = signal_tab_fx + 2 * L_FILT_MAX + sub( L_FRAME48k, add( mem_len, lg ) ); signal_ana_fx = signal_fx; mem_len_ana = mem_len; Loading Loading @@ -508,7 +500,7 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ } /* interpolation */ datastep = shr( div_s( shl( fac_den, 7 ), shl( fac_num, 10 ) ), 12 ); datastep = shr( div_s( shl( fac_den, 8 ), shl( fac_num, 11 ) ), 12 ); /* equivalent to 'datastep = fac_den % fac_num' */ temp_n = i_mult2( datastep, fac_num ); /*Q0*/ fracstep = sub( fac_den, temp_n ); Loading Loading @@ -550,9 +542,6 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ FOR( i = 0; i < lg_out; i++ ) { sigOut_fx[i] = round_fx( L_shl( L_mult( sigOut_fx[i], num_den ), 1 ) ); /*Q0*/ *Q_new_inp = -1; move16(); move16(); } } ELSE Loading @@ -562,16 +551,17 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ test(); if ( GT_32( fin, 16000 ) && ( EQ_16( lg_out, L_FRAME ) || EQ_16( lg_out, L_FRAME16k ) || EQ_16( lg_out, 512 ) ) ) { #ifdef BASOP_NOGLOB_DECLARE_LOCAL num_den = shl_o( num_den, 1, &Overflow ); //*Q_new_inp = 2; #else num_den = shl( num_den, 1 ); #endif } FOR( i = 0; i < lg_out; i++ ) { sigOut_fx[i] = mult_r( sigOut_fx[i], num_den ); /*Q0*/ move16(); } *Q_new_inp = -1; move16(); } } ELSE Loading @@ -579,13 +569,10 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ IF( EQ_16( fac_num, 8 ) ) { num_den = 26214; move16(); FOR( i = 0; i < lg_out; i++ ) { sigOut_fx[i] = mult_r( sigOut_fx[i], num_den ); /*Q-1*/ move16(); *Q_new_inp = -2; move16(); } } ELSE Loading @@ -594,9 +581,6 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ FOR( i = 0; i < lg_out; i++ ) { sigOut_fx[i] = round_fx( L_mac( L_deposit_h( sigOut_fx[i] ), sigOut_fx[i], num_den ) ); /*Q0*/ *Q_new_inp = -1; move16(); move16(); } } } Loading @@ -607,8 +591,6 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ { sigOut_fx[i] = mult_r( sigOut_fx[i], 16384 ); move16(); /*Q-1*/ *Q_new_inp = -2; move16(); } } /* update the filter memory */ Loading lib_com/prot_fx.h +3 −5 Original line number Diff line number Diff line Loading @@ -2592,14 +2592,12 @@ Word16 modify_Fs_ivas_fx( /* o : length of output Q // modif_fs_fx.c Word16 modify_Fs_fx( /* o : length of output Q0 */ const Word16 sigIn_fx[], /* i : signal to decimate Q0 */ Word16 lg, /* i : length of input Q0 */ const Word32 fin, /* i : frequency of input Q0 */ Word16 lg, /* i : length of i Q0 */ const Word32 fin, /* i : frequency of i Q0 */ Word16 sigOut_fx[], /* o : decimated signal Q0 */ const Word32 fout, /* i : frequency of output Q0 */ Word16 mem_fx[], /* i/o: filter memory Q0 */ const Word16 nblp, /* i : flag indicating if NB low-pass is applied */ Word16 *Q_new_inp, // TO be removed Word16 *mem_decim_size // TO be removed const Word16 nblp /* i : flag indicating if NB low-pass is applied */ ); Word16 modify_Fs_intcub3m_sup_fx( /* o : length of output */ Loading lib_enc/amr_wb_enc_fx.c +2 −3 Original line number Diff line number Diff line Loading @@ -262,8 +262,7 @@ void amr_wb_enc_fx( /*----------------------------------------------------------------* * Change the sampling frequency to 12.8 kHz *----------------------------------------------------------------*/ Word16 Q_new_inp, mem_decim_size; // TO be removed modify_Fs_fx( st->input_fx, input_frame, st->input_Fs, new_inp, 12800, st->mem_decim_fx, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( st->input_fx, input_frame, st->input_Fs, new_inp, 12800, st->mem_decim_fx, 0 ); /* update signal buffer */ Copy( new_inp, st->buf_speech_enc + L_FRAME, L_FRAME ); /* Q0 */ Loading Loading @@ -450,7 +449,7 @@ void amr_wb_enc_fx( } ELSE IF( EQ_32( st->input_Fs, 32000 ) || EQ_32( st->input_Fs, 48000 ) ) { modify_Fs_fx( st->input_fx, input_frame, st->input_Fs, new_inp_16k, 16000, st->mem_decim16k_fx, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( st->input_fx, input_frame, st->input_Fs, new_inp_16k, 16000, st->mem_decim16k_fx, 0 ); } /*----------------------------------------------------------------* Loading lib_enc/cng_enc_fx.c +2 −4 Original line number Diff line number Diff line Loading @@ -761,8 +761,7 @@ void CNG_enc_fx( IF( EQ_16( st_fx->L_frame, L_FRAME16k ) ) { Word16 Q_new_inp, mem_decim_size; // TO be removed modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, hTdCngEnc->exc_mem2_fx, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, hTdCngEnc->exc_mem2_fx, 0 ); } fft_rel_fx( fft_io, L_FFT, LOG2_L_FFT ); Loading Loading @@ -1936,8 +1935,7 @@ void CNG_enc_ivas_fx( IF( EQ_16( st_fx->L_frame, L_FRAME16k ) ) { Word16 Q_new_inp, mem_decim_size; // TO be removed modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, hTdCngEnc->exc_mem2_fx, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, hTdCngEnc->exc_mem2_fx, 0 ); } fft_rel_fx( fft_io, L_FFT, LOG2_L_FFT ); Loading Loading
lib_com/cng_exc_fx.c +2 −3 Original line number Diff line number Diff line Loading @@ -295,10 +295,9 @@ IF( NE_16( Opt_AMR_WB, 1 ) ) /* calculate the spectrum of random excitation signal */ Copy( exc2, fft_io, L_frame ); Word16 Q_new_inp, mem_decim_size; // TO be removed IF( EQ_16( L_frame, L_FRAME16k ) ) { modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, exc_mem1, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, exc_mem1, 0 ); } /* fft_rel(fft_io, L_FFT, LOG2_L_FFT); */ Loading Loading @@ -411,7 +410,7 @@ IF( NE_16( Opt_AMR_WB, 1 ) ) IF( EQ_16( L_frame, L_FRAME16k ) ) { modify_Fs_fx( fft_io, L_FFT, 12800, fft_io, 16000, exc_mem, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( fft_io, L_FFT, 12800, fft_io, 16000, exc_mem, 0 ); } /* enr1 = dotp( fft_io, fft_io, L_frame ) / L_frame; */ Loading
lib_com/modif_fs_fx.c +8 −26 Original line number Diff line number Diff line Loading @@ -330,9 +330,7 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ Word16 sigOut_fx[], /* o : decimated signal Q0 */ const Word32 fout, /* i : frequency of output Q0 */ Word16 mem_fx[], /* i/o: filter memory Q0 */ const Word16 nblp, /* i : flag indicating if NB low-pass is applied */ Word16 *Q_new_inp, // TO be removed Word16 *mem_decim_size // TO be removed const Word16 nblp /* i : flag indicating if NB low-pass is applied */ ) { Word16 i; Loading Loading @@ -364,17 +362,13 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ /*-------------------------------------------------------------------* * Find the resampling configuration *-------------------------------------------------------------------*/ *Q_new_inp = 0; move16(); /* check if fin and fout are the same */ IF( EQ_32( fin, fout ) ) { /* just copy the signal_fx and quit */ Copy( sigIn_fx, sigOut_fx, lg ); *mem_decim_size = 0; *Q_new_inp = 0; move16(); move16(); return lg; } ELSE Loading Loading @@ -439,8 +433,6 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ } mem_len = shl( filt_len, 1 ); *mem_decim_size = mem_len; move16(); signal_fx = signal_tab_fx + 2 * L_FILT_MAX + sub( L_FRAME48k, add( mem_len, lg ) ); signal_ana_fx = signal_fx; mem_len_ana = mem_len; Loading Loading @@ -508,7 +500,7 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ } /* interpolation */ datastep = shr( div_s( shl( fac_den, 7 ), shl( fac_num, 10 ) ), 12 ); datastep = shr( div_s( shl( fac_den, 8 ), shl( fac_num, 11 ) ), 12 ); /* equivalent to 'datastep = fac_den % fac_num' */ temp_n = i_mult2( datastep, fac_num ); /*Q0*/ fracstep = sub( fac_den, temp_n ); Loading Loading @@ -550,9 +542,6 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ FOR( i = 0; i < lg_out; i++ ) { sigOut_fx[i] = round_fx( L_shl( L_mult( sigOut_fx[i], num_den ), 1 ) ); /*Q0*/ *Q_new_inp = -1; move16(); move16(); } } ELSE Loading @@ -562,16 +551,17 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ test(); if ( GT_32( fin, 16000 ) && ( EQ_16( lg_out, L_FRAME ) || EQ_16( lg_out, L_FRAME16k ) || EQ_16( lg_out, 512 ) ) ) { #ifdef BASOP_NOGLOB_DECLARE_LOCAL num_den = shl_o( num_den, 1, &Overflow ); //*Q_new_inp = 2; #else num_den = shl( num_den, 1 ); #endif } FOR( i = 0; i < lg_out; i++ ) { sigOut_fx[i] = mult_r( sigOut_fx[i], num_den ); /*Q0*/ move16(); } *Q_new_inp = -1; move16(); } } ELSE Loading @@ -579,13 +569,10 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ IF( EQ_16( fac_num, 8 ) ) { num_den = 26214; move16(); FOR( i = 0; i < lg_out; i++ ) { sigOut_fx[i] = mult_r( sigOut_fx[i], num_den ); /*Q-1*/ move16(); *Q_new_inp = -2; move16(); } } ELSE Loading @@ -594,9 +581,6 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ FOR( i = 0; i < lg_out; i++ ) { sigOut_fx[i] = round_fx( L_mac( L_deposit_h( sigOut_fx[i] ), sigOut_fx[i], num_den ) ); /*Q0*/ *Q_new_inp = -1; move16(); move16(); } } } Loading @@ -607,8 +591,6 @@ Word16 modify_Fs_fx( /* o : length of output Q0 */ { sigOut_fx[i] = mult_r( sigOut_fx[i], 16384 ); move16(); /*Q-1*/ *Q_new_inp = -2; move16(); } } /* update the filter memory */ Loading
lib_com/prot_fx.h +3 −5 Original line number Diff line number Diff line Loading @@ -2592,14 +2592,12 @@ Word16 modify_Fs_ivas_fx( /* o : length of output Q // modif_fs_fx.c Word16 modify_Fs_fx( /* o : length of output Q0 */ const Word16 sigIn_fx[], /* i : signal to decimate Q0 */ Word16 lg, /* i : length of input Q0 */ const Word32 fin, /* i : frequency of input Q0 */ Word16 lg, /* i : length of i Q0 */ const Word32 fin, /* i : frequency of i Q0 */ Word16 sigOut_fx[], /* o : decimated signal Q0 */ const Word32 fout, /* i : frequency of output Q0 */ Word16 mem_fx[], /* i/o: filter memory Q0 */ const Word16 nblp, /* i : flag indicating if NB low-pass is applied */ Word16 *Q_new_inp, // TO be removed Word16 *mem_decim_size // TO be removed const Word16 nblp /* i : flag indicating if NB low-pass is applied */ ); Word16 modify_Fs_intcub3m_sup_fx( /* o : length of output */ Loading
lib_enc/amr_wb_enc_fx.c +2 −3 Original line number Diff line number Diff line Loading @@ -262,8 +262,7 @@ void amr_wb_enc_fx( /*----------------------------------------------------------------* * Change the sampling frequency to 12.8 kHz *----------------------------------------------------------------*/ Word16 Q_new_inp, mem_decim_size; // TO be removed modify_Fs_fx( st->input_fx, input_frame, st->input_Fs, new_inp, 12800, st->mem_decim_fx, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( st->input_fx, input_frame, st->input_Fs, new_inp, 12800, st->mem_decim_fx, 0 ); /* update signal buffer */ Copy( new_inp, st->buf_speech_enc + L_FRAME, L_FRAME ); /* Q0 */ Loading Loading @@ -450,7 +449,7 @@ void amr_wb_enc_fx( } ELSE IF( EQ_32( st->input_Fs, 32000 ) || EQ_32( st->input_Fs, 48000 ) ) { modify_Fs_fx( st->input_fx, input_frame, st->input_Fs, new_inp_16k, 16000, st->mem_decim16k_fx, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( st->input_fx, input_frame, st->input_Fs, new_inp_16k, 16000, st->mem_decim16k_fx, 0 ); } /*----------------------------------------------------------------* Loading
lib_enc/cng_enc_fx.c +2 −4 Original line number Diff line number Diff line Loading @@ -761,8 +761,7 @@ void CNG_enc_fx( IF( EQ_16( st_fx->L_frame, L_FRAME16k ) ) { Word16 Q_new_inp, mem_decim_size; // TO be removed modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, hTdCngEnc->exc_mem2_fx, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, hTdCngEnc->exc_mem2_fx, 0 ); } fft_rel_fx( fft_io, L_FFT, LOG2_L_FFT ); Loading Loading @@ -1936,8 +1935,7 @@ void CNG_enc_ivas_fx( IF( EQ_16( st_fx->L_frame, L_FRAME16k ) ) { Word16 Q_new_inp, mem_decim_size; // TO be removed modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, hTdCngEnc->exc_mem2_fx, 0, &Q_new_inp, &mem_decim_size ); modify_Fs_fx( fft_io, L_FRAME16k, 16000, fft_io, 12800, hTdCngEnc->exc_mem2_fx, 0 ); } fft_rel_fx( fft_io, L_FFT, LOG2_L_FFT ); Loading