Unified · Split
| @@ -8,6 +8,8 @@ · 7 unmodified lines | ||
| 8 | 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | 9 | */ |
| 10 | 10 | |
| 11 | +#include <string> | |
| 12 | + | |
| 11 | 13 | #include "./vpx_config.h" |
| 12 | 14 | #include "test/codec_factory.h" |
| 13 | 15 | #include "test/encode_test_driver.h" |
| @@ -26,9 +28,20 @@ void Encoder::InitEncoder(VideoSource *video) { · 12 unmodified lines | ||
| 26 | 28 | cfg_.g_h = img->d_h; |
| 27 | 29 | cfg_.g_timebase = video->timebase(); |
| 28 | 30 | cfg_.rc_twopass_stats_in = stats_->buf(); |
| 31 | + | |
| 32 | + // Default to 1 thread and 1 tile column. | |
| 33 | + cfg_.g_threads = 1; | |
| 29 | 34 | res = vpx_codec_enc_init(&encoder_, CodecInterface(), &cfg_, |
| 30 | 35 | init_flags_); |
| 31 | 36 | 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 | + } | |
| 32 | 45 | } |
| 33 | 46 | } |
| 34 | 47 | |
| @@ -46,7 +46,7 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_ethread_test.cc · 45 unmodified lines | ||
| 46 | 46 | |
| 47 | 47 | LIBVPX_TEST_SRCS-yes += decode_test_driver.cc |
| 48 | 48 | LIBVPX_TEST_SRCS-yes += decode_test_driver.h |
| 49 | −LIBVPX_TEST_SRCS-yes += encode_test_driver.cc | |
| 49 | +LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += encode_test_driver.cc | |
| 50 | 50 | LIBVPX_TEST_SRCS-yes += encode_test_driver.h |
| 51 | 51 | |
| 52 | 52 | ## IVF writing. |