49 static const int shift1[6] = { 0, 8, 8, 8, 4, 4 };
50 static const int shift2[6] = { 0, 0, 8, 4, 0, 4 };
56 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;
77 for(y = 0; y < 4; y++){
95 mask = ((msk[0] & 0xF0) <<
shift1[type]) | ((msk[0] & 0xF) <<
shift2[type]);
98 for(y = 0; y < 4; y++){
99 for(x = 0; x < 4; x++){
100 tmp[x] = (mask & 0x8000) ? *data++ : tmp2[x];
108 for(y = 0; y < 4; y++){
109 memset(tmp, data[0], 4);
115 for(y = 0; y < 4; y++){
116 memcpy(tmp, data, 4);
123 for(k = 0; k < 4; k++){
124 d = ((k & 1) << 1) + ((k & 2) * stride);
125 d2 = ((k & 1) << 1) + ((k & 2) * stride);
129 x = (*mv) >> 4;
if(x & 8) x = 8 - x;
130 y = (*mv++) & 0xF;
if(y & 8) y = 8 -
y;
133 tmp[d + 0 ] = tmp2[0];
134 tmp[d + 1 ] = tmp2[1];
139 tmp[d + 0 ] = data[0];
140 tmp[d + 1 ] = data[0];
141 tmp[d + 0 +
stride] = data[0];
142 tmp[d + 1 +
stride] = data[0];
146 tmp[d + 0 ] = *data++;
147 tmp[d + 1 ] = *data++;
148 tmp[d + 0 +
stride] = *data++;
149 tmp[d + 1 +
stride] = *data++;
158 for(y = 0; y < 4; y++){
159 for(x = 0; x < 4; x++){
160 tmp[x] = data[mask & 1];
172 for(y = 0; y < 4; y++){
173 for(x = 0; x < 4; x++){
174 tmp[x] = data[mask & 3];
196 uint8_t *outptr, *srcptr, *tmpptr;
198 int i, j, compr, ret;
206 if (bytestream2_peek_le32(&gb) ==
MKTAG(
'C',
'M',
'A',
'P')) {
208 for(i = 0; i < 256; i++){
209 c->
pal[i] = 0xFF
U << 24 | bytestream2_get_be24(&gb);
226 if (bytestream2_get_le32(&gb) ==
MKTAG(
'N',
'U',
'L',
'L'))
229 compr = bytestream2_get_byte(&gb);
232 if (compr != 4 && compr != -1) {
258 for(j = 0; j < avctx->
height; j++){
259 if((compr & 1) && tmpptr){
260 for(i = 0; i < avctx->
width; i++)
261 outptr[i] = srcptr[i] ^ tmpptr[i];
264 memcpy(outptr, srcptr, avctx->
width);
266 srcptr += avctx->
width;