fi
}
-# Echo aomenc command line parameters allowing use of
-# hantro_collage_w352h288.yuv as input.
-yuv_input_hantro_collage() {
- echo ""${YUV_RAW_INPUT}"
- --width="${YUV_RAW_INPUT_WIDTH}"
- --height="${YUV_RAW_INPUT_HEIGHT}""
-}
-
+# Utilities that echo aomenc input file parameters.
y4m_input_non_square_par() {
echo ""${Y4M_NOSQ_PAR_INPUT}""
}
aomenc_av1_ivf() {
if [ "$(aomenc_can_encode_av1)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1.ivf"
- aomenc $(yuv_input_hantro_collage) \
+ aomenc $(yuv_raw_input) \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--ivf \
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1.webm"
- aomenc $(yuv_input_hantro_collage) \
+ aomenc $(yuv_raw_input) \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--output="${output}"
if [ "$(aomenc_can_encode_av1)" = "yes" ] && \
[ "$(webm_io_available)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1.webm"
- aomenc $(yuv_input_hantro_collage) \
+ aomenc $(yuv_raw_input) \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--output="${output}" \
aomenc_av1_ivf_lossless() {
if [ "$(aomenc_can_encode_av1)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_lossless.ivf"
- aomenc $(yuv_input_hantro_collage) \
+ aomenc $(yuv_raw_input) \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--ivf \
aomenc_av1_ivf_minq0_maxq0() {
if [ "$(aomenc_can_encode_av1)" = "yes" ]; then
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_lossless_minq0_maxq0.ivf"
- aomenc $(yuv_input_hantro_collage) \
+ aomenc $(yuv_raw_input) \
--codec=av1 \
--limit="${TEST_FRAMES}" \
--ivf \
local readonly lag_total_frames=20
local readonly lag_frames=10
local readonly output="${AOM_TEST_OUTPUT_DIR}/av1_lag10_frames20.webm"
- aomenc $(yuv_input_hantro_collage) \
+ aomenc $(yuv_raw_input) \
--codec=av1 \
--limit="${lag_total_frames}" \
--lag-in-frames="${lag_frames}" \
. $(dirname $0)/tools_common.sh
# Environment check: Make sure input is available:
-# $AOM_IVF_FILE and $AV1_IVF_FILE are required.
simple_decoder_verify_environment() {
- if [ ! -e "${AOM_IVF_FILE}" ] || [ ! -e "${AV1_IVF_FILE}" ]; then
- echo "Libaom test data must exist in LIBVPX_TEST_DATA_PATH."
+ if [ ! "$(av1_encode_available)" = "yes" ] && [ ! -e "${AV1_IVF_FILE}" ]; then
return 1
fi
}
[ -e "${output_file}" ] || return 1
}
-simple_decoder_aom() {
- if [ "$(aom_decode_available)" = "yes" ]; then
- simple_decoder "${AOM_IVF_FILE}" aom || return 1
- fi
-}
-
simple_decoder_av1() {
if [ "$(av1_decode_available)" = "yes" ]; then
- simple_decoder "${AV1_IVF_FILE}" av1 || return 1
+ if [ ! -e "${AV1_IVF_FILE}" ]; then
+ local file="${AOM_TEST_OUTPUT_DIR}/test_encode.ivf"
+ encode_yuv_raw_input_av1 "${file}"
+ simple_decoder "${file}" av1 || return 1
+ else
+ simple_decoder "${AV1_IVF_FILE}" av1 || return 1
+ fi
fi
}
-simple_decoder_tests="simple_decoder_aom
- simple_decoder_av1"
+simple_decoder_tests="simple_decoder_av1"
run_tests simple_decoder_verify_environment "${simple_decoder_tests}"
fi
}
+# Echo aomenc command line parameters allowing use of a raw yuv file as
+# input to aomenc.
+yuv_raw_input() {
+ echo ""${YUV_RAW_INPUT}"
+ --width="${YUV_RAW_INPUT_WIDTH}"
+ --height="${YUV_RAW_INPUT_HEIGHT}""
+}
+
+# Do a small encode for testing decoders.
+encode_yuv_raw_input_av1() {
+ if [ "$(av1_encode_available)" = "yes" ]; then
+ local readonly output="$1"
+ local readonly encoder="$(aom_tool_path aomenc)"
+
+ eval "${encoder}" $(yuv_raw_input) \
+ --codec=av1 \
+ --ivf \
+ --limit=5 \
+ --output="${output}" \
+ ${devnull}
+
+ if [ ! -e "${output}" ]; then
+ elog "Output file does not exist."
+ return 1
+ fi
+ fi
+}
+
# Parse the command line.
while [ -n "$1" ]; do
case "$1" in