Loading lib_com/prot_fx.h +1 −1 Original line number Diff line number Diff line Loading @@ -10526,11 +10526,11 @@ void swb_pre_proc_ivas_fx( CPE_ENC_HANDLE hCPE /* i/o: CPE encoder structure */ ); #ifndef HARM_CORECODER_UPDT void core_encode_update_ivas_fx( Encoder_State *st /* i/o: Encoder state structure */ ); #ifndef HARM_CORECODER_UPDT void updt_enc_common_ivas_fx( Encoder_State *st, /* i/o: encoder state structure */ const Word16 Q_new /* i : CUrrent frame scaling */ Loading lib_enc/core_enc_updt_fx.c +23 −7 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ ====================================================================================*/ #include <stdint.h> //#include "prot_fx.h" #include "options.h" #include "cnst.h" /* Common constants */ #include "basop_util.h" Loading @@ -12,6 +11,7 @@ #include "prot_fx_enc.h" /* Function prototypes */ #include "basop_util.h" /* Function prototypes */ #ifndef HARM_CORECODER_UPDT void core_encode_update_fx( Encoder_State *st ) { Word16 n; Loading Loading @@ -61,11 +61,14 @@ void core_encode_update_fx( Encoder_State *st ) Copy( GEWB_Ave_fx, st->mem_AR_fx, M ); } } #endif /*-------------------------------------------------------------------* * core_encode_update_cng_fx() * * Common updates in case of CNG *-------------------------------------------------------------------*/ void core_encode_update_cng_fx( Encoder_State *st, Word16 *timeDomainBuffer, Loading Loading @@ -150,7 +153,6 @@ void core_encode_update_cng_fx( p_A += ( M + 1 ); } tmp = sub( st->wspeech_enc[-1], shl( hLPDmem->mem_w0, shift ) ); E_UTIL_deemph2( negate( shift ), wsyn, st->preemph_fac, st->L_frame, &tmp ); hLPDmem->mem_w0 = sub_sat( st->wspeech_enc[st->L_frame - 1], tmp ); Loading Loading @@ -200,7 +202,11 @@ void core_encode_update_cng_fx( * Common updates of buffers *-------------------------------------------------------------------*/ #ifdef HARM_CORECODER_UPDT void core_encode_update_fx( #else void core_encode_update_ivas_fx( #endif Encoder_State *st /* i/o: Encoder state structure */ ) { Loading @@ -226,6 +232,14 @@ void core_encode_update_ivas_fx( test(); IF( ( st->core == ACELP_CORE ) || EQ_16( st->core, AMR_WB_CORE ) || EQ_32( st->core_brate, SID_2k40 ) || ( st->core_brate == FRAME_NO_DATA ) ) { #ifdef HARM_CORECODER_UPDT IF( st->element_mode == EVS_MONO ) { Copy( st->buf_speech_enc + st->L_frame, hTcxEnc->buf_speech_ltp + st->L_frame, st->L_frame ); } ELSE #endif { Word16 max_e = s_max( st->hTcxEnc->exp_buf_speech_ltp, st->exp_buf_speech_enc ); Scale_sig( hTcxEnc->buf_speech_ltp, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k, negate( sub( max_e, st->hTcxEnc->exp_buf_speech_ltp ) ) ); // Q(31-max_e) Copy_Scale_sig( st->buf_speech_enc + st->L_frame, hTcxEnc->buf_speech_ltp + st->L_frame, st->L_frame, negate( sub( max_e, st->exp_buf_speech_enc ) ) ); // Q(31-max_e) Loading @@ -233,6 +247,7 @@ void core_encode_update_ivas_fx( move16(); } } } n = add( st->encoderPastSamples_enc, st->encoderLookahead_enc ); Copy( st->buf_synth + st->L_frame, st->buf_synth, add( st->L_frame, L_SUBFR ) ); Loading Loading @@ -265,5 +280,6 @@ void core_encode_update_ivas_fx( set16_fx( st->mem_MA_fx, 0, M ); Copy( GEWB_Ave_fx, st->mem_AR_fx, M ); // 2.56 scaling } return; } lib_enc/updt_enc_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -707,7 +707,11 @@ void updt_enc_common_ivas_fx( } /* Update Core */ #ifdef HARM_CORECODER_UPDT core_encode_update_fx( st ); #else core_encode_update_ivas_fx( st ); #endif /*---------------------------------------------------------------------* * RF mode updates Loading Loading
lib_com/prot_fx.h +1 −1 Original line number Diff line number Diff line Loading @@ -10526,11 +10526,11 @@ void swb_pre_proc_ivas_fx( CPE_ENC_HANDLE hCPE /* i/o: CPE encoder structure */ ); #ifndef HARM_CORECODER_UPDT void core_encode_update_ivas_fx( Encoder_State *st /* i/o: Encoder state structure */ ); #ifndef HARM_CORECODER_UPDT void updt_enc_common_ivas_fx( Encoder_State *st, /* i/o: encoder state structure */ const Word16 Q_new /* i : CUrrent frame scaling */ Loading
lib_enc/core_enc_updt_fx.c +23 −7 Original line number Diff line number Diff line Loading @@ -3,7 +3,6 @@ ====================================================================================*/ #include <stdint.h> //#include "prot_fx.h" #include "options.h" #include "cnst.h" /* Common constants */ #include "basop_util.h" Loading @@ -12,6 +11,7 @@ #include "prot_fx_enc.h" /* Function prototypes */ #include "basop_util.h" /* Function prototypes */ #ifndef HARM_CORECODER_UPDT void core_encode_update_fx( Encoder_State *st ) { Word16 n; Loading Loading @@ -61,11 +61,14 @@ void core_encode_update_fx( Encoder_State *st ) Copy( GEWB_Ave_fx, st->mem_AR_fx, M ); } } #endif /*-------------------------------------------------------------------* * core_encode_update_cng_fx() * * Common updates in case of CNG *-------------------------------------------------------------------*/ void core_encode_update_cng_fx( Encoder_State *st, Word16 *timeDomainBuffer, Loading Loading @@ -150,7 +153,6 @@ void core_encode_update_cng_fx( p_A += ( M + 1 ); } tmp = sub( st->wspeech_enc[-1], shl( hLPDmem->mem_w0, shift ) ); E_UTIL_deemph2( negate( shift ), wsyn, st->preemph_fac, st->L_frame, &tmp ); hLPDmem->mem_w0 = sub_sat( st->wspeech_enc[st->L_frame - 1], tmp ); Loading Loading @@ -200,7 +202,11 @@ void core_encode_update_cng_fx( * Common updates of buffers *-------------------------------------------------------------------*/ #ifdef HARM_CORECODER_UPDT void core_encode_update_fx( #else void core_encode_update_ivas_fx( #endif Encoder_State *st /* i/o: Encoder state structure */ ) { Loading @@ -226,6 +232,14 @@ void core_encode_update_ivas_fx( test(); IF( ( st->core == ACELP_CORE ) || EQ_16( st->core, AMR_WB_CORE ) || EQ_32( st->core_brate, SID_2k40 ) || ( st->core_brate == FRAME_NO_DATA ) ) { #ifdef HARM_CORECODER_UPDT IF( st->element_mode == EVS_MONO ) { Copy( st->buf_speech_enc + st->L_frame, hTcxEnc->buf_speech_ltp + st->L_frame, st->L_frame ); } ELSE #endif { Word16 max_e = s_max( st->hTcxEnc->exp_buf_speech_ltp, st->exp_buf_speech_enc ); Scale_sig( hTcxEnc->buf_speech_ltp, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k, negate( sub( max_e, st->hTcxEnc->exp_buf_speech_ltp ) ) ); // Q(31-max_e) Copy_Scale_sig( st->buf_speech_enc + st->L_frame, hTcxEnc->buf_speech_ltp + st->L_frame, st->L_frame, negate( sub( max_e, st->exp_buf_speech_enc ) ) ); // Q(31-max_e) Loading @@ -233,6 +247,7 @@ void core_encode_update_ivas_fx( move16(); } } } n = add( st->encoderPastSamples_enc, st->encoderLookahead_enc ); Copy( st->buf_synth + st->L_frame, st->buf_synth, add( st->L_frame, L_SUBFR ) ); Loading Loading @@ -265,5 +280,6 @@ void core_encode_update_ivas_fx( set16_fx( st->mem_MA_fx, 0, M ); Copy( GEWB_Ave_fx, st->mem_AR_fx, M ); // 2.56 scaling } return; }
lib_enc/updt_enc_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -707,7 +707,11 @@ void updt_enc_common_ivas_fx( } /* Update Core */ #ifdef HARM_CORECODER_UPDT core_encode_update_fx( st ); #else core_encode_update_ivas_fx( st ); #endif /*---------------------------------------------------------------------* * RF mode updates Loading