2.7. V4L2_PIX_FMT_RAW_8 (‘RAW8’), V4L2_PIX_FMT_RAW_CSI2_10 (‘RACA’), V4L2_PIX_FMT_RAW_CSI2_12 (‘RACC’), V4L2_PIX_FMT_RAW_CSI2_14 (‘RACE’), V4L2_PIX_FMT_RAW_16 (‘RAWG’), V4L2_PIX_FMT_RAW_CSI2_20 (‘RACK’), V4L2_PIX_FMT_RAW_24 (‘RAWO’), V4L2_PIX_FMT_RAW_CSI2_28 (‘RACS’)¶
Generic line-based image data formats
2.7.1. Description¶
These generic raw image data formats define the memory layout of the data without defining the order of the pixels in the format or even the CFA (Colour Filter Array) itself. These formats may only be used with a Media Controller pipeline where the more specific format is reported by an internal sink pad of the source sub-device. See also source routes.
2.7.1.1. V4L2_PIX_FMT_RAW_8¶
The V4L2_PIX_FMT_GENERIC_8 format is a plain 8-bit raw pixel data format. This format is used on CSI-2 for 8 bits per Data Unit.
Byte Order Of V4L2_PIX_FMT_RAW_8. Each cell is one byte. “P” denotes a pixel.
start + 0: |
P00 |
P10 |
P20 |
P30 |
start + 4: |
P01 |
P11 |
P21 |
P31 |
2.7.1.2. V4L2_PIX_FMT_RAW_CSI2_10¶
V4L2_PIX_FMT_RAW_CSI2_10 contains 10-bit packed image data, with four bytes containing the top 8 bits of the pixels followed by lowest 2 bits of the pixels packed into one byte. This format is typically used by CSI-2 receivers with a source that transmits MEDIA_BUS_FMT_RAW_10 and the CSI-2 receiver writes the received data to memory as-is.
The packing of the data follows the MIPI CSI-2 specification.
This format is little endian.
Byte Order Of V4L2_PIX_FMT_RAW_CSI2_10. Each cell is one byte. “P” denotes a pixel.
start + 0: |
P00 bits 9--2 |
P10 bits 9--2 |
P20 bits 9--2 |
P30 bits 9--2 |
P00 bits 1--0 (bits 1--0) P10 bits 1--0 (bits 3--2) P20 bits 1--0 (bits 5--4) P30 bits 1--0 (bits 7--6) |
start + 5: |
P01 bits 9--2 |
P11 bits 9--2 |
P21 bits 9--2 |
P31 bits 9--2 |
P01 bits 1--0 (bits 1--0) P11 bits 1--0 (bits 3--2) P21 bits 1--0 (bits 5--4) P31 bits 1--0 (bits 7--6) |
2.7.1.3. V4L2_PIX_FMT_RAW_CSI2_12¶
V4L2_PIX_FMT_RAW_CSI2_12 contains 12-bit packed image data, with two bytes containing the top 8 bits of the pixels followed by lowest 4 bits of the pixels packed into 1 byte. This format is typically used by CSI-2 receivers with a source that transmits MEDIA_BUS_FMT_RAW_12 and the CSI-2 receiver writes the received data to memory as-is.
The packing of the data follows the MIPI CSI-2 specification.
This format is little endian.
Byte Order Of V4L2_PIX_FMT_RAW_CSI2_12. Each cell is one byte. “P” denotes a pixel.
start + 0: |
P00 bits 11--4 |
P10 bits 11--4 |
P00 bits 3--0 (bits 3--0) P10 bits 3--0 (bits 7--4) |
P20 bits 11--4 |
P30 bits 11--4 |
P20 bits 3--0 (bits 3--0) P30 bits 3--0 (bits 7--4) |
start + 6: |
P01 bits 11--4 |
P11 bits 11--4 |
P01 bits 3--0 (bits 3--0) P11 bits 3--0 (bits 7--4) |
P21 bits 11--4 |
P31 bits 11--4 |
P21 bits 3--0 (bits 3--0) P31 bits 3--0 (bits 7--4) |
2.7.1.4. V4L2_PIX_FMT_RAW_CSI2_14¶
V4L2_PIX_FMT_RAW_CSI2_14 contains 14-bit packed image data, with four bytes containing the top 8 bits of the pixels followed by lowest 6 bits of the pixels packed into three bytes. This format is typically used by CSI-2 receivers with a source that transmits MEDIA_BUS_FMT_RAW_14 and the CSI-2 receiver writes the received data to memory as-is.
The packing of the data follows the MIPI CSI-2 specification.
This format is little endian.
Byte Order Of V4L2_PIX_FMT_RAW_CSI2_14. Each cell is one byte. “P” denotes a pixel.
start + 0: |
P00 bits 13--6 |
P10 bits 13--6 |
P20 bits 13--6 |
P30 bits 13--6 |
P10 bits 1--0 (bits 7--6) P00 bits 5--0 (bits 5--0) |
P20 bits 3--0 (bits 7--4) P10 bits 5--2 (bits 3--0) |
P30 bits 5--0 (bits 7--2) P20 bits 5--4 (bits 1--0) |
start + 7: |
P01 bits 13--6 |
P11 bits 13--6 |
P21 bits 13--6 |
P31 bits 13--6 |
P11 bits 1--0 (bits 7--6) P01 bits 5--0 (bits 5--0) |
P21 bits 3--0 (bits 7--4) P11 bits 5--2 (bits 3--0) |
P31 bits 5--0 (bits 7--2) P21 bits 5--4 (bits 1--0) |
2.7.1.5. V4L2_PIX_FMT_RAW_16¶
V4L2_PIX_FMT_RAW_16 contains 16-bit image data, with each two consecutive bytes forming a pixel value. This format is typically used by CSI-2 receivers with a source that transmits MEDIA_BUS_FMT_RAW_16 and the CSI-2 receiver writes the received data to memory as-is.
The packing of the data follows the MIPI CSI-2 specification.
This format is little endian.
Byte Order Of V4L2_PIX_FMT_RAW_16. Each cell is one byte. “P” denotes a pixel.
start + 0: |
P00 bits 15--8 |
P00 bits 7--0 |
P10 bits 15--8 |
P10 bits 7--0 |
P20 bits 15--8 |
P20 bits 7--0 |
P30 bits 15--8 |
P30 bits 7--0 |
start + 8: |
P01 bits 15--8 |
P01 bits 7--0 |
P11 bits 15--8 |
P11 bits 7--0 |
P21 bits 15--8 |
P21 bits 7--0 |
P31 bits 15--8 |
P31 bits 7--0 |
2.7.1.6. V4L2_PIX_FMT_RAW_CSI2_20¶
V4L2_PIX_FMT_RAW_CSI2_20 contains 20-bit packed image data, with four bytes containing the top 8 bits of two pixels followed by lowest 4 bits of the pixels packed into one byte. This format is typically used by CSI-2 receivers with a source that transmits MEDIA_BUS_FMT_RAW_20 and the CSI-2 receiver writes the received data to memory as-is.
The packing of the data follows the MIPI CSI-2 specification.
This format is little endian.
Byte Order Of V4L2_PIX_FMT_RAW_CSI2_20. Each cell is one byte. “P” denotes a pixel.
start + 0: |
P00 bits 19--12 |
P00 bits 11--4 |
P10 bits 19--12 |
P10 bits 11--4 |
P10 bits 3--0 (bits 7--4) P00 bits 3--0 (bits 3--0) |
P20 bits 19--12 |
P20 bits 11--4 |
P30 bits 19--12 |
P30 bits 11--4 |
P30 bits 3--0 (bits 7--4) P20 bits 3--0 (bits 3--0) |
start + 10: |
P01 bits 19--12 |
P01 bits 11--4 |
P11 bits 19--12 |
P11 bits 11--4 |
P11 bits 3--0 (bits 7--4) P01 bits 3--0 (bits 3--0) |
P21 bits 19--12 |
P21 bits 11--4 |
P31 bits 19--12 |
P31 bits 11--4 |
P31 bits 3--0 (bits 7--4) P21 bits 3--0 (bits 3--0) |
2.7.1.7. V4L2_PIX_FMT_RAW_24¶
V4L2_PIX_FMT_RAW_24 contains 24-bit packed image data, with each three bytes containing the value of one pixel. This format is typically used by CSI-2 receivers with a source that transmits MEDIA_BUS_FMT_RAW_24 and the CSI-2 receiver writes the received data to memory as-is.
The packing of the data follows the MIPI CSI-2 specification.
This format is little endian.
Byte Order Of V4L2_PIX_FMT_RAW_24. Each cell is one byte. “P” denotes a pixel.
start + 0: |
P00 bits 23--16 |
P00 bits 15--8 |
P00 bits 7--0 |
P10 bits 23--16 |
P10 bits 15--8 |
P10 bits 7--0 |
P20 bits 23--16 |
P20 bits 15--8 |
P20 bits 7--0 |
P30 bits 23--16 |
P30 bits 15--8 |
P30 bits 7--0 |
start + 12: |
P01 bits 23--16 |
P01 bits 15--8 |
P01 bits 7--0 |
P11 bits 23--16 |
P11 bits 15--8 |
P11 bits 7--0 |
P21 bits 23--16 |
P21 bits 15--8 |
P21 bits 7--0 |
P31 bits 23--16 |
P31 bits 15--8 |
P31 bits 7--0 |
2.7.1.8. V4L2_PIX_FMT_RAW_CSI2_28¶
V4L2_PIX_FMT_RAW_CSI2_28 contains 28-bit packed image data, with four bytes containing the top 8 bits of two pixels followed by lowest 4 bits of the pixels packed into one byte. This format is typically used by CSI-2 receivers with a source that transmits MEDIA_BUS_FMT_RAW_28 and the CSI-2 receiver writes the received data to memory as-is.
The packing of the data follows the MIPI CSI-2 specification.
This format is little endian.
Byte Order Of V4L2_PIX_FMT_RAW_CSI2_28. Each cell is one byte. “P” denotes a pixel.
start + 0: |
P00 bits 27--20 |
P00 bits 13--6 |
P10 bits 27--20 |
P10 bits 13--6 |
P00 bits 19--14 P00 bits 1--0 |
P00 bits 5--2 P10 bits 17--14 |
P10 bits 19--18 P10 bits 5--0 |
P20 bits 27--20 |
P20 bits 13--6 |
P30 bits 27--20 |
P30 bits 13--6 |
P20 bits 19--14 P20 bits 1--0 |
P20 bits 5--2 P30 bits 17--14 |
P30 bits 19--18 P30 bits 5--0 |
start + 14: |
P01 bits 27--20 |
P01 bits 13--6 |
P11 bits 27--20 |
P11 bits 13--6 |
P01 bits 19--14 P01 bits 1--0 |
P01 bits 5--2 P11 bits 17--14 |
P11 bits 19--18 P11 bits 5--0 |
P21 bits 27--20 |
P21 bits 13--6 |
P31 bits 27--20 |
P31 bits 13--6 |
P21 bits 19--14 P21 bits 1--0 |
P21 bits 5--2 P31 bits 17--14 |
P31 bits 19--18 P31 bits 5--0 |