From 6bc72f272520323e333d52b6cd09365238d7983e Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 17 Jun 2016 00:08:12 +0300 Subject: vsp-lib: Store the number of BRU inputs internally Instead of getting the number of BRU inputs from an explicit argument to the compare_frames function, store it internally when configuring the pipeline. This simplifies the test scripts by removing the reftype argument to the compare_frames function. Signed-off-by: Laurent Pinchart --- scripts/vsp-lib.sh | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'scripts') diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh index 62647de..8dc252c 100755 --- a/scripts/vsp-lib.sh +++ b/scripts/vsp-lib.sh @@ -86,21 +86,12 @@ vsp1_set_control() { reference_frame() { local file=$1 - local reftype=$2 - local format=$3 - local size=$4 + local format=$2 + local size=$3 local alpha= local options= - case $reftype in - reference | scaled) - ;; - composed-*) - options="$options -c ${reftype/composed-/}" - ;; - esac - case $format in ARGB555) alpha=255 @@ -121,6 +112,7 @@ reference_frame() { ;; esac + [ x$__vsp_bru_inputs != x ] && options="$options -c $__vsp_bru_inputs" $(format_v4l2_is_yuv $format) && options="$options -y" $genimage -f $format -s $size -a $alpha $options -o $file \ @@ -202,14 +194,13 @@ compare_frame_fuzzy() { compare_frames() { local method=$1 - local reftype=$2 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) - reference_frame ref-frame.bin $reftype $format $size + reference_frame ref-frame.bin $format $size local result="pass" for frame in frame-*.bin ; do @@ -290,6 +281,7 @@ pipe_rpf_bru() { $mediactl -d $mdev -l "'$dev bru':$bru_output -> '$dev wpf.0':0 [1]" $mediactl -d $mdev -l "'$dev wpf.0':1 -> '$dev wpf.0 output':0 [1]" + __vsp_bru_inputs=$ninputs __vsp_wpf_index=0 } @@ -344,6 +336,7 @@ pipe_rpf_wpf() { pipe_reset() { $mediactl -d $mdev -r + __vsp_bru_inputs= __vsp_wpf_index= __vsp_wpf_format= } -- cgit v1.2.3