diff --git a/lib_com/modif_fs.c b/lib_com/modif_fs.c index 4df5f351db8888425669a365c1aea43c24b1de0d..9ca37f112583d22961a345c0c94fc8eeed99b578 100644 --- a/lib_com/modif_fs.c +++ b/lib_com/modif_fs.c @@ -774,7 +774,7 @@ void Decimate_allpass_steep_fx32( move32(); mem[2 * ALLPASSSECTIONS_STEEP - 1] = L_sub( temp[ALLPASSSECTIONS_STEEP - 2], Mpy_32_16_1( temp[ALLPASSSECTIONS_STEEP - 1], AP2_STEEP_FX[ALLPASSSECTIONS_STEEP - 1] ) ); - out[0] = L_add( out[0], Mpy_32_16_1( temp[ALLPASSSECTIONS_STEEP - 1], 16384 ) ); + out[0] = L_shr( L_add( out[0], temp[ALLPASSSECTIONS_STEEP - 1] ), 1 ); move32(); move32(); @@ -794,7 +794,7 @@ void Decimate_allpass_steep_fx32( { temp[n] = sign( temp[n] ) * 1e-12f; }*/ - mem[ALLPASSSECTIONS_STEEP + n] = L_sub( temp[n - 1], Mpy_32_16_1( temp[n], AP2_STEEP_FX[n - 1] ) ); + mem[ALLPASSSECTIONS_STEEP + n] = L_sub( temp[n - 1], Mpy_32_16_1( temp[n], AP2_STEEP_FX[n] ) ); move32(); } @@ -802,7 +802,7 @@ void Decimate_allpass_steep_fx32( move32(); mem[2 * ALLPASSSECTIONS_STEEP - 1] = L_sub( temp[ALLPASSSECTIONS_STEEP - 2], Mpy_32_16_1( temp[ALLPASSSECTIONS_STEEP - 1], AP2_STEEP_FX[ALLPASSSECTIONS_STEEP - 1] ) ); move32(); - out[k] = L_add( out[k], Mpy_32_16_1( temp[ALLPASSSECTIONS_STEEP - 1], 16384 ) ); + out[k] = L_shr( L_add( out[k], temp[ALLPASSSECTIONS_STEEP - 1] ), 1 ); move32(); } diff --git a/lib_dec/FEC_HQ_core.c b/lib_dec/FEC_HQ_core.c index 07f7d794e5994d84d6f9283a6e8150af21f17943..14aa62ef609fd81a8c214989c13ea8a3972ddb7b 100644 --- a/lib_dec/FEC_HQ_core.c +++ b/lib_dec/FEC_HQ_core.c @@ -1584,7 +1584,7 @@ void save_synthesis_hq_fec_fx( Copy( st->hTcxDec->synth_history_fx + output_frame, st->hTcxDec->synth_history_fx, add( sub( output_frame, post_hq_delay ), NS2SA_FX2( st->output_Fs, PH_ECU_MEM_NS ) ) ); FOR( Word16 i = 0; i < output_frame; i++ ) { - st->hTcxDec->old_synthFB_fx[sub( add( i, output_frame ), post_hq_delay )] = extract_h( output_fx[i] ); + st->hTcxDec->old_synthFB_fx[sub( add( i, output_frame ), post_hq_delay )] = extract_l( output_fx[i] ); move16(); } diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c index af36897c5cbf8c6d45f21b13de8d5c2a86abb080..3caaf7c860619bd67a9b8c616d2f37a79506f478 100644 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -1631,7 +1631,7 @@ ivas_error ivas_core_dec_fx( Scale_sig( st->delay_buf_out_fx, NS2SA_FX2( st->output_Fs, DELAY_CLDFB_NS ), exp_max ); Scale_sig( st->hHQ_core->old_out_fx + NS2SA_FX2( st->output_Fs, N_ZERO_MDCT_NS ), sub( NS2SA_FX2( st->output_Fs, PH_ECU_LOOKAHEAD_NS ), NS2SA_FX2( st->output_Fs, N_ZERO_MDCT_NS ) ), exp_max ); Scale_sig( st->prev_synth_buffer_fx, NS2SA_FX2( 48000, L_sub( DELAY_BWE_TOTAL_NS, DELAY_CLDFB_NS ) ), sub( exp_max, st->q_prev_synth_buffer_fx ) ); - Scale_sig( st->hTcxDec->synth_history_fx + output_frame, sub( add( sub( imult1616( 2, output_frame ), NS2SA_FX2( st->output_Fs, DELAY_CLDFB_NS ) ), NS2SA_FX2( st->output_Fs, PH_ECU_MEM_NS ) ), output_frame ), sub( exp_max, st->Q_syn ) ); + Scale_sig( st->hTcxDec->synth_history_fx + output_frame, sub( add( sub( imult1616( 2, output_frame ), NS2SA_FX2( st->output_Fs, DELAY_CLDFB_NS ) ), NS2SA_FX2( st->output_Fs, PH_ECU_MEM_NS ) ), output_frame ), sub( exp_max, 0 ) ); st->q_prev_synth_buffer_fx = sub( exp_max, st->q_prev_synth_buffer_fx ); } diff --git a/lib_rend/ivas_dirac_dec_binaural_functions.c b/lib_rend/ivas_dirac_dec_binaural_functions.c index e5d53b757149a412987c4e39517b874fb8784b2d..89c3fcc667bff416580b53a24979dfa73ebe276b 100644 --- a/lib_rend/ivas_dirac_dec_binaural_functions.c +++ b/lib_rend/ivas_dirac_dec_binaural_functions.c @@ -2774,8 +2774,8 @@ static void ivas_dirac_dec_binaural_formulate_input_and_target_covariance_matric move16(); diffusenessValForDecorrelationReduction_fx = L_max( 0, diffusenessValForDecorrelationReduction_fx ); // Q30 - diffEneValForDecorrelationReduction_fx = Mpy_32_32( diffusenessValForDecorrelationReduction_fx, meanEnePerCh_fx ); // Q(2q - 32) - q_diffEneValForDecorrelationReduction = sub( shl( q, 1 ), 32 ); + diffEneValForDecorrelationReduction_fx = Mpy_32_32( diffusenessValForDecorrelationReduction_fx, meanEnePerCh_fx ); // resulting Q = q_meanEnePerCh - 1 + q_diffEneValForDecorrelationReduction = sub( q_meanEnePerCh, 1 ); test(); IF( ( EQ_32( ivas_format, MC_FORMAT ) && EQ_32( mc_mode, MC_MODE_MCMASA ) ) )