[FFmpeg-cvslog] r14650 - trunk/libavcodec/ra144.c

vitor subversion
Wed Aug 6 23:02:56 CEST 2008


Author: vitor
Date: Wed Aug  6 23:02:56 2008
New Revision: 14650

Log:
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).


Modified:
   trunk/libavcodec/ra144.c

Modified: trunk/libavcodec/ra144.c
==============================================================================
--- trunk/libavcodec/ra144.c	(original)
+++ trunk/libavcodec/ra144.c	Wed Aug  6 23:02:56 2008
@@ -244,16 +244,10 @@ static int eval_refl(int *refl, const in
     }
 
     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;




More information about the ffmpeg-cvslog mailing list