i420_video_source.h 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Copyright (c) 2012 The WebM project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef VPX_TEST_I420_VIDEO_SOURCE_H_
  11. #define VPX_TEST_I420_VIDEO_SOURCE_H_
  12. #include <cstdio>
  13. #include <cstdlib>
  14. #include <string>
  15. #include "test/yuv_video_source.h"
  16. namespace libvpx_test {
  17. // This class extends VideoSource to allow parsing of raw yv12
  18. // so that we can do actual file encodes.
  19. class I420VideoSource : public YUVVideoSource {
  20. public:
  21. I420VideoSource(const std::string &file_name, unsigned int width,
  22. unsigned int height, int rate_numerator, int rate_denominator,
  23. unsigned int start, int limit)
  24. : YUVVideoSource(file_name, VPX_IMG_FMT_I420, width, height,
  25. rate_numerator, rate_denominator, start, limit) {}
  26. };
  27. } // namespace libvpx_test
  28. #endif // VPX_TEST_I420_VIDEO_SOURCE_H_