From a2823831f4a5fb3feb6542d5f05c3e761eb6266d Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 7 Apr 2026 12:05:38 +0200 Subject: [PATCH 1/6] formatting, editorial changes --- lib_com/ivas_prot_fx.h | 2 +- lib_com/prot_fx.h | 44 +++++------ lib_com/tools_fx.c | 4 +- lib_enc/evs_enc_fx.c | 11 +-- lib_enc/ext_sig_ana_fx.c | 3 +- lib_enc/ivas_core_pre_proc_front_fx.c | 108 +++++++++++++------------- lib_enc/ivas_cpe_enc_fx.c | 14 +--- lib_enc/ivas_sce_enc_fx.c | 1 - lib_enc/ivas_stereo_dft_enc_fx.c | 4 +- lib_enc/ivas_stereo_icbwe_enc_fx.c | 6 +- lib_enc/ivas_stereo_td_analysis_fx.c | 1 - lib_enc/ivas_tcx_core_enc_fx.c | 2 +- lib_enc/stat_enc.h | 1 + lib_enc/swb_bwe_enc_fx.c | 3 +- lib_enc/swb_pre_proc_fx.c | 4 +- lib_enc/tcx_utils_enc_fx.c | 1 - 16 files changed, 97 insertions(+), 112 deletions(-) diff --git a/lib_com/ivas_prot_fx.h b/lib_com/ivas_prot_fx.h index f6b376af3..7d5d49a0f 100644 --- a/lib_com/ivas_prot_fx.h +++ b/lib_com/ivas_prot_fx.h @@ -2692,7 +2692,7 @@ Word16 ivas_acelp_tcx20_switching_fx( Word16 q_inp, /* i : i/p Q */ Word16 *wsp, /* i : input weighted signal */ #ifdef NONBE_FIX_ISSUE_2206 - Word16 q_wsp, /* i : Q of input weighted signal */ + Word16 q_wsp, /* i : Q of input weighted signal */ #endif Word32 non_staX, /* i : unbound non-stationarity for sp/mu clas */ Word16 *pitch_fr, /* i : fraction pitch values */ diff --git a/lib_com/prot_fx.h b/lib_com/prot_fx.h index 50def7d2a..bf7f6a76f 100644 --- a/lib_com/prot_fx.h +++ b/lib_com/prot_fx.h @@ -8725,7 +8725,7 @@ Word32 dotp_fx( const Word16 x[], /* i : vector x[] */ const Word16 y[], /* i : vector y[] */ const Word16 n, /* i : vector length */ - Word16 *exp /* (o) : exponent of result (0..+30) */ + Word16 *exp /* o : exponent of result (0..+30) */ ); /* o : sum of all squared vector elements Q(2x+1)*/ @@ -8735,52 +8735,52 @@ Word32 sum2_fx_mod( ); void Copy_Scale_sig( - const Word16 x[], /* i : signal to scale i Qx */ - Word16 y[], /* o : scaled signal output Qx */ - const Word16 lg, /* i : size of x[] Q0 */ + const Word16 x[], /* i : signal to scale i Qx */ + Word16 y[], /* o : scaled signal output Qx */ + const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); #ifdef NONBE_FIX_ISSUE_2206 void Copy_Scale_sig_nosat( - const Word16 x[], /* i : signal to scale i Qx */ - Word16 y[], /* o : scaled signal output Qx */ - const Word16 lg, /* i : size of x[] Q0 */ + const Word16 x[], /* i : signal to scale i Qx */ + Word16 y[], /* o : scaled signal output Qx */ + const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); #endif void Scale_sig32( - Word32 x[], /* i/o: signal to scale Qx */ - const Word16 lg, /* i : size of x[] Q0 */ + Word32 x[], /* i/o: signal to scale Qx */ + const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); void Copy_Scale_sig_16_32_DEPREC( - const Word16 x[], /* i : signal to scale i Qx */ - Word32 y[], /* o : scaled signal output Qx */ - const Word16 lg, /* i : size of x[] Q0 */ + const Word16 x[], /* i : signal to scale i Qx */ + Word32 y[], /* o : scaled signal output Qx */ + const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); void Copy_Scale_sig_16_32_r( - const Word16 x[], /* i : signal to scale input Qx */ - Word32 y[], /* o : scaled signal output Qx */ - const Word16 lg, /* i : size of x[] Q0 */ + const Word16 x[], /* i : signal to scale input Qx */ + Word32 y[], /* o : scaled signal output Qx */ + const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); void Copy_Scale_sig_16_32_no_sat( - const Word16 x[], /* i : signal to scale input Qx */ - Word32 y[], /* o : scaled signal output Qx */ - const Word16 lg, /* i : size of x[] Q0 */ + const Word16 x[], /* i : signal to scale input Qx */ + Word32 y[], /* o : scaled signal output Qx */ + const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); void Copy_Scale_sig_32_16( - const Word32 x[], /* i : signal to scale i Qx */ - Word16 y[], /* o : scaled signal output Qx */ - const Word16 lg, /* i : size of x[] Q0 */ + const Word32 x[], /* i : signal to scale i Qx */ + Word16 y[], /* o : scaled signal output Qx */ + const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); @@ -8789,7 +8789,7 @@ void Copy_Scale_sig_32_16_nosat( const Word32 x[], /* i : signal to scale input Qx */ Word16 y[], /* o : scaled signal output Qx */ const Word16 lg, /* i : size of x[] Q0 */ - const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ + const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); #endif diff --git a/lib_com/tools_fx.c b/lib_com/tools_fx.c index c9eb8c9db..89a10b031 100644 --- a/lib_com/tools_fx.c +++ b/lib_com/tools_fx.c @@ -1260,7 +1260,7 @@ void Copy_Scale_sig_nosat( const Word16 x[], /* i : signal to scale input Qx */ Word16 y[], /* o : scaled signal output Qx */ const Word16 lg, /* i : size of x[] Q0 */ - const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ + const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ) { Word16 i; @@ -1466,7 +1466,7 @@ void Copy_Scale_sig_32_16_nosat( const Word32 x[], /* i : signal to scale input Qx */ Word16 y[], /* o : scaled signal output Qx */ const Word16 lg, /* i : size of x[] Q0 */ - const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ + const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ) { Word16 i; diff --git a/lib_enc/evs_enc_fx.c b/lib_enc/evs_enc_fx.c index a43f36d2e..49e8ee73b 100644 --- a/lib_enc/evs_enc_fx.c +++ b/lib_enc/evs_enc_fx.c @@ -94,7 +94,7 @@ ivas_error evs_enc_fx( move16(); st->hBWE_FD->Q_new_input_hp = 0; move16(); - st->hBWE_FD->old_fdbwe_speech_q = -1; + st->hBWE_FD->old_fdbwe_speech_q = -Q1; move16(); #endif @@ -425,21 +425,22 @@ ivas_error evs_enc_fx( { /* Common pre-processing for WB TBE and WB BWE */ #ifdef NONBE_FIX_ISSUE_2206 - wb_pre_proc_fx( st, EVS_MONO, new_inp_resamp16k, hb_speech, -1 ); + wb_pre_proc_fx( st, EVS_MONO, new_inp_resamp16k, hb_speech, -Q1 ); #else wb_pre_proc_fx( st, EVS_MONO, new_inp_resamp16k, hb_speech ); #endif } #ifdef NONBE_FIX_ISSUE_2206 - st->q_inp = -1; /* meaning Q0 */ + st->q_inp = -Q1; /* meaning Q0 */ + move16(); #endif IF( EQ_16( st->extl, WB_TBE ) ) { /* WB TBE encoder */ #ifdef NONBE_FIX_ISSUE_2206 - wb_tbe_enc_fx( st, hb_speech, -1, bwe_exc_extended, Q_new, voice_factors, pitch_buf ); + wb_tbe_enc_fx( st, hb_speech, -Q1, bwe_exc_extended, Q_new, voice_factors, pitch_buf ); #else wb_tbe_enc_fx( st, hb_speech, bwe_exc_extended, Q_new, voice_factors, pitch_buf ); #endif @@ -452,7 +453,7 @@ ivas_error evs_enc_fx( { /* WB BWE encoder */ #ifdef NONBE_FIX_ISSUE_2206 - wb_bwe_enc_fx( st, new_inp_resamp16k, -1 ); + wb_bwe_enc_fx( st, new_inp_resamp16k, -Q1 ); #else wb_bwe_enc_fx( st, new_inp_resamp16k ); #endif diff --git a/lib_enc/ext_sig_ana_fx.c b/lib_enc/ext_sig_ana_fx.c index ec463b39d..3b2cf0164 100644 --- a/lib_enc/ext_sig_ana_fx.c +++ b/lib_enc/ext_sig_ana_fx.c @@ -478,7 +478,7 @@ void core_signal_analysis_high_bitrate_fx( void core_signal_analysis_high_bitrate_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 - const Word16 *new_samples, /*i: *Q_new */ + const Word16 *new_samples, /*i : *Q_new */ #else const Word16 *new_samples, /*i : Q0 */ #endif @@ -670,7 +670,6 @@ void core_signal_analysis_high_bitrate_ivas_fx( Scale_sig( &( st->mem_wsp_enc ), 1, Q_exp ); // *Q_new } #endif - IF( EQ_16( hTcxEnc->tcxMode, TCX_10 ) ) { Copy( ¶m_core[1 + NOISE_FILL_RANGES], ¶m_core[NPRM_DIV + 1 + NOISE_FILL_RANGES], LTPSIZE ); // Q0 diff --git a/lib_enc/ivas_core_pre_proc_front_fx.c b/lib_enc/ivas_core_pre_proc_front_fx.c index 6e52b3425..704d49914 100644 --- a/lib_enc/ivas_core_pre_proc_front_fx.c +++ b/lib_enc/ivas_core_pre_proc_front_fx.c @@ -77,63 +77,63 @@ static Word16 get_zero_flag( const Word32 arr[], const Word16 len ) *--------------------------------------------------------------------*/ void pre_proc_front_ivas_fx( - SCE_ENC_HANDLE hSCE, /* i/o: SCE encoder structure */ - CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ - const Word32 element_brate, /* i : SCE/CPE element bitrate Q0*/ - const Word16 nb_bits_metadata, /* i : number of metadata bits Q0*/ - const Word16 input_frame, /* i : frame length Q0*/ - const Word16 n, /* i : channel number Q0*/ - Word16 old_inp_12k8_fx[], /* o : buffer of old input signal (st->Q_inp until preemph, then Q_new, then Q_new-1 towards the end)*/ + SCE_ENC_HANDLE hSCE, /* i/o: SCE encoder structure */ + CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ + const Word32 element_brate, /* i : SCE/CPE element bitrate Q0*/ + const Word16 nb_bits_metadata, /* i : number of metadata bits Q0*/ + const Word16 input_frame, /* i : frame length Q0*/ + const Word16 n, /* i : channel number Q0*/ + Word16 old_inp_12k8_fx[], /* o : buffer of old input signal (st->Q_inp until preemph, then Q_new, then Q_new-1 towards the end)*/ #ifdef NONBE_FIX_ISSUE_2206 - Word16 old_inp_16k_fx[], /* o : buffer of old input signal @16kHz (st->Q_inp until preemph, then Q_new, then Q_new-1 towards the end)*/ + Word16 old_inp_16k_fx[], /* o : buffer of old input signal @16kHz (st->Q_inp until preemph, then Q_new, then Q_new-1 towards the end)*/ #else Word16 old_inp_16k_fx[], /* o : buffer of old input signal @16kHz Q_new-1*/ #endif - Word32 *ener_fx, /* o : residual energy from Levinson-Durbin epsP_fx_q*/ - Word16 *relE_fx, /* o : frame relative energy Q8*/ - Word16 A_fx[NB_SUBFR16k * ( M + 1 )], /* o : A(z) unquantized for the 4 subframes Q12*/ - Word16 Aw_fx[NB_SUBFR16k * ( M + 1 )], /* o : weighted A(z) unquantized for subframes Q12*/ - Word32 epsP_fx[M + 1], /* o : LP prediction errors epsP_fx_q*/ - Word16 *epsP_fx_q, /* o : Q factor of LP prediction errors */ - Word16 lsp_new_fx[M], /* o : LSPs at the end of the frame Q15*/ - Word16 lsp_mid_fx[M], /* o : LSPs in the middle of the frame Q15*/ - Word16 *vad_hover_flag, /* o : VAD hangover flag Q0*/ - Word16 *attack_flag, /* o : flag signaling attack Q0*/ - Word32 realBuffer_fx[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: real buffer Q(q_re_im_buf)*/ - Word32 imagBuffer_fx[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: imag buffer Q(q_re_im_buf)*/ - Word16 *q_re_im_buf, /* i/o: Q-factor of real and imag buffer */ - Word16 old_wsp_fx[], /* o : weighted input signal buffer q_old_wsp*/ - Word16 *q_old_wsp, /* o : Q factor of weighted input signal buffer */ - Word16 pitch_fr_fx[NB_SUBFR], /* o : fractional pitch values Q6*/ - Word16 voicing_fr_fx[NB_SUBFR], /* o : fractional pitch gains Q15*/ - Word16 *loc_harm, /* o : harmonicity flag Q0*/ - Word16 *cor_map_sum_fx, /* o : speech/music clasif. parameter Q8*/ - Word16 *vad_flag_dtx, /* o : HE-SAD flag with additional DTX HO Q0*/ - Word32 enerBuffer_fx[CLDFB_NO_CHANNELS_MAX], /* o : energy buffer enerBuffer_fx_exp*/ - Word16 *enerBuffer_fx_exp, /* o : energy buffer */ - Word16 fft_buff_fx[2 * L_FFT], /* o : FFT buffer fft_buff_fx_q*/ - Word16 *fft_buff_fx_q, /* o : FFT buffer */ - const Word16 tdm_A_PCh_fx[M + 1], /* i : unq. LP coeff. of primary channel Q12*/ - const Word16 tdm_lsp_new_PCh_fx[M], /* i : unq. LSPs of primary channel Q15*/ - const Word32 currFlatness_fx, /* i : flatness parameter Q21*/ - const Word16 tdm_ratio_idx, /* i : Current Ratio_L index Q0*/ - Word32 fr_bands_LR_fx[][2 * NB_BANDS], /* i : energy in frequency bands fr_bands_LR_fx_q*/ - Word16 fr_bands_LR_fx_q[CPE_CHANNELS], /* i : Q factors of energy in frequency bands */ - const Word16 Etot_LR_fx[], /* i : total energy Left & Right channel Q8*/ - Word32 lf_E_LR_fx[][2 * VOIC_BINS], /* i : per bin spectrum energy in lf, LR channels lf_E_LR_fx_q*/ - const Word16 lf_E_LR_fx_q, /* i : Q factor of per bin spectrum energy in lf, LR channels */ - const Word16 localVAD_HE_SAD_LR[], /* i : HE-SAD flag without hangover, LR channels Q0*/ - Word32 band_energies_LR_fx[2 * NB_BANDS], /* o : energy in critical bands without minimum noise floor E_MIN band_energies_LR_fx_q*/ + Word32 *ener_fx, /* o : residual energy from Levinson-Durbin epsP_fx_q*/ + Word16 *relE_fx, /* o : frame relative energy Q8*/ + Word16 A_fx[NB_SUBFR16k * ( M + 1 )], /* o : A(z) unquantized for the 4 subframes Q12*/ + Word16 Aw_fx[NB_SUBFR16k * ( M + 1 )], /* o : weighted A(z) unquantized for subframes Q12*/ + Word32 epsP_fx[M + 1], /* o : LP prediction errors epsP_fx_q*/ + Word16 *epsP_fx_q, /* o : Q factor of LP prediction errors */ + Word16 lsp_new_fx[M], /* o : LSPs at the end of the frame Q15*/ + Word16 lsp_mid_fx[M], /* o : LSPs in the middle of the frame Q15*/ + Word16 *vad_hover_flag, /* o : VAD hangover flag Q0*/ + Word16 *attack_flag, /* o : flag signaling attack Q0*/ + Word32 realBuffer_fx[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: real buffer Q(q_re_im_buf)*/ + Word32 imagBuffer_fx[CLDFB_NO_COL_MAX][CLDFB_NO_CHANNELS_MAX], /* i/o: imag buffer Q(q_re_im_buf)*/ + Word16 *q_re_im_buf, /* i/o: Q-factor of real and imag buffer */ + Word16 old_wsp_fx[], /* o : weighted input signal buffer q_old_wsp*/ + Word16 *q_old_wsp, /* o : Q factor of weighted input signal buffer */ + Word16 pitch_fr_fx[NB_SUBFR], /* o : fractional pitch values Q6*/ + Word16 voicing_fr_fx[NB_SUBFR], /* o : fractional pitch gains Q15*/ + Word16 *loc_harm, /* o : harmonicity flag Q0*/ + Word16 *cor_map_sum_fx, /* o : speech/music clasif. parameter Q8*/ + Word16 *vad_flag_dtx, /* o : HE-SAD flag with additional DTX HO Q0*/ + Word32 enerBuffer_fx[CLDFB_NO_CHANNELS_MAX], /* o : energy buffer enerBuffer_fx_exp*/ + Word16 *enerBuffer_fx_exp, /* o : energy buffer */ + Word16 fft_buff_fx[2 * L_FFT], /* o : FFT buffer fft_buff_fx_q*/ + Word16 *fft_buff_fx_q, /* o : FFT buffer */ + const Word16 tdm_A_PCh_fx[M + 1], /* i : unq. LP coeff. of primary channel Q12*/ + const Word16 tdm_lsp_new_PCh_fx[M], /* i : unq. LSPs of primary channel Q15*/ + const Word32 currFlatness_fx, /* i : flatness parameter Q21*/ + const Word16 tdm_ratio_idx, /* i : Current Ratio_L index Q0*/ + Word32 fr_bands_LR_fx[][2 * NB_BANDS], /* i : energy in frequency bands fr_bands_LR_fx_q*/ + Word16 fr_bands_LR_fx_q[CPE_CHANNELS], /* i : Q factors of energy in frequency bands */ + const Word16 Etot_LR_fx[], /* i : total energy Left & Right channel Q8*/ + Word32 lf_E_LR_fx[][2 * VOIC_BINS], /* i : per bin spectrum energy in lf, LR channels lf_E_LR_fx_q*/ + const Word16 lf_E_LR_fx_q, /* i : Q factor of per bin spectrum energy in lf, LR channels */ + const Word16 localVAD_HE_SAD_LR[], /* i : HE-SAD flag without hangover, LR channels Q0*/ + Word32 band_energies_LR_fx[2 * NB_BANDS], /* o : energy in critical bands without minimum noise floor E_MIN band_energies_LR_fx_q*/ const Word16 band_energies_LR_fx_q, /* o : Q factors of energy in critical bands without minimum noise floor */ - const Word16 flag_16k_smc, /* i : flag to indicate if the OL SMC is run at 16 kHz Q0*/ - const Word16 front_vad_flag, /* i : front-VAD flag to overwrite VAD decision Q0*/ - const Word16 force_front_vad, /* i : flag to force VAD decision Q0*/ - const Word16 front_vad_dtx_flag, /* i : front-VAD DTX flag to overwrite VAD decision Q0*/ - const IVAS_FORMAT ivas_format, /* i : IVAS format */ - const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0) Q0*/ - const Word32 last_ivas_total_brate, /* i : last IVAS total bitrate Q0*/ - const Word32 ivas_total_brate, /* i : IVAS total bitrate - for setting the DTX Q0*/ - Word16 *Q_new /* i/o : Q factor of speech buffers */ + const Word16 flag_16k_smc, /* i : flag to indicate if the OL SMC is run at 16 kHz Q0*/ + const Word16 front_vad_flag, /* i : front-VAD flag to overwrite VAD decision Q0*/ + const Word16 force_front_vad, /* i : flag to force VAD decision Q0*/ + const Word16 front_vad_dtx_flag, /* i : front-VAD DTX flag to overwrite VAD decision Q0*/ + const IVAS_FORMAT ivas_format, /* i : IVAS format */ + const Word16 MCT_flag, /* i : hMCT handle allocated (1) or not (0) Q0*/ + const Word32 last_ivas_total_brate, /* i : last IVAS total bitrate Q0*/ + const Word32 ivas_total_brate, /* i : IVAS total bitrate - for setting the DTX Q0*/ + Word16 *Q_new /* i/o : Q factor of speech buffers */ ) { Encoder_State *st; @@ -548,7 +548,7 @@ void pre_proc_front_ivas_fx( set16_fx( temp1F_icatdmResampBuf_fx, 0, L_FILT_MAX ); new_inp_out_size = modify_Fs_fx( temp1F_icatdmResampBuf_fx, NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ), input_Fs, new_inp_12k8_fx + L_FRAME, INT_FS_12k8, mem_decim_dummy_fx, 0, &Q_new_inp, &mem_decim_size ); /* st->q_inp */ #ifdef NONBE_FIX_ISSUE_2206 - /* The scalining below can saturate if Q_new_inp <= -2 */ + /* The scailing below can saturate if Q_new_inp <= -2 */ scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #else Scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ @@ -571,6 +571,7 @@ void pre_proc_front_ivas_fx( move16(); #endif } + #ifdef NONBE_FIX_ISSUE_2206 Copy( st->mem_decim_fx_q_inp, st->mem_decim_fx, 2 * L_FILT_MAX ); st->q_mem_decim_fx = st->q_inp; @@ -1608,7 +1609,6 @@ void pre_proc_front_ivas_fx( st->mem_wsp_enc = shl( st->mem_wsp_enc, sub( 0, sub( Q15, st->exp_buf_wspeech_enc ) ) ); // Q0 move16(); #endif - *Q_new = add( *Q_new, Q_inp_const ); // actual Q_new move16(); #ifdef NONBE_FIX_ISSUE_2206 diff --git a/lib_enc/ivas_cpe_enc_fx.c b/lib_enc/ivas_cpe_enc_fx.c index 16eb657f0..68b7f6155 100644 --- a/lib_enc/ivas_cpe_enc_fx.c +++ b/lib_enc/ivas_cpe_enc_fx.c @@ -828,7 +828,6 @@ ivas_error ivas_cpe_enc_fx( sts[1]->exp_old_inp_12k8 = Q15; move16(); } - #ifndef NONBE_FIX_ISSUE_2206 q_min = sts[1]->q_old_inp; move16(); @@ -964,7 +963,7 @@ ivas_error ivas_cpe_enc_fx( q_inp32 = sts[0]->q_inp32; move16(); stereo_dft_enc_synthesize_fx( hCPE->hStereoDft, old_inp_12k8_fx[0] + L_INP_MEM, &q_inp32, &out_12k8_start_ind[0], &out_12k8_end_ind[0], 0, input_Fs, INT_FS_12k8, 0, NULL ); - // Copy_Scale_sig_32_16( old_inp_12k8_fx[0], old_inp_12k8_16fx[0], L_INP_12k8, sub( sts[0]->q_inp, q_inp32 ) ); // q_inp32->sts[0]->q_inp + Copy_Scale_sig_32_16( old_inp_12k8_fx[0], old_inp_12k8_16fx[0], add( L_INP_MEM, out_12k8_start_ind[0] ), sub( sts[0]->q_inp, sts[0]->q_inp32 ) ); // q_inp32->sts[0]->q_inp Copy_Scale_sig_32_16( old_inp_12k8_fx[0] + L_INP_MEM + out_12k8_start_ind[0], old_inp_12k8_16fx[0] + L_INP_MEM + out_12k8_start_ind[0], sub( out_12k8_end_ind[0], out_12k8_start_ind[0] ), sub( sts[0]->q_inp, q_inp32 ) ); // q_inp32->sts[0]->q_inp Copy_Scale_sig_32_16( old_inp_12k8_fx[0] + L_INP_MEM + out_12k8_end_ind[0], old_inp_12k8_16fx[0] + L_INP_MEM + out_12k8_end_ind[0], s_max( 0, sub( L_INP_12k8 - L_INP_MEM, out_12k8_end_ind[0] ) ), sub( sts[0]->q_inp, sts[0]->q_inp32 ) ); // sts[0]->q_inp32->sts[0]->q_inp @@ -977,7 +976,6 @@ ivas_error ivas_cpe_enc_fx( IF( EQ_32( input_Fs, internal_Fs ) ) { #ifdef NONBE_FIX_ISSUE_2206 - // Copy_Scale_sig32( sts[0]->input32_fx - STEREO_DFT_OVL_16k, old_inp_16k_fx[0] + L_INP_MEM - STEREO_DFT_OVL_16k, add( input_frame, STEREO_DFT_OVL_16k ), sub( Q15, sts[0]->q_inp32 ) ); /* Q15 */ Copy32( sts[0]->input32_fx - STEREO_DFT_OVL_16k, old_inp_16k_fx[0] + L_INP_MEM - STEREO_DFT_OVL_16k, add( input_frame, STEREO_DFT_OVL_16k ) ); /* sts[0]->q_inp32 */ Copy_Scale_sig_32_16( old_inp_16k_fx[0], old_inp_16k_16fx[0], L_INP, sub( sts[0]->q_inp, sts[0]->q_inp32 ) ); // q_inp32 -> sts[0]->q_inp #else @@ -1015,18 +1013,13 @@ ivas_error ivas_cpe_enc_fx( move16(); stereo_dft_enc_synthesize_fx( hCPE->hStereoDft, old_inp_12k8_fx[1] + L_INP_MEM, &q_inp32, &out_12k8_start_ind[1], &out_12k8_end_ind[1], 1, input_Fs, 8000, 0, NULL ); - /* update old input signal buffer */ - // Copy_Scale_sig_32_16( old_inp_12k8_fx[1] + L_FRAME8k, sts[1]->old_inp_12k8_fx, L_INP_MEM, 0 - 15 ); // Q0 Copy_Scale_sig_32_16( old_inp_12k8_fx[1] + L_FRAME8k, sts[1]->old_inp_12k8_fx, add( L_INP_MEM, out_12k8_start_ind[1] ), sub( 0, sts[1]->q_inp32 ) ); // sts[1]->q_inp32 -> Q0 - // Copy_Scale_sig_32_16( old_inp_12k8_fx[1] + L_FRAME8k + L_INP_MEM + out_12k8_start_ind[1], sts[1]->old_inp_12k8_fx + L_INP_MEM + out_12k8_start_ind[1], sub( out_12k8_end_ind[1], out_12k8_start_ind[1] ), sub( 0, q_inp32 ) ); // q_inp32 -> Q0 assert( out_12k8_start_ind[1] <= 0 ); Copy_Scale_sig_32_16( old_inp_12k8_fx[1] + L_FRAME8k + L_INP_MEM + out_12k8_start_ind[1], sts[1]->old_inp_12k8_fx + L_INP_MEM + out_12k8_start_ind[1], sub( 0, out_12k8_start_ind[1] ), sub( 0, q_inp32 ) ); // q_inp32 -> Q0 - // Copy_Scale_sig_32_16( old_inp_12k8_fx[1] + L_FRAME8k + L_INP_MEM + out_12k8_end_ind[1], old_inp_12k8_16fx[1] + L_INP_MEM + out_12k8_end_ind[1], sub( L_INP_MEM - L_INP_MEM, out_12k8_end_ind[1], ), sub( 0, sts[1]->q_inp32 ) ); // sts[1]->q_inp32 -> Q0 sts[1]->exp_old_inp_12k8 = Q15; move16(); - // Copy_Scale_sig_32_16( old_inp_12k8_fx[1], old_inp_12k8_16fx[1], L_INP_12k8, -Q16 ); // Q-1 Copy_Scale_sig_32_16( old_inp_12k8_fx[1], old_inp_12k8_16fx[1], add( L_INP_MEM, out_12k8_start_ind[1] ), sub( -1, sts[1]->q_inp32 ) ); // sts[1]->q_inp32 -> Q-1 Copy_Scale_sig_32_16( old_inp_12k8_fx[1] + L_INP_MEM + out_12k8_start_ind[1], old_inp_12k8_16fx[1] + L_INP_MEM + out_12k8_start_ind[1], sub( out_12k8_end_ind[1], out_12k8_start_ind[1] ), sub( -1, q_inp32 ) ); // q_inp32 -> Q-1 Copy_Scale_sig_32_16( old_inp_12k8_fx[1] + L_INP_MEM + out_12k8_end_ind[1], old_inp_12k8_16fx[1] + L_INP_MEM + out_12k8_end_ind[1], s_max( 0, sub( L_INP_12k8 - L_INP_MEM, out_12k8_end_ind[1] ) ), sub( -1, sts[1]->q_inp32 ) ); // sts[1]->q_inp32 -> Q-1 @@ -1342,10 +1335,6 @@ ivas_error ivas_cpe_enc_fx( } #ifdef NONBE_FIX_ISSUE_2206 -#if ( CPE_CHANNELS != 2 ) -#error -#endif - // Copy_Scale_sig_16_32_no_sat( old_inp_12k8_16fx[0], old_inp_12k8_fx[0], L_INP_12k8, sub( Q15 + 1, Q_new[0] ) ); // Q_new[0]-1 -> Q15 Copy_Scale_sig_16_32_no_sat( old_inp_12k8_16fx[1], old_inp_12k8_fx[1], L_INP_12k8, Q15 + 1 ); // Q(-1) -> Q15 #else FOR( i = 0; i < CPE_CHANNELS; i++ ) @@ -1353,6 +1342,7 @@ ivas_error ivas_cpe_enc_fx( Copy_Scale_sig_16_32_no_sat( old_inp_12k8_16fx[i], old_inp_12k8_fx[i], L_INP_12k8, Q16 ); // Q(-1) -> Q15 } #endif + stereo_dft_enc_res_fx( hCPE->hStereoDft, old_inp_12k8_fx[1] + L_INP_MEM - STEREO_DFT_OVL_8k, hCPE->hMetaData, &nb_bits, max_bits ); } diff --git a/lib_enc/ivas_sce_enc_fx.c b/lib_enc/ivas_sce_enc_fx.c index ad43a3dd0..400e22284 100644 --- a/lib_enc/ivas_sce_enc_fx.c +++ b/lib_enc/ivas_sce_enc_fx.c @@ -358,7 +358,6 @@ ivas_error ivas_sce_enc_fx( e_old_wsp[0] = Q16; move16(); #endif - IF( NE_32( ( error = ivas_core_enc_fx( hSCE, NULL, NULL, 1, old_inp_12k8_fx, old_inp_16k_fx, Q_new, ener_fx, A_fx, Aw_fx, epsP_fx, epsP_fx_q, lsp_new_fx, lsp_mid_fx, vad_hover_flag, attack_flag, realBuffer_fx, imagBuffer_fx, &q_re_im_buf, old_wsp_fx, e_old_wsp, loc_harm, cor_map_sum_fx, vad_flag_dtx, enerBuffer_fx, enerBuffer_fx_exp, fft_buff_fx, 0, ivas_format, flag_16k_smc ) ), IVAS_ERR_OK ) ) { return error; diff --git a/lib_enc/ivas_stereo_dft_enc_fx.c b/lib_enc/ivas_stereo_dft_enc_fx.c index 095b918ef..83c00ac68 100644 --- a/lib_enc/ivas_stereo_dft_enc_fx.c +++ b/lib_enc/ivas_stereo_dft_enc_fx.c @@ -1242,7 +1242,6 @@ Word32 stereo_dft_enc_synthesize_fx( Word16 trigo_step; Word16 scal_fac; - /*-----------------------------------------------------------------* * Initialization *-----------------------------------------------------------------*/ @@ -1613,10 +1612,8 @@ Word32 stereo_dft_enc_synthesize_fx( FOR( i = 0; i < ovl; i++ ) { - // output[offset + i] = mem[i] + tmp[zp + i] * win[i]; output_fx[offset + i] = L_add( L_shl( mem_fx[i], mem_shift ), Mpy_32_32( tmp_fx[zp + i], win_fx[i] ) ); move32(); - // mem[i] = tmp[zp + N + i] * win[ovl - 1 - i]; mem_fx[i] = Mpy_32_32( tmp_fx[zp + N + i], win_fx[ovl - 1 - i] ); move32(); } @@ -1693,6 +1690,7 @@ Word32 stereo_dft_enc_synthesize_fx( *nrg_out_fx_e = nrg_fx_e; move16(); } + pop_wmops(); return ( nrg_fx ); } diff --git a/lib_enc/ivas_stereo_icbwe_enc_fx.c b/lib_enc/ivas_stereo_icbwe_enc_fx.c index 9564b5def..b254fba01 100644 --- a/lib_enc/ivas_stereo_icbwe_enc_fx.c +++ b/lib_enc/ivas_stereo_icbwe_enc_fx.c @@ -614,14 +614,14 @@ static void icbwe_dft_stereo_param_fx( void stereo_icBWE_enc_fx( CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ #ifdef NONBE_FIX_ISSUE_2206_SWB_EXPERIMENT - const Word16 shb_speech_ref_fx16[], /* i : SHB speech ref channel shb_speech_ref_q*/ + const Word16 shb_speech_ref_fx16[], /* i : SHB speech ref channel shb_speech_ref_q*/ const Word16 shb_speech_ref_q, /* i : SHB speech ref channel Q */ #else const Word16 shb_speech_ref_fx16[], /* i : SHB speech ref channel Q0*/ #endif - Word16 shb_speech_nonref_fx_16[], /* i/o: SHB speech non-ref channel shb_speech_nonref_e*/ + Word16 shb_speech_nonref_fx_16[], /* i/o: SHB speech non-ref channel shb_speech_nonref_e*/ Word16 shb_speech_nonref_e, /* i/o: SHB speech non-ref channel */ - const Word16 *voice_factors_fx16 /* i : voicing factors Q15 */ + const Word16 *voice_factors_fx16 /* i : voicing factors Q15 */ ) { Word16 i, j, k, nbSubFr; diff --git a/lib_enc/ivas_stereo_td_analysis_fx.c b/lib_enc/ivas_stereo_td_analysis_fx.c index ebb1ed9d4..61aa03ab8 100644 --- a/lib_enc/ivas_stereo_td_analysis_fx.c +++ b/lib_enc/ivas_stereo_td_analysis_fx.c @@ -869,7 +869,6 @@ static Word16 Get_dt_lt_ener_fx( sts[0]->q_inp = sts[1]->q_inp; move16(); #endif - tdm_SM_flag_loc = tdm_last_SM_flag; /* Q0 */ move16(); diff --git a/lib_enc/ivas_tcx_core_enc_fx.c b/lib_enc/ivas_tcx_core_enc_fx.c index e4fa792be..93ffebbba 100644 --- a/lib_enc/ivas_tcx_core_enc_fx.c +++ b/lib_enc/ivas_tcx_core_enc_fx.c @@ -376,7 +376,6 @@ void stereo_tcx_core_enc( Q_new = 0; move16(); #endif - core_signal_analysis_high_bitrate_ivas_fx( p_new_samples, T_op, lsp_new_fx, lsp_mid_fx, st, tnsSize, tnsBits, param_core, <pBits, NULL, st->L_frame, hTcxEnc->L_frameTCX, last_element_mode, vad_hover_flag, NULL, NULL, &Q_new, NULL ); bitsAvailable = sub( st->bits_frame_core, nbits_header ); @@ -555,6 +554,7 @@ void stereo_tcx_core_enc( s = s_min( s, norm_arr( st->hLPDmem->syn, M ) ); #ifdef NONBE_FIX_ISSUE_2206 Word16 wspeech_backup = 0; + move16(); #endif IF( st->tcxonly == 0 ) diff --git a/lib_enc/stat_enc.h b/lib_enc/stat_enc.h index 2ee4a05f2..6d6a46205 100644 --- a/lib_enc/stat_enc.h +++ b/lib_enc/stat_enc.h @@ -937,6 +937,7 @@ typedef struct td_bwe_enc_structure Word16 state_ana_filt_shb_fx_Q; #endif Word16 cldfbHBLT; /* Q13 */ + /* states for the filters used in generating SHB excitation from WB excitation*/ Word32 mem_csfilt_fx[2]; /* Q(prev_Q_bwe_exc) */ Word16 mem_shb_res_fx[MAX_LEN_MA_FILTER]; /* old SHB residual signal Q(prev_Q_shb) */ diff --git a/lib_enc/swb_bwe_enc_fx.c b/lib_enc/swb_bwe_enc_fx.c index 5946b6a07..5993c1e58 100644 --- a/lib_enc/swb_bwe_enc_fx.c +++ b/lib_enc/swb_bwe_enc_fx.c @@ -105,7 +105,7 @@ static void delay_input_signal_fx( void wb_bwe_enc_fx( Encoder_State *st_fx, /* i/o: encoder state structure */ #ifdef NONBE_FIX_ISSUE_2206 - const Word16 *new_wb_speech_fx, /* i : original i signal at 16kHz */ + const Word16 *new_wb_speech_fx, /* i : original input signal at 16kHz */ const Word16 new_wb_speech_q /* i : Q of new_wb_speech_fx */ #else const Word16 *new_wb_speech_fx /* i : original input signal at 16kHz */ @@ -372,7 +372,6 @@ void swb_bwe_enc_fx( Q_shb_speech = q_new_input_hp; move16(); - #else IF( st_fx->element_mode == EVS_MONO ) { diff --git a/lib_enc/swb_pre_proc_fx.c b/lib_enc/swb_pre_proc_fx.c index a69ab9bcb..bd8a8b160 100644 --- a/lib_enc/swb_pre_proc_fx.c +++ b/lib_enc/swb_pre_proc_fx.c @@ -685,8 +685,6 @@ void swb_pre_proc_fx( Copy( st->input_fx - L_FRAME48k, hBWE_FD->old_fdbwe_speech_fx, L_FRAME48k ); #endif - test(); - test(); #ifdef NONBE_FIX_ISSUE_2206 Word16 tmp = s_min( st->Q_old_wtda, st->q_inp ); scale_sig( hBWE_FD->L_old_wtda_swb_fx, L_FRAME48k, sub( tmp, st->Q_old_wtda ) ); @@ -698,6 +696,8 @@ void swb_pre_proc_fx( move16(); #endif + test(); + test(); IF( EQ_16( st->element_mode, IVAS_CPE_TD ) && GE_16( st->bwidth, SWB ) ) { IF( EQ_16( st->bwidth, SWB ) ) diff --git a/lib_enc/tcx_utils_enc_fx.c b/lib_enc/tcx_utils_enc_fx.c index 47720d0d6..db3c828d5 100644 --- a/lib_enc/tcx_utils_enc_fx.c +++ b/lib_enc/tcx_utils_enc_fx.c @@ -2895,7 +2895,6 @@ void tcx_encoder_memory_update_ivas_fx( /* Output synth */ Copy( xn_buf, synthout, L_frame_glob ); #endif - /* Update synth */ synth = buf + M + 1; #ifdef NONBE_FIX_ISSUE_2206 -- GitLab From ed5ddce20841f079726943be369ac5bfa4e0b1dc Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 7 Apr 2026 12:11:24 +0200 Subject: [PATCH 2/6] clang-format --- lib_enc/ivas_core_pre_proc_front_fx.c | 34 +++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib_enc/ivas_core_pre_proc_front_fx.c b/lib_enc/ivas_core_pre_proc_front_fx.c index 704d49914..605285603 100644 --- a/lib_enc/ivas_core_pre_proc_front_fx.c +++ b/lib_enc/ivas_core_pre_proc_front_fx.c @@ -77,15 +77,15 @@ static Word16 get_zero_flag( const Word32 arr[], const Word16 len ) *--------------------------------------------------------------------*/ void pre_proc_front_ivas_fx( - SCE_ENC_HANDLE hSCE, /* i/o: SCE encoder structure */ - CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ - const Word32 element_brate, /* i : SCE/CPE element bitrate Q0*/ - const Word16 nb_bits_metadata, /* i : number of metadata bits Q0*/ - const Word16 input_frame, /* i : frame length Q0*/ - const Word16 n, /* i : channel number Q0*/ - Word16 old_inp_12k8_fx[], /* o : buffer of old input signal (st->Q_inp until preemph, then Q_new, then Q_new-1 towards the end)*/ + SCE_ENC_HANDLE hSCE, /* i/o: SCE encoder structure */ + CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ + const Word32 element_brate, /* i : SCE/CPE element bitrate Q0*/ + const Word16 nb_bits_metadata, /* i : number of metadata bits Q0*/ + const Word16 input_frame, /* i : frame length Q0*/ + const Word16 n, /* i : channel number Q0*/ + Word16 old_inp_12k8_fx[], /* o : buffer of old input signal (st->Q_inp until preemph, then Q_new, then Q_new-1 towards the end)*/ #ifdef NONBE_FIX_ISSUE_2206 - Word16 old_inp_16k_fx[], /* o : buffer of old input signal @16kHz (st->Q_inp until preemph, then Q_new, then Q_new-1 towards the end)*/ + Word16 old_inp_16k_fx[], /* o : buffer of old input signal @16kHz (st->Q_inp until preemph, then Q_new, then Q_new-1 towards the end)*/ #else Word16 old_inp_16k_fx[], /* o : buffer of old input signal @16kHz Q_new-1*/ #endif @@ -397,7 +397,7 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 Copy_Scale_sig_nosat( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - STEREO_DFT_OVL_12k8, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ #else - Copy_Scale_sig( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - STEREO_DFT_OVL_12k8, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ + Copy_Scale_sig( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - STEREO_DFT_OVL_12k8, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ #endif } ELSE IF( EQ_16( element_mode, IVAS_CPE_TD ) ) @@ -413,7 +413,7 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 Copy_Scale_sig_nosat( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - L_FILT, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ #else - Copy_Scale_sig( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - L_FILT, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ + Copy_Scale_sig( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - L_FILT, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ #endif } @@ -483,7 +483,7 @@ void pre_proc_front_ivas_fx( st->mem_q = st->q_inp; move16(); #else - Scale_sig( st->mem_decim_fx_q_inp, 2 * L_FILT_MAX, sub( st->q_inp, st->mem_q ) ); /* st->q_inp */ + Scale_sig( st->mem_decim_fx_q_inp, 2 * L_FILT_MAX, sub( st->q_inp, st->mem_q ) ); /* st->q_inp */ #endif test(); @@ -493,7 +493,7 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 scale_sig( new_inp_12k8_fx, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #else - Scale_sig( new_inp_12k8_fx, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ + Scale_sig( new_inp_12k8_fx, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ st->mem_q = st->q_inp; move16(); #endif @@ -501,14 +501,14 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 Copy( st->mem_decim_fx_q_inp, mem_decim_dummy_fx, 2 * L_FILT_MAX ); /* q_inp */ #else - Copy( st->mem_decim_fx_q_inp, mem_decim_dummy_fx, 2 * L_FILT_MAX ); /* Q(-1) */ + Copy( st->mem_decim_fx_q_inp, mem_decim_dummy_fx, 2 * L_FILT_MAX ); /* Q(-1) */ #endif set16_fx( temp1F_icatdmResampBuf_fx, 0, L_FILT_MAX ); new_inp_out_size = modify_Fs_fx( temp1F_icatdmResampBuf_fx, NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ), input_Fs, new_inp_12k8_fx + L_FRAME, INT_FS_12k8, mem_decim_dummy_fx, 0, &Q_new_inp, &mem_decim_size ); /* st->q_inp */ #ifdef NONBE_FIX_ISSUE_2206 scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #else - Scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ + Scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #endif } ELSE IF( EQ_16( element_mode, IVAS_CPE_TD ) || EQ_16( element_mode, IVAS_CPE_MDCT ) ) @@ -537,7 +537,7 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 scale_sig( new_inp_12k8_fx - lMemRecalc_12k8, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #else - Scale_sig( new_inp_12k8_fx - lMemRecalc_12k8, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ + Scale_sig( new_inp_12k8_fx - lMemRecalc_12k8, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #endif IF( lMemRecalc > 0 ) @@ -551,7 +551,7 @@ void pre_proc_front_ivas_fx( /* The scailing below can saturate if Q_new_inp <= -2 */ scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #else - Scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ + Scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #endif } ELSE /* DFT stereo */ @@ -1633,7 +1633,7 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 smc_dec = ivas_acelp_tcx20_switching_fx( st, inp_12k8_fx, *Q_new, wsp_fx, *q_old_wsp, non_staX_fx, pitch_fr_fx, voicing_fr_fx, currFlatness_fx, lsp_mid_fx, stab_fac_fx, res_cod_SNR_M_fx, res_cod_SNR_M_fx_e, flag_16k_smc ); /* Q0 */ #else - Scale_sig( old_wsp_fx, L_WSP, sub( *Q_new, *q_old_wsp ) ); /* Q_new */ + Scale_sig( old_wsp_fx, L_WSP, sub( *Q_new, *q_old_wsp ) ); /* Q_new */ *q_old_wsp = *Q_new; move16(); Q_wsp = *Q_new; -- GitLab From 190b87f83a0b9a8ce5ea6a2de673bcd8c7cdd239 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 7 Apr 2026 12:34:48 +0200 Subject: [PATCH 3/6] clang-format --- lib_enc/ivas_core_pre_proc_front_fx.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lib_enc/ivas_core_pre_proc_front_fx.c b/lib_enc/ivas_core_pre_proc_front_fx.c index 605285603..ca8d0f27f 100644 --- a/lib_enc/ivas_core_pre_proc_front_fx.c +++ b/lib_enc/ivas_core_pre_proc_front_fx.c @@ -397,7 +397,7 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 Copy_Scale_sig_nosat( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - STEREO_DFT_OVL_12k8, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ #else - Copy_Scale_sig( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - STEREO_DFT_OVL_12k8, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ + Copy_Scale_sig( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - STEREO_DFT_OVL_12k8, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ #endif } ELSE IF( EQ_16( element_mode, IVAS_CPE_TD ) ) @@ -413,7 +413,7 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 Copy_Scale_sig_nosat( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - L_FILT, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ #else - Copy_Scale_sig( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - L_FILT, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ + Copy_Scale_sig( st->old_inp_12k8_fx, old_inp_12k8_fx, L_INP_MEM - L_FILT, sub( st->q_inp, sub( Q15, st->exp_old_inp_12k8 ) ) ); /* st->q_inp */ #endif } @@ -483,7 +483,7 @@ void pre_proc_front_ivas_fx( st->mem_q = st->q_inp; move16(); #else - Scale_sig( st->mem_decim_fx_q_inp, 2 * L_FILT_MAX, sub( st->q_inp, st->mem_q ) ); /* st->q_inp */ + Scale_sig( st->mem_decim_fx_q_inp, 2 * L_FILT_MAX, sub( st->q_inp, st->mem_q ) ); /* st->q_inp */ #endif test(); @@ -493,7 +493,7 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 scale_sig( new_inp_12k8_fx, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #else - Scale_sig( new_inp_12k8_fx, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ + Scale_sig( new_inp_12k8_fx, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ st->mem_q = st->q_inp; move16(); #endif @@ -501,14 +501,14 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 Copy( st->mem_decim_fx_q_inp, mem_decim_dummy_fx, 2 * L_FILT_MAX ); /* q_inp */ #else - Copy( st->mem_decim_fx_q_inp, mem_decim_dummy_fx, 2 * L_FILT_MAX ); /* Q(-1) */ + Copy( st->mem_decim_fx_q_inp, mem_decim_dummy_fx, 2 * L_FILT_MAX ); /* Q(-1) */ #endif set16_fx( temp1F_icatdmResampBuf_fx, 0, L_FILT_MAX ); new_inp_out_size = modify_Fs_fx( temp1F_icatdmResampBuf_fx, NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ), input_Fs, new_inp_12k8_fx + L_FRAME, INT_FS_12k8, mem_decim_dummy_fx, 0, &Q_new_inp, &mem_decim_size ); /* st->q_inp */ #ifdef NONBE_FIX_ISSUE_2206 scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #else - Scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ + Scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #endif } ELSE IF( EQ_16( element_mode, IVAS_CPE_TD ) || EQ_16( element_mode, IVAS_CPE_MDCT ) ) @@ -537,7 +537,7 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 scale_sig( new_inp_12k8_fx - lMemRecalc_12k8, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #else - Scale_sig( new_inp_12k8_fx - lMemRecalc_12k8, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ + Scale_sig( new_inp_12k8_fx - lMemRecalc_12k8, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #endif IF( lMemRecalc > 0 ) @@ -551,7 +551,7 @@ void pre_proc_front_ivas_fx( /* The scailing below can saturate if Q_new_inp <= -2 */ scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #else - Scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ + Scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #endif } ELSE /* DFT stereo */ @@ -1633,7 +1633,7 @@ void pre_proc_front_ivas_fx( #ifdef NONBE_FIX_ISSUE_2206 smc_dec = ivas_acelp_tcx20_switching_fx( st, inp_12k8_fx, *Q_new, wsp_fx, *q_old_wsp, non_staX_fx, pitch_fr_fx, voicing_fr_fx, currFlatness_fx, lsp_mid_fx, stab_fac_fx, res_cod_SNR_M_fx, res_cod_SNR_M_fx_e, flag_16k_smc ); /* Q0 */ #else - Scale_sig( old_wsp_fx, L_WSP, sub( *Q_new, *q_old_wsp ) ); /* Q_new */ + Scale_sig( old_wsp_fx, L_WSP, sub( *Q_new, *q_old_wsp ) ); /* Q_new */ *q_old_wsp = *Q_new; move16(); Q_wsp = *Q_new; -- GitLab From 7644dee5d4e62044f5034519ce20b968900d762c Mon Sep 17 00:00:00 2001 From: Manuel Jander Date: Tue, 7 Apr 2026 18:06:38 +0200 Subject: [PATCH 4/6] comment typo. --- lib_enc/ivas_core_pre_proc_front_fx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_enc/ivas_core_pre_proc_front_fx.c b/lib_enc/ivas_core_pre_proc_front_fx.c index 776102a78..4efbfd049 100644 --- a/lib_enc/ivas_core_pre_proc_front_fx.c +++ b/lib_enc/ivas_core_pre_proc_front_fx.c @@ -548,7 +548,7 @@ void pre_proc_front_ivas_fx( set16_fx( temp1F_icatdmResampBuf_fx, 0, L_FILT_MAX ); new_inp_out_size = modify_Fs_fx( temp1F_icatdmResampBuf_fx, NS2SA_FX2( input_Fs, DELAY_FIR_RESAMPL_NS ), input_Fs, new_inp_12k8_fx + L_FRAME, INT_FS_12k8, mem_decim_dummy_fx, 0, &Q_new_inp, &mem_decim_size ); /* st->q_inp */ #ifdef NONBE_FIX_ISSUE_2206 - /* The scailing below can saturate if Q_new_inp <= -2 */ + /* The scaling below can saturate if Q_new_inp <= -2 */ scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ #else Scale_sig( new_inp_12k8_fx + L_FRAME, new_inp_out_size, negate( Q_new_inp ) ); /* scaling back to st->q_inp*/ -- GitLab From 858f1b5fe091009b6941295a097a786253adf3cf Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 8 Apr 2026 08:23:48 +0200 Subject: [PATCH 5/6] clang-format --- lib_com/edct_fx.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/lib_com/edct_fx.c b/lib_com/edct_fx.c index e9803873d..304c51622 100644 --- a/lib_com/edct_fx.c +++ b/lib_com/edct_fx.c @@ -62,7 +62,7 @@ static Word16 get_edxt_factor( move16(); #endif } - ELSE IF( EQ_16( length, 960 ) ) + ELSE IF( EQ_16( length, 960 ) ) { factor = 1496; /*0.0456 in Q15*/ move16(); @@ -245,7 +245,7 @@ void edct_fx( #ifdef OPTIMIZE_FFT_STACK spec[i].im = Msub_32_16( L_tmp, x[( i * 2 )], edct_table[( len1 - ( 1 + i ) )] ); /*Q(q+1) */ #else - complex_buf[( ( i * 2 ) + 1 )] = Msub_32_16( L_tmp, x[( i * 2 )], edct_table[( len1 - ( 1 + i ) )] ); /*Q(q+1) */ + complex_buf[( ( i * 2 ) + 1 )] = Msub_32_16( L_tmp, x[( i * 2 )], edct_table[( len1 - ( 1 + i ) )] ); /*Q(q+1) */ #endif move32(); } @@ -417,7 +417,7 @@ void edst_fx( #ifdef OPTIMIZE_FFT_STACK complex_buf[i].re = Madd_32_16( L_tmp, x[2 * i], edct_table[( len1 - ( 1 + i ) )] ); /*Qq+1*/ #else - complex_buf[2 * i] = Madd_32_16( L_tmp, x[2 * i], edct_table[( len1 - ( 1 + i ) )] ); /*Qq+1*/ + complex_buf[2 * i] = Madd_32_16( L_tmp, x[2 * i], edct_table[( len1 - ( 1 + i ) )] ); /*Qq+1*/ #endif move32(); @@ -973,8 +973,8 @@ void edxt_fx( y[k] /*pt 1*/ = L_add( Mpy_32_16_1( spec[k].re, wRe ), Mpy_32_16_1( spec[k].im, wIm ) ); /*Qx*/ y[( length - k )] = L_sub( Mpy_32_16_1( spec[k].re, wIm ), Mpy_32_16_1( spec[k].im, wRe ) ); /*Qx*/ #else - y[k] /*pt 1*/ = L_add( Mpy_32_16_1( re[k], wRe ), Mpy_32_16_1( im[k], wIm ) ); /*Qx*/ - y[( length - k )] = L_sub( Mpy_32_16_1( re[k], wIm ), Mpy_32_16_1( im[k], wRe ) ); /*Qx*/ + y[k] /*pt 1*/ = L_add( Mpy_32_16_1( re[k], wRe ), Mpy_32_16_1( im[k], wIm ) ); /*Qx*/ + y[( length - k )] = L_sub( Mpy_32_16_1( re[k], wIm ), Mpy_32_16_1( im[k], wRe ) ); /*Qx*/ #endif move32(); move32(); @@ -982,7 +982,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK y[( length / 2 )] = Mpy_32_16_1( spec[( length / 2 )].re, INV_SQRT_2_Q15 ); /*Qx*/ #else - y[( length / 2 )] = Mpy_32_16_1( re[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ + y[( length / 2 )] = Mpy_32_16_1( re[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #endif move32(); } @@ -999,8 +999,8 @@ void edxt_fx( y[( Nm1 - k )] = L_add( Mpy_32_16_1( spec[k].re, wRe ), Mpy_32_16_1( spec[k].im, wIm ) ); /*Qx*/ y[k - 1] = L_sub( Mpy_32_16_1( spec[k].re, wIm ), Mpy_32_16_1( spec[k].im, wRe ) ); /*Qx*/ #else - y[( Nm1 - k )] = L_add( Mpy_32_16_1( re[k], wRe ), Mpy_32_16_1( im[k], wIm ) ); /*Qx*/ - y[k - 1] = L_sub( Mpy_32_16_1( re[k], wIm ), Mpy_32_16_1( im[k], wRe ) ); /*Qx*/ + y[( Nm1 - k )] = L_add( Mpy_32_16_1( re[k], wRe ), Mpy_32_16_1( im[k], wIm ) ); /*Qx*/ + y[k - 1] = L_sub( Mpy_32_16_1( re[k], wIm ), Mpy_32_16_1( im[k], wRe ) ); /*Qx*/ #endif move32(); move32(); @@ -1008,7 +1008,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK y[( Nm1 / 2 )] = Mpy_32_16_1( spec[( length / 2 )].re, INV_SQRT_2_Q15 ); /*Qx*/ #else - y[( Nm1 / 2 )] = Mpy_32_16_1( re[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ + y[( Nm1 / 2 )] = Mpy_32_16_1( re[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #endif move32(); } @@ -1016,7 +1016,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK y[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )] = L_shr( spec[0].re, 1 ); /*Qx*/ #else - y[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )] = L_shr( re[0], 1 ); /*Qx*/ + y[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )] = L_shr( re[0], 1 ); /*Qx*/ #endif move32(); } @@ -1035,8 +1035,8 @@ void edxt_fx( spec[k].re = L_add( Mpy_32_16_1( x[k], wRe ), Mpy_32_16_1( x[( length - k )], wIm ) ); /*Qx*/ spec[k].im = L_sub( Mpy_32_16_1( x[( length - k )], wRe ), Mpy_32_16_1( x[k], wIm ) ); /*Qx*/ #else - re[k] = L_add( Mpy_32_16_1( x[k], wRe ), Mpy_32_16_1( x[( length - k )], wIm ) ); /*Qx*/ - im[k] = L_sub( Mpy_32_16_1( x[( length - k )], wRe ), Mpy_32_16_1( x[k], wIm ) ); /*Qx*/ + re[k] = L_add( Mpy_32_16_1( x[k], wRe ), Mpy_32_16_1( x[( length - k )], wIm ) ); /*Qx*/ + im[k] = L_sub( Mpy_32_16_1( x[( length - k )], wRe ), Mpy_32_16_1( x[k], wIm ) ); /*Qx*/ #endif move32(); move32(); @@ -1044,7 +1044,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK spec[( length / 2 )].re = Mpy_32_16_1( x[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #else - re[( length / 2 )] = Mpy_32_16_1( x[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ + re[( length / 2 )] = Mpy_32_16_1( x[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #endif move32(); } @@ -1070,7 +1070,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK spec[( length / 2 )].re = Mpy_32_16_1( x[( Nm1 / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #else - re[( length / 2 )] = Mpy_32_16_1( x[( Nm1 / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ + re[( length / 2 )] = Mpy_32_16_1( x[( Nm1 / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #endif move32(); } @@ -1079,7 +1079,7 @@ void edxt_fx( spec[0].re = x[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )]; /*Qx*/ spec[0].im = spec[( length / 2 )].im = 0; #else - re[0] = x[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )]; /*Qx*/ + re[0] = x[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )]; /*Qx*/ im[0] = im[( length / 2 )] = 0; #endif move32(); @@ -1147,7 +1147,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK y[2 * k] = spec[k].re; /*Qx*/ #else - y[2 * k] = re[k]; /*Qx*/ + y[2 * k] = re[k]; /*Qx*/ #endif move32(); IF( xSign != 0 ) -- GitLab From cdb6d38cb7980081eb84dc232e536415ea5139a6 Mon Sep 17 00:00:00 2001 From: vaclav Date: Wed, 8 Apr 2026 08:29:24 +0200 Subject: [PATCH 6/6] clang-format --- lib_com/edct_fx.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib_com/edct_fx.c b/lib_com/edct_fx.c index 304c51622..84793d4fd 100644 --- a/lib_com/edct_fx.c +++ b/lib_com/edct_fx.c @@ -245,7 +245,7 @@ void edct_fx( #ifdef OPTIMIZE_FFT_STACK spec[i].im = Msub_32_16( L_tmp, x[( i * 2 )], edct_table[( len1 - ( 1 + i ) )] ); /*Q(q+1) */ #else - complex_buf[( ( i * 2 ) + 1 )] = Msub_32_16( L_tmp, x[( i * 2 )], edct_table[( len1 - ( 1 + i ) )] ); /*Q(q+1) */ + complex_buf[( ( i * 2 ) + 1 )] = Msub_32_16( L_tmp, x[( i * 2 )], edct_table[( len1 - ( 1 + i ) )] ); /*Q(q+1) */ #endif move32(); } @@ -417,7 +417,7 @@ void edst_fx( #ifdef OPTIMIZE_FFT_STACK complex_buf[i].re = Madd_32_16( L_tmp, x[2 * i], edct_table[( len1 - ( 1 + i ) )] ); /*Qq+1*/ #else - complex_buf[2 * i] = Madd_32_16( L_tmp, x[2 * i], edct_table[( len1 - ( 1 + i ) )] ); /*Qq+1*/ + complex_buf[2 * i] = Madd_32_16( L_tmp, x[2 * i], edct_table[( len1 - ( 1 + i ) )] ); /*Qq+1*/ #endif move32(); @@ -973,8 +973,8 @@ void edxt_fx( y[k] /*pt 1*/ = L_add( Mpy_32_16_1( spec[k].re, wRe ), Mpy_32_16_1( spec[k].im, wIm ) ); /*Qx*/ y[( length - k )] = L_sub( Mpy_32_16_1( spec[k].re, wIm ), Mpy_32_16_1( spec[k].im, wRe ) ); /*Qx*/ #else - y[k] /*pt 1*/ = L_add( Mpy_32_16_1( re[k], wRe ), Mpy_32_16_1( im[k], wIm ) ); /*Qx*/ - y[( length - k )] = L_sub( Mpy_32_16_1( re[k], wIm ), Mpy_32_16_1( im[k], wRe ) ); /*Qx*/ + y[k] /*pt 1*/ = L_add( Mpy_32_16_1( re[k], wRe ), Mpy_32_16_1( im[k], wIm ) ); /*Qx*/ + y[( length - k )] = L_sub( Mpy_32_16_1( re[k], wIm ), Mpy_32_16_1( im[k], wRe ) ); /*Qx*/ #endif move32(); move32(); @@ -982,7 +982,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK y[( length / 2 )] = Mpy_32_16_1( spec[( length / 2 )].re, INV_SQRT_2_Q15 ); /*Qx*/ #else - y[( length / 2 )] = Mpy_32_16_1( re[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ + y[( length / 2 )] = Mpy_32_16_1( re[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #endif move32(); } @@ -999,8 +999,8 @@ void edxt_fx( y[( Nm1 - k )] = L_add( Mpy_32_16_1( spec[k].re, wRe ), Mpy_32_16_1( spec[k].im, wIm ) ); /*Qx*/ y[k - 1] = L_sub( Mpy_32_16_1( spec[k].re, wIm ), Mpy_32_16_1( spec[k].im, wRe ) ); /*Qx*/ #else - y[( Nm1 - k )] = L_add( Mpy_32_16_1( re[k], wRe ), Mpy_32_16_1( im[k], wIm ) ); /*Qx*/ - y[k - 1] = L_sub( Mpy_32_16_1( re[k], wIm ), Mpy_32_16_1( im[k], wRe ) ); /*Qx*/ + y[( Nm1 - k )] = L_add( Mpy_32_16_1( re[k], wRe ), Mpy_32_16_1( im[k], wIm ) ); /*Qx*/ + y[k - 1] = L_sub( Mpy_32_16_1( re[k], wIm ), Mpy_32_16_1( im[k], wRe ) ); /*Qx*/ #endif move32(); move32(); @@ -1008,7 +1008,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK y[( Nm1 / 2 )] = Mpy_32_16_1( spec[( length / 2 )].re, INV_SQRT_2_Q15 ); /*Qx*/ #else - y[( Nm1 / 2 )] = Mpy_32_16_1( re[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ + y[( Nm1 / 2 )] = Mpy_32_16_1( re[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #endif move32(); } @@ -1016,7 +1016,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK y[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )] = L_shr( spec[0].re, 1 ); /*Qx*/ #else - y[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )] = L_shr( re[0], 1 ); /*Qx*/ + y[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )] = L_shr( re[0], 1 ); /*Qx*/ #endif move32(); } @@ -1035,8 +1035,8 @@ void edxt_fx( spec[k].re = L_add( Mpy_32_16_1( x[k], wRe ), Mpy_32_16_1( x[( length - k )], wIm ) ); /*Qx*/ spec[k].im = L_sub( Mpy_32_16_1( x[( length - k )], wRe ), Mpy_32_16_1( x[k], wIm ) ); /*Qx*/ #else - re[k] = L_add( Mpy_32_16_1( x[k], wRe ), Mpy_32_16_1( x[( length - k )], wIm ) ); /*Qx*/ - im[k] = L_sub( Mpy_32_16_1( x[( length - k )], wRe ), Mpy_32_16_1( x[k], wIm ) ); /*Qx*/ + re[k] = L_add( Mpy_32_16_1( x[k], wRe ), Mpy_32_16_1( x[( length - k )], wIm ) ); /*Qx*/ + im[k] = L_sub( Mpy_32_16_1( x[( length - k )], wRe ), Mpy_32_16_1( x[k], wIm ) ); /*Qx*/ #endif move32(); move32(); @@ -1044,7 +1044,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK spec[( length / 2 )].re = Mpy_32_16_1( x[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #else - re[( length / 2 )] = Mpy_32_16_1( x[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ + re[( length / 2 )] = Mpy_32_16_1( x[( length / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #endif move32(); } @@ -1070,7 +1070,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK spec[( length / 2 )].re = Mpy_32_16_1( x[( Nm1 / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #else - re[( length / 2 )] = Mpy_32_16_1( x[( Nm1 / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ + re[( length / 2 )] = Mpy_32_16_1( x[( Nm1 / 2 )], INV_SQRT_2_Q15 ); /*Qx*/ #endif move32(); } @@ -1079,7 +1079,7 @@ void edxt_fx( spec[0].re = x[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )]; /*Qx*/ spec[0].im = spec[( length / 2 )].im = 0; #else - re[0] = x[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )]; /*Qx*/ + re[0] = x[( Nm1 - ( Nm1 * ( kernelType / 2 ) ) )]; /*Qx*/ im[0] = im[( length / 2 )] = 0; #endif move32(); @@ -1147,7 +1147,7 @@ void edxt_fx( #ifdef OPTIMIZE_FFT_STACK y[2 * k] = spec[k].re; /*Qx*/ #else - y[2 * k] = re[k]; /*Qx*/ + y[2 * k] = re[k]; /*Qx*/ #endif move32(); IF( xSign != 0 ) -- GitLab