mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-06-05 03:01:53 -04:00
audioconvert: ensure alignment
Allocate a little bit more data to ensure alignment and overread of the dither data. Ensure sse2 can load aligned data in all cases.
This commit is contained in:
parent
b41d52cfd1
commit
00998ffd7e
4 changed files with 19 additions and 18 deletions
|
|
@ -49,7 +49,7 @@ void dither_f32_c(struct dither *dt, void * SPA_RESTRICT dst[],
|
|||
uint32_t i, n, m, chunk;
|
||||
const float **s = (const float**)src;
|
||||
float **d = (float**)dst;
|
||||
float *t = dt->dither;
|
||||
float *dither = dt->dither;
|
||||
|
||||
chunk = SPA_MIN(n_samples, dt->dither_size);
|
||||
update_dither_c(dt, chunk);
|
||||
|
|
@ -62,7 +62,7 @@ void dither_f32_c(struct dither *dt, void * SPA_RESTRICT dst[],
|
|||
const float *si = &s[i][n];
|
||||
|
||||
for (m = 0; m < chunk; m++)
|
||||
di[m] = si[m] + t[m];
|
||||
di[m] = si[m] + dither[m];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue