Message ID | 20250815102945.1602071-9-stefan.klug@ideasonboard.com |
---|---|
State | New |
Headers | show |
Series |
|
Related | show |
Quoting Stefan Klug (2025-08-15 11:29:28) > Add a function to configure the exposure mode helpers with the line > length and sensor helper to take quantization effects into account. > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> > I'd be tempted to merge this patch with an update that makes all users of AgcMeanLuminance use it correctly ... but perhaps that comes after... Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > > Changes in v3: > - Renamed lineLength to lineDuration > - Collected tag > --- > src/ipa/libipa/agc_mean_luminance.cpp | 15 +++++++++++++++ > src/ipa/libipa/agc_mean_luminance.h | 1 + > 2 files changed, 16 insertions(+) > > diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp > index fce1a5064870..1cbb3a0f9818 100644 > --- a/src/ipa/libipa/agc_mean_luminance.cpp > +++ b/src/ipa/libipa/agc_mean_luminance.cpp > @@ -311,6 +311,21 @@ int AgcMeanLuminance::parseExposureModes(const YamlObject &tuningData) > return 0; > } > > +/** > + * \brief Configure the exposure mode helpers > + * \param[in] lineLength The sensor line length > + * \param[in] sensorHelper The sensor helper > + * > + * This function configures the exposure mode helpers so they can correctly > + * take quantization effects into account. > + */ > +void AgcMeanLuminance::configure(utils::Duration lineDuration, > + const CameraSensorHelper *sensorHelper) > +{ > + for (auto &[id, helper] : exposureModeHelpers_) > + helper->configure(lineDuration, sensorHelper); > +} > + > /** > * \brief Parse tuning data for AeConstraintMode and AeExposureMode controls > * \param[in] tuningData the YamlObject representing the tuning data > diff --git a/src/ipa/libipa/agc_mean_luminance.h b/src/ipa/libipa/agc_mean_luminance.h > index cad7ef845487..49985481ac51 100644 > --- a/src/ipa/libipa/agc_mean_luminance.h > +++ b/src/ipa/libipa/agc_mean_luminance.h > @@ -42,6 +42,7 @@ public: > double yTarget; > }; > > + void configure(utils::Duration lineDuration, const CameraSensorHelper *sensorHelper); > int parseTuningData(const YamlObject &tuningData); > > void setExposureCompensation(double gain) > -- > 2.48.1 >
Quoting Kieran Bingham (2025-08-15 12:03:15) > Quoting Stefan Klug (2025-08-15 11:29:28) > > Add a function to configure the exposure mode helpers with the line > > length and sensor helper to take quantization effects into account. > > > > Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com> > > Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> > > > > I'd be tempted to merge this patch with an update that makes all users > of AgcMeanLuminance use it correctly ... but perhaps that comes after... > > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > > > --- > > > > Changes in v3: > > - Renamed lineLength to lineDuration > > - Collected tag > > --- > > src/ipa/libipa/agc_mean_luminance.cpp | 15 +++++++++++++++ > > src/ipa/libipa/agc_mean_luminance.h | 1 + > > 2 files changed, 16 insertions(+) > > > > diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp > > index fce1a5064870..1cbb3a0f9818 100644 > > --- a/src/ipa/libipa/agc_mean_luminance.cpp > > +++ b/src/ipa/libipa/agc_mean_luminance.cpp > > @@ -311,6 +311,21 @@ int AgcMeanLuminance::parseExposureModes(const YamlObject &tuningData) > > return 0; > > } > > > > +/** > > + * \brief Configure the exposure mode helpers > > + * \param[in] lineLength The sensor line length This is now lineDuration: FAILED: Documentation/internal-api-html /usr/bin/doxygen Documentation/Doxyfile-internal /builds/camera/libcamera/src/ipa/libipa/agc_mean_luminance.cpp:317: error: argument 'lineLength' of command @param is not found in the argument list of libcamera::ipa::AgcMeanLuminance::configure(utils::Duration lineDuration, const CameraSensorHelper *sensorHelper) (warning treated as error, aborting now) > > + * \param[in] sensorHelper The sensor helper > > + * > > + * This function configures the exposure mode helpers so they can correctly > > + * take quantization effects into account. > > + */ > > +void AgcMeanLuminance::configure(utils::Duration lineDuration, > > + const CameraSensorHelper *sensorHelper) > > +{ > > + for (auto &[id, helper] : exposureModeHelpers_) > > + helper->configure(lineDuration, sensorHelper); > > +} > > + > > /** > > * \brief Parse tuning data for AeConstraintMode and AeExposureMode controls > > * \param[in] tuningData the YamlObject representing the tuning data > > diff --git a/src/ipa/libipa/agc_mean_luminance.h b/src/ipa/libipa/agc_mean_luminance.h > > index cad7ef845487..49985481ac51 100644 > > --- a/src/ipa/libipa/agc_mean_luminance.h > > +++ b/src/ipa/libipa/agc_mean_luminance.h > > @@ -42,6 +42,7 @@ public: > > double yTarget; > > }; > > > > + void configure(utils::Duration lineDuration, const CameraSensorHelper *sensorHelper); > > int parseTuningData(const YamlObject &tuningData); > > > > void setExposureCompensation(double gain) > > -- > > 2.48.1 > >
diff --git a/src/ipa/libipa/agc_mean_luminance.cpp b/src/ipa/libipa/agc_mean_luminance.cpp index fce1a5064870..1cbb3a0f9818 100644 --- a/src/ipa/libipa/agc_mean_luminance.cpp +++ b/src/ipa/libipa/agc_mean_luminance.cpp @@ -311,6 +311,21 @@ int AgcMeanLuminance::parseExposureModes(const YamlObject &tuningData) return 0; } +/** + * \brief Configure the exposure mode helpers + * \param[in] lineLength The sensor line length + * \param[in] sensorHelper The sensor helper + * + * This function configures the exposure mode helpers so they can correctly + * take quantization effects into account. + */ +void AgcMeanLuminance::configure(utils::Duration lineDuration, + const CameraSensorHelper *sensorHelper) +{ + for (auto &[id, helper] : exposureModeHelpers_) + helper->configure(lineDuration, sensorHelper); +} + /** * \brief Parse tuning data for AeConstraintMode and AeExposureMode controls * \param[in] tuningData the YamlObject representing the tuning data diff --git a/src/ipa/libipa/agc_mean_luminance.h b/src/ipa/libipa/agc_mean_luminance.h index cad7ef845487..49985481ac51 100644 --- a/src/ipa/libipa/agc_mean_luminance.h +++ b/src/ipa/libipa/agc_mean_luminance.h @@ -42,6 +42,7 @@ public: double yTarget; }; + void configure(utils::Duration lineDuration, const CameraSensorHelper *sensorHelper); int parseTuningData(const YamlObject &tuningData); void setExposureCompensation(double gain)