#include "avcodec.h"#include "mpegvideo.h"

Go to the source code of this file.
Data Structures | |
| struct | PNMContext |
Functions | |
| static int | pnm_space (int c) |
| static void | pnm_get (PNMContext *sc, char *str, int buf_size) |
| static int | common_init (AVCodecContext *avctx) |
| static int | pnm_decode_header (AVCodecContext *avctx, PNMContext *const s) |
| static int | pnm_decode_frame (AVCodecContext *avctx, void *data, int *data_size, uint8_t *buf, int buf_size) |
| static int | pnm_encode_frame (AVCodecContext *avctx, unsigned char *outbuf, int buf_size, void *data) |
| static int | pam_encode_frame (AVCodecContext *avctx, unsigned char *outbuf, int buf_size, void *data) |
| static int | pnm_parse (AVCodecParserContext *s, AVCodecContext *avctx, uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size) |
Variables | |
| AVCodecParser | pnm_parser |
| static int common_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 60 of file pnm.c.
References avcodec_get_frame_defaults(), AVCodecContext::coded_frame, PNMContext::picture, AVCodecContext::priv_data, and s.

| static int pam_encode_frame | ( | AVCodecContext * | avctx, | |
| unsigned char * | outbuf, | |||
| int | buf_size, | |||
| void * | data | |||
| ) | [static] |
Definition at line 334 of file pnm.c.
References av_log(), AV_LOG_ERROR, avpicture_get_size(), PNMContext::bytestream, PNMContext::bytestream_end, PNMContext::bytestream_start, FF_I_TYPE, AVCodecContext::height, memcpy, PNMContext::picture, AVCodecContext::pix_fmt, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_RGB24, PIX_FMT_RGBA32, AVCodecContext::priv_data, s, and AVCodecContext::width.

| static int pnm_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 158 of file pnm.c.
References a, av_log(), AV_LOG_ERROR, b, PNMContext::bytestream, PNMContext::bytestream_end, PNMContext::bytestream_start, FF_I_TYPE, AVCodecContext::get_buffer, AVCodecContext::height, memcpy, PNMContext::picture, picture, AVCodecContext::pix_fmt, PIX_FMT_GRAY8, PIX_FMT_MONOBLACK, PIX_FMT_MONOWHITE, PIX_FMT_RGB24, PIX_FMT_RGBA32, PIX_FMT_YUV420P, pnm_decode_header(), AVCodecContext::priv_data, r, AVCodecContext::release_buffer, s, and AVCodecContext::width.

| static int pnm_decode_header | ( | AVCodecContext * | avctx, | |
| PNMContext *const | s | |||
| ) | [static] |
Definition at line 69 of file pnm.c.
References avcodec_check_dimensions(), AVCodecContext::codec_id, CODEC_ID_PGMYUV, AVCodecContext::height, NULL, AVCodecContext::pix_fmt, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_RGB24, PIX_FMT_RGBA32, PIX_FMT_YUV420P, pnm_get(), and AVCodecContext::width.
Referenced by pnm_decode_frame(), and pnm_parse().

| static int pnm_encode_frame | ( | AVCodecContext * | avctx, | |
| unsigned char * | outbuf, | |||
| int | buf_size, | |||
| void * | data | |||
| ) | [static] |
Definition at line 256 of file pnm.c.
References av_log(), AV_LOG_ERROR, avpicture_get_size(), PNMContext::bytestream, PNMContext::bytestream_end, PNMContext::bytestream_start, c, FF_I_TYPE, AVCodecContext::height, memcpy, PNMContext::picture, AVCodecContext::pix_fmt, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_RGB24, PIX_FMT_YUV420P, AVCodecContext::priv_data, s, and AVCodecContext::width.

| static void pnm_get | ( | PNMContext * | sc, | |
| char * | str, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 34 of file pnm.c.
References PNMContext::bytestream, PNMContext::bytestream_end, c, pnm_space(), and s.
Referenced by pnm_decode_header().

| static int pnm_parse | ( | AVCodecParserContext * | s, | |
| AVCodecContext * | avctx, | |||
| uint8_t ** | poutbuf, | |||
| int * | poutbuf_size, | |||
| const uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 451 of file pnm.c.
References avpicture_get_size(), ParseContext::buffer, PNMContext::bytestream, PNMContext::bytestream_end, PNMContext::bytestream_start, END_NOT_FOUND, ff_combine_frame(), AVCodecContext::height, ParseContext::index, memcpy, NULL, ParseContext::overread, ParseContext::overread_index, AVCodecContext::pix_fmt, pnm_decode_header(), AVCodecParserContext::priv_data, and AVCodecContext::width.

| static int pnm_space | ( | int | c | ) | [inline, static] |
Initial value:
{
{ CODEC_ID_PGM, CODEC_ID_PGMYUV, CODEC_ID_PPM, CODEC_ID_PBM, CODEC_ID_PAM},
sizeof(ParseContext),
NULL,
pnm_parse,
ff_parse_close,
}
Definition at line 512 of file pnm.c.
Referenced by avcodec_register_all().
1.5.5