summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2023-02-24 00:16:21 +0000
committerKieran Bingham <kieran.bingham@ideasonboard.com>2023-02-24 15:06:08 +0000
commit06d7dbbfa78ade0319517559d79ff95963ba8bda (patch)
treea73573c69664df188495464a83dd7de231a31d12
parentf43d7b2c07d3fa32ff51725be2320ad262c2b038 (diff)
ipa: libipa: Add OV2685 Camera Sensor Helper
Provide a CameraSensorHelper for the OV2685, along with the corresponding camera sensor properties. Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-rw-r--r--src/ipa/libipa/camera_sensor_helper.cpp11
-rw-r--r--src/libcamera/camera_sensor_properties.cpp14
2 files changed, 25 insertions, 0 deletions
diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index 7977d7eb..d1051cc2 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -450,6 +450,17 @@ public:
};
REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477)
+class CameraSensorHelperOv2685 : public CameraSensorHelper
+{
+public:
+ CameraSensorHelperOv2685()
+ {
+ gainType_ = AnalogueGainLinear;
+ gainConstants_.linear = { 1, 0, 0, 128 };
+ }
+};
+REGISTER_CAMERA_SENSOR_HELPER("ov2685", CameraSensorHelperOv2685)
+
class CameraSensorHelperOv2740 : public CameraSensorHelper
{
public:
diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
index b8c53269..7652c5f3 100644
--- a/src/libcamera/camera_sensor_properties.cpp
+++ b/src/libcamera/camera_sensor_properties.cpp
@@ -133,6 +133,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
{ controls::draft::TestPatternModePn9, 4 },
},
} },
+ { "ov2685", {
+ .unitCellSize = { 1750, 1750 },
+ .testPatternModes = {
+ { controls::draft::TestPatternModeOff, 0 },
+ { controls::draft::TestPatternModeColorBars, 1},
+ { controls::draft::TestPatternModeColorBarsFadeToGray, 2 },
+ /*
+ * Also exposed by the driver:
+ * - OV2685_TEST_PATTERN_RANDOM,
+ * - OV2685_TEST_PATTERN_BW_SQUARE,
+ * - OV2685_TEST_PATTERN_COLOR_SQUARE,
+ */
+ },
+ } },
{ "ov2740", {
.unitCellSize = { 1400, 1400 },
.testPatternModes = {