Remove a static initializer in default_temporal_layers.cc
kAllBuffers in default_temporal_layers.cc introduces a static initializer, that is banned in Chromium, and that blocks WebRTC roll into Chromium. This CL removes it to unblock. Bug: webrtc:9012 Change-Id: Ide181f63d85748dc2d09199024f1b80868d485fd Reviewed-on: https://webrtc-review.googlesource.com/94460 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24307}
This commit is contained in:
@ -13,6 +13,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <utility>
|
||||
@ -60,9 +61,9 @@ TemporalLayers::FrameConfig::FrameConfig(TemporalLayers::BufferFlags last,
|
||||
namespace {
|
||||
static constexpr uint8_t kUninitializedPatternIndex =
|
||||
std::numeric_limits<uint8_t>::max();
|
||||
static const std::set<Vp8BufferReference> kAllBuffers = {
|
||||
Vp8BufferReference::kLast, Vp8BufferReference::kGolden,
|
||||
Vp8BufferReference::kAltref};
|
||||
static constexpr std::array<Vp8BufferReference, 3> kAllBuffers = {
|
||||
{Vp8BufferReference::kLast, Vp8BufferReference::kGolden,
|
||||
Vp8BufferReference::kAltref}};
|
||||
|
||||
std::vector<unsigned int> GetTemporalIds(size_t num_layers) {
|
||||
switch (num_layers) {
|
||||
@ -113,7 +114,8 @@ uint8_t GetUpdatedBuffers(const TemporalLayers::FrameConfig& config) {
|
||||
// Find the set of buffers that are never updated by the given pattern.
|
||||
std::set<Vp8BufferReference> FindKfBuffers(
|
||||
const std::vector<TemporalLayers::FrameConfig>& frame_configs) {
|
||||
std::set<Vp8BufferReference> kf_buffers = kAllBuffers;
|
||||
std::set<Vp8BufferReference> kf_buffers(kAllBuffers.begin(),
|
||||
kAllBuffers.end());
|
||||
for (TemporalLayers::FrameConfig config : frame_configs) {
|
||||
// Get bit-masked set of update buffers for this frame config.
|
||||
uint8_t updated_buffers = GetUpdatedBuffers(config);
|
||||
|
||||
Reference in New Issue
Block a user