diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-07-22 04:56:44 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-07-22 22:57:01 +0300 |
commit | 4c9ce97dbfa5f2ab0fb142a6794318444852a23b (patch) | |
tree | 083b87396c358c45589c3da9f452f09a10a44608 | |
parent | 382ab797cfdb405b0a634629e926cee8590c99c2 (diff) |
post-filter saturation
-rw-r--r-- | celt/celt.c | 9 |
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 */ |