Loading lib_dec/ivas_core_dec_fx.c +16 −5 Original line number Diff line number Diff line Loading @@ -284,6 +284,9 @@ ivas_error ivas_core_dec_fx( } set16_fx( voice_factors_fx[n], 0, NB_SUBFR16k ); #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING set32_fx( output_32_fx[n], 0, L_FRAME48k ); #endif set32_fx( hb_synth_32_fx[n], 0, L_FRAME48k ); set16_fx( hb_synth_16_fx[n], 0, L_FRAME48k ); bwe_exc_extended_fx[n] = hb_synth_32_fx[n]; /* note: reuse the buffer */ Loading Loading @@ -848,7 +851,11 @@ ivas_error ivas_core_dec_fx( set16_fx( output_mem_16_fx, 0, NS2SA_FX2( st->output_Fs, 3125000 ) ); } #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Scale_sig32( output_32_fx[n], output_frame, Q4 - Q11 ); // Q4 #else Scale_sig32( output_32_fx[n], L_FRAME48k, Q4 - Q11 ); // Q4 #endif /*size of synth is choosen as delay comp to start with*/ /*-------------------cldfb-start-------------------------*/ Loading Loading @@ -953,7 +960,11 @@ ivas_error ivas_core_dec_fx( Copy_Scale_sig_16_32_no_sat( st->delay_buf_out_fx, st->delay_buf_out32_fx, ( HQ_DELTA_MAX * HQ_DELAY_COMP ), sub( Q11, st->hHQ_core->Q_old_postdec ) ); // Q11 } #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Scale_sig32( output_32_fx[n], output_frame, ( Q11 - Q4 ) ); // Q11 #else Scale_sig32( output_32_fx[n], L_FRAME48k, ( Q11 - Q4 ) ); // Q11 #endif /*note : cldfb_size here signifies the original size which was assigned to cldfb_state_fx buffer not its current size*/ Loading lib_dec/swb_bwe_dec_fx.c +14 −14 Original line number Diff line number Diff line Loading @@ -375,7 +375,7 @@ Word16 ivas_wb_bwe_dec_fx( Word16 Q_syn, exp, Q_syn_hb; Word32 L_wtda_synth_fx[2 * L_FRAME48k], ysynth_32[L_FRAME48k], t_audio32_tmp[L_FRAME48k]; #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word16 output[L_FRAME48k]; Word16 output[L_FRAME16k]; Word16 Q_input, sf; #endif Word16 scl, new_input_fx_exp; Loading @@ -387,8 +387,14 @@ Word16 ivas_wb_bwe_dec_fx( hBWE_FD = st_fx->hBWE_FD; /* MDCT of the core synthesis signal */ new_input_fx_exp = *Qpost; move16(); test(); IF( EQ_16( st_fx->element_mode, IVAS_CPE_DFT ) && !use_cldfb_for_dft ) { #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING sf = getScaleFactor32( output_fx32, L_FRAME48k ); sf = getScaleFactor32( output_fx32, st_fx->L_frame ); Q_input = 0; move16(); Loading @@ -397,15 +403,9 @@ Word16 ivas_wb_bwe_dec_fx( Q_input = sub( sf, 5 ); } Copy_Scale_sig_32_16( output_fx32, output, L_FRAME48k, sub( Q_input, Q11 ) ); // Q_input #endif Copy_Scale_sig_32_16( output_fx32, output, st_fx->L_frame, sub( Q_input, Q11 ) ); // Q_input /* MDCT of the core synthesis signal */ new_input_fx_exp = *Qpost; move16(); test(); IF( EQ_16( st_fx->element_mode, IVAS_CPE_DFT ) && !use_cldfb_for_dft ) { #endif /* IVAS_fmToDo: wtda() does not support L_FRAME length; thus temporarily resample the signal */ /* IVAS_fmToDo: delay output[] by 1.25ms ? */ lerp( output, ysynth_fx, L_FRAME16k, st_fx->L_frame ); Loading Loading
lib_dec/ivas_core_dec_fx.c +16 −5 Original line number Diff line number Diff line Loading @@ -284,6 +284,9 @@ ivas_error ivas_core_dec_fx( } set16_fx( voice_factors_fx[n], 0, NB_SUBFR16k ); #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING set32_fx( output_32_fx[n], 0, L_FRAME48k ); #endif set32_fx( hb_synth_32_fx[n], 0, L_FRAME48k ); set16_fx( hb_synth_16_fx[n], 0, L_FRAME48k ); bwe_exc_extended_fx[n] = hb_synth_32_fx[n]; /* note: reuse the buffer */ Loading Loading @@ -848,7 +851,11 @@ ivas_error ivas_core_dec_fx( set16_fx( output_mem_16_fx, 0, NS2SA_FX2( st->output_Fs, 3125000 ) ); } #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Scale_sig32( output_32_fx[n], output_frame, Q4 - Q11 ); // Q4 #else Scale_sig32( output_32_fx[n], L_FRAME48k, Q4 - Q11 ); // Q4 #endif /*size of synth is choosen as delay comp to start with*/ /*-------------------cldfb-start-------------------------*/ Loading Loading @@ -953,7 +960,11 @@ ivas_error ivas_core_dec_fx( Copy_Scale_sig_16_32_no_sat( st->delay_buf_out_fx, st->delay_buf_out32_fx, ( HQ_DELTA_MAX * HQ_DELAY_COMP ), sub( Q11, st->hHQ_core->Q_old_postdec ) ); // Q11 } #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Scale_sig32( output_32_fx[n], output_frame, ( Q11 - Q4 ) ); // Q11 #else Scale_sig32( output_32_fx[n], L_FRAME48k, ( Q11 - Q4 ) ); // Q11 #endif /*note : cldfb_size here signifies the original size which was assigned to cldfb_state_fx buffer not its current size*/ Loading
lib_dec/swb_bwe_dec_fx.c +14 −14 Original line number Diff line number Diff line Loading @@ -375,7 +375,7 @@ Word16 ivas_wb_bwe_dec_fx( Word16 Q_syn, exp, Q_syn_hb; Word32 L_wtda_synth_fx[2 * L_FRAME48k], ysynth_32[L_FRAME48k], t_audio32_tmp[L_FRAME48k]; #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word16 output[L_FRAME48k]; Word16 output[L_FRAME16k]; Word16 Q_input, sf; #endif Word16 scl, new_input_fx_exp; Loading @@ -387,8 +387,14 @@ Word16 ivas_wb_bwe_dec_fx( hBWE_FD = st_fx->hBWE_FD; /* MDCT of the core synthesis signal */ new_input_fx_exp = *Qpost; move16(); test(); IF( EQ_16( st_fx->element_mode, IVAS_CPE_DFT ) && !use_cldfb_for_dft ) { #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING sf = getScaleFactor32( output_fx32, L_FRAME48k ); sf = getScaleFactor32( output_fx32, st_fx->L_frame ); Q_input = 0; move16(); Loading @@ -397,15 +403,9 @@ Word16 ivas_wb_bwe_dec_fx( Q_input = sub( sf, 5 ); } Copy_Scale_sig_32_16( output_fx32, output, L_FRAME48k, sub( Q_input, Q11 ) ); // Q_input #endif Copy_Scale_sig_32_16( output_fx32, output, st_fx->L_frame, sub( Q_input, Q11 ) ); // Q_input /* MDCT of the core synthesis signal */ new_input_fx_exp = *Qpost; move16(); test(); IF( EQ_16( st_fx->element_mode, IVAS_CPE_DFT ) && !use_cldfb_for_dft ) { #endif /* IVAS_fmToDo: wtda() does not support L_FRAME length; thus temporarily resample the signal */ /* IVAS_fmToDo: delay output[] by 1.25ms ? */ lerp( output, ysynth_fx, L_FRAME16k, st_fx->L_frame ); Loading