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);
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)];
119 int buf_size = avpkt->
size;
126 int stride, i, x, y,
b, bt = 0;
141 b = bytestream2_get_byte(&gb);
150 for (y = 0; y <
HEIGHT; y += 8) {
152 for (x = 0; x <
WIDTH; x += 8) {
154 unsigned int offset, j;
159 bt = bytestream2_get_byte(&gb);
161 block_type= bt & 0x0F;
162 switch (block_type) {
164 offset = bytestream2_get_le16(&gb);
165 if (
copy_block(avctx, out, copy_from, offset, 8, stride))
170 copy_from = newpic->
data[0];
172 for (j = 0; j < 8; j += 4) {
173 for (i = 0; i < 8; i += 4) {
174 offset = bytestream2_get_le16(&gb);
176 copy_from, offset, 4, stride))
184 for (i = 0; i < 8; i++) {
186 NULL, bytestream2_get_byte(&gb));
194 for (j = 0; j < 8; j += 4) {
195 for (i = 0; i < 8; i += 4) {
199 1, cols,
NULL, bytestream2_get_le16(&gb));
203 2, cols,
NULL, bytestream2_get_le32(&gb));
207 1, cols, grps, bytestream2_get_le16(&gb));
217 for (j = 0; j < 8; j++)
232 uint32_t *palette = (uint32_t *) newpic->
data[1];
233 for (i = 0; i < 256; i++) {
234 palette[i] = bytestream2_get_be24(&gb);
239 memcpy(newpic->
data[1], oldpic->
data[1], 256 * 4);