changeset 7063:cd085c1c5103 libavcodec

simplify
author michael
date Wed, 18 Jun 2008 20:54:21 +0000
parents fb6038ffd2a9
children f227dcbd4755
files g726.c
diffstat 1 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/g726.c	Wed Jun 18 20:51:12 2008 +0000
+++ b/g726.c	Wed Jun 18 20:54:21 2008 +0000
@@ -198,10 +198,7 @@
     ylint = (c->yl >> 15);
     ylfrac = (c->yl >> 10) & 0x1f;
     thr2 = (ylint > 9) ? 0x1f << 10 : (0x20 + ylfrac) << ylint;
-    if (c->td == 1 && abs(dq) > ((thr2+(thr2>>1))>>1))
-        tr = 1;
-    else
-        tr = 0;
+    tr= (c->td == 1 && abs(dq) > ((3*thr2)>>2));
 
     /* Update second order predictor coefficient A2 and A1 */
     pk0 = (c->sez + dq) ? sgn(c->sez + dq) : 0;