Skip to content
Snippets Groups Projects
Commit dcabb3d6 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

pngdec: implement 2 bpp interlaced.

Fixes Ticket434

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent 4f7dfe12
No related branches found
No related tags found
No related merge requests found
...@@ -69,6 +69,20 @@ static void png_put_interlaced_row(uint8_t *dst, int width, ...@@ -69,6 +69,20 @@ static void png_put_interlaced_row(uint8_t *dst, int width,
src_x++; src_x++;
} }
break; break;
case 2:
src_x = 0;
for(x = 0; x < width; x++) {
int j2 = 2*(x&3);
j = (x & 7);
if ((dsp_mask << j) & 0x80) {
b = (src[src_x >> 2] >> (6 - 2*(src_x & 3))) & 3;
dst[x >> 2] &= 0xFF3F>>j2;
dst[x >> 2] |= b << (6 - j2);
}
if ((mask << j) & 0x80)
src_x++;
}
break;
default: default:
bpp = bits_per_pixel >> 3; bpp = bits_per_pixel >> 3;
d = dst; d = dst;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment