Name

V4L2_PIX_FMT_SRGGB12, V4L2_PIX_FMT_SGRBG12, V4L2_PIX_FMT_SGBRG12, V4L2_PIX_FMT_SBGGR12 — 12-bit Bayer formats expanded to 16 bits

Description

These four pixel formats are raw sRGB / Bayer formats with 12 bits per colour. Each colour component is stored in a 16-bit word, with 4 unused high bits filled with zeros. Each n-pixel row contains n/2 green samples and n/2 blue or red samples, with alternating red and blue rows. Bytes are stored in memory in little endian order. They are conventionally described as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of one of these formats

Example 2.9. V4L2_PIX_FMT_SBGGR12 4 × 4 pixel image

Byte Order. Each cell is one byte, high 6 bits in high bytes are 0.

start + 0:B00lowB00highG01lowG01highB02lowB02highG03lowG03high
start + 8:G10lowG10highR11lowR11highG12lowG12highR13lowR13high
start + 16:B20lowB20highG21lowG21highB22lowB22highG23lowG23high
start + 24:G30lowG30highR31lowR31highG32lowG32highR33lowR33high