Mercurial > libavcodec.hg
changeset 7067:4630168a70d5 libavcodec
1 abs() less
author | michael |
---|---|
date | Thu, 19 Jun 2008 10:02:39 +0000 |
parents | f23e64bcec1e |
children | 6497251e2fde |
files | g726.c |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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;