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

Side by Side Diff: webrtc/media/engine/simulcast.cc

Issue 2709733002: Merge to 57: Screen content simulcast layers should not be downscaled. (Closed)
Patch Set: Created 3 years, 10 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 | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 } else { 224 } else {
225 streams[s].temporal_layer_thresholds_bps.resize( 225 streams[s].temporal_layer_thresholds_bps.resize(
226 kDefaultConferenceNumberOfTemporalLayers[s] - 1); 226 kDefaultConferenceNumberOfTemporalLayers[s] - 1);
227 streams[s].max_bitrate_bps = FindSimulcastMaxBitrateBps(width, height); 227 streams[s].max_bitrate_bps = FindSimulcastMaxBitrateBps(width, height);
228 streams[s].target_bitrate_bps = 228 streams[s].target_bitrate_bps =
229 FindSimulcastTargetBitrateBps(width, height); 229 FindSimulcastTargetBitrateBps(width, height);
230 streams[s].min_bitrate_bps = FindSimulcastMinBitrateBps(width, height); 230 streams[s].min_bitrate_bps = FindSimulcastMinBitrateBps(width, height);
231 streams[s].max_framerate = max_framerate; 231 streams[s].max_framerate = max_framerate;
232 } 232 }
233 233
234 width /= 2; 234 if (!is_screencast) {
235 height /= 2; 235 width /= 2;
236 height /= 2;
237 }
236 if (s == 0) 238 if (s == 0)
237 break; 239 break;
238 } 240 }
239 241
240 // Spend additional bits to boost the max stream. 242 // Spend additional bits to boost the max stream.
241 int bitrate_left_bps = max_bitrate_bps - GetTotalMaxBitrateBps(streams); 243 int bitrate_left_bps = max_bitrate_bps - GetTotalMaxBitrateBps(streams);
242 if (bitrate_left_bps > 0) { 244 if (bitrate_left_bps > 0) {
243 streams.back().max_bitrate_bps += bitrate_left_bps; 245 streams.back().max_bitrate_bps += bitrate_left_bps;
244 } 246 }
245 247
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 298
297 return true; 299 return true;
298 } 300 }
299 301
300 bool UseSimulcastScreenshare() { 302 bool UseSimulcastScreenshare() {
301 return webrtc::field_trial::FindFullName( 303 return webrtc::field_trial::FindFullName(
302 kSimulcastScreenshareFieldTrialName) == "Enabled"; 304 kSimulcastScreenshareFieldTrialName) == "Enabled";
303 } 305 }
304 306
305 } // namespace cricket 307 } // namespace cricket
OLDNEW
« no previous file with comments | « no previous file | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698