[FFmpeg-soc] [soc]: r4012 - amr/amrnbfloatdec.c
kmalaussene
subversion at mplayerhq.hu
Tue Jan 27 06:34:33 CET 2009
Author: kmalaussene
Date: Tue Jan 27 06:34:33 2009
New Revision: 4012
Log:
Fix decoding of pitch lag frac to match reference implementation.
Some of its value were widely out of bound.
Modified:
amr/amrnbfloatdec.c
Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c Mon Jan 26 22:44:11 2009 (r4011)
+++ amr/amrnbfloatdec.c Tue Jan 27 06:34:33 2009 (r4012)
@@ -501,8 +501,9 @@ static void decode_pitch_lag_3(AMRContex
p->pitch_lag_frac = 0;
}else if(pitch_index < 12) {
// 1/3 fractional precision for [t1_temp-1 2/3, t1_temp+2/3]
- p->pitch_lag_int = ( ((pitch_index - 5)*10923)>>15 ) + t1_temp - 1;
+ p->pitch_lag_int = ( ((pitch_index - 5)*10923)>>15 ) - 1;
p->pitch_lag_frac = pitch_index - p->pitch_lag_int*3 - 9;
+ p->pitch_lag_int += t1_temp;
}else {
// integer only precision for [t1_temp+1, t1_temp+4]
p->pitch_lag_int = pitch_index + t1_temp - 11;
More information about the FFmpeg-soc
mailing list