Fail fast and/or support YUV decodes of progressive jpegs |
||
Issue descriptionThis came up in comment #19 of crbug.com/597127 . "If we expect progressive jpegs to fail to decode to YUV, we should be able to disable these decode in onQueryYUV8() rather than waiting to fail in onGetYUV8Planes(). We successfully do this *some* of the time now. yuvSubsampling() catches jpegs where (info.comps_in_scan < info.num_components). https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp&q=JPEGImageDecoder&sq=package:chromium&l=222 However, some progressive jpegs (including the ones in this bug) still have 3 components in their first scan. They just have additional information on at least one of the components in subsequent scans. We can detect all progressive/multi-scan jpegs by instead calling jpeg_has_multiple_scans(). FWIW, skia's decoders support YUV decoding of progressive images. Is this something Chrome would want? I *think* this can be fixed in Chrome if we use "comp_info" instead of "cur_comp_info" in outputRawData(). Chrome currently decodes all progressive images in buffered image mode. I'm not sure it makes much sense to decode to YUV in buffered image mode, since we would have to repeatedly draw YUV->RGBA every time the YUV data was updated. Maybe this is not so bad though? Another alternative would be to disable buffered image mode on YUV decodes of progressive images (again if that was something we wanted to support)."
,
Apr 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/93165ecaab7105b5eea4d7351748fac207a85499 commit 93165ecaab7105b5eea4d7351748fac207a85499 Author: Rebaseline Bot <blink-rebaseline-bot@chromium.org> Date: Thu Apr 07 16:10:05 2016 Auto-rebaseline for r385734 https://chromium.googlesource.com/chromium/src/+/0a3bb6541 BUG= 598670 TBR=msarett@google.com Review URL: https://codereview.chromium.org/1866753007 . Cr-Commit-Position: refs/heads/master@{#385773} [modify] https://crrev.com/93165ecaab7105b5eea4d7351748fac207a85499/third_party/WebKit/LayoutTests/TestExpectations [add] https://crrev.com/93165ecaab7105b5eea4d7351748fac207a85499/third_party/WebKit/LayoutTests/platform/android/virtual/gpu-rasterization/fast/images/jpeg-yuv-progressive-image-expected.png [modify] https://crrev.com/93165ecaab7105b5eea4d7351748fac207a85499/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/fast/images/jpeg-yuv-progressive-image-expected.png [modify] https://crrev.com/93165ecaab7105b5eea4d7351748fac207a85499/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/fast/images/jpeg-yuv-progressive-image-expected.png [modify] https://crrev.com/93165ecaab7105b5eea4d7351748fac207a85499/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/fast/images/jpeg-yuv-progressive-image-expected.png
,
Apr 7 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Apr 7 2016