Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ #define HARM_CORECODER_UPDT /* VA: basop issue 2342: Remove duplicated code in core-coder common update functions */ #define HARM_CORE_SW /* VA: basop issue 2314: Remove duplicated code in the core switching */ #define HARM_PREPROC /* VA: basop issue 2339: Remove duplicated code in the core-coder DTX */ #define HARM_COREDECODER_FUNCTIONS /* VA: basop issue 2347: Remove various duplicated code in core-decoder */ /* #################### End BE switches ################################## */ Loading lib_com/prot_fx.h +4 −2 Original line number Diff line number Diff line Loading @@ -6763,6 +6763,7 @@ void gain_dec_tc_fx( Word32 *norm_gain_code_fx /* o : norm. gain of the codebook excit. */ ); #ifndef HARM_COREDECODER_FUNCTIONS void gain_dec_tc_ivas_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ const Word16 *code_fx, /* i : algebraic code excitation */ Loading @@ -6773,7 +6774,7 @@ void gain_dec_tc_ivas_fx( Word16 *gain_inov_fx, /* o : unscaled innovation gain */ Word32 *norm_gain_code_fx /* o : norm. gain of the codebook excit. */ ); #endif void gain_dec_mless_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ const Word16 L_frame_fx, /* i : length of the frame */ Loading Loading @@ -8780,6 +8781,7 @@ Word16 decode_lpc_avq_fx( Word16 *param_lpc /* o : lpc parameters */ ); #ifndef HARM_COREDECODER_FUNCTIONS Word16 decode_lpc_avq_ivas_fx( Decoder_State *st, /* i/o: decoder state structure */ const Word16 numlpc, /* i : Number of sets of lpc */ Loading @@ -8788,7 +8790,7 @@ Word16 decode_lpc_avq_ivas_fx( const Word16 element_mode, /* i : element mode */ const Word16 sns_low_br_mode /* i : SNS low-bitrate mode */ ); #endif void vlpc_1st_dec( Word16 index, /* i : codebook index */ Word16 *lsfq ); /* i/o: i:prediction o:quantized lsf */ Loading lib_dec/dec_post_fx.c +13 −7 Original line number Diff line number Diff line Loading @@ -34,8 +34,9 @@ static void calc_st_filt_local_fx( Word16 *apond2, Word16 *apond1, Word16 *parco static void modify_pst_param_fx( const Word16 lp_noise, Word16 *g1, Word16 *g2, const Word16 coder_type, Word16 *gain_factor ); static void Dec_formant_postfilt_fx( PFSTAT_HANDLE hPFstat, Word16 *signal_ptr, Word16 *coeff, Word16 *sig_out, Word16 gamma1, Word16 gamma2 ); #ifndef HARM_COREDECODER_FUNCTIONS static void calc_st_filt_ivas_fx( Word16 *apond2, Word16 *apond1, Word16 *parcor0, Word16 *sig_ltp_ptr, Word16 *mem_zero, const Word16 extl ); #endif /*-------------------------------------------------------------------------- Loading Loading @@ -445,7 +446,11 @@ static void Dec_formant_postfilt_fx( } /* Controls short term pst filter gain and compute parcor0 */ #ifdef HARM_COREDECODER_FUNCTIONS calc_st_filt_local_fx( apond2, apond1, &parcor0, res2, hPFstat->mem_zero ); #else calc_st_filt_ivas_fx( apond2, apond1, &parcor0, res2, hPFstat->mem_zero, -1 ); #endif /* 1/A(gamma1) filtering, mem_stp is updated */ resynth[0] = *( hPFstat->mem_stp + sub( L_SYN_MEM, 1 ) ); Loading Loading @@ -1290,6 +1295,7 @@ static Word16 select_ltp_fx( /* o : 1 = 1st gain, 2 = 2nd gain * controls gain : computation of energy impulse response as * SUMn (abs (h[n])) and computes parcor0 *---------------------------------------------------------------------------- */ static void calc_st_filt_local_fx( Word16 *apond2, /* i : coefficients of numerator Q12 */ Word16 *apond1, /* i : coefficients of denominator Q12 */ Loading @@ -1299,13 +1305,10 @@ static void calc_st_filt_local_fx( ) { Word32 L_g0; Word16 h[LONG_H_ST]; Word16 g0, temp; Word16 i; temp = sub( 2, norm_s( apond2[0] ) ); /* compute i.r. of composed filter apond2 / apond1 */ Loading Loading @@ -1337,6 +1340,7 @@ static void calc_st_filt_local_fx( return; } #ifndef HARM_COREDECODER_FUNCTIONS static void calc_st_filt_ivas_fx( Word16 *apond2, /* i : coefficients of numerator Q12 */ Word16 *apond1, /* i : coefficients of denominator Q12 */ Loading Loading @@ -1391,6 +1395,8 @@ static void calc_st_filt_ivas_fx( return; } #endif /*---------------------------------------------------------------------------- * filt_mu * Loading lib_dec/dec_prm_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -52,7 +52,11 @@ void getLPCparam_fx( { IF( st->lpcQuantization == 0 ) { #ifdef HARM_COREDECODER_FUNCTIONS decode_lpc_avq_fx( st0, st->numlpc, param_lpc, ch, st->element_mode, sns_low_br_mode ); #else decode_lpc_avq_ivas_fx( st0, st->numlpc, param_lpc, ch, st->element_mode, sns_low_br_mode ); #endif } ELSE IF( EQ_16( st->lpcQuantization, 1 ) ) { Loading lib_dec/dec_tran_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,9 @@ void decod_tran_fx( IF( Jopt_flag == 0 ) { /* 2/3-bit decoding */ #ifdef HARM_COREDECODER_FUNCTIONS gain_dec_tc_fx( st_fx, code_fx, i_subfr, Es_pred_fx, &gain_pit_fx, &gain_code_fx, &gain_inov_fx, &norm_gain_code_fx ); #else IF( st_fx->element_mode == EVS_MONO ) { gain_dec_tc_fx( st_fx, code_fx, i_subfr, Es_pred_fx, &gain_pit_fx, &gain_code_fx, &gain_inov_fx, &norm_gain_code_fx ); Loading @@ -153,6 +156,7 @@ void decod_tran_fx( { gain_dec_tc_ivas_fx( st_fx, code_fx, i_subfr, Es_pred_fx, &gain_pit_fx, &gain_code_fx, &gain_inov_fx, &norm_gain_code_fx ); } #endif } ELSE { Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -102,6 +102,7 @@ #define HARM_CORECODER_UPDT /* VA: basop issue 2342: Remove duplicated code in core-coder common update functions */ #define HARM_CORE_SW /* VA: basop issue 2314: Remove duplicated code in the core switching */ #define HARM_PREPROC /* VA: basop issue 2339: Remove duplicated code in the core-coder DTX */ #define HARM_COREDECODER_FUNCTIONS /* VA: basop issue 2347: Remove various duplicated code in core-decoder */ /* #################### End BE switches ################################## */ Loading
lib_com/prot_fx.h +4 −2 Original line number Diff line number Diff line Loading @@ -6763,6 +6763,7 @@ void gain_dec_tc_fx( Word32 *norm_gain_code_fx /* o : norm. gain of the codebook excit. */ ); #ifndef HARM_COREDECODER_FUNCTIONS void gain_dec_tc_ivas_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ const Word16 *code_fx, /* i : algebraic code excitation */ Loading @@ -6773,7 +6774,7 @@ void gain_dec_tc_ivas_fx( Word16 *gain_inov_fx, /* o : unscaled innovation gain */ Word32 *norm_gain_code_fx /* o : norm. gain of the codebook excit. */ ); #endif void gain_dec_mless_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ const Word16 L_frame_fx, /* i : length of the frame */ Loading Loading @@ -8780,6 +8781,7 @@ Word16 decode_lpc_avq_fx( Word16 *param_lpc /* o : lpc parameters */ ); #ifndef HARM_COREDECODER_FUNCTIONS Word16 decode_lpc_avq_ivas_fx( Decoder_State *st, /* i/o: decoder state structure */ const Word16 numlpc, /* i : Number of sets of lpc */ Loading @@ -8788,7 +8790,7 @@ Word16 decode_lpc_avq_ivas_fx( const Word16 element_mode, /* i : element mode */ const Word16 sns_low_br_mode /* i : SNS low-bitrate mode */ ); #endif void vlpc_1st_dec( Word16 index, /* i : codebook index */ Word16 *lsfq ); /* i/o: i:prediction o:quantized lsf */ Loading
lib_dec/dec_post_fx.c +13 −7 Original line number Diff line number Diff line Loading @@ -34,8 +34,9 @@ static void calc_st_filt_local_fx( Word16 *apond2, Word16 *apond1, Word16 *parco static void modify_pst_param_fx( const Word16 lp_noise, Word16 *g1, Word16 *g2, const Word16 coder_type, Word16 *gain_factor ); static void Dec_formant_postfilt_fx( PFSTAT_HANDLE hPFstat, Word16 *signal_ptr, Word16 *coeff, Word16 *sig_out, Word16 gamma1, Word16 gamma2 ); #ifndef HARM_COREDECODER_FUNCTIONS static void calc_st_filt_ivas_fx( Word16 *apond2, Word16 *apond1, Word16 *parcor0, Word16 *sig_ltp_ptr, Word16 *mem_zero, const Word16 extl ); #endif /*-------------------------------------------------------------------------- Loading Loading @@ -445,7 +446,11 @@ static void Dec_formant_postfilt_fx( } /* Controls short term pst filter gain and compute parcor0 */ #ifdef HARM_COREDECODER_FUNCTIONS calc_st_filt_local_fx( apond2, apond1, &parcor0, res2, hPFstat->mem_zero ); #else calc_st_filt_ivas_fx( apond2, apond1, &parcor0, res2, hPFstat->mem_zero, -1 ); #endif /* 1/A(gamma1) filtering, mem_stp is updated */ resynth[0] = *( hPFstat->mem_stp + sub( L_SYN_MEM, 1 ) ); Loading Loading @@ -1290,6 +1295,7 @@ static Word16 select_ltp_fx( /* o : 1 = 1st gain, 2 = 2nd gain * controls gain : computation of energy impulse response as * SUMn (abs (h[n])) and computes parcor0 *---------------------------------------------------------------------------- */ static void calc_st_filt_local_fx( Word16 *apond2, /* i : coefficients of numerator Q12 */ Word16 *apond1, /* i : coefficients of denominator Q12 */ Loading @@ -1299,13 +1305,10 @@ static void calc_st_filt_local_fx( ) { Word32 L_g0; Word16 h[LONG_H_ST]; Word16 g0, temp; Word16 i; temp = sub( 2, norm_s( apond2[0] ) ); /* compute i.r. of composed filter apond2 / apond1 */ Loading Loading @@ -1337,6 +1340,7 @@ static void calc_st_filt_local_fx( return; } #ifndef HARM_COREDECODER_FUNCTIONS static void calc_st_filt_ivas_fx( Word16 *apond2, /* i : coefficients of numerator Q12 */ Word16 *apond1, /* i : coefficients of denominator Q12 */ Loading Loading @@ -1391,6 +1395,8 @@ static void calc_st_filt_ivas_fx( return; } #endif /*---------------------------------------------------------------------------- * filt_mu * Loading
lib_dec/dec_prm_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -52,7 +52,11 @@ void getLPCparam_fx( { IF( st->lpcQuantization == 0 ) { #ifdef HARM_COREDECODER_FUNCTIONS decode_lpc_avq_fx( st0, st->numlpc, param_lpc, ch, st->element_mode, sns_low_br_mode ); #else decode_lpc_avq_ivas_fx( st0, st->numlpc, param_lpc, ch, st->element_mode, sns_low_br_mode ); #endif } ELSE IF( EQ_16( st->lpcQuantization, 1 ) ) { Loading
lib_dec/dec_tran_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -145,6 +145,9 @@ void decod_tran_fx( IF( Jopt_flag == 0 ) { /* 2/3-bit decoding */ #ifdef HARM_COREDECODER_FUNCTIONS gain_dec_tc_fx( st_fx, code_fx, i_subfr, Es_pred_fx, &gain_pit_fx, &gain_code_fx, &gain_inov_fx, &norm_gain_code_fx ); #else IF( st_fx->element_mode == EVS_MONO ) { gain_dec_tc_fx( st_fx, code_fx, i_subfr, Es_pred_fx, &gain_pit_fx, &gain_code_fx, &gain_inov_fx, &norm_gain_code_fx ); Loading @@ -153,6 +156,7 @@ void decod_tran_fx( { gain_dec_tc_ivas_fx( st_fx, code_fx, i_subfr, Es_pred_fx, &gain_pit_fx, &gain_code_fx, &gain_inov_fx, &norm_gain_code_fx ); } #endif } ELSE { Loading