18.104.22.168. V4L2_PIX_FMT_SRGGB12P (‘pRCC’), V4L2_PIX_FMT_SGRBG12P (‘pgCC’), V4L2_PIX_FMT_SGBRG12P (‘pGCC’), V4L2_PIX_FMT_SBGGR12P (‘pBCC’),¶
22.214.171.124.1. 12-bit packed Bayer formats¶
These four pixel formats are packed raw sRGB / Bayer formats with 12 bits per colour. Every two consecutive samples are packed into three bytes. Each of the first two bytes contain the 8 high order bits of the pixels, and the third byte contains the four least significants bits of each pixel, in the same order.
Each n-pixel row contains n/2 green samples and n/2 blue or red samples, with alternating green-red and green-blue rows. They are conventionally described as GRGR… BGBG…, RGRG… GBGB…, etc. Below is an example of a small V4L2_PIX_FMT_SBGGR12P image:
Byte Order. Each cell is one byte.
|start + 0:||B00high||G01high||
|start + 6:||G10high||R11high||
|start + 12:||B20high||G21high||
|start + 18:||G30high||R31high||