I realise that you've probably dropped this project, but it's just been noticed by a colleague that your unpacking of the raw10 is wrong. Pixel 0 is in the lowest 2 bits of the 5th byte, with pixel 3 in the highest 2 bits, as described in the CSI2 spec or https://linuxtv.org/downloads/v4l-dvb-apis-new/uapi/v4l/pixfmt-srggb10p.html. The code at https://github.com/illes/raspiraw/blob/master/raspi_dng.c#L172 has them in reverse order.
The same is true in @bablokb and @dword1511 forks of this tool.
I realise that you've probably dropped this project, but it's just been noticed by a colleague that your unpacking of the raw10 is wrong. Pixel 0 is in the lowest 2 bits of the 5th byte, with pixel 3 in the highest 2 bits, as described in the CSI2 spec or https://linuxtv.org/downloads/v4l-dvb-apis-new/uapi/v4l/pixfmt-srggb10p.html. The code at https://github.com/illes/raspiraw/blob/master/raspi_dng.c#L172 has them in reverse order.
The same is true in @bablokb and @dword1511 forks of this tool.