Go to the documentation of this file.
36 # define RSCALE(x, y) ((x) + (y))
38 # define RSCALE(x, y) ((int)((x) + (unsigned)(y) + 32) >> 6)
50 memset(
s, 0,
sizeof(*
s));
64 switch (
s->mdct_permutation) {
66 s->tsin =
s->tcos + n4;
70 s->tsin =
s->tcos + 1;
77 theta = 1.0 / 8.0 + (
scale < 0 ? n4 : 0);
103 int k, n8, n4, n2, n, j;
104 const uint16_t *revtab =
s->revtab;
110 n = 1 <<
s->mdct_bits;
117 in2 =
input + n2 - 1;
118 for(k = 0; k < n4; k++) {
120 CMUL(z[j].
re, z[j].
im, *in2, *in1, tcos[k], tsin[k]);
127 for(k = 0; k < n8; k++) {
129 CMUL(r0, i1, z[n8-k-1].
im, z[n8-k-1].
re, tsin[n8-k-1], tcos[n8-k-1]);
130 CMUL(r1, i0, z[n8+k ].
im, z[n8+k ].
re, tsin[n8+k ], tcos[n8+k ]);
146 int n = 1 <<
s->mdct_bits;
152 for(k = 0; k < n4; k++) {
165 int i, j, n, n8, n4, n2, n3;
167 const uint16_t *revtab =
s->revtab;
172 n = 1 <<
s->mdct_bits;
196 CMUL(i1, r0, x[n8-
i-1].
re, x[n8-
i-1].
im, -tsin[n8-
i-1], -tcos[n8-
i-1]);
197 CMUL(i0, r1, x[n8+
i ].
re, x[n8+
i ].
im, -tsin[n8+
i ], -tcos[n8+
i ]);
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
static av_always_inline float scale(float x, float s)
av_cold void ff_mdct_end(FFTContext *s)
av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale)
init MDCT or IMDCT computation.
void ff_mdct_calc_c(FFTContext *s, FFTSample *out, const FFTSample *input)
Compute MDCT of size N = 2^nbits.
static __device__ float fabs(float a)
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
#define i(width, name, range_min, range_max)
@ FF_MDCT_PERM_INTERLEAVE
#define av_malloc_array(a, b)
void ff_imdct_calc_c(FFTContext *s, FFTSample *output, const FFTSample *input)
Compute inverse MDCT of size N = 2^nbits.
void ff_imdct_half_c(FFTContext *s, FFTSample *output, const FFTSample *input)
Compute the middle half of the inverse MDCT of size N = 2^nbits, thus excluding the parts that can be...
static int inverse(AudioFWTDNContext *s, double **in, int *in_length, double *out, int out_length, int ch, uint64_t sn)
static const int16_t alpha[]
#define CMUL(dre, dim, are, aim, bre, bim)