From patchwork Thu May 12 12:19:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 35744 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a885:b0:7f:4be2:bd17 with SMTP id ca5csp422119pzb; Thu, 12 May 2022 05:20:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMEw6WqMn/oW4J+nDNWhprC8aNSVEV9KEYkXT2dds44yydP+flZzeBdyMtsjT9vW9kphO3 X-Received: by 2002:a17:906:cc8b:b0:6f3:a107:b21b with SMTP id oq11-20020a170906cc8b00b006f3a107b21bmr30733850ejb.337.1652358008606; Thu, 12 May 2022 05:20:08 -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 b6-20020a056402350600b00425f7ca0ce9si6821885edd.505.2022.05.12.05.20.07; Thu, 12 May 2022 05:20:08 -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=XCA+Vi2q; 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 2973E68B417; Thu, 12 May 2022 15:20:04 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05olkn2023.outbound.protection.outlook.com [40.92.90.23]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 172F268B33C for ; Thu, 12 May 2022 15:19:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gQ2Pvle0g4yBkphQmDXRuEKVAbXa2oD/aavtOF2gRIr10pAaXCRclFSZtRGwpdCNv+5CZpYCn2q2Xb7JhxZXXwqtoBn0A8eFf0mcuC/srJAkbVtb6RdjlHNUhMcMA8JBQok3twaqbN1S/k0ct1tNRPB0F5Z+VorfmGi4HqWm4ncZwF1dSw1+F+hD5BDxyBRACQG3QcLdni8XExfJwH20hhGK0gZrbRAFOQdkMNf6zSk/ARo3LMlQeRDhBq0A/qD+U8FZL1GAtn5OJ9ryWRL2ObOUKVZM1nqqboOFjXBi95MeNETsQ5+iJah46R8pSNqvCOhvZkPIefYGHnsTkuN8UA== 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=5IXnCAKX368hktcuTFE85KpgZaBJ5PN6T6ESKCDPNR8=; b=egOXw4rNM4dQGWc+pyaGrQwbLnwCRS6TWAJghZcxVmGMWnqLZYrreXOxuXflTFKnLBXzJsPhNJ2tTNLw2MB4h0/T8PLMEhmQTl+hln5YbAqIMmsMu9VdHLOYz8FdqJAIRvAkujv+8TC8YGV+pj8IOXLCROe1W2VCE4jXAGuYjehO8BiDTq/ZM5QDH4mc0hPAKITX6/uhBO0ybCPKHegvF/YKZbqjBk152mxNlu5s+li4UvI4vLECubjEGNbR843ElUkhmahQw1lxSCXeWTdn9Ws5HAM7uQMv8eJEtj1fLyEhoVZtnCQpXuPTE8igbcQgec4qsbwKmNHSGsbYYG+SmA== 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=5IXnCAKX368hktcuTFE85KpgZaBJ5PN6T6ESKCDPNR8=; b=XCA+Vi2q6TQuiaRu3qWIgALlQX/ZaMGqVTTRrTQhedn/6JYUJ9sANmA3tSXfDoRCj8xzEDJbPu2BsHZdhm+fjminTKTwNluClj4D//5YyTlameWIjzmLYYibx6Er33R6DTtKNmpboKcAaV0bOXx/gvYvRLdnnuLe8g/Or7fsJRnlaxZvGgvalog1L9mPlKbeaoA47EKCAGmvuCCxc8/iHJ3iWGYu5BpTvJW2Zm9m6VG3QY4IAU2JafpkxkeFK6QI1gjyvN9APWkSidTm8k+s9yXaRtHZwexLvtzu/GGix9ZmrvdLPfH0uSY0/3zJ2x++I9d6PbDy5otPSxhm8iKA5g== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by PAXPR01MB8487.eurprd01.prod.exchangelabs.com (2603:10a6:102:229::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Thu, 12 May 2022 12:19:54 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c%9]) with mapi id 15.20.5227.023; Thu, 12 May 2022 12:19:54 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 12 May 2022 14:19:43 +0200 Message-ID: X-Mailer: git-send-email 2.32.0 X-TMN: [BmrOPiKQjzuba8VS6HnwdlGrcXAPdx36] X-ClientProxiedBy: ZR0P278CA0084.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:22::17) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220512121945.1206809-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7889b02e-c256-4f96-9610-08da3411b869 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNUDWtBrBvFH8VDhkDQ+7vTLFpxMvbfjCmbfxieAhlgM8acvzaPOCeFhGgEYKHQ91x25jGhUTLmelaIeXxzDUqfEIx0ETl1h0SEF//nQKf/DFSdBS5RFpYp/Ht+dOlNmDxdjSW5t1yKIZEA/tZQHyBaVQeSIMARekUmgTxSIwzE5DDFGDblqRH2Bz+nbvPJ85gXdEcQMLocdINnYS/Hsb0XWjgcqkpAhqc4utr2Zxf4TMqQM+ev3c9QbCwvRU/f7TNa91Zdj3SY6aeBjLa0cKCNfTt3L0mDqddLKythwngOsoaH5FxwyXSNQojm41rs8vKz6OcsiCAhFp9xJ2uGiTQpqm9Jp7dMSZPHlY1TJJHZO8l9iMDMgjrwoEkJ65OxjnoKlk4KQS3JEi1iqNxx+9hpga26xCpaa7nVK/b9J3OMYgt8NeyRCkaHYkOd0rp3Ou+ZvIq8jF2PZjaz7Yzb4DPYE4V+T0zvuOLJejaZKAYDcyn0g5FLk+Vr4u6PD6tx8DuOYRSkrVdkVDJTRioH8kojpr2+QWyKbfwxKJp+OHzaKBiec/JPu4Sf1jgUsYhDk5gHvx4WCJTJDmbeL77AdG9rbAerkD1ba9QK+dINLEFvEfzmAodb/Tt+byFQSBX+4ar0UdSPtAJSsh+4xCW6OybHo+rSWtt7cIHc6x4ioYDnUh9F/oeLW6JyCmxCtw6Zd9lRZve/Ih7p+NugGaLPvuJ3FoJ4GYQcFL88= X-MS-TrafficTypeDiagnostic: PAXPR01MB8487:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cFzcKWWlY6lTBmP2IsAy2U0irWCfubPw0YpzsM0ia24vaSpCTt1O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869 X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2022 12:19:54.3424 (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: PAXPR01MB8487 Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/ac3: Remove declaration of inexistent function 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: 6ewGuZqWFouo Removed in 7b11eead1b4e08728561595e6b610cf8fe2b7122. Signed-off-by: Andreas Rheinhardt --- libavcodec/ac3.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h index dabd49f4cc..8e66d47629 100644 --- a/libavcodec/ac3.h +++ b/libavcodec/ac3.h @@ -214,8 +214,6 @@ typedef enum { EAC3_FRAME_TYPE_RESERVED } EAC3FrameType; -void ff_ac3_common_init(void); - /** * Calculate the log power-spectral density of the input signal. * This gives a rough estimate of signal power in the frequency domain by using From patchwork Thu May 12 12:21:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 35745 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a885:b0:7f:4be2:bd17 with SMTP id ca5csp422863pzb; Thu, 12 May 2022 05:22:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwV2vg3qo1nF7qRNAri6jmZl/A/D2+chqC1rzcyN/pwimD7qEtaDo09TNhooVDhm4YPh8hN X-Received: by 2002:a17:906:5d11:b0:6f5:df90:45c0 with SMTP id g17-20020a1709065d1100b006f5df9045c0mr28329607ejt.23.1652358131485; Thu, 12 May 2022 05:22:11 -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 qb22-20020a1709077e9600b006f3f6f1b7besi6258563ejc.640.2022.05.12.05.22.10; Thu, 12 May 2022 05:22:11 -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=ZyF8Mb4A; 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 499C268B441; Thu, 12 May 2022 15:22:08 +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-am6eur05olkn2033.outbound.protection.outlook.com [40.92.91.33]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1FCE568B2AC for ; Thu, 12 May 2022 15:22:01 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YsNOcd2jhLAMCuSx9CV08Ayg2hYASpl83JHbHzzRx3wZQtWMc2EJqAkQdGVFrix+2owkT/5LC+Uo8sDU7iWSLDLsuk8HMkVosVQ/vFMJqlJmKTP/OoZxirEyQ6WfDtEGIKLlFkk6yp1XgmoOzhsWiOIpcHIsuqxbsrYjRm0ozObYmOj7eqo77IU779o8CyDeqiA7/SGDYse/mKdKuzR31hk5NcEEbPcZkf3AhKMxRPgb2Os4H9fqejRG1CFAPkqSc1Elan28FFnYlpQsRUxuy4IoABrzo1B59xCfUSfe5gc1CF2gd0WS/+krjYOK/k+YMpBW8Cegu6cd5QXzCVJWAg== 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=2FKffgkSV0VNNqYAuRjj1r/qAzvzFzGyXoBc4KEJdH4=; b=hP9eSWu1/pgBexb9+9BvCNRG+NPFvHtMfNQnpnsMS4hVyfe6YeJj0JEFasiq+HYznOPHEM73xkE/jb/gdNB6vACHBmKPK2WauV+ezXk2hbAVhr27Tjezg+ImArsA8WPN0F6q1aJHevy13+EaAsS/hUXDXx6y3G7xehklnkDOdC2PJnM8HJdinOXLy7NPorBIkfecx4OoUKpD3sIXqdSN0KIH9OqTYqV2ux+DTiqpevsc+oMe170Dv0sNfmu5v2F2JoZa0PnQnmZ2InwjsbnCnrhZU+LCNzHF4sO70D36e6sVfcAzRp6QxXyvjbkuev5WO+fQR0dxXk2tQ5wmgf2aYg== 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=2FKffgkSV0VNNqYAuRjj1r/qAzvzFzGyXoBc4KEJdH4=; b=ZyF8Mb4AKNZWcvJ48iu2pr3kn3CdlUKLC3KIem4DrJgXAmfvYnWKNRZXVDhtne3SOEX4ag319PGj8VFjPvbusDU6AWPLWIlqRVydEGXQ8x/w3BWBEWDZDR+vxtzBQXJbqt3xKVEy3azsbAewtAzId25tVPWJjSPk2f/9bP9bbiGCjWExKHsYBSM1ZvmwVTV7qES89iae+Es3S+rmMDowYYeamDNfwLSKOi6PzWJJ+VXqTW1DM2QJKROZmlRLev/wt0yjVO1GZT/HlpyNJD/jjXe5IxSG7x8nVc5rq1l0WXLX1ebGDk7Ta75FyAouOMuDgO6s9NQyuzZ7DQFkZ9LzUQ== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by AM0PR01MB5587.eurprd01.prod.exchangelabs.com (2603:10a6:208:16a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Thu, 12 May 2022 12:21:59 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c%9]) with mapi id 15.20.5227.023; Thu, 12 May 2022 12:21:59 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 12 May 2022 14:21:48 +0200 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [1iKS7+kaQzMu+BV5fTBEPkDPCOt3MNBb] X-ClientProxiedBy: ZR0P278CA0151.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::12) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220512122149.1206887-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d73623bd-4376-411e-d471-08da341202dd X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWi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kSMG/g9U43jNkMnu0zpxeFOp40BEJ8nC+kQIeqYe2kg86JFhs2ZzeCOOo+ySImZVLHZ7lNIDe0XhoqYNdvfec6JUqbLffDAoDlVC5p6gtm4kfeE8ES8RQ8T0hkaKOGFf4WaTvz9e26Y7SlLH0oUbrqVjp4IoLPyfOJiPCtd0GpvqzDHNnQ4WvPSBd/M1nwnuDl3MQsA3vbS3Nh3vi6eS8TmXVYS/dUK8xWy5ud/eLbohonN8zJLYkQNvTxMv9qrmt/v4KkPprFnC0HpA13NdjhsNGbA9RHo6tS7FtNjuNfsLulbTVRXn59WYa5IJAZI3EkU6rjm/h7O84XsQjWtW/d2XYCUPG5IlCcSg7lAsoA380/UJVnVfA2jXuUiHIbPA6lppZApchHmmDsg6KmbFY2tHSJNslG5BlCkN8ekKsnybGApHvZcpMgW0F7Jt3X2VJxvyJcmWeQcVDb0YqbYOgKVpo2Tdj3eU7tP4v4xbWbOECG/Kmx6wZMx6sL0wuBI6A0HsweGFXAueAz9axGP0geZqCfy1P8ZxKFYCagUudp6T++Wg92zVOyw8J6DpJzmeulLjklcsvKUUjbN9Ia8QKpjWdtTf4MSKmCItBCz6p93tZAgWSsdmacfKcETOh3qjCgygNz+vqYO036Z2v7ZMVQrLqxgUniMDlg5cH90Pu2KoKEomGTqVEwUv2YNk+/nqhRXYdkXEuRNXW5Zjgwblad+kxu1+mECJRAuwePer+zMVvINYphVNPEZVmcCRRvMmzqMlGpGI0lbNVArYjivaRahxlJm+Hkfwama8XeZRz+vT45XSN6vrd4kTyipmZmXu8pVh X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d73623bd-4376-411e-d471-08da341202dd X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2022 12:21:59.0681 (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: AM0PR01MB5587 Subject: [FFmpeg-devel] [PATCH 2/3] avcodec/ac3tab: Move some tables only used by ac3.c to it 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: YmdQMZK8e4sA Signed-off-by: Andreas Rheinhardt --- libavcodec/ac3.c | 86 +++++++++++++++++++++++++++++++++++++++++++-- libavcodec/ac3tab.c | 82 ------------------------------------------ libavcodec/ac3tab.h | 2 -- 3 files changed, 84 insertions(+), 86 deletions(-) diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c index e1d0f12073..01fb3b3d7a 100644 --- a/libavcodec/ac3.c +++ b/libavcodec/ac3.c @@ -68,6 +68,88 @@ const uint8_t ff_ac3_bin_to_band_tab[253] = { 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49 }; +static const uint8_t ac3_log_add_tab[260]= { +0x40,0x3f,0x3e,0x3d,0x3c,0x3b,0x3a,0x39,0x38,0x37, +0x36,0x35,0x34,0x34,0x33,0x32,0x31,0x30,0x2f,0x2f, +0x2e,0x2d,0x2c,0x2c,0x2b,0x2a,0x29,0x29,0x28,0x27, +0x26,0x26,0x25,0x24,0x24,0x23,0x23,0x22,0x21,0x21, +0x20,0x20,0x1f,0x1e,0x1e,0x1d,0x1d,0x1c,0x1c,0x1b, +0x1b,0x1a,0x1a,0x19,0x19,0x18,0x18,0x17,0x17,0x16, +0x16,0x15,0x15,0x15,0x14,0x14,0x13,0x13,0x13,0x12, +0x12,0x12,0x11,0x11,0x11,0x10,0x10,0x10,0x0f,0x0f, +0x0f,0x0e,0x0e,0x0e,0x0d,0x0d,0x0d,0x0d,0x0c,0x0c, +0x0c,0x0c,0x0b,0x0b,0x0b,0x0b,0x0a,0x0a,0x0a,0x0a, +0x0a,0x09,0x09,0x09,0x09,0x09,0x08,0x08,0x08,0x08, +0x08,0x08,0x07,0x07,0x07,0x07,0x07,0x07,0x06,0x06, +0x06,0x06,0x06,0x06,0x06,0x06,0x05,0x05,0x05,0x05, +0x05,0x05,0x05,0x05,0x04,0x04,0x04,0x04,0x04,0x04, +0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03, +0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x02, +0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, +0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01, +0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, +0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, +0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +}; + +static const uint16_t ac3_hearing_threshold_tab[AC3_CRITICAL_BANDS][3]= { +{ 0x04d0,0x04f0,0x0580 }, +{ 0x04d0,0x04f0,0x0580 }, +{ 0x0440,0x0460,0x04b0 }, +{ 0x0400,0x0410,0x0450 }, +{ 0x03e0,0x03e0,0x0420 }, +{ 0x03c0,0x03d0,0x03f0 }, +{ 0x03b0,0x03c0,0x03e0 }, +{ 0x03b0,0x03b0,0x03d0 }, +{ 0x03a0,0x03b0,0x03c0 }, +{ 0x03a0,0x03a0,0x03b0 }, +{ 0x03a0,0x03a0,0x03b0 }, +{ 0x03a0,0x03a0,0x03b0 }, +{ 0x03a0,0x03a0,0x03a0 }, +{ 0x0390,0x03a0,0x03a0 }, +{ 0x0390,0x0390,0x03a0 }, +{ 0x0390,0x0390,0x03a0 }, +{ 0x0380,0x0390,0x03a0 }, +{ 0x0380,0x0380,0x03a0 }, +{ 0x0370,0x0380,0x03a0 }, +{ 0x0370,0x0380,0x03a0 }, +{ 0x0360,0x0370,0x0390 }, +{ 0x0360,0x0370,0x0390 }, +{ 0x0350,0x0360,0x0390 }, +{ 0x0350,0x0360,0x0390 }, +{ 0x0340,0x0350,0x0380 }, +{ 0x0340,0x0350,0x0380 }, +{ 0x0330,0x0340,0x0380 }, +{ 0x0320,0x0340,0x0370 }, +{ 0x0310,0x0320,0x0360 }, +{ 0x0300,0x0310,0x0350 }, +{ 0x02f0,0x0300,0x0340 }, +{ 0x02f0,0x02f0,0x0330 }, +{ 0x02f0,0x02f0,0x0320 }, +{ 0x02f0,0x02f0,0x0310 }, +{ 0x0300,0x02f0,0x0300 }, +{ 0x0310,0x0300,0x02f0 }, +{ 0x0340,0x0320,0x02f0 }, +{ 0x0390,0x0350,0x02f0 }, +{ 0x03e0,0x0390,0x0300 }, +{ 0x0420,0x03e0,0x0310 }, +{ 0x0460,0x0420,0x0330 }, +{ 0x0490,0x0450,0x0350 }, +{ 0x04a0,0x04a0,0x03c0 }, +{ 0x0460,0x0490,0x0410 }, +{ 0x0440,0x0460,0x0470 }, +{ 0x0440,0x0440,0x04a0 }, +{ 0x0520,0x0480,0x0460 }, +{ 0x0800,0x0630,0x0440 }, +{ 0x0840,0x0840,0x0450 }, +{ 0x0840,0x0840,0x04e0 }, +}; + static inline int calc_lowcomp1(int a, int b0, int b1, int c) { if ((b0 + 256) == b1) { @@ -109,7 +191,7 @@ void ff_ac3_bit_alloc_calc_psd(int8_t *exp, int start, int end, int16_t *psd, int max = FFMAX(v, psd[bin]); /* logadd */ int adr = FFMIN(max - ((v + psd[bin] + 1) >> 1), 255); - v = max + ff_ac3_log_add_tab[adr]; + v = max + ac3_log_add_tab[adr]; } band_psd[band++] = v; } while (end > ff_ac3_band_start_tab[band]); @@ -183,7 +265,7 @@ int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd, if (tmp > 0) { excite[band] += tmp >> 2; } - mask[band] = FFMAX(ff_ac3_hearing_threshold_tab[band >> s->sr_shift][s->sr_code], excite[band]); + mask[band] = FFMAX(ac3_hearing_threshold_tab[band >> s->sr_shift][s->sr_code], excite[band]); } /* delta bit allocation */ diff --git a/libavcodec/ac3tab.c b/libavcodec/ac3tab.c index 766e293a1d..9344368a99 100644 --- a/libavcodec/ac3tab.c +++ b/libavcodec/ac3tab.c @@ -114,88 +114,6 @@ const uint8_t ff_eac3_default_cpl_band_struct[18] = { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1 }; -const uint8_t ff_ac3_log_add_tab[260]= { -0x40,0x3f,0x3e,0x3d,0x3c,0x3b,0x3a,0x39,0x38,0x37, -0x36,0x35,0x34,0x34,0x33,0x32,0x31,0x30,0x2f,0x2f, -0x2e,0x2d,0x2c,0x2c,0x2b,0x2a,0x29,0x29,0x28,0x27, -0x26,0x26,0x25,0x24,0x24,0x23,0x23,0x22,0x21,0x21, -0x20,0x20,0x1f,0x1e,0x1e,0x1d,0x1d,0x1c,0x1c,0x1b, -0x1b,0x1a,0x1a,0x19,0x19,0x18,0x18,0x17,0x17,0x16, -0x16,0x15,0x15,0x15,0x14,0x14,0x13,0x13,0x13,0x12, -0x12,0x12,0x11,0x11,0x11,0x10,0x10,0x10,0x0f,0x0f, -0x0f,0x0e,0x0e,0x0e,0x0d,0x0d,0x0d,0x0d,0x0c,0x0c, -0x0c,0x0c,0x0b,0x0b,0x0b,0x0b,0x0a,0x0a,0x0a,0x0a, -0x0a,0x09,0x09,0x09,0x09,0x09,0x08,0x08,0x08,0x08, -0x08,0x08,0x07,0x07,0x07,0x07,0x07,0x07,0x06,0x06, -0x06,0x06,0x06,0x06,0x06,0x06,0x05,0x05,0x05,0x05, -0x05,0x05,0x05,0x05,0x04,0x04,0x04,0x04,0x04,0x04, -0x04,0x04,0x04,0x04,0x04,0x03,0x03,0x03,0x03,0x03, -0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02, -0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; - -const uint16_t ff_ac3_hearing_threshold_tab[AC3_CRITICAL_BANDS][3]= { -{ 0x04d0,0x04f0,0x0580 }, -{ 0x04d0,0x04f0,0x0580 }, -{ 0x0440,0x0460,0x04b0 }, -{ 0x0400,0x0410,0x0450 }, -{ 0x03e0,0x03e0,0x0420 }, -{ 0x03c0,0x03d0,0x03f0 }, -{ 0x03b0,0x03c0,0x03e0 }, -{ 0x03b0,0x03b0,0x03d0 }, -{ 0x03a0,0x03b0,0x03c0 }, -{ 0x03a0,0x03a0,0x03b0 }, -{ 0x03a0,0x03a0,0x03b0 }, -{ 0x03a0,0x03a0,0x03b0 }, -{ 0x03a0,0x03a0,0x03a0 }, -{ 0x0390,0x03a0,0x03a0 }, -{ 0x0390,0x0390,0x03a0 }, -{ 0x0390,0x0390,0x03a0 }, -{ 0x0380,0x0390,0x03a0 }, -{ 0x0380,0x0380,0x03a0 }, -{ 0x0370,0x0380,0x03a0 }, -{ 0x0370,0x0380,0x03a0 }, -{ 0x0360,0x0370,0x0390 }, -{ 0x0360,0x0370,0x0390 }, -{ 0x0350,0x0360,0x0390 }, -{ 0x0350,0x0360,0x0390 }, -{ 0x0340,0x0350,0x0380 }, -{ 0x0340,0x0350,0x0380 }, -{ 0x0330,0x0340,0x0380 }, -{ 0x0320,0x0340,0x0370 }, -{ 0x0310,0x0320,0x0360 }, -{ 0x0300,0x0310,0x0350 }, -{ 0x02f0,0x0300,0x0340 }, -{ 0x02f0,0x02f0,0x0330 }, -{ 0x02f0,0x02f0,0x0320 }, -{ 0x02f0,0x02f0,0x0310 }, -{ 0x0300,0x02f0,0x0300 }, -{ 0x0310,0x0300,0x02f0 }, -{ 0x0340,0x0320,0x02f0 }, -{ 0x0390,0x0350,0x02f0 }, -{ 0x03e0,0x0390,0x0300 }, -{ 0x0420,0x03e0,0x0310 }, -{ 0x0460,0x0420,0x0330 }, -{ 0x0490,0x0450,0x0350 }, -{ 0x04a0,0x04a0,0x03c0 }, -{ 0x0460,0x0490,0x0410 }, -{ 0x0440,0x0460,0x0470 }, -{ 0x0440,0x0440,0x04a0 }, -{ 0x0520,0x0480,0x0460 }, -{ 0x0800,0x0630,0x0440 }, -{ 0x0840,0x0840,0x0450 }, -{ 0x0840,0x0840,0x04e0 }, -}; - const uint8_t ff_ac3_bap_tab[64]= { 0, 1, 1, 1, 1, 1, 2, 2, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, diff --git a/libavcodec/ac3tab.h b/libavcodec/ac3tab.h index bc470204fe..2d8d3a57f9 100644 --- a/libavcodec/ac3tab.h +++ b/libavcodec/ac3tab.h @@ -34,8 +34,6 @@ extern const int ff_ac3_sample_rate_tab[]; extern const uint16_t ff_ac3_bitrate_tab[19]; extern const uint8_t ff_ac3_rematrix_band_tab[5]; extern const uint8_t ff_eac3_default_cpl_band_struct[18]; -extern const uint8_t ff_ac3_log_add_tab[260]; -extern const uint16_t ff_ac3_hearing_threshold_tab[AC3_CRITICAL_BANDS][3]; extern const uint8_t ff_ac3_bap_tab[64]; extern const uint8_t ff_ac3_slow_decay_tab[4]; extern const uint8_t ff_ac3_fast_decay_tab[4]; From patchwork Thu May 12 12:21:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 35746 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a885:b0:7f:4be2:bd17 with SMTP id ca5csp423378pzb; Thu, 12 May 2022 05:23:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz9Ny26vWc7Fi/r/k2VzTJeKR3sWaYWkfm5uOjCIF70JE56P5SjT0IBLK16pxlWK27Gm4vX X-Received: by 2002:a17:906:4fd5:b0:6f8:5933:7073 with SMTP id i21-20020a1709064fd500b006f859337073mr25485049ejw.545.1652358214906; Thu, 12 May 2022 05:23:34 -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 i11-20020a50870b000000b00425e907deccsi7027709edb.257.2022.05.12.05.23.34; Thu, 12 May 2022 05:23:34 -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=L9D8xyMr; 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 74B9368AF87; Thu, 12 May 2022 15:23: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-am6eur05olkn2088.outbound.protection.outlook.com [40.92.91.88]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 50CE168AF87 for ; Thu, 12 May 2022 15:23:26 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WoU0DaHecs4Yj8zWXPq+8Nr901LyP+Hj2+S0lbKD+WraMl6Gn2jUivsjLxs1kjvw2X/ysgIOAdXrgqUWgjnMa/oGc9wC7u9b22TOAvw4SV1ENjE2Iss2laJLI6+R2lknIdXOd7ov/ww2x5/UXcPbn+BrYW05hRADxB9FcSbf71OQtez26KEXihSE3cOTO1ebstcB9nO+fq5DdoHzuPFubIWoRXeLpTqjHe/ScLU8F7oTjFTFqzeKQMZknlngnIgM5/o4pQDi5QBWHchFllyGtAntAPlv9g613ubWkWtWtOJX0tWuJOEk13ev0dkxuAJWCSdAQ4CoJ8SwWgvx7bTQAg== 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=bErvaHWEnQVC8gsG0L50P5vrMyaHSt3vAXVm/xr719M=; b=D3dOedj0Z5u7jb0ckVhmbFz+5HMewMKoGkxyv7VMk+VCVs+3lFxvNayB1FS0aexeGNUqf57WBgFtbCY8YqC/jlu4w0/eMTOLE84/euMVKQwXqYxxWnxpUeC4QL32tqPNLI/zFIC8eEsq5+F7D30AiAXJQhYuEC9Ka6RFX+6ZB7OtJWdghVgwOL1x9keVk7CG46PtpFJ5VYxoEiEixsCEXe46KMu48foJKeqTOL9Y/fYgO82zZX5QOFsgQllHLSw1T/rh3W6DAArF1w2a9f++oUZ5u3m5sX1ZvIQtok4QnMZhmJ53TzzyXGjvWelYn9QGjSNhBAK1ToosbOsEm8ciHA== 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=bErvaHWEnQVC8gsG0L50P5vrMyaHSt3vAXVm/xr719M=; b=L9D8xyMrQJa6e7ZFkOysT+qblkwBwUkwFVhDAQmhG8w8HyAANUFKfeNWuZJJmgLvYwyWbxlPtCbFXl4e7YJgYNSlv2Nu1rSYQI47LTEWbtALzi59u6KRqAm5HR7i5r1BK6dNjdqbYYLBesTB78G/oijKFYH8sa8CjevRhlRkwFwPP5sh2IQpp8k6k1p1DmiAm+f/pgDcMsRKCkNXXzS69jhZtV1icO0obWrPF1nExCcBHUbaGzn5br9w+693IAohKgHRmj+VSr68Z+Vn21YGI8R0H7cKWWSYZT91aOkx0fLmlGlDDKYh8LbfaKf8S27KKwv5fyrCvyLZtFGPR249hQ== Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) by AM0PR01MB5587.eurprd01.prod.exchangelabs.com (2603:10a6:208:16a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Thu, 12 May 2022 12:23:24 +0000 Received: from DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c]) by DB6PR0101MB2214.eurprd01.prod.exchangelabs.com ([fe80::60b9:9f29:40cc:f01c%9]) with mapi id 15.20.5227.023; Thu, 12 May 2022 12:23:24 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Thu, 12 May 2022 14:21:49 +0200 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [52JWwQ/o0fRrJAjjn4tjGTmTWf44MW+1] X-ClientProxiedBy: ZR0P278CA0151.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:41::12) To DB6PR0101MB2214.eurprd01.prod.exchangelabs.com (2603:10a6:4:42::27) X-Microsoft-Original-Message-ID: <20220512122149.1206887-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d8ec5124-680f-4a4c-c20e-08da341235bd X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNUDWtBrBvFH8VDhkDQ+7vTL/LZa9VgCpkbRos5/M7D+ZDA2F+FlZumINCkZquobCRW65m98mPVqYrHHBmiQXSEsmK8efzrA+yrxUWS35visWet32C0cDKzb5oCUl5O8MwnvHo7q6odOtUnxoDcL1SCUkjTwHSDiv877FE5ItFhutO2ih/uflWVRPTBUvZXZRYnoRW+Xq6G2fGZarkv/kNOgU3MG0DBVSQOcpHe8UBd0aQ3lCBdMj4230SDwtJchocqsbE23wSqPo/YSo+2GQVnFa9x49cOJc4e6UjyXoL2tXPySsAbNGbOzfX/3ttekyxl/juWXeYK3/kZNDcFl5Fj8DEgIWwWiY2RKCspwTJ3f4tQJ9RlOnGSbP4mkfhoOYR24UQD/piLJeGKWPAp4tehnCFRB/UtPi4UzvDuJjP1Dub3LrhYFjW6nfvYVllnH1l4Ayid8/QDKemj7ZlLvIreyXESiZAcEU2s7h5Sgs3n/lB6QJMQIWam3ZfmHsW7F3FtboKbk43bg3Os9d0VRM/NfPeQfxCSce8X9oB1DQFMbriuAVyzazrKBPNvwfSXzDuvEykEHrELP0fvcmzmCevg8rMVd2N7wZ5ejCJeclpmkWG5nuHKGnvE7tSP4zgMjsDJgtKmD1Yjeoyebaq87DpqOuGmhLpktShRw/4Nz0ndHgqEgvxHa6tyLohYLtmZA/qp4jtnLy+ceqlgwa30RgW/dwqHSiu8ISEo= X-MS-TrafficTypeDiagnostic: AM0PR01MB5587:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fmy10LkEryhkztzLgiUtjeMasMHmjk47neBJcOTcqR+xxbDuqMRWlkPe8IZ1lHy0zDOEgz/DhjwcbO3vkWbQlUBoC2GAPVsfUmMHGZuXozpZOZMVKP1U59gUFEFlTAP54juA7MDbxDcpNkBIE6N242q/if/jhuNfxfnCo9PmDgVHAEDvRef2czxlNGH03s/aUtosgStpirAUxZVz8MYXT8vKIVN4qvurTOxgIv+Hxgmg4+3ovnPuQj0b/JQbHnQRrAq+xvkSfQ6eR/uc9n+HltE+4yIXpsXHG/ZgWMtVcEe7pVXHSoyPuwoyhciZI61BDJ2tHJP7CpTRK0X0mvgz5JRDjijsNhbwDAadNUY3KIUX4+MBOMDq/HA8lG2HcrnTvWEDbALBfbnix5NsuytbkVXOXvRI5qXhosmeLhLSPUAxoAOK7emlTljlaCSTSk6+9m/wbtXXid7VhvUWLwYrR8uf9PmLUQdCAqqAfAvdDIm5Fr12KLiUhXDrk7Th7UuPwwiHrTekQecHRtVm4k4LH1KZmFlTIrjRtL25I9SIuoY/ydtEmSi0hw+cyPNZwPWgUV7IXx/e77OaSsItIb/axw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SSZs0CUywE/OpuckGei/I6+r2S7gf9zxbLEHy5SwlEk2hkwAoFSgXO6kpkdGbMFAjKZRNFNYTp+4Xv6fQ92DB8eFkHSsMOVKCVClyfGAU4+AjDbq3LndIJjJtIblnvrziJiQI76DmuIFr6a74XezikHwHEFSQd/SGyg8Zd+MWfAB6CuvDDp1LjTwEsVJXPypR82+unk3nwqfqQ8N2BMQOBcNV/yMaSNBW+eivkx/tmjQL6nUX2Q0+XbmMUNsSv6fIqgHpfE2aDJiVT5MvalT7opBmw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BDrmI6lwGP0atHEdtqPCnFlch2r+b4z6W8j/5D7v8qvYZOovzNFE14FYV5LeCGyI5F7Yn3rCTUSgY/Tr24j/fksx07xfqP4kAsLRTbHtVEaYkL0eZ9Uconj82p++HCSO X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d8ec5124-680f-4a4c-c20e-08da341235bd X-MS-Exchange-CrossTenant-AuthSource: DB6PR0101MB2214.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2022 12:23:24.6717 (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: AM0PR01MB5587 Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/ac3: Move non-(de|en)coder-only parts out of ac3.h 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: 5ebGvnyOVd+f Move AC3HeaderInfo into ac3_parser_internal.h and the rest into a new header ac3defs.h. This also breaks an include cycle of ac3.h and ac3tab.h (the latter now only needs ac3defs.h). Signed-off-by: Andreas Rheinhardt --- libavcodec/ac3.c | 1 + libavcodec/ac3.h | 115 ---------------------------- libavcodec/ac3_parser.c | 2 + libavcodec/ac3_parser_internal.h | 41 +++++++++- libavcodec/ac3dec.c | 1 + libavcodec/ac3dec_data.c | 1 - libavcodec/ac3defs.h | 104 +++++++++++++++++++++++++ libavcodec/ac3dsp.c | 3 +- libavcodec/ac3enc.c | 2 + libavcodec/ac3enc.h | 1 + libavcodec/ac3tab.c | 1 - libavcodec/ac3tab.h | 2 +- libavcodec/eac3_data.c | 2 +- libavcodec/mips/ac3dsp_mips.c | 1 + libavcodec/x86/ac3dsp_init.c | 1 - libavformat/hls_sample_encryption.c | 1 + libavformat/spdifdec.c | 2 +- libavformat/spdifenc.c | 2 +- 18 files changed, 159 insertions(+), 124 deletions(-) create mode 100644 libavcodec/ac3defs.h diff --git a/libavcodec/ac3.c b/libavcodec/ac3.c index 01fb3b3d7a..60491d1a7a 100644 --- a/libavcodec/ac3.c +++ b/libavcodec/ac3.c @@ -28,6 +28,7 @@ #include "libavutil/macros.h" #include "ac3.h" +#include "ac3defs.h" /** * Starting frequency coefficient bin for each critical band. diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h index 8e66d47629..29f9f9df8d 100644 --- a/libavcodec/ac3.h +++ b/libavcodec/ac3.h @@ -30,28 +30,8 @@ #include #include -#define EAC3_MAX_CHANNELS 16 /**< maximum number of channels in EAC3 */ -#define AC3_MAX_CHANNELS 7 /**< maximum number of channels, including coupling channel */ -#define CPL_CH 0 /**< coupling channel index */ - -#define AC3_MAX_COEFS 256 -#define AC3_BLOCK_SIZE 256 -#define AC3_MAX_BLOCKS 6 -#define AC3_FRAME_SIZE (AC3_MAX_BLOCKS * 256) -#define AC3_WINDOW_SIZE (AC3_BLOCK_SIZE * 2) -#define AC3_CRITICAL_BANDS 50 -#define AC3_MAX_CPL_BANDS 18 - #include "ac3tab.h" -/* exponent encoding strategy */ -#define EXP_REUSE 0 -#define EXP_NEW 1 - -#define EXP_D15 1 -#define EXP_D25 2 -#define EXP_D45 3 - #ifndef USE_FIXED #define USE_FIXED 0 #endif @@ -112,58 +92,6 @@ typedef float SHORTFLOAT; #define LEVEL_ZERO 0.0000000000000000 #define LEVEL_ONE 1.0000000000000000 -/** Delta bit allocation strategy */ -typedef enum { - DBA_REUSE = 0, - DBA_NEW, - DBA_NONE, - DBA_RESERVED -} AC3DeltaStrategy; - -/** Channel mode (audio coding mode) */ -typedef enum { - AC3_CHMODE_DUALMONO = 0, - AC3_CHMODE_MONO, - AC3_CHMODE_STEREO, - AC3_CHMODE_3F, - AC3_CHMODE_2F1R, - AC3_CHMODE_3F1R, - AC3_CHMODE_2F2R, - AC3_CHMODE_3F2R -} AC3ChannelMode; - -/** Dolby Surround mode */ -typedef enum AC3DolbySurroundMode { - AC3_DSURMOD_NOTINDICATED = 0, - AC3_DSURMOD_OFF, - AC3_DSURMOD_ON, - AC3_DSURMOD_RESERVED -} AC3DolbySurroundMode; - -/** Dolby Surround EX mode */ -typedef enum AC3DolbySurroundEXMode { - AC3_DSUREXMOD_NOTINDICATED = 0, - AC3_DSUREXMOD_OFF, - AC3_DSUREXMOD_ON, - AC3_DSUREXMOD_PLIIZ -} AC3DolbySurroundEXMode; - -/** Dolby Headphone mode */ -typedef enum AC3DolbyHeadphoneMode { - AC3_DHEADPHONMOD_NOTINDICATED = 0, - AC3_DHEADPHONMOD_OFF, - AC3_DHEADPHONMOD_ON, - AC3_DHEADPHONMOD_RESERVED -} AC3DolbyHeadphoneMode; - -/** Preferred Stereo Downmix mode */ -typedef enum AC3PreferredStereoDownmixMode { - AC3_DMIXMOD_NOTINDICATED = 0, - AC3_DMIXMOD_LTRT, - AC3_DMIXMOD_LORO, - AC3_DMIXMOD_DPLII // reserved value in A/52, but used by encoders to indicate DPL2 -} AC3PreferredStereoDownmixMode; - typedef struct AC3BitAllocParameters { int sr_code; int sr_shift; @@ -171,49 +99,6 @@ typedef struct AC3BitAllocParameters { int cpl_fast_leak, cpl_slow_leak; } AC3BitAllocParameters; -/** - * @struct AC3HeaderInfo - * Coded AC-3 header values up to the lfeon element, plus derived values. - */ -typedef struct AC3HeaderInfo { - /** @name Coded elements - * @{ - */ - uint16_t sync_word; - uint16_t crc1; - uint8_t sr_code; - uint8_t bitstream_id; - uint8_t bitstream_mode; - uint8_t channel_mode; - uint8_t lfe_on; - uint8_t frame_type; - int substreamid; ///< substream identification - int center_mix_level; ///< Center mix level index - int surround_mix_level; ///< Surround mix level index - uint16_t channel_map; - int num_blocks; ///< number of audio blocks - int dolby_surround_mode; - /** @} */ - - /** @name Derived values - * @{ - */ - uint8_t sr_shift; - uint16_t sample_rate; - uint32_t bit_rate; - uint8_t channels; - uint16_t frame_size; - uint64_t channel_layout; - /** @} */ -} AC3HeaderInfo; - -typedef enum { - EAC3_FRAME_TYPE_INDEPENDENT = 0, - EAC3_FRAME_TYPE_DEPENDENT, - EAC3_FRAME_TYPE_AC3_CONVERT, - EAC3_FRAME_TYPE_RESERVED -} EAC3FrameType; - /** * Calculate the log power-spectral density of the input signal. * This gives a rough estimate of signal power in the frequency domain by using diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c index 86e8d417eb..119b1598c5 100644 --- a/libavcodec/ac3_parser.c +++ b/libavcodec/ac3_parser.c @@ -25,6 +25,8 @@ #include "libavutil/channel_layout.h" #include "parser.h" +#include "ac3defs.h" +#include "ac3tab.h" #include "ac3_parser.h" #include "ac3_parser_internal.h" #include "aac_ac3_parser.h" diff --git a/libavcodec/ac3_parser_internal.h b/libavcodec/ac3_parser_internal.h index 3648802a73..dd57dc95a6 100644 --- a/libavcodec/ac3_parser_internal.h +++ b/libavcodec/ac3_parser_internal.h @@ -21,9 +21,48 @@ #ifndef AVCODEC_AC3_PARSER_INTERNAL_H #define AVCODEC_AC3_PARSER_INTERNAL_H -#include "ac3.h" +#include +#include + +#include "ac3defs.h" #include "get_bits.h" +/** + * @struct AC3HeaderInfo + * Coded AC-3 header values up to the lfeon element, plus derived values. + */ +typedef struct AC3HeaderInfo { + /** @name Coded elements + * @{ + */ + uint16_t sync_word; + uint16_t crc1; + uint8_t sr_code; + uint8_t bitstream_id; + uint8_t bitstream_mode; + uint8_t channel_mode; + uint8_t lfe_on; + uint8_t frame_type; + int substreamid; ///< substream identification + int center_mix_level; ///< Center mix level index + int surround_mix_level; ///< Surround mix level index + uint16_t channel_map; + int num_blocks; ///< number of audio blocks + int dolby_surround_mode; + /** @} */ + + /** @name Derived values + * @{ + */ + uint8_t sr_shift; + uint16_t sample_rate; + uint32_t bit_rate; + uint8_t channels; + uint16_t frame_size; + uint64_t channel_layout; + /** @} */ +} AC3HeaderInfo; + /** * Parse AC-3 frame header. * Parse the header up to the lfeon element, which is the first 52 or 54 bits diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index fe330d0d3b..ad2b3615c8 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -43,6 +43,7 @@ #include "ac3_parser_internal.h" #include "ac3dec.h" #include "ac3dec_data.h" +#include "ac3defs.h" #include "kbdwin.h" /** diff --git a/libavcodec/ac3dec_data.c b/libavcodec/ac3dec_data.c index d0a9b1ec40..a3794ab223 100644 --- a/libavcodec/ac3dec_data.c +++ b/libavcodec/ac3dec_data.c @@ -25,7 +25,6 @@ */ #include "ac3dec_data.h" -#include "ac3.h" /** * Table used to ungroup 3 values stored in 5 bits. diff --git a/libavcodec/ac3defs.h b/libavcodec/ac3defs.h new file mode 100644 index 0000000000..ff92f0ac4a --- /dev/null +++ b/libavcodec/ac3defs.h @@ -0,0 +1,104 @@ +/* + * Common AC-3 definitions + * Copyright (c) 2000, 2001, 2002 Fabrice Bellard + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef AVCODEC_AC3DEFS_H +#define AVCODEC_AC3DEFS_H + +#define EAC3_MAX_CHANNELS 16 /**< maximum number of channels in EAC3 */ +#define AC3_MAX_CHANNELS 7 /**< maximum number of channels, including coupling channel */ +#define CPL_CH 0 /**< coupling channel index */ + +#define AC3_MAX_COEFS 256 +#define AC3_BLOCK_SIZE 256 +#define AC3_MAX_BLOCKS 6 +#define AC3_FRAME_SIZE (AC3_MAX_BLOCKS * 256) +#define AC3_WINDOW_SIZE (AC3_BLOCK_SIZE * 2) +#define AC3_CRITICAL_BANDS 50 +#define AC3_MAX_CPL_BANDS 18 + +/* exponent encoding strategy */ +#define EXP_REUSE 0 +#define EXP_NEW 1 + +#define EXP_D15 1 +#define EXP_D25 2 +#define EXP_D45 3 + +/** Delta bit allocation strategy */ +typedef enum { + DBA_REUSE = 0, + DBA_NEW, + DBA_NONE, + DBA_RESERVED +} AC3DeltaStrategy; + +/** Channel mode (audio coding mode) */ +typedef enum { + AC3_CHMODE_DUALMONO = 0, + AC3_CHMODE_MONO, + AC3_CHMODE_STEREO, + AC3_CHMODE_3F, + AC3_CHMODE_2F1R, + AC3_CHMODE_3F1R, + AC3_CHMODE_2F2R, + AC3_CHMODE_3F2R +} AC3ChannelMode; + +/** Dolby Surround mode */ +typedef enum AC3DolbySurroundMode { + AC3_DSURMOD_NOTINDICATED = 0, + AC3_DSURMOD_OFF, + AC3_DSURMOD_ON, + AC3_DSURMOD_RESERVED +} AC3DolbySurroundMode; + +/** Dolby Surround EX mode */ +typedef enum AC3DolbySurroundEXMode { + AC3_DSUREXMOD_NOTINDICATED = 0, + AC3_DSUREXMOD_OFF, + AC3_DSUREXMOD_ON, + AC3_DSUREXMOD_PLIIZ +} AC3DolbySurroundEXMode; + +/** Dolby Headphone mode */ +typedef enum AC3DolbyHeadphoneMode { + AC3_DHEADPHONMOD_NOTINDICATED = 0, + AC3_DHEADPHONMOD_OFF, + AC3_DHEADPHONMOD_ON, + AC3_DHEADPHONMOD_RESERVED +} AC3DolbyHeadphoneMode; + +/** Preferred Stereo Downmix mode */ +typedef enum AC3PreferredStereoDownmixMode { + AC3_DMIXMOD_NOTINDICATED = 0, + AC3_DMIXMOD_LTRT, + AC3_DMIXMOD_LORO, + AC3_DMIXMOD_DPLII // reserved value in A/52, but used by encoders to indicate DPL2 +} AC3PreferredStereoDownmixMode; + +typedef enum { + EAC3_FRAME_TYPE_INDEPENDENT = 0, + EAC3_FRAME_TYPE_DEPENDENT, + EAC3_FRAME_TYPE_AC3_CONVERT, + EAC3_FRAME_TYPE_RESERVED +} EAC3FrameType; + +#endif /* AVCODEC_AC3DEFS_H */ diff --git a/libavcodec/ac3dsp.c b/libavcodec/ac3dsp.c index d006ca8c0a..b41f436967 100644 --- a/libavcodec/ac3dsp.c +++ b/libavcodec/ac3dsp.c @@ -29,8 +29,9 @@ #include "libavutil/intmath.h" #include "libavutil/mem_internal.h" -#include "ac3.h" +#include "ac3defs.h" #include "ac3dsp.h" +#include "ac3tab.h" #include "mathops.h" static void ac3_exponent_min_c(uint8_t *exp, int num_reuse_blocks, int nb_coefs) diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 7efa1d122c..c57904b01b 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -47,6 +47,8 @@ #include "audiodsp.h" #include "ac3dsp.h" #include "ac3.h" +#include "ac3defs.h" +#include "ac3tab.h" #include "fft.h" #include "ac3enc.h" #include "eac3enc.h" diff --git a/libavcodec/ac3enc.h b/libavcodec/ac3enc.h index d87ec94096..f0dc006759 100644 --- a/libavcodec/ac3enc.h +++ b/libavcodec/ac3enc.h @@ -32,6 +32,7 @@ #include "libavutil/opt.h" #include "ac3.h" +#include "ac3defs.h" #include "ac3dsp.h" #include "avcodec.h" #include "codec_internal.h" diff --git a/libavcodec/ac3tab.c b/libavcodec/ac3tab.c index 9344368a99..48c89a8ba0 100644 --- a/libavcodec/ac3tab.c +++ b/libavcodec/ac3tab.c @@ -26,7 +26,6 @@ #include "libavutil/channel_layout.h" -#include "ac3.h" #include "ac3tab.h" /** diff --git a/libavcodec/ac3tab.h b/libavcodec/ac3tab.h index 2d8d3a57f9..2531d80677 100644 --- a/libavcodec/ac3tab.h +++ b/libavcodec/ac3tab.h @@ -24,7 +24,7 @@ #include -#include "ac3.h" +#include "ac3defs.h" extern const uint16_t ff_ac3_frame_size_tab[38][3]; extern const uint8_t ff_ac3_channels_tab[8]; diff --git a/libavcodec/eac3_data.c b/libavcodec/eac3_data.c index 2ef0e2053c..d556d35b82 100644 --- a/libavcodec/eac3_data.c +++ b/libavcodec/eac3_data.c @@ -27,7 +27,7 @@ #include #include "eac3_data.h" -#include "ac3.h" +#include "ac3defs.h" const uint8_t ff_eac3_bits_vs_hebap[20] = { 0, 2, 3, 4, 5, 7, 8, 9, 3, 4, diff --git a/libavcodec/mips/ac3dsp_mips.c b/libavcodec/mips/ac3dsp_mips.c index e5cee16081..8f62c03aaf 100644 --- a/libavcodec/mips/ac3dsp_mips.c +++ b/libavcodec/mips/ac3dsp_mips.c @@ -56,6 +56,7 @@ #include "config.h" #include "libavcodec/ac3dsp.h" #include "libavcodec/ac3.h" +#include "libavcodec/ac3tab.h" #include "libavutil/mips/asmdefs.h" #if HAVE_INLINE_ASM diff --git a/libavcodec/x86/ac3dsp_init.c b/libavcodec/x86/ac3dsp_init.c index 923c3e0a31..5f20e6dc31 100644 --- a/libavcodec/x86/ac3dsp_init.c +++ b/libavcodec/x86/ac3dsp_init.c @@ -22,7 +22,6 @@ #include "libavutil/attributes.h" #include "libavutil/x86/asm.h" #include "libavutil/x86/cpu.h" -#include "libavcodec/ac3.h" #include "libavcodec/ac3dsp.h" void ff_ac3_exponent_min_mmx (uint8_t *exp, int num_reuse_blocks, int nb_coefs); diff --git a/libavformat/hls_sample_encryption.c b/libavformat/hls_sample_encryption.c index 08cdf964b6..089662905b 100644 --- a/libavformat/hls_sample_encryption.c +++ b/libavformat/hls_sample_encryption.c @@ -33,6 +33,7 @@ #include "libavcodec/adts_header.h" #include "libavcodec/adts_parser.h" +#include "libavcodec/ac3tab.h" #include "libavcodec/ac3_parser_internal.h" diff --git a/libavformat/spdifdec.c b/libavformat/spdifdec.c index e39a304247..2af75ca9db 100644 --- a/libavformat/spdifdec.c +++ b/libavformat/spdifdec.c @@ -27,7 +27,7 @@ #include "libavutil/bswap.h" -#include "libavcodec/ac3.h" +#include "libavcodec/ac3defs.h" #include "libavcodec/adts_parser.h" #include "avformat.h" diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c index 3be89328df..0a634e4232 100644 --- a/libavformat/spdifenc.c +++ b/libavformat/spdifenc.c @@ -49,7 +49,7 @@ #include "avformat.h" #include "avio_internal.h" #include "spdif.h" -#include "libavcodec/ac3.h" +#include "libavcodec/ac3defs.h" #include "libavcodec/adts_parser.h" #include "libavcodec/dca.h" #include "libavcodec/dca_syncwords.h"