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_template.c | |
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_template.c')
-rw-r--r-- | libavutil/tx_template.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libavutil/tx_template.c b/libavutil/tx_template.c index 228209521b..c157719d73 100644 --- a/libavutil/tx_template.c +++ b/libavutil/tx_template.c @@ -518,6 +518,7 @@ static const FFTXCodelet TX_NAME(ff_tx_fft##n##_ns_def) = { \ .flags = AV_TX_INPLACE | FF_TX_OUT_OF_PLACE | \ AV_TX_UNALIGNED | FF_TX_PRESHUFFLE, \ .factors[0] = n, \ + .nb_factors = 1, \ .min_len = n, \ .max_len = n, \ .init = TX_NAME(ff_tx_fft_factor_init), \ @@ -534,6 +535,7 @@ static const FFTXCodelet TX_NAME(ff_tx_fft##n##_fwd_def) = { \ .flags = AV_TX_INPLACE | FF_TX_OUT_OF_PLACE | \ AV_TX_UNALIGNED | FF_TX_FORWARD_ONLY, \ .factors[0] = n, \ + .nb_factors = 1, \ .min_len = n, \ .max_len = n, \ .init = TX_NAME(ff_tx_fft_factor_init), \ @@ -614,6 +616,7 @@ static const FFTXCodelet TX_NAME(ff_tx_fft##n##_ns_def) = { \ .flags = FF_TX_OUT_OF_PLACE | AV_TX_INPLACE | \ AV_TX_UNALIGNED | FF_TX_PRESHUFFLE, \ .factors[0] = 2, \ + .nb_factors = 1, \ .min_len = n, \ .max_len = n, \ .init = TX_NAME(ff_tx_fft_sr_codelet_init), \ @@ -814,6 +817,7 @@ static const FFTXCodelet TX_NAME(ff_tx_fft_def) = { .type = TX_TYPE(FFT), .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE, .factors[0] = TX_FACTOR_ANY, + .nb_factors = 1, .min_len = 2, .max_len = TX_LEN_UNLIMITED, .init = TX_NAME(ff_tx_fft_init), @@ -827,6 +831,7 @@ static const FFTXCodelet TX_NAME(ff_tx_fft_inplace_small_def) = { .type = TX_TYPE(FFT), .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE | AV_TX_INPLACE, .factors[0] = TX_FACTOR_ANY, + .nb_factors = 1, .min_len = 2, .max_len = 65536, .init = TX_NAME(ff_tx_fft_inplace_small_init), @@ -840,6 +845,7 @@ static const FFTXCodelet TX_NAME(ff_tx_fft_inplace_def) = { .type = TX_TYPE(FFT), .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE | AV_TX_INPLACE, .factors[0] = TX_FACTOR_ANY, + .nb_factors = 1, .min_len = 2, .max_len = TX_LEN_UNLIMITED, .init = TX_NAME(ff_tx_fft_init), @@ -927,6 +933,7 @@ static const FFTXCodelet TX_NAME(ff_tx_fft_naive_small_def) = { .type = TX_TYPE(FFT), .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE, .factors[0] = TX_FACTOR_ANY, + .nb_factors = 1, .min_len = 2, .max_len = 1024, .init = TX_NAME(ff_tx_fft_init_naive_small), @@ -940,6 +947,7 @@ static const FFTXCodelet TX_NAME(ff_tx_fft_naive_def) = { .type = TX_TYPE(FFT), .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE, .factors[0] = TX_FACTOR_ANY, + .nb_factors = 1, .min_len = 2, .max_len = TX_LEN_UNLIMITED, .init = NULL, @@ -1007,6 +1015,7 @@ static const FFTXCodelet TX_NAME(ff_tx_fft_pfa_##N##xM_def) = { \ .type = TX_TYPE(FFT), \ .flags = AV_TX_UNALIGNED | AV_TX_INPLACE | FF_TX_OUT_OF_PLACE, \ .factors = { N, TX_FACTOR_ANY }, \ + .nb_factors = 2, \ .min_len = N*2, \ .max_len = TX_LEN_UNLIMITED, \ .init = TX_NAME(ff_tx_fft_pfa_init), \ @@ -1089,6 +1098,7 @@ static const FFTXCodelet TX_NAME(ff_tx_mdct_naive_fwd_def) = { .type = TX_TYPE(MDCT), .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE | FF_TX_FORWARD_ONLY, .factors = { 2, TX_FACTOR_ANY }, /* MDCTs need an even length */ + .nb_factors = 2, .min_len = 2, .max_len = TX_LEN_UNLIMITED, .init = TX_NAME(ff_tx_mdct_naive_init), @@ -1102,6 +1112,7 @@ static const FFTXCodelet TX_NAME(ff_tx_mdct_naive_inv_def) = { .type = TX_TYPE(MDCT), .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE | FF_TX_INVERSE_ONLY, .factors = { 2, TX_FACTOR_ANY }, + .nb_factors = 2, .min_len = 2, .max_len = TX_LEN_UNLIMITED, .init = TX_NAME(ff_tx_mdct_naive_init), @@ -1234,6 +1245,7 @@ static const FFTXCodelet TX_NAME(ff_tx_mdct_fwd_def) = { .type = TX_TYPE(MDCT), .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE | FF_TX_FORWARD_ONLY, .factors = { 2, TX_FACTOR_ANY }, + .nb_factors = 2, .min_len = 2, .max_len = TX_LEN_UNLIMITED, .init = TX_NAME(ff_tx_mdct_init), @@ -1247,6 +1259,7 @@ static const FFTXCodelet TX_NAME(ff_tx_mdct_inv_def) = { .type = TX_TYPE(MDCT), .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE | FF_TX_INVERSE_ONLY, .factors = { 2, TX_FACTOR_ANY }, + .nb_factors = 2, .min_len = 2, .max_len = TX_LEN_UNLIMITED, .init = TX_NAME(ff_tx_mdct_init), @@ -1299,6 +1312,7 @@ static const FFTXCodelet TX_NAME(ff_tx_mdct_inv_full_def) = { .flags = AV_TX_UNALIGNED | AV_TX_INPLACE | FF_TX_OUT_OF_PLACE | AV_TX_FULL_IMDCT, .factors = { 2, TX_FACTOR_ANY }, + .nb_factors = 2, .min_len = 2, .max_len = TX_LEN_UNLIMITED, .init = TX_NAME(ff_tx_mdct_inv_full_init), @@ -1396,6 +1410,7 @@ static const FFTXCodelet TX_NAME(ff_tx_mdct_pfa_##N##xM_inv_def) = { \ .type = TX_TYPE(MDCT), \ .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE | FF_TX_INVERSE_ONLY, \ .factors = { N, TX_FACTOR_ANY }, \ + .nb_factors = 2, \ .min_len = N*2, \ .max_len = TX_LEN_UNLIMITED, \ .init = TX_NAME(ff_tx_mdct_pfa_init), \ @@ -1463,6 +1478,7 @@ static const FFTXCodelet TX_NAME(ff_tx_mdct_pfa_##N##xM_fwd_def) = { \ .type = TX_TYPE(MDCT), \ .flags = AV_TX_UNALIGNED | FF_TX_OUT_OF_PLACE | FF_TX_FORWARD_ONLY, \ .factors = { N, TX_FACTOR_ANY }, \ + .nb_factors = 2, \ .min_len = N*2, \ .max_len = TX_LEN_UNLIMITED, \ .init = TX_NAME(ff_tx_mdct_pfa_init), \ @@ -1583,6 +1599,7 @@ static const FFTXCodelet TX_NAME(ff_tx_rdft_r2c_def) = { .flags = AV_TX_UNALIGNED | AV_TX_INPLACE | FF_TX_OUT_OF_PLACE | FF_TX_FORWARD_ONLY, .factors = { 2, TX_FACTOR_ANY }, + .nb_factors = 2, .min_len = 2, .max_len = TX_LEN_UNLIMITED, .init = TX_NAME(ff_tx_rdft_init), @@ -1597,6 +1614,7 @@ static const FFTXCodelet TX_NAME(ff_tx_rdft_c2r_def) = { .flags = AV_TX_UNALIGNED | AV_TX_INPLACE | FF_TX_OUT_OF_PLACE | FF_TX_INVERSE_ONLY, .factors = { 2, TX_FACTOR_ANY }, + .nb_factors = 2, .min_len = 2, .max_len = TX_LEN_UNLIMITED, .init = TX_NAME(ff_tx_rdft_init), |