Commit 8362114e authored by Jean-Marc Valin's avatar Jean-Marc Valin Committed by Steinar Midtskogen
Browse files

Fix constrain() broken in 19f76635

Change-Id: Icd0313d12025b9dcf84f203dbfb1e0756d220dbc
parent 8a4de218
......@@ -17,7 +17,8 @@
static int sign(int i) { return i < 0 ? -1 : 1; }
static int constrain(int x, int s, unsigned int damping) {
return sign(x) * AOMMIN(abs(x), s - (abs(x) >> (damping - get_msb(s))));
return sign(x) *
AOMMIN(abs(x), AOMMAX(0, s - (abs(x) >> (damping - get_msb(s)))));
}
int av1_clpf_sample(int X, int A, int B, int C, int D, int E, int F, int G,
......
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