summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-04-05 01:16:42 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2025-04-09 02:29:59 +0300
commit723c83e6a3a6cc9306010ab51a3a7b9b861ef843 (patch)
tree4304d375630ac180b596319fc96c6feba6f8add3
parent973b7169f9200b2cb293ef4953d9c80a5e074714 (diff)
vsp-lib: Support specifying pipeline internal format for RPF -> WPF
The RPF can perform color space conversion, converting between RGB and YUV formats. Testing this feature requires specifying different formats on the RPF input and output. Add a --midfmt argument to the format_rpf_wpf() function to specify the RPF output format, and propagate it through the pipeline up to the WPF input. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rwxr-xr-xscripts/vsp-lib.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh
index ba87de5..d872290 100755
--- a/scripts/vsp-lib.sh
+++ b/scripts/vsp-lib.sh
@@ -789,6 +789,7 @@ format_rpf_wpf() {
local infmt=$(format_v4l2_to_mbus $3)
local size=$4
local outfmt=$(format_v4l2_to_mbus $5)
+ local midfmt=$infmt
local rpfcrop=
local wpfcrop=
local rpfoutsize=
@@ -802,6 +803,9 @@ format_rpf_wpf() {
for option in $* ; do
case $option in
+ --midfmt=*)
+ midfmt=$(format_v4l2_to_mbus ${option/--midfmt=/})
+ ;;
--rpfcrop=*)
rpfcrop=${option/--rpfcrop=/}
;;
@@ -831,8 +835,8 @@ format_rpf_wpf() {
fi
$mediactl -d $mdev -V "'$dev rpf.$rpf':0 [fmt:$infmt/$size $rpfcrop]"
- $mediactl -d $mdev -V "'$dev rpf.$rpf':1 [fmt:$infmt/$rpfoutsize]"
- $mediactl -d $mdev -V "'$dev wpf.$wpf':0 [fmt:$infmt/$rpfoutsize $wpfcrop]"
+ $mediactl -d $mdev -V "'$dev rpf.$rpf':1 [fmt:$midfmt/$rpfoutsize]"
+ $mediactl -d $mdev -V "'$dev wpf.$wpf':0 [fmt:$midfmt/$rpfoutsize $wpfcrop]"
$mediactl -d $mdev -V "'$dev wpf.$wpf':1 [fmt:$outfmt/$outsize]"
}