mirror of
https://github.com/webmproject/libwebp.git
synced 2025-02-13 07:22:52 +01:00
neon: add INIT_VECTOR2
used to initialize NxMx2 vector types replaces initialization via '{{ }}' gnu-ism. Change-Id: I4accc305c7dd4c886b63c22e38890b629bffb139
This commit is contained in:
parent
4536e7c49c
commit
dc7687e51b
@ -1014,7 +1014,8 @@ static WEBP_INLINE void TransformPass(int16x8x2_t* const rows) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void TransformOne(const int16_t* in, uint8_t* dst) {
|
static void TransformOne(const int16_t* in, uint8_t* dst) {
|
||||||
int16x8x2_t rows = {{ vld1q_s16(in + 0), vld1q_s16(in + 8) }};
|
int16x8x2_t rows;
|
||||||
|
INIT_VECTOR2(rows, vld1q_s16(in + 0), vld1q_s16(in + 8));
|
||||||
TransformPass(&rows);
|
TransformPass(&rows);
|
||||||
TransformPass(&rows);
|
TransformPass(&rows);
|
||||||
Add4x4(rows.val[0], rows.val[1], dst);
|
Add4x4(rows.val[0], rows.val[1], dst);
|
||||||
|
@ -118,7 +118,8 @@ static WEBP_INLINE void TransformPass(int16x8x2_t* const rows) {
|
|||||||
|
|
||||||
static void ITransformOne(const uint8_t* ref,
|
static void ITransformOne(const uint8_t* ref,
|
||||||
const int16_t* in, uint8_t* dst) {
|
const int16_t* in, uint8_t* dst) {
|
||||||
int16x8x2_t rows = {{ vld1q_s16(in + 0), vld1q_s16(in + 8) }};
|
int16x8x2_t rows;
|
||||||
|
INIT_VECTOR2(rows, vld1q_s16(in + 0), vld1q_s16(in + 8));
|
||||||
TransformPass(&rows);
|
TransformPass(&rows);
|
||||||
TransformPass(&rows);
|
TransformPass(&rows);
|
||||||
Add4x4(rows.val[0], rows.val[1], ref, dst);
|
Add4x4(rows.val[0], rows.val[1], ref, dst);
|
||||||
|
@ -22,6 +22,11 @@
|
|||||||
#define USE_INTRINSICS // use intrinsics when possible
|
#define USE_INTRINSICS // use intrinsics when possible
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define INIT_VECTOR2(v, a, b) do { \
|
||||||
|
v.val[0] = a; \
|
||||||
|
v.val[1] = b; \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
// if using intrinsics, this flag avoids some functions that make gcc-4.6.3
|
// 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.").
|
// crash ("internal compiler error: in immed_double_const, at emit-rtl.").
|
||||||
// (probably similar to gcc.gnu.org/bugzilla/show_bug.cgi?id=48183)
|
// (probably similar to gcc.gnu.org/bugzilla/show_bug.cgi?id=48183)
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <arm_neon.h>
|
#include <arm_neon.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "./neon.h"
|
||||||
#include "./yuv.h"
|
#include "./yuv.h"
|
||||||
|
|
||||||
#ifdef FANCY_UPSAMPLING
|
#ifdef FANCY_UPSAMPLING
|
||||||
@ -61,8 +62,9 @@
|
|||||||
d = vrhadd_u8(d, diag1); \
|
d = vrhadd_u8(d, diag1); \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
const uint8x8x2_t a_b = {{ a, b }}; \
|
uint8x8x2_t a_b, c_d; \
|
||||||
const uint8x8x2_t c_d = {{ c, d }}; \
|
INIT_VECTOR2(a_b, a, b); \
|
||||||
|
INIT_VECTOR2(c_d, c, d); \
|
||||||
vst2_u8(out, a_b); \
|
vst2_u8(out, a_b); \
|
||||||
vst2_u8(out + 32, c_d); \
|
vst2_u8(out + 32, c_d); \
|
||||||
} \
|
} \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user