Remove dimension check in SimulcastUtility::ValidSimulcastParameters

We found that the legacy assumption for H264 which assumed that
simulcast streams would use 2x width ratios in unnecessary as the
encoder has since been fixed to handle multiple ratios.
H264 encoder still works even if this assumption is invalid

Bug: None
Change-Id: I9caacf78d26c8215b94858a2d8674ec4cd64e96e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286940
Reviewed-by: Mirta Dvornicic <mirtad@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39072}
This commit is contained in:
anurag 2023-01-10 15:15:10 -08:00 committed by WebRTC LUCI CQ
parent 8c347eb5ea
commit b081042eec
2 changed files with 4 additions and 14 deletions

View File

@ -143,6 +143,7 @@ ARM Holdings <*@arm.com>
BroadSoft Inc. <*@broadsoft.com>
Canonical Ltd <*@canonical.com>
CoSMo Software Consulting, Pte Ltd <*@cosmosoftware.io>
Discord Inc. <*@discordapp.com>
Facebook Inc. <*@fb.com>
Google Inc. <*@google.com>
Highfive, Inc. <*@highfive.com>

View File

@ -49,20 +49,9 @@ bool SimulcastUtility::ValidSimulcastParameters(const VideoCodec& codec,
return false;
}
}
if (codec.codecType == webrtc::kVideoCodecVP8) {
for (int i = 1; i < num_streams; ++i) {
if (codec.simulcastStream[i].width < codec.simulcastStream[i - 1].width) {
return false;
}
}
} else {
// TODO(mirtad): H264 encoder implementation still assumes the default
// resolution downscaling is used.
for (int i = 1; i < num_streams; ++i) {
if (codec.simulcastStream[i].width !=
codec.simulcastStream[i - 1].width * 2) {
return false;
}
for (int i = 1; i < num_streams; ++i) {
if (codec.simulcastStream[i].width < codec.simulcastStream[i - 1].width) {
return false;
}
}