Revert of Implement the NackModule as part of the new jitter buffer. (patchset #19 id:360001 of https://codereview.webrtc.org/1715673002/ )

Reason for revert:
Unfortunately this breaks in the main waterfall: https://build.chromium.org/p/client.webrtc/builders/Android32%20Builder/builds/6362

I think it's related to dcheck_always_on=1 which is set in GYP_DEFINES only on the trybots, but not on the bots in the main waterfall.

Original issue's description:
> Implement the NackModule as part of the new jitter buffer.
>
> Things done/implemented in this CL:
>   - An interface that can send Nack (VCMNackSender).
>   - An interface that can request KeyFrames (VCMKeyFrameRequestSender).
>   - The nack module (NackModule).
>   - A set of convenience functions for modular numbers (mod_ops.h).
>
> BUG=webrtc:5514
>
> Committed: https://crrev.com/f472c5b6722dfb221f929fc4d3a2b4ca54647701
> Cr-Commit-Position: refs/heads/master@{#11882}

TBR=sprang@webrtc.org,stefan@webrtc.org,terelius@webrtc.org,torbjorng@webrtc.org,perkj@webrtc.org,tommi@webrtc.org,philipel@webrtc.org
BUG=webrtc:5514
NOTRY=True

Review URL: https://codereview.webrtc.org/1771883002

Cr-Commit-Position: refs/heads/master@{#11887}
This commit is contained in:
kjellander
2016-03-07 09:56:26 -08:00
committed by Commit bot
parent 96150a6322
commit eb648bf0e5
13 changed files with 0 additions and 1157 deletions

View File

@ -1,62 +0,0 @@
/*
* Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "webrtc/modules/video_coding/histogram.h"
#include <algorithm>
#include "webrtc/base/mod_ops.h"
namespace webrtc {
namespace video_coding {
Histogram::Histogram(size_t num_buckets, size_t max_num_values) {
RTC_DCHECK_LE(0u, num_buckets);
RTC_DCHECK_LE(0u, max_num_values);
buckets_.resize(num_buckets);
values_.reserve(max_num_values);
index_ = 0;
}
void Histogram::Add(size_t value) {
RTC_DCHECK_GE(value, 0u);
value = std::min<size_t>(value, buckets_.size() - 1);
if (index_ < values_.size()) {
--buckets_[values_[index_]];
RTC_DCHECK_LT(values_[index_], buckets_.size());
values_[index_] = value;
} else {
values_.emplace_back(value);
}
++buckets_[value];
index_ = (index_ + 1) % values_.capacity();
}
size_t Histogram::InverseCdf(float probability) const {
RTC_DCHECK_GE(probability, 0.f);
RTC_DCHECK_LE(probability, 1.f);
RTC_DCHECK_GT(values_.size(), 0ul);
size_t bucket = 0;
float accumulated_probability = 0;
while (accumulated_probability < probability && bucket < buckets_.size()) {
accumulated_probability +=
static_cast<float>(buckets_[bucket]) / values_.size();
++bucket;
}
return bucket;
}
size_t Histogram::NumValues() const {
return values_.size();
}
} // namespace video_coding
} // namespace webrtc