Name

V4L2_PIX_FMT_SRGGB10P, V4L2_PIX_FMT_SGRBG10P, V4L2_PIX_FMT_SGBRG10P, V4L2_PIX_FMT_SBGGR10P — 10-bit packed Bayer formats

Description

These four pixel formats are packed raw sRGB / Bayer formats with 10 bits per colour. Every four consecutive colour components are packed into 5 bytes. Each of the first 4 bytes contain the 8 high order bits of the pixels, and the fifth byte contains the two 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 one of these formats:

Example 2.8. V4L2_PIX_FMT_SBGGR10P 4 × 4 pixel image

Byte Order. Each cell is one byte.

start + 0:B00highG01highB02highG03highB00low(bits 7--6) G01low(bits 5--4) B02low(bits 3--2) G03low(bits 1--0)
start + 5:G10highR11highG12highR13highG10low(bits 7--6) R11low(bits 5--4) G12low(bits 3--2) R13low(bits 1--0)
start + 10:B20highG21highB22highG23highB20low(bits 7--6) G21low(bits 5--4) B22low(bits 3--2) G23low(bits 1--0)
start + 15:G30highR31highG32highR33highG30low(bits 7--6) R31low(bits 5--4) G32low(bits 3--2) R33low(bits 1--0)