diff options
Diffstat (limited to 'apps/codecs/libspeex')
-rw-r--r-- | apps/codecs/libspeex/Makefile | 57 | ||||
-rw-r--r-- | apps/codecs/libspeex/bits.c | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/cb_search.c | 6 | ||||
-rw-r--r-- | apps/codecs/libspeex/cb_search.h | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/config-speex.h | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/filters.c | 5 | ||||
-rw-r--r-- | apps/codecs/libspeex/jitter.c | 6 | ||||
-rw-r--r-- | apps/codecs/libspeex/libspeex.make | 60 | ||||
-rw-r--r-- | apps/codecs/libspeex/lsp.c | 1 | ||||
-rw-r--r-- | apps/codecs/libspeex/ltp.c | 13 | ||||
-rw-r--r-- | apps/codecs/libspeex/ltp.h | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/ltp_arm4.h | 1 | ||||
-rw-r--r-- | apps/codecs/libspeex/modes.h | 4 | ||||
-rw-r--r-- | apps/codecs/libspeex/nb_celp.c | 4 | ||||
-rw-r--r-- | apps/codecs/libspeex/nb_celp.h | 4 | ||||
-rw-r--r-- | apps/codecs/libspeex/quant_lsp.h | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/rockbox.h | 13 | ||||
-rw-r--r-- | apps/codecs/libspeex/sb_celp.h | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/speex/ogg.h | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/speex_callbacks.c | 13 | ||||
-rw-r--r-- | apps/codecs/libspeex/speex_header.c | 4 | ||||
-rw-r--r-- | apps/codecs/libspeex/stereo.c | 5 |
22 files changed, 127 insertions, 83 deletions
diff --git a/apps/codecs/libspeex/Makefile b/apps/codecs/libspeex/Makefile deleted file mode 100644 index 3bda53dca7..0000000000 --- a/apps/codecs/libspeex/Makefile +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile,v 1.16 2006-09-02 22:34:13 bagder Exp $ | ||
8 | # | ||
9 | |||
10 | INCLUDES=-I$(APPSDIR) -I.. -I. -I$(FIRMDIR)/include -I$(FIRMDIR)/export \ | ||
11 | -I$(FIRMDIR)/common -I$(FIRMDIR)/drivers -I$(BUILDDIR) | ||
12 | |||
13 | ifdef APPEXTRA | ||
14 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | ||
15 | endif | ||
16 | |||
17 | SPEEXOPTS = -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER -DROCKBOX | ||
18 | |||
19 | # We're faster on ARM-targets with -O1 instead of -O2 | ||
20 | ifeq ($(CPU),arm) | ||
21 | SPEEXOPTS += -O | ||
22 | else | ||
23 | SPEEXOPTS += -O2 | ||
24 | endif | ||
25 | |||
26 | # We build Speex separately for use as a voice codec | ||
27 | ifdef ROCKBOX_VOICE_CODEC | ||
28 | EXTRA_DEFINES += -DROCKBOX_VOICE_CODEC | ||
29 | endif | ||
30 | |||
31 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(SPEEXOPTS) $(TARGET) \ | ||
32 | $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} ${PROFILE_OPTS} -Wno-unused-parameter | ||
33 | |||
34 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
35 | include $(TOOLSDIR)/makesrc.inc | ||
36 | |||
37 | SOURCES = $(SRC) | ||
38 | OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) | ||
39 | OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) | ||
40 | DEPFILE = $(OBJDIR)/dep-Speex | ||
41 | DIRS = | ||
42 | |||
43 | all: $(OUTPUT) | ||
44 | |||
45 | $(OUTPUT): $(OBJS) | ||
46 | @echo "AR+RANLIB $(notdir $@)" | ||
47 | @$(AR) ruv $@ $+ >/dev/null 2>&1 | ||
48 | |||
49 | include $(TOOLSDIR)/make.inc | ||
50 | |||
51 | clean: | ||
52 | @echo "cleaning Speex" | ||
53 | @rm -f $(OBJS) $(OUTPUT) $(DEPFILE) | ||
54 | |||
55 | ifneq ($(MAKECMDGOALS),clean) | ||
56 | -include $(DEPFILE) | ||
57 | endif | ||
diff --git a/apps/codecs/libspeex/bits.c b/apps/codecs/libspeex/bits.c index 78b38db44e..9d6cad8886 100644 --- a/apps/codecs/libspeex/bits.c +++ b/apps/codecs/libspeex/bits.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "config-speex.h" | 36 | #include "config-speex.h" |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #include <speex/speex_bits.h> | 39 | #include "speex/speex_bits.h" |
40 | #include "arch.h" | 40 | #include "arch.h" |
41 | #include "os_support.h" | 41 | #include "os_support.h" |
42 | 42 | ||
diff --git a/apps/codecs/libspeex/cb_search.c b/apps/codecs/libspeex/cb_search.c index d280757e59..8a190e535d 100644 --- a/apps/codecs/libspeex/cb_search.c +++ b/apps/codecs/libspeex/cb_search.c | |||
@@ -522,6 +522,9 @@ char *stack, | |||
522 | spx_int32_t *seed | 522 | spx_int32_t *seed |
523 | ) | 523 | ) |
524 | { | 524 | { |
525 | (void)nsf; | ||
526 | (void)stack; | ||
527 | (void)seed; | ||
525 | int i,j; | 528 | int i,j; |
526 | VARDECL(int *ind); | 529 | VARDECL(int *ind); |
527 | VARDECL(int *signs); | 530 | VARDECL(int *signs); |
@@ -609,6 +612,9 @@ char *stack, | |||
609 | spx_int32_t *seed | 612 | spx_int32_t *seed |
610 | ) | 613 | ) |
611 | { | 614 | { |
615 | (void)par; | ||
616 | (void)bits; | ||
617 | (void)stack; | ||
612 | int i; | 618 | int i; |
613 | /* FIXME: This is bad, but I don't think the function ever gets called anyway */ | 619 | /* FIXME: This is bad, but I don't think the function ever gets called anyway */ |
614 | for (i=0;i<nsf;i++) | 620 | for (i=0;i<nsf;i++) |
diff --git a/apps/codecs/libspeex/cb_search.h b/apps/codecs/libspeex/cb_search.h index 7687b453fd..50b530a725 100644 --- a/apps/codecs/libspeex/cb_search.h +++ b/apps/codecs/libspeex/cb_search.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #ifndef CB_SEARCH_H | 35 | #ifndef CB_SEARCH_H |
36 | #define CB_SEARCH_H | 36 | #define CB_SEARCH_H |
37 | 37 | ||
38 | #include <speex/speex_bits.h> | 38 | #include "speex/speex_bits.h" |
39 | #include "arch.h" | 39 | #include "arch.h" |
40 | 40 | ||
41 | /** Split codebook parameters. */ | 41 | /** Split codebook parameters. */ |
diff --git a/apps/codecs/libspeex/config-speex.h b/apps/codecs/libspeex/config-speex.h index 5241b4ecd8..f3b397f541 100644 --- a/apps/codecs/libspeex/config-speex.h +++ b/apps/codecs/libspeex/config-speex.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef ROCKBOX_VOICE_ENCODER | 1 | #ifndef ROCKBOX_VOICE_ENCODER |
2 | #include "../codec.h" | 2 | #include "codeclib.h" |
3 | #include "autoconf.h" | 3 | #include "autoconf.h" |
4 | #else | 4 | #else |
5 | #define ICODE_ATTR | 5 | #define ICODE_ATTR |
diff --git a/apps/codecs/libspeex/filters.c b/apps/codecs/libspeex/filters.c index 44addc2406..09f93c2a59 100644 --- a/apps/codecs/libspeex/filters.c +++ b/apps/codecs/libspeex/filters.c | |||
@@ -353,6 +353,7 @@ void filter_mem16(const spx_word16_t *x, const spx_coef_t *num, const spx_coef_t | |||
353 | #ifndef OVERRIDE_IIR_MEM16 | 353 | #ifndef OVERRIDE_IIR_MEM16 |
354 | 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) | 354 | 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) |
355 | { | 355 | { |
356 | (void)stack; | ||
356 | int i,j; | 357 | int i,j; |
357 | spx_word16_t yi,nyi; | 358 | spx_word16_t yi,nyi; |
358 | 359 | ||
@@ -497,6 +498,7 @@ void qmf_synth(const spx_word16_t *x1, const spx_word16_t *x2, const spx_word16_ | |||
497 | all odd x[i] are zero -- well, actually they are left out of the array now | 498 | all odd x[i] are zero -- well, actually they are left out of the array now |
498 | N and M are multiples of 4 */ | 499 | N and M are multiples of 4 */ |
499 | { | 500 | { |
501 | (void)stack; | ||
500 | int i, j; | 502 | int i, j; |
501 | int M2, N2; | 503 | int M2, N2; |
502 | VARDECL(spx_word16_t *xx1); | 504 | VARDECL(spx_word16_t *xx1); |
@@ -681,6 +683,9 @@ spx_word16_t comb_gain, /*gain of comb filter*/ | |||
681 | char *stack | 683 | char *stack |
682 | ) | 684 | ) |
683 | { | 685 | { |
686 | (void)ak; | ||
687 | (void)p; | ||
688 | (void)stack; | ||
684 | int i; | 689 | int i; |
685 | VARDECL(spx_word16_t *iexc); | 690 | VARDECL(spx_word16_t *iexc); |
686 | spx_word16_t old_ener, new_ener; | 691 | spx_word16_t old_ener, new_ener; |
diff --git a/apps/codecs/libspeex/jitter.c b/apps/codecs/libspeex/jitter.c index 61bca75ce8..d9f6c67b86 100644 --- a/apps/codecs/libspeex/jitter.c +++ b/apps/codecs/libspeex/jitter.c | |||
@@ -55,9 +55,9 @@ TODO: | |||
55 | 55 | ||
56 | 56 | ||
57 | #include "arch.h" | 57 | #include "arch.h" |
58 | #include <speex/speex.h> | 58 | #include "speex/speex.h" |
59 | #include <speex/speex_bits.h> | 59 | #include "speex/speex_bits.h" |
60 | #include <speex/speex_jitter.h> | 60 | #include "speex/speex_jitter.h" |
61 | #include "os_support.h" | 61 | #include "os_support.h" |
62 | 62 | ||
63 | #ifndef NULL | 63 | #ifndef NULL |
diff --git a/apps/codecs/libspeex/libspeex.make b/apps/codecs/libspeex/libspeex.make new file mode 100644 index 0000000000..a27d559a06 --- /dev/null +++ b/apps/codecs/libspeex/libspeex.make | |||
@@ -0,0 +1,60 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | # we need to build two different speex libraries | ||
11 | # (one for codec, one for core voice) | ||
12 | # so a little trickery is necessary | ||
13 | |||
14 | SPEEXFLAGS = $(filter-out -O%,$(CODECFLAGS)) \ | ||
15 | -DHAVE_CONFIG_H -DSPEEX_DISABLE_ENCODER \ | ||
16 | -I$(APPSDIR)/codecs/libspeex | ||
17 | |||
18 | # libspeex is faster on ARM-targets with -O1 instead of -O2 | ||
19 | ifeq ($(CPU),arm) | ||
20 | SPEEXFLAGS += -O1 | ||
21 | else | ||
22 | SPEEXFLAGS += -O2 | ||
23 | endif | ||
24 | |||
25 | VOICESPEEXFLAGS = $(filter-out -ffunction-sections, $(filter-out -DCODEC,$(SPEEXFLAGS))) -DROCKBOX_VOICE_CODEC | ||
26 | |||
27 | # libspeex | ||
28 | SPEEXLIB := $(CODECDIR)/libspeex.a | ||
29 | SPEEXLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspeex/SOURCES) | ||
30 | SPEEXLIB_OBJ := $(call c2obj, $(SPEEXLIB_SRC)) | ||
31 | OTHER_SRC += $(SPEEXLIB_SRC) | ||
32 | |||
33 | $(SPEEXLIB): $(SPEEXLIB_OBJ) | ||
34 | $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 | ||
35 | |||
36 | # libspeex-voice | ||
37 | VOICESPEEXLIB := $(CODECDIR)/libspeex-voice.a | ||
38 | VOICESPEEXLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libspeex/SOURCES) | ||
39 | VOICESPEEXLIB_OBJ := $(subst .c,.o,$(subst .S,.o,$(subst $(ROOTDIR)/apps/codecs/libspeex,$(BUILDDIR)/apps/codecs/libspeex-voice,$(VOICESPEEXLIB_SRC)))) | ||
40 | |||
41 | $(VOICESPEEXLIB): $(VOICESPEEXLIB_OBJ) | ||
42 | $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 | ||
43 | |||
44 | # pattern rules | ||
45 | |||
46 | $(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.c | ||
47 | $(SILENT)mkdir -p $(dir $@) | ||
48 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@ | ||
49 | |||
50 | $(CODECDIR)/libspeex-voice/%.o : $(ROOTDIR)/apps/codecs/libspeex/%.S | ||
51 | $(SILENT)mkdir -p $(dir $@) | ||
52 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(VOICESPEEXFLAGS) -c $< -o $@ | ||
53 | |||
54 | $(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.c | ||
55 | $(SILENT)mkdir -p $(dir $@) | ||
56 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@ | ||
57 | |||
58 | $(CODECDIR)/libspeex/%.o: $(ROOTDIR)/apps/codecs/libspeex/%.S | ||
59 | $(SILENT)mkdir -p $(dir $@) | ||
60 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(SPEEXFLAGS) -c $< -o $@ | ||
diff --git a/apps/codecs/libspeex/lsp.c b/apps/codecs/libspeex/lsp.c index 3973554cfb..edf480e8bc 100644 --- a/apps/codecs/libspeex/lsp.c +++ b/apps/codecs/libspeex/lsp.c | |||
@@ -409,6 +409,7 @@ void lsp_to_lpc(spx_lsp_t *freq,spx_coef_t *ak,int lpcrdr, char *stack) | |||
409 | /* float *ak array of LPC coefficients */ | 409 | /* float *ak array of LPC coefficients */ |
410 | /* int lpcrdr order of LPC coefficients */ | 410 | /* int lpcrdr order of LPC coefficients */ |
411 | { | 411 | { |
412 | (void)stack; | ||
412 | int i,j; | 413 | int i,j; |
413 | spx_word32_t xout1,xout2,xin; | 414 | spx_word32_t xout1,xout2,xin; |
414 | spx_word32_t mult, a; | 415 | spx_word32_t mult, a; |
diff --git a/apps/codecs/libspeex/ltp.c b/apps/codecs/libspeex/ltp.c index 04c1115b3f..9f10bc09d8 100644 --- a/apps/codecs/libspeex/ltp.c +++ b/apps/codecs/libspeex/ltp.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include "ltp.h" | 38 | #include "ltp.h" |
39 | #include "stack_alloc.h" | 39 | #include "stack_alloc.h" |
40 | #include "filters.h" | 40 | #include "filters.h" |
41 | #include <speex/speex_bits.h> | 41 | #include "speex/speex_bits.h" |
42 | #include "math_approx.h" | 42 | #include "math_approx.h" |
43 | #include "os_support.h" | 43 | #include "os_support.h" |
44 | 44 | ||
@@ -674,6 +674,9 @@ spx_word16_t last_pitch_gain, | |||
674 | int cdbk_offset | 674 | int cdbk_offset |
675 | ) | 675 | ) |
676 | { | 676 | { |
677 | (void)end; | ||
678 | (void)pitch_coef; | ||
679 | (void)stack; | ||
677 | int i; | 680 | int i; |
678 | int pitch; | 681 | int pitch; |
679 | int gain_index; | 682 | int gain_index; |
@@ -826,6 +829,14 @@ spx_word16_t last_pitch_gain, | |||
826 | int cdbk_offset | 829 | int cdbk_offset |
827 | ) | 830 | ) |
828 | { | 831 | { |
832 | (void)end; | ||
833 | (void)par; | ||
834 | (void)bits; | ||
835 | (void)stack; | ||
836 | (void)count_lost; | ||
837 | (void)subframe_offset; | ||
838 | (void)last_pitch_gain; | ||
839 | (void)cdbk_offset; | ||
829 | int i; | 840 | int i; |
830 | #ifdef FIXED_POINT | 841 | #ifdef FIXED_POINT |
831 | if (pitch_coef>63) | 842 | if (pitch_coef>63) |
diff --git a/apps/codecs/libspeex/ltp.h b/apps/codecs/libspeex/ltp.h index 1e435bc36e..872f072e4e 100644 --- a/apps/codecs/libspeex/ltp.h +++ b/apps/codecs/libspeex/ltp.h | |||
@@ -32,7 +32,7 @@ | |||
32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include <speex/speex_bits.h> | 35 | #include "speex/speex_bits.h" |
36 | #include "arch.h" | 36 | #include "arch.h" |
37 | 37 | ||
38 | /** LTP parameters. */ | 38 | /** LTP parameters. */ |
diff --git a/apps/codecs/libspeex/ltp_arm4.h b/apps/codecs/libspeex/ltp_arm4.h index cdb94e603a..e1c60ad7d5 100644 --- a/apps/codecs/libspeex/ltp_arm4.h +++ b/apps/codecs/libspeex/ltp_arm4.h | |||
@@ -87,6 +87,7 @@ spx_word32_t inner_prod(const spx_word16_t *x, const spx_word16_t *y, int len) | |||
87 | #define OVERRIDE_PITCH_XCORR | 87 | #define OVERRIDE_PITCH_XCORR |
88 | void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack) | 88 | void pitch_xcorr(const spx_word16_t *_x, const spx_word16_t *_y, spx_word32_t *corr, int len, int nb_pitch, char *stack) |
89 | { | 89 | { |
90 | (void)stack; | ||
90 | int i,j; | 91 | int i,j; |
91 | for (i=0;i<nb_pitch;i+=4) | 92 | for (i=0;i<nb_pitch;i+=4) |
92 | { | 93 | { |
diff --git a/apps/codecs/libspeex/modes.h b/apps/codecs/libspeex/modes.h index 26e2d86180..0fa1c3460e 100644 --- a/apps/codecs/libspeex/modes.h +++ b/apps/codecs/libspeex/modes.h | |||
@@ -36,8 +36,8 @@ | |||
36 | #ifndef MODES_H | 36 | #ifndef MODES_H |
37 | #define MODES_H | 37 | #define MODES_H |
38 | 38 | ||
39 | #include <speex/speex.h> | 39 | #include "speex/speex.h" |
40 | #include <speex/speex_bits.h> | 40 | #include "speex/speex_bits.h" |
41 | #include "arch.h" | 41 | #include "arch.h" |
42 | 42 | ||
43 | #define NB_SUBMODES 16 | 43 | #define NB_SUBMODES 16 |
diff --git a/apps/codecs/libspeex/nb_celp.c b/apps/codecs/libspeex/nb_celp.c index d29b9ae540..31eaa06b6b 100644 --- a/apps/codecs/libspeex/nb_celp.c +++ b/apps/codecs/libspeex/nb_celp.c | |||
@@ -43,12 +43,12 @@ | |||
43 | #include "filters.h" | 43 | #include "filters.h" |
44 | #include "stack_alloc.h" | 44 | #include "stack_alloc.h" |
45 | #include "vq.h" | 45 | #include "vq.h" |
46 | #include <speex/speex_bits.h> | 46 | #include "speex/speex_bits.h" |
47 | #include "vbr.h" | 47 | #include "vbr.h" |
48 | #include "arch.h" | 48 | #include "arch.h" |
49 | #include "math_approx.h" | 49 | #include "math_approx.h" |
50 | #include "os_support.h" | 50 | #include "os_support.h" |
51 | #include <speex/speex_callbacks.h> | 51 | #include "speex/speex_callbacks.h" |
52 | 52 | ||
53 | #ifdef VORBIS_PSYCHO | 53 | #ifdef VORBIS_PSYCHO |
54 | #include "vorbis_psy.h" | 54 | #include "vorbis_psy.h" |
diff --git a/apps/codecs/libspeex/nb_celp.h b/apps/codecs/libspeex/nb_celp.h index 30abdee842..30edbefaeb 100644 --- a/apps/codecs/libspeex/nb_celp.h +++ b/apps/codecs/libspeex/nb_celp.h | |||
@@ -37,8 +37,8 @@ | |||
37 | #define NB_CELP_H | 37 | #define NB_CELP_H |
38 | 38 | ||
39 | #include "modes.h" | 39 | #include "modes.h" |
40 | #include <speex/speex_bits.h> | 40 | #include "speex/speex_bits.h" |
41 | #include <speex/speex_callbacks.h> | 41 | #include "speex/speex_callbacks.h" |
42 | #include "vbr.h" | 42 | #include "vbr.h" |
43 | #include "filters.h" | 43 | #include "filters.h" |
44 | 44 | ||
diff --git a/apps/codecs/libspeex/quant_lsp.h b/apps/codecs/libspeex/quant_lsp.h index 3bf4d4021c..0fc206be6f 100644 --- a/apps/codecs/libspeex/quant_lsp.h +++ b/apps/codecs/libspeex/quant_lsp.h | |||
@@ -35,7 +35,7 @@ | |||
35 | #ifndef QUANT_LSP_H | 35 | #ifndef QUANT_LSP_H |
36 | #define QUANT_LSP_H | 36 | #define QUANT_LSP_H |
37 | 37 | ||
38 | #include <speex/speex_bits.h> | 38 | #include "speex/speex_bits.h" |
39 | #include "arch.h" | 39 | #include "arch.h" |
40 | 40 | ||
41 | #define MAX_LSP_SIZE 20 | 41 | #define MAX_LSP_SIZE 20 |
diff --git a/apps/codecs/libspeex/rockbox.h b/apps/codecs/libspeex/rockbox.h index 073bad5d98..459c8b532f 100644 --- a/apps/codecs/libspeex/rockbox.h +++ b/apps/codecs/libspeex/rockbox.h | |||
@@ -24,8 +24,7 @@ | |||
24 | /* We don't want all this stuff if we're building encoder */ | 24 | /* We don't want all this stuff if we're building encoder */ |
25 | #ifndef ROCKBOX_VOICE_ENCODER | 25 | #ifndef ROCKBOX_VOICE_ENCODER |
26 | 26 | ||
27 | #include "../codec.h" | 27 | #include "codeclib.h" |
28 | #include "../lib/codeclib.h" | ||
29 | #include "debug.h" | 28 | #include "debug.h" |
30 | 29 | ||
31 | #if !defined(ROCKBOX_VOICE_CODEC) | 30 | #if !defined(ROCKBOX_VOICE_CODEC) |
@@ -35,6 +34,7 @@ | |||
35 | #define DEBUGF ci->debugf | 34 | #define DEBUGF ci->debugf |
36 | #endif | 35 | #endif |
37 | 36 | ||
37 | |||
38 | #ifdef ROCKBOX_HAS_LOGF | 38 | #ifdef ROCKBOX_HAS_LOGF |
39 | #undef LOGF | 39 | #undef LOGF |
40 | #define LOGF ci->logf | 40 | #define LOGF ci->logf |
@@ -75,6 +75,9 @@ static inline void speex_free_scratch (void *ptr) | |||
75 | #define OVERRIDE_SPEEX_FATAL 1 | 75 | #define OVERRIDE_SPEEX_FATAL 1 |
76 | static inline void _speex_fatal(const char *str, const char *file, int line) | 76 | static inline void _speex_fatal(const char *str, const char *file, int line) |
77 | { | 77 | { |
78 | (void)str; | ||
79 | (void)file; | ||
80 | (void)line; | ||
78 | DEBUGF("Fatal error: %s\n", str); | 81 | DEBUGF("Fatal error: %s\n", str); |
79 | //exit(1); | 82 | //exit(1); |
80 | } | 83 | } |
@@ -82,24 +85,30 @@ static inline void _speex_fatal(const char *str, const char *file, int line) | |||
82 | #define OVERRIDE_SPEEX_WARNING 1 | 85 | #define OVERRIDE_SPEEX_WARNING 1 |
83 | static inline void speex_warning(const char *str) | 86 | static inline void speex_warning(const char *str) |
84 | { | 87 | { |
88 | (void)str; | ||
85 | DEBUGF("warning: %s\n", str); | 89 | DEBUGF("warning: %s\n", str); |
86 | } | 90 | } |
87 | 91 | ||
88 | #define OVERRIDE_SPEEX_WARNING_INT 1 | 92 | #define OVERRIDE_SPEEX_WARNING_INT 1 |
89 | static inline void speex_warning_int(const char *str, int val) | 93 | static inline void speex_warning_int(const char *str, int val) |
90 | { | 94 | { |
95 | (void)str; | ||
96 | (void)val; | ||
91 | DEBUGF("warning: %s %d\n", str, val); | 97 | DEBUGF("warning: %s %d\n", str, val); |
92 | } | 98 | } |
93 | 99 | ||
94 | #define OVERRIDE_SPEEX_NOTIFY 1 | 100 | #define OVERRIDE_SPEEX_NOTIFY 1 |
95 | static inline void speex_notify(const char *str) | 101 | static inline void speex_notify(const char *str) |
96 | { | 102 | { |
103 | (void)str; | ||
97 | DEBUGF("notice: %s\n", str); | 104 | DEBUGF("notice: %s\n", str); |
98 | } | 105 | } |
99 | 106 | ||
100 | #define OVERRIDE_SPEEX_PUTC 1 | 107 | #define OVERRIDE_SPEEX_PUTC 1 |
101 | static inline void _speex_putc(int ch, void *file) | 108 | static inline void _speex_putc(int ch, void *file) |
102 | { | 109 | { |
110 | (void)ch; | ||
111 | (void)file; | ||
103 | //FILE *f = (FILE *)file; | 112 | //FILE *f = (FILE *)file; |
104 | //printf("%c", ch); | 113 | //printf("%c", ch); |
105 | } | 114 | } |
diff --git a/apps/codecs/libspeex/sb_celp.h b/apps/codecs/libspeex/sb_celp.h index 51aa3d0e13..86078ea33e 100644 --- a/apps/codecs/libspeex/sb_celp.h +++ b/apps/codecs/libspeex/sb_celp.h | |||
@@ -37,7 +37,7 @@ | |||
37 | #define SB_CELP_H | 37 | #define SB_CELP_H |
38 | 38 | ||
39 | #include "modes.h" | 39 | #include "modes.h" |
40 | #include <speex/speex_bits.h> | 40 | #include "speex/speex_bits.h" |
41 | #include "nb_celp.h" | 41 | #include "nb_celp.h" |
42 | 42 | ||
43 | /**Structure representing the full state of the sub-band encoder*/ | 43 | /**Structure representing the full state of the sub-band encoder*/ |
diff --git a/apps/codecs/libspeex/speex/ogg.h b/apps/codecs/libspeex/speex/ogg.h index dce8f96b42..d42851f10c 100644 --- a/apps/codecs/libspeex/speex/ogg.h +++ b/apps/codecs/libspeex/speex/ogg.h | |||
@@ -21,7 +21,7 @@ | |||
21 | extern "C" { | 21 | extern "C" { |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | #include "../../codec.h" | 24 | #include "codeclib.h" |
25 | 25 | ||
26 | typedef short spx_ogg_int16_t; | 26 | typedef short spx_ogg_int16_t; |
27 | typedef unsigned short spx_ogg_uint16_t; | 27 | typedef unsigned short spx_ogg_uint16_t; |
diff --git a/apps/codecs/libspeex/speex_callbacks.c b/apps/codecs/libspeex/speex_callbacks.c index 58d7b7b92a..9ffe5245f1 100644 --- a/apps/codecs/libspeex/speex_callbacks.c +++ b/apps/codecs/libspeex/speex_callbacks.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include "config-speex.h" | 36 | #include "config-speex.h" |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #include <speex/speex_callbacks.h> | 39 | #include "speex/speex_callbacks.h" |
40 | #include "arch.h" | 40 | #include "arch.h" |
41 | #include "os_support.h" | 41 | #include "os_support.h" |
42 | 42 | ||
@@ -74,6 +74,7 @@ int speex_inband_handler(SpeexBits *bits, SpeexCallback *callback_list, void *st | |||
74 | 74 | ||
75 | int speex_std_mode_request_handler(SpeexBits *bits, void *state, void *data) | 75 | int speex_std_mode_request_handler(SpeexBits *bits, void *state, void *data) |
76 | { | 76 | { |
77 | (void)state; | ||
77 | spx_int32_t m; | 78 | spx_int32_t m; |
78 | m = speex_bits_unpack_unsigned(bits, 4); | 79 | m = speex_bits_unpack_unsigned(bits, 4); |
79 | speex_encoder_ctl(data, SPEEX_SET_MODE, &m); | 80 | speex_encoder_ctl(data, SPEEX_SET_MODE, &m); |
@@ -82,6 +83,7 @@ int speex_std_mode_request_handler(SpeexBits *bits, void *state, void *data) | |||
82 | 83 | ||
83 | int speex_std_low_mode_request_handler(SpeexBits *bits, void *state, void *data) | 84 | int speex_std_low_mode_request_handler(SpeexBits *bits, void *state, void *data) |
84 | { | 85 | { |
86 | (void)state; | ||
85 | spx_int32_t m; | 87 | spx_int32_t m; |
86 | m = speex_bits_unpack_unsigned(bits, 4); | 88 | m = speex_bits_unpack_unsigned(bits, 4); |
87 | speex_encoder_ctl(data, SPEEX_SET_LOW_MODE, &m); | 89 | speex_encoder_ctl(data, SPEEX_SET_LOW_MODE, &m); |
@@ -90,6 +92,7 @@ int speex_std_low_mode_request_handler(SpeexBits *bits, void *state, void *data) | |||
90 | 92 | ||
91 | int speex_std_high_mode_request_handler(SpeexBits *bits, void *state, void *data) | 93 | int speex_std_high_mode_request_handler(SpeexBits *bits, void *state, void *data) |
92 | { | 94 | { |
95 | (void)state; | ||
93 | spx_int32_t m; | 96 | spx_int32_t m; |
94 | m = speex_bits_unpack_unsigned(bits, 4); | 97 | m = speex_bits_unpack_unsigned(bits, 4); |
95 | speex_encoder_ctl(data, SPEEX_SET_HIGH_MODE, &m); | 98 | speex_encoder_ctl(data, SPEEX_SET_HIGH_MODE, &m); |
@@ -99,6 +102,7 @@ int speex_std_high_mode_request_handler(SpeexBits *bits, void *state, void *data | |||
99 | #ifndef DISABLE_VBR | 102 | #ifndef DISABLE_VBR |
100 | int speex_std_vbr_request_handler(SpeexBits *bits, void *state, void *data) | 103 | int speex_std_vbr_request_handler(SpeexBits *bits, void *state, void *data) |
101 | { | 104 | { |
105 | (void)state; | ||
102 | spx_int32_t vbr; | 106 | spx_int32_t vbr; |
103 | vbr = speex_bits_unpack_unsigned(bits, 1); | 107 | vbr = speex_bits_unpack_unsigned(bits, 1); |
104 | speex_encoder_ctl(data, SPEEX_SET_VBR, &vbr); | 108 | speex_encoder_ctl(data, SPEEX_SET_VBR, &vbr); |
@@ -108,6 +112,7 @@ int speex_std_vbr_request_handler(SpeexBits *bits, void *state, void *data) | |||
108 | 112 | ||
109 | int speex_std_enh_request_handler(SpeexBits *bits, void *state, void *data) | 113 | int speex_std_enh_request_handler(SpeexBits *bits, void *state, void *data) |
110 | { | 114 | { |
115 | (void)state; | ||
111 | spx_int32_t enh; | 116 | spx_int32_t enh; |
112 | enh = speex_bits_unpack_unsigned(bits, 1); | 117 | enh = speex_bits_unpack_unsigned(bits, 1); |
113 | speex_decoder_ctl(data, SPEEX_SET_ENH, &enh); | 118 | speex_decoder_ctl(data, SPEEX_SET_ENH, &enh); |
@@ -117,6 +122,7 @@ int speex_std_enh_request_handler(SpeexBits *bits, void *state, void *data) | |||
117 | #ifndef DISABLE_VBR | 122 | #ifndef DISABLE_VBR |
118 | int speex_std_vbr_quality_request_handler(SpeexBits *bits, void *state, void *data) | 123 | int speex_std_vbr_quality_request_handler(SpeexBits *bits, void *state, void *data) |
119 | { | 124 | { |
125 | (void)state; | ||
120 | float qual; | 126 | float qual; |
121 | qual = speex_bits_unpack_unsigned(bits, 4); | 127 | qual = speex_bits_unpack_unsigned(bits, 4); |
122 | speex_encoder_ctl(data, SPEEX_SET_VBR_QUALITY, &qual); | 128 | speex_encoder_ctl(data, SPEEX_SET_VBR_QUALITY, &qual); |
@@ -126,6 +132,7 @@ int speex_std_vbr_quality_request_handler(SpeexBits *bits, void *state, void *da | |||
126 | 132 | ||
127 | int speex_std_char_handler(SpeexBits *bits, void *state, void *data) | 133 | int speex_std_char_handler(SpeexBits *bits, void *state, void *data) |
128 | { | 134 | { |
135 | (void)state; | ||
129 | unsigned char ch; | 136 | unsigned char ch; |
130 | ch = speex_bits_unpack_unsigned(bits, 8); | 137 | ch = speex_bits_unpack_unsigned(bits, 8); |
131 | _speex_putc(ch, data); | 138 | _speex_putc(ch, data); |
@@ -133,11 +140,11 @@ int speex_std_char_handler(SpeexBits *bits, void *state, void *data) | |||
133 | return 0; | 140 | return 0; |
134 | } | 141 | } |
135 | 142 | ||
136 | |||
137 | |||
138 | /* Default handler for user callbacks: skip it */ | 143 | /* Default handler for user callbacks: skip it */ |
139 | int speex_default_user_handler(SpeexBits *bits, void *state, void *data) | 144 | int speex_default_user_handler(SpeexBits *bits, void *state, void *data) |
140 | { | 145 | { |
146 | (void)state; | ||
147 | (void)data; | ||
141 | int req_size = speex_bits_unpack_unsigned(bits, 4); | 148 | int req_size = speex_bits_unpack_unsigned(bits, 4); |
142 | speex_bits_advance(bits, 5+8*req_size); | 149 | speex_bits_advance(bits, 5+8*req_size); |
143 | return 0; | 150 | return 0; |
diff --git a/apps/codecs/libspeex/speex_header.c b/apps/codecs/libspeex/speex_header.c index 1d1d07731c..b0e98b7c9c 100644 --- a/apps/codecs/libspeex/speex_header.c +++ b/apps/codecs/libspeex/speex_header.c | |||
@@ -36,8 +36,8 @@ | |||
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #include "arch.h" | 38 | #include "arch.h" |
39 | #include <speex/speex_header.h> | 39 | #include "speex/speex_header.h" |
40 | #include <speex/speex.h> | 40 | #include "speex/speex.h" |
41 | #include "os_support.h" | 41 | #include "os_support.h" |
42 | 42 | ||
43 | #ifndef NULL | 43 | #ifndef NULL |
diff --git a/apps/codecs/libspeex/stereo.c b/apps/codecs/libspeex/stereo.c index 2dce283ac3..652d2a6e90 100644 --- a/apps/codecs/libspeex/stereo.c +++ b/apps/codecs/libspeex/stereo.c | |||
@@ -33,8 +33,8 @@ | |||
33 | #include "config-speex.h" | 33 | #include "config-speex.h" |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #include <speex/speex_stereo.h> | 36 | #include "speex/speex_stereo.h" |
37 | #include <speex/speex_callbacks.h> | 37 | #include "speex/speex_callbacks.h" |
38 | #include "math_approx.h" | 38 | #include "math_approx.h" |
39 | #include "vq.h" | 39 | #include "vq.h" |
40 | #include <math.h> | 40 | #include <math.h> |
@@ -278,6 +278,7 @@ void speex_decode_stereo_int(spx_int16_t *data, int frame_size, SpeexStereoState | |||
278 | 278 | ||
279 | int speex_std_stereo_request_handler(SpeexBits *bits, void *state, void *data) | 279 | int speex_std_stereo_request_handler(SpeexBits *bits, void *state, void *data) |
280 | { | 280 | { |
281 | (void)state; | ||
281 | RealSpeexStereoState *stereo; | 282 | RealSpeexStereoState *stereo; |
282 | spx_word16_t sign=1, dexp; | 283 | spx_word16_t sign=1, dexp; |
283 | int tmp; | 284 | int tmp; |