54 int buf_size = avpkt->
size;
57 uint8_t *src, *dst_offset, colour1, colour2;
87 for (j = 0; j < 3; j++, shift -= 8)
88 *pal += ((avctx->
extradata[i * 3 + j] << 2) |
103 while (dst != frame_end) {
104 static const uint8_t lentab[4] = { 0, 2, 0, 1 };
106 unsigned int code = byte >> 6;
107 unsigned int length = byte & ~0xC0;
111 "Input resolution larger than actual frame.\n");
118 length = bytestream2_get_byte(&g);
119 offset = bytestream2_get_le16(&g);
121 length = bytestream2_get_le16(&g);
122 if (code == 2 && length == 0)
127 offset = bytestream2_get_byte(&g);
131 if (dst + (length << lentab[code]) > frame_end)
144 dst_offset = dst -
offset;
146 if (dst_offset < bfi->dst)
149 *dst++ = *dst_offset++;
155 colour1 = bytestream2_get_byte(&g);
156 colour2 = bytestream2_get_byte(&g);
168 memcpy(dst, src, avctx->
width);