55 int buf_size = avpkt->
size;
77 pal = (uint32_t *)frame->
data[1];
81 for (j = 0; j < 3; j++, shift -= 8)
82 *pal += ((avctx->
extradata[i * 3 + j] << 2) |
86 memcpy(bfi->
pal, frame->
data[1],
sizeof(bfi->
pal));
92 memcpy(frame->
data[1], bfi->
pal,
sizeof(bfi->
pal));
97 while (dst != frame_end) {
98 static const uint8_t lentab[4] = { 0, 2, 0, 1 };
100 unsigned int code = byte >> 6;
101 unsigned int length = byte & ~0xC0;
105 "Input resolution larger than actual frame.\n");
112 length = bytestream2_get_byte(&g);
113 offset = bytestream2_get_le16(&g);
115 length = bytestream2_get_le16(&g);
116 if (code == 2 && length == 0)
121 offset = bytestream2_get_byte(&g);
125 if (dst + (length << lentab[code]) > frame_end)
138 dst_offset = dst -
offset;
140 if (dst_offset < bfi->dst)
143 *dst++ = *dst_offset++;
149 colour1 = bytestream2_get_byte(&g);
150 colour2 = bytestream2_get_byte(&g);
160 dst = frame->
data[0];
162 memcpy(dst, src, avctx->
width);