Go to the documentation of this file.
37 for (
int x = 1; x < m; x++)
38 if (((n * x) % m) == 1)
47 int *in_map, *out_map;
50 const int inv =
s->inv;
52 const int m_inv =
mulinv(m, n);
53 const int n_inv =
mulinv(n, m);
60 out_map =
s->pfatab + n*m;
63 for (
int j = 0; j < m; j++) {
64 for (
int i = 0;
i < n;
i++) {
66 in_map[j*n +
i] = ((
i*m + j*n) %
len) << mdct;
67 out_map[(
i*m*m_inv + j*n*n_inv) %
len] =
i*m + j;
73 for (
int i = 0;
i < m;
i++) {
74 int *in = &in_map[
i*n + 1];
75 for (
int j = 0; j < ((n - 1) >> 1); j++)
76 FFSWAP(
int, in[j], in[n - j - 2]);
82 for (
int k = 0; k < m; k++) {
84 memcpy(
tmp, &in_map[k*15], 15*
sizeof(*
tmp));
85 for (
int i = 0;
i < 5;
i++) {
86 for (
int j = 0; j < 3; j++)
87 in_map[k*15 +
i*3 + j] =
tmp[(
i*3 + j*5) % 15];
108 const int m =
s->m, inv =
s->inv;
112 if (!(
s->revtab_c =
av_malloc(m*
sizeof(*
s->revtab_c))))
116 for (
int i = 0;
i < m;
i++) {
119 s->revtab[
i] =
s->revtab_c[
i] = k;
121 s->revtab[
i] =
s->revtab_c[k] =
i;
129 int nb_inplace_idx = 0;
131 if (!(
s->inplace_idx =
av_malloc(
s->m*
sizeof(*
s->inplace_idx))))
136 int dst = revtab[
src];
146 for (
int j = 0; j < nb_inplace_idx; j++) {
147 if (dst ==
s->inplace_idx[j]) {
153 }
while (dst !=
src && !found);
156 s->inplace_idx[nb_inplace_idx++] =
src;
159 s->inplace_idx[nb_inplace_idx++] = 0;
165 int is_dual,
int dual_high,
int len,
166 int basis,
int dual_stride)
173 is_dual = is_dual && dual_stride;
174 dual_high = is_dual & dual_high;
178 odd = &
even[
len + (is_dual && !dual_high)*
len + dual_high*
len];
180 for (
int i = 0;
i <
len;
i++) {
195 0, 0,
len >> 0,
basis, dual_stride);
197 1, 0,
len >> 1,
basis, dual_stride);
199 1, 1,
len >> 1,
basis, dual_stride);
203 int basis,
int dual_stride)
208 av_assert0(!dual_stride || !(dual_stride & (dual_stride - 1)));
@ AV_TX_DOUBLE_MDCT
Same as AV_TX_FLOAT_MDCT with data and scale type of double.
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
static int16_t basis[64][64]
@ AV_TX_DOUBLE_FFT
Same as AV_TX_FLOAT_FFT with a data type of AVComplexDouble.
av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
Initialize a transform context with the given configuration (i)MDCTs with an odd length are currently...
void ff_tx_gen_split_radix_parity_revtab(int *revtab, int len, int inv, int basis, int dual_stride)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
static av_always_inline float scale(float x, float s)
void ff_tx_init_float_x86(AVTXContext *s, av_tx_fn *tx)
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
@ AV_TX_FLOAT_MDCT
Standard MDCT with sample data type of float and a scale type of float.
int ff_tx_init_mdct_fft_double(AVTXContext *s, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
int ff_tx_gen_compound_mapping(AVTXContext *s)
@ AV_TX_INT32_MDCT
Same as AV_TX_FLOAT_MDCT with data type of int32_t and scale type of float.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
@ AV_TX_FLOAT_FFT
Standard complex to complex FFT with sample data type AVComplexFloat.
int ff_tx_init_mdct_fft_float(AVTXContext *s, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
int ff_tx_gen_ptwo_inplace_revtab_idx(AVTXContext *s, int *revtab)
@ AV_TX_INT32_FFT
Same as AV_TX_FLOAT_FFT with a data type of AVComplexInt32.
int ff_tx_init_mdct_fft_int32(AVTXContext *s, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf offset
int ff_tx_type_is_mdct(enum AVTXType type)
av_cold void av_tx_uninit(AVTXContext **ctx)
Frees a context and sets ctx to NULL, does nothing when ctx == NULL.
#define i(width, name, range_min, range_max)
int ff_tx_gen_ptwo_revtab(AVTXContext *s, int invert_lookup)
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
#define FFSWAP(type, a, b)
static int split_radix_permutation(int i, int m, int inverse)
static int inverse(AudioFWTDNContext *s, double **in, int *in_length, double *out, int out_length, int ch, uint64_t sn)
#define flags(name, subs,...)
static av_always_inline int mulinv(int n, int m)
static void parity_revtab_generator(int *revtab, int n, int inv, int offset, int is_dual, int dual_high, int len, int basis, int dual_stride)