channelmix: improve undefined channel layout

When we have no channel layout, just copy input to output
channel.
Optimize this case in the mixer implementation.
This commit is contained in:
Wim Taymans 2020-09-04 13:41:24 +02:00
parent 6f4f9e5abb
commit 9a7cbeea83
3 changed files with 35 additions and 10 deletions

View file

@ -54,6 +54,7 @@ struct channelmix {
#define CHANNELMIX_FLAG_ZERO (1<<0) /**< all zero components */
#define CHANNELMIX_FLAG_IDENTITY (1<<1) /**< identity matrix */
#define CHANNELMIX_FLAG_EQUAL (1<<2) /**< all values are equal */
#define CHANNELMIX_FLAG_COPY (1<<3) /**< 1 on diagonal, can be nxm */
uint32_t flags;
float matrix_orig[SPA_AUDIO_MAX_CHANNELS][SPA_AUDIO_MAX_CHANNELS];
float matrix[SPA_AUDIO_MAX_CHANNELS][SPA_AUDIO_MAX_CHANNELS];