61 int buf_size = avpkt->
size;
63 const unsigned char *encoded = buf;
64 unsigned char *pixptr, *pixptr_end;
66 unsigned int dlen, p, row;
67 const unsigned char *lp, *dp, *ep;
70 unsigned int planes = c->
planes;
71 unsigned char *planemap = c->
planemap;
83 ep = encoded + buf_size;
86 dp = encoded + planes * (height << 1);
94 for (p = 0; p < planes; p++) {
96 lp = encoded + p * (height << 1);
99 for (row = 0; row <
height; row++) {
102 if (ep - lp < row * 2 + 2)
104 dlen =
av_be2ne16(*(
const unsigned short *)(lp + row * 2));
109 if ((count = *dp++) <= 127) {
112 if (pixptr + count * px_inc > pixptr_end)
122 if (pixptr + count * px_inc > pixptr_end)
This structure describes decoded (raw) audio or video data.
int buffer_hints
codec suggestion on buffer type if != 0
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)
AVCodec ff_eightbps_decoder
8 bit with PIX_FMT_RGB32 palette
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
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.
common internal API header
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
packed RGB 8:8:8, 24bpp, BGRBGR...
struct EightBpsContext EightBpsContext
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
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)
enum AVPixelFormat(* get_format)(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
callback to negotiate the pixelFormat
static av_cold int decode_init(AVCodecContext *avctx)
int palette_has_changed
Tell user application that palette has changed from previous frame.
static enum AVPixelFormat pixfmt_rgb24[]
unsigned char planemap[4]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
#define AVERROR_INVALIDDATA
static av_cold int decode_end(AVCodecContext *avctx)
#define FF_BUFFER_HINTS_VALID
uint8_t * av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, int *size)
Get side information from packet.
AVPixelFormat
Pixel format.
This structure stores compressed data.