/* * 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_geometry_aligner.h" #include #include "api/video/i420_buffer.h" #include "rtc_tools/frame_analyzer/video_quality_analysis.h" #include "rtc_tools/video_file_reader.h" #include "test/gtest.h" #include "test/testsupport/file_utils.h" namespace webrtc { namespace test { class VideoGeometryAlignerTest : public ::testing::Test { protected: void SetUp() { reference_video_ = OpenYuvFile(ResourcePath("foreman_128x96", "yuv"), 128, 96); ASSERT_TRUE(reference_video_); // Very simple 4x4 frame used for verying CropAndZoom. const uint8_t data_y[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; const uint8_t data_u[] = {0, 1, 2, 3}; const uint8_t data_v[] = {0, 1, 2, 3}; test_frame_ = I420Buffer::Copy( /* width= */ 4, /* height= */ 4, data_y, /* stride_y= */ 4, data_u, /* stride_u= */ 2, data_v, /* stride_v= */ 2); } rtc::scoped_refptr