diff options
author | Thom Johansen <thomj@rockbox.org> | 2007-11-06 17:10:17 +0000 |
---|---|---|
committer | Thom Johansen <thomj@rockbox.org> | 2007-11-06 17:10:17 +0000 |
commit | f5903789fb745d21644f93a82fd3e2404bb8ff65 (patch) | |
tree | c847ec2e48eb3ebc6343bb15f32558d7e302c280 /apps/codecs/libspeex | |
parent | 3eed6fc0251eb5cdce4eda39e036df76838fa60e (diff) |
Exclude some unneeded LSP code. Add some #endif clarification comments here and there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15497 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex')
-rw-r--r-- | apps/codecs/libspeex/cb_search.c | 4 | ||||
-rw-r--r-- | apps/codecs/libspeex/filters.c | 6 | ||||
-rw-r--r-- | apps/codecs/libspeex/lsp.c | 4 | ||||
-rw-r--r-- | apps/codecs/libspeex/ltp.c | 4 | ||||
-rw-r--r-- | apps/codecs/libspeex/nb_celp.c | 4 | ||||
-rw-r--r-- | apps/codecs/libspeex/quant_lsp.c | 8 | ||||
-rw-r--r-- | apps/codecs/libspeex/speex_header.c | 2 |
7 files changed, 18 insertions, 14 deletions
diff --git a/apps/codecs/libspeex/cb_search.c b/apps/codecs/libspeex/cb_search.c index 8afb8ab5f3..ecb3918298 100644 --- a/apps/codecs/libspeex/cb_search.c +++ b/apps/codecs/libspeex/cb_search.c @@ -512,7 +512,7 @@ int update_target target[j]=SUB16(target[j],PSHR16(r2[j],2)); } } -#endif +#endif /* SPEEX_DISABLE_ENCODER*/ void split_cb_shape_sign_unquant( @@ -600,7 +600,7 @@ int update_target for (i=0;i<nsf;i++) target[i]=0; } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ void noise_codebook_unquant( diff --git a/apps/codecs/libspeex/filters.c b/apps/codecs/libspeex/filters.c index 9c144ebffa..13adc9c009 100644 --- a/apps/codecs/libspeex/filters.c +++ b/apps/codecs/libspeex/filters.c @@ -157,7 +157,7 @@ void signal_div(const spx_word16_t *x, spx_word16_t *y, spx_word32_t scale, int } } } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ #else @@ -342,7 +342,7 @@ void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t } } #endif -#endif +#endif /* SPEEX_DISABLE_ENCODER */ #ifndef OVERRIDE_IIR_MEM16 void iir_mem16(const spx_word16_t *x, const spx_coef_t *den, spx_word16_t *y, int N, int ord, spx_mem_t *mem, char *stack) @@ -482,7 +482,7 @@ void qmf_decomp(const spx_word16_t *xx, const spx_word16_t *aa, spx_word16_t *y1 y2[k] = EXTRACT16(SATURATE(PSHR32(y2k,15),32767)); } } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ #ifndef OVERRIDE_QMF_SYNTH /* Re-synthesised a signal from the QMF low-band and high-band signals */ diff --git a/apps/codecs/libspeex/lsp.c b/apps/codecs/libspeex/lsp.c index fcc12515c3..3973554cfb 100644 --- a/apps/codecs/libspeex/lsp.c +++ b/apps/codecs/libspeex/lsp.c @@ -134,6 +134,8 @@ Heavily modified by Jean-Marc Valin (c) 2002-2006 (fixed-point, \*---------------------------------------------------------------------------*/ +#ifndef SPEEX_DISABLE_ENCODER + #ifdef FIXED_POINT #ifndef OVERRIDE_CHEB_POLY_EVA @@ -387,6 +389,8 @@ int lpc_to_lsp (spx_coef_t *a,int lpcrdr,spx_lsp_t *freq,int nb,spx_word16_t del return(roots); } +#endif /* SPEEX_DISABLE_ENCODER */ + /*---------------------------------------------------------------------------*\ FUNCTION....: lsp_to_lpc() diff --git a/apps/codecs/libspeex/ltp.c b/apps/codecs/libspeex/ltp.c index 720baaad02..2f86b678d9 100644 --- a/apps/codecs/libspeex/ltp.c +++ b/apps/codecs/libspeex/ltp.c @@ -660,7 +660,7 @@ spx_word32_t *cumul_gain #endif return pitch; } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ void pitch_unquant_3tap( spx_word16_t exc[], /* Input excitation */ @@ -812,7 +812,7 @@ spx_word32_t *cumul_gain target[i]=EXTRACT16(SATURATE(SUB32(EXTEND32(target[i]),EXTEND32(res[i])),32700)); return start; } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ /** Unquantize forced pitch delay and gain */ void forced_pitch_unquant( diff --git a/apps/codecs/libspeex/nb_celp.c b/apps/codecs/libspeex/nb_celp.c index 50e1b11372..4751068153 100644 --- a/apps/codecs/libspeex/nb_celp.c +++ b/apps/codecs/libspeex/nb_celp.c @@ -1024,7 +1024,7 @@ int nb_encode(void *state, void *vin, SpeexBits *bits) return 1; } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ static DecState global_decstate IBSS_ATTR; @@ -1947,7 +1947,7 @@ int nb_encoder_ctl(void *state, int request, void *ptr) } return 0; } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ int nb_decoder_ctl(void *state, int request, void *ptr) { diff --git a/apps/codecs/libspeex/quant_lsp.c b/apps/codecs/libspeex/quant_lsp.c index b8dcfcc088..9ab55cfcbd 100644 --- a/apps/codecs/libspeex/quant_lsp.c +++ b/apps/codecs/libspeex/quant_lsp.c @@ -210,7 +210,7 @@ void lsp_quant_nb(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits) for (i=0;i<order;i++) qlsp[i]=lsp[i]-qlsp[i]; } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ void lsp_unquant_nb(spx_lsp_t *lsp, int order, SpeexBits *bits) { @@ -282,7 +282,7 @@ void lsp_quant_lbr(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits) for (i=0;i<order;i++) qlsp[i]=lsp[i]-qlsp[i]; } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ void lsp_unquant_lbr(spx_lsp_t *lsp, int order, SpeexBits *bits) { @@ -367,7 +367,7 @@ void lsp_quant_high(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits) for (i=0;i<order;i++) qlsp[i]=lsp[i]-qlsp[i]; } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ void lsp_unquant_high(spx_lsp_t *lsp, int order, SpeexBits *bits) { @@ -434,7 +434,7 @@ void lsp_quant_48k(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits) for (i=0;i<order;i++) qlsp[i]=lsp[i]-qlsp[i]; } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ void lsp_unquant_48k(spx_lsp_t *lsp, int order, SpeexBits *bits) { diff --git a/apps/codecs/libspeex/speex_header.c b/apps/codecs/libspeex/speex_header.c index 1cb25ac2ff..6d1e010828 100644 --- a/apps/codecs/libspeex/speex_header.c +++ b/apps/codecs/libspeex/speex_header.c @@ -126,7 +126,7 @@ char *speex_header_to_packet(SpeexHeader *header, int *size) *size = sizeof(SpeexHeader); return (char *)le_header; } -#endif +#endif /* SPEEX_DISABLE_ENCODER */ static SpeexHeader global_le_header; /* Avoid malloc */ SpeexHeader *speex_packet_to_header(char *packet, int size) |