shithub: libvpx

Download patch

ref: c664f16182cb3e4f650fadb2ca0e996f2d546a8c
parent: 748843712f3950ce0f172a61ece3c7cb98cfeb4b
parent: 388add965f31263275b3c67e7b206a2ed3b18945
author: James Zern <jzern@google.com>
date: Wed Mar 18 15:38:49 EDT 2015

Merge changes Ie5a24275,Ib72946a8,I532b882b

* changes:
  vp9_fdct8x8_quant_ssse3: quiet a static analysis warning
  vp9_fdct8x8_quant_sse2: quiet a static analysis warning
  vp9_mv_pred: quiet a static analysis warning

--- a/vp9/encoder/vp9_rd.c
+++ b/vp9/encoder/vp9_rd.c
@@ -467,6 +467,7 @@
   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) {
--- a/vp9/encoder/x86/vp9_dct_sse2.c
+++ b/vp9/encoder/x86/vp9_dct_sse2.c
@@ -8,6 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include <assert.h>
 #include <emmintrin.h>  // SSE2
 #include "vp9/common/vp9_idct.h"  // for cospi constants
 #include "vp9/encoder/vp9_dct.h"
@@ -610,6 +611,7 @@
         __m128i qcoeff0, qcoeff1;
         __m128i qtmp0, qtmp1;
 
+        assert(index < (int)(sizeof(in) / sizeof(in[0])) - 1);
         coeff0 = *in[index];
         coeff1 = *in[index + 1];
 
--- a/vp9/encoder/x86/vp9_dct_ssse3.c
+++ b/vp9/encoder/x86/vp9_dct_ssse3.c
@@ -8,6 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include <assert.h>
 #if defined(_MSC_VER) && _MSC_VER <= 1500
 // Need to include math.h before calling tmmintrin.h/intrin.h
 // in certain versions of MSVS.
@@ -374,6 +375,7 @@
         __m128i qcoeff0, qcoeff1;
         __m128i qtmp0, qtmp1;
 
+        assert(index < (int)(sizeof(in) / sizeof(in[0])) - 1);
         coeff0 = *in[index];
         coeff1 = *in[index + 1];