summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund+renesas@ragnatech.se>2016-08-17 16:38:02 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2017-03-03 20:02:53 +0200
commitd6d7d83cc612d786d4211c0a73398e171580498c (patch)
treef355768a769f671616862d7b0d776e421dd3cf79 /tests
parent264b400e43a910f016627e0682d681f3623985a6 (diff)
tests: Add HGT test
Test HGT histogram during video streaming. Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/vsp-unit-test-0023.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/vsp-unit-test-0023.sh b/tests/vsp-unit-test-0023.sh
new file mode 100755
index 0000000..0c61a5e
--- /dev/null
+++ b/tests/vsp-unit-test-0023.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+#
+# Test 2D histogram generation. Use a RPF -> HST -> HSI -> WPF pipeline
+# with the HGT hooked up at the HST output.
+#
+
+source vsp-lib.sh
+
+features="hgt hsi hst rpf.0 wpf.0"
+
+test_histogram() {
+ local hue_areas=$1
+
+ test_start "histogram HGT with hue areas $hue_areas"
+
+ pipe_configure rpf-hgt
+ format_configure rpf-hgt RGB24 1024x768
+ hgt_configure "$hue_areas"
+
+ vsp_runner hgt &
+ vsp_runner rpf.0 &
+ vsp_runner wpf.0
+
+ result=$(compare_histograms $hue_areas)
+
+ test_complete $result
+}
+
+test_main() {
+ test_histogram "0,255,255,255,255,255,255,255,255,255,255,255"
+ test_histogram "0,40,40,80,80,120,120,160,160,200,200,255"
+ test_histogram "220,40,40,80,80,120,120,160,160,200,200,220"
+ test_histogram "0,10,50,60,100,110,150,160,200,210,250,255"
+ test_histogram "10,20,50,60,100,110,150,160,200,210,230,240"
+ test_histogram "240,20,60,80,100,120,140,160,180,200,210,220"
+}
+
+test_init $0 "$features"
+test_run