fix for llvm max255 macro

BUG=none
TEST=libyuv_unittest --gtest_filter=*Add*
Review URL: https://webrtc-codereview.appspot.com/1346005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@671 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
fbarchard@google.com 2013-04-19 19:45:36 +00:00
parent bb92acade0
commit c751b68a78
3 changed files with 4 additions and 8 deletions

View File

@ -1,6 +1,6 @@
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 670
Version: 671
License File: LICENSE
Description:

View File

@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 670
#define LIBYUV_VERSION 671
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT

View File

@ -732,13 +732,9 @@ void ARGBMultiplyRow_C(const uint8* src_argb0, const uint8* src_argb1,
#undef REPEAT8
#undef SHADE
#ifdef __llvm__
// llvm x86 is poor at ternary operator, so use branchless min/max.
#define min0(v) ((-(v) >> 31) & (v))
#define max255(v) (((256 - (v)) >> 31) | (v))
#else
#define min0(v) (((v) < 0) ? 0 : v)
#define max255(v) (((v) > 255) ? 255 : (v))
#endif
#define max255(v) (((255 - (v)) >> 31) | (v))
#define SHADE(f, v) max255(v + f)
void ARGBAddRow_C(const uint8* src_argb0, const uint8* src_argb1,