aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ppc
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2011-02-17 14:45:03 -0500
committerMichael Niedermayer <michaelni@gmx.at>2011-02-18 19:52:40 +0100
commit9a1ced321bb900acc68cae07f4141d5f257cadd5 (patch)
treee5934a2fe41ab65224edff23766b8f8e35f31fc6 /libavcodec/ppc
parent6c0d9369d881b143628fdc24b105a4a2c60d67c2 (diff)
downloadffmpeg-9a1ced321bb900acc68cae07f4141d5f257cadd5.tar.gz
dsputil: move VC1-specific stuff into VC1DSPContext.
(cherry picked from commit 12802ec0601c3bd7b9c7a2503518e28fd5e7d744)
Diffstat (limited to 'libavcodec/ppc')
-rw-r--r--libavcodec/ppc/dsputil_altivec.h1
-rw-r--r--libavcodec/ppc/dsputil_ppc.c2
-rw-r--r--libavcodec/ppc/vc1dsp_altivec.c6
3 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/ppc/dsputil_altivec.h b/libavcodec/ppc/dsputil_altivec.h
index cd44f602b9..4147eec823 100644
--- a/libavcodec/ppc/dsputil_altivec.h
+++ b/libavcodec/ppc/dsputil_altivec.h
@@ -43,7 +43,6 @@ void ff_vp3_idct_add_altivec(uint8_t *dest, int line_size, DCTELEM *block);
void dsputil_h264_init_ppc(DSPContext* c, AVCodecContext *avctx);
void dsputil_init_altivec(DSPContext* c, AVCodecContext *avctx);
-void vc1dsp_init_altivec(DSPContext* c, AVCodecContext *avctx);
void float_init_altivec(DSPContext* c, AVCodecContext *avctx);
void int_init_altivec(DSPContext* c, AVCodecContext *avctx);
diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c
index 9e4f1aa667..d13c1ce661 100644
--- a/libavcodec/ppc/dsputil_ppc.c
+++ b/libavcodec/ppc/dsputil_ppc.c
@@ -171,8 +171,6 @@ void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx)
if (av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) {
dsputil_init_altivec(c, avctx);
- if(CONFIG_VC1_DECODER)
- vc1dsp_init_altivec(c, avctx);
float_init_altivec(c, avctx);
int_init_altivec(c, avctx);
c->gmc1 = gmc1_altivec;
diff --git a/libavcodec/ppc/vc1dsp_altivec.c b/libavcodec/ppc/vc1dsp_altivec.c
index 5ffe9a5479..95774389a5 100644
--- a/libavcodec/ppc/vc1dsp_altivec.c
+++ b/libavcodec/ppc/vc1dsp_altivec.c
@@ -322,7 +322,11 @@ static void vc1_inv_trans_8x4_altivec(uint8_t *dest, int stride, DCTELEM *block)
}
-void vc1dsp_init_altivec(DSPContext* dsp, AVCodecContext *avctx) {
+void ff_vc1dsp_init_altivec(VC1DSPContext* dsp)
+{
+ if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC))
+ return;
+
dsp->vc1_inv_trans_8x8 = vc1_inv_trans_8x8_altivec;
dsp->vc1_inv_trans_8x4 = vc1_inv_trans_8x4_altivec;
}