From 419724af448a6aae5d0cf8f3932b93d128f581ab Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 4 Apr 2025 02:27:27 +0300 Subject: tests: Add WPF RGB to YUV conversion test Add a test case to validate RGB <-> YUV conversion in the RPF and WPF. Signed-off-by: Laurent Pinchart --- 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 (limited to 'tests') diff --git a/tests/meson.build b/tests/meson.build index e5396cc..6c3ebd2 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 0000000..23a4f41 --- /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 -- cgit v1.2.3