Commit 1290143f authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '27860819'

* commit '27860819':
  ppc: Consistently use convenience macro for runtime CPU detection
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 26be0e31 27860819
......@@ -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;
......
......@@ -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;
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -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) {
......
......@@ -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;
......
......@@ -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;
......
......@@ -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) ||
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment