Commit 2af180bf authored by Rong Yan's avatar Rong Yan Committed by Michael Niedermayer

swscale/ppc/yuv2rgb_altivec: POWER LE support in the macros vec_unh() and vec_unl()

Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 0bfa176c
...@@ -222,6 +222,7 @@ static const vector unsigned char ...@@ -222,6 +222,7 @@ static const vector unsigned char
* optimized for JPEG decoding. * optimized for JPEG decoding.
*/ */
#if HAVE_BIGENDIAN
#define vec_unh(x) \ #define vec_unh(x) \
(vector signed short) \ (vector signed short) \
vec_perm(x, (__typeof__(x)) { 0 }, \ vec_perm(x, (__typeof__(x)) { 0 }, \
...@@ -235,6 +236,10 @@ static const vector unsigned char ...@@ -235,6 +236,10 @@ static const vector unsigned char
((vector unsigned char) { \ ((vector unsigned char) { \
0x10, 0x08, 0x10, 0x09, 0x10, 0x0A, 0x10, 0x0B, \ 0x10, 0x08, 0x10, 0x09, 0x10, 0x0A, 0x10, 0x0B, \
0x10, 0x0C, 0x10, 0x0D, 0x10, 0x0E, 0x10, 0x0F })) 0x10, 0x0C, 0x10, 0x0D, 0x10, 0x0E, 0x10, 0x0F }))
#else
#define vec_unh(x)(vector signed short) vec_mergeh(x,(__typeof__(x)) { 0 })
#define vec_unl(x)(vector signed short) vec_mergel(x,(__typeof__(x)) { 0 })
#endif
#define vec_clip_s16(x) \ #define vec_clip_s16(x) \
vec_max(vec_min(x, ((vector signed short) { \ vec_max(vec_min(x, ((vector signed short) { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment