Skip to content

Commit cf4b4f1

Browse files
committed
Add Video Decode Testcases for H265
Add Video Decode Testcases for VP9 Add Video Encode Testcases for H265 Signed-off-by: Abhishek Bajaj <[email protected]>
1 parent b7f6809 commit cf4b4f1

File tree

10 files changed

+352
-2
lines changed

10 files changed

+352
-2
lines changed

Runner/suites/Multimedia/Video/iris_v4l2_video_decode/h264Decoder.json renamed to Runner/suites/Multimedia/Video/Video_V4L2_H264_Decode/h264Decoder.json

File renamed without changes.

Runner/suites/Multimedia/Video/iris_v4l2_video_decode/run.sh renamed to Runner/suites/Multimedia/Video/Video_V4L2_H264_Decode/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fi
2929
# shellcheck disable=SC1090,SC1091
3030
. "$TOOLS/functestlib.sh"
3131

32-
TESTNAME="iris_v4l2_video_decode"
32+
TESTNAME="Video_V4L2_H264_Decode"
3333
test_path=$(find_test_case_by_name "$TESTNAME")
3434
cd "$test_path" || exit 1
3535
# shellcheck disable=SC2034

Runner/suites/Multimedia/Video/iris_v4l2_video_encode/h264Encoder.json renamed to Runner/suites/Multimedia/Video/Video_V4L2_H264_Encode/h264Encoder.json

File renamed without changes.

Runner/suites/Multimedia/Video/iris_v4l2_video_encode/run.sh renamed to Runner/suites/Multimedia/Video/Video_V4L2_H264_Encode/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ fi
2929
# shellcheck disable=SC1090,SC1091
3030
. "$TOOLS/functestlib.sh"
3131

32-
TESTNAME="iris_v4l2_video_encode"
32+
TESTNAME="Video_V4L2_H264_Encode"
3333
test_path=$(find_test_case_by_name "$TESTNAME")
3434
cd "$test_path" || exit 1
3535
# shellcheck disable=SC2034
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"ExecutionMode": "Sequential",
3+
"TestCases": [
4+
{
5+
"Name": "H265 Decoder Testcase",
6+
"TestConfigs": {
7+
"Domain": "Decoder",
8+
"InputPath": "./Simple_HEVC_4096x2160_60fps.h265",
9+
"NumFrames": 50,
10+
"CodecName": "HEVC",
11+
"PixelFormat": "NV12",
12+
"Width": 4096,
13+
"Height": 2160,
14+
"Outputpath": "./output_Simple_HEVC_4096x2160_60fps.yuv",
15+
"InputBufferCount": 16,
16+
"OutputBufferCount": 16,
17+
"UseMinBufferCtrl": false,
18+
"MemoryType": "MMAP"
19+
}
20+
}
21+
]
22+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/bin/sh
2+
3+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
4+
# SPDX-License-Identifier: BSD-3-Clause-Clear
5+
6+
# Robustly find and source init_env
7+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
8+
INIT_ENV=""
9+
SEARCH="$SCRIPT_DIR"
10+
while [ "$SEARCH" != "/" ]; do
11+
if [ -f "$SEARCH/init_env" ]; then
12+
INIT_ENV="$SEARCH/init_env"
13+
break
14+
fi
15+
SEARCH=$(dirname "$SEARCH")
16+
done
17+
18+
if [ -z "$INIT_ENV" ]; then
19+
echo "[ERROR] Could not find init_env (starting at $SCRIPT_DIR)" >&2
20+
exit 1
21+
fi
22+
23+
# Only source if not already loaded (idempotent)
24+
if [ -z "$__INIT_ENV_LOADED" ]; then
25+
# shellcheck disable=SC1090
26+
. "$INIT_ENV"
27+
fi
28+
# Always source functestlib.sh, using $TOOLS exported by init_env
29+
# shellcheck disable=SC1090,SC1091
30+
. "$TOOLS/functestlib.sh"
31+
32+
TESTNAME="Video_V4L2_H265_Decode"
33+
test_path=$(find_test_case_by_name "$TESTNAME")
34+
cd "$test_path" || exit 1
35+
# shellcheck disable=SC2034
36+
res_file="./$TESTNAME.res"
37+
TAR_URL="https://github.com/qualcomm-linux/qcom-linux-testkit/releases/download/IRIS-Video-Files-v1.0/video_clips_iris.tar.gz"
38+
39+
log_info "-----------------------------------------------------------------------------------------"
40+
log_info "-------------------Starting $TESTNAME Testcase----------------------------"
41+
log_info "=== Test Initialization ==="
42+
43+
log_info "Checking if dependency binary is available"
44+
check_dependencies iris_v4l2_test
45+
extract_tar_from_url "$TAR_URL"
46+
47+
# Run the first test
48+
iris_v4l2_test --config "${test_path}/h264Decoder.json" --loglevel 15 >> "${test_path}/video_dec.txt"
49+
50+
if grep -q "SUCCESS" "${test_path}/video_dec.txt"; then
51+
log_pass "$TESTNAME : Test Passed"
52+
echo "$TESTNAME PASS" > "$test_path/$TESTNAME.res"
53+
exit 0
54+
else
55+
log_fail "$TESTNAME : Test Failed"
56+
echo "$TESTNAME FAIL" > "$test_path/$TESTNAME.res"
57+
exit 1
58+
fi
59+
60+
log_info "-------------------Completed $TESTNAME Testcase----------------------------"
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
{
2+
"ExecutionMode": "Sequential",
3+
"TestCases": [
4+
{
5+
"Name": "H265 Encoder Testcase",
6+
"TestConfigs": {
7+
"Domain": "Encoder",
8+
"InputPath": "./simple_ubwc_hevc.yuv",
9+
"NumFrames": 300,
10+
"CodecName": "HEVC",
11+
"PixelFormat": "QC08C",
12+
"Width": 352,
13+
"Height": 288,
14+
"Outputpath": "./output_simple_ubwc_hevc.265",
15+
"UseMinBufferCtrl": false,
16+
"InputBufferCount": 32,
17+
"OutputBufferCount": 32,
18+
"OperatingRate": 30,
19+
"FrameRate": 30,
20+
"StaticControls": [
21+
{
22+
"Id": "Profile",
23+
"Vtype": "String",
24+
"Value": "MAIN"
25+
},
26+
{
27+
"Id": "Level",
28+
"Vtype": "String",
29+
"Value": "5.0"
30+
},
31+
{
32+
"Id": "FrameRC",
33+
"Vtype": "Int",
34+
"Value": 1
35+
},
36+
{
37+
"Id": "BitRate",
38+
"Vtype": "Int",
39+
"Value": 358400
40+
},
41+
{
42+
"Id": "BitRateMode",
43+
"Vtype": "String",
44+
"Value": "CBR"
45+
},
46+
{
47+
"Id": "PrefixHeaderMode",
48+
"Vtype": "String",
49+
"Value": "JOINED"
50+
},
51+
{
52+
"Id": "Tier",
53+
"Vtype": "String",
54+
"Value": "HIGH"
55+
},
56+
{
57+
"Id": "GOPSize",
58+
"Vtype": "Int",
59+
"Value": 447
60+
},
61+
{
62+
"Id": "HierarchicalCodingType",
63+
"Vtype": "String",
64+
"Value": "HierP"
65+
},
66+
{
67+
"Id": "HierarchicalLayerCount",
68+
"Vtype": "Int",
69+
"Value": 2
70+
},
71+
{
72+
"Id": "HierCodingL0BR",
73+
"Vtype": "Int",
74+
"Value": 136192
75+
},
76+
{
77+
"Id": "HierCodingL1BR",
78+
"Vtype": "Int",
79+
"Value": 93184
80+
},
81+
{
82+
"Id": "HierCodingL2BR",
83+
"Vtype": "Int",
84+
"Value": 129024
85+
},
86+
{
87+
"Id": "MultiSliceMode",
88+
"Vtype": "String",
89+
"Value": "SINGLE"
90+
},
91+
{
92+
"Id": "MinIQP",
93+
"Vtype": "Int",
94+
"Value": 1
95+
},
96+
{
97+
"Id": "MinPQP",
98+
"Vtype": "Int",
99+
"Value": 1
100+
},
101+
{
102+
"Id": "MinBQP",
103+
"Vtype": "Int",
104+
"Value": 1
105+
},
106+
{
107+
"Id": "MaxIQP",
108+
"Vtype": "Int",
109+
"Value": 51
110+
},
111+
{
112+
"Id": "MaxPQP",
113+
"Vtype": "Int",
114+
"Value": 51
115+
},
116+
{
117+
"Id": "MaxBQP",
118+
"Vtype": "Int",
119+
"Value": 51
120+
}
121+
],
122+
"DynamicControls": []
123+
}
124+
}
125+
]
126+
}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/bin/sh
2+
3+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
4+
# SPDX-License-Identifier: BSD-3-Clause-Clear
5+
6+
# Robustly find and source init_env
7+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
8+
INIT_ENV=""
9+
SEARCH="$SCRIPT_DIR"
10+
while [ "$SEARCH" != "/" ]; do
11+
if [ -f "$SEARCH/init_env" ]; then
12+
INIT_ENV="$SEARCH/init_env"
13+
break
14+
fi
15+
SEARCH=$(dirname "$SEARCH")
16+
done
17+
18+
if [ -z "$INIT_ENV" ]; then
19+
echo "[ERROR] Could not find init_env (starting at $SCRIPT_DIR)" >&2
20+
exit 1
21+
fi
22+
23+
# Only source if not already loaded (idempotent)
24+
if [ -z "$__INIT_ENV_LOADED" ]; then
25+
# shellcheck disable=SC1090
26+
. "$INIT_ENV"
27+
fi
28+
# Always source functestlib.sh, using $TOOLS exported by init_env
29+
# shellcheck disable=SC1090,SC1091
30+
. "$TOOLS/functestlib.sh"
31+
32+
TESTNAME="Video_V4L2_H265_Encode"
33+
test_path=$(find_test_case_by_name "$TESTNAME")
34+
cd "$test_path" || exit 1
35+
# shellcheck disable=SC2034
36+
res_file="./$TESTNAME.res"
37+
TAR_URL="https://github.com/qualcomm-linux/qcom-linux-testkit/releases/download/IRIS-Video-Files-v1.0/video_clips_iris.tar.gz"
38+
39+
log_info "-----------------------------------------------------------------------------------------"
40+
log_info "-------------------Starting $TESTNAME Testcase----------------------------"
41+
log_info "=== Test Initialization ==="
42+
43+
log_info "Checking if dependency binary is available"
44+
check_dependencies iris_v4l2_test
45+
extract_tar_from_url "$TAR_URL"
46+
47+
# Run the first test
48+
iris_v4l2_test --config "${test_path}/h264Encoder.json" --loglevel 15 >> "${test_path}/video_enc.txt"
49+
50+
if grep -q "SUCCESS" "${test_path}/video_enc.txt"; then
51+
log_pass "$TESTNAME : Test Passed"
52+
echo "$TESTNAME PASS" > "$test_path/$TESTNAME.res"
53+
exit 0
54+
else
55+
log_fail "$TESTNAME : Test Failed"
56+
echo "$TESTNAME FAIL" > "$test_path/$TESTNAME.res"
57+
exit 1
58+
fi
59+
60+
log_info "-------------------Completed $TESTNAME Testcase----------------------------"
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/bin/sh
2+
3+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
4+
# SPDX-License-Identifier: BSD-3-Clause-Clear
5+
6+
# Robustly find and source init_env
7+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
8+
INIT_ENV=""
9+
SEARCH="$SCRIPT_DIR"
10+
while [ "$SEARCH" != "/" ]; do
11+
if [ -f "$SEARCH/init_env" ]; then
12+
INIT_ENV="$SEARCH/init_env"
13+
break
14+
fi
15+
SEARCH=$(dirname "$SEARCH")
16+
done
17+
18+
if [ -z "$INIT_ENV" ]; then
19+
echo "[ERROR] Could not find init_env (starting at $SCRIPT_DIR)" >&2
20+
exit 1
21+
fi
22+
23+
# Only source if not already loaded (idempotent)
24+
if [ -z "$__INIT_ENV_LOADED" ]; then
25+
# shellcheck disable=SC1090
26+
. "$INIT_ENV"
27+
fi
28+
# Always source functestlib.sh, using $TOOLS exported by init_env
29+
# shellcheck disable=SC1090,SC1091
30+
. "$TOOLS/functestlib.sh"
31+
32+
TESTNAME="Video_V4L2_VP9_Decode"
33+
test_path=$(find_test_case_by_name "$TESTNAME")
34+
cd "$test_path" || exit 1
35+
# shellcheck disable=SC2034
36+
res_file="./$TESTNAME.res"
37+
TAR_URL="https://github.com/qualcomm-linux/qcom-linux-testkit/releases/download/IRIS-Video-Files-v1.0/video_clips_iris.tar.gz"
38+
39+
log_info "-----------------------------------------------------------------------------------------"
40+
log_info "-------------------Starting $TESTNAME Testcase----------------------------"
41+
log_info "=== Test Initialization ==="
42+
43+
log_info "Checking if dependency binary is available"
44+
check_dependencies iris_v4l2_test
45+
extract_tar_from_url "$TAR_URL"
46+
47+
# Run the first test
48+
iris_v4l2_test --config "${test_path}/h264Decoder.json" --loglevel 15 >> "${test_path}/video_dec.txt"
49+
50+
if grep -q "SUCCESS" "${test_path}/video_dec.txt"; then
51+
log_pass "$TESTNAME : Test Passed"
52+
echo "$TESTNAME PASS" > "$test_path/$TESTNAME.res"
53+
exit 0
54+
else
55+
log_fail "$TESTNAME : Test Failed"
56+
echo "$TESTNAME FAIL" > "$test_path/$TESTNAME.res"
57+
exit 1
58+
fi
59+
60+
log_info "-------------------Completed $TESTNAME Testcase----------------------------"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"ExecutionMode": "Sequential",
3+
"TestCases": [
4+
{
5+
"Name": "H265 Decoder Testcase",
6+
"TestConfigs": {
7+
"Domain": "Decoder",
8+
"InputPath": "./Simple_VP9_4K_UHD.ivf",
9+
"NumFrames": 50,
10+
"CodecName": "VP9",
11+
"PixelFormat": "NV12",
12+
"Width": 3840,
13+
"Height": 2160,
14+
"Outputpath": "./output_Simple_VP9_4K_UHD.yuv",
15+
"InputBufferCount": 16,
16+
"OutputBufferCount": 16,
17+
"UseMinBufferCtrl": false,
18+
"MemoryType": "MMAP"
19+
}
20+
}
21+
]
22+
}

0 commit comments

Comments
 (0)