FFmpeg
fft-internal.h
Go to the documentation of this file.
1 /*
2  * This file is part of FFmpeg.
3  *
4  * FFmpeg is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * FFmpeg is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with FFmpeg; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 
19 #ifndef AVCODEC_FFT_INTERNAL_H
20 #define AVCODEC_FFT_INTERNAL_H
21 
22 #include "libavutil/mathematics.h"
23 #include "fft.h"
24 
25 #if FFT_FLOAT
26 
27 #define FIX15(v) (v)
28 #define sqrthalf (float)M_SQRT1_2
29 
30 #define BF(x, y, a, b) do { \
31  x = a - b; \
32  y = a + b; \
33  } while (0)
34 
35 #define CMUL(dre, dim, are, aim, bre, bim) do { \
36  (dre) = (are) * (bre) - (aim) * (bim); \
37  (dim) = (are) * (bim) + (aim) * (bre); \
38  } while (0)
39 
40 #else /* FFT_FLOAT */
41 
42 #define CMUL(dre, dim, are, aim, bre, bim) do { \
43  int64_t accu; \
44  (accu) = (int64_t)(bre) * (are); \
45  (accu) -= (int64_t)(bim) * (aim); \
46  (dre) = (int)(((accu) + 0x40000000) >> 31); \
47  (accu) = (int64_t)(bre) * (aim); \
48  (accu) += (int64_t)(bim) * (are); \
49  (dim) = (int)(((accu) + 0x40000000) >> 31); \
50  } while (0)
51 
52 #endif /* FFT_FLOAT */
53 
54 #define ff_imdct_calc_c FFT_NAME(ff_imdct_calc_c)
55 #define ff_imdct_half_c FFT_NAME(ff_imdct_half_c)
56 #define ff_mdct_calc_c FFT_NAME(ff_mdct_calc_c)
57 
61 
62 #endif /* AVCODEC_FFT_INTERNAL_H */
output
filter_frame For filters that do not use the this method is called when a frame is pushed to the filter s input It can be called at any time except in a reentrant way If the input frame is enough to produce output
Definition: filter_design.txt:225
mathematics.h
ff_mdct_calc_c
#define ff_mdct_calc_c
Definition: fft-internal.h:56
s
#define s(width, name)
Definition: cbs_vp9.c:198
FFTSample
float FFTSample
Definition: avfft.h:39
input
and forward the test the status of outputs and forward it to the corresponding return FFERROR_NOT_READY If the filters stores internally one or a few frame for some input
Definition: filter_design.txt:172
FFTContext
Definition: fft.h:76
ff_imdct_half_c
#define ff_imdct_half_c
Definition: fft-internal.h:55
ff_imdct_calc_c
#define ff_imdct_calc_c
Definition: fft-internal.h:54
fft.h