shithub: opus

Download patch

ref: 472a5f03c6e759211c16f9fb8cf90280503da226
parent: 25358cd407bf159aab845390f8855217e7fbb610
author: Jean-Marc Valin <[email protected]>
date: Tue Feb 19 08:12:32 EST 2008

Fixed a bunch of warnings

--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -234,7 +234,7 @@
       q = pulses[i];
       //q = m->nbPulses[i];
       n = sqrt(B*(eBands[i+1]-eBands[i]));
-      theta = .007*(B*(eBands[i+1]-eBands[i]))/(.1f+abs(q));
+      theta = .007*(B*(eBands[i+1]-eBands[i]))/(.1f+q);
 
       /* If pitch isn't available, use intra-frame prediction */
       if (eBands[i] >= m->pitchEnd || q<=0)
@@ -290,7 +290,7 @@
       q = pulses[i];
       //q = m->nbPulses[i];
       n = sqrt(B*(eBands[i+1]-eBands[i]));
-      theta = .007*(B*(eBands[i+1]-eBands[i]))/(.1f+abs(q));
+      theta = .007*(B*(eBands[i+1]-eBands[i]))/(.1f+q);
 
       /* If pitch isn't available, use intra-frame prediction */
       if (eBands[i] >= m->pitchEnd || q<=0)
--- a/libcelt/cwrs.c
+++ b/libcelt/cwrs.c
@@ -38,7 +38,7 @@
 /* Knowing ncwrs() for a fixed number of pulses m and for all vector sizes n,
    compute ncwrs() for m+1, for all n. Could also be used when m and n are
    swapped just by changing nc */
-static celt_uint32_t next_ncwrs32(celt_uint32_t *nc, int len, int nc0)
+static void next_ncwrs32(celt_uint32_t *nc, int len, int nc0)
 {
    int i;
    celt_uint32_t mem;
@@ -56,7 +56,7 @@
 /* Knowing ncwrs() for a fixed number of pulses m and for all vector sizes n,
    compute ncwrs() for m-1, for all n. Could also be used when m and n are
    swapped just by changing nc */
-static celt_uint32_t prev_ncwrs32(celt_uint32_t *nc, int len, int nc0)
+static void prev_ncwrs32(celt_uint32_t *nc, int len, int nc0)
 {
    int i;
    celt_uint32_t mem;
@@ -71,7 +71,7 @@
    }
 }
 
-static celt_uint64_t next_ncwrs64(celt_uint64_t *nc, int len, int nc0)
+static void next_ncwrs64(celt_uint64_t *nc, int len, int nc0)
 {
    int i;
    celt_uint64_t mem;
@@ -86,7 +86,7 @@
    }
 }
 
-static celt_uint64_t prev_ncwrs64(celt_uint64_t *nc, int len, int nc0)
+static void prev_ncwrs64(celt_uint64_t *nc, int len, int nc0)
 {
    int i;
    celt_uint64_t mem;
@@ -106,7 +106,6 @@
 celt_uint32_t ncwrs(int _n,int _m)
 {
    int i;
-   celt_uint32_t ret;
    celt_uint32_t nc[_n+1];
    for (i=0;i<_n+1;i++)
       nc[i] = 1;
@@ -120,7 +119,6 @@
 celt_uint64_t ncwrs64(int _n,int _m)
 {
    int i;
-   celt_uint64_t ret;
    celt_uint64_t nc[_n+1];
    for (i=0;i<_n+1;i++)
       nc[i] = 1;
--- a/libcelt/modes.c
+++ b/libcelt/modes.c
@@ -31,6 +31,7 @@
 
 #include "celt.h"
 #include "modes.h"
+#include "rate.h"
 #include "os_support.h"
 
 int celt_mode_info(const CELTMode *mode, int request, celt_int32_t *value)
--- a/libcelt/vq.c
+++ b/libcelt/vq.c
@@ -166,7 +166,7 @@
 
                if (score>nbest[Lupdate-1]->score)
                {
-                  int k, n;
+                  int k;
                   int id = Lupdate-1;
                   struct NBest *tmp_best;