summaryrefslogtreecommitdiff
path: root/libavcodec/ppc
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-06-23 20:59:48 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-06-23 21:10:10 +0200
commitd7463c681363d6057601e705d0bf775738529841 (patch)
tree5aaab61d15d220df649ead3e432c36f72219ab2a /libavcodec/ppc
parent32cf26cc6a0dc1425ed60b8ac99552fd858fab9b (diff)
parentfab9df63a3156ffe1f9490aafaea41e03ef60ddf (diff)
Merge commit 'fab9df63a3156ffe1f9490aafaea41e03ef60ddf'
* commit 'fab9df63a3156ffe1f9490aafaea41e03ef60ddf': dsputil: Split off global motion compensation bits into a separate context Conflicts: libavcodec/dsputil.c libavcodec/dsputil.h libavcodec/ppc/dsputil_altivec.h libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ppc')
-rw-r--r--libavcodec/ppc/Makefile4
-rw-r--r--libavcodec/ppc/dsputil_altivec.h3
-rw-r--r--libavcodec/ppc/dsputil_ppc.c2
-rw-r--r--libavcodec/ppc/mpegvideodsp.c (renamed from libavcodec/ppc/gmc_altivec.c)15
4 files changed, 15 insertions, 9 deletions
diff --git a/libavcodec/ppc/Makefile b/libavcodec/ppc/Makefile
index ef3685ac0f..aa5bd5d011 100644
--- a/libavcodec/ppc/Makefile
+++ b/libavcodec/ppc/Makefile
@@ -10,7 +10,8 @@ OBJS-$(CONFIG_H264QPEL) += ppc/h264qpel.o
OBJS-$(CONFIG_HPELDSP) += ppc/hpeldsp_altivec.o
OBJS-$(CONFIG_HUFFYUVDSP) += ppc/huffyuvdsp_altivec.o
OBJS-$(CONFIG_MPEGAUDIODSP) += ppc/mpegaudiodsp_altivec.o
-OBJS-$(CONFIG_MPEGVIDEO) += ppc/mpegvideo_altivec.o
+OBJS-$(CONFIG_MPEGVIDEO) += ppc/mpegvideo_altivec.o \
+ ppc/mpegvideodsp.o
OBJS-$(CONFIG_VIDEODSP) += ppc/videodsp_ppc.o
OBJS-$(CONFIG_VP3DSP) += ppc/vp3dsp_altivec.o
@@ -23,7 +24,6 @@ OBJS-$(CONFIG_VP8_DECODER) += ppc/vp8dsp_altivec.o
ALTIVEC-OBJS-$(CONFIG_DSPUTIL) += ppc/dsputil_altivec.o \
ppc/fdct_altivec.o \
- ppc/gmc_altivec.o \
ppc/idct_altivec.o \
FFT-OBJS-$(HAVE_GNU_AS) += ppc/fft_altivec_s.o
diff --git a/libavcodec/ppc/dsputil_altivec.h b/libavcodec/ppc/dsputil_altivec.h
index a835024169..e4f8770663 100644
--- a/libavcodec/ppc/dsputil_altivec.h
+++ b/libavcodec/ppc/dsputil_altivec.h
@@ -28,8 +28,7 @@
#include "libavcodec/dsputil.h"
void ff_fdct_altivec(int16_t *block);
-void ff_gmc1_altivec(uint8_t *dst, uint8_t *src, int stride, int h,
- int x16, int y16, int rounder);
+
void ff_idct_altivec(int16_t *block);
void ff_idct_put_altivec(uint8_t *dest, int line_size, int16_t *block);
void ff_idct_add_altivec(uint8_t *dest, int line_size, int16_t *block);
diff --git a/libavcodec/ppc/dsputil_ppc.c b/libavcodec/ppc/dsputil_ppc.c
index ebdf0a4b48..48b3b4a6bb 100644
--- a/libavcodec/ppc/dsputil_ppc.c
+++ b/libavcodec/ppc/dsputil_ppc.c
@@ -36,8 +36,6 @@ av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx,
if (PPC_ALTIVEC(mm_flags)) {
ff_dsputil_init_altivec(c, avctx, high_bit_depth);
- c->gmc1 = ff_gmc1_altivec;
-
if (!high_bit_depth) {
#if CONFIG_ENCODERS
if (avctx->dct_algo == FF_DCT_AUTO ||
diff --git a/libavcodec/ppc/gmc_altivec.c b/libavcodec/ppc/mpegvideodsp.c
index 683a056b63..7696954335 100644
--- a/libavcodec/ppc/gmc_altivec.c
+++ b/libavcodec/ppc/mpegvideodsp.c
@@ -23,12 +23,13 @@
#include "libavutil/mem.h"
#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
-#include "dsputil_altivec.h"
+#include "libavcodec/mpegvideodsp.h"
+#if HAVE_ALTIVEC
/* AltiVec-enhanced gmc1. ATM this code assumes stride is a multiple of 8
* to preserve proper dst alignment. */
-void ff_gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */,
- int stride, int h, int x16, int y16, int rounder)
+static void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */,
+ int stride, int h, int x16, int y16, int rounder)
{
int i;
const DECLARE_ALIGNED(16, unsigned short, rounder_a) = rounder;
@@ -122,3 +123,11 @@ void ff_gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */,
src += stride;
}
}
+#endif /* HAVE_ALTIVEC */
+
+av_cold void ff_mpegvideodsp_init_ppc(MpegVideoDSPContext *c)
+{
+#if HAVE_ALTIVEC
+ c->gmc1 = gmc1_altivec;
+#endif /* HAVE_ALTIVEC */
+}