libcamera: Add support for 16-bit Bayer formats
Add support for 16-bit Bayer formats. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
90c793c698
commit
3437067e9b
3 changed files with 53 additions and 0 deletions
|
@ -563,6 +563,46 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
|
|||
.pixelsPerGroup = 2,
|
||||
.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},
|
||||
} },
|
||||
{ formats::SBGGR16, {
|
||||
.name = "SBGGR16",
|
||||
.format = formats::SBGGR16,
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SBGGR16),
|
||||
.bitsPerPixel = 16,
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
|
||||
.packed = false,
|
||||
.pixelsPerGroup = 2,
|
||||
.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
|
||||
} },
|
||||
{ formats::SGBRG16, {
|
||||
.name = "SGBRG16",
|
||||
.format = formats::SGBRG16,
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGBRG16),
|
||||
.bitsPerPixel = 16,
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
|
||||
.packed = false,
|
||||
.pixelsPerGroup = 2,
|
||||
.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
|
||||
} },
|
||||
{ formats::SGRBG16, {
|
||||
.name = "SGRBG16",
|
||||
.format = formats::SGRBG16,
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SGRBG16),
|
||||
.bitsPerPixel = 16,
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
|
||||
.packed = false,
|
||||
.pixelsPerGroup = 2,
|
||||
.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
|
||||
} },
|
||||
{ formats::SRGGB16, {
|
||||
.name = "SRGGB16",
|
||||
.format = formats::SRGGB16,
|
||||
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16),
|
||||
.bitsPerPixel = 16,
|
||||
.colourEncoding = PixelFormatInfo::ColourEncodingRAW,
|
||||
.packed = false,
|
||||
.pixelsPerGroup = 2,
|
||||
.planes = {{ { 4, 1 }, { 0, 0 }, { 0, 0 } }},
|
||||
} },
|
||||
{ formats::SBGGR10_IPU3, {
|
||||
.name = "SBGGR10_IPU3",
|
||||
.format = formats::SBGGR10_IPU3,
|
||||
|
|
|
@ -93,6 +93,15 @@ formats:
|
|||
- SBGGR12:
|
||||
fourcc: DRM_FORMAT_SBGGR12
|
||||
|
||||
- SRGGB16:
|
||||
fourcc: DRM_FORMAT_SRGGB16
|
||||
- SGRBG16:
|
||||
fourcc: DRM_FORMAT_SGRBG16
|
||||
- SGBRG16:
|
||||
fourcc: DRM_FORMAT_SGBRG16
|
||||
- SBGGR16:
|
||||
fourcc: DRM_FORMAT_SBGGR16
|
||||
|
||||
- SRGGB10_CSI2P:
|
||||
fourcc: DRM_FORMAT_SRGGB10
|
||||
mod: MIPI_FORMAT_MOD_CSI2_PACKED
|
||||
|
|
|
@ -92,6 +92,10 @@ const std::map<V4L2PixelFormat, PixelFormat> vpf2pf{
|
|||
{ V4L2PixelFormat(V4L2_PIX_FMT_SGBRG12P), formats::SGBRG12_CSI2P },
|
||||
{ V4L2PixelFormat(V4L2_PIX_FMT_SGRBG12P), formats::SGRBG12_CSI2P },
|
||||
{ V4L2PixelFormat(V4L2_PIX_FMT_SRGGB12P), formats::SRGGB12_CSI2P },
|
||||
{ V4L2PixelFormat(V4L2_PIX_FMT_SBGGR16), formats::SBGGR16 },
|
||||
{ V4L2PixelFormat(V4L2_PIX_FMT_SGBRG16), formats::SGBRG16 },
|
||||
{ V4L2PixelFormat(V4L2_PIX_FMT_SGRBG16), formats::SGRBG16 },
|
||||
{ V4L2PixelFormat(V4L2_PIX_FMT_SRGGB16), formats::SRGGB16 },
|
||||
|
||||
/* Compressed formats. */
|
||||
{ V4L2PixelFormat(V4L2_PIX_FMT_MJPEG), formats::MJPEG },
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue