7 #ifndef __LIBCAMERA_IPA_INTERFACE_H__
8 #define __LIBCAMERA_IPA_INTERFACE_H__
101 unsigned int num_streams,
103 unsigned int num_maps);
126 namespace libcamera {
160 const std::map<unsigned int, IPAStream> &streamConfig,
161 const std::map<unsigned int, const ControlInfoMap &> &entityControls) = 0;
163 virtual void mapBuffers(
const std::vector<IPABuffer> &buffers) = 0;
C++ Interface for IPA implementation.
Definition: ipa_interface.h:151
virtual void mapBuffers(const std::vector< IPABuffer > &buffers)=0
Map buffers shared between the pipeline handler and the IPA.
Signal< unsigned int, const IPAOperationData & > queueFrameAction
Queue an action associated with a frame to the pipeline handler.
Definition: ipa_interface.h:167
virtual void unmapBuffers(const std::vector< unsigned int > &ids)=0
Unmap buffers shared by the pipeline to the IPA.
virtual int init(const IPASettings &settings)=0
Initialise the IPAInterface.
virtual void stop()=0
Stop the IPA.
virtual void processEvent(const IPAOperationData &data)=0
Process an event from the pipeline handler.
virtual int start()=0
Start the IPA.
virtual void configure(const CameraSensorInfo &sensorInfo, const std::map< unsigned int, IPAStream > &streamConfig, const std::map< unsigned int, const ControlInfoMap & > &entityControls)=0
Configure the IPA stream and sensor settings.
Generic signal and slot communication mechanism.
Definition: signal.h:39
Framework to manage controls related to an object.
Data structures related to geometric objects.
struct ipa_context * ipaCreate()
Entry point to the IPA modules.
Signal & slot implementation.
A plane for an ipa_buffer.
Definition: ipa_interface.h:59
int dmabuf
The dmabuf file descriptor for the plane (-1 for unused planes)
Definition: ipa_interface.h:60
size_t length
The plane length in bytes (0 for unused planes)
Definition: ipa_interface.h:61
Buffer information for the IPA context operations.
Definition: ipa_interface.h:64
unsigned int id
The buffer unique ID (see libcamera::IPABuffer::id)
Definition: ipa_interface.h:65
struct ipa_buffer_plane planes[3]
The buffer planes (up to 3)
Definition: ipa_interface.h:67
unsigned int num_planes
The number of used planes in the ipa_buffer::planes array.
Definition: ipa_interface.h:66
IPA context operations as a set of function pointers.
Definition: ipa_interface.h:83
void(* queue_frame_action)(void *cb_ctx, unsigned int frame, struct ipa_operation_data &data)
Queue an action associated with a frame to the pipeline handler.
Definition: ipa_interface.h:84
IPA context operations as a set of function pointers.
Definition: ipa_interface.h:88
void(* init)(struct ipa_context *ctx, const struct ipa_settings *settings)
Initialise the IPA context.
Definition: ipa_interface.h:91
void(* map_buffers)(struct ipa_context *ctx, const struct ipa_buffer *buffers, size_t num_buffers)
Map buffers shared between the pipeline handler and the IPA.
Definition: ipa_interface.h:104
void(* register_callbacks)(struct ipa_context *ctx, const struct ipa_callback_ops *callbacks, void *cb_ctx)
Register callback operation from the IPA to the pipeline handler.
Definition: ipa_interface.h:95
void(* destroy)(struct ipa_context *ctx)
Destroy the IPA context created by the module's ipaCreate() function.
Definition: ipa_interface.h:89
void(* unmap_buffers)(struct ipa_context *ctx, const unsigned int *ids, size_t num_buffers)
Unmap buffers shared by the pipeline to the IPA.
Definition: ipa_interface.h:107
int(* start)(struct ipa_context *ctx)
Start the IPA context.
Definition: ipa_interface.h:93
void(* process_event)(struct ipa_context *ctx, const struct ipa_operation_data *data)
Process an event from the pipeline handler.
Definition: ipa_interface.h:109
void(* stop)(struct ipa_context *ctx)
Stop the IPA context.
Definition: ipa_interface.h:94
void(* configure)(struct ipa_context *ctx, const struct ipa_sensor_info *sensor_info, const struct ipa_stream *streams, unsigned int num_streams, const struct ipa_control_info_map *maps, unsigned int num_maps)
Configure the IPA stream and sensor settings.
Definition: ipa_interface.h:98
IPA module context of execution.
Definition: ipa_interface.h:17
const struct ipa_context_ops * ops
The IPA context operations.
Definition: ipa_interface.h:18
ControlInfoMap description for the IPA context operations.
Definition: ipa_interface.h:53
size_t size
The size of the control packet in bytes.
Definition: ipa_interface.h:56
const uint8_t * data
Pointer to a control packet for the ControlInfoMap.
Definition: ipa_interface.h:55
unsigned int id
Identifier for the ControlInfoMap, defined by the IPA protocol.
Definition: ipa_interface.h:54
ControlList description for the IPA context operations.
Definition: ipa_interface.h:70
unsigned int size
The size of the control packet in bytes.
Definition: ipa_interface.h:72
const uint8_t * data
Pointer to a control packet for the ControlList.
Definition: ipa_interface.h:71
IPA operation data for the IPA context operations.
Definition: ipa_interface.h:75
const struct ipa_control_list * lists
Pointer to an array of ipa_control_list.
Definition: ipa_interface.h:79
unsigned int num_data
Number of entries in the ipa_operation_data::data array.
Definition: ipa_interface.h:78
unsigned int operation
IPA protocol operation.
Definition: ipa_interface.h:76
const uint32_t * data
Pointer to the operation data array.
Definition: ipa_interface.h:77
unsigned int num_lists
Number of entries in the ipa_control_list array.
Definition: ipa_interface.h:80
Camera sensor information for the IPA context operations.
Definition: ipa_interface.h:25
uint64_t pixel_rate
The number of pixel produced in a second.
Definition: ipa_interface.h:42
struct ipa_sensor_info::@5 output_size
The size of the output image.
uint32_t line_length
The full line length, including blanking, in pixel units.
Definition: ipa_interface.h:43
struct ipa_sensor_info::@3 active_area
The camera sensor pixel array active size.
int32_t left
The left coordinate of the analog crop rectangle, relative to the pixel array active area.
Definition: ipa_interface.h:33
uint8_t bits_per_pixel
The camera sensor image format bit depth.
Definition: ipa_interface.h:27
struct ipa_sensor_info::@4 analog_crop
The analog crop rectangle.
uint32_t height
The camera sensor pixel array active area height.
Definition: ipa_interface.h:30
const char * model
The camera sensor model name.
Definition: ipa_interface.h:26
uint32_t width
The camera sensor pixel array active area width.
Definition: ipa_interface.h:29
int32_t top
The top coordinate of the analog crop rectangle, relative to the pixel array active area.
Definition: ipa_interface.h:34
IPA initialization settings for the IPA context operations.
Definition: ipa_interface.h:21
const char * configuration_file
The name of the IPA configuration file (may be null or point to an empty string)
Definition: ipa_interface.h:22
Stream information for the IPA context operations.
Definition: ipa_interface.h:46
unsigned int height
The stream height in pixels.
Definition: ipa_interface.h:50
unsigned int id
Identifier for the stream, defined by the IPA protocol.
Definition: ipa_interface.h:47
unsigned int width
The stream width in pixels.
Definition: ipa_interface.h:49
unsigned int pixel_format
The stream pixel format, as defined by the PixelFormat class.
Definition: ipa_interface.h:48
Report the image sensor characteristics.
Definition: camera_sensor.h:27
Buffer information for the IPA interface.
Definition: ipa_interface.h:137
unsigned int id
The buffer unique ID.
Definition: ipa_interface.h:138
std::vector< FrameBuffer::Plane > planes
The buffer planes description.
Definition: ipa_interface.h:139
Parameters for IPA operations.
Definition: ipa_interface.h:142
std::vector< uint32_t > data
Operation integer data.
Definition: ipa_interface.h:144
std::vector< ControlList > controls
Operation controls data.
Definition: ipa_interface.h:145
unsigned int operation
IPA protocol operation.
Definition: ipa_interface.h:143
IPA interface initialization settings.
Definition: ipa_interface.h:128
std::string configurationFile
The name of the IPA configuration file.
Definition: ipa_interface.h:129
Stream configuration for the IPA interface.
Definition: ipa_interface.h:132
unsigned int pixelFormat
The stream pixel format.
Definition: ipa_interface.h:133
Size size
The stream size in pixels.
Definition: ipa_interface.h:134
Describe a two-dimensional size.
Definition: geometry.h:30