Go to the documentation of this file.
28 const AVFrame *pic,
int *got_packet)
31 const uint8_t *y, *
u, *v;
35 * ((avctx->
height + 1) / 2), 0);
44 for (
int i = 0;
i < avctx->
height / 2;
i++) {
45 for (
int j = 0; j < (avctx->
width + 1) / 2; j++) {
49 *dst++ = y[ 2 * j + 1];
50 *dst++ = y[pic->
linesize[0] + 2 * j ];
51 *dst++ = y[pic->
linesize[0] + 2 * j + 1];
59 for (
int j = 0; j < (avctx->
width + 1) / 2; j++) {
63 *dst++ = y[2 * j + 1];
65 *dst++ = y[2 * j + 1];
AVPixelFormat
Pixel format.
#define u(width, name, range_min, range_max)
This structure describes decoded (raw) audio or video data.
const FFCodec ff_yuv4_encoder
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
AVCodec p
The public AVCodec.
#define FF_CODEC_ENCODE_CB(func)
static int yuv4_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pic, int *got_packet)
#define AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
This encoder can reorder user opaque values from input AVFrames and return them with corresponding ou...
@ AV_PIX_FMT_YUV420P
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
#define CODEC_LONG_NAME(str)
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define i(width, name, range_min, range_max)
const char * name
Name of the codec implementation.
main external API structure.
int ff_get_encode_buffer(AVCodecContext *avctx, AVPacket *avpkt, int64_t size, int flags)
Get a buffer for a packet.
This structure stores compressed data.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...