diff pngenc.c @ 6404:a0a1db4738dd libavcodec

simplify
author lorenm
date Tue, 26 Feb 2008 07:35:56 +0000
parents 2d7afa1bc573
children 48759bfbd073
line wrap: on
line diff
--- a/pngenc.c	Mon Feb 25 23:14:22 2008 +0000
+++ b/pngenc.c	Tue Feb 26 07:35:56 2008 +0000
@@ -158,7 +158,7 @@
             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);