Hi guys,
I am currently using Ne10 library to perform signal processing task on Android device for better performance. I want to do a xcorr on 2 equal size array (say N) and want the output to be 2*N -1 in size. Kind of like in matlab y = xcorr(x1,x2) where x1 and x2 are equal size and y is twice the size of x1 - 1.
I have the same code using IPP like
ippsCrossCorr_32f(x1,N,x2,N,y1,2*N-1,-(N-1));
Using Ne10, I cant seem to have a work around to get y as an output of 2*N - 1 unless I zero pad both x1 and x2 to get the same output as the IPP function call.
What I am doing in Ne10 is as such:
coeff = zero pad x1 in front
input = zero pad x2 at the back
ne10_fir_float_neon(state,input,coeff,output,2*N-1);
The output from both IPP function and Ne10 function are matching but I want a solution that does away with the zero padding. Is there any function call interpretation that I made mistake on?
Thanks,
Kelvin
Hi Zhang Yang,
Thanks for the reply. I tried the first method zero padding with memcpy and the outcome was disastrous. I am more inclined to use the second method or use fft and ifft to replace the filter function. If I were to start on the second method, may I know how should I start? Do I need to change the ASM code?
Hi Kelvin
If you use fft and ifft to replace the filter function. you need to check the following files
https://github.com/projectNe10/Ne10/blob/master/modules/dsp/NE10_fft_float32.c
https://github.com/projectNe10/Ne10/blob/master/modules/dsp/NE10_fft_float32.neon.s
https://github.com/projectNe10/Ne10/blob/master/modules/dsp/NE10_fft_float32.neon.c
If you want to modify the code of FIR, you need to check
https://github.com/projectNe10/Ne10/blob/master/modules/dsp/NE10_fir.neon.s
Line 69: ne10_fir_float_neon
If you are not familar with NEON, you can take the doc "neon programmer’s guide" as reference.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0018a/index.html
Regards
Yang