Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On the use of dithering when decompressing lossless NEF files #518

Open
mallman opened this issue Sep 13, 2023 · 1 comment
Open

On the use of dithering when decompressing lossless NEF files #518

mallman opened this issue Sep 13, 2023 · 1 comment

Comments

@mallman
Copy link
Contributor

mallman commented Sep 13, 2023

Hi.

I was looking into what uncorrectedRawValues does when set to false (the default), specifically for D850 14-bit lossless compressed NEF files. Because these are "losslessly" compressed, the decompression tone curve is the 14-bit identity vector.

I understand the usefulness of using dithering when decompressing using a non-trivial decompression curve. However, in this case it seems that the dithering is just introducing some noise into what should be a identity transform.

Is this a bug? Should Rawspeed bypass dithering (or tone curve decompression entirely) when working with an identity tone curve?

This could be a performance improvement as well. Just do the lossless Huffman decompression and skip the tone curve decompression.

@LebedevRI
Copy link
Member

I understand the usefulness of using dithering when decompressing using a non-trivial decompression curve.

Related, i really need to look into at least the dithering-during-black/white-scaling code,
and finally unify their behavior and get rid of the SSE2 codepath.

However, in this case it seems that the dithering is just introducing some noise into what should be a identity transform.

Is this a bug? Should Rawspeed bypass dithering (or tone curve decompression entirely) when working with an identity tone curve?

I'm not familiar with that particular piece of code.
It does seem like it should be a no-op for identity curve.
I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants