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

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

Issue 2711913007: Revert of Set scaling limit at 320 * 180 for all implementations. (Closed)
Patch Set: 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 | « no previous file | 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
39 // We will never ask for a resolution lower than this. 38 // 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
43 const int kMinPixelsPerFrame = 320 * 180; 42 const int kMinPixelsPerFrame = 320 * 180;
43 #else
44 const int kMinPixelsPerFrame = 120 * 90;
45 #endif
44 46
45 // The maximum number of frames to drop at beginning of stream 47 // The maximum number of frames to drop at beginning of stream
46 // to try and achieve desired bitrate. 48 // to try and achieve desired bitrate.
47 const int kMaxInitialFramedrop = 4; 49 const int kMaxInitialFramedrop = 4;
48 50
49 // TODO(pbos): Lower these thresholds (to closer to 100%) when we handle 51 // TODO(pbos): Lower these thresholds (to closer to 100%) when we handle
50 // pipelining encoders better (multiple input frames before something comes 52 // pipelining encoders better (multiple input frames before something comes
51 // out). This should effectively turn off CPU adaptations for systems that 53 // out). This should effectively turn off CPU adaptations for systems that
52 // remotely cope with the load right now. 54 // remotely cope with the load right now.
53 CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) { 55 CpuOveruseOptions GetCpuOveruseOptions(bool full_overuse_time) {
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 --scale_counter_[reason]; 810 --scale_counter_[reason];
809 source_proxy_->RequestHigherResolutionThan(current_pixel_count); 811 source_proxy_->RequestHigherResolutionThan(current_pixel_count);
810 LOG(LS_INFO) << "Scaling up resolution."; 812 LOG(LS_INFO) << "Scaling up resolution.";
811 for (size_t i = 0; i < kScaleReasonSize; ++i) { 813 for (size_t i = 0; i < kScaleReasonSize; ++i) {
812 LOG(LS_INFO) << "Scaled " << scale_counter_[i] 814 LOG(LS_INFO) << "Scaled " << scale_counter_[i]
813 << " times for reason: " << (i ? "cpu" : "quality"); 815 << " times for reason: " << (i ? "cpu" : "quality");
814 } 816 }
815 } 817 }
816 818
817 } // namespace webrtc 819 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698