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
This commit is contained in:
James Zern 2014-08-22 12:16:20 -07:00
parent 812506b80c
commit b4b191aba0
11 changed files with 11 additions and 11 deletions

View File

@ -74,7 +74,7 @@ TEST_P(DecodePerfTest, PerfTest) {
libvpx_test::WebMVideoSource video(video_name); libvpx_test::WebMVideoSource video(video_name);
video.Init(); video.Init();
vpx_codec_dec_cfg_t cfg = {0}; vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.threads = threads; cfg.threads = threads;
libvpx_test::VP9Decoder decoder(cfg, 0); libvpx_test::VP9Decoder decoder(cfg, 0);

View File

@ -106,7 +106,7 @@ void DecoderTest::RunLoop(CompressedVideoSource *video,
} }
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); RunLoop(video, dec_cfg);
} }

View File

@ -139,7 +139,7 @@ void EncoderTest::MismatchHook(const vpx_image_t *img1,
} }
void EncoderTest::RunLoop(VideoSource *video) { 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(); stats_.Reset();

View File

@ -285,7 +285,7 @@ class ExternalFrameBufferTest : public ::testing::Test {
video_->Init(); video_->Init();
video_->Begin(); 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); decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
ASSERT_TRUE(decoder_ != NULL); ASSERT_TRUE(decoder_ != NULL);
} }

View File

@ -73,7 +73,7 @@ class InvalidFileTest
void RunTest() { void RunTest() {
const DecodeParam input = GET_PARAM(1); const DecodeParam input = GET_PARAM(1);
libvpx_test::CompressedVideoSource *video = NULL; 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; cfg.threads = input.threads;
const std::string filename = input.filename; const std::string filename = input.filename;

View File

@ -60,7 +60,7 @@ class SvcTest : public ::testing::Test {
codec_enc_.kf_min_dist = 100; codec_enc_.kf_min_dist = 100;
codec_enc_.kf_max_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; VP9CodecFactory codec_factory;
decoder_ = codec_factory.CreateDecoder(dec_cfg, 0); decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
} }

View File

@ -29,7 +29,7 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest,
md5_inv_order_(), md5_inv_order_(),
n_tiles_(GET_PARAM(1)) { n_tiles_(GET_PARAM(1)) {
init_flags_ = VPX_CODEC_USE_PSNR; 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.w = 704;
cfg.h = 144; cfg.h = 144;
cfg.threads = 1; cfg.threads = 1;

View File

@ -47,7 +47,7 @@ string DecodeFile(const string &filename) {
libvpx_test::WebMVideoSource video(filename); libvpx_test::WebMVideoSource video(filename);
video.Init(); 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::VP9Decoder decoder(cfg, 0);
libvpx_test::MD5 md5; libvpx_test::MD5 md5;

View File

@ -47,7 +47,7 @@ TEST(TestDecrypt, DecryptWorksVp8) {
libvpx_test::IVFVideoSource video("vp80-00-comprehensive-001.ivf"); libvpx_test::IVFVideoSource video("vp80-00-comprehensive-001.ivf");
video.Init(); 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); VP8Decoder decoder(dec_cfg, 0);
video.Begin(); video.Begin();

View File

@ -47,7 +47,7 @@ TEST(TestDecrypt, DecryptWorksVp9) {
libvpx_test::IVFVideoSource video("vp90-2-05-resize.ivf"); libvpx_test::IVFVideoSource video("vp90-2-05-resize.ivf");
video.Init(); 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); VP9Decoder decoder(dec_cfg, 0);
video.Begin(); video.Begin();

View File

@ -163,7 +163,7 @@ string DecodeFile(const string& filename, int num_threads) {
libvpx_test::WebMVideoSource video(filename); libvpx_test::WebMVideoSource video(filename);
video.Init(); video.Init();
vpx_codec_dec_cfg_t cfg = {0}; vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
cfg.threads = num_threads; cfg.threads = num_threads;
libvpx_test::VP9Decoder decoder(cfg, 0); libvpx_test::VP9Decoder decoder(cfg, 0);