40 unsigned int header_len = bytestream2_get_be32(pgb);
42 out->
format = bytestream2_get_byte(pgb);
44 out->
width = bytestream2_get_be16(pgb);
45 out->
height = bytestream2_get_be16(pgb);
48 if (header_len < 11) {
59 void *
data,
int *got_frame,
67 unsigned int bytes_pp;
69 unsigned int magic[4];
70 unsigned int chunk_type;
71 unsigned int data_len;
76 magic[0] = bytestream2_get_be32(&gb);
77 magic[1] = bytestream2_get_be32(&gb);
78 magic[2] = bytestream2_get_be32(&gb);
79 magic[3] = bytestream2_get_be32(&gb);
81 if (magic[0] != 0x12 ||
89 chunk_type = bytestream2_get_be32(&gb);
90 if (chunk_type != 0x3 && chunk_type != 0x3d) {
137 chunk_type = bytestream2_get_be32(&gb);
140 (chunk_type == 0x3 || chunk_type == 0x3d)) {
142 uint32_t *pal_out = (uint32_t *)frame->
data[1];
155 chunk_type = bytestream2_get_be32(&gb);
156 data_len = bytestream2_get_be32(&gb);
158 if (chunk_type != 0x21 || data_len != 1032 ||
164 for (i = 0; i < 256; ++i) {
166 *pal_out++ = (0xFF
U << 24) | bytestream2_get_be24u(&gb);
172 chunk_type = bytestream2_get_be32(&gb);
174 uint32_t *pal_out = (uint32_t *)frame->
data[1];
177 for (i = 0; i < 256; ++i) {
178 *pal_out++ = (0xFF
U << 24) | (i * 0x010101);
183 data_len = bytestream2_get_be32(&gb);
188 unsigned int bytes_per_scanline = bytes_pp * hdr.
width;
191 if (chunk_type != 0x21 || data_len != bytes_left ||
192 bytes_left / bytes_per_scanline < hdr.
height)
201 bytes_per_scanline, hdr.
height);
210 .
name =
"brender_pix",