diff options
author | Rémi Denis-Courmont <remi@remlab.net> | 2024-07-25 22:40:25 +0300 |
---|---|---|
committer | Rémi Denis-Courmont <remi@remlab.net> | 2024-08-01 19:29:40 +0300 |
commit | d86b6767ce98fda133e2b8f7f954a497eab2e528 (patch) | |
tree | b8345aa2de35659c2395449e039764a4266965a0 /tools | |
parent | d527d238728bf9b75d55960c4279134d0fba493b (diff) | |
download | ffmpeg-d86b6767ce98fda133e2b8f7f954a497eab2e528.tar.gz |
lavc/audiodsp: properly unroll vector_clipf
Given that source and destination can alias, the compiler was forced to
perform each read-modify-write sequentially. We cannot use the `restrict`
qualifier to avoid this here because the AC-3 encoder uses the function
in-place. Instead this commit provides an explicit guarantee to the
compiler that batches of 8 elements will not overlap, so that it can
interleave calculations.
In practice contemporary optimising compilers are able to unroll and keep
the temporary array in FPU registers (without spilling).
On SiFive-U74, this speeds the same signs branch by 4x, and the
opposite signs branch 1.5x.
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions