darktable-org / darktable-org/darktable
Add support for Dual Pixel Raw dng files
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 13.1k
- Forks
- 1.4k
- Avg merge
- 22h 14m
- Merged PRs (30d)
- 198
Description
Describe the bug
A DNG file converted frrom a CR3 file via Adobe DNG Converteer, Dual Pixel Raw) is not being opened in darktable. Rawspeed issue 214 indicates that this is possibly an error from darktable. Thumbnail of the Dng file is not being generated. While opening the file darktable is running into a deadlock.
Error:
void rawspeed::AbstractDngDecompressor::decompress() const, line 208: Too many errors encountered. Giving up. First Error:
rawspeed::LJpegDecompressor::LJpegDecompressor(const rawspeed::ByteStream&, const rawspeed::RawImage&), line 42: Unexpected component count (2)
allocation failed???
Issue 214 rawspeed:
While it is easy to convince rawspeed to load it
diff --git a/src/librawspeed/decompressors/LJpegDecompressor.cpp b/src/librawspeed/decompressors/LJpegDecompressor.cpp
index f5d6d86c..64b2fb2b 100644
--- a/src/librawspeed/decompressors/LJpegDecompressor.cpp
+++ b/src/librawspeed/decompressors/LJpegDecompressor.cpp
@@ -39,6 +39,7 @@ LJpegDecompressor::LJpegDecompressor(const ByteStream& bs, const RawImage& img)
ThrowRDE("Unexpected data type (%u)", mRaw->getDataType());
if (!((mRaw->getCpp() == 1 && mRaw->getBpp() == 2) ||
-
ThrowRDE("Unexpected component count (%u)", mRaw->getCpp());(mRaw->getCpp() == 2 && mRaw->getBpp() == 4) || (mRaw->getCpp() == 3 && mRaw->getBpp() == 6)))
Expected behavior
Darktable will show thumbnail in lighttable. Darktable will open DNG file
Screenshots
Platform (please complete the following information):
- Darktable Version: 3.1.0
- OS: Ubuntu 19.10
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 with the reported Dual Pixel Raw DNG and the rawspeed error, then inspect src/librawspeed/decompressors/LJpegDecompressor.cpp and rawspeed issue 214. Reproduce thumbnail generation and opening in darktable, and confirm completion when the DNG opens without a deadlock and its lighttable thumbnail is generated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cpp
- Domain
- computer-graphics, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100