aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRong Yan <rongyan236@gmail.com>2015-04-27 03:29:51 +0000
committerMichael Niedermayer <michaelni@gmx.at>2015-04-27 12:59:15 +0200
commit8a03d428f1759a7d3af505ab747662747360ea60 (patch)
tree6b8ba6e5ed4ab7cccb4c4d114e3fbabf90bcc8b1
parent603c839398f89d3ef15c47530470fbb0051632c0 (diff)
downloadffmpeg-8a03d428f1759a7d3af505ab747662747360ea60.tar.gz
avcodec/ppc/fdctdsp: POWER LE support in ff_fdct_altivec() delete macros VEC_FMERGEH() VEC_FMERGEL(), they where wrong
GCC tool had a bug of PPC intrinsic interpret, which has been fixed in GCC 4.9.1. This bug lead to errors in two of our previous patches. We found this when we update our GCC tools to 4.9.1 and by reading the related info on GCC website. We fix our previous error in two separate commits Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/ppc/fdctdsp.c86
1 files changed, 39 insertions, 47 deletions
diff --git a/libavcodec/ppc/fdctdsp.c b/libavcodec/ppc/fdctdsp.c
index 80f1366c65..40f4c6c967 100644
--- a/libavcodec/ppc/fdctdsp.c
+++ b/libavcodec/ppc/fdctdsp.c
@@ -78,14 +78,6 @@ static const vector float fdctconsts[3] = {
#define LD_WA vec_splat(cnsts2, 2)
#define LD_WB vec_splat(cnsts2, 3)
-#if HAVE_BIGENDIAN
-#define VEC_FMERGEH(a, b) vec_mergeh(a, b)
-#define VEC_FMERGEL(a, b) vec_mergel(a, b)
-#else
-#define VEC_FMERGEH(a, b) vec_mergel(b, a)
-#define VEC_FMERGEL(a, b) vec_mergeh(b, a)
-#endif
-
#define FDCTROW(b0, b1, b2, b3, b4, b5, b6, b7) /* {{{ */ \
x0 = vec_add(b0, b7); /* x0 = b0 + b7; */ \
x7 = vec_sub(b0, b7); /* x7 = b0 - b7; */ \
@@ -393,45 +385,45 @@ void ff_fdct_altivec(int16_t *block)
/* }}} */
/* 8x8 matrix transpose (vector float[8][2]) {{{ */
- x0 = VEC_FMERGEL(b00, b20);
- x1 = VEC_FMERGEH(b00, b20);
- x2 = VEC_FMERGEL(b10, b30);
- x3 = VEC_FMERGEH(b10, b30);
-
- b00 = VEC_FMERGEH(x1, x3);
- b10 = VEC_FMERGEL(x1, x3);
- b20 = VEC_FMERGEH(x0, x2);
- b30 = VEC_FMERGEL(x0, x2);
-
- x4 = VEC_FMERGEL(b41, b61);
- x5 = VEC_FMERGEH(b41, b61);
- x6 = VEC_FMERGEL(b51, b71);
- x7 = VEC_FMERGEH(b51, b71);
-
- b41 = VEC_FMERGEH(x5, x7);
- b51 = VEC_FMERGEL(x5, x7);
- b61 = VEC_FMERGEH(x4, x6);
- b71 = VEC_FMERGEL(x4, x6);
-
- x0 = VEC_FMERGEL(b01, b21);
- x1 = VEC_FMERGEH(b01, b21);
- x2 = VEC_FMERGEL(b11, b31);
- x3 = VEC_FMERGEH(b11, b31);
-
- x4 = VEC_FMERGEL(b40, b60);
- x5 = VEC_FMERGEH(b40, b60);
- x6 = VEC_FMERGEL(b50, b70);
- x7 = VEC_FMERGEH(b50, b70);
-
- b40 = VEC_FMERGEH(x1, x3);
- b50 = VEC_FMERGEL(x1, x3);
- b60 = VEC_FMERGEH(x0, x2);
- b70 = VEC_FMERGEL(x0, x2);
-
- b01 = VEC_FMERGEH(x5, x7);
- b11 = VEC_FMERGEL(x5, x7);
- b21 = VEC_FMERGEH(x4, x6);
- b31 = VEC_FMERGEL(x4, x6);
+ x0 = vec_mergel(b00, b20);
+ x1 = vec_mergeh(b00, b20);
+ x2 = vec_mergel(b10, b30);
+ x3 = vec_mergeh(b10, b30);
+
+ b00 = vec_mergeh(x1, x3);
+ b10 = vec_mergel(x1, x3);
+ b20 = vec_mergeh(x0, x2);
+ b30 = vec_mergel(x0, x2);
+
+ x4 = vec_mergel(b41, b61);
+ x5 = vec_mergeh(b41, b61);
+ x6 = vec_mergel(b51, b71);
+ x7 = vec_mergeh(b51, b71);
+
+ b41 = vec_mergeh(x5, x7);
+ b51 = vec_mergel(x5, x7);
+ b61 = vec_mergeh(x4, x6);
+ b71 = vec_mergel(x4, x6);
+
+ x0 = vec_mergel(b01, b21);
+ x1 = vec_mergeh(b01, b21);
+ x2 = vec_mergel(b11, b31);
+ x3 = vec_mergeh(b11, b31);
+
+ x4 = vec_mergel(b40, b60);
+ x5 = vec_mergeh(b40, b60);
+ x6 = vec_mergel(b50, b70);
+ x7 = vec_mergeh(b50, b70);
+
+ b40 = vec_mergeh(x1, x3);
+ b50 = vec_mergel(x1, x3);
+ b60 = vec_mergeh(x0, x2);
+ b70 = vec_mergel(x0, x2);
+
+ b01 = vec_mergeh(x5, x7);
+ b11 = vec_mergel(x5, x7);
+ b21 = vec_mergeh(x4, x6);
+ b31 = vec_mergel(x4, x6);
/* }}} */
FDCTCOL(b00, b10, b20, b30, b40, b50, b60, b70);