]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
Simplify range checking in eval_refl(). Before the
authorvitor <vitor@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 6 Aug 2008 21:02:56 +0000 (21:02 +0000)
committervitor <vitor@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 6 Aug 2008 21:02:56 +0000 (21:02 +0000)
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).

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@14650 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavcodec/ra144.c

index 6a8349492b3ebc138f76eb3493cf775468766efb..116b39b8dacdea722bc9285832c60004de64ff6c 100644 (file)
@@ -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;