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
This commit is contained in:
James Zern 2017-03-24 17:12:19 -07:00
Родитель f8d165d1bb
Коммит 3b96b76399
4 изменённых файлов: 15 добавлений и 30 удалений

Просмотреть файл

@ -33,13 +33,10 @@ class CodecFactory {
virtual ~CodecFactory() {}
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg,
unsigned long deadline) const = 0;
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg) const = 0;
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg,
const aom_codec_flags_t flags,
unsigned long deadline) // NOLINT(runtime/int)
const = 0;
const aom_codec_flags_t flags) const = 0;
virtual Encoder *CreateEncoder(aom_codec_enc_cfg_t cfg,
unsigned long deadline,
@ -75,12 +72,10 @@ class CodecTestWith3Params
#if CONFIG_AV1
class AV1Decoder : public Decoder {
public:
AV1Decoder(aom_codec_dec_cfg_t cfg, unsigned long deadline)
: Decoder(cfg, deadline) {}
explicit AV1Decoder(aom_codec_dec_cfg_t cfg) : Decoder(cfg) {}
AV1Decoder(aom_codec_dec_cfg_t cfg, const aom_codec_flags_t flag,
unsigned long deadline) // NOLINT
: Decoder(cfg, flag, deadline) {}
AV1Decoder(aom_codec_dec_cfg_t cfg, const aom_codec_flags_t flag)
: Decoder(cfg, flag) {}
protected:
virtual aom_codec_iface_t *CodecInterface() const {
@ -112,20 +107,17 @@ class AV1CodecFactory : public CodecFactory {
public:
AV1CodecFactory() : CodecFactory() {}
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg,
unsigned long deadline) const {
return CreateDecoder(cfg, 0, deadline);
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg) const {
return CreateDecoder(cfg, 0);
}
virtual Decoder *CreateDecoder(aom_codec_dec_cfg_t cfg,
const aom_codec_flags_t flags,
unsigned long deadline) const { // NOLINT
const aom_codec_flags_t flags) const {
#if CONFIG_AV1_DECODER
return new AV1Decoder(cfg, flags, deadline);
return new AV1Decoder(cfg, flags);
#else
(void)cfg;
(void)flags;
(void)deadline;
return NULL;
#endif
}

Просмотреть файл

@ -72,7 +72,7 @@ void DecoderTest::HandlePeekResult(Decoder *const decoder,
void DecoderTest::RunLoop(CompressedVideoSource *video,
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);
bool end_of_file = false;

Просмотреть файл

@ -39,17 +39,13 @@ class DxDataIterator {
// as more tests are added.
class Decoder {
public:
Decoder(aom_codec_dec_cfg_t cfg, unsigned long deadline)
: cfg_(cfg), flags_(0), deadline_(deadline), init_done_(false) {
explicit Decoder(aom_codec_dec_cfg_t cfg)
: cfg_(cfg), flags_(0), init_done_(false) {
memset(&decoder_, 0, sizeof(decoder_));
}
Decoder(aom_codec_dec_cfg_t cfg, const aom_codec_flags_t flag,
unsigned long deadline) // NOLINT
: cfg_(cfg),
flags_(flag),
deadline_(deadline),
init_done_(false) {
Decoder(aom_codec_dec_cfg_t cfg, const aom_codec_flags_t flag)
: cfg_(cfg), flags_(flag), init_done_(false) {
memset(&decoder_, 0, sizeof(decoder_));
}
@ -65,8 +61,6 @@ class 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, const void *arg) {
@ -120,7 +114,6 @@ class Decoder {
aom_codec_ctx_t decoder_;
aom_codec_dec_cfg_t cfg_;
aom_codec_flags_t flags_;
unsigned int deadline_;
bool init_done_;
};

Просмотреть файл

@ -240,7 +240,7 @@ void EncoderTest::RunLoop(VideoSource *video) {
if (init_flags_ & AOM_CODEC_USE_OUTPUT_PARTITION)
dec_init_flags |= AOM_CODEC_USE_INPUT_FRAGMENTS;
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 (decoder->IsAV1()) {
// Set dec_cfg.tile_row = -1 and dec_cfg.tile_col = -1 so that the whole