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

Issue 1412793009: SkBlurImageFilter_opts: optimize NEON box_blur_double in separate loops. (Closed)

Created:
5 years, 1 month ago by Stephen White
Modified:
5 years, 1 month ago
Reviewers:
mtklein
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@blur-neon-separate-loops
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

SkBlurImageFilter_opts: optimize NEON box_blur_double in separate loops. Stop leaning so hard on the branch predictor, and pull the conditionals out of the loops for box_blur_double() (NEON). This is conceptually the same change as https://codereview.chromium.org/1426583004/ for the NEON double-pixel loop. R=mtklein@google.com BUG=skia:4526 CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot Committed: https://skia.googlesource.com/skia/+/d5b9211d8d072672856019d5608fa21d4397ba54

Patch Set 1 #

Patch Set 2 : Upload with correct upstream #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -27 lines) Patch
M src/opts/SkBlurImageFilter_opts.h View 1 3 chunks +47 lines, -27 lines 2 comments Download

Depends on Patchset:

Messages

Total messages: 20 (7 generated)
Stephen White
mtklein@: PTAL. Thanks!
5 years, 1 month ago (2015-10-28 21:36:33 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412793009/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412793009/20001
5 years, 1 month ago (2015-10-28 21:36:46 UTC) #3
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-10-28 21:36:48 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412793009/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412793009/20001
5 years, 1 month ago (2015-10-28 21:38:47 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 1 month ago (2015-10-28 21:50:28 UTC) #10
mtklein
lgtm https://codereview.chromium.org/1412793009/diff/20001/src/opts/SkBlurImageFilter_opts.h File src/opts/SkBlurImageFilter_opts.h (right): https://codereview.chromium.org/1412793009/diff/20001/src/opts/SkBlurImageFilter_opts.h#newcode71 src/opts/SkBlurImageFilter_opts.h:71: #define STORE_SUMS_DOUBLE \ This just symmetry or are ...
5 years, 1 month ago (2015-10-28 22:31:17 UTC) #11
Stephen White
Thanks for your review. https://codereview.chromium.org/1412793009/diff/20001/src/opts/SkBlurImageFilter_opts.h File src/opts/SkBlurImageFilter_opts.h (right): https://codereview.chromium.org/1412793009/diff/20001/src/opts/SkBlurImageFilter_opts.h#newcode71 src/opts/SkBlurImageFilter_opts.h:71: #define STORE_SUMS_DOUBLE \ On 2015/10/28 ...
5 years, 1 month ago (2015-10-28 22:38:33 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1412793009/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1412793009/20001
5 years, 1 month ago (2015-10-28 22:39:00 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/d5b9211d8d072672856019d5608fa21d4397ba54
5 years, 1 month ago (2015-10-28 22:39:36 UTC) #16
mtklein
On 2015/10/28 at 22:38:33, senorblanco wrote: > Thanks for your review. > > https://codereview.chromium.org/1412793009/diff/20001/src/opts/SkBlurImageFilter_opts.h > ...
5 years, 1 month ago (2015-10-29 13:55:03 UTC) #17
Stephen White
On 2015/10/29 13:55:03, mtklein wrote: > On 2015/10/28 at 22:38:33, senorblanco wrote: > > Thanks ...
5 years, 1 month ago (2015-10-29 13:56:27 UTC) #18
Stephen White
On 2015/10/29 13:56:27, Stephen White wrote: > On 2015/10/29 13:55:03, mtklein wrote: > > On ...
5 years, 1 month ago (2015-10-29 14:03:05 UTC) #19
mtklein
5 years, 1 month ago (2015-10-29 14:11:10 UTC) #20
Message was sent while issue was closed.
On 2015/10/29 at 14:03:05, senorblanco wrote:
> On 2015/10/29 13:56:27, Stephen White wrote:
> > On 2015/10/29 13:55:03, mtklein wrote:
> > > On 2015/10/28 at 22:38:33, senorblanco wrote:
> > > > Thanks for your review.
> > > > 
> > > >
> > >
> >
https://codereview.chromium.org/1412793009/diff/20001/src/opts/SkBlurImageFil...
> > > > File src/opts/SkBlurImageFilter_opts.h (right):
> > > > 
> > > >
> > >
> >
https://codereview.chromium.org/1412793009/diff/20001/src/opts/SkBlurImageFil...
> > > > src/opts/SkBlurImageFilter_opts.h:71: #define STORE_SUMS_DOUBLE \
> > > > On 2015/10/28 22:31:17, mtklein wrote:
> > > > > This just symmetry or are you thinking of expanding this to SSE?
> > > > 
> > > > Well, mostly because it's repeated four times below.
> > > > 
> > > > But yeah, it'd be interesting to consider SSE for this. The one thing I
> > don't
> > > like about it is that it produces different pixels than the generic path.
But
> > > we're already paying that price on NEON.
> > > 
> > > Wait, does it?  I thought we were just taking advantage of having the
> > > intermediate sums fit in 15 bits?  Is there some tweaking we can do to
> > > STORE_SUMS_DOUBLE to make them identical?
> > 
> > Yeah, it's the downshift (divide) I think. It's been a while since I looked
at
> > it.
> > If you can dig up the original codereview, you'll see some comments from me
> > about it.
> 
> Because I'm a git-lovin' fool: https://codereview.chromium.org/105893003

Ah, duh, the scale factor is also now 15 bit.  That makes sense.  I suspect we
could work around that with SSE by just using _mm_mulhi_epu16 instead of
_mm_mulhrs_epi16.

Powered by Google App Engine
This is Rietveld 408576698