diff options
author | Vitor Sessak <vitor1001@gmail.com> | 2008-08-06 21:02:56 +0000 |
---|---|---|
committer | Vitor Sessak <vitor1001@gmail.com> | 2008-08-06 21:02:56 +0000 |
commit | 40812fdcf1dc74c026c93cc5168a2b10a2b0c777 (patch) | |
tree | f9f04760d00916baf8fbbe1c51a26e417867db91 /libavcodec/ra144.c | |
parent | d70875c81dbc60d7f2a38ab4f2416366c16aa3b6 (diff) | |
download | ffmpeg-40812fdcf1dc74c026c93cc5168a2b10a2b0c777.tar.gz |
Simplify range checking in eval_refl(). Before the
condition b == 0 could never be true, because it would
have already been caught in the previous ifs. Also the
condition b == 0x1000 could never be true (it would
triggered the return).
Originally committed as revision 14650 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ra144.c')
-rw-r--r-- | libavcodec/ra144.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c index 6a8349492b..116b39b8da 100644 --- a/libavcodec/ra144.c +++ b/libavcodec/ra144.c @@ -244,16 +244,10 @@ static int eval_refl(int *refl, const int16_t *coefs, RA144Context *ractx) } for (c=8; c >= 0; c--) { - if (u == 0x1000) - u++; - - if (u == 0xfffff000) - u--; - b = 0x1000-((u * u) >> 12); if (b == 0) - b++; + b = -2; for (u=0; u<=c; u++) bp1[u] = ((bp2[u] - ((refl[c+1] * bp2[c-u]) >> 12)) * (0x1000000 / b)) >> 12; |