From 8f715bbaa867f0928bad6cf1b8595444134afc8f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 17 Jun 2016 00:22:11 +0300 Subject: vsp-lib: Store the scaling configuration internally This allows deciding whether to compare output frames using the exact or fuzzy algorithm internally, removing the need for an explicit argument to the compare_frames function. Signed-off-by: Laurent Pinchart --- scripts/vsp-lib.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'scripts/vsp-lib.sh') diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh index 8dc252c..9cf4c39 100755 --- a/scripts/vsp-lib.sh +++ b/scripts/vsp-lib.sh @@ -193,12 +193,16 @@ compare_frame_fuzzy() { } compare_frames() { - local method=$1 local format=$__vsp_wpf_format local wpf=$__vsp_wpf_index local fmt=$(echo $format | tr '[:upper:]' '[:lower:]') local size=$(vsp1_entity_get_size wpf.$wpf 1) + local method=exact + + if [ x$__vsp_uds_scale = xtrue ] ; then + method=fuzzy + fi reference_frame ref-frame.bin $format $size @@ -337,6 +341,7 @@ pipe_reset() { $mediactl -d $mdev -r __vsp_bru_inputs= + __vsp_uds_scale= __vsp_wpf_index= __vsp_wpf_format= } @@ -425,6 +430,7 @@ format_rpf_bru_uds() { $mediactl -d $mdev -V "'$dev wpf.0':0 [fmt:$infmt/$outsize]" $mediactl -d $mdev -V "'$dev wpf.0':1 [fmt:$outfmt/$outsize]" + [ $insize != $outsize ] && __vsp_uds_scale=true __vsp_wpf_format=$3 } @@ -454,6 +460,7 @@ format_rpf_uds() { $mediactl -d $mdev -V "'$dev wpf.0':0 [fmt:$infmt/$outsize]" $mediactl -d $mdev -V "'$dev wpf.0':1 [fmt:$outfmt/$outsize]" + [ $insize != $outsize ] && __vsp_uds_scale=true __vsp_wpf_format=$3 } @@ -473,6 +480,7 @@ format_rpf_uds_bru() { $mediactl -d $mdev -V "'$dev wpf.0':0 [fmt:$infmt/$outsize]" $mediactl -d $mdev -V "'$dev wpf.0':1 [fmt:$outfmt/$outsize]" + [ $insize != $outsize ] && __vsp_uds_scale=true __vsp_wpf_format=$3 } -- cgit v1.2.3