tests: Add SPDX headers to vsp-unit-test-0026.sh
[renesas/vsp-tests.git] / tests / vsp-unit-test-0003.sh
1 #!/bin/sh
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # SPDX-FileCopyrightText: 2016-2017 Renesas Electronics Corporation
4
5 #
6 # Test downscaling and upscaling in RGB and YUV modes. Use a RPF -> UDS -> WPF
7 # pipeline with identical input and output formats.
8 #
9
10 . ./vsp-lib.sh
11
12 features="rpf.0 uds wpf.0"
13 formats="RGB24 YUV444M"
14
15 test_scale() {
16         local format=$1
17         local insize=$2
18         local outsize=$3
19
20         test_start "scaling from $insize to $outsize in $format"
21
22         pipe_configure rpf-uds
23         format_configure rpf-uds $format $insize $format $outsize
24
25         vsp_runner rpf.0 &
26         vsp_runner wpf.0
27
28         local result=$(compare_frames)
29
30         test_complete $result
31 }
32
33 test_main() {
34         local format
35
36         for format in $formats ; do
37                 test_scale $format 640x640 640x480
38                 test_scale $format 1024x768 640x480
39                 test_scale $format 640x480 1024x768
40         done
41 }
42
43 test_init $0 "$features"
44 test_run