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 <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
Jean-Michel Hautbois 2021-07-15 12:17:09 +02:00
parent bda10cae5e
commit ea0b199da7

View file

@ -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)