Loading lib_enc/ivas_core_pre_proc_front_fx.c +17 −15 Original line number Diff line number Diff line Loading @@ -756,6 +756,21 @@ void pre_proc_front_ivas_fx( { shift = s_min( shift, add( st->q_mem_decim_fx, 1 ) ); } /* Avoid saturation of resampling decimation buffer inside ivas_compute_core_buffers_fx(). */ shift = s_min( shift, add( st->q_mem_decim16k_fx, 2 ) ); /* Add one bit headroom for filter overshoot in modify_Fs_fx() */ shift = add( shift, 1 ); /* Limit Q_new here to st->q_inp because inside ivas_compute_core_buffers_fx() st->input is rescaled to Q_new */ shift = s_min( shift, st->q_inp ); IF( st->hLPDmem != NULL ) { shift = s_min( shift, add( st->hLPDmem->q_lpd_old_exc, 2 ) ); shift = s_min( shift, add( st->hLPDmem->q_lpd_syn, 1 ) ); } *Q_new = s_min( shift, Q_MAX ); move16(); #else Loading Loading @@ -796,20 +811,7 @@ void pre_proc_front_ivas_fx( #endif #endif #ifdef NONBE_FIX_ISSUE_2518 if ( flag_16k_smc ) { /* Avoid saturation of resampling decimation buffer inside ivas_compute_core_buffers_fx(). */ *Q_new = s_min( *Q_new, add( st->q_mem_decim16k_fx, 1 ) ); } /* Limit Q_new here to st->q_inp because inside ivas_compute_core_buffers_fx() st->input is rescaled to Q_new */ *Q_new = s_min( *Q_new, st->q_inp ); IF( st->hLPDmem != NULL ) { *Q_new = s_min( *Q_new, add( st->hLPDmem->q_lpd_old_exc, 2 ) ); *Q_new = s_min( *Q_new, add( st->hLPDmem->q_lpd_syn, 1 ) ); } #else #ifndef NONBE_FIX_ISSUE_2518 #ifdef NONBE_FIX_ISSUE_2206 /* Avoid saturation of resampling decimation buffer inside ivas_compute_core_buffers_fx(). */ *Q_new = s_min( *Q_new, st->q_mem_decim16k_fx ); Loading @@ -817,8 +819,8 @@ void pre_proc_front_ivas_fx( *Q_new = s_min( *Q_new, st->q_inp ); #endif *Q_new = add( *Q_new, Q_inp_const ); #endif move16(); #endif Copy_Scale_sig32_16( sig_out, preemp_start_idx, preemp_len, sub( add( *Q_new, 1 ), st->q_inp ) ); /* Q_new */ Scale_sig( old_inp_12k8_fx, (Word16) ( preemp_start_idx - old_inp_12k8_fx ), sub( *Q_new, st->q_inp ) ); /* Q_new */ #ifdef NONBE_FIX_ISSUE_2206 Loading Loading
lib_enc/ivas_core_pre_proc_front_fx.c +17 −15 Original line number Diff line number Diff line Loading @@ -756,6 +756,21 @@ void pre_proc_front_ivas_fx( { shift = s_min( shift, add( st->q_mem_decim_fx, 1 ) ); } /* Avoid saturation of resampling decimation buffer inside ivas_compute_core_buffers_fx(). */ shift = s_min( shift, add( st->q_mem_decim16k_fx, 2 ) ); /* Add one bit headroom for filter overshoot in modify_Fs_fx() */ shift = add( shift, 1 ); /* Limit Q_new here to st->q_inp because inside ivas_compute_core_buffers_fx() st->input is rescaled to Q_new */ shift = s_min( shift, st->q_inp ); IF( st->hLPDmem != NULL ) { shift = s_min( shift, add( st->hLPDmem->q_lpd_old_exc, 2 ) ); shift = s_min( shift, add( st->hLPDmem->q_lpd_syn, 1 ) ); } *Q_new = s_min( shift, Q_MAX ); move16(); #else Loading Loading @@ -796,20 +811,7 @@ void pre_proc_front_ivas_fx( #endif #endif #ifdef NONBE_FIX_ISSUE_2518 if ( flag_16k_smc ) { /* Avoid saturation of resampling decimation buffer inside ivas_compute_core_buffers_fx(). */ *Q_new = s_min( *Q_new, add( st->q_mem_decim16k_fx, 1 ) ); } /* Limit Q_new here to st->q_inp because inside ivas_compute_core_buffers_fx() st->input is rescaled to Q_new */ *Q_new = s_min( *Q_new, st->q_inp ); IF( st->hLPDmem != NULL ) { *Q_new = s_min( *Q_new, add( st->hLPDmem->q_lpd_old_exc, 2 ) ); *Q_new = s_min( *Q_new, add( st->hLPDmem->q_lpd_syn, 1 ) ); } #else #ifndef NONBE_FIX_ISSUE_2518 #ifdef NONBE_FIX_ISSUE_2206 /* Avoid saturation of resampling decimation buffer inside ivas_compute_core_buffers_fx(). */ *Q_new = s_min( *Q_new, st->q_mem_decim16k_fx ); Loading @@ -817,8 +819,8 @@ void pre_proc_front_ivas_fx( *Q_new = s_min( *Q_new, st->q_inp ); #endif *Q_new = add( *Q_new, Q_inp_const ); #endif move16(); #endif Copy_Scale_sig32_16( sig_out, preemp_start_idx, preemp_len, sub( add( *Q_new, 1 ), st->q_inp ) ); /* Q_new */ Scale_sig( old_inp_12k8_fx, (Word16) ( preemp_start_idx - old_inp_12k8_fx ), sub( *Q_new, st->q_inp ) ); /* Q_new */ #ifdef NONBE_FIX_ISSUE_2206 Loading