diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-07-14 09:03:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-14 09:03:14 +0200 |
commit | 1f2110956b8f66fc3c6c89f74f0dfeb6c2265e45 (patch) | |
tree | 6232703f2e5ddeb2ff9bb6fda050f673aec6a402 /drivers/webp/dsp/upsampling_mips_dsp_r2.c | |
parent | 26baaf447abb85c7a1670141ffa6a41f3287601e (diff) | |
parent | e55c6f823251fcff366c7ce93b3ab0bf1fdedd68 (diff) |
Merge pull request #5592 from volzhs/libwebp-0.5.1
Update webp driver to 0.5.1
Diffstat (limited to 'drivers/webp/dsp/upsampling_mips_dsp_r2.c')
-rw-r--r-- | drivers/webp/dsp/upsampling_mips_dsp_r2.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/webp/dsp/upsampling_mips_dsp_r2.c b/drivers/webp/dsp/upsampling_mips_dsp_r2.c index 46f207b43e..ed2eb74825 100644 --- a/drivers/webp/dsp/upsampling_mips_dsp_r2.c +++ b/drivers/webp/dsp/upsampling_mips_dsp_r2.c @@ -22,21 +22,21 @@ #if !defined(WEBP_YUV_USE_TABLE) #define YUV_TO_RGB(Y, U, V, R, G, B) do { \ - const int t1 = kYScale * Y; \ - const int t2 = kVToG * V; \ - R = kVToR * V; \ - G = kUToG * U; \ - B = kUToB * U; \ + const int t1 = MultHi(Y, 19077); \ + const int t2 = MultHi(V, 13320); \ + R = MultHi(V, 26149); \ + G = MultHi(U, 6419); \ + B = MultHi(U, 33050); \ R = t1 + R; \ G = t1 - G; \ B = t1 + B; \ - R = R + kRCst; \ - G = G - t2 + kGCst; \ - B = B + kBCst; \ + R = R - 14234; \ + G = G - t2 + 8708; \ + B = B - 17685; \ __asm__ volatile ( \ - "shll_s.w %[" #R "], %[" #R "], 9 \n\t" \ - "shll_s.w %[" #G "], %[" #G "], 9 \n\t" \ - "shll_s.w %[" #B "], %[" #B "], 9 \n\t" \ + "shll_s.w %[" #R "], %[" #R "], 17 \n\t" \ + "shll_s.w %[" #G "], %[" #G "], 17 \n\t" \ + "shll_s.w %[" #B "], %[" #B "], 17 \n\t" \ "precrqu_s.qb.ph %[" #R "], %[" #R "], $zero \n\t" \ "precrqu_s.qb.ph %[" #G "], %[" #G "], $zero \n\t" \ "precrqu_s.qb.ph %[" #B "], %[" #B "], $zero \n\t" \ |