/* * Copyright (c) 2016, Alliance for Open Media. All rights reserved. * * This source code is subject to the terms of the BSD 2 Clause License and * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License * was not distributed with this source code in the LICENSE file, you can * obtain it at www.aomedia.org/license/software. If the Alliance for Open * Media Patent License 1.0 was not distributed with this source code in the * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ #ifndef AOM_TEST_ENCODE_TEST_DRIVER_H_ #define AOM_TEST_ENCODE_TEST_DRIVER_H_ #include <string> #include <vector> #include "gtest/gtest.h" #include "config/aom_config.h" #if CONFIG_AV1_ENCODER #include "aom/aomcx.h" #endif #include "aom/aom_encoder.h" namespace libaom_test { class CodecFactory; class VideoSource; enum TestMode { … }; #define ALL_TEST_MODES … #define ONE_PASS_TEST_MODES … #define TWO_PASS_TEST_MODES … #define NONREALTIME_TEST_MODES … // Provides an object to handle the libaom get_cx_data() iteration pattern class CxDataIterator { … }; // Implements an in-memory store for libaom twopass statistics class TwopassStatsStore { … }; // Provides a simplified interface to manage one video encoding pass, given // a configuration and video source. // // TODO(jkoleszar): The exact services it provides and the appropriate // level of abstraction will be fleshed out as more tests are written. class Encoder { … }; // Common test functionality for all Encoder tests. // // This class is a mixin which provides the main loop common to all // encoder tests. It provides hooks which can be overridden by subclasses // to implement each test's specific behavior, while centralizing the bulk // of the boilerplate. Note that it doesn't inherit the gtest testing // classes directly, so that tests can be parameterized differently. class EncoderTest { … }; } // namespace libaom_test #endif // AOM_TEST_ENCODE_TEST_DRIVER_H_