summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2024-01-23 15:15:55 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2024-01-23 17:17:09 +0000
commit4d9eac1a681fc7ea88c7cd4eef74c470cb0628dd (patch)
treef12c29903e8c84c768220f91803f1f43cd6728f2 /src
parentd11c6359b514707e99371d31b4454542fb6ca112 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/v4l2_subdevice.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libcamera/v4l2_subdevice.cpp b/src/libcamera/v4l2_subdevice.cpp
index 265240db..6d0785b7 100644
--- a/src/libcamera/v4l2_subdevice.cpp
+++ b/src/libcamera/v4l2_subdevice.cpp
@@ -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 } },