51 int buf_size = avpkt->
size;
57 int i, j, x, y,
stride, vect_w = 3, vect_h = 3;
73 if (buf_end - buf < 4)
84 last = first +
AV_RL16(buf + 2);
85 if (first >= 256 || last > 256 || buf_end - buf < 4 + 4 + 3 * (last - first))
88 for (i=first; i<last; i++, buf+=3)
89 pal[i] = (buf[0] << 18) | (buf[1] << 10) | (buf[2] << 2);
122 if (buf_end - buf < 256 * vect_w * vect_h)
124 table = buf + (256 * vect_w * vect_h);
126 int map_size = ((318 / vect_w + 7) / 8) * (198 / vect_h);
127 if (buf_end - table < map_size)
133 for (y=0; y<198; y+=vect_h) {
134 for (x=0; x<318; x+=vect_w) {
136 if (buf_end - table < 1)
138 vect = &buf[*table++ * (vect_w * vect_h)];
139 for (j=0; j<vect_w; j++) {
140 out[(y + 0) * stride + x + j] = vect[(0 * vect_w) + j];
141 out[(y + 1) * stride + x + j] = vect[(1 * vect_w) + j];
143 out[(y + 2) * stride + x + j] =
144 vect[(2 * vect_w) + j];
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 void align_get_bits(GetBitContext *s)
void avcodec_set_dimensions(AVCodecContext *s, int width, int height)
static int avs_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int(* reget_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of a frame to get cr buffer for it.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
8 bit with PIX_FMT_RGB32 palette
bitstream reader API header.
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.
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
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)
static unsigned int get_bits1(GetBitContext *s)
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static av_cold int avs_decode_init(AVCodecContext *avctx)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
#define AVERROR_INVALIDDATA
int key_frame
1 -> keyframe, 0-> not
static av_cold int avs_decode_end(AVCodecContext *avctx)
This structure stores compressed data.