]> git.sesse.net Git - ffmpeg/commit
lavu/tx: invert permutation lookups
authorLynne <dev@lynne.ee>
Sat, 27 Feb 2021 03:11:04 +0000 (04:11 +0100)
committerLynne <dev@lynne.ee>
Sat, 27 Feb 2021 03:21:05 +0000 (04:21 +0100)
commit8e94b7cff03539bcb4c360d2550a031a5378df03
treed22c567906393c503244f1d43caa4d9c500528fe
parent9ddaf0c9f06fab9194161425a32615c4cfc2ec20
lavu/tx: invert permutation lookups

out[lut[i]] = in[i] lookups were 4.04 times(!) slower than
out[i] = in[lut[i]] lookups for an out-of-place FFT of length 4096.

The permutes remain unchanged for anything but out-of-place monolithic
FFT, as those benefit quite a lot from the current order (it means
there's only 1 lookup necessary to add to an offset, rather than
a full gather).

The code was based around non-power-of-two FFTs, so this wasn't
benchmarked early on.
libavutil/tx.c
libavutil/tx_priv.h
libavutil/tx_template.c