mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
parent
80572a6fbc
commit
20b336b1d7
1 changed files with 11 additions and 6 deletions
|
|
@ -532,12 +532,17 @@ conv_f32d_to_s32_sse2(struct convert *conv, void * SPA_RESTRICT dst[], const voi
|
|||
int32_t *d = dst[0];
|
||||
uint32_t i = 0, n_channels = conv->n_channels;
|
||||
|
||||
for(; i + 3 < n_channels; i += 4)
|
||||
conv_f32d_to_s32_4s_sse2(conv, &d[i], &src[i], n_channels, n_samples);
|
||||
for(; i + 1 < n_channels; i += 2)
|
||||
conv_f32d_to_s32_2s_sse2(conv, &d[i], &src[i], n_channels, n_samples);
|
||||
for(; i < n_channels; i++)
|
||||
conv_f32d_to_s32_1s_sse2(conv, &d[i], &src[i], n_channels, n_samples);
|
||||
if ((n_channels & 0x3) == 0) {
|
||||
for(; i + 3 < n_channels; i += 4)
|
||||
conv_f32d_to_s32_4s_sse2(conv, &d[i], &src[i], n_channels, n_samples);
|
||||
}
|
||||
else if ((n_channels & 0x1) == 0) {
|
||||
for(; i + 1 < n_channels; i += 2)
|
||||
conv_f32d_to_s32_2s_sse2(conv, &d[i], &src[i], n_channels, n_samples);
|
||||
} else {
|
||||
for(; i < n_channels; i++)
|
||||
conv_f32d_to_s32_1s_sse2(conv, &d[i], &src[i], n_channels, n_samples);
|
||||
}
|
||||
}
|
||||
|
||||
/* 32 bit xorshift PRNG, see https://en.wikipedia.org/wiki/Xorshift */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue