From 23353ab46585b7c64a8c52cbefe76622313ab048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Bostr=C3=B6m?= Date: Wed, 24 Feb 2016 15:19:55 +0100 Subject: [PATCH] Increase encoder-overuse thresholds for HW. Puts thresholds in a range that works well on Nexus 5X (doesn't seem to trigger overuse), while not disabling them for systems that have a really-really hard time (>200% overuse). BUG=webrtc:5577 R=stefan@webrtc.org Review URL: https://codereview.webrtc.org/1730103003 . Cr-Commit-Position: refs/heads/master@{#11744} --- webrtc/video/video_send_stream.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/webrtc/video/video_send_stream.cc b/webrtc/video/video_send_stream.cc index b2ed30e1ac..fe4d1d903b 100644 --- a/webrtc/video/video_send_stream.cc +++ b/webrtc/video/video_send_stream.cc @@ -135,11 +135,15 @@ bool PayloadTypeSupportsSkippingFecPackets(const std::string& payload_name) { return false; } +// TODO(pbos): Lower these thresholds (to closer to 100%) when we handle +// pipelining encoders better (multiple input frames before something comes +// out). This should effectively turn off CPU adaptations for systems that +// remotely cope with the load right now. CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) { CpuOveruseOptions options; if (full_overuse_time) { - options.low_encode_usage_threshold_percent = 100; - options.high_encode_usage_threshold_percent = 120; + options.low_encode_usage_threshold_percent = 150; + options.high_encode_usage_threshold_percent = 200; } return options; }