darktable-org / darktable-org/rawspeed
DNG BlackLevel handling when cpp != 1
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 456
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
Description
@LebedevRI @alexvanderberkel I got darktable decoding dual pixel dng files.
There is one more thing in rawspeed that "requires relaxing". bool DngDecoder::decodeBlackLevels(const TiffIFD* raw) { in DngDecoder.cpp should accept cpp==2 too.
So i suggest it to be
if ((mRaw->getCpp() < 1) || (mRaw->getCpp() > 2))
return false;
Can you agree here? And could you modify this or do you want me to do a pr?
BTW it would be nice to push current rawspeed to dt :-)
Originally posted by @jenshannoschwalm in https://github.com/darktable-org/rawspeed/issues/214#issuecomment-570887227
More specifically, as per https://www.adobe.com/content/dam/acom/en/products/photoshop/pdfs/dng_spec_1.4.0.0.pdf, all that blacklevel info is not at all specific to cpp=1/cpp=2.
See BLACKLEVELREPEATDIM, BLACKLEVEL, BLACKLEVELDELTAV, BLACKLEVELDELTAH.
Which only highlights how broken the current 4-channel mRaw->blackLevelSeparate is.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in DngDecoder.cpp at DngDecoder::decodeBlackLevels and read the DNG 1.4 specification sections for BLACKLEVELREPEATDIM, BLACKLEVEL, BLACKLEVELDELTAV, and BLACKLEVELDELTAH. Trace how mRaw->getCpp() and mRaw->blackLevelSeparate are used, then verify that black-level metadata is handled for cpp values beyond the current restriction without breaking existing decoding behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100