Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LJpegDecoder: Maximal output tile size should be a multiple of LJpeg …
…frame size
- Loading branch information
63f7170
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this new test might still fail for the Blackmagic/CinemaDNG case?
63f7170
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know yet.
63f7170
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, out of 7 raws on RPU that have
predictor != 1
, this check does not fail for just 1 (one) of them.63f7170
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected - this is I guess the Apple ProRaw 3 component predictor 7 case where there is no tile reshaping. I guess this is the first/easiest one to try to add support for.
For the BlackMagic/CinemaDNG case, jpegFrameDim.x = 2 * maxRes.x, not the other way around.
Perhaps the area check is sufficient?
63f7170
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, that's the idea, and is exactly what i hoped would happen - small piecemeal separately observable steps.
Unless we literally need to drop a half of every row, the area check is clearly not sufficient,
because we'll still need to detect that other "layout". There's really only two possible cases:
63f7170
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Unfortunately the Apple files now bail at IFD overlap check, and they didn't before... Maybe related to 0d88638?
I might be thick and just don't get it... Even the DNG spec says:
The way I see it (and the drawing of the known cases matches), the only thing that matters is
tiff_tile_comp * tiff_tile_w * tiff_tile_h = jpeg_frame_comp * jpeg_frame_w * jpeg_frame_h
, i.e. "total sample count" (and what I meant by the existing "area" check a few lines above).63f7170
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. The check isn't there to be petty/picky and discard these raws.
It's only there to somehow differentiate between these LJpeg "flavors",
it will be adjusted if needed to support that other "layout".
63f7170
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, RawSpeed now tries to parse the Apple MakerNote as a vanilla IFD...
63f7170
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind, seems this was always the case and the exception does not stop execution, so should be good to proceed w/ this case.