You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/tests/fft: Fix building with CONFIG_MDCT disabled
Since e6afa61be9
, no components in
libavcodec enable CONFIG_MDCT. This fixes building "make testprogs".
Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
@@ -226,6 +226,7 @@ static inline void fft_init(FFTContext **s, int nbits, int inverse)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if CONFIG_MDCT
|
||||||
static inline void mdct_init(FFTContext **s, int nbits, int inverse, double scale)
|
static inline void mdct_init(FFTContext **s, int nbits, int inverse, double scale)
|
||||||
{
|
{
|
||||||
#if AVFFT
|
#if AVFFT
|
||||||
@@ -252,6 +253,7 @@ static inline void imdct_calc(struct FFTContext *s, FFTSample *output, const FFT
|
|||||||
s->imdct_calc(s, output, input);
|
s->imdct_calc(s, output, input);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline void fft_permute(FFTContext *s, FFTComplex *z)
|
static inline void fft_permute(FFTContext *s, FFTComplex *z)
|
||||||
{
|
{
|
||||||
@@ -592,12 +594,14 @@ int main(int argc, char **argv)
|
|||||||
time_start = av_gettime_relative();
|
time_start = av_gettime_relative();
|
||||||
for (it = 0; it < nb_its; it++) {
|
for (it = 0; it < nb_its; it++) {
|
||||||
switch (transform) {
|
switch (transform) {
|
||||||
|
#if CONFIG_MDCT
|
||||||
case TRANSFORM_MDCT:
|
case TRANSFORM_MDCT:
|
||||||
if (do_inverse)
|
if (do_inverse)
|
||||||
imdct_calc(m, &tab->re, &tab1->re);
|
imdct_calc(m, &tab->re, &tab1->re);
|
||||||
else
|
else
|
||||||
mdct_calc(m, &tab->re, &tab1->re);
|
mdct_calc(m, &tab->re, &tab1->re);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case TRANSFORM_FFT:
|
case TRANSFORM_FFT:
|
||||||
memcpy(tab, tab1, fft_size * sizeof(FFTComplex));
|
memcpy(tab, tab1, fft_size * sizeof(FFTComplex));
|
||||||
fft_calc(s, tab);
|
fft_calc(s, tab);
|
||||||
|
Reference in New Issue
Block a user