Update CallPerfTest.TestEncodeFramerateVp8Simulcast

Only verify simulcast layers with reduced framerate (FramerateController used) and not input fps for now.
Input framerate varies in some tests.

Bug: webrtc:13031
Change-Id: I19b14b9fba70da2df49c0471b67e4c3a5fea4a2e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230782
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34881}
This commit is contained in:
Åsa Persson
2021-08-31 09:53:46 +02:00
committed by WebRTC LUCI CQ
parent 9adbbebde9
commit 4281208fbd

View File

@ -1124,6 +1124,10 @@ void CallPerfTest::TestEncodeFramerate(VideoEncoderFactory* encoder_factory,
}
void VerifyStats() const {
double input_fps = 0.0;
for (const auto& configured_framerate : configured_framerates_) {
input_fps = std::max(configured_framerate.second, input_fps);
}
for (const auto& encode_frame_rate_list : encode_frame_rate_lists_) {
const std::vector<double>& values = encode_frame_rate_list.second;
test::PrintResultList("substream", "", "encode_frame_rate", values,
@ -1132,7 +1136,8 @@ void CallPerfTest::TestEncodeFramerate(VideoEncoderFactory* encoder_factory,
std::accumulate(values.begin(), values.end(), 0.0) / values.size();
uint32_t ssrc = encode_frame_rate_list.first;
double expected_fps = configured_framerates_.find(ssrc)->second;
EXPECT_NEAR(expected_fps, average_fps, kAllowedFpsDiff);
if (expected_fps != input_fps)
EXPECT_NEAR(expected_fps, average_fps, kAllowedFpsDiff);
}
}