diff options
| author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2025-04-04 02:27:27 +0300 | 
|---|---|---|
| committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2025-04-09 02:29:59 +0300 | 
| commit | 419724af448a6aae5d0cf8f3932b93d128f581ab (patch) | |
| tree | 73c740f143ca90ce46d13d30571a8413989cd8ea | |
| parent | 08a53ffa12dca18535ee9e546a3027896d694f4b (diff) | |
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 <laurent.pinchart@ideasonboard.com>
| -rw-r--r-- | tests/meson.build | 1 | ||||
| -rwxr-xr-x | tests/vsp-unit-test-0028.sh | 51 | 
2 files changed, 52 insertions, 0 deletions
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  | 
