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

Side by Side Diff: webrtc/modules/video_coding/distribution.h

Issue 1715673002: Implement the NackModule as part of the new jitter buffer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Implemented reordering statistics in separate class. Created 4 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
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_VIDEO_CODING_DISTRIBUTION_H_
12 #define WEBRTC_MODULES_VIDEO_CODING_DISTRIBUTION_H_
13
14 #include <vector>
15
16 namespace webrtc {
17 class Distribution {
stefan-webrtc 2016/03/01 08:52:10 Prefer calling this Histogram. To me, a distributi
philipel 2016/03/01 10:27:06 Done.
18 public:
19 Distribution(int num_buckets, int max_num_values);
20
21 // Add a value to the distribution. If there already is
22 // max_num_values in the distribution then the oldest
23 // value will also be removed.
24 void AddValue(int value);
stefan-webrtc 2016/03/01 08:52:10 Maybe just Add(int value)?
philipel 2016/03/01 10:27:06 Done.
25
26 // Calculates how many buckets have to be summed in
27 // order to accumulate at least the given probability.
28 size_t InverseCDF(float probability) const;
29
30 // How many values that makes up this distribution.
stefan-webrtc 2016/03/01 08:52:10 make up
philipel 2016/03/01 10:27:06 Done.
31 size_t NumValues() const;
32
33 private:
34 std::vector<int> values_;
stefan-webrtc 2016/03/01 08:52:10 Comment on that this is a circular buffer of value
philipel 2016/03/01 10:27:06 Done.
35 std::vector<int> buckets_;
36 size_t index_;
37 };
38
39 } // namespace webrtc
40
41 #endif // WEBRTC_MODULES_VIDEO_CODING_DISTRIBUTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698