gecko-dev/gfx/ycbcr/row_c_fix.patch

24 строки
943 B
Diff

diff --git a/gfx/ycbcr/yuv_row_c.cpp b/gfx/ycbcr/yuv_row_c.cpp
index 36d9bda..b5c0018 100644
--- a/gfx/ycbcr/yuv_row_c.cpp
+++ b/gfx/ycbcr/yuv_row_c.cpp
@@ -142,17 +142,17 @@ static inline void YuvPixel(uint8 y,
uint8* rgb_buf) {
int32 d = static_cast<int32>(u) - 128;
int32 e = static_cast<int32>(v) - 128;
int32 cb = (516 * d + 128);
int32 cg = (- 100 * d - 208 * e + 128);
int32 cr = (409 * e + 128);
- int32 C298a = ((static_cast<int32>(y) - 16) * 298 + 128);
+ int32 C298a = ((static_cast<int32>(y) - 16) * 298);
*reinterpret_cast<uint32*>(rgb_buf) = (clip(C298a + cb)) |
(clip(C298a + cg) << 8) |
(clip(C298a + cr) << 16) |
(0xff000000);
}
void FastConvertYUVToRGB32Row_C(const uint8* y_buf,
const uint8* u_buf,