mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
libspeex: Fix compile warnings on Apple Clang 21
- unused function parameters - signed/unsigned comparisons - unused local variable Co-authored-by: ChatGPT (GPT-5.3 Mini) <chatgpt@openai.com> Change-Id: I64e9e2573174377465b10e5912d10ca2a22da0e1
This commit is contained in:
parent
3d3df07c45
commit
3ba63d667e
7 changed files with 30 additions and 9 deletions
|
|
@ -53,6 +53,7 @@
|
|||
#ifndef OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK
|
||||
static void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word16_t *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack)
|
||||
{
|
||||
(void)resp2; (void)stack;
|
||||
int i, j, k;
|
||||
VARDECL(spx_word16_t *shape);
|
||||
ALLOC(shape, subvect_size, spx_word16_t);
|
||||
|
|
@ -590,6 +591,7 @@ int complexity,
|
|||
int update_target
|
||||
)
|
||||
{
|
||||
(void)par; (void)r; (void)bits; (void)complexity; (void)update_target;
|
||||
int i;
|
||||
VARDECL(spx_word16_t *tmp);
|
||||
ALLOC(tmp, nsf, spx_word16_t);
|
||||
|
|
|
|||
|
|
@ -334,6 +334,7 @@ spx_word16_t compute_rms16(const spx_word16_t *x, int len)
|
|||
#ifndef OVERRIDE_FILTER_MEM16
|
||||
void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
|
||||
{
|
||||
(void)stack;
|
||||
int i,j;
|
||||
spx_word16_t xi,yi,nyi;
|
||||
for (i=0;i<N;i++)
|
||||
|
|
@ -377,6 +378,7 @@ void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, in
|
|||
#ifndef OVERRIDE_FIR_MEM16
|
||||
void fir_mem16(const spx_word16_t *x, const spx_coef_t *num, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack)
|
||||
{
|
||||
(void)stack;
|
||||
int i,j;
|
||||
spx_word16_t xi,yi;
|
||||
|
||||
|
|
@ -424,6 +426,7 @@ void residue_percep_zero16(const spx_word16_t *xx, const spx_coef_t *ak, const s
|
|||
#ifndef OVERRIDE_COMPUTE_IMPULSE_RESPONSE
|
||||
void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, const spx_coef_t *awk2, spx_word16_t *y, int N, int ord, char *stack)
|
||||
{
|
||||
(void)stack;
|
||||
int i,j;
|
||||
spx_word16_t y1, ny1i, ny2i;
|
||||
VARDECL(spx_mem_t *mem1);
|
||||
|
|
@ -459,6 +462,7 @@ void compute_impulse_response(const spx_coef_t *ak, const spx_coef_t *awk1, cons
|
|||
/* Decomposes a signal into low-band and high-band using a QMF */
|
||||
void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_word16_t *y1, spx_word16_t *y2, int N, int M, spx_word16_t *mem, char *stack)
|
||||
{
|
||||
(void)stack;
|
||||
int i,j,k,M2;
|
||||
VARDECL(spx_word16_t *a);
|
||||
VARDECL(spx_word16_t *x);
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ static inline spx_word32_t cheb_poly_eva(
|
|||
|
||||
static float cheb_poly_eva(spx_word32_t *coef, spx_word16_t x, int m, char *stack)
|
||||
{
|
||||
(void)stack;
|
||||
int k;
|
||||
float b0, b1, tmp;
|
||||
|
||||
|
|
@ -533,6 +534,7 @@ void lsp_to_lpc(spx_lsp_t *freq,spx_coef_t *ak,int lpcrdr, char *stack)
|
|||
|
||||
|
||||
{
|
||||
(void)stack;
|
||||
int i,j;
|
||||
float xout1,xout2,xin1,xin2;
|
||||
VARDECL(float *Wp);
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *c
|
|||
#else
|
||||
void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack)
|
||||
{
|
||||
(void)stack;
|
||||
int i;
|
||||
for (i=0;i<nb_pitch;i++)
|
||||
{
|
||||
|
|
@ -372,6 +373,10 @@ spx_word32_t cumul_gain,
|
|||
int scaledown
|
||||
)
|
||||
{
|
||||
(void)bits;
|
||||
#ifndef FIXED_POINT
|
||||
(void)scaledown;
|
||||
#endif
|
||||
int i,j;
|
||||
VARDECL(spx_word16_t *tmp1);
|
||||
VARDECL(spx_word16_t *e);
|
||||
|
|
@ -553,6 +558,7 @@ int plc_tuning,
|
|||
spx_word32_t *cumul_gain
|
||||
)
|
||||
{
|
||||
(void)pitch_coef;
|
||||
int i;
|
||||
int cdbk_index, pitch=0, best_gain_index=0;
|
||||
VARDECL(spx_sig_t *best_exc);
|
||||
|
|
@ -785,6 +791,8 @@ int plc_tuning,
|
|||
spx_word32_t *cumul_gain
|
||||
)
|
||||
{
|
||||
(void)sw; (void)par; (void)end; (void)bits; (void)r; (void)complexity;
|
||||
(void)cdbk_offset; (void)plc_tuning; (void)cumul_gain;
|
||||
int i;
|
||||
VARDECL(spx_word16_t *res);
|
||||
ALLOC(res, nsf, spx_word16_t);
|
||||
|
|
|
|||
|
|
@ -591,7 +591,7 @@ static void update_filter(SpeexResamplerState *st)
|
|||
}
|
||||
for (i=0;i<st->den_rate;i++)
|
||||
{
|
||||
spx_int32_t j;
|
||||
spx_uint32_t j;
|
||||
for (j=0;j<st->filt_len;j++)
|
||||
{
|
||||
st->sinc_table[i*st->filt_len+j] = sinc(st->cutoff,((j-(spx_int32_t)st->filt_len/2+1)-((float)i)/st->den_rate), st->filt_len, quality_map[st->quality].window_func);
|
||||
|
|
@ -663,7 +663,8 @@ static void update_filter(SpeexResamplerState *st)
|
|||
}
|
||||
for (i=st->nb_channels-1;i>=0;i--)
|
||||
{
|
||||
spx_int32_t j;
|
||||
spx_uint32_t j;
|
||||
spx_int32_t k;
|
||||
spx_uint32_t olen = old_length;
|
||||
/*if (st->magic_samples[i])*/
|
||||
{
|
||||
|
|
@ -671,8 +672,8 @@ static void update_filter(SpeexResamplerState *st)
|
|||
|
||||
/* FIXME: This is wrong but for now we need it to avoid going over the array bounds */
|
||||
olen = old_length + 2*st->magic_samples[i];
|
||||
for (j=old_length-2+st->magic_samples[i];j>=0;j--)
|
||||
st->mem[i*st->mem_alloc_size+j+st->magic_samples[i]] = st->mem[i*old_alloc_size+j];
|
||||
for (k=old_length-2+st->magic_samples[i];k>=0;k--)
|
||||
st->mem[i*st->mem_alloc_size+k+st->magic_samples[i]] = st->mem[i*old_alloc_size+k];
|
||||
for (j=0;j<st->magic_samples[i];j++)
|
||||
st->mem[i*st->mem_alloc_size+j] = 0;
|
||||
st->magic_samples[i] = 0;
|
||||
|
|
@ -841,7 +842,7 @@ EXPORT int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t cha
|
|||
EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t channel_index, const float *in, spx_uint32_t *in_len, float *out, spx_uint32_t *out_len)
|
||||
#endif
|
||||
{
|
||||
int j;
|
||||
spx_uint32_t j;
|
||||
spx_uint32_t ilen = *in_len;
|
||||
spx_uint32_t olen = *out_len;
|
||||
spx_word16_t *x = st->mem + channel_index * st->mem_alloc_size;
|
||||
|
|
@ -882,7 +883,7 @@ EXPORT int speex_resampler_process_float(SpeexResamplerState *st, spx_uint32_t c
|
|||
EXPORT int speex_resampler_process_int(SpeexResamplerState *st, spx_uint32_t channel_index, const spx_int16_t *in, spx_uint32_t *in_len, spx_int16_t *out, spx_uint32_t *out_len)
|
||||
#endif
|
||||
{
|
||||
int j;
|
||||
spx_uint32_t j;
|
||||
const int istride_save = st->in_stride;
|
||||
const int ostride_save = st->out_stride;
|
||||
spx_uint32_t ilen = *in_len;
|
||||
|
|
|
|||
|
|
@ -123,10 +123,11 @@ void vbr_init(VBRState *vbr)
|
|||
|
||||
float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float pitch_coef)
|
||||
{
|
||||
(void)pitch;
|
||||
int i;
|
||||
float ener=0, ener1=0, ener2=0;
|
||||
float qual=7;
|
||||
int va;
|
||||
/* int va; */
|
||||
float log_energy;
|
||||
float non_st=0;
|
||||
float voicing;
|
||||
|
|
@ -159,7 +160,7 @@ float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float p
|
|||
|| (voicing<0 && non_st < .05))
|
||||
{
|
||||
float tmp;
|
||||
va = 0;
|
||||
/* va = 0; */
|
||||
vbr->consec_noise++;
|
||||
if (pow_ener > 3*vbr->noise_level)
|
||||
tmp = 3*vbr->noise_level;
|
||||
|
|
@ -171,7 +172,7 @@ float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float p
|
|||
vbr->noise_accum_count = .95*vbr->noise_accum_count + .05;
|
||||
}
|
||||
} else {
|
||||
va = 1;
|
||||
/* va = 1; */
|
||||
vbr->consec_noise=0;
|
||||
}
|
||||
|
||||
|
|
@ -270,6 +271,7 @@ float vbr_analysis(VBRState *vbr, spx_word16_t *sig, int len, int pitch, float p
|
|||
|
||||
void vbr_destroy(VBRState *vbr)
|
||||
{
|
||||
(void)vbr;
|
||||
}
|
||||
|
||||
#endif /* #ifndef DISABLE_VBR */
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ int scal_quant32(spx_word32_t in, const spx_word32_t *boundary, int entries)
|
|||
/*Finds the indices of the n-best entries in a codebook*/
|
||||
void vq_nbest(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack)
|
||||
{
|
||||
(void)stack;
|
||||
int i,j,k,used;
|
||||
used = 0;
|
||||
for (i=0;i<entries;i++)
|
||||
|
|
@ -109,6 +110,7 @@ void vq_nbest(spx_word16_t *in, const spx_word16_t *codebook, int len, int entri
|
|||
/*Finds the indices of the n-best entries in a codebook with sign*/
|
||||
void vq_nbest_sign(spx_word16_t *in, const spx_word16_t *codebook, int len, int entries, spx_word32_t *E, int N, int *nbest, spx_word32_t *best_dist, char *stack)
|
||||
{
|
||||
(void)stack;
|
||||
int i,j,k, sign, used;
|
||||
used=0;
|
||||
for (i=0;i<entries;i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue