summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-06-17 00:22:11 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-06-19 15:26:01 +0300
commit8f715bbaa867f0928bad6cf1b8595444134afc8f (patch)
treefa2b51ebb5f3312aab908839db5528217ace5098 /scripts
parentc120e551d0f222bb444ee1b454c07f4eb3d39ad1 (diff)
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 <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vsp-lib.sh10
1 files changed, 9 insertions, 1 deletions
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
}