Add new comment

problem of decoding apple proRAW dng file

Hi all, I decode some new iphone raw DNG files (maybe proRaw file) with Libraw 0.20 release, VS2015 compiler, and I got some problems:
1. I use command "dcraw_emu -T -6 -q 0 e:\Image_1_2020-11-14_20-51-45.dng" to decode the sample DNG file, and I got a tiff file and with no error, it seems all is good.

2. When I try to get that DNG file's unprocessed raw data with unprocessed_raw project, I got error message from output:
Processing file e:\Image_1_2020-11-14_20-51-45.dng
e:\Image_1_2020-11-14_20-51-45.dng: data corrupted at 11799960
Processing file e:\raw\All\mobile\iphone_proraw\Image_1_2020-11-14_20-51-45.dng
Unpacked....
Only Bayer-pattern RAW files supported, sorry....

it seems decode failed. :-(

after I checked the callstack, "data corrupted.." error should be thrown in decoders_dcraw.cpp:
ushort *LibRaw::ljpeg_row_unrolled(int jrow, struct jhead *jh)
{
...
if ((**row = pred + diff) >> jh->bits) //**row=4119 pred=4073 diff=46 jh->bits=12
derror(); // <---- here
}

3. Then I compiled the Adobe DNG SDK 1.5.1 with Libraw and USE_ZLIB and USE_DNGSDK macro, and add some code lines to unprocessed_raw project before RawProcessor open_file():
dng_host host;
RawProcessor.set_dng_host(&host);
RawProcessor.imgdata.params.use_dngsdk = LIBRAW_DNG_FLOAT | LIBRAW_DNG_LINEAR | LIBRAW_DNG_XTRANS | LIBRAW_DNG_OTHER;

and again I got the same error message output:
Processing file e:\Image_1_2020-11-14_20-51-45.dng
e:\Image_1_2020-11-14_20-51-45.dng: data corrupted at 11799960
Processing file e:\raw\All\mobile\iphone_proraw\Image_1_2020-11-14_20-51-45.dng
Unpacked....
Only Bayer-pattern RAW files supported, sorry...

I debug and noticed:
RawProcessor.imgdata.idata.filters is 0, so output "Only Bayer-pattern RAW files supported, sorry...",
and RawProcessor.imgdata.rawdata.raw_image is NULL

so, How can I get that file's unprocessed raw data ? Thanks for all your help in advance.

Ye.

BTW, the sample DNG file can download from here: https://www.dropbox.com/s/9fdweixwd17pe9w/Image_1_2020-11-14_20-51-45.dn...

Forums: