Update the resolution check for VP8 simulcast.
To support non-default values of scale_resolution_down_by. Bug: webrtc:10069 Change-Id: I7efb39cc06a895986f9583acc2180245c009a7fa Reviewed-on: https://webrtc-review.googlesource.com/c/121650 Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26677}
This commit is contained in:
committed by
Commit Bot
parent
6b88a8f161
commit
788f577603
@ -47,10 +47,20 @@ bool SimulcastUtility::ValidSimulcastResolutions(const VideoCodec& codec,
|
||||
return false;
|
||||
}
|
||||
}
|
||||
for (int i = 1; i < num_streams; ++i) {
|
||||
if (codec.simulcastStream[i].width !=
|
||||
codec.simulcastStream[i - 1].width * 2) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user