mirror of https://github.com/FFmpeg/FFmpeg.git
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.release/7.1
parent
d527d23872
commit
d86b6767ce
1 changed files with 17 additions and 23 deletions
Loading…
Reference in new issue