From 25e3144887508c8bb929e552806d3e72ab56867c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 9 Nov 2022 09:22:13 +0100 Subject: [PATCH] audioconvert: skip upmix when moving channels When we use SIDE for REAR, don't try to upmix REAR channels and vice versa. --- spa/plugins/audioconvert/channelmix-ops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spa/plugins/audioconvert/channelmix-ops.c b/spa/plugins/audioconvert/channelmix-ops.c index 25d5c5fea..cfc449f0b 100644 --- a/spa/plugins/audioconvert/channelmix-ops.c +++ b/spa/plugins/audioconvert/channelmix-ops.c @@ -311,6 +311,7 @@ static int make_matrix(struct channelmix *mix) _MATRIX(SL,RL) += 1.0f; _MATRIX(SR,RR) += 1.0f; } + keep &= ~SIDE; } else if (dst_mask & STEREO) { spa_log_debug(mix->log, "assign RL+RR to FL+FR (%f)", slev); if (matrix_encoding == MATRIX_DOLBY) { @@ -348,6 +349,7 @@ static int make_matrix(struct channelmix *mix) _MATRIX(RL,SL) += 1.0f; _MATRIX(RR,SR) += 1.0f; } + keep &= ~REAR; } else if (dst_mask & _MASK(RC)) { spa_log_debug(mix->log, "assign SL+SR to RC (%f)", SQRT1_2); _MATRIX(RC,SL)+= SQRT1_2;