Update VP9Encoder::SupportsScalabilityMode
Indicate that the scalability mode is supported if the scalability config exists. Bug: webrtc:13960 Change-Id: I6f42da6c9bbff1322ec5c3e3a68c7e031606da86 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262981 Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> Commit-Queue: Åsa Persson <asapersson@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36989}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
cc52f07087
commit
37f7d6c4e1
@ -18,26 +18,13 @@
|
|||||||
#include "api/video_codecs/vp9_profile.h"
|
#include "api/video_codecs/vp9_profile.h"
|
||||||
#include "modules/video_coding/codecs/vp9/libvpx_vp9_decoder.h"
|
#include "modules/video_coding/codecs/vp9/libvpx_vp9_decoder.h"
|
||||||
#include "modules/video_coding/codecs/vp9/libvpx_vp9_encoder.h"
|
#include "modules/video_coding/codecs/vp9/libvpx_vp9_encoder.h"
|
||||||
|
#include "modules/video_coding/svc/create_scalability_structure.h"
|
||||||
#include "rtc_base/checks.h"
|
#include "rtc_base/checks.h"
|
||||||
#include "vpx/vp8cx.h"
|
#include "vpx/vp8cx.h"
|
||||||
#include "vpx/vp8dx.h"
|
#include "vpx/vp8dx.h"
|
||||||
#include "vpx/vpx_codec.h"
|
#include "vpx/vpx_codec.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
namespace {
|
|
||||||
constexpr ScalabilityMode kSupportedScalabilityModes[] = {
|
|
||||||
ScalabilityMode::kL1T2, ScalabilityMode::kL1T3,
|
|
||||||
ScalabilityMode::kL2T1, ScalabilityMode::kL2T2,
|
|
||||||
ScalabilityMode::kL2T3, ScalabilityMode::kL3T1,
|
|
||||||
ScalabilityMode::kL3T2, ScalabilityMode::kL3T3,
|
|
||||||
ScalabilityMode::kL1T2h, ScalabilityMode::kL1T3h,
|
|
||||||
ScalabilityMode::kL2T1h, ScalabilityMode::kL2T2h,
|
|
||||||
ScalabilityMode::kL2T3h, ScalabilityMode::kL3T1h,
|
|
||||||
ScalabilityMode::kL3T2h, ScalabilityMode::kL3T3h,
|
|
||||||
ScalabilityMode::kL2T2_KEY, ScalabilityMode::kL2T3_KEY,
|
|
||||||
ScalabilityMode::kL3T1_KEY, ScalabilityMode::kL3T2_KEY,
|
|
||||||
ScalabilityMode::kL3T3_KEY};
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
std::vector<SdpVideoFormat> SupportedVP9Codecs() {
|
std::vector<SdpVideoFormat> SupportedVP9Codecs() {
|
||||||
#ifdef RTC_ENABLE_VP9
|
#ifdef RTC_ENABLE_VP9
|
||||||
@ -102,12 +89,7 @@ std::unique_ptr<VP9Encoder> VP9Encoder::Create(
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool VP9Encoder::SupportsScalabilityMode(ScalabilityMode scalability_mode) {
|
bool VP9Encoder::SupportsScalabilityMode(ScalabilityMode scalability_mode) {
|
||||||
for (const auto& entry : kSupportedScalabilityModes) {
|
return ScalabilityStructureConfig(scalability_mode).has_value();
|
||||||
if (entry == scalability_mode) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<VP9Decoder> VP9Decoder::Create() {
|
std::unique_ptr<VP9Decoder> VP9Decoder::Create() {
|
||||||
|
|||||||
Reference in New Issue
Block a user