Mercurial > libavcodec.hg
comparison g726.c @ 7067:4630168a70d5 libavcodec
1 abs() less
author | michael |
---|---|
date | Thu, 19 Jun 2008 10:02:39 +0000 |
parents | f23e64bcec1e |
children | 92bcfa9ba977 |
comparison
equal
deleted
inserted
replaced
7066:f23e64bcec1e | 7067:4630168a70d5 |
---|---|
188 { | 188 { |
189 int dq, re_signal, pk0, fa1, i, tr, ylint, ylfrac, thr2, al, dq0; | 189 int dq, re_signal, pk0, fa1, i, tr, ylint, ylfrac, thr2, al, dq0; |
190 Float11 f; | 190 Float11 f; |
191 | 191 |
192 dq = inverse_quant(c, I); | 192 dq = inverse_quant(c, I); |
193 if (I >> (c->tbls->bits - 1)) /* get the sign */ | |
194 dq = -dq; | |
195 re_signal = c->se + dq; | |
196 | 193 |
197 /* Transition detect */ | 194 /* Transition detect */ |
198 ylint = (c->yl >> 15); | 195 ylint = (c->yl >> 15); |
199 ylfrac = (c->yl >> 10) & 0x1f; | 196 ylfrac = (c->yl >> 10) & 0x1f; |
200 thr2 = (ylint > 9) ? 0x1f << 10 : (0x20 + ylfrac) << ylint; | 197 thr2 = (ylint > 9) ? 0x1f << 10 : (0x20 + ylfrac) << ylint; |
201 tr= (c->td == 1 && abs(dq) > ((3*thr2)>>2)); | 198 tr= (c->td == 1 && dq > ((3*thr2)>>2)); |
199 | |
200 if (I >> (c->tbls->bits - 1)) /* get the sign */ | |
201 dq = -dq; | |
202 re_signal = c->se + dq; | |
202 | 203 |
203 /* Update second order predictor coefficient A2 and A1 */ | 204 /* Update second order predictor coefficient A2 and A1 */ |
204 pk0 = (c->sez + dq) ? sgn(c->sez + dq) : 0; | 205 pk0 = (c->sez + dq) ? sgn(c->sez + dq) : 0; |
205 dq0 = dq ? sgn(dq) : 0; | 206 dq0 = dq ? sgn(dq) : 0; |
206 if (tr) { | 207 if (tr) { |