mirror of
https://github.com/asterisk/asterisk.git
synced 2025-12-12 01:52:38 +00:00
Code cleanups (bug #66)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -210,9 +210,8 @@ MPEG8;
|
||||
#include "itype.h"
|
||||
|
||||
typedef void (*SBT_FUNCTION) (SAMPLEINT * sample, short *pcm, int n);
|
||||
typedef void (*UNPACK_FUNCTION) ();
|
||||
|
||||
typedef struct
|
||||
typedef struct MPEGI
|
||||
{
|
||||
struct {
|
||||
DEC_INFO decinfo;
|
||||
@@ -241,7 +240,7 @@ typedef struct
|
||||
signed short group9_table[1024][3];
|
||||
int nsbt;
|
||||
SBT_FUNCTION sbt;
|
||||
UNPACK_FUNCTION unpack_routine;
|
||||
void (*unpack_routine) (struct MPEGI *);
|
||||
unsigned char *bs_ptr;
|
||||
UINT32 bitbuf;
|
||||
int bits;
|
||||
|
||||
@@ -312,7 +312,7 @@ int L1audio_decode_init(MPEG *m, MPEG_HEAD * h, int framebytes_arg,
|
||||
|
||||
|
||||
/* init sub-band transform */
|
||||
sbt_init();
|
||||
sbt_init(m);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ static int out_chans[5] =
|
||||
int audio_decode_initL1(MPEG_HEAD * h, int framebytes_arg,
|
||||
int reduction_code, int transform_code, int convert_code,
|
||||
int freq_limit);
|
||||
void sbt_init();
|
||||
void sbt_init(MPEG *m);
|
||||
|
||||
|
||||
IN_OUT L1audio_decode(void *mv, unsigned char *bs, signed short *pcm);
|
||||
@@ -404,7 +404,7 @@ int audio_decode_init(MPEG *m, MPEG_HEAD * h, int framebytes_arg,
|
||||
|
||||
|
||||
/* init sub-band transform */
|
||||
sbt_init();
|
||||
sbt_init(m);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ static void bitget_init_end(unsigned char *buf_end)
|
||||
bitdat.bs_ptr_end = buf_end;
|
||||
}
|
||||
/*------------- get n bits from bitstream -------------*/
|
||||
int bitget_bits_used()
|
||||
int bitget_bits_used(void)
|
||||
{
|
||||
int n; /* compute bits used from last init call */
|
||||
|
||||
@@ -142,7 +142,7 @@ unsigned int bitget(int n)
|
||||
return x;
|
||||
}
|
||||
/*------------- get 1 bit from bitstream -------------*/
|
||||
unsigned int bitget_1bit()
|
||||
unsigned int bitget_1bit(void)
|
||||
{
|
||||
unsigned int x;
|
||||
|
||||
@@ -994,8 +994,6 @@ void sbt_init(MPEG *m);
|
||||
#if 0
|
||||
typedef int iARRAY22[22];
|
||||
#endif
|
||||
iARRAY22 *quant_init_band_addr();
|
||||
iARRAY22 *msis_init_band_addr();
|
||||
|
||||
/*---------------------------------------------------------*/
|
||||
/* mpeg_head defined in mhead.h frame bytes is without pad */
|
||||
|
||||
@@ -49,7 +49,7 @@ static DCTCOEF coef32[32]; /* 32 pt dct coefs */
|
||||
#define forward_bf idx_forward_bf
|
||||
/*--- #define forward_bf ptr_forward_bf ---*/
|
||||
/*------------------------------------------------------------*/
|
||||
DCTCOEF *i_dct_coef_addr()
|
||||
DCTCOEF *i_dct_coef_addr(void)
|
||||
{
|
||||
return coef32;
|
||||
}
|
||||
|
||||
@@ -100,10 +100,10 @@ static signed int vb_ptr;
|
||||
extern WININT vbuf[512];
|
||||
extern WININT vbuf2[512];
|
||||
|
||||
DCTCOEF *i_dct_coef_addr();
|
||||
DCTCOEF *i_dct_coef_addr(void);
|
||||
|
||||
/*======================================================================*/
|
||||
static void gencoef() /* gen coef for N=32 */
|
||||
static void gencoef(void) /* gen coef for N=32 */
|
||||
{
|
||||
int p, n, i, k;
|
||||
double t, pi;
|
||||
@@ -125,8 +125,8 @@ static void gencoef() /* gen coef for N=32 */
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------*/
|
||||
WINCOEF *i_wincoef_addr();
|
||||
static void genwincoef_q() /* gen int window coefs from floating table */
|
||||
WINCOEF *i_wincoef_addr(void);
|
||||
static void genwincoef_q(void) /* gen int window coefs from floating table */
|
||||
{
|
||||
int i, j, k, m;
|
||||
float x;
|
||||
@@ -166,12 +166,11 @@ static void genwincoef_q() /* gen int window coefs from floating table */
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------*/
|
||||
static void genwincoef() /* gen int window coefs from floating table */
|
||||
static void genwincoef(void) /* gen int window coefs from floating table */
|
||||
{
|
||||
int i;
|
||||
float x;
|
||||
WINCOEF *iwincoef;
|
||||
WINCOEF *i_wincoef_addr();
|
||||
|
||||
iwincoef = i_wincoef_addr();
|
||||
|
||||
@@ -186,7 +185,7 @@ static void genwincoef() /* gen int window coefs from floating table */
|
||||
}
|
||||
}
|
||||
/*------------------------------------------------------------*/
|
||||
void i_sbt_init()
|
||||
void i_sbt_init(void)
|
||||
{
|
||||
int i;
|
||||
static int first_pass = 1;
|
||||
|
||||
@@ -138,7 +138,7 @@ static int bat_bit_master[] =
|
||||
void i_sbt_mono(SAMPLEINT * sample, short *pcm, int n);
|
||||
void i_sbt_dual(SAMPLEINT * sample, short *pcm, int n);
|
||||
|
||||
static void unpack();
|
||||
static void unpack(MPEGI *m);
|
||||
|
||||
/*------------- initialize bit getter -------------*/
|
||||
static void load_init(MPEGI *m, unsigned char *buf)
|
||||
@@ -514,7 +514,7 @@ IN_OUT i_audio_decode(MPEGI *m, unsigned char *bs, signed short *pcm)
|
||||
if (sync != 0xFFF)
|
||||
return in_out; /* sync fail */
|
||||
/*-----------*/
|
||||
m->iup.unpack_routine();
|
||||
m->iup.unpack_routine(m);
|
||||
|
||||
|
||||
m->iup.sbt(m->iup.sample, pcm, m->iup.nsbt);
|
||||
|
||||
@@ -268,7 +268,7 @@ static void table_init(MPEGI *m)
|
||||
int i_audio_decode_initL1(MPEGI *m, MPEG_HEAD * h, int framebytes_arg,
|
||||
int reduction_code, int transform_code, int convert_code,
|
||||
int freq_limit);
|
||||
void i_sbt_init();
|
||||
void i_sbt_init(void);
|
||||
|
||||
/*---------------------------------------------------------*/
|
||||
/* mpeg_head defined in mhead.h frame bytes is without pad */
|
||||
|
||||
@@ -49,7 +49,7 @@ WININT vbuf2[512];
|
||||
static WINCOEF iwincoef[264];
|
||||
|
||||
/*==================================================================*/
|
||||
WINCOEF *i_wincoef_addr()
|
||||
WINCOEF *i_wincoef_addr(void)
|
||||
{
|
||||
return iwincoef;
|
||||
}
|
||||
|
||||
@@ -140,7 +140,7 @@ int L3table_init(MPEG *m)
|
||||
}
|
||||
/*====================================================================*/
|
||||
typedef float ARRAY36[36];
|
||||
ARRAY36 *hwin_init_addr();
|
||||
ARRAY36 *hwin_init_addr(MPEG *m);
|
||||
|
||||
/*--------------------------------------------------------------------*/
|
||||
void hwin_init(MPEG *m)
|
||||
@@ -200,8 +200,8 @@ void hwin_init(MPEG *m)
|
||||
}
|
||||
/*=============================================================*/
|
||||
typedef float ARRAY4[4];
|
||||
IMDCT_INIT_BLOCK *imdct_init_addr_18();
|
||||
IMDCT_INIT_BLOCK *imdct_init_addr_6();
|
||||
IMDCT_INIT_BLOCK *imdct_init_addr_18(void);
|
||||
IMDCT_INIT_BLOCK *imdct_init_addr_6(void);
|
||||
|
||||
/*-------------------------------------------------------------*/
|
||||
void imdct_init(MPEG *m)
|
||||
|
||||
@@ -71,11 +71,11 @@ static IMDCT_INIT_BLOCK imdct_info_6 =
|
||||
{mdct6_3v, mdct6_3v2, &coef87};
|
||||
|
||||
/*====================================================================*/
|
||||
IMDCT_INIT_BLOCK *imdct_init_addr_18()
|
||||
IMDCT_INIT_BLOCK *imdct_init_addr_18(void)
|
||||
{
|
||||
return &imdct_info_18;
|
||||
}
|
||||
IMDCT_INIT_BLOCK *imdct_init_addr_6()
|
||||
IMDCT_INIT_BLOCK *imdct_init_addr_6(void)
|
||||
{
|
||||
return &imdct_info_6;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user