webrtc/modules/video_coding/codecs/vp8/vp8_scalability.cc
Niels Möller 14d01508be Move VP8 SupportsScalabilityMode utility to its own build target
Intended to let Vp8TemporalLayersFactory (an api/ target) reuse
this function, without depending on the codec implementation, and
without introducing a dependency cycle with the webrtc_vp8 build
target.

Bug: webrtc:11607
Change-Id: I671422e994e1005da8c7d768e8dd8ff795553e51
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/261308
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36816}
2022-05-09 13:25:25 +00:00

26 lines
869 B
C++

/*
* Copyright (c) 2022 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 "modules/video_coding/codecs/vp8/vp8_scalability.h"
namespace webrtc {
bool VP8SupportsScalabilityMode(ScalabilityMode scalability_mode) {
constexpr ScalabilityMode kSupportedScalabilityModes[] = {
ScalabilityMode::kL1T1, ScalabilityMode::kL1T2, ScalabilityMode::kL1T3};
for (const auto& entry : kSupportedScalabilityModes) {
if (entry == scalability_mode) {
return true;
}
}
return false;
}
} // namespace webrtc