aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ppc/mpegvideo_altivec.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-04-14 14:47:30 +0200
committerDiego Biurrun <diego@biurrun.de>2013-04-30 12:19:45 +0200
commit38282149b6ce8f4b8361e3b84542ba9aa8a1f32f (patch)
tree028b5282288a6849233274851112fff4e2d0d25b /libavcodec/ppc/mpegvideo_altivec.c
parent42b9150b0d4f0a130c1d93dc991fd5412743a8cf (diff)
downloadffmpeg-38282149b6ce8f4b8361e3b84542ba9aa8a1f32f.tar.gz
ppc: More consistent arch initialization
Diffstat (limited to 'libavcodec/ppc/mpegvideo_altivec.c')
-rw-r--r--libavcodec/ppc/mpegvideo_altivec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/libavcodec/ppc/mpegvideo_altivec.c b/libavcodec/ppc/mpegvideo_altivec.c
index f6c85fdb71..4ad24b98d8 100644
--- a/libavcodec/ppc/mpegvideo_altivec.c
+++ b/libavcodec/ppc/mpegvideo_altivec.c
@@ -24,14 +24,16 @@
#include <stdlib.h>
#include <stdio.h>
+#include "config.h"
#include "libavutil/attributes.h"
#include "libavutil/cpu.h"
#include "libavutil/ppc/types_altivec.h"
#include "libavutil/ppc/util_altivec.h"
#include "libavcodec/mpegvideo.h"
-
#include "dsputil_altivec.h"
+#if HAVE_ALTIVEC
+
/* AltiVec version of dct_unquantize_h263
this code assumes `block' is 16 bytes-aligned */
static void dct_unquantize_h263_altivec(MpegEncContext *s,
@@ -111,9 +113,11 @@ static void dct_unquantize_h263_altivec(MpegEncContext *s,
}
}
+#endif /* HAVE_ALTIVEC */
-av_cold void ff_MPV_common_init_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)) return;
if ((s->avctx->dct_algo == FF_DCT_AUTO) ||
@@ -121,4 +125,5 @@ av_cold void ff_MPV_common_init_altivec(MpegEncContext *s)
s->dct_unquantize_h263_intra = dct_unquantize_h263_altivec;
s->dct_unquantize_h263_inter = dct_unquantize_h263_altivec;
}
+#endif /* HAVE_ALTIVEC */
}