Commit 3b96b763 authored by James Zern's avatar James Zern

test/decode_test_driver: rm unused deadline member

has the side-effect of removing some lint and -Wshorten-64-to-32
warnings

ported from libvpx:
1b1e40c0b test/decode_test_driver: rm unused deadline member

Change-Id: Ic0ed650c856bf81f0ed2226601d86062d8fd10a4
parent f8d165d1
...@@ -33,13 +33,10 @@ class CodecFactory { ...@@ -33,13 +33,10 @@ class CodecFactory {
virtual ~CodecFactory() {} virtual ~CodecFactory() {}
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg, virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg) const = 0;
unsigned long deadline) const = 0;
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg, virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg,
const aom_codec_flags_t flags, const aom_codec_flags_t flags) const = 0;
unsigned long deadline) // NOLINT(runtime/int)
const = 0;
virtual Encoder *CreateEncoder(aom_codec_enc_cfg_t cfg, virtual Encoder *CreateEncoder(aom_codec_enc_cfg_t cfg,
unsigned long deadline, unsigned long deadline,
...@@ -75,12 +72,10 @@ class CodecTestWith3Params ...@@ -75,12 +72,10 @@ class CodecTestWith3Params
#if CONFIG_AV1 #if CONFIG_AV1
class AV1Decoder : public Decoder { class AV1Decoder : public Decoder {
public: public:
AV1Decoder(aom_codec_dec_cfg_t cfg, unsigned long deadline) explicit AV1Decoder(aom_codec_dec_cfg_t cfg) : Decoder(cfg) {}
: Decoder(cfg, deadline) {}
AV1Decoder(aom_codec_dec_cfg_t cfg, const aom_codec_flags_t flag, AV1Decoder(aom_codec_dec_cfg_t cfg, const aom_codec_flags_t flag)
unsigned long deadline) // NOLINT : Decoder(cfg, flag) {}
: Decoder(cfg, flag, deadline) {}
protected: protected:
virtual aom_codec_iface_t *CodecInterface() const { virtual aom_codec_iface_t *CodecInterface() const {
...@@ -112,20 +107,17 @@ class AV1CodecFactory : public CodecFactory { ...@@ -112,20 +107,17 @@ class AV1CodecFactory : public CodecFactory {
public: public:
AV1CodecFactory() : CodecFactory() {} AV1CodecFactory() : CodecFactory() {}
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg, virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg) const {
unsigned long deadline) const { return CreateDecoder(cfg, 0);
return CreateDecoder(cfg, 0, deadline);
} }
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg, virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg,
const aom_codec_flags_t flags, const aom_codec_flags_t flags) const {
unsigned long deadline) const { // NOLINT
#if CONFIG_AV1_DECODER #if CONFIG_AV1_DECODER
return new AV1Decoder(cfg, flags, deadline); return new AV1Decoder(cfg, flags);
#else #else
(void)cfg; (void)cfg;
(void)flags; (void)flags;
(void)deadline;
return NULL; return NULL;
#endif #endif
} }
......
...@@ -72,7 +72,7 @@ void DecoderTest::HandlePeekResult(Decoder *const decoder, ...@@ -72,7 +72,7 @@ void DecoderTest::HandlePeekResult(Decoder *const decoder,
void DecoderTest::RunLoop(CompressedVideoSource *video, void DecoderTest::RunLoop(CompressedVideoSource *video,
const aom_codec_dec_cfg_t &dec_cfg) { const aom_codec_dec_cfg_t &dec_cfg) {
Decoder *const decoder = codec_->CreateDecoder(dec_cfg, flags_, 0); Decoder *const decoder = codec_->CreateDecoder(dec_cfg, flags_);
ASSERT_TRUE(decoder != NULL); ASSERT_TRUE(decoder != NULL);
bool end_of_file = false; bool end_of_file = false;
......
...@@ -39,17 +39,13 @@ class DxDataIterator { ...@@ -39,17 +39,13 @@ class DxDataIterator {
// as more tests are added. // as more tests are added.
class Decoder { class Decoder {
public: public:
Decoder(aom_codec_dec_cfg_t cfg, unsigned long deadline) explicit Decoder(aom_codec_dec_cfg_t cfg)
: cfg_(cfg), flags_(0), deadline_(deadline), init_done_(false) { : cfg_(cfg), flags_(0), init_done_(false) {
memset(&decoder_, 0, sizeof(decoder_)); memset(&decoder_, 0, sizeof(decoder_));
} }
Decoder(aom_codec_dec_cfg_t cfg, const aom_codec_flags_t flag, Decoder(aom_codec_dec_cfg_t cfg, const aom_codec_flags_t flag)
unsigned long deadline) // NOLINT : cfg_(cfg), flags_(flag), init_done_(false) {
: cfg_(cfg),
flags_(flag),
deadline_(deadline),
init_done_(false) {
memset(&decoder_, 0, sizeof(decoder_)); memset(&decoder_, 0, sizeof(decoder_));
} }
...@@ -65,8 +61,6 @@ class Decoder { ...@@ -65,8 +61,6 @@ class Decoder {
DxDataIterator GetDxData() { return DxDataIterator(&decoder_); } DxDataIterator GetDxData() { return DxDataIterator(&decoder_); }
void set_deadline(unsigned long deadline) { deadline_ = deadline; }
void Control(int ctrl_id, int arg) { Control(ctrl_id, arg, AOM_CODEC_OK); } void Control(int ctrl_id, int arg) { Control(ctrl_id, arg, AOM_CODEC_OK); }
void Control(int ctrl_id, const void *arg) { void Control(int ctrl_id, const void *arg) {
...@@ -120,7 +114,6 @@ class Decoder { ...@@ -120,7 +114,6 @@ class Decoder {
aom_codec_ctx_t decoder_; aom_codec_ctx_t decoder_;
aom_codec_dec_cfg_t cfg_; aom_codec_dec_cfg_t cfg_;
aom_codec_flags_t flags_; aom_codec_flags_t flags_;
unsigned int deadline_;
bool init_done_; bool init_done_;
}; };
......
...@@ -240,7 +240,7 @@ void EncoderTest::RunLoop(VideoSource *video) { ...@@ -240,7 +240,7 @@ void EncoderTest::RunLoop(VideoSource *video) {
if (init_flags_ & AOM_CODEC_USE_OUTPUT_PARTITION) if (init_flags_ & AOM_CODEC_USE_OUTPUT_PARTITION)
dec_init_flags |= AOM_CODEC_USE_INPUT_FRAGMENTS; dec_init_flags |= AOM_CODEC_USE_INPUT_FRAGMENTS;
testing::internal::scoped_ptr<Decoder> decoder( testing::internal::scoped_ptr<Decoder> decoder(
codec_->CreateDecoder(dec_cfg, dec_init_flags, 0)); codec_->CreateDecoder(dec_cfg, dec_init_flags));
#if CONFIG_AV1 && CONFIG_EXT_TILE #if CONFIG_AV1 && CONFIG_EXT_TILE
if (decoder->IsAV1()) { if (decoder->IsAV1()) {
// Set dec_cfg.tile_row = -1 and dec_cfg.tile_col = -1 so that the whole // Set dec_cfg.tile_row = -1 and dec_cfg.tile_col = -1 so that the whole
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment