summaryrefslogtreecommitdiff
path: root/libavcodec/ppc/h264qpel.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2015-05-10 23:22:17 +0200
committerLuca Barbato <lu_zero@gentoo.org>2015-05-31 12:07:11 +0200
commitda60b99a8857d5ca236f32c1799a066e0135a866 (patch)
treeb5af7af3af176f5d481970b9137fc6eefad4a5ab /libavcodec/ppc/h264qpel.c
parentf22ebd2555d15b59e109a5b630dd71374b076d0b (diff)
ppc: Restrict some Altivec implementations to Big Endian
In Little Endian the vec_ld/vec_st operations work as expected only for byte-vectors.
Diffstat (limited to 'libavcodec/ppc/h264qpel.c')
-rw-r--r--libavcodec/ppc/h264qpel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/ppc/h264qpel.c b/libavcodec/ppc/h264qpel.c
index f840277c88..92c86f32fc 100644
--- a/libavcodec/ppc/h264qpel.c
+++ b/libavcodec/ppc/h264qpel.c
@@ -28,7 +28,7 @@
#include "libavcodec/h264qpel.h"
#include "hpeldsp_altivec.h"
-#if HAVE_ALTIVEC
+#if HAVE_ALTIVEC && HAVE_BIGENDIAN
#define PUT_OP_U8_ALTIVEC(d, s, dst) d = s
#define AVG_OP_U8_ALTIVEC(d, s, dst) d = vec_avg(dst, s)
@@ -286,7 +286,7 @@ H264_MC(avg_, 16, altivec)
av_cold void ff_h264qpel_init_ppc(H264QpelContext *c, int bit_depth)
{
-#if HAVE_ALTIVEC
+#if HAVE_ALTIVEC && HAVE_BIGENDIAN
const int high_bit_depth = bit_depth > 8;
if (!PPC_ALTIVEC(av_get_cpu_flags()))