48 static const int shift1[6] = { 0, 8, 8, 8, 4, 4 };
49 static const int shift2[6] = { 0, 0, 8, 4, 0, 4 };
55 int type, x, y, d, d2;
60 data = code + ((avctx->
width * avctx->
height) >> 4);
64 for(j = 0; j < avctx->
height; j += 4){
65 for(i = 0; i < avctx->
width; i += 4){
71 x = (*mv) >> 4;
if(x & 8) x = 8 - x;
72 y = (*mv++) & 0xF;
if(y & 8) y = 8 - y;
76 for(y = 0; y < 4; y++){
94 mask = ((msk[0] & 0xF0) <<
shift1[type]) | ((msk[0] & 0xF) <<
shift2[type]);
97 for(y = 0; y < 4; y++){
98 for(x = 0; x < 4; x++){
99 tmp[x] = (mask & 0x8000) ? *data++ : tmp2[x];
107 for(y = 0; y < 4; y++){
108 memset(tmp, data[0], 4);
114 for(y = 0; y < 4; y++){
115 memcpy(tmp, data, 4);
122 for(k = 0; k < 4; k++){
123 d = ((k & 1) << 1) + ((k & 2) * stride);
124 d2 = ((k & 1) << 1) + ((k & 2) * stride);
128 x = (*mv) >> 4;
if(x & 8) x = 8 - x;
129 y = (*mv++) & 0xF;
if(y & 8) y = 8 - y;
132 tmp[d + 0 ] = tmp2[0];
133 tmp[d + 1 ] = tmp2[1];
138 tmp[d + 0 ] = data[0];
139 tmp[d + 1 ] = data[0];
140 tmp[d + 0 +
stride] = data[0];
141 tmp[d + 1 +
stride] = data[0];
145 tmp[d + 0 ] = *data++;
146 tmp[d + 1 ] = *data++;
147 tmp[d + 0 +
stride] = *data++;
148 tmp[d + 1 +
stride] = *data++;
157 for(y = 0; y < 4; y++){
158 for(x = 0; x < 4; x++){
159 tmp[x] = data[mask & 1];
171 for(y = 0; y < 4; y++){
172 for(x = 0; x < 4; x++){
173 tmp[x] = data[mask & 3];
195 int buf_size = avpkt->
size;
197 uint8_t *outptr, *srcptr, *tmpptr;
201 int orig_buf_size = buf_size;
205 if(buf[0]==
'C' && buf[1]==
'M' && buf[2]==
'A' && buf[3]==
'P'){
209 for(i = 0; i < 256; i++){
213 c->
pal[i] = (r << 16) | (g << 8) |
b;
231 if(buf[0]==
'N' && buf[1]==
'U' && buf[2]==
'L' && buf[3]==
'L')
237 if((compr != 4 && compr != -1) && uncompress(c->
decomp_buf, &dsize, buf + 9, buf_size - 9) != Z_OK){
265 for(j = 0; j < avctx->
height; j++){
267 for(i = 0; i < avctx->
width; i++)
268 outptr[i] = srcptr[i] ^ tmpptr[i];
271 memcpy(outptr, srcptr, avctx->
width);
273 srcptr += avctx->
width;
295 return orig_buf_size;
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
This structure describes decoded (raw) audio or video data.
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static av_cold int decode_end(AVCodecContext *avctx)
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
#define FFSWAP(type, a, b)
8 bit with PIX_FMT_RGB32 palette
static int init(AVCodecParserContext *s)
static const int shift1[6]
static const uint16_t mask[17]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
int width
picture width / height.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
static const int8_t mv[256][2]
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
main external API structure.
static void close(AVCodecParserContext *s)
int palette_has_changed
Tell user application that palette has changed from previous frame.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
common internal and external API header
static av_cold int decode_init(AVCodecContext *avctx)
static const int shift2[6]
#define AVERROR_INVALIDDATA
static int decode_13(AVCodecContext *avctx, DxaDecContext *c, uint8_t *dst, uint8_t *src, uint8_t *ref)
struct DxaDecContext DxaDecContext
int key_frame
1 -> keyframe, 0-> not
This structure stores compressed data.