summaryrefslogtreecommitdiffstats
path: root/libavcodec/png.h
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2011-04-27 18:34:10 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-27 20:08:09 +0200
commit6d4c49a2afdb823418297bb9157890b80d45c0fe (patch)
tree840b69b53989450bfedf8ad38553092750a7ab5e /libavcodec/png.h
parentd6f910ea47255b519e0b71c33d74c409a29ab3db (diff)
downloadffmpeg-streaming-6d4c49a2afdb823418297bb9157890b80d45c0fe.zip
ffmpeg-streaming-6d4c49a2afdb823418297bb9157890b80d45c0fe.tar.gz
Move png mmx functions into x86/png_mmx.c, remove them from DSPContext.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/png.h')
-rw-r--r--libavcodec/png.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/libavcodec/png.h b/libavcodec/png.h
index bab5224..d6fac3e 100644
--- a/libavcodec/png.h
+++ b/libavcodec/png.h
@@ -23,6 +23,9 @@
#define AVCODEC_PNG_H
#include <stdint.h>
+#include <zlib.h>
+
+#include "avcodec.h"
#define PNG_COLOR_MASK_PALETTE 1
#define PNG_COLOR_MASK_COLOR 2
@@ -69,4 +72,41 @@ int ff_png_pass_row_size(int pass, int bits_per_pixel, int width);
void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp);
+typedef struct PNGDecContext {
+ const uint8_t *bytestream;
+ const uint8_t *bytestream_start;
+ const uint8_t *bytestream_end;
+ AVFrame picture1, picture2;
+ AVFrame *current_picture, *last_picture;
+
+ int state;
+ int width, height;
+ int bit_depth;
+ int color_type;
+ int compression_type;
+ int interlace_type;
+ int filter_type;
+ int channels;
+ int bits_per_pixel;
+ int bpp;
+
+ uint8_t *image_buf;
+ int image_linesize;
+ uint32_t palette[256];
+ uint8_t *crow_buf;
+ uint8_t *last_row;
+ uint8_t *tmp_row;
+ int pass;
+ int crow_size; /* compressed row size (include filter type) */
+ int row_size; /* decompressed row size */
+ int pass_row_size; /* decompress row size of the current pass */
+ int y;
+ z_stream zstream;
+
+ void (*add_bytes_l2)(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w);
+ void (*add_paeth_prediction)(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp);
+} PNGDecContext;
+
+void ff_png_init_mmx(PNGDecContext *s);
+
#endif /* AVCODEC_PNG_H */
OpenPOWER on IntegriCloud