Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,7 @@ #define FIX_844_Q_SYN_INIT /* VA : proposed fix to 844, initializing q_old_synth when switching to MDCT*/ #define FIX_839_FB_CONTENT_SOMETIME_MISSING /* VA : Fix scaling error for FB TB BWE */ #define FIX_846_TILT_BWE /* VA : Proposed fix to 846, to solve saturation */ #define FIX_843_LOW_RATE_BWE /* VA : Proposed fix to 843 to solve mid band noise */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading lib_dec/acelp_core_dec_ivas_fx.c +10 −0 Original line number Diff line number Diff line Loading @@ -1187,7 +1187,11 @@ ivas_error acelp_core_dec_ivas_fx( /* Core synthesis at 12.8kHz or 16kHz */ i = 1; move16(); #ifdef FIX_843_LOW_RATE_BWE if ( st->coder_type == INACTIVE && st->element_mode == EVS_MONO ) #else if ( st->coder_type == INACTIVE ) #endif { i = 0; move16(); Loading Loading @@ -2121,9 +2125,15 @@ ivas_error acelp_core_dec_ivas_fx( Copy_Scale_sig_32_16( synth_fx, synth_fx16, L_FRAME48k, 0 ); #endif #ifdef FIX_774_ENERGY_BURST #ifdef FIX_843_LOW_RATE_BWE hf_synth_fx( st->hBWE_zero, st->core_brate, output_frame, Aq_fx, exc2_fx, psyn_fx, synth_fx16, st->Q_exc, st->Q_syn2, st->hBWE_zero->delay_syn_hf_fx, &st->hBWE_zero->memExp1, st->hBWE_zero->mem_hp_interp_fx, st->extl, st->CNG_mode ); #else hf_synth_fx( st->hBWE_zero, st->core_brate, output_frame, Aq_fx, exc_fx, psyn_fx, synth_fx16, st->Q_exc, st->Q_syn2, st->hBWE_zero->delay_syn_hf_fx, &st->hBWE_zero->memExp1, st->hBWE_zero->mem_hp_interp_fx, st->extl, st->CNG_mode ); #endif #else hf_synth_ivas_fx( st->hBWE_zero, st->core_brate, output_frame, Aq_fx, exc_fx, psyn_fx, synth_fx16, st->Q_exc, st->Q_syn2, st->hBWE_zero->delay_syn_hf_fx, &tmp_exp, Loading lib_dec/ivas_td_low_rate_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -315,6 +315,10 @@ void tdm_low_rate_dec_fx( edct_16fx( exc_wo_nf_fx, exc_wo_nf_fx, L_FRAME, find_guarded_bits_fx( L_FRAME ), IVAS_CPE_TD ); #ifdef FIX_843_LOW_RATE_BWE Rescale_exc( st->hMusicPF->dct_post_old_exc_fx, &exc[0], &bwe_exc[0], st->hGSCDec->last_exc_dct_in_fx, L_FRAME, L_FRAME * HIBND_ACB_L_FAC, L_shl( st->lp_gainc_fx, 13 /* Q3 -> Q16*/ ), &( st->Q_exc ), st->Q_subfr, NULL, 0, st->coder_type ); #endif /*----------------------------------------------------------------------* * Remove potential pre-echo in case an onset has been detected *----------------------------------------------------------------------*/ Loading lib_dec/swb_bwe_dec_fx.c +19 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,9 @@ Word16 ivas_wb_bwe_dec_fx( Word16 scl, new_input_fx_exp; Word16 i; FD_BWE_DEC_HANDLE hBWE_FD; #ifdef FIX_843_LOW_RATE_BWE Word16 ysynth_frame_size; #endif Word16 coder_type = st_fx->coder_type; move16(); Loading @@ -389,6 +391,9 @@ Word16 ivas_wb_bwe_dec_fx( *Qpost = sub( new_input_fx_exp, 15 ); move16(); direct_transform_fx( L_wtda_synth_fx, ysynth_32, 0, /*st->L_frame*/ L_FRAME16k, &new_input_fx_exp, st_fx->element_mode ); #ifdef FIX_843_LOW_RATE_BWE ysynth_frame_size = L_FRAME16k; #endif } ELSE { Loading @@ -398,10 +403,15 @@ Word16 ivas_wb_bwe_dec_fx( *Qpost = sub( new_input_fx_exp, 15 ); move16(); /* DCT of the ACELP core synthesis */ #ifdef FIX_843_LOW_RATE_BWE direct_transform_fx( L_wtda_synth_fx, ysynth_32, 0, output_frame, &new_input_fx_exp, st_fx->element_mode ); ysynth_frame_size = output_frame; #else #ifdef MSAN_FIX direct_transform_fx( L_wtda_synth_fx, ysynth_32, 0, L_FRAME16k, &new_input_fx_exp, st_fx->element_mode ); #else direct_transform_fx( L_wtda_synth_fx, ysynth_32, 0, output_frame, &new_input_fx_exp, st_fx->element_mode ); #endif #endif } /* Convert to 16 Bits (Calc Shift Required to Stay within MAX_Q_NEW_INPUT) */ Loading @@ -411,18 +421,26 @@ Word16 ivas_wb_bwe_dec_fx( { /* Yes */ /* Calc Room to Upscale */ #ifdef FIX_843_LOW_RATE_BWE Q_syn = Find_Max_Norm32( ysynth_32, ysynth_frame_size ); #else #ifdef MSAN_FIX Q_syn = Find_Max_Norm32( ysynth_32, L_FRAME16k ); #else Q_syn = Find_Max_Norm32( ysynth_32, output_frame ); #endif #endif /* Stay within MAX_Q_NEW_INPUT */ scl = s_min( Q_syn, scl ); } #ifdef FIX_843_LOW_RATE_BWE Copy_Scale_sig32_16( ysynth_32, ysynth_fx, ysynth_frame_size, scl ); #else #ifdef MSAN_FIX Copy_Scale_sig32_16( ysynth_32, ysynth_fx, L_FRAME16k, scl ); #else Copy_Scale_sig32_16( ysynth_32, ysynth_fx, output_frame, scl ); #endif #endif Q_syn = add( sub( new_input_fx_exp, 16 ), scl ); IF( !st_fx->bfi ) Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -163,6 +163,7 @@ #define FIX_844_Q_SYN_INIT /* VA : proposed fix to 844, initializing q_old_synth when switching to MDCT*/ #define FIX_839_FB_CONTENT_SOMETIME_MISSING /* VA : Fix scaling error for FB TB BWE */ #define FIX_846_TILT_BWE /* VA : Proposed fix to 846, to solve saturation */ #define FIX_843_LOW_RATE_BWE /* VA : Proposed fix to 843 to solve mid band noise */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ Loading
lib_dec/acelp_core_dec_ivas_fx.c +10 −0 Original line number Diff line number Diff line Loading @@ -1187,7 +1187,11 @@ ivas_error acelp_core_dec_ivas_fx( /* Core synthesis at 12.8kHz or 16kHz */ i = 1; move16(); #ifdef FIX_843_LOW_RATE_BWE if ( st->coder_type == INACTIVE && st->element_mode == EVS_MONO ) #else if ( st->coder_type == INACTIVE ) #endif { i = 0; move16(); Loading Loading @@ -2121,9 +2125,15 @@ ivas_error acelp_core_dec_ivas_fx( Copy_Scale_sig_32_16( synth_fx, synth_fx16, L_FRAME48k, 0 ); #endif #ifdef FIX_774_ENERGY_BURST #ifdef FIX_843_LOW_RATE_BWE hf_synth_fx( st->hBWE_zero, st->core_brate, output_frame, Aq_fx, exc2_fx, psyn_fx, synth_fx16, st->Q_exc, st->Q_syn2, st->hBWE_zero->delay_syn_hf_fx, &st->hBWE_zero->memExp1, st->hBWE_zero->mem_hp_interp_fx, st->extl, st->CNG_mode ); #else hf_synth_fx( st->hBWE_zero, st->core_brate, output_frame, Aq_fx, exc_fx, psyn_fx, synth_fx16, st->Q_exc, st->Q_syn2, st->hBWE_zero->delay_syn_hf_fx, &st->hBWE_zero->memExp1, st->hBWE_zero->mem_hp_interp_fx, st->extl, st->CNG_mode ); #endif #else hf_synth_ivas_fx( st->hBWE_zero, st->core_brate, output_frame, Aq_fx, exc_fx, psyn_fx, synth_fx16, st->Q_exc, st->Q_syn2, st->hBWE_zero->delay_syn_hf_fx, &tmp_exp, Loading
lib_dec/ivas_td_low_rate_dec.c +4 −0 Original line number Diff line number Diff line Loading @@ -315,6 +315,10 @@ void tdm_low_rate_dec_fx( edct_16fx( exc_wo_nf_fx, exc_wo_nf_fx, L_FRAME, find_guarded_bits_fx( L_FRAME ), IVAS_CPE_TD ); #ifdef FIX_843_LOW_RATE_BWE Rescale_exc( st->hMusicPF->dct_post_old_exc_fx, &exc[0], &bwe_exc[0], st->hGSCDec->last_exc_dct_in_fx, L_FRAME, L_FRAME * HIBND_ACB_L_FAC, L_shl( st->lp_gainc_fx, 13 /* Q3 -> Q16*/ ), &( st->Q_exc ), st->Q_subfr, NULL, 0, st->coder_type ); #endif /*----------------------------------------------------------------------* * Remove potential pre-echo in case an onset has been detected *----------------------------------------------------------------------*/ Loading
lib_dec/swb_bwe_dec_fx.c +19 −1 Original line number Diff line number Diff line Loading @@ -368,7 +368,9 @@ Word16 ivas_wb_bwe_dec_fx( Word16 scl, new_input_fx_exp; Word16 i; FD_BWE_DEC_HANDLE hBWE_FD; #ifdef FIX_843_LOW_RATE_BWE Word16 ysynth_frame_size; #endif Word16 coder_type = st_fx->coder_type; move16(); Loading @@ -389,6 +391,9 @@ Word16 ivas_wb_bwe_dec_fx( *Qpost = sub( new_input_fx_exp, 15 ); move16(); direct_transform_fx( L_wtda_synth_fx, ysynth_32, 0, /*st->L_frame*/ L_FRAME16k, &new_input_fx_exp, st_fx->element_mode ); #ifdef FIX_843_LOW_RATE_BWE ysynth_frame_size = L_FRAME16k; #endif } ELSE { Loading @@ -398,10 +403,15 @@ Word16 ivas_wb_bwe_dec_fx( *Qpost = sub( new_input_fx_exp, 15 ); move16(); /* DCT of the ACELP core synthesis */ #ifdef FIX_843_LOW_RATE_BWE direct_transform_fx( L_wtda_synth_fx, ysynth_32, 0, output_frame, &new_input_fx_exp, st_fx->element_mode ); ysynth_frame_size = output_frame; #else #ifdef MSAN_FIX direct_transform_fx( L_wtda_synth_fx, ysynth_32, 0, L_FRAME16k, &new_input_fx_exp, st_fx->element_mode ); #else direct_transform_fx( L_wtda_synth_fx, ysynth_32, 0, output_frame, &new_input_fx_exp, st_fx->element_mode ); #endif #endif } /* Convert to 16 Bits (Calc Shift Required to Stay within MAX_Q_NEW_INPUT) */ Loading @@ -411,18 +421,26 @@ Word16 ivas_wb_bwe_dec_fx( { /* Yes */ /* Calc Room to Upscale */ #ifdef FIX_843_LOW_RATE_BWE Q_syn = Find_Max_Norm32( ysynth_32, ysynth_frame_size ); #else #ifdef MSAN_FIX Q_syn = Find_Max_Norm32( ysynth_32, L_FRAME16k ); #else Q_syn = Find_Max_Norm32( ysynth_32, output_frame ); #endif #endif /* Stay within MAX_Q_NEW_INPUT */ scl = s_min( Q_syn, scl ); } #ifdef FIX_843_LOW_RATE_BWE Copy_Scale_sig32_16( ysynth_32, ysynth_fx, ysynth_frame_size, scl ); #else #ifdef MSAN_FIX Copy_Scale_sig32_16( ysynth_32, ysynth_fx, L_FRAME16k, scl ); #else Copy_Scale_sig32_16( ysynth_32, ysynth_fx, output_frame, scl ); #endif #endif Q_syn = add( sub( new_input_fx_exp, 16 ), scl ); IF( !st_fx->bfi ) Loading