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

Peter Ross pross at xvid.org
Sun Feb 18 08:46:17 EET 2024


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 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;

pls apply

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


More information about the ffmpeg-devel mailing list