libraw/dcraw_emu crushes shadows and turns them blue compared to dcraw with exact same settings

I noticed something odd about the dcraw_emu, that sometimes it absolutely crushes the shadows in an image and tends to give them a blue coloration. So, I compared to darktable at first and I saw that darktable doesn't do that. Then I compared with dcraw so that I could match the processing parameters (darktable doesn't use dcraw or libraw ) to libraw's dcraw_emu to see whether maybe it's something in the libraw code that makes this happen.

So I processed an image with the following codes:

dcraw_emu -T -6 +M -r 1.969 1 1.634 1.38 -C 0 0 -f -o 3 -q 3 -H 0 -g 1 0 -m 2 -Z tif Image.SRF
dcraw -T -6 +M -r 1.969 1 1.634 1.38 -C 0 0 -f -o 3 -q 3 -H 0 -g 1 0 -m 2 -O Image.tif Image.SRF

As you can see the processing parameters have been matched precisely to the extent possible for an even comparison. The results are attached as an image below. Why might libraw do this, and is there something I can do to avoid the effect on shadows? I have tried playing with the -c option to adjust the darkness level but I didn't really see a difference.

Image icon libraw vs dcraw 607.44 KB


It is hard to discuss

It is hard to discuss anything related to RAW processing without having the sample file(s)

-- Alex Tutubalin @LibRaw LLC