24 #include "../ogg/ogg.h"
25 #include "../vorbis/codec.h"
34 static int ilog2(
unsigned int v){
89 memset(vb,0,
sizeof(*vb));
133 memset(reap,0,
sizeof(*reap));
159 memset(vb,0,
sizeof(*vb));
173 if(ci==
NULL)
return 1;
176 memset(v,0,
sizeof(*v));
205 for(i=0;i<ci->
books;i++)
210 for(i=0;i<ci->
psys;i++){
223 for(i=0;i<ci->
books;i++){
272 if(_vds_shared_init(v,vi,1))
return 1;
313 free_look(b->
flr[i]);
323 for(i=0;i<ci->
psys;i++)
351 memset(v,0,
sizeof(*v));
385 float *lpc=alloca(order*
sizeof(*lpc));
422 float *lpc=alloca(order*
sizeof(*lpc));
426 _preextrapolate_helper(v);
471 _preextrapolate_helper(v);
543 if(!v->
lW || !v->
nW){
605 int movementW=centerNext-new_centerNext;
613 memmove(v->
pcm[i],v->
pcm[i]+movementW,
664 if(_vds_shared_init(v,vi,0))
return 1;
728 float *pcm=v->
pcm[
j]+prevCenter;
731 pcm[i]=pcm[i]*w[n1-i-1] + p[i]*w[i];
735 float *pcm=v->
pcm[
j]+prevCenter+n1/2-n0/2;
738 pcm[i]=pcm[i]*w[n0-i-1] +p[i]*w[i];
744 float *pcm=v->
pcm[
j]+prevCenter;
745 float *
p=vb->
pcm[
j]+n1/2-n0/2;
747 pcm[i]=pcm[i]*w[n0-i-1] +p[i]*w[i];
748 for(;i<n1/2+n0/2;i++)
753 float *pcm=v->
pcm[
j]+prevCenter;
756 pcm[i]=pcm[i]*w[n0-i-1] +p[i]*w[i];
762 float *pcm=v->
pcm[
j]+thisCenter;
931 float *d=v->
pcm[
j]+(n1-n0)/2;
932 for(i=(n1+n0)/2-1;i>=0;--
i)
942 float *d=v->
pcm[
j]+n1-n0;
vorbis_info_residue * residue_param[64]
float vorbis_lpc_from_data(float *data, float *lpci, int n, int m)
void _vorbis_block_ripcord(vorbis_block *vb)
vorbis_look_psy_global * psy_g_look
void vorbis_staticbook_destroy(static_codebook *b)
vorbis_info_floor * floor_param[64]
static_codebook * book_param[256]
void vorbis_lpc_predict(float *coeff, float *prime, int m, float *data, long n)
void _ve_envelope_shift(envelope_lookup *e, long shift)
float _vp_ampmax_decay(float amp, vorbis_dsp_state *vd)
void mdct_init(mdct_lookup *lookup, int n)
#define BLOCKTYPE_TRANSITION
void vorbis_dsp_clear(vorbis_dsp_state *v)
float * _vorbis_window_get(int n)
int _ve_envelope_mark(vorbis_dsp_state *v)
void _ve_envelope_clear(envelope_lookup *e)
void drft_init(drft_lookup *l, int n)
void _ve_envelope_init(envelope_lookup *e, vorbis_info *vi)
vorbis_look_psy_global * _vp_global_look(vorbis_info *vi)
int vorbis_analysis_wrote(vorbis_dsp_state *v, int vals)
int vorbis_book_init_decode(codebook *dest, const static_codebook *source)
vorbis_look_transform ** transform[2]
struct alloc_chain * reap
int vorbis_synthesis_blockin(vorbis_dsp_state *v, vorbis_block *vb)
vorbis_info_psy_global psy_g_param
int vorbis_synthesis_pcmout(vorbis_dsp_state *v, float ***pcm)
GLdouble GLdouble GLint GLint order
GLubyte GLubyte GLubyte GLubyte w
int vorbis_analysis_blockout(vorbis_dsp_state *v, vorbis_block *vb)
void _vp_psy_clear(vorbis_look_psy *p)
bitrate_manager_state bms
#define BLOCKTYPE_IMPULSE
int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb)
void _vp_psy_init(vorbis_look_psy *p, vorbis_info_psy *vi, vorbis_info_psy_global *gi, int n, long rate)
float * vorbis_window(vorbis_dsp_state *v, int W)
vorbis_func_floor * _floor_P[]
int vorbis_synthesis_lapout(vorbis_dsp_state *v, float ***pcm)
int vorbis_synthesis_init(vorbis_dsp_state *v, vorbis_info *vi)
vorbis_func_residue * _residue_P[]
int vorbis_synthesis_read(vorbis_dsp_state *v, int n)
void vorbis_bitrate_init(vorbis_info *vi, bitrate_manager_state *bm)
#define BLOCKTYPE_PADDING
int vorbis_analysis_init(vorbis_dsp_state *v, vorbis_info *vi)
int vorbis_block_clear(vorbis_block *vb)
int vorbis_book_init_encode(codebook *dest, const static_codebook *source)
struct alloc_chain * next
void vorbis_bitrate_clear(bitrate_manager_state *bm)
vorbis_look_residue ** residue
void drft_clear(drft_lookup *l)
void oggpack_writeinit(oggpack_buffer *b)
void mdct_clear(mdct_lookup *l)
long _ve_envelope_search(vorbis_dsp_state *v)
vorbis_info_psy * psy_param[4]
float ** vorbis_analysis_buffer(vorbis_dsp_state *v, int vals)
void _vp_global_free(vorbis_look_psy_global *look)
void oggpack_writeclear(oggpack_buffer *b)
int vorbis_synthesis_restart(vorbis_dsp_state *v)
void * _vorbis_block_alloc(vorbis_block *vb, long bytes)