Loading lib_com/pred_lt4_fx.c +61 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,67 @@ * (adaptive codebook excitation) * *-------------------------------------------------------------------*/ void pred_lt4_ivas_fx( const Word16 excI[], /* in : excitation buffer Q_exc*/ Word16 excO[], /* out: excitation buffer Q_exc*/ const Word16 T0, /* input : integer pitch lag Q0*/ Word16 frac, /* input : fraction of lag Q0*/ const Word16 L_subfr, /* input : subframe size Q0*/ const Word32 *win, /* i : interpolation window Q31*/ const Word16 nb_coef, /* i : nb of filter coef Q0*/ const Word16 up_sample /* i : up_sample Q0*/ ) { Word16 i, j; Word32 s; const Word16 *x0, *x1, *x2; const Word32 *c1, *c2; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif x0 = &excI[-T0]; frac = negate( frac ); IF( frac < 0 ) { frac = add( frac, up_sample ); /* Q0 */ x0--; } FOR( j = 0; j < L_subfr; j++ ) { x1 = x0++; /* Q_exc */ x2 = x1 + 1; /* Q_exc */ c1 = ( &win[frac] ); /* Q14 */ c2 = ( &win[up_sample - frac] ); /* Q14 */ { Word64 s64 = 0; move64(); FOR( i = 0; i < nb_coef; i++ ) { /*s += (*x1--) * (*c1) + (*x2++) * (*c2);*/ s64 = W_mac_32_32( s64, L_deposit_l( *x1-- ), ( *c1 ) ); /* Q_exc + Q32 */ s64 = W_mac_32_32( s64, L_deposit_l( *x2++ ), ( *c2 ) ); /* Q_exc + Q32 */ c1 += up_sample; c2 += up_sample; } s = W_sat_l( W_shr(s64,16) ); /* Q_exc + Q16 */ } #if ( INTERP_EXP != -1 ) //s = L_shl_o( s, INTERP_EXP + 1, &Overflow ); /* Q_exc + Q15 */ #endif excO[j] = round_fx_o( s, &Overflow ); /* Q_exc */ move16(); } return; } void pred_lt4( const Word16 excI[], /* in : excitation buffer Q_exc*/ Word16 excO[], /* out: excitation buffer Q_exc*/ Loading lib_com/prot_fx.h +10 −1 Original line number Diff line number Diff line Loading @@ -7182,7 +7182,16 @@ void pred_lt4( const Word16 nb_coef, /* i : nb of filter coef Q0*/ const Word16 up_sample /* i : up_sample Q0*/ ); void pred_lt4_ivas_fx( const Word16 excI[], /* in : excitation buffer Q_exc*/ Word16 excO[], /* out: excitation buffer Q_exc*/ const Word16 T0, /* input : integer pitch lag Q0*/ Word16 frac, /* input : fraction of lag Q0*/ const Word16 L_subfr, /* input : subframe size Q0*/ const Word32 *win, /* i : interpolation window Q31*/ const Word16 nb_coef, /* i : nb of filter coef Q0*/ const Word16 up_sample /* i : up_sample Q0*/ ); void pred_lt4_tc_fx( Word16 exc[], /* i/o: excitation buffer Q0*/ Loading lib_com/rom_com.c +13 −0 Original line number Diff line number Diff line Loading @@ -1332,6 +1332,19 @@ const Word16 inter4_2_fx[] = }; /* 1/4 resolution interpolation filter (-3 dB at 0.856*fs/2) */ const Word32 L_pitch_inter4_2[PIT_FIR_SIZE2] = { 2018634624, 1839083520, 1357785216, 724904576, 126856152, -281447072, -428193216, -340524320, -121030032, 102233104, 229241728, 222704784, 111802296, -32603096, -136805440, -158183648, -99851544, -2110976, 82091856, 114123720, 86026048, 19988778, -46544560, -81104016, -71266392, -27977416, 22982370, 55621972, 56517476, 29680372, -7827578, -36105644, -42638288, -27414776, -1138166, 21646636, 30326764, 22885734, 5570572, -11516955, -20066088, -17396766, -6833293, 5003637, 12101070, 11944304, 6107443, -1346472, -6427418, -7219840, -4389456, -249108, 2823941, 3633542, 2471753, 556198, -895500, -1327144, -932007, -285615, 135291, 210453, 103079, 15032, 0 }; const Word16 pitch_inter4_2[PIT_FIR_SIZE2] = { /* cut-off frequency at 0.94*fs/2 */ lib_com/rom_com.h +1 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ extern const Word16 inter4_2_fx_Q15[]; // Q15 /* 1/4 resolution interpol 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]; /*1Q14*/ extern const Word32 L_pitch_inter4_2[PIT_FIR_SIZE2]; /*1Q14*/ extern const Word16 Assym_window_W16fx[]; // Q15 extern const Word16 assym_window_16k_fx[]; // Q15 extern const Word16 grid50_fx[( GRID50_POINTS - 1 ) / 2 - 1]; // Q15 Loading lib_dec/LD_music_post_filter_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -832,7 +832,7 @@ void Prep_music_postP_fx( * Extrapolation of the last future part and windowing *------------------------------------------------------------*/ pt1 = exc_buffer_in + DCT_L_POST - OFFSET2; /*Q_exc*/ pred_lt4( pt1, pt1, s_pit, fr_pit, OFFSET2, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP ); pred_lt4_ivas_fx( pt1, pt1, s_pit, fr_pit, OFFSET2, L_pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP ); /*------------------------------------------------------------* * windowing right side *------------------------------------------------------------*/ Loading Loading
lib_com/pred_lt4_fx.c +61 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,67 @@ * (adaptive codebook excitation) * *-------------------------------------------------------------------*/ void pred_lt4_ivas_fx( const Word16 excI[], /* in : excitation buffer Q_exc*/ Word16 excO[], /* out: excitation buffer Q_exc*/ const Word16 T0, /* input : integer pitch lag Q0*/ Word16 frac, /* input : fraction of lag Q0*/ const Word16 L_subfr, /* input : subframe size Q0*/ const Word32 *win, /* i : interpolation window Q31*/ const Word16 nb_coef, /* i : nb of filter coef Q0*/ const Word16 up_sample /* i : up_sample Q0*/ ) { Word16 i, j; Word32 s; const Word16 *x0, *x1, *x2; const Word32 *c1, *c2; #ifdef BASOP_NOGLOB_DECLARE_LOCAL Flag Overflow = 0; move32(); #endif x0 = &excI[-T0]; frac = negate( frac ); IF( frac < 0 ) { frac = add( frac, up_sample ); /* Q0 */ x0--; } FOR( j = 0; j < L_subfr; j++ ) { x1 = x0++; /* Q_exc */ x2 = x1 + 1; /* Q_exc */ c1 = ( &win[frac] ); /* Q14 */ c2 = ( &win[up_sample - frac] ); /* Q14 */ { Word64 s64 = 0; move64(); FOR( i = 0; i < nb_coef; i++ ) { /*s += (*x1--) * (*c1) + (*x2++) * (*c2);*/ s64 = W_mac_32_32( s64, L_deposit_l( *x1-- ), ( *c1 ) ); /* Q_exc + Q32 */ s64 = W_mac_32_32( s64, L_deposit_l( *x2++ ), ( *c2 ) ); /* Q_exc + Q32 */ c1 += up_sample; c2 += up_sample; } s = W_sat_l( W_shr(s64,16) ); /* Q_exc + Q16 */ } #if ( INTERP_EXP != -1 ) //s = L_shl_o( s, INTERP_EXP + 1, &Overflow ); /* Q_exc + Q15 */ #endif excO[j] = round_fx_o( s, &Overflow ); /* Q_exc */ move16(); } return; } void pred_lt4( const Word16 excI[], /* in : excitation buffer Q_exc*/ Word16 excO[], /* out: excitation buffer Q_exc*/ Loading
lib_com/prot_fx.h +10 −1 Original line number Diff line number Diff line Loading @@ -7182,7 +7182,16 @@ void pred_lt4( const Word16 nb_coef, /* i : nb of filter coef Q0*/ const Word16 up_sample /* i : up_sample Q0*/ ); void pred_lt4_ivas_fx( const Word16 excI[], /* in : excitation buffer Q_exc*/ Word16 excO[], /* out: excitation buffer Q_exc*/ const Word16 T0, /* input : integer pitch lag Q0*/ Word16 frac, /* input : fraction of lag Q0*/ const Word16 L_subfr, /* input : subframe size Q0*/ const Word32 *win, /* i : interpolation window Q31*/ const Word16 nb_coef, /* i : nb of filter coef Q0*/ const Word16 up_sample /* i : up_sample Q0*/ ); void pred_lt4_tc_fx( Word16 exc[], /* i/o: excitation buffer Q0*/ Loading
lib_com/rom_com.c +13 −0 Original line number Diff line number Diff line Loading @@ -1332,6 +1332,19 @@ const Word16 inter4_2_fx[] = }; /* 1/4 resolution interpolation filter (-3 dB at 0.856*fs/2) */ const Word32 L_pitch_inter4_2[PIT_FIR_SIZE2] = { 2018634624, 1839083520, 1357785216, 724904576, 126856152, -281447072, -428193216, -340524320, -121030032, 102233104, 229241728, 222704784, 111802296, -32603096, -136805440, -158183648, -99851544, -2110976, 82091856, 114123720, 86026048, 19988778, -46544560, -81104016, -71266392, -27977416, 22982370, 55621972, 56517476, 29680372, -7827578, -36105644, -42638288, -27414776, -1138166, 21646636, 30326764, 22885734, 5570572, -11516955, -20066088, -17396766, -6833293, 5003637, 12101070, 11944304, 6107443, -1346472, -6427418, -7219840, -4389456, -249108, 2823941, 3633542, 2471753, 556198, -895500, -1327144, -932007, -285615, 135291, 210453, 103079, 15032, 0 }; const Word16 pitch_inter4_2[PIT_FIR_SIZE2] = { /* cut-off frequency at 0.94*fs/2 */
lib_com/rom_com.h +1 −0 Original line number Diff line number Diff line Loading @@ -176,6 +176,7 @@ extern const Word16 inter4_2_fx_Q15[]; // Q15 /* 1/4 resolution interpol 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]; /*1Q14*/ extern const Word32 L_pitch_inter4_2[PIT_FIR_SIZE2]; /*1Q14*/ extern const Word16 Assym_window_W16fx[]; // Q15 extern const Word16 assym_window_16k_fx[]; // Q15 extern const Word16 grid50_fx[( GRID50_POINTS - 1 ) / 2 - 1]; // Q15 Loading
lib_dec/LD_music_post_filter_fx.c +1 −1 Original line number Diff line number Diff line Loading @@ -832,7 +832,7 @@ void Prep_music_postP_fx( * Extrapolation of the last future part and windowing *------------------------------------------------------------*/ pt1 = exc_buffer_in + DCT_L_POST - OFFSET2; /*Q_exc*/ pred_lt4( pt1, pt1, s_pit, fr_pit, OFFSET2, pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP ); pred_lt4_ivas_fx( pt1, pt1, s_pit, fr_pit, OFFSET2, L_pitch_inter4_2, L_INTERPOL2, PIT_UP_SAMP ); /*------------------------------------------------------------* * windowing right side *------------------------------------------------------------*/ Loading