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/btQ8cKWiT0P0goehyhtr7PHqbEi3Od8VP5lxQ5W0DL2Jex7JR3pqDkDvEwq2+FadLdSsE6/RWJDpQ2DD+DIoZkZFVDHDdLhdnLeNGm/v2tg0h+FkJf9MEMQEjM6ejE7UKy+yhqiQEvuKwLuQ4kE+uRtKESwDAGMTclwC4oJMnYiGGiMUPmmTvOZLyw/+s6POf39yYHyDb/ilHXp/S04uSsgHlgVbjiHm+cgDlPA5VN8wY1OaT3w48HUkvXJfaSQO9kRWUE5p1dFKAf0Ws5CNCMhGH8Jnr0Z62IplhhQNf/YM2QKCR/9J9cyyKZUsQQ2dareeEdBjOzVTs/qLhZwn4IBF0FsmKjMtV0Ma5tND4JPpU+hGsTOPqnA2d9ohGBRH9qkflqGl67TttHyUFEFOmHBx0zmJGvEMJGnk56VXT06mF1LeY6Ubu0VjH6Xy1VlOq4n3fBh8s5zBJ85KMADEuFMP3Yl4xq8jShnqllYl9SCSg2BiN855Z6fwAMkUBGS5F/pESxtTTSkqgqOEQbBJM7OS5KITyvk7/kxhKEGAoE0Vg6jG3FfdMLlYGolBWBKGGsB0n7Umfd5Cosjzw61MwK5Wq4KIQYjFEmfNu2W/QGkEfjdKETIX0OOV8Y4W2PUU6KhiLRFU7uUGP9VfoW3f2foBe2AuhYBvpZDo13NjtZfgh0d6pb8O65lm5hZnZeJHRomG5aanAnM9bckxvdcqR2JbkIIQKckzrhBDMPvbC2wzVW1Hcs7aXAdc5hm0Pip/yC7plHz28= X-MS-TrafficTypeDiagnostic: AM0PR01MB5587:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AUU4a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ossTenant-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];