mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-05-25 21:38:32 -04:00
channelmix: Convert matrices to float arrays
Convert matrix_orig and matrix to float arrays and use variable size 2d arrays to access the elements of the matrices. This removes the need for storing pointers to matrix rows.
This commit is contained in:
parent
7cfcb46fbf
commit
a7994882b9
6 changed files with 161 additions and 134 deletions
|
|
@ -55,9 +55,10 @@ static inline void vol_avx(float *d, const float *s, float vol, uint32_t n_sampl
|
|||
void channelmix_copy_avx(struct channelmix *mix, void * SPA_RESTRICT dst[],
|
||||
const void * SPA_RESTRICT src[], uint32_t n_samples)
|
||||
{
|
||||
CHANNELMIX_DEF_MATRIX(matrix, mix, matrix);
|
||||
uint32_t i, n_dst = mix->dst_chan;
|
||||
float **d = (float **)dst;
|
||||
const float **s = (const float **)src;
|
||||
for (i = 0; i < n_dst; i++)
|
||||
vol_avx(d[i], s[i], mix->matrix[i][i], n_samples);
|
||||
vol_avx(d[i], s[i], matrix[i][i], n_samples);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue