From patchwork Sat Oct 22 13:57:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38907 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1301953pzb; Sat, 22 Oct 2022 06:57:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4kd1WUOp/18ipRWa0C+4u7YrSdJ36RFm7PaONPoCYMJs4Z2jMg9gL0nGVDY8CpAuwYGWoa X-Received: by 2002:a17:906:cc5c:b0:7a0:a52:8c05 with SMTP id mm28-20020a170906cc5c00b007a00a528c05mr3578082ejb.686.1666447061196; Sat, 22 Oct 2022 06:57:41 -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 x19-20020a1709064bd300b0078e063fc78csi18535561ejv.576.2022.10.22.06.57.39; Sat, 22 Oct 2022 06:57:41 -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=PmjFFqX9; 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 36FBB68BE3B; Sat, 22 Oct 2022 16:57:35 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2061.outbound.protection.outlook.com [40.92.89.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 04C3268BD56 for ; Sat, 22 Oct 2022 16:57:28 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NePnpzt/OP8aeXSiKXDMVnOHwEmVjOG2fhIkb2V4U5GAmLhBCsy+jpAhlqMEU7IvhP7kidrD00dgmHTWu50bp8ziVPVMmMW/HAxRAzLa2lspuWyJs6uCWv2/hCcG3QBX9pS4xiIjQvoswKZh1bJB76VxxhVmKExYE8Bizd/3AyGHzE2tdmHAjRUvKB0RnDmf4IiFVu/BtdnZefMEmin29n0s/1G5jIg3+rDj546J6DG63B4RX3C7sBwkaofIHtGLJkVYfRngBjL9FAfur2CaiPE9WaEXLEnnIndu5Ro7mm1c60sCuKuLz70oHaIRQrz++tRpqjrH3lmoV264VVCHfA== 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=PhA6USl2XURJSVc96U7PQPMwDHNo0TWhmgTyNOEytV4=; b=lJQxIEJsp2icLcM2mjYUAEjF2OpZ+Tv0LGrhzarpyuti+fqXwRePY1MSQZrH9IKakNnEBT2vcUy7AHp0PkV/QfnvMHYXJexjM4HtD2DL/HNnYXm/9C8109gsMzpM0TYkI56uv3t1CkvDQFyy1cjcm0UezyKQpoAxWsKWMICYwYD3BbmkT38VVuC5S/7ax6BDW8VisaGT36eGxM9vx69Ssyy0NdBBQvujjnCH1S1gLzV/uF2Ic7OJIUZzvDfWfEH44MiGa+LKCn1xmxWpquBrZbvT7mXGNn4Rz4ERCB1g4e0zxvD2/sLZ90zZuCb4WYhtB9+AiphsaXMp89S1ZG6pKQ== 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=PhA6USl2XURJSVc96U7PQPMwDHNo0TWhmgTyNOEytV4=; b=PmjFFqX987XCeU9YVx32Wd/GzK+7Y/8L7dl+YP1AkbQdlAF4ppMsCbHIhIURwgZKoFrdsxmq9ENUsKc+UYQymd7R5aOTSxTbA7AoNeT4Wtxos4zZndi87/lKe05qotaGjvjH9362knmRXF2pQ5QsUtQVV7630eNBIufIK/K4Rc4ivjpHEbUoW7lDN1w+DLyejJTHW4NMVjs87S7w39K47P39TudCDdTZY2Dg7pzVFK8EkLh/nH8URgEETKq2cDtg0DtdgN3PYSheqn7XAXZF15wV11tB1v11N/MierFYWbbwz+J4M4stWNuzU72/6SbWsNqjkYEr4H7R+xdic/nFAA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS8P250MB0268.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Sat, 22 Oct 2022 13:57:27 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Sat, 22 Oct 2022 13:57:27 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 22 Oct 2022 15:57:28 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [c9fdVn5XjZVudmYIAkaMB4vY/LbiqsM6DsjJa6qAXDs=] X-ClientProxiedBy: AS9PR06CA0516.eurprd06.prod.outlook.com (2603:10a6:20b:49d::10) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221022135732.3949849-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS8P250MB0268:EE_ X-MS-Office365-Filtering-Correlation-Id: 4e95ef39-5f5c-4478-7ac6-08dab4355a86 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmpHExMQwxFirrqTEkmNulLLyR5PhVcWcffhbdBG/CIkl23B0Om5gwXJDIJY1KMw3Oy9/+F4pmU+5ftpYVYjhYb8u/Ulf/jXeHA+JvUU3yNwCnsEBJ8IqxzZ8YUJOq9zJbE/g/Fow3eclvbTmltFOVPQWK02ARkX9BghO0G1JXAWRM5TRxiZvh+086MWZh0p0n4z+n44wybVDUl/qDSWG75dGWMe6U+pkcofVcQnfYEn3bSaUmAkXWUh0jwr1nSsRYQ5g0Tt1qnSmYFtYPgyA5EOMBgiAyGn2orsZqTVKh3yCqTfKTGq33hpVxOI4jP5DxQkzhWgfd5y5oeRq7h0+VMlzUAg3ySr3wsyJGA2kjVL+rPYGwSbOEq/y4b77dJ6IQgFo8eXHgQBgVKteyPvwCe9LdDIrJsNPKsYrSstEA/IWrgNXhjY3a+mM9PyhPnFGUYcNLV8YnGy8Q+AM6wvznKsJSfYBgEx3Bwmz1xmACZ/KQrwLUXACD76JoEXpjbPfcPI//Xw5dUy/+Bonag/4vVW0DY01Cfxts30Ax3MWhVgAI5gdjTrGAPmcuRUrWFxpRk2MrS76d0wSd6yZzu86KgJmRlNh0nEBs3knrqjUJfG339Y64WZQNcgWo3fHE5Pdf1PiUJ7VK7l4H5Z5P9s07UoXzctSUkcIGbfR4c1fPADhe79bVU9mxprG9l9ju5kX+sBMVnHLvJ/ViAwBOWor6TpBScsUwEsCu18iKp1luVilYzZGTP7sQu2ts3D9AyJkiA= X-Microsoft-Antispam: BCL:0; X-Microsoft-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e95ef39-5f5c-4478-7ac6-08dab4355a86 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2022 13:57:27.4343 (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: AS8P250MB0268 Subject: [FFmpeg-devel] [PATCH 1/5] avformat/argo_cvg: Mark overrides as const 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: P4D21AHm+rmm Signed-off-by: Andreas Rheinhardt --- libavformat/argo_cvg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/argo_cvg.c b/libavformat/argo_cvg.c index edf75c905e..aedc7c4a32 100644 --- a/libavformat/argo_cvg.c +++ b/libavformat/argo_cvg.c @@ -70,7 +70,7 @@ typedef struct ArgoCVGMuxContext { #if CONFIG_ARGO_CVG_DEMUXER /* "Special" files that are played at a different rate. */ -static ArgoCVGOverride overrides[] = { +static const ArgoCVGOverride overrides[] = { { "CRYS.CVG", { 23592, 0, 1 }, 2495499, 88200 }, /* Beta */ { "REDCRY88.CVG", { 38280, 0, 1 }, 4134848, 88200 }, /* Beta */ { "DANLOOP1.CVG", { 54744, 1, 0 }, 5684641, 37800 }, /* Beta */ From patchwork Sat Oct 22 13:59:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38908 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1302375pzb; Sat, 22 Oct 2022 06:59:15 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4cXgIPy5SMqq78oRm+coARtUsGZL7+UHOGI5HSDOOgqW/faukZJjif1xpEyC7i8t/hXbP6 X-Received: by 2002:a17:907:a065:b0:78d:c5dd:45cf with SMTP id ia5-20020a170907a06500b0078dc5dd45cfmr20427130ejc.117.1666447152175; Sat, 22 Oct 2022 06:59:12 -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 m4-20020a1709062b8400b0073155abc1b8si19236159ejg.154.2022.10.22.06.59.11; Sat, 22 Oct 2022 06:59:12 -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=Ens7WOSh; 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 5A76568BEB4; Sat, 22 Oct 2022 16:59:09 +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-am6eur05olkn2048.outbound.protection.outlook.com [40.92.91.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2897168BD56 for ; Sat, 22 Oct 2022 16:59:03 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UWf6XGC2UDuuqgxFJd3c8CPQ9Jqm1p+ThzDoWUeDJisUE65mGgb4gnPQNR3uk47jDCfWUkQSHR3LQpk4h9gR8Dw84l5rEW/0sYHkxIc2O2JBOAUEb4V5szSq8i255xEjpxz9zsjegb/ZUSNtLdmW0x4hFq6KQaJaQ/AWKbD4gO/UvLF9cqjWuN7tqoHBX3bjtFmH2ooGhAuw6w+U+aLUk72yj7eNiyXMlgSkdzxxnwKG/St1SrnXuJzFGjJ1xH+E7hoSfZ2GDdKtJCeuP6rvIosmDOSjNhz8U6EguHcpuSkOM2b0vqsRWBEx3jQW8AebdgfpyGHm7ay1GhMkb4LqBQ== 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=G/tw7JYe6N1u65gdxHQNWuCX96JJ4FJ6TvRKh3XGy/Q=; b=EELCujIv8YBZVxEVUQJVQjzKFyKqC1S3rHH69QSzJRZ5Ywdz51X5E5V4xTS2ljs0dc/YNZ3Wy4DmAD6lAdf+lVID2+Fa8EJk8AYEKoFKfICAfxeuys++iEUlylCFz/f7DiNC0CELsZ282HLz5B77BGLiB+f0VMtcLbd24mtpau4HkH8OjiGnRM9SoY4qbZvWJvtjzVl50PZF6BjnTpfO72+WC9pdT7USFEX3HjL8F5cfY9DZfYLOiYdrRV9VhnabYDStaNaRWSvnrB3nolRqEguLYBQjZ7Wpt7aNgiNnQVzpXZFkH4xftif/tpBELtatPMrI/v0X3rQcjp+KuL8lig== 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=G/tw7JYe6N1u65gdxHQNWuCX96JJ4FJ6TvRKh3XGy/Q=; b=Ens7WOSh+FgVObiUAYm7MqUviAPelmkfAYkAknRQ7eR4NNsH1xQXsGKeIkWCBxYi5rEuRqxefIAQW7rf0k2sOZeDwFf4gmSET231GLdS1khCxO6Sw+JXMrZzwf4sxcFUlQWXFJaBJWjfnz6AwRtE2BFiHsXBjvV1YdGZdmhte2PYr1Y/RoqDtXB6K1cPWrdFXaIEFyO8v3S7MFJ6okb2ZIFZiYBVy7guJeU2HMt0MHHFFrAkprY1sv/Y+uBpYj3gFpYKiq6+CqMyqWVauJbgOnzjDV9/bv1VD29zaydJGvLKodR+edxstLdCEkfs8n/kerDQB1MO9sVXubGysoHqrA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS8P250MB0268.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Sat, 22 Oct 2022 13:58:59 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Sat, 22 Oct 2022 13:58:59 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 22 Oct 2022 15:59:00 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [KRN3qbo3Si7GQul1imEXXgsMZDKyGxShsi29oJ6Yk0o=] X-ClientProxiedBy: AS9PR06CA0368.eurprd06.prod.outlook.com (2603:10a6:20b:460::32) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221022135903.3949890-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS8P250MB0268:EE_ X-MS-Office365-Filtering-Correlation-Id: c58b3d9a-3eef-4f36-cdab-08dab4359184 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmpHExMQwxFirrqTEkmNulLLgQYiI2zc1xzyURJ0pwtNOdr+MGcT/IVmu4sTSs/NXBVtG/3cF3v6lR+c4xMuxIsSe3Bqc/8U1oCFPo+3AF9AUljdeqdvSr7U7irBxxIcaQSa41FKaIBmz950J3T1SvwQG49j9XrGfvYlVP7XPcPqjy5yk9Vx/3tEUfsTIvrfVhgXUXTdyZfIT+SoLDR8jYlgBS/JCnpouWEb5dTFR4VI66jK4OoTadtJ0BoOjUokU9EojoZzmVuFgVO8TOsayOy2DF2RzvLLXzPgvbA7KOp67Gfr2IG7OVMv+WPf7dPmjyYHy0YzYHuJkR98cOkz5crwBWiuxmRffr3qdIKrbnLl6WvGmliRW62cZyiwoUN+hg6NqGs/3Ag6QBdG82aZtwC3fwJACy9b2wCjskhc6Sy5bP7yC74e5W3cA8yigK9/OQV7rD1X9n8AXfTSNQuykbkkiXj8bnCMkCvrQGfwSY3WXoosSc4Plg1RjhxlZmX4son/LP43u7S9es3+UQHqknSVFDBph3K+r6ZuhC+tTzTOj2Rkr+Lvchk/1cuDrHzud9BQW9qAD0h7KFz/HyjdQdfRkqueTRJs/G5sLguXU74/NbYzU7gp03bJstofaVZ9ml6B2Ok83xUdkVDzDIaXTJci1WVpxbXH7f4bzEtu0Z91SCWKa8CCOiQk6/DS1w1DKQWVXrirqh7BHHR90daO3bU8s3IW56j1NM2Px03nleDyTB5xG54Ft/0acM5PWMzeRb8= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tuX4yl8wHYQMJ48xChuj25AA9sSAU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Tenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2022 13:58:59.8843 (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: AS8P250MB0268 Subject: [FFmpeg-devel] [PATCH 2/5] avcodec/aaccoder: Mark function pointer arrays as const 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: qrZhRrw72tNq Forgotten in 57d305207a30131172e1c07c99e2cba833c1add1. Signed-off-by: Andreas Rheinhardt --- libavcodec/aaccoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c index e3b6b2f02c..6291c16123 100644 --- a/libavcodec/aaccoder.c +++ b/libavcodec/aaccoder.c @@ -226,7 +226,7 @@ QUANTIZE_AND_ENCODE_BAND_COST_FUNC(ESC_RTZ, 0, 1, 1, 1, 0, 0, ROUND_TO_ZERO) QUANTIZE_AND_ENCODE_BAND_COST_FUNC(NOISE, 0, 0, 0, 0, 1, 0, ROUND_STANDARD) QUANTIZE_AND_ENCODE_BAND_COST_FUNC(STEREO,0, 0, 0, 0, 0, 1, ROUND_STANDARD) -static quantize_and_encode_band_func quantize_and_encode_band_cost_arr[] = +static const quantize_and_encode_band_func quantize_and_encode_band_cost_arr[] = { quantize_and_encode_band_cost_ZERO, quantize_and_encode_band_cost_SQUAD, @@ -246,7 +246,7 @@ static quantize_and_encode_band_func quantize_and_encode_band_cost_arr[] = quantize_and_encode_band_cost_STEREO, }; -static quantize_and_encode_band_func quantize_and_encode_band_cost_rtz_arr[] = +static const quantize_and_encode_band_func quantize_and_encode_band_cost_rtz_arr[] = { quantize_and_encode_band_cost_ZERO, quantize_and_encode_band_cost_SQUAD, From patchwork Sat Oct 22 13:59:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38909 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1302404pzb; Sat, 22 Oct 2022 06:59:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4JnEt4yCjppa3xtSFrR3ac+NwkhgQUs2cTTa0aH0xt/gLtuxeMMlXwZsEVidZkIPFrRd4/ X-Received: by 2002:a17:907:9495:b0:78e:1bee:5919 with SMTP id dm21-20020a170907949500b0078e1bee5919mr19719707ejc.701.1666447159835; Sat, 22 Oct 2022 06:59:19 -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 nd18-20020a170907629200b0078d3b452573si24556043ejc.968.2022.10.22.06.59.19; Sat, 22 Oct 2022 06:59:19 -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=diELPWtK; 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 48C9568BECB; Sat, 22 Oct 2022 16:59:14 +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-am6eur05olkn2048.outbound.protection.outlook.com [40.92.91.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3D5D568BD56 for ; Sat, 22 Oct 2022 16:59:08 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Lc0v4VzNiud7vcWFyRGVVa/bDBbANKvdc2sc3m+VJtjNaVOom9meGDeDiOqG6Cul0XsH86RL5VMj0vnuUFtzFOTD6/JB6NtOEjndEhIRAwncPEER66GvHLZmiJarg5G1W9PImoNRIe7MI1yxYvpMJY4g+U7pMVcJMUXV7RcRwsQmRZ+dgtOzZvajwLuIaNIyUgPDNGLBKy9XMzU8KVvZM0UuBJK1yww6IGSVsmxwWYZ+gh+/kcIqxsns1ldnwvf6LXLgtXCK21QE5aT53kPnhnu1Dxj+B+URarQmiBzpfQ4fAaaWuCCCKeqTS1qtdzIYywhIDurrz4mQDscLmH4wTg== 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=9mJ6/IzIuzjvAHJiucfL/nrtxrAQpc2Td/0gQT0iCes=; b=I6enPDqHlELC8bu1fSbqjywut46kpZkWs3DcmaQKROVfsKUYlmb1rqp+4i207MWGCZsQwhR2e05Le0M/RRG6Kmafx8tp3yYoIlkPtmAnBKnjdN0nNwQuSaOh/1dpWCVKY5rvHZCiK2ecgPl4G0WMXyfcly396t8PCH3B4SKlk0Ia0eRcZ8wJq87T6YNb/gc/vWnFE7pDFeuk9w4KwRmiMBwc+++R4M2Dm79HoNiYgX6pQaJ4Vgk4IWiQsXQhTel+J4aTOfP/6X8TbOZXUVxOyp84rlfp4TtOF8QuE12vccvYf2ZHNsCsvXSjFaTL3inM/G3JkkLkVMRoM9lUFDB1vA== 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=9mJ6/IzIuzjvAHJiucfL/nrtxrAQpc2Td/0gQT0iCes=; b=diELPWtKRmGqwel+S4UKwMstUpdB78wPPb15WyomDTg6r6Pj4zbgtCS3CIY0y5rGyxTweTuwTZdW4rdau08ZKzxgvEHLPB4SS6MxYCQrwa+VEx9MDdeSaJ94tGCvJSjGo13WTI/wPFnHTbKOOHKOR87GuE38c11wlJiYjjKsNOb69V1fGbS8GoVlsQ8qmrbzk5wtobOeDWJQqmmfFFuZZUv/qrUTROWQJq+yMumL8NY18z4YnpfTYS2mEfq0SZigDhMRNS4tXEhRsDFjZJdMCUXfEKYdczZUxW3929HMQn4vpqelRKKKUTJSIG00Fb9CPxnaX+SBaGyXg6k8hHfuew== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS8P250MB0268.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Sat, 22 Oct 2022 13:59:07 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Sat, 22 Oct 2022 13:59:07 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 22 Oct 2022 15:59:01 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [driBTbK3ImwXTpnCfzKBcQkstCSkACW2QXX3KkOIh8E=] X-ClientProxiedBy: AS9PR06CA0368.eurprd06.prod.outlook.com (2603:10a6:20b:460::32) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221022135903.3949890-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS8P250MB0268:EE_ X-MS-Office365-Filtering-Correlation-Id: 47905a54-5117-4f03-3601-08dab4359645 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmpHExMQwxFirrqTEkmNulLLvQSwsl+CcuVLXI+GEg8tbHbgIlXLXzi2jvNWHkug63bdi/kp8J+kOEpef4dvexuV4Rd4B8Pd1HntB9XUpJQyzJvcK5OtF0bE3mf62cMSF+le6ISwyfI072P8fJEqO0dsoViZ0pT4OqP7z1h0FxM5iDgSf0XYa1cnTuu9AECaRgFcdGDH88Lm2ekzYPcbtHSa2nfG0EqL9yvhaVY4dEAHdS4dT5W/FK//tmxjjdRqmm3qMCECCywxRvlVqThqTLGDwl9twcgO/lgX0QKmA4YM1OluIipGQQlxR9kKBA8sf5nhg4PJ1qImgfKTkelMpaniWVSrvCYyMis6SSb07/ly8kGsZhMkuLiheLDNwzONURn4wYAaQrZwUf1dZ55K2CD0AyWkAS/w7s6WZr/+6zc8sko84Jy2COz0kmQic39AkDkQK+c71Ssf42OspFu2pJcYq5JRR4CDp7IZaO2ZpUsVv9Cx/nsSjGr2s86JPW5WdeQLlpXZnUGAT7nF0MbvWqBTMVVxL6Rrgp6nRQ6W1A4JuclyeZcz0sXpj/xjjJ4fPBk0/oTCdxwhj5cXtv6H5FhqAOqHFxMvNVorWiNlodc2t/lrLg/uIckS4aytHHh+6yoxMZx58ghwU2lcJfK0mZr7MB5YWEC6gUFBqWDHQ7HfaC6eii+fP4RioGTYY6p91D4j4eJ5diIJY3F8ysxJabELws1/OVz13FjDnMRdX7lYC7FAqPMi/l6Jtv8yJI5rGEs= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nFmogIiwk7Rmd15MQa90l6oiKWMe08wJ69IWMWrQpSmLqRpPtvQ++JdqMRS+uMPlKXMhd2DadVONC++NQTEYxAtaOQTHO85CXmsKm7jkmx0VnfUJ++mNt/CPufz6HZii6h7qc1UdNOgbVlE01S8FQb1RHN2+41AwSHmLdacziviX6z51FgMHscQUYD+90DoxumvqkAKe3hSRG4xh0Zb0NV9mGC4FRgUofSwTI6SgxPL82MjsXmL8Nm1P9qXwTPASLx6MlBm8XlhPYmbEuGk1oIaNkC+fU6wxgpE5JfI6klRtkjJC2vEhTP14k4xmTWL5O7hcEqLOOJDHblUT1VUdXSQXBxUaXxe+shrc0k2BJFivOqc4Edk1INs8TWHipfkt+cXZI0W4tBLUxKzmRLwnKcgf281ZYs23FVkZMkaVu3TVawV7PET7cSlegiq4sxmB4AcKlNeWAR1s7M2sXKEKs7l/6TBUw/CvMrF1R8l47JfMFGPiSQSVBu4XWeVotv9r3Det83uyOgK1BDqtc5yyTWpClNe/dUz7mUAoBnLd7tD01sHAW2Jd2ChmMV2ZU+vGxR/0Hd6J/0DHWPtm8mTOWn/kPaht1fm2hOGsGCG9h68PuIzUvgN/SneuDg+4IPFvhl10o4AbqdRHgebdJ/kF3rUeIhwinXZKEdze1i1hHGFaO8Nr4UijbRQ4f3u40XAj X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CkNOtB6GnW7AjdAuCIxY9vK7ef5aImY1aLWrnYmAFt0a41UIe6IeeM7F/h5J6Zpnz3z+WS0l4cm4noXmDeoT9v6TyBQgbBqhpVENWuB0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7Th1F1QX+/1uKXzaVJy7AeQiw9uAvJXtD8ivNwWINYOR26aFRyknbnJ4wE+rW8rskuxiQIl9L4QPEaPUhzYqH+PRz5b0bzVDx3dOd8JsfX20zMQiJiuBZkmUD1QjS0ft/4k/Yxc9G5l1lu2Yji/l5W1W/Abf2doA7bmwK5O X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 47905a54-5117-4f03-3601-08dab4359645 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2022 13:59:07.5293 (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: AS8P250MB0268 Subject: [FFmpeg-devel] [PATCH 3/5] avutil/tx_template: Don't waste space for inexistent factors 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: koPYwAVtMic0 It is possible to avoid the factors array for the power-of-two tables for which said array is unused by using a different structure for initialization the same structure for power-of-two tables as for non-power-of-two-tables. This saves 3*15*16B from .data. Signed-off-by: Andreas Rheinhardt --- libavutil/tx_template.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libavutil/tx_template.c b/libavutil/tx_template.c index 6b63cc575f..b44a6189cc 100644 --- a/libavutil/tx_template.c +++ b/libavutil/tx_template.c @@ -55,9 +55,14 @@ TABLE_DEF( 9, 8); typedef struct FFSRTabsInitOnce { void (*func)(void); AVOnce control; - int factors[TX_MAX_SUB]; /* Must be sorted high -> low */ } FFSRTabsInitOnce; +typedef struct FFSRTabsInitOnceExt { + void (*func)(void); + AVOnce control; + int factors[TX_MAX_SUB]; /* Must be sorted high -> low */ +} FFSRTabsInitOnceExt; + #define INIT_FF_SR_TAB(len) \ static av_cold void TX_TAB(ff_tx_init_tab_ ##len)(void) \ { \ @@ -145,7 +150,7 @@ static av_cold void TX_TAB(ff_tx_init_tab_9)(void) TX_TAB(ff_tx_tab_9)[7] = TX_TAB(ff_tx_tab_9)[3] - TX_TAB(ff_tx_tab_9)[4]; } -static FFSRTabsInitOnce nptwo_tabs_init_once[] = { +static FFSRTabsInitOnceExt nptwo_tabs_init_once[] = { { TX_TAB(ff_tx_init_tab_53), AV_ONCE_INIT, { 15, 5, 3 } }, { TX_TAB(ff_tx_init_tab_9), AV_ONCE_INIT, { 9 } }, { TX_TAB(ff_tx_init_tab_7), AV_ONCE_INIT, { 7 } }, From patchwork Sat Oct 22 13:59:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38911 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1302504pzb; Sat, 22 Oct 2022 06:59:41 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7aumACCDz/arIK8DeWSHKSiKIBEaLOJ6qmeJ/ZF46MYrBy+NwR+F8xmtXwmiOmq3wn4KNb X-Received: by 2002:a17:907:94d6:b0:78d:f947:7cf5 with SMTP id dn22-20020a17090794d600b0078df9477cf5mr20056220ejc.446.1666447169139; Sat, 22 Oct 2022 06:59:29 -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 n13-20020aa7c68d000000b0046168e415bcsi2184706edq.211.2022.10.22.06.59.28; Sat, 22 Oct 2022 06:59:29 -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=cB3Kf+dg; 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 8ED4968BEE0; Sat, 22 Oct 2022 16:59:21 +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-am6eur05olkn2017.outbound.protection.outlook.com [40.92.91.17]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1161268BE09 for ; Sat, 22 Oct 2022 16:59:15 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TclVLeVfI2qpYKMmzcJL1JTzHegNKQZtuEeqau3dKlCPdvhySqjD+bwc8ihXZTjhTBtVF02iJdVH15KRoO8nbtHaDnhPKLrQzl3I51iCt1U0xa2/ez9QzG5aWmH9p6G1hD1viBERoU63UWCNKJ1u6DBpY4IhPj6OGaUXcSqJr/eDa9r0pqCugFuft8l4BLoC/ICXk1M2JqIqRUDe9evlfOoNH1xbDCxajdSjjKQnzVlyRNATwWtHCA2g+bY41kt5DIsmq59A4Iw8Wx39mL0dehlMrOInZbEEwSZJHnBHMRFZyc3PuXjBVCGiTr+8ismB1hcqOOjotBDpgEHLMLk2xg== 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=mHazZsxzTxgFsR2oEwnW4RHWld+6wqY4ewQGdOk9VvI=; b=NFdHym831ZR2vMOT/xzkbG6ViJN12nlSZAqyOfohleJ1VfgLjHiiwdbgkxpkd4mV9CkgqGeRAfc7i2qXugKcJRF9rFAj2JgEWSlqmXs75DsVzUeKlDb9Tby25d6VeCUtiIDVtnmuY1QAMHS4fY/E19/B4d8T4VaAj2hVH7B099k4GMDdHRFBlSplJmkBd+kKegcUsDYayYPrdnRX9Xg4PgIbiqHZqlPHK7ui4cCXDWaehUvNByl1rU61bgEXB0d50MTNckvnBGKAOreVydkXgv9wQ4MfSeo/3t/WON0V0YoIFn4s+gIPWA2e9bjdSI1sgZ3J5nl2Kio+VUaTepRO7A== 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=mHazZsxzTxgFsR2oEwnW4RHWld+6wqY4ewQGdOk9VvI=; b=cB3Kf+dg8BXUUaB4QwszMhkDtURZirV+Vrjolg6OJCb/0j6Naq2Iyiu09yXItdOVDdG/8oQF/DnjK5H5Jt8PvOIsyIn5febZbYSBIOy9iBvsyipz/+imthyukX9wLECn6bSeBX6EkrU52M9aWXxZxKMJF7CdVD8zvLGP26cpTeul0hCAdFcUpK5j33j4YHvlVMfip3LOiF75/orPayKXEfiDL7G0lMeHePVCQSwxXC4OTMvuTNOTBvTyq9OLPbv7Ulp/P011D/druGKW701Hv7VPRM/QXLX4NMVutkdeCPraygVb1vpsMErVGHsfC1DgLo6ZN3DtwMpueLZL89f5qA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS8P250MB0268.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Sat, 22 Oct 2022 13:59:13 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Sat, 22 Oct 2022 13:59:13 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 22 Oct 2022 15:59:02 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [klfASG7LE2YGYhBwQVGkHGbiM/dFAqq2cE/DuBuVW+4=] X-ClientProxiedBy: AS9PR06CA0368.eurprd06.prod.outlook.com (2603:10a6:20b:460::32) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221022135903.3949890-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS8P250MB0268:EE_ X-MS-Office365-Filtering-Correlation-Id: 7df76e08-86e7-46b2-90ac-08dab43599db X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKwCpSu33t8D+CngGjAPqiYXdaPDIaC6CIxVu8dE52cAZ+caTjmkN6L9tewKT63gTK6OE6tr7GsXC1P5YpzXvBnaBcQSXAXYpDY1Q2CZheaoQM+sSBUvFWMp1ydEtkbM9X3Luo7NS5TTQhngTdlYxw8w1YaNVUCLPQ9zgsw1YkGB7p4qREgE583SoxwfDJrlv/oTWfG+m1CWpvFtnbzzkBnxv/WPA20IhukwzHdGCAd1XKpxZZTbouyUsHU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C+hMcXFE3mE6jlk6TCWAIW2C18OhBQvhknDm1TjNfbfWHKJLlU1XnHlEsDBe0aZ9Xaozn6gzFVQdO90OaWaxy+hVq5cal/B4BKxffjOygcxHXPJReht9tokGFGBC3vR7CsNHlWGTouyI1gDSQGmPu4RJaeG+NnsfqwO2tyj1p6WCeBhfns+YDJErH63jQGiDHa5I/VSQh8F8GY70ghWHFxnAlyV0nNkMtcyptf96Xq85NbNTNDTaAFS56ZgONDcoOU5VLJj0F7so10RoOXtwlhmAE8YoPA1Cz/V6SyeDqKSOlBPc5cWIUS9fyRzX0ezmshohVF+zlbEFymldvWc52J8tN66d9XKQHc6HBLobQnNPyS4cgiEAwEgJuS5qJLlGNlvpPiFndWpIy2WaO3VMOfNJ/GN8/ox3Ma5ypTNNyIaQNUMt2HqsPPaMo+ZyAtYI8krZ+ohiMEwDVe5EfAsegjuw X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7df76e08-86e7-46b2-90ac-08dab43599db X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2022 13:59:13.5946 (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: AS8P250MB0268 Subject: [FFmpeg-devel] [PATCH 4/5] avutil/tx_template: Avoid code duplication 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: Qc/fOWvWq5ix Signed-off-by: Andreas Rheinhardt --- libavutil/tx_template.c | 76 +++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 49 deletions(-) diff --git a/libavutil/tx_template.c b/libavutil/tx_template.c index b44a6189cc..c15dc2ea27 100644 --- a/libavutil/tx_template.c +++ b/libavutil/tx_template.c @@ -27,25 +27,28 @@ #define TABLE_DEF(name, size) \ DECLARE_ALIGNED(32, TXSample, TX_TAB(ff_tx_tab_ ##name))[size] -#define SR_TABLE(len) \ - TABLE_DEF(len, len/4 + 1) +#define SR_POW2_TABLES \ + SR_TABLE(8) \ + SR_TABLE(16) \ + SR_TABLE(32) \ + SR_TABLE(64) \ + SR_TABLE(128) \ + SR_TABLE(256) \ + SR_TABLE(512) \ + SR_TABLE(1024) \ + SR_TABLE(2048) \ + SR_TABLE(4096) \ + SR_TABLE(8192) \ + SR_TABLE(16384) \ + SR_TABLE(32768) \ + SR_TABLE(65536) \ + SR_TABLE(131072) \ +#define SR_TABLE(len) \ + TABLE_DEF(len, len/4 + 1); /* Power of two tables */ -SR_TABLE(8); -SR_TABLE(16); -SR_TABLE(32); -SR_TABLE(64); -SR_TABLE(128); -SR_TABLE(256); -SR_TABLE(512); -SR_TABLE(1024); -SR_TABLE(2048); -SR_TABLE(4096); -SR_TABLE(8192); -SR_TABLE(16384); -SR_TABLE(32768); -SR_TABLE(65536); -SR_TABLE(131072); +SR_POW2_TABLES +#undef SR_TABLE /* Other factors' tables */ TABLE_DEF(53, 12); @@ -63,7 +66,7 @@ typedef struct FFSRTabsInitOnceExt { int factors[TX_MAX_SUB]; /* Must be sorted high -> low */ } FFSRTabsInitOnceExt; -#define INIT_FF_SR_TAB(len) \ +#define SR_TABLE(len) \ static av_cold void TX_TAB(ff_tx_init_tab_ ##len)(void) \ { \ double freq = 2*M_PI/len; \ @@ -74,39 +77,14 @@ static av_cold void TX_TAB(ff_tx_init_tab_ ##len)(void) \ \ *tab = 0; \ } - -INIT_FF_SR_TAB(8) -INIT_FF_SR_TAB(16) -INIT_FF_SR_TAB(32) -INIT_FF_SR_TAB(64) -INIT_FF_SR_TAB(128) -INIT_FF_SR_TAB(256) -INIT_FF_SR_TAB(512) -INIT_FF_SR_TAB(1024) -INIT_FF_SR_TAB(2048) -INIT_FF_SR_TAB(4096) -INIT_FF_SR_TAB(8192) -INIT_FF_SR_TAB(16384) -INIT_FF_SR_TAB(32768) -INIT_FF_SR_TAB(65536) -INIT_FF_SR_TAB(131072) +SR_POW2_TABLES +#undef SR_TABLE static FFSRTabsInitOnce sr_tabs_init_once[] = { - { TX_TAB(ff_tx_init_tab_8), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_16), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_32), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_64), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_128), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_256), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_512), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_1024), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_2048), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_4096), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_8192), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_16384), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_32768), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_65536), AV_ONCE_INIT }, - { TX_TAB(ff_tx_init_tab_131072), AV_ONCE_INIT }, +#define SR_TABLE(len) \ + { TX_TAB(ff_tx_init_tab_ ## len), AV_ONCE_INIT }, + SR_POW2_TABLES +#undef SR_TABLE }; static av_cold void TX_TAB(ff_tx_init_tab_53)(void) From patchwork Sat Oct 22 13:59:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38910 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1302481pzb; Sat, 22 Oct 2022 06:59:37 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6voQiFVot5RXJbmi05kGcpBK9xHt7rgFLULe1qB8oEdVODjSGYNMbl6G81OwnKLGeOmgAS X-Received: by 2002:a05:6402:4301:b0:45d:422b:5d5d with SMTP id m1-20020a056402430100b0045d422b5d5dmr21650104edc.153.1666447177048; Sat, 22 Oct 2022 06:59:37 -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 hb10-20020a170907160a00b0078341b2e269si20706497ejc.886.2022.10.22.06.59.36; Sat, 22 Oct 2022 06:59:37 -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=k3mWwdYr; 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 91B5568BEE3; Sat, 22 Oct 2022 16:59:26 +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-am6eur05olkn2017.outbound.protection.outlook.com [40.92.91.17]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 25E1B68BEE5 for ; Sat, 22 Oct 2022 16:59:20 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZnNJnwwT+fxDHnDchA3c5jJAP2ScRvkiSb++616GCHwbEX/FQkGodPdOap38YHfoAqtL43ZKUmd3LzoLHr5ew5imzeFbroG/D0C+QyCPLdSVMYutKGP7NHIXnlTIJb3rf4B5p0Hd+69/qlFYOt3w6Rn8y1WWU3Vb5FiqiMMd2HrOR2D2kchhUbrrXwsjWdcXFhRbpHFQ114ygEXF36awJpZwBg+d6oPhjhWXVfJbew9Bj+hhyFBkYLgDgeQCOBu+C7os1fkk5Wv5lbRNBzIJhnu0Vw1M1QcwWZfQjmq4GFOYrFXAIWO7IglYVLdqGIzzTH4dEd7EwqTncKejoNsC4A== 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=27LHObESt0ItIUTXd2p63F0Ctzj7no5QM2skyZowBKI=; b=PUg9GDGRaLguY8l07CSTNCP2QSokDsRGeGEJvxfCSBOzc3jlJbuMVzeSBGO1tBpqLFc/oFnsyQOps1Uj7nY6nowlKp5EwIycHbu9L8z/J6CAFuvid2bCLyK/dZlplA5e7sfRM6zAugxijqmg1Im/f+j0eTbJrHZ0qq7pDIEHe1fqaDbuKynUGXclB0aYasnu4XrTrxgFIYVRGCOc6x4rMECVqoWXNe87rkpuvLbuep4X++PS8V4Qyj3/A8UuR1RdAjc7GwAx5pN5PrguMxvcvpk3Uy0GEDOVImJlG5H9MC51GLXyjf04KEtmR7S0vWw6D+XqrFCJMal1VDoK+cgTgQ== 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=27LHObESt0ItIUTXd2p63F0Ctzj7no5QM2skyZowBKI=; b=k3mWwdYrSwtf2fR5qXXEJD1+h3Nb5SPFC8LP+KeZJtRwmiCoTUPcipRafLmjnDC5GiH7mLvpzvAxdsuz/SthO/f7ffG75NXoNF10qDMtMdOsw+Zlj6tENaedTEDIIuD4N132glxUQBA9rkPFA/htpX48ELGfzJ/9qoweurgY5VaN31Ag80nEbAUtKINLggGOed1OHvum8PHzMgnorslYseftn3EGxK+sChD1mvEElJHuEwYvLCAzPObl8zNNPaX05jF3dAGC53Z1kD8ZSUrOVlGH5IAwTpnmyUtVMeNrDGVdATCJeOQnPUesDnggrlyzT4sIyBxJFR61j+jQ8TXXyg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS8P250MB0268.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37f::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.21; Sat, 22 Oct 2022 13:59:15 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::f9d7:680f:70c4:44fe%7]) with mapi id 15.20.5709.015; Sat, 22 Oct 2022 13:59:15 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 22 Oct 2022 15:59:03 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [zP2Qs+DyyAh9nKtC0SY+o3mWuOhodKAxjBIUvEXhnEs=] X-ClientProxiedBy: AS9PR06CA0368.eurprd06.prod.outlook.com (2603:10a6:20b:460::32) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20221022135903.3949890-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS8P250MB0268:EE_ X-MS-Office365-Filtering-Correlation-Id: 59431be6-3173-4c15-da09-08dab4359b13 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKwCpSu33t8D+CngGjAPqiYXuEUB2P88lYm3vnoEqyodkghkSiOs9NYzGUDbWDM7+8qcBBCAmqdlkaEnQSkw6XAVNsMdSYSWfBzDwGceyOrKg/V/K5jbaVATcr1ls2EL6/gLHDfIjRece/Y125tZ83W9uu6/lDale4TN1oshDWnJLzY2JUs2elW/jJ6YdGgA0stZl/waygNcKaRdr7IYlHMZY/jQ5yvZqvMSegFfKEjHkdfCLcJEE9xFqPzqav6r0iYhRfwACK3nQn8iwR4h666PmMrSiEYLM0wWo+cDT4lB3tjTTx0LTQyH7BafqE9pxuafDRjH749MUjuHxWgLI2Z/cd4A9dg/AFFxQxh15dWi/RmdH4iYJWU022nhfWXYxGEoPLURagWHlFs/yRL/LK5XQ+vGLCqYoMwnuXvHveCYNOBARnXNq4HkqC5TX/ek8sFUlmZUlnOY87AY1bo9LgxWSZPpirjMrVSZtA063fFkIMBfJfr1zFCcUHsRZNbuIzCXnMLH1FJAMlFyUath1gjBBm6TaUJgQK1HUuASSX+oaPbM+E5RzQApc4ht9szjLc+/W/v/VsrpbkAYpRmwNDugBCYL2hSyRFzJDcGrHls5Q8oHTixVhxTuwo3qryu41uigMM49AMtfdi9y+3DdaWHwuGkiv6spb2gsqdSHz0669EdoOqKH4pUmUXTlU3h/GkOJT3T9TdKX89tStCxeLj6zcx7lKChJEKI= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: excayU30WLTxrNqb52q2BOTQ1ZwIpMeDyHvYp+oCJuFV7xe8FHS1GXw6eaIqU3Jl/ClDOQ4VMY9iMZuq6SwJ5cdLdJslUWRn3MDwIDz5aq+7cifaeKm924Cwb6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fMQ443R24g0dtsVC7QdA3AAvhoviuYZRjeLLUdWkhtEYdL0+esg3g1jS1WaUvtm7tv16sBL7PDl6bulKE50IlWl+GXPNn9sY4pVpKxctl5qI+0aDhKgQdHINEX/SqNVwfV+PSgZ06ntUhgVj+QmxmUTHxr/1/qJsCu7nIzHNHdK46/1a/lbDFyrzLRPjryvtgmWErmwVyD49jFMPnVPZ0kNh4ZFVIv7inQFEgwMmCT2bFCFREmS9DvLMuhYh7wNFVviKTaIV6LWT4KUSMxoWsqC0gcs10AcveVN/2IjEM8+mfb6GT3B3fMR1WTSUXyTdNWJ199YsHfZjVxB8qopkiYPgisY+XT6UpC4/8a927T838YODXrnKJQ1aeUZFz25XWDw2mYNgsfcozePRKAF2vzwl8yElf1WudupoR7Za62tYkyYgGHzaF1ZcNXLOF7Nqzb1NKPtv6EnyDMStKTcc9fllWBDchQ2OcDf0xK49M/GaBNzWD/OhJXmAfCEJaaDHaygYDwCbn4xvbjEeph2zkNqtUsDOKBb1V1EbwMCkGCTTKvtdPYMYIElnTE5mtypMOY4QhLZh4GE+Sglh+gfgDqVCkejWRHW0xIf9O3NvLbOO0KPbSmlG+8DI8b+pZ6NJueGoxVvhSFum0+ZrVcUw1/rFiuBev+wtxxusOeAOUO1D9kL7cBQf9dvMZrRAQb/VxVb+9lSZ/4XS1l3DffD6Xyjsok2dwJuF4VLXNkSPLZA1J8BzdYb6CXbgjZfoq13bSxLJLJmRFd3br8Qt/WxSLojdTGmcD0SPrl9Nb/n8glRAc+WEQ2F/370sTNLMuEescIalvZ9nTFYUrp2Wob/spxjOD0Ip+jksFR//Pw4Nz6NiLoEdFVdmhfU6290VH1sD35S8 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59431be6-3173-4c15-da09-08dab4359b13 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Oct 2022 13:59:15.6255 (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: AS8P250MB0268 Subject: [FFmpeg-devel] [PATCH 5/5] avutil/tx_template: Move function pointers to const memory 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: KPprAAqYvPWu This can be achieved by moving the AVOnce out of the structure containing the function pointers; the latter can then be made const. This also has the advantage of eliminating padding in the structure (sizeof(AVOnce) is four here) and allowing the AVOnces to be put into .bss (dependening upon the implementation). Signed-off-by: Andreas Rheinhardt --- libavutil/tx_template.c | 47 +++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/libavutil/tx_template.c b/libavutil/tx_template.c index c15dc2ea27..56e9a6aa98 100644 --- a/libavutil/tx_template.c +++ b/libavutil/tx_template.c @@ -55,16 +55,10 @@ TABLE_DEF(53, 12); TABLE_DEF( 7, 6); TABLE_DEF( 9, 8); -typedef struct FFSRTabsInitOnce { +typedef struct FFSRTabsInitData { void (*func)(void); - AVOnce control; -} FFSRTabsInitOnce; - -typedef struct FFSRTabsInitOnceExt { - void (*func)(void); - AVOnce control; int factors[TX_MAX_SUB]; /* Must be sorted high -> low */ -} FFSRTabsInitOnceExt; +} FFSRTabsInitData; #define SR_TABLE(len) \ static av_cold void TX_TAB(ff_tx_init_tab_ ##len)(void) \ @@ -80,9 +74,14 @@ static av_cold void TX_TAB(ff_tx_init_tab_ ##len)(void) \ SR_POW2_TABLES #undef SR_TABLE -static FFSRTabsInitOnce sr_tabs_init_once[] = { -#define SR_TABLE(len) \ - { TX_TAB(ff_tx_init_tab_ ## len), AV_ONCE_INIT }, +static void (*const sr_tabs_init_funcs[])(void) = { +#define SR_TABLE(len) TX_TAB(ff_tx_init_tab_ ##len), + SR_POW2_TABLES +#undef SR_TABLE +}; + +static AVOnce sr_tabs_init_once[] = { +#define SR_TABLE(len) AV_ONCE_INIT, SR_POW2_TABLES #undef SR_TABLE }; @@ -128,10 +127,16 @@ static av_cold void TX_TAB(ff_tx_init_tab_9)(void) TX_TAB(ff_tx_tab_9)[7] = TX_TAB(ff_tx_tab_9)[3] - TX_TAB(ff_tx_tab_9)[4]; } -static FFSRTabsInitOnceExt nptwo_tabs_init_once[] = { - { TX_TAB(ff_tx_init_tab_53), AV_ONCE_INIT, { 15, 5, 3 } }, - { TX_TAB(ff_tx_init_tab_9), AV_ONCE_INIT, { 9 } }, - { TX_TAB(ff_tx_init_tab_7), AV_ONCE_INIT, { 7 } }, +static const FFSRTabsInitData nptwo_tabs_init_data[] = { + { TX_TAB(ff_tx_init_tab_53), { 15, 5, 3 } }, + { TX_TAB(ff_tx_init_tab_9), { 9 } }, + { TX_TAB(ff_tx_init_tab_7), { 7 } }, +}; + +static AVOnce nptwo_tabs_init_once[] = { + AV_ONCE_INIT, + AV_ONCE_INIT, + AV_ONCE_INIT, }; av_cold void TX_TAB(ff_tx_init_tabs)(int len) @@ -140,23 +145,23 @@ av_cold void TX_TAB(ff_tx_init_tabs)(int len) if (factor_2) { int idx = factor_2 - 3; for (int i = 0; i <= idx; i++) - ff_thread_once(&sr_tabs_init_once[i].control, - sr_tabs_init_once[i].func); + ff_thread_once(&sr_tabs_init_once[i], + sr_tabs_init_funcs[i]); len >>= factor_2; } - for (int i = 0; i < FF_ARRAY_ELEMS(nptwo_tabs_init_once); i++) { + for (int i = 0; i < FF_ARRAY_ELEMS(nptwo_tabs_init_data); i++) { int f, f_idx = 0; if (len <= 1) return; - while ((f = nptwo_tabs_init_once[i].factors[f_idx++])) { + while ((f = nptwo_tabs_init_data[i].factors[f_idx++])) { if (f % len) continue; - ff_thread_once(&nptwo_tabs_init_once[i].control, - nptwo_tabs_init_once[i].func); + ff_thread_once(&nptwo_tabs_init_once[i], + nptwo_tabs_init_data[i].func); len /= f; break; }