mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-11 13:30:07 -05:00
audioconvert: add simple and faster resampler
Add a sinc based resampler that, unlike speex, avoids memcpy and works directly on the source data. It also allows for ssse3 optimizations and aligned loads. It will later switch to table interpolation when doing variable rate.
This commit is contained in:
parent
f29d14fcc8
commit
9c8913437b
10 changed files with 720 additions and 7 deletions
|
|
@ -171,7 +171,8 @@ struct spa_param_info {
|
|||
#define SPA_ROUND_DOWN_N(num,align) ((num) & ~((align) - 1))
|
||||
#define SPA_ROUND_UP_N(num,align) SPA_ROUND_DOWN_N((num) + ((align) - 1),align)
|
||||
|
||||
#define SPA_IS_ALIGNED(p,align) (((intptr_t)(p) & ((align)-1)) == 0)
|
||||
#define SPA_PTR_ALIGNMENT(p,align) ((intptr_t)(p) & ((align)-1))
|
||||
#define SPA_IS_ALIGNED(p,align) (SPA_PTR_ALIGNMENT(p,align) == 0)
|
||||
#define SPA_PTR_ALIGN(p,align,type) (type*)SPA_ROUND_UP_N((intptr_t)(p), (intptr_t)(align))
|
||||
|
||||
#ifndef SPA_LIKELY
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue