Showing the changes to libavcodec/ppc (4 of 17 files). Show all
Unified · Split
| @@ -10,7 +10,8 @@ OBJS-$(CONFIG_H264QPEL) += ppc/h264qpel.o · 9 unmodified lines | ||
| 10 | 10 | OBJS-$(CONFIG_HPELDSP) += ppc/hpeldsp_altivec.o |
| 11 | 11 | OBJS-$(CONFIG_HUFFYUVDSP) += ppc/huffyuvdsp_altivec.o |
| 12 | 12 | OBJS-$(CONFIG_MPEGAUDIODSP) += ppc/mpegaudiodsp_altivec.o |
| 13 | −OBJS-$(CONFIG_MPEGVIDEO) += ppc/mpegvideo_altivec.o | |
| 13 | +OBJS-$(CONFIG_MPEGVIDEO) += ppc/mpegvideo_altivec.o \ | |
| 14 | + ppc/mpegvideodsp.o | |
| 14 | 15 | OBJS-$(CONFIG_VIDEODSP) += ppc/videodsp_ppc.o |
| 15 | 16 | OBJS-$(CONFIG_VP3DSP) += ppc/vp3dsp_altivec.o |
| 16 | 17 | |
| @@ -23,7 +24,6 @@ OBJS-$(CONFIG_VP8_DECODER) += ppc/vp8dsp_altivec.o · 6 unmodified lines | ||
| 23 | 24 | |
| 24 | 25 | ALTIVEC-OBJS-$(CONFIG_DSPUTIL) += ppc/dsputil_altivec.o \ |
| 25 | 26 | ppc/fdct_altivec.o \ |
| 26 | − ppc/gmc_altivec.o \ | |
| 27 | 27 | ppc/idct_altivec.o \ |
| 28 | 28 | |
| 29 | 29 | FFT-OBJS-$(HAVE_GNU_AS) += ppc/fft_altivec_s.o |
| @@ -28,8 +28,7 @@ · 27 unmodified lines | ||
| 28 | 28 | #include "libavcodec/dsputil.h" |
| 29 | 29 | |
| 30 | 30 | void ff_fdct_altivec(int16_t *block); |
| 31 | −void ff_gmc1_altivec(uint8_t *dst, uint8_t *src, int stride, int h, | |
| 32 | − int x16, int y16, int rounder); | |
| 31 | + | |
| 33 | 32 | void ff_idct_put_altivec(uint8_t *dest, int line_size, int16_t *block); |
| 34 | 33 | void ff_idct_add_altivec(uint8_t *dest, int line_size, int16_t *block); |
| 35 | 34 | |
| @@ -35,8 +35,6 @@ av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx, · 34 unmodified lines | ||
| 35 | 35 | if (PPC_ALTIVEC(av_get_cpu_flags())) { |
| 36 | 36 | ff_dsputil_init_altivec(c, avctx, high_bit_depth); |
| 37 | 37 | |
| 38 | − c->gmc1 = ff_gmc1_altivec; | |
| 39 | − | |
| 40 | 38 | if (!high_bit_depth) { |
| 41 | 39 | #if CONFIG_ENCODERS |
| 42 | 40 | if (avctx->dct_algo == FF_DCT_AUTO || |
| @@ -23,12 +23,13 @@ · 22 unmodified lines | ||
| 23 | 23 | #include "libavutil/mem.h" |
| 24 | 24 | #include "libavutil/ppc/types_altivec.h" |
| 25 | 25 | #include "libavutil/ppc/util_altivec.h" |
| 26 | −#include "dsputil_altivec.h" | |
| 26 | +#include "libavcodec/mpegvideodsp.h" | |
| 27 | 27 | |
| 28 | +#if HAVE_ALTIVEC | |
| 28 | 29 | /* AltiVec-enhanced gmc1. ATM this code assumes stride is a multiple of 8 |
| 29 | 30 | * to preserve proper dst alignment. */ |
| 30 | −void ff_gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, | |
| 31 | − int stride, int h, int x16, int y16, int rounder) | |
| 31 | +static void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */, | |
| 32 | + int stride, int h, int x16, int y16, int rounder) | |
| 32 | 33 | { |
| 33 | 34 | int i; |
| 34 | 35 | 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 */, · 87 unmodified lines | ||
| 122 | 123 | src += stride; |
| 123 | 124 | } |
| 124 | 125 | } |
| 126 | +#endif /* HAVE_ALTIVEC */ | |
| 127 | + | |
| 128 | +av_cold void ff_mpegvideodsp_init_ppc(MpegVideoDSPContext *c) | |
| 129 | +{ | |
| 130 | +#if HAVE_ALTIVEC | |
| 131 | + c->gmc1 = gmc1_altivec; | |
| 132 | +#endif /* HAVE_ALTIVEC */ | |
| 133 | +} | |