From f47eba7d7d4c6a1d9501e027b63bbab04bb7d417 Mon Sep 17 00:00:00 2001 From: Takamichi Horikawa Date: Thu, 30 Mar 2017 23:31:39 +0000 Subject: add NEON optimization --- libopna/opnassg-sinc-c.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 libopna/opnassg-sinc-c.c (limited to 'libopna/opnassg-sinc-c.c') diff --git a/libopna/opnassg-sinc-c.c b/libopna/opnassg-sinc-c.c new file mode 100644 index 0000000..bf93039 --- /dev/null +++ b/libopna/opnassg-sinc-c.c @@ -0,0 +1,13 @@ +#include "libopna/opnassg.h" + +void opna_ssg_sinc_calc_c(unsigned resampler_index, const int16_t *inbuf, int32_t *outbuf) { + for (int c = 0; c < 3; c++) { + int32_t chsample = 0; + for (int j = 0; j < OPNA_SSG_SINCTABLELEN; j++) { + unsigned sincindex = j; + if (!(resampler_index&1)) sincindex += OPNA_SSG_SINCTABLELEN; + chsample += inbuf[(((resampler_index)>>1)+j)*3+c] * opna_ssg_sinctable[sincindex]; + } + outbuf[c] = chsample; + } +} -- cgit v1.2.3