[2/3] ipa: libipa: Add sensor helpers for the IMX582, IMX586 and OV8856
diff mbox series

Message ID GvKebvBkGHCzFhlNwUSfIJUW9gp5XxHo3P_a6FlPrfUjTF-1hSOfx0ehW-rYw1iHW5W8hlDXm2EkcpyXVY8QNraLybfRMEHMWHvTmT2x29Y=@proton.me
State New
Headers show
Series
  • [1/3] libcamera: camera_sensor_properties: Add IMX582, IMX586 and OV8856
Related show

Commit Message

j4niwzis Aug. 2, 2026, 1:59 p.m. UTC
The Sony parts use the usual Sony analogue gain, 1024 / (1024 - code), andtheir black level is 0x40 at ten bits, which the software ISP needs in order
not to subtract the wrong pedestal - without it a dim scene comes out as a
uniformly black frame.

The OV8856 gain is linear in 1/128 steps, as on the OV8858.

Signed-off-by: j4niwzis <j4niwzis@proton.me>
---
--
2.51.0

Patch
diff mbox series

diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -654,6 +654,23 @@ 
 };
 REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477)

+class CameraSensorHelperImx586 : public CameraSensorHelper
+{
+public:
+ CameraSensorHelperImx586()
+ {
+ /* From the register tables: 0x40 at 10 bits. */
+ blackLevel_ = 4096;
+ gain_ = AnalogueGainLinear{ 0, 1024, -1, 1024 };
+ }
+};
+REGISTER_CAMERA_SENSOR_HELPER("imx586", CameraSensorHelperImx586)
+
+class CameraSensorHelperImx582 : public CameraSensorHelperImx586
+{
+};
+REGISTER_CAMERA_SENSOR_HELPER("imx582", CameraSensorHelperImx582)
+
 class CameraSensorHelperImx662 : public CameraSensorHelper
 {
 public:
@@ -827,6 +844,16 @@ 
 };
 REGISTER_CAMERA_SENSOR_HELPER("ov64a40", CameraSensorHelperOv64a40)

+class CameraSensorHelperOv8856 : public CameraSensorHelper
+{
+public:
+ CameraSensorHelperOv8856()
+ {
+ gain_ = AnalogueGainLinear{ 1, 0, 0, 128 };
+ }
+};
+REGISTER_CAMERA_SENSOR_HELPER("ov8856", CameraSensorHelperOv8856)
+
 class CameraSensorHelperOv8858 : public CameraSensorHelper
 {
 public: