diff --git a/src/dsp/dec_neon.c b/src/dsp/dec_neon.c index 8efe7d0e..b820eae1 100644 --- a/src/dsp/dec_neon.c +++ b/src/dsp/dec_neon.c @@ -327,12 +327,11 @@ static WEBP_INLINE void Store6x8x2(const uint8x16_t p2, const uint8x16_t p1, const uint8x16_t q1, const uint8x16_t q2, uint8_t* u, uint8_t* v, int stride) { - const uint8x8x3_t u0 = {{vget_low_u8(p2), vget_low_u8(p1), vget_low_u8(p0)}}; - const uint8x8x3_t u1 = {{vget_low_u8(q0), vget_low_u8(q1), vget_low_u8(q2)}}; - const uint8x8x3_t v0 = - {{vget_high_u8(p2), vget_high_u8(p1), vget_high_u8(p0)}}; - const uint8x8x3_t v1 = - {{vget_high_u8(q0), vget_high_u8(q1), vget_high_u8(q2)}}; + uint8x8x3_t u0, u1, v0, v1; + INIT_VECTOR3(u0, vget_low_u8(p2), vget_low_u8(p1), vget_low_u8(p0)); + INIT_VECTOR3(u1, vget_low_u8(q0), vget_low_u8(q1), vget_low_u8(q2)); + INIT_VECTOR3(v0, vget_high_u8(p2), vget_high_u8(p1), vget_high_u8(p0)); + INIT_VECTOR3(v1, vget_high_u8(q0), vget_high_u8(q1), vget_high_u8(q2)); STORE6_LANE(u, u0, u1, 0); STORE6_LANE(u, u0, u1, 1); STORE6_LANE(u, u0, u1, 2); diff --git a/src/dsp/neon.h b/src/dsp/neon.h index 59b784b8..47a91669 100644 --- a/src/dsp/neon.h +++ b/src/dsp/neon.h @@ -27,6 +27,12 @@ v.val[1] = b; \ } while (0) +#define INIT_VECTOR3(v, a, b, c) do { \ + v.val[0] = a; \ + v.val[1] = b; \ + v.val[2] = c; \ +} while (0) + // if using intrinsics, this flag avoids some functions that make gcc-4.6.3 // crash ("internal compiler error: in immed_double_const, at emit-rtl."). // (probably similar to gcc.gnu.org/bugzilla/show_bug.cgi?id=48183) diff --git a/src/dsp/upsampling_neon.c b/src/dsp/upsampling_neon.c index 74906a4b..b607f83b 100644 --- a/src/dsp/upsampling_neon.c +++ b/src/dsp/upsampling_neon.c @@ -94,12 +94,14 @@ static const int16_t kCoeffs[4] = { kYScale, kVToR, kUToG, kVToG }; #define v255 vmov_n_u8(255) #define STORE_Rgb(out, r, g, b) do { \ - const uint8x8x3_t r_g_b = {{ r, g, b }}; \ + uint8x8x3_t r_g_b; \ + INIT_VECTOR3(r_g_b, r, g, b); \ vst3_u8(out, r_g_b); \ } while (0) #define STORE_Bgr(out, r, g, b) do { \ - const uint8x8x3_t b_g_r = {{ b, g, r }}; \ + uint8x8x3_t b_g_r; \ + INIT_VECTOR3(b_g_r, b, g, r); \ vst3_u8(out, b_g_r); \ } while (0)