diff options
-rwxr-xr-x | scripts/vsp-lib.sh | 37 | ||||
-rwxr-xr-x | tests/vsp-unit-test-0001.sh | 2 | ||||
-rwxr-xr-x | tests/vsp-unit-test-0002.sh | 2 | ||||
-rwxr-xr-x | tests/vsp-unit-test-0003.sh | 2 | ||||
-rwxr-xr-x | tests/vsp-unit-test-0004.sh | 2 | ||||
-rwxr-xr-x | tests/vsp-unit-test-0005.sh | 2 | ||||
-rwxr-xr-x | tests/vsp-unit-test-0007.sh | 2 | ||||
-rwxr-xr-x | tests/vsp-unit-test-0008.sh | 2 |
8 files changed, 40 insertions, 11 deletions
diff --git a/scripts/vsp-lib.sh b/scripts/vsp-lib.sh index e4040f4..62647de 100755 --- a/scripts/vsp-lib.sh +++ b/scripts/vsp-lib.sh @@ -203,8 +203,8 @@ compare_frame_fuzzy() { compare_frames() { local method=$1 local reftype=$2 - local format=$3 - local wpf=$4 + 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) @@ -245,8 +245,8 @@ compare_histogram() { } compare_histograms() { - local format=$1 - local wpf=$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) @@ -289,6 +289,8 @@ pipe_rpf_bru() { done $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_wpf_index=0 } pipe_rpf_bru_uds() { @@ -298,18 +300,24 @@ pipe_rpf_bru_uds() { $mediactl -d $mdev -l "'$dev bru':$bru_output -> '$dev uds.0':0 [1]" $mediactl -d $mdev -l "'$dev uds.0':1 -> '$dev wpf.0':0 [1]" $mediactl -d $mdev -l "'$dev wpf.0':1 -> '$dev wpf.0 output':0 [1]" + + __vsp_wpf_index=0 } pipe_rpf_hgo() { $mediactl -d $mdev -l "'$dev rpf.0':1 -> '$dev wpf.0':0 [1]" $mediactl -d $mdev -l "'$dev rpf.0':1 -> '$dev hgo':0 [1]" $mediactl -d $mdev -l "'$dev wpf.0':1 -> '$dev wpf.0 output':0 [1]" + + __vsp_wpf_index=0 } pipe_rpf_uds() { $mediactl -d $mdev -l "'$dev rpf.0':1 -> '$dev uds.0':0 [1]" $mediactl -d $mdev -l "'$dev uds.0':1 -> '$dev wpf.0':0 [1]" $mediactl -d $mdev -l "'$dev wpf.0':1 -> '$dev wpf.0 output':0 [1]" + + __vsp_wpf_index=0 } pipe_rpf_uds_bru() { @@ -319,6 +327,8 @@ pipe_rpf_uds_bru() { $mediactl -d $mdev -l "'$dev uds.0':1 -> '$dev bru':0 [1]" $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_wpf_index=0 } pipe_rpf_wpf() { @@ -327,10 +337,15 @@ pipe_rpf_wpf() { $mediactl -d $mdev -l "'$dev rpf.$rpf':1 -> '$dev wpf.$wpf':0 [1]" $mediactl -d $mdev -l "'$dev wpf.$wpf':1 -> '$dev wpf.$wpf output':0 [1]" + + __vsp_wpf_index=$wpf } pipe_reset() { $mediactl -d $mdev -r + + __vsp_wpf_index= + __vsp_wpf_format= } pipe_configure() { @@ -397,6 +412,8 @@ format_rpf_bru() { $mediactl -d $mdev -V "'$dev bru':$bru_output [fmt:$format/$size]" $mediactl -d $mdev -V "'$dev wpf.0':0 [fmt:$format/$size]" $mediactl -d $mdev -V "'$dev wpf.0':1 [fmt:$format/$size]" + + __vsp_wpf_format=$1 } format_rpf_bru_uds() { @@ -414,6 +431,8 @@ format_rpf_bru_uds() { $mediactl -d $mdev -V "'$dev uds.0':1 [fmt:$infmt/$outsize]" $mediactl -d $mdev -V "'$dev wpf.0':0 [fmt:$infmt/$outsize]" $mediactl -d $mdev -V "'$dev wpf.0':1 [fmt:$outfmt/$outsize]" + + __vsp_wpf_format=$3 } format_rpf_hgo() { @@ -426,6 +445,8 @@ format_rpf_hgo() { $mediactl -d $mdev -V "'$dev wpf.0':0 [fmt:$format/$size]" $mediactl -d $mdev -V "'$dev wpf.0':1 [fmt:$format/$size]" $mediactl -d $mdev -V "'$dev hgo':0 [fmt:$format/$size $crop $compose]" + + __vsp_wpf_format=$1 } format_rpf_uds() { @@ -439,6 +460,8 @@ format_rpf_uds() { $mediactl -d $mdev -V "'$dev uds.0':1 [fmt:$infmt/$outsize]" $mediactl -d $mdev -V "'$dev wpf.0':0 [fmt:$infmt/$outsize]" $mediactl -d $mdev -V "'$dev wpf.0':1 [fmt:$outfmt/$outsize]" + + __vsp_wpf_format=$3 } format_rpf_uds_bru() { @@ -456,6 +479,8 @@ format_rpf_uds_bru() { $mediactl -d $mdev -V "'$dev bru':$bru_output [fmt:$infmt/$outsize]" $mediactl -d $mdev -V "'$dev wpf.0':0 [fmt:$infmt/$outsize]" $mediactl -d $mdev -V "'$dev wpf.0':1 [fmt:$outfmt/$outsize]" + + __vsp_wpf_format=$3 } format_rpf_wpf() { @@ -477,6 +502,8 @@ format_rpf_wpf() { $mediactl -d $mdev -V "'$dev rpf.$rpf':0 [fmt:$infmt/$size]" $mediactl -d $mdev -V "'$dev wpf.$wpf':0 [fmt:$infmt/$size $crop]" $mediactl -d $mdev -V "'$dev wpf.$wpf':1 [fmt:$outfmt/$outsize]" + + __vsp_wpf_format=$5 } format_wpf() { @@ -486,6 +513,8 @@ format_wpf() { $mediactl -d $mdev -V "'$dev wpf.$wpf':0 [fmt:$format/$size]" $mediactl -d $mdev -V "'$dev wpf.$wpf':1 [fmt:$format/$size]" + + __vsp_wpf_format=$1 } format_configure() { diff --git a/tests/vsp-unit-test-0001.sh b/tests/vsp-unit-test-0001.sh index f0e41da..c5b71e1 100755 --- a/tests/vsp-unit-test-0001.sh +++ b/tests/vsp-unit-test-0001.sh @@ -20,7 +20,7 @@ test_wpf_packing() { $vsp_runner $mdev input 0 ARGB32 & $vsp_runner $mdev output 0 $format - result=$(compare_frames exact reference $format 0) + result=$(compare_frames exact reference) test_complete $result } diff --git a/tests/vsp-unit-test-0002.sh b/tests/vsp-unit-test-0002.sh index 49c0d43..0b97965 100755 --- a/tests/vsp-unit-test-0002.sh +++ b/tests/vsp-unit-test-0002.sh @@ -20,7 +20,7 @@ test_wpf_packing() { $vsp_runner $mdev input 0 YUYV & $vsp_runner $mdev output 0 $format - result=$(compare_frames fuzzy reference $format 0) + result=$(compare_frames fuzzy reference) test_complete $result } diff --git a/tests/vsp-unit-test-0003.sh b/tests/vsp-unit-test-0003.sh index c79cc8a..9b04b60 100755 --- a/tests/vsp-unit-test-0003.sh +++ b/tests/vsp-unit-test-0003.sh @@ -23,7 +23,7 @@ test_scale() { $vsp_runner $mdev input 0 $format & $vsp_runner $mdev output 0 $format - result=$(compare_frames exact scaled $format 0) + result=$(compare_frames exact scaled) test_complete $result } diff --git a/tests/vsp-unit-test-0004.sh b/tests/vsp-unit-test-0004.sh index fd49af1..12a2545 100755 --- a/tests/vsp-unit-test-0004.sh +++ b/tests/vsp-unit-test-0004.sh @@ -21,7 +21,7 @@ test_histogram() { $vsp_runner $mdev input 0 $format & $vsp_runner $mdev output 0 $format - result=$(compare_histograms $format 0) + result=$(compare_histograms) test_complete $result } diff --git a/tests/vsp-unit-test-0005.sh b/tests/vsp-unit-test-0005.sh index 2ba11bf..168ee55 100755 --- a/tests/vsp-unit-test-0005.sh +++ b/tests/vsp-unit-test-0005.sh @@ -21,7 +21,7 @@ test_rpf() { $vsp_runner $mdev input $rpf $format & $vsp_runner $mdev output 0 $format - result=$(compare_frames exact reference $format 0) + result=$(compare_frames exact reference) test_complete $result } diff --git a/tests/vsp-unit-test-0007.sh b/tests/vsp-unit-test-0007.sh index 68bd838..fa45422 100755 --- a/tests/vsp-unit-test-0007.sh +++ b/tests/vsp-unit-test-0007.sh @@ -23,7 +23,7 @@ test_bru() { done $vsp_runner $mdev output 0 $format - result=$(compare_frames fuzzy composed-$ninputs $format 0) + result=$(compare_frames fuzzy composed-$ninputs) test_complete $result } diff --git a/tests/vsp-unit-test-0008.sh b/tests/vsp-unit-test-0008.sh index be3db96..15379d4 100755 --- a/tests/vsp-unit-test-0008.sh +++ b/tests/vsp-unit-test-0008.sh @@ -30,7 +30,7 @@ test_scale() { $vsp_runner $mdev input 0 $format & $vsp_runner $mdev output 0 $format - result=$(compare_frames exact scaled $format 0) + result=$(compare_frames exact scaled) test_complete $result } |