Menu

lowest CPU footprint

Philippe
2019-06-23
2019-06-27
  • Philippe

    Philippe - 2019-06-23

    Hi - First, thanks for soxr, I've used it in many projects.

    I'm now using it on the esp32 processor. It cross-compile and works fine, but the esp32 is not the most power system (although it has a 32 bits FPU) and it does a lot of other things in my application.

    I'm trying to find the lowest CPU footprint (not memory, but cycles) and I'm not sure I've got everything right. I'm using16 bits, LQ which I think means only float (not double are used) but when I'm changing rolloff and phase to minimum or linear, it does not change anything. It seems that most of the CPU is spent in cftmdl and vpoly0. Does that sound right? Is there anything else I should do?

    I was also wondering if there is an IIR version of filters that I assume would take less CPU than the FIR.

    BTW, I've compiled-out vr32 as I don't need variable rate and it creates a huge static variable that saturate the .bss segment.

    Thanks for the advices

     
  • robs

    robs - 2019-06-24

    Hello Philippe,

    I suggest the following:
    1. Disable all the WITH_xxx build options, except for WITH_CR32.
    2. Use SOXR_NO_DITHER in soxr_io_spec.
    3. Try using the MQ recipe for soxr_quality_spec (which can in fact be more efficient than LQ in some circumstances).
    3. Try overriding passband_end to 0.8 and stopband_begin to 1.2 in soxr_quality_spec (or even .75, 1.25).

    That's as much as I can think of at the moment (though I did experiment with IIR filters at one time but it didn't yield any improvement)—hope it may help.

     
  • Philippe

    Philippe - 2019-06-27

    Hi Robs - Thanks very much for taking the time to answer. I've tried these parameters but it's still a bit too much CPU when I want to resample from 96 to 44.1, so I'add a very basic fixed point interpolation and/or simple filter for higher rates when I cannot use soxr

    Thanks again

     

Log in to post a comment.