From 472a5f03c6e759211c16f9fb8cf90280503da226 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Tue, 19 Feb 2008 13:12:32 +1100 Subject: Fixed a bunch of warnings --- libcelt/bands.c | 4 ++-- libcelt/cwrs.c | 10 ++++------ libcelt/modes.c | 1 + libcelt/vq.c | 2 +- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/libcelt/bands.c b/libcelt/bands.c index 92d6fc3..4a5df35 100644 --- a/libcelt/bands.c +++ b/libcelt/bands.c @@ -234,7 +234,7 @@ void quant_bands(const CELTMode *m, float *X, float *P, float *W, int total_bits 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 @@ void unquant_bands(const CELTMode *m, float *X, float *P, int total_bits, ec_dec 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) diff --git a/libcelt/cwrs.c b/libcelt/cwrs.c index 434d1ac..af20945 100644 --- 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 @@ static celt_uint32_t next_ncwrs32(celt_uint32_t *nc, int len, int nc0) /* 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_uint32_t prev_ncwrs32(celt_uint32_t *nc, int len, int nc0) } } -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 next_ncwrs64(celt_uint64_t *nc, int len, int nc0) } } -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 @@ static celt_uint64_t prev_ncwrs64(celt_uint64_t *nc, int len, int nc0) 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_uint32_t ncwrs(int _n,int _m) 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; diff --git a/libcelt/modes.c b/libcelt/modes.c index 3c4e3e5..60aa2bd 100644 --- 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) diff --git a/libcelt/vq.c b/libcelt/vq.c index 7403077..fa5cebd 100644 --- a/libcelt/vq.c +++ b/libcelt/vq.c @@ -166,7 +166,7 @@ void alg_quant(float *x, float *W, int N, int K, float *p, float alpha, ec_enc * if (score>nbest[Lupdate-1]->score) { - int k, n; + int k; int id = Lupdate-1; struct NBest *tmp_best; -- cgit v1.2.3