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

Unified Diff: webrtc/video/video_send_stream_tests.cc

Issue 1603643006: Reallocate encoded buffer size if needed. Initially set to the input image size. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 11 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/video/video_send_stream_tests.cc
diff --git a/webrtc/video/video_send_stream_tests.cc b/webrtc/video/video_send_stream_tests.cc
index 4cf92748a8d3225755a9d7c09119d845cd076aed..f0f1ca4d2c1e1fdb891214c79ac5da0f17f5ef54 100644
--- a/webrtc/video/video_send_stream_tests.cc
+++ b/webrtc/video/video_send_stream_tests.cc
@@ -2208,6 +2208,33 @@ void VideoSendStreamTest::TestVp9NonFlexMode(uint8_t num_temporal_layers,
RunBaseTest(&test);
}
+TEST_F(VideoSendStreamTest, Vp9NonFlexModeSmallResolution) {
+ static const size_t kNumFramesToSend = 50;
+ static const int kWidth = 4;
+ static const int kHeight = 4;
+ class NonFlexibleModeResolution : public Vp9HeaderObserver {
+ void ModifyVideoConfigsHook(
+ VideoSendStream::Config* send_config,
+ std::vector<VideoReceiveStream::Config>* receive_configs,
+ VideoEncoderConfig* encoder_config) override {
+ vp9_settings_.flexibleMode = false;
+ vp9_settings_.numberOfTemporalLayers = 1;
+ vp9_settings_.numberOfSpatialLayers = 1;
+
+ EXPECT_EQ(1u, encoder_config->streams.size());
+ encoder_config->streams[0].width = kWidth;
+ encoder_config->streams[0].height = kHeight;
+ }
+
+ void InspectHeader(const RTPVideoHeaderVP9& vp9_header) override {
+ if (frames_sent_ > kNumFramesToSend)
+ observation_complete_.Set();
+ }
+ } test;
+
+ RunBaseTest(&test);
+}
+
#if !defined(MEMORY_SANITIZER)
// Fails under MemorySanitizer:
// See https://code.google.com/p/webrtc/issues/detail?id=5402.

Powered by Google App Engine
This is Rietveld 408576698