From: Lynne <dev@lynne.ee> To: Ffmpeg Devel <ffmpeg-devel@ffmpeg.org> Subject: [FFmpeg-devel] [PATCH] lavu/tx: correctly use a default scale parameter for all transform types Date: Sat, 17 Feb 2024 20:53:32 +0100 (CET) Message-ID: <NqscNrG--3-9@lynne.ee> (raw) [-- Attachment #1: Type: text/plain, Size: 190 bytes --] 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. Patch attached. [-- Attachment #2: 0001-lavu-tx-correctly-use-a-default-scale-parameter-for-.patch --] [-- Type: text/x-diff, Size: 1480 bytes --] From 5b58ac6995cd52c3d61d46f5d4eca42a686752b7 Mon Sep 17 00:00:00 2001 From: Lynne <dev@lynne.ee> Date: Sat, 17 Feb 2024 20:50:48 +0100 Subject: [PATCH] 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. --- libavutil/tx.c | 8 +++++--- 1 file 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) -- 2.43.0.381.gb435a96ce8 [-- Attachment #3: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next reply other threads:[~2024-02-17 19:53 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-17 19:53 Lynne [this message] [not found] ` <NqscNrG--3-9@lynne.ee-NqscROf----9> 2024-02-18 15:23 ` Lynne
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=NqscNrG--3-9@lynne.ee \ --to=dev@lynne.ee \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git