Loading lib_com/ivas_prot_fx.h +4 −0 Original line number Diff line number Diff line Loading @@ -1892,7 +1892,11 @@ void GenShapedWBExcitation_ivas_fx( /* o : Q_syn_hb*/ Word16 ivas_wb_bwe_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 output_fx32[], /* o : synthesis @internal Fs Q11*/ #else const Word16 output[], /* i : suntehsis @ internal Fs Q_input */ #endif Word16 *synth_fx, /* i/o: ACELP core synthesis/final synthesis Q0/Qpost */ Word16 *hb_synth_fx, /* o : SHB synthesis/final synthesis Q_syn_hb */ const Word16 use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo */ Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,7 @@ #define FIX_BASOP_2350_HARM_0B_BWE /* VA: basop issue 2350: harmonization of the 0b BWE */ #define FIX_2349_HARM_FIND_UV /* VA: basop issue 2349: harmonization of find_uv() function */ #define FIX_2280_REDUCTION_UNNECESSARY_SCALING /* VA: reduction of unnecessary scaling */ //#define FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE /* #################### End BE switches ################################## */ Loading lib_dec/ivas_core_dec_fx.c +15 −4 Original line number Diff line number Diff line Loading @@ -93,7 +93,9 @@ ivas_error ivas_core_dec_fx( ivas_error error; Word32 L_tmp; Word16 Q_synth; #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Word16 output_16_fx[CPE_CHANNELS][L_FRAME48k]; #endif Word16 hb_synth_16_fx[CPE_CHANNELS][L_FRAME48k]; Word16 synth_16_fx[CPE_CHANNELS][L_FRAME48k]; Word32 synth_32_fx[CPE_CHANNELS][L_FRAME48k]; Loading Loading @@ -467,8 +469,9 @@ ivas_error ivas_core_dec_fx( * HQ core decoding *---------------------------------------------------------------------*/ #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE set16_fx( output_16_fx[n], 0, L_FRAME48k ); /* this is needed for instances like L_norm_arr( p_output_fx[i], L_FRAME48k ) */ #endif IF( st->core == ACELP_CORE ) { /* ACELP core decoder */ Loading Loading @@ -1023,7 +1026,9 @@ ivas_error ivas_core_dec_fx( Q_synth_fx = Q_synth; move16(); #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Copy_Scale_sig_32_16( output_32_fx[n], output_16_fx[n], L_FRAME48k, sub( Q_input, Q11 ) ); // Q_input #endif Copy_Scale_sig_32_16( hb_synth_32_fx[n], hb_synth_16_fx[n], L_FRAME48k, -( Q11 ) ); // Q0 test(); test(); Loading @@ -1043,7 +1048,11 @@ ivas_error ivas_core_dec_fx( ELSE IF( EQ_16( st->extl, WB_BWE ) && st->bws_cnt == 0 ) { /* WB BWE decoder */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Q_hb_synth_fx = ivas_wb_bwe_dec_fx( st, output_32_fx[n], synth_16_fx[n], hb_synth_16_fx[n], use_cldfb_for_dft, output_frame, voice_factors_fx[n], pitch_buf_fx[n], &Q_synth_fx ); #else Q_hb_synth_fx = ivas_wb_bwe_dec_fx( st, output_16_fx[n], synth_16_fx[n], hb_synth_16_fx[n], use_cldfb_for_dft, output_frame, voice_factors_fx[n], pitch_buf_fx[n], &Q_synth_fx ); #endif } /* Memories Re-Scaling */ Loading @@ -1051,7 +1060,9 @@ ivas_error ivas_core_dec_fx( { Copy_Scale_sig_16_32_no_sat( hb_synth_16_fx[n], hb_synth_32_fx[n], L_FRAME48k, sub( Q11, Q_hb_synth_fx ) ); // Q11 } #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Copy_Scale_sig_16_32_no_sat( output_16_fx[n], output_32_fx[n], L_FRAME48k, sub( Q11, Q_input ) ); // Q11 // Q_input can get value <= -5 #endif Copy_Scale_sig_16_32_no_sat( synth_16_fx[n], synth_32_fx[n], output_frame, sub( Q11, Q_synth_fx ) ); // Q11 IF( hBWE_FD != NULL ) Loading lib_dec/swb_bwe_dec_fx.c +27 −3 Original line number Diff line number Diff line Loading @@ -356,7 +356,11 @@ Word16 WB_BWE_gain_deq_fx( /* o : Q_syn_hb */ Word16 ivas_wb_bwe_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 output_fx32[], /* o : synthesis @internal Fs Q11*/ #else const Word16 output[], /* i : suntehsis @ internal Fs Q_input */ #endif Word16 *synth_fx, /* i/o: ACELP core synthesis/final synthesis Q0/Qpost */ Word16 *hb_synth_fx, /* o : SHB synthesis/final synthesis Q_syn_hb */ const Word16 use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo */ Loading @@ -370,6 +374,10 @@ Word16 ivas_wb_bwe_dec_fx( Word16 ysynth_fx[L_FRAME48k]; 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 Q_input, sf; #endif Word16 scl, new_input_fx_exp; Word16 i; FD_BWE_DEC_HANDLE hBWE_FD; Loading @@ -379,8 +387,20 @@ Word16 ivas_wb_bwe_dec_fx( hBWE_FD = st_fx->hBWE_FD; /* MDCT of the core synthesis signal */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING sf = getScaleFactor32( output_fx32, L_FRAME48k ); Q_input = 0; move16(); if ( LT_16( sf, 5 ) ) { Q_input = sub( sf, 5 ); } Copy_Scale_sig_32_16( output_fx32, output, L_FRAME48k, sub( Q_input, Q11 ) ); // Q_input #endif /* MDCT of the core synthesis signal */ new_input_fx_exp = *Qpost; move16(); test(); Loading Loading @@ -512,6 +532,10 @@ Word16 ivas_wb_bwe_dec_fx( hBWE_FD->prev_Q_synth = Q_syn; move16(); #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Copy_Scale_sig_16_32_no_sat( output, output_fx32, L_FRAME48k, sub( Q11, Q_input ) ); // Q11 // Q_input can get value <= -5 #endif return Q_syn_hb; } Loading Loading
lib_com/ivas_prot_fx.h +4 −0 Original line number Diff line number Diff line Loading @@ -1892,7 +1892,11 @@ void GenShapedWBExcitation_ivas_fx( /* o : Q_syn_hb*/ Word16 ivas_wb_bwe_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 output_fx32[], /* o : synthesis @internal Fs Q11*/ #else const Word16 output[], /* i : suntehsis @ internal Fs Q_input */ #endif Word16 *synth_fx, /* i/o: ACELP core synthesis/final synthesis Q0/Qpost */ Word16 *hb_synth_fx, /* o : SHB synthesis/final synthesis Q_syn_hb */ const Word16 use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo */ Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -108,6 +108,7 @@ #define FIX_BASOP_2350_HARM_0B_BWE /* VA: basop issue 2350: harmonization of the 0b BWE */ #define FIX_2349_HARM_FIND_UV /* VA: basop issue 2349: harmonization of find_uv() function */ #define FIX_2280_REDUCTION_UNNECESSARY_SCALING /* VA: reduction of unnecessary scaling */ //#define FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE /* #################### End BE switches ################################## */ Loading
lib_dec/ivas_core_dec_fx.c +15 −4 Original line number Diff line number Diff line Loading @@ -93,7 +93,9 @@ ivas_error ivas_core_dec_fx( ivas_error error; Word32 L_tmp; Word16 Q_synth; #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Word16 output_16_fx[CPE_CHANNELS][L_FRAME48k]; #endif Word16 hb_synth_16_fx[CPE_CHANNELS][L_FRAME48k]; Word16 synth_16_fx[CPE_CHANNELS][L_FRAME48k]; Word32 synth_32_fx[CPE_CHANNELS][L_FRAME48k]; Loading Loading @@ -467,8 +469,9 @@ ivas_error ivas_core_dec_fx( * HQ core decoding *---------------------------------------------------------------------*/ #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE set16_fx( output_16_fx[n], 0, L_FRAME48k ); /* this is needed for instances like L_norm_arr( p_output_fx[i], L_FRAME48k ) */ #endif IF( st->core == ACELP_CORE ) { /* ACELP core decoder */ Loading Loading @@ -1023,7 +1026,9 @@ ivas_error ivas_core_dec_fx( Q_synth_fx = Q_synth; move16(); #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Copy_Scale_sig_32_16( output_32_fx[n], output_16_fx[n], L_FRAME48k, sub( Q_input, Q11 ) ); // Q_input #endif Copy_Scale_sig_32_16( hb_synth_32_fx[n], hb_synth_16_fx[n], L_FRAME48k, -( Q11 ) ); // Q0 test(); test(); Loading @@ -1043,7 +1048,11 @@ ivas_error ivas_core_dec_fx( ELSE IF( EQ_16( st->extl, WB_BWE ) && st->bws_cnt == 0 ) { /* WB BWE decoder */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Q_hb_synth_fx = ivas_wb_bwe_dec_fx( st, output_32_fx[n], synth_16_fx[n], hb_synth_16_fx[n], use_cldfb_for_dft, output_frame, voice_factors_fx[n], pitch_buf_fx[n], &Q_synth_fx ); #else Q_hb_synth_fx = ivas_wb_bwe_dec_fx( st, output_16_fx[n], synth_16_fx[n], hb_synth_16_fx[n], use_cldfb_for_dft, output_frame, voice_factors_fx[n], pitch_buf_fx[n], &Q_synth_fx ); #endif } /* Memories Re-Scaling */ Loading @@ -1051,7 +1060,9 @@ ivas_error ivas_core_dec_fx( { Copy_Scale_sig_16_32_no_sat( hb_synth_16_fx[n], hb_synth_32_fx[n], L_FRAME48k, sub( Q11, Q_hb_synth_fx ) ); // Q11 } #ifndef FIX_2280_REDUCTION_UNNECESSARY_SCALING_NONBE Copy_Scale_sig_16_32_no_sat( output_16_fx[n], output_32_fx[n], L_FRAME48k, sub( Q11, Q_input ) ); // Q11 // Q_input can get value <= -5 #endif Copy_Scale_sig_16_32_no_sat( synth_16_fx[n], synth_32_fx[n], output_frame, sub( Q11, Q_synth_fx ) ); // Q11 IF( hBWE_FD != NULL ) Loading
lib_dec/swb_bwe_dec_fx.c +27 −3 Original line number Diff line number Diff line Loading @@ -356,7 +356,11 @@ Word16 WB_BWE_gain_deq_fx( /* o : Q_syn_hb */ Word16 ivas_wb_bwe_dec_fx( Decoder_State *st_fx, /* i/o: decoder state structure */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Word32 output_fx32[], /* o : synthesis @internal Fs Q11*/ #else const Word16 output[], /* i : suntehsis @ internal Fs Q_input */ #endif Word16 *synth_fx, /* i/o: ACELP core synthesis/final synthesis Q0/Qpost */ Word16 *hb_synth_fx, /* o : SHB synthesis/final synthesis Q_syn_hb */ const Word16 use_cldfb_for_dft, /* i : flag to use of CLDFB for DFT Stereo */ Loading @@ -370,6 +374,10 @@ Word16 ivas_wb_bwe_dec_fx( Word16 ysynth_fx[L_FRAME48k]; 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 Q_input, sf; #endif Word16 scl, new_input_fx_exp; Word16 i; FD_BWE_DEC_HANDLE hBWE_FD; Loading @@ -379,8 +387,20 @@ Word16 ivas_wb_bwe_dec_fx( hBWE_FD = st_fx->hBWE_FD; /* MDCT of the core synthesis signal */ #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING sf = getScaleFactor32( output_fx32, L_FRAME48k ); Q_input = 0; move16(); if ( LT_16( sf, 5 ) ) { Q_input = sub( sf, 5 ); } Copy_Scale_sig_32_16( output_fx32, output, L_FRAME48k, sub( Q_input, Q11 ) ); // Q_input #endif /* MDCT of the core synthesis signal */ new_input_fx_exp = *Qpost; move16(); test(); Loading Loading @@ -512,6 +532,10 @@ Word16 ivas_wb_bwe_dec_fx( hBWE_FD->prev_Q_synth = Q_syn; move16(); #ifdef FIX_2280_REDUCTION_UNNECESSARY_SCALING Copy_Scale_sig_16_32_no_sat( output, output_fx32, L_FRAME48k, sub( Q11, Q_input ) ); // Q11 // Q_input can get value <= -5 #endif return Q_syn_hb; } Loading