[libcamera-devel] [PATCH] libipa: Correct OV5670 CameraSensorHelper gain values
Kieran Bingham
kieran.bingham at ideasonboard.com
Thu Jul 15 16:38:17 CEST 2021
On 15/07/2021 11:17, 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: Kieran Bingham <kieran.bingham 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)
>
More information about the libcamera-devel
mailing list