Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
91013632
Commit
91013632
authored
10 years ago
by
Vignesh Venkatasubramanian
Committed by
Gerrit Code Review
10 years ago
Browse files
Options
Download
Plain Diff
Merge "Enable tests using WebM files only if webm_io is enabled"
parents
95735c39
68ff368d
v1.14.0-linphone
1.4.X
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
nextgen
nextgenv2
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
test/external_frame_buffer_test.cc
+13
-0
test/external_frame_buffer_test.cc
test/test.mk
+6
-2
test/test.mk
test/test_vector_test.cc
+9
-0
test/test_vector_test.cc
test/vp9_thread_test.cc
+5
-0
test/vp9_thread_test.cc
with
33 additions
and
2 deletions
test/external_frame_buffer_test.cc
+
13
−
0
View file @
91013632
...
...
@@ -10,13 +10,16 @@
#include
<string>
#include
"./vpx_config.h"
#include
"test/codec_factory.h"
#include
"test/decode_test_driver.h"
#include
"test/ivf_video_source.h"
#include
"test/md5_helper.h"
#include
"test/test_vectors.h"
#include
"test/util.h"
#if CONFIG_WEBM_IO
#include
"test/webm_video_source.h"
#endif
namespace
{
...
...
@@ -267,6 +270,7 @@ class ExternalFrameBufferMD5Test
ExternalFrameBufferList
fb_list_
;
};
#if CONFIG_WEBM_IO
// Class for testing passing in external frame buffers to libvpx.
class
ExternalFrameBufferTest
:
public
::
testing
::
Test
{
protected:
...
...
@@ -340,6 +344,7 @@ class ExternalFrameBufferTest : public ::testing::Test {
int
num_buffers_
;
ExternalFrameBufferList
fb_list_
;
};
#endif // CONFIG_WEBM_IO
// This test runs through the set of test vectors, and decodes them.
// Libvpx will call into the application to allocate a frame buffer when
...
...
@@ -366,7 +371,13 @@ TEST_P(ExternalFrameBufferMD5Test, ExtFBMD5Match) {
if
(
filename
.
substr
(
filename
.
length
()
-
3
,
3
)
==
"ivf"
)
{
video
=
new
libvpx_test
::
IVFVideoSource
(
filename
);
}
else
{
#if CONFIG_WEBM_IO
video
=
new
libvpx_test
::
WebMVideoSource
(
filename
);
#else
fprintf
(
stderr
,
"WebM IO is disabled, skipping test vector %s
\n
"
,
filename
.
c_str
());
return
;
#endif
}
ASSERT_TRUE
(
video
!=
NULL
);
video
->
Init
();
...
...
@@ -380,6 +391,7 @@ TEST_P(ExternalFrameBufferMD5Test, ExtFBMD5Match) {
delete
video
;
}
#if CONFIG_WEBM_IO
TEST_F
(
ExternalFrameBufferTest
,
MinFrameBuffers
)
{
// Minimum number of external frame buffers for VP9 is
// #VP9_MAXIMUM_REF_BUFFERS + #VPX_MAXIMUM_WORK_BUFFERS.
...
...
@@ -460,6 +472,7 @@ TEST_F(ExternalFrameBufferTest, SetAfterDecode) {
SetFrameBufferFunctions
(
num_buffers
,
get_vp9_frame_buffer
,
release_vp9_frame_buffer
));
}
#endif // CONFIG_WEBM_IO
VP9_INSTANTIATE_TEST_CASE
(
ExternalFrameBufferMD5Test
,
::
testing
::
ValuesIn
(
libvpx_test
::
kVP9TestVectors
,
...
...
This diff is collapsed.
Click to expand it.
test/test.mk
+
6
−
2
View file @
91013632
...
...
@@ -42,6 +42,7 @@ LIBVPX_TEST_SRCS-yes += encode_test_driver.cc
LIBVPX_TEST_SRCS-yes
+=
encode_test_driver.h
## WebM Parsing
ifeq
($(CONFIG_WEBM_IO), yes)
NESTEGG_SRCS
+=
../third_party/nestegg/halloc/halloc.h
NESTEGG_SRCS
+=
../third_party/nestegg/halloc/src/align.h
NESTEGG_SRCS
+=
../third_party/nestegg/halloc/src/halloc.c
...
...
@@ -53,11 +54,14 @@ LIBVPX_TEST_SRCS-$(CONFIG_DECODERS) += ../tools_common.h
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)
+=
../webmdec.c
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)
+=
../webmdec.h
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)
+=
webm_video_source.h
endif
LIBVPX_TEST_SRCS-$(CONFIG_DECODERS)
+=
test_vector_test.cc
# Currently we only support decoder perf tests for vp9
ifeq
($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_VP9_DECODER), yesyes)
# Currently we only support decoder perf tests for vp9. Also they read from WebM
# files, so WebM IO is required.
ifeq
($(CONFIG_DECODE_PERF_TESTS)$(CONFIG_VP9_DECODER)$(CONFIG_WEBM_IO), \
yesyesyes)
LIBVPX_TEST_SRCS-yes
+=
decode_perf_test.cc
endif
...
...
This diff is collapsed.
Click to expand it.
test/test_vector_test.cc
+
9
−
0
View file @
91013632
...
...
@@ -12,13 +12,16 @@
#include
<cstdlib>
#include
<string>
#include
"third_party/googletest/src/include/gtest/gtest.h"
#include
"./vpx_config.h"
#include
"test/codec_factory.h"
#include
"test/decode_test_driver.h"
#include
"test/ivf_video_source.h"
#include
"test/md5_helper.h"
#include
"test/test_vectors.h"
#include
"test/util.h"
#if CONFIG_WEBM_IO
#include
"test/webm_video_source.h"
#endif
#include
"vpx_mem/vpx_mem.h"
namespace
{
...
...
@@ -75,7 +78,13 @@ TEST_P(TestVectorTest, MD5Match) {
if
(
filename
.
substr
(
filename
.
length
()
-
3
,
3
)
==
"ivf"
)
{
video
=
new
libvpx_test
::
IVFVideoSource
(
filename
);
}
else
if
(
filename
.
substr
(
filename
.
length
()
-
4
,
4
)
==
"webm"
)
{
#if CONFIG_WEBM_IO
video
=
new
libvpx_test
::
WebMVideoSource
(
filename
);
#else
fprintf
(
stderr
,
"WebM IO is disabled, skipping test vector %s
\n
"
,
filename
.
c_str
());
return
;
#endif
}
video
->
Init
();
...
...
This diff is collapsed.
Click to expand it.
test/vp9_thread_test.cc
+
5
−
0
View file @
91013632
...
...
@@ -11,10 +11,13 @@
#include
<string>
#include
"third_party/googletest/src/include/gtest/gtest.h"
#include
"./vpx_config.h"
#include
"test/codec_factory.h"
#include
"test/decode_test_driver.h"
#include
"test/md5_helper.h"
#if CONFIG_WEBM_IO
#include
"test/webm_video_source.h"
#endif
#include
"vp9/decoder/vp9_thread.h"
namespace
{
...
...
@@ -97,6 +100,7 @@ TEST_P(VP9WorkerThreadTest, HookFailure) {
// -----------------------------------------------------------------------------
// Multi-threaded decode tests
#if CONFIG_WEBM_IO
// Decodes |filename| with |num_threads|. Returns the md5 of the decoded frames.
string
DecodeFile
(
const
string
&
filename
,
int
num_threads
)
{
libvpx_test
::
WebMVideoSource
video
(
filename
);
...
...
@@ -212,6 +216,7 @@ TEST(VP9DecodeMTTest, MTDecode3) {
}
}
}
#endif // CONFIG_WEBM_IO
INSTANTIATE_TEST_CASE_P
(
Synchronous
,
VP9WorkerThreadTest
,
::
testing
::
Bool
());
...
...
This diff is collapsed.
Click to expand it.
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!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets