summaryrefslogtreecommitdiffstats
path: root/third_party/aom/test/encode_test_driver.h
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/aom/test/encode_test_driver.h')
-rw-r--r--third_party/aom/test/encode_test_driver.h25
1 files changed, 14 insertions, 11 deletions
diff --git a/third_party/aom/test/encode_test_driver.h b/third_party/aom/test/encode_test_driver.h
index 97c1bf860..138cd6a67 100644
--- a/third_party/aom/test/encode_test_driver.h
+++ b/third_party/aom/test/encode_test_driver.h
@@ -16,7 +16,8 @@
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
-#include "./aom_config.h"
+#include "config/aom_config.h"
+
#if CONFIG_AV1_ENCODER
#include "aom/aomcx.h"
#endif
@@ -37,6 +38,9 @@ enum TestMode { kRealTime, kOnePassGood, kTwoPassGood };
#define TWO_PASS_TEST_MODES ::testing::Values(::libaom_test::kTwoPassGood)
+#define NONREALTIME_TEST_MODES \
+ ::testing::Values(::libaom_test::kOnePassGood, ::libaom_test::kTwoPassGood)
+
// Provides an object to handle the libaom get_cx_data() iteration pattern
class CxDataIterator {
public:
@@ -78,9 +82,9 @@ class TwopassStatsStore {
// level of abstraction will be fleshed out as more tests are written.
class Encoder {
public:
- Encoder(aom_codec_enc_cfg_t cfg, unsigned long deadline,
- const unsigned long init_flags, TwopassStatsStore *stats)
- : cfg_(cfg), deadline_(deadline), init_flags_(init_flags), stats_(stats) {
+ Encoder(aom_codec_enc_cfg_t cfg, const uint32_t init_flags,
+ TwopassStatsStore *stats)
+ : cfg_(cfg), init_flags_(init_flags), stats_(stats) {
memset(&encoder_, 0, sizeof(encoder_));
}
@@ -128,8 +132,6 @@ class Encoder {
cfg_ = *cfg;
}
- void set_deadline(unsigned long deadline) { deadline_ = deadline; }
-
protected:
virtual aom_codec_iface_t *CodecInterface() const = 0;
@@ -147,7 +149,6 @@ class Encoder {
aom_codec_ctx_t encoder_;
aom_codec_enc_cfg_t cfg_;
- unsigned long deadline_;
unsigned long init_flags_;
TwopassStatsStore *stats_;
};
@@ -173,7 +174,7 @@ class EncoderTest {
// Initialize the cfg_ member with the default configuration.
void InitializeConfig();
- // Map the TestMode enum to the deadline_ and passes_ variables.
+ // Map the TestMode enum to the passes_ variables.
void SetMode(TestMode mode);
// Set encoder flag.
@@ -206,9 +207,11 @@ class EncoderTest {
return !(::testing::Test::HasFatalFailure() || abort_);
}
- const CodecFactory *codec_;
// Hook to determine whether to decode frame after encoding
- virtual bool DoDecode() const { return 1; }
+ virtual bool DoDecode() const { return true; }
+
+ // Hook to determine whether to decode invisible frames after encoding
+ virtual bool DoDecodeInvisible() const { return true; }
// Hook to handle encode/decode mismatch
virtual void MismatchHook(const aom_image_t *img1, const aom_image_t *img2);
@@ -230,10 +233,10 @@ class EncoderTest {
return pkt;
}
+ const CodecFactory *codec_;
bool abort_;
aom_codec_enc_cfg_t cfg_;
unsigned int passes_;
- unsigned long deadline_;
TwopassStatsStore stats_;
unsigned long init_flags_;
unsigned long frame_flags_;