aboutsummaryrefslogtreecommitdiff
path: root/celt/mathops.c
diff options
context:
space:
mode:
Diffstat (limited to 'celt/mathops.c')
-rw-r--r--celt/mathops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/celt/mathops.c b/celt/mathops.c
index ce472c9..21fd942 100644
--- a/celt/mathops.c
+++ b/celt/mathops.c
@@ -123,6 +123,8 @@ opus_val32 celt_sqrt(opus_val32 x)
static const opus_val16 C[5] = {23175, 11561, -3011, 1699, -664};
if (x==0)
return 0;
+ else if (x>=1073741824)
+ return 32767;
k = (celt_ilog2(x)>>1)-7;
x = VSHR32(x, 2*k);
n = x-32768;