summaryrefslogtreecommitdiff
path: root/tests/vsp-unit-test-0017.sh
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-09-07 02:57:36 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2016-09-16 01:42:43 +0300
commitd3b6e1ab6e1a02433d5cb1ec115c51cd8bb890d3 (patch)
treeb410d09ff245cf4a6c5737083d6d9c4219bb00f0 /tests/vsp-unit-test-0017.sh
parentb3696cc38b53793bfac8de8769f66d22071feab3 (diff)
tests: Add HSV capture and conversion test
Test conversion from RGB to HSV with output in both HSV24 and HSV32 formats as well as HSV to HSV pass-through. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'tests/vsp-unit-test-0017.sh')
-rwxr-xr-xtests/vsp-unit-test-0017.sh57
1 files changed, 57 insertions, 0 deletions
diff --git a/tests/vsp-unit-test-0017.sh b/tests/vsp-unit-test-0017.sh
new file mode 100755
index 0000000..bba6779
--- /dev/null
+++ b/tests/vsp-unit-test-0017.sh
@@ -0,0 +1,57 @@
+#!/bin/sh
+
+#
+# Test RGB to HSV conversion: Use a RPF -> HST -> WPF pipeline with a fixed
+# ARGB32 format on the input and capture output frames in all HSV formats
+# supported by the WPF.
+#
+# Test HSV to HSV pass-through: Use a RPF -> WPF pipeline with identical HSV
+# formats on the input and output.
+#
+
+source vsp-lib.sh
+
+features="rpf.0 hst wpf.0"
+formats="HSV24 HSV32"
+
+test_rgb_to_hsv() {
+ local format=$1
+
+ test_start "RGB to $format conversion"
+
+ pipe_configure rpf-hst
+ format_configure rpf-hst ARGB32 1024x768 $format
+
+ vsp_runner rpf.0 &
+ vsp_runner wpf.0
+
+ result=$(compare_frames)
+
+ test_complete $result
+}
+
+test_hsv_to_hsv() {
+ local format=$1
+
+ test_start "HSV pass-through in $format"
+
+ pipe_configure rpf-wpf 0 0
+ format_configure rpf-wpf 0 0 $format 1024x768 $format
+
+ vsp_runner rpf.0 &
+ vsp_runner wpf.0
+
+ result=$(compare_frames)
+
+ test_complete $result
+}
+
+test_main() {
+ for format in $formats ; do
+ test_rgb_to_hsv $format
+ test_hsv_to_hsv $format
+ done
+}
+
+test_init $0 "$features"
+test_run