From ea0b199da79e069c7160fb695956ef08787c6913 Mon Sep 17 00:00:00 2001 From: Jean-Michel Hautbois Date: Thu, 15 Jul 2021 12:17:09 +0200 Subject: libipa: Correct OV5670 CameraSensorHelper gain values The datasheet states that the low 7 bits are fraction bits. real_gain = GainCode/128 For example, 0x080 is 1x gain, 0x100 is 2x gain. It means that we should have m0=1 and c1=128. Signed-off-by: Jean-Michel Hautbois Reviewed-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/ipa/libipa/camera_sensor_helper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 17e4f0b2..709835a8 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -300,7 +300,7 @@ class CameraSensorHelperOv5670 : public CameraSensorHelper public: CameraSensorHelperOv5670() { - analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 256 }; + analogueGainConstants_ = { AnalogueGainLinear, 1, 0, 0, 128 }; } }; REGISTER_CAMERA_SENSOR_HELPER("ov5670", CameraSensorHelperOv5670) -- cgit v1.2.1