diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-01-24 01:41:12 -0800 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-06-23 09:58:17 -0700 |
commit | fab9df63a3156ffe1f9490aafaea41e03ef60ddf (patch) | |
tree | f7f363e0676f471c373dc8aa90dbc6b3071065b7 /libavcodec/ppc | |
parent | f23d26a6864128001b03876b0b92fffe131f2060 (diff) | |
download | ffmpeg-fab9df63a3156ffe1f9490aafaea41e03ef60ddf.tar.gz |
dsputil: Split off global motion compensation bits into a separate context
Diffstat (limited to 'libavcodec/ppc')
-rw-r--r-- | libavcodec/ppc/Makefile | 4 | ||||
-rw-r--r-- | libavcodec/ppc/dsputil_altivec.h | 3 | ||||
-rw-r--r-- | libavcodec/ppc/dsputil_ppc.c | 2 | ||||
-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 8a4a789037..c6c0bcb241 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 2ad4910bb0..42da933dfa 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_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 fb1ee4a940..778d3e1247 100644 --- a/libavcodec/ppc/dsputil_ppc.c +++ b/libavcodec/ppc/dsputil_ppc.c @@ -35,8 +35,6 @@ av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx, if (PPC_ALTIVEC(av_get_cpu_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 ef35f9d46d..2bdf909e4a 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 */ +} |