From b468aced4b02ec755fc581233a2d12f42d9c9650 Mon Sep 17 00:00:00 2001 From: Magnus Jedvert Date: Wed, 5 Sep 2018 16:11:48 +0200 Subject: [PATCH] Reland "Reland "Update video_quality_analysis to align videos instead of using barcodes"" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a reland of 9bb55fc09b6bfa00cba7779c37ad6c39b4206f7a Original change's description: > Reland "Update video_quality_analysis to align videos instead of using barcodes" > > This is a reland of d65e143801a7aaa9affdb939ea836aec1955cdcc > > The binary for frame_analyzer.cpp is precompiled and stored in the cloud, so it > won't automatically pick up change to the source file. Therefore, restore all > old code to be backwards compatible. > > Original change's description: > > Update video_quality_analysis to align videos instead of using barcodes > > > > This CL is a follow-up to the previous CL > > https://webrtc-review.googlesource.com/c/src/+/94773 that added generic > > logic for aligning videos. This will allow us to easily extend > > video_quality_analysis with new sophisticated video quality metrics. > > Also, we can use any kind of video that does not necessarily need to > > contain bar codes. Removing the need to decode barcodes also leads to a > > big speedup for the tests. > > > > Bug: webrtc:9642 > > Change-Id: I74b0d630b3e1ed44781ad024115ded3143e28f50 > > Reviewed-on: https://webrtc-review.googlesource.com/94845 > > Reviewed-by: Paulina Hensman > > Reviewed-by: Patrik Höglund > > Commit-Queue: Magnus Jedvert > > Cr-Commit-Position: refs/heads/master@{#24423} > > TBR=phensman@webrtc.org,phoglund@webrtc.org > > Bug: webrtc:9642 > Change-Id: Id8d129ce103284504c67690f8363c03eaae3eee7 > Reviewed-on: https://webrtc-review.googlesource.com/96000 > Reviewed-by: Magnus Jedvert > Reviewed-by: Patrik Höglund > Commit-Queue: Magnus Jedvert > Cr-Commit-Position: refs/heads/master@{#24429} TBR=phensman,phoglund Bug: webrtc:9642 Change-Id: Ic248b7831ae148251a1a4ebeec5d154286f91a0a Reviewed-on: https://webrtc-review.googlesource.com/98080 Commit-Queue: Magnus Jedvert Reviewed-by: Patrik Höglund Reviewed-by: Magnus Jedvert Cr-Commit-Position: refs/heads/master@{#24583} --- rtc_tools/BUILD.gn | 1 + rtc_tools/frame_analyzer/frame_analyzer.cc | 67 ++-- .../frame_analyzer/video_quality_analysis.cc | 322 +++--------------- .../frame_analyzer/video_quality_analysis.h | 78 ++--- .../video_quality_analysis_unittest.cc | 262 ++++---------- rtc_tools/video_file_reader.cc | 8 +- 6 files changed, 178 insertions(+), 560 deletions(-) diff --git a/rtc_tools/BUILD.gn b/rtc_tools/BUILD.gn index 294cc5ae25..e84d0030d5 100644 --- a/rtc_tools/BUILD.gn +++ b/rtc_tools/BUILD.gn @@ -102,6 +102,7 @@ rtc_executable("frame_analyzer") { ":command_line_parser", ":video_file_reader", ":video_quality_analysis", + "../rtc_base:stringutils", "../test:perf_test", ] } diff --git a/rtc_tools/frame_analyzer/frame_analyzer.cc b/rtc_tools/frame_analyzer/frame_analyzer.cc index fd0d488c3b..aab275891e 100644 --- a/rtc_tools/frame_analyzer/frame_analyzer.cc +++ b/rtc_tools/frame_analyzer/frame_analyzer.cc @@ -15,7 +15,9 @@ #include #include +#include "rtc_base/stringutils.h" #include "rtc_tools/frame_analyzer/video_quality_analysis.h" +#include "rtc_tools/frame_analyzer/video_temporal_aligner.h" #include "rtc_tools/simple_command_line_parser.h" #include "rtc_tools/video_file_reader.h" #include "test/testsupport/perf_test.h" @@ -24,22 +26,16 @@ * A command line tool running PSNR and SSIM on a reference video and a test * video. The test video is a record of the reference video which can start at * an arbitrary point. It is possible that there will be repeated frames or - * skipped frames as well. In order to have a way to compare corresponding - * frames from the two videos, two stats files should be provided. One for the - * reference video and one for the test video. The stats file - * is a text file assumed to be in the format: - * frame_xxxx yyyy where xxxx is the frame number in and yyyy is the - * corresponding barcode. The video files should be 1420 YUV videos. - * The tool prints the result to standard output in the Chromium perf format: + * skipped frames as well. The video files should be I420 .y4m or .yuv videos. + * If both files are .y4m, it's not needed to specify width/height. The tool + * prints the result to standard output in the Chromium perf format: * RESULT :