blob: 0825296d735cb5820f075ec8e5fa30daa16e92ae [file] [log] [blame]
Jim Bankoski96b6b6b2012-06-23 11:20:41 -07001/*
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07002 * Copyright (c) 2016, Alliance for Open Media. All rights reserved
Jim Bankoski96b6b6b2012-06-23 11:20:41 -07003 *
Yaowu Xu2ab7ff02016-09-02 12:04:54 -07004 * This source code is subject to the terms of the BSD 2 Clause License and
5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6 * was not distributed with this source code in the LICENSE file, you can
7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
8 * Media Patent License 1.0 was not distributed with this source code in the
9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
Jim Bankoski96b6b6b2012-06-23 11:20:41 -070010 */
11#ifndef TEST_I420_VIDEO_SOURCE_H_
12#define TEST_I420_VIDEO_SOURCE_H_
13#include <cstdio>
14#include <cstdlib>
Yaowu Xuafffa3d2013-09-05 08:45:56 -070015#include <string>
Jim Bankoski96b6b6b2012-06-23 11:20:41 -070016
Deb Mukherjee50c59cd2014-10-15 16:40:12 -070017#include "test/yuv_video_source.h"
Jim Bankoski96b6b6b2012-06-23 11:20:41 -070018
Yaowu Xuc27fc142016-08-22 16:08:15 -070019namespace libaom_test {
Jim Bankoski96b6b6b2012-06-23 11:20:41 -070020
21// This class extends VideoSource to allow parsing of raw yv12
22// so that we can do actual file encodes.
Deb Mukherjee50c59cd2014-10-15 16:40:12 -070023class I420VideoSource : public YUVVideoSource {
Jim Bankoski96b6b6b2012-06-23 11:20:41 -070024 public:
clang-format3a826f12016-08-11 17:46:05 -070025 I420VideoSource(const std::string &file_name, unsigned int width,
26 unsigned int height, int rate_numerator, int rate_denominator,
Jim Bankoski96b6b6b2012-06-23 11:20:41 -070027 unsigned int start, int limit)
Yaowu Xuf883b422016-08-30 14:01:10 -070028 : YUVVideoSource(file_name, AOM_IMG_FMT_I420, width, height,
clang-format3a826f12016-08-11 17:46:05 -070029 rate_numerator, rate_denominator, start, limit) {}
Jim Bankoski96b6b6b2012-06-23 11:20:41 -070030};
31
Yaowu Xuc27fc142016-08-22 16:08:15 -070032} // namespace libaom_test
Jim Bankoski96b6b6b2012-06-23 11:20:41 -070033
34#endif // TEST_I420_VIDEO_SOURCE_H_