36 z_stream *zstream = &zc->
zstream;
58 zret = inflateReset(zstream);
69 zstream->next_in = avpkt->
data;
70 zstream->avail_in = avpkt->
size;
80 zstream->next_out = dst;
81 zstream->avail_out = avctx->
width << 1;
83 zret = inflate(zstream, Z_SYNC_FLUSH);
84 if (zret != Z_OK && zret != Z_STREAM_END) {
87 "Inflate failed with return code: %d.\n", zret);
92 for (j = 0; j < avctx->
width << 1; j++)
93 dst[j] += prev[j] & -!dst[j];
100 if (prev_pic->
data[0])
121 if (prev_pic->
data[0])
132 z_stream *zstream = &zc->
zstream;
138 zstream->zalloc = Z_NULL;
139 zstream->zfree = Z_NULL;
140 zstream->opaque = Z_NULL;
142 zret = inflateInit(zstream);
packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
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.
AVFrame * coded_frame
the picture in the bitstream
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
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)
static av_cold int zerocodec_decode_close(AVCodecContext *avctx)
static int init(AVCodecParserContext *s)
static int zerocodec_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
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,...)
int flags
A combination of AV_PKT_FLAG values.
AVFrame * avcodec_alloc_frame(void)
Allocate an AVFrame and set its fields to default values.
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.
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)
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 zerocodec_decode_init(AVCodecContext *avctx)
This structure stores compressed data.
AVCodec ff_zerocodec_decoder