Loading lib_enc/tcx_ltp_enc_fx.c +17 −7 Original line number Diff line number Diff line Loading @@ -553,7 +553,7 @@ static void tcx_ltp_pitch_search_fx( } } #ifndef FIX_2479_HARM_PITCH_GAIN static void tcx_ltp_find_gain( Word16 *speech, Word16 *pred_speech, Word16 L_frame, Word16 *gain, Word16 *gain_index ) { Word32 corr, ener; Loading Loading @@ -600,8 +600,12 @@ static void tcx_ltp_find_gain( Word16 *speech, Word16 *pred_speech, Word16 L_fra *gain = imult1616( add( g, 1 ), 0x1400 ); move16(); } #endif // !FIX_2479_HARM_PITCH_GAIN #ifndef FIX_2479_HARM_PITCH_GAIN static void tcx_ltp_find_gain_ivas_fx(Word16* speech /*Qx*/, Word16* pred_speech /*Qx*/, Word16 L_frame, Word16* gain, Word16* gain_index) #else static void tcx_ltp_find_gain_fx(Word16* speech /*Qx*/, Word16* pred_speech /*Qx*/, Word16 L_frame, Word16* gain, Word16* gain_index) #endif // !FIX_2479_HARM_PITCH_GAIN { Word32 corr, ener; Word16 i, g, s1, s2, tmp; Loading Loading @@ -789,8 +793,11 @@ void tcx_ltp_encode_fx( predict_signal( speech, pred_speech, *pitch_int, *pitch_fr, pitres, L_frame ); /* Find gain */ #ifndef FIX_2479_HARM_PITCH_GAIN tcx_ltp_find_gain(speech, pred_speech, L_frame, gain, <p_param[2]); #else tcx_ltp_find_gain_fx(speech, pred_speech, L_frame, gain, <p_param[2]); #endif // !FIX_2479_HARM_PITCH_GAIN /* Total number of bits for LTP */ IF( NE_16( ltp_param[2], -1 ) ) /* gain > 0 */ { Loading Loading @@ -1207,8 +1214,11 @@ void tcx_ltp_encode_ivas_fx( predict_signal( speech_fx, pred_speech_fx, hTcxEnc->tcxltp_pitch_int, hTcxEnc->tcxltp_pitch_fr, st->pit_res_max, L_frame ); /* Find gain */ #ifndef FIX_2479_HARM_PITCH_GAIN tcx_ltp_find_gain_ivas_fx(speech_fx, pred_speech_fx, L_frame, &hTcxEnc->tcxltp_gain, <p_param[2]); #else tcx_ltp_find_gain_fx(speech_fx, pred_speech_fx, L_frame, &hTcxEnc->tcxltp_gain, <p_param[2]); #endif // !FIX_2479_HARM_PITCH_GAIN IF( ltp_param[0] ) { /* Total number of bits for LTP */ Loading Loading
lib_enc/tcx_ltp_enc_fx.c +17 −7 Original line number Diff line number Diff line Loading @@ -553,7 +553,7 @@ static void tcx_ltp_pitch_search_fx( } } #ifndef FIX_2479_HARM_PITCH_GAIN static void tcx_ltp_find_gain( Word16 *speech, Word16 *pred_speech, Word16 L_frame, Word16 *gain, Word16 *gain_index ) { Word32 corr, ener; Loading Loading @@ -600,8 +600,12 @@ static void tcx_ltp_find_gain( Word16 *speech, Word16 *pred_speech, Word16 L_fra *gain = imult1616( add( g, 1 ), 0x1400 ); move16(); } #endif // !FIX_2479_HARM_PITCH_GAIN #ifndef FIX_2479_HARM_PITCH_GAIN static void tcx_ltp_find_gain_ivas_fx(Word16* speech /*Qx*/, Word16* pred_speech /*Qx*/, Word16 L_frame, Word16* gain, Word16* gain_index) #else static void tcx_ltp_find_gain_fx(Word16* speech /*Qx*/, Word16* pred_speech /*Qx*/, Word16 L_frame, Word16* gain, Word16* gain_index) #endif // !FIX_2479_HARM_PITCH_GAIN { Word32 corr, ener; Word16 i, g, s1, s2, tmp; Loading Loading @@ -789,8 +793,11 @@ void tcx_ltp_encode_fx( predict_signal( speech, pred_speech, *pitch_int, *pitch_fr, pitres, L_frame ); /* Find gain */ #ifndef FIX_2479_HARM_PITCH_GAIN tcx_ltp_find_gain(speech, pred_speech, L_frame, gain, <p_param[2]); #else tcx_ltp_find_gain_fx(speech, pred_speech, L_frame, gain, <p_param[2]); #endif // !FIX_2479_HARM_PITCH_GAIN /* Total number of bits for LTP */ IF( NE_16( ltp_param[2], -1 ) ) /* gain > 0 */ { Loading Loading @@ -1207,8 +1214,11 @@ void tcx_ltp_encode_ivas_fx( predict_signal( speech_fx, pred_speech_fx, hTcxEnc->tcxltp_pitch_int, hTcxEnc->tcxltp_pitch_fr, st->pit_res_max, L_frame ); /* Find gain */ #ifndef FIX_2479_HARM_PITCH_GAIN tcx_ltp_find_gain_ivas_fx(speech_fx, pred_speech_fx, L_frame, &hTcxEnc->tcxltp_gain, <p_param[2]); #else tcx_ltp_find_gain_fx(speech_fx, pred_speech_fx, L_frame, &hTcxEnc->tcxltp_gain, <p_param[2]); #endif // !FIX_2479_HARM_PITCH_GAIN IF( ltp_param[0] ) { /* Total number of bits for LTP */ Loading