45 #define C93_HAS_PALETTE 0x01
46 #define C93_FIRST_FRAME 0x02
74 int from_x = offset %
WIDTH;
75 int from_y = offset /
WIDTH;
76 int overflow = from_x + width -
WIDTH;
83 if (from_y + height >
HEIGHT) {
91 for (i = 0; i <
height; i++) {
92 memcpy(&to[i*stride+width], &from[(from_y+i)*stride], overflow);
96 for (i = 0; i <
height; i++) {
97 memcpy(&to[i*stride], &from[(from_y+i)*stride+from_x], width);
107 for (y = 0; y <
height; y++) {
109 cols[0] = grps[3 * (y >> 1)];
110 for (x = 0; x <
width; x++) {
112 cols[1]= grps[(x >> 1) + 1];
113 out[x + y*
stride] = cols[col & ((1 << bpp) - 1)];
123 int buf_size = avpkt->
size;
130 int stride, ret, i, x,
y,
b, bt = 0;
145 b = bytestream2_get_byte(&gb);
154 for (y = 0; y <
HEIGHT; y += 8) {
156 for (x = 0; x <
WIDTH; x += 8) {
163 bt = bytestream2_get_byte(&gb);
165 block_type= bt & 0x0F;
166 switch (block_type) {
168 offset = bytestream2_get_le16(&gb);
169 if ((ret =
copy_block(avctx, out, copy_from, offset, 8, stride)) < 0)
174 copy_from = newpic->
data[0];
176 for (j = 0; j < 8; j += 4) {
177 for (i = 0; i < 8; i += 4) {
178 offset = bytestream2_get_le16(&gb);
179 if ((ret =
copy_block(avctx, &out[j*stride+i],
180 copy_from, offset, 4, stride)) < 0)
188 for (i = 0; i < 8; i++) {
190 NULL, bytestream2_get_byte(&gb));
198 for (j = 0; j < 8; j += 4) {
199 for (i = 0; i < 8; i += 4) {
203 1, cols,
NULL, bytestream2_get_le16(&gb));
207 2, cols,
NULL, bytestream2_get_le32(&gb));
211 1, cols, grps, bytestream2_get_le16(&gb));
221 for (j = 0; j < 8; j++)
237 for (i = 0; i < 256; i++) {
238 palette[i] = 0xFF
U << 24 | bytestream2_get_be24(&gb);
243 memcpy(newpic->
data[1], oldpic->
data[1], 256 * 4);