[libcamera-devel] [PATCH] libipa: Correct OV5670 CameraSensorHelper gain values
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Thu Jul 15 16:12:36 CEST 2021
Hi Jean-Michel,
Thank you for the patch.
On Thu, Jul 15, 2021 at 12:17:09PM +0200, Jean-Michel Hautbois wrote:
> 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 <jeanmichel.hautbois at ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> 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)
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list