ipa_context_wrapper.h
Go to the documentation of this file.
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) 2019, Google Inc.
*
* ipa_context_wrapper.h - Image Processing Algorithm context wrapper
*/
#ifndef __LIBCAMERA_INTERNAL_IPA_CONTEXT_WRAPPER_H__
#define __LIBCAMERA_INTERNAL_IPA_CONTEXT_WRAPPER_H__
#include <libcamera/ipa/ipa_interface.h>
#include "libcamera/internal/control_serializer.h"
namespace libcamera {
class IPAContextWrapper final : public IPAInterface
{
public:
IPAContextWrapper(struct ipa_context *context);
~IPAContextWrapper();
int init(const IPASettings &settings) override;
int start() override;
void stop() override;
void configure(const CameraSensorInfo &sensorInfo,
const std::map<unsigned int, IPAStream> &streamConfig,
const std::map<unsigned int, const ControlInfoMap &> &entityControls) override;
void mapBuffers(const std::vector<IPABuffer> &buffers) override;
void unmapBuffers(const std::vector<unsigned int> &ids) override;
virtual void processEvent(const IPAOperationData &data) override;
private:
static void queue_frame_action(void *ctx, unsigned int frame,
struct ipa_operation_data &data);
static const struct ipa_callback_ops callbacks_;
void doQueueFrameAction(unsigned int frame,
const IPAOperationData &data);
struct ipa_context *ctx_;
IPAInterface *intf_;
ControlSerializer serializer_;
};
} /* namespace libcamera */
#endif /* __LIBCAMERA_INTERNAL_IPA_CONTEXT_WRAPPER_H__ */
libcamera::ControlSerializer
Serializer and deserializer for control-related classes.
Definition: control_serializer.h:21
libcamera::IPAContextWrapper
Wrap an ipa_context and expose it as an IPAInterface.
Definition: ipa_context_wrapper.h:17
libcamera::IPAContextWrapper::init
int init(const IPASettings &settings) override
Initialise the IPAInterface.
Definition: ipa_context_wrapper.cpp:73
libcamera::IPAContextWrapper::start
int start() override
Start the IPA.
Definition: ipa_context_wrapper.cpp:89
libcamera::IPAContextWrapper::mapBuffers
void mapBuffers(const std::vector< IPABuffer > &buffers) override
Map buffers shared between the pipeline handler and the IPA.
Definition: ipa_context_wrapper.cpp:181
libcamera::IPAContextWrapper::configure
void configure(const CameraSensorInfo &sensorInfo, const std::map< unsigned int, IPAStream > &streamConfig, const std::map< unsigned int, const ControlInfoMap & > &entityControls) override
Configure the IPA stream and sensor settings.
Definition: ipa_context_wrapper.cpp:111
libcamera::IPAContextWrapper::IPAContextWrapper
IPAContextWrapper(struct ipa_context *context)
Construct an IPAContextWrapper instance that wraps the context.
Definition: ipa_context_wrapper.cpp:47
libcamera::IPAContextWrapper::unmapBuffers
void unmapBuffers(const std::vector< unsigned int > &ids) override
Unmap buffers shared by the pipeline to the IPA.
Definition: ipa_context_wrapper.cpp:209
libcamera::IPAContextWrapper::processEvent
virtual void processEvent(const IPAOperationData &data) override
Process an event from the pipeline handler.
Definition: ipa_context_wrapper.cpp:220
libcamera::IPAContextWrapper::stop
void stop() override
Stop the IPA.
Definition: ipa_context_wrapper.cpp:100
libcamera::IPAInterface
C++ Interface for IPA implementation.
Definition: ipa_interface.h:151
control_serializer.h
Serialization and deserialization helpers for controls.
ipa_interface.h
Image Processing Algorithm interface.
ipa_callback_ops
IPA context operations as a set of function pointers.
Definition: ipa_interface.h:83
ipa_context
IPA module context of execution.
Definition: ipa_interface.h:17
ipa_operation_data
IPA operation data for the IPA context operations.
Definition: ipa_interface.h:75
libcamera::CameraSensorInfo
Report the image sensor characteristics.
Definition: camera_sensor.h:27
libcamera::IPAOperationData
Parameters for IPA operations.
Definition: ipa_interface.h:142
libcamera::IPASettings
IPA interface initialization settings.
Definition: ipa_interface.h:128