Go to the documentation of this file.
19 #ifndef AVUTIL_TX_PRIV_H
20 #define AVUTIL_TX_PRIV_H
30 #define TX_NAME(x) x ## _float
31 #define SCALE_TYPE float
34 #elif defined(TX_DOUBLE)
35 #define TX_NAME(x) x ## _double
36 #define SCALE_TYPE double
39 #elif defined(TX_INT32)
40 #define TX_NAME(x) x ## _int32
41 #define SCALE_TYPE float
48 #if defined(TX_FLOAT) || defined(TX_DOUBLE)
50 #define CMUL(dre, dim, are, aim, bre, bim) do { \
51 (dre) = (are) * (bre) - (aim) * (bim); \
52 (dim) = (are) * (bim) + (aim) * (bre); \
55 #define SMUL(dre, dim, are, aim, bre, bim) do { \
56 (dre) = (are) * (bre) - (aim) * (bim); \
57 (dim) = (are) * (bim) - (aim) * (bre); \
60 #define RESCALE(x) (x)
62 #define FOLD(a, b) ((a) + (b))
64 #elif defined(TX_INT32)
67 #define CMUL(dre, dim, are, aim, bre, bim) do { \
69 (accu) = (int64_t)(bre) * (are); \
70 (accu) -= (int64_t)(bim) * (aim); \
71 (dre) = (int)(((accu) + 0x40000000) >> 31); \
72 (accu) = (int64_t)(bim) * (are); \
73 (accu) += (int64_t)(bre) * (aim); \
74 (dim) = (int)(((accu) + 0x40000000) >> 31); \
77 #define SMUL(dre, dim, are, aim, bre, bim) do { \
79 (accu) = (int64_t)(bre) * (are); \
80 (accu) -= (int64_t)(bim) * (aim); \
81 (dre) = (int)(((accu) + 0x40000000) >> 31); \
82 (accu) = (int64_t)(bim) * (are); \
83 (accu) -= (int64_t)(bre) * (aim); \
84 (dim) = (int)(((accu) + 0x40000000) >> 31); \
87 #define RESCALE(x) (lrintf((x) * 2147483648.0))
89 #define FOLD(x, y) ((int)((x) + (unsigned)(y) + 32) >> 6)
93 #define BF(x, y, a, b) do { \
98 #define CMUL3(c, a, b) \
99 CMUL((c).re, (c).im, (a).re, (a).im, (b).re, (b).im)
101 #define COSTABLE(size) \
102 DECLARE_ALIGNED(32, FFTSample, TX_NAME(ff_cos_##size))[size/2]
141 const void *scale, uint64_t
flags);
144 const void *scale, uint64_t
flags);
147 const void *scale, uint64_t
flags);
int ff_tx_type_is_mdct(enum AVTXType type)
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
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
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_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_init_mdct_fft_int32(AVTXContext *s, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
#define i(width, name, range_min, range_max)
int ff_tx_gen_compound_mapping(AVTXContext *s)
int ff_tx_gen_ptwo_revtab(AVTXContext *s)
static uint32_t inverse(uint32_t v)
find multiplicative inverse modulo 2 ^ 32
#define flags(name, subs,...)
static int split_radix_permutation(int i, int n, int inverse)