cr2hdr breaks lossy dng (aka smart previews)

Issue #2333 new
Marsu42 created an issue

It's known that dual_iso dng files cause artifacts when converted to lossy dng in the regions of deep shadows that have been interpolated as half the the scanlines were clipped in the original raw file.

Apart from just being a "missing dng feature" in comparison to vanilla raw files, this problem has become more severe in recent Adobe apps since it's the base for the offline "smart preview" files. The free dng converter can be used to convert dng to lossy w/o Photoshop or Lightroom, it's basically 8bit jpeg-derived compression with the added benefit of keeping lossless wb adjustment.

I hope there's a way to do a minor cr2hdr adjustment to circumvent this problem. Alas, as Adobe's compression algorithm is closed source it might be tricky to identify the exact cause of the problem, but imho it's well worth a try. The dng converter seems to erroneously identify and compress these specific regions, maybe adding some noise or similar could be added to prevent this from happening?

Comments (4)

  1. David Milligan

    Looks like the problem is in the deep shadows. Could be an issue with the unusual black level in dual ISO files (it's 4x normal camera black level IIRC), you could try subtracting it back out of the data to get to a normal camera black level (2048), and see if that fixes anything. This is just a guess.

  2. Marsu42 reporter

    Could be, but I'm not up to modifying cr2hdr accordingly. However, I wouldn't be too optimistic with this solution as files with the beta mini_mo (which changes the black level, too) work just fine in Adobe apps, including lossy compression. I hope alex can give some input, as he's the one knowing exactly how different a dual_iso raw file is from a vanilla one and what could be the cause of these artifacts.

  3. Log in to comment