Loading lib_com/rom_com.c +7 −22 Original line number Diff line number Diff line Loading @@ -1273,28 +1273,6 @@ const Word16 sin_table256_fx[] = * 1/4 resolution interpolation filter (-3 dB at 0.913*fs/2) *----------------------------------------------------------------------------------*/ const Word16 inter4_2_fx_Q15[65] = {//Q15 30801, 28062, 20718, 11061, 1935, -4294, -6533, -5195, -1846, 1559, 3497, 3398, 1705, -497, -2087, -2413, -1523, -32, 1252, 1741, 1312, 305, -710, -1237, -1087, -426, 350, 848, 862, 452, -119, -550, -650, -418, -17, 330, 462, 349, 85, -175, -306, -265, -104, 76, 184, 182, 93, -20, -98, -110, -66, -3, 43, 55, 37, 8, -13, -20, -14, -4, 2, 3, 1, 0, 0, }; const Word16 inter4_2_fx[] = {//evs table , some mismatch in values compared to float is observed 0, 1, 2, 1, Loading Loading @@ -1366,6 +1344,13 @@ const Word16 pitch_inter4_2[PIT_FIR_SIZE2] = 3/*0.000098f Q15*/, 2/*0.000048f Q15*/, 0/*0.000007f Q15*/, 0/*0.000000f Q15*/ }; /* 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2) */ const Word32 L_pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1] = /* Q31 */ { 1932735283, 1758701061, 1298905484, 711630983, 180298432, -162768528, -280712608, -226956816, -100446400, 9592809, 59676424, 55065776, 26996016, 4138201, -3373696, -1617055, 0 }; /* 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2) */ const Word16 pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1] = { 29491/*0.900000F Q15*/, lib_com/rom_com.h +9 −9 Original line number Diff line number Diff line Loading @@ -172,10 +172,10 @@ extern const Word32 crit_bands_fx[]; extern const float sincos_t_ext[]; // fft_rel dep extern const Word16 sincos_t_rad3_fx[]; // Q15 extern const Word16 fft256_read_indexes[]; /* FFT Q0*/ extern const Word16 inter4_2_fx_Q15[]; // Q15 /* 1/4 resolution interpolation filter */ extern const Word16 inter4_2_fx[]; extern const Word16 pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1]; /*1Q14*/ extern const Word16 pitch_inter4_2[PIT_FIR_SIZE2]; /*Q15*/ extern const Word32 L_pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1]; /*Q31*/ extern const Word32 L_pitch_inter4_2[PIT_FIR_SIZE2]; /*Q31*/ extern const Word16 Assym_window_W16fx[]; // Q15 extern const Word16 assym_window_16k_fx[]; // Q15 Loading lib_com/swb_tbe_com_fx.c +28 −3 Original line number Diff line number Diff line Loading @@ -6982,6 +6982,7 @@ void synthesise_fb_high_band_fx( elliptic_bpf_48k_generic_fx( excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_1_fx ); #endif } /* temp1 = sum2_f( tmp, L_FRAME48k ) + 0.001f */ temp1 = sum2_fx_mod( tmp, L_FRAME48k ); L_tmp = L_max( 1, fb_exc_energy ); /*Q(2*Q_fb_exc + 1)*/ Loading @@ -6990,9 +6991,33 @@ void synthesise_fb_high_band_fx( tmp1 = sub( add( Q_fb_exc, Q_fb_exc ), 8 ); /* 1-9*/ exp = sub( sub( 31, tmp1 ), exp ); IF( element_mode != EVS_MONO ) { Word16 sft, t_Q; Word64 P_ONE = 33; /* 0.001f in Q15 */ move64(); Word64 W_temp; t_Q = sub( shl( exp_tmp, 1 ), 8 ); P_ONE = W_shl( P_ONE, sub( t_Q, 15 ) ); W_temp = W_add( P_ONE, temp1 ); sft = W_norm( W_temp ); W_temp = W_shl( W_temp, sft ); temp1 = W_extract_h( W_temp ); t_Q = sub( add( t_Q, sft ), 32 ); tmp2 = extract_h( temp1 ); exp2 = sub( 31, t_Q ); } ELSE { exp2 = norm_l( temp1 ); tmp2 = extract_h( L_shl( temp1, exp2 ) ); exp2 = sub( sub( 31, sub( shl( exp_tmp, 1 ), 8 ) ), exp2 ); /* in Q15 (temp1 in Q9)*/ } exp = sub( exp2, exp ); /* Denormalize and substract */ IF( GT_16( tmp2, tmp3 ) ) Loading lib_dec/dec_tcx_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -2886,7 +2886,7 @@ void IMDCT_ivas_fx( { Word16 q_old_out = q_win; move16(); edct_fx( x_fx, xn_buf_fx_32 + add( shr( overlap, 1 ), nz ), L_frame, &q_xn_buf_fx_32 ); edct_ivas_fx( x_fx, xn_buf_fx_32 + add( shr( overlap, 1 ), nz ), L_frame, &q_xn_buf_fx_32 ); Word16 res_m, res_e; res_e = 0; move16(); Loading lib_dec/ivas_stereo_dft_dec_fx.c +5 −5 Original line number Diff line number Diff line Loading @@ -2608,7 +2608,7 @@ void stereo_dft_dec_fx( q_cna_level = hFdCngDec->smoothed_psd_exp; move16(); l_tmp = Sqrt32( cna_level, &q_cna_level ); scale_fact = Mpy_32_32( l_tmp, scale_fact0 ); /* q_cna_level */ scale_fact = Mpy_32_32( l_tmp, scale_fact0 ); /* Q = (31-q_cna_level) + Q15 - 31 */ /* scale_fact0 will be in Q15 by the time the above operation is performed so the q of scale_fact represented now by q_cna_level has to be updated Loading @@ -2628,12 +2628,12 @@ void stereo_dft_dec_fx( l_tmp = L_add( Madd_32_16( N1, N1, g ), Mpy_32_16_1( N2, gamma ) ); /* q_cna_level */ l_tmp = L_shr( l_tmp, sub( q_cna_level, hStereoDft->q_dft ) ); /* q_dft */ #endif /* OPT_STEREO_32KBPS_V1 */ DFT_L[2 * i] = L_add( DFT_L[2 * i], l_tmp ); /* q_dft */ DFT_L[2 * i] = L_add_sat( DFT_L[2 * i], l_tmp ); /* q_dft */ move32(); #ifdef OPT_STEREO_32KBPS_V1 l_tmp = Msub_32_16( Msub_32_16( N1, N1, g ), N2, gamma ); /* q_cna_level */ l_tmp = L_shr( l_tmp, shift ); /* q_dft */ DFT_R[2 * i] = L_add( DFT_R[2 * i], l_tmp ); /* q_dft */ DFT_R[2 * i] = L_add_sat( DFT_R[2 * i], l_tmp ); /* q_dft */ #else /* OPT_STEREO_32KBPS_V1 */ l_tmp = L_sub( Msub_32_16( N1, N1, g ), Mpy_32_16_1( N2, gamma ) ); /* q_cna_level */ l_tmp = L_shr( l_tmp, sub( q_cna_level, hStereoDft->q_dft ) ); /* q_dft */ Loading @@ -2646,11 +2646,11 @@ void stereo_dft_dec_fx( #ifdef OPT_STEREO_32KBPS_V1 l_tmp = Madd_32_16( Madd_32_16( N1, N1, g ), N2, gamma ); /* q_cna_level */ l_tmp = L_shr( l_tmp, shift ); /* q_dft */ DFT_L[2 * i + 1] = L_add( DFT_L[2 * i + 1], l_tmp ); /* q_dft */ DFT_L[2 * i + 1] = L_add_sat( DFT_L[2 * i + 1], l_tmp ); /* q_dft */ move32(); l_tmp = Msub_32_16( Msub_32_16( N1, N1, g ), N2, gamma ); /* q_cna_level */ l_tmp = L_shr( l_tmp, shift ); /* q_dft */ DFT_R[2 * i + 1] = L_add( DFT_R[2 * i + 1], l_tmp ); /* q_dft */ DFT_R[2 * i + 1] = L_add_sat( DFT_R[2 * i + 1], l_tmp ); /* q_dft */ move32(); #else /* OPT_STEREO_32KBPS_V1 */ l_tmp = L_add( Madd_32_16( N1, N1, g ), Mpy_32_16_1( N2, gamma ) ); /* q_cna_level */ Loading Loading
lib_com/rom_com.c +7 −22 Original line number Diff line number Diff line Loading @@ -1273,28 +1273,6 @@ const Word16 sin_table256_fx[] = * 1/4 resolution interpolation filter (-3 dB at 0.913*fs/2) *----------------------------------------------------------------------------------*/ const Word16 inter4_2_fx_Q15[65] = {//Q15 30801, 28062, 20718, 11061, 1935, -4294, -6533, -5195, -1846, 1559, 3497, 3398, 1705, -497, -2087, -2413, -1523, -32, 1252, 1741, 1312, 305, -710, -1237, -1087, -426, 350, 848, 862, 452, -119, -550, -650, -418, -17, 330, 462, 349, 85, -175, -306, -265, -104, 76, 184, 182, 93, -20, -98, -110, -66, -3, 43, 55, 37, 8, -13, -20, -14, -4, 2, 3, 1, 0, 0, }; const Word16 inter4_2_fx[] = {//evs table , some mismatch in values compared to float is observed 0, 1, 2, 1, Loading Loading @@ -1366,6 +1344,13 @@ const Word16 pitch_inter4_2[PIT_FIR_SIZE2] = 3/*0.000098f Q15*/, 2/*0.000048f Q15*/, 0/*0.000007f Q15*/, 0/*0.000000f Q15*/ }; /* 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2) */ const Word32 L_pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1] = /* Q31 */ { 1932735283, 1758701061, 1298905484, 711630983, 180298432, -162768528, -280712608, -226956816, -100446400, 9592809, 59676424, 55065776, 26996016, 4138201, -3373696, -1617055, 0 }; /* 1/4 resolution interpolation filter (-3 dB at 0.791*fs/2) */ const Word16 pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1] = { 29491/*0.900000F Q15*/,
lib_com/rom_com.h +9 −9 Original line number Diff line number Diff line Loading @@ -172,10 +172,10 @@ extern const Word32 crit_bands_fx[]; extern const float sincos_t_ext[]; // fft_rel dep extern const Word16 sincos_t_rad3_fx[]; // Q15 extern const Word16 fft256_read_indexes[]; /* FFT Q0*/ extern const Word16 inter4_2_fx_Q15[]; // Q15 /* 1/4 resolution interpolation filter */ extern const Word16 inter4_2_fx[]; extern const Word16 pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1]; /*1Q14*/ extern const Word16 pitch_inter4_2[PIT_FIR_SIZE2]; /*Q15*/ extern const Word32 L_pitch_inter4_1[UP_SAMP * L_INTERPOL1 + 1]; /*Q31*/ extern const Word32 L_pitch_inter4_2[PIT_FIR_SIZE2]; /*Q31*/ extern const Word16 Assym_window_W16fx[]; // Q15 extern const Word16 assym_window_16k_fx[]; // Q15 Loading
lib_com/swb_tbe_com_fx.c +28 −3 Original line number Diff line number Diff line Loading @@ -6982,6 +6982,7 @@ void synthesise_fb_high_band_fx( elliptic_bpf_48k_generic_fx( excitation_in_interp3, &exp_tmp, tmp, bpf_memory, bpf_memory_Q, full_band_bpf_1_fx ); #endif } /* temp1 = sum2_f( tmp, L_FRAME48k ) + 0.001f */ temp1 = sum2_fx_mod( tmp, L_FRAME48k ); L_tmp = L_max( 1, fb_exc_energy ); /*Q(2*Q_fb_exc + 1)*/ Loading @@ -6990,9 +6991,33 @@ void synthesise_fb_high_band_fx( tmp1 = sub( add( Q_fb_exc, Q_fb_exc ), 8 ); /* 1-9*/ exp = sub( sub( 31, tmp1 ), exp ); IF( element_mode != EVS_MONO ) { Word16 sft, t_Q; Word64 P_ONE = 33; /* 0.001f in Q15 */ move64(); Word64 W_temp; t_Q = sub( shl( exp_tmp, 1 ), 8 ); P_ONE = W_shl( P_ONE, sub( t_Q, 15 ) ); W_temp = W_add( P_ONE, temp1 ); sft = W_norm( W_temp ); W_temp = W_shl( W_temp, sft ); temp1 = W_extract_h( W_temp ); t_Q = sub( add( t_Q, sft ), 32 ); tmp2 = extract_h( temp1 ); exp2 = sub( 31, t_Q ); } ELSE { exp2 = norm_l( temp1 ); tmp2 = extract_h( L_shl( temp1, exp2 ) ); exp2 = sub( sub( 31, sub( shl( exp_tmp, 1 ), 8 ) ), exp2 ); /* in Q15 (temp1 in Q9)*/ } exp = sub( exp2, exp ); /* Denormalize and substract */ IF( GT_16( tmp2, tmp3 ) ) Loading
lib_dec/dec_tcx_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -2886,7 +2886,7 @@ void IMDCT_ivas_fx( { Word16 q_old_out = q_win; move16(); edct_fx( x_fx, xn_buf_fx_32 + add( shr( overlap, 1 ), nz ), L_frame, &q_xn_buf_fx_32 ); edct_ivas_fx( x_fx, xn_buf_fx_32 + add( shr( overlap, 1 ), nz ), L_frame, &q_xn_buf_fx_32 ); Word16 res_m, res_e; res_e = 0; move16(); Loading
lib_dec/ivas_stereo_dft_dec_fx.c +5 −5 Original line number Diff line number Diff line Loading @@ -2608,7 +2608,7 @@ void stereo_dft_dec_fx( q_cna_level = hFdCngDec->smoothed_psd_exp; move16(); l_tmp = Sqrt32( cna_level, &q_cna_level ); scale_fact = Mpy_32_32( l_tmp, scale_fact0 ); /* q_cna_level */ scale_fact = Mpy_32_32( l_tmp, scale_fact0 ); /* Q = (31-q_cna_level) + Q15 - 31 */ /* scale_fact0 will be in Q15 by the time the above operation is performed so the q of scale_fact represented now by q_cna_level has to be updated Loading @@ -2628,12 +2628,12 @@ void stereo_dft_dec_fx( l_tmp = L_add( Madd_32_16( N1, N1, g ), Mpy_32_16_1( N2, gamma ) ); /* q_cna_level */ l_tmp = L_shr( l_tmp, sub( q_cna_level, hStereoDft->q_dft ) ); /* q_dft */ #endif /* OPT_STEREO_32KBPS_V1 */ DFT_L[2 * i] = L_add( DFT_L[2 * i], l_tmp ); /* q_dft */ DFT_L[2 * i] = L_add_sat( DFT_L[2 * i], l_tmp ); /* q_dft */ move32(); #ifdef OPT_STEREO_32KBPS_V1 l_tmp = Msub_32_16( Msub_32_16( N1, N1, g ), N2, gamma ); /* q_cna_level */ l_tmp = L_shr( l_tmp, shift ); /* q_dft */ DFT_R[2 * i] = L_add( DFT_R[2 * i], l_tmp ); /* q_dft */ DFT_R[2 * i] = L_add_sat( DFT_R[2 * i], l_tmp ); /* q_dft */ #else /* OPT_STEREO_32KBPS_V1 */ l_tmp = L_sub( Msub_32_16( N1, N1, g ), Mpy_32_16_1( N2, gamma ) ); /* q_cna_level */ l_tmp = L_shr( l_tmp, sub( q_cna_level, hStereoDft->q_dft ) ); /* q_dft */ Loading @@ -2646,11 +2646,11 @@ void stereo_dft_dec_fx( #ifdef OPT_STEREO_32KBPS_V1 l_tmp = Madd_32_16( Madd_32_16( N1, N1, g ), N2, gamma ); /* q_cna_level */ l_tmp = L_shr( l_tmp, shift ); /* q_dft */ DFT_L[2 * i + 1] = L_add( DFT_L[2 * i + 1], l_tmp ); /* q_dft */ DFT_L[2 * i + 1] = L_add_sat( DFT_L[2 * i + 1], l_tmp ); /* q_dft */ move32(); l_tmp = Msub_32_16( Msub_32_16( N1, N1, g ), N2, gamma ); /* q_cna_level */ l_tmp = L_shr( l_tmp, shift ); /* q_dft */ DFT_R[2 * i + 1] = L_add( DFT_R[2 * i + 1], l_tmp ); /* q_dft */ DFT_R[2 * i + 1] = L_add_sat( DFT_R[2 * i + 1], l_tmp ); /* q_dft */ move32(); #else /* OPT_STEREO_32KBPS_V1 */ l_tmp = L_add( Madd_32_16( N1, N1, g ), Mpy_32_16_1( N2, gamma ) ); /* q_cna_level */ Loading