diff options
Diffstat (limited to 'apps/codecs/libmusepack')
-rw-r--r-- | apps/codecs/libmusepack/Makefile | 49 | ||||
-rw-r--r-- | apps/codecs/libmusepack/huffsv46.c | 6 | ||||
-rw-r--r-- | apps/codecs/libmusepack/huffsv7.c | 6 | ||||
-rw-r--r-- | apps/codecs/libmusepack/libmusepack.make | 29 | ||||
-rw-r--r-- | apps/codecs/libmusepack/musepack.h | 4 |
5 files changed, 38 insertions, 56 deletions
diff --git a/apps/codecs/libmusepack/Makefile b/apps/codecs/libmusepack/Makefile deleted file mode 100644 index a70d33644a..0000000000 --- a/apps/codecs/libmusepack/Makefile +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id$ | ||
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 | # libmusepack is faster on ARM-targets with -O1 instead of -O2 | ||
18 | ifeq ($(CPU),arm) | ||
19 | MUSEPACKOPTS += -O1 | ||
20 | else | ||
21 | MUSEPACKOPTS += -O2 | ||
22 | endif | ||
23 | |||
24 | CFLAGS = $(INCLUDES) $(GCCOPTS) $(TARGET_INC) $(MUSEPACKOPTS) $(TARGET) \ | ||
25 | $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} $(PROFILE_OPTS) | ||
26 | |||
27 | # This sets up 'SRC' based on the files mentioned in SOURCES | ||
28 | include $(TOOLSDIR)/makesrc.inc | ||
29 | |||
30 | SOURCES = $(SRC) | ||
31 | OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o) | ||
32 | OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2)) | ||
33 | DEPFILE = $(OBJDIR)/dep-libmusepack | ||
34 | DIRS = | ||
35 | |||
36 | all: $(OUTPUT) | ||
37 | |||
38 | $(OUTPUT): $(OBJS) | ||
39 | $(call PRINTS,AR+RANLIB $(@F))$(AR) ruv $@ $+ >/dev/null 2>&1 | ||
40 | $(SILENT)$(RANLIB) $@ | ||
41 | |||
42 | include $(TOOLSDIR)/make.inc | ||
43 | |||
44 | clean: | ||
45 | $(call PRINTS,cleaning libmusepack)rm -f $(OBJS) $(OUTPUT) $(DEPFILE) | ||
46 | |||
47 | ifneq ($(MAKECMDGOALS),clean) | ||
48 | -include $(DEPFILE) | ||
49 | endif | ||
diff --git a/apps/codecs/libmusepack/huffsv46.c b/apps/codecs/libmusepack/huffsv46.c index 833b64b454..20d754c7bb 100644 --- a/apps/codecs/libmusepack/huffsv46.c +++ b/apps/codecs/libmusepack/huffsv46.c | |||
@@ -35,9 +35,9 @@ | |||
35 | /// \file huffsv46.c | 35 | /// \file huffsv46.c |
36 | /// Implementations of huffman decoding for streamversions < 7. | 36 | /// Implementations of huffman decoding for streamversions < 7. |
37 | 37 | ||
38 | #include <musepack.h> | 38 | #include "musepack.h" |
39 | #include <requant.h> | 39 | #include "requant.h" |
40 | #include <huffman.h> | 40 | #include "huffman.h" |
41 | 41 | ||
42 | #ifdef MPC_SUPPORT_SV456 | 42 | #ifdef MPC_SUPPORT_SV456 |
43 | 43 | ||
diff --git a/apps/codecs/libmusepack/huffsv7.c b/apps/codecs/libmusepack/huffsv7.c index ae2b902ea7..9ca77ceaa5 100644 --- a/apps/codecs/libmusepack/huffsv7.c +++ b/apps/codecs/libmusepack/huffsv7.c | |||
@@ -35,9 +35,9 @@ | |||
35 | /// \file huffsv7.c | 35 | /// \file huffsv7.c |
36 | /// Implementations of sv7 huffman decoding functions. | 36 | /// Implementations of sv7 huffman decoding functions. |
37 | 37 | ||
38 | #include <musepack.h> | 38 | #include "musepack.h" |
39 | #include <huffman.h> | 39 | #include "huffman.h" |
40 | #include <requant.h> | 40 | #include "requant.h" |
41 | 41 | ||
42 | const HuffmanTyp mpc_table_HuffHdr [10] ICONST_ATTR = | 42 | const HuffmanTyp mpc_table_HuffHdr [10] ICONST_ATTR = |
43 | {{2147483648u,1,0},{1610612736u,3,1},{1577058304u,7,-4},{1568669696u,9,3},{1560281088u,9,4},{1543503872u,8,-5},{1476395008u,6,2},{1342177280u,5,-3},{1073741824u,4,-2},{0u,2,-1},}; | 43 | {{2147483648u,1,0},{1610612736u,3,1},{1577058304u,7,-4},{1568669696u,9,3},{1560281088u,9,4},{1543503872u,8,-5},{1476395008u,6,2},{1342177280u,5,-3},{1073741824u,4,-2},{0u,2,-1},}; |
diff --git a/apps/codecs/libmusepack/libmusepack.make b/apps/codecs/libmusepack/libmusepack.make new file mode 100644 index 0000000000..736f58bc72 --- /dev/null +++ b/apps/codecs/libmusepack/libmusepack.make | |||
@@ -0,0 +1,29 @@ | |||
1 | # __________ __ ___. | ||
2 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
3 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
4 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
5 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
6 | # \/ \/ \/ \/ \/ | ||
7 | # $Id: Makefile 19082 2008-11-10 23:54:24Z zagor $ | ||
8 | # | ||
9 | |||
10 | # libmusepack | ||
11 | MUSEPACKLIB := $(CODECDIR)/libmusepack.a | ||
12 | MUSEPACKLIB_SRC := $(call preprocess, $(APPSDIR)/codecs/libmusepack/SOURCES) | ||
13 | MUSEPACKLIB_OBJ := $(call c2obj, $(MUSEPACKLIB_SRC)) | ||
14 | OTHER_SRC += $(MUSEPACKLIB_SRC) | ||
15 | |||
16 | $(MUSEPACKLIB): $(MUSEPACKLIB_OBJ) | ||
17 | $(call PRINTS,AR $(@F))$(AR) rs $@ $^ >/dev/null 2>&1 | ||
18 | |||
19 | # libmusepack is faster on ARM-targets with -O1 than -O2 | ||
20 | MUSEPACKFLAGS = $(filter-out -O%,$(CODECFLAGS)) -I$(APPSDIR)/codecs/libmusepack | ||
21 | ifeq ($(CPU),arm) | ||
22 | MUSEPACKFLAGS += -O1 | ||
23 | else | ||
24 | MUSEPACKFLAGS += -O2 | ||
25 | endif | ||
26 | |||
27 | $(CODECDIR)/libmusepack/%.o: $(ROOTDIR)/apps/codecs/libmusepack/%.c | ||
28 | $(SILENT)mkdir -p $(dir $@) | ||
29 | $(call PRINTS,CC $(subst $(ROOTDIR)/,,$<))$(CC) $(MUSEPACKFLAGS) -c $< -o $@ | ||
diff --git a/apps/codecs/libmusepack/musepack.h b/apps/codecs/libmusepack/musepack.h index b9aff48427..1c98de654b 100644 --- a/apps/codecs/libmusepack/musepack.h +++ b/apps/codecs/libmusepack/musepack.h | |||
@@ -45,7 +45,9 @@ extern "C" { | |||
45 | //#include <stdlib.h> | 45 | //#include <stdlib.h> |
46 | #include <string.h> | 46 | #include <string.h> |
47 | 47 | ||
48 | #include "../codec.h" | 48 | #ifndef SIMULATOR |
49 | #include "codecs.h" | ||
50 | #endif | ||
49 | #include "config_types.h" | 51 | #include "config_types.h" |
50 | #include "decoder.h" | 52 | #include "decoder.h" |
51 | #include "math.h" | 53 | #include "math.h" |