38 void *
data,
int *got_frame,
43 int buf_size = avpkt->
size;
65 if (buf_end - buf < 0x68 + 4)
71 if(colors < 0 || colors > 256) {
75 if (buf_end - buf < (colors + 1) * 8)
78 pal = (uint32_t*)p->
data[1];
79 for (i = 0; i <= colors; i++) {
95 pal[idx] = (r << 16) | (g << 8) |
b;
99 if (buf_end - buf < 18)
102 for (i = 0; i < avctx->
height; i++) {
103 int size, left, code, pix;
112 if (buf_end - buf < size)
121 if ((out + (257 - code)) > (outdata + a->
pic.
linesize[0]))
123 memset(out, pix, 257 - code);
130 if (buf_end - buf < code + 1)
132 memcpy(out, buf, code + 1);
static av_cold int decode_init(AVCodecContext *avctx)
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.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
struct QdrawContext QdrawContext
8 bit with PIX_FMT_RGB32 palette
static int init(AVCodecParserContext *s)
int reference
is this picture used as reference The values for this are the same as the MpegEncContext.picture_structure variable, that is 1->top field, 2->bottom field, 3->frame/both fields.
#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.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
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
#define AVERROR_INVALIDDATA
int key_frame
1 -> keyframe, 0-> not
static av_cold int decode_end(AVCodecContext *avctx)
This structure stores compressed data.