44 unsigned char *frame,
int buf_size,
void *
data)
47 avctx->
height, frame, buf_size);
52 for(x = 1; x < avctx->
height*avctx->
width*2; x += 2)
62 .priv_data_size =
sizeof(
AVFrame),
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
AVFrame * coded_frame
the picture in the bitstream
int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc)
Return the number of bits per pixel used by the pixel format described by pixdesc.
four components are given, that's all.
int bits_per_coded_sample
bits per sample/pixel from the demuxer (needed for huffyuv).
static int init(AVCodecParserContext *s)
static av_cold int raw_init_encoder(AVCodecContext *avctx)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
const char * name
Name of the codec implementation.
const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB]
The array of all the pixel format descriptors.
AVCodec ff_rawvideo_encoder
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
int width
picture width / height.
struct AVFrame AVFrame
Audio Video Frame.
main external API structure.
unsigned int codec_tag
fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat 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.
int key_frame
1 -> keyframe, 0-> not
int avpicture_layout(const AVPicture *src, enum PixelFormat pix_fmt, int width, int height, unsigned char *dest, int dest_size)
Copy pixel data from an AVPicture into a buffer.
static int raw_encode(AVCodecContext *avctx, unsigned char *frame, int buf_size, void *data)