summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp9.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index dc0cea19e6..202b29e2eb 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -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