Mercurial > libavcodec.hg
comparison mdct.c @ 794:670009af4fc2 libavcodec
avoid name clash
author | bellard |
---|---|
date | Tue, 29 Oct 2002 22:26:01 +0000 |
parents | 6f5e87957bcb |
children | a521e0ecc5a8 |
comparison
equal
deleted
inserted
replaced
793:8e9faf69110f | 794:670009af4fc2 |
---|---|
19 #include "dsputil.h" | 19 #include "dsputil.h" |
20 | 20 |
21 /* | 21 /* |
22 * init MDCT or IMDCT computation | 22 * init MDCT or IMDCT computation |
23 */ | 23 */ |
24 int mdct_init(MDCTContext *s, int nbits, int inverse) | 24 int ff_mdct_init(MDCTContext *s, int nbits, int inverse) |
25 { | 25 { |
26 int n, n4, i; | 26 int n, n4, i; |
27 float alpha; | 27 float alpha; |
28 | 28 |
29 memset(s, 0, sizeof(*s)); | 29 memset(s, 0, sizeof(*s)); |
67 * Compute inverse MDCT of size N = 2^nbits | 67 * Compute inverse MDCT of size N = 2^nbits |
68 * @param output N samples | 68 * @param output N samples |
69 * @param input N/2 samples | 69 * @param input N/2 samples |
70 * @param tmp N/2 samples | 70 * @param tmp N/2 samples |
71 */ | 71 */ |
72 void imdct_calc(MDCTContext *s, FFTSample *output, | 72 void ff_imdct_calc(MDCTContext *s, FFTSample *output, |
73 const FFTSample *input, FFTSample *tmp) | 73 const FFTSample *input, FFTSample *tmp) |
74 { | 74 { |
75 int k, n8, n4, n2, n, j; | 75 int k, n8, n4, n2, n, j; |
76 const uint16_t *revtab = s->fft.revtab; | 76 const uint16_t *revtab = s->fft.revtab; |
77 const FFTSample *tcos = s->tcos; | 77 const FFTSample *tcos = s->tcos; |
78 const FFTSample *tsin = s->tsin; | 78 const FFTSample *tsin = s->tsin; |
119 * Compute MDCT of size N = 2^nbits | 119 * Compute MDCT of size N = 2^nbits |
120 * @param input N samples | 120 * @param input N samples |
121 * @param out N/2 samples | 121 * @param out N/2 samples |
122 * @param tmp temporary storage of N/2 samples | 122 * @param tmp temporary storage of N/2 samples |
123 */ | 123 */ |
124 void mdct_calc(MDCTContext *s, FFTSample *out, | 124 void ff_mdct_calc(MDCTContext *s, FFTSample *out, |
125 const FFTSample *input, FFTSample *tmp) | 125 const FFTSample *input, FFTSample *tmp) |
126 { | 126 { |
127 int i, j, n, n8, n4, n2, n3; | 127 int i, j, n, n8, n4, n2, n3; |
128 FFTSample re, im, re1, im1; | 128 FFTSample re, im, re1, im1; |
129 const uint16_t *revtab = s->fft.revtab; | 129 const uint16_t *revtab = s->fft.revtab; |
130 const FFTSample *tcos = s->tcos; | 130 const FFTSample *tcos = s->tcos; |
160 out[2*i] = im1; | 160 out[2*i] = im1; |
161 out[n2-1-2*i] = re1; | 161 out[n2-1-2*i] = re1; |
162 } | 162 } |
163 } | 163 } |
164 | 164 |
165 void mdct_end(MDCTContext *s) | 165 void ff_mdct_end(MDCTContext *s) |
166 { | 166 { |
167 av_freep(&s->tcos); | 167 av_freep(&s->tcos); |
168 av_freep(&s->tsin); | 168 av_freep(&s->tsin); |
169 fft_end(&s->fft); | 169 fft_end(&s->fft); |
170 } | 170 } |