diff options
Diffstat (limited to 'apps/codecs')
-rw-r--r-- | apps/codecs/Makefile | 2 | ||||
-rw-r--r-- | apps/codecs/a52.c | 3 | ||||
-rw-r--r-- | apps/codecs/aac.c | 6 | ||||
-rw-r--r-- | apps/codecs/alac.c | 6 | ||||
-rw-r--r-- | apps/codecs/flac.c | 6 | ||||
-rw-r--r-- | apps/codecs/mpa.c | 3 | ||||
-rw-r--r-- | apps/codecs/mpc.c | 3 | ||||
-rw-r--r-- | apps/codecs/shorten.c | 5 | ||||
-rw-r--r-- | apps/codecs/vorbis.c | 3 | ||||
-rw-r--r-- | apps/codecs/wav.c | 4 | ||||
-rw-r--r-- | apps/codecs/wavpack.c | 4 |
11 files changed, 25 insertions, 20 deletions
diff --git a/apps/codecs/Makefile b/apps/codecs/Makefile index 5aec2ed983..d0cd97db9b 100644 --- a/apps/codecs/Makefile +++ b/apps/codecs/Makefile | |||
@@ -10,7 +10,7 @@ | |||
10 | INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ | 10 | INCLUDES = -I$(FIRMDIR)/include -I$(FIRMDIR)/export -I$(FIRMDIR)/common \ |
11 | -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR) | 11 | -I$(FIRMDIR)/drivers -I$(APPSDIR) -Ilib -I$(BUILDDIR) |
12 | CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ | 12 | CFLAGS = $(GCCOPTS) $(INCLUDES) $(TARGET) $(EXTRA_DEFINES) \ |
13 | -DMEM=${MEMORYSIZE} -DCODEC | 13 | -DTARGET_ID=$(TARGET_ID) -DMEM=${MEMORYSIZE} -DCODEC |
14 | 14 | ||
15 | ifdef APPEXTRA | 15 | ifdef APPEXTRA |
16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) | 16 | INCLUDES += $(patsubst %,-I$(APPSDIR)/%,$(subst :, ,$(APPEXTRA))) |
diff --git a/apps/codecs/a52.c b/apps/codecs/a52.c index dd504e83fd..f12fce1027 100644 --- a/apps/codecs/a52.c +++ b/apps/codecs/a52.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <codecs/liba52/config-a52.h> | 22 | #include <codecs/liba52/config-a52.h> |
23 | #include <codecs/liba52/a52.h> | 23 | #include <codecs/liba52/a52.h> |
24 | 24 | ||
25 | CODEC_HEADER | ||
26 | |||
25 | #define BUFFER_SIZE 4096 | 27 | #define BUFFER_SIZE 4096 |
26 | 28 | ||
27 | #define A52_SAMPLESPERFRAME (6*256) | 29 | #define A52_SAMPLESPERFRAME (6*256) |
@@ -129,7 +131,6 @@ enum codec_status codec_start(struct codec_api *api) | |||
129 | int sample_loc; | 131 | int sample_loc; |
130 | 132 | ||
131 | /* Generic codec initialisation */ | 133 | /* Generic codec initialisation */ |
132 | TEST_CODEC_API(api); | ||
133 | ci = api; | 134 | ci = api; |
134 | 135 | ||
135 | #ifdef USE_IRAM | 136 | #ifdef USE_IRAM |
diff --git a/apps/codecs/aac.c b/apps/codecs/aac.c index a6ce0170a9..baa3935175 100644 --- a/apps/codecs/aac.c +++ b/apps/codecs/aac.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include "libfaad/structs.h" | 23 | #include "libfaad/structs.h" |
24 | #include "libfaad/decoder.h" | 24 | #include "libfaad/decoder.h" |
25 | 25 | ||
26 | CODEC_HEADER | ||
27 | |||
26 | #ifndef SIMULATOR | 28 | #ifndef SIMULATOR |
27 | extern char iramcopy[]; | 29 | extern char iramcopy[]; |
28 | extern char iramstart[]; | 30 | extern char iramstart[]; |
@@ -51,10 +53,8 @@ enum codec_status codec_start(struct codec_api* api) | |||
51 | int16_t* decodedbuffer; | 53 | int16_t* decodedbuffer; |
52 | 54 | ||
53 | /* Generic codec initialisation */ | 55 | /* Generic codec initialisation */ |
54 | TEST_CODEC_API(api); | ||
55 | |||
56 | rb = api; | 56 | rb = api; |
57 | ci = (struct codec_api*)api; | 57 | ci = api; |
58 | 58 | ||
59 | #ifndef SIMULATOR | 59 | #ifndef SIMULATOR |
60 | rb->memcpy(iramstart, iramcopy, iramend-iramstart); | 60 | rb->memcpy(iramstart, iramcopy, iramend-iramstart); |
diff --git a/apps/codecs/alac.c b/apps/codecs/alac.c index 30c1ada555..7ca70ce83c 100644 --- a/apps/codecs/alac.c +++ b/apps/codecs/alac.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include "libm4a/m4a.h" | 21 | #include "libm4a/m4a.h" |
22 | #include "libalac/decomp.h" | 22 | #include "libalac/decomp.h" |
23 | 23 | ||
24 | CODEC_HEADER | ||
25 | |||
24 | #ifdef USE_IRAM | 26 | #ifdef USE_IRAM |
25 | extern char iramcopy[]; | 27 | extern char iramcopy[]; |
26 | extern char iramstart[]; | 28 | extern char iramstart[]; |
@@ -50,10 +52,8 @@ enum codec_status codec_start(struct codec_api* api) | |||
50 | alac_file alac; | 52 | alac_file alac; |
51 | 53 | ||
52 | /* Generic codec initialisation */ | 54 | /* Generic codec initialisation */ |
53 | TEST_CODEC_API(api); | ||
54 | |||
55 | rb = api; | 55 | rb = api; |
56 | ci = (struct codec_api*)api; | 56 | ci = api; |
57 | 57 | ||
58 | #ifdef USE_IRAM | 58 | #ifdef USE_IRAM |
59 | rb->memcpy(iramstart, iramcopy, iramend-iramstart); | 59 | rb->memcpy(iramstart, iramcopy, iramend-iramstart); |
diff --git a/apps/codecs/flac.c b/apps/codecs/flac.c index ae05b0f2aa..a96963dd80 100644 --- a/apps/codecs/flac.c +++ b/apps/codecs/flac.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include "codeclib.h" | 20 | #include "codeclib.h" |
21 | #include <codecs/libffmpegFLAC/decoder.h> | 21 | #include <codecs/libffmpegFLAC/decoder.h> |
22 | 22 | ||
23 | CODEC_HEADER | ||
24 | |||
23 | #ifdef USE_IRAM | 25 | #ifdef USE_IRAM |
24 | extern char iramcopy[]; | 26 | extern char iramcopy[]; |
25 | extern char iramstart[]; | 27 | extern char iramstart[]; |
@@ -226,10 +228,8 @@ enum codec_status codec_start(struct codec_api* api) | |||
226 | int frame; | 228 | int frame; |
227 | 229 | ||
228 | /* Generic codec initialisation */ | 230 | /* Generic codec initialisation */ |
229 | TEST_CODEC_API(api); | ||
230 | |||
231 | rb = api; | 231 | rb = api; |
232 | ci = (struct codec_api*)api; | 232 | ci = api; |
233 | 233 | ||
234 | #ifdef USE_IRAM | 234 | #ifdef USE_IRAM |
235 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); | 235 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); |
diff --git a/apps/codecs/mpa.c b/apps/codecs/mpa.c index 3d824d9b39..3c57f3f33f 100644 --- a/apps/codecs/mpa.c +++ b/apps/codecs/mpa.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include <codecs/libmad/mad.h> | 21 | #include <codecs/libmad/mad.h> |
22 | #include <inttypes.h> | 22 | #include <inttypes.h> |
23 | 23 | ||
24 | CODEC_HEADER | ||
25 | |||
24 | struct mad_stream stream IBSS_ATTR; | 26 | struct mad_stream stream IBSS_ATTR; |
25 | struct mad_frame frame IBSS_ATTR; | 27 | struct mad_frame frame IBSS_ATTR; |
26 | struct mad_synth synth IBSS_ATTR; | 28 | struct mad_synth synth IBSS_ATTR; |
@@ -81,7 +83,6 @@ enum codec_status codec_start(struct codec_api *api) | |||
81 | char *inputbuffer; | 83 | char *inputbuffer; |
82 | 84 | ||
83 | ci = api; | 85 | ci = api; |
84 | TEST_CODEC_API(api); | ||
85 | 86 | ||
86 | #ifdef USE_IRAM | 87 | #ifdef USE_IRAM |
87 | ci->memcpy(iramstart, iramcopy, iramend - iramstart); | 88 | ci->memcpy(iramstart, iramcopy, iramend - iramstart); |
diff --git a/apps/codecs/mpc.c b/apps/codecs/mpc.c index 207a63ce97..1d1ed3a8b7 100644 --- a/apps/codecs/mpc.c +++ b/apps/codecs/mpc.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include "codeclib.h" | 20 | #include "codeclib.h" |
21 | #include <codecs/libmusepack/musepack.h> | 21 | #include <codecs/libmusepack/musepack.h> |
22 | 22 | ||
23 | CODEC_HEADER | ||
24 | |||
23 | mpc_decoder decoder; | 25 | mpc_decoder decoder; |
24 | 26 | ||
25 | /* Our implementations of the mpc_reader callback functions. */ | 27 | /* Our implementations of the mpc_reader callback functions. */ |
@@ -82,7 +84,6 @@ enum codec_status codec_start(struct codec_api *api) | |||
82 | mpc_reader reader; | 84 | mpc_reader reader; |
83 | mpc_streaminfo info; | 85 | mpc_streaminfo info; |
84 | 86 | ||
85 | TEST_CODEC_API(api); | ||
86 | #ifdef USE_IRAM | 87 | #ifdef USE_IRAM |
87 | ci->memcpy(iramstart, iramcopy, iramend - iramstart); | 88 | ci->memcpy(iramstart, iramcopy, iramend - iramstart); |
88 | ci->memset(iedata, 0, iend - iedata); | 89 | ci->memset(iedata, 0, iend - iedata); |
diff --git a/apps/codecs/shorten.c b/apps/codecs/shorten.c index 9e679f5ea7..ffbd42a9ff 100644 --- a/apps/codecs/shorten.c +++ b/apps/codecs/shorten.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include "codeclib.h" | 20 | #include "codeclib.h" |
21 | #include <codecs/libffmpegFLAC/shndec.h> | 21 | #include <codecs/libffmpegFLAC/shndec.h> |
22 | 22 | ||
23 | CODEC_HEADER | ||
24 | |||
23 | #ifdef USE_IRAM | 25 | #ifdef USE_IRAM |
24 | extern char iramcopy[]; | 26 | extern char iramcopy[]; |
25 | extern char iramstart[]; | 27 | extern char iramstart[]; |
@@ -50,9 +52,8 @@ enum codec_status codec_start(struct codec_api* api) | |||
50 | long bytesleft; | 52 | long bytesleft; |
51 | 53 | ||
52 | /* Generic codec initialisation */ | 54 | /* Generic codec initialisation */ |
53 | TEST_CODEC_API(api); | ||
54 | rb = api; | 55 | rb = api; |
55 | ci = (struct codec_api*)api; | 56 | ci = api; |
56 | 57 | ||
57 | #ifdef USE_IRAM | 58 | #ifdef USE_IRAM |
58 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); | 59 | ci->memcpy(iramstart, iramcopy, iramend-iramstart); |
diff --git a/apps/codecs/vorbis.c b/apps/codecs/vorbis.c index 795e689e7d..fdd7a952d4 100644 --- a/apps/codecs/vorbis.c +++ b/apps/codecs/vorbis.c | |||
@@ -21,6 +21,8 @@ | |||
21 | #include "Tremor/ivorbisfile.h" | 21 | #include "Tremor/ivorbisfile.h" |
22 | #include "Tremor/ogg.h" | 22 | #include "Tremor/ogg.h" |
23 | 23 | ||
24 | CODEC_HEADER | ||
25 | |||
24 | static struct codec_api *rb; | 26 | static struct codec_api *rb; |
25 | 27 | ||
26 | /* Some standard functions and variables needed by Tremor */ | 28 | /* Some standard functions and variables needed by Tremor */ |
@@ -122,7 +124,6 @@ enum codec_status codec_start(struct codec_api *api) | |||
122 | ogg_uint32_t vf_serialnos; | 124 | ogg_uint32_t vf_serialnos; |
123 | ogg_int64_t vf_pcmlengths[2]; | 125 | ogg_int64_t vf_pcmlengths[2]; |
124 | 126 | ||
125 | TEST_CODEC_API(api); | ||
126 | rb = api; | 127 | rb = api; |
127 | 128 | ||
128 | #ifdef USE_IRAM | 129 | #ifdef USE_IRAM |
diff --git a/apps/codecs/wav.c b/apps/codecs/wav.c index e86b559caa..1dda2c3d58 100644 --- a/apps/codecs/wav.c +++ b/apps/codecs/wav.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include "codeclib.h" | 20 | #include "codeclib.h" |
21 | #include "inttypes.h" | 21 | #include "inttypes.h" |
22 | 22 | ||
23 | CODEC_HEADER | ||
24 | |||
23 | struct codec_api* rb; | 25 | struct codec_api* rb; |
24 | 26 | ||
25 | /* This codec support WAVE files with the following formats: | 27 | /* This codec support WAVE files with the following formats: |
@@ -230,8 +232,6 @@ enum codec_status codec_start(struct codec_api* api) | |||
230 | int32_t * const int32_samples = (int32_t*)int16_samples; | 232 | int32_t * const int32_samples = (int32_t*)int16_samples; |
231 | 233 | ||
232 | /* Generic codec initialisation */ | 234 | /* Generic codec initialisation */ |
233 | TEST_CODEC_API(api); | ||
234 | |||
235 | rb = api; | 235 | rb = api; |
236 | ci = api; | 236 | ci = api; |
237 | 237 | ||
diff --git a/apps/codecs/wavpack.c b/apps/codecs/wavpack.c index ff890ba805..2804d3ef72 100644 --- a/apps/codecs/wavpack.c +++ b/apps/codecs/wavpack.c | |||
@@ -20,6 +20,8 @@ | |||
20 | #include "codeclib.h" | 20 | #include "codeclib.h" |
21 | #include "libwavpack/wavpack.h" | 21 | #include "libwavpack/wavpack.h" |
22 | 22 | ||
23 | CODEC_HEADER | ||
24 | |||
23 | static struct codec_api *ci; | 25 | static struct codec_api *ci; |
24 | 26 | ||
25 | #define FORCE_DSP_USE /* fixes some WavPack bugs; adds about 12% to boost ratio | 27 | #define FORCE_DSP_USE /* fixes some WavPack bugs; adds about 12% to boost ratio |
@@ -52,8 +54,6 @@ enum codec_status codec_start(struct codec_api* api) | |||
52 | int bps, nchans, sr_100; | 54 | int bps, nchans, sr_100; |
53 | 55 | ||
54 | /* Generic codec initialisation */ | 56 | /* Generic codec initialisation */ |
55 | TEST_CODEC_API(api); | ||
56 | |||
57 | ci = api; | 57 | ci = api; |
58 | 58 | ||
59 | #ifdef USE_IRAM | 59 | #ifdef USE_IRAM |