This reverts commit b58937316b42a04f8ed2c569d80d813bbc44b3c5. Reason for revert: Reland after downstream project fix. Original change's description: > Revert "Rewrite simulcast config to equivalent SVC for vp9 simulcast" > > This reverts commit 86ff48adaea08fd4e7044595e1c25a22fcceac34. > > Reason for revert: Speculative revert due to failing downstream tests > > Original change's description: > > Rewrite simulcast config to equivalent SVC for vp9 simulcast > > > > This allows to utilize libvpx optimizations considerably improving performance. > > The change happens inside libvpx_vp9_encoder and is invisible to other parts of webrtc. > > > > This CL includes unit tests, an E2E test already exists: StandardPath/PeerConnectionEncodingsIntegrationParameterizedTest.Simulcast/VP9 in peerconnection_unittests. > > > > Bug: webrtc:347737882 > > Change-Id: Ic48316ad597700ed07e594d592413cf84b6b20d4 > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355003 > > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> > > Reviewed-by: Erik Språng <sprang@webrtc.org> > > Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> > > Cr-Commit-Position: refs/heads/main@{#42554} > > Bug: webrtc:347737882 > Change-Id: Ib84c9c0e20763348abfae838f2fb1aff31581a55 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355943 > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> > Owners-Override: Jeremy Leconte <jleconte@google.com> > Reviewed-by: Jeremy Leconte <jleconte@google.com> > Commit-Queue: Jeremy Leconte <jleconte@google.com> > Cr-Commit-Position: refs/heads/main@{#42564} Bug: webrtc:347737882 Change-Id: I020d51892982a6e776bb169584c27f7c1360d521 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356142 Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42574}
47 lines
1.5 KiB
C++
47 lines
1.5 KiB
C++
/* Copyright (c) 2018 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.
|
|
*/
|
|
|
|
#ifndef MODULES_VIDEO_CODING_CODECS_VP9_SVC_CONFIG_H_
|
|
#define MODULES_VIDEO_CODING_CODECS_VP9_SVC_CONFIG_H_
|
|
|
|
#include <stddef.h>
|
|
|
|
#include <vector>
|
|
|
|
#include "api/video/encoded_image.h"
|
|
#include "api/video_codecs/spatial_layer.h"
|
|
#include "api/video_codecs/video_codec.h"
|
|
#include "modules/video_coding/include/video_codec_interface.h"
|
|
#include "modules/video_coding/svc/scalable_video_controller.h"
|
|
|
|
namespace webrtc {
|
|
|
|
// Uses scalability mode to configure spatial layers.
|
|
std::vector<SpatialLayer> GetVp9SvcConfig(VideoCodec& video_codec);
|
|
|
|
std::vector<SpatialLayer> GetSvcConfig(
|
|
size_t input_width,
|
|
size_t input_height,
|
|
float max_framerate_fps,
|
|
size_t first_active_layer,
|
|
size_t num_spatial_layers,
|
|
size_t num_temporal_layers,
|
|
bool is_screen_sharing,
|
|
absl::optional<ScalableVideoController::StreamLayersConfig> config =
|
|
absl::nullopt);
|
|
|
|
void ConvertSimulcastConfigToSvc(VideoCodec& codec);
|
|
|
|
void ConvertSvcFrameToSimulcast(EncodedImage& encoded_image,
|
|
CodecSpecificInfo& codec_specific);
|
|
|
|
} // namespace webrtc
|
|
|
|
#endif // MODULES_VIDEO_CODING_CODECS_VP9_SVC_CONFIG_H_
|