forked from len0rd/rockbox
Made local functions static for vorbis and speex codecs
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18263 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
07e59e0356
commit
1e3ed74479
6 changed files with 28 additions and 28 deletions
|
|
@ -133,11 +133,11 @@ static const unsigned char MLOOP_2[64] ICONST_ATTR ={
|
|||
|
||||
static const unsigned char MLOOP_3[8] ICONST_ATTR ={0,1,2,2,3,3,3,3};
|
||||
|
||||
void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
|
||||
ogg_int32_t *lsp,int m,
|
||||
ogg_int32_t amp,
|
||||
ogg_int32_t ampoffset,
|
||||
ogg_int32_t *icos){
|
||||
static void vorbis_lsp_to_curve(ogg_int32_t *curve,int *map,int n,int ln,
|
||||
ogg_int32_t *lsp,int m,
|
||||
ogg_int32_t amp,
|
||||
ogg_int32_t ampoffset,
|
||||
ogg_int32_t *icos){
|
||||
|
||||
(void)ln;
|
||||
/* 0 <= m < 256 */
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ static ogg_reference *ogg_buffer_sub(ogg_reference *or,long begin,long length){
|
|||
return ret;
|
||||
}
|
||||
|
||||
ogg_reference *ogg_buffer_dup(ogg_reference *or){
|
||||
static ogg_reference *ogg_buffer_dup(ogg_reference *or){
|
||||
ogg_reference *ret=0,*head=0;
|
||||
/* duplicate the reference chain; increment refcounts */
|
||||
while(or){
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ typedef struct {
|
|||
|
||||
} vorbis_look_residue0;
|
||||
|
||||
void res0_free_info(vorbis_info_residue *i){
|
||||
static void res0_free_info(vorbis_info_residue *i){
|
||||
vorbis_info_residue0 *info=(vorbis_info_residue0 *)i;
|
||||
if(info){
|
||||
memset(info,0,sizeof(*info));
|
||||
|
|
@ -49,7 +49,7 @@ void res0_free_info(vorbis_info_residue *i){
|
|||
}
|
||||
}
|
||||
|
||||
void res0_free_look(vorbis_look_residue *i){
|
||||
static void res0_free_look(vorbis_look_residue *i){
|
||||
int j;
|
||||
if(i){
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ static int icount(unsigned int v){
|
|||
}
|
||||
|
||||
/* vorbis_info is for range checking */
|
||||
vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){
|
||||
static vorbis_info_residue *res0_unpack(vorbis_info *vi,oggpack_buffer *opb){
|
||||
int j,acc=0;
|
||||
vorbis_info_residue0 *info=(vorbis_info_residue0 *)_ogg_calloc(1,sizeof(*info));
|
||||
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){
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
vorbis_look_residue *res0_look(vorbis_dsp_state *vd,vorbis_info_mode *vm,
|
||||
vorbis_info_residue *vr){
|
||||
static vorbis_look_residue *res0_look(vorbis_dsp_state *vd,vorbis_info_mode *vm,
|
||||
vorbis_info_residue *vr){
|
||||
vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr;
|
||||
vorbis_look_residue0 *look=(vorbis_look_residue0 *)_ogg_calloc(1,sizeof(*look));
|
||||
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,
|
|||
return(0);
|
||||
}
|
||||
|
||||
int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl,
|
||||
ogg_int32_t **in,int *nonzero,int ch){
|
||||
static int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl,
|
||||
ogg_int32_t **in,int *nonzero,int ch){
|
||||
int i,used=0;
|
||||
for(i=0;i<ch;i++)
|
||||
if(nonzero[i])
|
||||
|
|
@ -246,8 +246,8 @@ int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl,
|
|||
return(0);
|
||||
}
|
||||
|
||||
int res1_inverse(vorbis_block *vb,vorbis_look_residue *vl,
|
||||
ogg_int32_t **in,int *nonzero,int ch){
|
||||
static int res1_inverse(vorbis_block *vb,vorbis_look_residue *vl,
|
||||
ogg_int32_t **in,int *nonzero,int ch){
|
||||
int i,used=0;
|
||||
for(i=0;i<ch;i++)
|
||||
if(nonzero[i])
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ static ogg_int32_t _float32_unpack(long val,int *point){
|
|||
/* given a list of word lengths, generate a list of codewords. Works
|
||||
for length ordered or unordered, always assigns the lowest valued
|
||||
codewords first. Extended to handle unused entries (length 0) */
|
||||
ogg_uint32_t *_make_words(long *l,long n,long sparsecount){
|
||||
static ogg_uint32_t *_make_words(long *l,long n,long sparsecount){
|
||||
long i,j,count=0;
|
||||
ogg_uint32_t marker[33];
|
||||
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){
|
|||
the values in the quant vector). in map type 2, all the values came
|
||||
in in an explicit list. Both value lists must be unpacked */
|
||||
|
||||
ogg_int32_t *_book_unquantize(const static_codebook *b,int n,int *sparsemap,
|
||||
int *maxpoint){
|
||||
static ogg_int32_t *_book_unquantize(const static_codebook *b,int n,
|
||||
int *sparsemap,int *maxpoint){
|
||||
long j,k,count=0;
|
||||
if(b->maptype==1 || b->maptype==2){
|
||||
int quantvals;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ CODEC_HEADER
|
|||
|
||||
spx_int16_t output[MAX_FRAME_SIZE] IBSS_ATTR;
|
||||
|
||||
int get_more_data(spx_ogg_sync_state *oy)
|
||||
static int get_more_data(spx_ogg_sync_state *oy)
|
||||
{
|
||||
int bytes;
|
||||
char *buffer;
|
||||
|
|
@ -182,9 +182,9 @@ static spx_int64_t seek_backwards(spx_ogg_sync_state *oy, spx_ogg_page *og,
|
|||
return -1;
|
||||
}
|
||||
|
||||
int speex_seek_page_granule(spx_int64_t pos, spx_int64_t curpos,
|
||||
spx_ogg_sync_state *oy,
|
||||
spx_int64_t headerssize)
|
||||
static int speex_seek_page_granule(spx_int64_t pos, spx_int64_t curpos,
|
||||
spx_ogg_sync_state *oy,
|
||||
spx_int64_t headerssize)
|
||||
{
|
||||
/* TODO: Someone may want to try to implement seek to packet,
|
||||
instead of just to page (should be more accurate, not be any
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ CODEC_HEADER
|
|||
|
||||
/* Some standard functions and variables needed by Tremor */
|
||||
|
||||
size_t read_handler(void *ptr, size_t size, size_t nmemb, void *datasource)
|
||||
static size_t read_handler(void *ptr, size_t size, size_t nmemb, void *datasource)
|
||||
{
|
||||
(void)datasource;
|
||||
return ci->read_filebuf(ptr, nmemb*size);
|
||||
}
|
||||
|
||||
int initial_seek_handler(void *datasource, ogg_int64_t offset, int whence)
|
||||
static int initial_seek_handler(void *datasource, ogg_int64_t offset, int whence)
|
||||
{
|
||||
(void)datasource;
|
||||
(void)offset;
|
||||
|
|
@ -41,7 +41,7 @@ int initial_seek_handler(void *datasource, ogg_int64_t offset, int whence)
|
|||
return -1;
|
||||
}
|
||||
|
||||
int seek_handler(void *datasource, ogg_int64_t offset, int whence)
|
||||
static int seek_handler(void *datasource, ogg_int64_t offset, int whence)
|
||||
{
|
||||
(void)datasource;
|
||||
|
||||
|
|
@ -58,13 +58,13 @@ int seek_handler(void *datasource, ogg_int64_t offset, int whence)
|
|||
return -1;
|
||||
}
|
||||
|
||||
int close_handler(void *datasource)
|
||||
static int close_handler(void *datasource)
|
||||
{
|
||||
(void)datasource;
|
||||
return 0;
|
||||
}
|
||||
|
||||
long tell_handler(void *datasource)
|
||||
static long tell_handler(void *datasource)
|
||||
{
|
||||
(void)datasource;
|
||||
return ci->curpos;
|
||||
|
|
@ -74,7 +74,7 @@ long tell_handler(void *datasource)
|
|||
* (sampling rate, number of channels, etc). It also tries to guess
|
||||
* reasonable buffer parameters based on the current quality setting.
|
||||
*/
|
||||
bool vorbis_set_codec_parameters(OggVorbis_File *vf)
|
||||
static bool vorbis_set_codec_parameters(OggVorbis_File *vf)
|
||||
{
|
||||
vorbis_info *vi;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue