From e3b5b6e50b24d797f68a588b161245281e642c96 Mon Sep 17 00:00:00 2001 From: Sergey Silkin Date: Mon, 2 Apr 2018 17:27:17 +0200 Subject: [PATCH] Exclude first frames from RD perf analysis. It takes some time for rate controller to adapt to content. Quality of first frames is usually worse than quality of following frames. It makes sense to exclude first frames from analysis and, thus, avoid negative affect of this interval on overall results. Bug: none Change-Id: Ib0a258889750cf794c7d6fdff26af958f7bbe48a Reviewed-on: https://webrtc-review.googlesource.com/66100 Commit-Queue: Sergey Silkin Reviewed-by: Michael Horowitz Reviewed-by: Rasmus Brandt Cr-Commit-Position: refs/heads/master@{#22782} --- .../test/videoprocessor_integrationtest_libvpx.cc | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/modules/video_coding/codecs/test/videoprocessor_integrationtest_libvpx.cc b/modules/video_coding/codecs/test/videoprocessor_integrationtest_libvpx.cc index 545f2538c1..03007e41e8 100644 --- a/modules/video_coding/codecs/test/videoprocessor_integrationtest_libvpx.cc +++ b/modules/video_coding/codecs/test/videoprocessor_integrationtest_libvpx.cc @@ -30,7 +30,10 @@ const int kCifHeight = 288; const int kNumFramesShort = 100; #endif const int kNumFramesLong = 300; -const size_t kBitrateRdPerfKbps[] = {300, 600, 800, 1250, 1750, 2500}; +const size_t kBitrateRdPerfKbps[] = {100, 200, 300, 400, 500, 600, + 700, 800, 1000, 1250, 1400, 1600, + 1800, 2000, 2200, 2500}; +const size_t kNumFirstFramesToSkipAtRdPerfAnalysis = 60; } // namespace class VideoProcessorIntegrationTestLibvpx @@ -392,6 +395,7 @@ TEST_F(VideoProcessorIntegrationTestLibvpx, DISABLED_MultiresVP8RdPerf) { config_.filename = "FourPeople_1280x720_30"; config_.filepath = ResourcePath(config_.filename, "yuv"); config_.num_frames = 300; + config_.print_frame_level_stats = true; config_.SetCodecSettings(kVideoCodecVP8, 3, 1, 3, true, true, false, kResilienceOn, 1280, 720); @@ -403,8 +407,8 @@ TEST_F(VideoProcessorIntegrationTestLibvpx, DISABLED_MultiresVP8RdPerf) { ProcessFramesAndMaybeVerify(rate_profiles, nullptr, nullptr, nullptr, nullptr); - rd_stats[bitrate_kbps] = - stats_.SliceAndCalcLayerVideoStatistic(0, config_.num_frames - 1); + rd_stats[bitrate_kbps] = stats_.SliceAndCalcLayerVideoStatistic( + kNumFirstFramesToSkipAtRdPerfAnalysis, config_.num_frames - 1); } PrintRdPerf(rd_stats); @@ -414,6 +418,7 @@ TEST_F(VideoProcessorIntegrationTestLibvpx, DISABLED_SvcVP9RdPerf) { config_.filename = "FourPeople_1280x720_30"; config_.filepath = ResourcePath(config_.filename, "yuv"); config_.num_frames = 300; + config_.print_frame_level_stats = true; config_.SetCodecSettings(kVideoCodecVP9, 1, 3, 3, true, true, false, kResilienceOn, 1280, 720); @@ -425,8 +430,8 @@ TEST_F(VideoProcessorIntegrationTestLibvpx, DISABLED_SvcVP9RdPerf) { ProcessFramesAndMaybeVerify(rate_profiles, nullptr, nullptr, nullptr, nullptr); - rd_stats[bitrate_kbps] = - stats_.SliceAndCalcLayerVideoStatistic(0, config_.num_frames - 1); + rd_stats[bitrate_kbps] = stats_.SliceAndCalcLayerVideoStatistic( + kNumFirstFramesToSkipAtRdPerfAnalysis, config_.num_frames - 1); } PrintRdPerf(rd_stats);