Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(550)

Side by Side Diff: webrtc/video/vie_encoder.cc

Issue 2718013002: Reland of Set scaling limit at 320 * 180 for all implementations. (Closed)
Patch Set: Fix perf tests Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/call/call_perf_tests.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 17 matching lines...) Expand all
28 #include "webrtc/video/overuse_frame_detector.h" 28 #include "webrtc/video/overuse_frame_detector.h"
29 #include "webrtc/video/send_statistics_proxy.h" 29 #include "webrtc/video/send_statistics_proxy.h"
30 #include "webrtc/video_frame.h" 30 #include "webrtc/video_frame.h"
31 namespace webrtc { 31 namespace webrtc {
32 32
33 namespace { 33 namespace {
34 using DegradationPreference = VideoSendStream::DegradationPreference; 34 using DegradationPreference = VideoSendStream::DegradationPreference;
35 35
36 // Time interval for logging frame counts. 36 // Time interval for logging frame counts.
37 const int64_t kFrameLogIntervalMs = 60000; 37 const int64_t kFrameLogIntervalMs = 60000;
38
38 // We will never ask for a resolution lower than this. 39 // We will never ask for a resolution lower than this.
39 #if defined(WEBRTC_ANDROID)
40 // TODO(kthelgason): Lower this limit when better testing 40 // TODO(kthelgason): Lower this limit when better testing
41 // on MediaCodec and fallback implementations are in place. 41 // on MediaCodec and fallback implementations are in place.
42 // See https://bugs.chromium.org/p/webrtc/issues/detail?id=7206
42 const int kMinPixelsPerFrame = 320 * 180; 43 const int kMinPixelsPerFrame = 320 * 180;
43 #else
44 const int kMinPixelsPerFrame = 120 * 90;
45 #endif
46 44
47 // The maximum number of frames to drop at beginning of stream 45 // The maximum number of frames to drop at beginning of stream
48 // to try and achieve desired bitrate. 46 // to try and achieve desired bitrate.
49 const int kMaxInitialFramedrop = 4; 47 const int kMaxInitialFramedrop = 4;
50 48
51 // TODO(pbos): Lower these thresholds (to closer to 100%) when we handle 49 // TODO(pbos): Lower these thresholds (to closer to 100%) when we handle
52 // pipelining encoders better (multiple input frames before something comes 50 // pipelining encoders better (multiple input frames before something comes
53 // out). This should effectively turn off CPU adaptations for systems that 51 // out). This should effectively turn off CPU adaptations for systems that
54 // remotely cope with the load right now. 52 // remotely cope with the load right now.
55 CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) { 53 CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) {
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 --scale_counter_[reason]; 808 --scale_counter_[reason];
811 source_proxy_->RequestHigherResolutionThan(current_pixel_count); 809 source_proxy_->RequestHigherResolutionThan(current_pixel_count);
812 LOG(LS_INFO) << "Scaling up resolution."; 810 LOG(LS_INFO) << "Scaling up resolution.";
813 for (size_t i = 0; i < kScaleReasonSize; ++i) { 811 for (size_t i = 0; i < kScaleReasonSize; ++i) {
814 LOG(LS_INFO) << "Scaled " << scale_counter_[i] 812 LOG(LS_INFO) << "Scaled " << scale_counter_[i]
815 << " times for reason: " << (i ? "cpu" : "quality"); 813 << " times for reason: " << (i ? "cpu" : "quality");
816 } 814 }
817 } 815 }
818 816
819 } // namespace webrtc 817 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/call_perf_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698