diff options
author | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-03-09 14:39:52 +0000 |
---|---|---|
committer | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-03-09 14:39:52 +0000 |
commit | a6024faa0d6ae330a2224784fb1f7120ecbfa349 (patch) | |
tree | 212b74a5873d974cd9917a21768050a6c64fba43 /apps/codecs/libmad | |
parent | d748953d51e7f23233a1b4524464ee1c3a5954f3 (diff) | |
download | rockbox-a6024faa0d6ae330a2224784fb1f7120ecbfa349.tar.gz rockbox-a6024faa0d6ae330a2224784fb1f7120ecbfa349.zip |
GMini: libmad compiled
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6173 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libmad')
-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 |
3 files changed, 9 insertions, 6 deletions
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; |