Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-22 04:56:44 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-07-22 22:57:01 +0300
commit4c9ce97dbfa5f2ab0fb142a6794318444852a23b (patch)
tree083b87396c358c45589c3da9f452f09a10a44608
parent382ab797cfdb405b0a634629e926cee8590c99c2 (diff)
post-filter saturation
-rw-r--r--celt/celt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/celt/celt.c b/celt/celt.c
index 2425ba3e..8502fdb9 100644
--- a/celt/celt.c
+++ b/celt/celt.c
@@ -236,11 +236,20 @@ void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N,
/* OPT: Happens to work without the OPUS_MOVE(), but only because the current encoder already copies x to y */
if (x!=y)
OPUS_MOVE(y+overlap, x+overlap, N-overlap);
+#ifdef FIXED_POINT
+ for (i=0; i < overlap; i++)
+ y[i] = SATURATE(y[i], SIG_SAT);
+#endif
return;
}
/* Compute the part with the constant filter. */
comb_filter_const(y+i, x+i, T1, N-i, g10, g11, g12, arch);
+#ifdef FIXED_POINT
+ for (i=0; i < N; i++)
+ y[i] = SATURATE(y[i], SIG_SAT);
+#endif
+
}
#endif /* OVERRIDE_comb_filter */