Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(418)

Unified Diff: third_party/libwebp/dsp/yuv_mips32.c

Issue 2149863002: libwebp: update to v0.5.1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libwebp/dsp/upsampling_mips_dsp_r2.c ('k') | third_party/libwebp/dsp/yuv_mips_dsp_r2.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libwebp/dsp/yuv_mips32.c
diff --git a/third_party/libwebp/dsp/yuv_mips32.c b/third_party/libwebp/dsp/yuv_mips32.c
index b8fe512f1feae70bc654e85e77a1454e494ac13b..e61aac571fff10c025158b858ba01d96ee654357 100644
--- a/third_party/libwebp/dsp/yuv_mips32.c
+++ b/third_party/libwebp/dsp/yuv_mips32.c
@@ -14,8 +14,7 @@
#include "./dsp.h"
-// Code is disabled for now, in favor of the plain-C version
-#if 0 // defined(WEBP_USE_MIPS32)
+#if defined(WEBP_USE_MIPS32)
#include "./yuv.h"
@@ -29,19 +28,19 @@ static void FUNC_NAME(const uint8_t* y, \
int i, r, g, b; \
int temp0, temp1, temp2, temp3, temp4; \
for (i = 0; i < (len >> 1); i++) { \
- temp1 = kVToR * v[0]; \
- temp3 = kVToG * v[0]; \
- temp2 = kUToG * u[0]; \
- temp4 = kUToB * u[0]; \
- temp0 = kYScale * y[0]; \
- temp1 += kRCst; \
- temp3 -= kGCst; \
+ temp1 = MultHi(v[0], 26149); \
+ temp3 = MultHi(v[0], 13320); \
+ temp2 = MultHi(u[0], 6419); \
+ temp4 = MultHi(u[0], 33050); \
+ temp0 = MultHi(y[0], 19077); \
+ temp1 -= 14234; \
+ temp3 -= 8708; \
temp2 += temp3; \
- temp4 += kBCst; \
+ temp4 -= 17685; \
r = VP8Clip8(temp0 + temp1); \
g = VP8Clip8(temp0 - temp2); \
b = VP8Clip8(temp0 + temp4); \
- temp0 = kYScale * y[1]; \
+ temp0 = MultHi(y[1], 19077); \
dst[R] = r; \
dst[G] = g; \
dst[B] = b; \
@@ -59,15 +58,15 @@ static void FUNC_NAME(const uint8_t* y, \
dst += 2 * XSTEP; \
} \
if (len & 1) { \
- temp1 = kVToR * v[0]; \
- temp3 = kVToG * v[0]; \
- temp2 = kUToG * u[0]; \
- temp4 = kUToB * u[0]; \
- temp0 = kYScale * y[0]; \
- temp1 += kRCst; \
- temp3 -= kGCst; \
+ temp1 = MultHi(v[0], 26149); \
+ temp3 = MultHi(v[0], 13320); \
+ temp2 = MultHi(u[0], 6419); \
+ temp4 = MultHi(u[0], 33050); \
+ temp0 = MultHi(y[0], 19077); \
+ temp1 -= 14234; \
+ temp3 -= 8708; \
temp2 += temp3; \
- temp4 += kBCst; \
+ temp4 -= 17685; \
r = VP8Clip8(temp0 + temp1); \
g = VP8Clip8(temp0 - temp2); \
b = VP8Clip8(temp0 + temp4); \
« no previous file with comments | « third_party/libwebp/dsp/upsampling_mips_dsp_r2.c ('k') | third_party/libwebp/dsp/yuv_mips_dsp_r2.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698