Set a default mv entropy if no tokens are coded.
authorRonald S. Bultje <rbultje@google.com>
Thu, 16 Aug 2012 18:09:31 +0000 (11:09 -0700)
committerRonald S. Bultje <rbultje@google.com>
Thu, 16 Aug 2012 18:12:50 +0000 (11:12 -0700)
This doesn't affect the result, since there are no MVs coded using this
entropy. It does, however, silence valgrind warnings about uninitialized
variables.

Change-Id: I6e21ba92df6ce5381bf58b8c349ef4373294a0b6

vp8/common/entropymv.c

index e04922f..1664b28 100644 (file)
@@ -117,6 +117,8 @@ __inline static void calc_prob(vp8_prob *p, const unsigned int ct[2], int pbits)
   if (tot) {
     const vp8_prob x = ((ct[0] * 255) / tot) & -(1 << (8 - pbits));
     *p = x ? x : 1;
+  } else {
+    *p = 128;
   }
 }