libcamera  v0.0.0
Supporting cameras in Linux since 2019
ipa_interface_wrapper.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 /*
3  * Copyright (C) 2019, Google Inc.
4  *
5  * ipa_interface_wrapper.h - Image Processing Algorithm interface wrapper
6  */
7 #ifndef __LIBCAMERA_IPA_INTERFACE_WRAPPER_H__
8 #define __LIBCAMERA_IPA_INTERFACE_WRAPPER_H__
9 
10 #include <memory>
11 
13 
15 
16 namespace libcamera {
17 
19 {
20 public:
21  IPAInterfaceWrapper(std::unique_ptr<IPAInterface> interface);
22 
23 private:
24  static void destroy(struct ipa_context *ctx);
25  static void *get_interface(struct ipa_context *ctx);
26  static void init(struct ipa_context *ctx,
27  const struct ipa_settings *settings);
28  static int start(struct ipa_context *ctx);
29  static void stop(struct ipa_context *ctx);
30  static void register_callbacks(struct ipa_context *ctx,
31  const struct ipa_callback_ops *callbacks,
32  void *cb_ctx);
33  static void configure(struct ipa_context *ctx,
34  const struct ipa_sensor_info *sensor_info,
35  const struct ipa_stream *streams,
36  unsigned int num_streams,
37  const struct ipa_control_info_map *maps,
38  unsigned int num_maps);
39  static void map_buffers(struct ipa_context *ctx,
40  const struct ipa_buffer *c_buffers,
41  size_t num_buffers);
42  static void unmap_buffers(struct ipa_context *ctx,
43  const unsigned int *ids,
44  size_t num_buffers);
45  static void process_event(struct ipa_context *ctx,
46  const struct ipa_operation_data *data);
47 
48  static const struct ipa_context_ops operations_;
49 
50  void queueFrameAction(unsigned int frame, const IPAOperationData &data);
51 
52  std::unique_ptr<IPAInterface> ipa_;
53  const struct ipa_callback_ops *callbacks_;
54  void *cb_ctx_;
55 
56  ControlSerializer serializer_;
57 };
58 
59 } /* namespace libcamera */
60 
61 #endif /* __LIBCAMERA_IPA_INTERFACE_WRAPPER_H__ */
Serializer and deserializer for control-related classes.
Definition: control_serializer.h:21
Wrap an IPAInterface and expose it as an ipa_context.
Definition: ipa_interface_wrapper.h:19
IPAInterfaceWrapper(std::unique_ptr< IPAInterface > interface)
Construct an IPAInterfaceWrapper wrapping interface.
Definition: ipa_interface_wrapper.cpp:61
Serialization and deserialization helpers for controls.
Image Processing Algorithm interface.
Buffer information for the IPA context operations.
Definition: ipa_interface.h:64
IPA context operations as a set of function pointers.
Definition: ipa_interface.h:83
IPA context operations as a set of function pointers.
Definition: ipa_interface.h:88
IPA module context of execution.
Definition: ipa_interface.h:17
ControlInfoMap description for the IPA context operations.
Definition: ipa_interface.h:53
IPA operation data for the IPA context operations.
Definition: ipa_interface.h:75
Camera sensor information for the IPA context operations.
Definition: ipa_interface.h:25
IPA initialization settings for the IPA context operations.
Definition: ipa_interface.h:21
Stream information for the IPA context operations.
Definition: ipa_interface.h:46
Parameters for IPA operations.
Definition: ipa_interface.h:142