43 const uint32_t *src= (
const uint32_t *)avpkt->
data;
44 uint16_t *ydst, *udst, *vdst, *yend;
62 ydst= (uint16_t *)pic->
data[0];
63 udst= (uint16_t *)pic->
data[1];
64 vdst= (uint16_t *)pic->
data[2];
71 *udst++= (v>>16) & 0xFFC0;
72 *ydst++= (v>>6 ) & 0xFFC0;
73 *vdst++= (v<<4 ) & 0xFFC0;
76 *ydst++= (v>>16) & 0xFFC0;
87 *udst++= (v>>6 ) & 0xFFC0;
88 *ydst++= (v<<4 ) & 0xFFC0;
91 *vdst++= (v>>16) & 0xFFC0;
92 *ydst++= (v>>6 ) & 0xFFC0;
103 *udst++= (v<<4 ) & 0xFFC0;
106 *ydst++= (v>>16) & 0xFFC0;
107 *vdst++= (v>>6 ) & 0xFFC0;
108 *ydst++= (v<<4 ) & 0xFFC0;
111 udst+= pic->
linesize[1]/2 - width/2;
112 vdst+= pic->
linesize[2]/2 - width/2;
int(* get_buffer)(struct AVCodecContext *c, AVFrame *pic)
Called at the beginning of each frame to get a buffer for it.
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
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
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 ...
#define PIX_FMT_YUV422P16
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, 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,...)
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.
static av_cold int decode_init(AVCodecContext *avctx)
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.
int key_frame
1 -> keyframe, 0-> not
static av_cold int decode_close(AVCodecContext *avctx)