46 #define C93_HAS_PALETTE 0x01
47 #define C93_FIRST_FRAME 0x02
79 int from_x = offset %
WIDTH;
80 int from_y = offset /
WIDTH;
81 int overflow = from_x + width -
WIDTH;
88 if (from_y + height >
HEIGHT) {
96 for (i = 0; i <
height; i++) {
97 memcpy(&to[i*stride+width], &from[(from_y+i)*stride], overflow);
101 for (i = 0; i <
height; i++) {
102 memcpy(&to[i*stride], &from[(from_y+i)*stride+from_x], width);
112 for (y = 0; y <
height; y++) {
114 cols[0] = grps[3 * (y >> 1)];
115 for (x = 0; x <
width; x++) {
117 cols[1]= grps[(x >> 1) + 1];
118 out[x + y*stride] = cols[col & ((1 << bpp) - 1)];
128 int buf_size = avpkt->
size;
147 b = bytestream2_get_byte(&gb);
156 for (y = 0; y <
HEIGHT; y += 8) {
157 out = newpic->
data[0] + y * stride;
158 for (x = 0; x <
WIDTH; x += 8) {
165 bt = bytestream2_get_byte(&gb);
167 block_type= bt & 0x0F;
168 switch (block_type) {
170 offset = bytestream2_get_le16(&gb);
171 if ((ret =
copy_block(avctx, out, copy_from, offset, 8, stride)) < 0)
176 copy_from = newpic->
data[0];
178 for (j = 0; j < 8; j += 4) {
179 for (i = 0; i < 8; i += 4) {
180 int offset = bytestream2_get_le16(&gb);
181 int from_x = offset %
WIDTH;
182 int from_y = offset /
WIDTH;
184 (
FFABS(from_x - x-i) < 4 ||
FFABS(from_x - x-i) > WIDTH-4)) {
188 if ((ret =
copy_block(avctx, &out[j*stride+i],
189 copy_from, offset, 4, stride)) < 0)
197 for (i = 0; i < 8; i++) {
199 NULL, bytestream2_get_byte(&gb));
207 for (j = 0; j < 8; j += 4) {
208 for (i = 0; i < 8; i += 4) {
212 1, cols,
NULL, bytestream2_get_le16(&gb));
216 2, cols,
NULL, bytestream2_get_le32(&gb));
220 1, cols, grps, bytestream2_get_le16(&gb));
230 for (j = 0; j < 8; j++)
246 for (i = 0; i < 256; i++) {
247 palette[i] = 0xFF
U << 24 | bytestream2_get_be24(&gb);
252 memcpy(newpic->
data[1], oldpic->
data[1], 256 * 4);