niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 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 | |
kjellander@webrtc.org | b7ce964 | 2015-11-18 23:04:10 +0100 | [diff] [blame] | 11 | #include "webrtc/modules/video_coding/utility/frame_dropper.h" |
stefan@webrtc.org | eb91792 | 2013-02-18 14:40:18 +0000 | [diff] [blame] | 12 | |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 13 | #include <algorithm> |
| 14 | |
Edward Lemur | c20978e | 2017-07-06 19:44:34 +0200 | [diff] [blame] | 15 | #include "webrtc/rtc_base/logging.h" |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 16 | |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 17 | namespace webrtc { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 18 | |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 19 | namespace { |
| 20 | |
| 21 | const float kDefaultFrameSizeAlpha = 0.9f; |
| 22 | const float kDefaultKeyFrameRatioAlpha = 0.99f; |
| 23 | // 1 key frame every 10th second in 30 fps. |
| 24 | const float kDefaultKeyFrameRatioValue = 1 / 300.0f; |
| 25 | |
stefan@webrtc.org | 84cd8e3 | 2013-03-07 13:12:32 +0000 | [diff] [blame] | 26 | const float kDefaultDropRatioAlpha = 0.9f; |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 27 | const float kDefaultDropRatioValue = 0.96f; |
| 28 | // Maximum duration over which frames are continuously dropped. |
| 29 | const float kDefaultMaxDropDurationSecs = 4.0f; |
| 30 | |
| 31 | // Default target bitrate. |
| 32 | // TODO(isheriff): Should this be higher to avoid dropping too many packets when |
| 33 | // the bandwidth is unknown at the start ? |
| 34 | const float kDefaultTargetBitrateKbps = 300.0f; |
| 35 | const float kDefaultIncomingFrameRate = 30; |
| 36 | const float kLeakyBucketSizeSeconds = 0.5f; |
| 37 | |
| 38 | // A delta frame that is bigger than |kLargeDeltaFactor| times the average |
| 39 | // delta frame is a large frame that is spread out for accumulation. |
| 40 | const int kLargeDeltaFactor = 3; |
| 41 | |
| 42 | // Cap on the frame size accumulator to prevent excessive drops. |
| 43 | const float kAccumulatorCapBufferSizeSecs = 3.0f; |
| 44 | } // namespace |
stefan@webrtc.org | 84cd8e3 | 2013-03-07 13:12:32 +0000 | [diff] [blame] | 45 | |
stefan@webrtc.org | eb91792 | 2013-02-18 14:40:18 +0000 | [diff] [blame] | 46 | FrameDropper::FrameDropper() |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 47 | : key_frame_ratio_(kDefaultKeyFrameRatioAlpha), |
| 48 | delta_frame_size_avg_kbits_(kDefaultFrameSizeAlpha), |
| 49 | drop_ratio_(kDefaultDropRatioAlpha, kDefaultDropRatioValue), |
| 50 | enabled_(true), |
| 51 | max_drop_duration_secs_(kDefaultMaxDropDurationSecs) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 52 | Reset(); |
stefan@webrtc.org | 84cd8e3 | 2013-03-07 13:12:32 +0000 | [diff] [blame] | 53 | } |
| 54 | |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 55 | FrameDropper::FrameDropper(float max_drop_duration_secs) |
| 56 | : key_frame_ratio_(kDefaultKeyFrameRatioAlpha), |
| 57 | delta_frame_size_avg_kbits_(kDefaultFrameSizeAlpha), |
| 58 | drop_ratio_(kDefaultDropRatioAlpha, kDefaultDropRatioValue), |
| 59 | enabled_(true), |
| 60 | max_drop_duration_secs_(max_drop_duration_secs) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 61 | Reset(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 62 | } |
| 63 | |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 64 | void FrameDropper::Reset() { |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 65 | key_frame_ratio_.Reset(kDefaultKeyFrameRatioAlpha); |
| 66 | key_frame_ratio_.Apply(1.0f, kDefaultKeyFrameRatioValue); |
| 67 | delta_frame_size_avg_kbits_.Reset(kDefaultFrameSizeAlpha); |
| 68 | |
| 69 | accumulator_ = 0.0f; |
| 70 | accumulator_max_ = kDefaultTargetBitrateKbps / 2; |
| 71 | target_bitrate_ = kDefaultTargetBitrateKbps; |
| 72 | incoming_frame_rate_ = kDefaultIncomingFrameRate; |
| 73 | |
| 74 | large_frame_accumulation_count_ = 0; |
isheriff | 4d7bc24 | 2016-04-21 16:37:20 -0700 | [diff] [blame] | 75 | large_frame_accumulation_chunk_size_ = 0; |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 76 | large_frame_accumulation_spread_ = 0.5 * kDefaultIncomingFrameRate; |
| 77 | |
| 78 | drop_next_ = false; |
| 79 | drop_ratio_.Reset(0.9f); |
| 80 | drop_ratio_.Apply(0.0f, 0.0f); |
| 81 | drop_count_ = 0; |
| 82 | was_below_max_ = true; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 83 | } |
| 84 | |
| 85 | void FrameDropper::Enable(bool enable) { |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 86 | enabled_ = enable; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 87 | } |
| 88 | |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 89 | void FrameDropper::Fill(size_t framesize_bytes, bool delta_frame) { |
| 90 | if (!enabled_) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 91 | return; |
| 92 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 93 | float framesize_kbits = 8.0f * static_cast<float>(framesize_bytes) / 1000.0f; |
| 94 | if (!delta_frame) { |
| 95 | key_frame_ratio_.Apply(1.0, 1.0); |
| 96 | // Do not spread if we are already doing it (or we risk dropping bits that |
| 97 | // need accumulation). Given we compute the key |
| 98 | // frame ratio and spread based on that, this should not normally happen. |
| 99 | if (large_frame_accumulation_count_ == 0) { |
| 100 | if (key_frame_ratio_.filtered() > 1e-5 && |
| 101 | 1 / key_frame_ratio_.filtered() < large_frame_accumulation_spread_) { |
| 102 | large_frame_accumulation_count_ = |
| 103 | static_cast<int32_t>(1 / key_frame_ratio_.filtered() + 0.5); |
| 104 | } else { |
| 105 | large_frame_accumulation_count_ = |
| 106 | static_cast<int32_t>(large_frame_accumulation_spread_ + 0.5); |
| 107 | } |
| 108 | large_frame_accumulation_chunk_size_ = |
| 109 | framesize_kbits / large_frame_accumulation_count_; |
| 110 | framesize_kbits = 0; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 111 | } |
| 112 | } else { |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 113 | // Identify if it is an unusually large delta frame and spread accumulation |
| 114 | // if that is the case. |
| 115 | if (delta_frame_size_avg_kbits_.filtered() != -1 && |
| 116 | (framesize_kbits > |
| 117 | kLargeDeltaFactor * delta_frame_size_avg_kbits_.filtered()) && |
| 118 | large_frame_accumulation_count_ == 0) { |
| 119 | large_frame_accumulation_count_ = |
| 120 | static_cast<int32_t>(large_frame_accumulation_spread_ + 0.5); |
| 121 | large_frame_accumulation_chunk_size_ = |
| 122 | framesize_kbits / large_frame_accumulation_count_; |
| 123 | framesize_kbits = 0; |
| 124 | } else { |
| 125 | delta_frame_size_avg_kbits_.Apply(1, framesize_kbits); |
| 126 | } |
| 127 | key_frame_ratio_.Apply(1.0, 0.0); |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 128 | } |
| 129 | // Change the level of the accumulator (bucket) |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 130 | accumulator_ += framesize_kbits; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 131 | CapAccumulator(); |
| 132 | } |
| 133 | |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 134 | void FrameDropper::Leak(uint32_t input_framerate) { |
| 135 | if (!enabled_) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 136 | return; |
| 137 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 138 | if (input_framerate < 1) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 139 | return; |
| 140 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 141 | if (target_bitrate_ < 0.0f) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 142 | return; |
| 143 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 144 | // Add lower bound for large frame accumulation spread. |
| 145 | large_frame_accumulation_spread_ = std::max(0.5 * input_framerate, 5.0); |
| 146 | // Expected bits per frame based on current input frame rate. |
| 147 | float expected_bits_per_frame = target_bitrate_ / input_framerate; |
| 148 | if (large_frame_accumulation_count_ > 0) { |
| 149 | expected_bits_per_frame -= large_frame_accumulation_chunk_size_; |
| 150 | --large_frame_accumulation_count_; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 151 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 152 | accumulator_ -= expected_bits_per_frame; |
| 153 | if (accumulator_ < 0.0f) { |
| 154 | accumulator_ = 0.0f; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 155 | } |
| 156 | UpdateRatio(); |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 157 | } |
| 158 | |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 159 | void FrameDropper::UpdateRatio() { |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 160 | if (accumulator_ > 1.3f * accumulator_max_) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 161 | // Too far above accumulator max, react faster |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 162 | drop_ratio_.UpdateBase(0.8f); |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 163 | } else { |
| 164 | // Go back to normal reaction |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 165 | drop_ratio_.UpdateBase(0.9f); |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 166 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 167 | if (accumulator_ > accumulator_max_) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 168 | // We are above accumulator max, and should ideally |
| 169 | // drop a frame. Increase the dropRatio and drop |
| 170 | // the frame later. |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 171 | if (was_below_max_) { |
| 172 | drop_next_ = true; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 173 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 174 | drop_ratio_.Apply(1.0f, 1.0f); |
| 175 | drop_ratio_.UpdateBase(0.9f); |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 176 | } else { |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 177 | drop_ratio_.Apply(1.0f, 0.0f); |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 178 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 179 | was_below_max_ = accumulator_ < accumulator_max_; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 180 | } |
| 181 | |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 182 | // This function signals when to drop frames to the caller. It makes use of the |
| 183 | // dropRatio |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 184 | // to smooth out the drops over time. |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 185 | bool FrameDropper::DropFrame() { |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 186 | if (!enabled_) { |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 187 | return false; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 188 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 189 | if (drop_next_) { |
| 190 | drop_next_ = false; |
| 191 | drop_count_ = 0; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 192 | } |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 193 | |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 194 | if (drop_ratio_.filtered() >= 0.5f) { // Drops per keep |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 195 | // limit is the number of frames we should drop between each kept frame |
| 196 | // to keep our drop ratio. limit is positive in this case. |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 197 | float denom = 1.0f - drop_ratio_.filtered(); |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 198 | if (denom < 1e-5) { |
| 199 | denom = 1e-5f; |
| 200 | } |
| 201 | int32_t limit = static_cast<int32_t>(1.0f / denom - 1.0f + 0.5f); |
| 202 | // Put a bound on the max amount of dropped frames between each kept |
| 203 | // frame, in terms of frame rate and window size (secs). |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 204 | int max_limit = |
| 205 | static_cast<int>(incoming_frame_rate_ * max_drop_duration_secs_); |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 206 | if (limit > max_limit) { |
| 207 | limit = max_limit; |
| 208 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 209 | if (drop_count_ < 0) { |
| 210 | // Reset the drop_count_ since it was negative and should be positive. |
| 211 | drop_count_ = -drop_count_; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 212 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 213 | if (drop_count_ < limit) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 214 | // As long we are below the limit we should drop frames. |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 215 | drop_count_++; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 216 | return true; |
| 217 | } else { |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 218 | // Only when we reset drop_count_ a frame should be kept. |
| 219 | drop_count_ = 0; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 220 | return false; |
| 221 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 222 | } else if (drop_ratio_.filtered() > 0.0f && |
| 223 | drop_ratio_.filtered() < 0.5f) { // Keeps per drop |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 224 | // limit is the number of frames we should keep between each drop |
| 225 | // in order to keep the drop ratio. limit is negative in this case, |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 226 | // and the drop_count_ is also negative. |
| 227 | float denom = drop_ratio_.filtered(); |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 228 | if (denom < 1e-5) { |
| 229 | denom = 1e-5f; |
| 230 | } |
| 231 | int32_t limit = -static_cast<int32_t>(1.0f / denom - 1.0f + 0.5f); |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 232 | if (drop_count_ > 0) { |
| 233 | // Reset the drop_count_ since we have a positive |
| 234 | // drop_count_, and it should be negative. |
| 235 | drop_count_ = -drop_count_; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 236 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 237 | if (drop_count_ > limit) { |
| 238 | if (drop_count_ == 0) { |
| 239 | // Drop frames when we reset drop_count_. |
| 240 | drop_count_--; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 241 | return true; |
| 242 | } else { |
| 243 | // Keep frames as long as we haven't reached limit. |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 244 | drop_count_--; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 245 | return false; |
| 246 | } |
| 247 | } else { |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 248 | drop_count_ = 0; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 249 | return false; |
| 250 | } |
| 251 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 252 | drop_count_ = 0; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 253 | return false; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 254 | } |
| 255 | |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 256 | void FrameDropper::SetRates(float bitrate, float incoming_frame_rate) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 257 | // Bit rate of -1 means infinite bandwidth. |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 258 | accumulator_max_ = bitrate * kLeakyBucketSizeSeconds; |
| 259 | if (target_bitrate_ > 0.0f && bitrate < target_bitrate_ && |
| 260 | accumulator_ > accumulator_max_) { |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 261 | // Rescale the accumulator level if the accumulator max decreases |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 262 | accumulator_ = bitrate / target_bitrate_ * accumulator_; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 263 | } |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 264 | target_bitrate_ = bitrate; |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 265 | CapAccumulator(); |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 266 | incoming_frame_rate_ = incoming_frame_rate; |
niklase@google.com | 470e71d | 2011-07-07 08:21:25 +0000 | [diff] [blame] | 267 | } |
| 268 | |
marpan@webrtc.org | 1dd8d4b | 2012-10-09 20:43:56 +0000 | [diff] [blame] | 269 | // Put a cap on the accumulator, i.e., don't let it grow beyond some level. |
| 270 | // This is a temporary fix for screencasting where very large frames from |
| 271 | // encoder will cause very slow response (too many frame drops). |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 272 | // TODO(isheriff): Remove this now that large delta frames are also spread out ? |
stefan@webrtc.org | eb91792 | 2013-02-18 14:40:18 +0000 | [diff] [blame] | 273 | void FrameDropper::CapAccumulator() { |
isheriff | 7620be8 | 2016-03-06 23:22:33 -0800 | [diff] [blame] | 274 | float max_accumulator = target_bitrate_ * kAccumulatorCapBufferSizeSecs; |
| 275 | if (accumulator_ > max_accumulator) { |
| 276 | accumulator_ = max_accumulator; |
marpan@webrtc.org | 1dd8d4b | 2012-10-09 20:43:56 +0000 | [diff] [blame] | 277 | } |
| 278 | } |
philipel | 5908c71 | 2015-12-21 08:23:20 -0800 | [diff] [blame] | 279 | } // namespace webrtc |