rubberband: use float for samples instead of double to increase performance

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
Andreas Müller
2016-12-26 23:09:14 +01:00
parent 2cbc156ac1
commit 5b31558942
3 changed files with 36 additions and 2 deletions

View File

@@ -0,0 +1,33 @@
From 305ecda9ccc039e95129a17a46ebdc3a90e2c912 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Mon, 26 Dec 2016 21:09:09 +0100
Subject: [PATCH] replace double->process_t
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
fixes builds for -DPROCESS_SAMPLE_TYPE=float
Upstram-Status: Pending
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
src/StretcherProcess.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/StretcherProcess.cpp b/src/StretcherProcess.cpp
index 36b224a..801029a 100644
--- a/src/StretcherProcess.cpp
+++ b/src/StretcherProcess.cpp
@@ -930,7 +930,7 @@ RubberBandStretcher::Impl::formantShiftChunk(size_t channel)
v_scale(dblbuf, factor, cutoff);
- double *spare = (double *)alloca((hs + 1) * sizeof(double));
+ process_t *spare = (process_t *)alloca((hs + 1) * sizeof(process_t));
cd.fft->forward(dblbuf, envelope, spare);
v_exp(envelope, hs + 1);
--
2.5.5

View File

@@ -13,16 +13,17 @@ DEPENDS += " \
"
# fftwf is neon accelerated -> force SINGLE precision
SINGLEPATCH = "${@bb.utils.contains('TUNE_FEATURES', 'neon', 'file://0001-Optional-replace-FFTW_DOUBLE_ONLY-by-FFTW_SINGLE_ONL.patch', '', d)}"
SINGLEPATCH = "${@bb.utils.contains('TUNE_FEATURES', 'neon', 'file://0002-Optional-replace-FFTW_DOUBLE_ONLY-by-FFTW_SINGLE_ONL.patch', '', d)}"
SRC_URI = " \
http://code.breakfastquay.com/attachments/download/34/${BPN}-${PV}.tar.bz2 \
file://0001-replace-double-process_t.patch \
${SINGLEPATCH} \
"
SRC_URI[md5sum] = "6c2b4e18a714bcc297d0db81a10f9348"
SRC_URI[sha256sum] = "ff0c63b0b5ce41f937a8a3bc560f27918c5fe0b90c6bc1cb70829b86ada82b75"
CPPFLAGS += "-ftree-vectorize"
CPPFLAGS += "-ftree-vectorize -DPROCESS_SAMPLE_TYPE=float"
FILES_${PN} += " \
${datadir}/ladspa \