Page 1 of 1

Combining bit reverse and time reverse of a sequence in asm

Posted: Thu Jul 21, 2022 9:30 am
by aclassifier
I am using dsp_fft_bit_reverse before dsp_fft_forward.

In order to do cross-correlation as [1], as one alternative, I would need to also time reverse one of the sequences before doing the dsp_fft_forward. I guess this is faster than the alternative, to do the complex conjugate after the fft.

I am using lib_dsp(6.2.1) and X2, which seems to do dsp_fft_bit_reverse in asm in dsp_fft_bit_reverse.S.

Is there anybody out there who'd like to rewrite or even would have that code doing a built-in time reverse? This is for a hobby project. I don't know xCore asm at all.

Øyvind

[1] How do I implement cross-correlation to prove two audio files are similar?

Re: Combining bit reverse and time reverse of a sequence in asm

Posted: Thu Jul 21, 2022 3:23 pm
by andrew
How long do you expect the blocks to be?
would this be a running similarity? i.e. every N ms you up date the similarity of the most recent M ms of signal

Re: Combining bit reverse and time reverse of a sequence in asm

Posted: Fri Jul 22, 2022 3:56 pm
by aclassifier
It's basically as in [1]:

each of my series covers 64 ms (16 kHz, 1024 samples per batch, 15.625 Hz/bin to max 4 kHz). My project is at [2]

Yes, it would be a running similarity, where I would compare against several alarm patters. However, the FFTs of the alarm patterns would be the references that I would need to make once, that's where I need to time reverse that alarm sound first, before the FFT etc.

But I thought, what if that could be done with the bit reversing? For the XC version of the bit reverse it's rather easy, but the ASM is worse for me. An then, maybe somebody else might thought this interesting, too?

[1] Detecting a known alarm signal in an audio stream
[2] My Beep-BRRR notes