summaryrefslogtreecommitdiffstats
path: root/third_party/aom/test/encode_test_driver.h
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-19 21:52:15 -0500
committertrav90 <travawine@palemoon.org>2018-10-19 21:52:20 -0500
commitbbcc64772580c8a979288791afa02d30bc476d2e (patch)
tree437ce94c3fdd7497508e5b55de06c6d011678597 /third_party/aom/test/encode_test_driver.h
parent14805f6ddbfb173c327768fff9f81f40ce5e81b0 (diff)
downloadUXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar
UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.gz
UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.lz
UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.xz
UXP-bbcc64772580c8a979288791afa02d30bc476d2e.zip
Update aom to v1.0.0
Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0.
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_;