shithub: opus

Download patch

ref: 7f28f768e759ff2f6b20f3d2d6554df91e79b0bc
parent: b2b71a58e5ca4bd9170376dfa513bc06ba0b9f88
author: Jean-Marc Valin <[email protected]>
date: Wed Apr 16 07:47:24 EDT 2008

Make use of CELT_MEMSET() in find_spectral_pitch()

--- a/libcelt/pitch.c
+++ b/libcelt/pitch.c
@@ -119,8 +119,7 @@
    X = _X;
    ALLOC(curve, n2, celt_mask_t);
 
-   for (i=0;i<lag;i++)
-      X[i] = 0;
+   CELT_MEMSET(X,0,lag);
    /* Sum all channels of the current frame and copy into X in bit-reverse order */
    for (c=0;c<C;c++)
    {
@@ -149,8 +148,7 @@
    /* Deferred allocation to reduce peak stack usage */
    ALLOC(_Y, lag, celt_word16_t);
    Y = _Y;
-   for (i=0;i<lag;i++)
-      Y[i] = 0;
+   CELT_MEMSET(Y,0,lag);
    /* Sum all channels of the past audio and copy into Y in bit-reverse order */
    for (c=0;c<C;c++)
    {