30 #include "libavutil/pixdesc.h"
31 #include "libavutil/intreadwrite.h"
64 for(x = 1; x < avctx->
height*avctx->
width*2; x += 2)
77 .priv_data_size =
sizeof(
AVFrame),
int ff_alloc_packet2(AVCodecContext *avctx, AVPacket *avpkt, int64_t size)
Check AVPacket size and/or allocate data.
This structure describes decoded (raw) audio or video data.
static av_cold int init(AVCodecContext *avctx)
static int raw_encode(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
int avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt, int width, int height, unsigned char *dest, int dest_size)
Copy pixel data from an AVPicture into a buffer.
unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt)
Return a value representing the fourCC code associated to the pixel format pix_fmt, or 0 if no associated fourCC code can be found.
const char * name
Name of the codec implementation.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
static av_cold int raw_init_encoder(AVCodecContext *avctx)
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Libavcodec external API header.
AVCodec ff_rawvideo_encoder
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
int flags
A combination of AV_PKT_FLAG values.
common internal API header
enum AVPictureType pict_type
Picture type of the frame.
int width
picture width / height.
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
main external API structure.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
void avcodec_get_frame_defaults(AVFrame *frame)
Set the fields of the given AVFrame to default values.
AVFrame * coded_frame
the picture in the bitstream
common internal api header.
int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height)
Calculate the size in bytes that a picture of the given width and height would occupy if stored in th...
This structure stores compressed data.