aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/g726.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-06-19 11:04:31 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-06-19 11:04:31 +0000
commit74d9441715a2c4b459df50f40025eac5ccb15e96 (patch)
tree194653de14c5b000ba0d2a2d887f56d9b639d5a2 /libavcodec/g726.c
parent50c52d22502d649db0fdecde6de64532e20c5dda (diff)
downloadffmpeg-74d9441715a2c4b459df50f40025eac5ccb15e96.tar.gz
Do not shift F[I] twice, it is also clearer and smaller now.
Originally committed as revision 13818 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/g726.c')
-rw-r--r--libavcodec/g726.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index 9d4c87d66b..bace3d045b 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -235,8 +235,8 @@ static int16_t g726_decode(G726Context* c, int I)
c->td = c->a[1] < -11776;
/* Update Ap */
- c->dms += ((c->tbls.F[I]<<9) - c->dms) >> 5;
- c->dml += ((c->tbls.F[I]<<11) - c->dml) >> 7;
+ c->dms += (c->tbls.F[I]<<4) + ((- c->dms) >> 5);
+ c->dml += (c->tbls.F[I]<<4) + ((- c->dml) >> 7);
if (tr)
c->ap = 256;
else {