aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-06-22 14:45:59 +0200
committerMax Kellermann <max@duempel.org>2015-06-22 16:32:06 +0200
commit69476b4f2193546cb72c3def9679136a182adfe3 (patch)
tree56010536b8b36071c87583cb5e5817b02c9bdab1 /src/decoder
parentfdf92c5f3b05c874ba6ae74bb0e1477f1b3ca77f (diff)
downloadmpd-69476b4f2193546cb72c3def9679136a182adfe3.tar.gz
mpd-69476b4f2193546cb72c3def9679136a182adfe3.tar.xz
mpd-69476b4f2193546cb72c3def9679136a182adfe3.zip
pcm/Interleave: add optimization for 32 bit samples
Move code from the "vorbis" decoder.
Diffstat (limited to 'src/decoder')
-rw-r--r--src/decoder/plugins/VorbisDecoderPlugin.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/decoder/plugins/VorbisDecoderPlugin.cxx b/src/decoder/plugins/VorbisDecoderPlugin.cxx
index c6377b9ab..d7069a2f4 100644
--- a/src/decoder/plugins/VorbisDecoderPlugin.cxx
+++ b/src/decoder/plugins/VorbisDecoderPlugin.cxx
@@ -24,6 +24,7 @@
#include "../DecoderAPI.hxx"
#include "input/InputStream.hxx"
#include "OggCodec.hxx"
+#include "pcm/Interleave.hxx"
#include "util/Error.hxx"
#include "util/Macros.hxx"
#include "CheckAudioFormat.hxx"
@@ -181,13 +182,8 @@ static void
vorbis_interleave(float *dest, const float *const*src,
unsigned nframes, unsigned channels)
{
- for (const float *const*src_end = src + channels;
- src != src_end; ++src, ++dest) {
- float *gcc_restrict d = dest;
- for (const float *gcc_restrict s = *src, *s_end = s + nframes;
- s != s_end; ++s, d += channels)
- *d = *s;
- }
+ PcmInterleaveFloat(dest, ConstBuffer<const float *>(src, channels),
+ nframes);
}
#endif