Loading lib_enc/ivas_core_enc_fx.c +10 −6 Original line number Diff line number Diff line Loading @@ -698,15 +698,19 @@ ivas_error ivas_core_enc_fx( #ifdef NONBE_FIX_ISSUE_2206 IF( GE_32( input_Fs, 32000 ) && st->hBWE_TD != NULL ) { /* provide 2 bits of headroom. A better solution is to deal with the scale of hBWE_FD->old_fdbwe_speech_fx and other vectors which are fixed to Q-1 */ st->q_inp = sub( st->q_inp, 2 ); st->q_old_inp = sub( st->q_old_inp, 2 ); Word16 tmp; assert( st->q_inp == st->q_old_inp ); /* Adjust scale for swb_pre_proc_fx() */ tmp = s_min( add( -1, norm_arr( st->hBWE_FD->old_fdbwe_speech_fx, L_FRAME48k ) ), st->q_inp ); tmp = s_min( tmp, norm_arr( st->hBWE_TD->dec_2_over_3_mem_lp_fx, 6 ) ); tmp = s_min( tmp, norm_arr( st->hBWE_TD->dec_2_over_3_mem_fx, L_FILT_2OVER3 ) ); tmp = sub( tmp, 1 ); /* One bit headroom for possible rounding or decimation overshoot. */ st->q_old_inp = add( st->q_old_inp, sub( tmp, st->q_inp ) ); move16(); scale_sig( st->input_fx - input_frame, shl( input_frame, 1 ), sub( tmp, st->q_inp ) ); st->q_inp = tmp; move16(); Scale_sig( st->input_fx - input_frame, shl( input_frame, 1 ), -2 ); } #else Word16 q_inp_orig; q_inp_orig = st->q_inp; Loading Loading
lib_enc/ivas_core_enc_fx.c +10 −6 Original line number Diff line number Diff line Loading @@ -698,15 +698,19 @@ ivas_error ivas_core_enc_fx( #ifdef NONBE_FIX_ISSUE_2206 IF( GE_32( input_Fs, 32000 ) && st->hBWE_TD != NULL ) { /* provide 2 bits of headroom. A better solution is to deal with the scale of hBWE_FD->old_fdbwe_speech_fx and other vectors which are fixed to Q-1 */ st->q_inp = sub( st->q_inp, 2 ); st->q_old_inp = sub( st->q_old_inp, 2 ); Word16 tmp; assert( st->q_inp == st->q_old_inp ); /* Adjust scale for swb_pre_proc_fx() */ tmp = s_min( add( -1, norm_arr( st->hBWE_FD->old_fdbwe_speech_fx, L_FRAME48k ) ), st->q_inp ); tmp = s_min( tmp, norm_arr( st->hBWE_TD->dec_2_over_3_mem_lp_fx, 6 ) ); tmp = s_min( tmp, norm_arr( st->hBWE_TD->dec_2_over_3_mem_fx, L_FILT_2OVER3 ) ); tmp = sub( tmp, 1 ); /* One bit headroom for possible rounding or decimation overshoot. */ st->q_old_inp = add( st->q_old_inp, sub( tmp, st->q_inp ) ); move16(); scale_sig( st->input_fx - input_frame, shl( input_frame, 1 ), sub( tmp, st->q_inp ) ); st->q_inp = tmp; move16(); Scale_sig( st->input_fx - input_frame, shl( input_frame, 1 ), -2 ); } #else Word16 q_inp_orig; q_inp_orig = st->q_inp; Loading