From patchwork Sun Aug 15 12:36:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 29535 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6602:2a4a:0:0:0:0 with SMTP id k10csp1193074iov; Sun, 15 Aug 2021 05:36:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxuLkhdqpPK98espOVeGYOfHZEgRBQZRxvGtY2850DKeoSr7witTkkuMPwZ/zUN0PgrbMW9 X-Received: by 2002:a05:6402:d49:: with SMTP id ec9mr14162769edb.333.1629030983951; Sun, 15 Aug 2021 05:36:23 -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 br21si7261791ejb.258.2021.08.15.05.36.23; Sun, 15 Aug 2021 05:36:23 -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=Ias8IQCg; 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 D267C68A476; Sun, 15 Aug 2021 15:36:20 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-oln040092071084.outbound.protection.outlook.com [40.92.71.84]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A16E3680986 for ; Sun, 15 Aug 2021 15:36:14 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lVQf3m3/LSZ15rfONitSQutuktyi671RlX3dQuwainY2Xe87GZ8zX7WFio3IMM5DuKzb4iYlpkdLcSzJG85E+BWNJmeiEIvhF2LmH5YhbCBLdBRIa4ptBiTV8twFzNmVMiksIJmmJCol8oSX6g49ezE2Q2tW5PmBK426HxrJjlcsgcp9viPGSbLXo7yAnrSlGBfgTTaJi2QKcwA4+fWMTXncwezxNLnM0EK2hUEeawPkRPv04lgaxV9W0jQvCGyJpfCglBZEzhbGPiLj8my74uqG87X1fdtw0tzjNY54fIuS5e6MeA4EYjT2HNZZfv6FV+VbCRezV02OuupV5D9eTw== 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-SenderADCheck; bh=YyyEPusKcGX3Ou4L/qN0OFcWRbB9vshOENaP8AodUJw=; b=cTKwy7KHBa7+OABd3se6pYU8D87B8A4yDtKF4RRmMAJauPXUFdfvcm6KaV42NvYFfh4V6p+P1E3iIR68gwMaWwFaUJHO5LzIa51MZyW1M4PWY/HF8ypAweSgMyC1nYUVhTy4CAngw6XPiyM8J0nKjH2G/8Dip7kst3NdDhmz4ZSgEyBiAJMUH3aBsxdPkCG9ybz/5JmblAjd96njJnutDiA74X2uXhpKf8L5tFPT7BHCFx1zkrBLTqqgVkHYKkT/EZ3/Y3kHoirPqo7cFzeruZfZU7a2jbaWOEFXBFDn9arieOO5r3OzYQ0YtfY5Q85Ddj2IerD3Tq2f9XDN7EsxJg== 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=YyyEPusKcGX3Ou4L/qN0OFcWRbB9vshOENaP8AodUJw=; b=Ias8IQCg87kpTpNRm/fCNk2LEF3fowAY++2aKRdyzqWtc+g1oPLqBVF2crmY7g5STvqy7P2dFBzPXerGf3kIy3cB6ELKP5ZEtai5jjMNyWWUDGtInALe+0DtA0f+LeBzBPLwaxtx75ddxvyGAm9CdCk5pJeChTTkNal9ble43DvOEb0aJSO0pWWgFsFNBoR0rx4sKrt+VNLuKHsuWdkqKaynJ/aGA8rZrTbFrumyeTN+IAB1ry0CfJoxmMw6SXoZEHoZYt9G2IegaTYOcXaIoUNA1coiwjDPAIAD3RvZ+g571mMh8NEyX6aDWGHpDlRQiRTi+bON58LvT87l869o0A== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB5046.eurprd03.prod.outlook.com (2603:10a6:20b:88::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.17; Sun, 15 Aug 2021 12:36:13 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ded:bace:bc7:e91d%3]) with mapi id 15.20.4415.022; Sun, 15 Aug 2021 12:36:13 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 15 Aug 2021 14:36:05 +0200 Message-ID: X-Mailer: git-send-email 2.30.2 X-TMN: [1xTD1D8/N0CjFF/xc2pg8hYdO/ILeOX6] X-ClientProxiedBy: AM9P250CA0006.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:21c::11) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20210815123605.2197705-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from sblaptop.fritz.box (188.192.142.38) by AM9P250CA0006.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:21c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.13 via Frontend Transport; Sun, 15 Aug 2021 12:36:13 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9bec3a1f-a489-4ec1-8624-08d95fe94485 X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UIMhWUD35g0FxUDNN6JTWbE9i8u8cajz0CIrBUYfHZS2PaJzn01I3TCE6V4zFJtMp3ymjcwQVzT++hPuPMfxxl+tuN/LL+nuTBh7DeSUvHh56ad+pdve5yJ3cI77fXF5M1pG139g73ZVL2RB1GAhvQfbtcCNqRxO4DUvTiATWI6ZtwBoV1VrzGbWGtn+ZA4xVF2HPHun34BhLH3ikwYUodJYZuwJszreMf0LwbW9f17Frahh40dHPOrcKyXzVWH912qir5VD+c48X1n+3wSTIC2q/GGKCcjjLQB3sfb/dNrY9bW86UfmMvuFEo+RvamRfsZ1I4dfFcA5nH1P+xZVkMPys9iCdRO2YYyEHcLGMQd3IzO27PcuXptYnWwHqkdKYzBBPljTulFCo5rwqWqCxgkJX3kg+ZY00+QiEs2ztUbDACs4sCaEwhLu6d0j2Gjm3zm2/JWlwI/hvVidQSPMavSB2xm4tXWbyS5H+zuS0MxlGt0joCZPJgYxVSVUOjw/NBKYhQGhvqGvZtdFaPDhVE0ekn6VyHMKMG5QcjXBj+EYkqJe+8M6ntiTP2AS0oqfQfbzCXaVrpqUr6BCRv5/DIS7QKpgLFpAFSPIcRUbbNGvVjEhtzxXpNoRRcGeyB6ZQicxQmrWvdkybO9EnPg7W/hJh/uMA91lyP8KU8PB2H1tzuRh4YJ3bQ8/W4Z62ePnhEi1sB16Y1XIg== X-MS-TrafficTypeDiagnostic: AM6PR03MB5046: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AhHlsZTUA6WSO/5tYH8cQh+QQgzm8VZpNGkDYKplwLMlQPdU+ez8FLId0ep43qys5q0OKWJLZze5Q/sqEbJa1hXtylYhKtHq8Cq5gfEUP0cxOzUQIHauOWOSSW1vKW+4mWa/5jNPI6ZvQb0cgJBp4VGlg+qkwRCc/6Ko2LBKxu8R0o8PiBJz5j9tWWbOl+nygCa31JL6XnGRgj72ZpmUypbSXm345dqeFoSrwHIPjmlG9c0fIvR68ZtwwlPjVLVxmcVhgRrogRhx/0MdcHUJ2vcETZCBr6LI2v8IOTcnnV/ZcriEQOj6dw/hastoMIYHoM2dWWjNibkgXy6AKrbpxmmxefULi4MV9Pbn8hXISMLPQTK4nhG1Ua5CzRfqGiRHRkZuLX53cEm4kwcsHLrZyIwztImPJ/vhizvJOMTpXWucoUz8Bu99Vz9UQAK5aIvV X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3+FhomdNt7f5nU5NJ3ArljRcwOZcL/H1ndWVlzMKTr9BF6H2OIbVfix+09+qnUZ/1hneXEYrj4qqoSiUDeFNbFKIw9kPmiCHneUK3kr+aaINyeZKRlEvsaSGq97QHMxXKIJtVMvrEkSANQ69cmGtgQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9bec3a1f-a489-4ec1-8624-08d95fe94485 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Aug 2021 12:36:13.3306 (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: AM6PR03MB5046 Subject: [FFmpeg-devel] [PATCH] avcodec/options_table: Treat (request_)channel_layout as channel layout 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: 2CBSuI+yNa98 Also adapt some FATE tests to already cover this. Signed-off-by: Andreas Rheinhardt --- libavcodec/options_table.h | 4 ++-- tests/fate/ac3.mak | 9 ++++----- tests/fate/dca.mak | 5 +++-- tests/fate/truehd.mak | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libavcodec/options_table.h b/libavcodec/options_table.h index ed428b1310..ae42b65b7b 100644 --- a/libavcodec/options_table.h +++ b/libavcodec/options_table.h @@ -260,8 +260,8 @@ static const AVOption avcodec_options[] = { {"mv0_threshold", NULL, OFFSET(mv0_threshold), AV_OPT_TYPE_INT, {.i64 = 256 }, 0, INT_MAX, V|E}, {"compression_level", NULL, OFFSET(compression_level), AV_OPT_TYPE_INT, {.i64 = FF_COMPRESSION_DEFAULT }, INT_MIN, INT_MAX, V|A|E}, {"bits_per_raw_sample", NULL, OFFSET(bits_per_raw_sample), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX}, -{"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_UINT64, {.i64 = DEFAULT }, 0, UINT64_MAX, A|E|D, "channel_layout"}, -{"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_UINT64, {.i64 = DEFAULT }, 0, UINT64_MAX, A|D, "request_channel_layout"}, +{"channel_layout", NULL, OFFSET(channel_layout), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64 = DEFAULT }, 0, UINT64_MAX, A|E|D, "channel_layout"}, +{"request_channel_layout", NULL, OFFSET(request_channel_layout), AV_OPT_TYPE_CHANNEL_LAYOUT, {.i64 = DEFAULT }, 0, UINT64_MAX, A|D, "request_channel_layout"}, {"rc_max_vbv_use", NULL, OFFSET(rc_max_available_vbv_use), AV_OPT_TYPE_FLOAT, {.dbl = 0 }, 0.0, FLT_MAX, V|E}, {"rc_min_vbv_use", NULL, OFFSET(rc_min_vbv_overflow_use), AV_OPT_TYPE_FLOAT, {.dbl = 3 }, 0.0, FLT_MAX, V|E}, {"ticks_per_frame", NULL, OFFSET(ticks_per_frame), AV_OPT_TYPE_INT, {.i64 = 1 }, 1, INT_MAX, A|V|E|D}, diff --git a/tests/fate/ac3.mak b/tests/fate/ac3.mak index d76e22bade..39b555161d 100644 --- a/tests/fate/ac3.mak +++ b/tests/fate/ac3.mak @@ -11,9 +11,8 @@ FATE_AC3 += fate-ac3-4.0-downmix-mono fate-ac3-4.0-downmix-mono: CMD = pcm -request_channel_layout 4 -i $(TARGET_SAMPLES)/ac3/millers_crossing_4.0.ac3 fate-ac3-4.0-downmix-mono: REF = $(SAMPLES)/ac3/millers_crossing_4.0_mono_v2.pcm -#request_channel_layout 3 -> left channel + right channel FATE_AC3 += fate-ac3-4.0-downmix-stereo -fate-ac3-4.0-downmix-stereo: CMD = pcm -request_channel_layout 3 -i $(TARGET_SAMPLES)/ac3/millers_crossing_4.0.ac3 +fate-ac3-4.0-downmix-stereo: CMD = pcm -request_channel_layout stereo -i $(TARGET_SAMPLES)/ac3/millers_crossing_4.0.ac3 fate-ac3-4.0-downmix-stereo: REF = $(SAMPLES)/ac3/millers_crossing_4.0_stereo_v2.pcm FATE_AC3 += fate-ac3-5.1 @@ -21,11 +20,11 @@ fate-ac3-5.1: CMD = pcm -i $(TARGET_SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3 fate-ac3-5.1: REF = $(SAMPLES)/ac3/monsters_inc_5.1_448_small_v2.pcm FATE_AC3 += fate-ac3-5.1-downmix-mono -fate-ac3-5.1-downmix-mono: CMD = pcm -request_channel_layout 4 -i $(TARGET_SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3 +fate-ac3-5.1-downmix-mono: CMD = pcm -request_channel_layout FC -i $(TARGET_SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3 fate-ac3-5.1-downmix-mono: REF = $(SAMPLES)/ac3/monsters_inc_5.1_448_small_mono_v2.pcm FATE_AC3 += fate-ac3-5.1-downmix-stereo -fate-ac3-5.1-downmix-stereo: CMD = pcm -request_channel_layout 3 -i $(TARGET_SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3 +fate-ac3-5.1-downmix-stereo: CMD = pcm -request_channel_layout 2c -i $(TARGET_SAMPLES)/ac3/monsters_inc_5.1_448_small.ac3 fate-ac3-5.1-downmix-stereo: REF = $(SAMPLES)/ac3/monsters_inc_5.1_448_small_stereo_v2.pcm FATE_AC3 += fate-ac3-fixed-2.0 @@ -33,7 +32,7 @@ fate-ac3-fixed-2.0: CMD = pcm -c ac3_fixed -i $(TARGET_SAMPLES)/ac3/monsters_inc fate-ac3-fixed-2.0: REF = $(SAMPLES)/ac3/monsters_inc_2.0_192_small_v2.pcm FATE_AC3 += fate-ac3-fixed-4.0-downmix-mono -fate-ac3-fixed-4.0-downmix-mono: CMD = pcm -c ac3_fixed -request_channel_layout 4 -i $(TARGET_SAMPLES)/ac3/millers_crossing_4.0.ac3 +fate-ac3-fixed-4.0-downmix-mono: CMD = pcm -c ac3_fixed -request_channel_layout mono -i $(TARGET_SAMPLES)/ac3/millers_crossing_4.0.ac3 fate-ac3-fixed-4.0-downmix-mono: REF = $(SAMPLES)/ac3/millers_crossing_4.0_mono_v2.pcm FATE_AC3 += fate-ac3-fixed-5.1-downmix-mono diff --git a/tests/fate/dca.mak b/tests/fate/dca.mak index d6e4df9e79..5168c1bc78 100644 --- a/tests/fate/dca.mak +++ b/tests/fate/dca.mak @@ -49,11 +49,12 @@ fate-dca-x96_xxch_71_24_96_3840-dmix_2: CMD = ffmpeg -request_channel_layout 0x3 fate-dca-x96_xxch_71_24_96_3840-dmix_2: REF = $(SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840-dmix_6.f32 FATE_DCADEC_LOSSY += fate-dca-x96_xxch_71_24_96_3840-dmix_6 -fate-dca-x96_xxch_71_24_96_3840-dmix_6: CMD = ffmpeg -request_channel_layout 0x60f -i $(TARGET_SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840.dtshd -f f32le -af aresample - + +fate-dca-x96_xxch_71_24_96_3840-dmix_6: CMD = ffmpeg -request_channel_layout "FL|FR|FC|LFE|SL|SR" -i $(TARGET_SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840.dtshd -f f32le -af aresample - fate-dca-x96_xxch_71_24_96_3840-dmix_6: REF = $(SAMPLES)/dts/dcadec-suite/x96_xxch_71_24_96_3840-dmix_6.f32 FATE_DCADEC_LOSSY += fate-dca-xch_61_24_48_768-dmix_6 -fate-dca-xch_61_24_48_768-dmix_6: CMD = ffmpeg -request_channel_layout 0x60f -i $(TARGET_SAMPLES)/dts/dcadec-suite/xch_61_24_48_768.dtshd -f f32le -af aresample - +fate-dca-xch_61_24_48_768-dmix_6: CMD = ffmpeg -request_channel_layout "5.1(side)" -i $(TARGET_SAMPLES)/dts/dcadec-suite/xch_61_24_48_768.dtshd -f f32le -af aresample - fate-dca-xch_61_24_48_768-dmix_6: REF = $(SAMPLES)/dts/dcadec-suite/xch_61_24_48_768-dmix_6.f32 $(FATE_DCADEC_LOSSY): CMP = oneoff diff --git a/tests/fate/truehd.mak b/tests/fate/truehd.mak index e672716527..7da8c93cff 100644 --- a/tests/fate/truehd.mak +++ b/tests/fate/truehd.mak @@ -4,7 +4,7 @@ fate-truehd-5.1: CMP = oneline fate-truehd-5.1: REF = 95d8aac39dd9f0d7fb83dc7b6f88df35 FATE_TRUEHD-$(call DEMDEC, TRUEHD, TRUEHD) += fate-truehd-5.1-downmix-2.0 -fate-truehd-5.1-downmix-2.0: CMD = md5pipe -f truehd -request_channel_layout 2 -i $(TARGET_SAMPLES)/lossless-audio/truehd_5.1.raw -f s32le +fate-truehd-5.1-downmix-2.0: CMD = md5pipe -f truehd -request_channel_layout FL+FR -i $(TARGET_SAMPLES)/lossless-audio/truehd_5.1.raw -f s32le fate-truehd-5.1-downmix-2.0: CMP = oneline fate-truehd-5.1-downmix-2.0: REF = a269aee0051d4400c9117136f08c9767