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

Issue 2576223002: NEON-ize RGBA to RGB code (Closed)

Created:
4 years ago by cavalcantii1
Modified:
3 years, 11 months ago
CC:
blink-reviews, chromium-reviews, reed1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

NEON-ize RGBA to RGB code The code path alone was made at least 4x faster than the original (from 85us to 14us in a Nexus 6), lowering the runtime of pixel conversion in 1/4 (e.g. from 330ms to 77ms in a 4K canvas). This yields a global improvement of about 15% while calling canvas.toBlob() and toDataURL() when the output format is JPEG and canvas is hardware accelerated. BUG=674264 Review-Url: https://codereview.chromium.org/2576223002 Cr-Commit-Position: refs/heads/master@{#442218} Committed: https://chromium.googlesource.com/chromium/src/+/b630fb4deab73deea701d7122154a2835dbdf7fc

Patch Set 1 #

Total comments: 1

Patch Set 2 : Copyright, fix Windows build. #

Total comments: 6

Patch Set 3 : lambda and vraddhn #

Patch Set 4 : Updating comments #

Total comments: 2

Patch Set 5 : Remove TODO, enable test, const-ify vars #

Patch Set 6 : Windows Build++ #

Patch Set 7 : Rebased (solved conflict in BUILD.GN) #

Total comments: 5

Patch Set 8 : Moved perf test to another issue #

Unified diffs Side-by-side diffs Delta from patch set Stats (+341 lines, -19 lines) Patch
M third_party/WebKit/Source/platform/BUILD.gn View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.cpp View 1 2 3 4 3 chunks +76 lines, -19 lines 0 comments Download
A third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoderTest.cpp View 1 2 3 4 5 1 chunk +233 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/image-encoders/RGBAtoRGB.h View 1 1 chunk +30 lines, -0 lines 0 comments Download

Messages

Total messages: 84 (52 generated)
cavalcantii1
4 years ago (2016-12-15 00:27:16 UTC) #4
esprehn
Super cool! Can we get SSE3 optimizations like this for desktop too? Does this also ...
4 years ago (2016-12-15 05:01:25 UTC) #7
cavalcantii1
Elliott Thanks for the comments, I will address the questions below: > Super cool! Can ...
4 years ago (2016-12-15 18:46:32 UTC) #10
esprehn
Great! This patch looks good to me, but I'd like someone who works on the ...
4 years ago (2016-12-15 20:07:58 UTC) #11
cavalcantii1
Elliott In a Nexus 6 it takes around 2000ms to run the benchmark (http://codepen.io/Savago/pen/dOKPWM). Keep ...
4 years ago (2016-12-15 20:26:52 UTC) #12
cavalcantii1
4 years ago (2016-12-15 22:19:01 UTC) #16
msarett1
A higher level question (not necessarily relevant to this CL): Is there a way for ...
4 years ago (2016-12-16 13:07:54 UTC) #19
cavalcantii1
https://codereview.chromium.org/2576223002/diff/20001/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.cpp File third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.cpp (right): https://codereview.chromium.org/2576223002/diff/20001/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.cpp#newcode49 third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.cpp:49: void RGBAtoRGBScalar(const unsigned char* pixels, On 2016/12/16 13:07:54, msarett1 ...
4 years ago (2016-12-17 02:35:34 UTC) #20
cavalcantii1
Just added in the issue a screenshot of a trace using vradd: https://bugs.chromium.org/p/chromium/issues/detail?id=674264#c8 It dropped ...
4 years ago (2016-12-17 03:44:08 UTC) #25
cavalcantii1
@msarret1 In a second thought, it seems a bit overkill to import a whole header ...
4 years ago (2016-12-17 06:49:20 UTC) #28
msarett
lgtm, though you'll still need an OWNER review https://codereview.chromium.org/2576223002/diff/60001/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.cpp File third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.cpp (right): https://codereview.chromium.org/2576223002/diff/60001/third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.cpp#newcode71 third_party/WebKit/Source/platform/image-encoders/JPEGImageEncoder.cpp:71: // ...
4 years ago (2016-12-18 18:48:37 UTC) #30
cavalcantii1
@Matt Thanks for the review (and specially for the suggestion concerning vraddhn). I will comment ...
4 years ago (2016-12-20 18:43:31 UTC) #44
cavalcantii1
4 years ago (2016-12-20 18:43:55 UTC) #45
cavalcantii1
Rebased with master.
4 years ago (2016-12-22 00:59:58 UTC) #56
esprehn
lgtm
3 years, 11 months ago (2017-01-05 00:09:06 UTC) #57
esprehn
FYI: I'd really prefer someone like fmalita@ or schenny@ look at this. You should email ...
3 years, 11 months ago (2017-01-05 00:09:52 UTC) #58
cavalcantii1
Elliott Thanks for the review. IIRC, I've added them in the issue since the beginning.
3 years, 11 months ago (2017-01-05 00:15:52 UTC) #59
esprehn
On 2017/01/05 at 00:15:52, cavalcantii wrote: > Elliott > > Thanks for the review. > ...
3 years, 11 months ago (2017-01-05 01:26:17 UTC) #60
cavalcantii1
> I know, but they haven't been replying. I'd send them some direct emails > ...
3 years, 11 months ago (2017-01-05 02:00:44 UTC) #61
Justin Novosad
https://codereview.chromium.org/2576223002/diff/160001/third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html File third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html (right): https://codereview.chromium.org/2576223002/diff/160001/third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html#newcode1 third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html:1: <!DOCTYPE html> Would be better to land the performance ...
3 years, 11 months ago (2017-01-05 15:41:15 UTC) #62
cavalcantii1
https://codereview.chromium.org/2576223002/diff/160001/third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html File third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html (right): https://codereview.chromium.org/2576223002/diff/160001/third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html#newcode1 third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html:1: <!DOCTYPE html> I did thought about that, but do ...
3 years, 11 months ago (2017-01-05 16:16:15 UTC) #63
Justin Novosad
+xlai To comment on the busy loop in the toBlob test
3 years, 11 months ago (2017-01-05 18:58:49 UTC) #65
Justin Novosad
On 2017/01/05 16:16:15, cavalcantii1 wrote: > https://codereview.chromium.org/2576223002/diff/160001/third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html > File third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html > (right): > > https://codereview.chromium.org/2576223002/diff/160001/third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html#newcode1 ...
3 years, 11 months ago (2017-01-05 19:05:30 UTC) #66
xlai (Olivia)
https://codereview.chromium.org/2576223002/diff/160001/third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html File third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html (right): https://codereview.chromium.org/2576223002/diff/160001/third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html#newcode36 third_party/WebKit/PerformanceTests/Canvas/toBlob_duration_jpeg.html:36: draw(); //repeatedly draw the frame to keep main thread ...
3 years, 11 months ago (2017-01-05 20:13:57 UTC) #68
Justin Novosad
On 2017/01/05 20:13:57, xlai (Olivia) wrote: > > Actually, this test was initially created to ...
3 years, 11 months ago (2017-01-05 20:27:03 UTC) #69
cavalcantii1
@xlai Thanks for the input, it was quite enlightening. @junov I created an issue for ...
3 years, 11 months ago (2017-01-05 23:42:33 UTC) #72
cavalcantii1
For reference, the test is now in: https://codereview.chromium.org/2617843002/
3 years, 11 months ago (2017-01-05 23:43:50 UTC) #73
Justin Novosad
> @junov > I created an issue for the HTML perf test. > > The ...
3 years, 11 months ago (2017-01-06 15:37:24 UTC) #76
Justin Novosad
This patch lgtm
3 years, 11 months ago (2017-01-06 15:39:49 UTC) #77
cavalcantii1
The test landed 2 days ago, I'm adding the patch to the CQ.
3 years, 11 months ago (2017-01-09 08:06:57 UTC) #78
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2576223002/180001
3 years, 11 months ago (2017-01-09 08:07:19 UTC) #81
commit-bot: I haz the power
3 years, 11 months ago (2017-01-09 09:35:17 UTC) #84
Message was sent while issue was closed.
Committed patchset #8 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/b630fb4deab73deea701d7122154...

Powered by Google App Engine
This is Rietveld 408576698