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 19:10:20 +0300 |
commit | a3e9693c242d12c43a72d92b8893cf983c7dda97 (patch) | |
tree | 757072b33a6d40091d3ff29fa8bf32d1649db655 | |
parent | 10aafd490150991c6ce9157910ba6e2628b72fc6 (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 */ |