Loading lib_com/ivas_prot.h +4 −2 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 lib_com/ivas_prot_fx.h +4 −3 Original line number Diff line number Diff line 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 +15 −5 Original line number Diff line number Diff line Loading @@ -2399,7 +2399,7 @@ 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 Loading @@ -2409,8 +2409,8 @@ ivas_error acelp_core_enc( 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 @@ -6006,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 @@ -6016,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 lib_com/prot_fx.h +10 −1 Original line number Diff line number Diff line Loading @@ -2618,6 +2618,7 @@ void lag_wind_32( // preemp_fx.c #define PREEMPH_FX( signal, mu, L, mem ) preemph_copy_fx( ( signal ), ( signal ), ( mu ), ( L ), ( mem ) ) #define PREEMPH_32FX( signal, signal_out, mu, L, mem ) preemph_copy_32fx( ( signal ), ( signal_out ), ( mu ), ( L ), ( mem ) ) void preemph_copy_fx( const Word16 x[], /* i : i signal Qx */ Loading @@ -2627,6 +2628,14 @@ void preemph_copy_fx( Word16 *mem /* i/o: memory (x[-1]) Qx */ ); void preemph_copy_32fx( const Word16 x[], /* i : i 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 */ ); void E_UTIL_f_preemph2( Word16 shift, /* Q0 */ Word16 *signal, /* Qx */ Loading Loading
lib_com/ivas_prot.h +4 −2 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
lib_com/ivas_prot_fx.h +4 −3 Original line number Diff line number Diff line 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 +15 −5 Original line number Diff line number Diff line Loading @@ -2399,7 +2399,7 @@ 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 Loading @@ -2409,8 +2409,8 @@ ivas_error acelp_core_enc( 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 @@ -6006,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 @@ -6016,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
lib_com/prot_fx.h +10 −1 Original line number Diff line number Diff line Loading @@ -2618,6 +2618,7 @@ void lag_wind_32( // preemp_fx.c #define PREEMPH_FX( signal, mu, L, mem ) preemph_copy_fx( ( signal ), ( signal ), ( mu ), ( L ), ( mem ) ) #define PREEMPH_32FX( signal, signal_out, mu, L, mem ) preemph_copy_32fx( ( signal ), ( signal_out ), ( mu ), ( L ), ( mem ) ) void preemph_copy_fx( const Word16 x[], /* i : i signal Qx */ Loading @@ -2627,6 +2628,14 @@ void preemph_copy_fx( Word16 *mem /* i/o: memory (x[-1]) Qx */ ); void preemph_copy_32fx( const Word16 x[], /* i : i 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 */ ); void E_UTIL_f_preemph2( Word16 shift, /* Q0 */ Word16 *signal, /* Qx */ Loading