Bump up scaling limit for MediaCodec.

Wait until MediaCodec is better tested at these low
resolutions, and until some fallback mechanism is in place
before lowering this threshold.

BUG=webrtc:6837

Review-Url: https://codereview.webrtc.org/2566533002
Cr-Commit-Position: refs/heads/master@{#15498}
This commit is contained in:
kthelgason 2016-12-09 01:46:42 -08:00 committed by Commit bot
parent 3b11d00672
commit 3e9b133046
2 changed files with 16 additions and 2 deletions

View File

@ -33,7 +33,13 @@ namespace {
// 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.
const int kMinPixelsPerFrame = 320 * 180;
#else
const int kMinPixelsPerFrame = 120 * 90;
#endif
// TODO(pbos): Lower these thresholds (to closer to 100%) when we handle
// pipelining encoders better (multiple input frames before something comes

View File

@ -20,6 +20,16 @@
#include "webrtc/video/send_statistics_proxy.h"
#include "webrtc/video/vie_encoder.h"
namespace {
#if defined(WEBRTC_ANDROID)
// TODO(kthelgason): Lower this limit when better testing
// on MediaCodec and fallback implementations are in place.
const int kMinPixelsPerFrame = 320 * 180;
#else
const int kMinPixelsPerFrame = 120 * 90;
#endif
}
namespace webrtc {
using DegredationPreference = VideoSendStream::DegradationPreference;
@ -1021,8 +1031,6 @@ TEST_F(ViEEncoderTest, DoesNotScaleBelowSetLimit) {
const int kTargetBitrateBps = 100000;
int frame_width = 1280;
int frame_height = 720;
// from vie_encoder.cc
const int kMinPixelsPerFrame = 120 * 90;
vie_encoder_->OnBitrateUpdated(kTargetBitrateBps, 0, 0);
for (size_t i = 1; i <= 10; i++) {