49 static const int shift1[6] = { 0, 8, 8, 8, 4, 4 };
50 static const int shift2[6] = { 0, 0, 8, 4, 0, 4 };
57 int type, x,
y, d, d2;
61 data = code + ((avctx->
width * avctx->
height) >> 4);
65 for(j = 0; j < avctx->
height; j += 4){
66 for(i = 0; i < avctx->
width; i += 4){
72 x = (*mv) >> 4;
if(x & 8) x = 8 - x;
73 y = (*mv++) & 0xF;
if(y & 8) y = 8 -
y;
74 if (i < -x || avctx->
width - i - 4 < x ||
75 j < -y || avctx->
height - j - 4 < y) {
82 for(y = 0; y < 4; y++){
100 mask = ((msk[0] & 0xF0) <<
shift1[type]) | ((msk[0] & 0xF) <<
shift2[type]);
103 for(y = 0; y < 4; y++){
104 for(x = 0; x < 4; x++){
105 tmp[x] = (mask & 0x8000) ? *data++ : tmp2[x];
113 for(y = 0; y < 4; y++){
114 memset(tmp, data[0], 4);
120 for(y = 0; y < 4; y++){
121 memcpy(tmp, data, 4);
128 for(k = 0; k < 4; k++){
129 d = ((k & 1) << 1) + ((k & 2) * stride);
130 d2 = ((k & 1) << 1) + ((k & 2) * stride);
134 x = (*mv) >> 4;
if(x & 8) x = 8 - x;
135 y = (*mv++) & 0xF;
if(y & 8) y = 8 -
y;
136 if (i + 2*(k & 1) < -x || avctx->
width - i - 2*(k & 1) - 2 < x ||
137 j + (k & 2) < -y || avctx->
height - j - (k & 2) - 2 < y) {
143 tmp[d + 0 ] = tmp2[0];
144 tmp[d + 1 ] = tmp2[1];
149 tmp[d + 0 ] = data[0];
150 tmp[d + 1 ] = data[0];
151 tmp[d + 0 +
stride] = data[0];
152 tmp[d + 1 +
stride] = data[0];
156 tmp[d + 0 ] = *data++;
157 tmp[d + 1 ] = *data++;
158 tmp[d + 0 +
stride] = *data++;
159 tmp[d + 1 +
stride] = *data++;
168 for(y = 0; y < 4; y++){
169 for(x = 0; x < 4; x++){
170 tmp[x] = data[mask & 1];
182 for(y = 0; y < 4; y++){
183 for(x = 0; x < 4; x++){
184 tmp[x] = data[mask & 3];
207 uint8_t *outptr, *srcptr, *tmpptr;
209 int i, j, compr,
ret;
217 if (bytestream2_peek_le32(&gb) ==
MKTAG(
'C',
'M',
'A',
'P')) {
219 for(i = 0; i < 256; i++){
220 c->
pal[i] = 0xFF
U << 24 | bytestream2_get_be24(&gb);
230 outptr = frame->
data[0];
235 if (bytestream2_get_le32(&gb) ==
MKTAG(
'N',
'U',
'L',
'L'))
238 compr = bytestream2_get_byte(&gb);
241 if (compr != 4 && compr != -1) {
269 for (j = 0; j < avctx->
height; j++) {
270 memcpy(outptr, srcptr, avctx->
width);
272 srcptr += avctx->
width;
284 for (j = 0; j < avctx->
height; j++) {
286 for(i = 0; i < avctx->
width; i++)
287 outptr[i] = srcptr[i] ^ tmpptr[i];
290 memcpy(outptr, srcptr, avctx->
width);
292 srcptr += avctx->
width;