Skip to content

Commit

Permalink
Fix compilation for linux-ppc
Browse files Browse the repository at this point in the history
Check for HAVE_BYTESWAP_H was missing from configure.  Also have_altivec() is
no longer in ffmpeg, so I reimplemented it using av_get_cpu_flags().
  • Loading branch information
Beirdo committed May 7, 2011
1 parent 0292884 commit d3befcf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions mythtv/configure
Expand Up @@ -1229,6 +1229,7 @@ HAVE_LIST="
attribute_may_alias
attribute_packed
bswap
byteswap_h
closesocket
cmov
conio_h
Expand Down
16 changes: 15 additions & 1 deletion mythtv/libs/libmythtv/yuv2rgb.cpp
Expand Up @@ -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 <altivec.h>
#else
Expand All @@ -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.
*
Expand Down

0 comments on commit d3befcf

Please sign in to comment.