Loading lib_com/cnst.h +1 −0 Original line number Diff line number Diff line Loading @@ -698,6 +698,7 @@ enum #define AUTO_REGRESSIVE 2 #define INT_FS_12k8 12800 /* internal sampling frequency */ #define ONE_BY_INT_FS_12k8_Q42 343597384 /* internal sampling frequency */ #define M 16 /* order of the LP filter @ 12.8kHz */ #define L_FRAME 256 /* frame size at 12.8kHz */ #define NB_SUBFR 4 /* number of subframes per frame */ Loading lib_com/ivas_prot.h +7 −5 Original line number Diff line number Diff line Loading @@ -311,7 +311,8 @@ ivas_error pre_proc_ivas( Word16 e_enerBuffer, Word16 fft_buff_fx[2 * L_FFT], Word32 cor_map_sum_fx, Word16 exp_cor_map_sum Word16 exp_cor_map_sum, Word16 *Q_new #endif ); Loading Loading @@ -622,7 +623,8 @@ void stereo_tcx_core_enc( float lsp_mid[], /* i : LSPs in the middle of the frame, Q15 */ Word16 pitch_buf_fx[NB_SUBFR16k], /* o : pitch for each subframe, Q6 */ const Word16 last_element_mode, /* i : last element mode, Q0 */ const Word16 vad_hover_flag /* i : VAD hangover flag, Q0 */ const Word16 vad_hover_flag, /* i : VAD hangover flag, Q0 */ Word16 Q_new ); #endif Loading Loading @@ -3178,9 +3180,9 @@ int16_t read_GR0( void ivas_mdct_core_whitening_enc( CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ float new_samples[CPE_CHANNELS][L_INP], /* i : new samples */ float old_wsp[CPE_CHANNELS][L_WSP], /* i : 12.8kHz weighted speech (for LTP */ float pitch_buf[CPE_CHANNELS][NB_SUBFR16k], /* o : floating pitch for each subframe */ Word16 new_samples_fx[CPE_CHANNELS][L_INP], /* i : new samples */ Word16 old_wsp_fx[CPE_CHANNELS][L_WSP], /* i : 12.8kHz weighted speech (for LTP */ Word16 pitch_buf[CPE_CHANNELS][NB_SUBFR16k], /* o : floating pitch for each subframe */ float *mdst_spectrum_long[CPE_CHANNELS], /* o : buffer for MDST spectrum */ int16_t tnsBits[CPE_CHANNELS][NB_DIV], /* o : buffer TNS bits */ float *orig_spectrum_long[CPE_CHANNELS], /* o : origingal spectrum w/o whitening */ Loading lib_com/ivas_prot_fx.h +5 −4 Original line number Diff line number Diff line Loading @@ -2875,7 +2875,7 @@ void stereo_dft_cng_side_gain_fx( Word16 quantize_sns_fx( Word32 sns_in_fx[CPE_CHANNELS][NB_DIV][M], /* sns_e */ Word32 snsQ_out_fx[CPE_CHANNELS][NB_DIV][M], /* sns_e */ Word16 *sns_e, Word16 sns_e, Encoder_State **sts, Word16 *indices, /* Q0 */ Word16 *zero_side_flag, /* Q0 */ Loading Loading @@ -3089,8 +3089,8 @@ void stereo_tcx_core_enc( Word16 lsp_mid_fx[], /* i : LSPs in the middle of the frame, Q15 */ Word16 pitch_buf_fx[NB_SUBFR16k], /* o : pitch for each subframe, Q6 */ const Word16 last_element_mode, /* i : last element mode, Q0 */ const Word16 vad_hover_flag /* i : VAD hangover flag, Q0 */ ); const Word16 vad_hover_flag, /* i : VAD hangover flag, Q0 */ Word16 Q_new ); Word16 transient_analysis_ivas_fx( Loading Loading @@ -5846,7 +5846,8 @@ ivas_error ivas_compute_core_buffers_fx( Word16 lsp_new_fx[M], /* i/o: LSPs at the end of the frame */ Word16 lsp_mid_fx[M], /* i/o: LSPs in the middle of the frame */ Word16 Q_old_inp_16k, Word16 Q_r[2] ); Word16 Q_r[2], Word16 *Q_new ); ivas_error ivas_enc_fx( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Loading lib_com/preemph_fx.c +35 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,41 @@ void preemph_copy_fx( move16(); } void preemph_copy_32fx( const Word16 x[], /* i : input signal Qx */ Word32 y[], /* o : output signal Qx */ const Word16 mu, /* i : preemphasis coefficient Q15 */ const Word16 lg, /* i : vector size Q0 */ Word16 *mem /* i/o: memory (x[-1]) Qx */ ) { Word16 i, temp; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif temp = x[lg - 1]; /* Qx */ move16(); FOR( i = lg - 1; i > 0; i-- ) { #ifdef BASOP_NOGLOB y[i] = L_msu_o( L_deposit_h( x[i] ), x[i - 1], mu, &Overflow ); /* Qx+16 */ #else y[i] = L_msu( L_deposit_h( x[i] ), x[i - 1], mu ); #endif move16(); } #ifdef BASOP_NOGLOB y[0] = L_msu_o( L_deposit_h( x[0] ), *mem, mu, &Overflow ); /* Qx+16 */ #else y[0] = L_msu( L_deposit_h( x[0] ), *mem, mu ); #endif move16(); *mem = temp; /* Qx */ move16(); } /* * E_UTIL_f_preemph2 * Loading lib_com/prot.h +19 −5 Original line number Diff line number Diff line Loading @@ -2399,14 +2399,18 @@ ivas_error acelp_core_enc( float lsp_mid[M], /* i : LSPs in the middle of the frame */ const int16_t vad_hover_flag, /* i : VAD hangover flag */ const int16_t attack_flag, /* i : attack flag (GSC or TC) */ float bwe_exc_extended[], /* i/o: bandwidth extended excitation */ Word32 bwe_exc_extended_fx[], /* i/o: bandwidth extended excitation 2*Q_new */ #ifndef IVAS_FLOAT_FIXED float *voice_factors, /* o : voicing factors */ #else Word16 *voice_factors_fx, /* o : voicing factors Q15 */ #endif float old_syn_12k8_16k[], /* o : ACELP core synthesis at 12.8kHz or 16kHz to be used by SWB BWE */ float pitch_buf[NB_SUBFR16k], /* o : floating pitch for each subframe */ int16_t *unbits, /* o : number of unused bits */ STEREO_TD_ENC_DATA_HANDLE hStereoTD, /* i/o: TD stereo encoder handle */ float tdm_lsfQ_PCh[M] /* i : Q LSFs for primary channel */ ); float tdm_lsfQ_PCh[M], /* i : Q LSFs for primary channel */ Word16 Q_new ); #endif ivas_error acelp_core_switch_dec_bfi( Loading Loading @@ -6002,7 +6006,7 @@ void core_switching_pre_enc( const int16_t active_cnt, /* i : Active frame counter */ const int16_t last_element_mode /* i : last_element_mode */ ); #ifndef IVAS_FLOAT_FIXED void core_switching_post_enc( Encoder_State *st, /* i/o: encoder state structure */ // const float *old_inp_12k8, /* i : old input signal @12.8kHz */ Loading @@ -6012,7 +6016,17 @@ void core_switching_post_enc( // const float A[] /* i : unquant. LP filter coefs. */ float A[] /* i : unquant. LP filter coefs. */ ); #else void core_switching_post_enc( Encoder_State *st, /* i/o: encoder state structure */ // const float *old_inp_12k8, /* i : old input signal @12.8kHz */ float *old_inp_12k8, /* i : old input signal @12.8kHz */ // const float *old_inp_16k, /* i : old input signal @16kHz */ float *old_inp_16k, /* i : old input signal @16kHz */ // const float A[] /* i : unquant. LP filter coefs. */ float A[], /* i : unquant. LP filter coefs. */ Word16 Q_new ); #endif ivas_error core_switching_post_dec( Decoder_State *st, /* i/o: decoder state structure */ float *synth, /* i/o: output synthesis */ Loading Loading
lib_com/cnst.h +1 −0 Original line number Diff line number Diff line Loading @@ -698,6 +698,7 @@ enum #define AUTO_REGRESSIVE 2 #define INT_FS_12k8 12800 /* internal sampling frequency */ #define ONE_BY_INT_FS_12k8_Q42 343597384 /* internal sampling frequency */ #define M 16 /* order of the LP filter @ 12.8kHz */ #define L_FRAME 256 /* frame size at 12.8kHz */ #define NB_SUBFR 4 /* number of subframes per frame */ Loading
lib_com/ivas_prot.h +7 −5 Original line number Diff line number Diff line Loading @@ -311,7 +311,8 @@ ivas_error pre_proc_ivas( Word16 e_enerBuffer, Word16 fft_buff_fx[2 * L_FFT], Word32 cor_map_sum_fx, Word16 exp_cor_map_sum Word16 exp_cor_map_sum, Word16 *Q_new #endif ); Loading Loading @@ -622,7 +623,8 @@ void stereo_tcx_core_enc( float lsp_mid[], /* i : LSPs in the middle of the frame, Q15 */ Word16 pitch_buf_fx[NB_SUBFR16k], /* o : pitch for each subframe, Q6 */ const Word16 last_element_mode, /* i : last element mode, Q0 */ const Word16 vad_hover_flag /* i : VAD hangover flag, Q0 */ const Word16 vad_hover_flag, /* i : VAD hangover flag, Q0 */ Word16 Q_new ); #endif Loading Loading @@ -3178,9 +3180,9 @@ int16_t read_GR0( void ivas_mdct_core_whitening_enc( CPE_ENC_HANDLE hCPE, /* i/o: CPE encoder structure */ float new_samples[CPE_CHANNELS][L_INP], /* i : new samples */ float old_wsp[CPE_CHANNELS][L_WSP], /* i : 12.8kHz weighted speech (for LTP */ float pitch_buf[CPE_CHANNELS][NB_SUBFR16k], /* o : floating pitch for each subframe */ Word16 new_samples_fx[CPE_CHANNELS][L_INP], /* i : new samples */ Word16 old_wsp_fx[CPE_CHANNELS][L_WSP], /* i : 12.8kHz weighted speech (for LTP */ Word16 pitch_buf[CPE_CHANNELS][NB_SUBFR16k], /* o : floating pitch for each subframe */ float *mdst_spectrum_long[CPE_CHANNELS], /* o : buffer for MDST spectrum */ int16_t tnsBits[CPE_CHANNELS][NB_DIV], /* o : buffer TNS bits */ float *orig_spectrum_long[CPE_CHANNELS], /* o : origingal spectrum w/o whitening */ Loading
lib_com/ivas_prot_fx.h +5 −4 Original line number Diff line number Diff line Loading @@ -2875,7 +2875,7 @@ void stereo_dft_cng_side_gain_fx( Word16 quantize_sns_fx( Word32 sns_in_fx[CPE_CHANNELS][NB_DIV][M], /* sns_e */ Word32 snsQ_out_fx[CPE_CHANNELS][NB_DIV][M], /* sns_e */ Word16 *sns_e, Word16 sns_e, Encoder_State **sts, Word16 *indices, /* Q0 */ Word16 *zero_side_flag, /* Q0 */ Loading Loading @@ -3089,8 +3089,8 @@ void stereo_tcx_core_enc( Word16 lsp_mid_fx[], /* i : LSPs in the middle of the frame, Q15 */ Word16 pitch_buf_fx[NB_SUBFR16k], /* o : pitch for each subframe, Q6 */ const Word16 last_element_mode, /* i : last element mode, Q0 */ const Word16 vad_hover_flag /* i : VAD hangover flag, Q0 */ ); const Word16 vad_hover_flag, /* i : VAD hangover flag, Q0 */ Word16 Q_new ); Word16 transient_analysis_ivas_fx( Loading Loading @@ -5846,7 +5846,8 @@ ivas_error ivas_compute_core_buffers_fx( Word16 lsp_new_fx[M], /* i/o: LSPs at the end of the frame */ Word16 lsp_mid_fx[M], /* i/o: LSPs in the middle of the frame */ Word16 Q_old_inp_16k, Word16 Q_r[2] ); Word16 Q_r[2], Word16 *Q_new ); ivas_error ivas_enc_fx( Encoder_Struct *st_ivas, /* i/o: IVAS encoder structure */ Loading
lib_com/preemph_fx.c +35 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,41 @@ void preemph_copy_fx( move16(); } void preemph_copy_32fx( const Word16 x[], /* i : input signal Qx */ Word32 y[], /* o : output signal Qx */ const Word16 mu, /* i : preemphasis coefficient Q15 */ const Word16 lg, /* i : vector size Q0 */ Word16 *mem /* i/o: memory (x[-1]) Qx */ ) { Word16 i, temp; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif temp = x[lg - 1]; /* Qx */ move16(); FOR( i = lg - 1; i > 0; i-- ) { #ifdef BASOP_NOGLOB y[i] = L_msu_o( L_deposit_h( x[i] ), x[i - 1], mu, &Overflow ); /* Qx+16 */ #else y[i] = L_msu( L_deposit_h( x[i] ), x[i - 1], mu ); #endif move16(); } #ifdef BASOP_NOGLOB y[0] = L_msu_o( L_deposit_h( x[0] ), *mem, mu, &Overflow ); /* Qx+16 */ #else y[0] = L_msu( L_deposit_h( x[0] ), *mem, mu ); #endif move16(); *mem = temp; /* Qx */ move16(); } /* * E_UTIL_f_preemph2 * Loading
lib_com/prot.h +19 −5 Original line number Diff line number Diff line Loading @@ -2399,14 +2399,18 @@ ivas_error acelp_core_enc( float lsp_mid[M], /* i : LSPs in the middle of the frame */ const int16_t vad_hover_flag, /* i : VAD hangover flag */ const int16_t attack_flag, /* i : attack flag (GSC or TC) */ float bwe_exc_extended[], /* i/o: bandwidth extended excitation */ Word32 bwe_exc_extended_fx[], /* i/o: bandwidth extended excitation 2*Q_new */ #ifndef IVAS_FLOAT_FIXED float *voice_factors, /* o : voicing factors */ #else Word16 *voice_factors_fx, /* o : voicing factors Q15 */ #endif float old_syn_12k8_16k[], /* o : ACELP core synthesis at 12.8kHz or 16kHz to be used by SWB BWE */ float pitch_buf[NB_SUBFR16k], /* o : floating pitch for each subframe */ int16_t *unbits, /* o : number of unused bits */ STEREO_TD_ENC_DATA_HANDLE hStereoTD, /* i/o: TD stereo encoder handle */ float tdm_lsfQ_PCh[M] /* i : Q LSFs for primary channel */ ); float tdm_lsfQ_PCh[M], /* i : Q LSFs for primary channel */ Word16 Q_new ); #endif ivas_error acelp_core_switch_dec_bfi( Loading Loading @@ -6002,7 +6006,7 @@ void core_switching_pre_enc( const int16_t active_cnt, /* i : Active frame counter */ const int16_t last_element_mode /* i : last_element_mode */ ); #ifndef IVAS_FLOAT_FIXED void core_switching_post_enc( Encoder_State *st, /* i/o: encoder state structure */ // const float *old_inp_12k8, /* i : old input signal @12.8kHz */ Loading @@ -6012,7 +6016,17 @@ void core_switching_post_enc( // const float A[] /* i : unquant. LP filter coefs. */ float A[] /* i : unquant. LP filter coefs. */ ); #else void core_switching_post_enc( Encoder_State *st, /* i/o: encoder state structure */ // const float *old_inp_12k8, /* i : old input signal @12.8kHz */ float *old_inp_12k8, /* i : old input signal @12.8kHz */ // const float *old_inp_16k, /* i : old input signal @16kHz */ float *old_inp_16k, /* i : old input signal @16kHz */ // const float A[] /* i : unquant. LP filter coefs. */ float A[], /* i : unquant. LP filter coefs. */ Word16 Q_new ); #endif ivas_error core_switching_post_dec( Decoder_State *st, /* i/o: decoder state structure */ float *synth, /* i/o: output synthesis */ Loading