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
10OBJS-$(CONFIG_HPELDSP) += ppc/hpeldsp_altivec.o10OBJS-$(CONFIG_HPELDSP) += ppc/hpeldsp_altivec.o
11OBJS-$(CONFIG_HUFFYUVDSP) += ppc/huffyuvdsp_altivec.o11OBJS-$(CONFIG_HUFFYUVDSP) += ppc/huffyuvdsp_altivec.o
12OBJS-$(CONFIG_MPEGAUDIODSP) += ppc/mpegaudiodsp_altivec.o12OBJS-$(CONFIG_MPEGAUDIODSP) += ppc/mpegaudiodsp_altivec.o
13OBJS-$(CONFIG_MPEGVIDEO) += ppc/mpegvideo_altivec.o13OBJS-$(CONFIG_MPEGVIDEO) += ppc/mpegvideo_altivec.o \
14 ppc/mpegvideodsp.o
14OBJS-$(CONFIG_VIDEODSP) += ppc/videodsp_ppc.o15OBJS-$(CONFIG_VIDEODSP) += ppc/videodsp_ppc.o
15OBJS-$(CONFIG_VP3DSP) += ppc/vp3dsp_altivec.o16OBJS-$(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
24ALTIVEC-OBJS-$(CONFIG_DSPUTIL) += ppc/dsputil_altivec.o \25ALTIVEC-OBJS-$(CONFIG_DSPUTIL) += ppc/dsputil_altivec.o \
25 ppc/fdct_altivec.o \26 ppc/fdct_altivec.o \
26 ppc/gmc_altivec.o \
27 ppc/idct_altivec.o \27 ppc/idct_altivec.o \
28 28
29FFT-OBJS-$(HAVE_GNU_AS) += ppc/fft_altivec_s.o29FFT-OBJS-$(HAVE_GNU_AS) += ppc/fft_altivec_s.o
libavcodec/ppc/dsputil_altivec.h+1−2
@@ -28,8 +28,7 @@ · 27 unmodified lines
28#include "libavcodec/dsputil.h"28#include "libavcodec/dsputil.h"
29 29
30void ff_fdct_altivec(int16_t *block);30void ff_fdct_altivec(int16_t *block);
31void ff_gmc1_altivec(uint8_t *dst, uint8_t *src, int stride, int h,31
32 int x16, int y16, int rounder);
33void ff_idct_put_altivec(uint8_t *dest, int line_size, int16_t *block);32void ff_idct_put_altivec(uint8_t *dest, int line_size, int16_t *block);
34void ff_idct_add_altivec(uint8_t *dest, int line_size, int16_t *block);33void ff_idct_add_altivec(uint8_t *dest, int line_size, int16_t *block);
35 34
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
35 if (PPC_ALTIVEC(av_get_cpu_flags())) {35 if (PPC_ALTIVEC(av_get_cpu_flags())) {
36 ff_dsputil_init_altivec(c, avctx, high_bit_depth);36 ff_dsputil_init_altivec(c, avctx, high_bit_depth);
37 37
38 c->gmc1 = ff_gmc1_altivec;
39
40 if (!high_bit_depth) {38 if (!high_bit_depth) {
41#if CONFIG_ENCODERS39#if CONFIG_ENCODERS
42 if (avctx->dct_algo == FF_DCT_AUTO ||40 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
23#include "libavutil/mem.h"23#include "libavutil/mem.h"
24#include "libavutil/ppc/types_altivec.h"24#include "libavutil/ppc/types_altivec.h"
25#include "libavutil/ppc/util_altivec.h"25#include "libavutil/ppc/util_altivec.h"
26#include "dsputil_altivec.h"26#include "libavcodec/mpegvideodsp.h"
27 27
28#if HAVE_ALTIVEC
28/* AltiVec-enhanced gmc1. ATM this code assumes stride is a multiple of 829/* AltiVec-enhanced gmc1. ATM this code assumes stride is a multiple of 8
29 * to preserve proper dst alignment. */30 * to preserve proper dst alignment. */
30void ff_gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */,31static void gmc1_altivec(uint8_t *dst /* align 8 */, uint8_t *src /* align1 */,
31 int stride, int h, int x16, int y16, int rounder)32 int stride, int h, int x16, int y16, int rounder)
32{33{
33 int i;34 int i;
34 const DECLARE_ALIGNED(16, unsigned short, rounder_a) = rounder;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 src += stride;123 src += stride;
123 }124 }
124}125}
126#endif /* HAVE_ALTIVEC */
127
128av_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