Look beyond SSE2 for Paeth
authormtklein <mtklein@chromium.org>
Mon, 1 Feb 2016 20:20:33 +0000 (12:20 -0800)
committerCommit bot <commit-bot@chromium.org>
Mon, 1 Feb 2016 20:20:33 +0000 (12:20 -0800)
commitb21c752eb3d55970ac45daaf3fd2cbda39c7658a
treec07e405532c393d5699b81813649e744c38f2293
parent8610002ff81fb5d81d1b7c312b5d0a8b05b41e13
Look beyond SSE2 for Paeth

You can break this CL down into three steps.  Steps 2 and 3 depend on 1.

    Step 1: go to a 16-bit impl.  Speed ~unaffected.
    Step 2: use SSSE3 16-bit abs.  ~20% speedup to Paeth.
    Step 3: use SSE4.1 blendv, total ~25% speedup to Paeth.

Overall this can improve PNG decoding by around 8% end-to-end.

I would feel most comfortable landing this only after we have a bot exercising the SSE4.1 code, either by moving this stuff behind a function pointer (simulating Chrome/Clank) or by adding a builder with at least SSE4.1 at compile time (simulating an Android system build).  We've got plenty of bots building with SSSE3 at compile time to test that path.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dimage&master=false&issue=1657503002

Review URL: https://codereview.chromium.org/1657503002
src/codec/SkPngFilters.cpp