Index: source/row_gcc.cc |
diff --git a/source/row_gcc.cc b/source/row_gcc.cc |
index a53520c661c160c12e81c140547a6e443e637df9..52046645ebc2f24234759e159b777e0787e01a70 100644 |
--- a/source/row_gcc.cc |
+++ b/source/row_gcc.cc |
@@ -1584,18 +1584,19 @@ YuvConstants SIMD_ALIGNED(kYuvHConstants) = { |
"movdqu %%xmm0," MEMACCESS2(0x10, [dst_rgba]) " \n" \ |
"lea " MEMLEA(0x20, [dst_rgba]) ",%[dst_rgba] \n" |
-void OMITFP I444ToARGBRow_SSSE3(const uint8* y_buf, |
- const uint8* u_buf, |
- const uint8* v_buf, |
- uint8* dst_argb, |
- int width) { |
+void OMITFP I444ToARGBMatrixRow_SSSE3(const uint8* y_buf, |
+ const uint8* u_buf, |
+ const uint8* v_buf, |
+ uint8* dst_argb, |
+ struct YuvConstants* YuvConstants, |
+ int width) { |
asm volatile ( |
"sub %[u_buf],%[v_buf] \n" |
"pcmpeqb %%xmm5,%%xmm5 \n" |
LABELALIGN |
"1: \n" |
READYUV444 |
- YUVTORGB(kYuvConstants) |
+ YUVTORGB(YuvConstants) |
STOREARGB |
"sub $0x8,%[width] \n" |
"jg 1b \n" |
@@ -1604,7 +1605,34 @@ void OMITFP I444ToARGBRow_SSSE3(const uint8* y_buf, |
[v_buf]"+r"(v_buf), // %[v_buf] |
[dst_argb]"+r"(dst_argb), // %[dst_argb] |
[width]"+rm"(width) // %[width] |
- : [kYuvConstants]"r"(&kYuvConstants.kUVToB) // %[kYuvConstants] |
+ : [YuvConstants]"r"(YuvConstants) // %[kYuvConstants] |
+ : "memory", "cc", NACL_R14 |
+ "xmm0", "xmm1", "xmm2", "xmm3", "xmm5" |
+ ); |
+} |
+ |
+void OMITFP I444ToABGRMatrixRow_SSSE3(const uint8* y_buf, |
+ const uint8* u_buf, |
+ const uint8* v_buf, |
+ uint8* dst_abgr, |
+ struct YuvConstants* YuvConstants, |
+ int width) { |
+ asm volatile ( |
+ "sub %[u_buf],%[v_buf] \n" |
+ "pcmpeqb %%xmm5,%%xmm5 \n" |
+ LABELALIGN |
+ "1: \n" |
+ READYUV444 |
+ YUVTORGB(YuvConstants) |
+ STOREABGR |
+ "sub $0x8,%[width] \n" |
+ "jg 1b \n" |
+ : [y_buf]"+r"(y_buf), // %[y_buf] |
+ [u_buf]"+r"(u_buf), // %[u_buf] |
+ [v_buf]"+r"(v_buf), // %[v_buf] |
+ [dst_abgr]"+r"(dst_abgr), // %[dst_abgr] |
+ [width]"+rm"(width) // %[width] |
+ : [YuvConstants]"r"(YuvConstants) // %[kYuvConstants] |
: "memory", "cc", NACL_R14 |
"xmm0", "xmm1", "xmm2", "xmm3", "xmm5" |
); |
@@ -1711,7 +1739,7 @@ void OMITFP I422ToARGBMatrixRow_SSSE3(const uint8* y_buf, |
LABELALIGN |
"1: \n" |
READYUV422 |
- YUVTORGB(kYuvConstants) |
+ YUVTORGB(YuvConstants) |
STOREARGB |
"sub $0x8,%[width] \n" |
"jg 1b \n" |
@@ -1720,7 +1748,7 @@ void OMITFP I422ToARGBMatrixRow_SSSE3(const uint8* y_buf, |
[v_buf]"+r"(v_buf), // %[v_buf] |
[dst_argb]"+r"(dst_argb), // %[dst_argb] |
[width]"+rm"(width) // %[width] |
- : [kYuvConstants]"r"(YuvConstants) // %[kYuvConstants] |
+ : [YuvConstants]"r"(YuvConstants) // %[kYuvConstants] |
: "memory", "cc", NACL_R14 |
"xmm0", "xmm1", "xmm2", "xmm3", "xmm5" |
); |