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
9OBJS-$(CONFIG_H264QPEL) += ppc/h264qpel.o9OBJS-$(CONFIG_H264QPEL) += ppc/h264qpel.o
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_IDCTDSP) += ppc/idctdsp.o
12OBJS-$(CONFIG_MPEGAUDIODSP) += ppc/mpegaudiodsp_altivec.o13OBJS-$(CONFIG_MPEGAUDIODSP) += ppc/mpegaudiodsp_altivec.o
13OBJS-$(CONFIG_MPEGVIDEO) += ppc/mpegvideo_altivec.o \14OBJS-$(CONFIG_MPEGVIDEO) += ppc/mpegvideo_altivec.o \
14 ppc/mpegvideodsp.o15 ppc/mpegvideodsp.o
@@ -24,7 +25,6 @@ OBJS-$(CONFIG_VP8_DECODER) += ppc/vp8dsp_altivec.o · 9 unmodified lines
24 25
25ALTIVEC-OBJS-$(CONFIG_DSPUTIL) += ppc/dsputil_altivec.o \26ALTIVEC-OBJS-$(CONFIG_DSPUTIL) += ppc/dsputil_altivec.o \
26 ppc/fdct_altivec.o \27 ppc/fdct_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
30FFT-OBJS-$(HAVE_VSX) += ppc/fft_vsx.o30FFT-OBJS-$(HAVE_VSX) += ppc/fft_vsx.o
libavcodec/ppc/dsputil_altivec.h+0−4
@@ -29,10 +29,6 @@ · 28 unmodified lines
29 29
30void ff_fdct_altivec(int16_t *block);30void ff_fdct_altivec(int16_t *block);
31 31
32void ff_idct_altivec(int16_t *block);
33void 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);
35
36void ff_dsputil_init_altivec(DSPContext *c, AVCodecContext *avctx,32void ff_dsputil_init_altivec(DSPContext *c, AVCodecContext *avctx,
37 unsigned high_bit_depth);33 unsigned high_bit_depth);
38 34
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
43 c->fdct = ff_fdct_altivec;43 c->fdct = ff_fdct_altivec;
44 }44 }
45#endif //CONFIG_ENCODERS45#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 }
55 }46 }
56 }47 }
57}48}
libavcodec/ppc/idctdsp.crenamed from libavcodec/ppc/idct_altivec.c+29−4
@@ -37,8 +37,13 @@ · 36 unmodified lines
37#include <altivec.h>37#include <altivec.h>
38#endif38#endif
39 39
40#include "libavutil/attributes.h"
41#include "libavutil/cpu.h"
42#include "libavutil/ppc/cpu.h"
40#include "libavutil/ppc/types_altivec.h"43#include "libavutil/ppc/types_altivec.h"
41#include "dsputil_altivec.h"44#include "libavcodec/idctdsp.h"
45
46#if HAVE_ALTIVEC
42 47
43#define IDCT_HALF \48#define IDCT_HALF \
44 /* 1st stage */ \49 /* 1st stage */ \
@@ -148,7 +153,7 @@ static const vec_s16 constants[5] = { · 103 unmodified lines
148 { 19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722 }153 { 19266, 26722, 25172, 22654, 19266, 22654, 25172, 26722 }
149};154};
150 155
151void ff_idct_altivec(int16_t *blk)156static void idct_altivec(int16_t *blk)
152{157{
153 vec_s16 *block = (vec_s16 *) blk;158 vec_s16 *block = (vec_s16 *) blk;
154 159
@@ -164,7 +169,7 @@ void ff_idct_altivec(int16_t *blk) · 9 unmodified lines
164 block[7] = vx7;169 block[7] = vx7;
165}170}
166 171
167void ff_idct_put_altivec(uint8_t *dest, int stride, int16_t *blk)172static void idct_put_altivec(uint8_t *dest, int stride, int16_t *blk)
168{173{
169 vec_s16 *block = (vec_s16 *) blk;174 vec_s16 *block = (vec_s16 *) blk;
170 vec_u8 tmp;175 vec_u8 tmp;
@@ -193,7 +198,7 @@ void ff_idct_put_altivec(uint8_t *dest, int stride, int16_t *blk) · 22 unmodified lines
193 COPY(dest, vx7);198 COPY(dest, vx7);
194}199}
195 200
196void ff_idct_add_altivec(uint8_t *dest, int stride, int16_t *blk)201static void idct_add_altivec(uint8_t *dest, int stride, int16_t *blk)
197{202{
198 vec_s16 *block = (vec_s16 *) blk;203 vec_s16 *block = (vec_s16 *) blk;
199 vec_u8 tmp;204 vec_u8 tmp;
@@ -235,3 +240,23 @@ void ff_idct_add_altivec(uint8_t *dest, int stride, int16_t *blk) · 35 unmodified lines
235 dest += stride;240 dest += stride;
236 ADD(dest, vx7, perm1);241 ADD(dest, vx7, perm1);
237}242}
243
244#endif /* HAVE_ALTIVEC */
245
246av_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