History

Merge commit 'e3fcb14347466095839c2a3c47ebecff02da891e'

* commit 'e3fcb14347466095839c2a3c47ebecff02da891e': dsputil: Split off IDCT bits into their own context Conflicts: configure libavcodec/aic.c libavcodec/arm/Makefile libavcodec/arm/dsputil_init_arm.c libavcodec/arm/dsputil_init_armv6.c libavcodec/asvdec.c libavcodec/dnxhdenc.c libavcodec/dsputil.c libavcodec/dvdec.c libavcodec/dxva2_mpeg2.c libavcodec/intrax8.c libavcodec/mdec.c libavcodec/mjpegdec.c libavcodec/mjpegenc_common.h libavcodec/mpegvideo.c libavcodec/ppc/dsputil_altivec.h libavcodec/ppc/dsputil_ppc.c libavcodec/ppc/idctdsp.c libavcodec/x86/Makefile libavcodec/x86/dsputil_init.c libavcodec/x86/dsputil_mmx.c libavcodec/x86/dsputil_x86.h

Michael Niedermayer committed 12 years ago

Commit 581b5f02 parents 909f53f e3fcb1484 files · +1332 −996Browse files

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

Unified · Split

4 files
  1. libavcodec/ppc/Makefile +1 −1
  2. libavcodec/ppc/dsputil_altivec.h +0 −4
  3. libavcodec/ppc/dsputil_ppc.c +0 −9
  4. libavcodec/ppc/idctdsp.c +29 −4
libavcodec/ppc/Makefile+1−1
@@ -9,6 +9,7 @@ OBJS-$(CONFIG_H264DSP) += ppc/h264dsp.o ppc/hpeldsp_altivec.o · 8 unmodified lines
99 OBJS-$(CONFIG_H264QPEL) += ppc/h264qpel.o
1010 OBJS-$(CONFIG_HPELDSP) += ppc/hpeldsp_altivec.o
1111 OBJS-$(CONFIG_HUFFYUVDSP) += ppc/huffyuvdsp_altivec.o
12+OBJS-$(CONFIG_IDCTDSP) += ppc/idctdsp.o
1213 OBJS-$(CONFIG_MPEGAUDIODSP) += ppc/mpegaudiodsp_altivec.o
1314 OBJS-$(CONFIG_MPEGVIDEO) += ppc/mpegvideo_altivec.o \
1415 ppc/mpegvideodsp.o
@@ -24,7 +25,6 @@ OBJS-$(CONFIG_VP8_DECODER) += ppc/vp8dsp_altivec.o · 9 unmodified lines
2425
2526 ALTIVEC-OBJS-$(CONFIG_DSPUTIL) += ppc/dsputil_altivec.o \
2627 ppc/fdct_altivec.o \
27− ppc/idct_altivec.o \
2828
2929 FFT-OBJS-$(HAVE_GNU_AS) += ppc/fft_altivec_s.o
3030 FFT-OBJS-$(HAVE_VSX) += ppc/fft_vsx.o
libavcodec/ppc/dsputil_altivec.h+0−4
@@ -29,10 +29,6 @@ · 28 unmodified lines
2929
3030 void ff_fdct_altivec(int16_t *block);
3131
32−void ff_idct_altivec(int16_t *block);
33−void ff_idct_put_altivec(uint8_t *dest, int line_size, int16_t *block);
34−void ff_idct_add_altivec(uint8_t *dest, int line_size, int16_t *block);
35−
3632 void ff_dsputil_init_altivec(DSPContext *c, AVCodecContext *avctx,
3733 unsigned high_bit_depth);
3834
libavcodec/ppc/dsputil_ppc.c+0−9
@@ -43,15 +43,6 @@ av_cold void ff_dsputil_init_ppc(DSPContext *c, AVCodecContext *avctx, · 42 unmodified lines
4343 c->fdct = ff_fdct_altivec;
4444 }
4545 #endif //CONFIG_ENCODERS
46− if (avctx->lowres == 0) {
47− if ((avctx->idct_algo == FF_IDCT_AUTO) ||
48− (avctx->idct_algo == FF_IDCT_ALTIVEC)) {
49− c->idct = ff_idct_altivec;
50− c->idct_put = ff_idct_put_altivec;
51− c->idct_add = ff_idct_add_altivec;
52− c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
53− }
54− }
5546 }
5647 }
5748 }
libavcodec/ppc/idctdsp.crenamed from libavcodec/ppc/idct_altivec.c+29−4
@@ -37,8 +37,13 @@ · 36 unmodified lines
3737 #include <altivec.h>
3838 #endif
3939
40+#include "libavutil/attributes.h"
41+#include "libavutil/cpu.h"
42+#include "libavutil/ppc/cpu.h"
4043 #include "libavutil/ppc/types_altivec.h"
41−#include "dsputil_altivec.h"
44+#include "libavcodec/idctdsp.h"
45+
46+#if HAVE_ALTIVEC
4247
4348 #define IDCT_HALF \
4449 /* 1st stage */ \
@@ -148,7 +153,7 @@ static const vec_s16 constants[5] = { · 103 unmodified lines
148153 { 19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722 }
149154 };
150155
151−void ff_idct_altivec(int16_t *blk)
156+static void idct_altivec(int16_t *blk)
152157 {
153158 vec_s16 *block = (vec_s16 *) blk;
154159
@@ -164,7 +169,7 @@ void ff_idct_altivec(int16_t *blk) · 9 unmodified lines
164169 block[7] = vx7;
165170 }
166171
167−void ff_idct_put_altivec(uint8_t *dest, int stride, int16_t *blk)
172+static void idct_put_altivec(uint8_t *dest, int stride, int16_t *blk)
168173 {
169174 vec_s16 *block = (vec_s16 *) blk;
170175 vec_u8 tmp;
@@ -193,7 +198,7 @@ void ff_idct_put_altivec(uint8_t *dest, int stride, int16_t *blk) · 22 unmodified lines
193198 COPY(dest, vx7);
194199 }
195200
196−void ff_idct_add_altivec(uint8_t *dest, int stride, int16_t *blk)
201+static void idct_add_altivec(uint8_t *dest, int stride, int16_t *blk)
197202 {
198203 vec_s16 *block = (vec_s16 *) blk;
199204 vec_u8 tmp;
@@ -235,3 +240,23 @@ void ff_idct_add_altivec(uint8_t *dest, int stride, int16_t *blk) · 35 unmodified lines
235240 dest += stride;
236241 ADD(dest, vx7, perm1);
237242 }
243+
244+#endif /* HAVE_ALTIVEC */
245+
246+av_cold void ff_idctdsp_init_ppc(IDCTDSPContext *c, AVCodecContext *avctx,
247+ unsigned high_bit_depth)
248+{
249+#if HAVE_ALTIVEC
250+ if (PPC_ALTIVEC(av_get_cpu_flags())) {
251+ if (!high_bit_depth && avctx->lowres == 0) {
252+ if ((avctx->idct_algo == FF_IDCT_AUTO) ||
253+ (avctx->idct_algo == FF_IDCT_ALTIVEC)) {
254+ c->idct = idct_altivec;
255+ c->idct_add = idct_add_altivec;
256+ c->idct_put = idct_put_altivec;
257+ c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
258+ }
259+ }
260+ }
261+#endif /* HAVE_ALTIVEC */
262+}

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