diff g726.c @ 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 85ab7655ad4d
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 {