From patchwork Wed Aug 12 22:26:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 21616 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 8A849449AB7 for ; Thu, 13 Aug 2020 01:27:06 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6091A68B566; Thu, 13 Aug 2020 01:27:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id C0C3968B4AD for ; Thu, 13 Aug 2020 01:27:00 +0300 (EEST) Received: by mail-lj1-f195.google.com with SMTP id v12so3997423ljc.10 for ; Wed, 12 Aug 2020 15:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=fC6D3IKh602eU7WxNv48Giz1rxEGCP/sdIwgCj77Ds8=; b=cN1pTPWzJT7p5p6KHvt0tahc3WiOjXgvHLQRBiipz5jPPa8kbbiSGknUwsp4d5uOYI D0x4saHF3t3IZAeehyeWyMz46yz/1mVzNCBH/1/uoa+DKh9EK1vHyPG1Zi2TAVdHdjeD F2zwU6uP0PgU1gvWz0u6ewaUdgKwqVK4svCyzHxCz2nwj7OCp7dwMruzfN7liaNZI+JJ RUiL884s6eHahsLUXoKiCPSkmeClgL3Igb85hk3Iq+RksvMxgtBewF7n+yYNjgwgK1EC oue6SWKzgcKqPBPq7AGxu7afkVp7zFD4WaQ2M/v6M8T5jbvlT54Qv/v++/sZNKiXcIQr 0hrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=fC6D3IKh602eU7WxNv48Giz1rxEGCP/sdIwgCj77Ds8=; b=MMcOblJwbaj04E+MbPBedh2MaIH9YXb3Y7OACZN6GHTlK3nvy0gaPGrSKkTCM6b36z IDBmoYbW3ubu5K7V0+7nIQEubyUb4LIaUr6ZKl9A9KJ3YS70Rd9gp1ZhW6U1XUzuAeZB fkZj8hBd8InMbTzpymbiUZBrRSveCdbu/1fmsr9M3+mBdkE2ry94Q7P3r5XLAtMq2Lcc JZjvFv961u53pZB8912gsdoi//SoaXEJWNbEZ/g+XeJ4FTzhzXp6yXwFGHZtjcrU1OgP 2DjzVJSUxyj0mkfzjWVSHy94h/QKao3s0V3G2qKJJpVo9Oj5PHha3X70MqsZMMfp666W aJaA== X-Gm-Message-State: AOAM531q3iSclRuyJcDmUqxY82/BqlhGN5ex8bcHRTBILzcYJzetcXlf Gcgdtpg0SGSZiB8xhCpBLXExe2wS X-Google-Smtp-Source: ABdhPJyxWJIubLyxVfGM4Ld6cV9uyggxkCgSj+/px1G5d+6BpNNaTegMeKpS+FZW5+A+TMXGu8Cpaw== X-Received: by 2002:a05:651c:204f:: with SMTP id t15mr664261ljo.308.1597271219825; Wed, 12 Aug 2020 15:26:59 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id d26sm750128lfq.73.2020.08.12.15.26.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2020 15:26:59 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Thu, 13 Aug 2020 01:26:58 +0300 Message-Id: <20200812222658.29282-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] swresample/rematrix: handle 22.2 as a 9 channel layout X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This is as far as 22.2 follows the same channel order as WaveFormatExtensible's channel mask (and the AV_CH_* defines). After LFE2 the side channels would follow, but that offset of one stops us from utilizing them without further tweaks. This change was verified by using swresample to downmix to 5.1, and then feeding that to WASAPI. --- libswresample/rematrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index d0c4a212b3..94b3de88f6 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -143,7 +143,7 @@ av_cold int swr_build_matrix(uint64_t in_ch_layout_param, uint64_t out_ch_layout if (in_ch_layout == AV_CH_LAYOUT_22POINT2 && out_ch_layout != AV_CH_LAYOUT_22POINT2) { - in_ch_layout = AV_CH_LAYOUT_5POINT1_BACK; + in_ch_layout = (AV_CH_LAYOUT_7POINT1_WIDE_BACK|AV_CH_BACK_CENTER); av_get_channel_layout_string(buf, sizeof(buf), -1, in_ch_layout); av_log(log_context, AV_LOG_WARNING, "Full-on remixing from 22.2 has not yet been implemented! "