libcamera: ipa_interface: Add support for custom IPA data to configure()
Add two new parameters, ipaConfig and result, to the IPAInterface::configure() function to allow pipeline handlers to pass custom data to their IPA, and receive data back. Wire this through the code base. The C API interface will be addressed separately, likely through automation of the C <-> C++ translation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
@@ -166,7 +166,10 @@ void IPAInterfaceWrapper::configure(struct ipa_context *_ctx,
|
||||
entityControls.emplace(id, infoMaps[id]);
|
||||
}
|
||||
|
||||
ctx->ipa_->configure(sensorInfo, ipaStreams, entityControls);
|
||||
/* \todo Translate the ipaConfig and result. */
|
||||
IPAOperationData ipaConfig;
|
||||
ctx->ipa_->configure(sensorInfo, ipaStreams, entityControls, ipaConfig,
|
||||
nullptr);
|
||||
}
|
||||
|
||||
void IPAInterfaceWrapper::map_buffers(struct ipa_context *_ctx,
|
||||
|
||||
@@ -79,7 +79,9 @@ public:
|
||||
|
||||
void configure(const CameraSensorInfo &sensorInfo,
|
||||
const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls) override;
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls,
|
||||
const IPAOperationData &data,
|
||||
IPAOperationData *response) override;
|
||||
void mapBuffers(const std::vector<IPABuffer> &buffers) override;
|
||||
void unmapBuffers(const std::vector<unsigned int> &ids) override;
|
||||
void processEvent(const IPAOperationData &event) override;
|
||||
@@ -187,7 +189,9 @@ void IPARPi::setMode(const CameraSensorInfo &sensorInfo)
|
||||
|
||||
void IPARPi::configure(const CameraSensorInfo &sensorInfo,
|
||||
const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls)
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls,
|
||||
const IPAOperationData &ipaConfig,
|
||||
IPAOperationData *result)
|
||||
{
|
||||
if (entityControls.empty())
|
||||
return;
|
||||
|
||||
@@ -39,7 +39,9 @@ public:
|
||||
|
||||
void configure(const CameraSensorInfo &info,
|
||||
const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls) override;
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls,
|
||||
const IPAOperationData &ipaConfig,
|
||||
IPAOperationData *response) override;
|
||||
void mapBuffers(const std::vector<IPABuffer> &buffers) override;
|
||||
void unmapBuffers(const std::vector<unsigned int> &ids) override;
|
||||
void processEvent(const IPAOperationData &event) override;
|
||||
@@ -76,7 +78,9 @@ private:
|
||||
*/
|
||||
void IPARkISP1::configure(const CameraSensorInfo &info,
|
||||
const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls)
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls,
|
||||
const IPAOperationData &ipaConfig,
|
||||
IPAOperationData *result)
|
||||
{
|
||||
if (entityControls.empty())
|
||||
return;
|
||||
|
||||
@@ -39,7 +39,9 @@ public:
|
||||
|
||||
void configure(const CameraSensorInfo &sensorInfo,
|
||||
const std::map<unsigned int, IPAStream> &streamConfig,
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls) override {}
|
||||
const std::map<unsigned int, const ControlInfoMap &> &entityControls,
|
||||
const IPAOperationData &ipaConfig,
|
||||
IPAOperationData *result) override {}
|
||||
void mapBuffers(const std::vector<IPABuffer> &buffers) override {}
|
||||
void unmapBuffers(const std::vector<unsigned int> &ids) override {}
|
||||
void processEvent(const IPAOperationData &event) override {}
|
||||
|
||||
Reference in New Issue
Block a user