has the side-effect of removing some lint and -Wshorten-64-to-32
warnings
Change-Id: Ib7cb87fa65cd65534096921f243d15288e97256d
virtual ~CodecFactory() {}
virtual ~CodecFactory() {}
- virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
- unsigned long deadline) const = 0;
+ virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg) const = 0;
virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
- const vpx_codec_flags_t flags,
- unsigned long deadline) // NOLINT(runtime/int)
- const = 0;
+ const vpx_codec_flags_t flags) const = 0;
virtual Encoder *CreateEncoder(vpx_codec_enc_cfg_t cfg,
unsigned long deadline,
virtual Encoder *CreateEncoder(vpx_codec_enc_cfg_t cfg,
unsigned long deadline,
#if CONFIG_VP8
class VP8Decoder : public Decoder {
public:
#if CONFIG_VP8
class VP8Decoder : public Decoder {
public:
- VP8Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
- : Decoder(cfg, deadline) {}
+ explicit VP8Decoder(vpx_codec_dec_cfg_t cfg) : Decoder(cfg) {}
- VP8Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
- unsigned long deadline) // NOLINT
- : Decoder(cfg, flag, deadline) {}
+ VP8Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag)
+ : Decoder(cfg, flag) {}
protected:
virtual vpx_codec_iface_t *CodecInterface() const {
protected:
virtual vpx_codec_iface_t *CodecInterface() const {
public:
VP8CodecFactory() : CodecFactory() {}
public:
VP8CodecFactory() : CodecFactory() {}
- virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
- unsigned long deadline) const {
- return CreateDecoder(cfg, 0, deadline);
+ virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg) const {
+ return CreateDecoder(cfg, 0);
}
virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
}
virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
- const vpx_codec_flags_t flags,
- unsigned long deadline) const { // NOLINT
+ const vpx_codec_flags_t flags) const {
- return new VP8Decoder(cfg, flags, deadline);
+ return new VP8Decoder(cfg, flags);
#else
return NULL;
#endif
#else
return NULL;
#endif
#if CONFIG_VP9
class VP9Decoder : public Decoder {
public:
#if CONFIG_VP9
class VP9Decoder : public Decoder {
public:
- VP9Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
- : Decoder(cfg, deadline) {}
+ explicit VP9Decoder(vpx_codec_dec_cfg_t cfg) : Decoder(cfg) {}
- VP9Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
- unsigned long deadline) // NOLINT
- : Decoder(cfg, flag, deadline) {}
+ VP9Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag)
+ : Decoder(cfg, flag) {}
protected:
virtual vpx_codec_iface_t *CodecInterface() const {
protected:
virtual vpx_codec_iface_t *CodecInterface() const {
public:
VP9CodecFactory() : CodecFactory() {}
public:
VP9CodecFactory() : CodecFactory() {}
- virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
- unsigned long deadline) const {
- return CreateDecoder(cfg, 0, deadline);
+ virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg) const {
+ return CreateDecoder(cfg, 0);
}
virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
}
virtual Decoder *CreateDecoder(vpx_codec_dec_cfg_t cfg,
- const vpx_codec_flags_t flags,
- unsigned long deadline) const { // NOLINT
+ const vpx_codec_flags_t flags) const {
- return new VP9Decoder(cfg, flags, deadline);
+ return new VP9Decoder(cfg, flags);
#else
return NULL;
#endif
#else
return NULL;
#endif
void DecoderTest::RunLoop(CompressedVideoSource *video,
const vpx_codec_dec_cfg_t &dec_cfg) {
void DecoderTest::RunLoop(CompressedVideoSource *video,
const vpx_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;
ASSERT_TRUE(decoder != NULL);
bool end_of_file = false;
// as more tests are added.
class Decoder {
public:
// as more tests are added.
class Decoder {
public:
- Decoder(vpx_codec_dec_cfg_t cfg, unsigned long deadline)
- : cfg_(cfg), flags_(0), deadline_(deadline), init_done_(false) {
+ explicit Decoder(vpx_codec_dec_cfg_t cfg)
+ : cfg_(cfg), flags_(0), init_done_(false) {
memset(&decoder_, 0, sizeof(decoder_));
}
memset(&decoder_, 0, sizeof(decoder_));
}
- Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag,
- unsigned long deadline) // NOLINT
- : cfg_(cfg),
- flags_(flag),
- deadline_(deadline),
- init_done_(false) {
+ Decoder(vpx_codec_dec_cfg_t cfg, const vpx_codec_flags_t flag)
+ : cfg_(cfg), flags_(flag), init_done_(false) {
memset(&decoder_, 0, sizeof(decoder_));
}
memset(&decoder_, 0, sizeof(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, VPX_CODEC_OK); }
void Control(int ctrl_id, const void *arg) {
void Control(int ctrl_id, int arg) { Control(ctrl_id, arg, VPX_CODEC_OK); }
void Control(int ctrl_id, const void *arg) {
vpx_codec_ctx_t decoder_;
vpx_codec_dec_cfg_t cfg_;
vpx_codec_flags_t flags_;
vpx_codec_ctx_t decoder_;
vpx_codec_dec_cfg_t cfg_;
vpx_codec_flags_t flags_;
- unsigned int deadline_;
if (init_flags_ & VPX_CODEC_USE_OUTPUT_PARTITION)
dec_init_flags |= VPX_CODEC_USE_INPUT_FRAGMENTS;
testing::internal::scoped_ptr<Decoder> decoder(
if (init_flags_ & VPX_CODEC_USE_OUTPUT_PARTITION)
dec_init_flags |= VPX_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));
bool again;
for (again = true; again; video->Next()) {
again = (video->img() != NULL);
bool again;
for (again = true; again; video->Next()) {
again = (video->img() != NULL);
cfg.threads = num_threads;
vpx_codec_flags_t flags = 0;
flags |= VPX_CODEC_USE_FRAME_THREADING;
cfg.threads = num_threads;
vpx_codec_flags_t flags = 0;
flags |= VPX_CODEC_USE_FRAME_THREADING;
- libvpx_test::VP9Decoder decoder(cfg, flags, 0);
+ libvpx_test::VP9Decoder decoder(cfg, flags);
libvpx_test::MD5 md5;
video.Begin();
libvpx_test::MD5 md5;
video.Begin();
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.threads = num_threads;
const vpx_codec_flags_t flags = VPX_CODEC_USE_FRAME_THREADING;
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.threads = num_threads;
const vpx_codec_flags_t flags = VPX_CODEC_USE_FRAME_THREADING;
- libvpx_test::VP9Decoder decoder(cfg, flags, 0);
+ libvpx_test::VP9Decoder decoder(cfg, flags);
libvpx_test::MD5 md5;
video.Begin();
libvpx_test::MD5 md5;
video.Begin();