From 560ddb7321f2ae42ff1eb4c79d7c65d59f61dfe2 Mon Sep 17 00:00:00 2001 From: kthelgason Date: Thu, 23 Feb 2017 03:22:02 -0800 Subject: [PATCH] Set scaling limit at 320 * 180 for all implementations. The MediaCodec decoder on android has trouble decoding video at so low resolutions. We set the limit a bit higher for all implementations pending a robust software fallback implementation for MediaCodec. BUG=webrtc:7206 Review-Url: https://codereview.webrtc.org/2709153002 Cr-Commit-Position: refs/heads/master@{#16798} --- webrtc/video/vie_encoder.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/webrtc/video/vie_encoder.cc b/webrtc/video/vie_encoder.cc index 1458af266f..7880c4a275 100644 --- a/webrtc/video/vie_encoder.cc +++ b/webrtc/video/vie_encoder.cc @@ -35,14 +35,12 @@ using DegradationPreference = VideoSendStream::DegradationPreference; // Time interval for logging frame counts. const int64_t kFrameLogIntervalMs = 60000; + // We will never ask for a resolution lower than this. -#if defined(WEBRTC_ANDROID) // TODO(kthelgason): Lower this limit when better testing // on MediaCodec and fallback implementations are in place. +// See https://bugs.chromium.org/p/webrtc/issues/detail?id=7206 const int kMinPixelsPerFrame = 320 * 180; -#else -const int kMinPixelsPerFrame = 120 * 90; -#endif // The maximum number of frames to drop at beginning of stream // to try and achieve desired bitrate.