libcamera: formats: Add RGB565_BE format

This new format corresponds to the V4L2 V4L2_PIX_FMT_RGB565X format, and
is the big-endian version of the DRM_FORMAT_RGB565 format.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart 2021-01-31 20:40:00 +02:00
parent 7c496f1c54
commit 040a6dcfbc
3 changed files with 14 additions and 0 deletions

View file

@ -155,6 +155,16 @@ const std::map<PixelFormat, PixelFormatInfo> pixelFormatInfo{
.pixelsPerGroup = 1,
.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::RGB565_BE, {
.name = "RGB565_BE",
.format = formats::RGB565_BE,
.v4l2Format = V4L2PixelFormat(V4L2_PIX_FMT_RGB565X),
.bitsPerPixel = 16,
.colourEncoding = PixelFormatInfo::ColourEncodingRGB,
.packed = false,
.pixelsPerGroup = 1,
.planes = {{ { 3, 1 }, { 0, 0 }, { 0, 0 } }},
} },
{ formats::BGR888, {
.name = "BGR888",
.format = formats::BGR888,