Loading lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,7 @@ #define NONBE_FIX_2493_CHECK_EXTRACT_L_swb_pre_proc_fx /* FhG: Fix extract_l overflow inside swb_pre_proc_fx() */ #define NONBE_FIX_2493_EXTRACT_L_spectral_balancer_fx16 /* FhG: Fix extract_l overflow inside spectral_balancer_fx16() */ #define NONBE_FIX_2493_EXTRACT_L_IGF_CalculateStereoEnvelope_fx /* FhG: Fix extract_l overflow inside IGF_CalculateStereoEnvelope_fx() */ #define NONBE_FIX_2493_CHECK_EXTRACT_L_GetTCXMaxenergyChange_fx /* FhG: Fix extract_l overflow inside GetTCXMaxenergyChange_fx() */ #define FIX_2584_TD_SM_ISSUE /* VA: Fix inconsistencies in the SM part of the TD stereo */ #define FIX_2556_ALIGN_CONDITIONS /* VA: Fix different conditions that were not exact between float and fix, BE on self-test */ Loading lib_dec/FEC_HQ_core_fx.c +93 −2 Original line number Diff line number Diff line Loading @@ -354,7 +354,11 @@ void HQ_FEC_processing_fx( } ELSE { #ifdef FIX_2493_CHECK_EXTRACT_L norm_p_fx[i] = L_add( r_p_fx[0], L_mult0( extract_l2( r_p_fx[1] ), sub( add( st_fx->nbLostCmpt, num_pgf ), 1 ) ) ); #else norm_p_fx[i] = L_add( r_p_fx[0], L_mult0( extract_l( r_p_fx[1] ), sub( add( st_fx->nbLostCmpt, num_pgf ), 1 ) ) ); #endif move32(); } Loading Loading @@ -758,7 +762,11 @@ static Word16 find_best_delay_fx( ELSE { /*d1m *= delta; */ #ifdef FIX_2493_CHECK_EXTRACT_L d1m = extract_l2( L_mult0( d1m, delta ) ); #else d1m = extract_l( L_mult0( d1m, delta ) ); #endif exp1 = sub( norm_l( min_sq_cross_fx ), 1 ); exp2 = norm_l( min_corr_fx ); Loading Loading @@ -933,12 +941,20 @@ static Word16 FEC_phase_matching_fx( /* OldauOut without windowing */ FOR( i = N_ZERO_NB; i < L / 2; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L OldauOutnoWin_fx[i - N_ZERO_NB] = extract_l2( L_shr( L_negate( st_fx->oldIMDCTout_fx[L / 2 - 1 - i] ), 6 ) ); // Q6 -> Q0 #else OldauOutnoWin_fx[i - N_ZERO_NB] = extract_l( L_shr( L_negate( st_fx->oldIMDCTout_fx[L / 2 - 1 - i] ), 6 ) ); // Q6 -> Q0 #endif move16(); } FOR( i = 0; i < L / 2; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L OldauOutnoWin_fx[i + N_ZERO_O_NB] = extract_l2( L_shr( L_negate( st_fx->oldIMDCTout_fx[i] ), 6 ) ); // Q6 -> Q0 #else OldauOutnoWin_fx[i + N_ZERO_O_NB] = extract_l( L_shr( L_negate( st_fx->oldIMDCTout_fx[i] ), 6 ) ); // Q6 -> Q0 #endif move16(); } Loading Loading @@ -986,10 +1002,17 @@ static Word16 FEC_phase_matching_fx( FOR( i = 0; i < shr( L, 1 ); i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L OldauOut2_fx[i] = extract_l2( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); move16(); OldauOut2_fx[L / 2 + i] = extract_l2( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); move16(); #else OldauOut2_fx[i] = extract_l( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); move16(); OldauOut2_fx[L / 2 + i] = extract_l( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); move16(); #endif } Smoothing_vector_NB_fx( &ImdctOutWin_fx[N_Z_L_O_NB], &OldauOut2_fx[N_ZERO_NB], SmoothingWin_NB3_fx, &OldauOut_pha_fx[1][0], L_overlap ); Loading Loading @@ -1126,10 +1149,17 @@ static void FEC_phase_matching_burst_fx( { /* OldauOut2[i] = -ImdctOut[L/2 - 1 - i];*/ /* OldauOut2[L/2+i] = -ImdctOut[i];*/ #ifdef FIX_2493_CHECK_EXTRACT_L OldauOut2_fx[i] = extract_l2( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); // Q6 -> Q0 move16(); OldauOut2_fx[L / 2 + i] = extract_l2( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); // Q6 -> Q0 move16(); #else OldauOut2_fx[i] = extract_l( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); // Q6 -> Q0 move16(); OldauOut2_fx[L / 2 + i] = extract_l( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); // Q6 -> Q0 move16(); #endif } Smoothing_vector_NB_fx( &ImdctOutWin_fx[N_Z_L_O_NB], &OldauOut2_fx[N_ZERO_NB], SmoothingWin_NB3_fx, &OldauOut_pha_fx[1][0], L_overlap ); Loading Loading @@ -1172,13 +1202,21 @@ static void Repetition_smoothing_nextgood_fx( FOR( i = N_ZERO_NB; i < L / 2; i++ ) { /*OldauOut[i-N_ZERO_NB] = -OldImdctOut[L/2 - 1 - i];*/ #ifdef FIX_2493_CHECK_EXTRACT_L OldauOut_fx[i - N_ZERO_NB] = extract_l2( L_shr( L_negate( OldImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #else OldauOut_fx[i - N_ZERO_NB] = extract_l( L_shr( L_negate( OldImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } FOR( i = 0; i < L / 4; i++ ) { /*OldauOut[i+N_ZERO_O_NB] = -OldImdctOut[i];*/ #ifdef FIX_2493_CHECK_EXTRACT_L OldauOut_fx[i + N_ZERO_O_NB] = extract_l2( L_shr( L_negate( OldImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #else OldauOut_fx[i + N_ZERO_O_NB] = extract_l( L_shr( L_negate( OldImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } Loading @@ -1191,12 +1229,20 @@ static void Repetition_smoothing_nextgood_fx( FOR( i = N_ZERO_NB; i < L / 2; i++ ) { /* ImdctOutWin[i+L] = -ImdctOut[L/2 - 1 - i]; */ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[add( i, L )] = extract_l2( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #else ImdctOutWin_fx[add( i, L )] = extract_l( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } FOR( i = 0; i < L / 2; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[i + 3 * L / 2] = extract_l2( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #else ImdctOutWin_fx[i + 3 * L / 2] = extract_l( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } Loading Loading @@ -1273,12 +1319,20 @@ static Word16 Repetition_smoothing_fx( /* OldauOut without windowing */ FOR( i = N_ZERO_NB; i < L / 2; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L OldauOutnoWin_fx[i - N_ZERO_NB] = extract_l2( L_shr( L_negate( OldImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #else OldauOutnoWin_fx[i - N_ZERO_NB] = extract_l( L_shr( L_negate( OldImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } FOR( i = 0; i < L / 2; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L OldauOutnoWin_fx[i + N_ZERO_O_NB] = extract_l2( L_shr( L_negate( OldImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #else OldauOutnoWin_fx[i + N_ZERO_O_NB] = extract_l( L_shr( L_negate( OldImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } Loading Loading @@ -1378,7 +1432,11 @@ static void Windowing_1st_NB_fx( FOR( i = N_ZERO_NB; i < L / 2; i++ ) { /*ImdctOutWin[i] = ImdctOut[L/2 + i] * win[(2*L-1-i)-N_LEAD_O_NB];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[i] = extract_l2( L_shr( Mult_32_16( ImdctOut_fx[L / 2 + i], win_fx[( 2 * L - 1 - i ) - N_LEAD_O_NB] ), 6 ) ); // Q6 -> Q0 #else ImdctOutWin_fx[i] = extract_l( L_shr( Mult_32_16( ImdctOut_fx[L / 2 + i], win_fx[( 2 * L - 1 - i ) - N_LEAD_O_NB] ), 6 ) ); // Q6 -> Q0 #endif move16(); } Loading @@ -1386,10 +1444,17 @@ static void Windowing_1st_NB_fx( { /*ImdctOutWin[L/2 + i] = -ImdctOut[L - 1 - i] * win[(3*L/2-1-i)-N_LEAD_O_NB];*/ /*ImdctOutWin[3*L/2 + i] = -ImdctOut[i] * win[(L/2-i-1)];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[L / 2 + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L - 1 - i] ), win_fx[( 3 * L / 2 - 1 - i ) - N_LEAD_O_NB] ), 6 ) ); // Q6 -> Q0 move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[( L / 2 - i - 1 )] ), 6 ) ); // Q6 -> Q0 move16(); #else ImdctOutWin_fx[L / 2 + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L - 1 - i] ), win_fx[( 3 * L / 2 - 1 - i ) - N_LEAD_O_NB] ), 6 ) ); // Q6 -> Q0 move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[( L / 2 - i - 1 )] ), 6 ) ); // Q6 -> Q0 move16(); #endif } } ELSE Loading @@ -1397,7 +1462,11 @@ static void Windowing_1st_NB_fx( FOR( i = N_ZERO_NB; i < L / 2; i++ ) { /*ImdctOutWin[i] = ImdctOut[L/2 + i] * smoothingWin[(i-N_ZERO_NB)];*/ /*win[(2*L-i)*decimate-1-decay-14*L_FRAME48k/20];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[i] = extract_l2( L_shr( Mult_32_16( ImdctOut_fx[L / 2 + i], smoothingWin_fx[( i - N_ZERO_NB )] ), 6 ) ); /*win[(2*L-i)*decimate-1-decay-14*L_FRAME48k/20];*/ #else ImdctOutWin_fx[i] = extract_l( L_shr( Mult_32_16( ImdctOut_fx[L / 2 + i], smoothingWin_fx[( i - N_ZERO_NB )] ), 6 ) ); /*win[(2*L-i)*decimate-1-decay-14*L_FRAME48k/20];*/ #endif move16(); } Loading @@ -1405,10 +1474,17 @@ static void Windowing_1st_NB_fx( { /*ImdctOutWin[L/2 + i] = -ImdctOut[L - 1 - i] * smoothingWin[(i+N_ZERO_O_NB)];*/ /*win[(3*L/2-1-i)*decimate+decay-L_FRAME48k*14/20];*/ /*ImdctOutWin[3*L/2 + i] = -ImdctOut[i] * win[(L/2-i-1)];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[L / 2 + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L - 1 - i] ), smoothingWin_fx[( i + N_ZERO_O_NB )] ), 6 ) ); /*win[(3*L/2-1-i)*decimate+decay-L_FRAME48k*14/20];*/ // Q6 -> Q0 move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[( L / 2 - i - 1 )] ), 6 ) ); // Q6 -> Q0 move16(); #else ImdctOutWin_fx[L / 2 + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L - 1 - i] ), smoothingWin_fx[( i + N_ZERO_O_NB )] ), 6 ) ); /*win[(3*L/2-1-i)*decimate+decay-L_FRAME48k*14/20];*/ // Q6 -> Q0 move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[( L / 2 - i - 1 )] ), 6 ) ); // Q6 -> Q0 move16(); #endif } } Loading @@ -1429,23 +1505,38 @@ static void Windowing_2nd_NB_fx( { /*ImdctOutWin[L/2 + i] = -ImdctOut[L - 1 - i];*/ /*ImdctOutWin[3*L/2 + i] = -ImdctOut[i] * win[L/2-i-1];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[L / 2 + i] = extract_l2( L_shr( L_negate( ImdctOut_fx[L - 1 - i] ), 6 ) ); move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[L / 2 - i - 1] ), 6 ) ); move16(); #else ImdctOutWin_fx[L / 2 + i] = extract_l( L_shr( L_negate( ImdctOut_fx[L - 1 - i] ), 6 ) ); move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[L / 2 - i - 1] ), 6 ) ); move16(); #endif } FOR( i = 0; i < N_ZERO_NB; i++ ) { /*ImdctOutWin[L + i] = -ImdctOut[L/2 - 1 - i];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[L + i] = extract_l2( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); #else ImdctOutWin_fx[L + i] = extract_l( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); #endif move16(); } FOR( i = N_ZERO_NB; i < L / 2; i++ ) { /*ImdctOutWin[L + i] = -ImdctOut[L/2 - 1 - i] * win[L - 1 - i];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[L + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), win_fx[L - 1 - i] ), 6 ) ); #else ImdctOutWin_fx[L + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), win_fx[L - 1 - i] ), 6 ) ); #endif move16(); } Loading lib_dec/FEC_clas_estim_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -328,7 +328,11 @@ void FEC_clas_estim_fx( move16(); IF( j > 0 ) { #ifdef FIX_2493_CHECK_EXTRACT_L voicing = extract_l2( Mult_32_16( Ltmp, j ) ); #else voicing = extract_l( Mult_32_16( Ltmp, j ) ); #endif } /*------------------------------------------------------------------------* * Compute pitch coherence Loading lib_dec/bass_psfilter_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -1011,7 +1011,11 @@ Word16 res_bpf_adapt_ivas_fx( W_tmp = W_add_nosat( W_tmp, W_mult0_32_32( res_buf[i], res_buf[i] ) ); } #ifdef FIX_2493_CHECK_EXTRACT_L res_hb_nrg = W_extract_l2( W_shr( W_tmp, shl( q_res, 1 ) ) ); // Q0 #else res_hb_nrg = W_extract_l( W_shr( W_tmp, shl( q_res, 1 ) ) ); // Q0 #endif res_hb_nrg = Mpy_32_16_1( res_hb_nrg, bw_inv ); // Q0 res_hb_nrg = L_add( Mpy_32_16_1( res_hb_nrg, STEREO_DFT_BPF_ADAPT_ALPHA_FX ), Mpy_32_16_1( hStereoDft->res_hb_nrg_mem_fx, sub( MAX_16, STEREO_DFT_BPF_ADAPT_ALPHA_FX ) ) ); hStereoDft->res_hb_nrg_mem_fx = res_hb_nrg; Loading lib_dec/cng_dec_fx.c +19 −3 Original line number Diff line number Diff line Loading @@ -484,7 +484,11 @@ void CNG_dec_fx( L_tmp1 = L_sub( L_tmp1, L_deposit_l( tmp[max_idx[0] * M + i] ) ); tmpv = div_s( 1, sub( m, 1 ) ); /*Q15*/ L_tmp1 = Mpy_32_16_1( L_tmp1, tmpv ); /*Q15*/ #ifdef FIX_2493_CHECK_EXTRACT_L lsp_tmp[i] = extract_l2( L_tmp1 ); /*Q15*/ #else lsp_tmp[i] = extract_l( L_tmp1 ); /*Q15*/ #endif move16(); } } Loading @@ -502,7 +506,11 @@ void CNG_dec_fx( L_tmp1 = L_sub( L_tmp1, L_add( L_deposit_l( tmp[max_idx[0] * M + i] ), L_deposit_l( tmp[max_idx[1] * M + i] ) ) ); /*Q15*/ tmpv = div_s( 1, sub( m, 2 ) ); /*Q15*/ L_tmp1 = Mpy_32_16_1( L_tmp1, tmpv ); /*Q15*/ #ifdef FIX_2493_CHECK_EXTRACT_L lsp_tmp[i] = extract_l2( L_tmp1 ); /*Q15*/ #else lsp_tmp[i] = extract_l( L_tmp1 ); /*Q15*/ #endif move16(); } } Loading Loading @@ -794,7 +802,11 @@ static void shb_CNG_decod_fx( IF( st->element_mode == EVS_MONO ) { L_tmp = L_mult( idx_ener, 27400 ); /*Q14 */ #ifdef FIX_2493_CHECK_EXTRACT_L hTdCngDec->last_shb_cng_ener_fx = extract_l2( L_shr( L_sub( L_tmp, 295924 ), 6 ) ); /*Q8 */ #else hTdCngDec->last_shb_cng_ener_fx = extract_l( L_shr( L_sub( L_tmp, 295924 ), 6 ) ); /*Q8 */ #endif move16(); } ELSE Loading Loading @@ -1124,7 +1136,11 @@ static void shb_CNG_decod_fx( FOR( i = 0; i < L_FRAME16k; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L shb_syn16k_fx[i] = extract_l2( L_shr( Mpy_32_16_1( L_gain_fx, excSHB_fx[i] ), sub( 5, tmp_16 ) ) ); /*Q3 = 31-Qtmp-8-15-5+Qtmp */ #else shb_syn16k_fx[i] = extract_l( L_shr( Mpy_32_16_1( L_gain_fx, excSHB_fx[i] ), sub( 5, tmp_16 ) ) ); /*Q3 = 31-Qtmp-8-15-5+Qtmp */ #endif move16(); } Loading Loading
lib_com/options.h +1 −0 Original line number Diff line number Diff line Loading @@ -140,6 +140,7 @@ #define NONBE_FIX_2493_CHECK_EXTRACT_L_swb_pre_proc_fx /* FhG: Fix extract_l overflow inside swb_pre_proc_fx() */ #define NONBE_FIX_2493_EXTRACT_L_spectral_balancer_fx16 /* FhG: Fix extract_l overflow inside spectral_balancer_fx16() */ #define NONBE_FIX_2493_EXTRACT_L_IGF_CalculateStereoEnvelope_fx /* FhG: Fix extract_l overflow inside IGF_CalculateStereoEnvelope_fx() */ #define NONBE_FIX_2493_CHECK_EXTRACT_L_GetTCXMaxenergyChange_fx /* FhG: Fix extract_l overflow inside GetTCXMaxenergyChange_fx() */ #define FIX_2584_TD_SM_ISSUE /* VA: Fix inconsistencies in the SM part of the TD stereo */ #define FIX_2556_ALIGN_CONDITIONS /* VA: Fix different conditions that were not exact between float and fix, BE on self-test */ Loading
lib_dec/FEC_HQ_core_fx.c +93 −2 Original line number Diff line number Diff line Loading @@ -354,7 +354,11 @@ void HQ_FEC_processing_fx( } ELSE { #ifdef FIX_2493_CHECK_EXTRACT_L norm_p_fx[i] = L_add( r_p_fx[0], L_mult0( extract_l2( r_p_fx[1] ), sub( add( st_fx->nbLostCmpt, num_pgf ), 1 ) ) ); #else norm_p_fx[i] = L_add( r_p_fx[0], L_mult0( extract_l( r_p_fx[1] ), sub( add( st_fx->nbLostCmpt, num_pgf ), 1 ) ) ); #endif move32(); } Loading Loading @@ -758,7 +762,11 @@ static Word16 find_best_delay_fx( ELSE { /*d1m *= delta; */ #ifdef FIX_2493_CHECK_EXTRACT_L d1m = extract_l2( L_mult0( d1m, delta ) ); #else d1m = extract_l( L_mult0( d1m, delta ) ); #endif exp1 = sub( norm_l( min_sq_cross_fx ), 1 ); exp2 = norm_l( min_corr_fx ); Loading Loading @@ -933,12 +941,20 @@ static Word16 FEC_phase_matching_fx( /* OldauOut without windowing */ FOR( i = N_ZERO_NB; i < L / 2; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L OldauOutnoWin_fx[i - N_ZERO_NB] = extract_l2( L_shr( L_negate( st_fx->oldIMDCTout_fx[L / 2 - 1 - i] ), 6 ) ); // Q6 -> Q0 #else OldauOutnoWin_fx[i - N_ZERO_NB] = extract_l( L_shr( L_negate( st_fx->oldIMDCTout_fx[L / 2 - 1 - i] ), 6 ) ); // Q6 -> Q0 #endif move16(); } FOR( i = 0; i < L / 2; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L OldauOutnoWin_fx[i + N_ZERO_O_NB] = extract_l2( L_shr( L_negate( st_fx->oldIMDCTout_fx[i] ), 6 ) ); // Q6 -> Q0 #else OldauOutnoWin_fx[i + N_ZERO_O_NB] = extract_l( L_shr( L_negate( st_fx->oldIMDCTout_fx[i] ), 6 ) ); // Q6 -> Q0 #endif move16(); } Loading Loading @@ -986,10 +1002,17 @@ static Word16 FEC_phase_matching_fx( FOR( i = 0; i < shr( L, 1 ); i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L OldauOut2_fx[i] = extract_l2( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); move16(); OldauOut2_fx[L / 2 + i] = extract_l2( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); move16(); #else OldauOut2_fx[i] = extract_l( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); move16(); OldauOut2_fx[L / 2 + i] = extract_l( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); move16(); #endif } Smoothing_vector_NB_fx( &ImdctOutWin_fx[N_Z_L_O_NB], &OldauOut2_fx[N_ZERO_NB], SmoothingWin_NB3_fx, &OldauOut_pha_fx[1][0], L_overlap ); Loading Loading @@ -1126,10 +1149,17 @@ static void FEC_phase_matching_burst_fx( { /* OldauOut2[i] = -ImdctOut[L/2 - 1 - i];*/ /* OldauOut2[L/2+i] = -ImdctOut[i];*/ #ifdef FIX_2493_CHECK_EXTRACT_L OldauOut2_fx[i] = extract_l2( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); // Q6 -> Q0 move16(); OldauOut2_fx[L / 2 + i] = extract_l2( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); // Q6 -> Q0 move16(); #else OldauOut2_fx[i] = extract_l( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); // Q6 -> Q0 move16(); OldauOut2_fx[L / 2 + i] = extract_l( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); // Q6 -> Q0 move16(); #endif } Smoothing_vector_NB_fx( &ImdctOutWin_fx[N_Z_L_O_NB], &OldauOut2_fx[N_ZERO_NB], SmoothingWin_NB3_fx, &OldauOut_pha_fx[1][0], L_overlap ); Loading Loading @@ -1172,13 +1202,21 @@ static void Repetition_smoothing_nextgood_fx( FOR( i = N_ZERO_NB; i < L / 2; i++ ) { /*OldauOut[i-N_ZERO_NB] = -OldImdctOut[L/2 - 1 - i];*/ #ifdef FIX_2493_CHECK_EXTRACT_L OldauOut_fx[i - N_ZERO_NB] = extract_l2( L_shr( L_negate( OldImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #else OldauOut_fx[i - N_ZERO_NB] = extract_l( L_shr( L_negate( OldImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } FOR( i = 0; i < L / 4; i++ ) { /*OldauOut[i+N_ZERO_O_NB] = -OldImdctOut[i];*/ #ifdef FIX_2493_CHECK_EXTRACT_L OldauOut_fx[i + N_ZERO_O_NB] = extract_l2( L_shr( L_negate( OldImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #else OldauOut_fx[i + N_ZERO_O_NB] = extract_l( L_shr( L_negate( OldImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } Loading @@ -1191,12 +1229,20 @@ static void Repetition_smoothing_nextgood_fx( FOR( i = N_ZERO_NB; i < L / 2; i++ ) { /* ImdctOutWin[i+L] = -ImdctOut[L/2 - 1 - i]; */ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[add( i, L )] = extract_l2( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #else ImdctOutWin_fx[add( i, L )] = extract_l( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } FOR( i = 0; i < L / 2; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[i + 3 * L / 2] = extract_l2( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #else ImdctOutWin_fx[i + 3 * L / 2] = extract_l( L_shr( L_negate( ImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } Loading Loading @@ -1273,12 +1319,20 @@ static Word16 Repetition_smoothing_fx( /* OldauOut without windowing */ FOR( i = N_ZERO_NB; i < L / 2; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L OldauOutnoWin_fx[i - N_ZERO_NB] = extract_l2( L_shr( L_negate( OldImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #else OldauOutnoWin_fx[i - N_ZERO_NB] = extract_l( L_shr( L_negate( OldImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } FOR( i = 0; i < L / 2; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L OldauOutnoWin_fx[i + N_ZERO_O_NB] = extract_l2( L_shr( L_negate( OldImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #else OldauOutnoWin_fx[i + N_ZERO_O_NB] = extract_l( L_shr( L_negate( OldImdctOut_fx[i] ), 6 ) ); /* Q6 -> Q0 */ #endif move16(); } Loading Loading @@ -1378,7 +1432,11 @@ static void Windowing_1st_NB_fx( FOR( i = N_ZERO_NB; i < L / 2; i++ ) { /*ImdctOutWin[i] = ImdctOut[L/2 + i] * win[(2*L-1-i)-N_LEAD_O_NB];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[i] = extract_l2( L_shr( Mult_32_16( ImdctOut_fx[L / 2 + i], win_fx[( 2 * L - 1 - i ) - N_LEAD_O_NB] ), 6 ) ); // Q6 -> Q0 #else ImdctOutWin_fx[i] = extract_l( L_shr( Mult_32_16( ImdctOut_fx[L / 2 + i], win_fx[( 2 * L - 1 - i ) - N_LEAD_O_NB] ), 6 ) ); // Q6 -> Q0 #endif move16(); } Loading @@ -1386,10 +1444,17 @@ static void Windowing_1st_NB_fx( { /*ImdctOutWin[L/2 + i] = -ImdctOut[L - 1 - i] * win[(3*L/2-1-i)-N_LEAD_O_NB];*/ /*ImdctOutWin[3*L/2 + i] = -ImdctOut[i] * win[(L/2-i-1)];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[L / 2 + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L - 1 - i] ), win_fx[( 3 * L / 2 - 1 - i ) - N_LEAD_O_NB] ), 6 ) ); // Q6 -> Q0 move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[( L / 2 - i - 1 )] ), 6 ) ); // Q6 -> Q0 move16(); #else ImdctOutWin_fx[L / 2 + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L - 1 - i] ), win_fx[( 3 * L / 2 - 1 - i ) - N_LEAD_O_NB] ), 6 ) ); // Q6 -> Q0 move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[( L / 2 - i - 1 )] ), 6 ) ); // Q6 -> Q0 move16(); #endif } } ELSE Loading @@ -1397,7 +1462,11 @@ static void Windowing_1st_NB_fx( FOR( i = N_ZERO_NB; i < L / 2; i++ ) { /*ImdctOutWin[i] = ImdctOut[L/2 + i] * smoothingWin[(i-N_ZERO_NB)];*/ /*win[(2*L-i)*decimate-1-decay-14*L_FRAME48k/20];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[i] = extract_l2( L_shr( Mult_32_16( ImdctOut_fx[L / 2 + i], smoothingWin_fx[( i - N_ZERO_NB )] ), 6 ) ); /*win[(2*L-i)*decimate-1-decay-14*L_FRAME48k/20];*/ #else ImdctOutWin_fx[i] = extract_l( L_shr( Mult_32_16( ImdctOut_fx[L / 2 + i], smoothingWin_fx[( i - N_ZERO_NB )] ), 6 ) ); /*win[(2*L-i)*decimate-1-decay-14*L_FRAME48k/20];*/ #endif move16(); } Loading @@ -1405,10 +1474,17 @@ static void Windowing_1st_NB_fx( { /*ImdctOutWin[L/2 + i] = -ImdctOut[L - 1 - i] * smoothingWin[(i+N_ZERO_O_NB)];*/ /*win[(3*L/2-1-i)*decimate+decay-L_FRAME48k*14/20];*/ /*ImdctOutWin[3*L/2 + i] = -ImdctOut[i] * win[(L/2-i-1)];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[L / 2 + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L - 1 - i] ), smoothingWin_fx[( i + N_ZERO_O_NB )] ), 6 ) ); /*win[(3*L/2-1-i)*decimate+decay-L_FRAME48k*14/20];*/ // Q6 -> Q0 move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[( L / 2 - i - 1 )] ), 6 ) ); // Q6 -> Q0 move16(); #else ImdctOutWin_fx[L / 2 + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L - 1 - i] ), smoothingWin_fx[( i + N_ZERO_O_NB )] ), 6 ) ); /*win[(3*L/2-1-i)*decimate+decay-L_FRAME48k*14/20];*/ // Q6 -> Q0 move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[( L / 2 - i - 1 )] ), 6 ) ); // Q6 -> Q0 move16(); #endif } } Loading @@ -1429,23 +1505,38 @@ static void Windowing_2nd_NB_fx( { /*ImdctOutWin[L/2 + i] = -ImdctOut[L - 1 - i];*/ /*ImdctOutWin[3*L/2 + i] = -ImdctOut[i] * win[L/2-i-1];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[L / 2 + i] = extract_l2( L_shr( L_negate( ImdctOut_fx[L - 1 - i] ), 6 ) ); move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[L / 2 - i - 1] ), 6 ) ); move16(); #else ImdctOutWin_fx[L / 2 + i] = extract_l( L_shr( L_negate( ImdctOut_fx[L - 1 - i] ), 6 ) ); move16(); ImdctOutWin_fx[3 * L / 2 + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[i] ), win_fx[L / 2 - i - 1] ), 6 ) ); move16(); #endif } FOR( i = 0; i < N_ZERO_NB; i++ ) { /*ImdctOutWin[L + i] = -ImdctOut[L/2 - 1 - i];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[L + i] = extract_l2( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); #else ImdctOutWin_fx[L + i] = extract_l( L_shr( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), 6 ) ); #endif move16(); } FOR( i = N_ZERO_NB; i < L / 2; i++ ) { /*ImdctOutWin[L + i] = -ImdctOut[L/2 - 1 - i] * win[L - 1 - i];*/ #ifdef FIX_2493_CHECK_EXTRACT_L ImdctOutWin_fx[L + i] = extract_l2( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), win_fx[L - 1 - i] ), 6 ) ); #else ImdctOutWin_fx[L + i] = extract_l( L_shr( Mult_32_16( L_negate( ImdctOut_fx[L / 2 - 1 - i] ), win_fx[L - 1 - i] ), 6 ) ); #endif move16(); } Loading
lib_dec/FEC_clas_estim_fx.c +4 −0 Original line number Diff line number Diff line Loading @@ -328,7 +328,11 @@ void FEC_clas_estim_fx( move16(); IF( j > 0 ) { #ifdef FIX_2493_CHECK_EXTRACT_L voicing = extract_l2( Mult_32_16( Ltmp, j ) ); #else voicing = extract_l( Mult_32_16( Ltmp, j ) ); #endif } /*------------------------------------------------------------------------* * Compute pitch coherence Loading
lib_dec/bass_psfilter_fx.c +5 −1 Original line number Diff line number Diff line Loading @@ -1011,7 +1011,11 @@ Word16 res_bpf_adapt_ivas_fx( W_tmp = W_add_nosat( W_tmp, W_mult0_32_32( res_buf[i], res_buf[i] ) ); } #ifdef FIX_2493_CHECK_EXTRACT_L res_hb_nrg = W_extract_l2( W_shr( W_tmp, shl( q_res, 1 ) ) ); // Q0 #else res_hb_nrg = W_extract_l( W_shr( W_tmp, shl( q_res, 1 ) ) ); // Q0 #endif res_hb_nrg = Mpy_32_16_1( res_hb_nrg, bw_inv ); // Q0 res_hb_nrg = L_add( Mpy_32_16_1( res_hb_nrg, STEREO_DFT_BPF_ADAPT_ALPHA_FX ), Mpy_32_16_1( hStereoDft->res_hb_nrg_mem_fx, sub( MAX_16, STEREO_DFT_BPF_ADAPT_ALPHA_FX ) ) ); hStereoDft->res_hb_nrg_mem_fx = res_hb_nrg; Loading
lib_dec/cng_dec_fx.c +19 −3 Original line number Diff line number Diff line Loading @@ -484,7 +484,11 @@ void CNG_dec_fx( L_tmp1 = L_sub( L_tmp1, L_deposit_l( tmp[max_idx[0] * M + i] ) ); tmpv = div_s( 1, sub( m, 1 ) ); /*Q15*/ L_tmp1 = Mpy_32_16_1( L_tmp1, tmpv ); /*Q15*/ #ifdef FIX_2493_CHECK_EXTRACT_L lsp_tmp[i] = extract_l2( L_tmp1 ); /*Q15*/ #else lsp_tmp[i] = extract_l( L_tmp1 ); /*Q15*/ #endif move16(); } } Loading @@ -502,7 +506,11 @@ void CNG_dec_fx( L_tmp1 = L_sub( L_tmp1, L_add( L_deposit_l( tmp[max_idx[0] * M + i] ), L_deposit_l( tmp[max_idx[1] * M + i] ) ) ); /*Q15*/ tmpv = div_s( 1, sub( m, 2 ) ); /*Q15*/ L_tmp1 = Mpy_32_16_1( L_tmp1, tmpv ); /*Q15*/ #ifdef FIX_2493_CHECK_EXTRACT_L lsp_tmp[i] = extract_l2( L_tmp1 ); /*Q15*/ #else lsp_tmp[i] = extract_l( L_tmp1 ); /*Q15*/ #endif move16(); } } Loading Loading @@ -794,7 +802,11 @@ static void shb_CNG_decod_fx( IF( st->element_mode == EVS_MONO ) { L_tmp = L_mult( idx_ener, 27400 ); /*Q14 */ #ifdef FIX_2493_CHECK_EXTRACT_L hTdCngDec->last_shb_cng_ener_fx = extract_l2( L_shr( L_sub( L_tmp, 295924 ), 6 ) ); /*Q8 */ #else hTdCngDec->last_shb_cng_ener_fx = extract_l( L_shr( L_sub( L_tmp, 295924 ), 6 ) ); /*Q8 */ #endif move16(); } ELSE Loading Loading @@ -1124,7 +1136,11 @@ static void shb_CNG_decod_fx( FOR( i = 0; i < L_FRAME16k; i++ ) { #ifdef FIX_2493_CHECK_EXTRACT_L shb_syn16k_fx[i] = extract_l2( L_shr( Mpy_32_16_1( L_gain_fx, excSHB_fx[i] ), sub( 5, tmp_16 ) ) ); /*Q3 = 31-Qtmp-8-15-5+Qtmp */ #else shb_syn16k_fx[i] = extract_l( L_shr( Mpy_32_16_1( L_gain_fx, excSHB_fx[i] ), sub( 5, tmp_16 ) ) ); /*Q3 = 31-Qtmp-8-15-5+Qtmp */ #endif move16(); } Loading