summaryrefslogtreecommitdiff
path: root/libavcodec/vp3.c
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-12-15 09:46:02 -0800
committerLuca Barbato <lu_zero@gentoo.org>2012-12-20 13:40:45 +0100
commit8c53d39e7f0604127bfc96fa1182c8abe3847ac6 (patch)
tree18495cabf7f0e6d365871d3407f2534f2b80b653 /libavcodec/vp3.c
parenta925f723a915bc0255e2673f8817af5212131763 (diff)
lavc: introduce VideoDSPContext
Move some functions from dsputil. The idea is that videodsp contains functions that are useful for a large and varied set of video decoders. Currently, it contains emulated_edge_mc() and prefetch(). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r--libavcodec/vp3.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index de23f285e5..6e85b90964 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -38,7 +38,7 @@
#include "internal.h"
#include "dsputil.h"
#include "get_bits.h"
-
+#include "videodsp.h"
#include "vp3data.h"
#include "vp3dsp.h"
#include "xiph.h"
@@ -136,6 +136,7 @@ typedef struct Vp3DecodeContext {
AVFrame current_frame;
int keyframe;
DSPContext dsp;
+ VideoDSPContext vdsp;
VP3DSPContext vp3dsp;
int flipped_image;
int last_slice_end;
@@ -1543,7 +1544,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
uint8_t *temp= s->edge_emu_buffer;
if(stride<0) temp -= 8*stride;
- s->dsp.emulated_edge_mc(temp, motion_source, stride, 9, 9, src_x, src_y, plane_width, plane_height);
+ s->vdsp.emulated_edge_mc(temp, motion_source, stride, 9, 9, src_x, src_y, plane_width, plane_height);
motion_source= temp;
}
}
@@ -1677,6 +1678,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
ff_dsputil_init(&s->dsp, avctx);
+ ff_videodsp_init(&s->vdsp, 8);
ff_vp3dsp_init(&s->vp3dsp, avctx->flags);
ff_init_scantable_permutation(s->dsp.idct_permutation, s->vp3dsp.idct_perm);