[FFmpeg-devel] [PATCH 6/6] wmaprodec: convert to lavu/tx

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Sun Sep 25 15:38:53 EEST 2022


Lynne:
> -    for (int i = 0; i < WMAPRO_BLOCK_SIZES; i++) {
> -        ret = ff_mdct_init(&s->mdct_ctx[i], WMAPRO_BLOCK_MIN_BITS + 1 + i, 1,
> -                           1.0 / (1 << (WMAPRO_BLOCK_MIN_BITS + i - 1))
> -                           / (1ll << (s->bits_per_sample - 1)));
> -        if (ret < 0)
> -            return ret;
> +    for (i = 0; i < WMAPRO_BLOCK_SIZES; i++) {

Unnecessary change.

> +        const float scale = 1.0 / (1 << (WMAPRO_BLOCK_MIN_BITS + i - 1))
> +                                / (1ll << (s->bits_per_sample - 1));
> +        int err = av_tx_init(&s->tx[i], &s->tx_fn[i], AV_TX_FLOAT_MDCT, 1,
> +                             1 << (WMAPRO_BLOCK_MIN_BITS + i), &scale, 0);
> +        if (err < 0)
> +            return err;



More information about the ffmpeg-devel mailing list