changeset 7074:6f70dc804076 libavcodec

Do not shift F[I] twice, it is also clearer and smaller now.
author michael
date Thu, 19 Jun 2008 11:04:31 +0000
parents 33dc1d1705f0
children f34ca79e96f4
files g726.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/g726.c	Thu Jun 19 11:00:17 2008 +0000
+++ b/g726.c	Thu Jun 19 11:04:31 2008 +0000
@@ -235,8 +235,8 @@
     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 {