summaryrefslogtreecommitdiff
path: root/libavcodec/ppc/h264dsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/ppc/h264dsp.c')
-rw-r--r--libavcodec/ppc/h264dsp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/ppc/h264dsp.c b/libavcodec/ppc/h264dsp.c
index 3c2bb4d630..a675bcda3e 100644
--- a/libavcodec/ppc/h264dsp.c
+++ b/libavcodec/ppc/h264dsp.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
@@ -26,6 +27,8 @@
#include "libavcodec/h264data.h"
#include "libavcodec/h264dsp.h"
+#if HAVE_ALTIVEC
+
/****************************************************************************
* IDCT transform:
****************************************************************************/
@@ -721,10 +724,12 @@ static void ff_biweight_h264_pixels ## W ## _altivec(uint8_t *dst, uint8_t *src,
H264_WEIGHT(16)
H264_WEIGHT( 8)
+#endif /* HAVE_ALTIVEC */
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 (bit_depth == 8) {
c->h264_idct_add = ff_h264_idct_add_altivec;
@@ -745,4 +750,5 @@ av_cold void ff_h264dsp_init_ppc(H264DSPContext *c, const int bit_depth,
c->biweight_h264_pixels_tab[1] = ff_biweight_h264_pixels8_altivec;
}
}
+#endif /* HAVE_ALTIVEC */
}