summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-03-09 14:39:52 +0000
committerJean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com>2005-03-09 14:39:52 +0000
commita6024faa0d6ae330a2224784fb1f7120ecbfa349 (patch)
tree212b74a5873d974cd9917a21768050a6c64fba43
parentd748953d51e7f23233a1b4524464ee1c3a5954f3 (diff)
downloadrockbox-a6024faa0d6ae330a2224784fb1f7120ecbfa349.zip
rockbox-a6024faa0d6ae330a2224784fb1f7120ecbfa349.tar.gz
rockbox-a6024faa0d6ae330a2224784fb1f7120ecbfa349.tar.bz2
rockbox-a6024faa0d6ae330a2224784fb1f7120ecbfa349.tar.xz
GMini: libmad compiled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6173 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/Makefile2
-rw-r--r--apps/codecs/Makefile3
-rw-r--r--apps/codecs/codec.h2
-rw-r--r--apps/codecs/libmad/Makefile4
-rw-r--r--apps/codecs/libmad/layer12.c6
-rw-r--r--apps/codecs/libmad/layer3.c5
-rwxr-xr-xtools/configure10
7 files changed, 19 insertions, 13 deletions
diff --git a/apps/Makefile b/apps/Makefile
index af73f90..69b1fba 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -69,7 +69,7 @@ $(OBJDIR)/librockbox.a:
$(LINKFILE): $(LDS)
@echo "Build LDS file"
- @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
+ @cat $< | $(CC) -DLOADADDRESS=$(LOADADDRESS) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@
$(LINKROM): $(ROMLDS)
@echo "Build LDS file for Rombox"
diff --git a/apps/codecs/Makefile b/apps/codecs/Makefile
index a5ac81b..0fbcc2a 100644
--- a/apps/codecs/Makefile
+++ b/apps/codecs/Makefile
@@ -17,7 +17,8 @@ ifdef APPEXTRA
endif
.PHONY: libmad liba52 libFLAC libTremor libwavpack
-OUTPUT = libmad liba52 libFLAC libTremor libwavpack
+
+OUTPUT = $(SOFTWARECODECS)
all: $(OUTPUT)
diff --git a/apps/codecs/codec.h b/apps/codecs/codec.h
index 6bd1020..c00d2bd 100644
--- a/apps/codecs/codec.h
+++ b/apps/codecs/codec.h
@@ -19,6 +19,8 @@
/* Global declarations to be used in rockbox software codecs */
+#include "config.h"
+
#include <sys/types.h>
/* Get these functions 'out of the way' of the standard functions. Not doing
diff --git a/apps/codecs/libmad/Makefile b/apps/codecs/libmad/Makefile
index cef3ada..68d6274 100644
--- a/apps/codecs/libmad/Makefile
+++ b/apps/codecs/libmad/Makefile
@@ -31,11 +31,11 @@ all: $(OUTPUT)
$(OUTPUT): $(OBJS)
@echo "AR $@"
- @$(AR) ruv $@ $+ >/dev/null 2>&1
+ $(AR) ruv $@ $+ >/dev/null 2>&1
$(OBJDIR)/%.o: $(APPSDIR)/codecs/libmad/%.c
@echo "CC $<"
- @$(CC) -c -O2 $(CFLAGS) -I$(APPSDIR)/codecs/libmad/ $< -o $@
+ $(CC) -c -O2 $(CFLAGS) -I$(APPSDIR)/codecs/libmad/ $< -o $@
include $(TOOLSDIR)/make.inc
diff --git a/apps/codecs/libmad/layer12.c b/apps/codecs/libmad/layer12.c
index 3c5d0ce..8d3b920 100644
--- a/apps/codecs/libmad/layer12.c
+++ b/apps/codecs/libmad/layer12.c
@@ -485,7 +485,8 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
for (sb = 0; sb < bound; ++sb) {
for (ch = 0; ch < nch; ++ch) {
if ((index = allocation[ch][sb])) {
- index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1];
+ int off = bitalloc_table[offsets[sb]].offset;
+ index = offset_table[off][index - 1];
II_samples(&stream->ptr, &qc_table[index], samples);
@@ -503,7 +504,8 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame)
for (sb = bound; sb < sblimit; ++sb) {
if ((index = allocation[0][sb])) {
- index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1];
+ int off = bitalloc_table[offsets[sb]].offset;
+ index = offset_table[off][index - 1];
II_samples(&stream->ptr, &qc_table[index], samples);
diff --git a/apps/codecs/libmad/layer3.c b/apps/codecs/libmad/layer3.c
index 27c8d18..a8d2d5f 100644
--- a/apps/codecs/libmad/layer3.c
+++ b/apps/codecs/libmad/layer3.c
@@ -853,7 +853,7 @@ void III_exponents(struct channel const *channel,
exponents[sfbi + 2] = gain2 -
(signed int) (channel->scalefac[sfbi + 2] << scalefac_multiplier);
- l += 3 * sfbwidth[sfbi];
+ l += 3I * sfbwidth[sfbi];
sfbi += 3;
}
}
@@ -1308,7 +1308,8 @@ void III_reorder(mad_fixed_t xr[576], struct channel const *channel,
w = (w + 1) % 3;
}
- tmp[sbw[w]][w][sw[w]++] = xr[l];
+ unsigned int sbww = sbw[w];
+ tmp[sbww][w][sw[w]++] = xr[l];
if (sw[w] == 6) {
sw[w] = 0;
diff --git a/tools/configure b/tools/configure
index 3fe4808..f339c71 100755
--- a/tools/configure
+++ b/tools/configure
@@ -342,7 +342,7 @@ if [ -z "$archos" ]; then
5)
archos="gmini120"
- target="-DARCHOS_GMINI120 -DLOADADDRESS=\$(LOADADDRESS)"
+ target="-DARCHOS_GMINI120"
memory=16 # fixed size (16 is a guess, remove comment when checked)
calmrisccc
tool="cp" # might work for now!
@@ -351,12 +351,12 @@ if [ -z "$archos" ]; then
archosrom=""
flash=""
plugins="" # disabled for now, enable later on
- codecs=""
+ codecs="libmad"
;;
6)
archos="gminisp"
- target="-DARCHOS_GMINISP -DLOADADDRESS=\$(LOADADDRESS)"
+ target="-DARCHOS_GMINISP"
memory=16 # fixed size (16 is a guess, remove comment when checked)
calmrisccc
tool="cp" # might work for now!
@@ -365,7 +365,7 @@ if [ -z "$archos" ]; then
archosrom=""
flash=""
plugins="" # disabled for now, enable later on
- codecs=""
+ codecs="libmad"
;;
7)
@@ -405,7 +405,7 @@ if [ -z "$archos" ]; then
archosrom=""
flash=""
plugins="yes"
- codecs="yes"
+ codecs="libmad liba52 libFLAC libTremor libwavpack"
;;
*)