32 if (avctx->
width & 1) {
53 int aligned_width = ((avctx->
width + 47) / 48) * 48;
54 int stride = aligned_width * 8 / 3;
68 y = (uint16_t*)pic->
data[0];
69 u = (uint16_t*)pic->
data[1];
70 v = (uint16_t*)pic->
data[2];
78 *
b++ = (val >> 10) & 0x3FF; \
79 *c++ = (val >> 20) & 0x3FF; \
82 for (h = 0; h < avctx->
height; h++) {
83 const uint32_t *src = (
const uint32_t*)psrc;
85 for (w = 0; w < avctx->
width - 5; w += 6) {
91 if (w < avctx->
width - 1) {
97 if (w < avctx->
width - 3) {
98 *u++ = (val >> 10) & 0x3FF;
99 *y++ = (val >> 20) & 0x3FF;
103 *y++ = (val >> 10) & 0x3FF;
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.
memory handling functions
AVFrame * coded_frame
the picture in the bitstream
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int bits_per_raw_sample
Bits per sample/pixel of internal libavcodec pixel/sample format.
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
static av_cold int decode_init(AVCodecContext *avctx)
#define READ_PIXELS(a, b, c)
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.
static av_cold int decode_close(AVCodecContext *avctx)
common internal API header
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.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
main external API structure.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
#define AV_PIX_FMT_YUV422P10
common internal api header.
int key_frame
1 -> keyframe, 0-> not
This structure stores compressed data.