Problems with RT and ON1 NoNoise DNG files

Since I was digging in RT dcraw.cc code for another RT pull request I tried to take a look at this.

The image is a linear dng with 16bit rgb (65536). The dcraw.cc linear_table function limits the parsing to 4096 values. So the linearization isn’t done for values greater than 4096 and you get exploded highlights.

I Don’t know if it’s a typo (just a missing ending 0 since the array is already defined to contain 65536 entries) but I extended the limit to 0x10000 instead of 0x1000 and I get a better image.
It’s just more exposed and more reddish, I think it’s related to the strange single ColorMatrix1 (probably on1 v2 is doing some more adjustments or there’s something else missing in RT).

I think this deserves a github issue to better discuss this. In the meantime, if you’re interested the patch is here: GitHub - sgotti/RawTherapee at dcraw_linear_table_increase_size

Pre patch (neutral profile):

After patch (neutral profile):

5 Likes