mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-07 13:30:09 -05:00
channelmix: fix copy multiple channels
This commit is contained in:
parent
f06c1723a8
commit
822b033fb1
1 changed files with 4 additions and 3 deletions
|
|
@ -39,11 +39,12 @@ channelmix_copy_sse(void *data, int n_dst, void *dst[n_dst],
|
||||||
memcpy(d[i], s[i], n_bytes);
|
memcpy(d[i], s[i], n_bytes);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
unrolled = n_samples / 4;
|
|
||||||
remain = n_samples & 3;
|
|
||||||
|
|
||||||
for (i = 0; i < n_dst; i++) {
|
for (i = 0; i < n_dst; i++) {
|
||||||
float *di = d[i], *si = s[i];
|
float *di = d[i], *si = s[i];
|
||||||
|
|
||||||
|
unrolled = n_samples / 4;
|
||||||
|
remain = n_samples & 3;
|
||||||
|
|
||||||
for(n = 0; unrolled--; n += 4)
|
for(n = 0; unrolled--; n += 4)
|
||||||
_mm_storeu_ps(&di[n], _mm_mul_ps(_mm_loadu_ps(&si[n]), vol));
|
_mm_storeu_ps(&di[n], _mm_mul_ps(_mm_loadu_ps(&si[n]), vol));
|
||||||
for(; remain--; n++)
|
for(; remain--; n++)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue