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;
146 b = bytestream2_get_byte(&gb);
155 for (y = 0; y <
HEIGHT; y += 8) {
157 for (x = 0; x <
WIDTH; x += 8) {
164 bt = bytestream2_get_byte(&gb);
166 block_type= bt & 0x0F;
167 switch (block_type) {
169 offset = bytestream2_get_le16(&gb);
170 if ((ret =
copy_block(avctx, out, copy_from, offset, 8, stride)) < 0)
175 copy_from = newpic->
data[0];
177 for (j = 0; j < 8; j += 4) {
178 for (i = 0; i < 8; i += 4) {
179 int offset = bytestream2_get_le16(&gb);
180 int from_x = offset %
WIDTH;
181 int from_y = offset /
WIDTH;
183 (
FFABS(from_x - x-i) < 4 ||
FFABS(from_x - x-i) > WIDTH-4)) {
187 if ((ret =
copy_block(avctx, &out[j*stride+i],
188 copy_from, offset, 4, stride)) < 0)
196 for (i = 0; i < 8; i++) {
198 NULL, bytestream2_get_byte(&gb));
206 for (j = 0; j < 8; j += 4) {
207 for (i = 0; i < 8; i += 4) {
211 1, cols, NULL, bytestream2_get_le16(&gb));
215 2, cols, NULL, bytestream2_get_le32(&gb));
219 1, cols, grps, bytestream2_get_le16(&gb));
229 for (j = 0; j < 8; j++)
245 for (i = 0; i < 256; i++) {
246 palette[i] = 0xFF
U << 24 | bytestream2_get_be24(&gb);
251 memcpy(newpic->
data[1], oldpic->
data[1], 256 * 4);