#include "avcodec.h"#include "bytestream.h"#include "dsputil.h"#include "png.h"#include <zlib.h>Go to the source code of this file.
Data Structures | |
| struct | PNGEncContext |
Defines | |
| #define | IOBUF_SIZE 4096 |
Typedefs | |
| typedef struct PNGEncContext | PNGEncContext |
Functions | |
| static void | png_get_interlaced_row (uint8_t *dst, int row_size, int bits_per_pixel, int pass, const uint8_t *src, int width) |
| static void | sub_png_paeth_prediction (uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp) |
| static void | png_filter_row (DSPContext *dsp, uint8_t *dst, int filter_type, uint8_t *src, uint8_t *top, int size, int bpp) |
| static uint8_t * | png_choose_filter (PNGEncContext *s, uint8_t *dst, uint8_t *src, uint8_t *top, int size, int bpp) |
| static void | convert_from_rgb32 (uint8_t *dst, const uint8_t *src, int width) |
| static void | png_write_chunk (uint8_t **f, uint32_t tag, const uint8_t *buf, int length) |
| static int | png_write_row (PNGEncContext *s, const uint8_t *data, int size) |
| static int | encode_frame (AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data) |
| static av_cold int | png_enc_init (AVCodecContext *avctx) |
Variables | |
| AVCodec | ff_png_encoder |
| #define IOBUF_SIZE 4096 |
Definition at line 34 of file pngenc.c.
Referenced by encode_frame(), and png_write_row().
| typedef struct PNGEncContext PNGEncContext |
| static void convert_from_rgb32 | ( | uint8_t * | dst, | |
| const uint8_t * | src, | |||
| int | width | |||
| ) | [static] |
Definition at line 175 of file pngenc.c.
Referenced by encode_frame().
| static int encode_frame | ( | AVCodecContext * | avctx, | |
| unsigned char * | buf, | |||
| int | buf_size, | |||
| void * | data | |||
| ) | [static] |
| static uint8_t* png_choose_filter | ( | PNGEncContext * | s, | |
| uint8_t * | dst, | |||
| uint8_t * | src, | |||
| uint8_t * | top, | |||
| int | size, | |||
| int | bpp | |||
| ) | [static] |
Definition at line 145 of file pngenc.c.
Referenced by encode_frame().
| static av_cold int png_enc_init | ( | AVCodecContext * | avctx | ) | [static] |
| static void png_filter_row | ( | DSPContext * | dsp, | |
| uint8_t * | dst, | |||
| int | filter_type, | |||
| uint8_t * | src, | |||
| uint8_t * | top, | |||
| int | size, | |||
| int | bpp | |||
| ) | [static] |
Definition at line 115 of file pngenc.c.
Referenced by png_choose_filter().
| static void png_get_interlaced_row | ( | uint8_t * | dst, | |
| int | row_size, | |||
| int | bits_per_pixel, | |||
| int | pass, | |||
| const uint8_t * | src, | |||
| int | width | |||
| ) | [static] |
Definition at line 50 of file pngenc.c.
Referenced by encode_frame().
| static void png_write_chunk | ( | uint8_t ** | f, | |
| uint32_t | tag, | |||
| const uint8_t * | buf, | |||
| int | length | |||
| ) | [static] |
Definition at line 192 of file pngenc.c.
Referenced by encode_frame(), and png_write_row().
| static int png_write_row | ( | PNGEncContext * | s, | |
| const uint8_t * | data, | |||
| int | size | |||
| ) | [static] |
Definition at line 212 of file pngenc.c.
Referenced by encode_frame().
| static void sub_png_paeth_prediction | ( | uint8_t * | dst, | |
| uint8_t * | src, | |||
| uint8_t * | top, | |||
| int | w, | |||
| int | bpp | |||
| ) | [static] |
Definition at line 88 of file pngenc.c.
Referenced by png_filter_row().
{
.name = "png",
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_PNG,
.priv_data_size = sizeof(PNGEncContext),
.init = png_enc_init,
.encode = encode_frame,
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_PAL8, PIX_FMT_GRAY8, PIX_FMT_MONOBLACK, PIX_FMT_NONE},
.long_name= NULL_IF_CONFIG_SMALL("PNG image"),
}