mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-08 01:36:47 +08:00
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
This commit is contained in:
parent
f0845348fe
commit
4848b06016
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 1252
|
||||
Version: 1253
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 1252
|
||||
#define LIBYUV_VERSION 1253
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -988,9 +988,9 @@ static __inline void YuvPixel(uint8 y, uint8 u, uint8 v,
|
||||
// C reference code that mimics the YUV assembly.
|
||||
static __inline void YPixel(uint8 y, uint8* b, uint8* g, uint8* r) {
|
||||
uint32 y1 = (uint32)(y * 0x0101 * YG) >> 16;
|
||||
*b = Clamp((int32)(-YGB + y1) >> 6);
|
||||
*g = Clamp((int32)(-YGB + y1) >> 6);
|
||||
*r = Clamp((int32)(-YGB + y1) >> 6);
|
||||
*b = Clamp((int32)(y1 - YGB) >> 6);
|
||||
*g = Clamp((int32)(y1 - YGB) >> 6);
|
||||
*r = Clamp((int32)(y1 - YGB) >> 6);
|
||||
}
|
||||
|
||||
#undef YG
|
||||
|
||||
@ -21,7 +21,8 @@
|
||||
|
||||
namespace libyuv {
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if defined (_M_X64) || defined(_M_IX86) || \
|
||||
defined(__x86_64__) || defined(__i386__))
|
||||
#define HIGH_ACCURACY 1
|
||||
#endif
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user