summaryrefslogtreecommitdiff
path: root/vp8/encoder/pickinter.c
diff options
context:
space:
mode:
authorkyslov <kyslov@google.com>2019-04-11 16:11:34 -0700
committerkyslov <kyslov@google.com>2019-04-11 17:37:15 -0700
commit4ba3098ecb471be486b665c7f8716645ba8e22c6 (patch)
treee7c5cf6903474c043fd404c7b2e973130e57a524 /vp8/encoder/pickinter.c
parente8bfbf53174a80440d7251085ac8d8e16ac8ed3c (diff)
downloadlibvpx-4ba3098ecb471be486b665c7f8716645ba8e22c6.tar
libvpx-4ba3098ecb471be486b665c7f8716645ba8e22c6.tar.gz
libvpx-4ba3098ecb471be486b665c7f8716645ba8e22c6.tar.bz2
libvpx-4ba3098ecb471be486b665c7f8716645ba8e22c6.zip
Fix static analysis warnings
With switching to clang-7.0.1 we got new warnings. With this change the warnings are back to 0 for all configurations (excluding warnings in third_party) BUG=webm:1616 Change-Id: I25ceb592c425394e8f14d333fb5680144f892213
Diffstat (limited to 'vp8/encoder/pickinter.c')
-rw-r--r--vp8/encoder/pickinter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/vp8/encoder/pickinter.c b/vp8/encoder/pickinter.c
index 6bb3cacc5..dc72eed88 100644
--- a/vp8/encoder/pickinter.c
+++ b/vp8/encoder/pickinter.c
@@ -563,7 +563,7 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
MACROBLOCKD *xd = &x->e_mbd;
MB_MODE_INFO best_mbmode;
- int_mv best_ref_mv_sb[2];
+ int_mv best_ref_mv_sb[2] = { { 0 }, { 0 } };
int_mv mode_mv_sb[2][MB_MODE_COUNT];
int_mv best_ref_mv;
int_mv *mode_mv;
@@ -601,7 +601,7 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
/* search range got from mv_pred(). It uses step_param levels. (0-7) */
int sr = 0;
- unsigned char *plane[4][3];
+ unsigned char *plane[4][3] = { { 0, 0 } };
int ref_frame_map[4];
int sign_bias = 0;
int dot_artifact_candidate = 0;
@@ -630,13 +630,16 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
}
}
#endif
+ assert(plane[LAST_FRAME][0] != NULL);
dot_artifact_candidate = check_dot_artifact_candidate(
cpi, x, target_y, stride, plane[LAST_FRAME][0], mb_row, mb_col, 0);
// If not found in Y channel, check UV channel.
if (!dot_artifact_candidate) {
+ assert(plane[LAST_FRAME][1] != NULL);
dot_artifact_candidate = check_dot_artifact_candidate(
cpi, x, target_u, stride_uv, plane[LAST_FRAME][1], mb_row, mb_col, 1);
if (!dot_artifact_candidate) {
+ assert(plane[LAST_FRAME][2] != NULL);
dot_artifact_candidate = check_dot_artifact_candidate(
cpi, x, target_v, stride_uv, plane[LAST_FRAME][2], mb_row, mb_col,
2);