diff options
-rw-r--r-- | apps/Makefile | 2 | ||||
-rw-r--r-- | apps/codecs/Makefile | 3 | ||||
-rw-r--r-- | apps/codecs/codec.h | 2 | ||||
-rw-r--r-- | apps/codecs/libmad/Makefile | 4 | ||||
-rw-r--r-- | apps/codecs/libmad/layer12.c | 6 | ||||
-rw-r--r-- | apps/codecs/libmad/layer3.c | 5 | ||||
-rwxr-xr-x | tools/configure | 10 |
7 files changed, 19 insertions, 13 deletions
diff --git a/apps/Makefile b/apps/Makefile index af73f90d3f..69b1fba577 100644 --- a/apps/Makefile +++ b/apps/Makefile | |||
@@ -69,7 +69,7 @@ $(OBJDIR)/librockbox.a: | |||
69 | 69 | ||
70 | $(LINKFILE): $(LDS) | 70 | $(LINKFILE): $(LDS) |
71 | @echo "Build LDS file" | 71 | @echo "Build LDS file" |
72 | @cat $< | $(CC) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ | 72 | @cat $< | $(CC) -DLOADADDRESS=$(LOADADDRESS) -DMEMORYSIZE=$(MEMORYSIZE) $(INCLUDES) $(TARGET) $(DEFINES) -E -P $(ROMBUILD) - >$@ |
73 | 73 | ||
74 | $(LINKROM): $(ROMLDS) | 74 | $(LINKROM): $(ROMLDS) |
75 | @echo "Build LDS file for Rombox" | 75 | @echo "Build LDS file for Rombox" |
diff --git a/apps/codecs/Makefile b/apps/codecs/Makefile index a5ac81b0cd..0fbcc2a7b7 100644 --- a/apps/codecs/Makefile +++ b/apps/codecs/Makefile | |||
@@ -17,7 +17,8 @@ ifdef APPEXTRA | |||
17 | endif | 17 | endif |
18 | 18 | ||
19 | .PHONY: libmad liba52 libFLAC libTremor libwavpack | 19 | .PHONY: libmad liba52 libFLAC libTremor libwavpack |
20 | OUTPUT = libmad liba52 libFLAC libTremor libwavpack | 20 | |
21 | OUTPUT = $(SOFTWARECODECS) | ||
21 | 22 | ||
22 | all: $(OUTPUT) | 23 | all: $(OUTPUT) |
23 | 24 | ||
diff --git a/apps/codecs/codec.h b/apps/codecs/codec.h index 6bd1020e09..c00d2bda95 100644 --- a/apps/codecs/codec.h +++ b/apps/codecs/codec.h | |||
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | /* Global declarations to be used in rockbox software codecs */ | 20 | /* Global declarations to be used in rockbox software codecs */ |
21 | 21 | ||
22 | #include "config.h" | ||
23 | |||
22 | #include <sys/types.h> | 24 | #include <sys/types.h> |
23 | 25 | ||
24 | /* Get these functions 'out of the way' of the standard functions. Not doing | 26 | /* 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 cef3adae11..68d6274f9b 100644 --- a/apps/codecs/libmad/Makefile +++ b/apps/codecs/libmad/Makefile | |||
@@ -31,11 +31,11 @@ all: $(OUTPUT) | |||
31 | 31 | ||
32 | $(OUTPUT): $(OBJS) | 32 | $(OUTPUT): $(OBJS) |
33 | @echo "AR $@" | 33 | @echo "AR $@" |
34 | @$(AR) ruv $@ $+ >/dev/null 2>&1 | 34 | $(AR) ruv $@ $+ >/dev/null 2>&1 |
35 | 35 | ||
36 | $(OBJDIR)/%.o: $(APPSDIR)/codecs/libmad/%.c | 36 | $(OBJDIR)/%.o: $(APPSDIR)/codecs/libmad/%.c |
37 | @echo "CC $<" | 37 | @echo "CC $<" |
38 | @$(CC) -c -O2 $(CFLAGS) -I$(APPSDIR)/codecs/libmad/ $< -o $@ | 38 | $(CC) -c -O2 $(CFLAGS) -I$(APPSDIR)/codecs/libmad/ $< -o $@ |
39 | 39 | ||
40 | include $(TOOLSDIR)/make.inc | 40 | include $(TOOLSDIR)/make.inc |
41 | 41 | ||
diff --git a/apps/codecs/libmad/layer12.c b/apps/codecs/libmad/layer12.c index 3c5d0ce613..8d3b920ea6 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) | |||
485 | for (sb = 0; sb < bound; ++sb) { | 485 | for (sb = 0; sb < bound; ++sb) { |
486 | for (ch = 0; ch < nch; ++ch) { | 486 | for (ch = 0; ch < nch; ++ch) { |
487 | if ((index = allocation[ch][sb])) { | 487 | if ((index = allocation[ch][sb])) { |
488 | index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; | 488 | int off = bitalloc_table[offsets[sb]].offset; |
489 | index = offset_table[off][index - 1]; | ||
489 | 490 | ||
490 | II_samples(&stream->ptr, &qc_table[index], samples); | 491 | II_samples(&stream->ptr, &qc_table[index], samples); |
491 | 492 | ||
@@ -503,7 +504,8 @@ int mad_layer_II(struct mad_stream *stream, struct mad_frame *frame) | |||
503 | 504 | ||
504 | for (sb = bound; sb < sblimit; ++sb) { | 505 | for (sb = bound; sb < sblimit; ++sb) { |
505 | if ((index = allocation[0][sb])) { | 506 | if ((index = allocation[0][sb])) { |
506 | index = offset_table[bitalloc_table[offsets[sb]].offset][index - 1]; | 507 | int off = bitalloc_table[offsets[sb]].offset; |
508 | index = offset_table[off][index - 1]; | ||
507 | 509 | ||
508 | II_samples(&stream->ptr, &qc_table[index], samples); | 510 | II_samples(&stream->ptr, &qc_table[index], samples); |
509 | 511 | ||
diff --git a/apps/codecs/libmad/layer3.c b/apps/codecs/libmad/layer3.c index 27c8d18430..a8d2d5f7f9 100644 --- a/apps/codecs/libmad/layer3.c +++ b/apps/codecs/libmad/layer3.c | |||
@@ -853,7 +853,7 @@ void III_exponents(struct channel const *channel, | |||
853 | exponents[sfbi + 2] = gain2 - | 853 | exponents[sfbi + 2] = gain2 - |
854 | (signed int) (channel->scalefac[sfbi + 2] << scalefac_multiplier); | 854 | (signed int) (channel->scalefac[sfbi + 2] << scalefac_multiplier); |
855 | 855 | ||
856 | l += 3 * sfbwidth[sfbi]; | 856 | l += 3I * sfbwidth[sfbi]; |
857 | sfbi += 3; | 857 | sfbi += 3; |
858 | } | 858 | } |
859 | } | 859 | } |
@@ -1308,7 +1308,8 @@ void III_reorder(mad_fixed_t xr[576], struct channel const *channel, | |||
1308 | w = (w + 1) % 3; | 1308 | w = (w + 1) % 3; |
1309 | } | 1309 | } |
1310 | 1310 | ||
1311 | tmp[sbw[w]][w][sw[w]++] = xr[l]; | 1311 | unsigned int sbww = sbw[w]; |
1312 | tmp[sbww][w][sw[w]++] = xr[l]; | ||
1312 | 1313 | ||
1313 | if (sw[w] == 6) { | 1314 | if (sw[w] == 6) { |
1314 | sw[w] = 0; | 1315 | sw[w] = 0; |
diff --git a/tools/configure b/tools/configure index 3fe48081cd..f339c71974 100755 --- a/tools/configure +++ b/tools/configure | |||
@@ -342,7 +342,7 @@ if [ -z "$archos" ]; then | |||
342 | 342 | ||
343 | 5) | 343 | 5) |
344 | archos="gmini120" | 344 | archos="gmini120" |
345 | target="-DARCHOS_GMINI120 -DLOADADDRESS=\$(LOADADDRESS)" | 345 | target="-DARCHOS_GMINI120" |
346 | memory=16 # fixed size (16 is a guess, remove comment when checked) | 346 | memory=16 # fixed size (16 is a guess, remove comment when checked) |
347 | calmrisccc | 347 | calmrisccc |
348 | tool="cp" # might work for now! | 348 | tool="cp" # might work for now! |
@@ -351,12 +351,12 @@ if [ -z "$archos" ]; then | |||
351 | archosrom="" | 351 | archosrom="" |
352 | flash="" | 352 | flash="" |
353 | plugins="" # disabled for now, enable later on | 353 | plugins="" # disabled for now, enable later on |
354 | codecs="" | 354 | codecs="libmad" |
355 | ;; | 355 | ;; |
356 | 356 | ||
357 | 6) | 357 | 6) |
358 | archos="gminisp" | 358 | archos="gminisp" |
359 | target="-DARCHOS_GMINISP -DLOADADDRESS=\$(LOADADDRESS)" | 359 | target="-DARCHOS_GMINISP" |
360 | memory=16 # fixed size (16 is a guess, remove comment when checked) | 360 | memory=16 # fixed size (16 is a guess, remove comment when checked) |
361 | calmrisccc | 361 | calmrisccc |
362 | tool="cp" # might work for now! | 362 | tool="cp" # might work for now! |
@@ -365,7 +365,7 @@ if [ -z "$archos" ]; then | |||
365 | archosrom="" | 365 | archosrom="" |
366 | flash="" | 366 | flash="" |
367 | plugins="" # disabled for now, enable later on | 367 | plugins="" # disabled for now, enable later on |
368 | codecs="" | 368 | codecs="libmad" |
369 | ;; | 369 | ;; |
370 | 370 | ||
371 | 7) | 371 | 7) |
@@ -405,7 +405,7 @@ if [ -z "$archos" ]; then | |||
405 | archosrom="" | 405 | archosrom="" |
406 | flash="" | 406 | flash="" |
407 | plugins="yes" | 407 | plugins="yes" |
408 | codecs="yes" | 408 | codecs="libmad liba52 libFLAC libTremor libwavpack" |
409 | ;; | 409 | ;; |
410 | 410 | ||
411 | *) | 411 | *) |