I'm working with a 10 bit RAW bayer pixel format used by the MIPI-CSI and ISP hardware ("IPU3") on an Intel platform.
The memory layout of the RAW format is described here: https://www.kernel.org/doc/html/v5.0/media/uapi/v4l/pixfmt-srggb10-ipu3.html#v4l2-pix-fmt-ipu3-sbggr10
The format is described as "little endian", which I'm not even sure how to interpret here as the pixel values cross byte boundaries somewhat arbitrarily. I guess it just means, "However the pixel value is split on byte boundaries, the least significant bits come first in memory"?
As it doesn't say anything to the contrary, I'm assuming the bits within a byte are still ordered most-to-least significant, where byte 7 is the MSB and byte 0 is the LSB.
From the example table in the documentation I linked, I would interpret the order of the first 2 bytes worth of bits in the image to be:
(7-0) (7-2)(1-0)
|bbbbbbbb|ggggggBB|
where "b" are the least significant bits of the first blue pixel value, "B" are the 2 most significant bits of that same first blue pixel value, and "g" are the least significant bits of the first green pixel.
I know other 10+ bit RAW formats have discontiguous pixels in memory, though usually its something like "we always have the 8 most significant bits for all 4 (eg. BGGR) before a fifth byte with the 2 least significant bits of each".
I'm just worried I could be misreading something and it's actually supposed to be:
|bbbbbbbb|BBgggggg|
How do you folks interpret this?