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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/screenshare_layers.cc

Issue 2833493003: Don't re-randomize picture_id/tl0_pic_idx when re-initializing internal encoders. (Closed)
Patch Set: Change back TimeMills() -> TimeMicros(). Created 3 years, 7 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
OLDNEW
1 /* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 1 /* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
2 * 2 *
3 * Use of this source code is governed by a BSD-style license 3 * Use of this source code is governed by a BSD-style license
4 * that can be found in the LICENSE file in the root of the source 4 * that can be found in the LICENSE file in the root of the source
5 * tree. An additional intellectual property rights grant can be found 5 * tree. An additional intellectual property rights grant can be found
6 * in the file PATENTS. All contributing project authors may 6 * in the file PATENTS. All contributing project authors may
7 * be found in the AUTHORS file in the root of the source tree. 7 * be found in the AUTHORS file in the root of the source tree.
8 */ 8 */
9 9
10 #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" 10 #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 ScreenshareLayers::~ScreenshareLayers() { 77 ScreenshareLayers::~ScreenshareLayers() {
78 UpdateHistograms(); 78 UpdateHistograms();
79 } 79 }
80 80
81 int ScreenshareLayers::CurrentLayerId() const { 81 int ScreenshareLayers::CurrentLayerId() const {
82 // Codec does not use temporal layers for screenshare. 82 // Codec does not use temporal layers for screenshare.
83 return 0; 83 return 0;
84 } 84 }
85 85
86 uint8_t ScreenshareLayers::Tl0PicIdx() const {
87 return tl0_pic_idx_;
88 }
89
86 TemporalReferences ScreenshareLayers::UpdateLayerConfig(uint32_t timestamp) { 90 TemporalReferences ScreenshareLayers::UpdateLayerConfig(uint32_t timestamp) {
87 if (number_of_temporal_layers_ <= 1) { 91 if (number_of_temporal_layers_ <= 1) {
88 // No flags needed for 1 layer screenshare. 92 // No flags needed for 1 layer screenshare.
89 // TODO(pbos): Consider updating only last, and not all buffers. 93 // TODO(pbos): Consider updating only last, and not all buffers.
90 return TemporalReferences(kReferenceAndUpdate, kReferenceAndUpdate, 94 return TemporalReferences(kReferenceAndUpdate, kReferenceAndUpdate,
91 kReferenceAndUpdate); 95 kReferenceAndUpdate);
92 } 96 }
93 97
94 const int64_t now_ms = clock_->TimeInMilliseconds(); 98 const int64_t now_ms = clock_->TimeInMilliseconds();
95 if (target_framerate_.value_or(0) > 0 && 99 if (target_framerate_.value_or(0) > 0 &&
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.Layer1.Qp", 421 RTC_HISTOGRAM_COUNTS_10000("WebRTC.Video.Screenshare.Layer1.Qp",
418 stats_.tl1_qp_sum_ / stats_.num_tl1_frames_); 422 stats_.tl1_qp_sum_ / stats_.num_tl1_frames_);
419 RTC_HISTOGRAM_COUNTS_10000( 423 RTC_HISTOGRAM_COUNTS_10000(
420 "WebRTC.Video.Screenshare.Layer1.TargetBitrate", 424 "WebRTC.Video.Screenshare.Layer1.TargetBitrate",
421 stats_.tl1_target_bitrate_sum_ / stats_.num_tl1_frames_); 425 stats_.tl1_target_bitrate_sum_ / stats_.num_tl1_frames_);
422 } 426 }
423 } 427 }
424 } 428 }
425 429
426 } // namespace webrtc 430 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h ('k') | webrtc/modules/video_coding/codecs/vp8/temporal_layers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698