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

Panasonic S5/S1/S1H: Fix Black Point #292

Merged
merged 2 commits into from
Aug 24, 2021

Conversation

jdneumeyer77
Copy link
Contributor

-Fix black point by reading shorts/u16 instead of u32. Don't add 15 or check for overflow.

There's discussion in this Darktable issue about this issue.

Jens suggested I check against the white point, but I don't see it in this decoder. There doesn't seem to be a reason why there was addition of 15 or the overflow check. It appears to be wrong assumption as it causes low-light images to be green.

Here's the Exiftools document about Panasonic Raws (RW2) to verify the black levels are shorts.

Let me know if there's any other changes.

@LebedevRI
Copy link
Member

Looking at the sample

I've attached a test image and I license it under under CC0 for testing purposes.
samples.zip

@ darktable-org/darktable#9285, black level of ~512 does seem about right.
Git speluking suggests that +15 originates all the way back from eabe614,
so no idea why it is there.

This affects literally every RW2 image. I'm not going to be able to check every single one,
but the ones i checked, this //seemed// to be better. But i'm just not sure.

@LebedevRI LebedevRI merged commit 5886c0c into darktable-org:develop Aug 24, 2021
@LebedevRI
Copy link
Member

Thank you!

@jdneumeyer77
Copy link
Contributor Author

Eek fixing an 8 year old change. Yeah I didn't think about the Panasonic m43 cameras. I can sample a few of those images if you want me to.

@LebedevRI
Copy link
Member

Eek fixing an 8 year old change. Yeah I didn't think about the Panasonic m43 cameras. I can sample a few of those images if you want me to.

The key question is: do we have a full sample set under CC0 license for $CAMERA on RPU?

@jdneumeyer77
Copy link
Contributor Author

That's a good question. I see 1,549 total entries when I search Panasonic on RPU. I'm not familiar with the testing strategy for rawspeed or at least how to test such a change like mine across many cameras beyond checking a few samples with exiftools. The exifdata link on RPU doesn't seem to show the above individual black level values.

@LebedevRI
Copy link
Member

Just enter the camera name into the search field https://raw.pixls.us/#repo,
or look if there's an appropriately-named directory in https://raw.pixls.us/data/Panasonic/

@LebedevRI
Copy link
Member

And reverted in b701374 / xref darktable-org/darktable#10008.

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

Successfully merging this pull request may close these issues.

2 participants