Fix vp8 simulcast screenshare and perf tests for it
Simulcast screenshare appears broken due to unrelated changes. It implicitly relied on SimulcastEncoderAdapter fallback, which happened before if streams had same resolution. It's not the case anymore. Thus, this CL adds checks for different frame-rate in simulcast streams. FullStackTests are also updated to use actual parameters. Bug: none Change-Id: I2c1ddb1b39edb96464a0915dfcb9cb4e18844187 Reviewed-on: https://webrtc-review.googlesource.com/c/124494 Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#26869}
This commit is contained in:
committed by
Commit Bot
parent
08f6a6c672
commit
dda5fdcb82
@ -10,6 +10,8 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "common_types.h" // NOLINT(build/include)
|
||||
#include "modules/video_coding/utility/simulcast_utility.h"
|
||||
#include "rtc_base/checks.h"
|
||||
@ -35,8 +37,9 @@ int SimulcastUtility::NumberOfSimulcastStreams(const VideoCodec& codec) {
|
||||
return streams;
|
||||
}
|
||||
|
||||
bool SimulcastUtility::ValidSimulcastResolutions(const VideoCodec& codec,
|
||||
int num_streams) {
|
||||
bool SimulcastUtility::ValidSimulcastParameters(const VideoCodec& codec,
|
||||
int num_streams) {
|
||||
// Check resolution.
|
||||
if (codec.width != codec.simulcastStream[num_streams - 1].width ||
|
||||
codec.height != codec.simulcastStream[num_streams - 1].height) {
|
||||
return false;
|
||||
@ -63,11 +66,16 @@ bool SimulcastUtility::ValidSimulcastResolutions(const VideoCodec& codec,
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SimulcastUtility::ValidSimulcastTemporalLayers(const VideoCodec& codec,
|
||||
int num_streams) {
|
||||
// Check frame-rate.
|
||||
for (int i = 1; i < num_streams; ++i) {
|
||||
if (fabs(codec.simulcastStream[i].maxFramerate -
|
||||
codec.simulcastStream[i - 1].maxFramerate) > 1e-9) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Check temporal layers.
|
||||
for (int i = 0; i < num_streams - 1; ++i) {
|
||||
if (codec.simulcastStream[i].numberOfTemporalLayers !=
|
||||
codec.simulcastStream[i + 1].numberOfTemporalLayers)
|
||||
|
||||
Reference in New Issue
Block a user