diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2008-08-12 22:01:55 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2008-08-12 22:01:55 +0000 |
commit | 1e3ed744798aea993d884b449d99f2c4e4387747 (patch) | |
tree | 18daa63dece54cd49b15875de3ca464302760734 /apps | |
parent | 07e59e035672cc9b426903f2b3da50b64be80477 (diff) | |
download | rockbox-1e3ed744798aea993d884b449d99f2c4e4387747.tar.gz rockbox-1e3ed744798aea993d884b449d99f2c4e4387747.zip |
Made local functions static for vorbis and speex codecs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18263 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r-- | apps/codecs/Tremor/floor0.c | 10 | ||||
-rw-r--r-- | apps/codecs/Tremor/framing.c | 2 | ||||
-rw-r--r-- | apps/codecs/Tremor/res012.c | 18 | ||||
-rw-r--r-- | apps/codecs/Tremor/sharedbook.c | 6 | ||||
-rw-r--r-- | apps/codecs/speex.c | 8 | ||||
-rw-r--r-- | apps/codecs/vorbis.c | 12 |
6 files changed, 28 insertions, 28 deletions
diff --git a/apps/codecs/Tremor/floor0.c b/apps/codecs/Tremor/floor0.c index c412f71ddd..81587cad72 100644 --- a/apps/codecs/Tremor/floor0.c +++ b/apps/codecs/Tremor/floor0.c | |||
@@ -133,11 +133,11 @@ static const unsigned char MLOOP_2[64] ICONST_ATTR ={ | |||
133 | 133 | ||
134 | static const unsigned char MLOOP_3[8] ICONST_ATTR ={0,1,2,2,3,3,3,3}; | 134 | static const unsigned char MLOOP_3[8] ICONST_ATTR ={0,1,2,2,3,3,3,3}; |
135 | 135 | ||
136 | void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln, | 136 | static void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln, |
137 | ogg_int32_t *lsp,int m, | 137 | ogg_int32_t *lsp,int m, |
138 | ogg_int32_t amp, | 138 | ogg_int32_t amp, |
139 | ogg_int32_t ampoffset, | 139 | ogg_int32_t ampoffset, |
140 | ogg_int32_t *icos){ | 140 | ogg_int32_t *icos){ |
141 | 141 | ||
142 | (void)ln; | 142 | (void)ln; |
143 | /* 0 <= m < 256 */ | 143 | /* 0 <= m < 256 */ |
diff --git a/apps/codecs/Tremor/framing.c b/apps/codecs/Tremor/framing.c index 4fc4a69d4c..fb26b02709 100644 --- a/apps/codecs/Tremor/framing.c +++ b/apps/codecs/Tremor/framing.c | |||
@@ -194,7 +194,7 @@ static ogg_reference *ogg_buffer_sub(ogg_reference *or,long begin,long length){ | |||
194 | return ret; | 194 | return ret; |
195 | } | 195 | } |
196 | 196 | ||
197 | ogg_reference *ogg_buffer_dup(ogg_reference *or){ | 197 | static ogg_reference *ogg_buffer_dup(ogg_reference *or){ |
198 | ogg_reference *ret=0,*head=0; | 198 | ogg_reference *ret=0,*head=0; |
199 | /* duplicate the reference chain; increment refcounts */ | 199 | /* duplicate the reference chain; increment refcounts */ |
200 | while(or){ | 200 | while(or){ |
diff --git a/apps/codecs/Tremor/res012.c b/apps/codecs/Tremor/res012.c index 2104c068e6..46b782def1 100644 --- a/apps/codecs/Tremor/res012.c +++ b/apps/codecs/Tremor/res012.c | |||
@@ -41,7 +41,7 @@ typedef struct { | |||
41 | 41 | ||
42 | } vorbis_look_residue0; | 42 | } vorbis_look_residue0; |
43 | 43 | ||
44 | void res0_free_info(vorbis_info_residue *i){ | 44 | static void res0_free_info(vorbis_info_residue *i){ |
45 | vorbis_info_residue0 *info=(vorbis_info_residue0 *)i; | 45 | vorbis_info_residue0 *info=(vorbis_info_residue0 *)i; |
46 | if(info){ | 46 | if(info){ |
47 | memset(info,0,sizeof(*info)); | 47 | memset(info,0,sizeof(*info)); |
@@ -49,7 +49,7 @@ void res0_free_info(vorbis_info_residue *i){ | |||
49 | } | 49 | } |
50 | } | 50 | } |
51 | 51 | ||
52 | void res0_free_look(vorbis_look_residue *i){ | 52 | static void res0_free_look(vorbis_look_residue *i){ |
53 | int j; | 53 | int j; |
54 | if(i){ | 54 | if(i){ |
55 | 55 | ||
@@ -86,7 +86,7 @@ static int icount(unsigned int v){ | |||
86 | } | 86 | } |
87 | 87 | ||
88 | /* vorbis_info is for range checking */ | 88 | /* vorbis_info is for range checking */ |
89 | vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){ | 89 | static vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){ |
90 | int j,acc=0; | 90 | int j,acc=0; |
91 | vorbis_info_residue0 *info=(vorbis_info_residue0 *)_ogg_calloc(1,sizeof(*info)); | 91 | vorbis_info_residue0 *info=(vorbis_info_residue0 *)_ogg_calloc(1,sizeof(*info)); |
92 | codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; | 92 | codec_setup_info *ci=(codec_setup_info *)vi->codec_setup; |
@@ -118,8 +118,8 @@ vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){ | |||
118 | return(NULL); | 118 | return(NULL); |
119 | } | 119 | } |
120 | 120 | ||
121 | vorbis_look_residue *res0_look(vorbis_dsp_state *vd,vorbis_info_mode *vm, | 121 | static vorbis_look_residue *res0_look(vorbis_dsp_state *vd,vorbis_info_mode *vm, |
122 | vorbis_info_residue *vr){ | 122 | vorbis_info_residue *vr){ |
123 | vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; | 123 | vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; |
124 | vorbis_look_residue0 *look=(vorbis_look_residue0 *)_ogg_calloc(1,sizeof(*look)); | 124 | vorbis_look_residue0 *look=(vorbis_look_residue0 *)_ogg_calloc(1,sizeof(*look)); |
125 | codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup; | 125 | codec_setup_info *ci=(codec_setup_info *)vd->vi->codec_setup; |
@@ -234,8 +234,8 @@ static int _01inverse(vorbis_block *vb,vorbis_look_residue *vl, | |||
234 | return(0); | 234 | return(0); |
235 | } | 235 | } |
236 | 236 | ||
237 | int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl, | 237 | static int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl, |
238 | ogg_int32_t **in,int *nonzero,int ch){ | 238 | ogg_int32_t **in,int *nonzero,int ch){ |
239 | int i,used=0; | 239 | int i,used=0; |
240 | for(i=0;i<ch;i++) | 240 | for(i=0;i<ch;i++) |
241 | if(nonzero[i]) | 241 | if(nonzero[i]) |
@@ -246,8 +246,8 @@ int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl, | |||
246 | return(0); | 246 | return(0); |
247 | } | 247 | } |
248 | 248 | ||
249 | int res1_inverse(vorbis_block *vb,vorbis_look_residue *vl, | 249 | static int res1_inverse(vorbis_block *vb,vorbis_look_residue *vl, |
250 | ogg_int32_t **in,int *nonzero,int ch){ | 250 | ogg_int32_t **in,int *nonzero,int ch){ |
251 | int i,used=0; | 251 | int i,used=0; |
252 | for(i=0;i<ch;i++) | 252 | for(i=0;i<ch;i++) |
253 | if(nonzero[i]) | 253 | if(nonzero[i]) |
diff --git a/apps/codecs/Tremor/sharedbook.c b/apps/codecs/Tremor/sharedbook.c index 6d1226e044..edabf3ccb3 100644 --- a/apps/codecs/Tremor/sharedbook.c +++ b/apps/codecs/Tremor/sharedbook.c | |||
@@ -68,7 +68,7 @@ static ogg_int32_t _float32_unpack(long val,int *point){ | |||
68 | /* given a list of word lengths, generate a list of codewords. Works | 68 | /* given a list of word lengths, generate a list of codewords. Works |
69 | for length ordered or unordered, always assigns the lowest valued | 69 | for length ordered or unordered, always assigns the lowest valued |
70 | codewords first. Extended to handle unused entries (length 0) */ | 70 | codewords first. Extended to handle unused entries (length 0) */ |
71 | ogg_uint32_t *_make_words(long *l,long n,long sparsecount){ | 71 | static ogg_uint32_t *_make_words(long *l,long n,long sparsecount){ |
72 | long i,j,count=0; | 72 | long i,j,count=0; |
73 | ogg_uint32_t marker[33]; | 73 | ogg_uint32_t marker[33]; |
74 | ogg_uint32_t *r=(ogg_uint32_t *)ogg_tmpmalloc((sparsecount?sparsecount:n)*sizeof(*r)); | 74 | ogg_uint32_t *r=(ogg_uint32_t *)ogg_tmpmalloc((sparsecount?sparsecount:n)*sizeof(*r)); |
@@ -179,8 +179,8 @@ long _book_maptype1_quantvals(const static_codebook *b){ | |||
179 | the values in the quant vector). in map type 2, all the values came | 179 | the values in the quant vector). in map type 2, all the values came |
180 | in in an explicit list. Both value lists must be unpacked */ | 180 | in in an explicit list. Both value lists must be unpacked */ |
181 | 181 | ||
182 | ogg_int32_t *_book_unquantize(const static_codebook *b,int n,int *sparsemap, | 182 | static ogg_int32_t *_book_unquantize(const static_codebook *b,int n, |
183 | int *maxpoint){ | 183 | int *sparsemap,int *maxpoint){ |
184 | long j,k,count=0; | 184 | long j,k,count=0; |
185 | if(b->maptype==1 || b->maptype==2){ | 185 | if(b->maptype==1 || b->maptype==2){ |
186 | int quantvals; | 186 | int quantvals; |
diff --git a/apps/codecs/speex.c b/apps/codecs/speex.c index 8f4db86b26..70914eeac1 100644 --- a/apps/codecs/speex.c +++ b/apps/codecs/speex.c | |||
@@ -37,7 +37,7 @@ CODEC_HEADER | |||
37 | 37 | ||
38 | spx_int16_t output[MAX_FRAME_SIZE] IBSS_ATTR; | 38 | spx_int16_t output[MAX_FRAME_SIZE] IBSS_ATTR; |
39 | 39 | ||
40 | int get_more_data(spx_ogg_sync_state *oy) | 40 | static int get_more_data(spx_ogg_sync_state *oy) |
41 | { | 41 | { |
42 | int bytes; | 42 | int bytes; |
43 | char *buffer; | 43 | char *buffer; |
@@ -182,9 +182,9 @@ static spx_int64_t seek_backwards(spx_ogg_sync_state *oy, spx_ogg_page *og, | |||
182 | return -1; | 182 | return -1; |
183 | } | 183 | } |
184 | 184 | ||
185 | int speex_seek_page_granule(spx_int64_t pos, spx_int64_t curpos, | 185 | static int speex_seek_page_granule(spx_int64_t pos, spx_int64_t curpos, |
186 | spx_ogg_sync_state *oy, | 186 | spx_ogg_sync_state *oy, |
187 | spx_int64_t headerssize) | 187 | spx_int64_t headerssize) |
188 | { | 188 | { |
189 | /* TODO: Someone may want to try to implement seek to packet, | 189 | /* TODO: Someone may want to try to implement seek to packet, |
190 | instead of just to page (should be more accurate, not be any | 190 | instead of just to page (should be more accurate, not be any |
diff --git a/apps/codecs/vorbis.c b/apps/codecs/vorbis.c index c3b547e956..e13f53c5a5 100644 --- a/apps/codecs/vorbis.c +++ b/apps/codecs/vorbis.c | |||
@@ -27,13 +27,13 @@ CODEC_HEADER | |||
27 | 27 | ||
28 | /* Some standard functions and variables needed by Tremor */ | 28 | /* Some standard functions and variables needed by Tremor */ |
29 | 29 | ||
30 | size_t read_handler(void *ptr, size_t size, size_t nmemb, void *datasource) | 30 | static size_t read_handler(void *ptr, size_t size, size_t nmemb, void *datasource) |
31 | { | 31 | { |
32 | (void)datasource; | 32 | (void)datasource; |
33 | return ci->read_filebuf(ptr, nmemb*size); | 33 | return ci->read_filebuf(ptr, nmemb*size); |
34 | } | 34 | } |
35 | 35 | ||
36 | int initial_seek_handler(void *datasource, ogg_int64_t offset, int whence) | 36 | static int initial_seek_handler(void *datasource, ogg_int64_t offset, int whence) |
37 | { | 37 | { |
38 | (void)datasource; | 38 | (void)datasource; |
39 | (void)offset; | 39 | (void)offset; |
@@ -41,7 +41,7 @@ int initial_seek_handler(void *datasource, ogg_int64_t offset, int whence) | |||
41 | return -1; | 41 | return -1; |
42 | } | 42 | } |
43 | 43 | ||
44 | int seek_handler(void *datasource, ogg_int64_t offset, int whence) | 44 | static int seek_handler(void *datasource, ogg_int64_t offset, int whence) |
45 | { | 45 | { |
46 | (void)datasource; | 46 | (void)datasource; |
47 | 47 | ||
@@ -58,13 +58,13 @@ int seek_handler(void *datasource, ogg_int64_t offset, int whence) | |||
58 | return -1; | 58 | return -1; |
59 | } | 59 | } |
60 | 60 | ||
61 | int close_handler(void *datasource) | 61 | static int close_handler(void *datasource) |
62 | { | 62 | { |
63 | (void)datasource; | 63 | (void)datasource; |
64 | return 0; | 64 | return 0; |
65 | } | 65 | } |
66 | 66 | ||
67 | long tell_handler(void *datasource) | 67 | static long tell_handler(void *datasource) |
68 | { | 68 | { |
69 | (void)datasource; | 69 | (void)datasource; |
70 | return ci->curpos; | 70 | return ci->curpos; |
@@ -74,7 +74,7 @@ long tell_handler(void *datasource) | |||
74 | * (sampling rate, number of channels, etc). It also tries to guess | 74 | * (sampling rate, number of channels, etc). It also tries to guess |
75 | * reasonable buffer parameters based on the current quality setting. | 75 | * reasonable buffer parameters based on the current quality setting. |
76 | */ | 76 | */ |
77 | bool vorbis_set_codec_parameters(OggVorbis_File *vf) | 77 | static bool vorbis_set_codec_parameters(OggVorbis_File *vf) |
78 | { | 78 | { |
79 | vorbis_info *vi; | 79 | vorbis_info *vi; |
80 | 80 | ||