From: Monty Date: Sun, 2 Mar 2003 21:32:00 +0000 (+0000) Subject: Some cleanup of ov_crosslap function X-Git-Tag: v1.3.3~610 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e4e06baa576a1a276f32f773f48e0cd9fd7c6adf;p=platform%2Fupstream%2Flibvorbis.git Some cleanup of ov_crosslap function svn path=/trunk/vorbis/; revision=4393 --- diff --git a/lib/block.c b/lib/block.c index dfa7453..e239e2d 100644 --- a/lib/block.c +++ b/lib/block.c @@ -11,7 +11,7 @@ ******************************************************************** function: PCM data vector blocking, windowing and dis/reassembly - last mod: $Id: block.c,v 1.69 2003/03/02 11:45:17 xiphmont Exp $ + last mod: $Id: block.c,v 1.70 2003/03/02 21:32:00 xiphmont Exp $ Handle windowing, overlap-add, etc of the PCM vectors. This is made more amusing by Vorbis' current two allowed block sizes. @@ -938,19 +938,8 @@ int vorbis_synthesis_lapout(vorbis_dsp_state *v,float ***pcm){ } -void vorbis_splice(float *d,float *s, - vorbis_dsp_state *v,int W){ - - vorbis_info *vi=v->vi; - codec_setup_info *ci=vi->codec_setup; +float *vorbis_window(vorbis_dsp_state *v,int W){ private_state *b=v->backend_state; - int n=ci->blocksizes[W]/2; - - float *wd=b->window[W]; - float *ws=b->window[W]+n; - int i; - - for(i=0;iwindow[W]; } diff --git a/lib/vorbisfile.c b/lib/vorbisfile.c index 808a850..846c4d4 100644 --- a/lib/vorbisfile.c +++ b/lib/vorbisfile.c @@ -11,7 +11,7 @@ ******************************************************************** function: stdio-based convenience library for opening/seeking/decoding - last mod: $Id: vorbisfile.c,v 1.65 2003/03/02 11:45:17 xiphmont Exp $ + last mod: $Id: vorbisfile.c,v 1.66 2003/03/02 21:32:00 xiphmont Exp $ ********************************************************************/ @@ -1623,8 +1623,24 @@ long ov_read_float(OggVorbis_File *vf,float ***pcm_channels,int length, } } -extern void vorbis_splice(float *d,float *s, - vorbis_dsp_state *v,int W); +extern float *vorbis_window(vorbis_dsp_state *v,int W); + +static void _vorbis_splice(float *d,float *s, + vorbis_dsp_state *v,int W){ + + vorbis_info *vi=v->vi; + int n=vorbis_info_blocksize(vi,0)/2; + float *w=vorbis_window(v,W); + int i; + + for(i=0;ichannels;j++){ float *s=lappcm[j]; float *d=pcm[j]; - vorbis_splice(d,s,winstate,0); + _vorbis_splice(d,s,winstate,0); } /* done */