History

Set default encode test driver to 1 column and 1 thread.

Frank Galligan committed 11 years ago

Commit 89df6d11 parent 066ed602 files · +14 −1Browse files

Showing the changes to test/encode_test_driver.cc (1 of 2 files). Show all

Unified · Split

test/encode_test_driver.cc+13−0
@@ -8,6 +8,8 @@ · 7 unmodified lines
88 * be found in the AUTHORS file in the root of the source tree.
99 */
1010
11+#include <string>
12+
1113 #include "./vpx_config.h"
1214 #include "test/codec_factory.h"
1315 #include "test/encode_test_driver.h"
@@ -26,9 +28,20 @@ void Encoder::InitEncoder(VideoSource *video) { · 12 unmodified lines
2628 cfg_.g_h = img->d_h;
2729 cfg_.g_timebase = video->timebase();
2830 cfg_.rc_twopass_stats_in = stats_->buf();
31+
32+ // Default to 1 thread and 1 tile column.
33+ cfg_.g_threads = 1;
2934 res = vpx_codec_enc_init(&encoder_, CodecInterface(), &cfg_,
3035 init_flags_);
3136 ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
37+
38+ std::string codec_name(encoder_.name);
39+ if (codec_name.find("WebM Project VP9 Encoder") != std::string::npos) {
40+ const int log2_tile_columns = 0;
41+ res = vpx_codec_control_(&encoder_, VP9E_SET_TILE_COLUMNS,
42+ log2_tile_columns);
43+ ASSERT_EQ(VPX_CODEC_OK, res) << EncoderError();
44+ }
3245 }
3346 }
3447

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t