Commit bf26f329d8 for aom
commit bf26f329d8e34a1cad43ccf33ca78880032dae8b
Author: Yunqing Wang <yunqingwang@google.com>
Date: Thu Mar 12 10:13:06 2026 -0700
Enhance low-complexity test
Enhanced the test and modified the script so Jenkins machine
can support it.
Change-Id: I1835807df4bcb2e403b85289385f0a387e2fafff
diff --git a/examples/low_complexity_mode_encoder.c b/examples/low_complexity_mode_encoder.c
index 902a9e8b98..31d8f069ed 100644
--- a/examples/low_complexity_mode_encoder.c
+++ b/examples/low_complexity_mode_encoder.c
@@ -29,7 +29,7 @@ static const char *exec_name;
void usage_exit(void) {
fprintf(stderr,
- "Usage: %s <width> <height> <infile> <outfile> "
+ "Usage: %s <codec> <width> <height> <infile> <outfile> "
"<keyframe-interval> <frames to encode>\n",
exec_name);
exit(EXIT_FAILURE);
@@ -91,7 +91,7 @@ int main(int argc, char **argv) {
// "missing-field-initializers" warning in some compilers.
memset(&info, 0, sizeof(info));
- if (argc != 9) die("Invalid number of arguments");
+ if (argc != 8) die("Invalid number of arguments");
codec_arg = argv[1];
width_arg = argv[2];
@@ -134,6 +134,7 @@ int main(int argc, char **argv) {
cfg.g_timebase.num = info.time_base.numerator;
cfg.g_timebase.den = info.time_base.denominator;
cfg.rc_target_bitrate = bitrate;
+ cfg.g_lag_in_frames = 35;
writer = aom_video_writer_open(outfile_arg, kContainerIVF, &info);
if (!writer) die("Failed to open %s for writing.", outfile_arg);
diff --git a/test/low_complexity_test.sh b/test/low_complexity_test.sh
index fd494db577..2521b2b5ae 100755
--- a/test/low_complexity_test.sh
+++ b/test/low_complexity_test.sh
@@ -36,7 +36,7 @@ low_complexity_test_verify_environment() {
}
# Runs libaom low-complexity decode mode test
-low_complexity_mode_test() {
+low_complexity_test() {
local img_width=608
local img_height=1080
@@ -51,9 +51,11 @@ low_complexity_mode_test() {
fi
echo "The LC mode encoder is started."
- eval "${AOM_TEST_PREFIX}" "${encoder}" av1 "${img_width}" \
- "${img_height}" "${input_file}" "${ivf_file}" 9999 0 90 \
- ${devnull} || return 1
+ local enc_cmd="$(echo "${AOM_TEST_PREFIX}" "${encoder}" av1 "${img_width}" \
+ "${img_height}" "${input_file}" "${ivf_file}" 150 90 "\
+ "${devnull})"
+ echo "$enc_cmd"
+ eval "$enc_cmd" || return 1
[ -e "${ivf_file}" ] || return 1
echo "The LC mode encoder is completed."
@@ -75,14 +77,13 @@ low_complexity_mode_test() {
echo "$dec_cmd"
eval "$dec_cmd" || return 1
- # Get perf user instruction count in thousands from perf output
- local instruction_count="0"
- local line=$( cat ${perfstat_file} | grep "instructions:u" )
- instruction_count=${line%instructions:u*}
+ # Get perf user instruction count from perf output
+ local instruction_count="$(awk '/instructions:u/ {print $1}' \
+ "${perfstat_file}")"
echo ${instruction_count}
}
-low_complexity_decode_mode_test="low_complexity_mode_test"
+low_complexity_decode_mode_test="low_complexity_test"
run_tests low_complexity_test_verify_environment \
"${low_complexity_decode_mode_test}"