summaryrefslogtreecommitdiff
path: root/include/libcamera
diff options
context:
space:
mode:
authorHirokazu Honda <hiroh@chromium.org>2021-06-10 17:25:36 +0900
committerJacopo Mondi <jacopo@jmondi.org>2021-06-14 14:10:53 +0200
commit0b312cb4acd9e9ce0ab6fce8fe2db1afca4c5fd8 (patch)
tree66b4e543d7480ed099a195489d69da703d5cfcce /include/libcamera
parentc520531884ec8f5744a245d7bf49b1723641c1d0 (diff)
libcamera: CameraSensorProperties: Add table of v4l2 index and test pattern
The V4L2 specification defines the sensor test pattern modes through a menu control, where a numerical index is associated to a string that describes the test pattern. The index-to-pattern mapping is driver specific and requires a corresponding representation in the library. Add to the static list of CameraSensorProperties a map of indexes to libcamera::controls::TestPatternModes values to be able to map the indexes returned by the driver to the corresponding test pattern mode. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include/libcamera')
-rw-r--r--include/libcamera/internal/camera_sensor_properties.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h
index f5e242cb..67c77920 100644
--- a/include/libcamera/internal/camera_sensor_properties.h
+++ b/include/libcamera/internal/camera_sensor_properties.h
@@ -7,6 +7,7 @@
#ifndef __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__
#define __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__
+#include <map>
#include <string>
#include <libcamera/geometry.h>
@@ -17,6 +18,7 @@ struct CameraSensorProperties {
static const CameraSensorProperties *get(const std::string &sensor);
Size unitCellSize;
+ std::map<int32_t, int32_t> testPatternModes;
};
} /* namespace libcamera */