summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-06-17 00:08:12 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-06-19 15:26:01 +0300
commit6bc72f272520323e333d52b6cd09365238d7983e (patch)
tree82c0bb45a34992b0af4eb25cfa426ca9d9c4cbe3 /scripts
parent2db264d5453536301fb81a8427df89843210e770 (diff)
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 <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/vsp-lib.sh19
1 files changed, 6 insertions, 13 deletions
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=
}