X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=lib%2Fsmallft.c;h=4ffabab4bb6191ef5eb9ee757e77409a915472af;hb=4ba8efed8797016a85e57bc3cc7975bb31d65db5;hp=60609a2fae054acffa23ed588a1f7d625b64bb43;hpb=7bfceda6317dcb2cb749ad84efee310a9a792911;p=platform%2Fupstream%2Flibvorbis.git diff --git a/lib/smallft.c b/lib/smallft.c index 60609a2..4ffabab 100644 --- a/lib/smallft.c +++ b/lib/smallft.c @@ -5,15 +5,14 @@ * 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-2001 * - * by the XIPHOPHORUS Company http://www.xiph.org/ * - + * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2009 * + * by the Xiph.Org Foundation https://xiph.org/ * + * * ******************************************************************** function: *unnormalized* fft transform - last mod: $Id: smallft.c,v 1.14 2001/02/26 03:50:43 xiphmont Exp $ -********************************************************************/ + ********************************************************************/ /* FFT implementation from OggSquish, minus cosine transforms, * minus all but radix 2/4 case. In Vorbis we only need this @@ -32,6 +31,7 @@ #include #include #include "smallft.h" +#include "os.h" #include "misc.h" static void drfti1(int n, float *wa, int *ifac){ @@ -93,10 +93,10 @@ static void drfti1(int n, float *wa, int *ifac){ argld=(float)ld*argh; fi=0.f; for (ii=2;ii>1; if(idon=n; - l->trigcache=_ogg_calloc(3*n,sizeof(float)); - l->splitcache=_ogg_calloc(32,sizeof(int)); + l->trigcache=_ogg_calloc(3*n,sizeof(*l->trigcache)); + l->splitcache=_ogg_calloc(32,sizeof(*l->splitcache)); fdrffti(n, l->trigcache, l->splitcache); } @@ -1249,6 +1249,6 @@ void drft_clear(drft_lookup *l){ if(l){ if(l->trigcache)_ogg_free(l->trigcache); if(l->splitcache)_ogg_free(l->splitcache); - memset(l,0,sizeof(drft_lookup)); + memset(l,0,sizeof(*l)); } }