Bug 78323 - [chromium] Increase JPEG decoding performance some moar
Summary: [chromium] Increase JPEG decoding performance some moar
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: noel gordon
Depends on: 59670 75861 78454 85772
  Show dependency treegraph
Reported: 2012-02-09 20:47 PST by noel gordon
Modified: 2012-05-11 03:32 PDT (History)
6 users (show)

See Also:

Patch (19.72 KB, patch)
2012-02-09 21:14 PST, noel gordon
no flags Details | Formatted Diff | Diff
tjbench.fast.r778.svn.diff (1.66 KB, text/plain)
2012-02-09 22:23 PST, noel gordon
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description noel gordon 2012-02-09 20:47:09 PST
[chromium] Increase JPEG decoding performance some moar
Comment 1 noel gordon 2012-02-09 21:14:05 PST
Created attachment 126447 [details]
Comment 2 noel gordon 2012-02-09 22:21:46 PST
r101286 increased JPEG decoding performance by ~2x for the chromium ports, and similarly for the webkit android port in r104472.  I then looked for even more performance and the result is this patch.

Created an corpus of 369 jpeg images, composed of 4:4:4, 4:2:2, 4:2:0 chroma sampled images in graysacle, cmyk, and rgb (the majority). Modified libjpeg-turbo tjbench.c to allow the selection of fast decoding via a command line option. Compiled tjbench under cygwin windows7 x86_64 on a T410 laptop and a Z600 desktop, and also on a MacPro x86_32.  Modified tjbench svn.diff at libjpeb-turbo r778 attached.
Comment 3 noel gordon 2012-02-09 22:23:33 PST
Created attachment 126454 [details]
Comment 4 noel gordon 2012-02-09 22:25:03 PST
Ran "./tjbench image.jpg -bgrx" for each image in the corpus.  tjbench continuously decodes the image for 5 seconds, then reports the decoding throughput (Mbyte/s).  I then repeated the experiment with fast decoding.  The results are tabulated and graphed in the following spreadsheet.


The results suggest fast decoding provides a 9% speed improvement (avg) across all machines.
Comment 5 Adam Barth 2012-02-09 23:39:02 PST
Comment on attachment 126447 [details]

Looks reasonable assuming you've reviewed all the changed test results as reasonable.
Comment 6 noel gordon 2012-02-10 00:02:00 PST
I have reviewed, and I am satisfied with, the changed test results on win and mac chrome.
Comment 7 WebKit Review Bot 2012-02-10 02:46:27 PST
Comment on attachment 126447 [details]

Clearing flags on attachment: 126447

Committed r107389: <http://trac.webkit.org/changeset/107389>
Comment 8 WebKit Review Bot 2012-02-10 02:46:32 PST
All reviewed patches have been landed.  Closing bug.
Comment 9 Pavel Podivilov 2012-02-10 09:15:19 PST
Broke ExtensionChromePrivateApiTest.DecodeJPEG downstream.

Comment 10 noel gordon 2012-02-10 14:25:47 PST
ExtensionChromePrivateApiTest.DecodeJPEG compares image bytes, rebaseline it after the webkit roll.
Comment 11 noel gordon 2012-02-10 14:31:15 PST
Peter, Sami: don't know how you rebaseline android layout test results, but you'll need to when this change rolls into chrome android.
Comment 12 noel gordon 2012-02-19 23:01:50 PST
Desktop chrome rebaselines, bug 78454.
Comment 13 noel gordon 2012-05-11 02:13:55 PDT
Backed part of this out in bug 85772.  We now only allow IFAST decodes on small screen devices (Chromium Android).