libavcodec/pngdec.c File Reference
#include "avcodec.h"
#include "bytestream.h"
#include "png.h"
#include "dsputil.h"
#include <zlib.h>
Go to the source code of this file.
|
Data Structures |
struct | PNGDecContext |
Defines |
#define | UNROLL1(bpp, op) |
#define | UNROLL_FILTER(op) |
#define | OP_SUB(x, s, l) x+s |
#define | OP_AVG(x, s, l) (((x + l) >> 1) + s) & 0xff |
Functions |
static void | png_put_interlaced_row (uint8_t *dst, int width, int bits_per_pixel, int pass, int color_type, const uint8_t *src) |
void | ff_add_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 *last, int size, int bpp) |
static av_always_inline void | convert_to_rgb32_loco (uint8_t *dst, const uint8_t *src, int width, int loco) |
static void | convert_to_rgb32 (uint8_t *dst, const uint8_t *src, int width, int loco) |
static void | deloco_rgb24 (uint8_t *dst, int size) |
static void | png_handle_row (PNGDecContext *s) |
static int | png_decode_idat (PNGDecContext *s, int length) |
static int | decode_frame (AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size) |
static av_cold int | png_dec_init (AVCodecContext *avctx) |
Variables |
static const uint8_t | png_pass_dsp_ymask [NB_PASSES] |
static const uint8_t | png_pass_dsp_mask [NB_PASSES] |
AVCodec | png_decoder |
Define Documentation
#define OP_AVG |
( |
x, |
|
|
s, |
|
|
l |
|
) |
(((x + l) >> 1) + s) & 0xff |
#define OP_SUB |
( |
x, |
|
|
s, |
|
|
l |
|
) |
x+s |
#define UNROLL1 |
( |
bpp, |
|
|
op |
|
) |
|
Value:
{\
r = dst[0];\
if(bpp >= 2) g = dst[1];\
if(bpp >= 3) b = dst[2];\
if(bpp >= 4) a = dst[3];\
for(; i < size; i+=bpp) {\
dst[i+0] = r = op(r, src[i+0], last[i+0]);\
if(bpp == 1) continue;\
dst[i+1] = g = op(g, src[i+1], last[i+1]);\
if(bpp == 2) continue;\
dst[i+2] = b = op(b, src[i+2], last[i+2]);\
if(bpp == 3) continue;\
dst[i+3] = a = op(a, src[i+3], last[i+3]);\
}\
}
Definition at line 162 of file pngdec.c.
#define UNROLL_FILTER |
( |
op |
|
) |
|
Function Documentation
static void convert_to_rgb32 |
( |
uint8_t * |
dst, |
|
|
const uint8_t * |
src, |
|
|
int |
width, |
|
|
int |
loco | |
|
) |
| | [static] |
static av_always_inline void convert_to_rgb32_loco |
( |
uint8_t * |
dst, |
|
|
const uint8_t * |
src, |
|
|
int |
width, |
|
|
int |
loco | |
|
) |
| | [static] |
static int decode_frame |
( |
AVCodecContext * |
avctx, |
|
|
void * |
data, |
|
|
int * |
data_size, |
|
|
const uint8_t * |
buf, |
|
|
int |
buf_size | |
|
) |
| | [static] |
static void deloco_rgb24 |
( |
uint8_t * |
dst, |
|
|
int |
size | |
|
) |
| | [static] |
void ff_add_png_paeth_prediction |
( |
uint8_t * |
dst, |
|
|
uint8_t * |
src, |
|
|
uint8_t * |
top, |
|
|
int |
w, |
|
|
int |
bpp | |
|
) |
| | |
static int png_decode_idat |
( |
PNGDecContext * |
s, |
|
|
int |
length | |
|
) |
| | [static] |
static void png_filter_row |
( |
DSPContext * |
dsp, |
|
|
uint8_t * |
dst, |
|
|
int |
filter_type, |
|
|
uint8_t * |
src, |
|
|
uint8_t * |
last, |
|
|
int |
size, |
|
|
int |
bpp | |
|
) |
| | [static] |
static void png_put_interlaced_row |
( |
uint8_t * |
dst, |
|
|
int |
width, |
|
|
int |
bits_per_pixel, |
|
|
int |
pass, |
|
|
int |
color_type, |
|
|
const uint8_t * |
src | |
|
) |
| | [static] |
Variable Documentation
Initial value:
{
"png",
CODEC_TYPE_VIDEO,
CODEC_ID_PNG,
sizeof(PNGDecContext),
png_dec_init,
NULL,
NULL,
decode_frame,
0 ,
NULL,
.long_name = NULL_IF_CONFIG_SMALL("PNG image"),
}
Definition at line 611 of file pngdec.c.
Initial value:
{
0xff, 0xff, 0x0f, 0xcc, 0x33, 0xff, 0x55,
}
Definition at line 68 of file pngdec.c.
Referenced by png_handle_row().