Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
732c1885
Commit
732c1885
authored
Oct 12, 2016
by
Yaowu Xu
Committed by
Gerrit Code Review
Oct 12, 2016
Browse files
Merge "LIBVPX_TEST_DATA_PATH -> LIBAOM_TEST_DATA_PATH" into nextgenv2
parents
d2b1fe4a
97aa09f6
Changes
11
Hide whitespace changes
Inline
Side-by-side
README
View file @
732c1885
...
...
@@ -122,10 +122,10 @@ COMPILING THE APPLICATIONS/LIBRARIES:
VP8/AV1 TEST VECTORS:
The test vectors can be downloaded and verified using the build system after
running configure. To specify an alternate directory the
LIB
VPX
_TEST_DATA_PATH environment variable can be used.
LIB
AOM
_TEST_DATA_PATH environment variable can be used.
$ ./configure --enable-unit-tests
$ LIB
VPX
_TEST_DATA_PATH=../-test-data make testdata
$ LIB
AOM
_TEST_DATA_PATH=../-test-data make testdata
CODE STYLE:
The coding style used by this project is enforced with clang-format using the
...
...
av1/encoder/block.h
View file @
732c1885
...
...
@@ -164,7 +164,6 @@ struct macroblock {
// Store the second best motion vector during full-pixel motion search
int_mv
second_best_mv
;
// use default transform and skip transform type search for intra modes
int
use_default_intra_tx_type
;
// use default transform and skip transform type search for inter modes
...
...
libs.mk
View file @
732c1885
...
...
@@ -356,12 +356,12 @@ endif
## libaom test directives
##
ifeq
($(CONFIG_UNIT_TESTS),yes)
LIB
VPX
_TEST_DATA_PATH
?=
.
LIB
AOM
_TEST_DATA_PATH
?=
.
include
$(SRC_PATH_BARE)/test/test.mk
LIBAOM_TEST_SRCS
=
$(
addprefix
test
/,
$(
call
enabled,LIBAOM_TEST_SRCS
))
LIBAOM_TEST_BIN
=
./test_libaom
$(EXE_SFX)
LIBAOM_TEST_DATA
=
$(
addprefix
$(LIB
VPX
_TEST_DATA_PATH)
/,
\
LIBAOM_TEST_DATA
=
$(
addprefix
$(LIB
AOM
_TEST_DATA_PATH)
/,
\
$(
call
enabled,LIBAOM_TEST_DATA
))
libaom_test_data_url
=
http://downloads.webmproject.org/test_data/libvpx/
$(1)
...
...
@@ -388,7 +388,7 @@ testdata:: $(LIBAOM_TEST_DATA)
echo
"Checking test data:"
;
\
for
f
in
$(
call
enabled,LIBAOM_TEST_DATA
)
;
do
\
grep
$$
f
$(SRC_PATH_BARE)
/test/test-data.sha1 |
\
(
cd
$(LIB
VPX
_TEST_DATA_PATH)
;
$
${sha1sum}
-c
)
;
\
(
cd
$(LIB
AOM
_TEST_DATA_PATH)
;
$
${sha1sum}
-c
)
;
\
done
;
\
else
\
echo
"Skipping test data integrity check, sha1sum not found."
;
\
...
...
@@ -554,10 +554,10 @@ TEST_BIN_PATH := $(addsuffix /$(TGT_OS:win64=x64)/Release, $(TEST_BIN_PATH))
endif
utiltest utiltest-no-data-check
:
$(qexec)$(SRC_PATH_BARE)
/test/aomdec.sh
\
--test-data-path
$(LIB
VPX
_TEST_DATA_PATH)
\
--test-data-path
$(LIB
AOM
_TEST_DATA_PATH)
\
--bin-path
$(TEST_BIN_PATH)
$(qexec)$(SRC_PATH_BARE)
/test/aomenc.sh
\
--test-data-path
$(LIB
VPX
_TEST_DATA_PATH)
\
--test-data-path
$(LIB
AOM
_TEST_DATA_PATH)
\
--bin-path
$(TEST_BIN_PATH)
utiltest
:
testdata
else
...
...
@@ -581,7 +581,7 @@ EXAMPLES_BIN_PATH := $(TGT_OS:win64=x64)/Release
endif
exampletest exampletest-no-data-check
:
examples
$(qexec)$(SRC_PATH_BARE)
/test/examples.sh
\
--test-data-path
$(LIB
VPX
_TEST_DATA_PATH)
\
--test-data-path
$(LIB
AOM
_TEST_DATA_PATH)
\
--bin-path
$(EXAMPLES_BIN_PATH)
exampletest
:
testdata
else
...
...
test/aomdec.sh
View file @
732c1885
...
...
@@ -20,7 +20,7 @@ aomdec_verify_environment() {
if
[
!
-e
"
${
AV1_WEBM_FILE
}
"
]
||
\
[
!
-e
"
${
AV1_FPM_WEBM_FILE
}
"
]
||
\
[
!
-e
"
${
AV1_LT_50_FRAMES_WEBM_FILE
}
"
]
;
then
elog
"Libaom test data must exist in LIB
VPX
_TEST_DATA_PATH."
elog
"Libaom test data must exist in LIB
AOM
_TEST_DATA_PATH."
return
1
fi
fi
...
...
test/aomenc.sh
View file @
732c1885
...
...
@@ -20,13 +20,13 @@ readonly TEST_FRAMES=10
# Environment check: Make sure input is available.
aomenc_verify_environment
()
{
if
[
!
-e
"
${
YUV_RAW_INPUT
}
"
]
;
then
elog
"The file
${
YUV_RAW_INPUT
##*/
}
must exist in LIB
VPX
_TEST_DATA_PATH."
elog
"The file
${
YUV_RAW_INPUT
##*/
}
must exist in LIB
AOM
_TEST_DATA_PATH."
return
1
fi
if
[
"
$(
aomenc_can_encode_av1
)
"
=
"yes"
]
;
then
if
[
!
-e
"
${
Y4M_NOSQ_PAR_INPUT
}
"
]
;
then
elog
"The file
${
Y4M_NOSQ_PAR_INPUT
##*/
}
must exist in"
elog
"LIB
VPX
_TEST_DATA_PATH."
elog
"LIB
AOM
_TEST_DATA_PATH."
return
1
fi
fi
...
...
test/decode_perf_test.cc
View file @
732c1885
...
...
@@ -147,7 +147,7 @@ class AV1NewEncodeDecodePerfTest
}
virtual
void
BeginPassHook
(
unsigned
int
/*pass*/
)
{
const
std
::
string
data_path
=
getenv
(
"LIB
VPX
_TEST_DATA_PATH"
);
const
std
::
string
data_path
=
getenv
(
"LIB
AOM
_TEST_DATA_PATH"
);
const
std
::
string
path_to_source
=
data_path
+
"/"
+
kNewEncodeOutputFile
;
outfile_
=
fopen
(
path_to_source
.
c_str
(),
"wb"
);
ASSERT_TRUE
(
outfile_
!=
NULL
);
...
...
test/set_maps.sh
View file @
732c1885
...
...
@@ -19,7 +19,7 @@
# $LIBAOM_BIN_PATH.
set_maps_verify_environment
()
{
if
[
!
-e
"
${
YUV_RAW_INPUT
}
"
]
;
then
echo
"Libaom test data must exist in LIB
VPX
_TEST_DATA_PATH."
echo
"Libaom test data must exist in LIB
AOM
_TEST_DATA_PATH."
return
1
fi
if
[
-z
"
$(
aom_tool_path set_maps
)
"
]
;
then
...
...
test/simple_encoder.sh
View file @
732c1885
...
...
@@ -18,7 +18,7 @@
# Environment check: $YUV_RAW_INPUT is required.
simple_encoder_verify_environment
()
{
if
[
!
-e
"
${
YUV_RAW_INPUT
}
"
]
;
then
echo
"Libaom test data must exist in LIB
VPX
_TEST_DATA_PATH."
echo
"Libaom test data must exist in LIB
AOM
_TEST_DATA_PATH."
return
1
fi
}
...
...
test/tools_common.sh
View file @
732c1885
...
...
@@ -118,12 +118,12 @@ test_env_var_dir() {
}
# This script requires that the LIBAOM_BIN_PATH, LIBAOM_CONFIG_PATH, and
# LIB
VPX
_TEST_DATA_PATH variables are in the environment: Confirm that
# LIB
AOM
_TEST_DATA_PATH variables are in the environment: Confirm that
# the variables are set and that they all evaluate to directory paths.
verify_aom_test_environment
()
{
test_env_var_dir
"LIBAOM_BIN_PATH"
\
&&
test_env_var_dir
"LIBAOM_CONFIG_PATH"
\
&&
test_env_var_dir
"LIB
VPX
_TEST_DATA_PATH"
&&
test_env_var_dir
"LIB
AOM
_TEST_DATA_PATH"
}
# Greps aom_config.h in LIBAOM_CONFIG_PATH for positional parameter one, which
...
...
@@ -295,7 +295,7 @@ cat << EOF
\$
LIBAOM_CONFIG_PATH and then the current directory.
When the -test-data-path option is not specified the script attempts to use
\$
LIB
VPX
_TEST_DATA_PATH and then the current directory.
\$
LIB
AOM
_TEST_DATA_PATH and then the current directory.
EOF
}
...
...
@@ -304,7 +304,7 @@ EOF
aom_test_check_environment
()
{
if
[
-z
"
${
LIBAOM_BIN_PATH
}
"
]
||
\
[
-z
"
${
LIBAOM_CONFIG_PATH
}
"
]
||
\
[
-z
"
${
LIB
VPX
_TEST_DATA_PATH
}
"
]
;
then
[
-z
"
${
LIB
AOM
_TEST_DATA_PATH
}
"
]
;
then
return
1
fi
}
...
...
@@ -360,7 +360,7 @@ while [ -n "$1" ]; do
exit
;;
--test-data-path
)
LIB
VPX
_TEST_DATA_PATH
=
"
$2
"
LIB
AOM
_TEST_DATA_PATH
=
"
$2
"
shift
;;
--prefix
)
...
...
@@ -388,7 +388,7 @@ done
# the tests on *nix/macosx.
LIBAOM_BIN_PATH
=
"
${
LIBAOM_BIN_PATH
:-
.
}
"
LIBAOM_CONFIG_PATH
=
"
${
LIBAOM_CONFIG_PATH
:-
.
}
"
LIB
VPX
_TEST_DATA_PATH
=
"
${
LIB
VPX
_TEST_DATA_PATH
:-
.
}
"
LIB
AOM
_TEST_DATA_PATH
=
"
${
LIB
AOM
_TEST_DATA_PATH
:-
.
}
"
# Create a temporary directory for output files, and a trap to clean it up.
if
[
-n
"
${
TMPDIR
}
"
]
;
then
...
...
@@ -413,19 +413,19 @@ if [ "$(is_windows_target)" = "yes" ]; then
fi
# Variables shared by tests.
VP8_IVF_FILE
=
"
${
LIB
VPX
_TEST_DATA_PATH
}
/vp80-00-comprehensive-001.ivf"
AV1_IVF_FILE
=
"
${
LIB
VPX
_TEST_DATA_PATH
}
/vp90-2-09-subpixel-00.ivf"
VP8_IVF_FILE
=
"
${
LIB
AOM
_TEST_DATA_PATH
}
/vp80-00-comprehensive-001.ivf"
AV1_IVF_FILE
=
"
${
LIB
AOM
_TEST_DATA_PATH
}
/vp90-2-09-subpixel-00.ivf"
AV1_WEBM_FILE
=
"
${
LIB
VPX
_TEST_DATA_PATH
}
/vp90-2-00-quantizer-00.webm"
AV1_FPM_WEBM_FILE
=
"
${
LIB
VPX
_TEST_DATA_PATH
}
/vp90-2-07-frame_parallel-1.webm"
AV1_LT_50_FRAMES_WEBM_FILE
=
"
${
LIB
VPX
_TEST_DATA_PATH
}
/vp90-2-02-size-32x08.webm"
AV1_WEBM_FILE
=
"
${
LIB
AOM
_TEST_DATA_PATH
}
/vp90-2-00-quantizer-00.webm"
AV1_FPM_WEBM_FILE
=
"
${
LIB
AOM
_TEST_DATA_PATH
}
/vp90-2-07-frame_parallel-1.webm"
AV1_LT_50_FRAMES_WEBM_FILE
=
"
${
LIB
AOM
_TEST_DATA_PATH
}
/vp90-2-02-size-32x08.webm"
YUV_RAW_INPUT
=
"
${
LIB
VPX
_TEST_DATA_PATH
}
/hantro_collage_w352h288.yuv"
YUV_RAW_INPUT
=
"
${
LIB
AOM
_TEST_DATA_PATH
}
/hantro_collage_w352h288.yuv"
YUV_RAW_INPUT_WIDTH
=
352
YUV_RAW_INPUT_HEIGHT
=
288
Y4M_NOSQ_PAR_INPUT
=
"
${
LIB
VPX
_TEST_DATA_PATH
}
/park_joy_90p_8_420_a10-1.y4m"
Y4M_720P_INPUT
=
"
${
LIB
VPX
_TEST_DATA_PATH
}
/niklas_1280_720_30.y4m"
Y4M_NOSQ_PAR_INPUT
=
"
${
LIB
AOM
_TEST_DATA_PATH
}
/park_joy_90p_8_420_a10-1.y4m"
Y4M_720P_INPUT
=
"
${
LIB
AOM
_TEST_DATA_PATH
}
/niklas_1280_720_30.y4m"
# Setup a trap function to clean up after tests complete.
trap
cleanup EXIT
...
...
@@ -433,7 +433,7 @@ trap cleanup EXIT
vlog
"
$(
basename
"
${
0
%.*
}
"
)
test configuration:
LIBAOM_BIN_PATH=
${
LIBAOM_BIN_PATH
}
LIBAOM_CONFIG_PATH=
${
LIBAOM_CONFIG_PATH
}
LIB
VPX
_TEST_DATA_PATH=
${
LIB
VPX
_TEST_DATA_PATH
}
LIB
AOM
_TEST_DATA_PATH=
${
LIB
AOM
_TEST_DATA_PATH
}
AOM_IVF_FILE=
${
AOM_IVF_FILE
}
AV1_IVF_FILE=
${
AV1_IVF_FILE
}
AV1_WEBM_FILE=
${
AV1_WEBM_FILE
}
...
...
test/twopass_encoder.sh
View file @
732c1885
...
...
@@ -18,7 +18,7 @@
# Environment check: $YUV_RAW_INPUT is required.
twopass_encoder_verify_environment
()
{
if
[
!
-e
"
${
YUV_RAW_INPUT
}
"
]
;
then
echo
"Libaom test data must exist in LIB
VPX
_TEST_DATA_PATH."
echo
"Libaom test data must exist in LIB
AOM
_TEST_DATA_PATH."
return
1
fi
}
...
...
test/video_source.h
View file @
732c1885
...
...
@@ -25,22 +25,22 @@
namespace
libaom_test
{
// Helper macros to ensure LIB
VPX
_TEST_DATA_PATH is a quoted string.
// Helper macros to ensure LIB
AOM
_TEST_DATA_PATH is a quoted string.
// These are undefined right below GetDataPath
// NOTE: LIB
VPX
_TEST_DATA_PATH MUST NOT be a quoted string before
// NOTE: LIB
AOM
_TEST_DATA_PATH MUST NOT be a quoted string before
// Stringification or the GetDataPath will fail at runtime
#define TO_STRING(S) #S
#define STRINGIFY(S) TO_STRING(S)
// A simple function to encapsulate cross platform retrieval of test data path
static
std
::
string
GetDataPath
()
{
const
char
*
const
data_path
=
getenv
(
"LIB
VPX
_TEST_DATA_PATH"
);
const
char
*
const
data_path
=
getenv
(
"LIB
AOM
_TEST_DATA_PATH"
);
if
(
data_path
==
NULL
)
{
#ifdef LIB
VPX
_TEST_DATA_PATH
#ifdef LIB
AOM
_TEST_DATA_PATH
// In some environments, we cannot set environment variables
// Instead, we set the data path by using a preprocessor symbol
// which can be set from make files
return
STRINGIFY
(
LIB
VPX
_TEST_DATA_PATH
);
return
STRINGIFY
(
LIB
AOM
_TEST_DATA_PATH
);
#else
return
"."
;
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment