From: Ronald S. Bultje Date: Thu, 16 Aug 2012 18:09:31 +0000 (-0700) Subject: Set a default mv entropy if no tokens are coded. X-Git-Tag: v1.3.0~1217^2~296^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=319dd1c0f58d3db46713460ca10e920f2b18b605;p=libvpx Set a default mv entropy if no tokens are coded. 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 --- diff --git a/vp8/common/entropymv.c b/vp8/common/entropymv.c index e04922f05..1664b2899 100644 --- a/vp8/common/entropymv.c +++ b/vp8/common/entropymv.c @@ -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; } }