Commit c751b68a authored by fbarchard@google.com's avatar fbarchard@google.com

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
parent bb92acad
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 670
Version: 671
License File: LICENSE
Description:
......
......@@ -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
......@@ -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,
......
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