Commit 9425dc3d authored by Pavel Koshevoy's avatar Pavel Koshevoy Committed by Michael Niedermayer

Fix build failure on osx 10.5.8 ppc

Second parameter to vec_splat must be a literal, not a variable
value.  Therefore the second nested for-loop in
float_to_int16_stride_altivec had to be unrolled.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f464b02d
...@@ -86,16 +86,27 @@ static void float_to_int16_altivec(int16_t *dst, const float *src, long len) ...@@ -86,16 +86,27 @@ static void float_to_int16_altivec(int16_t *dst, const float *src, long len)
static void float_to_int16_stride_altivec(int16_t *dst, const float *src, static void float_to_int16_stride_altivec(int16_t *dst, const float *src,
long len, int stride) long len, int stride)
{ {
int i, j; int i;
vector signed short d, s; vector signed short d, s;
for (i = 0; i < len - 7; i += 8) { for (i = 0; i < len - 7; i += 8) {
d = float_to_int16_one_altivec(src + i); d = float_to_int16_one_altivec(src + i);
for (j = 0; j < 8; j++) {
s = vec_splat(d, j); #define ASSIGN_S_VEC_SPLAT_D(j) \
vec_ste(s, 0, dst); s = vec_splat(d, j); \
dst += stride; vec_ste(s, 0, dst); \
} dst += stride
ASSIGN_S_VEC_SPLAT_D(0);
ASSIGN_S_VEC_SPLAT_D(1);
ASSIGN_S_VEC_SPLAT_D(2);
ASSIGN_S_VEC_SPLAT_D(3);
ASSIGN_S_VEC_SPLAT_D(4);
ASSIGN_S_VEC_SPLAT_D(5);
ASSIGN_S_VEC_SPLAT_D(6);
ASSIGN_S_VEC_SPLAT_D(7);
#undef ASSIGN_S_VEC_SPLAT_D
} }
} }
......
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