webrtc/modules
Henrik Boström 28b793b4dd [Merge-130] Fix LibvpxVp9Encoder simulcast bug.
As of [1], a single VP9 encoder instance can produce simulcast 4:2:1.
When it does, the EncodedImage has its simulcast index set (0, 1, 2).

The bug is that if you then go back to a single encoder instance,
either because you're doing singlecast or because you're doing
simulcast with scaling factors that are not power of two (not 4:2:1),
then the simulcast index which was previously set to 2 is not reset due
to the old code path never calling SetSimulcastIndex.

Example repro:
1. Send VP9 simulcast {180p, 360p, 720p}, i.e. 4:2.1.
2. Reconfigure to {180p, 360p, 540p}, i.e. no longer 4:2:1.

What should happen: all three layers are sent.
What actually happened: 180p is not sent and the 540p layer flips flops
between 180p and 540p because the EncodedImage says simulcast index is
2 for both encodings[0] and encodings[2].

The fix is a one-line change: `SetSimulcastIndex(std::nullopt)` in the
case that we don't have a `simulcast_to_svc_converter_` that sets it
(0, 1, 2) for us.

[1] https://webrtc-review.googlesource.com/c/src/+/360280

(cherry picked from commit a6fbb35ac1)

Bug: chromium:370299916
Change-Id: I94ce1a0bde43ef56cba930cb69b744877bbd4bf9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/363941
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Original-Commit-Position: refs/heads/main@{#43109}
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364302
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/branch-heads/6723@{#2}
Cr-Branched-From: 13e377b804f68aa9c20ea5e449666ea5248e3286-refs/heads/main@{#43019}
2024-10-01 10:25:48 +00:00
..
async_audio_processing Deprecate rtc::RefCountInterface 2024-06-07 09:47:26 +00:00
audio_coding Ensure the AudioCodingModule is reset when sending is stopped. 2024-09-12 22:47:11 +00:00
audio_device Migrate absl::optional to std::optional 2024-09-02 12:16:47 +00:00
audio_mixer Migrate absl::optional to std::optional 2024-09-02 12:16:47 +00:00
audio_processing Migrate absl::optional to std::optional 2024-09-02 12:16:47 +00:00
congestion_controller Fix lint issues in congestion_controller. 2024-09-03 17:55:07 +00:00
desktop_capture Adds a WebRTC.DesktopCapture.Win.WgcDirtyRegionSupport UMA for diagnostic purposes. 2024-09-12 19:41:44 +00:00
include Migrate absl::optional to std::optional 2024-09-02 12:16:47 +00:00
pacing Fix lint issues in pacing/ 2024-09-06 11:28:43 +00:00
portal Mass removal of absl_deps in all BUILD.gn files 2024-05-23 15:09:46 +00:00
remote_bitrate_estimator Migrate absl::optional to std::optional 2024-09-02 12:16:47 +00:00
rtp_rtcp Pass Environment into RtcpSender 2024-09-09 13:44:21 +00:00
third_party Fix license metadata for spl_sqrt_floor, portaudio, sigslot 2024-08-29 19:11:29 +00:00
utility Rland "Revert "Reland "Reland "Delete old Android ADM."""" 2023-06-30 13:10:12 +00:00
video_capture PipeWire camera: make member variable with the PipeWire status updated 2024-09-03 10:44:32 +00:00
video_coding [Merge-130] Fix LibvpxVp9Encoder simulcast bug. 2024-10-01 10:25:48 +00:00
BUILD.gn Migrate absl::optional to std::optional 2024-09-02 12:16:47 +00:00
module_common_types_unittest.cc [Unwrap] Delete webrtc::Unwrapper 2023-01-12 14:44:21 +00:00