mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
Eliminate a common subexpression in YPixel()
Save the value of a common subexpression in a local variable. Change-Id: I5724fcf341900cb2a65eb37b505194b8d3c3da9a Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/4735651 Reviewed-by: Frank Barchard <fbarchard@chromium.org> Commit-Queue: Wan-Teh Chang <wtc@google.com>
This commit is contained in:
parent
c60ac4025c
commit
a8a37a25c9
@ -1875,9 +1875,10 @@ static __inline void YPixel(uint8_t y,
|
|||||||
int yg = yuvconstants->kYToRgb[0];
|
int yg = yuvconstants->kYToRgb[0];
|
||||||
#endif
|
#endif
|
||||||
uint32_t y1 = (uint32_t)(y * 0x0101 * yg) >> 16;
|
uint32_t y1 = (uint32_t)(y * 0x0101 * yg) >> 16;
|
||||||
*b = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6));
|
uint8_t b8 = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6));
|
||||||
*g = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6));
|
*b = b8;
|
||||||
*r = STATIC_CAST(uint8_t, Clamp(((int32_t)(y1) + ygb) >> 6));
|
*g = b8;
|
||||||
|
*r = b8;
|
||||||
}
|
}
|
||||||
|
|
||||||
void I444ToARGBRow_C(const uint8_t* src_y,
|
void I444ToARGBRow_C(const uint8_t* src_y,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user