Loading lib_enc/ivas_core_pre_proc_fx.c +19 −14 Original line number Diff line number Diff line Loading @@ -649,6 +649,7 @@ ivas_error pre_proc_ivas_fx( tmp = s_min( tmp, norm_arr( st->buf_speech_enc_pe + st->L_frame + L_FRAME, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k - st->L_frame - L_FRAME ) ); tmp = add( s_min( sub( *Q_new, 1 ), sub( Q15, st->exp_buf_speech_enc_pe ) ), tmp ); scale_sig( st->buf_speech_enc_pe, st->L_frame, sub( tmp, sub( Q15, st->exp_buf_speech_enc_pe ) ) ); scale_sig( st->buf_speech_enc_pe + st->L_frame + L_FRAME, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k - st->L_frame - L_FRAME, sub( tmp, sub( Q15, st->exp_buf_speech_enc_pe ) ) ); Copy_Scale_sig_nosat( new_inp_12k8_fx, st->buf_speech_enc_pe + st->L_frame, L_FRAME, sub( tmp, sub( *Q_new, 1 ) ) ); st->exp_buf_speech_enc_pe = sub( Q15, tmp ); #else Loading @@ -672,12 +673,20 @@ ivas_error pre_proc_ivas_fx( IF( st->tcxonly == 0 ) { Copy( wsp_fx, st->wspeech_enc, L_FRAME + L_LOOK_12k8 ); #ifdef NONBE_FIX_ISSUE_2206 tmp = norm_arr( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320 ); scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, tmp ); st->exp_buf_wspeech_enc = sub( e_old_wsp, tmp ); // L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320 ); tmp = norm_arr( wsp_fx, L_FRAME + L_LOOK_12k8 ); tmp = s_min( tmp, norm_arr( st->buf_wspeech_enc, st->wspeech_enc - st->buf_wspeech_enc ) ); tmp = s_min( tmp, norm_arr( st->wspeech_enc + L_FRAME + L_LOOK_12k8, /* L_NEXT_MAX_16k + */ 320 ) ); tmp = add( s_min( sub( Q15, e_old_wsp ), sub( Q15, st->exp_buf_wspeech_enc ) ), tmp ); //scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, tmp ); scale_sig( st->buf_wspeech_enc, st->wspeech_enc - st->buf_wspeech_enc , sub( tmp, sub( Q15, st->exp_buf_wspeech_enc ) ) ); scale_sig( st->wspeech_enc + L_FRAME + L_LOOK_12k8, /* L_NEXT_MAX_16k + */ 320, sub( tmp, sub( Q15, st->exp_buf_wspeech_enc ) ) ); Copy_Scale_sig_nosat( wsp_fx, st->wspeech_enc, L_FRAME + L_LOOK_12k8, sub( tmp, sub( Q15, e_old_wsp) ) ); st->exp_buf_wspeech_enc = sub( Q15, tmp ); move16(); #else Copy( wsp_fx, st->wspeech_enc, L_FRAME + L_LOOK_12k8 ); #endif } } Loading Loading @@ -1423,19 +1432,15 @@ ivas_error ivas_compute_core_buffers_fx( * Compute Weighted Input *---------------------------------------------------------------*/ #ifdef NONBE_FIX_ISSUE_2206_NO Scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, sub( Q_old_inp_16k, sub( Q15, st->exp_buf_wspeech_enc ) ) ); /* Q15 - Q_old_inp_16k */ st->mem_wsp_enc = shl( st->mem_wsp_enc, sub( Q_old_inp_16k, sub( Q15, st->exp_buf_wspeech_enc ) ) ); // Q_old_inp_16k move16(); st->exp_buf_wspeech_enc = sub( Q15, Q_old_inp_16k ); move16(); #endif ivas_find_wsp_fx( L_FRAME16k, L_SUBFR, NB_SUBFR16k, A_fx, Aw_fx, st->speech_enc_pe, PREEMPH_FAC_16k, st->wspeech_enc, &st->mem_wsp_enc, st->gamma, L_LOOK_16k ); #ifdef NONBE_FIX_ISSUE_2206 Word16 tmp; tmp = norm_arr( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320 ); scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, tmp ); //L_FRAME16k + L_LOOK_16k tmp = norm_arr( st->buf_wspeech_enc, st->wspeech_enc - st->buf_wspeech_enc ); tmp = s_min( tmp, norm_arr( st->wspeech_enc + L_FRAME16k + L_LOOK_16k, /* L_NEXT_MAX_16k + */ 320 ) ); //scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, tmp ); scale_sig( st->buf_wspeech_enc, st->wspeech_enc - st->buf_wspeech_enc , tmp ); scale_sig( st->wspeech_enc + L_FRAME16k + L_LOOK_16k, /* L_NEXT_MAX_16k + */ 320, tmp ); st->exp_buf_wspeech_enc = sub( st->exp_buf_speech_enc_pe, tmp ); move16(); #endif Loading lib_enc/ivas_tcx_core_enc_fx.c +13 −0 Original line number Diff line number Diff line Loading @@ -558,8 +558,15 @@ void stereo_tcx_core_enc( s = s_min( s, norm_arr( st->hLPDmem->syn, M ) ); IF( st->tcxonly == 0 ) { #ifdef NONBE_FIX_ISSUE_2206 // Is this a mixup with st->mem_wsp_enc ? s = s_min( s, add( norm_arr( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320 ), sub( sub( Q15, st->exp_buf_wspeech_enc ), Q_new ) ) ); Scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, sub( add( Q_new, s ), sub( Q15, st->exp_buf_wspeech_enc ) ) ); st->exp_buf_wspeech_enc = sub( Q15, add( Q_new, s ) ); #else s = s_min( s, norm_s( st->wspeech_enc[st->L_frame - 1] ) ); st->wspeech_enc[st->L_frame - 1] = shl( st->wspeech_enc[st->L_frame - 1], s ); #endif } Scale_sig( st->synth, st->L_frame, s ); /* st->Q_syn + s */ Scale_sig( st->hLPDmem->syn, M + 1, s ); /* st->Q_syn + s */ Loading Loading @@ -702,8 +709,14 @@ void stereo_tcx_core_enc( Scale_sig( st->synth, st->L_frame, -Q_new ); IF( st->tcxonly == 0 ) { #ifdef NONBE_FIX_ISSUE_2206 // Is this a mixup with st->mem_wsp_enc ? Scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, sub( 0, sub( Q15, st->exp_buf_wspeech_enc ) ) ); st->exp_buf_wspeech_enc = sub( Q15, 0 ); #else st->wspeech_enc[st->L_frame - 1] = shl( st->wspeech_enc[st->L_frame - 1], -st->Q_syn ); move16(); #endif } pop_wmops(); Loading Loading
lib_enc/ivas_core_pre_proc_fx.c +19 −14 Original line number Diff line number Diff line Loading @@ -649,6 +649,7 @@ ivas_error pre_proc_ivas_fx( tmp = s_min( tmp, norm_arr( st->buf_speech_enc_pe + st->L_frame + L_FRAME, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k - st->L_frame - L_FRAME ) ); tmp = add( s_min( sub( *Q_new, 1 ), sub( Q15, st->exp_buf_speech_enc_pe ) ), tmp ); scale_sig( st->buf_speech_enc_pe, st->L_frame, sub( tmp, sub( Q15, st->exp_buf_speech_enc_pe ) ) ); scale_sig( st->buf_speech_enc_pe + st->L_frame + L_FRAME, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k - st->L_frame - L_FRAME, sub( tmp, sub( Q15, st->exp_buf_speech_enc_pe ) ) ); Copy_Scale_sig_nosat( new_inp_12k8_fx, st->buf_speech_enc_pe + st->L_frame, L_FRAME, sub( tmp, sub( *Q_new, 1 ) ) ); st->exp_buf_speech_enc_pe = sub( Q15, tmp ); #else Loading @@ -672,12 +673,20 @@ ivas_error pre_proc_ivas_fx( IF( st->tcxonly == 0 ) { Copy( wsp_fx, st->wspeech_enc, L_FRAME + L_LOOK_12k8 ); #ifdef NONBE_FIX_ISSUE_2206 tmp = norm_arr( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320 ); scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, tmp ); st->exp_buf_wspeech_enc = sub( e_old_wsp, tmp ); // L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320 ); tmp = norm_arr( wsp_fx, L_FRAME + L_LOOK_12k8 ); tmp = s_min( tmp, norm_arr( st->buf_wspeech_enc, st->wspeech_enc - st->buf_wspeech_enc ) ); tmp = s_min( tmp, norm_arr( st->wspeech_enc + L_FRAME + L_LOOK_12k8, /* L_NEXT_MAX_16k + */ 320 ) ); tmp = add( s_min( sub( Q15, e_old_wsp ), sub( Q15, st->exp_buf_wspeech_enc ) ), tmp ); //scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, tmp ); scale_sig( st->buf_wspeech_enc, st->wspeech_enc - st->buf_wspeech_enc , sub( tmp, sub( Q15, st->exp_buf_wspeech_enc ) ) ); scale_sig( st->wspeech_enc + L_FRAME + L_LOOK_12k8, /* L_NEXT_MAX_16k + */ 320, sub( tmp, sub( Q15, st->exp_buf_wspeech_enc ) ) ); Copy_Scale_sig_nosat( wsp_fx, st->wspeech_enc, L_FRAME + L_LOOK_12k8, sub( tmp, sub( Q15, e_old_wsp) ) ); st->exp_buf_wspeech_enc = sub( Q15, tmp ); move16(); #else Copy( wsp_fx, st->wspeech_enc, L_FRAME + L_LOOK_12k8 ); #endif } } Loading Loading @@ -1423,19 +1432,15 @@ ivas_error ivas_compute_core_buffers_fx( * Compute Weighted Input *---------------------------------------------------------------*/ #ifdef NONBE_FIX_ISSUE_2206_NO Scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, sub( Q_old_inp_16k, sub( Q15, st->exp_buf_wspeech_enc ) ) ); /* Q15 - Q_old_inp_16k */ st->mem_wsp_enc = shl( st->mem_wsp_enc, sub( Q_old_inp_16k, sub( Q15, st->exp_buf_wspeech_enc ) ) ); // Q_old_inp_16k move16(); st->exp_buf_wspeech_enc = sub( Q15, Q_old_inp_16k ); move16(); #endif ivas_find_wsp_fx( L_FRAME16k, L_SUBFR, NB_SUBFR16k, A_fx, Aw_fx, st->speech_enc_pe, PREEMPH_FAC_16k, st->wspeech_enc, &st->mem_wsp_enc, st->gamma, L_LOOK_16k ); #ifdef NONBE_FIX_ISSUE_2206 Word16 tmp; tmp = norm_arr( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320 ); scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, tmp ); //L_FRAME16k + L_LOOK_16k tmp = norm_arr( st->buf_wspeech_enc, st->wspeech_enc - st->buf_wspeech_enc ); tmp = s_min( tmp, norm_arr( st->wspeech_enc + L_FRAME16k + L_LOOK_16k, /* L_NEXT_MAX_16k + */ 320 ) ); //scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, tmp ); scale_sig( st->buf_wspeech_enc, st->wspeech_enc - st->buf_wspeech_enc , tmp ); scale_sig( st->wspeech_enc + L_FRAME16k + L_LOOK_16k, /* L_NEXT_MAX_16k + */ 320, tmp ); st->exp_buf_wspeech_enc = sub( st->exp_buf_speech_enc_pe, tmp ); move16(); #endif Loading
lib_enc/ivas_tcx_core_enc_fx.c +13 −0 Original line number Diff line number Diff line Loading @@ -558,8 +558,15 @@ void stereo_tcx_core_enc( s = s_min( s, norm_arr( st->hLPDmem->syn, M ) ); IF( st->tcxonly == 0 ) { #ifdef NONBE_FIX_ISSUE_2206 // Is this a mixup with st->mem_wsp_enc ? s = s_min( s, add( norm_arr( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320 ), sub( sub( Q15, st->exp_buf_wspeech_enc ), Q_new ) ) ); Scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, sub( add( Q_new, s ), sub( Q15, st->exp_buf_wspeech_enc ) ) ); st->exp_buf_wspeech_enc = sub( Q15, add( Q_new, s ) ); #else s = s_min( s, norm_s( st->wspeech_enc[st->L_frame - 1] ) ); st->wspeech_enc[st->L_frame - 1] = shl( st->wspeech_enc[st->L_frame - 1], s ); #endif } Scale_sig( st->synth, st->L_frame, s ); /* st->Q_syn + s */ Scale_sig( st->hLPDmem->syn, M + 1, s ); /* st->Q_syn + s */ Loading Loading @@ -702,8 +709,14 @@ void stereo_tcx_core_enc( Scale_sig( st->synth, st->L_frame, -Q_new ); IF( st->tcxonly == 0 ) { #ifdef NONBE_FIX_ISSUE_2206 // Is this a mixup with st->mem_wsp_enc ? Scale_sig( st->buf_wspeech_enc, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k + 320, sub( 0, sub( Q15, st->exp_buf_wspeech_enc ) ) ); st->exp_buf_wspeech_enc = sub( Q15, 0 ); #else st->wspeech_enc[st->L_frame - 1] = shl( st->wspeech_enc[st->L_frame - 1], -st->Q_syn ); move16(); #endif } pop_wmops(); Loading