committed 02:13PM - 20 Jun 18 UTC
This is needed e.g for DNG's converted from Panasonic DMC-LX1 raws.
I have no w…ords. What were they (Adobe) thinking.
They discard padding columns, that were garbage,
and end up with such an odd raw, where the tiles
(LJPEG-compressed) still have padding,
yet the DNG image sizes specify that it has to be discarded.
What is even worse, the image width is not multiple of two,
and the LJPEG's components-per-pixel is 2, so we have to
very-special-handle this case, to not completely discard
that last required block (then we'd be producing
nondeterministic garbage in those last few columns),
but also not fully decode it, because we don't have
anywhere to write it,
We could, of course, introduce something like
"internal padding columnts", in fact we already
pad the rows to be 16-byte aligned, but that padding
is used for ASAN overflow detection.
So right now i'm not seeing any more reasonable fix.
:/
Fixes #12239