[PATCH v2 4/4] ipa: rpi: Provide the camera helper with the hardware configuration
Kieran Bingham
kieran.bingham at ideasonboard.com
Thu Dec 19 11:05:30 CET 2024
Quoting Naushir Patuck (2024-12-18 08:34:21)
> Add a CamHelper::setHwConfig() helper used by the IPA to set the
> hardware configuration in use by the pipeline. This will be needed by
> the IMX500 camera helper in a future commit to determine if the
> metadata buffer is strided.
>
> Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
> Reviewed-by: David Plowman <david.plowman at raspberrypi.com>
Acked-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
I'll kick this through CI and merge when complete.
> ---
> src/ipa/rpi/cam_helper/cam_helper.cpp | 5 +++++
> src/ipa/rpi/cam_helper/cam_helper.h | 2 ++
> src/ipa/rpi/common/ipa_base.cpp | 1 +
> 3 files changed, 8 insertions(+)
>
> diff --git a/src/ipa/rpi/cam_helper/cam_helper.cpp b/src/ipa/rpi/cam_helper/cam_helper.cpp
> index 6493e88232a4..1422a02e9953 100644
> --- a/src/ipa/rpi/cam_helper/cam_helper.cpp
> +++ b/src/ipa/rpi/cam_helper/cam_helper.cpp
> @@ -156,6 +156,11 @@ void CamHelper::setCameraMode(const CameraMode &mode)
> }
> }
>
> +void CamHelper::setHwConfig(const Controller::HardwareConfig &hwConfig)
> +{
> + hwConfig_ = hwConfig;
> +}
> +
> void CamHelper::getDelays(int &exposureDelay, int &gainDelay,
> int &vblankDelay, int &hblankDelay) const
> {
> diff --git a/src/ipa/rpi/cam_helper/cam_helper.h b/src/ipa/rpi/cam_helper/cam_helper.h
> index 4a4ab5e68cba..fb7eb3202e79 100644
> --- a/src/ipa/rpi/cam_helper/cam_helper.h
> +++ b/src/ipa/rpi/cam_helper/cam_helper.h
> @@ -76,6 +76,7 @@ public:
> CamHelper(std::unique_ptr<MdParser> parser, unsigned int frameIntegrationDiff);
> virtual ~CamHelper();
> void setCameraMode(const CameraMode &mode);
> + void setHwConfig(const Controller::HardwareConfig &hwConfig);
> virtual void prepare(libcamera::Span<const uint8_t> buffer,
> Metadata &metadata);
> virtual void process(StatisticsPtr &stats, Metadata &metadata);
> @@ -108,6 +109,7 @@ protected:
>
> std::unique_ptr<MdParser> parser_;
> CameraMode mode_;
> + Controller::HardwareConfig hwConfig_;
>
> private:
> /*
> diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp
> index 5fce17e67bd6..165c23c88d49 100644
> --- a/src/ipa/rpi/common/ipa_base.cpp
> +++ b/src/ipa/rpi/common/ipa_base.cpp
> @@ -160,6 +160,7 @@ int32_t IpaBase::init(const IPASettings &settings, const InitParams ¶ms, Ini
> lensPresent_ = params.lensPresent;
>
> controller_.initialise();
> + helper_->setHwConfig(controller_.getHardwareConfig());
>
> /* Return the controls handled by the IPA */
> ControlInfoMap::Map ctrlMap = ipaControls;
> --
> 2.43.0
>
More information about the libcamera-devel
mailing list