-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RASPBERRYPI ONLY: Handle mandatory stream flags
Look for the RAW mandatory stream flag in the pipeline handler config file. If this flag is set, it guarantees that the application will provide buffers for Unicam Image, so override the minUnicamBuffers and minTotalUnicamBuffers config parameters in the following way: - If startup drop frames are required, allocate at least 1 internal buffer. - If no startup drop frames are required, do not allocate any internal buffers. Look for the Output 0 mandatory stream flag in in the pipeline handler config file. If this flag is set, it guarantees that the application will provide buffers for the ISP, do not allocate any internal buffers for the device. Add a new rpi_apps.yaml pipeline handler config file that enables both these flags. To use the file, set the following env variable for a custom build: export LIBCAMERA_RPI_CONFIG_FILE=/usr/local/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml or for a packaged install: export LIBCAMERA_RPI_CONFIG_FILE=/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
- Loading branch information
Showing
3 changed files
with
112 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
conf_files = files([ | ||
'example.yaml', | ||
'rpi_apps.yaml', | ||
]) | ||
|
||
install_data(conf_files, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"version": 1.0, | ||
"target": "bcm2835", | ||
|
||
"pipeline_handler": | ||
{ | ||
# The minimum number of internal buffers to be allocated for | ||
# Unicam. This value must be greater than 0, but less than or | ||
# equal to min_total_unicam_buffers. | ||
# | ||
# A larger number of internal buffers can reduce the occurrence | ||
# of frame drops during high CPU loads, but might also cause | ||
# additional latency in the system. | ||
# | ||
# Note that the pipeline handler might override this value and | ||
# not allocate any internal buffers if it knows they will never | ||
# be used. For example if the RAW stream is marked as mandatory | ||
# and there are no dropped frames signalled for algorithm | ||
# convergence. | ||
# | ||
"min_unicam_buffers": 2, | ||
|
||
# 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, | ||
|
||
# Override any request from the IPA to drop a number of startup | ||
# frames. | ||
# | ||
# "disable_startup_frame_drops": false, | ||
|
||
# The application will always provide a request buffer for the | ||
# RAW stream, if it has been configured. | ||
"raw_mandatory_stream": true, | ||
|
||
# The application will always provide a request buffer for the | ||
# Output 0 stream, if it has been configured. | ||
"output0_mandatory_stream": true, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters