libcamera: v4l2_subdevice: Explain sort order of formatInfoMap

The sort order used in the table isn't obvious. Reference the source of
linux/media-bus-format.h at the top of the table for reference for
future updates.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Kieran Bingham 2024-01-23 15:15:55 +00:00
parent d11c6359b5
commit 4d9eac1a68

View file

@ -57,6 +57,7 @@ struct V4L2SubdeviceFormatInfo {
* bus codes
*/
const std::map<uint32_t, V4L2SubdeviceFormatInfo> formatInfoMap = {
/* This table is sorted to match the order in linux/media-bus-format.h */
{ MEDIA_BUS_FMT_RGB444_2X8_PADHI_BE, { 16, "RGB444_2X8_PADHI_BE", PixelFormatInfo::ColourEncodingRGB } },
{ MEDIA_BUS_FMT_RGB444_2X8_PADHI_LE, { 16, "RGB444_2X8_PADHI_LE", PixelFormatInfo::ColourEncodingRGB } },
{ MEDIA_BUS_FMT_RGB555_2X8_PADHI_BE, { 16, "RGB555_2X8_PADHI_BE", PixelFormatInfo::ColourEncodingRGB } },