upsampling_neon.c: fix build

store values to a temporary variable before calling functions that take
vector types.
removes non-standard constructs such as:
  (uint8x8x2_t){{ a, b }}
fixing:
  src/dsp/upsampling_neon.c:69:32: error: macro "vst2_u8" passed 3
arguments, but takes just 2

Change-Id: Ib4368e16e3a3efac18024f02be94e76243ade2dc
Fixes: https://code.google.com/p/webp/issues/detail?id=140
This commit is contained in:
James Zern 2013-01-25 19:37:48 -08:00
parent f112221e77
commit 27f8f7420e

View File

@ -59,8 +59,12 @@ extern "C" {
c = vrhadd_u8(c, diag2); \
d = vrhadd_u8(d, diag1); \
\
vst2_u8(out, (uint8x8x2_t){{ a, b }}); \
vst2_u8(out + 32, (uint8x8x2_t){{ c, d }}); \
{ \
const uint8x8x2_t a_b = {{ a, b }}; \
const uint8x8x2_t c_d = {{ c, d }}; \
vst2_u8(out, a_b); \
vst2_u8(out + 32, c_d); \
} \
}
// Turn the macro into a function for reducing code-size when non-critical
@ -150,10 +154,25 @@ static const int16_t coef[4] = { CVR / 4, CUG, CVG / 2, CUB / 4 };
#define v255 vmov_n_u8(255)
#define STR_Rgb(out, r, g, b) vst3_u8(out, (uint8x8x3_t){{ r, g, b }})
#define STR_Bgr(out, r, g, b) vst3_u8(out, (uint8x8x3_t){{ b, g, r }})
#define STR_Rgba(out, r, g, b) vst4_u8(out, (uint8x8x4_t){{ r, g, b, v255 }})
#define STR_Bgra(out, r, g, b) vst4_u8(out, (uint8x8x4_t){{ b, g, r, v255 }})
#define STR_Rgb(out, r, g, b) do { \
const uint8x8x3_t r_g_b = {{ r, g, b }}; \
vst3_u8(out, r_g_b); \
} while (0)
#define STR_Bgr(out, r, g, b) do { \
const uint8x8x3_t b_g_r = {{ b, g, r }}; \
vst3_u8(out, b_g_r); \
} while (0)
#define STR_Rgba(out, r, g, b) do { \
const uint8x8x4_t r_g_b_v255 = {{ r, g, b, v255 }}; \
vst4_u8(out, r_g_b_v255); \
} while (0)
#define STR_Bgra(out, r, g, b) do { \
const uint8x8x4_t b_g_r_v255 = {{ b, g, r, v255 }}; \
vst4_u8(out, b_g_r_v255); \
} while (0)
#define CONVERT1(FMT, XSTEP, N, src_y, src_uv, rgb, cur_x) { \
int i; \