[libcamera-devel] [PATCH 1/2] ipa: libipa: Add OV2685 Camera Sensor Helper
Jacopo Mondi
jacopo.mondi at ideasonboard.com
Tue Feb 28 16:30:51 CET 2023
Hi Kieran
On Mon, Feb 27, 2023 at 08:42:53PM +0000, Kieran Bingham via libcamera-devel wrote:
> Provide a CameraSensorHelper for the OV2685, along with the
> corresponding camera sensor properties.
>
> Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
> ---
> src/ipa/libipa/camera_sensor_helper.cpp | 11 +++++++++++
> src/libcamera/camera_sensor_properties.cpp | 14 ++++++++++++++
> 2 files changed, 25 insertions(+)
>
> diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
> index 7977d7eb6c07..d1051cc25656 100644
> --- a/src/ipa/libipa/camera_sensor_helper.cpp
> +++ b/src/ipa/libipa/camera_sensor_helper.cpp
> @@ -450,6 +450,17 @@ public:
> };
> REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477)
>
> +class CameraSensorHelperOv2685 : public CameraSensorHelper
> +{
> +public:
> + CameraSensorHelperOv2685()
> + {
> + gainType_ = AnalogueGainLinear;
> + gainConstants_.linear = { 1, 0, 0, 128 };
The sensor manual I have doesn't specify a gain model at all.
I've seen this working and it's reasonable, I would add a coment to
record that the gain model is not documented, but otherwise... ship
it!
Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
> + }
> +};
> +REGISTER_CAMERA_SENSOR_HELPER("ov2685", CameraSensorHelperOv2685)
> +
> class CameraSensorHelperOv2740 : public CameraSensorHelper
> {
> public:
> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp
> index b8c532699684..7652c5f3e24c 100644
> --- a/src/libcamera/camera_sensor_properties.cpp
> +++ b/src/libcamera/camera_sensor_properties.cpp
> @@ -133,6 +133,20 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen
> { controls::draft::TestPatternModePn9, 4 },
> },
> } },
> + { "ov2685", {
> + .unitCellSize = { 1750, 1750 },
> + .testPatternModes = {
> + { controls::draft::TestPatternModeOff, 0 },
> + { controls::draft::TestPatternModeColorBars, 1},
> + { controls::draft::TestPatternModeColorBarsFadeToGray, 2 },
> + /*
> + * Also exposed by the driver:
> + * - OV2685_TEST_PATTERN_RANDOM,
> + * - OV2685_TEST_PATTERN_BW_SQUARE,
> + * - OV2685_TEST_PATTERN_COLOR_SQUARE,
> + */
> + },
> + } },
> { "ov2740", {
> .unitCellSize = { 1400, 1400 },
> .testPatternModes = {
> --
> 2.34.1
>
More information about the libcamera-devel
mailing list