# HG changeset patch # User michael # Date 1213869759 0 # Node ID 4630168a70d53bf81561a7b5063591c7548a2be1 # Parent f23e64bcec1e2be3e0b5206b350fb7b8ca0220ad 1 abs() less diff -r f23e64bcec1e -r 4630168a70d5 g726.c --- a/g726.c Wed Jun 18 21:09:36 2008 +0000 +++ b/g726.c Thu Jun 19 10:02:39 2008 +0000 @@ -190,15 +190,16 @@ 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;