[FFmpeg-devel] [PATCH] avutil/tx: Use proper default scale for double MDCT/RDFT

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sat Feb 17 21:44:47 EET 2024


Fixes a bug and a Clang warning:
"use of logical '||' with constant operand [-Wconstant-logical-operand]"

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavutil/tx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavutil/tx.c b/libavutil/tx.c
index cc360cff31..f7aa409d72 100644
--- a/libavutil/tx.c
+++ b/libavutil/tx.c
@@ -914,7 +914,8 @@ 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)))
+    if (!scale && ((type == AV_TX_FLOAT_MDCT) || (type == AV_TX_INT32_MDCT) ||
+                   (type == AV_TX_FLOAT_RDFT) || (type == AV_TX_INT32_RDFT)))
         scale = &default_scale_f;
     else if (!scale && ((type == AV_TX_DOUBLE_MDCT) || (type == AV_TX_DOUBLE_RDFT)))
         scale = &default_scale_d;
-- 
2.34.1



More information about the ffmpeg-devel mailing list