diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/block.c --- libvorbis-1.3.2-orig/lib/block.c Fri Dec 09 19:22:11 2011 +0900 +++ libvorbis-1.3.2/lib/block.c Fri Dec 09 21:27:00 2011 +0900 @@ -30,6 +30,7 @@ #include "lpc.h" #include "registry.h" #include "misc.h" +#include "block.h" static int ilog2(unsigned int v){ int ret=0; @@ -771,14 +772,14 @@ if(v->lW){ if(v->W){ /* large/large */ - float *w=_vorbis_window_get(b->window[1]-hs); + const float *w=_vorbis_window_get(b->window[1]-hs); float *pcm=v->pcm[j]+prevCenter; float *p=vb->pcm[j]; for(i=0;iwindow[0]-hs); + const float *w=_vorbis_window_get(b->window[0]-hs); float *pcm=v->pcm[j]+prevCenter+n1/2-n0/2; float *p=vb->pcm[j]; for(i=0;iW){ /* small/large */ - float *w=_vorbis_window_get(b->window[0]-hs); + const float *w=_vorbis_window_get(b->window[0]-hs); float *pcm=v->pcm[j]+prevCenter; float *p=vb->pcm[j]+n1/2-n0/2; for(i=0;iwindow[0]-hs); + const float *w=_vorbis_window_get(b->window[0]-hs); float *pcm=v->pcm[j]+prevCenter; float *p=vb->pcm[j]; for(i=0;ivi; codec_setup_info *ci=vi->codec_setup; int hs=ci->halfrate_flag; diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/block.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ libvorbis-1.3.2/lib/block.h Fri Dec 09 21:27:00 2011 +0900 @@ -0,0 +1,23 @@ +/******************************************************************** + * * + * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. * + * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS * + * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE * + * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. * + * * + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation http://www.xiph.org/ * + * * + ******************************************************************** + + function: PCM data vector blocking, windowing and dis/reassembly + last mod: $Id: $ + + ********************************************************************/ + +#ifndef _V_BLOCK_ +#define _V_BLOCK_ + +extern const float *vorbis_window(vorbis_dsp_state *v,int W); + +#endif diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/codebook.c --- libvorbis-1.3.2-orig/lib/codebook.c Fri Dec 09 19:22:11 2011 +0900 +++ libvorbis-1.3.2/lib/codebook.c Fri Dec 09 21:27:00 2011 +0900 @@ -248,7 +248,7 @@ } /* quantized values */ - if((quantvals*s->q_quant+7>>3)>opb->storage-oggpack_bytes(opb)) + if(((quantvals*s->q_quant+7)>>3)>opb->storage-oggpack_bytes(opb)) goto _eofout; s->quantlist=_ogg_malloc(sizeof(*s->quantlist)*quantvals); for(i=0;iloneighbor[i-2]]&=0x7fff; fit_value[look->hineighbor[i-2]]&=0x7fff; diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/info.c --- libvorbis-1.3.2-orig/lib/info.c Fri Dec 09 19:22:11 2011 +0900 +++ libvorbis-1.3.2/lib/info.c Fri Dec 09 21:27:00 2011 +0900 @@ -654,7 +654,7 @@ }else{ ogg_int64_t granuleoff=0xffffffff; granuleoff<<=31; - granuleoff|=0x7ffffffff; + granuleoff|=0x7fffffff; return(((double)granulepos+2+granuleoff+granuleoff)/v->vi->rate); } } diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/lsp.c --- libvorbis-1.3.2-orig/lib/lsp.c Fri Dec 09 19:22:11 2011 +0900 +++ libvorbis-1.3.2/lib/lsp.c Fri Dec 09 21:27:00 2011 +0900 @@ -309,7 +309,6 @@ #define EPSILON 10e-7 static int Laguerre_With_Deflation(float *a,int ord,float *r){ int i,m; - double lastdelta=0.f; double *defl=alloca(sizeof(*defl)*(ord+1)); for(i=0;i<=ord;i++)defl[i]=a[i]; @@ -346,7 +345,6 @@ if(delta<0.f)delta*=-1; if(fabs(delta/new)<10e-12)break; - lastdelta=delta; } r[m-1]=new; diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/psy.c --- libvorbis-1.3.2-orig/lib/psy.c Fri Dec 09 19:22:11 2011 +0900 +++ libvorbis-1.3.2/lib/psy.c Fri Dec 09 21:27:00 2011 +0900 @@ -52,13 +52,6 @@ } } -void _vi_gpsy_free(vorbis_info_psy_global *i){ - if(i){ - memset(i,0,sizeof(*i)); - _ogg_free(i); - } -} - void _vi_psy_free(vorbis_info_psy *i){ if(i){ memset(i,0,sizeof(*i)); @@ -1020,7 +1013,9 @@ int limit = g->coupling_pointlimit[p->vi->blockflag][blobno]; float prepoint=stereo_threshholds[g->coupling_prepointamp[blobno]]; float postpoint=stereo_threshholds[g->coupling_postpointamp[blobno]]; +#if 0 float de=0.1*p->m_val; /* a blend of the AoTuV M2 and M3 code here and below */ +#endif /* mdct is our raw mdct output, floor not removed. */ /* inout passes in the ifloor, passes back quantized result */ @@ -1154,27 +1149,28 @@ reM[j] += reA[j]; qeM[j] = fabs(reM[j]); }else{ +#if 0 /* AoTuV */ /** @ M2 ** The boost problem by the combination of noise normalization and point stereo is eased. However, this is a temporary patch. by Aoyumi @ 2004/04/18 */ - /*float derate = (1.0 - de*((float)(j-limit+i) / (float)(n-limit))); - /* elliptical + float derate = (1.0 - de*((float)(j-limit+i) / (float)(n-limit))); + /* elliptical */ if(reM[j]+reA[j]<0){ reM[j] = - (qeM[j] = (fabs(reM[j])+fabs(reA[j]))*derate*derate); }else{ reM[j] = (qeM[j] = (fabs(reM[j])+fabs(reA[j]))*derate*derate); - }*/ - + } +#else /* elliptical */ if(reM[j]+reA[j]<0){ reM[j] = - (qeM[j] = fabs(reM[j])+fabs(reA[j])); }else{ reM[j] = (qeM[j] = fabs(reM[j])+fabs(reA[j])); } - +#endif } reA[j]=qeA[j]=0.f; diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/res0.c --- libvorbis-1.3.2-orig/lib/res0.c Fri Dec 09 19:22:11 2011 +0900 +++ libvorbis-1.3.2/lib/res0.c Fri Dec 09 21:27:00 2011 +0900 @@ -66,7 +66,7 @@ } 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)); @@ -74,7 +74,7 @@ } } -void res0_free_look(vorbis_look_residue *i){ +static void res0_free_look(vorbis_look_residue *i){ int j; if(i){ @@ -171,7 +171,7 @@ } -void res0_pack(vorbis_info_residue *vr,oggpack_buffer *opb){ +static void res0_pack(vorbis_info_residue *vr,oggpack_buffer *opb){ vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; int j,acc=0; oggpack_write(opb,info->begin,24); @@ -201,7 +201,7 @@ } /* 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=_ogg_calloc(1,sizeof(*info)); codec_setup_info *ci=vi->codec_setup; @@ -265,8 +265,8 @@ return(NULL); } -vorbis_look_residue *res0_look(vorbis_dsp_state *vd, - vorbis_info_residue *vr){ +static vorbis_look_residue *res0_look(vorbis_dsp_state *vd, + vorbis_info_residue *vr){ vorbis_info_residue0 *info=(vorbis_info_residue0 *)vr; vorbis_look_residue0 *look=_ogg_calloc(1,sizeof(*look)); codec_setup_info *ci=vd->vi->codec_setup; @@ -714,8 +714,8 @@ return(0); } -int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl, - float **in,int *nonzero,int ch){ +static int res0_inverse(vorbis_block *vb,vorbis_look_residue *vl, + float **in,int *nonzero,int ch){ int i,used=0; for(i=0;ipcmend/2,used=0; /* don't duplicate the code; use a working vector hack for now and @@ -802,8 +803,8 @@ } /* duplicate code here as speed is somewhat more important */ -int res2_inverse(vorbis_block *vb,vorbis_look_residue *vl, - float **in,int *nonzero,int ch){ +static int res2_inverse(vorbis_block *vb,vorbis_look_residue *vl, + float **in,int *nonzero,int ch){ long i,k,l,s; vorbis_look_residue0 *look=(vorbis_look_residue0 *)vl; vorbis_info_residue0 *info=look->info; diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/sharedbook.c --- libvorbis-1.3.2-orig/lib/sharedbook.c Fri Dec 09 19:22:11 2011 +0900 +++ libvorbis-1.3.2/lib/sharedbook.c Fri Dec 09 21:27:00 2011 +0900 @@ -70,7 +70,7 @@ /* 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_malloc((sparsecount?sparsecount:n)*sizeof(*r)); @@ -533,7 +533,7 @@ -3, 1, 0, 4, 8, 7, -1, 3, 2, -3,-4,-5, 4, 3, 2, -1,-2,-3}; -void run_test(static_codebook *b,float *comp){ +static void run_test(static_codebook *b,float *comp){ float *out=_book_unquantize(b,b->entries,NULL); int i; @@ -559,7 +559,7 @@ } } -int main(){ +int main(void){ /* run the nine dequant tests, and compare to the hand-rolled results */ fprintf(stderr,"Dequant test 1... "); run_test(&test1,test1_result); diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/vorbisfile.c --- libvorbis-1.3.2-orig/lib/vorbisfile.c Fri Dec 09 19:22:11 2011 +0900 +++ libvorbis-1.3.2/lib/vorbisfile.c Fri Dec 09 21:27:00 2011 +0900 @@ -29,6 +29,7 @@ #include "os.h" #include "misc.h" +#include "block.h" /* A 'chained bitstream' is a Vorbis bitstream that contains more than one logical bitstream arranged end to end (the only form of Ogg @@ -1823,7 +1824,7 @@ } } -static int host_is_big_endian() { +static int host_is_big_endian(void) { ogg_int32_t pattern = 0xfeedface; /* deadbeef */ unsigned char *bytewise = (unsigned char *)&pattern; if (bytewise[0] == 0xfe) return 1; @@ -2054,14 +2055,12 @@ } } -extern float *vorbis_window(vorbis_dsp_state *v,int W); - static void _ov_splice(float **pcm,float **lappcm, int n1, int n2, int ch1, int ch2, - float *w1, float *w2){ + const float *w1, const float *w2){ int i,j; - float *w=w1; + const float *w=w1; int n=n1; if(n1>n2){ @@ -2169,7 +2168,7 @@ vorbis_info *vi1,*vi2; float **lappcm; float **pcm; - float *w1,*w2; + const float *w1,*w2; int n1,n2,i,ret,hs1,hs2; if(vf1==vf2)return(0); /* degenerate case */ @@ -2223,7 +2222,7 @@ vorbis_info *vi; float **lappcm; float **pcm; - float *w1,*w2; + const float *w1,*w2; int n1,n2,ch1,ch2,hs; int i,ret; @@ -2284,7 +2283,7 @@ vorbis_info *vi; float **lappcm; float **pcm; - float *w1,*w2; + const float *w1,*w2; int n1,n2,ch1,ch2,hs; int i,ret; diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/window.c --- libvorbis-1.3.2-orig/lib/window.c Fri Dec 09 19:22:11 2011 +0900 +++ libvorbis-1.3.2/lib/window.c Fri Dec 09 21:27:00 2011 +0900 @@ -19,6 +19,7 @@ #include #include "os.h" #include "misc.h" +#include "window.h" static const float vwin64[32] = { 0.0009460463F, 0.0085006468F, 0.0235352254F, 0.0458950567F, diff -r b93c02e2f48b ExternalLibs/libvorbis-1.3.2/lib/window.h --- libvorbis-1.3.2-orig/lib/window.h Fri Dec 09 19:22:11 2011 +0900 +++ libvorbis-1.3.2/lib/window.h Fri Dec 09 21:27:00 2011 +0900 @@ -18,7 +18,7 @@ #ifndef _V_WINDOW_ #define _V_WINDOW_ -extern float *_vorbis_window_get(int n); +extern const float *_vorbis_window_get(int n); extern void _vorbis_apply_window(float *d,int *winno,long *blocksizes, int lW,int W,int nW);