[FFmpeg-cvslog] r12224 - trunk/libavcodec/pngenc.c

lorenm subversion
Tue Feb 26 08:35:56 CET 2008


Author: lorenm
Date: Tue Feb 26 08:35:56 2008
New Revision: 12224

Log:
simplify


Modified:
   trunk/libavcodec/pngenc.c

Modified: trunk/libavcodec/pngenc.c
==============================================================================
--- trunk/libavcodec/pngenc.c	(original)
+++ trunk/libavcodec/pngenc.c	Tue Feb 26 08:35:56 2008
@@ -158,7 +158,7 @@ static uint8_t *png_choose_filter(PNGEnc
             buf1[0] = pred;
             cost = 0;
             for(i=0; i<=size; i++)
-                cost += abs(0x80 - (buf1[i] ^ 0x80));
+                cost += abs((int8_t)buf1[i]);
             if(cost < bcost) {
                 bcost = cost;
                 FFSWAP(uint8_t*, buf1, buf2);




More information about the ffmpeg-cvslog mailing list