45 #define C93_HAS_PALETTE 0x01
46 #define C93_FIRST_FRAME 0x02
70 int from_x = offset %
WIDTH;
71 int from_y = offset /
WIDTH;
72 int overflow = from_x + width -
WIDTH;
79 if (from_y + height >
HEIGHT) {
87 for (i = 0; i <
height; i++) {
88 memcpy(&to[i*stride+width], &from[(from_y+i)*stride], overflow);
92 for (i = 0; i <
height; i++) {
93 memcpy(&to[i*stride], &from[(from_y+i)*stride+from_x], width);
100 int height,
int bpp, uint8_t cols[4], uint8_t grps[4], uint32_t col)
103 for (y = 0; y <
height; y++) {
105 cols[0] = grps[3 * (y >> 1)];
106 for (x = 0; x <
width; x++) {
108 cols[1]= grps[(x >> 1) + 1];
109 out[x + y*
stride] = cols[col & ((1 << bpp) - 1)];
118 const uint8_t *buf = avpkt->
data;
119 int buf_size = avpkt->
size;
125 int stride, i, x, y, bt = 0;
149 const uint8_t *palbuf = buf + buf_size - 768 - 1;
150 for (i = 0; i < 256; i++) {
151 palette[i] = bytestream_get_be24(&palbuf);
155 memcpy(newpic->
data[1], oldpic->
data[1], 256 * 4);
158 for (y = 0; y <
HEIGHT; y += 8) {
160 for (x = 0; x <
WIDTH; x += 8) {
162 unsigned int offset, j;
163 uint8_t cols[4], grps[4];
169 block_type= bt & 0x0F;
170 switch (block_type) {
172 offset = bytestream_get_le16(&buf);
173 if (
copy_block(avctx, out, copy_from, offset, 8, stride))
178 copy_from = newpic->
data[0];
180 for (j = 0; j < 8; j += 4) {
181 for (i = 0; i < 8; i += 4) {
182 offset = bytestream_get_le16(&buf);
184 copy_from, offset, 4, stride))
192 for (i = 0; i < 8; i++) {
202 for (j = 0; j < 8; j += 4) {
203 for (i = 0; i < 8; i += 4) {
207 1, cols,
NULL, bytestream_get_le16(&buf));
211 2, cols,
NULL, bytestream_get_le32(&buf));
215 1, cols, grps, bytestream_get_le16(&buf));
225 for (j = 0; j < 8; j++)