@@ -17,8 +17,7 @@ struct IPAConfigInfo {
};
interface IPAIPU3Interface {
- init(libcamera.IPASettings settings,
- libcamera.IPACameraSensorInfo sensorInfo)
+ init(libcamera.IPASettings settings)
=> (int32 ret);
start() => (int32 ret);
stop();
@@ -132,8 +132,7 @@ namespace ipa::ipu3 {
class IPAIPU3 : public IPAIPU3Interface
{
public:
- int init(const IPASettings &settings,
- const IPACameraSensorInfo &sensorInfo) override;
+ int init(const IPASettings &settings) override;
int start() override;
void stop() override;
@@ -181,6 +180,8 @@ void IPAIPU3::updateSessionConfiguration(const IPAConfigInfo &info)
{
const IPACameraSensorInfo &sensorInfo = info.sensorInfo;
context_.configuration.sensor.vBlank = sensorInfo.vblank;
+ context_.configuration.sensor.lineDuration = sensorInfo.lineLength * 1.0s
+ / sensorInfo.pixelRate;
const ControlInfoMap &sensorControls = info.sensorControls;
@@ -234,8 +235,7 @@ bool IPAIPU3::validateSensorControls()
* handler, computes the limits of the controls it handles and returns
* them in the \a ipaControls output parameter.
*/
-int IPAIPU3::init(const IPASettings &settings,
- const IPACameraSensorInfo &sensorInfo)
+int IPAIPU3::init(const IPASettings &settings)
{
camHelper_ = CameraSensorHelperFactory::create(settings.sensorModel);
if (camHelper_ == nullptr) {
@@ -247,7 +247,6 @@ int IPAIPU3::init(const IPASettings &settings,
/* Clean context */
context_.configuration = {};
- context_.configuration.sensor.lineDuration = sensorInfo.lineLength * 1.0s / sensorInfo.pixelRate;
/* Construct our Algorithms */
algorithms_.push_back(std::make_unique<algorithms::Af>());
@@ -1267,12 +1267,7 @@ int IPU3CameraData::loadIPA()
if (ret)
return ret;
- IPACameraSensorInfo sensorInfo{};
- ret = sensor->sensorInfo(&sensorInfo);
- if (ret)
- return ret;
-
- ret = ipa_->init(IPASettings{ "", sensor->model() }, sensorInfo);
+ ret = ipa_->init(IPASettings{ "", sensor->model() });
if (ret) {
LOG(IPU3, Error) << "Failed to initialise the IPU3 IPA";
return ret;
The IPA module computes the lineDuration value in the init() function only, and uses it when processing statistics to recompute the shutter duration. As the lineDuration varies when a new mode is applied to the sensor, computing it once at IPA initialization time is not enough. Re-calculate the line duration value at IPA configure() time to make sure the module always uses an updated value. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> --- include/libcamera/ipa/ipu3.mojom | 3 +-- src/ipa/ipu3/ipu3.cpp | 9 ++++----- src/libcamera/pipeline/ipu3/ipu3.cpp | 7 +------ 3 files changed, 6 insertions(+), 13 deletions(-)