changeset 7513:e19d0c9f50ce libavcodec

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).
author vitor
date Wed, 06 Aug 2008 21:02:56 +0000
parents 60625fc3ec92
children e0e075680996
files ra144.c
diffstat 1 files changed, 1 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ra144.c	Wed Aug 06 20:39:28 2008 +0000
+++ b/ra144.c	Wed Aug 06 21:02:56 2008 +0000
@@ -244,16 +244,10 @@
     }
 
     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;