Loading lib_com/prot_fx.h +9 −0 Original line number Diff line number Diff line Loading @@ -9648,6 +9648,15 @@ void Copy_Scale_sig( const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); #ifdef NONBE_FIX_ISSUE_2206 void Copy_Scale_sig_nosat( const Word16 x[], /* i : signal to scale i Qx */ Word16 y[], /* o : scaled signal output Qx */ const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); #endif void Scale_sig32( Word32 x[], /* i/o: signal to scale Qx */ const Word16 lg, /* i : size of x[] Q0 */ Loading lib_com/tools_fx.c +45 −0 Original line number Diff line number Diff line Loading @@ -1304,6 +1304,51 @@ void Copy_Scale_sig( return; } #ifdef NONBE_FIX_ISSUE_2206 /*-------------------------------------------------------------------* * Copy_Scale_sig * * Up/down scale a 16 bits vector x and move it into y *-------------------------------------------------------------------*/ void Copy_Scale_sig_nosat( const Word16 x[], /* i : signal to scale input Qx */ Word16 y[], /* o : scaled signal output Qx */ const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ) { Word16 i; Word16 tmp; IF( exp0 == 0 ) { FOR( i = 0; i < lg; i++ ) { y[i] = x[i]; move16(); } return; } IF( exp0 < 0 ) { tmp = shl( -32768, exp0 ); /* we use negative to correctly represent 1.0 */ FOR( i = 0; i < lg; i++ ) { y[i] = msu_r( 0, x[i], tmp ); move16(); } return; } FOR( i = 0; i < lg; i++ ) { y[i] = shl( x[i], exp0 ); move16(); /* saturation can occur here */ } return; } #endif /*-------------------------------------------------------------------* * Copy_Scale_sig Loading lib_enc/ext_sig_ana_fx.c +2 −0 Original line number Diff line number Diff line Loading @@ -611,9 +611,11 @@ void core_signal_analysis_high_bitrate_ivas_fx( move16(); IF( Q_exp != 0 ) { #ifndef NONBE_FIX_ISSUE_2206 Scale_sig( st->buf_speech_enc_pe, st->encoderPastSamples_enc + st->encoderLookahead_enc, sub( Q_exp, sub( Q15, st->exp_buf_speech_enc_pe ) ) ); // *Q_new st->exp_buf_speech_enc_pe = sub( Q15, Q_exp ); move16(); #endif Scale_sig( &( st->mem_wsp_enc ), 1, Q_exp ); // *Q_new } Loading lib_enc/init_enc_fx.c +3 −0 Original line number Diff line number Diff line Loading @@ -389,6 +389,9 @@ ivas_error init_encoder_fx( st->Bin_E_old_fx = st->hSignalBuf->Bin_E_old_fx; st->mem_decim_fx = st->hSignalBuf->mem_decim_fx; st->mem_decim16k_fx = st->hSignalBuf->mem_decim16k_fx; #ifdef NONBE_FIX_ISSUE_2206 st->q_mem_decim16k_fx = Q15; #endif st->old_inp_12k8_fx = st->hSignalBuf->old_inp_12k8_fx; st->old_inp_16k_fx = st->hSignalBuf->old_inp_16k_fx; st->buf_speech_enc_pe = st->hSignalBuf->buf_speech_enc_pe; Loading lib_enc/ivas_core_enc_fx.c +1 −0 Original line number Diff line number Diff line Loading @@ -829,6 +829,7 @@ ivas_error ivas_core_enc_fx( } Scale_sig( old_syn_12k8_16k_fx[n], L_FRAME16k, sub( Q1, Q_new[n] ) ); // Q0 /*---------------------------------------------------------------------* * SWB DTX/CNG encoding *---------------------------------------------------------------------*/ Loading Loading
lib_com/prot_fx.h +9 −0 Original line number Diff line number Diff line Loading @@ -9648,6 +9648,15 @@ void Copy_Scale_sig( const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); #ifdef NONBE_FIX_ISSUE_2206 void Copy_Scale_sig_nosat( const Word16 x[], /* i : signal to scale i Qx */ Word16 y[], /* o : scaled signal output Qx */ const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ); #endif void Scale_sig32( Word32 x[], /* i/o: signal to scale Qx */ const Word16 lg, /* i : size of x[] Q0 */ Loading
lib_com/tools_fx.c +45 −0 Original line number Diff line number Diff line Loading @@ -1304,6 +1304,51 @@ void Copy_Scale_sig( return; } #ifdef NONBE_FIX_ISSUE_2206 /*-------------------------------------------------------------------* * Copy_Scale_sig * * Up/down scale a 16 bits vector x and move it into y *-------------------------------------------------------------------*/ void Copy_Scale_sig_nosat( const Word16 x[], /* i : signal to scale input Qx */ Word16 y[], /* o : scaled signal output Qx */ const Word16 lg, /* i : size of x[] Q0 */ const Word16 exp0 /* i : exponent: x = round(x << exp) Qx ?exp */ ) { Word16 i; Word16 tmp; IF( exp0 == 0 ) { FOR( i = 0; i < lg; i++ ) { y[i] = x[i]; move16(); } return; } IF( exp0 < 0 ) { tmp = shl( -32768, exp0 ); /* we use negative to correctly represent 1.0 */ FOR( i = 0; i < lg; i++ ) { y[i] = msu_r( 0, x[i], tmp ); move16(); } return; } FOR( i = 0; i < lg; i++ ) { y[i] = shl( x[i], exp0 ); move16(); /* saturation can occur here */ } return; } #endif /*-------------------------------------------------------------------* * Copy_Scale_sig Loading
lib_enc/ext_sig_ana_fx.c +2 −0 Original line number Diff line number Diff line Loading @@ -611,9 +611,11 @@ void core_signal_analysis_high_bitrate_ivas_fx( move16(); IF( Q_exp != 0 ) { #ifndef NONBE_FIX_ISSUE_2206 Scale_sig( st->buf_speech_enc_pe, st->encoderPastSamples_enc + st->encoderLookahead_enc, sub( Q_exp, sub( Q15, st->exp_buf_speech_enc_pe ) ) ); // *Q_new st->exp_buf_speech_enc_pe = sub( Q15, Q_exp ); move16(); #endif Scale_sig( &( st->mem_wsp_enc ), 1, Q_exp ); // *Q_new } Loading
lib_enc/init_enc_fx.c +3 −0 Original line number Diff line number Diff line Loading @@ -389,6 +389,9 @@ ivas_error init_encoder_fx( st->Bin_E_old_fx = st->hSignalBuf->Bin_E_old_fx; st->mem_decim_fx = st->hSignalBuf->mem_decim_fx; st->mem_decim16k_fx = st->hSignalBuf->mem_decim16k_fx; #ifdef NONBE_FIX_ISSUE_2206 st->q_mem_decim16k_fx = Q15; #endif st->old_inp_12k8_fx = st->hSignalBuf->old_inp_12k8_fx; st->old_inp_16k_fx = st->hSignalBuf->old_inp_16k_fx; st->buf_speech_enc_pe = st->hSignalBuf->buf_speech_enc_pe; Loading
lib_enc/ivas_core_enc_fx.c +1 −0 Original line number Diff line number Diff line Loading @@ -829,6 +829,7 @@ ivas_error ivas_core_enc_fx( } Scale_sig( old_syn_12k8_16k_fx[n], L_FRAME16k, sub( Q1, Q_new[n] ) ); // Q0 /*---------------------------------------------------------------------* * SWB DTX/CNG encoding *---------------------------------------------------------------------*/ Loading