Commit 556c879a authored by jm's avatar jm
Browse files

Added const's all over the place


git-svn-id: http://svn.xiph.org/trunk/speex@5687 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 163f698d
......@@ -26,6 +26,9 @@ AC_CANONICAL_HOST
AM_PROG_LIBTOOL
AC_C_BIGENDIAN
AC_C_CONST
AC_C_INLINE
AC_CHECK_HEADERS(sys/soundcard.h sys/audioio.h)
AC_ARG_ENABLE(ogg,
......
......@@ -42,7 +42,7 @@ spx_sig_t target[], /* target vector */
spx_coef_t ak[], /* LPCs for this subframe */
spx_coef_t awk1[], /* Weighted LPCs for this subframe */
spx_coef_t awk2[], /* Weighted LPCs for this subframe */
void *par, /* Codebook/search parameters*/
const void *par, /* Codebook/search parameters*/
int p, /* number of LPC coeffs */
int nsf, /* number of samples in subframe */
spx_sig_t *exc,
......@@ -63,7 +63,7 @@ int complexity
spx_word16_t **ot, **nt;
int **nind, **oind;
int *ind;
signed char *shape_cb;
const signed char *shape_cb;
int shape_cb_size, subvect_size, nb_subvect;
split_cb_params *params;
int N=2;
......@@ -133,7 +133,7 @@ int complexity
for (i=0;i<shape_cb_size;i++)
{
spx_word16_t *res;
signed char *shape;
const signed char *shape;
res = resp+i*subvect_size;
shape = shape_cb+i*subvect_size;
......@@ -333,7 +333,7 @@ int complexity
void split_cb_shape_sign_unquant(
spx_sig_t *exc,
void *par, /* non-overlapping codebook */
const void *par, /* non-overlapping codebook */
int nsf, /* number of samples in subframe */
SpeexBits *bits,
char *stack
......@@ -341,7 +341,7 @@ char *stack
{
int i,j;
int *ind, *signs;
signed char *shape_cb;
const signed char *shape_cb;
int shape_cb_size, subvect_size, nb_subvect;
split_cb_params *params;
int have_sign;
......@@ -392,7 +392,7 @@ spx_sig_t target[], /* target vector */
spx_coef_t ak[], /* LPCs for this subframe */
spx_coef_t awk1[], /* Weighted LPCs for this subframe */
spx_coef_t awk2[], /* Weighted LPCs for this subframe */
void *par, /* Codebook/search parameters*/
const void *par, /* Codebook/search parameters*/
int p, /* number of LPC coeffs */
int nsf, /* number of samples in subframe */
spx_sig_t *exc,
......@@ -416,7 +416,7 @@ int complexity
void noise_codebook_unquant(
spx_sig_t *exc,
void *par, /* non-overlapping codebook */
const void *par, /* non-overlapping codebook */
int nsf, /* number of samples in subframe */
SpeexBits *bits,
char *stack
......
......@@ -39,7 +39,7 @@
typedef struct split_cb_params {
int subvect_size;
int nb_subvect;
signed char *shape_cb;
const signed char *shape_cb;
int shape_bits;
int have_sign;
} split_cb_params;
......@@ -50,7 +50,7 @@ spx_sig_t target[], /* target vector */
spx_coef_t ak[], /* LPCs for this subframe */
spx_coef_t awk1[], /* Weighted LPCs for this subframe */
spx_coef_t awk2[], /* Weighted LPCs for this subframe */
void *par, /* Codebook/search parameters*/
const void *par, /* Codebook/search parameters*/
int p, /* number of LPC coeffs */
int nsf, /* number of samples in subframe */
spx_sig_t *exc,
......@@ -62,7 +62,7 @@ int complexity
void split_cb_shape_sign_unquant(
spx_sig_t *exc,
void *par, /* non-overlapping codebook */
const void *par, /* non-overlapping codebook */
int nsf, /* number of samples in subframe */
SpeexBits *bits,
char *stack
......@@ -74,7 +74,7 @@ spx_sig_t target[], /* target vector */
spx_coef_t ak[], /* LPCs for this subframe */
spx_coef_t awk1[], /* Weighted LPCs for this subframe */
spx_coef_t awk2[], /* Weighted LPCs for this subframe */
void *par, /* Codebook/search parameters*/
const void *par, /* Codebook/search parameters*/
int p, /* number of LPC coeffs */
int nsf, /* number of samples in subframe */
spx_sig_t *exc,
......@@ -87,7 +87,7 @@ int complexity
void noise_codebook_unquant(
spx_sig_t *exc,
void *par, /* non-overlapping codebook */
const void *par, /* non-overlapping codebook */
int nsf, /* number of samples in subframe */
SpeexBits *bits,
char *stack
......
......@@ -31,7 +31,7 @@
*/
signed char exc_10_16_table[160] = {
const signed char exc_10_16_table[160] = {
22,39,14,44,11,35,-2,23,-4,6,
46,-28,13,-27,-23,12,4,20,-5,9,
37,-18,-23,23,0,9,-6,-20,4,-1,
......
......@@ -31,7 +31,7 @@
*/
signed char exc_10_32_table[320] = {
const signed char exc_10_32_table[320] = {
7,17,17,27,25,22,12,4,-3,0,
28,-36,39,-24,-15,3,-9,15,-5,10,
31,-28,11,31,-21,9,-11,-11,-2,-7,
......
......@@ -31,7 +31,7 @@
*/
signed char exc_20_32_table[640] = {
const signed char exc_20_32_table[640] = {
12,32,25,46,36,33,9,14,-3,6,1,-8,0,-10,-5,-7,-7,-7,-5,-5,
31,-27,24,-32,-4,10,-11,21,-3,19,23,-9,22,24,-10,-1,-10,-13,-7,-11,
42,-33,31,19,-8,0,-10,-16,1,-21,-17,10,-8,14,8,4,11,-2,5,-2,
......
......@@ -31,7 +31,7 @@
*/
signed char exc_5_256_table[1280] = {
const signed char exc_5_256_table[1280] = {
-8,-37,5,-43,5,
73,61,39,12,-3,
-61,-32,2,42,30,
......
......@@ -31,7 +31,7 @@
*/
signed char exc_5_64_table[320]={
const signed char exc_5_64_table[320]={
1,5,-15,49,-66,
-48,-4,50,-44,7,
37,16,-18,25,-26,
......
......@@ -31,7 +31,7 @@
*/
signed char exc_8_128_table[1024] = {
const signed char exc_8_128_table[1024] = {
-14,9,13,-32,2,-10,31,-10,
-8,-8,6,-4,-1,10,-64,23,
6,20,13,6,8,-22,16,34,
......
......@@ -38,7 +38,7 @@
#include "ltp.h"
#ifdef FIXED_POINT
void bw_lpc(spx_word16_t gamma, spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order)
void bw_lpc(spx_word16_t gamma, const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order)
{
int i;
spx_word16_t tmp=gamma;
......@@ -50,7 +50,7 @@ void bw_lpc(spx_word16_t gamma, spx_coef_t *lpc_in, spx_coef_t *lpc_out, int ord
}
}
#else
void bw_lpc(spx_word16_t gamma, spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order)
void bw_lpc(spx_word16_t gamma, const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order)
{
int i;
float tmp=1;
......@@ -67,7 +67,7 @@ void bw_lpc(spx_word16_t gamma, spx_coef_t *lpc_in, spx_coef_t *lpc_out, int ord
#ifdef FIXED_POINT
/* FIXME: These functions are ugly and probably introduce too much error */
void signal_mul(spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
{
int i;
for (i=0;i<len;i++)
......@@ -76,7 +76,7 @@ void signal_mul(spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
}
}
void signal_div(spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
void signal_div(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
{
int i;
spx_word16_t scale_1;
......@@ -94,14 +94,14 @@ void signal_div(spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
#else
void signal_mul(spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
{
int i;
for (i=0;i<len;i++)
y[i] = scale*x[i];
}
void signal_div(spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
void signal_div(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
{
int i;
float scale_1 = 1/scale;
......@@ -114,7 +114,7 @@ void signal_div(spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len)
#ifdef FIXED_POINT
int normalize16(spx_sig_t *x, spx_word16_t *y, int max_scale, int len)
int normalize16(const spx_sig_t *x, spx_word16_t *y, int max_scale, int len)
{
int i;
spx_sig_t max_val=1;
......@@ -142,7 +142,7 @@ int normalize16(spx_sig_t *x, spx_word16_t *y, int max_scale, int len)
return sig_shift;
}
spx_word16_t compute_rms(spx_sig_t *x, int len)
spx_word16_t compute_rms(const spx_sig_t *x, int len)
{
int i;
spx_word32_t sum=0;
......@@ -184,7 +184,7 @@ spx_word16_t compute_rms(spx_sig_t *x, int len)
}
void filter_mem2(spx_sig_t *x, spx_coef_t *num, spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
void filter_mem2(const spx_sig_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
{
int i,j;
spx_sig_t xi,yi,nyi;
......@@ -205,7 +205,7 @@ void filter_mem2(spx_sig_t *x, spx_coef_t *num, spx_coef_t *den, spx_sig_t *y, i
}
}
void iir_mem2(spx_sig_t *x, spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
void iir_mem2(const spx_sig_t *x, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
{
int i,j;
spx_word32_t xi,yi,nyi;
......@@ -227,7 +227,7 @@ void iir_mem2(spx_sig_t *x, spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_m
}
void fir_mem2(spx_sig_t *x, spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
void fir_mem2(const spx_sig_t *x, const spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
{
int i,j;
spx_word32_t xi,yi;
......@@ -252,7 +252,7 @@ void fir_mem2(spx_sig_t *x, spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_m
spx_word16_t compute_rms(spx_sig_t *x, int len)
spx_word16_t compute_rms(const spx_sig_t *x, int len)
{
int i;
float sum=0;
......@@ -268,7 +268,7 @@ spx_word16_t compute_rms(spx_sig_t *x, int len)
#else
void filter_mem2(spx_sig_t *x, spx_coef_t *num, spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
void filter_mem2(const spx_sig_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
{
int i,j;
float xi,yi;
......@@ -286,7 +286,7 @@ void filter_mem2(spx_sig_t *x, spx_coef_t *num, spx_coef_t *den, spx_sig_t *y, i
}
void iir_mem2(spx_sig_t *x, spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
void iir_mem2(const spx_sig_t *x, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
{
int i,j;
for (i=0;i<N;i++)
......@@ -303,7 +303,7 @@ void iir_mem2(spx_sig_t *x, spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_m
#endif
void fir_mem2(spx_sig_t *x, spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
void fir_mem2(const spx_sig_t *x, const spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem)
{
int i,j;
float xi;
......@@ -323,7 +323,7 @@ void fir_mem2(spx_sig_t *x, spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_m
#endif
void syn_percep_zero(spx_sig_t *xx, spx_coef_t *ak, spx_coef_t *awk1, spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack)
void syn_percep_zero(const spx_sig_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack)
{
int i;
spx_mem_t *mem = PUSH(stack,ord, spx_mem_t);
......@@ -335,7 +335,7 @@ void syn_percep_zero(spx_sig_t *xx, spx_coef_t *ak, spx_coef_t *awk1, spx_coef_t
filter_mem2(y, awk1, awk2, y, N, ord, mem);
}
void residue_percep_zero(spx_sig_t *xx, spx_coef_t *ak, spx_coef_t *awk1, spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack)
void residue_percep_zero(const spx_sig_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack)
{
int i;
spx_mem_t *mem = PUSH(stack,ord, spx_mem_t);
......@@ -347,7 +347,7 @@ void residue_percep_zero(spx_sig_t *xx, spx_coef_t *ak, spx_coef_t *awk1, spx_co
fir_mem2(y, awk2, y, N, ord, mem);
}
void qmf_decomp(short *xx, spx_word16_t *aa, spx_sig_t *y1, spx_sig_t *y2, int N, int M, spx_word16_t *mem, char *stack)
void qmf_decomp(const short *xx, const spx_word16_t *aa, spx_sig_t *y1, spx_sig_t *y2, int N, int M, spx_word16_t *mem, char *stack)
{
int i,j,k,M2;
spx_word16_t *a;
......@@ -384,7 +384,7 @@ void qmf_decomp(short *xx, spx_word16_t *aa, spx_sig_t *y1, spx_sig_t *y2, int N
/* By segher */
void fir_mem_up(spx_sig_t *x, spx_word16_t *a, spx_sig_t *y, int N, int M, spx_word32_t *mem, char *stack)
void fir_mem_up(const spx_sig_t *x, const spx_word16_t *a, spx_sig_t *y, int N, int M, spx_word32_t *mem, char *stack)
/* assumptions:
all odd x[i] are zero -- well, actually they are left out of the array now
N and M are multiples of 4 */
......
......@@ -35,13 +35,13 @@
#include "misc.h"
spx_word16_t compute_rms(spx_sig_t *x, int len);
void signal_mul(spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len);
void signal_div(spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len);
spx_word16_t compute_rms(const spx_sig_t *x, int len);
void signal_mul(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len);
void signal_div(const spx_sig_t *x, spx_sig_t *y, spx_word32_t scale, int len);
#ifdef FIXED_POINT
int normalize16(spx_sig_t *x, spx_word16_t *y, int max_scale, int len);
int normalize16(const spx_sig_t *x, spx_word16_t *y, int max_scale, int len);
#endif
......@@ -52,25 +52,25 @@ typedef struct CombFilterMem {
} CombFilterMem;
void qmf_decomp(short *xx, spx_word16_t *aa, spx_sig_t *y1, spx_sig_t *y2, int N, int M, spx_word16_t *mem, char *stack);
void fir_mem_up(spx_sig_t *x, spx_word16_t *a, spx_sig_t *y, int N, int M, spx_word32_t *mem, char *stack);
void qmf_decomp(const short *xx, const spx_word16_t *aa, spx_sig_t *y1, spx_sig_t *y2, int N, int M, spx_word16_t *mem, char *stack);
void fir_mem_up(const spx_sig_t *x, const spx_word16_t *a, spx_sig_t *y, int N, int M, spx_word32_t *mem, char *stack);
void filter_mem2(spx_sig_t *x, spx_coef_t *num, spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
void fir_mem2(spx_sig_t *x, spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
void iir_mem2(spx_sig_t *x, spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
void filter_mem2(const spx_sig_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
void fir_mem2(const spx_sig_t *x, const spx_coef_t *num, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
void iir_mem2(const spx_sig_t *x, const spx_coef_t *den, spx_sig_t *y, int N, int ord, spx_mem_t *mem);
/* Apply bandwidth expansion on LPC coef */
void bw_lpc(spx_word16_t gamma, spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order);
void bw_lpc(spx_word16_t gamma, const spx_coef_t *lpc_in, spx_coef_t *lpc_out, int order);
/* FIR filter */
void fir_decim_mem(spx_sig_t *x, float *a, spx_sig_t *y, int N, int M, float *mem);
void fir_decim_mem(const spx_sig_t *x, const float *a, spx_sig_t *y, int N, int M, float *mem);
void syn_percep_zero(spx_sig_t *x, spx_coef_t *ak, spx_coef_t *awk1, spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack);
void syn_percep_zero(const spx_sig_t *x, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack);
void residue_percep_zero(spx_sig_t *xx, spx_coef_t *ak, spx_coef_t *awk1, spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack);
void residue_percep_zero(const spx_sig_t *xx, const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_sig_t *y, int N, int ord, char *stack);
void comb_filter_mem_init (CombFilterMem *mem);
......
......@@ -78,11 +78,11 @@ static inline int ADD32(long long a, long long b)
long long res;
if (!VERIFY_INT(a) || !VERIFY_INT(b))
{
fprintf (stderr, "ADD32: inputs are not int: %d %d\n", a, b);
fprintf (stderr, "ADD32: inputs are not int: %d %d\n", (int)a, (int)b);
}
res = a+b;
if (!VERIFY_INT(res))
fprintf (stderr, "ADD32: output is not int: %d\n", res);
fprintf (stderr, "ADD32: output is not int: %d\n", (int)res);
spx_mips++;
return res;
}
......@@ -92,11 +92,11 @@ static inline int SUB32(long long a, long long b)
long long res;
if (!VERIFY_INT(a) || !VERIFY_INT(b))
{
fprintf (stderr, "SUB32: inputs are not int: %d %d\n", a, b);
fprintf (stderr, "SUB32: inputs are not int: %d %d\n", (int)a, (int)b);
}
res = a-b;
if (!VERIFY_INT(res))
fprintf (stderr, "SUB32: output is not int: %d\n", res);
fprintf (stderr, "SUB32: output is not int: %d\n", (int)res);
spx_mips++;
return res;
}
......@@ -129,7 +129,7 @@ static inline int MULT16_16(int a, int b)
}
res = ((long long)a)*b;
if (!VERIFY_INT(res))
fprintf (stderr, "MULT16_16: output is not int: %d\n", res);
fprintf (stderr, "MULT16_16: output is not int: %d\n", (int)res);
spx_mips++;
return res;
}
......@@ -167,7 +167,7 @@ static inline short MULT16_16_Q11(int a, int b)
res = ((long long)a)*b;
res >>= 11;
if (!VERIFY_SHORT(res))
fprintf (stderr, "MULT16_16_Q11: output is not short: %d*%d=%d\n", a, b, res);
fprintf (stderr, "MULT16_16_Q11: output is not short: %d*%d=%d\n", (int)a, (int)b, (int)res);
spx_mips++;
return res;
}
......@@ -181,7 +181,7 @@ static inline short MULT16_16_Q13(int a, int b)
res = ((long long)a)*b;
res >>= 13;
if (!VERIFY_SHORT(res))
fprintf (stderr, "MULT16_16_Q13: output is not short: %d*%d=%d\n", a, b, res);
fprintf (stderr, "MULT16_16_Q13: output is not short: %d*%d=%d\n", a, b, (int)res);
spx_mips++;
return res;
}
......@@ -195,7 +195,7 @@ static inline short MULT16_16_Q14(int a, int b)
res = ((long long)a)*b;
res >>= 14;
if (!VERIFY_SHORT(res))
fprintf (stderr, "MULT16_16_Q14: output is not short: %d\n", res);
fprintf (stderr, "MULT16_16_Q14: output is not short: %d\n", (int)res);
spx_mips++;
return res;
}
......@@ -209,7 +209,7 @@ static inline short MULT16_16_Q15(int a, int b)
res = ((long long)a)*b;
res >>= 15;
if (!VERIFY_SHORT(res))
fprintf (stderr, "MULT16_16_Q15: output is not short: %d\n", res);
fprintf (stderr, "MULT16_16_Q15: output is not short: %d\n", (int)res);
spx_mips++;
return res;
}
......@@ -224,10 +224,10 @@ static inline short MULT16_16_P13(int a, int b)
res = ((long long)a)*b;
res += 4096;
if (!VERIFY_INT(res))
fprintf (stderr, "MULT16_16_P13: overflow: %d*%d=%d\n", a, b, res);
fprintf (stderr, "MULT16_16_P13: overflow: %d*%d=%d\n", a, b, (int)res);
res >>= 13;
if (!VERIFY_SHORT(res))
fprintf (stderr, "MULT16_16_P13: output is not short: %d*%d=%d\n", a, b, res);
fprintf (stderr, "MULT16_16_P13: output is not short: %d*%d=%d\n", a, b, (int)res);
spx_mips++;
return res;
}
......@@ -241,10 +241,10 @@ static inline short MULT16_16_P14(int a, int b)
res = ((long long)a)*b;
res += 8192;
if (!VERIFY_INT(res))
fprintf (stderr, "MULT16_16_P14: overflow: %d*%d=%d\n", a, b, res);
fprintf (stderr, "MULT16_16_P14: overflow: %d*%d=%d\n", a, b, (int)res);
res >>= 14;
if (!VERIFY_SHORT(res))
fprintf (stderr, "MULT16_16_P14: output is not short: %d*%d=%d\n", a, b, res);
fprintf (stderr, "MULT16_16_P14: output is not short: %d*%d=%d\n", a, b, (int)res);
spx_mips++;
return res;
}
......@@ -258,10 +258,10 @@ static inline short MULT16_16_P15(int a, int b)
res = ((long long)a)*b;
res += 16384;
if (!VERIFY_INT(res))
fprintf (stderr, "MULT16_16_P15: overflow: %d*%d=%d\n", a, b, res);
fprintf (stderr, "MULT16_16_P15: overflow: %d*%d=%d\n", a, b, (int)res);
res >>= 15;
if (!VERIFY_SHORT(res))
fprintf (stderr, "MULT16_16_P15: output is not short: %d*%d=%d\n", a, b, res);
fprintf (stderr, "MULT16_16_P15: output is not short: %d*%d=%d\n", a, b, (int)res);
spx_mips++;
return res;
}
......@@ -298,17 +298,17 @@ static inline int DIV32(long long a, long long b)
long long res;
if (b==0)
{
fprintf(stderr, "DIV32: divide by zero: %d/%d\n", a, b);
fprintf(stderr, "DIV32: divide by zero: %d/%d\n", (int)a, (int)b);
return 0;
}
if (!VERIFY_INT(a) || !VERIFY_INT(b))
{
fprintf (stderr, "DIV32: inputs are not int/short: %d %d\n", a, b);
fprintf (stderr, "DIV32: inputs are not int/short: %d %d\n", (int)a, (int)b);
}
res = a/b;
if (!VERIFY_INT(res))
fprintf (stderr, "DIV32: output is not int: %d\n", res);
fprintf (stderr, "DIV32: output is not int: %d\n", (int)res);
spx_mips++;
return res;
}
......
......@@ -29,7 +29,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
signed char gain_cdbk_nb[384] = {
const signed char gain_cdbk_nb[384] = {
-32,-32,-32,
-28,-67,-5,
-42,-6,-32,
......
......@@ -29,7 +29,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
signed char gain_cdbk_lbr[96] = {
const signed char gain_cdbk_lbr[96] = {
-32,-32,-32,
-31,-58,-16,
-41,-24,-43,
......
......@@ -30,7 +30,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
signed char hexc_10_32_table[320] = {
const signed char hexc_10_32_table[320] = {
-3, -2, -1, 0, -4, 5, 35, -40, -9, 13,
-44, 5, -27, -1, -7, 6, -11, 7, -8, 7,
19, -14, 15, -4, 9, -10, 10, -8, 10, -9,
......
......@@ -30,7 +30,7 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
signed char hexc_table[1024] = {
const signed char hexc_table[1024] = {
-24, 21, -20, 5, -5, -7, 14, -10,
2, -27, 16, -20, 0, -32, 26, 19,
8, -11, -41, 31, 28, -27, -32, 34,
......
......@@ -29,7 +29,7 @@
POSSIBILITY OF SUCH DAMAGE.
*/
signed char high_lsp_cdbk[512]={
const signed char high_lsp_cdbk[512]={
39,12,-14,-20,-29,-61,-67,-76,
-32,-71,-67,68,77,46,34,5,
-13,-48,-46,-72,-81,-84,-60,-58,
......@@ -96,7 +96,7 @@ signed char high_lsp_cdbk[512]={
-42,-74,-48,21,-4,70,52,10};
signed char high_lsp_cdbk2[512]={
const signed char high_lsp_cdbk2[512]={
-36,-62,6,-9,-10,-14,-56,23,
1,-26,23,-48,-17,12,8,-7,
23,29,-36,-28,-6,-29,-17,-5,
......
......@@ -33,7 +33,7 @@
int dummy_epic_48k_variable=0;
#ifdef EPIC_48K
signed char gain_cdbk_ulbr[192] = {
const signed char gain_cdbk_ulbr[192] = {
-31, -48, -30,
-19, -10, -18,
-33, -22, -45,
......@@ -101,7 +101,7 @@ signed char gain_cdbk_ulbr[192] = {
};
signed char exc_12_32_table[384] = {
const signed char exc_12_32_table[384] = {
34, 55, 9, 55, 4, 44, -2, 25, 4, -6, 13, -22,
20, 26, -13, -56, -37, 18, 5, 28, 4, 10, 6, -7,
37, -24, -31, 22, 12, -6, -4, -7, 2, 0, -3, -2,
......@@ -137,7 +137,7 @@ signed char exc_12_32_table[384] = {
};