diff --git a/mythtv/configure b/mythtv/configure index 4d46659bb3d..60fb08b0e7c 100755 --- a/mythtv/configure +++ b/mythtv/configure @@ -1229,6 +1229,7 @@ HAVE_LIST=" attribute_may_alias attribute_packed bswap + byteswap_h closesocket cmov conio_h diff --git a/mythtv/libs/libmythtv/yuv2rgb.cpp b/mythtv/libs/libmythtv/yuv2rgb.cpp index 89271bb0c96..a6c0b6c8a36 100644 --- a/mythtv/libs/libmythtv/yuv2rgb.cpp +++ b/mythtv/libs/libmythtv/yuv2rgb.cpp @@ -40,7 +40,10 @@ extern "C" { #endif #if HAVE_ALTIVEC -extern "C" int has_altivec(void); // in libavcodec/ppc/check_altivec.c +extern "C" { +#include "libavutil/cpu.h" +} +int has_altivec(void); #if HAVE_ALTIVEC_H #include #else @@ -49,6 +52,17 @@ extern "C" int has_altivec(void); // in libavcodec/ppc/check_altivec.c #endif #include "yuv2rgb.h" +#if HAVE_ALTIVEC +int has_altivec(void) +{ + int cpu_flags = av_get_cpu_flags(); + if (cpu_flags & AV_CPU_FLAG_ALTIVEC) + return(1); + + return(0); +} +#endif + /** \file yuv2rgb.cpp * \brief Contains various YUV, VUY and RGBA colorspace conversion routines. *