[libcamera-devel,v2,10/10] pipeline: raspberrypi: Add libcamera-apps and picamera2 config file
diff mbox series

Message ID 20221129134534.2933-11-naush@raspberrypi.com
State Superseded
Headers show
Series
  • Raspberry Pi: Platform configuration and buffer allocation improvements
Related show

Commit Message

Naushir Patuck Nov. 29, 2022, 1:45 p.m. UTC
Add a platform configuration file optimised for use with the Raspberry Pi
suite of libcamera-apps and the picamera2 framework.

This configuration minimises the number of internal buffers allocated, with
the expectation that applications will always provide buffers in request for
any configured stream.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
---
 .../pipeline/raspberrypi/data/meson.build     |  1 +
 .../pipeline/raspberrypi/data/rpi_apps.json   | 28 +++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 src/libcamera/pipeline/raspberrypi/data/rpi_apps.json

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/raspberrypi/data/meson.build b/src/libcamera/pipeline/raspberrypi/data/meson.build
index 0592fc53877d..aabde57f25c6 100644
--- a/src/libcamera/pipeline/raspberrypi/data/meson.build
+++ b/src/libcamera/pipeline/raspberrypi/data/meson.build
@@ -3,6 +3,7 @@ 
 conf_files = files([
     'default.json',
     'minimal_mem.json',
+    'rpi_apps.json',
 ])
 
 install_data(conf_files,
diff --git a/src/libcamera/pipeline/raspberrypi/data/rpi_apps.json b/src/libcamera/pipeline/raspberrypi/data/rpi_apps.json
new file mode 100644
index 000000000000..e25301744499
--- /dev/null
+++ b/src/libcamera/pipeline/raspberrypi/data/rpi_apps.json
@@ -0,0 +1,28 @@ 
+{
+        "version": 1.0,
+        "target": "bcm2835",
+
+        "pipeline_handler":
+        {
+                # The minimum number of internal buffers to be allocated for Unicam.
+                # This value must less than or equal to min_total_unicam_buffers.
+                "min_unicam_buffers": 0,
+
+                # The minimum total (internal + external) buffer count used for Unicam.
+                # The number of internal buffers allocated for Unicam is given by:
+                # internal buffer count = max(min_unicam_buffers,
+                #                             min_total_unicam_buffers - external buffer count)
+                "min_total_unicam_buffers": 4,
+
+                # The number of internal buffers used for ISP Output0.
+                "num_output0_buffers": 0,
+
+                # Override any request from the IPA to drop a number of startup frames.
+                "disable_startup_frame_drops": false,
+
+                # Always process a pending request with the last captured sensor frame.
+                # Note that this might lead to avoidable frame drops during periods
+                # of transient heavy CPU loading.
+                "return_newest_frames": false
+        }
+}
\ No newline at end of file