[FFmpeg-cvslog] r13810 - trunk/libavcodec/g726.c

michael subversion
Thu Jun 19 12:02:40 CEST 2008


Author: michael
Date: Thu Jun 19 12:02:39 2008
New Revision: 13810

Log:
1 abs() less


Modified:
   trunk/libavcodec/g726.c

Modified: trunk/libavcodec/g726.c
==============================================================================
--- trunk/libavcodec/g726.c	(original)
+++ trunk/libavcodec/g726.c	Thu Jun 19 12:02:39 2008
@@ -190,15 +190,16 @@ static int16_t g726_decode(G726Context* 
     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;




More information about the ffmpeg-cvslog mailing list