53 int buf_size = avpkt->
size;
75 pal = (uint32_t *)frame->
data[1];
79 for (j = 0; j < 3; j++, shift -= 8)
80 *pal += ((avctx->
extradata[i * 3 + j] << 2) |
84 memcpy(bfi->
pal, frame->
data[1],
sizeof(bfi->
pal));
90 memcpy(frame->
data[1], bfi->
pal,
sizeof(bfi->
pal));
95 while (dst != frame_end) {
96 static const uint8_t lentab[4] = { 0, 2, 0, 1 };
98 unsigned int code = byte >> 6;
99 unsigned int length = byte & ~0xC0;
103 "Input resolution larger than actual frame.\n");
110 length = bytestream2_get_byte(&g);
111 offset = bytestream2_get_le16(&g);
113 length = bytestream2_get_le16(&g);
114 if (code == 2 && length == 0)
119 offset = bytestream2_get_byte(&g);
123 if (dst + (length << lentab[code]) > frame_end)
136 dst_offset = dst -
offset;
138 if (dst_offset < bfi->dst)
141 *dst++ = *dst_offset++;
147 colour1 = bytestream2_get_byte(&g);
148 colour2 = bytestream2_get_byte(&g);
158 dst = frame->
data[0];
160 memcpy(dst, src, avctx->
width);