media/kiss_fft/kiss_fftr.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 #ifndef KISS_FTR_H
michael@0 2 #define KISS_FTR_H
michael@0 3
michael@0 4 #include "kiss_fft.h"
michael@0 5 #ifdef __cplusplus
michael@0 6 extern "C" {
michael@0 7 #endif
michael@0 8
michael@0 9
michael@0 10 /*
michael@0 11
michael@0 12 Real optimized version can save about 45% cpu time vs. complex fft of a real seq.
michael@0 13
michael@0 14
michael@0 15
michael@0 16 */
michael@0 17
michael@0 18 typedef struct kiss_fftr_state *kiss_fftr_cfg;
michael@0 19
michael@0 20
michael@0 21 kiss_fftr_cfg kiss_fftr_alloc(int nfft,int inverse_fft,void * mem, size_t * lenmem);
michael@0 22 /*
michael@0 23 nfft must be even
michael@0 24
michael@0 25 If you don't care to allocate space, use mem = lenmem = NULL
michael@0 26 */
michael@0 27
michael@0 28
michael@0 29 void kiss_fftr(kiss_fftr_cfg cfg,const kiss_fft_scalar *timedata,kiss_fft_cpx *freqdata);
michael@0 30 /*
michael@0 31 input timedata has nfft scalar points
michael@0 32 output freqdata has nfft/2+1 complex points
michael@0 33 */
michael@0 34
michael@0 35 void kiss_fftri(kiss_fftr_cfg cfg,const kiss_fft_cpx *freqdata,kiss_fft_scalar *timedata);
michael@0 36 /*
michael@0 37 input freqdata has nfft/2+1 complex points
michael@0 38 output timedata has nfft scalar points
michael@0 39 */
michael@0 40
michael@0 41 #define kiss_fftr_free free
michael@0 42
michael@0 43 #ifdef __cplusplus
michael@0 44 }
michael@0 45 #endif
michael@0 46 #endif

mercurial