changeset 6404:a0a1db4738dd libavcodec

simplify
author lorenm
date Tue, 26 Feb 2008 07:35:56 +0000
parents 9a736918fd90
children 7f615bfc21a2
files pngenc.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);