[vsp-tests] [PATCH 15/16] tests: Add WPF RGB to YUV conversion test

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a test case to validate RGB <-> YUV conversion in the RPF and WPF.

Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
---
 tests/meson.build           |  1 +
 tests/vsp-unit-test-0028.sh | 51 +++++++++++++++++++++++++++++++++++++
 2 files changed, 52 insertions(+)
 create mode 100755 tests/vsp-unit-test-0028.sh

diff --git a/tests/meson.build b/tests/meson.build
index e5396cc0a132..6c3ebd28095f 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -29,6 +29,7 @@ tests = files([
     'vsp-unit-test-0025.sh',
     'vsp-unit-test-0026.sh',
     'vsp-unit-test-0027.sh',
+    'vsp-unit-test-0028.sh',
 ])
 
 install_data(tests, install_dir : get_option('prefix'))
diff --git a/tests/vsp-unit-test-0028.sh b/tests/vsp-unit-test-0028.sh
new file mode 100755
index 000000000000..23a4f411e863
--- /dev/null
+++ b/tests/vsp-unit-test-0028.sh
@@ -0,0 +1,51 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0-or-later
+# SPDX-FileCopyrightText: 2025 Renesas Electronics Corporation
+
+#
+# Test RGB to YUV conversion in RPF and WPF.
+#
+
+. ./vsp-lib.sh
+
+features="rpf.0 wpf.0"
+formats="RGB24-YUV444M YUV444M-RGB24"
+
+test_rwpf_csc() {
+	local rwpf=$1
+	local format=$2
+	local infmt=${format%-*}
+	local outfmt=${format#*-}
+	local midfmt
+
+	test_start "$rwpf CSC $infmt -> $outfmt"
+
+	if [ $rwpf = 'RPF' ] ; then
+		midfmt=$outfmt
+	else
+		midfmt=$infmt
+	fi
+
+	pipe_configure rpf-wpf 0 0
+	format_configure rpf-wpf 0 0 $infmt 1024x768 $outfmt --midfmt=$midfmt
+
+	vsp_runner rpf.0 &
+	vsp_runner wpf.0
+
+	local result=$(compare_frames)
+
+	test_complete $result
+}
+
+test_main() {
+	local format
+
+	for rwpf in RPF WPF ; do
+		for format in $formats ; do
+			test_rwpf_csc $rwpf $format
+		done
+	done
+}
+
+test_init $0 "$features"
+test_run
-- 
Regards,

Laurent Pinchart





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux