Reduce ARGBToUV SSSE3 register usage for clang build error on x64

Bug: 444157316
Change-Id: I2ae9f3dbfb373bb874a3d9699987f7d5b63f2610
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/6937665
Reviewed-by: richard winterton <rrwinterton@gmail.com>
This commit is contained in:
Frank Barchard 2025-09-10 17:51:21 -07:00
parent 06a1c004bb
commit 0f795672ae
3 changed files with 14 additions and 8 deletions

View File

@ -1,6 +1,6 @@
Name: libyuv Name: libyuv
URL: https://chromium.googlesource.com/libyuv/libyuv/ URL: https://chromium.googlesource.com/libyuv/libyuv/
Version: 1916 Version: 1917
License: BSD-3-Clause License: BSD-3-Clause
License File: LICENSE License File: LICENSE
Shipped: yes Shipped: yes

View File

@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ #ifndef INCLUDE_LIBYUV_VERSION_H_
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1916 #define LIBYUV_VERSION 1917
#endif // INCLUDE_LIBYUV_VERSION_H_ #endif // INCLUDE_LIBYUV_VERSION_H_

View File

@ -1744,8 +1744,16 @@ void ARGBToUVMatrixRow_SSSE3(const uint8_t* src_argb,
asm volatile( asm volatile(
"pcmpeqb %%xmm4,%%xmm4 \n" // 0x0101 "pcmpeqb %%xmm4,%%xmm4 \n" // 0x0101
"pabsb %%xmm4,%%xmm4 \n" "pabsb %%xmm4,%%xmm4 \n"
"movdqa %5,%%xmm6 \n" // ARGB to U "movdqa %0,%%xmm6 \n" // ARGB to U
"movdqa %6,%%xmm7 \n" // ARGB to V "movdqa %1,%%xmm7 \n" // ARGB to V
:
:
"m"(rgbuvconstants->kRGBToU), // %0
"m"(rgbuvconstants->kRGBToV) // %1
: "memory", "cc");
asm volatile(
"sub %1,%2 \n" "sub %1,%2 \n"
LABELALIGN LABELALIGN
@ -1786,7 +1794,7 @@ void ARGBToUVMatrixRow_SSSE3(const uint8_t* src_argb,
"pmaddubsw %%xmm7,%%xmm1 \n" // v "pmaddubsw %%xmm7,%%xmm1 \n" // v
"phaddw %%xmm1,%%xmm0 \n" // uuuuvvvv "phaddw %%xmm1,%%xmm0 \n" // uuuuvvvv
"movdqa %7,%%xmm2 \n" // 0x8000 "movdqa %5,%%xmm2 \n" // 0x8000
"psubw %%xmm0,%%xmm2 \n" // unsigned 0 to 0xffff "psubw %%xmm0,%%xmm2 \n" // unsigned 0 to 0xffff
"psrlw $0x8,%%xmm2 \n" "psrlw $0x8,%%xmm2 \n"
"packuswb %%xmm2,%%xmm2 \n" "packuswb %%xmm2,%%xmm2 \n"
@ -1807,9 +1815,7 @@ void ARGBToUVMatrixRow_SSSE3(const uint8_t* src_argb,
"+rm"(width) // %3 "+rm"(width) // %3
#endif #endif
: "r"((intptr_t)(src_stride_argb)), // %4 : "r"((intptr_t)(src_stride_argb)), // %4
"m"(rgbuvconstants->kRGBToU), // %5 "m"(kAddUV128) // %5
"m"(rgbuvconstants->kRGBToV), // %6
"m"(kAddUV128) // %7
: "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6",
"xmm7"); "xmm7");