diff options
author | Diego Biurrun <diego@biurrun.de> | 2014-06-05 08:46:47 -0700 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-06-10 15:13:57 -0700 |
commit | 27860819d508068f056cf48473af04868791ad77 (patch) | |
tree | 9916fd30fcf28bdd64424daf8021d57686338fef | |
parent | 205fdd4ea5e1264946917a26fde01e137a485f5a (diff) | |
download | ffmpeg-27860819d508068f056cf48473af04868791ad77.tar.gz |
ppc: Consistently use convenience macro for runtime CPU detection
-rw-r--r-- | libavcodec/ppc/fft_altivec.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/fmtconvert_altivec.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/h264chroma_init.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/h264dsp.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/h264qpel.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/hpeldsp_altivec.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/mpegaudiodsp_altivec.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/mpegvideo_altivec.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/vc1dsp_altivec.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/vorbisdsp_altivec.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/vp3dsp_altivec.c | 3 | ||||
-rw-r--r-- | libavcodec/ppc/vp8dsp_altivec.c | 3 |
12 files changed, 24 insertions, 12 deletions
diff --git a/libavcodec/ppc/fft_altivec.c b/libavcodec/ppc/fft_altivec.c index a9acbc50d5..8fcc033b53 100644 --- a/libavcodec/ppc/fft_altivec.c +++ b/libavcodec/ppc/fft_altivec.c @@ -22,6 +22,7 @@ #include "config.h" #include "libavutil/cpu.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/types_altivec.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/fft.h" @@ -143,7 +144,7 @@ static void imdct_calc_altivec(FFTContext *s, FFTSample *output, const FFTSample av_cold void ff_fft_init_ppc(FFTContext *s) { #if HAVE_GNU_AS && HAVE_ALTIVEC - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; s->fft_calc = ff_fft_calc_interleave_altivec; diff --git a/libavcodec/ppc/fmtconvert_altivec.c b/libavcodec/ppc/fmtconvert_altivec.c index fddeba6e0b..14aaf6bc9a 100644 --- a/libavcodec/ppc/fmtconvert_altivec.c +++ b/libavcodec/ppc/fmtconvert_altivec.c @@ -22,6 +22,7 @@ #include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavutil/mem.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/fmtconvert.h" @@ -164,7 +165,7 @@ av_cold void ff_fmt_convert_init_ppc(FmtConvertContext *c, AVCodecContext *avctx) { #if HAVE_ALTIVEC - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_altivec; diff --git a/libavcodec/ppc/h264chroma_init.c b/libavcodec/ppc/h264chroma_init.c index 08980a8803..6d656d46ba 100644 --- a/libavcodec/ppc/h264chroma_init.c +++ b/libavcodec/ppc/h264chroma_init.c @@ -22,6 +22,7 @@ #include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavutil/intreadwrite.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/types_altivec.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/h264chroma.h" @@ -52,7 +53,7 @@ av_cold void ff_h264chroma_init_ppc(H264ChromaContext *c, int bit_depth) #if HAVE_ALTIVEC const int high_bit_depth = bit_depth > 8; - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; if (!high_bit_depth) { diff --git a/libavcodec/ppc/h264dsp.c b/libavcodec/ppc/h264dsp.c index 93ad43622a..31dc141d29 100644 --- a/libavcodec/ppc/h264dsp.c +++ b/libavcodec/ppc/h264dsp.c @@ -22,6 +22,7 @@ #include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavutil/intreadwrite.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/types_altivec.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/h264data.h" @@ -745,7 +746,7 @@ av_cold void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth, const int chroma_format_idc) { #if HAVE_ALTIVEC - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; if (bit_depth == 8) { diff --git a/libavcodec/ppc/h264qpel.c b/libavcodec/ppc/h264qpel.c index aae6725973..3963344dce 100644 --- a/libavcodec/ppc/h264qpel.c +++ b/libavcodec/ppc/h264qpel.c @@ -22,6 +22,7 @@ #include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavutil/intreadwrite.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/types_altivec.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/h264qpel.h" @@ -288,7 +289,7 @@ av_cold void ff_h264qpel_init_ppc(H264QpelContext *c, int bit_depth) #if HAVE_ALTIVEC const int high_bit_depth = bit_depth > 8; - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; if (!high_bit_depth) { diff --git a/libavcodec/ppc/hpeldsp_altivec.c b/libavcodec/ppc/hpeldsp_altivec.c index 92ce52af8d..fd6ae73915 100644 --- a/libavcodec/ppc/hpeldsp_altivec.c +++ b/libavcodec/ppc/hpeldsp_altivec.c @@ -28,6 +28,7 @@ #include "libavutil/attributes.h" #include "libavutil/cpu.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/types_altivec.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/hpeldsp.h" @@ -449,7 +450,7 @@ static void avg_pixels8_xy2_altivec(uint8_t *block, const uint8_t *pixels, ptrdi av_cold void ff_hpeldsp_init_ppc(HpelDSPContext *c, int flags) { #if HAVE_ALTIVEC - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; c->avg_pixels_tab[0][0] = ff_avg_pixels16_altivec; diff --git a/libavcodec/ppc/mpegaudiodsp_altivec.c b/libavcodec/ppc/mpegaudiodsp_altivec.c index 6a23cf515a..c37f8ec975 100644 --- a/libavcodec/ppc/mpegaudiodsp_altivec.c +++ b/libavcodec/ppc/mpegaudiodsp_altivec.c @@ -23,6 +23,7 @@ #include "libavutil/attributes.h" #include "libavutil/cpu.h" #include "libavutil/internal.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/mpegaudiodsp.h" @@ -132,7 +133,7 @@ static void apply_window_mp3(float *in, float *win, int *unused, float *out, av_cold void ff_mpadsp_init_ppc(MPADSPContext *s) { #if HAVE_ALTIVEC - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; s->apply_window_float = apply_window_mp3; diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c index eb1663d345..98ef143eb9 100644 --- a/libavcodec/ppc/mpegvideo_altivec.c +++ b/libavcodec/ppc/mpegvideo_altivec.c @@ -27,6 +27,7 @@ #include "config.h" #include "libavutil/attributes.h" #include "libavutil/cpu.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/types_altivec.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/mpegvideo.h" @@ -117,7 +118,7 @@ static void dct_unquantize_h263_altivec(MpegEncContext *s, av_cold void ff_MPV_common_init_ppc(MpegEncContext *s) { #if HAVE_ALTIVEC - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; if ((s->avctx->dct_algo == FF_DCT_AUTO) || diff --git a/libavcodec/ppc/vc1dsp_altivec.c b/libavcodec/ppc/vc1dsp_altivec.c index d48c4b9bdf..90c3d27e82 100644 --- a/libavcodec/ppc/vc1dsp_altivec.c +++ b/libavcodec/ppc/vc1dsp_altivec.c @@ -22,6 +22,7 @@ #include "config.h" #include "libavutil/attributes.h" #include "libavutil/cpu.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/types_altivec.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/vc1dsp.h" @@ -344,7 +345,7 @@ static void vc1_inv_trans_8x4_altivec(uint8_t *dest, int stride, int16_t *block) av_cold void ff_vc1dsp_init_ppc(VC1DSPContext *dsp) { #if HAVE_ALTIVEC - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; dsp->vc1_inv_trans_8x8 = vc1_inv_trans_8x8_altivec; diff --git a/libavcodec/ppc/vorbisdsp_altivec.c b/libavcodec/ppc/vorbisdsp_altivec.c index 56a865d94e..43f4d0325b 100644 --- a/libavcodec/ppc/vorbisdsp_altivec.c +++ b/libavcodec/ppc/vorbisdsp_altivec.c @@ -24,6 +24,7 @@ #endif #include "libavutil/attributes.h" #include "libavutil/cpu.h" +#include "libavutil/ppc/cpu.h" #include "libavcodec/vorbisdsp.h" #if HAVE_ALTIVEC @@ -54,7 +55,7 @@ static void vorbis_inverse_coupling_altivec(float *mag, float *ang, av_cold void ff_vorbisdsp_init_ppc(VorbisDSPContext *c) { #if HAVE_ALTIVEC - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; c->vorbis_inverse_coupling = vorbis_inverse_coupling_altivec; diff --git a/libavcodec/ppc/vp3dsp_altivec.c b/libavcodec/ppc/vp3dsp_altivec.c index 612e6e486e..bce49e3170 100644 --- a/libavcodec/ppc/vp3dsp_altivec.c +++ b/libavcodec/ppc/vp3dsp_altivec.c @@ -23,6 +23,7 @@ #include "config.h" #include "libavutil/attributes.h" #include "libavutil/cpu.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/types_altivec.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/vp3dsp.h" @@ -179,7 +180,7 @@ static void vp3_idct_add_altivec(uint8_t *dst, int stride, int16_t block[64]) av_cold void ff_vp3dsp_init_ppc(VP3DSPContext *c, int flags) { #if HAVE_ALTIVEC - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; c->idct_put = vp3_idct_put_altivec; diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c index 653ffb2786..e010dee4d2 100644 --- a/libavcodec/ppc/vp8dsp_altivec.c +++ b/libavcodec/ppc/vp8dsp_altivec.c @@ -23,6 +23,7 @@ #include "config.h" #include "libavutil/cpu.h" #include "libavutil/mem.h" +#include "libavutil/ppc/cpu.h" #include "libavutil/ppc/types_altivec.h" #include "libavutil/ppc/util_altivec.h" #include "libavcodec/vp8dsp.h" @@ -315,7 +316,7 @@ static void put_vp8_pixels16_altivec(uint8_t *dst, ptrdiff_t dstride, uint8_t *s av_cold void ff_vp78dsp_init_ppc(VP8DSPContext *c) { #if HAVE_ALTIVEC - if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) + if (!PPC_ALTIVEC(av_get_cpu_flags())) return; c->put_vp8_epel_pixels_tab[0][0][0] = put_vp8_pixels16_altivec; |