forked from len0rd/rockbox
First attempt at ifdeffing out as much of the encoder stuff as possible from Speex. Gives a smaller binary and allows me to remove a couple more files from SOURCES.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15394 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6d88717f69
commit
bf1b7f131c
12 changed files with 253 additions and 43 deletions
|
|
@ -68,6 +68,7 @@
|
|||
|
||||
#endif
|
||||
|
||||
#ifndef SPEEX_DISABLE_ENCODER
|
||||
static void compute_quant_weights(spx_lsp_t *qlsp, spx_word16_t *quant_weight, int order)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -209,6 +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
|
||||
|
||||
void lsp_unquant_nb(spx_lsp_t *lsp, int order, SpeexBits *bits)
|
||||
{
|
||||
|
|
@ -239,6 +241,7 @@ void lsp_unquant_nb(spx_lsp_t *lsp, int order, SpeexBits *bits)
|
|||
}
|
||||
|
||||
|
||||
#ifndef SPEEX_DISABLE_ENCODER
|
||||
void lsp_quant_lbr(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -279,6 +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
|
||||
|
||||
void lsp_unquant_lbr(spx_lsp_t *lsp, int order, SpeexBits *bits)
|
||||
{
|
||||
|
|
@ -316,6 +320,7 @@ extern const signed char high_lsp_cdbk[];
|
|||
extern const signed char high_lsp_cdbk2[];
|
||||
|
||||
|
||||
#ifndef SPEEX_DISABLE_ENCODER
|
||||
void lsp_quant_high(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -362,6 +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
|
||||
|
||||
void lsp_unquant_high(spx_lsp_t *lsp, int order, SpeexBits *bits)
|
||||
{
|
||||
|
|
@ -389,6 +395,7 @@ void lsp_unquant_high(spx_lsp_t *lsp, int order, SpeexBits *bits)
|
|||
extern const signed char cdbk_lsp_vlbr[5120];
|
||||
extern const signed char cdbk_lsp2_vlbr[160];
|
||||
|
||||
#ifndef SPEEX_DISABLE_ENCODER
|
||||
void lsp_quant_48k(spx_lsp_t *lsp, spx_lsp_t *qlsp, int order, SpeexBits *bits)
|
||||
{
|
||||
int i;
|
||||
|
|
@ -427,6 +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
|
||||
|
||||
void lsp_unquant_48k(spx_lsp_t *lsp, int order, SpeexBits *bits)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue