Reland of Bump up scaling limit for MediaCodec. (patchset #1 id:1 of https://codereview.webrtc.org/2562963002/ )

Reason for revert:
Fixed perf tests.

Original issue's description:
> Revert of Bump up scaling limit for MediaCodec. (patchset #3 id:40001 of https://codereview.webrtc.org/2566533002/ )
>
> Reason for revert:
> Failed on the perf tests.
>
> Original issue's description:
> > 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
> >
> > Committed: https://crrev.com/3e9b1330467edf6b5af609b375c15efb9e6b4933
> > Cr-Commit-Position: refs/heads/master@{#15498}
>
> TBR=magjed@webrtc.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=webrtc:6837
>
> Committed: https://crrev.com/1cd0a0ab43846072b1e2f37c953ecd770feb5963
> Cr-Commit-Position: refs/heads/master@{#15500}

TBR=magjed@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:6837

Review-Url: https://codereview.webrtc.org/2567613002
Cr-Commit-Position: refs/heads/master@{#15505}
This commit is contained in:
kthelgason 2016-12-09 03:53:59 -08:00 committed by Commit bot
parent 0e738d4fb2
commit 33ce88926a
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;
@ -924,8 +934,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++) {