summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2017-09-26 12:43:07 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-03-18 10:28:42 +0200
commitc353babe626cf6dfa0166ffb891f4fb6e57097a7 (patch)
tree281dd5a27bc81699f65927bbcbf7b973adcacc00
parentd3b55c896c4971ae657413b122be4e44c91fb42b (diff)
tests: Add FCNL testfcnl
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rwxr-xr-xtests/vsp-unit-test-0026.sh56
1 files changed, 56 insertions, 0 deletions
diff --git a/tests/vsp-unit-test-0026.sh b/tests/vsp-unit-test-0026.sh
new file mode 100755
index 0000000..3fcd6b4
--- /dev/null
+++ b/tests/vsp-unit-test-0026.sh
@@ -0,0 +1,56 @@
+#!/bin/sh
+
+#
+# Test FCNL compression on the WPF. Use a RPF -> WPF pipeline with the same
+# format at the input and output, and capture output frames in all FCNL-enabled
+# formats supported by the WPF.
+#
+
+. ./vsp-lib.sh
+
+features="rpf.0 wpf.0 rpf.0[control:'Near-Lossless+Compression'] wpf.0[control:'Near-Lossless+Compression']"
+formats="ARGB32 YUYV YUV420M YUV422M YUV444M"
+
+test_wpf_packing() {
+ local file
+ local frame
+
+ test_start "WPF packing in $format with FCNL compression"
+
+ pipe_configure rpf-wpf 0 0
+ format_configure rpf-wpf 0 0 $format 1024x768 $format
+
+ # Step 1: compress the frame with FCNL
+ vsp1_set_control rpf.0 "Near-Lossless Compression" 0
+ vsp1_set_control wpf.0 "Near-Lossless Compression" 1
+ vsp_runner rpf.0 &
+ vsp_runner wpf.0
+
+ cp ${frames_dir}frame-000007.bin ${frames_dir}frame-fcnl.bin
+ cp ${frames_dir}frame-000007.bin ./${format}-frame-fcnl.bin
+
+ # Step 2: use the output of step 1 and decompress it
+ vsp1_set_control rpf.0 "Near-Lossless Compression" 1
+ vsp1_set_control wpf.0 "Near-Lossless Compression" 0
+ vsp_runner rpf.0 --file=${frames_dir}frame-fcnl.bin &
+ vsp_runner wpf.0
+
+ for frame in ${frames_dir}frame-*.bin ; do
+ cp ${frame} ./$format-$(basename ${frame})
+ done
+
+ rm ${frames_dir}frame-fcnl.bin
+
+ test_complete pass
+}
+
+test_main() {
+ local format
+
+ for format in $formats ; do
+ test_wpf_packing $format
+ done
+}
+
+test_init $0 "$features"
+test_run