shithub: opus

Download patch

ref: 71ae6d47147ed7b02db4b7025534c69e3e33a18f
parent: 3a1006ad2acb3545a0b67f21b7b498618d8fe48f
author: Jean-Marc Valin <[email protected]>
date: Sun Jun 27 17:55:08 EDT 2010

Some C90-ication

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -634,7 +634,7 @@
       else
          tf_res[i] = path0[i+1];
    }
-   RESTORE_STACK
+   RESTORE_STACK;
    return tf_select;
 }
 
@@ -1466,7 +1466,6 @@
    int overlap = st->mode->overlap;
    celt_word16 fade = Q15ONE;
    int i, len;
-   VARDECL(celt_sig, freq);
    const int C = CHANNELS(st->channels);
    int offset;
    SAVE_STACK;
--- a/libcelt/dump_modes.c
+++ b/libcelt/dump_modes.c
@@ -156,7 +156,6 @@
       fprintf(file, "%d,\t/* nbAllocVectors */\n", mode->nbAllocVectors);
       fprintf(file, "allocVectors%d_%d,\t/* allocVectors */\n", mode->Fs, mdctSize);
       fprintf(file, "NULL,\t/* bits */\n");
-      //fprintf(file, "allocCacheTop%d_%d,\t/* _bits */\n", mode->Fs, mode->mdctSize);
       fprintf (file, "{ ");
       for (k=0;(1<<k>>1)<=mode->nbShortMdcts;k++)
       {
--- a/libcelt/ecintrin.h
+++ b/libcelt/ecintrin.h
@@ -108,29 +108,4 @@
 # define EC_ILOG(_x) (ec_ilog(_x))
 #endif
 
-#ifdef __GNUC_PREREQ
-#if __GNUC_PREREQ(3,4)
-# if INT_MAX>=9223372036854775807
-#  define EC_CLZ64_0 sizeof(unsigned)*CHAR_BIT
-#  define EC_CLZ64(_x) (__builtin_clz(_x))
-# elif LONG_MAX>=9223372036854775807L
-#  define EC_CLZ64_0 sizeof(unsigned long)*CHAR_BIT
-#  define EC_CLZ64(_x) (__builtin_clzl(_x))
-# elif LLONG_MAX>=9223372036854775807LL
-#  define EC_CLZ64_0 sizeof(unsigned long long)*CHAR_BIT
-#  define EC_CLZ64(_x) (__builtin_clzll(_x))
-# endif
-#endif
-#endif
-
-#if defined(EC_CLZ64)
-/*Note that __builtin_clz is not defined when _x==0, according to the gcc
-   documentation (and that of the BSR instruction that implements it on x86).
-  The majority of the time we can never pass it zero.
-  When we need to, it can be special cased.*/
-# define EC_ILOG64(_x) (EC_CLZ64_0-EC_CLZ64(_x))
-#else
-# define EC_ILOG64(_x) (ec_ilog64(_x))
-#endif
-
 #endif