From 319dd1c0f58d3db46713460ca10e920f2b18b605 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 16 Aug 2012 11:09:31 -0700 Subject: [PATCH] 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 --- vp8/common/entropymv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vp8/common/entropymv.c b/vp8/common/entropymv.c index e04922f..1664b28 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; } } -- 2.7.4