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

Unified Diff: webrtc/media/base/videoadapter_unittest.cc

Issue 2713683002: Fix issue where video scaling gets stuck at low resolution (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « webrtc/media/base/videoadapter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/base/videoadapter_unittest.cc
diff --git a/webrtc/media/base/videoadapter_unittest.cc b/webrtc/media/base/videoadapter_unittest.cc
index 0bfb6c650392e18b34fa97c67aa19000066ffdd6..6ec90d841d26d77d8d8d9135a2e831c06bbf030d 100644
--- a/webrtc/media/base/videoadapter_unittest.cc
+++ b/webrtc/media/base/videoadapter_unittest.cc
@@ -1016,4 +1016,17 @@ TEST_F(VideoAdapterTest, AdaptFrameResolutionDropWithResolutionRequest) {
&out_width_, &out_height_));
}
+// Test that we will adapt to max given a target pixel count close to max.
+TEST_F(VideoAdapterTest, TestAdaptToMax) {
+ adapter_.OnOutputFormatRequest(VideoFormat(640, 360, 0, FOURCC_I420));
+ adapter_.OnResolutionRequest(rtc::Optional<int>(640 * 360 - 1) /* target */,
+ rtc::Optional<int>());
+
+ EXPECT_TRUE(adapter_.AdaptFrameResolution(640, 360, 0, &cropped_width_,
+ &cropped_height_, &out_width_,
+ &out_height_));
+ EXPECT_EQ(640, out_width_);
+ EXPECT_EQ(360, out_height_);
+}
+
} // namespace cricket
« no previous file with comments | « webrtc/media/base/videoadapter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698