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

Unified Diff: webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h

Issue 2753783002: Delete VP8 feedback mode. (Closed)
Patch Set: Created 3 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
Index: webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
diff --git a/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h b/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
index d8e247e26a7563163e0e257d86055015f7035d9d..a06d8690fa347da8167ea66afb70dae4f0273f8d 100644
--- a/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
+++ b/webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h
@@ -224,7 +224,6 @@ class TestVp8Simulcast : public ::testing::Test {
settings->VP8()->denoisingOn = true;
settings->VP8()->errorConcealmentOn = false;
settings->VP8()->automaticResizeOn = false;
- settings->VP8()->feedbackModeOn = false;
settings->VP8()->frameDroppingOn = true;
settings->VP8()->keyFrameInterval = 3000;
}
@@ -572,6 +571,7 @@ class TestVp8Simulcast : public ::testing::Test {
void TestSwitchingToOneSmallStream() { SwitchingToOneStream(4, 4); }
+ // TODO(nisse): Rename, refactor or delete test?
sprang_webrtc 2017/03/20 16:22:30 I vote delete. The other parts should already be c
nisse-webrtc 2017/03/21 07:26:02 Deleted.
void TestRPSIEncoder() {
Vp8TestEncodedImageCallback encoder_callback;
encoder_->RegisterEncodeCompleteCallback(&encoder_callback);
@@ -586,7 +586,6 @@ class TestVp8Simulcast : public ::testing::Test {
&layer_sync, 0);
EXPECT_EQ(0, temporal_layer);
EXPECT_TRUE(layer_sync);
- int key_frame_picture_id = picture_id;
input_frame_->set_timestamp(input_frame_->timestamp() + 3000);
EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL));
@@ -608,37 +607,9 @@ class TestVp8Simulcast : public ::testing::Test {
&layer_sync, 0);
EXPECT_EQ(2, temporal_layer);
EXPECT_FALSE(layer_sync);
-
- CodecSpecificInfo codec_specific;
- codec_specific.codecType = kVideoCodecVP8;
- codec_specific.codecSpecific.VP8.hasReceivedRPSI = true;
-
- // Must match last key frame to trigger.
- codec_specific.codecSpecific.VP8.pictureIdRPSI = key_frame_picture_id;
-
- input_frame_->set_timestamp(input_frame_->timestamp() + 3000);
- EXPECT_EQ(0, encoder_->Encode(*input_frame_, &codec_specific, NULL));
- encoder_callback.GetLastEncodedFrameInfo(&picture_id, &temporal_layer,
- &layer_sync, 0);
-
- EXPECT_EQ(0, temporal_layer);
- EXPECT_TRUE(layer_sync);
-
- // Must match last key frame to trigger, test bad id.
- codec_specific.codecSpecific.VP8.pictureIdRPSI = key_frame_picture_id + 17;
-
- input_frame_->set_timestamp(input_frame_->timestamp() + 3000);
- EXPECT_EQ(0, encoder_->Encode(*input_frame_, &codec_specific, NULL));
- encoder_callback.GetLastEncodedFrameInfo(&picture_id, &temporal_layer,
- &layer_sync, 0);
-
- EXPECT_EQ(2, temporal_layer);
- // The previous frame was a base layer sync (since it was a frame that
- // only predicts from key frame and hence resets the temporal pattern),
- // so this frame (the next one) must have |layer_sync| set to true.
- EXPECT_TRUE(layer_sync);
}
+ // TODO(nisse): Rename, refactor or delete test?
sprang_webrtc 2017/03/20 16:22:30 Ditto
nisse-webrtc 2017/03/21 07:26:02 Also deleted.
void TestRPSIEncodeDecode() {
Vp8TestEncodedImageCallback encoder_callback;
Vp8TestDecodedImageCallback decoder_callback;
@@ -662,7 +633,6 @@ class TestVp8Simulcast : public ::testing::Test {
&layer_sync, 0);
EXPECT_EQ(0, temporal_layer);
EXPECT_TRUE(layer_sync);
- int key_frame_picture_id = picture_id;
// Change color.
plane_offset[kYPlane] += 1;
@@ -689,28 +659,6 @@ class TestVp8Simulcast : public ::testing::Test {
input_frame_->set_timestamp(input_frame_->timestamp() + 3000);
EXPECT_EQ(0, encoder_->Encode(*input_frame_, NULL, NULL));
-
- CodecSpecificInfo codec_specific;
- codec_specific.codecType = kVideoCodecVP8;
- codec_specific.codecSpecific.VP8.hasReceivedRPSI = true;
- // Must match last key frame to trigger.
- codec_specific.codecSpecific.VP8.pictureIdRPSI = key_frame_picture_id;
-
- // Change color back to original.
- plane_offset[kYPlane] = kColorY;
- plane_offset[kUPlane] = kColorU;
- plane_offset[kVPlane] = kColorV;
- CreateImage(input_buffer_, plane_offset);
-
- input_frame_->set_timestamp(input_frame_->timestamp() + 3000);
- EXPECT_EQ(0, encoder_->Encode(*input_frame_, &codec_specific, NULL));
-
- EncodedImage encoded_frame;
- encoder_callback.GetLastEncodedKeyFrame(&encoded_frame);
- decoder_->Decode(encoded_frame, false, NULL);
- encoder_callback.GetLastEncodedFrame(&encoded_frame);
- decoder_->Decode(encoded_frame, false, NULL);
- EXPECT_EQ(2, decoder_callback.DecodedFrames());
}
// Test the layer pattern and sync flag for various spatial-temporal patterns.

Powered by Google App Engine
This is Rietveld 408576698