Loading lib_com/cng_exc_fx.c +2 −1 Original line number Diff line number Diff line Loading @@ -846,7 +846,8 @@ void cng_params_postupd_ivas_fx( #endif /* BASOP_NOGLOB */ L_tmp = Mult_32_16( L_tmp, 128 ); /* 2*Q_exc+1 */ tmp = add( add( Q_exc, Q_exc ), 1 ); sp[i] = L_shr( L_tmp, sub( tmp, 6 ) ); // To do : Saturation to be re-validated. sp[i] = L_shr_sat( L_tmp, sub( tmp, 6 ) ); move32(); /* Q6 */ ptR++; Loading lib_com/ivas_tools.c +4 −3 Original line number Diff line number Diff line Loading @@ -1735,7 +1735,8 @@ Word16 matrix_product_fx( { x_idx = add( i, imult1616( k, rowsX ) ); /*Q0*/ y_idx = add( k, imult1616( j, rowsY ) ); /*Q0*/ ( *Zp_fx ) = L_add( *Zp_fx, Mpy_32_32( X_fx[x_idx], Y_fx[y_idx] ) ); /*Qx + Qy - 31*/ ( *Zp_fx ) = L_add_sat( *Zp_fx, Mpy_32_32( X_fx[x_idx], Y_fx[y_idx] ) ); /*Qx + Qy - 31*/ // TODO: overflow of Z_fx to be checked move32(); } Zp_fx++; Loading lib_enc/analy_sp_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -631,7 +631,7 @@ void ivas_analy_sp_fx_front( move16(); } Scale_fac[i_subfr] = -1; Scale_fac[i_subfr] = -2; move16(); Scale_sig( pt_fft, L_FFT, Scale_fac[i_subfr] ); Loading Loading @@ -705,7 +705,7 @@ void ivas_analy_sp_fx_front( { if ( EspecdB != NULL ) { temp32_log = L_add( BASOP_Util_Log2( Ltmp ), L_shl( sub( Q31, Q_new + QSCALE - 2 - 1 ), Q25 ) ); temp32_log = L_add( BASOP_Util_Log2( Ltmp ), L_shl( sub( Q31, Q_new + QSCALE - 2 ), Q25 ) ); EspecdB[i] = extract_l( L_shr( Mpy_32_32( temp32_log, 1860652798 ), Q22 - Q7 ) ); /*log(x) = log2(x)*logf(2)*/ /* 10.0*log((float)tmp) */ /* 10.0*logf(2) in Q28 = 1860652798 */ Loading Loading @@ -1118,7 +1118,7 @@ static void ivas_find_enr1( move32(); FOR( i = min_band; i <= max_band; i++ ) { etot = L_add( etot, L_shr( band[i], Q1 ) ); // Q_new + QSCALE - 1 etot = L_add_sat( etot, L_shr( band[i], Q1 ) ); // Q_new + QSCALE - 1 } *LEtot = etot; move32(); Loading lib_enc/core_enc_init.c +52 −184 File changed.Preview size limit exceeded, changes collapsed. Show changes lib_enc/core_enc_init_fx.c +4 −2 Original line number Diff line number Diff line Loading @@ -465,6 +465,8 @@ void init_sig_buffers_fx( Encoder_State *st, const Word16 L_frame_old, const Wor set16_fx( st->buf_speech_enc_pe, 0, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k ); set16_fx( hTcxEnc->buf_speech_ltp, 0, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k ); set16_fx( st->buf_wspeech_enc, 0, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k ); st->exp_buf_wspeech_enc = 0; move16(); } ELSE { Loading Loading @@ -499,7 +501,7 @@ void init_sig_buffers_fx( Encoder_State *st, const Word16 L_frame_old, const Wor st->mem_preemph_enc = st->buf_speech_enc[st->encoderPastSamples_enc + st->encoderLookahead_enc - 1]; move16(); st->mem_wsp_enc = st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1]; st->mem_wsp_enc = shr( st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1], sub( Q16, st->exp_buf_wspeech_enc ) ); // Q-1 move16(); } /*coming from TCXonly modes*/ Loading @@ -515,7 +517,7 @@ void init_sig_buffers_fx( Encoder_State *st, const Word16 L_frame_old, const Wor } hLPDmem->mem_w0 = 0; move16(); st->mem_wsp_enc = st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1]; st->mem_wsp_enc = shr( st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1], sub( Q16, st->exp_buf_wspeech_enc ) ); // Q-1 move16(); } } Loading Loading
lib_com/cng_exc_fx.c +2 −1 Original line number Diff line number Diff line Loading @@ -846,7 +846,8 @@ void cng_params_postupd_ivas_fx( #endif /* BASOP_NOGLOB */ L_tmp = Mult_32_16( L_tmp, 128 ); /* 2*Q_exc+1 */ tmp = add( add( Q_exc, Q_exc ), 1 ); sp[i] = L_shr( L_tmp, sub( tmp, 6 ) ); // To do : Saturation to be re-validated. sp[i] = L_shr_sat( L_tmp, sub( tmp, 6 ) ); move32(); /* Q6 */ ptR++; Loading
lib_com/ivas_tools.c +4 −3 Original line number Diff line number Diff line Loading @@ -1735,7 +1735,8 @@ Word16 matrix_product_fx( { x_idx = add( i, imult1616( k, rowsX ) ); /*Q0*/ y_idx = add( k, imult1616( j, rowsY ) ); /*Q0*/ ( *Zp_fx ) = L_add( *Zp_fx, Mpy_32_32( X_fx[x_idx], Y_fx[y_idx] ) ); /*Qx + Qy - 31*/ ( *Zp_fx ) = L_add_sat( *Zp_fx, Mpy_32_32( X_fx[x_idx], Y_fx[y_idx] ) ); /*Qx + Qy - 31*/ // TODO: overflow of Z_fx to be checked move32(); } Zp_fx++; Loading
lib_enc/analy_sp_fx.c +3 −3 Original line number Diff line number Diff line Loading @@ -631,7 +631,7 @@ void ivas_analy_sp_fx_front( move16(); } Scale_fac[i_subfr] = -1; Scale_fac[i_subfr] = -2; move16(); Scale_sig( pt_fft, L_FFT, Scale_fac[i_subfr] ); Loading Loading @@ -705,7 +705,7 @@ void ivas_analy_sp_fx_front( { if ( EspecdB != NULL ) { temp32_log = L_add( BASOP_Util_Log2( Ltmp ), L_shl( sub( Q31, Q_new + QSCALE - 2 - 1 ), Q25 ) ); temp32_log = L_add( BASOP_Util_Log2( Ltmp ), L_shl( sub( Q31, Q_new + QSCALE - 2 ), Q25 ) ); EspecdB[i] = extract_l( L_shr( Mpy_32_32( temp32_log, 1860652798 ), Q22 - Q7 ) ); /*log(x) = log2(x)*logf(2)*/ /* 10.0*log((float)tmp) */ /* 10.0*logf(2) in Q28 = 1860652798 */ Loading Loading @@ -1118,7 +1118,7 @@ static void ivas_find_enr1( move32(); FOR( i = min_band; i <= max_band; i++ ) { etot = L_add( etot, L_shr( band[i], Q1 ) ); // Q_new + QSCALE - 1 etot = L_add_sat( etot, L_shr( band[i], Q1 ) ); // Q_new + QSCALE - 1 } *LEtot = etot; move32(); Loading
lib_enc/core_enc_init.c +52 −184 File changed.Preview size limit exceeded, changes collapsed. Show changes
lib_enc/core_enc_init_fx.c +4 −2 Original line number Diff line number Diff line Loading @@ -465,6 +465,8 @@ void init_sig_buffers_fx( Encoder_State *st, const Word16 L_frame_old, const Wor set16_fx( st->buf_speech_enc_pe, 0, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k ); set16_fx( hTcxEnc->buf_speech_ltp, 0, L_PAST_MAX_32k + L_FRAME32k + L_NEXT_MAX_32k ); set16_fx( st->buf_wspeech_enc, 0, L_FRAME16k + L_SUBFR + L_FRAME16k + L_NEXT_MAX_16k ); st->exp_buf_wspeech_enc = 0; move16(); } ELSE { Loading Loading @@ -499,7 +501,7 @@ void init_sig_buffers_fx( Encoder_State *st, const Word16 L_frame_old, const Wor st->mem_preemph_enc = st->buf_speech_enc[st->encoderPastSamples_enc + st->encoderLookahead_enc - 1]; move16(); st->mem_wsp_enc = st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1]; st->mem_wsp_enc = shr( st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1], sub( Q16, st->exp_buf_wspeech_enc ) ); // Q-1 move16(); } /*coming from TCXonly modes*/ Loading @@ -515,7 +517,7 @@ void init_sig_buffers_fx( Encoder_State *st, const Word16 L_frame_old, const Wor } hLPDmem->mem_w0 = 0; move16(); st->mem_wsp_enc = st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1]; st->mem_wsp_enc = shr( st->buf_wspeech_enc[st->L_frame + L_SUBFR - 1], sub( Q16, st->exp_buf_wspeech_enc ) ); // Q-1 move16(); } } Loading