mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
neon: add INIT_VECTOR4
used to initialize NxMx4 vector types replaces initialization via '{{ }}' gnu-ism. Change-Id: I0da7b3d321f3d48579b7863fb2e4d3f449ae7f5e
This commit is contained in:
@ -96,11 +96,12 @@ static void ConvertBGRAToBGR(const uint32_t* src,
|
||||
const uint8x8_t shuffle1 = vld1_u8(kBGRShuffle[1]);
|
||||
const uint8x8_t shuffle2 = vld1_u8(kBGRShuffle[2]);
|
||||
for (; src < end; src += 8) {
|
||||
const uint8x8x4_t pixels = {{
|
||||
vld1_u8((const uint8_t*)(src + 0)),
|
||||
vld1_u8((const uint8_t*)(src + 2)),
|
||||
vld1_u8((const uint8_t*)(src + 4)),
|
||||
vld1_u8((const uint8_t*)(src + 6)) }};
|
||||
uint8x8x4_t pixels;
|
||||
INIT_VECTOR4(pixels,
|
||||
vld1_u8((const uint8_t*)(src + 0)),
|
||||
vld1_u8((const uint8_t*)(src + 2)),
|
||||
vld1_u8((const uint8_t*)(src + 4)),
|
||||
vld1_u8((const uint8_t*)(src + 6)));
|
||||
vst1_u8(dst + 0, vtbl4_u8(pixels, shuffle0));
|
||||
vst1_u8(dst + 8, vtbl4_u8(pixels, shuffle1));
|
||||
vst1_u8(dst + 16, vtbl4_u8(pixels, shuffle2));
|
||||
@ -122,11 +123,12 @@ static void ConvertBGRAToRGB(const uint32_t* src,
|
||||
const uint8x8_t shuffle1 = vld1_u8(kRGBShuffle[1]);
|
||||
const uint8x8_t shuffle2 = vld1_u8(kRGBShuffle[2]);
|
||||
for (; src < end; src += 8) {
|
||||
const uint8x8x4_t pixels = {{
|
||||
vld1_u8((const uint8_t*)(src + 0)),
|
||||
vld1_u8((const uint8_t*)(src + 2)),
|
||||
vld1_u8((const uint8_t*)(src + 4)),
|
||||
vld1_u8((const uint8_t*)(src + 6)) }};
|
||||
uint8x8x4_t pixels;
|
||||
INIT_VECTOR4(pixels,
|
||||
vld1_u8((const uint8_t*)(src + 0)),
|
||||
vld1_u8((const uint8_t*)(src + 2)),
|
||||
vld1_u8((const uint8_t*)(src + 4)),
|
||||
vld1_u8((const uint8_t*)(src + 6)));
|
||||
vst1_u8(dst + 0, vtbl4_u8(pixels, shuffle0));
|
||||
vst1_u8(dst + 8, vtbl4_u8(pixels, shuffle1));
|
||||
vst1_u8(dst + 16, vtbl4_u8(pixels, shuffle2));
|
||||
|
Reference in New Issue
Block a user