Commit 4848b060 authored by fbarchard@google.com's avatar fbarchard@google.com

YPixel subtract bias to match C code

BUG=392
TESTED=TestGreyYUV
R=harryjin@google.com

Review URL: https://webrtc-codereview.appspot.com/37799004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1253 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent f0845348
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 1252 Version: 1253
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1252 #define LIBYUV_VERSION 1253
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -988,9 +988,9 @@ static __inline void YuvPixel(uint8 y, uint8 u, uint8 v, ...@@ -988,9 +988,9 @@ static __inline void YuvPixel(uint8 y, uint8 u, uint8 v,
// C reference code that mimics the YUV assembly. // C reference code that mimics the YUV assembly.
static __inline void YPixel(uint8 y, uint8* b, uint8* g, uint8* r) { static __inline void YPixel(uint8 y, uint8* b, uint8* g, uint8* r) {
uint32 y1 = (uint32)(y * 0x0101 * YG) >> 16; uint32 y1 = (uint32)(y * 0x0101 * YG) >> 16;
*b = Clamp((int32)(-YGB + y1) >> 6); *b = Clamp((int32)(y1 - YGB) >> 6);
*g = Clamp((int32)(-YGB + y1) >> 6); *g = Clamp((int32)(y1 - YGB) >> 6);
*r = Clamp((int32)(-YGB + y1) >> 6); *r = Clamp((int32)(y1 - YGB) >> 6);
} }
#undef YG #undef YG
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
namespace libyuv { namespace libyuv {
#ifdef _MSC_VER #if defined (_M_X64) || defined(_M_IX86) || \
defined(__x86_64__) || defined(__i386__))
#define HIGH_ACCURACY 1 #define HIGH_ACCURACY 1
#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