diff mbox series

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

Message ID GV1SPRMB0063292B34D189C397C657DD8F532@GV1SPRMB0063.EURP250.PROD.OUTLOOK.COM
State New
Headers show
Series [FFmpeg-devel] avutil/tx: Use proper default scale for double MDCT/RDFT | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 17, 2024, 7:44 p.m. UTC
Fixes a bug and a Clang warning:
"use of logical '||' with constant operand [-Wconstant-logical-operand]"

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

Comments

Peter Ross Feb. 18, 2024, 6:46 a.m. UTC | #1
On Sat, Feb 17, 2024 at 08:44:47PM +0100, Andreas Rheinhardt wrote:
> Fixes a bug and a Clang warning:
> "use of logical '||' with constant operand [-Wconstant-logical-operand]"
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@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;

pls apply

-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
diff mbox series

Patch

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;