mirror of https://git.ffmpeg.org/ffmpeg.git
simplify
Originally committed as revision 12224 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
97d1d009e2
commit
00829b9bc1
|
@ -158,7 +158,7 @@ static uint8_t *png_choose_filter(PNGEncContext *s, uint8_t *dst,
|
||||||
buf1[0] = pred;
|
buf1[0] = pred;
|
||||||
cost = 0;
|
cost = 0;
|
||||||
for(i=0; i<=size; i++)
|
for(i=0; i<=size; i++)
|
||||||
cost += abs(0x80 - (buf1[i] ^ 0x80));
|
cost += abs((int8_t)buf1[i]);
|
||||||
if(cost < bcost) {
|
if(cost < bcost) {
|
||||||
bcost = cost;
|
bcost = cost;
|
||||||
FFSWAP(uint8_t*, buf1, buf2);
|
FFSWAP(uint8_t*, buf1, buf2);
|
||||||
|
|
Loading…
Reference in New Issue