Add new comment

Using old DCRAW code with LibRaw?

Hello,

I'm using DCRAW to import RAWs into a software for the purpose of astro image processing. Actually I'm going to migrate to LibRaw for this purpose.
A problem I face thereby is related to some optimisations I implemented in the DCRAW processing sequence. These optimisations dramatically speed up the conversion for many of the frequently used formats like CR2 and the special needs of astro image processing.
My typical processing route leaves the DCRAW sequence after executing (*load_raw)() and selectively calls original or modified DCRAW functions depending on the RAW format and user options.
When I was looking into the LibRaw sources and examples I found that there are several differences between the original DCRAW and LibRaw::dcraw_process() which might make it quite laborious to transfer my adaptions from DCRAW to LibRaw. Therefore, as a first step, I plan to not replace DCRAW by LibRaw completely. Instead, I want to use LibRaw until LibRaw::unpack() and thereafter use my code with as few changes as possible.
Do you think this approach îs feasible and reasonable, or are there some pitfalls I overlooked?
Can I reconstruct all the DCRAW data structures from their LibRaw equivalents (without too much effort)? Or is there even some sample code doing that?

Erwin

Forums: