summaryrefslogtreecommitdiff
path: root/libavcodec/pngdec.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-01-27 23:00:36 +0800
committerRonald S. Bultje <rsbultje@gmail.com>2012-01-29 08:11:18 -0800
commite92003514d7aab25d56e2d827820f47755d397ec (patch)
tree3cdd3b2425cef3a7d91f998cc6a3d4e0d6ad9921 /libavcodec/pngdec.c
parentf9708e9a0e76d3dfa89f175edde68d8cadb02763 (diff)
png: move DSP functions to their own DSP context.
Diffstat (limited to 'libavcodec/pngdec.c')
-rw-r--r--libavcodec/pngdec.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index a40cebbb83..801085b32b 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -22,7 +22,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "png.h"
-#include "dsputil.h"
+#include "pngdsp.h"
/* TODO:
* - add 2, 4 and 16 bit depth support
@@ -33,7 +33,7 @@
//#define DEBUG
typedef struct PNGDecContext {
- DSPContext dsp;
+ PNGDSPContext dsp;
const uint8_t *bytestream;
const uint8_t *bytestream_start;
@@ -191,7 +191,7 @@ void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w
}
/* NOTE: 'dst' can be equal to 'last' */
-static void png_filter_row(DSPContext *dsp, uint8_t *dst, int filter_type,
+static void png_filter_row(PNGDSPContext *dsp, uint8_t *dst, int filter_type,
uint8_t *src, uint8_t *last, int size, int bpp)
{
int i, p, r, g, b, a;
@@ -235,7 +235,7 @@ static void png_filter_row(DSPContext *dsp, uint8_t *dst, int filter_type,
if(bpp > 1 && size > 4) {
// would write off the end of the array if we let it process the last pixel with bpp=3
int w = bpp==4 ? size : size-3;
- dsp->add_png_paeth_prediction(dst+i, src+i, last+i, w-i, bpp);
+ dsp->add_paeth_prediction(dst+i, src+i, last+i, w-i, bpp);
i = w;
}
ff_add_png_paeth_prediction(dst+i, src+i, last+i, size-i, bpp);
@@ -639,7 +639,7 @@ static av_cold int png_dec_init(AVCodecContext *avctx){
s->last_picture = &s->picture2;
avcodec_get_frame_defaults(&s->picture1);
avcodec_get_frame_defaults(&s->picture2);
- dsputil_init(&s->dsp, avctx);
+ ff_pngdsp_init(&s->dsp);
return 0;
}