From patchwork Sun Sep 18 20:27:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38031 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:3b1c:b0:96:9ee8:5cfd with SMTP id c28csp858906pzh; Sun, 18 Sep 2022 13:29:42 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4J+JPPWfw17wZSabwtQ6gADflGRvyQkJrPAvCf1ThQRKctDa50qQ3AP74PrntTaFr2zeEL X-Received: by 2002:a17:906:dac8:b0:741:545b:796a with SMTP id xi8-20020a170906dac800b00741545b796amr10396983ejb.240.1663532982032; Sun, 18 Sep 2022 13:29:42 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ay25-20020a056402203900b004479e9c138dsi6688687edb.447.2022.09.18.13.29.41; Sun, 18 Sep 2022 13:29:42 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=VHUE1806; arc=fail (body hash mismatch); spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=outlook.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5C3E068BBF3; Sun, 18 Sep 2022 23:28:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2081.outbound.protection.outlook.com [40.92.91.81]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 55D7768BBEF for ; Sun, 18 Sep 2022 23:28:24 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eiVdW8Qd5tvSQLfHrG1n1WF0PSx264ns6RTkBhKn7jAPbkqdsCy+slNDTSeJetvK9Kxg8EY+FHkEHCO1AIs8QHJUW/x+TYxHKZdNfiIpROsCG/lZ94loYgldxMoR+B4K/FLEqxFsSpck/Rq0rnz9Tc/5d7ByEzMDpIrIDW8Ql8Y8Iq8L9m5G2ZpTnssCJVkvhBZal5mH+sZcRsvqXzwAMPhSM4hcNzNy2Q3rK9qrLnUsDFp8hOjbW0j+spRd0E3BT7khLvbF24d1954wttouSnQH6rJavkAMb+FeKLfaARYD82U7Kj661WnodLPxCpqHgg30P7Tp/iWq4/p03X0G0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=u9Fd/JTMtrQwkO/ZR1J+GfJHyYE9RVm60oseKqQzMnw=; b=Hxt+DtnUbN1GMPN77Sci4m6HO/+XWg8BlilTGg6LrQ4S1pxL46DPRJfiG+E8OvFRcjyEScVAOvaSOr3+oe14kinNNJH9awfxewxxCZTCIQbft+iWHfFPCnwJMK7hBQalkfxn4oTetcgoGPO1UTtBQgxuv/CpiIOlzVPqUaxV9DHPc9Ab4UxzcKkZzdE+sh6teCXVNX+LUZWgZH1xmmVm9notD8/5zKvoPOI4gL6qcLtmiFxv8g6i6Dx/Fh3qiwVbURbtGpOY+q30lyZYs/GRGktzXuQQwYk1UVNsbTtPzfNuFIdJgRtwQj12CowIj1hjJT3ObLnI8motJyOPWTvaPA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=u9Fd/JTMtrQwkO/ZR1J+GfJHyYE9RVm60oseKqQzMnw=; b=VHUE18069+NMFiNo6fKZ+yExLhQsSPXCE7vKI66kL4pDDS9O8EEE8M/it8oeeS2M5xPnl+1985Yn5fJvR1RUs/TvmahaTOLAYqT055zVQ3ZAoZoTMDZURQyuZjl1YfbLyyrYtOHqNjFPdHPR8JgmPz0cgaiz/rzrwOA/YhRxfXYJSzo13QL/I2Xg1p4IXRve/wX7nH/bPjlTftG/OPJT+b04szH9T7wgoYe1UetyAixcjSNklBw8wmXagdc7c49/fJpCpN2r6Ofg09ejRORsr1NIUPV2kwEKnDVHT9f14Z23xAYmjMBc/E+d8lLMnbaKylFRa5AgraDE5hazEI+F5A== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DU0P250MB0484.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:34c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5632.19; Sun, 18 Sep 2022 20:28:20 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::f3f2:4362:56:4785]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::f3f2:4362:56:4785%7]) with mapi id 15.20.5632.019; Sun, 18 Sep 2022 20:28:20 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 18 Sep 2022 22:27:53 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [YyluUPPcSdbWj64kH+A3JN7YXgGI6hNeJH2yfxLIubE=] X-ClientProxiedBy: ZR0P278CA0109.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:20::6) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20220918202757.2345415-12-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DU0P250MB0484:EE_ X-MS-Office365-Filtering-Correlation-Id: 47bd07e3-6a3b-47f1-903e-08da99b4538b X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKxCM1OeU4RWKrdQhmMVsaYv/Bf6m4KR2JAbuARYg2DbMektOl6u4FDyQ0rNC6Ro6ruJmqWCgpcXV70In00NRf1uma0I+KFrEKql0EGV3DLyEVyXjeXr+oMD+W9dM8PM29UDe79WOuQ8xpfIwO4aAZFAMu5irQ4F27egDzvoICugmcqRxVJRhgYfxGXVaMrw4i+FFpXHHHJ/Fc+JHF5kTOz/uF0tDlKwbH1ohtOpW56JlKFnfShqxYuIZW3adL8qiHr2famUzRUFDWEPh6BPKim4OCAU9rDWasrQT1+TyRQNGCfGdpZQz3ao5O0O+FZyzyGoKt/g4fBSIRakD+7tWMu252boo+kqsSuUfLWFdy1fbfsGxZCvpM4n6Can7lFlEwsko+a2tbU9NiAP8ny2GBMUZNctaUwEr7XTQnIT9+lnV+tQZ6C/NIqUJGuDTxvdCTp74B6rwj80gDQTijOJize2n7I/u2RKqaB951coX1jodgvUwj0GKrrVRPu85PhXaNnY4ocDvI7vsyF98FgDzT+KQmyTy781ZpG/t4Owt1BQJljc/U+vylHKXcTo3sin2F2PtCCwR8SDj3cocOHEyxQjuv8Wxnq8gYFpUArjaw/dMBF4OP+gbRmXFWZCPFc8XtvyfFvb8U1nNAt5d7vlq+VGP8vGyDAuD5I47aA0d1KCGT2X2FIWDRhs3/N9MI+FRpCpyPTE14yFHq/rK/2mSa3eOhETsgZ92FM= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UNvsCLfKZqc0qnCEGVwokYjwzxrM9/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C5D3kldKMMJ8D3oMJC4EZHMKRv/nMh79L44F4GfYNNKOMfVzCYUzrhVUfuTAUxIQ5815srWy5YJSlDl36wmw7ZkqwM3ZABS5uN8EL/wgMPoWP+8L6TUiWyfHVaQjyrpCo993yqpQzn0v2uCRdrS1iZFeuVRbFbQEjnfwaeTdBKJUFD8Hg7osEQS9XLa72ytWWkz+S6SKPLsYuXxcf4v8ax6Mh35FV632UDLJJ2AjCiGWxyDWZoKGCcQ/+tRVf1jLIqiC7FDDaDPRRT9LL1+qDbu78+rZsg52Qc43Ktu1q3tTPgGKsE6T+NICPrXzq517n253+I9YZO8slWiRZaG1MWzSyj5txONlKUG0efyFUt3AjvntGOJE6Z2FrydTEoHkWakF4+XpU5kdAv6enGC7qVZFaNY4ilUCs3TZWlwT1Em9HZ642R+yqsZ7/XEwVENKP8ovfYzIukxGSaQgCPiZrcwQYX1sJP4swiNICd2KQpVAikkhdloYKTme54q5atSDhSikUN06byNgN08qHkonyhaWXwMfq4RqM3K/zd/eC2Lb+ZAgTh0S+sZSWRKF3MSk96aIQmElWPbdtzfLzfXOyaRjqecwAbSMrKMMb9qDDzZjgabpxFgC3A9bUix+8LD/BBvJFHtbq1mpv++2ai1JPE6LSi0PDrWJmSVbWLFCnBXL8TYYzoUIZ5y5JDUkGS3GNJifJImIrf6xU3UxkbUpB5OMDkdNlNea7H+ApqYf0C9IWAMkLkK0NdVMxgaSkPIDOVRnTWUhZh2XOWG4dITXmYr7iEZuGk39kClsZ2baatPnrajWUWsBUOpDfdXIFDCs+X5dn4HLx2vZu2d019Ivshk3CDMcRnuUZ9IB9iMu2FgKtJnVHmeryTT8hhPtYeUNo0mwaKZPJOAtL+uy5+ESXP5xfrdeHi//w+BIXl3vTdpzHfp35VbTFDdv1ggMXjb7fgz7F X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 47bd07e3-6a3b-47f1-903e-08da99b4538b X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2022 20:28:20.2727 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0P250MB0484 Subject: [FFmpeg-devel] [PATCH 13/17] avcodec/mlpenc: Fix channel layouts X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: nmkVe89Edutd The encoder actually creates files with side channels, not back channels. See thd_layout in mlp_parse.h. Signed-off-by: Andreas Rheinhardt --- libavcodec/mlpenc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c index b66f3a3067..463332593f 100644 --- a/libavcodec/mlpenc.c +++ b/libavcodec/mlpenc.c @@ -628,14 +628,14 @@ static av_cold int mlp_encode_init(AVCodecContext *avctx) ctx->channel_arrangement = 1; ctx->thd_substream_info = 0x14; } else if (!av_channel_layout_compare(&avctx->ch_layout, - &(AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT0_BACK)) { + &(AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT0)) { ctx->ch_modifier_thd0 = 1; ctx->ch_modifier_thd1 = 1; ctx->ch_modifier_thd2 = 1; ctx->channel_arrangement = 11; ctx->thd_substream_info = 0x104; } else if (!av_channel_layout_compare(&avctx->ch_layout, - &(AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT1_BACK)) { + &(AVChannelLayout)AV_CHANNEL_LAYOUT_5POINT1)) { ctx->ch_modifier_thd0 = 2; ctx->ch_modifier_thd1 = 1; ctx->ch_modifier_thd2 = 2; @@ -2277,13 +2277,13 @@ const FFCodec ff_truehd_encoder = { .p.sample_fmts = (const enum AVSampleFormat[]) {AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S32, AV_SAMPLE_FMT_NONE}, .p.supported_samplerates = (const int[]) {44100, 48000, 88200, 96000, 176400, 192000, 0}, #if FF_API_OLD_CHANNEL_LAYOUT - .p.channel_layouts = (const uint64_t[]) {AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_5POINT0_BACK, AV_CH_LAYOUT_5POINT1_BACK, 0}, + .p.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO, AV_CH_LAYOUT_STEREO, AV_CH_LAYOUT_5POINT0, AV_CH_LAYOUT_5POINT1, 0 }, #endif .p.ch_layouts = (const AVChannelLayout[]) { AV_CHANNEL_LAYOUT_MONO, AV_CHANNEL_LAYOUT_STEREO, - AV_CHANNEL_LAYOUT_5POINT0_BACK, - AV_CHANNEL_LAYOUT_5POINT1_BACK, + AV_CHANNEL_LAYOUT_5POINT0, + AV_CHANNEL_LAYOUT_5POINT1, { 0 } }, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,