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
74 libvpx_test::WebMVideoSource video(video_name);74 libvpx_test::WebMVideoSource video(video_name);
75 video.Init();75 video.Init();
76 76
77 vpx_codec_dec_cfg_t cfg = {0};77 vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
78 cfg.threads = threads;78 cfg.threads = threads;
79 libvpx_test::VP9Decoder decoder(cfg, 0);79 libvpx_test::VP9Decoder decoder(cfg, 0);
80 80
test/decode_test_driver.cc+1−1
@@ -106,7 +106,7 @@ void DecoderTest::RunLoop(CompressedVideoSource *video, · 105 unmodified lines
106}106}
107 107
108void DecoderTest::RunLoop(CompressedVideoSource *video) {108void 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();
110 RunLoop(video, dec_cfg);110 RunLoop(video, dec_cfg);
111}111}
112 112
test/encode_test_driver.cc+1−1
@@ -139,7 +139,7 @@ void EncoderTest::MismatchHook(const vpx_image_t *img1, · 138 unmodified lines
139}139}
140 140
141void EncoderTest::RunLoop(VideoSource *video) {141void 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();
143 143
144 stats_.Reset();144 stats_.Reset();
145 145
test/external_frame_buffer_test.cc+1−1
@@ -285,7 +285,7 @@ class ExternalFrameBufferTest : public ::testing::Test { · 284 unmodified lines
285 video_->Init();285 video_->Init();
286 video_->Begin();286 video_->Begin();
287 287
288 vpx_codec_dec_cfg_t cfg = {0};288 vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
289 decoder_ = new libvpx_test::VP9Decoder(cfg, 0);289 decoder_ = new libvpx_test::VP9Decoder(cfg, 0);
290 ASSERT_TRUE(decoder_ != NULL);290 ASSERT_TRUE(decoder_ != NULL);
291 }291 }
test/invalid_file_test.cc+1−1
@@ -73,7 +73,7 @@ class InvalidFileTest · 72 unmodified lines
73 void RunTest() {73 void RunTest() {
74 const DecodeParam input = GET_PARAM(1);74 const DecodeParam input = GET_PARAM(1);
75 libvpx_test::CompressedVideoSource *video = NULL;75 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();
77 cfg.threads = input.threads;77 cfg.threads = input.threads;
78 const std::string filename = input.filename;78 const std::string filename = input.filename;
79 79
test/svc_test.cc+1−1
@@ -60,7 +60,7 @@ class SvcTest : public ::testing::Test { · 59 unmodified lines
60 codec_enc_.kf_min_dist = 100;60 codec_enc_.kf_min_dist = 100;
61 codec_enc_.kf_max_dist = 100;61 codec_enc_.kf_max_dist = 100;
62 62
63 vpx_codec_dec_cfg_t dec_cfg = {0};63 vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
64 VP9CodecFactory codec_factory;64 VP9CodecFactory codec_factory;
65 decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);65 decoder_ = codec_factory.CreateDecoder(dec_cfg, 0);
66 }66 }
test/tile_independence_test.cc+1−1
@@ -29,7 +29,7 @@ class TileIndependenceTest : public ::libvpx_test::EncoderTest, · 28 unmodified lines
29 md5_inv_order_(),29 md5_inv_order_(),
30 n_tiles_(GET_PARAM(1)) {30 n_tiles_(GET_PARAM(1)) {
31 init_flags_ = VPX_CODEC_USE_PSNR;31 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();
33 cfg.w = 704;33 cfg.w = 704;
34 cfg.h = 144;34 cfg.h = 144;
35 cfg.threads = 1;35 cfg.threads = 1;
test/user_priv_test.cc+1−1
@@ -47,7 +47,7 @@ string DecodeFile(const string &filename) { · 46 unmodified lines
47 libvpx_test::WebMVideoSource video(filename);47 libvpx_test::WebMVideoSource video(filename);
48 video.Init();48 video.Init();
49 49
50 vpx_codec_dec_cfg_t cfg = {0};50 vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
51 libvpx_test::VP9Decoder decoder(cfg, 0);51 libvpx_test::VP9Decoder decoder(cfg, 0);
52 52
53 libvpx_test::MD5 md5;53 libvpx_test::MD5 md5;
test/vp8_decrypt_test.cc+1−1
@@ -47,7 +47,7 @@ TEST(TestDecrypt, DecryptWorksVp8) { · 46 unmodified lines
47 libvpx_test::IVFVideoSource video("vp80-00-comprehensive-001.ivf");47 libvpx_test::IVFVideoSource video("vp80-00-comprehensive-001.ivf");
48 video.Init();48 video.Init();
49 49
50 vpx_codec_dec_cfg_t dec_cfg = {0};50 vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
51 VP8Decoder decoder(dec_cfg, 0);51 VP8Decoder decoder(dec_cfg, 0);
52 52
53 video.Begin();53 video.Begin();
test/vp9_decrypt_test.cc+1−1
@@ -47,7 +47,7 @@ TEST(TestDecrypt, DecryptWorksVp9) { · 46 unmodified lines
47 libvpx_test::IVFVideoSource video("vp90-2-05-resize.ivf");47 libvpx_test::IVFVideoSource video("vp90-2-05-resize.ivf");
48 video.Init();48 video.Init();
49 49
50 vpx_codec_dec_cfg_t dec_cfg = {0};50 vpx_codec_dec_cfg_t dec_cfg = vpx_codec_dec_cfg_t();
51 VP9Decoder decoder(dec_cfg, 0);51 VP9Decoder decoder(dec_cfg, 0);
52 52
53 video.Begin();53 video.Begin();
test/vp9_thread_test.cc+1−1
@@ -163,7 +163,7 @@ string DecodeFile(const string& filename, int num_threads) { · 162 unmodified lines
163 libvpx_test::WebMVideoSource video(filename);163 libvpx_test::WebMVideoSource video(filename);
164 video.Init();164 video.Init();
165 165
166 vpx_codec_dec_cfg_t cfg = {0};166 vpx_codec_dec_cfg_t cfg = vpx_codec_dec_cfg_t();
167 cfg.threads = num_threads;167 cfg.threads = num_threads;
168 libvpx_test::VP9Decoder decoder(cfg, 0);168 libvpx_test::VP9Decoder decoder(cfg, 0);
169 169

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