54 int outcnt = 0, maxcnt;
78 out = (uint16_t *) c->
cur.
data[0];
85 for (i = 0; i < 8; i++)
88 while (outcnt < maxcnt && buf_end - 2 > buf) {
92 if (!(code & 0x8000)) {
99 if ((code & 0x6000) == 0x6000) {
101 int oidx = (code >> 10) & 7;
104 count = (code & 0x3FF) + 3;
106 if (offsets[oidx] < 0) {
107 if (buf_end - 3 < buf)
113 start = (outcnt + offsets[oidx]) % maxcnt;
115 if (maxcnt - start < count)
120 "Frame reference does not exist\n");
128 int offset = (code & 0x1FFF) + 1;
130 if (!(code & 0x6000)) {
132 }
else if ((code & 0x6000) == 0x2000) {
135 if (buf_end - 1 < buf)
144 inp_off = outcnt - offset;
147 if (maxcnt - outcnt < count)
150 for (i = inp_off; i < count + inp_off; i++) {
151 out[outcnt++] = inp[i];
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.
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
static av_cold int decode_end(AVCodecContext *avctx)
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
#define FFSWAP(type, a, b)
#define AV_PIX_FMT_RGB555
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.
#define CODEC_FLAG_EMU_EDGE
int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx)
Check if the given dimension of an image is valid, meaning that all bytes of the image can be address...
int width
picture width / height.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
main external API structure.
static void close(AVCodecParserContext *s)
static void decode_flush(AVCodecContext *avctx)
static av_cold int decode_init(AVCodecContext *avctx)
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 void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
This structure stores compressed data.
if(!(ptr_align%ac->ptr_align)&&samples_align >=aligned_len)