Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Issue 544323002: Non DCTSIZE multiple width support for JPEG YUV decoding (Closed)

Created:
6 years, 3 months ago by sugoi1
Modified:
6 years, 3 months ago
CC:
blink-reviews, jamesr, krit, jbroman, danakj, Rik, Stephen Chennney, pdr., rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Non DCTSIZE multiple width support for JPEG YUV decoding Since jpeg_read_raw_data reads blocks of memory, we have to make sure that the memory allocated is a multiple of the DCT block size. For example, if DCTSIZE is 8, which is generally the case, we have to make sure that the allocated memory to read the raw JPEG data has a width rounded up to the next multiple of 8 (if it's not already a multiple of 8) to avoid writing data out of the bounds of the memory. If this isn't done properly, the end of some decode image lines can overwrite the beginning of the following lines. BUG=411189 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=181749

Patch Set 1 #

Total comments: 15

Patch Set 2 : Fixed some comments #

Patch Set 3 : Fixed some comments #

Total comments: 1

Patch Set 4 : Tidying up the code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+46 lines, -33 lines) Patch
M Source/platform/graphics/DecodingImageGenerator.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/ImageFrameGenerator.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/graphics/ImageFrameGenerator.cpp View 1 2 3 4 chunks +22 lines, -13 lines 0 comments Download
M Source/platform/image-decoders/ImageDecoder.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M Source/platform/image-decoders/jpeg/JPEGImageDecoder.h View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp View 1 2 3 6 chunks +15 lines, -13 lines 0 comments Download
M Source/platform/image-decoders/jpeg/JPEGImageDecoderTest.cpp View 1 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 18 (3 generated)
sugoi1
This fixes the issue, but if you have better suggestions for the how the API ...
6 years, 3 months ago (2014-09-05 20:14:58 UTC) #2
sugoi1
Adding senorblanco@ as reviewer since he's unexpectedly here for a few days.
6 years, 3 months ago (2014-09-08 14:36:27 UTC) #4
Noel Gordon
On 2014/09/05 20:14:58, sugoi1 wrote: > This fixes the issue, but if you have better ...
6 years, 3 months ago (2014-09-08 16:13:04 UTC) #5
Noel Gordon
https://codereview.chromium.org/544323002/diff/1/Source/platform/graphics/ImageFrameGenerator.cpp File Source/platform/graphics/ImageFrameGenerator.cpp (right): https://codereview.chromium.org/544323002/diff/1/Source/platform/graphics/ImageFrameGenerator.cpp#newcode168 Source/platform/graphics/ImageFrameGenerator.cpp:168: if (decoder->isSizeAvailable()) ASSERT this? https://codereview.chromium.org/544323002/diff/1/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp File Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (right): https://codereview.chromium.org/544323002/diff/1/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp#newcode479 ...
6 years, 3 months ago (2014-09-08 16:13:33 UTC) #6
Stephen White
https://codereview.chromium.org/544323002/diff/1/Source/platform/image-decoders/ImageDecoder.h File Source/platform/image-decoders/ImageDecoder.h (right): https://codereview.chromium.org/544323002/diff/1/Source/platform/image-decoders/ImageDecoder.h#newcode123 Source/platform/image-decoders/ImageDecoder.h:123: virtual IntSize decodedYUVSize(int component, bool memoryAllocation) const { return ...
6 years, 3 months ago (2014-09-08 16:58:20 UTC) #7
Noel Gordon
On 2014/09/08 16:13:04, Noel Gordon wrote: > On 2014/09/05 20:14:58, sugoi1 wrote: > > This ...
6 years, 3 months ago (2014-09-09 01:30:23 UTC) #8
sugoi1
On 2014/09/09 01:30:23, Noel Gordon wrote: > On 2014/09/08 16:13:04, Noel Gordon wrote: > > ...
6 years, 3 months ago (2014-09-09 15:07:04 UTC) #9
sugoi1
Darn, I forgot to publish my drafts yesterday. Here they are: https://codereview.chromium.org/544323002/diff/1/Source/platform/graphics/ImageFrameGenerator.cpp File Source/platform/graphics/ImageFrameGenerator.cpp (right): ...
6 years, 3 months ago (2014-09-09 15:08:15 UTC) #10
Stephen White
https://codereview.chromium.org/544323002/diff/40001/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp File Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp (right): https://codereview.chromium.org/544323002/diff/40001/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp#newcode722 Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp:722: if (((component >= 0) && (component <= 2)) && ...
6 years, 3 months ago (2014-09-09 15:33:51 UTC) #11
sugoi1
PTAL, thanks
6 years, 3 months ago (2014-09-10 14:25:06 UTC) #12
Stephen White
LGTM
6 years, 3 months ago (2014-09-10 14:29:47 UTC) #13
Noel Gordon
On 2014/09/09 15:08:15, sugoi1 wrote: > > Noel wote: > > "// U size and ...
6 years, 3 months ago (2014-09-10 17:18:15 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sugoi@chromium.org/544323002/60001
6 years, 3 months ago (2014-09-10 17:25:54 UTC) #16
Noel Gordon
LGTM
6 years, 3 months ago (2014-09-10 17:29:07 UTC) #17
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 18:27:22 UTC) #18
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as 181749

Powered by Google App Engine
This is Rietveld 408576698