summaryrefslogtreecommitdiff
path: root/src/ipa/libipa/camera_sensor_helper.cpp
diff options
context:
space:
mode:
authorNicholas Roth <nicholas@rothemail.net>2022-10-30 18:05:00 -0500
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2023-01-26 18:33:47 +0100
commit0f382a9926bff239e43bbc3098f111ebf612dc50 (patch)
treec8122e90ed1b6742629109301e75d8d906899310 /src/ipa/libipa/camera_sensor_helper.cpp
parent7986d3d3c17e1ca7c2aa488175a88a4743ed2203 (diff)
libcamera: Add support for OmniVision OV8858
Support for the OmniVision OV8858 sensor is scheduled for inclusion in the Linux kernel in version v6.3. Add support for the sensor in libcamera by providing static properties and a camera sensor helper in libipa. The camera sensor helper expresses analogue gain increments in 1/128 step which differs from what is reported in the sensor documentation in section "5.8 manual exposure compensation/ manual gain compensation" [0] A more detailed analysis of the sensor gain model is reported at: https://patchwork.linuxtv.org/project/linux-media/patch/20221106171129.166892-2-nicholas@rothemail.net/#142267 Record with a \todo note a reference to discussion on the gain model implementation. Signed-off-by: Nicholas Roth <nicholas@rothemail.net> Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/ipa/libipa/camera_sensor_helper.cpp')
-rw-r--r--src/ipa/libipa/camera_sensor_helper.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index 075c568e..7977d7eb 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -516,6 +516,24 @@ public:
};
REGISTER_CAMERA_SENSOR_HELPER("ov5693", CameraSensorHelperOv5693)
+class CameraSensorHelperOv8858 : public CameraSensorHelper
+{
+public:
+ CameraSensorHelperOv8858()
+ {
+ gainType_ = AnalogueGainLinear;
+
+ /*
+ * \todo Validate the selected 1/128 step value as it differs
+ * from what the sensor manual describes.
+ *
+ * See: https://patchwork.linuxtv.org/project/linux-media/patch/20221106171129.166892-2-nicholas@rothemail.net/#142267
+ */
+ gainConstants_.linear = { 1, 0, 0, 128 };
+ }
+};
+REGISTER_CAMERA_SENSOR_HELPER("ov8858", CameraSensorHelperOv8858)
+
class CameraSensorHelperOv8865 : public CameraSensorHelper
{
public: