[soc]: r4380 - amr/amrnbfloatdec.c
Author: cmcq Date: Thu Jun 4 01:00:21 2009 New Revision: 4380 Log: 5.15 and 4.75 kbit/s modes don't reset pitch lag in third subframe Modified: amr/amrnbfloatdec.c Modified: amr/amrnbfloatdec.c ============================================================================== --- amr/amrnbfloatdec.c Wed Jun 3 21:04:54 2009 (r4379) +++ amr/amrnbfloatdec.c Thu Jun 4 01:00:21 2009 (r4380) @@ -365,6 +365,8 @@ static void lsp2lpc(float *lsp, float *l * of the pitch lag for one subframe at 1/6 resolution for MODE_122, * 1/3 for other modes. * + * The choice of pitch lag is described in 3GPP TS 26.090 section 5.6.1. + * * @param lag_int integer part of pitch lag of the current subframe * @param lag_frac fractional part of pitch lag of the current subframe * @param pitch_index parsed adaptive codebook (pitch) index @@ -376,8 +378,8 @@ static void decode_pitch_lag(int *lag_in const int prev_lag_int, const int subframe, const enum Mode mode) { - // subframe 1 or 3 - if (!(subframe & 1)) { + if (subframe == 0 || + (subframe == 2 && mode != MODE_475 && mode != MODE_515)) { if (mode == MODE_122) { if (pitch_index < 463) { *lag_int = (pitch_index + 5) / 6 + 17; @@ -394,7 +396,6 @@ static void decode_pitch_lag(int *lag_in *lag_int = pitch_index - 112; *lag_frac = 0; } - // subframe 2 or 4 } else { if (mode == MODE_122) { *lag_int = (pitch_index + 5) / 6 - 1;
participants (1)
-
cmcq