]> granicus.if.org Git - libvpx/commitdiff
vp8_[cd]x_iface.c: Initialize structures to 0
authorJohann <johannkoenig@google.com>
Mon, 13 Jun 2016 19:08:47 +0000 (12:08 -0700)
committerJohann Koenig <johannkoenig@google.com>
Thu, 16 Jun 2016 22:07:17 +0000 (22:07 +0000)
Use vp8_zero() or specify every element.

Cleans warning in Android build:
missing field 'deblocking_level' initializer
vp8_ppflags_t flags = {0};
                        ^
missing field 'sz' initializer
{0},                /* rc_twopass_stats_in */
  ^
missing field 'sz' initializer
{0},                /* rc_firstpass_mb_stats_in */
  ^
missing field 'layer_target_bitrate' initializer
}},
^
missing field 'deblocking_level' initializer
vp8_ppflags_t flags = {0};
                        ^
missing field 'mr_get_mem_loc' initializer
}
^

Change-Id: Iaedde9a77faac7a40316aee67d60d02ba7313500

vp8/vp8_cx_iface.c
vp8/vp8_dx_iface.c

index 54d45479e609324c119b287c291baf266cee480c..75af40a003b62fa9239390a4e2787490d1ed6586 100644 (file)
@@ -22,6 +22,7 @@
 #include "vpx/vp8cx.h"
 #include "vp8/encoder/firstpass.h"
 #include "vp8/common/onyx.h"
+#include "vp8/common/common.h"
 #include <stdlib.h>
 #include <string.h>
 
@@ -1116,7 +1117,8 @@ static vpx_image_t *vp8e_get_preview(vpx_codec_alg_priv_t *ctx)
 {
 
     YV12_BUFFER_CONFIG sd;
-    vp8_ppflags_t flags = {0};
+    vp8_ppflags_t flags;
+    vp8_zero(flags);
 
     if (ctx->preview_ppcfg.post_proc_flag)
     {
@@ -1305,8 +1307,8 @@ static vpx_codec_enc_cfg_map_t vp8e_usage_cfg_map[] =
         30,                 /* rc_resize_up_thresold */
 
         VPX_VBR,            /* rc_end_usage */
-        {0},                /* rc_twopass_stats_in */
-        {0},                /* rc_firstpass_mb_stats_in */
+        {NULL, 0},          /* rc_twopass_stats_in */
+        {NULL, 0},          /* rc_firstpass_mb_stats_in */
         256,                /* rc_target_bandwidth */
         4,                  /* rc_min_quantizer */
         63,                 /* rc_max_quantizer */
@@ -1334,6 +1336,8 @@ static vpx_codec_enc_cfg_map_t vp8e_usage_cfg_map[] =
         {0},                /* ts_rate_decimator */
         0,                  /* ts_periodicity */
         {0},                /* ts_layer_id */
+        {0},                /* layer_target_bitrate */
+        0                   /* temporal_layering_mode */
     }},
 };
 
index 9c78de19845ff3bc2e77c2217c1c5b9e1374bfa4..fc9288d62b68effdc5c6c4fc3d7d376101b5b4d9 100644 (file)
@@ -522,7 +522,8 @@ static vpx_image_t *vp8_get_frame(vpx_codec_alg_priv_t  *ctx,
     {
         YV12_BUFFER_CONFIG sd;
         int64_t time_stamp = 0, time_end_stamp = 0;
-        vp8_ppflags_t flags = {0};
+        vp8_ppflags_t flags;
+        vp8_zero(flags);
 
         if (ctx->base.init_flags & VPX_CODEC_USE_POSTPROC)
         {
@@ -816,11 +817,12 @@ CODEC_INTERFACE(vpx_codec_vp8_dx) =
     },
     { /* encoder functions */
         0,
-        NULL,
-        NULL,
-        NULL,
-        NULL,
-        NULL,
-        NULL
+        NULL,  /* vpx_codec_enc_cfg_map_t */
+        NULL,  /* vpx_codec_encode_fn_t */
+        NULL,  /* vpx_codec_get_cx_data_fn_t */
+        NULL,  /* vpx_codec_enc_config_set_fn_t */
+        NULL,  /* vpx_codec_get_global_headers_fn_t */
+        NULL,  /* vpx_codec_get_preview_frame_fn_t */
+        NULL   /* vpx_codec_enc_mr_get_mem_loc_fn_t */
     }
 };