summaryrefslogtreecommitdiff
path: root/include/libcamera
diff options
context:
space:
mode:
Diffstat (limited to 'include/libcamera')
-rw-r--r--include/libcamera/base/backtrace.h2
-rw-r--r--include/libcamera/base/bound_method.h2
-rw-r--r--include/libcamera/base/class.h2
-rw-r--r--include/libcamera/base/compiler.h2
-rw-r--r--include/libcamera/base/event_dispatcher.h2
-rw-r--r--include/libcamera/base/event_dispatcher_poll.h2
-rw-r--r--include/libcamera/base/event_notifier.h2
-rw-r--r--include/libcamera/base/file.h2
-rw-r--r--include/libcamera/base/flags.h2
-rw-r--r--include/libcamera/base/log.h2
-rw-r--r--include/libcamera/base/message.h2
-rw-r--r--include/libcamera/base/mutex.h2
-rw-r--r--include/libcamera/base/object.h2
-rw-r--r--include/libcamera/base/private.h2
-rw-r--r--include/libcamera/base/semaphore.h2
-rw-r--r--include/libcamera/base/shared_fd.h2
-rw-r--r--include/libcamera/base/signal.h2
-rw-r--r--include/libcamera/base/span.h2
-rw-r--r--include/libcamera/base/thread.h2
-rw-r--r--include/libcamera/base/thread_annotations.h2
-rw-r--r--include/libcamera/base/timer.h2
-rw-r--r--include/libcamera/base/unique_fd.h2
-rw-r--r--include/libcamera/base/utils.h2
-rw-r--r--include/libcamera/camera.h2
-rw-r--r--include/libcamera/camera_manager.h2
-rw-r--r--include/libcamera/color_space.h2
-rw-r--r--include/libcamera/control_ids.h.in4
-rw-r--r--include/libcamera/controls.h2
-rw-r--r--include/libcamera/fence.h2
-rw-r--r--include/libcamera/formats.h.in2
-rw-r--r--include/libcamera/framebuffer.h2
-rw-r--r--include/libcamera/framebuffer_allocator.h2
-rw-r--r--include/libcamera/geometry.h2
-rw-r--r--include/libcamera/internal/bayer_format.h4
-rw-r--r--include/libcamera/internal/byte_stream_buffer.h2
-rw-r--r--include/libcamera/internal/camera.h2
-rw-r--r--include/libcamera/internal/camera_controls.h2
-rw-r--r--include/libcamera/internal/camera_lens.h2
-rw-r--r--include/libcamera/internal/camera_manager.h3
-rw-r--r--include/libcamera/internal/camera_sensor.h2
-rw-r--r--include/libcamera/internal/camera_sensor_properties.h2
-rw-r--r--include/libcamera/internal/control_serializer.h2
-rw-r--r--include/libcamera/internal/control_validator.h2
-rw-r--r--include/libcamera/internal/converter.h2
-rw-r--r--include/libcamera/internal/converter/converter_v4l2_m2m.h4
-rw-r--r--include/libcamera/internal/delayed_controls.h2
-rw-r--r--include/libcamera/internal/device_enumerator.h2
-rw-r--r--include/libcamera/internal/device_enumerator_sysfs.h2
-rw-r--r--include/libcamera/internal/device_enumerator_udev.h2
-rw-r--r--include/libcamera/internal/dma_buf_allocator.h42
-rw-r--r--include/libcamera/internal/formats.h2
-rw-r--r--include/libcamera/internal/framebuffer.h2
-rw-r--r--include/libcamera/internal/ipa_data_serializer.h2
-rw-r--r--include/libcamera/internal/ipa_manager.h2
-rw-r--r--include/libcamera/internal/ipa_module.h2
-rw-r--r--include/libcamera/internal/ipa_proxy.h2
-rw-r--r--include/libcamera/internal/ipc_pipe.h2
-rw-r--r--include/libcamera/internal/ipc_pipe_unixsocket.h2
-rw-r--r--include/libcamera/internal/ipc_unixsocket.h2
-rw-r--r--include/libcamera/internal/mapped_framebuffer.h2
-rw-r--r--include/libcamera/internal/media_device.h2
-rw-r--r--include/libcamera/internal/media_object.h2
-rw-r--r--include/libcamera/internal/meson.build3
-rw-r--r--include/libcamera/internal/pipeline_handler.h7
-rw-r--r--include/libcamera/internal/process.h2
-rw-r--r--include/libcamera/internal/pub_key.h2
-rw-r--r--include/libcamera/internal/request.h2
-rw-r--r--include/libcamera/internal/shared_mem_object.h127
-rw-r--r--include/libcamera/internal/software_isp/debayer_params.h28
-rw-r--r--include/libcamera/internal/software_isp/meson.build7
-rw-r--r--include/libcamera/internal/software_isp/software_isp.h99
-rw-r--r--include/libcamera/internal/software_isp/swisp_stats.h49
-rw-r--r--include/libcamera/internal/source_paths.h2
-rw-r--r--include/libcamera/internal/sysfs.h2
-rw-r--r--include/libcamera/internal/tracepoints.h.in2
-rw-r--r--include/libcamera/internal/v4l2_device.h2
-rw-r--r--include/libcamera/internal/v4l2_pixelformat.h2
-rw-r--r--include/libcamera/internal/v4l2_subdevice.h5
-rw-r--r--include/libcamera/internal/v4l2_videodevice.h2
-rw-r--r--include/libcamera/internal/yaml_parser.h35
-rw-r--r--include/libcamera/ipa/ipa_controls.h2
-rw-r--r--include/libcamera/ipa/ipa_interface.h2
-rw-r--r--include/libcamera/ipa/ipa_module_info.h2
-rw-r--r--include/libcamera/ipa/meson.build1
-rw-r--r--include/libcamera/ipa/soft.mojom28
-rw-r--r--include/libcamera/logging.h2
-rw-r--r--include/libcamera/orientation.h2
-rw-r--r--include/libcamera/pixel_format.h2
-rw-r--r--include/libcamera/property_ids.h.in4
-rw-r--r--include/libcamera/request.h2
-rw-r--r--include/libcamera/stream.h2
-rw-r--r--include/libcamera/transform.h2
-rw-r--r--include/libcamera/version.h.in2
93 files changed, 496 insertions, 106 deletions
diff --git a/include/libcamera/base/backtrace.h b/include/libcamera/base/backtrace.h
index 752034d1..699ddd9e 100644
--- a/include/libcamera/base/backtrace.h
+++ b/include/libcamera/base/backtrace.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Ideas on Board Oy
*
- * backtrace.h - Call stack backtraces
+ * Call stack backtraces
*/
#pragma once
diff --git a/include/libcamera/base/bound_method.h b/include/libcamera/base/bound_method.h
index c0275249..dd3488ee 100644
--- a/include/libcamera/base/bound_method.h
+++ b/include/libcamera/base/bound_method.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * bound_method.h - Method bind and invocation
+ * Method bind and invocation
*/
#pragma once
diff --git a/include/libcamera/base/class.h b/include/libcamera/base/class.h
index 571eecf4..a808422e 100644
--- a/include/libcamera/base/class.h
+++ b/include/libcamera/base/class.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * class.h - Utilities and helpers for classes
+ * Utilities and helpers for classes
*/
#pragma once
diff --git a/include/libcamera/base/compiler.h b/include/libcamera/base/compiler.h
index 02564f2f..fda8fdfd 100644
--- a/include/libcamera/base/compiler.h
+++ b/include/libcamera/base/compiler.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * compiler.h - Compiler support
+ * Compiler support
*/
#pragma once
diff --git a/include/libcamera/base/event_dispatcher.h b/include/libcamera/base/event_dispatcher.h
index 184f1b12..e9a09c6e 100644
--- a/include/libcamera/base/event_dispatcher.h
+++ b/include/libcamera/base/event_dispatcher.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * event_dispatcher.h - Event dispatcher
+ * Event dispatcher
*/
#pragma once
diff --git a/include/libcamera/base/event_dispatcher_poll.h b/include/libcamera/base/event_dispatcher_poll.h
index b7840309..1f7e05cf 100644
--- a/include/libcamera/base/event_dispatcher_poll.h
+++ b/include/libcamera/base/event_dispatcher_poll.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * event_dispatcher_poll.h - Poll-based event dispatcher
+ * Poll-based event dispatcher
*/
#pragma once
diff --git a/include/libcamera/base/event_notifier.h b/include/libcamera/base/event_notifier.h
index e5c0594d..158f2d44 100644
--- a/include/libcamera/base/event_notifier.h
+++ b/include/libcamera/base/event_notifier.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * event_notifier.h - File descriptor event notifier
+ * File descriptor event notifier
*/
#pragma once
diff --git a/include/libcamera/base/file.h b/include/libcamera/base/file.h
index 0cdc2ed0..5637934c 100644
--- a/include/libcamera/base/file.h
+++ b/include/libcamera/base/file.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * file.h - File I/O operations
+ * File I/O operations
*/
#pragma once
diff --git a/include/libcamera/base/flags.h b/include/libcamera/base/flags.h
index a1b404bd..af4f6e35 100644
--- a/include/libcamera/base/flags.h
+++ b/include/libcamera/base/flags.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * flags.h - Type-safe enum-based bitfields
+ * Type-safe enum-based bitfields
*/
#pragma once
diff --git a/include/libcamera/base/log.h b/include/libcamera/base/log.h
index dcaacbe0..b5775e49 100644
--- a/include/libcamera/base/log.h
+++ b/include/libcamera/base/log.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018, Google Inc.
*
- * log.h - Logging infrastructure
+ * Logging infrastructure
*/
#pragma once
diff --git a/include/libcamera/base/message.h b/include/libcamera/base/message.h
index b939af6f..4b232031 100644
--- a/include/libcamera/base/message.h
+++ b/include/libcamera/base/message.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * message.h - Message queue support
+ * Message queue support
*/
#pragma once
diff --git a/include/libcamera/base/mutex.h b/include/libcamera/base/mutex.h
index 52441c55..fa9a8d0d 100644
--- a/include/libcamera/base/mutex.h
+++ b/include/libcamera/base/mutex.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * mutex.h - Mutex classes with clang thread safety annotation
+ * Mutex classes with clang thread safety annotation
*/
#pragma once
diff --git a/include/libcamera/base/object.h b/include/libcamera/base/object.h
index cb7e0a13..508773cd 100644
--- a/include/libcamera/base/object.h
+++ b/include/libcamera/base/object.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * object.h - Base object
+ * Base object
*/
#pragma once
diff --git a/include/libcamera/base/private.h b/include/libcamera/base/private.h
index 163012bf..8670c40b 100644
--- a/include/libcamera/base/private.h
+++ b/include/libcamera/base/private.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * private.h - Private Header Validation
+ * Private Header Validation
*
* A selection of internal libcamera headers are installed as part
* of the libcamera package to allow sharing of a select subset of
diff --git a/include/libcamera/base/semaphore.h b/include/libcamera/base/semaphore.h
index f1052317..59d4aa44 100644
--- a/include/libcamera/base/semaphore.h
+++ b/include/libcamera/base/semaphore.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * semaphore.h - General-purpose counting semaphore
+ * General-purpose counting semaphore
*/
#pragma once
diff --git a/include/libcamera/base/shared_fd.h b/include/libcamera/base/shared_fd.h
index e53a8b88..61fe11c1 100644
--- a/include/libcamera/base/shared_fd.h
+++ b/include/libcamera/base/shared_fd.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * shared_fd.h - File descriptor wrapper with shared ownership
+ * File descriptor wrapper with shared ownership
*/
#pragma once
diff --git a/include/libcamera/base/signal.h b/include/libcamera/base/signal.h
index 444997b4..849fbbda 100644
--- a/include/libcamera/base/signal.h
+++ b/include/libcamera/base/signal.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * signal.h - Signal & slot implementation
+ * Signal & slot implementation
*/
#pragma once
diff --git a/include/libcamera/base/span.h b/include/libcamera/base/span.h
index 88d2e3de..c3e63f69 100644
--- a/include/libcamera/base/span.h
+++ b/include/libcamera/base/span.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * span.h - C++20 std::span<> implementation for C++11
+ * C++20 std::span<> implementation for C++11
*/
#pragma once
diff --git a/include/libcamera/base/thread.h b/include/libcamera/base/thread.h
index 9d00f102..4f33de63 100644
--- a/include/libcamera/base/thread.h
+++ b/include/libcamera/base/thread.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * thread.h - Thread support
+ * Thread support
*/
#pragma once
diff --git a/include/libcamera/base/thread_annotations.h b/include/libcamera/base/thread_annotations.h
index 25b3c7b6..81930f08 100644
--- a/include/libcamera/base/thread_annotations.h
+++ b/include/libcamera/base/thread_annotations.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * thread_annotation.h - Macro of Clang thread safety analysis
+ * Macro of Clang thread safety analysis
*/
#pragma once
diff --git a/include/libcamera/base/timer.h b/include/libcamera/base/timer.h
index 759b68ad..5ef45959 100644
--- a/include/libcamera/base/timer.h
+++ b/include/libcamera/base/timer.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * timer.h - Generic timer
+ * Generic timer
*/
#pragma once
diff --git a/include/libcamera/base/unique_fd.h b/include/libcamera/base/unique_fd.h
index ae4d96b7..c9a3b5d0 100644
--- a/include/libcamera/base/unique_fd.h
+++ b/include/libcamera/base/unique_fd.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * unique_fd.h - File descriptor wrapper that owns a file descriptor.
+ * File descriptor wrapper that owns a file descriptor.
*/
#pragma once
diff --git a/include/libcamera/base/utils.h b/include/libcamera/base/utils.h
index 922e4dfa..4ae02dc9 100644
--- a/include/libcamera/base/utils.h
+++ b/include/libcamera/base/utils.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018, Google Inc.
*
- * utils.h - Miscellaneous utility functions
+ * Miscellaneous utility functions
*/
#pragma once
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
index ae35792d..94cee7bd 100644
--- a/include/libcamera/camera.h
+++ b/include/libcamera/camera.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018, Google Inc.
*
- * camera.h - Camera object interface
+ * Camera object interface
*/
#pragma once
diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h
index 1a891cac..b50df782 100644
--- a/include/libcamera/camera_manager.h
+++ b/include/libcamera/camera_manager.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018, Google Inc.
*
- * camera_manager.h - Camera management
+ * Camera management
*/
#pragma once
diff --git a/include/libcamera/color_space.h b/include/libcamera/color_space.h
index 6d6c2829..7b483cd1 100644
--- a/include/libcamera/color_space.h
+++ b/include/libcamera/color_space.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Raspberry Pi Ltd
*
- * color_space.h - color space definitions
+ * color space definitions
*/
#pragma once
diff --git a/include/libcamera/control_ids.h.in b/include/libcamera/control_ids.h.in
index d53b1cf7..293ba966 100644
--- a/include/libcamera/control_ids.h.in
+++ b/include/libcamera/control_ids.h.in
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * control_ids.h - Control ID list
+ * Control ID list
*
* This file is auto-generated. Do not edit.
*/
@@ -10,7 +10,9 @@
#pragma once
#include <array>
+#include <map>
#include <stdint.h>
+#include <string>
#include <libcamera/controls.h>
diff --git a/include/libcamera/controls.h b/include/libcamera/controls.h
index 82b95599..7c2bb287 100644
--- a/include/libcamera/controls.h
+++ b/include/libcamera/controls.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * controls.h - Control handling
+ * Control handling
*/
#pragma once
diff --git a/include/libcamera/fence.h b/include/libcamera/fence.h
index c0c916c2..598336cb 100644
--- a/include/libcamera/fence.h
+++ b/include/libcamera/fence.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * internal/fence.h - Synchronization fence
+ * Synchronization fence
*/
#pragma once
diff --git a/include/libcamera/formats.h.in b/include/libcamera/formats.h.in
index ead5287d..6ae7634f 100644
--- a/include/libcamera/formats.h.in
+++ b/include/libcamera/formats.h.in
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * formats.h - Formats
+ * Formats
*
* This file is auto-generated. Do not edit.
*/
diff --git a/include/libcamera/framebuffer.h b/include/libcamera/framebuffer.h
index 61244829..5ae2270b 100644
--- a/include/libcamera/framebuffer.h
+++ b/include/libcamera/framebuffer.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * framebuffer.h - Frame buffer handling
+ * Frame buffer handling
*/
#pragma once
diff --git a/include/libcamera/framebuffer_allocator.h b/include/libcamera/framebuffer_allocator.h
index 45ff232b..f3896bf2 100644
--- a/include/libcamera/framebuffer_allocator.h
+++ b/include/libcamera/framebuffer_allocator.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * framebuffer_allocator.h - FrameBuffer allocator
+ * FrameBuffer allocator
*/
#pragma once
diff --git a/include/libcamera/geometry.h b/include/libcamera/geometry.h
index d7fdbe70..3e6f0f5d 100644
--- a/include/libcamera/geometry.h
+++ b/include/libcamera/geometry.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * geometry.h - Geometry-related classes
+ * Geometry-related classes
*/
#pragma once
diff --git a/include/libcamera/internal/bayer_format.h b/include/libcamera/internal/bayer_format.h
index 78ba3969..5c14bb5f 100644
--- a/include/libcamera/internal/bayer_format.h
+++ b/include/libcamera/internal/bayer_format.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Raspberry Pi Ltd
*
- * bayer_format.h - Bayer Pixel Format
+ * Bayer Pixel Format
*/
#pragma once
@@ -34,6 +34,8 @@ public:
None = 0,
CSI2 = 1,
IPU3 = 2,
+ PISP1 = 3,
+ PISP2 = 4,
};
constexpr BayerFormat()
diff --git a/include/libcamera/internal/byte_stream_buffer.h b/include/libcamera/internal/byte_stream_buffer.h
index 0f4fce6f..5b1c10ab 100644
--- a/include/libcamera/internal/byte_stream_buffer.h
+++ b/include/libcamera/internal/byte_stream_buffer.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * byte_stream_buffer.h - Byte stream buffer
+ * Byte stream buffer
*/
#pragma once
diff --git a/include/libcamera/internal/camera.h b/include/libcamera/internal/camera.h
index 38dd94ff..0add0428 100644
--- a/include/libcamera/internal/camera.h
+++ b/include/libcamera/internal/camera.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * camera.h - Camera private data
+ * Camera private data
*/
#pragma once
diff --git a/include/libcamera/internal/camera_controls.h b/include/libcamera/internal/camera_controls.h
index ee6d382f..4a5a3ebc 100644
--- a/include/libcamera/internal/camera_controls.h
+++ b/include/libcamera/internal/camera_controls.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * camera_controls.h - Camera controls
+ * Camera controls
*/
#pragma once
diff --git a/include/libcamera/internal/camera_lens.h b/include/libcamera/internal/camera_lens.h
index 277417da..5a4b993b 100644
--- a/include/libcamera/internal/camera_lens.h
+++ b/include/libcamera/internal/camera_lens.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * camera_lens.h - A camera lens controller
+ * A camera lens controller
*/
#pragma once
diff --git a/include/libcamera/internal/camera_manager.h b/include/libcamera/internal/camera_manager.h
index 33ebe069..af9ed60a 100644
--- a/include/libcamera/internal/camera_manager.h
+++ b/include/libcamera/internal/camera_manager.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2023, Ideas on Board Oy.
*
- * camera_manager.h - Camera manager private data
+ * Camera manager private data
*/
#pragma once
@@ -44,6 +44,7 @@ protected:
private:
int init();
void createPipelineHandlers();
+ void pipelineFactoryMatch(const PipelineHandlerFactoryBase *factory);
void cleanup() LIBCAMERA_TSA_EXCLUDES(mutex_);
/*
diff --git a/include/libcamera/internal/camera_sensor.h b/include/libcamera/internal/camera_sensor.h
index d05f48eb..fc44ab98 100644
--- a/include/libcamera/internal/camera_sensor.h
+++ b/include/libcamera/internal/camera_sensor.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * camera_sensor.h - A camera sensor
+ * A camera sensor
*/
#pragma once
diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h
index 1ee3cb99..480ac121 100644
--- a/include/libcamera/internal/camera_sensor_properties.h
+++ b/include/libcamera/internal/camera_sensor_properties.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * camera_sensor_properties.h - Database of camera sensor properties
+ * Database of camera sensor properties
*/
#pragma once
diff --git a/include/libcamera/internal/control_serializer.h b/include/libcamera/internal/control_serializer.h
index a38ca6b0..8a63ae44 100644
--- a/include/libcamera/internal/control_serializer.h
+++ b/include/libcamera/internal/control_serializer.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * control_serializer.h - Control (de)serializer
+ * Control (de)serializer
*/
#pragma once
diff --git a/include/libcamera/internal/control_validator.h b/include/libcamera/internal/control_validator.h
index 26412d8b..260602f2 100644
--- a/include/libcamera/internal/control_validator.h
+++ b/include/libcamera/internal/control_validator.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * control_validator.h - Control validator
+ * Control validator
*/
#pragma once
diff --git a/include/libcamera/internal/converter.h b/include/libcamera/internal/converter.h
index 834ec5ab..5d74db6b 100644
--- a/include/libcamera/internal/converter.h
+++ b/include/libcamera/internal/converter.h
@@ -3,7 +3,7 @@
* Copyright (C) 2020, Laurent Pinchart
* Copyright 2022 NXP
*
- * converter.h - Generic format converter interface
+ * Generic format converter interface
*/
#pragma once
diff --git a/include/libcamera/internal/converter/converter_v4l2_m2m.h b/include/libcamera/internal/converter/converter_v4l2_m2m.h
index 815916d0..1126050c 100644
--- a/include/libcamera/internal/converter/converter_v4l2_m2m.h
+++ b/include/libcamera/internal/converter/converter_v4l2_m2m.h
@@ -3,7 +3,7 @@
* Copyright (C) 2020, Laurent Pinchart
* Copyright 2022 NXP
*
- * converter_v4l2_m2m.h - V4l2 M2M Format converter interface
+ * V4l2 M2M Format converter interface
*/
#pragma once
@@ -47,7 +47,7 @@ public:
int configure(const StreamConfiguration &inputCfg,
const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfg);
- int exportBuffers(unsigned int ouput, unsigned int count,
+ int exportBuffers(unsigned int output, unsigned int count,
std::vector<std::unique_ptr<FrameBuffer>> *buffers);
int start();
diff --git a/include/libcamera/internal/delayed_controls.h b/include/libcamera/internal/delayed_controls.h
index aef37077..e8d3014d 100644
--- a/include/libcamera/internal/delayed_controls.h
+++ b/include/libcamera/internal/delayed_controls.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Raspberry Pi Ltd
*
- * delayed_controls.h - Helper to deal with controls that take effect with a delay
+ * Helper to deal with controls that take effect with a delay
*/
#pragma once
diff --git a/include/libcamera/internal/device_enumerator.h b/include/libcamera/internal/device_enumerator.h
index 72ec9a60..db3532a9 100644
--- a/include/libcamera/internal/device_enumerator.h
+++ b/include/libcamera/internal/device_enumerator.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018, Google Inc.
*
- * device_enumerator.h - API to enumerate and find media devices
+ * API to enumerate and find media devices
*/
#pragma once
diff --git a/include/libcamera/internal/device_enumerator_sysfs.h b/include/libcamera/internal/device_enumerator_sysfs.h
index 3e84b83f..a5bfc711 100644
--- a/include/libcamera/internal/device_enumerator_sysfs.h
+++ b/include/libcamera/internal/device_enumerator_sysfs.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * device_enumerator_sysfs.h - sysfs-based device enumerator
+ * sysfs-based device enumerator
*/
#pragma once
diff --git a/include/libcamera/internal/device_enumerator_udev.h b/include/libcamera/internal/device_enumerator_udev.h
index 1b3360df..1378c190 100644
--- a/include/libcamera/internal/device_enumerator_udev.h
+++ b/include/libcamera/internal/device_enumerator_udev.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018-2019, Google Inc.
*
- * device_enumerator_udev.h - udev-based device enumerator
+ * udev-based device enumerator
*/
#pragma once
diff --git a/include/libcamera/internal/dma_buf_allocator.h b/include/libcamera/internal/dma_buf_allocator.h
new file mode 100644
index 00000000..36ec1696
--- /dev/null
+++ b/include/libcamera/internal/dma_buf_allocator.h
@@ -0,0 +1,42 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2020, Raspberry Pi Ltd
+ *
+ * Helper class for dma-buf allocations.
+ */
+
+#pragma once
+
+#include <stddef.h>
+
+#include <libcamera/base/flags.h>
+#include <libcamera/base/unique_fd.h>
+
+namespace libcamera {
+
+class DmaBufAllocator
+{
+public:
+ enum class DmaBufAllocatorFlag {
+ CmaHeap = 1 << 0,
+ SystemHeap = 1 << 1,
+ UDmaBuf = 1 << 2,
+ };
+
+ using DmaBufAllocatorFlags = Flags<DmaBufAllocatorFlag>;
+
+ DmaBufAllocator(DmaBufAllocatorFlags flags = DmaBufAllocatorFlag::CmaHeap);
+ ~DmaBufAllocator();
+ bool isValid() const { return providerHandle_.isValid(); }
+ UniqueFD alloc(const char *name, std::size_t size);
+
+private:
+ UniqueFD allocFromHeap(const char *name, std::size_t size);
+ UniqueFD allocFromUDmaBuf(const char *name, std::size_t size);
+ UniqueFD providerHandle_;
+ DmaBufAllocatorFlag type_;
+};
+
+LIBCAMERA_FLAGS_ENABLE_OPERATORS(DmaBufAllocator::DmaBufAllocatorFlag)
+
+} /* namespace libcamera */
diff --git a/include/libcamera/internal/formats.h b/include/libcamera/internal/formats.h
index 5b16c0a8..71895cd8 100644
--- a/include/libcamera/internal/formats.h
+++ b/include/libcamera/internal/formats.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * formats.h - libcamera image formats
+ * libcamera image formats
*/
#pragma once
diff --git a/include/libcamera/internal/framebuffer.h b/include/libcamera/internal/framebuffer.h
index 1f42a4fc..e6698a45 100644
--- a/include/libcamera/internal/framebuffer.h
+++ b/include/libcamera/internal/framebuffer.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * framebuffer.h - Internal frame buffer handling
+ * Internal frame buffer handling
*/
#pragma once
diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h
index 085f1fed..337c948c 100644
--- a/include/libcamera/internal/ipa_data_serializer.h
+++ b/include/libcamera/internal/ipa_data_serializer.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * ipa_data_serializer.h - Image Processing Algorithm data serializer
+ * Image Processing Algorithm data serializer
*/
#pragma once
diff --git a/include/libcamera/internal/ipa_manager.h b/include/libcamera/internal/ipa_manager.h
index bf823563..c6f74e11 100644
--- a/include/libcamera/internal/ipa_manager.h
+++ b/include/libcamera/internal/ipa_manager.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * ipa_manager.h - Image Processing Algorithm module manager
+ * Image Processing Algorithm module manager
*/
#pragma once
diff --git a/include/libcamera/internal/ipa_module.h b/include/libcamera/internal/ipa_module.h
index 8038bdee..7c49d3f3 100644
--- a/include/libcamera/internal/ipa_module.h
+++ b/include/libcamera/internal/ipa_module.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * ipa_module.h - Image Processing Algorithm module
+ * Image Processing Algorithm module
*/
#pragma once
diff --git a/include/libcamera/internal/ipa_proxy.h b/include/libcamera/internal/ipa_proxy.h
index 781c8b62..ed6a5bcf 100644
--- a/include/libcamera/internal/ipa_proxy.h
+++ b/include/libcamera/internal/ipa_proxy.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * ipa_proxy.h - Image Processing Algorithm proxy
+ * Image Processing Algorithm proxy
*/
#pragma once
diff --git a/include/libcamera/internal/ipc_pipe.h b/include/libcamera/internal/ipc_pipe.h
index ab5dd67c..a4560752 100644
--- a/include/libcamera/internal/ipc_pipe.h
+++ b/include/libcamera/internal/ipc_pipe.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * ipc_pipe.h - Image Processing Algorithm IPC module for IPA proxies
+ * Image Processing Algorithm IPC module for IPA proxies
*/
#pragma once
diff --git a/include/libcamera/internal/ipc_pipe_unixsocket.h b/include/libcamera/internal/ipc_pipe_unixsocket.h
index 004d9539..4a0f6d57 100644
--- a/include/libcamera/internal/ipc_pipe_unixsocket.h
+++ b/include/libcamera/internal/ipc_pipe_unixsocket.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * ipc_pipe_unixsocket.h - Image Processing Algorithm IPC module using unix socket
+ * Image Processing Algorithm IPC module using unix socket
*/
#pragma once
diff --git a/include/libcamera/internal/ipc_unixsocket.h b/include/libcamera/internal/ipc_unixsocket.h
index 3963d182..48bb7a94 100644
--- a/include/libcamera/internal/ipc_unixsocket.h
+++ b/include/libcamera/internal/ipc_unixsocket.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * ipc_unixsocket.h - IPC mechanism based on Unix sockets
+ * IPC mechanism based on Unix sockets
*/
#pragma once
diff --git a/include/libcamera/internal/mapped_framebuffer.h b/include/libcamera/internal/mapped_framebuffer.h
index fb39adbf..6aaabf50 100644
--- a/include/libcamera/internal/mapped_framebuffer.h
+++ b/include/libcamera/internal/mapped_framebuffer.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * mapped_framebuffer.h - Frame buffer memory mapping support
+ * Frame buffer memory mapping support
*/
#pragma once
diff --git a/include/libcamera/internal/media_device.h b/include/libcamera/internal/media_device.h
index eb8cfde4..bf2e475d 100644
--- a/include/libcamera/internal/media_device.h
+++ b/include/libcamera/internal/media_device.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018, Google Inc.
*
- * media_device.h - Media device handler
+ * Media device handler
*/
#pragma once
diff --git a/include/libcamera/internal/media_object.h b/include/libcamera/internal/media_object.h
index b1572968..c9d77511 100644
--- a/include/libcamera/internal/media_object.h
+++ b/include/libcamera/internal/media_object.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018, Google Inc.
*
- * media_object.h - Media Device objects: entities, pads and links.
+ * Media Device objects: entities, pads and links.
*/
#pragma once
diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build
index 7f1f3440..9713ea1c 100644
--- a/include/libcamera/internal/meson.build
+++ b/include/libcamera/internal/meson.build
@@ -25,6 +25,7 @@ libcamera_internal_headers = files([
'device_enumerator.h',
'device_enumerator_sysfs.h',
'device_enumerator_udev.h',
+ 'dma_buf_allocator.h',
'formats.h',
'framebuffer.h',
'ipa_manager.h',
@@ -38,6 +39,7 @@ libcamera_internal_headers = files([
'process.h',
'pub_key.h',
'request.h',
+ 'shared_mem_object.h',
'source_paths.h',
'sysfs.h',
'v4l2_device.h',
@@ -48,3 +50,4 @@ libcamera_internal_headers = files([
])
subdir('converter')
+subdir('software_isp')
diff --git a/include/libcamera/internal/pipeline_handler.h b/include/libcamera/internal/pipeline_handler.h
index c96944f4..746a34f8 100644
--- a/include/libcamera/internal/pipeline_handler.h
+++ b/include/libcamera/internal/pipeline_handler.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2018, Google Inc.
*
- * pipeline_handler.h - Pipeline handler infrastructure
+ * Pipeline handler infrastructure
*/
#pragma once
@@ -114,6 +114,7 @@ public:
const std::string &name() const { return name_; }
static std::vector<PipelineHandlerFactoryBase *> &factories();
+ static const PipelineHandlerFactoryBase *getFactoryByName(const std::string &name);
private:
static void registerType(PipelineHandlerFactoryBase *factory);
@@ -140,7 +141,7 @@ public:
}
};
-#define REGISTER_PIPELINE_HANDLER(handler) \
-static PipelineHandlerFactory<handler> global_##handler##Factory(#handler);
+#define REGISTER_PIPELINE_HANDLER(handler, name) \
+ static PipelineHandlerFactory<handler> global_##handler##Factory(name);
} /* namespace libcamera */
diff --git a/include/libcamera/internal/process.h b/include/libcamera/internal/process.h
index 95e67e10..b1d07a5a 100644
--- a/include/libcamera/internal/process.h
+++ b/include/libcamera/internal/process.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * process.h - Process object
+ * Process object
*/
#pragma once
diff --git a/include/libcamera/internal/pub_key.h b/include/libcamera/internal/pub_key.h
index 8653a912..c8cc04cb 100644
--- a/include/libcamera/internal/pub_key.h
+++ b/include/libcamera/internal/pub_key.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * pub_key.h - Public key signature verification
+ * Public key signature verification
*/
#pragma once
diff --git a/include/libcamera/internal/request.h b/include/libcamera/internal/request.h
index 3454cf5a..f5d98069 100644
--- a/include/libcamera/internal/request.h
+++ b/include/libcamera/internal/request.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * request.h - Request class private data
+ * Request class private data
*/
#pragma once
diff --git a/include/libcamera/internal/shared_mem_object.h b/include/libcamera/internal/shared_mem_object.h
new file mode 100644
index 00000000..2ab0189f
--- /dev/null
+++ b/include/libcamera/internal/shared_mem_object.h
@@ -0,0 +1,127 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2023 Raspberry Pi Ltd
+ * Copyright (C) 2024 Andrei Konovalov
+ * Copyright (C) 2024 Dennis Bonke
+ *
+ * Helpers for shared memory allocations
+ */
+#pragma once
+
+#include <stddef.h>
+#include <stdint.h>
+#include <string>
+#include <sys/mman.h>
+#include <type_traits>
+#include <utility>
+
+#include <libcamera/base/class.h>
+#include <libcamera/base/shared_fd.h>
+#include <libcamera/base/span.h>
+
+namespace libcamera {
+
+class SharedMem
+{
+public:
+ SharedMem();
+
+ SharedMem(const std::string &name, std::size_t size);
+ SharedMem(SharedMem &&rhs);
+
+ virtual ~SharedMem();
+
+ SharedMem &operator=(SharedMem &&rhs);
+
+ const SharedFD &fd() const
+ {
+ return fd_;
+ }
+
+ Span<uint8_t> mem() const
+ {
+ return mem_;
+ }
+
+ explicit operator bool() const
+ {
+ return !mem_.empty();
+ }
+
+private:
+ LIBCAMERA_DISABLE_COPY(SharedMem)
+
+ SharedFD fd_;
+
+ Span<uint8_t> mem_;
+};
+
+template<class T, typename = std::enable_if_t<std::is_standard_layout<T>::value>>
+class SharedMemObject : public SharedMem
+{
+public:
+ static constexpr std::size_t kSize = sizeof(T);
+
+ SharedMemObject()
+ : SharedMem(), obj_(nullptr)
+ {
+ }
+
+ template<class... Args>
+ SharedMemObject(const std::string &name, Args &&...args)
+ : SharedMem(name, kSize), obj_(nullptr)
+ {
+ if (mem().empty())
+ return;
+
+ obj_ = new (mem().data()) T(std::forward<Args>(args)...);
+ }
+
+ SharedMemObject(SharedMemObject<T> &&rhs)
+ : SharedMem(std::move(rhs))
+ {
+ this->obj_ = rhs.obj_;
+ rhs.obj_ = nullptr;
+ }
+
+ ~SharedMemObject()
+ {
+ if (obj_)
+ obj_->~T();
+ }
+
+ SharedMemObject<T> &operator=(SharedMemObject<T> &&rhs)
+ {
+ SharedMem::operator=(std::move(rhs));
+ this->obj_ = rhs.obj_;
+ rhs.obj_ = nullptr;
+ return *this;
+ }
+
+ T *operator->()
+ {
+ return obj_;
+ }
+
+ const T *operator->() const
+ {
+ return obj_;
+ }
+
+ T &operator*()
+ {
+ return *obj_;
+ }
+
+ const T &operator*() const
+ {
+ return *obj_;
+ }
+
+private:
+ LIBCAMERA_DISABLE_COPY(SharedMemObject)
+
+ T *obj_;
+};
+
+} /* namespace libcamera */
diff --git a/include/libcamera/internal/software_isp/debayer_params.h b/include/libcamera/internal/software_isp/debayer_params.h
new file mode 100644
index 00000000..7d8fdd48
--- /dev/null
+++ b/include/libcamera/internal/software_isp/debayer_params.h
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2023, 2024 Red Hat Inc.
+ *
+ * Authors:
+ * Hans de Goede <hdegoede@redhat.com>
+ *
+ * DebayerParams header
+ */
+
+#pragma once
+
+#include <array>
+#include <stdint.h>
+
+namespace libcamera {
+
+struct DebayerParams {
+ static constexpr unsigned int kRGBLookupSize = 256;
+
+ using ColorLookupTable = std::array<uint8_t, kRGBLookupSize>;
+
+ ColorLookupTable red;
+ ColorLookupTable green;
+ ColorLookupTable blue;
+};
+
+} /* namespace libcamera */
diff --git a/include/libcamera/internal/software_isp/meson.build b/include/libcamera/internal/software_isp/meson.build
new file mode 100644
index 00000000..508ddddc
--- /dev/null
+++ b/include/libcamera/internal/software_isp/meson.build
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: CC0-1.0
+
+libcamera_internal_headers += files([
+ 'debayer_params.h',
+ 'software_isp.h',
+ 'swisp_stats.h',
+])
diff --git a/include/libcamera/internal/software_isp/software_isp.h b/include/libcamera/internal/software_isp/software_isp.h
new file mode 100644
index 00000000..c5338c05
--- /dev/null
+++ b/include/libcamera/internal/software_isp/software_isp.h
@@ -0,0 +1,99 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2023, Linaro Ltd
+ *
+ * Simple software ISP implementation
+ */
+
+#pragma once
+
+#include <functional>
+#include <initializer_list>
+#include <map>
+#include <memory>
+#include <string>
+#include <tuple>
+#include <vector>
+
+#include <libcamera/base/class.h>
+#include <libcamera/base/log.h>
+#include <libcamera/base/signal.h>
+#include <libcamera/base/thread.h>
+
+#include <libcamera/geometry.h>
+#include <libcamera/pixel_format.h>
+
+#include <libcamera/ipa/soft_ipa_interface.h>
+#include <libcamera/ipa/soft_ipa_proxy.h>
+
+#include "libcamera/internal/camera_sensor.h"
+#include "libcamera/internal/dma_buf_allocator.h"
+#include "libcamera/internal/pipeline_handler.h"
+#include "libcamera/internal/shared_mem_object.h"
+#include "libcamera/internal/software_isp/debayer_params.h"
+
+namespace libcamera {
+
+class DebayerCpu;
+class FrameBuffer;
+class PixelFormat;
+struct StreamConfiguration;
+
+LOG_DECLARE_CATEGORY(SoftwareIsp)
+
+class SoftwareIsp
+{
+public:
+ SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor);
+ ~SoftwareIsp();
+
+ int loadConfiguration([[maybe_unused]] const std::string &filename) { return 0; }
+
+ bool isValid() const;
+
+ std::vector<PixelFormat> formats(PixelFormat input);
+
+ SizeRange sizes(PixelFormat inputFormat, const Size &inputSize);
+
+ std::tuple<unsigned int, unsigned int>
+ strideAndFrameSize(const PixelFormat &outputFormat, const Size &size);
+
+ int configure(const StreamConfiguration &inputCfg,
+ const std::vector<std::reference_wrapper<StreamConfiguration>> &outputCfgs,
+ const ControlInfoMap &sensorControls);
+
+ int exportBuffers(unsigned int output, unsigned int count,
+ std::vector<std::unique_ptr<FrameBuffer>> *buffers);
+
+ void processStats(const ControlList &sensorControls);
+
+ int start();
+ void stop();
+
+ int queueBuffers(FrameBuffer *input,
+ const std::map<unsigned int, FrameBuffer *> &outputs);
+
+ void process(FrameBuffer *input, FrameBuffer *output);
+
+ Signal<FrameBuffer *> inputBufferReady;
+ Signal<FrameBuffer *> outputBufferReady;
+ Signal<> ispStatsReady;
+ Signal<const ControlList &> setSensorControls;
+
+private:
+ void saveIspParams();
+ void setSensorCtrls(const ControlList &sensorControls);
+ void statsReady();
+ void inputReady(FrameBuffer *input);
+ void outputReady(FrameBuffer *output);
+
+ std::unique_ptr<DebayerCpu> debayer_;
+ Thread ispWorkerThread_;
+ SharedMemObject<DebayerParams> sharedParams_;
+ DebayerParams debayerParams_;
+ DmaBufAllocator dmaHeap_;
+
+ std::unique_ptr<ipa::soft::IPAProxySoft> ipa_;
+};
+
+} /* namespace libcamera */
diff --git a/include/libcamera/internal/software_isp/swisp_stats.h b/include/libcamera/internal/software_isp/swisp_stats.h
new file mode 100644
index 00000000..ae11f112
--- /dev/null
+++ b/include/libcamera/internal/software_isp/swisp_stats.h
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2023, Linaro Ltd
+ *
+ * Statistics data format used by the software ISP and software IPA
+ */
+
+#pragma once
+
+#include <array>
+#include <stdint.h>
+
+namespace libcamera {
+
+/**
+ * \brief Struct that holds the statistics for the Software ISP
+ *
+ * The struct value types are large enough to not overflow.
+ * Should they still overflow for some reason, no check is performed and they
+ * wrap around.
+ */
+struct SwIspStats {
+ /**
+ * \brief Holds the sum of all sampled red pixels
+ */
+ uint64_t sumR_;
+ /**
+ * \brief Holds the sum of all sampled green pixels
+ */
+ uint64_t sumG_;
+ /**
+ * \brief Holds the sum of all sampled blue pixels
+ */
+ uint64_t sumB_;
+ /**
+ * \brief Number of bins in the yHistogram
+ */
+ static constexpr unsigned int kYHistogramSize = 64;
+ /**
+ * \brief Type of the histogram.
+ */
+ using Histogram = std::array<uint32_t, kYHistogramSize>;
+ /**
+ * \brief A histogram of luminance values
+ */
+ Histogram yHistogram;
+};
+
+} /* namespace libcamera */
diff --git a/include/libcamera/internal/source_paths.h b/include/libcamera/internal/source_paths.h
index be6f153b..14e64717 100644
--- a/include/libcamera/internal/source_paths.h
+++ b/include/libcamera/internal/source_paths.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2021, Google Inc.
*
- * source_paths.h - Identify libcamera source and build paths
+ * Identify libcamera source and build paths
*/
#pragma once
diff --git a/include/libcamera/internal/sysfs.h b/include/libcamera/internal/sysfs.h
index 917457be..aca60fb6 100644
--- a/include/libcamera/internal/sysfs.h
+++ b/include/libcamera/internal/sysfs.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Google Inc.
*
- * sysfs.h - Miscellaneous utility functions to access sysfs
+ * Miscellaneous utility functions to access sysfs
*/
#pragma once
diff --git a/include/libcamera/internal/tracepoints.h.in b/include/libcamera/internal/tracepoints.h.in
index d0fc1365..f0962091 100644
--- a/include/libcamera/internal/tracepoints.h.in
+++ b/include/libcamera/internal/tracepoints.h.in
@@ -2,7 +2,7 @@
/*
* Copyright (C) {{year}}, Google Inc.
*
- * tracepoints.h - Tracepoints with lttng
+ * Tracepoints with lttng
*
* This file is auto-generated. Do not edit.
*/
diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h
index 50d4adbc..f5aa5024 100644
--- a/include/libcamera/internal/v4l2_device.h
+++ b/include/libcamera/internal/v4l2_device.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * v4l2_device.h - Common base for V4L2 video devices and subdevices
+ * Common base for V4L2 video devices and subdevices
*/
#pragma once
diff --git a/include/libcamera/internal/v4l2_pixelformat.h b/include/libcamera/internal/v4l2_pixelformat.h
index 44439fff..c836346b 100644
--- a/include/libcamera/internal/v4l2_pixelformat.h
+++ b/include/libcamera/internal/v4l2_pixelformat.h
@@ -3,7 +3,7 @@
* Copyright (C) 2019, Google Inc.
* Copyright (C) 2020, Raspberry Pi Ltd
*
- * v4l2_pixelformat.h - V4L2 Pixel Format
+ * V4L2 Pixel Format
*/
#pragma once
diff --git a/include/libcamera/internal/v4l2_subdevice.h b/include/libcamera/internal/v4l2_subdevice.h
index 01ed4c2f..194382f8 100644
--- a/include/libcamera/internal/v4l2_subdevice.h
+++ b/include/libcamera/internal/v4l2_subdevice.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * v4l2_subdevice.h - V4L2 Subdevice
+ * V4L2 Subdevice
*/
#pragma once
@@ -176,6 +176,9 @@ private:
std::vector<SizeRange> enumPadSizes(const Stream &stream,
unsigned int code);
+ int getRoutingLegacy(Routing *routing, Whence whence);
+ int setRoutingLegacy(Routing *routing, Whence whence);
+
const MediaEntity *entity_;
std::string model_;
diff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h
index d157a447..9057be08 100644
--- a/include/libcamera/internal/v4l2_videodevice.h
+++ b/include/libcamera/internal/v4l2_videodevice.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * v4l2_videodevice.h - V4L2 Video Device
+ * V4L2 Video Device
*/
#pragma once
diff --git a/include/libcamera/internal/yaml_parser.h b/include/libcamera/internal/yaml_parser.h
index 8ca71df8..06a41146 100644
--- a/include/libcamera/internal/yaml_parser.h
+++ b/include/libcamera/internal/yaml_parser.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2022, Google Inc.
*
- * yaml_parser.h - libcamera YAML parsing helper
+ * libcamera YAML parsing helper
*/
#pragma once
@@ -161,28 +161,16 @@ public:
std::size_t size() const;
-#ifndef __DOXYGEN__
- template<typename T,
- std::enable_if_t<
- std::is_same_v<bool, T> ||
- std::is_same_v<double, T> ||
- std::is_same_v<int8_t, T> ||
- std::is_same_v<uint8_t, T> ||
- std::is_same_v<int16_t, T> ||
- std::is_same_v<uint16_t, T> ||
- std::is_same_v<int32_t, T> ||
- std::is_same_v<uint32_t, T> ||
- std::is_same_v<std::string, T> ||
- std::is_same_v<Size, T>> * = nullptr>
-#else
template<typename T>
-#endif
- std::optional<T> get() const;
+ std::optional<T> get() const
+ {
+ return Getter<T>{}.get(*this);
+ }
- template<typename T>
- T get(const T &defaultValue) const
+ template<typename T, typename U>
+ T get(U &&defaultValue) const
{
- return get<T>().value_or(defaultValue);
+ return get<T>().value_or(std::forward<U>(defaultValue));
}
#ifndef __DOXYGEN__
@@ -214,6 +202,8 @@ public:
private:
LIBCAMERA_DISABLE_COPY_AND_MOVE(YamlObject)
+ template<typename T>
+ friend struct Getter;
friend class YamlParserContext;
enum class Type {
@@ -222,6 +212,11 @@ private:
Value,
};
+ template<typename T>
+ struct Getter {
+ std::optional<T> get(const YamlObject &obj) const;
+ };
+
Type type_;
std::string value_;
diff --git a/include/libcamera/ipa/ipa_controls.h b/include/libcamera/ipa/ipa_controls.h
index e5da1946..5fd13394 100644
--- a/include/libcamera/ipa/ipa_controls.h
+++ b/include/libcamera/ipa/ipa_controls.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * ipa_controls.h - IPA Control handling
+ * IPA Control handling
*/
#pragma once
diff --git a/include/libcamera/ipa/ipa_interface.h b/include/libcamera/ipa/ipa_interface.h
index 8884f0ed..b93f1a15 100644
--- a/include/libcamera/ipa/ipa_interface.h
+++ b/include/libcamera/ipa/ipa_interface.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * ipa_interface.h - Image Processing Algorithm interface
+ * Image Processing Algorithm interface
*/
#pragma once
diff --git a/include/libcamera/ipa/ipa_module_info.h b/include/libcamera/ipa/ipa_module_info.h
index b19b00f7..3507a6d7 100644
--- a/include/libcamera/ipa/ipa_module_info.h
+++ b/include/libcamera/ipa/ipa_module_info.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * ipa_module_info.h - Image Processing Algorithm module information
+ * Image Processing Algorithm module information
*/
#pragma once
diff --git a/include/libcamera/ipa/meson.build b/include/libcamera/ipa/meson.build
index f3b4881c..3352d08f 100644
--- a/include/libcamera/ipa/meson.build
+++ b/include/libcamera/ipa/meson.build
@@ -65,6 +65,7 @@ pipeline_ipa_mojom_mapping = {
'ipu3': 'ipu3.mojom',
'rkisp1': 'rkisp1.mojom',
'rpi/vc4': 'raspberrypi.mojom',
+ 'simple': 'soft.mojom',
'vimc': 'vimc.mojom',
}
diff --git a/include/libcamera/ipa/soft.mojom b/include/libcamera/ipa/soft.mojom
new file mode 100644
index 00000000..3aa2066e
--- /dev/null
+++ b/include/libcamera/ipa/soft.mojom
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+
+/*
+ * \todo Document the interface and remove the related EXCLUDE_PATTERNS entry.
+ */
+
+module ipa.soft;
+
+import "include/libcamera/ipa/core.mojom";
+
+interface IPASoftInterface {
+ init(libcamera.IPASettings settings,
+ libcamera.SharedFD fdStats,
+ libcamera.SharedFD fdParams,
+ libcamera.ControlInfoMap sensorCtrlInfoMap)
+ => (int32 ret);
+ start() => (int32 ret);
+ stop();
+ configure(libcamera.ControlInfoMap sensorCtrlInfoMap)
+ => (int32 ret);
+
+ [async] processStats(libcamera.ControlList sensorControls);
+};
+
+interface IPASoftEventInterface {
+ setSensorControls(libcamera.ControlList sensorControls);
+ setIspParams();
+};
diff --git a/include/libcamera/logging.h b/include/libcamera/logging.h
index cd842f67..e334d87b 100644
--- a/include/libcamera/logging.h
+++ b/include/libcamera/logging.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * logging.h - Logging infrastructure
+ * Logging infrastructure
*/
#pragma once
diff --git a/include/libcamera/orientation.h b/include/libcamera/orientation.h
index 9a2c2fb2..a3b40e63 100644
--- a/include/libcamera/orientation.h
+++ b/include/libcamera/orientation.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2023, Ideas On Board Oy
*
- * orientation.h - Image orientation
+ * Image orientation
*/
#pragma once
diff --git a/include/libcamera/pixel_format.h b/include/libcamera/pixel_format.h
index d49c5f78..ea60fe72 100644
--- a/include/libcamera/pixel_format.h
+++ b/include/libcamera/pixel_format.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * pixel_format.h - libcamera Pixel Format
+ * libcamera Pixel Format
*/
#pragma once
diff --git a/include/libcamera/property_ids.h.in b/include/libcamera/property_ids.h.in
index 43372c71..e6edabca 100644
--- a/include/libcamera/property_ids.h.in
+++ b/include/libcamera/property_ids.h.in
@@ -2,14 +2,16 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * property_ids.h - Property ID list
+ * Property ID list
*
* This file is auto-generated. Do not edit.
*/
#pragma once
+#include <map>
#include <stdint.h>
+#include <string>
#include <libcamera/controls.h>
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index dffde153..2c78d9bb 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * request.h - Capture request handling
+ * Capture request handling
*/
#pragma once
diff --git a/include/libcamera/stream.h b/include/libcamera/stream.h
index 4e94187d..d510238a 100644
--- a/include/libcamera/stream.h
+++ b/include/libcamera/stream.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * stream.h - Video stream for a Camera
+ * Video stream for a Camera
*/
#pragma once
diff --git a/include/libcamera/transform.h b/include/libcamera/transform.h
index 44cb4c6f..a88f809e 100644
--- a/include/libcamera/transform.h
+++ b/include/libcamera/transform.h
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2020, Raspberry Pi Ltd
*
- * transform.h - 2D plane transforms
+ * 2D plane transforms
*/
#pragma once
diff --git a/include/libcamera/version.h.in b/include/libcamera/version.h.in
index 6e24d0a8..50bf1001 100644
--- a/include/libcamera/version.h.in
+++ b/include/libcamera/version.h.in
@@ -2,7 +2,7 @@
/*
* Copyright (C) 2019, Google Inc.
*
- * version.h - Library version information
+ * Library version information
*
* This file is auto-generated. Do not edit.
*/