summaryrefslogtreecommitdiff
path: root/apps/codecs/lib
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2008-09-04 18:02:10 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2008-09-04 18:02:10 +0000
commit46f85c4c547188d08fd90bad7734d38c654f13ea (patch)
treef868536dccac3a8d4047d11f29310e99b896b03b /apps/codecs/lib
parent6c608263d7e19ea9189e6812eed8fc29996b4ef2 (diff)
downloadrockbox-46f85c4c547188d08fd90bad7734d38c654f13ea.zip
rockbox-46f85c4c547188d08fd90bad7734d38c654f13ea.tar.gz
rockbox-46f85c4c547188d08fd90bad7734d38c654f13ea.tar.bz2
rockbox-46f85c4c547188d08fd90bad7734d38c654f13ea.tar.xz
Combine the Vorbis, WMA and AAC IMDCT functions and put them into the codeclib. Combined IMDCT is now based on existing Tremor transform. Reduces CPU for 192k AAC by 21MHz on Coldfire, and 5MHz on PP5024. WMA and Vorbis should have no functional changes since they already used this code. Further optimization is possible and would benefit all 3 codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18412 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/lib')
-rw-r--r--apps/codecs/lib/Makefile8
-rw-r--r--apps/codecs/lib/SOURCES7
-rw-r--r--apps/codecs/lib/codeclib.h4
3 files changed, 18 insertions, 1 deletions
diff --git a/apps/codecs/lib/Makefile b/apps/codecs/lib/Makefile
index 9f831d5..4a33a58 100644
--- a/apps/codecs/lib/Makefile
+++ b/apps/codecs/lib/Makefile
@@ -20,11 +20,17 @@ endif
CFLAGS = $(INCLUDES) $(GCCOPTS) \
$(TARGET) $(EXTRA_DEFINES) -DMEM=${MEMORYSIZE} -DCODEC
+# Sectioned compilation for target
+ifndef SIMVER
+ CFLAGS += -ffunction-sections -fdata-sections
+endif
+
# This sets up 'SRC' based on the files mentioned in SOURCES
include $(TOOLSDIR)/makesrc.inc
SOURCES = $(SRC)
-OBJS := $(SRC:%.c=$(OBJDIR)/%.o)
+OBJS2 := $(SRC:%.c=$(OBJDIR)/%.o)
+OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(OBJS2))
DEPFILE = $(OBJDIR)/dep-codeclib
DIRS = .
diff --git a/apps/codecs/lib/SOURCES b/apps/codecs/lib/SOURCES
index 65a6565..9c6d4e7 100644
--- a/apps/codecs/lib/SOURCES
+++ b/apps/codecs/lib/SOURCES
@@ -1,5 +1,12 @@
#if CONFIG_CODEC == SWCODEC /* software codec platforms */
codeclib.c
+
+
+mdct2.c
+#ifdef CPU_ARM
+mdct_arm.S
+#endif
+
#elif defined(SIMULATOR) && defined(__APPLE__)
osx.dummy.c
#endif
diff --git a/apps/codecs/lib/codeclib.h b/apps/codecs/lib/codeclib.h
index 1d95486..87cc926 100644
--- a/apps/codecs/lib/codeclib.h
+++ b/apps/codecs/lib/codeclib.h
@@ -55,6 +55,10 @@ void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, con
#define abs(x) ((x)>0?(x):-(x))
#define labs(x) abs(x)
+/*MDCT library functions*/
+
+extern void mdct_backward(int n, int32_t *in, int32_t *out);
+
/* Various codec helper functions */
int codec_init(void);