History

dsputil: Split off global motion compensation bits into a separate context

Diego Biurrun committed 12 years ago

Commit fab9df61 parent f23d26a17 files · +374 −274Browse files

Showing the changes to libavcodec/ppc (4 of 17 files). Show all

Unified · Split

4 files
  1. libavcodec/ppc/Makefile +2 −2
  2. libavcodec/ppc/dsputil_altivec.h +1 −2
  3. libavcodec/ppc/dsputil_ppc.c +0 −2
  4. libavcodec/ppc/mpegvideodsp.c +12 −3
libavcodec/ppc/Makefile+2−2
@@ -10,7 +10,8 @@ OBJS-$(CONFIG_H264QPEL) += ppc/h264qpel.o · 9 unmodified lines
1010 OBJS-$(CONFIG_HPELDSP) += ppc/hpeldsp_altivec.o
1111 OBJS-$(CONFIG_HUFFYUVDSP) += ppc/huffyuvdsp_altivec.o
1212 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
1415 OBJS-$(CONFIG_VIDEODSP) += ppc/videodsp_ppc.o
1516 OBJS-$(CONFIG_VP3DSP) += ppc/vp3dsp_altivec.o
1617
@@ -23,7 +24,6 @@ OBJS-$(CONFIG_VP8_DECODER) += ppc/vp8dsp_altivec.o · 6 unmodified lines
2324
2425 ALTIVEC-OBJS-$(CONFIG_DSPUTIL) += ppc/dsputil_altivec.o \
2526 ppc/fdct_altivec.o \
26− ppc/gmc_altivec.o \
2727 ppc/idct_altivec.o \
2828
2929 FFT-OBJS-$(HAVE_GNU_AS) += ppc/fft_altivec_s.o
libavcodec/ppc/dsputil_altivec.h+1−2
@@ -28,8 +28,7 @@ · 27 unmodified lines
2828 #include "libavcodec/dsputil.h"
2929
3030 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+
3332 void ff_idct_put_altivec(uint8_t *dest, int line_size, int16_t *block);
3433 void ff_idct_add_altivec(uint8_t *dest, int line_size, int16_t *block);
3534
libavcodec/ppc/dsputil_ppc.c+0−2
@@ -35,8 +35,6 @@ av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx, · 34 unmodified lines
3535 if (PPC_ALTIVEC(av_get_cpu_flags())) {
3636 ff_dsputil_init_altivec(c, avctx, high_bit_depth);
3737
38− c->gmc1 = ff_gmc1_altivec;
39−
4038 if (!high_bit_depth) {
4139 #if CONFIG_ENCODERS
4240 if (avctx->dct_algo == FF_DCT_AUTO ||
libavcodec/ppc/mpegvideodsp.crenamed from libavcodec/ppc/gmc_altivec.c+12−3
@@ -23,12 +23,13 @@ · 22 unmodified lines
2323 #include "libavutil/mem.h"
2424 #include "libavutil/ppc/types_altivec.h"
2525 #include "libavutil/ppc/util_altivec.h"
26−#include "dsputil_altivec.h"
26+#include "libavcodec/mpegvideodsp.h"
2727
28+#if HAVE_ALTIVEC
2829 /* AltiVec-enhanced gmc1. ATM this code assumes stride is a multiple of 8
2930 * 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)
3233 {
3334 int i;
3435 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
122123 src += stride;
123124 }
124125 }
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+}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t