diff options
author | Lynne <dev@lynne.ee> | 2022-10-01 12:21:28 +0200 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2022-11-24 15:58:33 +0100 |
commit | 6ddd10c3e2d63d1ad1ea1034b0e3862107a27063 (patch) | |
tree | 9136f37ee4edffca309e6813728019351225d6eb /libavutil/tx_priv.h | |
parent | dd77e61182865e396195a19b1e6ec697717cef56 (diff) | |
download | ffmpeg-6ddd10c3e2d63d1ad1ea1034b0e3862107a27063.tar.gz |
lavu/tx: allow codelets to specify a minimum number of matching factors
Diffstat (limited to 'libavutil/tx_priv.h')
-rw-r--r-- | libavutil/tx_priv.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libavutil/tx_priv.h b/libavutil/tx_priv.h index d9e38ba19b..80d045f6af 100644 --- a/libavutil/tx_priv.h +++ b/libavutil/tx_priv.h @@ -71,7 +71,8 @@ typedef void TXComplex; .function = TX_FN_NAME(fn, suffix), \ .type = TX_TYPE(tx_type), \ .flags = FF_TX_ALIGNED | FF_TX_OUT_OF_PLACE | cd_flags, \ - .factors = { f1, f2 }, \ + .factors = { (f1), (f2) }, \ + .nb_factors = !!(f1) + !!(f2), \ .min_len = len_min, \ .max_len = len_max, \ .init = init_fn, \ @@ -163,6 +164,9 @@ typedef struct FFTXCodeletOptions { invert the lookup direction for the map generated */ } FFTXCodeletOptions; +/* Maximum number of factors a codelet may have. Arbitrary. */ +#define TX_MAX_FACTORS 16 + /* Maximum amount of subtransform functions, subtransforms and factors. Arbitrary. */ #define TX_MAX_SUB 4 @@ -175,13 +179,16 @@ typedef struct FFTXCodelet { uint64_t flags; /* A combination of AVTXFlags and codelet * flags that describe its properties. */ - int factors[TX_MAX_SUB]; /* Length factors */ + int factors[TX_MAX_FACTORS]; /* Length factors. MUST be coprime. */ #define TX_FACTOR_ANY -1 /* When used alone, signals that the codelet * supports all factors. Otherwise, if other * factors are present, it signals that whatever * remains will be supported, as long as the * other factors are a component of the length */ + int nb_factors; /* Minimum number of factors that have to + * be a modulo of the length. Must not be 0. */ + int min_len; /* Minimum length of transform, must be >= 1 */ int max_len; /* Maximum length of transform */ #define TX_LEN_UNLIMITED -1 /* Special length value to permit all lengths */ |