diff options
author | Måns Rullgård <mans@mansr.com> | 2006-09-27 19:54:07 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2006-09-27 19:54:07 +0000 |
commit | 62bb489b13c1f7967946bf538492dce0af1150fe (patch) | |
tree | f33797575ec10e2efe0b5b94b4251498fedd62e1 /libavcodec/png.c | |
parent | 191e8ca75279073699e0c0f25128b2b2088d1cbb (diff) | |
download | ffmpeg-62bb489b13c1f7967946bf538492dce0af1150fe.tar.gz |
add some #ifdef CONFIG_ENCODERS/DECODERS
Originally committed as revision 6356 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/png.c')
-rw-r--r-- | libavcodec/png.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/png.c b/libavcodec/png.c index efe4cdf4ff..482892091e 100644 --- a/libavcodec/png.c +++ b/libavcodec/png.c @@ -90,12 +90,14 @@ static unsigned int get32(uint8_t **b){ return ((*b)[-4]<<24) + ((*b)[-3]<<16) + ((*b)[-2]<<8) + (*b)[-1]; } +#ifdef CONFIG_ENCODERS static void put32(uint8_t **b, unsigned int v){ *(*b)++= v>>24; *(*b)++= v>>16; *(*b)++= v>>8; *(*b)++= v; } +#endif static const uint8_t pngsig[8] = {137, 80, 78, 71, 13, 10, 26, 10}; @@ -233,6 +235,7 @@ static void png_put_interlaced_row(uint8_t *dst, int width, } } +#ifdef CONFIG_ENCODERS static void png_get_interlaced_row(uint8_t *dst, int row_size, int bits_per_pixel, int pass, const uint8_t *src, int width) @@ -270,6 +273,7 @@ static void png_get_interlaced_row(uint8_t *dst, int row_size, break; } } +#endif /* XXX: optimize */ /* NOTE: 'dst' can be equal to 'last' */ @@ -338,6 +342,7 @@ static void png_filter_row(uint8_t *dst, int filter_type, } } +#ifdef CONFIG_ENCODERS static void convert_from_rgba32(uint8_t *dst, const uint8_t *src, int width) { uint8_t *d; @@ -354,7 +359,9 @@ static void convert_from_rgba32(uint8_t *dst, const uint8_t *src, int width) d += 4; } } +#endif +#ifdef CONFIG_DECODERS static void convert_to_rgba32(uint8_t *dst, const uint8_t *src, int width) { int j; @@ -684,7 +691,9 @@ static int decode_frame(AVCodecContext *avctx, ret = -1; goto the_end; } +#endif +#ifdef CONFIG_ENCODERS static void png_write_chunk(uint8_t **f, uint32_t tag, const uint8_t *buf, int length) { @@ -736,6 +745,7 @@ static int png_write_row(PNGContext *s, const uint8_t *data, int size) } return 0; } +#endif /* CONFIG_ENCODERS */ static int common_init(AVCodecContext *avctx){ PNGContext *s = avctx->priv_data; @@ -747,6 +757,7 @@ static int common_init(AVCodecContext *avctx){ return 0; } +#ifdef CONFIG_ENCODERS static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ PNGContext *s = avctx->priv_data; AVFrame *pict = data; @@ -920,7 +931,9 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, ret = -1; goto the_end; } +#endif +#ifdef CONFIG_PNG_DECODER AVCodec png_decoder = { "png", CODEC_TYPE_VIDEO, @@ -933,6 +946,7 @@ AVCodec png_decoder = { 0 /*CODEC_CAP_DR1*/ /*| CODEC_CAP_DRAW_HORIZ_BAND*/, NULL }; +#endif #ifdef CONFIG_PNG_ENCODER AVCodec png_encoder = { |