36 void *
data,
int *data_size,
39 const uint8_t *buf = avpkt->
data;
40 const uint8_t *buf_end = avpkt->
data + avpkt->
size;
41 int buf_size = avpkt->
size;
63 if (buf_end - buf < 0x68 + 4)
69 if(colors < 0 || colors > 256) {
73 if (buf_end - buf < (colors + 1) * 8)
76 pal = (uint32_t*)p->
data[1];
77 for (i = 0; i <= colors; i++) {
93 pal[idx] = (r << 16) | (
g << 8) |
b;
97 if (buf_end - buf < 18)
100 for (i = 0; i < avctx->
height; i++) {
101 int size, left, code, pix;
110 if (buf_end - buf < size)
119 if ((out + (257 - code)) > (outdata + a->
pic.
linesize[0]))
121 memset(out, pix, 257 - code);
128 if (buf_end - buf < code + 1)
130 memcpy(out, buf, code + 1);
int(* get_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of each frame to get a buffer for it.
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
AV_WL32 AV_WL24 AV_WL16 AV_WB32 AV_WB24 AV_RB16
static av_cold int decode_init(AVCodecContext *avctx)
AV_WL32 AV_WL24 AV_WL16 AV_RB32
void(* release_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called to release buffers which were allocated with get_buffer.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
struct QdrawContext QdrawContext
static int init(AVCodecParserContext *s)
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
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. ...
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
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.
struct AVFrame AVFrame
Audio Video 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)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
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.
8 bit with PIX_FMT_RGB32 palette
int key_frame
1 -> keyframe, 0-> not
static av_cold int decode_end(AVCodecContext *avctx)