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

Issue 1601883002: Add SSSE3 Optimizations for premul and swap (Closed)

Created:
4 years, 11 months ago by msarett
Modified:
4 years, 11 months ago
Reviewers:
mtklein
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@f-and-x
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Add SSSE3 Optimizations for premul and swap Improves deocde performance for RGBA pngs. Swizzler Time on z620 (clang): SwapPremul 0.24x Premul 0.24x Swap 0.37x Decode Time on z620 (clang): Premul ZeroInit Decodes 0.88x Unpremul ZeroInit Decodes 0.94x Premul Regular Decodes 0.91x Unpremul Regular Decodes 0.98x Swizzler Time in Dell Venue 8 (gcc): SwapPremul 0.14x Premul 0.14x Swap 0.08x Decode Time on Dell Venus 8 (gcc): Premul ZeroInit Decodes 0.79x Premul Regular Decodes 0.77x Note: ZeroInit means memory is zero initialized, and we do not write to memory for large sections of zero pixels (memory use opt for Android). BUG=skia:4767 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1601883002 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/53b9d29b973f2828624f097bf110f1c7acc4b593

Patch Set 1 #

Patch Set 2 : #

Total comments: 11

Patch Set 3 : Faster repacking, style, comments #

Total comments: 2

Patch Set 4 : Use shared proc #

Total comments: 3

Patch Set 5 : Move constants into premul8 proc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -0 lines) Patch
M src/opts/SkOpts_ssse3.cpp View 2 chunks +5 lines, -0 lines 0 comments Download
M src/opts/SkSwizzler_opts.h View 1 2 3 4 1 chunk +96 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 15 (5 generated)
msarett
https://codereview.chromium.org/1601883002/diff/20001/src/opts/SkSwizzler_opts.h File src/opts/SkSwizzler_opts.h (right): https://codereview.chromium.org/1601883002/diff/20001/src/opts/SkSwizzler_opts.h#newcode180 src/opts/SkSwizzler_opts.h:180: static void premul_xxxa_should_swaprb(uint32_t dst[], const uint32_t src[], int count) ...
4 years, 11 months ago (2016-01-18 20:35:05 UTC) #3
mtklein
https://codereview.chromium.org/1601883002/diff/20001/src/opts/SkSwizzler_opts.h File src/opts/SkSwizzler_opts.h (right): https://codereview.chromium.org/1601883002/diff/20001/src/opts/SkSwizzler_opts.h#newcode196 src/opts/SkSwizzler_opts.h:196: // argb_argb_argb_argb -> aaaa_rrrr_gggg_bbbb Let's kick some of these ...
4 years, 11 months ago (2016-01-19 15:59:15 UTC) #4
msarett
https://codereview.chromium.org/1601883002/diff/20001/src/opts/SkSwizzler_opts.h File src/opts/SkSwizzler_opts.h (right): https://codereview.chromium.org/1601883002/diff/20001/src/opts/SkSwizzler_opts.h#newcode196 src/opts/SkSwizzler_opts.h:196: // argb_argb_argb_argb -> aaaa_rrrr_gggg_bbbb On 2016/01/19 15:59:14, mtklein wrote: ...
4 years, 11 months ago (2016-01-19 17:34:38 UTC) #5
mtklein
https://codereview.chromium.org/1601883002/diff/40001/src/opts/SkSwizzler_opts.h File src/opts/SkSwizzler_opts.h (right): https://codereview.chromium.org/1601883002/diff/40001/src/opts/SkSwizzler_opts.h#newcode230 src/opts/SkSwizzler_opts.h:230: if (count >= 4) { OK, now that we've ...
4 years, 11 months ago (2016-01-19 18:28:30 UTC) #6
msarett
Per our conversation in person, when calling premul8(lo, zeros), the compiler is smart enough to ...
4 years, 11 months ago (2016-01-19 19:17:43 UTC) #8
mtklein
lgtm https://codereview.chromium.org/1601883002/diff/70005/src/opts/SkSwizzler_opts.h File src/opts/SkSwizzler_opts.h (right): https://codereview.chromium.org/1601883002/diff/70005/src/opts/SkSwizzler_opts.h#newcode191 src/opts/SkSwizzler_opts.h:191: auto premul8 = [&zeros, &_128, &_257, &planar](__m128i* lo, ...
4 years, 11 months ago (2016-01-19 20:15:02 UTC) #9
msarett
https://codereview.chromium.org/1601883002/diff/70005/src/opts/SkSwizzler_opts.h File src/opts/SkSwizzler_opts.h (right): https://codereview.chromium.org/1601883002/diff/70005/src/opts/SkSwizzler_opts.h#newcode191 src/opts/SkSwizzler_opts.h:191: auto premul8 = [&zeros, &_128, &_257, &planar](__m128i* lo, __m128i* ...
4 years, 11 months ago (2016-01-19 21:02:39 UTC) #10
mtklein
lgtm
4 years, 11 months ago (2016-01-19 21:03:29 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1601883002/90001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1601883002/90001
4 years, 11 months ago (2016-01-19 21:03:35 UTC) #13
commit-bot: I haz the power
4 years, 11 months ago (2016-01-19 21:18:01 UTC) #15
Message was sent while issue was closed.
Committed patchset #5 (id:90001) as
https://skia.googlesource.com/skia/+/53b9d29b973f2828624f097bf110f1c7acc4b593

Powered by Google App Engine
This is Rietveld 408576698