Bug 78323 - [chromium] Increase JPEG decoding performance some moar
Summary: [chromium] Increase JPEG decoding performance some moar
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: noel gordon
URL:
Keywords:
Depends on: 59670 75861 78454 85772
Blocks:
  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:


Attachments
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]
Patch
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]
tjbench.fast.r778.svn.diff
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.

  https://docs.google.com/spreadsheet/ccc?key=0Asd5UUPIMYYsdFNyTW95YzFUazJtUUZYY25UM0lZQ2c

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]
Patch

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]
Patch

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.

http://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=browser_tests&tests=ExtensionChromePrivateApiTest.DecodeJPEG
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).