summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2015-03-18 14:31:58 -0700
committerJames Zern <jzern@google.com>2015-03-18 14:31:58 -0700
commit428369293d7bdd0b953bc74fd925b1484f0cad20 (patch)
tree935e3bf40fb6a61e3e85dad1aa41364d012bac30 /vp9
parent5edd076bd21cc584eae6c08dd0967b649ae4071a (diff)
downloadlibvpx-428369293d7bdd0b953bc74fd925b1484f0cad20.tar
libvpx-428369293d7bdd0b953bc74fd925b1484f0cad20.tar.gz
libvpx-428369293d7bdd0b953bc74fd925b1484f0cad20.tar.bz2
libvpx-428369293d7bdd0b953bc74fd925b1484f0cad20.zip
vp9_mv_pred: quiet a static analysis warning
add an assert to validate pred_mv array size Change-Id: I532b882b71e2baff3ac76e07ed133ec5a11bd0fc
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_rd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/vp9/encoder/vp9_rd.c b/vp9/encoder/vp9_rd.c
index caa9cae69..ae5a01226 100644
--- a/vp9/encoder/vp9_rd.c
+++ b/vp9/encoder/vp9_rd.c
@@ -467,6 +467,7 @@ void vp9_mv_pred(VP9_COMP *cpi, MACROBLOCK *x,
pred_mv[0] = mbmi->ref_mvs[ref_frame][0].as_mv;
pred_mv[1] = mbmi->ref_mvs[ref_frame][1].as_mv;
pred_mv[2] = x->pred_mv[ref_frame];
+ assert(num_mv_refs <= (int)(sizeof(pred_mv) / sizeof(pred_mv[0])));
// Get the sad for each candidate reference mv.
for (i = 0; i < num_mv_refs; ++i) {