Message ID | GV1P250MB07374EBFD77D6F0C19B624108FC3A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM |
---|---|
State | Accepted |
Commit | 4fe91e3676a1885d0e00321963845aa3acc6eee0 |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:2a18:b0:15d:8365:d4b8 with SMTP id e24csp2211489pzh; Tue, 26 Sep 2023 15:24:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHHxbYulfdPsIDRYfg8kurqtqvAcHdemFprlX/pOEBxsCNuyEQZ+esKcT5pHYNxBioHGETH X-Received: by 2002:a2e:8417:0:b0:2c0:2b1b:d14c with SMTP id z23-20020a2e8417000000b002c02b1bd14cmr293522ljg.24.1695767040421; Tue, 26 Sep 2023 15:24:00 -0700 (PDT) Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id gt21-20020a170906f21500b009888b517932si12278097ejb.333.2023.09.26.15.24.00; Tue, 26 Sep 2023 15:24:00 -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=NBgKI2FI; 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 12F7068CBA8; Wed, 27 Sep 2023 01:22:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01olkn2092.outbound.protection.outlook.com [40.92.64.92]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 220FB68CB09 for <ffmpeg-devel@ffmpeg.org>; Wed, 27 Sep 2023 01:22:12 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jOuC4MKHBSNpBRl1Nq3OXlJR5MxODEh99ohc2AjbuvaKMNphu/h0s7TIgR4AN8AFbJ8tIJNbSKAbP4EJG7ke0AVGfZ2GqPM9kM/HRD8l4MYNRlSerhWcHmCfCBWXO7xaMD3hshLuqLPb8dr0Jzdkav65DBTwZpbVV9qBqH0Xl18oND+M52i1n9VnVzHvS54Lx1Xcwax/gdHcBzbavr7TDBLUGP5enfOa5Fgogiwabzoczz4Y4c/fQumGBeZknVRVeMFxrYx7CMLnNeNIKWdUjyrHKjp7iAipv756S5Wy+JkuCDwSHeIKXxzRZyyn87mNcaDsYt2qovMJCSzEuPgYYw== 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=HgFnaEMETBoPh4pppY6ufJVtootkIcSVrWAypTaKQzE=; b=BpCLZ2IorkiW84W/rcR48mKsUIvIArqaBzqUeL8AUjq7tpsHTjPHDHGJbcaYJjR994qj/7/+8OPYo3qIVsns8K42AjWxinxotsKT3iLaFPTzrZ03hrccfgj0IZyNyXJ3WF4UUobj1g/w8MUUPuDxbG89MDAp+/IqrZ5L6FUuXUQAyD9XVm7MkXBErwBrXLvhi+c00rU3ZWeZ1qqHQo0kXkbQJdQ20R6alyi0j7rvoQZnLJJVzR7FBud2Ii7IuZVy3vt16XBa5XwXtmaTjmAHy5C9ZecW47761/v3dl2drK7W9cZcAxl+KzB68FYirOgLuS9UBRX46E08ROp3ekZFZg== 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=HgFnaEMETBoPh4pppY6ufJVtootkIcSVrWAypTaKQzE=; b=NBgKI2FIMvfa2XHNQ5AFudYfcN4UHwdOH2jsXu6UMCDPTiGUuSPoNCUzIIpNOWE+jnEGvcrYCb4KBzvHEoWL4eH85A881/lLM2OzrS1VbgJtszpvnVSiSpCyxoLnNPquie0+P8PdbU6sVz2RApwBzuL/ubI198Pwa/zgITQEBbeFNr+FY0T61qYGU7U+xbfBZLu7WX0TVZLZc3yyigjKh1Zc/0J5yDYWYVaMkC4q/vMrjtds6lee3E5VCOTKSJz4a40zaZjGhHRzzSm8cxrYCgvPLpT6Ybk+6zOW8LAypi7fDuPWCJX0oPSn3+B/Fi2/SGqFYT5S3Nxnvok0qaClPw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AS8P250MB0393.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37e::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Tue, 26 Sep 2023 22:22:11 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::9d42:7b4f:71ef:c76a]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::9d42:7b4f:71ef:c76a%3]) with mapi id 15.20.6813.027; Tue, 26 Sep 2023 22:22:11 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Wed, 27 Sep 2023 00:17:23 +0200 Message-ID: <GV1P250MB07374EBFD77D6F0C19B624108FC3A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> X-Mailer: git-send-email 2.34.1 In-Reply-To: <GV1P250MB073754E215A199E7219CC13A8FC3A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> References: <GV1P250MB073754E215A199E7219CC13A8FC3A@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> X-TMN: [LO9WKlnoaBBGhWpsqXb51NXNlGcGjSG7] X-ClientProxiedBy: FR3P281CA0019.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::6) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20230926221732.3711507-51-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AS8P250MB0393:EE_ X-MS-Office365-Filtering-Correlation-Id: 849806f8-a203-4a5d-5dd3-08dbbedf0759 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tHtpOOxgTRJlxZAnsjk1Mb8e7u5OCRp972a9SVpNATdidYDXnD158PVYn6k2a3zcnDtLX8S+BZPtokDc91X/IrCAnUFstWC/gME/uGrt0YUfQRlgkjSgEOhUjN8Oth/A3Ehip4sC89f4ZvTzHbfVhPo2KzLJeEZuUHOQES7MQacBZDeDSmq/rUcTuiMstQiGcD45vRK4obhUfhGnUGpzKPpZS0cqBh7EMQYA35u9nimhp3p7Z4eURfOHHgpU7VJcGKUuk7KcpISpZcMYzaDho9zRTRTTXDkl3byOoxU+TSvGXFxNajKHP5ohO9AhKUIh4l4kKDkQuUG3VVaMSJztBherIQ5670XKExzFeVA19/NthJy2tvvKBmEciZOm70Qko/fueIAFAL6ZimN2IKRdGdbvUZSsBdcs2XL9je/bqnhaIVQpyl70fn00ZMUlHFnzEx2vSEToGJUhbi/dhiryY1FhCLEGEkIxVp8/Xu7OQvHlXl4fywSo0xXjEZXDL37I5iRCJ1fRduxSUcgQZ26S/Zdicp4jPAsALexwJIQfGqAqDU1fEmUJWfwISyAQeCUwMwMnv5UEDWTDuUecpLa/EkgprgUJYd+vRs7pHASaWnomztQh+jc1YR3yEagKpgX2 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: y9U9fXnRknS5dq9vfUqEr30Ig/8IzXe2U4+qsEhNBYnkJx39ZIKEdDogTfscQtA/zIq60Hy8UvIeNdM5pHdKrck6onl8ubfa+Jt2kmedS1rYs7kGcmGEk7z1c02XgydsoDB9m9ZyIn4Y524I/TyBcTtQgNfj/152H/UEiojXQrDJUVNhfWmc4w/olzsN6lTB16jIvlMcOI1xU0rQzK5mG6v94WcNFmTNyiPSim8lZk/BR7Txs8GkHcvreJlL79SOgjHTN5+NjosDqWtT1BSajMbqwF35pkVI/vtDet7FmhSGXPtEkRduNMtraZtZh7u0pFxPDDMtE7oHqJNPOv0L0xQLqYmD8/5jlClMcNXgJUVIowa0cfStMQV1LYWNeKwpndLYSFdpGY5meLMurJovz3yBgi15xe7JEwinurUjTvpITLC5g7CcI9BwZDxYKMI8F39mcndoj4r5JtmQi60dj6BybyUgxkqkjt9IwtxUE1+MqDFsiLkp5IhTFeTRyiq9Hv030IUfg3Ke9Hg7bnbhyq3PWuVyoIpKFk5LtyGd91DnUPU6gQ2vC4tx42GNEcbknPI1r/19f2FpbQYW3yD6OxdJE+2gvqVpL9/H1ywltC0mBQmL6SIhcIM5mh8K1T2jv1yvewd9ewvJwIbYzaolpkwDGypob6+Fs536tLPc7ij8jO4wJmam9LCoCdueZq8xHgIkBl4GCdKQJP0MJPLP3b4iQyhe/YxQ38KF/nnY67iMy3tj/Wcg5W2/8ov4CBs9Hg5ZotdpNaIRhS6d5DXlKqVCeSWtETEtEENbUYfse/6MXkYFvzeZNICa0HS/2blTKx85p2Vc48mdD55qxvjYkJsjE20h2SadSiwAcibZSbD5nu/xeYdu49cYovYcsvx8oMVf6GMluZg3q6GwBtl89nUpVsord05St519RN7PjHfCp0gvBzSZsVp9VIoZCladngmPcQJE35fzo2Q8Ukop6yEfGcJ60Io8DJm2UGlvfMNuQHRKRlkJ6DHSEdDVTA4qzH7sEaZUNwd2WbWpB37uRHGNW1zu5xpDnQl/PtCcfTV91m+ZKMDkiK9N4H0IxuaALcLgrvy/7cWjSsgHaaMKiXHSqFcXmDP18Ex4Pif4e1uXBVhKPUyJfY2HOj1yUinPKaXxPepJ3DXkqMYBa2SxsoEQri2IrhSssrfxRbUFSQFNHJnefh3ZRBihrlYH72+aWkJVyBIpLppQ73RKsa2zWdjObdr+2q6vDvmHOZ1j5ruXSB9r6auiM3co4bIm7BSP X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 849806f8-a203-4a5d-5dd3-08dbbedf0759 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Sep 2023 22:22:11.6009 (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: AS8P250MB0393 Subject: [FFmpeg-devel] [PATCH 52/61] avcodec/aacps: Move initializing common stuff to aacdec_common.c X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: vK6j1ZkfJc3i |
Series |
[FFmpeg-devel,01/61] avcodec/vlc: Add functions to init static VLCElem[] without VLC
|
expand
|
diff --git a/libavcodec/aacdec_common.c b/libavcodec/aacdec_common.c index 4af60e8c7c..75368b7075 100644 --- a/libavcodec/aacdec_common.c +++ b/libavcodec/aacdec_common.c @@ -27,6 +27,7 @@ #include "aac.h" #include "aacdectab.h" +#include "aacps.h" #include "aactab.h" #include "vlc.h" @@ -312,6 +313,8 @@ static av_cold void aacdec_common_init(void) sbr_vlc_offsets[i], 0); tab += sbr_huffman_nb_codes[i]; } + + ff_ps_init_common(); } av_cold void ff_aacdec_common_init_once(void) diff --git a/libavcodec/aacps.c b/libavcodec/aacps.c index ed00006a3a..5a3e6b3dfd 100644 --- a/libavcodec/aacps.c +++ b/libavcodec/aacps.c @@ -739,7 +739,6 @@ int AAC_RENAME(ff_ps_apply)(PSContext *ps, INTFLOAT L[2][38][64], INTFLOAT R[2][ av_cold void AAC_RENAME(ff_ps_init)(void) { ps_tableinit(); - ff_ps_init_common(); } av_cold void AAC_RENAME(ff_ps_ctx_init)(PSContext *ps) diff --git a/libavcodec/aacps_common.c b/libavcodec/aacps_common.c index 11bdb960cf..6b5493d4c2 100644 --- a/libavcodec/aacps_common.c +++ b/libavcodec/aacps_common.c @@ -21,7 +21,6 @@ #include <stdint.h> #include "libavutil/common.h" -#include "libavutil/thread.h" #include "aacps.h" #include "get_bits.h" #include "aacpsdata.c" @@ -298,7 +297,7 @@ err: #define PS_VLC_ROW(name) \ { name ## _codes, name ## _bits, sizeof(name ## _codes), sizeof(name ## _codes[0]) } -static av_cold void ps_init_common(void) +av_cold void ff_ps_init_common(void) { // Syntax initialization static const struct { @@ -328,9 +327,3 @@ static av_cold void ps_init_common(void) PS_INIT_VLC_STATIC(8, 5, 32); PS_INIT_VLC_STATIC(9, 5, 32); } - -av_cold void ff_ps_init_common(void) -{ - static AVOnce init_static_once = AV_ONCE_INIT; - ff_thread_once(&init_static_once, ps_init_common); -}
ff_ps_init() initializes some tables for AAC parametric stereo and some of them are only valid for the fixed- or floating-point decoder, whereas others (namely VLCs) are valid for both. The latter are therefore initialized by ff_ps_init_common() and because the two versions of ff_ps_init() can be run concurrently, it is guarded by an AVOnce. Yet now that there is ff_aacdec_common_init_once() there is a better way to do this: Call ff_ps_init_common() from ff_aacdec_common_init_once(). That way there is no need to guard ff_ps_init_common() by an AVOnce any more. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/aacdec_common.c | 3 +++ libavcodec/aacps.c | 1 - libavcodec/aacps_common.c | 9 +-------- 3 files changed, 4 insertions(+), 9 deletions(-)