diff options
| author | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-08-14 15:48:10 +0200 | 
|---|---|---|
| committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2009-08-20 11:31:03 +0200 | 
| commit | 591baacba5913de32e6556a71a8300d25addbec4 (patch) | |
| tree | bd60c723f45c4f84ab35bd84f7fd1186969d8e73 /src | |
| parent | f24c24c14b6614cf19ee916886c8b02384bac435 (diff) | |
volume: remove ref functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/pulsecore/svolume_mmx.c | 223 | ||||
| -rw-r--r-- | src/pulsecore/svolume_sse.c | 223 | 
2 files changed, 0 insertions, 446 deletions
diff --git a/src/pulsecore/svolume_mmx.c b/src/pulsecore/svolume_mmx.c index d4fcedf5..ad539278 100644 --- a/src/pulsecore/svolume_mmx.c +++ b/src/pulsecore/svolume_mmx.c @@ -35,71 +35,6 @@  #include "sample-util.h"  #include "endianmacros.h" -#if 0 -static void -pa_volume_u8_mmx (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  for (channel = 0; length; length--) { -    int32_t t, hi, lo; - -    hi = volumes[channel] >> 16; -    lo = volumes[channel] & 0xFFFF; - -    t = (int32_t) *samples - 0x80; -    t = ((t * lo) >> 16) + (t * hi); -    t = PA_CLAMP_UNLIKELY(t, -0x80, 0x7F); -    *samples++ = (uint8_t) (t + 0x80); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_alaw_mmx (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  for (channel = 0; length; length--) { -    int32_t t, hi, lo; - -    hi = volumes[channel] >> 16; -    lo = volumes[channel] & 0xFFFF; - -    t = (int32_t) st_alaw2linear16(*samples); -    t = ((t * lo) >> 16) + (t * hi); -    t = PA_CLAMP_UNLIKELY(t, -0x8000, 0x7FFF); -    *samples++ = (uint8_t) st_13linear2alaw((int16_t) t >> 3); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_ulaw_mmx (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  for (channel = 0; length; length--) { -    int32_t t, hi, lo; - -    hi = volumes[channel] >> 16; -    lo = volumes[channel] & 0xFFFF; - -    t = (int32_t) st_ulaw2linear16(*samples); -    t = ((t * lo) >> 16) + (t * hi); -    t = PA_CLAMP_UNLIKELY(t, -0x8000, 0x7FFF); -    *samples++ = (uint8_t) st_14linear2ulaw((int16_t) t >> 2); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} -#endif -  /* in s: 2 int16_t samples   * in v: 2 int32_t volumes, fixed point 16:16   * out s: contains scaled and clamped int16_t samples. @@ -304,164 +239,6 @@ pa_volume_s16re_mmx (int16_t *samples, int32_t *volumes, unsigned channels, unsi    );  } -#if 0 -static void -pa_volume_float32ne_mmx (float *samples, float *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (float); - -  for (channel = 0; length; length--) { -    *samples++ *= volumes[channel]; - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_float32re_mmx (float *samples, float *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (float); - -  for (channel = 0; length; length--) { -    float t; - -    t = PA_FLOAT32_SWAP(*samples); -    t *= volumes[channel]; -    *samples++ = PA_FLOAT32_SWAP(t); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s32ne_mmx (int32_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (int32_t); - -  for (channel = 0; length; length--) { -    int64_t t; - -    t = (int64_t)(*samples); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    *samples++ = (int32_t) t; - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s32re_mmx (int32_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (int32_t); - -  for (channel = 0; length; length--) { -    int64_t t; - -    t = (int64_t) PA_INT32_SWAP(*samples); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    *samples++ = PA_INT32_SWAP((int32_t) t); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s24ne_mmx (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; -  uint8_t *e; - -  e = samples + length; - -  for (channel = 0; samples < e; samples += 3) { -    int64_t t; - -    t = (int64_t)((int32_t) (PA_READ24NE(samples) << 8)); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    PA_WRITE24NE(samples, ((uint32_t) (int32_t) t) >> 8); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s24re_mmx (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; -  uint8_t *e; - -  e = samples + length; - -  for (channel = 0; samples < e; samples += 3) { -    int64_t t; - -    t = (int64_t)((int32_t) (PA_READ24RE(samples) << 8)); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    PA_WRITE24RE(samples, ((uint32_t) (int32_t) t) >> 8); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s24_32ne_mmx (uint32_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (uint32_t); - -  for (channel = 0; length; length--) { -    int64_t t; - -    t = (int64_t) ((int32_t) (*samples << 8)); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    *samples++ = ((uint32_t) ((int32_t) t)) >> 8; - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s24_32re_mmx (uint32_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (uint32_t); - -  for (channel = 0; length; length--) { -    int64_t t; - -    t = (int64_t) ((int32_t) (PA_UINT32_SWAP(*samples) << 8)); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    *samples++ = PA_UINT32_SWAP(((uint32_t) ((int32_t) t)) >> 8); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} -#endif -  #undef RUN_TEST  #ifdef RUN_TEST diff --git a/src/pulsecore/svolume_sse.c b/src/pulsecore/svolume_sse.c index d95fa9d9..b0a6e0dd 100644 --- a/src/pulsecore/svolume_sse.c +++ b/src/pulsecore/svolume_sse.c @@ -35,71 +35,6 @@  #include "sample-util.h"  #include "endianmacros.h" -#if 0 -static void -pa_volume_u8_sse (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  for (channel = 0; length; length--) { -    int32_t t, hi, lo; - -    hi = volumes[channel] >> 16; -    lo = volumes[channel] & 0xFFFF; - -    t = (int32_t) *samples - 0x80; -    t = ((t * lo) >> 16) + (t * hi); -    t = PA_CLAMP_UNLIKELY(t, -0x80, 0x7F); -    *samples++ = (uint8_t) (t + 0x80); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_alaw_sse (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  for (channel = 0; length; length--) { -    int32_t t, hi, lo; - -    hi = volumes[channel] >> 16; -    lo = volumes[channel] & 0xFFFF; - -    t = (int32_t) st_alaw2linear16(*samples); -    t = ((t * lo) >> 16) + (t * hi); -    t = PA_CLAMP_UNLIKELY(t, -0x8000, 0x7FFF); -    *samples++ = (uint8_t) st_13linear2alaw((int16_t) t >> 3); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_ulaw_sse (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  for (channel = 0; length; length--) { -    int32_t t, hi, lo; - -    hi = volumes[channel] >> 16; -    lo = volumes[channel] & 0xFFFF; - -    t = (int32_t) st_ulaw2linear16(*samples); -    t = ((t * lo) >> 16) + (t * hi); -    t = PA_CLAMP_UNLIKELY(t, -0x8000, 0x7FFF); -    *samples++ = (uint8_t) st_14linear2ulaw((int16_t) t >> 2); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} -#endif -  #define VOLUME_32x16(s,v)                  /* .. |   vh  |   vl  | */                   \        " pxor %%xmm4, %%xmm4          \n\t" /* .. |    0  |    0  | */                   \        " punpcklwd %%xmm4, "#s"       \n\t" /* .. |    0  |   p0  | */                   \ @@ -303,164 +238,6 @@ pa_volume_s16re_sse (int16_t *samples, int32_t *volumes, unsigned channels, unsi    );  } -#if 0 -static void -pa_volume_float32ne_sse (float *samples, float *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (float); - -  for (channel = 0; length; length--) { -    *samples++ *= volumes[channel]; - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_float32re_sse (float *samples, float *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (float); - -  for (channel = 0; length; length--) { -    float t; - -    t = PA_FLOAT32_SWAP(*samples); -    t *= volumes[channel]; -    *samples++ = PA_FLOAT32_SWAP(t); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s32ne_sse (int32_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (int32_t); - -  for (channel = 0; length; length--) { -    int64_t t; - -    t = (int64_t)(*samples); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    *samples++ = (int32_t) t; - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s32re_sse (int32_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (int32_t); - -  for (channel = 0; length; length--) { -    int64_t t; - -    t = (int64_t) PA_INT32_SWAP(*samples); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    *samples++ = PA_INT32_SWAP((int32_t) t); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s24ne_sse (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; -  uint8_t *e; - -  e = samples + length; - -  for (channel = 0; samples < e; samples += 3) { -    int64_t t; - -    t = (int64_t)((int32_t) (PA_READ24NE(samples) << 8)); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    PA_WRITE24NE(samples, ((uint32_t) (int32_t) t) >> 8); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s24re_sse (uint8_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; -  uint8_t *e; - -  e = samples + length; - -  for (channel = 0; samples < e; samples += 3) { -    int64_t t; - -    t = (int64_t)((int32_t) (PA_READ24RE(samples) << 8)); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    PA_WRITE24RE(samples, ((uint32_t) (int32_t) t) >> 8); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s24_32ne_sse (uint32_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (uint32_t); - -  for (channel = 0; length; length--) { -    int64_t t; - -    t = (int64_t) ((int32_t) (*samples << 8)); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    *samples++ = ((uint32_t) ((int32_t) t)) >> 8; - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} - -static void -pa_volume_s24_32re_sse (uint32_t *samples, int32_t *volumes, unsigned channels, unsigned length) -{ -  unsigned channel; - -  length /= sizeof (uint32_t); - -  for (channel = 0; length; length--) { -    int64_t t; - -    t = (int64_t) ((int32_t) (PA_UINT32_SWAP(*samples) << 8)); -    t = (t * volumes[channel]) >> 16; -    t = PA_CLAMP_UNLIKELY(t, -0x80000000LL, 0x7FFFFFFFLL); -    *samples++ = PA_UINT32_SWAP(((uint32_t) ((int32_t) t)) >> 8); - -    if (PA_UNLIKELY(++channel >= channels)) -      channel = 0; -  } -} -#endif -  #undef RUN_TEST  #ifdef RUN_TEST  | 
