Skip to content

Commit

Permalink
Reland of Set scaling limit at 320 * 180 for all implementations. (pa…
Browse files Browse the repository at this point in the history
…tchset #1 id:1 of https://codereview.webrtc.org/2711913007/ )

Reason for revert:
Reland after fixing broken perf tests.

Original issue's description:
> Revert of Set scaling limit at 320 * 180 for all implementations. (patchset #2 id:20001 of https://codereview.webrtc.org/2709153002/ )
>
> Reason for revert:
> Looks like webrtc_perf_test started failing on linux, mac and windows after this cl landed.
>
> Example failure:
>
> https://build.chromium.org/p/client.webrtc.perf/builders/Linux%20Trusty/builds/1386/steps/webrtc_perf_tests/logs/stdio
>
> [ RUN      ] CallPerfTest.ReceivesCpuOveruseAndUnderuse
> ../../webrtc/call/call_perf_tests.cc:522: Failure
> Value of: Wait()
>   Actual: false
> Expected: true
> Timed out before receiving an overuse callback.
> [  FAILED  ] CallPerfTest.ReceivesCpuOveruseAndUnderuse (120056 ms)
>
>
> Original issue's description:
> > 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}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/560ddb7321f2ae42ff1eb4c79d7c65d59f61dfe2
>
> [email protected],[email protected],[email protected]
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:7206
>
> Review-Url: https://codereview.webrtc.org/2711913007
> Cr-Commit-Position: refs/heads/master@{#16839}
> Committed: https://chromium.googlesource.com/external/webrtc/+/37510bf0946afef1015eabb66a801af3ac30042a

[email protected],[email protected],[email protected]
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=webrtc:7206

Review-Url: https://codereview.webrtc.org/2718013002
Cr-Commit-Position: refs/heads/master@{#16853}
  • Loading branch information
kthelgason authored and Commit bot committed Feb 27, 2017
1 parent c0e61c8 commit fa5fdce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
9 changes: 3 additions & 6 deletions webrtc/call/call_perf_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,7 @@ TEST_F(CallPerfTest, CaptureNtpTimeWithNetworkJitter) {
const int kRunTimeMs = 20000;
TestCaptureNtpTime(net_config, kThresholdMs, kStartTimeMs, kRunTimeMs);
}
#if defined(WEBRTC_ANDROID)
// This test is disabled on android as it does not update
// sinkWants below 320x180, the starting resolution for these
// tests.
#define ReceivesCpuOveruseAndUnderuse DISABLED_ReceivesCpuOveruseAndUnderuse
#endif

TEST_F(CallPerfTest, ReceivesCpuOveruseAndUnderuse) {
class LoadObserver : public test::SendTest,
public test::FrameGeneratorCapturer::SinkWantsObserver {
Expand All @@ -486,6 +481,8 @@ TEST_F(CallPerfTest, ReceivesCpuOveruseAndUnderuse) {
void OnFrameGeneratorCapturerCreated(
test::FrameGeneratorCapturer* frame_generator_capturer) override {
frame_generator_capturer->SetSinkWantsObserver(this);
// Set a high initial resolution to be sure that we can scale down.
frame_generator_capturer->ChangeResolution(1920, 1080);
}

// OnSinkWantsChanged is called when FrameGeneratorCapturer::AddOrUpdateSink
Expand Down
6 changes: 2 additions & 4 deletions webrtc/video/vie_encoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit fa5fdce

Please sign in to comment.