diff options
author | Lynne <dev@lynne.ee> | 2024-02-17 20:50:48 +0100 |
---|---|---|
committer | Lynne <dev@lynne.ee> | 2024-02-18 16:21:03 +0100 |
commit | c7ceff690f16f04f3fc2e48ac73f48cebc445587 (patch) | |
tree | 84cdeb7a1b3375f956e546a80bc910fedac196eb /libavutil/tx.c | |
parent | b5911654c4300c6a15d81feddd43a6709494addb (diff) | |
download | ffmpeg-c7ceff690f16f04f3fc2e48ac73f48cebc445587.tar.gz |
lavu/tx: correctly use a default scale parameter for all transform types
This fixes the previous commit and adds more cases (DCT-I and DST-I).
I am holding off on defining a scale parameter for FFTs as I'd like
to use a complex value for them.
Diffstat (limited to 'libavutil/tx.c')
-rw-r--r-- | libavutil/tx.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavutil/tx.c b/libavutil/tx.c index cc360cff31..f991618b4b 100644 --- a/libavutil/tx.c +++ b/libavutil/tx.c @@ -914,10 +914,12 @@ av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, if (!(flags & AV_TX_INPLACE)) flags |= FF_TX_OUT_OF_PLACE; - if (!scale && ((type == AV_TX_FLOAT_MDCT) || (type == AV_TX_INT32_MDCT) || (type == AV_TX_FLOAT_RDFT) || (AV_TX_INT32_RDFT))) - scale = &default_scale_f; - else if (!scale && ((type == AV_TX_DOUBLE_MDCT) || (type == AV_TX_DOUBLE_RDFT))) + if (!scale && ((type == AV_TX_DOUBLE_MDCT) || (type == AV_TX_DOUBLE_DCT) || + (type == AV_TX_DOUBLE_DCT_I) || (type == AV_TX_DOUBLE_DST_I) || + (type == AV_TX_DOUBLE_RDFT))) scale = &default_scale_d; + else if (!scale && !TYPE_IS(FFT, type)) + scale = &default_scale_f; ret = ff_tx_init_subtx(&tmp, type, flags, NULL, len, inv, scale); if (ret < 0) |