Commit graph

15 commits

Author SHA1 Message Date
Barnabás Pőcze
934ab3036e treewide: use SPDX tags to specify copyright information
SPDX tags make the licensing information easy to understand and clear,
and they are machine parseable.

See https://spdx.dev for more information.
2023-02-16 10:54:48 +00:00
Wim Taymans
58812103f3 test: add another channelmix test 2023-02-14 11:57:04 +01:00
Wim Taymans
b9999b292d channelmix: improve mixing setup
Handle MONO layout as a real layout, not just like FC. This means it
does not share the FC mixing weights.
Only distribute and combine MONO channels when the target is also
MONO, enable normalization in this case.
Otherwise downmix and upmix the mono channels like any other channel,
which will make it respect the upmix and other settings.
Change some tests with this new way of doing things.

Fixes #3010
2023-02-06 21:05:23 +01:00
Wim Taymans
04aa803d7e test: avoid compiler warnings when SSE is not enabled
Refactor the sample test and run the test against itself to make
sure we use all variables at least once.
2022-11-11 12:09:22 +01:00
Wim Taymans
492920ca35 test: add another 6.1 channelmix test
Reorder the bitmask in the natural channel order to avoid confusion.
Add another test with RL/RR/RC channels.

See #2809
2022-11-06 10:57:25 +01:00
Wim Taymans
ccec687104 test: add unit test for 6.1 up and downmix
See #2809
2022-11-05 17:12:35 +01:00
Wim Taymans
41fd8144f0 tests: relax test a little 2022-09-29 15:25:02 +02:00
Wim Taymans
e97a0a67d8 tests: use spa_assert_se for tests
Or otherwise they are compiled away
2022-09-29 15:05:16 +02:00
Wim Taymans
8a4091f578 tests: add unit test for n_m matrix 2022-09-29 12:36:49 +02:00
Wim Taymans
54f6f9293e channelmix: upmix disabled also disables FC and LFE generation
Don't generate FC and LFE when upmix is disabled.

Fixes #2266
2022-04-04 09:08:54 +02:00
Wim Taymans
b7279a1728 channelmix: dont make FC from synthesized FC
When we have stereo and need to make FC, don't try to upmix the
stereo into FC again.
Fix unit test now that we create FC channels.
2022-01-11 17:25:38 +01:00
Wim Taymans
6b34b8c44e audioconvert: fix mono channel mix test
When we have a single MONO channel, distribute and average. Otherwise,
use the logic to do proper mixing.

Adjust the unit test accordingly.
2021-12-09 16:51:40 +01:00
Peter Hutterer
49f3d5842e test: replace all spa_assert() macros with spa_assert_se()
These are tests, we never want those to be optimized away.
2021-07-27 10:24:44 +10:00
Wim Taymans
6b0abd2057 channelmix: Improve unknown channel layout handling
Clamp position to valid range. so that AUX becomes UNKNOWN.
If we have one mono source channel and unknown destination, copy it
to all destination channels.
If we have one mono destination channel and unknown source layout,
average all channels.
Otherwise, pair source and dest channels.

See #538
2021-01-15 17:51:07 +01:00
Wim Taymans
0d35f44fd9 tests: add channelmix test 2019-08-29 14:05:02 +02:00