lavc/vp9: clarify inv_recenter_nonneg

Ends up identical to Libav.
This commit is contained in:
Clément Bœsch 2017-03-25 13:33:07 +01:00
parent e6ffdc9582
commit 5dd37c6847

View File

@ -261,7 +261,11 @@ static av_always_inline int get_sbits_inv(GetBitContext *gb, int n)
static av_always_inline int inv_recenter_nonneg(int v, int m)
{
return v > 2 * m ? v : v & 1 ? m - ((v + 1) >> 1) : m + (v >> 1);
if (v > 2 * m)
return v;
if (v & 1)
return m - ((v + 1) >> 1);
return m + (v >> 1);
}
// differential forward probability updates