channelmix: add simple upmix method

Add a property to select the upmix method. PSD is enabled by default
but a new simple upmixing algorithm is available that duplicates
channels and avoids lowpass filter on the FC and disables widening.

Fixes #861
This commit is contained in:
Wim Taymans 2022-03-14 15:33:07 +01:00
parent cec8898740
commit bc5b486cb9
8 changed files with 98 additions and 1 deletions

View file

@ -210,7 +210,8 @@ static int make_matrix(struct channelmix *mix)
unassigned = src_mask & ~dst_mask;
keep = dst_mask & ~src_mask;
if (!SPA_FLAG_IS_SET(mix->options, CHANNELMIX_OPTION_UPMIX))
if (!SPA_FLAG_IS_SET(mix->options, CHANNELMIX_OPTION_UPMIX) ||
mix->upmix == CHANNELMIX_UPMIX_NONE)
keep = 0;
keep |= FRONT;