I tried to decompress 13M RAW files with DPCM 8-10, DPCM 8-12, RLE and A-Law... no go 🙁
I'm struck because of some oddities I'm noticing. The IMX206 sensors send RAW10 or RAW12 (or DPCM 10-8) datas to the A7LS. So is the compression done by the image processing DSP and not by the sensor? And why in the TXT of pictures took with "t cal -raw" I can read "system.raw_resolution 14"? Why 14? And why a row lenght of 3904? (moreover, I suspect that the last 20 bytes of every line contains some information and not RGGB values). The compression is surely row by row.
Have you tried DPCM 12-7-12 scheme as defined by the MIPI CSI-2 draft? The spec states that it provides about 42% percent bit rate reduction (so it should provide about the same reduction in file size IMO).
After inspecting compressed and uncompressed RAWs more closely, it is easy to notice one peculiar detail: compressed RAWs are 43.51% smaller in size, than an uncompressed RAW would be, if it would store 12 bits per pixel in a tightly packed manner (and not sparse 16 bits).
The math behind this is really simple:
Each image has 15925248 pixels.
The spec for the IMX206 sensor states, that max data output is 12bit, so raw data (really raw, straight from the DAC, or just stored in packed format) would be 15925248 * 12 / 8, or 23887872 bytes.
And compressed RAW files have the size of 13492224 bytes, which is 43% lower.
This might be a long shot, but it's worth a try. I'll try to verify this, but no promises.