Skip to content

Commit

Permalink
ipa: rpi: Provide the camera helper with the hardware configuration
Browse files Browse the repository at this point in the history
Add a CamHelper::setHwConfig() helper used by the IPA to set the
hardware configuartion 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 <[email protected]>
  • Loading branch information
naushir committed Nov 4, 2024
1 parent a908766 commit c1a3a45
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ipa/rpi/cam_helper/cam_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
2 changes: 2 additions & 0 deletions src/ipa/rpi/cam_helper/cam_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class CamHelper
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);
Expand Down Expand Up @@ -108,6 +109,7 @@ class CamHelper

std::unique_ptr<MdParser> parser_;
CameraMode mode_;
Controller::HardwareConfig hwConfig_;

private:
/*
Expand Down
1 change: 1 addition & 0 deletions src/ipa/rpi/common/ipa_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ int32_t IpaBase::init(const IPASettings &settings, const InitParams &params, Ini
lensPresent_ = params.lensPresent;

controller_.initialise();
helper_->setHwConfig(controller_.getHardwareConfig());

/* Return the controls handled by the IPA */
ControlInfoMap::Map ctrlMap = ipaControls;
Expand Down

0 comments on commit c1a3a45

Please sign in to comment.