Loading lib_enc/ivas_core_enc_fx.c +10 −5 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ ivas_error ivas_core_enc_fx( Word16 diff_nBits; ivas_error error; Word16 max_num_indices_BWE; Word16 i; Word16 i, shift, Q_min; set32_fx( new_swb_speech_buffer_fx, 0, L_FRAME48k + STEREO_DFT_OVL_MAX ); set16_fx( new_swb_speech_buffer_fx_16, 0, L_FRAME48k + STEREO_DFT_OVL_MAX ); Loading Loading @@ -531,11 +531,16 @@ ivas_error ivas_core_enc_fx( st->hTcxEnc->exp_buf_speech_ltp = st->exp_buf_speech_enc; move16(); } Scale_sig( st->input_fx, input_frame, sub( -1, st->q_inp ) ); Scale_sig( st->input_fx - input_frame, input_frame, sub( -1, st->q_old_inp ) ); st->q_inp = -1; shift = norm_arr( st->input_fx, input_frame ); Q_min = s_max( -2, add( st->q_inp, shift ) ); scale_sig( st->input_fx, input_frame, sub( Q_min, st->q_inp ) ); st->q_inp = Q_min; move16(); st->q_old_inp = -1; shift = norm_arr( st->input_fx - input_frame, input_frame ); Q_min = s_max( -2, add( st->q_old_inp, shift ) ); scale_sig( st->input_fx - input_frame, input_frame, sub( Q_min, st->q_old_inp ) ); st->q_old_inp = Q_min; move16(); } Loading lib_enc/ivas_core_pre_proc_front_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ ivas_error pre_proc_front_ivas_fx( Word16 Q_min = add( sub( 15, st->exp_old_inp_12k8 ), norm_arr( st->old_inp_12k8_fx, L_INP_MEM ) ); Word16 input_frame_full = shl( input_frame, 1 ); //(old frame input length + new frame input length) Q_min = s_min( Q_min, sub( add( getScaleFactor32( st->input32_fx - input_frame, input_frame_full ), st->q_inp32 ), 16 ) ); Q_min = s_max( -1, Q_min ); Q_min = s_max( -2, Q_min ); Copy_Scale_sig_32_16( st->input32_fx - input_frame, st->input_fx - input_frame, input_frame_full, sub( Q_min, st->q_inp32 ) ); // Q_min st->q_inp = Q_min; move16(); Loading Loading @@ -682,7 +682,7 @@ ivas_error pre_proc_front_ivas_fx( } 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( st->mem_preemph_DFT_fx_q_inp, sub( -1, st->q_inp ) ); /*Q(-1)*/ st->mem_preemph_DFT_fx = shl_sat( st->mem_preemph_DFT_fx_q_inp, sub( -1, st->q_inp ) ); /*Q(-1)*/ move16(); st->mem_preemph_q = st->q_inp; move16(); Loading Loading
lib_enc/ivas_core_enc_fx.c +10 −5 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ ivas_error ivas_core_enc_fx( Word16 diff_nBits; ivas_error error; Word16 max_num_indices_BWE; Word16 i; Word16 i, shift, Q_min; set32_fx( new_swb_speech_buffer_fx, 0, L_FRAME48k + STEREO_DFT_OVL_MAX ); set16_fx( new_swb_speech_buffer_fx_16, 0, L_FRAME48k + STEREO_DFT_OVL_MAX ); Loading Loading @@ -531,11 +531,16 @@ ivas_error ivas_core_enc_fx( st->hTcxEnc->exp_buf_speech_ltp = st->exp_buf_speech_enc; move16(); } Scale_sig( st->input_fx, input_frame, sub( -1, st->q_inp ) ); Scale_sig( st->input_fx - input_frame, input_frame, sub( -1, st->q_old_inp ) ); st->q_inp = -1; shift = norm_arr( st->input_fx, input_frame ); Q_min = s_max( -2, add( st->q_inp, shift ) ); scale_sig( st->input_fx, input_frame, sub( Q_min, st->q_inp ) ); st->q_inp = Q_min; move16(); st->q_old_inp = -1; shift = norm_arr( st->input_fx - input_frame, input_frame ); Q_min = s_max( -2, add( st->q_old_inp, shift ) ); scale_sig( st->input_fx - input_frame, input_frame, sub( Q_min, st->q_old_inp ) ); st->q_old_inp = Q_min; move16(); } Loading
lib_enc/ivas_core_pre_proc_front_fx.c +2 −2 Original line number Diff line number Diff line Loading @@ -232,7 +232,7 @@ ivas_error pre_proc_front_ivas_fx( Word16 Q_min = add( sub( 15, st->exp_old_inp_12k8 ), norm_arr( st->old_inp_12k8_fx, L_INP_MEM ) ); Word16 input_frame_full = shl( input_frame, 1 ); //(old frame input length + new frame input length) Q_min = s_min( Q_min, sub( add( getScaleFactor32( st->input32_fx - input_frame, input_frame_full ), st->q_inp32 ), 16 ) ); Q_min = s_max( -1, Q_min ); Q_min = s_max( -2, Q_min ); Copy_Scale_sig_32_16( st->input32_fx - input_frame, st->input_fx - input_frame, input_frame_full, sub( Q_min, st->q_inp32 ) ); // Q_min st->q_inp = Q_min; move16(); Loading Loading @@ -682,7 +682,7 @@ ivas_error pre_proc_front_ivas_fx( } 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( st->mem_preemph_DFT_fx_q_inp, sub( -1, st->q_inp ) ); /*Q(-1)*/ st->mem_preemph_DFT_fx = shl_sat( st->mem_preemph_DFT_fx_q_inp, sub( -1, st->q_inp ) ); /*Q(-1)*/ move16(); st->mem_preemph_q = st->q_inp; move16(); Loading