summaryrefslogtreecommitdiff
path: root/examples/vp8cx_set_ref.c
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2016-09-15 17:44:24 -0700
committerJohann Koenig <johannkoenig@google.com>2016-09-16 03:54:11 +0000
commitd5054504a7ada94fa09557a4e787169e92ac0b16 (patch)
treec8b2cbb0a545424d8c1661583124a15a9f441d5c /examples/vp8cx_set_ref.c
parent1d2aaf58ddbb2bd6d78d02873274ad5bb50feb9a (diff)
downloadlibvpx-d5054504a7ada94fa09557a4e787169e92ac0b16.tar
libvpx-d5054504a7ada94fa09557a4e787169e92ac0b16.tar.gz
libvpx-d5054504a7ada94fa09557a4e787169e92ac0b16.tar.bz2
libvpx-d5054504a7ada94fa09557a4e787169e92ac0b16.zip
zero structures completely
Use vp[89]_zero when possible. Expand the {} set when neither is available or nearby. Change-Id: Ifc1f46f60100916cd798bf7be3a10f09321c99bd
Diffstat (limited to 'examples/vp8cx_set_ref.c')
-rw-r--r--examples/vp8cx_set_ref.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/vp8cx_set_ref.c b/examples/vp8cx_set_ref.c
index 41295c9de..fc7bdab39 100644
--- a/examples/vp8cx_set_ref.c
+++ b/examples/vp8cx_set_ref.c
@@ -51,6 +51,7 @@
#include "vpx/vp8cx.h"
#include "vpx/vpx_encoder.h"
+#include "vp8/common/common.h"
#include "../tools_common.h"
#include "../video_writer.h"
@@ -93,18 +94,22 @@ static int encode_frame(vpx_codec_ctx_t *codec, vpx_image_t *img,
int main(int argc, char **argv) {
FILE *infile = NULL;
- vpx_codec_ctx_t codec = { 0 };
- vpx_codec_enc_cfg_t cfg = { 0 };
+ vpx_codec_ctx_t codec;
+ vpx_codec_enc_cfg_t cfg;
int frame_count = 0;
vpx_image_t raw;
vpx_codec_err_t res;
- VpxVideoInfo info = { 0 };
+ VpxVideoInfo info;
VpxVideoWriter *writer = NULL;
const VpxInterface *encoder = NULL;
int update_frame_num = 0;
const int fps = 30; // TODO(dkovalev) add command line argument
const int bitrate = 200; // kbit/s TODO(dkovalev) add command line argument
+ vp8_zero(codec);
+ vp8_zero(cfg);
+ vp8_zero(info);
+
exec_name = argv[0];
if (argc != 6) die("Invalid number of arguments");