mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-10 13:45:10 -05:00
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
This commit is contained in:
parent
ffc6766a4d
commit
5b0d74a7d3
7 changed files with 38 additions and 41 deletions
|
|
@ -82,7 +82,6 @@ int ICODE_ATTR_DEMAC decode_chunk(struct ape_ctx_t* ape_ctx,
|
||||||
int32_t* decoded0, int32_t* decoded1,
|
int32_t* decoded0, int32_t* decoded1,
|
||||||
int count)
|
int count)
|
||||||
{
|
{
|
||||||
int res;
|
|
||||||
int32_t left, right;
|
int32_t left, right;
|
||||||
#ifdef ROCKBOX
|
#ifdef ROCKBOX
|
||||||
int scale = (APE_OUTPUT_DEPTH - ape_ctx->bps);
|
int scale = (APE_OUTPUT_DEPTH - ape_ctx->bps);
|
||||||
|
|
@ -93,11 +92,11 @@ int ICODE_ATTR_DEMAC decode_chunk(struct ape_ctx_t* ape_ctx,
|
||||||
|
|
||||||
if ((ape_ctx->channels==1) || (ape_ctx->frameflags & APE_FRAMECODE_PSEUDO_STEREO)) {
|
if ((ape_ctx->channels==1) || (ape_ctx->frameflags & APE_FRAMECODE_PSEUDO_STEREO)) {
|
||||||
if (ape_ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) {
|
if (ape_ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) {
|
||||||
res = entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, decoded1, count);
|
entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, decoded1, count);
|
||||||
/* We are pure silence, so we're done. */
|
/* We are pure silence, so we're done. */
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
res = entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, NULL, count);
|
entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, NULL, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (ape_ctx->compressiontype)
|
switch (ape_ctx->compressiontype)
|
||||||
|
|
@ -143,7 +142,7 @@ int ICODE_ATTR_DEMAC decode_chunk(struct ape_ctx_t* ape_ctx,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, decoded1, count);
|
entropy_decode(ape_ctx, inbuffer, firstbyte, bytesconsumed, decoded0, decoded1, count);
|
||||||
|
|
||||||
/* Apply filters - compression type 1000 doesn't have any */
|
/* Apply filters - compression type 1000 doesn't have any */
|
||||||
switch (ape_ctx->compressiontype)
|
switch (ape_ctx->compressiontype)
|
||||||
|
|
@ -184,6 +183,5 @@ int ICODE_ATTR_DEMAC decode_chunk(struct ape_ctx_t* ape_ctx,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -419,7 +419,7 @@ void init_entropy_decoder(struct ape_ctx_t* ape_ctx,
|
||||||
*firstbyte = bytebufferoffset;
|
*firstbyte = bytebufferoffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICODE_ATTR_DEMAC entropy_decode(struct ape_ctx_t* ape_ctx,
|
void ICODE_ATTR_DEMAC entropy_decode(struct ape_ctx_t* ape_ctx,
|
||||||
unsigned char* inbuffer, int* firstbyte,
|
unsigned char* inbuffer, int* firstbyte,
|
||||||
int* bytesconsumed,
|
int* bytesconsumed,
|
||||||
int32_t* decoded0, int32_t* decoded1,
|
int32_t* decoded0, int32_t* decoded1,
|
||||||
|
|
@ -458,6 +458,4 @@ int ICODE_ATTR_DEMAC entropy_decode(struct ape_ctx_t* ape_ctx,
|
||||||
/* Return the new state of the buffer */
|
/* Return the new state of the buffer */
|
||||||
*bytesconsumed = bytebuffer - inbuffer;
|
*bytesconsumed = bytebuffer - inbuffer;
|
||||||
*firstbyte = bytebufferoffset;
|
*firstbyte = bytebufferoffset;
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
libdemac - A Monkey's Audio decoder
|
libdemac - A Monkey's Audio decoder
|
||||||
|
|
||||||
$Id:$
|
$Id$
|
||||||
|
|
||||||
Copyright (C) Dave Chapman 2007
|
Copyright (C) Dave Chapman 2007
|
||||||
|
|
||||||
|
|
@ -31,7 +31,7 @@ void init_entropy_decoder(struct ape_ctx_t* ape_ctx,
|
||||||
unsigned char* inbuffer, int* firstbyte,
|
unsigned char* inbuffer, int* firstbyte,
|
||||||
int* bytesconsumed);
|
int* bytesconsumed);
|
||||||
|
|
||||||
int entropy_decode(struct ape_ctx_t* ape_ctx,
|
void entropy_decode(struct ape_ctx_t* ape_ctx,
|
||||||
unsigned char* inbuffer, int* firstbyte,
|
unsigned char* inbuffer, int* firstbyte,
|
||||||
int* bytesconsumed,
|
int* bytesconsumed,
|
||||||
int32_t* decoded0, int32_t* decoded1,
|
int32_t* decoded0, int32_t* decoded1,
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ void INIT_FILTER(filter_int* buf)
|
||||||
do_init_filter(&filter1, buf + ORDER*3 + FILTER_HISTORY_SIZE);
|
do_init_filter(&filter1, buf + ORDER*3 + FILTER_HISTORY_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ICODE_ATTR_DEMAC APPLY_FILTER(int fileversion, int32_t* data0,
|
void ICODE_ATTR_DEMAC APPLY_FILTER(int fileversion, int32_t* data0,
|
||||||
int32_t* data1, int count)
|
int32_t* data1, int count)
|
||||||
{
|
{
|
||||||
if (fileversion >= 3980) {
|
if (fileversion >= 3980) {
|
||||||
|
|
@ -249,6 +249,4 @@ int ICODE_ATTR_DEMAC APPLY_FILTER(int fileversion, int32_t* data0,
|
||||||
if (data1 != NULL)
|
if (data1 != NULL)
|
||||||
do_apply_filter_3970(&filter1, data1, count);
|
do_apply_filter_3970(&filter1, data1, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,18 +28,23 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
||||||
#include "demac_config.h"
|
#include "demac_config.h"
|
||||||
|
|
||||||
void init_filter_16_11(filter_int* buf);
|
void init_filter_16_11(filter_int* buf);
|
||||||
int apply_filter_16_11(int fileversion, int32_t* decoded0, int32_t* decoded1, int count);
|
void apply_filter_16_11(int fileversion, int32_t* decoded0,
|
||||||
|
int32_t* decoded1, int count);
|
||||||
|
|
||||||
void init_filter_64_11(filter_int* buf);
|
void init_filter_64_11(filter_int* buf);
|
||||||
int apply_filter_64_11(int fileversion, int32_t* decoded0, int32_t* decoded1, int count);
|
void apply_filter_64_11(int fileversion, int32_t* decoded0,
|
||||||
|
int32_t* decoded1, int count);
|
||||||
|
|
||||||
void init_filter_32_10(filter_int* buf);
|
void init_filter_32_10(filter_int* buf);
|
||||||
int apply_filter_32_10(int fileversion, int32_t* decoded0, int32_t* decoded1, int count);
|
void apply_filter_32_10(int fileversion, int32_t* decoded0,
|
||||||
|
int32_t* decoded1, int count);
|
||||||
|
|
||||||
void init_filter_256_13(filter_int* buf);
|
void init_filter_256_13(filter_int* buf);
|
||||||
int apply_filter_256_13(int fileversion, int32_t* decoded0, int32_t* decoded1, int count);
|
void apply_filter_256_13(int fileversion, int32_t* decoded0,
|
||||||
|
int32_t* decoded1, int count);
|
||||||
|
|
||||||
void init_filter_1280_15(filter_int* buf);
|
void init_filter_1280_15(filter_int* buf);
|
||||||
int apply_filter_1280_15(int fileversion, int32_t* decoded0, int32_t* decoded1, int count);
|
void apply_filter_1280_15(int fileversion, int32_t* decoded0,
|
||||||
|
int32_t* decoded1, int count);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -68,7 +68,7 @@ void init_predictor_decoder(struct predictor_t* p)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(CPU_ARM) && !defined(CPU_COLDFIRE)
|
#if !defined(CPU_ARM) && !defined(CPU_COLDFIRE)
|
||||||
int ICODE_ATTR_DEMAC predictor_decode_stereo(struct predictor_t* p,
|
void ICODE_ATTR_DEMAC predictor_decode_stereo(struct predictor_t* p,
|
||||||
int32_t* decoded0,
|
int32_t* decoded0,
|
||||||
int32_t* decoded1,
|
int32_t* decoded1,
|
||||||
int count)
|
int count)
|
||||||
|
|
@ -208,12 +208,10 @@ int ICODE_ATTR_DEMAC predictor_decode_stereo(struct predictor_t* p,
|
||||||
p->buf = p->historybuffer;
|
p->buf = p->historybuffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ICODE_ATTR_DEMAC predictor_decode_mono(struct predictor_t* p,
|
void ICODE_ATTR_DEMAC predictor_decode_mono(struct predictor_t* p,
|
||||||
int32_t* decoded0,
|
int32_t* decoded0,
|
||||||
int count)
|
int count)
|
||||||
{
|
{
|
||||||
|
|
@ -270,6 +268,4 @@ int ICODE_ATTR_DEMAC predictor_decode_mono(struct predictor_t* p,
|
||||||
}
|
}
|
||||||
|
|
||||||
p->YlastA = currentA;
|
p->YlastA = currentA;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
|
||||||
#include "filter.h"
|
#include "filter.h"
|
||||||
|
|
||||||
void init_predictor_decoder(struct predictor_t* p);
|
void init_predictor_decoder(struct predictor_t* p);
|
||||||
int predictor_decode_stereo(struct predictor_t* p, int32_t* decoded0, int32_t* decoded1, int count);
|
void predictor_decode_stereo(struct predictor_t* p, int32_t* decoded0,
|
||||||
int predictor_decode_mono(struct predictor_t* p, int32_t* decoded0, int count);
|
int32_t* decoded1, int count);
|
||||||
|
void predictor_decode_mono(struct predictor_t* p, int32_t* decoded0,
|
||||||
|
int count);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue