summaryrefslogtreecommitdiff
path: root/include/ipa
diff options
context:
space:
mode:
Diffstat (limited to 'include/ipa')
-rw-r--r--include/ipa/ipa_controls.h47
-rw-r--r--include/ipa/ipa_interface.h173
-rw-r--r--include/ipa/ipa_module_info.h29
-rw-r--r--include/ipa/ipa_vimc.h24
-rw-r--r--include/ipa/meson.build10
-rw-r--r--include/ipa/raspberrypi.h58
-rw-r--r--include/ipa/rkisp1.h18
7 files changed, 0 insertions, 359 deletions
diff --git a/include/ipa/ipa_controls.h b/include/ipa/ipa_controls.h
deleted file mode 100644
index 6d3bf279..00000000
--- a/include/ipa/ipa_controls.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1-or-later */
-/*
- * Copyright (C) 2019, Google Inc.
- *
- * ipa_controls.h - IPA Control handling
- */
-#ifndef __LIBCAMERA_IPA_CONTROLS_H__
-#define __LIBCAMERA_IPA_CONTROLS_H__
-
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define IPA_CONTROLS_FORMAT_VERSION 1
-
-struct ipa_controls_header {
- uint32_t version;
- uint32_t handle;
- uint32_t entries;
- uint32_t size;
- uint32_t data_offset;
- uint32_t reserved[3];
-};
-
-struct ipa_control_value_entry {
- uint32_t id;
- uint8_t type;
- uint8_t is_array;
- uint16_t count;
- uint32_t offset;
- uint32_t padding[1];
-};
-
-struct ipa_control_info_entry {
- uint32_t id;
- uint32_t type;
- uint32_t offset;
- uint32_t padding[1];
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __LIBCAMERA_IPA_CONTROLS_H__ */
diff --git a/include/ipa/ipa_interface.h b/include/ipa/ipa_interface.h
deleted file mode 100644
index dc9fc714..00000000
--- a/include/ipa/ipa_interface.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1-or-later */
-/*
- * Copyright (C) 2019, Google Inc.
- *
- * ipa_interface.h - Image Processing Algorithm interface
- */
-#ifndef __LIBCAMERA_IPA_INTERFACE_H__
-#define __LIBCAMERA_IPA_INTERFACE_H__
-
-#include <stddef.h>
-#include <stdint.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct ipa_context {
- const struct ipa_context_ops *ops;
-};
-
-struct ipa_settings {
- const char *configuration_file;
-};
-
-struct ipa_sensor_info {
- const char *model;
- uint8_t bits_per_pixel;
- struct {
- uint32_t width;
- uint32_t height;
- } active_area;
- struct {
- int32_t left;
- int32_t top;
- uint32_t width;
- uint32_t height;
- } analog_crop;
- struct {
- uint32_t width;
- uint32_t height;
- } output_size;
- uint64_t pixel_rate;
- uint32_t line_length;
-};
-
-struct ipa_stream {
- unsigned int id;
- unsigned int pixel_format;
- unsigned int width;
- unsigned int height;
-};
-
-struct ipa_control_info_map {
- unsigned int id;
- const uint8_t *data;
- size_t size;
-};
-
-struct ipa_buffer_plane {
- int dmabuf;
- size_t length;
-};
-
-struct ipa_buffer {
- unsigned int id;
- unsigned int num_planes;
- struct ipa_buffer_plane planes[3];
-};
-
-struct ipa_control_list {
- const uint8_t *data;
- unsigned int size;
-};
-
-struct ipa_operation_data {
- unsigned int operation;
- const uint32_t *data;
- unsigned int num_data;
- const struct ipa_control_list *lists;
- unsigned int num_lists;
-};
-
-struct ipa_callback_ops {
- void (*queue_frame_action)(void *cb_ctx, unsigned int frame,
- struct ipa_operation_data &data);
-};
-
-struct ipa_context_ops {
- void (*destroy)(struct ipa_context *ctx);
- void *(*get_interface)(struct ipa_context *ctx);
- void (*init)(struct ipa_context *ctx,
- const struct ipa_settings *settings);
- int (*start)(struct ipa_context *ctx);
- void (*stop)(struct ipa_context *ctx);
- void (*register_callbacks)(struct ipa_context *ctx,
- const struct ipa_callback_ops *callbacks,
- void *cb_ctx);
- 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);
- void (*map_buffers)(struct ipa_context *ctx,
- const struct ipa_buffer *buffers,
- size_t num_buffers);
- void (*unmap_buffers)(struct ipa_context *ctx, const unsigned int *ids,
- size_t num_buffers);
- void (*process_event)(struct ipa_context *ctx,
- const struct ipa_operation_data *data);
-};
-
-struct ipa_context *ipaCreate();
-
-#ifdef __cplusplus
-}
-
-#include <map>
-#include <vector>
-
-#include <libcamera/buffer.h>
-#include <libcamera/controls.h>
-#include <libcamera/geometry.h>
-#include <libcamera/signal.h>
-
-namespace libcamera {
-
-struct IPASettings {
- std::string configurationFile;
-};
-
-struct IPAStream {
- unsigned int pixelFormat;
- Size size;
-};
-
-struct IPABuffer {
- unsigned int id;
- std::vector<FrameBuffer::Plane> planes;
-};
-
-struct IPAOperationData {
- unsigned int operation;
- std::vector<uint32_t> data;
- std::vector<ControlList> controls;
-};
-
-struct CameraSensorInfo;
-
-class IPAInterface
-{
-public:
- virtual ~IPAInterface() {}
-
- virtual int init(const IPASettings &settings) = 0;
- virtual int start() = 0;
- virtual void stop() = 0;
-
- virtual void configure(const CameraSensorInfo &sensorInfo,
- const std::map<unsigned int, IPAStream> &streamConfig,
- const std::map<unsigned int, const ControlInfoMap &> &entityControls) = 0;
-
- virtual void mapBuffers(const std::vector<IPABuffer> &buffers) = 0;
- virtual void unmapBuffers(const std::vector<unsigned int> &ids) = 0;
-
- virtual void processEvent(const IPAOperationData &data) = 0;
- Signal<unsigned int, const IPAOperationData &> queueFrameAction;
-};
-
-} /* namespace libcamera */
-#endif
-
-#endif /* __LIBCAMERA_IPA_INTERFACE_H__ */
diff --git a/include/ipa/ipa_module_info.h b/include/ipa/ipa_module_info.h
deleted file mode 100644
index 3b1c37d2..00000000
--- a/include/ipa/ipa_module_info.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1-or-later */
-/*
- * Copyright (C) 2019, Google Inc.
- *
- * ipa_module_info.h - Image Processing Algorithm module information
- */
-#ifndef __LIBCAMERA_IPA_MODULE_INFO_H__
-#define __LIBCAMERA_IPA_MODULE_INFO_H__
-
-#include <stdint.h>
-
-#define IPA_MODULE_API_VERSION 1
-
-namespace libcamera {
-
-struct IPAModuleInfo {
- int moduleAPIVersion;
- uint32_t pipelineVersion;
- char pipelineName[256];
- char name[256];
-} __attribute__((packed));
-
-extern "C" {
-extern const struct IPAModuleInfo ipaModuleInfo;
-}
-
-} /* namespace libcamera */
-
-#endif /* __LIBCAMERA_IPA_MODULE_INFO_H__ */
diff --git a/include/ipa/ipa_vimc.h b/include/ipa/ipa_vimc.h
deleted file mode 100644
index 8e82dd94..00000000
--- a/include/ipa/ipa_vimc.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1-or-later */
-/*
- * Copyright (C) 2019, Google Inc.
- *
- * ipa_vimc.h - Vimc Image Processing Algorithm module
- */
-
-#ifndef __LIBCAMERA_IPA_VIMC_H__
-#define __LIBCAMERA_IPA_VIMC_H__
-
-namespace libcamera {
-
-#define VIMC_IPA_FIFO_PATH "/tmp/libcamera_ipa_vimc_fifo"
-
-enum IPAOperationCode {
- IPAOperationNone,
- IPAOperationInit,
- IPAOperationStart,
- IPAOperationStop,
-};
-
-} /* namespace libcamera */
-
-#endif /* __LIBCAMERA_IPA_VIMC_H__ */
diff --git a/include/ipa/meson.build b/include/ipa/meson.build
deleted file mode 100644
index 3d5c0dd6..00000000
--- a/include/ipa/meson.build
+++ /dev/null
@@ -1,10 +0,0 @@
-# SPDX-License-Identifier: CC0-1.0
-
-libcamera_ipa_api = files([
- 'ipa_controls.h',
- 'ipa_interface.h',
- 'ipa_module_info.h',
-])
-
-install_headers(libcamera_ipa_api,
- subdir: join_paths(libcamera_include_dir, 'ipa'))
diff --git a/include/ipa/raspberrypi.h b/include/ipa/raspberrypi.h
deleted file mode 100644
index c109469e..00000000
--- a/include/ipa/raspberrypi.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1-or-later */
-/*
- * Copyright (C) 2019-2020, Raspberry Pi Ltd.
- *
- * raspberrypi.h - Image Processing Algorithm interface for Raspberry Pi
- */
-#ifndef __LIBCAMERA_IPA_INTERFACE_RASPBERRYPI_H__
-#define __LIBCAMERA_IPA_INTERFACE_RASPBERRYPI_H__
-
-#include <libcamera/control_ids.h>
-#include <libcamera/controls.h>
-
-enum RPiOperations {
- RPI_IPA_ACTION_V4L2_SET_STAGGERED = 1,
- RPI_IPA_ACTION_V4L2_SET_ISP,
- RPI_IPA_ACTION_STATS_METADATA_COMPLETE,
- RPI_IPA_ACTION_RUN_ISP,
- RPI_IPA_ACTION_RUN_ISP_AND_DROP_FRAME,
- RPI_IPA_ACTION_SET_SENSOR_CONFIG,
- RPI_IPA_ACTION_EMBEDDED_COMPLETE,
- RPI_IPA_EVENT_SIGNAL_STAT_READY,
- RPI_IPA_EVENT_SIGNAL_ISP_PREPARE,
- RPI_IPA_EVENT_QUEUE_REQUEST,
- RPI_IPA_EVENT_LS_TABLE_ALLOCATION,
-};
-
-enum RPiIpaMask {
- ID = 0x0ffff,
- STATS = 0x10000,
- EMBEDDED_DATA = 0x20000,
- BAYER_DATA = 0x40000
-};
-
-/* Size of the LS grid allocation. */
-#define MAX_LS_GRID_SIZE (32 << 10)
-
-namespace libcamera {
-
-/* List of controls handled by the Raspberry Pi IPA */
-static const ControlInfoMap RPiControls = {
- { &controls::AeEnable, ControlInfo(false, true) },
- { &controls::ExposureTime, ControlInfo(0, 999999) },
- { &controls::AnalogueGain, ControlInfo(1.0f, 32.0f) },
- { &controls::AeMeteringMode, ControlInfo(0, static_cast<int32_t>(controls::MeteringModeMax)) },
- { &controls::AeConstraintMode, ControlInfo(0, static_cast<int32_t>(controls::ConstraintModeMax)) },
- { &controls::AeExposureMode, ControlInfo(0, static_cast<int32_t>(controls::ExposureModeMax)) },
- { &controls::ExposureValue, ControlInfo(0.0f, 16.0f) },
- { &controls::AwbEnable, ControlInfo(false, true) },
- { &controls::ColourGains, ControlInfo(0.0f, 32.0f) },
- { &controls::AwbMode, ControlInfo(0, static_cast<int32_t>(controls::AwbModeMax)) },
- { &controls::Brightness, ControlInfo(-1.0f, 1.0f) },
- { &controls::Contrast, ControlInfo(0.0f, 32.0f) },
- { &controls::Saturation, ControlInfo(0.0f, 32.0f) },
-};
-
-} /* namespace libcamera */
-
-#endif /* __LIBCAMERA_IPA_INTERFACE_RASPBERRYPI_H__ */
diff --git a/include/ipa/rkisp1.h b/include/ipa/rkisp1.h
deleted file mode 100644
index 4fe0482b..00000000
--- a/include/ipa/rkisp1.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* SPDX-License-Identifier: LGPL-2.1-or-later */
-/*
- * Copyright (C) 2019, Google Inc.
- *
- * rkisp1.h - Image Processing Algorithm interface for RkISP1
- */
-#ifndef __LIBCAMERA_IPA_INTERFACE_RKISP1_H__
-#define __LIBCAMERA_IPA_INTERFACE_RKISP1_H__
-
-enum RkISP1Operations {
- RKISP1_IPA_ACTION_V4L2_SET = 1,
- RKISP1_IPA_ACTION_PARAM_FILLED = 2,
- RKISP1_IPA_ACTION_METADATA = 3,
- RKISP1_IPA_EVENT_SIGNAL_STAT_BUFFER = 4,
- RKISP1_IPA_EVENT_QUEUE_REQUEST = 5,
-};
-
-#endif /* __LIBCAMERA_IPA_INTERFACE_RKISP1_H__ */