@@ -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]"
}
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> --- scripts/vsp-lib.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)