History

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

James Zern committed 12 years ago

Commit b4b191a1 parent 812506b11 files · +11 −11Browse files

Unified · Split

11 files
  1. test/decode_perf_test.cc +1 −1
  2. test/decode_test_driver.cc +1 −1
  3. test/encode_test_driver.cc +1 −1
  4. test/external_frame_buffer_test.cc +1 −1
  5. test/invalid_file_test.cc +1 −1
  6. test/svc_test.cc +1 −1
  7. test/tile_independence_test.cc +1 −1
  8. test/user_priv_test.cc +1 −1
  9. test/vp8_decrypt_test.cc +1 −1
  10. test/vp9_decrypt_test.cc +1 −1
  11. test/vp9_thread_test.cc +1 −1
test/decode_perf_test.cc+1−1
@@ -74,7 +74,7 @@ TEST_P(DecodePerfTest, PerfTest) { · 73 unmodified lines
7474 libvpx_test::WebMVideoSource video(video_name);
7575 video.Init();
7676
77− vpx_codec_dec_cfg_t cfg = {0};
77+ vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
7878 cfg.threads = threads;
7979 libvpx_test::VP9Decoder decoder(cfg, 0);
8080
test/decode_test_driver.cc+1−1
@@ -106,7 +106,7 @@ void DecoderTest::RunLoop(CompressedVideoSource *video, · 105 unmodified lines
106106 }
107107
108108 void DecoderTest::RunLoop(CompressedVideoSource *video) {
109− vpx_codec_dec_cfg_t dec_cfg = {0};
109+ vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
110110 RunLoop(video, dec_cfg);
111111 }
112112
test/encode_test_driver.cc+1−1
@@ -139,7 +139,7 @@ void EncoderTest::MismatchHook(const vpx_image_t *img1, · 138 unmodified lines
139139 }
140140
141141 void EncoderTest::RunLoop(VideoSource *video) {
142− vpx_codec_dec_cfg_t dec_cfg = {0};
142+ vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
143143
144144 stats_.Reset();
145145
test/external_frame_buffer_test.cc+1−1
@@ -285,7 +285,7 @@ class ExternalFrameBufferTest : public ::testing::Test { · 284 unmodified lines
285285 video_->Init();
286286 video_->Begin();
287287
288− vpx_codec_dec_cfg_t cfg = {0};
288+ vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
289289 decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
290290 ASSERT_TRUE(decoder_ != NULL);
291291 }
test/invalid_file_test.cc+1−1
@@ -73,7 +73,7 @@ class InvalidFileTest · 72 unmodified lines
7373 void RunTest() {
7474 const DecodeParam input = GET_PARAM(1);
7575 libvpx_test::CompressedVideoSource *video = NULL;
76− vpx_codec_dec_cfg_t cfg = {0};
76+ vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
7777 cfg.threads = input.threads;
7878 const std::string filename = input.filename;
7979
test/svc_test.cc+1−1
@@ -60,7 +60,7 @@ class SvcTest : public ::testing::Test { · 59 unmodified lines
6060 codec_enc_.kf_min_dist = 100;
6161 codec_enc_.kf_max_dist = 100;
6262
63− vpx_codec_dec_cfg_t dec_cfg = {0};
63+ vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
6464 VP9CodecFactory codec_factory;
6565 decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
6666 }
test/tile_independence_test.cc+1−1
@@ -29,7 +29,7 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest, · 28 unmodified lines
2929 md5_inv_order_(),
3030 n_tiles_(GET_PARAM(1)) {
3131 init_flags_ = VPX_CODEC_USE_PSNR;
32− vpx_codec_dec_cfg_t cfg;
32+ vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
3333 cfg.w = 704;
3434 cfg.h = 144;
3535 cfg.threads = 1;
test/user_priv_test.cc+1−1
@@ -47,7 +47,7 @@ string DecodeFile(const string &filename) { · 46 unmodified lines
4747 libvpx_test::WebMVideoSource video(filename);
4848 video.Init();
4949
50− vpx_codec_dec_cfg_t cfg = {0};
50+ vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
5151 libvpx_test::VP9Decoder decoder(cfg, 0);
5252
5353 libvpx_test::MD5 md5;
test/vp8_decrypt_test.cc+1−1
@@ -47,7 +47,7 @@ TEST(TestDecrypt, DecryptWorksVp8) { · 46 unmodified lines
4747 libvpx_test::IVFVideoSource video("vp80-00-comprehensive-001.ivf");
4848 video.Init();
4949
50− vpx_codec_dec_cfg_t dec_cfg = {0};
50+ vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
5151 VP8Decoder decoder(dec_cfg, 0);
5252
5353 video.Begin();
test/vp9_decrypt_test.cc+1−1
@@ -47,7 +47,7 @@ TEST(TestDecrypt, DecryptWorksVp9) { · 46 unmodified lines
4747 libvpx_test::IVFVideoSource video("vp90-2-05-resize.ivf");
4848 video.Init();
4949
50− vpx_codec_dec_cfg_t dec_cfg = {0};
50+ vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
5151 VP9Decoder decoder(dec_cfg, 0);
5252
5353 video.Begin();
test/vp9_thread_test.cc+1−1
@@ -163,7 +163,7 @@ string DecodeFile(const string& filename, int num_threads) { · 162 unmodified lines
163163 libvpx_test::WebMVideoSource video(filename);
164164 video.Init();
165165
166− vpx_codec_dec_cfg_t cfg = {0};
166+ vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
167167 cfg.threads = num_threads;
168168 libvpx_test::VP9Decoder decoder(cfg, 0);
169169

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t