Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: source/libvpx/test/encode_test_driver.cc

Issue 1015483002: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/test/datarate_test.cc ('k') | source/libvpx/test/test.mk » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/test/encode_test_driver.cc
diff --git a/source/libvpx/test/encode_test_driver.cc b/source/libvpx/test/encode_test_driver.cc
index b03235b71802931ae9a27e05e2e0b14a4fdc7a58..f3d8e31daf76765e6692f7d698c5be5bfbef5bd9 100644
--- a/source/libvpx/test/encode_test_driver.cc
+++ b/source/libvpx/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();
+ }
}
}
« no previous file with comments | « source/libvpx/test/datarate_test.cc ('k') | source/libvpx/test/test.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698