support for openmp of soxr
|Reported by:||ponpon||Owned by:|
|Cc:||Michael Niedermayer||Blocked By:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
i requests support for openmp of soxr.
i did some tests. from it, it doesn't seem that ffmpeg suppors openmp of soxr, though ffmpeg might support the multithreads of soxr with override.
i exchanged e-mail with the developerof soxr, Rob. he said that
soxr threading is based on the number of audio channels being processed, i.e. one thread can be assigned to each channel. However, soxr threading is not enabled in ffmpeg. With the latest soxr in git, it is possible to override runtime parameters set by the application, e.g. export SOXR_NUM_THREADS=0 # 0 means automatic: under control of OpenMP export OMP_NUM_THREADS=2 # For stereo audio. However, this does not work well with ffmpeg. I guess that the reason for this is that ffmpeg tries to minimise latency by using small buffer sizes, and small buffer sizes give a large overhead when multi-threading. I don't know if ffmpeg buffer size (for audio) can be adjusted. Using an application with larger buffers (e.g. the soxr examples, with input + output buffer sizes = 15k samples/channel), I find that 2 openmp threads (on 2 cores, not 2 x86 hyperthreads on one core) will reduce processing time for stereo audio to about 66% (x86), 54% (ARM).
and, moreover, that
SIMD improvements for both single and double precision are coming soon!
i believe that combination ffmpeg and soxr with the openmp and new simd is useful for many users.