/* * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "rtc_tools/frame_analyzer/video_temporal_aligner.h" #include #include #include #include #include #include #include #include "api/make_ref_counted.h" #include "api/video/i420_buffer.h" #include "api/video/video_frame_buffer.h" #include "rtc_tools/frame_analyzer/video_quality_analysis.h" namespace webrtc { namespace test { namespace { // This constant controls how many frames we look ahead while seeking for the // match for the next frame. Note that we may span bigger gaps than this number // since we reset the counter as soon as we find a better match. The seeking // will stop when there is no improvement in the next kNumberOfFramesLookAhead // frames. Typically, the SSIM will improve as we get closer and closer to the // real match. const int kNumberOfFramesLookAhead = 60; // Helper class that takes a video and generates an infinite looping video. class LoopingVideo : public Video { public: explicit LoopingVideo(const rtc::scoped_refptr