Commit 5dd37c68 authored by Clément Bœsch's avatar Clément Bœsch

lavc/vp9: clarify inv_recenter_nonneg

Ends up identical to Libav.
parent e6ffdc95
...@@ -261,7 +261,11 @@ static av_always_inline int get_sbits_inv(GetBitContext *gb, int n) ...@@ -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) 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 // differential forward probability updates
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment