Index: webrtc/modules/video_coding/codecs/vp8/default_temporal_layers_unittest.cc |
diff --git a/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers_unittest.cc b/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers_unittest.cc |
index e22c8b46757117fd8d805eafb0b164771dbd4d8a..f7502447b853e9af1d3e6c9eaa45baa434d11702 100644 |
--- a/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers_unittest.cc |
+++ b/webrtc/modules/video_coding/codecs/vp8/default_temporal_layers_unittest.cc |
@@ -8,9 +8,10 @@ |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
+#include "webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h" |
#include "vpx/vp8cx.h" |
#include "vpx/vpx_encoder.h" |
-#include "webrtc/modules/video_coding/codecs/vp8/default_temporal_layers.h" |
+#include "webrtc/modules/video_coding/codecs/vp8/vp8_impl.h" |
#include "webrtc/modules/video_coding/include/video_codec_interface.h" |
#include "webrtc/test/gtest.h" |
@@ -83,7 +84,8 @@ TEST(TemporalLayersTest, 2Layers) { |
uint32_t timestamp = 0; |
for (int i = 0; i < 16; ++i) { |
- EXPECT_EQ(expected_flags[i], tl.EncodeFlags(timestamp)); |
+ TemporalReferences tl_config = tl.UpdateLayerConfig(timestamp); |
+ EXPECT_EQ(expected_flags[i], VP8EncoderImpl::EncodeFlags(tl_config)); |
tl.PopulateCodecSpecific(false, &vp8_info, 0); |
EXPECT_EQ(expected_temporal_idx[i], vp8_info.temporalIdx); |
EXPECT_EQ(expected_layer_sync[i], vp8_info.layerSync); |
@@ -125,7 +127,8 @@ TEST(TemporalLayersTest, 3Layers) { |
unsigned int timestamp = 0; |
for (int i = 0; i < 16; ++i) { |
- EXPECT_EQ(expected_flags[i], tl.EncodeFlags(timestamp)); |
+ TemporalReferences tl_config = tl.UpdateLayerConfig(timestamp); |
+ EXPECT_EQ(expected_flags[i], VP8EncoderImpl::EncodeFlags(tl_config)); |
tl.PopulateCodecSpecific(false, &vp8_info, 0); |
EXPECT_EQ(expected_temporal_idx[i], vp8_info.temporalIdx); |
EXPECT_EQ(expected_layer_sync[i], vp8_info.layerSync); |
@@ -166,7 +169,8 @@ TEST(TemporalLayersTest, 4Layers) { |
uint32_t timestamp = 0; |
for (int i = 0; i < 16; ++i) { |
- EXPECT_EQ(expected_flags[i], tl.EncodeFlags(timestamp)); |
+ TemporalReferences tl_config = tl.UpdateLayerConfig(timestamp); |
+ EXPECT_EQ(expected_flags[i], VP8EncoderImpl::EncodeFlags(tl_config)); |
tl.PopulateCodecSpecific(false, &vp8_info, 0); |
EXPECT_EQ(expected_temporal_idx[i], vp8_info.temporalIdx); |
EXPECT_EQ(expected_layer_sync[i], vp8_info.layerSync); |
@@ -195,13 +199,15 @@ TEST(TemporalLayersTest, KeyFrame) { |
uint32_t timestamp = 0; |
for (int i = 0; i < 7; ++i) { |
- EXPECT_EQ(expected_flags[i], tl.EncodeFlags(timestamp)); |
+ TemporalReferences tl_config = tl.UpdateLayerConfig(timestamp); |
+ EXPECT_EQ(expected_flags[i], VP8EncoderImpl::EncodeFlags(tl_config)); |
tl.PopulateCodecSpecific(true, &vp8_info, 0); |
EXPECT_EQ(expected_temporal_idx[i], vp8_info.temporalIdx); |
EXPECT_EQ(true, vp8_info.layerSync); |
timestamp += 3000; |
} |
- EXPECT_EQ(expected_flags[7], tl.EncodeFlags(timestamp)); |
+ TemporalReferences tl_config = tl.UpdateLayerConfig(timestamp); |
+ EXPECT_EQ(expected_flags[7], VP8EncoderImpl::EncodeFlags(tl_config)); |
tl.PopulateCodecSpecific(false, &vp8_info, 0); |
EXPECT_EQ(expected_temporal_idx[7], vp8_info.temporalIdx); |
EXPECT_EQ(true, vp8_info.layerSync); |