skia2/third_party
mtklein 372d65cc6e sketch hooking into PNG_FILTER_OPTIMIZATIONS
Local timing says this 4-byte Paeth function takes about 0.3x the time the serial libpng code does, dropping from ~10 cycles per byte to ~2.9.

bpp=4 is mainly an easy demo.  This approach can work for any bpp up to 16, 1 pixel at a time, at roughly the same cost per pixel.  Doing more than 1 pixel at a time is a tricky math problem I have yet to attempt to solve.

Everything here can be trivially downgraded to MMX, supporting bpp up to 8.  It seems to be a little slower (~3.5 cycles per byte), but it would make the code compatible with every x86 that can still power on.

I've tried four approaches:
  - this way;
  - doing things naively in 16-bit;
  - a 16-bit version that requires division by 3 (i.e. mulhi_epu16(..., 0x5580) );
  - a mostly 8-bit version of the same.

They're all fine, but this one is consistently the fastest I've measured.
I'd be happy to settle on the naive 16-bit version too, which would have a very clear implementation that's only minorly slower than this version.  The other two are way more complicated, and would require us to draw some serious ASCII diagrams to explain.

I have learned that the .skp serialization tests (serialize-8888) have a nice side effect of testing the correctness of these filters!

(Since writing the description above, I've bumped things up to {Paeth,Sub,Avg} x { 3 bpp, 4 bpp }.)

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

Review URL: https://codereview.chromium.org/1573943002
2016-01-27 13:01:41 -08:00
..
etc1 Revert of Depend on ETC1 via DEPS instead of a direct third_party checkin. (patchset #1 id:1 of https://codereview.chromium.org/1296253003/ ) 2015-08-17 11:15:00 -07:00
freetype/include/freetype-android Update Android FreeType version. 2015-10-27 08:39:39 -07:00
giflib Creating a new wrapper for gif decoder 2015-04-01 06:58:48 -07:00
ktx Generate a table of config->glformat info. Precursor to lifting this to caps. 2015-12-16 11:51:22 -08:00
libmicrohttpd Build and link microhttpd from gyp 2016-01-25 10:50:04 -08:00
libpng sketch hooking into PNG_FILTER_OPTIMIZATIONS 2016-01-27 13:01:41 -08:00
libsdl Disable ES2 on Linux SDL 2015-12-28 08:44:27 -08:00
libwebp/webp Comments Style: s/skbug.com/bug.skia.org/ 2015-11-07 05:29:00 -08:00
lua
yasm Reenable yasm for Android x86 and x86-64 on Linux host 2015-07-21 12:01:48 -07:00
README

This directory contains a set of dependencies that are needed to build various
components and tools within Skia.  Some of these dependencies reside within
the Skia repo, while others are pulled from other repositories and placed
in the third_party/externals directory. These external dependencies are defined
in a DEPS file and are kept up-to-date using 'gclient sync'.