ipa: rpi: Add vd56g3 support for rpi
The cam_helper gain formula and frameIntegrationDiff can be found in the vd56g3 user manual. Signed-off-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com> Reviewed-by: Naushir Patuck <naush@rasbperrypi.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
committed by
Kieran Bingham
parent
6f1af6f578
commit
c64bf58baa
@@ -0,0 +1,49 @@
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/*
|
||||
* Copyright (C) STMicroelectronics SA 2025
|
||||
*
|
||||
* Camera information for vd56g3 sensor
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "cam_helper.h"
|
||||
|
||||
using namespace RPiController;
|
||||
|
||||
class CamHelperVd56g3 : public CamHelper
|
||||
{
|
||||
public:
|
||||
CamHelperVd56g3();
|
||||
uint32_t gainCode(double gain) const override;
|
||||
double gain(uint32_t gainCode) const override;
|
||||
|
||||
private:
|
||||
/*
|
||||
* Smallest difference between the frame length and integration time,
|
||||
* in units of lines.
|
||||
*/
|
||||
static constexpr int frameIntegrationDiff = 61;
|
||||
};
|
||||
|
||||
CamHelperVd56g3::CamHelperVd56g3()
|
||||
: CamHelper({}, frameIntegrationDiff)
|
||||
{
|
||||
}
|
||||
|
||||
uint32_t CamHelperVd56g3::gainCode(double gain) const
|
||||
{
|
||||
return static_cast<uint32_t>(32.0 - 32.0 / gain);
|
||||
}
|
||||
|
||||
double CamHelperVd56g3::gain(uint32_t gainCode) const
|
||||
{
|
||||
return static_cast<double>(32.0 / (32 - gainCode));
|
||||
}
|
||||
|
||||
static CamHelper *create()
|
||||
{
|
||||
return new CamHelperVd56g3();
|
||||
}
|
||||
|
||||
static RegisterCamHelper reg("vd56g3", &create);
|
||||
@@ -14,6 +14,7 @@ rpi_ipa_cam_helper_sources = files([
|
||||
'cam_helper_ov64a40.cpp',
|
||||
'cam_helper_ov7251.cpp',
|
||||
'cam_helper_ov9281.cpp',
|
||||
'cam_helper_vd56g3.cpp',
|
||||
'md_parser_smia.cpp',
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user