Loading lib_enc/amr_wb_enc_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -372,7 +372,7 @@ void amr_wb_enc_fx( * WB, SWB and FB bandwidth detector *----------------------------------------------------------------*/ bw_detect_fx( st, st->input_fx, NULL, NULL, NULL, MONO_FORMAT, 0 ); bw_detect_fx( st, st->input_fx, NULL, NULL, NULL, MONO_FORMAT, 0, 0 ); /* in AMR_WB IO, limit the maximum band-width to WB */ if ( GT_16( st->bwidth, WB ) ) Loading lib_enc/bw_detect_fx.c +9 −3 Original line number Diff line number Diff line Loading @@ -41,12 +41,12 @@ void bw_detect_fx( Encoder_State *st, /* i/o: Encoder State */ const Word16 signal_in[], /* i : input signal */ Word16 *spectrum, /* i : MDCT spectrum */ Word16 *spectrum, /* i : MDCT spectrum Q_spec */ const Word32 *enerBuffer, /* i : CLDFB Energy Q31 */ const Word16 *cldfbBuf_Ener_Exp, /* i : CLDFB Energy Exponent */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ const Word16 mct_on /* i : flag MCT mode */ ) const Word16 mct_on, /* i : flag MCT mode */ const Word16 Q_spec ) { Word16 Q_dct; Word16 i, j, k, bw_max, bin_width, n_bins; Loading Loading @@ -312,6 +312,11 @@ void bw_detect_fx( bin_width = i_mult( bin_width, l_frame / BWD_TOTAL_WIDTH ); Copy( spectrum, spect, l_frame ); if ( st->element_mode != EVS_MONO ) { Q_dct = Q_spec; move16(); } } /*---------------------------------------------------------------------* * compute energy per spectral bins Loading Loading @@ -903,6 +908,7 @@ void bw_detect_fx( return; } /*-------------------------------------------------------------------* * set_bw_fx() * Loading lib_enc/ivas_core_pre_proc_front_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -870,7 +870,7 @@ ivas_error pre_proc_front_ivas_fx( Word16 input_fx_tmp[480]; Copy_Scale_sig( st->input_fx, input_fx_tmp, shr( input_frame, 1 ), negate( st->q_inp ) ); /*scaling from Q_inp_const to q0*/ bw_detect_fx( st, input_fx_tmp, NULL, enerBuffer_fx, sf_energySum, ivas_format, 0 ); bw_detect_fx( st, input_fx_tmp, NULL, enerBuffer_fx, sf_energySum, ivas_format, 0, 0 ); } IF( EQ_16( element_mode, IVAS_CPE_DFT ) ) Loading lib_enc/ivas_mdct_core_enc_fx.c +5 −4 Original line number Diff line number Diff line Loading @@ -1283,16 +1283,17 @@ void ivas_mdct_core_whitening_enc_fx( FOR( n = 0; n < nSubframes; n++ ) { Word16 spect_fx[L_FRAME48k]; Word16 q_spectrum, l_frame; Word16 q_spectrum, lshift, l_frame; /*l_frame = (int16_t)(st->input_Fs / FRAMES_PER_SEC); 1 / FRAMES_PER_SEC = 0.2f */ l_frame = extract_l( Mpy_32_32( st->input_Fs, 42949673 /* 0.2f in Q31 */ ) ); if ( EQ_16( st->core, TCX_10_CORE ) ) { l_frame = shr( l_frame, 1 ); } q_spectrum = L_norm_arr( st->hTcxEnc->spectrum_fx[n], l_frame ); Copy_Scale_sig32_16( st->hTcxEnc->spectrum_fx[n], spect_fx, l_frame, q_spectrum ); bw_detect_fx( st, NULL, spect_fx, NULL, NULL, MC_FORMAT /*just cannot be ISM_FORMAT*/, mct_on ); lshift = L_norm_arr( st->hTcxEnc->spectrum_fx[n], l_frame ); Copy_Scale_sig32_16( st->hTcxEnc->spectrum_fx[n], spect_fx, l_frame, lshift ); q_spectrum = sub( add( sub( Q31, st->hTcxEnc->spectrum_e[n] ), lshift ), 16 ); bw_detect_fx( st, NULL, spect_fx, NULL, NULL, MC_FORMAT /*just cannot be ISM_FORMAT*/, mct_on, q_spectrum ); test(); if ( EQ_16( nSubframes, NB_DIV ) && n == 0 ) Loading lib_enc/pre_proc_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -298,7 +298,7 @@ void pre_proc_fx( move16(); } bw_detect_fx( st, signal_in, NULL, enerBuffer, sf_energySum, MONO_FORMAT, 0 ); bw_detect_fx( st, signal_in, NULL, enerBuffer, sf_energySum, MONO_FORMAT, 0, 0 ); /*----------------------------------------------------------------* * Noise energy down-ward update and total noise energy estimation Loading Loading
lib_enc/amr_wb_enc_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -372,7 +372,7 @@ void amr_wb_enc_fx( * WB, SWB and FB bandwidth detector *----------------------------------------------------------------*/ bw_detect_fx( st, st->input_fx, NULL, NULL, NULL, MONO_FORMAT, 0 ); bw_detect_fx( st, st->input_fx, NULL, NULL, NULL, MONO_FORMAT, 0, 0 ); /* in AMR_WB IO, limit the maximum band-width to WB */ if ( GT_16( st->bwidth, WB ) ) Loading
lib_enc/bw_detect_fx.c +9 −3 Original line number Diff line number Diff line Loading @@ -41,12 +41,12 @@ void bw_detect_fx( Encoder_State *st, /* i/o: Encoder State */ const Word16 signal_in[], /* i : input signal */ Word16 *spectrum, /* i : MDCT spectrum */ Word16 *spectrum, /* i : MDCT spectrum Q_spec */ const Word32 *enerBuffer, /* i : CLDFB Energy Q31 */ const Word16 *cldfbBuf_Ener_Exp, /* i : CLDFB Energy Exponent */ const IVAS_FORMAT ivas_format, /* i : IVAS format */ const Word16 mct_on /* i : flag MCT mode */ ) const Word16 mct_on, /* i : flag MCT mode */ const Word16 Q_spec ) { Word16 Q_dct; Word16 i, j, k, bw_max, bin_width, n_bins; Loading Loading @@ -312,6 +312,11 @@ void bw_detect_fx( bin_width = i_mult( bin_width, l_frame / BWD_TOTAL_WIDTH ); Copy( spectrum, spect, l_frame ); if ( st->element_mode != EVS_MONO ) { Q_dct = Q_spec; move16(); } } /*---------------------------------------------------------------------* * compute energy per spectral bins Loading Loading @@ -903,6 +908,7 @@ void bw_detect_fx( return; } /*-------------------------------------------------------------------* * set_bw_fx() * Loading
lib_enc/ivas_core_pre_proc_front_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -870,7 +870,7 @@ ivas_error pre_proc_front_ivas_fx( Word16 input_fx_tmp[480]; Copy_Scale_sig( st->input_fx, input_fx_tmp, shr( input_frame, 1 ), negate( st->q_inp ) ); /*scaling from Q_inp_const to q0*/ bw_detect_fx( st, input_fx_tmp, NULL, enerBuffer_fx, sf_energySum, ivas_format, 0 ); bw_detect_fx( st, input_fx_tmp, NULL, enerBuffer_fx, sf_energySum, ivas_format, 0, 0 ); } IF( EQ_16( element_mode, IVAS_CPE_DFT ) ) Loading
lib_enc/ivas_mdct_core_enc_fx.c +5 −4 Original line number Diff line number Diff line Loading @@ -1283,16 +1283,17 @@ void ivas_mdct_core_whitening_enc_fx( FOR( n = 0; n < nSubframes; n++ ) { Word16 spect_fx[L_FRAME48k]; Word16 q_spectrum, l_frame; Word16 q_spectrum, lshift, l_frame; /*l_frame = (int16_t)(st->input_Fs / FRAMES_PER_SEC); 1 / FRAMES_PER_SEC = 0.2f */ l_frame = extract_l( Mpy_32_32( st->input_Fs, 42949673 /* 0.2f in Q31 */ ) ); if ( EQ_16( st->core, TCX_10_CORE ) ) { l_frame = shr( l_frame, 1 ); } q_spectrum = L_norm_arr( st->hTcxEnc->spectrum_fx[n], l_frame ); Copy_Scale_sig32_16( st->hTcxEnc->spectrum_fx[n], spect_fx, l_frame, q_spectrum ); bw_detect_fx( st, NULL, spect_fx, NULL, NULL, MC_FORMAT /*just cannot be ISM_FORMAT*/, mct_on ); lshift = L_norm_arr( st->hTcxEnc->spectrum_fx[n], l_frame ); Copy_Scale_sig32_16( st->hTcxEnc->spectrum_fx[n], spect_fx, l_frame, lshift ); q_spectrum = sub( add( sub( Q31, st->hTcxEnc->spectrum_e[n] ), lshift ), 16 ); bw_detect_fx( st, NULL, spect_fx, NULL, NULL, MC_FORMAT /*just cannot be ISM_FORMAT*/, mct_on, q_spectrum ); test(); if ( EQ_16( nSubframes, NB_DIV ) && n == 0 ) Loading
lib_enc/pre_proc_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -298,7 +298,7 @@ void pre_proc_fx( move16(); } bw_detect_fx( st, signal_in, NULL, enerBuffer, sf_energySum, MONO_FORMAT, 0 ); bw_detect_fx( st, signal_in, NULL, enerBuffer, sf_energySum, MONO_FORMAT, 0, 0 ); /*----------------------------------------------------------------* * Noise energy down-ward update and total noise energy estimation Loading