Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ #define FIX_736_BWE_SECT_C // Solves an issue where the BWE was disappearing, problem related to wrong scaling in ic-BWE #define FIX_734_MISSING_SUBFR_LOW_RATE_ACELP #define FIX_747_TDBWE_ENERGY_BURST #define FIX_770_DISCONTINUITIES_SW_TCX2ACELP // Fix discontinuities when switching from TCX to ACELP /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_dec/core_switching_dec.c +25 −1 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ ivas_error core_switching_pre_dec_ivas_fx( /* Codec mode switching */ IF( EQ_16( st->last_codec_mode, MODE2 ) || ( ( EQ_16( st->last_core, TCX_20_CORE ) || EQ_16( st->last_core, TCX_10_CORE ) ) && GT_16( st->element_mode, EVS_MONO ) ) ) { #ifndef FIX_770_DISCONTINUITIES_SW_TCX2ACELP Copy( st->mem_syn2_fx, st->mem_syn1_fx, M ); set16_fx( st->agc_mem_fx, 0, 2 ); st->mem_deemph_fx = st->syn[M]; Loading @@ -97,6 +98,29 @@ ivas_error core_switching_pre_dec_ivas_fx( st->hBPF->pst_mem_deemp_err_fx = 0; move32(); } #else st->mem_deemph_fx = st->syn[M]; move16(); set16_fx( st->agc_mem_fx, 0, 2 ); Scale_sig( &( st->mem_deemph_fx ), 1, st->Q_syn ); /* Brings mem_deemph to Qsyn */ Copy_Scale_sig( st->mem_syn2_fx, st->mem_syn1_fx, M, sub( -1, st->Q_syn ) ); /*Q-1*/ st->bpf_off = 1; move16(); IF( st->hPFstat != NULL ) { Scale_sig( st->hPFstat->mem_pf_in, L_SUBFR, st->Q_syn ); /* Post_filter mem */ Scale_sig( st->hPFstat->mem_res2, DECMEM_RES2, st->Q_syn ); /* NB post_filter mem */ Scale_sig( st->hPFstat->mem_stp, L_SUBFR, st->Q_syn ); /* Post_filter mem */ set16_fx( st->hBPF->pst_old_syn_fx, 0, NBPSF_PIT_MAX ); /* BPF mem*/ } IF( st->hBPF != NULL ) { st->hBPF->pst_lp_ener_fx = round_fx( L_shl( Mpy_32_16_1( st->lp_error_ener, 0x6054 ), 2 + 8 ) ); /* convert from 15Q16, log2 -> 7Q8 10*log10 */ st->hBPF->pst_mem_deemp_err_fx = 0; } #endif st->psf_lp_noise_fx = round_fx( L_shl( st->lp_noise, 1 ) ); move16(); Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -135,6 +135,7 @@ #define FIX_736_BWE_SECT_C // Solves an issue where the BWE was disappearing, problem related to wrong scaling in ic-BWE #define FIX_734_MISSING_SUBFR_LOW_RATE_ACELP #define FIX_747_TDBWE_ENERGY_BURST #define FIX_770_DISCONTINUITIES_SW_TCX2ACELP // Fix discontinuities when switching from TCX to ACELP /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_dec/core_switching_dec.c +25 −1 Original line number Diff line number Diff line Loading @@ -85,6 +85,7 @@ ivas_error core_switching_pre_dec_ivas_fx( /* Codec mode switching */ IF( EQ_16( st->last_codec_mode, MODE2 ) || ( ( EQ_16( st->last_core, TCX_20_CORE ) || EQ_16( st->last_core, TCX_10_CORE ) ) && GT_16( st->element_mode, EVS_MONO ) ) ) { #ifndef FIX_770_DISCONTINUITIES_SW_TCX2ACELP Copy( st->mem_syn2_fx, st->mem_syn1_fx, M ); set16_fx( st->agc_mem_fx, 0, 2 ); st->mem_deemph_fx = st->syn[M]; Loading @@ -97,6 +98,29 @@ ivas_error core_switching_pre_dec_ivas_fx( st->hBPF->pst_mem_deemp_err_fx = 0; move32(); } #else st->mem_deemph_fx = st->syn[M]; move16(); set16_fx( st->agc_mem_fx, 0, 2 ); Scale_sig( &( st->mem_deemph_fx ), 1, st->Q_syn ); /* Brings mem_deemph to Qsyn */ Copy_Scale_sig( st->mem_syn2_fx, st->mem_syn1_fx, M, sub( -1, st->Q_syn ) ); /*Q-1*/ st->bpf_off = 1; move16(); IF( st->hPFstat != NULL ) { Scale_sig( st->hPFstat->mem_pf_in, L_SUBFR, st->Q_syn ); /* Post_filter mem */ Scale_sig( st->hPFstat->mem_res2, DECMEM_RES2, st->Q_syn ); /* NB post_filter mem */ Scale_sig( st->hPFstat->mem_stp, L_SUBFR, st->Q_syn ); /* Post_filter mem */ set16_fx( st->hBPF->pst_old_syn_fx, 0, NBPSF_PIT_MAX ); /* BPF mem*/ } IF( st->hBPF != NULL ) { st->hBPF->pst_lp_ener_fx = round_fx( L_shl( Mpy_32_16_1( st->lp_error_ener, 0x6054 ), 2 + 8 ) ); /* convert from 15Q16, log2 -> 7Q8 10*log10 */ st->hBPF->pst_mem_deemp_err_fx = 0; } #endif st->psf_lp_noise_fx = round_fx( L_shl( st->lp_noise, 1 ) ); move16(); Loading