mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-23 16:45:07 +03:00
ipa: vimc: Add configure() function
As part of an effort to make the vimc IPA usable for testing, extend it with a configure function. The configuration is currently ignored by the IPA. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
This commit is contained in:
parent
25462474f8
commit
568c4049bc
3 changed files with 34 additions and 0 deletions
|
@ -19,6 +19,11 @@ enum IPAOperationCode {
|
|||
|
||||
interface IPAVimcInterface {
|
||||
init(libcamera.IPASettings settings) => (int32 ret);
|
||||
|
||||
configure(libcamera.IPACameraSensorInfo sensorInfo,
|
||||
map<uint32, libcamera.IPAStream> streamConfig,
|
||||
map<uint32, libcamera.ControlInfoMap> entityControls) => (int32 ret);
|
||||
|
||||
start() => (int32 ret);
|
||||
stop();
|
||||
};
|
||||
|
|
|
@ -34,6 +34,10 @@ public:
|
|||
int start() override;
|
||||
void stop() override;
|
||||
|
||||
int configure(const IPACameraSensorInfo &sensorInfo,
|
||||
const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, ControlInfoMap> &entityControls) override;
|
||||
|
||||
private:
|
||||
void initTrace();
|
||||
void trace(enum ipa::vimc::IPAOperationCode operation);
|
||||
|
@ -86,6 +90,15 @@ void IPAVimc::stop()
|
|||
LOG(IPAVimc, Debug) << "stop vimc IPA!";
|
||||
}
|
||||
|
||||
int IPAVimc::configure([[maybe_unused]] const IPACameraSensorInfo &sensorInfo,
|
||||
[[maybe_unused]] const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
[[maybe_unused]] const std::map<unsigned int, ControlInfoMap> &entityControls)
|
||||
{
|
||||
LOG(IPAVimc, Debug) << "configure()";
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void IPAVimc::initTrace()
|
||||
{
|
||||
struct stat fifoStat;
|
||||
|
|
|
@ -295,6 +295,22 @@ int PipelineHandlerVimc::configure(Camera *camera, CameraConfiguration *config)
|
|||
|
||||
cfg.setStream(&data->stream_);
|
||||
|
||||
if (data->ipa_) {
|
||||
/* Inform IPA of stream configuration and sensor controls. */
|
||||
std::map<unsigned int, IPAStream> streamConfig;
|
||||
streamConfig.emplace(std::piecewise_construct,
|
||||
std::forward_as_tuple(0),
|
||||
std::forward_as_tuple(cfg.pixelFormat, cfg.size));
|
||||
|
||||
std::map<unsigned int, ControlInfoMap> entityControls;
|
||||
entityControls.emplace(0, data->sensor_->controls());
|
||||
|
||||
IPACameraSensorInfo sensorInfo;
|
||||
data->sensor_->sensorInfo(&sensorInfo);
|
||||
|
||||
data->ipa_->configure(sensorInfo, streamConfig, entityControls);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue