mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-16 00:45:07 +03:00
ipa: Allow short-circuiting the ipa_context_ops
When an IPA module is loaded without isolation and implements the IPAInterface internally, going through ipa_context_ops is a waste of time. Add an operation to retrieve the IPAInterface, and use it directly in the IPAContextWrapper. For debugging purpose, make it possible to forcing usage of the C API by defining the LIBCAMERA_IPA_FORCE_C_API environment variable. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
parent
8162ac1647
commit
d7e0985ce1
6 changed files with 64 additions and 2 deletions
|
@ -72,6 +72,13 @@ void IPAInterfaceWrapper::destroy(struct ipa_context *_ctx)
|
|||
delete ctx;
|
||||
}
|
||||
|
||||
void *IPAInterfaceWrapper::get_interface(struct ipa_context *_ctx)
|
||||
{
|
||||
IPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);
|
||||
|
||||
return ctx->ipa_.get();
|
||||
}
|
||||
|
||||
void IPAInterfaceWrapper::init(struct ipa_context *_ctx)
|
||||
{
|
||||
IPAInterfaceWrapper *ctx = static_cast<IPAInterfaceWrapper *>(_ctx);
|
||||
|
@ -228,6 +235,7 @@ void IPAInterfaceWrapper::queueFrameAction(unsigned int frame,
|
|||
*/
|
||||
const struct ipa_context_ops IPAInterfaceWrapper::operations_ = {
|
||||
.destroy = &IPAInterfaceWrapper::destroy,
|
||||
.get_interface = &IPAInterfaceWrapper::get_interface,
|
||||
.init = &IPAInterfaceWrapper::init,
|
||||
.register_callbacks = &IPAInterfaceWrapper::register_callbacks,
|
||||
.configure = &IPAInterfaceWrapper::configure,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue