Menu

SIMD compilation options

Alex Wang
2017-02-15
2017-02-15
  • Alex Wang

    Alex Wang - 2017-02-15

    Hello robs,

    I'm a bit confused about how to choose between the various options dealing with SIMD/FFT. I honestly have little experience with stuff involving the things libsoxr deals with, so my apologies in advance for my misunderstandings.

    I read through the other topic here dealing with a simlar issue FFT for double precision on ARM with NEON, and while it does help, I'm not entirely sure I understand everything there.

    From what I understand from the CMakeLists.txt in the root directory, libav or PFFFT can be used for SIMD, and will only be used if WITH_SIMD is enabled. In the thread linked above, you state that PFFFT would yield the fastest HQ conversion, but lines 25-34 in the CMakeLists.txt in the src/ directory makes it appear that the functions provided by libav would be preferred if the user enables both libav and PFFFT for some reason. It also seems like you provide a fallback SIMD implementation in case both libav and PFFFT are disabled. Is this understanding right? Are there any guidelines for choosing between the two libraries, or when both libraries should be disabled?

    If it helps, I'm building on x86_64.

    Thank you for your help,

    Alex

     
  • robs

    robs - 2017-02-16

    Hello Alex, apologies for the confusion!

    PFFFT is the best library from a performance perspective; it does however come with a BSD licence, whereas libav FFT has a LGPL licence (the same as the rest of libsoxr). So if having a pure LGPL solution is important, then you should choose AVFFT.

    IIRC, there was some issue with PFFFT and ARM (i.e. a soxr build bug that stopped it working properly) that meant AVFFT was the only SIMD option for ARM (but this issue should be fixed now).

    I don't think that there is much good reason for disabling both libraries, but if you do then there is still the option to use SIMD in some of the ancillary code, but the speed-ups that this would give are very small compared to using a SIMD FFT as well.

    BTW, the latest version in the repository has more SIMD code (in areas other than FFT) than the current released version, so should be the fastest available.

    HTH, Rob

     
  • Alex Wang

    Alex Wang - 2017-03-17

    Alright, that definitely clears things up. Thanks for the help!

    -Alex

     

Log in to post a comment.