Loading lib_enc/ivas_core_pre_proc_front_fx.c +21 −5 Original line number Diff line number Diff line Loading @@ -161,7 +161,9 @@ ivas_error pre_proc_front_ivas_fx( STEREO_CLASSIF_HANDLE hStereoClassif; Word16 old_pitch1; /* previous frame OL pitch[1] @12.8 kHz */ Word16 LR_localVAD; #ifndef FIX_2344_ALIGN_PREPROC ivas_error error; #endif Word16 *signal_in_fx; Word32 *signal32_in_fx; Word16 *inp_12k8_fx, *new_inp_12k8_fx; /* pointers to current frame and new data */ Loading Loading @@ -229,21 +231,30 @@ ivas_error pre_proc_front_ivas_fx( Word16 sf_energySum[CLDFB_NO_CHANNELS_MAX]; Word16 Q_inp_const = -1; move16(); #ifdef FIX_2344_ALIGN_PREPROC Word16 headroom, preemp_len, inp_max; #else Word16 headroom = 0, preemp_len = 0, inp_max = 0; move16(); move16(); move16(); #endif Word16 *preemp_start_idx = NULL; #ifdef FIX_2344_ALIGN_PREPROC Word32 sig_out[STEREO_DFT_OVL_16k + L_FRAME16k /* = max( L_FRAME16k + STEREO_DFT_OVL_16k, L_FRAME16k + L_FILT16k + lMemRecalc_16k ) */], max_32; #else Word32 sig_out[960], max_32; #endif push_wmops( "pre_proc_front" ); /*------------------------------------------------------------------* * Initialization *------------------------------------------------------------------*/ #ifndef FIX_2344_ALIGN_PREPROC error = IVAS_ERR_OK; move32(); #endif cldfbScale.lb_scale = Q31; cldfbScale.hb_scale = Q31; move16(); Loading Loading @@ -548,12 +559,17 @@ ivas_error pre_proc_front_ivas_fx( * Perform fixed preemphasis (12.8 kHz signal) through 1 - g*z^-1 *-----------------------------------------------------------------*/ #ifndef FIX_2344_ALIGN_PREPROC *Q_new = 0; move16(); set32_fx( sig_out, 0, 960 ); #endif headroom = 2; move16(); #ifdef FIX_2344_ALIGN_PREPROC preemp_len = 0; move16(); #endif st->mem_preemph_fx_q_inp = shl_sat( st->mem_preemph_fx_q_inp, sub( st->q_inp, st->mem_preemph_q ) ); /*st->q_inp*/ move16(); Loading Loading @@ -640,6 +656,7 @@ ivas_error pre_proc_front_ivas_fx( preemp_len = L_FRAME + L_FILT; move16(); } st->mem_preemph_fx = shl_sat( st->mem_preemph_fx_q_inp, sub( -1, st->q_inp ) ); /*Q(-1) saturation added as float value goes above 65536 for +10 dB test (ltv48_MC512.wav and ltv48_MC51.wav) */ move16(); st->mem_preemph_DFT_fx = shl_sat( st->mem_preemph_DFT_fx_q_inp, sub( -1, st->q_inp ) ); /*Q(-1)*/ Loading Loading @@ -1333,12 +1350,11 @@ ivas_error pre_proc_front_ivas_fx( * 1st stage speech/music classification (GMM model) *----------------------------------------------------------------*/ SP_MUS_CLAS_HANDLE hSpMusClas = st->hSpMusClas; shift = getScaleFactor32( PS_fx, 128 ); scale_sig32( PS_fx, 128, shift ); Qfact_PS = add( Qfact_PS, shift ); smc_dec = ivas_smc_gmm_fx( st, hStereoClassif, localVAD_HE_SAD, extract_h( Etot_fx ), lsp_new_fx, *cor_map_sum_fx /*Q8*/, epsP_fx, PS_fx, non_staX_fx, *relE_fx, &high_lpn_flag, flag_spitch, Qfact_PS, *epsP_fx_q, hSpMusClas->past_PS_Q ); /* Q0 */ smc_dec = ivas_smc_gmm_fx( st, hStereoClassif, localVAD_HE_SAD, extract_h( Etot_fx ), lsp_new_fx, *cor_map_sum_fx /*Q8*/, epsP_fx, PS_fx, non_staX_fx, *relE_fx, &high_lpn_flag, flag_spitch, Qfact_PS, *epsP_fx_q, st->hSpMusClas->past_PS_Q ); /* Q0 */ #ifdef DEBUGGING if ( st->idchan == 0 ) Loading Loading
lib_enc/ivas_core_pre_proc_front_fx.c +21 −5 Original line number Diff line number Diff line Loading @@ -161,7 +161,9 @@ ivas_error pre_proc_front_ivas_fx( STEREO_CLASSIF_HANDLE hStereoClassif; Word16 old_pitch1; /* previous frame OL pitch[1] @12.8 kHz */ Word16 LR_localVAD; #ifndef FIX_2344_ALIGN_PREPROC ivas_error error; #endif Word16 *signal_in_fx; Word32 *signal32_in_fx; Word16 *inp_12k8_fx, *new_inp_12k8_fx; /* pointers to current frame and new data */ Loading Loading @@ -229,21 +231,30 @@ ivas_error pre_proc_front_ivas_fx( Word16 sf_energySum[CLDFB_NO_CHANNELS_MAX]; Word16 Q_inp_const = -1; move16(); #ifdef FIX_2344_ALIGN_PREPROC Word16 headroom, preemp_len, inp_max; #else Word16 headroom = 0, preemp_len = 0, inp_max = 0; move16(); move16(); move16(); #endif Word16 *preemp_start_idx = NULL; #ifdef FIX_2344_ALIGN_PREPROC Word32 sig_out[STEREO_DFT_OVL_16k + L_FRAME16k /* = max( L_FRAME16k + STEREO_DFT_OVL_16k, L_FRAME16k + L_FILT16k + lMemRecalc_16k ) */], max_32; #else Word32 sig_out[960], max_32; #endif push_wmops( "pre_proc_front" ); /*------------------------------------------------------------------* * Initialization *------------------------------------------------------------------*/ #ifndef FIX_2344_ALIGN_PREPROC error = IVAS_ERR_OK; move32(); #endif cldfbScale.lb_scale = Q31; cldfbScale.hb_scale = Q31; move16(); Loading Loading @@ -548,12 +559,17 @@ ivas_error pre_proc_front_ivas_fx( * Perform fixed preemphasis (12.8 kHz signal) through 1 - g*z^-1 *-----------------------------------------------------------------*/ #ifndef FIX_2344_ALIGN_PREPROC *Q_new = 0; move16(); set32_fx( sig_out, 0, 960 ); #endif headroom = 2; move16(); #ifdef FIX_2344_ALIGN_PREPROC preemp_len = 0; move16(); #endif st->mem_preemph_fx_q_inp = shl_sat( st->mem_preemph_fx_q_inp, sub( st->q_inp, st->mem_preemph_q ) ); /*st->q_inp*/ move16(); Loading Loading @@ -640,6 +656,7 @@ ivas_error pre_proc_front_ivas_fx( preemp_len = L_FRAME + L_FILT; move16(); } st->mem_preemph_fx = shl_sat( st->mem_preemph_fx_q_inp, sub( -1, st->q_inp ) ); /*Q(-1) saturation added as float value goes above 65536 for +10 dB test (ltv48_MC512.wav and ltv48_MC51.wav) */ move16(); st->mem_preemph_DFT_fx = shl_sat( st->mem_preemph_DFT_fx_q_inp, sub( -1, st->q_inp ) ); /*Q(-1)*/ Loading Loading @@ -1333,12 +1350,11 @@ ivas_error pre_proc_front_ivas_fx( * 1st stage speech/music classification (GMM model) *----------------------------------------------------------------*/ SP_MUS_CLAS_HANDLE hSpMusClas = st->hSpMusClas; shift = getScaleFactor32( PS_fx, 128 ); scale_sig32( PS_fx, 128, shift ); Qfact_PS = add( Qfact_PS, shift ); smc_dec = ivas_smc_gmm_fx( st, hStereoClassif, localVAD_HE_SAD, extract_h( Etot_fx ), lsp_new_fx, *cor_map_sum_fx /*Q8*/, epsP_fx, PS_fx, non_staX_fx, *relE_fx, &high_lpn_flag, flag_spitch, Qfact_PS, *epsP_fx_q, hSpMusClas->past_PS_Q ); /* Q0 */ smc_dec = ivas_smc_gmm_fx( st, hStereoClassif, localVAD_HE_SAD, extract_h( Etot_fx ), lsp_new_fx, *cor_map_sum_fx /*Q8*/, epsP_fx, PS_fx, non_staX_fx, *relE_fx, &high_lpn_flag, flag_spitch, Qfact_PS, *epsP_fx_q, st->hSpMusClas->past_PS_Q ); /* Q0 */ #ifdef DEBUGGING if ( st->idchan == 0 ) Loading