28 int buf_size,
void *
data)
33 int i, h, h1, c, n, linesize;
34 uint8_t *ptr, *ptr1, *ptr2;
54 n = (avctx->
width + 7) >> 3;
81 "P%c\n%d %d\n", c, avctx->
width, h1);
91 for (i = 0; i < h; i++) {
102 for (i = 0; i < h; i++) {
115 #if CONFIG_PGM_ENCODER
128 #if CONFIG_PGMYUV_ENCODER
141 #if CONFIG_PPM_ENCODER
154 #if CONFIG_PBM_ENCODER
struct PNMContext PNMContext
enum PixelFormat pix_fmt
Pixel format, see PIX_FMT_xxx.
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb...
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
int avpicture_get_size(enum PixelFormat 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...
static int init(AVCodecParserContext *s)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
enum AVPictureType pict_type
Picture type of the frame, see ?_TYPE below.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
Size, in bytes, of the data for each picture/channel plane.
main external API structure.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int pnm_encode_frame(AVCodecContext *avctx, unsigned char *outbuf, int buf_size, void *data)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
uint8_t * bytestream_start
av_cold int ff_pnm_init(AVCodecContext *avctx)
packed RGB 8:8:8, 24bpp, RGBRGB...
int key_frame
1 -> keyframe, 0-> not