summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/pipeline/raspberrypi/data/example.yaml7
-rw-r--r--src/libcamera/pipeline/raspberrypi/raspberrypi.cpp11
2 files changed, 16 insertions, 2 deletions
diff --git a/src/libcamera/pipeline/raspberrypi/data/example.yaml b/src/libcamera/pipeline/raspberrypi/data/example.yaml
index 4662136e..ad5f2344 100644
--- a/src/libcamera/pipeline/raspberrypi/data/example.yaml
+++ b/src/libcamera/pipeline/raspberrypi/data/example.yaml
@@ -27,6 +27,11 @@
# internal buffer count = max(min_unicam_buffers,
# min_total_unicam_buffers - external buffer count)
#
- # "min_total_unicam_buffers": 4
+ # "min_total_unicam_buffers": 4,
+
+ # Override any request from the IPA to drop a number of startup
+ # frames.
+ #
+ # "disable_startup_frame_drops": false
}
}
diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
index a140ff73..d752911d 100644
--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
@@ -315,6 +315,11 @@ public:
* minTotalUnicamBuffers >= minUnicamBuffers
*/
unsigned int minTotalUnicamBuffers;
+ /*
+ * Override any request from the IPA to drop a number of startup
+ * frames.
+ */
+ bool disableStartupFrameDrops;
};
Config config_;
@@ -1117,7 +1122,8 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)
data->setSensorControls(startConfig.controls);
/* Configure the number of dropped frames required on startup. */
- data->dropFrameCount_ = startConfig.dropFrameCount;
+ data->dropFrameCount_ = data->config_.disableStartupFrameDrops
+ ? 0 : startConfig.dropFrameCount;
for (auto const stream : data->streams_)
stream->resetBuffers();
@@ -1719,6 +1725,7 @@ int RPiCameraData::loadPipelineConfiguration()
config_ = {
.minUnicamBuffers = 2,
.minTotalUnicamBuffers = 4,
+ .disableStartupFrameDrops = false,
};
char const *configFromEnv = utils::secure_getenv("LIBCAMERA_RPI_CONFIG_FILE");
@@ -1752,6 +1759,8 @@ int RPiCameraData::loadPipelineConfiguration()
phConfig["min_unicam_buffers"].get<unsigned int>(config_.minUnicamBuffers);
config_.minTotalUnicamBuffers =
phConfig["min_total_unicam_buffers"].get<unsigned int>(config_.minTotalUnicamBuffers);
+ config_.disableStartupFrameDrops =
+ phConfig["disable_startup_frame_drops"].get<bool>(config_.disableStartupFrameDrops);
if (config_.minTotalUnicamBuffers < config_.minUnicamBuffers) {
LOG(RPI, Error) << "Invalid configuration: min_total_unicam_buffers must be >= min_unicam_buffers";