I suspect that the raw hook is not placed ideally and firmware processes race with CHDK. I checked that there is indeed only one raw buffer, so that can't be the cause. An in-camera DNG needs some processing time to reverse the byte order of raw data. A DNG created via remote shoot is not processed in camera, processing is done on PC side (AFAIK).
edit:
The "added 3" hook seems to be equivalent to the placement found in ixus175 source. I'm not convinced that the other (added 2) hook is needed.
Yes, I found this mistake.The hook in a sub_FF3827C0 reach both (normal and quick) code paths.
@ntstatic
Comment out this line in capt_seq.c
"BL capt_seq_hook_raw_here \ n" // added 2
Compile again and see if there are any differences in the dng.
Yes the corruption in the image seems to have gone
i have one doubt though.... is it possible we are not getting all the channels in the raw file
i think we are getting only the Green Channel - i may be wrong as i have very little experience with using raw images
however i processed the image with
DCRAW with and without the -a flag
tried opening the image in rawtharapee (i tried setting the white balance using spot but there is no effect)
and all i am getting is a green image
even the preview generated by Google Drive is green
i have uploaded the image
here on google drivethe jpg image saved along with the CRW file is proper though.