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) {
140 chunk_type = bytestream2_get_be32(&gb);
143 (chunk_type == 0x3 || chunk_type == 0x3d)) {
145 uint32_t *pal_out = (uint32_t *)frame->
data[1];
158 chunk_type = bytestream2_get_be32(&gb);
159 data_len = bytestream2_get_be32(&gb);
161 if (chunk_type != 0x21 || data_len != 1032 ||
167 for (i = 0; i < 256; ++i) {
169 *pal_out++ = (0xFF
U << 24) | bytestream2_get_be24u(&gb);
175 chunk_type = bytestream2_get_be32(&gb);
177 uint32_t *pal_out = (uint32_t *)frame->
data[1];
180 for (i = 0; i < 256; ++i) {
181 *pal_out++ = (0xFF
U << 24) | (i * 0x010101);
186 data_len = bytestream2_get_be32(&gb);
191 unsigned int bytes_per_scanline = bytes_pp * hdr.
width;
194 if (chunk_type != 0x21 || data_len != bytes_left ||
195 bytes_left / bytes_per_scanline < hdr.
height)
204 bytes_per_scanline, hdr.
height);
213 .
name =
"brender_pix",