Commit b4b191ab authored by James Zern's avatar James Zern

tests: use vpx_codec_dec_cfg_t() to initialize vars

0-initializes [1] and removes a warning for missing initializer fields

[1] http://en.cppreference.com/w/cpp/language/value_initialization

Change-Id: I364248010c8fa663c71d8f06a9999c730e92db4c
parent 812506b8
......@@ -74,7 +74,7 @@ TEST_P(DecodePerfTest, PerfTest) {
libvpx_test::WebMVideoSource video(video_name);
video.Init();
vpx_codec_dec_cfg_t cfg = {0};
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.threads = threads;
libvpx_test::VP9Decoder decoder(cfg, 0);
......
......@@ -106,7 +106,7 @@ void DecoderTest::RunLoop(CompressedVideoSource *video,
}
void DecoderTest::RunLoop(CompressedVideoSource *video) {
vpx_codec_dec_cfg_t dec_cfg = {0};
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
RunLoop(video, dec_cfg);
}
......
......@@ -139,7 +139,7 @@ void EncoderTest::MismatchHook(const vpx_image_t *img1,
}
void EncoderTest::RunLoop(VideoSource *video) {
vpx_codec_dec_cfg_t dec_cfg = {0};
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
stats_.Reset();
......
......@@ -285,7 +285,7 @@ class ExternalFrameBufferTest : public ::testing::Test {
video_->Init();
video_->Begin();
vpx_codec_dec_cfg_t cfg = {0};
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
ASSERT_TRUE(decoder_ != NULL);
}
......
......@@ -73,7 +73,7 @@ class InvalidFileTest
void RunTest() {
const DecodeParam input = GET_PARAM(1);
libvpx_test::CompressedVideoSource *video = NULL;
vpx_codec_dec_cfg_t cfg = {0};
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.threads = input.threads;
const std::string filename = input.filename;
......
......@@ -60,7 +60,7 @@ class SvcTest : public ::testing::Test {
codec_enc_.kf_min_dist = 100;
codec_enc_.kf_max_dist = 100;
vpx_codec_dec_cfg_t dec_cfg = {0};
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
VP9CodecFactory codec_factory;
decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
}
......
......@@ -29,7 +29,7 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
md5_inv_order_(),
n_tiles_(GET_PARAM(1)) {
init_flags_ = VPX_CODEC_USE_PSNR;
vpx_codec_dec_cfg_t cfg;
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.w = 704;
cfg.h = 144;
cfg.threads = 1;
......
......@@ -47,7 +47,7 @@ string DecodeFile(const string &filename) {
libvpx_test::WebMVideoSource video(filename);
video.Init();
vpx_codec_dec_cfg_t cfg = {0};
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
libvpx_test::VP9Decoder decoder(cfg, 0);
libvpx_test::MD5 md5;
......
......@@ -47,7 +47,7 @@ TEST(TestDecrypt, DecryptWorksVp8) {
libvpx_test::IVFVideoSource video("vp80-00-comprehensive-001.ivf");
video.Init();
vpx_codec_dec_cfg_t dec_cfg = {0};
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
VP8Decoder decoder(dec_cfg, 0);
video.Begin();
......
......@@ -47,7 +47,7 @@ TEST(TestDecrypt, DecryptWorksVp9) {
libvpx_test::IVFVideoSource video("vp90-2-05-resize.ivf");
video.Init();
vpx_codec_dec_cfg_t dec_cfg = {0};
vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
VP9Decoder decoder(dec_cfg, 0);
video.Begin();
......
......@@ -163,7 +163,7 @@ string DecodeFile(const string& filename, int num_threads) {
libvpx_test::WebMVideoSource video(filename);
video.Init();
vpx_codec_dec_cfg_t cfg = {0};
vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.threads = num_threads;
libvpx_test::VP9Decoder decoder(cfg, 0);
......
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