|
|
Created:
5 years, 8 months ago by Noel Gordon Modified:
5 years, 8 months ago CC:
blink-reviews Base URL:
https://chromium.googlesource.com/chromium/blink.git@master Target Ref:
refs/heads/master Project:
blink Visibility:
Public. |
DescriptionAdd helper to validate JPEG subsampling factors
Use it to turn the invalid horizontal/vertical subsampling factor 3 to a
1, which is fine for both the YUV decoding path (it won't turn on if any
of the component subsamplings is 3) and the normal JPEG decode path.
TEST=Covered by the test added in r192900
BUG=398235
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192980
Patch Set 1 #
Messages
Total messages: 18 (5 generated)
noel@chromium.org changed reviewers: + reveman@chromium.org, sugoi@chromium.org
Note that subsampling factors are limited to [1..4] by the JPEG decode library, producing a failure if they are out of bounds. See for example: https://code.google.com/p/chromium/codesearch#chromium/src/third_party/libjpe...
Test harness setup for this now -> we can go anyway we like in this CL with that safety net in place viz., map 3->1, or deny JPEG with any 3, yada yada. My view is go this CL... ...so Alexis, could you review please? And please check that I din't break YUV decoding :)
On 2015/04/01 05:16:07, noel gordon wrote: > Test harness setup for this now -> we can go anyway we like in this CL with that > safety net in place viz., map 3->1, or deny JPEG with any 3, yada yada. My view > is go this CL... > > ...so Alexis, could you review please? And please check that I din't break YUV > decoding :) It will not affect YUV decoding since this happens after the call to yuvSubsampling(), so LGTM for that part. I don't fully understand why changing subsampling from 3 to 1 works for the regular JPEG decode though, since I don't know about those specific implementation details on the regular JPEG decode path.
On 2015/04/01 12:11:51, sugoi1 wrote: > On 2015/04/01 05:16:07, noel gordon wrote: > > Test harness setup for this now -> we can go anyway we like in this CL with > that > > safety net in place viz., map 3->1, or deny JPEG with any 3, yada yada. My > view > > is go this CL... > > > > ...so Alexis, could you review please? And please check that I din't break > YUV > > decoding :) > > It will not affect YUV decoding since this happens after the call to > yuvSubsampling(), so LGTM for that part. Thanks for checking. > I don't fully understand why changing subsampling from 3 to 1 works for the > regular JPEG decode though, since I don't know about those specific > implementation details on the regular JPEG decode path. Test case on the bug produces stable pixels for me with this change. Still awaiting feedback on the bug about 3, but for now, let's run this change through our other systems and see if they complain.
The CQ bit was checked by noel@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1039503003/1
The CQ bit was unchecked by commit-bot@chromium.org
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an LGTM may have been provided, it was from a non-committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
noel@chromium.org changed reviewers: + pdr@chromium.org
On 2015/04/01 16:35:18, I haz the power (commit-bot) wrote: > No LGTM from a valid reviewer yet. Only full committers are accepted. pdr@ rubber stamp please?
On 2015/04/01 at 16:36:40, noel wrote: > On 2015/04/01 16:35:18, I haz the power (commit-bot) wrote: > > No LGTM from a valid reviewer yet. Only full committers are accepted. > > pdr@ rubber stamp please? LGTM but I'd really like a test for this. I don't have access to the linked bug so I may not have the full context.
On 2015/04/01 18:08:37, pdr wrote: > On 2015/04/01 at 16:36:40, noel wrote: > > On 2015/04/01 16:35:18, I haz the power (commit-bot) wrote: > > > No LGTM from a valid reviewer yet. Only full committers are accepted. > > > > pdr@ rubber stamp please? > > LGTM but I'd really like a test for this. I don't have access to the linked bug > so I may not have the full context. Already added a test (r192900).
The CQ bit was checked by noel@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1039503003/1
Message was sent while issue was closed.
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=192980
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/1069083003/ by noel@chromium.org. The reason for reverting is: Per the bug, Factor 3 images are acceptable to libjpeg6b and users can even create them using its well-known cjpeg tool. . |