summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-11-26 18:01:18 +0000
committerJens Arnold <amiconn@rockbox.org>2008-11-26 18:01:18 +0000
commit5b0d74a7d3329ec3fc5818d9185aba7f29291ca7 (patch)
tree1f18fca1c5cb07903752415463f9d3a2d3b04a7c
parentffc6766a4d486990a9f3a64d81a3c3e5ab12f445 (diff)
downloadrockbox-5b0d74a7d3329ec3fc5818d9185aba7f29291ca7.tar.gz
rockbox-5b0d74a7d3329ec3fc5818d9185aba7f29291ca7.zip
Get rid of unused return values, except the one from decode_chunk() which will be used in the dual core split.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19236 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/demac/libdemac/decoder.c10
-rw-r--r--apps/codecs/demac/libdemac/entropy.c12
-rw-r--r--apps/codecs/demac/libdemac/entropy.h12
-rw-r--r--apps/codecs/demac/libdemac/filter.c6
-rw-r--r--apps/codecs/demac/libdemac/filter.h15
-rw-r--r--apps/codecs/demac/libdemac/predictor.c18
-rw-r--r--apps/codecs/demac/libdemac/predictor.h6
7 files changed, 38 insertions, 41 deletions
diff --git a/apps/codecs/demac/libdemac/decoder.c b/apps/codecs/demac/libdemac/decoder.c
index 31bcb28b72..30ab2bd359 100644
--- a/apps/codecs/demac/libdemac/decoder.c
+++ b/apps/codecs/demac/libdemac/decoder.c
@@ -82,7 +82,6 @@ int ICODE_ATTR_DEMAC decode_chunk(struct ape_ctx_t* ape_ctx,
82 int32_t* decoded0, int32_t* decoded1, 82 int32_t* decoded0, int32_t* decoded1,
83 int count) 83 int count)
84{ 84{
85 int res;
86 int32_t left, right; 85 int32_t left, right;
87#ifdef ROCKBOX 86#ifdef ROCKBOX
88 int scale = (APE_OUTPUT_DEPTH - ape_ctx->bps); 87 int scale = (APE_OUTPUT_DEPTH - ape_ctx->bps);
@@ -93,11 +92,11 @@ int ICODE_ATTR_DEMAC decode_chunk(struct ape_ctx_t* ape_ctx,
93 92
94 if ((ape_ctx->channels==1) || (ape_ctx->frameflags & APE_FRAMECODE_PSEUDO_STEREO)) { 93 if ((ape_ctx->channels==1) || (ape_ctx->frameflags & APE_FRAMECODE_PSEUDO_STEREO)) {
95 if (ape_ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) { 94 if (ape_ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) {
96 res = entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, decoded1, count); 95 entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, decoded1, count);
97 /* We are pure silence, so we're done. */ 96 /* We are pure silence, so we're done. */
98 return 0; 97 return 0;
99 } else { 98 } else {
100 res = entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, NULL, count); 99 entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, NULL, count);
101 } 100 }
102 101
103 switch (ape_ctx->compressiontype) 102 switch (ape_ctx->compressiontype)
@@ -143,7 +142,7 @@ int ICODE_ATTR_DEMAC decode_chunk(struct ape_ctx_t* ape_ctx,
143 return 0; 142 return 0;
144 } 143 }
145 144
146 res = entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, decoded1, count); 145 entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, decoded1, count);
147 146
148 /* Apply filters - compression type 1000 doesn't have any */ 147 /* Apply filters - compression type 1000 doesn't have any */
149 switch (ape_ctx->compressiontype) 148 switch (ape_ctx->compressiontype)
@@ -184,6 +183,5 @@ int ICODE_ATTR_DEMAC decode_chunk(struct ape_ctx_t* ape_ctx,
184 } 183 }
185 } 184 }
186 } 185 }
187 186 return 0;
188 return res;
189} 187}
diff --git a/apps/codecs/demac/libdemac/entropy.c b/apps/codecs/demac/libdemac/entropy.c
index e8561122a7..54b5cc57b6 100644
--- a/apps/codecs/demac/libdemac/entropy.c
+++ b/apps/codecs/demac/libdemac/entropy.c
@@ -419,11 +419,11 @@ void init_entropy_decoder(struct ape_ctx_t* ape_ctx,
419 *firstbyte = bytebufferoffset; 419 *firstbyte = bytebufferoffset;
420} 420}
421 421
422int ICODE_ATTR_DEMAC entropy_decode(struct ape_ctx_t* ape_ctx, 422void ICODE_ATTR_DEMAC entropy_decode(struct ape_ctx_t* ape_ctx,
423 unsigned char* inbuffer, int* firstbyte, 423 unsigned char* inbuffer, int* firstbyte,
424 int* bytesconsumed, 424 int* bytesconsumed,
425 int32_t* decoded0, int32_t* decoded1, 425 int32_t* decoded0, int32_t* decoded1,
426 int blockstodecode) 426 int blockstodecode)
427{ 427{
428 bytebuffer = inbuffer; 428 bytebuffer = inbuffer;
429 bytebufferoffset = *firstbyte; 429 bytebufferoffset = *firstbyte;
@@ -458,6 +458,4 @@ int ICODE_ATTR_DEMAC entropy_decode(struct ape_ctx_t* ape_ctx,
458 /* Return the new state of the buffer */ 458 /* Return the new state of the buffer */
459 *bytesconsumed = bytebuffer - inbuffer; 459 *bytesconsumed = bytebuffer - inbuffer;
460 *firstbyte = bytebufferoffset; 460 *firstbyte = bytebufferoffset;
461
462 return(0);
463} 461}
diff --git a/apps/codecs/demac/libdemac/entropy.h b/apps/codecs/demac/libdemac/entropy.h
index dd6736cb15..fac2a44d99 100644
--- a/apps/codecs/demac/libdemac/entropy.h
+++ b/apps/codecs/demac/libdemac/entropy.h
@@ -2,7 +2,7 @@
2 2
3libdemac - A Monkey's Audio decoder 3libdemac - A Monkey's Audio decoder
4 4
5$Id:$ 5$Id$
6 6
7Copyright (C) Dave Chapman 2007 7Copyright (C) Dave Chapman 2007
8 8
@@ -31,10 +31,10 @@ void init_entropy_decoder(struct ape_ctx_t* ape_ctx,
31 unsigned char* inbuffer, int* firstbyte, 31 unsigned char* inbuffer, int* firstbyte,
32 int* bytesconsumed); 32 int* bytesconsumed);
33 33
34int entropy_decode(struct ape_ctx_t* ape_ctx, 34void entropy_decode(struct ape_ctx_t* ape_ctx,
35 unsigned char* inbuffer, int* firstbyte, 35 unsigned char* inbuffer, int* firstbyte,
36 int* bytesconsumed, 36 int* bytesconsumed,
37 int32_t* decoded0, int32_t* decoded1, 37 int32_t* decoded0, int32_t* decoded1,
38 int blockstodecode); 38 int blockstodecode);
39 39
40#endif 40#endif
diff --git a/apps/codecs/demac/libdemac/filter.c b/apps/codecs/demac/libdemac/filter.c
index d66bdc69b0..4a3eb74744 100644
--- a/apps/codecs/demac/libdemac/filter.c
+++ b/apps/codecs/demac/libdemac/filter.c
@@ -237,8 +237,8 @@ void INIT_FILTER(filter_int* buf)
237 do_init_filter(&filter1, buf + ORDER*3 + FILTER_HISTORY_SIZE); 237 do_init_filter(&filter1, buf + ORDER*3 + FILTER_HISTORY_SIZE);
238} 238}
239 239
240int ICODE_ATTR_DEMAC APPLY_FILTER(int fileversion, int32_t* data0, 240void ICODE_ATTR_DEMAC APPLY_FILTER(int fileversion, int32_t* data0,
241 int32_t* data1, int count) 241 int32_t* data1, int count)
242{ 242{
243 if (fileversion >= 3980) { 243 if (fileversion >= 3980) {
244 do_apply_filter_3980(&filter0, data0, count); 244 do_apply_filter_3980(&filter0, data0, count);
@@ -249,6 +249,4 @@ int ICODE_ATTR_DEMAC APPLY_FILTER(int fileversion, int32_t* data0,
249 if (data1 != NULL) 249 if (data1 != NULL)
250 do_apply_filter_3970(&filter1, data1, count); 250 do_apply_filter_3970(&filter1, data1, count);
251 } 251 }
252
253 return 0;
254} 252}
diff --git a/apps/codecs/demac/libdemac/filter.h b/apps/codecs/demac/libdemac/filter.h
index bbe51d4572..bfd0c552a6 100644
--- a/apps/codecs/demac/libdemac/filter.h
+++ b/apps/codecs/demac/libdemac/filter.h
@@ -28,18 +28,23 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
28#include "demac_config.h" 28#include "demac_config.h"
29 29
30void init_filter_16_11(filter_int* buf); 30void init_filter_16_11(filter_int* buf);
31int apply_filter_16_11(int fileversion, int32_t* decoded0, int32_t* decoded1, int count); 31void apply_filter_16_11(int fileversion, int32_t* decoded0,
32 int32_t* decoded1, int count);
32 33
33void init_filter_64_11(filter_int* buf); 34void init_filter_64_11(filter_int* buf);
34int apply_filter_64_11(int fileversion, int32_t* decoded0, int32_t* decoded1, int count); 35void apply_filter_64_11(int fileversion, int32_t* decoded0,
36 int32_t* decoded1, int count);
35 37
36void init_filter_32_10(filter_int* buf); 38void init_filter_32_10(filter_int* buf);
37int apply_filter_32_10(int fileversion, int32_t* decoded0, int32_t* decoded1, int count); 39void apply_filter_32_10(int fileversion, int32_t* decoded0,
40 int32_t* decoded1, int count);
38 41
39void init_filter_256_13(filter_int* buf); 42void init_filter_256_13(filter_int* buf);
40int apply_filter_256_13(int fileversion, int32_t* decoded0, int32_t* decoded1, int count); 43void apply_filter_256_13(int fileversion, int32_t* decoded0,
44 int32_t* decoded1, int count);
41 45
42void init_filter_1280_15(filter_int* buf); 46void init_filter_1280_15(filter_int* buf);
43int apply_filter_1280_15(int fileversion, int32_t* decoded0, int32_t* decoded1, int count); 47void apply_filter_1280_15(int fileversion, int32_t* decoded0,
48 int32_t* decoded1, int count);
44 49
45#endif 50#endif
diff --git a/apps/codecs/demac/libdemac/predictor.c b/apps/codecs/demac/libdemac/predictor.c
index 67a17f4b5d..d4f886fb8c 100644
--- a/apps/codecs/demac/libdemac/predictor.c
+++ b/apps/codecs/demac/libdemac/predictor.c
@@ -68,10 +68,10 @@ void init_predictor_decoder(struct predictor_t* p)
68} 68}
69 69
70#if !defined(CPU_ARM) && !defined(CPU_COLDFIRE) 70#if !defined(CPU_ARM) && !defined(CPU_COLDFIRE)
71int ICODE_ATTR_DEMAC predictor_decode_stereo(struct predictor_t* p, 71void ICODE_ATTR_DEMAC predictor_decode_stereo(struct predictor_t* p,
72 int32_t* decoded0, 72 int32_t* decoded0,
73 int32_t* decoded1, 73 int32_t* decoded1,
74 int count) 74 int count)
75{ 75{
76 int32_t predictionA, predictionB; 76 int32_t predictionA, predictionB;
77 77
@@ -208,14 +208,12 @@ int ICODE_ATTR_DEMAC predictor_decode_stereo(struct predictor_t* p,
208 p->buf = p->historybuffer; 208 p->buf = p->historybuffer;
209 } 209 }
210 } 210 }
211
212 return 0;
213} 211}
214#endif 212#endif
215 213
216int ICODE_ATTR_DEMAC predictor_decode_mono(struct predictor_t* p, 214void ICODE_ATTR_DEMAC predictor_decode_mono(struct predictor_t* p,
217 int32_t* decoded0, 215 int32_t* decoded0,
218 int count) 216 int count)
219{ 217{
220 int32_t predictionA, currentA, A; 218 int32_t predictionA, currentA, A;
221 219
@@ -270,6 +268,4 @@ int ICODE_ATTR_DEMAC predictor_decode_mono(struct predictor_t* p,
270 } 268 }
271 269
272 p->YlastA = currentA; 270 p->YlastA = currentA;
273
274 return 0;
275} 271}
diff --git a/apps/codecs/demac/libdemac/predictor.h b/apps/codecs/demac/libdemac/predictor.h
index df2ba629e6..6a0a81983b 100644
--- a/apps/codecs/demac/libdemac/predictor.h
+++ b/apps/codecs/demac/libdemac/predictor.h
@@ -30,7 +30,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
30#include "filter.h" 30#include "filter.h"
31 31
32void init_predictor_decoder(struct predictor_t* p); 32void init_predictor_decoder(struct predictor_t* p);
33int predictor_decode_stereo(struct predictor_t* p, int32_t* decoded0, int32_t* decoded1, int count); 33void predictor_decode_stereo(struct predictor_t* p, int32_t* decoded0,
34int predictor_decode_mono(struct predictor_t* p, int32_t* decoded0, int count); 34 int32_t* decoded1, int count);
35void predictor_decode_mono(struct predictor_t* p, int32_t* decoded0,
36 int count);
35 37
36#endif 38#endif