From e74ae8ef6c532bf64c3422d555e63777f33316d7 Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Wed, 29 Feb 2012 19:07:20 +0000 Subject: [PATCH] scale AddRows use 4 registers instead of 5 for benefit of OSX BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/423001 git-svn-id: http://libyuv.googlecode.com/svn/trunk@192 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/version.h | 2 +- source/scale.cc | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/README.chromium b/README.chromium index 9af93db0a..4b6807c8d 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 191 +Version: 192 License: BSD License File: LICENSE diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 48186571e..1e7459f4d 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,7 +11,7 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 191 +#define LIBYUV_VERSION 192 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/source/scale.cc b/source/scale.cc index 6ac4d48bd..018fcd13b 100644 --- a/source/scale.cc +++ b/source/scale.cc @@ -1704,15 +1704,15 @@ static void ScaleAddRows_SSE2(const uint8* src_ptr, int src_stride, "sub $0x1,%3 \n" "1: \n" "movdqa (%0),%%xmm0 \n" - "lea (%0,%6,1),%5 \n" + "mov %0,%5 \n" + "add %6,%0 \n" "movdqa %%xmm0,%%xmm1 \n" "punpcklbw %%xmm4,%%xmm0 \n" "punpckhbw %%xmm4,%%xmm1 \n" - "lea 0x10(%0),%0 \n" "mov %3,%4 \n" "2: \n" - "movdqa (%5),%%xmm2 \n" - "lea (%5,%6,1),%5 \n" + "movdqa (%0),%%xmm2 \n" + "add %6,%0 \n" "movdqa %%xmm2,%%xmm3 \n" "punpcklbw %%xmm4,%%xmm2 \n" "punpckhbw %%xmm4,%%xmm3 \n" @@ -1722,6 +1722,7 @@ static void ScaleAddRows_SSE2(const uint8* src_ptr, int src_stride, "ja 2b \n" "movdqa %%xmm0,(%1) \n" "movdqa %%xmm1,0x10(%1) \n" + "lea 0x10(%5),%0 \n" "lea 0x20(%1),%1 \n" "sub $0x10,%2 \n" "ja 1b \n" @@ -1731,10 +1732,10 @@ static void ScaleAddRows_SSE2(const uint8* src_ptr, int src_stride, "+rm"(src_height), // %3 "+r"(tmp_height), // %4 "+r"(tmp_src) // %5 - : "r"(static_cast(src_stride)) // %6 + : "rm"(static_cast(src_stride)) // %6 : "memory", "cc" #if defined(__SSE2__) - , "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5" + , "xmm0", "xmm1", "xmm2", "xmm3", "xmm4" #endif ); }