From 1ff03571039ffe24a89a9ba3d06c5c9bd52754db Mon Sep 17 00:00:00 2001 From: "fbarchard@google.com" Date: Mon, 12 Mar 2012 18:24:15 +0000 Subject: [PATCH] ARGBBlendRow to dispatch to sse2 BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/447003 git-svn-id: http://libyuv.googlecode.com/svn/trunk@213 16f28f9a-4ce2-e073-06de-1de4eb20be90 --- README.chromium | 2 +- include/libyuv/planar_functions.h | 3 +++ include/libyuv/version.h | 2 +- source/planar_functions.cc | 10 ++++++++++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/README.chromium b/README.chromium index 4daf71ccd..c6991f0fe 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 212 +Version: 213 License: BSD License File: LICENSE diff --git a/include/libyuv/planar_functions.h b/include/libyuv/planar_functions.h index 051f848da..756fa67c3 100644 --- a/include/libyuv/planar_functions.h +++ b/include/libyuv/planar_functions.h @@ -133,6 +133,9 @@ int ARGBCopy(const uint8* src_argb, int src_stride_argb, uint8* dst_argb, int dst_stride_argb, int width, int height); +// Alpha Blend ARGB row of pixels +void ARGBBlendRow(const uint8* src_argb, uint8* dst_argb, int width); + // Alpha Blend ARGB int ARGBBlend(const uint8* src_argb, int src_stride_argb, uint8* dst_argb, int dst_stride_argb, diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 26ee2b092..18f1f2f75 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 212 +#define LIBYUV_VERSION 213 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/source/planar_functions.cc b/source/planar_functions.cc index 1ed557b94..13bbbc5bc 100644 --- a/source/planar_functions.cc +++ b/source/planar_functions.cc @@ -140,6 +140,16 @@ int ARGBCopy(const uint8* src_argb, int src_stride_argb, return 0; } +// Alpha Blend ARGB +void ARGBBlendRow(const uint8* src_argb, uint8* dst_argb, int width) { +#if defined(HAS_ARGBBLENDROW_SSE2) + if (TestCpuFlag(kCpuHasSSE2)) { + ARGBBlendRow_SSE2(src_argb, dst_argb, width); + return; + } +#endif + ARGBBlendRow_C(src_argb, dst_argb, width); +} // Alpha Blend ARGB int ARGBBlend(const uint8* src_argb, int src_stride_argb,