summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFrank Galligan <fgalligan@google.com>2015-03-09 15:52:29 -0700
committerFrank Galligan <fgalligan@google.com>2015-03-13 08:37:10 -0700
commit89df6d1ab04e32ec7869e4ed07ca503b7efbf027 (patch)
treed8c651977d6c8ffc8ae673ad400c97690f339ad0 /test
parent066ed601a5293e529cf1f93e842716bac3a3e321 (diff)
downloadlibvpx-89df6d1ab04e32ec7869e4ed07ca503b7efbf027.tar
libvpx-89df6d1ab04e32ec7869e4ed07ca503b7efbf027.tar.gz
libvpx-89df6d1ab04e32ec7869e4ed07ca503b7efbf027.tar.bz2
libvpx-89df6d1ab04e32ec7869e4ed07ca503b7efbf027.zip
Set default encode test driver to 1 column and 1 thread.
Change-Id: I70ee538609cefad76b8ce9b225bbf8d8447aff23
Diffstat (limited to 'test')
-rw-r--r--test/encode_test_driver.cc13
-rw-r--r--test/test.mk2
2 files changed, 14 insertions, 1 deletions
diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc
index b03235b71..f3d8e31da 100644
--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -8,6 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include <string>
+
#include "./vpx_config.h"
#include "test/codec_factory.h"
#include "test/encode_test_driver.h"
@@ -26,9 +28,20 @@ void Encoder::InitEncoder(VideoSource *video) {
cfg_.g_h = img->d_h;
cfg_.g_timebase = video->timebase();
cfg_.rc_twopass_stats_in = stats_->buf();
+
+ // Default to 1 thread and 1 tile column.
+ cfg_.g_threads = 1;
res = vpx_codec_enc_init(&encoder_, CodecInterface(), &cfg_,
init_flags_);
ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+
+ std::string codec_name(encoder_.name);
+ if (codec_name.find("WebM Project VP9 Encoder") != std::string::npos) {
+ const int log2_tile_columns = 0;
+ res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
+ log2_tile_columns);
+ ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
+ }
}
}
diff --git a/test/test.mk b/test/test.mk
index 342f3f092..44f2ba4fd 100644
--- a/test/test.mk
+++ b/test/test.mk
@@ -46,7 +46,7 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_ethread_test.cc
LIBVPX_TEST_SRCS-yes += decode_test_driver.cc
LIBVPX_TEST_SRCS-yes += decode_test_driver.h
-LIBVPX_TEST_SRCS-yes += encode_test_driver.cc
+LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += encode_test_driver.cc
LIBVPX_TEST_SRCS-yes += encode_test_driver.h
## IVF writing.