diff options
author | wm4 <wm4@nowhere> | 2012-12-21 18:13:16 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-12-28 13:43:55 +0100 |
commit | 97ed31fd8ed7241dade2e579488146e8fa3473f7 (patch) | |
tree | 2e2739caccdce9beaf29f85546e116d671961133 /audio/reorder_ch.h | |
parent | b32f2ef0d344e224a24ed72bf7abf394675ea58f (diff) | |
download | mpv-97ed31fd8ed7241dade2e579488146e8fa3473f7.tar.bz2 mpv-97ed31fd8ed7241dade2e579488146e8fa3473f7.tar.xz |
audio: make de-planarization faster
Uses the same trick as the planarization code to turn per-sample memcpy
calls into mov instructions. Makes decoding a ~25min 48000Hz 2ch floatle
audio file faster from 3.8s to 2.7s.
Diffstat (limited to 'audio/reorder_ch.h')
-rw-r--r-- | audio/reorder_ch.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/audio/reorder_ch.h b/audio/reorder_ch.h index 66354403da..07daa35a08 100644 --- a/audio/reorder_ch.h +++ b/audio/reorder_ch.h @@ -23,6 +23,8 @@ #ifndef MPLAYER_REORDER_CH_H #define MPLAYER_REORDER_CH_H +#include <inttypes.h> + // L - Left // R - Right // C - Center @@ -132,6 +134,8 @@ void reorder_channel_nch(void *buf, /// Utility function for planar audio conversions void reorder_to_planar(void *restrict out, const void *restrict in, - size_t size, size_t nchan, size_t nmemb); + size_t size, size_t nchan, size_t nmemb); +void reorder_to_packed(uint8_t *out, uint8_t **in, + size_t size, size_t nchan, size_t nmemb); #endif /* MPLAYER_REORDER_CH_H */ |