I apologize, I just noticed how old this thread is and what I think your actual question is. If you are trying to unpack a raw file, take a look at github.com/jdhill-repo/indi-picamera/blo...er/indi_picamera.cpp lines 870 to 900. I can't remember exactly where I got the format. Hope this helps.
Its me that is sorry, I didn't realize this either. I thought it was for the new 12Mp high quality camera that uses the imx477 chip, that is what I am working on anyway.
I did not know about your indi_raspicam before I started coding, even though I did search around quite a bit. I think your solution is simpler to implement by just calling raspiraw,
but sadly raspiraw does not seem to work with the new 12Mp camera.
Support was added to raspiraw for the Sony IMX477 in the last few days, but I have not updated my fork that is on my github page. Since my driver is hard-coded from the V2 camera, if the V2 specific constants were changed, it may work with the HQ. These are RAWBLOCKSIZE, ROWSIZE, HPIXELS, VPIXELS. Also, the mode that is requested in the raspiraw command.
I have a HQ camera ordered and cannot test until it arrives. My goal is to have the driver use both the V2 and HQ.
If you have a link to what you have worked on, I would be interested in seeing it.
Ok, interesting. I did down load the raspiraw from github and ran, but it failed because it was trying to access /dev/i2c-0, I tried to use /dev/i2c-1 also but no success.
My code is on github.com/lboclboc/indi_raspistill/
/Lars