| Index: webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
|
| diff --git a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
|
| index 63be85afdcabfd379fe11bad9b739d9a203fa28a..3a04965febb88d32028a8f586663b2154f8b1a00 100644
|
| --- a/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
|
| +++ b/webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc
|
| @@ -16,6 +16,7 @@
|
| #include "webrtc/base/timeutils.h"
|
| #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
|
| #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
|
| +#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
|
| #include "webrtc/test/frame_utils.h"
|
| #include "webrtc/test/gtest.h"
|
| #include "webrtc/test/testsupport/fileutils.h"
|
| @@ -161,6 +162,8 @@ class TestVp8Impl : public ::testing::Test {
|
| codec_inst_.maxBitrate = 4000;
|
| codec_inst_.qpMax = 56;
|
| codec_inst_.codecSpecific.VP8.denoisingOn = true;
|
| + codec_inst_.codecSpecific.VP8.tl_factory = &tl_factory_;
|
| + codec_inst_.codecSpecific.VP8.numberOfTemporalLayers = 1;
|
|
|
| EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK,
|
| encoder_->InitEncode(&codec_inst_, 1, 1440));
|
| @@ -201,6 +204,7 @@ class TestVp8Impl : public ::testing::Test {
|
| EncodedImage encoded_frame_;
|
| VideoFrame decoded_frame_;
|
| VideoCodec codec_inst_;
|
| + TemporalLayersFactory tl_factory_;
|
| };
|
|
|
| TEST_F(TestVp8Impl, EncoderParameterTest) {
|
| @@ -215,11 +219,16 @@ TEST_F(TestVp8Impl, EncoderParameterTest) {
|
| codec_inst_.qpMax = 56;
|
| codec_inst_.codecSpecific.VP8.complexity = kComplexityNormal;
|
| codec_inst_.codecSpecific.VP8.numberOfTemporalLayers = 1;
|
| + codec_inst_.codecSpecific.VP8.tl_factory = &tl_factory_;
|
| +
|
| // Calls before InitEncode().
|
| EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, encoder_->Release());
|
| int bit_rate = 300;
|
| + BitrateAllocation bitrate_allocation;
|
| + bitrate_allocation.SetBitrate(0, 0, bit_rate * 1000);
|
| EXPECT_EQ(WEBRTC_VIDEO_CODEC_UNINITIALIZED,
|
| - encoder_->SetRates(bit_rate, codec_inst_.maxFramerate));
|
| + encoder_->SetRateAllocation(bitrate_allocation,
|
| + codec_inst_.maxFramerate));
|
|
|
| EXPECT_EQ(WEBRTC_VIDEO_CODEC_OK, encoder_->InitEncode(&codec_inst_, 1, 1440));
|
|
|
|
|