35 const uint8_t **poutbuf,
int *poutbuf_size,
80 }
else if (pnmctx.
type < 4) {
95 uint8_t *match = memchr(bs,
'\n', end-bs);
100 }
else if (c ==
'P') {
114 if (next > buf_size) {
125 *poutbuf_size = buf_size;
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
AVCodecParser ff_pnm_parser
#define av_assert0(cond)
assert() equivalent, that is always enabled.
static av_cold int end(AVCodecContext *avctx)
int av_image_get_buffer_size(enum AVPixelFormat pix_fmt, int width, int height, int align)
Return the size in bytes of the amount of data required to store an image with the given parameters...
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
Combine the (truncated) bitstream to a complete frame.
simple assert() macros that are a bit more flexible than ISO C assert().
int overread_index
the index into ParseContext.buffer of the overread bytes
void ff_parse_close(AVCodecParserContext *s)
int overread
the number of bytes which where irreversibly read from the next frame
int width
picture width / height.
int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext *const s)
main external API structure.
static int pnm_parse(AVCodecParserContext *s, AVCodecContext *avctx, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size)
uint8_t * bytestream_start