Introducing Cricket FFT

We are pleased to introduce Cricket FFT, a Fast Fourier Transform library designed specifically for iOS and Android native development. It is optimized for ARM devices, using NEON instructions when available, and can also be easily built for Windows and OS X.

Cricket FFT is free, open source, and distributed under the permissive zlib license, and can be downloaded here.

This entry was posted in Cricket Audio, News (latest appears on front page), Releases. Bookmark the permalink.

2 Responses to Introducing Cricket FFT

  1. Koki Sugawara says:

    I’m facing a problem when trying to run ckfft-1.3 on an Android device.
    The following code works fine on Linux, but on Android all the output data is 0.0.

    I’ll appreciate your comments.
    Thanks in advance.

    Koki Sugawara (Mr)


    int main(){
    int N = 1024;
    CkFftComplex *input;
    CkFftComplex *output;
    CkFftContext *context;
    int i;

    input = malloc(N*sizeof(CkFftComplex));
    output = malloc(N*sizeof(CkFftComplex));
    for(i=0; i<N; i++){ /* input data assignment */
    input[i].real = someDataReal;
    input[i].imag = someDataImag;

    context = CkFftInit(N, kCkFftDirection_Forward, NULL, NULL);

    CkFftComplexForward(context, N, input, output);

    for(i=0; i<N; i++){
    somePrintFunc("%f %fi\n", output[i].real, output[i].imag);
    /* On Linux this code works fine,
    * but on Android I see only "0.0 0.0i" outputs. */
    return 0;

  2. Koki Sugawara says:

    Hi again,

    I revised my compile setting, and now Cricket FFT runs on my target device nicely!

    The problem was my twisted compile settings. The target device supports ARM_NEON instruction sets, but in I set
    TARGET_ARCH_ABI := armeabi
    (not armeabi-v7a) because I wanted to test its performance without NEON instruction sets. With this setting fft_neon.cpp is compiled without using NEON instruction sets, though I don’t really know what the compiler does on the corresponding code.

    When the binary is executed, context.cpp checks the CPU features. Since my target device supports NEON, context->neon is set to “true”. With this status CkFftComplexForward() delegates FFT operations to fft_neon() function, which might have not compiled correctly with my original setting.

    After I modified my setting to
    TARGET_ARCH_ABI := armeabi-v7a
    ckfft produces correct results. It seems I can not test its performance without NEON instruction sets with this same device without hacking the code.

    Thank you if somebody has spent some time for my problem.

Leave a Reply

Your email address will not be published. Required fields are marked *