mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-01-01 03:12:16 +08:00
Remove a=0 special case in C and use table all the time, which will zero the rgb.
BUG=195 TESTED=out\release\libyuv_unittest --gtest_filter=*ten* Review URL: https://webrtc-codereview.appspot.com/1158004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@589 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
51d3e236cb
commit
9246ed0420
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 588
|
||||
Version: 589
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 588
|
||||
#define LIBYUV_VERSION 589
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -1569,21 +1569,19 @@ void ARGBUnattenuateRow_C(const uint8* src_argb, uint8* dst_argb, int width) {
|
||||
uint32 g = src_argb[1];
|
||||
uint32 r = src_argb[2];
|
||||
const uint32 a = src_argb[3];
|
||||
if (a) {
|
||||
const uint32 ia = fixed_invtbl8[a] & 0xffff; // 8.16 fixed point
|
||||
b = (b * ia) >> 8;
|
||||
g = (g * ia) >> 8;
|
||||
r = (r * ia) >> 8;
|
||||
// Clamping should not be necessary but is free in assembly.
|
||||
if (b > 255) {
|
||||
b = 255;
|
||||
}
|
||||
if (g > 255) {
|
||||
g = 255;
|
||||
}
|
||||
if (r > 255) {
|
||||
r = 255;
|
||||
}
|
||||
const uint32 ia = fixed_invtbl8[a] & 0xffff; // 8.16 fixed point
|
||||
b = (b * ia) >> 8;
|
||||
g = (g * ia) >> 8;
|
||||
r = (r * ia) >> 8;
|
||||
// Clamping should not be necessary but is free in assembly.
|
||||
if (b > 255) {
|
||||
b = 255;
|
||||
}
|
||||
if (g > 255) {
|
||||
g = 255;
|
||||
}
|
||||
if (r > 255) {
|
||||
r = 255;
|
||||
}
|
||||
dst_argb[0] = b;
|
||||
dst_argb[1] = g;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user