diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-06-19 10:02:39 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-06-19 10:02:39 +0000 |
commit | 73ff4f83446ab908b7cc19b5bba5e4197f605361 (patch) | |
tree | c0d88e0e8401c2edf8cbb36ed0c64722f33b6d37 /libavcodec/g726.c | |
parent | dca21085414f45b03c80ccee28a293edf2423c1b (diff) | |
download | ffmpeg-73ff4f83446ab908b7cc19b5bba5e4197f605361.tar.gz |
1 abs() less
Originally committed as revision 13810 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/g726.c')
-rw-r--r-- | libavcodec/g726.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/g726.c b/libavcodec/g726.c index a40521b483..434a52540c 100644 --- a/libavcodec/g726.c +++ b/libavcodec/g726.c @@ -190,15 +190,16 @@ static int16_t g726_decode(G726Context* c, int16_t I) Float11 f; dq = inverse_quant(c, I); - if (I >> (c->tbls->bits - 1)) /* get the sign */ - dq = -dq; - re_signal = c->se + dq; /* Transition detect */ ylint = (c->yl >> 15); ylfrac = (c->yl >> 10) & 0x1f; thr2 = (ylint > 9) ? 0x1f << 10 : (0x20 + ylfrac) << ylint; - tr= (c->td == 1 && abs(dq) > ((3*thr2)>>2)); + tr= (c->td == 1 && dq > ((3*thr2)>>2)); + + if (I >> (c->tbls->bits - 1)) /* get the sign */ + dq = -dq; + re_signal = c->se + dq; /* Update second order predictor coefficient A2 and A1 */ pk0 = (c->sez + dq) ? sgn(c->sez + dq) : 0; |