diff options
author | Max Kellermann <max@duempel.org> | 2011-10-20 01:09:23 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-10-20 02:24:25 +0200 |
commit | 72e80db823c3af56293a4835baef577945603f8f (patch) | |
tree | f553ac964c689c79f00adbd27cfc92fc9b496afe /src/pcm_format.c | |
parent | 7b33c343f860264661c3579a32dea6e875c3266f (diff) | |
download | mpd-72e80db823c3af56293a4835baef577945603f8f.tar.gz mpd-72e80db823c3af56293a4835baef577945603f8f.tar.xz mpd-72e80db823c3af56293a4835baef577945603f8f.zip |
pcm_*: add "restrict" keywords
Allow more compiler optimizations.
Diffstat (limited to 'src/pcm_format.c')
-rw-r--r-- | src/pcm_format.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pcm_format.c b/src/pcm_format.c index 68a756030..fd8db99ad 100644 --- a/src/pcm_format.c +++ b/src/pcm_format.c @@ -137,7 +137,9 @@ pcm_convert_16_to_24(int32_t *out, const int16_t *in, const int16_t *in_end) } static void -pcm_convert_32_to_24(int32_t *out, const int32_t *in, const int32_t *in_end) +pcm_convert_32_to_24(int32_t *restrict out, + const int32_t *restrict in, + const int32_t *restrict in_end) { while (in < in_end) *out++ = *in++ >> 8; @@ -208,7 +210,9 @@ pcm_convert_16_to_32(int32_t *out, const int16_t *in, const int16_t *in_end) } static void -pcm_convert_24_to_32(int32_t *out, const int32_t *in, const int32_t *in_end) +pcm_convert_24_to_32(int32_t *restrict out, + const int32_t *restrict in, + const int32_t *restrict in_end) { while (in < in_end) *out++ = *in++ << 8; |