42 const uint8_t *src = avpkt->
data;
43 uint8_t *Y1, *Y2, *
U, *
V;
61 if (
AV_RL32(src) != 0x01000002) {
71 for (h = 0; h < avctx->
height; h += 2) {
72 for (w = 0; w < avctx->
width; w += 2) {
75 U[w >> 1] = src[4] + 0x80;
76 V[w >> 1] = src[5] + 0x80;
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
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
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#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. ...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
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.
struct AVFrame AVFrame
Audio Video Frame.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
static av_cold int decode_init(AVCodecContext *avctx)
#define AVERROR_PATCHWELCOME
Not yet implemented in Libav, patches welcome.
AVCodec ff_dxtory_decoder
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
void av_log_ask_for_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message asking for a sample.
main external API structure.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int decode_close(AVCodecContext *avctx)
int key_frame
1 -> keyframe, 0-> not