Commit 799796b2 authored by fbarchard@google.com's avatar fbarchard@google.com

avoid xmm7 in formatconversion

BUG=none
TEST=build/run on linux
Review URL: http://webrtc-codereview.appspot.com/255010

git-svn-id: http://libyuv.googlecode.com/svn/trunk@57 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent d14936a0
......@@ -30,14 +30,14 @@ static void ARGBToBayerRow_SSSE3(const uint8* src_argb,
__asm {
mov eax, [esp + 4] // src_argb
mov edx, [esp + 8] // dst_bayer
movd xmm7, [esp + 12] // selector
movd xmm5, [esp + 12] // selector
mov ecx, [esp + 16] // pix
pshufd xmm7, xmm7, 0
pshufd xmm5, xmm5, 0
wloop:
movdqa xmm0, [eax]
lea eax, [eax + 16]
pshufb xmm0, xmm7
pshufb xmm0, xmm5
movd [edx], xmm0
lea edx, [edx + 4]
sub ecx, 4
......@@ -53,12 +53,12 @@ static void ARGBToBayerRow_SSSE3(const uint8* src_argb,
static void ARGBToBayerRow_SSSE3(const uint8* src_argb, uint8* dst_bayer,
uint32 selector, int pix) {
asm volatile(
"movd %3,%%xmm7\n"
"pshufd $0x0,%%xmm7,%%xmm7\n"
"1:"
"movd %3,%%xmm5\n"
"pshufd $0x0,%%xmm5,%%xmm5\n"
"1:\n"
"movdqa (%0),%%xmm0\n"
"lea 0x10(%0),%0\n"
"pshufb %%xmm7,%%xmm0\n"
"pshufb %%xmm5,%%xmm0\n"
"movd %%xmm0,(%1)\n"
"lea 0x4(%1),%1\n"
"sub $0x4,%2\n"
......@@ -66,8 +66,12 @@ static void ARGBToBayerRow_SSSE3(const uint8* src_argb, uint8* dst_bayer,
: "+r"(src_argb), // %0
"+r"(dst_bayer), // %1
"+r"(pix) // %2
: "r"(selector) // %3
: "memory"
: "g"(selector) // %3
: "memory", "cc"
#if defined(__SSE2__)
, "xmm0", "xmm5"
#endif
);
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment