Simplify an expression and eliminate a compile warning
authorPhilip Gladstone <philipjsg@users.sourceforge.net>
Sat, 30 Nov 2002 17:14:07 +0000 (17:14 +0000)
committerPhilip Gladstone <philipjsg@users.sourceforge.net>
Sat, 30 Nov 2002 17:14:07 +0000 (17:14 +0000)
Originally committed as revision 1293 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/imgresample.c

index 630f2eb..b1cfab9 100644 (file)
@@ -308,7 +308,7 @@ void v_resample16_altivec(UINT8 *dst, int dst_width, UINT8 *src, int wrap,
        we opt for aligned writes, as unaligned writes have a huge overhead.
        To do this, do enough scalar resamples to get dst 16-byte aligned.
     */
-    i = (16-((int)dst) & 0xf) & 0xf;
+    i = (-(int)dst) & 0xf;
     while(i>0) {
         sum = s[0 * wrap] * filter[0] +
         s[1 * wrap] * filter[1] +