shithub: opus

Download patch

ref: 4c9ce97dbfa5f2ab0fb142a6794318444852a23b
parent: 382ab797cfdb405b0a634629e926cee8590c99c2
author: Jean-Marc Valin <[email protected]>
date: Thu Jul 21 17:56:44 EDT 2016

post-filter saturation

--- a/celt/celt.c
+++ b/celt/celt.c
@@ -236,11 +236,20 @@
       /* 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 */