From patchwork Mon May 6 09:29:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48574 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1263524pzb; Mon, 6 May 2024 02:30:19 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU0ZUsmqWZHns9Co87uqRoncxIfN3xTFRL3AgLGCF2Q8Gz8eg1NtnzcqzhaznUkT+IiMPJ6+u8PDJHqKDxnzcfiLYRi9V4soTr/eQ== X-Google-Smtp-Source: AGHT+IFr0f97h1iZq7Tx/CsbmbFiVWz2GYFV/TcQ4NCAwURULLN7iiZCivkkf9//5hGXq75Ui7lU X-Received: by 2002:a17:906:2c43:b0:a52:1432:b790 with SMTP id f3-20020a1709062c4300b00a521432b790mr5725920ejh.31.1714987819243; Mon, 06 May 2024 02:30: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 js12-20020a17090797cc00b00a59b35e9f28si2248934ejc.787.2024.05.06.02.30.18; Mon, 06 May 2024 02:30: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=fbzsmYDH; 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 989B268D4BA; Mon, 6 May 2024 12:30:14 +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-db8eur05olkn2053.outbound.protection.outlook.com [40.92.89.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E876468D4BA for ; Mon, 6 May 2024 12:30:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MRlBlPEj82KZNT9ESiPYUtDlX8F4QLaydKh85Lt/HjLyJigOzIvcabX6CMNbQAO0v0mrdiuCoGTOyflJVmWxvkABBXNiFn2uLOt5ukktDSn55hY1WSvglsoJSTRGIamSLXHPeljvNTS7Q3K+j2UmJLXx9swhas8UpvX6Q2sPpW4brwKiqJGFkcaimApffUkt9vErjGCJwkXQ7m5Jn9pJRlzHwChW10QKcHwNcfB1B6T75DkAyJvCqSzcPtTBybxw4NTJAzZMQ1BxhHN1lG7V4+UhLYOuhufY4kOz81V8VskgXcz5d7XrnE8fIm0UiVN6/jXfsakfnP9yHmCz6LV+Kw== 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=Zklr6fgw9ffmuZwXXuHXiS/nQ8CRXEL3uijrbIC22Gk=; b=jNjo0+G638I1VfaO3qQDdOfcBl/LHmE+fP5jEecEXY+daRS1MotThnZC6d4CDk+u7yx56RFQT1he0h7efCx/5Mrl8nzSyfSCboM7HdB5RWMlATZV02j31p4da2HqCi++6AzlTms+FnFzJnJE8MPpFKMlU5JAKu8GYrbDlFdz4Ah/dVXwFG9X4p8yOT0RO6t0FEwhSjQcVYzsRfaddFJUErTxlfjkkrF1wpmdevIRyejIw+S63esFDP9IU1Cx8AznKztK+AaEVyhRf6uTsKcP9YztUYvkBbetCOk2eyiYnPJhdfwm0yumutDqck94CnPBn9dHxOdoJ7mD4M3irSE8sQ== 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=Zklr6fgw9ffmuZwXXuHXiS/nQ8CRXEL3uijrbIC22Gk=; b=fbzsmYDHsChc691HbFn9AxHh3Mt88XYXK6yPSoFZWnkVW9hapliwpmlQk+TqaLJtYRfwZsGw842FRBndjn0Y83JmBvGmKLnNuC4qENJzveQCKvY1kWl0I+HnndYcGFJxD5s8z0pgwEQcGY9Wwmce8nfYVvt6udDaeOk8qbMDKavcHCWiyCq5ktk/YewkpomOYsjiScP90tPzMA7sXo0MmCFQzYM47lvdlW0hpsbsVlj8+rAYxMsYV2zJEbqrZnvOvIkfIC6b9I1D2oz4vpW2NiQzRnfQsXR5E/rCp1go238P2gPx7yNv/AtL8TBXSMPNf+J/9wmwnfiRJkbmfx6aVw== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0376.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:32b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Mon, 6 May 2024 09:30:05 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 09:30:05 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 11:29:54 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 X-TMN: [G258Rr6t5dHzZ5ARKtghbMEwWgXGh9TUPh5Aw2NX20k=] X-ClientProxiedBy: ZR0P278CA0093.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:23::8) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506092956.4157212-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0376:EE_ X-MS-Office365-Filtering-Correlation-Id: f0cdd9f5-c55b-4675-8679-08dc6daf1c99 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: eyVssT+ihxSxzCmD8mM2wVQH26KvC+BzFRrx+e/XFHIEwgs0lnpThvYgBg9kifpfek8k2NoPljB+AMFP5uHD5funUCkB0UrFsiZ4iDmqHECvMOLrG2TZTV46uedJOnIyS+hDPbiaHrVjzBa0CcIEI+01YVrMVFDDMEApRn6gZeM466PDxYCTYRsLnj1B5/X2vh08N+ft/+HHJc9Vs4CRUAPwr4KTnG4pu3tTyEsu8VoZRJssdCWo3i1M4/r9um4x4/XIw/DrZwHZV/RybbBjV2wWBXFlPM//WaeFsPRGunhBaCc3GiHINmmr44UQNUL/+sN1JMdxws60HfvWkbv/SbU2RDm4h2m8zNYxStAxeZd1PBJAAHI51BPs75Na82WrNeET8xBRU2JN4b7Ps21ltu4fIVvB2WHJSpXcbFjTTTUEiApivnkL9WMmM7yXTlsekgiHK/4URu25BCuRsWt9KItvw2JzvBhwuflapFXsc06KKR3FG6tsLnCkyQRxEOmJ9JMxdITy58mY+RmA4sw8Ph+ri4/RX91fkMdMtZKPbxzuR66HanBmTC6ojmJwz4F1D6hyyVMdZsf/HB1FehebutnkFAtYJNqxcXfYQCWgDRfxH8T/iuDAuwR/vDeW8NaR X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-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m6QxKUgtmKkBxcK0Vfahg1oxMULmttoeBnFjqwDmEQzUJlrCFEVO43/EjYsRg8fWBc1AERLbLrAaZe1ggSHJz7T7GiOAvIEoEVUE4JBUAGCDRuwQoidOUi1nIMRQcS3/yOiY8R7/SU+oK4FTBA9AvfwbfE/Dzqjv8VQ3n8noSIeHNcC3oR2p/Q5EkhNMFP0DpmJyUZr8NiYZbgYW0EKr/LkH8fzodxw1BK+Ta2hRRZT3Hs24LSGg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f0cdd9f5-c55b-4675-8679-08dc6daf1c99 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 09:30:04.9856 (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: AM8P250MB0376 Subject: [FFmpeg-devel] [PATCH 1/3] avcodec/aactab: Provide ff_ltp_coef, ff_tns_tmp2_map unconditionally 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: i1jTpn8yY2ym The fixed point decoder needs it since 905fdb06010e554262fca3c12b362bb69a11de85. Signed-off-by: Andreas Rheinhardt --- libavcodec/aactab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c index 3cef9c5d2b..3718b81a07 100644 --- a/libavcodec/aactab.c +++ b/libavcodec/aactab.c @@ -105,6 +105,7 @@ av_cold void ff_aac_float_common_init(void) static AVOnce init_static_once = AV_ONCE_INIT; ff_thread_once(&init_static_once, aac_float_common_init); } +#endif const float ff_ltp_coef[8] = { 0.570829, 0.696616, 0.813004, 0.911304, @@ -144,7 +145,6 @@ const float * const ff_tns_tmp2_map[4] = { tns_tmp2_map_1_3, tns_tmp2_map_1_4 }; -#endif const uint8_t ff_aac_num_swb_1024[] = { 41, 41, 47, 49, 49, 51, 47, 47, 43, 43, 43, 40, 40 From patchwork Mon May 6 09:30:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48575 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1263826pzb; Mon, 6 May 2024 02:30:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVWMLTOzokelbTL7xmyzLmtS5un84NWI9x3OCzm+ZzeADAC1NoVIgXSD6eVXwNEB5hsLZ3tE3gZbgv40y8syCeqrR3PqNBAZQeybw== X-Google-Smtp-Source: AGHT+IFQ5wi8kgckj7C4lHqLJ+L0KIffuGsISVuO6lFBIiZ1jqWbPI73w0MvNdhHDi3ixerrwmkl X-Received: by 2002:a50:8d1b:0:b0:572:3b15:a40 with SMTP id s27-20020a508d1b000000b005723b150a40mr6571750eds.33.1714987858466; Mon, 06 May 2024 02:30:58 -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 w6-20020a056402128600b00572aae836d2si4623848edv.462.2024.05.06.02.30.58; Mon, 06 May 2024 02:30:58 -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=uXSIYo2s; 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 E302968D5FC; Mon, 6 May 2024 12:30:55 +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-db8eur05olkn2097.outbound.protection.outlook.com [40.92.89.97]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 63EA168D5CE for ; Mon, 6 May 2024 12:30:49 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YihFkyzOOyJPXbPAHcPF4suxo62DimfthSmxMz4MocT3zy2FGrOhWeRJVnkBmUuyTCg8TMJV4pien6FL+HmdTHEKRdIFpPif2yO3gh0+OebtmnJhgRY29yK+cfQL4iwNNp/sYabJeVxZA3Sm6pMEF6DiiLtLgmDPqS5Cp3ixXX0a/bjcNQ0gYjOuiF69Co6eNYYrii2kfTETK213Tf1tHV46URY8SzcPV2lRIFaUmn3dZj7KNNx/E469NsldU9VmDcg8JHi5ZB3js4lVmDJwDo03mkT/931vSRYv+uBPklmK19pnA+od7MSiC7hQ7/k5jcbvwGw5grzTRaBOLTwS3w== 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=SVFJgDb94hkfnAvrp1lzSFgzzFKDFo4v2fyzPCqdWWc=; b=VuOaSxrQhVe0dGuIIGd5lDJOqXlgH5LC3pMPIoZdzLkUdlEUSNt/hNWF+/2HQxHueJ/SghYYUHmQAsPuBLpAPPUgfegipbV7ceZ3k8NCHjVi6EDfnm5QmQEZhnbcd/aMt+72t86CkB0E71DANkxKAoGiSN/jKmzOG/KldLPbSJqustuyfxXit9/teL2rpPgymW0vST+m9hfDi8wk6PgoWHxe0dKGnp75/HwHCKwx1wyRJQRxdDNmOpnG//ycUm1v6DeqytslUbDQ69A+xrke3y0zKxPuWtXoiTJ0Qd9RyZ5Mej3Gd1xbD5HF9lN6ciYpj02Bq4TrgtMDuv3+8oqfBg== 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=SVFJgDb94hkfnAvrp1lzSFgzzFKDFo4v2fyzPCqdWWc=; b=uXSIYo2sppIs0Ym8cIMnEKxGJoVRLvjG1Mx3j2hXPryz9gm/F1nU27ZSUvKK8hEVtFzjB5oUaHR3hGKaSfmMl9jvAQX1Oe6/wRfYscEno5eCXasxhxfy/rpRp839bFjGs2IoP0sEFZmYQ77wVTq2tnxJEln9AH9931MJXyynHZ1NARJQeY14XTEKvZY51wkqrBUn8Yzb+ztOLZEftBdmjVMdSVbnOlsuMY2oO50m+1yROll+kGn7LGcn1cgJUsfvPzXEMHylfa/xqbV44MU/jjNBH1+FcFqM/9Ve9RMIy9I0njzPFEYhk39w7n5VD9QN6J7BVI6GlbZcz48Dp1QcHQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0376.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:32b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Mon, 6 May 2024 09:30:47 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 09:30:47 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 11:30:39 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [aXPaipyMaaLSi3KXZM2nDS8HDk489jNyAbeUzQxOpbM=] X-ClientProxiedBy: FR3P281CA0155.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a2::16) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506093040.4157263-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0376:EE_ X-MS-Office365-Filtering-Correlation-Id: c00d1daf-1171-49c9-41cc-08dc6daf361e X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: Gvcg8z1MbcUYOXJTLfYFBrOZNni66aHA2zBWbRrI0YKbwapMtaDaBUwdTTr0tqcFvrr2E7pLpFPKj1PhlMbhLV4QKjFCCkVLdkgdaoKkfNG8YXg8JWKhUWOICJzpRoMe25Bv+xEHTjmD/Q+MS6NkybW1d9/pHDAcl3FfoS6jBoqiagcijj6JOmHPkNPFCGXCJf9hnPxPUuPWjMQs/DrGZr0oSaZg9u7qzO2KdSX8XkgdkZ/7+5+B1QroA9syKvbENAdJzZFpP0bAAXugVDrQREd0f2oxQteK2RncRd/x0po+Vy53Gjm5Z4GASlgteen66IEVyiL8zxiAPW9aUTjqUU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GmTBPi36E83aIa7C8HQkXJIy8pU+vcCT455Hbo+zthX1p+gIOEZFyvQ1Bj3ExPb/VubbVuI22K8L5ledvFyLE0h5zuKn3XUnQy5MaWMEMqRGfWcKakfhd6osepEObD5fhdgyWLs84uFLFRwkns1nBR9yl2hnTv3CKh6y+DmLA21UZN7u3xCznuPmZbvqdtiiWacDrs/kYQ8sdnJzQKEK+JGnu5SP9F+d3zA1EbK2U1ons5eBUqWSJri0nb5QNuDDQedNq/zmLsPeX990Y2hi0zp7rhEuzHwoNvrN97HyQ3IjX0VyxreSzX/sPhoTr+X/rqPK7QFghZO3ql8/D7wTCOaL2gzc/E49ZhesuiCnb0hoEzs7pMGJ/wnGMhocJBhSBLNVCNwEU84YOBBH3dM0Jh1V/gR+5/tPoOMkccyyKQjB9UFlxosGPTyIMvNiEYFPPT6SOtG4FuNJ3+/fouYW6y5w6v+lQ36CBO7Kl4n5N+/nYTSRCPU2uEhmG65vvP0R928HXZuUbavhHwH10AGUdF23xE1X2uTUqMnlq9Z19JIBxMTbnQlOsaRA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c00d1daf-1171-49c9-41cc-08dc6daf361e X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 09:30:47.6597 (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: AM8P250MB0376 Subject: [FFmpeg-devel] [PATCH 2/3] avcodec/aacsbr: Fix type mismatch 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: uC/inaT00bq/ ff_aac_sbr_apply() and ff_aac_sbr_apply_fixed() still used pointers to INTFLOAT which is float or int depending upon whether USE_FIXED is set or not; in particular, according to these declarations both functions have the same type. But that is wrong and given that aacdec.c sets USE_FIXED, it sees the wrong type for ff_aac_sbr_apply(). Fix this by avoiding INTFLOAT in aacsbr.h (which also means that aac_defines.h need not be included there any more). Signed-off-by: Andreas Rheinhardt --- libavcodec/aac/aacdec.c | 1 + libavcodec/aacsbr.h | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index 72f2d7e7ba..c6b93e33a2 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -42,6 +42,7 @@ #include "aacdec_tab.h" #include "libavcodec/aac.h" +#include "libavcodec/aac_defines.h" #include "libavcodec/aacsbr.h" #include "libavcodec/aactab.h" #include "libavcodec/adts_header.h" diff --git a/libavcodec/aacsbr.h b/libavcodec/aacsbr.h index cd030aa801..656ef5258e 100644 --- a/libavcodec/aacsbr.h +++ b/libavcodec/aacsbr.h @@ -31,7 +31,6 @@ #include "get_bits.h" #include "aac/aacdec.h" -#include "aac_defines.h" #include "libavutil/attributes_internal.h" @@ -91,9 +90,9 @@ int ff_aac_sbr_decode_extension_fixed(AACDecContext *ac, ChannelElement *che, /** Apply one SBR element to one AAC element. */ void ff_aac_sbr_apply(AACDecContext *ac, ChannelElement *che, - int id_aac, INTFLOAT* L, INTFLOAT* R); + int id_aac, float *L, float *R); void ff_aac_sbr_apply_fixed(AACDecContext *ac, ChannelElement *che, - int id_aac, INTFLOAT* L, INTFLOAT* R); + int id_aac, int *L, int *R); FF_VISIBILITY_POP_HIDDEN From patchwork Mon May 6 09:30:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48576 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1263923pzb; Mon, 6 May 2024 02:31:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX7ORZvm5DDKzVvOckJzRm9n11V3Zk49Pwmic3PHfcHRSk/NzZAKwUUCnJZl6TZQsh311/Kd+z77euno0xfEEEGefiSSMazpk1MUw== X-Google-Smtp-Source: AGHT+IF+HQn3Iyg0f8tDU7FOJuyWYCK5WrZln8lvKK+YX+KvyL0guefqqTWosqMCVelLqiMicPHe X-Received: by 2002:a05:6512:548:b0:51d:3256:5327 with SMTP id h8-20020a056512054800b0051d32565327mr7533399lfl.35.1714987869467; Mon, 06 May 2024 02:31:09 -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 bi15-20020a0565120e8f00b0051ad64a05ffsi2719692lfb.648.2024.05.06.02.31.08; Mon, 06 May 2024 02:31:09 -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=YXowCoDy; 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 34A7768D609; Mon, 6 May 2024 12:31:01 +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-db8eur05olkn2097.outbound.protection.outlook.com [40.92.89.97]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 887EE68D600 for ; Mon, 6 May 2024 12:30:54 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e+PDoer0K9Z5R4/8IApAsEJBhrLokIs+l6GIyU2yB5Z+nFVULRgIyt/Y4zHoifqte7SyUePaLwLhyjoC9lcM6BQFCcHamoz5KW0nUnWhM8M7/yLwlbAqwgc5LAz+LvUSz0B3HwKIAVNcVSBXGNCdWL/jFQV3CWCF5hgPgFyLKA1caye2J/qUk4SNimWGZs1BoqIY09wzI+aB96884HmUOpDQ8A/HLk/3tLMD5QA5Y0z2fKDVlpEO7CqD0xxIRfkmp+XNB/ydwA5SXCXvLhVEueuqqUV3C0Ab9Go88Wx4wi+QEMVuiWbCsdS0mrFpM/mssqiBgnivBH+H38XXJzGkPw== 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=KlGreozht8NGVLqA+gKRSydWXNEqOUlpf1hAIEwEL7M=; b=jXSTUZ3PPY3Z+OgsJ18t5Cj6Xljoim7EGULLEIvwDdgNgMg4nR6wjj73ilYAuevUA/sT+pveuUElb85ieOMiHtSq3275NHTUm1gr271NWFUwIQb26qqjcbbF8Z+tRxTuByWBOUWq+7F8lEiXiT0T4ES1l7/Y074k9HkvpOYJ2o9OTrtyTu33I4LWkD59FqxYj9m0vP5j4vLW6j2rlnh8rFfPMTz6ittCCs2t5dM8ozomxv3RIvg9mirGcpC9G5U09jTTIoZAs9ea3wQo3YVVcKU7oLXyjOmDAtmRee9whjvRrf+6B1Ws1oda4wu2DUpBa4re+QHfsm92ycpMLjSjlw== 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=KlGreozht8NGVLqA+gKRSydWXNEqOUlpf1hAIEwEL7M=; b=YXowCoDy2cKDLZYUTiury+lxiDK67hyNOve6jiVF4iJZgAkz41umCbo0uVdFf2y9bOGKFYuXckwykKzF3rDqJIT3fclPQdIS0P7Ks7WGnjMA07ETX54j/JB0AijUyMiNFpjWIqf4LXJ8vi3c90PS9Z6PKhfPLp4Ix05GRI7Yf/reUiXNBl3/R4xud5zQgfMhkcrcsJC6adgEjy3hYmZb9JCNzhoeHL5TReSg+HN620yk+RzM8lJHwXktGE8Le9uuVCwDfASVkba28Ie/jEgt6np7xOA0dhuYX/BPcUL2I3eQdYmbwM/C38yTvwDq3faE/ljxi/89FgMqbkvaNTk5cg== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0376.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:32b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Mon, 6 May 2024 09:30:49 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 09:30:49 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 11:30:40 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [geLTTt0eWKc0a9/k6P2mhjYgA7mz1BWFpsVEM9JIYRI=] X-ClientProxiedBy: FR3P281CA0155.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a2::16) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506093040.4157263-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0376:EE_ X-MS-Office365-Filtering-Correlation-Id: 6440711f-f9f7-4c1d-2316-08dc6daf370c X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: O9kmob/AOgEirU1WEc7mbsYWcBwqhE+WZsNS527EVzXO30Kfon8Ww1aB9fpQNNTR/iRw96He9hTZ3Ydt+0v9JF3DWjkf0K/+79MX57vtSy7d2+hOAPDX+dVSf+exO/pb/UVBOS1F13kNrfgxfRjji76WOhJhfkIFqTS/zUlLEFPZ6RF2zrd2nfEbEVrcQiteM572hiUiVibdTMtCB/mbblIHnRFhC6XsjJPGbl2XuamUx3nZ5nlTFdEiKK/orPh3JsQT3sMRG5tVZUG7N9dGIwb4t6OXZF35lX901fvVlVULonSx+Fb9KLh51RzsBpLf6CFOXbDuw448ixJiZ2fBJnDeSWJeO28mFNZLQ0AU/Qfy6ItyJT8qFqJ4UdtIfQ99lOo7ppngXpS9w9h97ACdmbb8ytw1Xlsm+WW71oT3wZzWQai+H7POwaOzeIiLwA4L4BO7V055rAK8yOW//nM51DBmiRHIxsE8JF8p0CEJ/ucHHBh3bKmurkWYGkuBvFhluQYBU/6xffbJz4VfknEo0Wm7Wr00qOlaVIf5Zi0eqMtCF4/lzh88tHavbbiXYOADAWCfn6q0NlidcZJXTg7uTdlQIlMi2veG/BdHHIvT4dxqwo1T8tA5vIoeRPNFYCVC X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-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pvC7s50Yoi5gXlenNt477M72ez7THZtCKNPkwGP1w4WY8E26tWGkdJWrLLKUV1rOO2aNpsgux3QIY2o3UG0P49YAylEVnJm7eG5F0L0klKHWdspLWt6bZFunlROEc3ByOjWHoPt+FYL/mHKJIP0mmAEAb9BovkDekWHwy383hiOSYXYc7kI9YDGQ1UCDL/VATxU1hTM4SnPvF+9JOxJ0oFmIB96UUvtZ2vaFID5g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6440711f-f9f7-4c1d-2316-08dc6daf370c X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 09:30:49.2388 (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: AM8P250MB0376 Subject: [FFmpeg-devel] [PATCH 3/3] avcodec/aac/aacdec: Fix linking errors with only one decoder enabled 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: OBR6ME7MseqX The approach used here has the advantage not to rely on any DCE. Also improve certain the checks from 3390693bfb907765f833766f370e0ba8c7894f44 a bit. Signed-off-by: Andreas Rheinhardt --- libavcodec/aac/aacdec.c | 62 ++++++++++++++++++++--------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index c6b93e33a2..6a74b05168 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -63,6 +63,20 @@ #include "libavutil/version.h" #include "libavutil/thread.h" +#if CONFIG_AAC_DECODER && CONFIG_AAC_FIXED_DECODER +#define IS_FIXED(is_fixed) (is_fixed) +#define FIXED_OR_FLOAT(is_fixed, func_or_obj, func_args) \ + ((is_fixed) ? RENAME_FIXED(func_or_obj) func_args : (func_or_obj) func_args) +#elif CONFIG_AAC_DECODER +#define IS_FIXED(is_fixed) 0 +#define FIXED_OR_FLOAT(is_fixed, func_or_obj, func_args) \ + ((func_or_obj) func_args) +#else +#define IS_FIXED(is_fixed) 1 +#define FIXED_OR_FLOAT(is_fixed, func_or_obj, func_args) \ + (RENAME_FIXED(func_or_obj) func_args) +#endif + /* * supported tools * @@ -150,11 +164,8 @@ static av_cold int che_configure(AACDecContext *ac, return AVERROR_INVALIDDATA; if (che_pos) { if (!ac->che[type][id]) { - int ret; - if (ac->is_fixed) - ret = ff_aac_sbr_ctx_alloc_init_fixed(ac, &ac->che[type][id], type); - else - ret = ff_aac_sbr_ctx_alloc_init(ac, &ac->che[type][id], type); + int ret = FIXED_OR_FLOAT(ac->is_fixed, ff_aac_sbr_ctx_alloc_init, + (ac, &ac->che[type][id], type)); if (ret < 0) return ret; } @@ -171,10 +182,7 @@ static av_cold int che_configure(AACDecContext *ac, } } else { if (ac->che[type][id]) { - if (ac->is_fixed) - ff_aac_sbr_ctx_close_fixed(ac->che[type][id]); - else - ff_aac_sbr_ctx_close(ac->che[type][id]); + FIXED_OR_FLOAT(ac->is_fixed, ff_aac_sbr_ctx_close, (ac->che[type][id])); } av_freep(&ac->che[type][id]); } @@ -1122,8 +1130,7 @@ static av_cold int decode_close(AVCodecContext *avctx) { AACDecContext *ac = avctx->priv_data; int is_fixed = ac->is_fixed; - void (*sbr_close)(ChannelElement *che) = is_fixed ? ff_aac_sbr_ctx_close_fixed : - ff_aac_sbr_ctx_close; + void (*sbr_close)(ChannelElement *che) = FIXED_OR_FLOAT(is_fixed, ff_aac_sbr_ctx_close, ); for (int type = 0; type < FF_ARRAY_ELEMS(ac->che); type++) { for (int i = 0; i < MAX_ELEM_ID; i++) { @@ -1154,7 +1161,7 @@ static av_cold int decode_close(AVCodecContext *avctx) static av_cold int init_dsp(AVCodecContext *avctx) { AACDecContext *ac = avctx->priv_data; - int is_fixed = ac->is_fixed, ret; + int is_fixed = IS_FIXED(ac->is_fixed), ret; float scale_fixed, scale_float; const float *const scalep = is_fixed ? &scale_fixed : &scale_float; enum AVTXType tx_type = is_fixed ? AV_TX_INT32_MDCT : AV_TX_FLOAT_MDCT; @@ -1188,8 +1195,8 @@ static av_cold int init_dsp(AVCodecContext *avctx) if (ret < 0) return ret; - ac->dsp = is_fixed ? aac_dsp_fixed : aac_dsp; - ac->proc = is_fixed ? aac_proc_fixed : aac_proc; + ac->dsp = FIXED_OR_FLOAT(is_fixed, aac_dsp, ); + ac->proc = FIXED_OR_FLOAT(is_fixed, aac_proc, ); return ac->dsp.init(ac); } @@ -1315,9 +1322,9 @@ static void decode_ltp(AACDecContext *ac, LongTermPrediction *ltp, int sfb; ltp->lag = get_bits(gb, 11); - if (CONFIG_AAC_FIXED_DECODER && ac->is_fixed) + if (IS_FIXED(ac->is_fixed)) ltp->coef_fixed = Q30(ff_ltp_coef[get_bits(gb, 3)]); - else if (CONFIG_AAC_DECODER) + else ltp->coef = ff_ltp_coef[get_bits(gb, 3)]; for (sfb = 0; sfb < FFMIN(max_sfb, MAX_LTP_LONG_SFB); sfb++) @@ -1626,9 +1633,9 @@ static int decode_tns(AACDecContext *ac, TemporalNoiseShaping *tns, tmp2_idx = 2 * coef_compress + coef_res; for (i = 0; i < tns->order[w][filt]; i++) { - if (CONFIG_AAC_FIXED_DECODER && ac->is_fixed) + if (IS_FIXED(ac->is_fixed)) tns->coef_fixed[w][filt][i] = Q31(ff_tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)]); - else if (CONFIG_AAC_DECODER) + else tns->coef[w][filt][i] = ff_tns_tmp2_map[tmp2_idx][get_bits(gb, coef_len)]; } } @@ -1977,11 +1984,8 @@ static int decode_extension_payload(AACDecContext *ac, GetBitContext *gb, int cn ac->avctx->profile = AV_PROFILE_AAC_HE; } - if (CONFIG_AAC_FIXED_DECODER && ac->is_fixed) - res = ff_aac_sbr_decode_extension_fixed(ac, che, gb, crc_flag, cnt, elem_type); - else if (CONFIG_AAC_DECODER) - res = ff_aac_sbr_decode_extension(ac, che, gb, crc_flag, cnt, elem_type); - + res = FIXED_OR_FLOAT(ac->is_fixed, ff_aac_sbr_decode_extension, + (ac, che, gb, crc_flag, cnt, elem_type)); if (ac->oc[1].m4ac.ps == 1 && !ac->warned_he_aac_mono) { av_log(ac->avctx, AV_LOG_VERBOSE, "Treating HE-AAC mono as stereo.\n"); @@ -2090,14 +2094,10 @@ static void spectral_to_sample(AACDecContext *ac, int samples) ac->dsp.update_ltp(ac, &che->ch[1]); } if (ac->oc[1].m4ac.sbr > 0) { - if (CONFIG_AAC_FIXED_DECODER && ac->is_fixed) - ff_aac_sbr_apply_fixed(ac, che, type, - (void *)che->ch[0].output, - (void *)che->ch[1].output); - else if (CONFIG_AAC_DECODER) - ff_aac_sbr_apply(ac, che, type, - (void *)che->ch[0].output, - (void *)che->ch[1].output); + FIXED_OR_FLOAT(ac->is_fixed,ff_aac_sbr_apply, + (ac, che, type, + (void *)che->ch[0].output, + (void *)che->ch[1].output)); } } if (type <= TYPE_CCE) From patchwork Mon May 6 12:14:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48577 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1334511pzb; Mon, 6 May 2024 05:14:55 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVHJwvR72O7sks/Prlhd0ak+25wqO4K2FgQg91D4qUgNyCPw7xIk4UhlLZ891u2WTpx6MD9aFtidiW5WN1fP4H1WTSZueGIYtNOWg== X-Google-Smtp-Source: AGHT+IFhshOop4uafagVoZrF8qtNwGnDvQVdJnzZO0EKF2SaEGW3S/wExnSRBaFVHB7wkoGmQ+5I X-Received: by 2002:a19:6405:0:b0:516:c241:a912 with SMTP id y5-20020a196405000000b00516c241a912mr5728414lfb.1.1714997694909; Mon, 06 May 2024 05:14:54 -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 d7-20020a05640208c700b00571bdba1dc6si4803854edz.450.2024.05.06.05.14.54; Mon, 06 May 2024 05:14:54 -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=S8pgcyWi; 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 ECC5B68D4DE; Mon, 6 May 2024 15:14:50 +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-db8eur05olkn2090.outbound.protection.outlook.com [40.92.89.90]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 168F568D4DE for ; Mon, 6 May 2024 15:14:44 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h43Y5XX/yr3xuvkozSqUA9ZH0z8dJJpln+YK28Yw42b0w/rhL4Sa5mzdtPymY06f75RuyNHrgq+jg5sHGdDuXlkbQ+VW94Ul2tAIJPofkIPEK/V7KpqzneHsT1ZWIIjLpr4T1sS8BIUDzCCYwhnAShCm4rgEmT7TVrUtHvql3HtKSaoy7P7kQgEVH4LwbnRXnFfAMuP6AO1+/tIiGUeO5jibJss3ijiRAMIPvSYWcfAacYOpK9BW18CPO9phbitT/1zWyMOTDMszt33V6nBxLGJZzdNHF+1x3XWmVdXl6wRN7OHkhcZE5BKhNo5TOR0+bzyoK9QTfwfdQs883uuc5A== 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=S0Ss5q6IWaMAttRw37B3HHJdDnYcchBvLawkba8Gn9s=; b=EQgid6aNxamqMUKKIuUInQ1QiwvYbJrFghWeYpEiTOJ2Lvi2QKtk+A85yoVYToMTJzop+aGdYeMSEjw8XtHx7j10kdG44vH0Lbl0s7fKKeJ6i/FthjEBYc24hWVstKaIbjXgGOkH8vw4OPM0rgrVZKRXtQSBh8KmL83I+UoePU6ZtNvTQ9KTKK08g9y+hjhSpWAJDgQdDiLmjx+PN5NOAoRGiOqJMMSHd6YzeFCZFziDHXHy/FJ6/dkMajSjn9PFppfT/fJICD0yGorHKla8wu0xcoVwMBGVZWvEat0kaqIxZfj+6rH4SyvPzJuibsADQ5gRLUUg8MhkNPvDd4Q1Pg== 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=S0Ss5q6IWaMAttRw37B3HHJdDnYcchBvLawkba8Gn9s=; b=S8pgcyWi8OkPn0w3Kr3CJFNRNszaIhgDKgZ0wferPt2Z5zuik+n85uemPTOl0yR9C/Cb5/ivW3+6EuuNxOSZ6mihjTcePP9u/UmCVYAko2kmUgUj2GxMAbYSTsNtO6Qy8uQByAd/1dIhwScqxdrU91JpfHmlvlO6QkcEnj6hJ39zaXt1LgwsRJSfCS4OM9aNkZQSlB60siNB1nG2r/dzRBRH+OWmMAemILh1b6G3WQaflS/81eEXv+NApx7ND9QZBBK84N7xQvsajEwk6zBuuZkS1E/fofWuavTIzjN2IZV0ac0/S8j9E0mt0hth/X3FRFRsxg+fYOCXejgZyYmF8Q== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0497.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:33d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Mon, 6 May 2024 12:14:42 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 12:14:42 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 14:14:26 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [Xp01tDkKk5UOUxkwX0Tu+9cr9XxmZ/72oCqc1ljd2Ic=] X-ClientProxiedBy: ZR2P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::15) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506121434.225228-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0497:EE_ X-MS-Office365-Filtering-Correlation-Id: d3ccff7b-1e70-4fa0-32cf-08dc6dc61bdf X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: hKWlNjc4FhwCXKtLRrgRTFTtQrYTEb1Dhtd4aOOB4gKt7CZIKuBWyE7t74xQuPPBSYUznu9XFRZuzRqGAmaeom/0HOwrT6VsH+KxQx63xlwz0jE2I3TQXOYHxwEaOIzXFYokUhzsWmEEytAckCbLoj6ic+jmve/y019H9dw0Prs+LPg2pNdJ4RLlUZuppHvUWgmSg78JydNY429ZjTPkoeaa1xwCLW9iIhz8HZpXeoMvWAKeeAHmyZsjtLnZOtKpMJliAX7tx1wKJNeWcVrV1JFBTximPDJgZ9IqU87sN1HJxpcF5Rce/R8my+zrApazzKeHq7BsFhx4Pyw1OpslruCJMAB5tDcGnleBsJH3qc/hjzsAkBT3YbqylTUqSb0Gm7mzDjdHgLFIH1D3yYsGEY8AsrQYsTAuevgigjG1tQVZPCyirH8Sc5RtL7s6CH5kf+CEtzhtD72jcMsrdSFpE3V9nAfNSYWwZvdBL7EV1COKF2WABCodx0kWbjX+WtV+F+9XEmPCnCxZhfLzMs+9Y93EVH7KRuRlPrmuADUe844bguvPrVOnYeKdd4Z57V4KDri8teJoc1eyX6KsY1bk3jPMvuOYKWxKHbVZ1AKBlNgT2+kR0Bv7/L74sM3dHhkU X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +HbxFi6dOHGRQgL/RkmghrJlGH52UPfXKJorb+uBfOu7jkrkIbH0bzmCfMGs+kjzxK3lvtWttqf3w+sYLvDnRslBzfW7HAMfn79glCiadD+oZ4NzDct7YH4kmno1+jfwbs9B6cemkkfXHDEjaHkMguqG4IyPkR172iUELtgilw9XKK9BlgnSi/2r/DhEAvemiHwXdoKaKgKu3Kc+InSuQ8Pvo5AOSoXSVYfpBKejQ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== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3ccff7b-1e70-4fa0-32cf-08dc6dc61bdf X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 12:14:42.0474 (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: DB9P250MB0497 Subject: [FFmpeg-devel] [PATCH 04/12] avcodec/aac/aacdec: Remove unnecessary ff_thread_once() 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: CntKaTPz/hSZ ff_aacdec_common_init_once() already uses its own AVOnce. Signed-off-by: Andreas Rheinhardt --- libavcodec/aac/aacdec.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index 6a74b05168..f6a7266123 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -61,7 +61,6 @@ #include "libavutil/opt.h" #include "libavutil/tx.h" #include "libavutil/version.h" -#include "libavutil/thread.h" #if CONFIG_AAC_DECODER && CONFIG_AAC_FIXED_DECODER #define IS_FIXED(is_fixed) (is_fixed) @@ -1120,12 +1119,6 @@ static int sample_rate_idx (int rate) else return 11; } -static av_cold void aac_static_table_init(void) -{ - ff_aacdec_common_init_once(); -} -static AVOnce aac_table_init = AV_ONCE_INIT; - static av_cold int decode_close(AVCodecContext *avctx) { AACDecContext *ac = avctx->priv_data; @@ -1209,9 +1202,7 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) if (avctx->sample_rate > 96000) return AVERROR_INVALIDDATA; - ret = ff_thread_once(&aac_table_init, &aac_static_table_init); - if (ret != 0) - return AVERROR_UNKNOWN; + ff_aacdec_common_init_once(); ac->avctx = avctx; ac->oc[1].m4ac.sample_rate = avctx->sample_rate; From patchwork Mon May 6 12:14:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48578 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1334709pzb; Mon, 6 May 2024 05:15:17 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCU9o5mn6RQfCrtGIitMpkedeZPyt30tQaKQOUlm3fBMZ1AMAbxs61U5usSjfJnHpnvxB6/p904i8Ym6XbXwGZj6LAwUG1JqhY1VKQ== X-Google-Smtp-Source: AGHT+IFVxAQgX5yJAzcbq2aEaIDUo6ylapZ6m9WnIu4dNMTr40Gn83ypnFQxudATLa1LH4VHzKAP X-Received: by 2002:ac2:58fb:0:b0:51f:1bf8:610e with SMTP id v27-20020ac258fb000000b0051f1bf8610emr5698035lfo.37.1714997716768; Mon, 06 May 2024 05:15:16 -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 ca5-20020aa7cd65000000b00572d25c4509si3852084edb.257.2024.05.06.05.15.16; Mon, 06 May 2024 05:15:16 -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=rPu8JgZV; 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 4EAF368D5F2; Mon, 6 May 2024 15:15:14 +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-db5eur01olkn2079.outbound.protection.outlook.com [40.92.64.79]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 96D8468D53B for ; Mon, 6 May 2024 15:15:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VV4gycGrvAi3ko57vfACkyfiXcR8KEMN6ghCwB8doFyYto45xtJXf3bq6ui72TnePj745zYxSJcXPWoYz8eMjulZmyxvYoF6RJ6OUMSM1k4l0SNtlP1AuC9voNsaY+w6mxjr+j+zHNMbXXe0UFN4FsDjDo+BQgIwvHCn4XoJJStl/7NWRp7wI41buqCP1lzATi8PKO6K4eAHJZ/zuPoehEmbktYXlbpAG4z1HEDnVZ16m4cr3E2l35Dcjkhv/Zwl/sQAb7zLVd/k7dEB7cPL+9AVph8g29iyN93Km98h8t18k9+ZOvqbf1OhstaycnKwmk+fVcM4ZN22Xpv5jZ/yWw== 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=YY2Xp3gw4bT+owf82e8qs8LPJGpdYyzvLJsf1SmdVB0=; b=WYix4mzegdytRbhjnWkvxqo4Mh1IYGSB/YVjqyUvf+v8v1ZyQQHe9ZVjp8txF06jOnM/Kb2Td8OGTvP1O0w/kmrvEaTsoNz0CLqsrUtHvt0fsrK8fWnKxYuUfyQE2oGjb5mHWWraZilL8isTBNr1fQfc156d8KC4wLctSHsOgaO/FLdqo8UBD4Udl97i3E0nJOuvuZJavM9dRXC83bPzZ8GFfINtx7sE9ikp5qrJUTP4cMS4XC/6S7/JopvCz9I8VYjQk6peG8hcNuANasNhJz3btm9h8JyTmL9C8eQR8udFlMqI6ktuV+Wl6J85kGs42UVcw0zrQS3cMcP+oIFrnQ== 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=YY2Xp3gw4bT+owf82e8qs8LPJGpdYyzvLJsf1SmdVB0=; b=rPu8JgZVUxNEQccAuqG4PsT7tS6WIIWbdS0rM61h1baQZyU4CtdwMiOzmccE4UW3O4u73cIH45QqG2JFDuXAhNE2Oj8ISL6Blirj8Z9TTKE0KNieI5T7Hb92HaeHcJNRu3x1VWegwH8CZE85gj1kn98gCmZOsXEJb2DnAILzyDdpioUzj0Em1qaUIWyfUqPmH7FNXOc1SQ8CL1eXbuox/jAjoGScVJwISappMS6aI3aQVftqjMbcj+4jI2eLNuDeMQAR4bwSTaYjveA/byJaroBa4MSuvkZ57y2wMH7m9oo3eFtxD0Vt4JnpOwRHWQpa90kAdGVCp24PsaWwTjsI1Q== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by PR3P250MB0194.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:179::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41; Mon, 6 May 2024 12:15:04 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 12:15:04 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 14:14:27 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [jregvd3mJREBfFjh2Ou4lWAyxjQAeE1b8lQtuxWMn7M=] X-ClientProxiedBy: ZR2P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::15) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506121434.225228-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|PR3P250MB0194:EE_ X-MS-Office365-Filtering-Correlation-Id: 07312b50-9efe-4d67-4f64-08dc6dc6291e X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: wnCMQgT9AEitObnnD8ahCFibcp/Du22STH+8w05U5EDYAnkVVVhOLQJ5ixurUkw1HD2MaokYm2CKpW6YfpSamB1WsiSGYipltqDCtkEAYnmZqLXHpBLPK05OPkRwPlaidjptTL2UHB+HR2v4TX7E54p57nH8ZPhnrm2IZ2/AlhWK/DroZ3g1a0rzaUEdNZhmtZvx+WmlTeaCo7NQQib4EkLen4x2BK6EI0cN+ANWTW22IlW+UYu2pnvcA48PIJEjCo0HaunzwiiYPnzmegVl2qX7NwTyuwHnwm1N814S3utXuiKksN/DjpWozskuPA0X3HlMqmPSP6yRLbfDa3a4xEA+3gO1iRKt0DYTlyvZHh6eck45e/ESssiJ7AvhN/BUw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w0lKoAQR/Tif6/OuffIbIxvc3iExxeZsK5mhQdYixBXDXSudIkwVbbgISCIPcODs2WUkVrNyW51VgL3ZDgFnqJIRVsze4SfE0cYtMj1i4gGeEP/4IU0szlbn1zycpYLAwBWJ7WgRS9+EaWMPbxEucD4cD2V+JzdC9FrQNrYQYh1lm6esJzMnqLWUrnzBBQ2cK9wL6F7+j8pf5FFVRms8gi2kJUNyD68V178vG/GOhD3cJP29zpYI0ZYsgAi0Z8WRk0pZAUQzUI6BIp5OUHjieFCxbuFiN+1ymwPbaz8YJjS//8BsbgS3IR2HMKAJm+Uf2LQKW/djpaeMcLLhD7Gmfczifrz58VyiLgEz6MhmAiJHtoGIE0pGuNFEeQ7vbT++KmO61bYICpFp5NBTImndFpfTcPGk3Oy6jKtOkl1yjXBWwKZX2fgwSQ277iSG0EX1rekIXG8FB91DEIl6k6qKsnj5wQtf8kBnzKtpm39HFEuuNpL5CDhpy+j0wZ8zvrpdvdhqN0qf6Mj2cwPTYMAXmM9kQgQ3ey5YUlg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 07312b50-9efe-4d67-4f64-08dc6dc6291e X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 12:15:04.2321 (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: PR3P250MB0194 Subject: [FFmpeg-devel] [PATCH 05/12] avcodec/aac/aacdec: Move channel number check out of init_dsp() 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: NEotoHEbMKa5 Also move initializing random_state. Signed-off-by: Andreas Rheinhardt --- libavcodec/aac/aacdec.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index f6a7266123..a78a669602 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -1159,13 +1159,6 @@ static av_cold int init_dsp(AVCodecContext *avctx) const float *const scalep = is_fixed ? &scale_fixed : &scale_float; enum AVTXType tx_type = is_fixed ? AV_TX_INT32_MDCT : AV_TX_FLOAT_MDCT; - if (avctx->ch_layout.nb_channels > MAX_CHANNELS) { - av_log(avctx, AV_LOG_ERROR, "Too many channels\n"); - return AVERROR_INVALIDDATA; - } - - ac->random_state = 0x1f2e3d4c; - #define MDCT_INIT(s, fn, len, sval) \ scale_fixed = (sval) * 128.0f; \ scale_float = (sval) / 32768.0f; \ @@ -1248,6 +1241,13 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) } } + if (avctx->ch_layout.nb_channels > MAX_CHANNELS) { + av_log(avctx, AV_LOG_ERROR, "Too many channels\n"); + return AVERROR_INVALIDDATA; + } + + ac->random_state = 0x1f2e3d4c; + return init_dsp(avctx); } From patchwork Mon May 6 12:14:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48579 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1334815pzb; Mon, 6 May 2024 05:15:26 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXbjaafAj6nBOXoJlzXdaz7Q764Dj6Wi6K9A3BHrd+hkjvfk5ze48GDNsjrUqB6eehT9aWN/O/PQNr95rIPbPsacdVT6N142Qkcbw== X-Google-Smtp-Source: AGHT+IEz2kDF3mB5i7FXtGY+8vwoSUaDQ2D86NTkB0kzpPaA1ZwYjx4l3Ju+X72G9J1aA05J//cr X-Received: by 2002:ac2:58d9:0:b0:519:166a:d217 with SMTP id u25-20020ac258d9000000b00519166ad217mr7283916lfo.32.1714997726367; Mon, 06 May 2024 05:15:26 -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 lc18-20020a170906dff200b00a599a3d46d6si3677813ejc.30.2024.05.06.05.15.25; Mon, 06 May 2024 05:15:26 -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=VOhppNtc; 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 EE11068D60D; Mon, 6 May 2024 15:15:19 +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-db8eur05olkn2059.outbound.protection.outlook.com [40.92.89.59]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A62B068D57F for ; Mon, 6 May 2024 15:15:12 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nhqOwGxaF92E2w30b42275R0mITMvcRo0Zjqm3FfYdZZT9LIYZZx2kG/2aBwgN2iLb5D/pLQKgLXleF97+6FMpz5mb9/HMi94Ah/BAQ5QwAttf9Dm/MSUjgwjOf2EVWTp3u4JVOC4k/pNB5ep7KCqrfAeYxByPNryJascL16IdjXD0apZER8V9sYA7k77WrAacxrV94GTNatnM2Jm6aeC5KYitPnn8eAlETYgkO2MJKtNmmjX8UjHR/9AU/CqqQVytZgF2VfDAF/9H78KQvb9GpW77nB2WCY4n/GJzvO5HQkZe5XfyU3lza2HFOluIuU/61fcrUY/voGK2WryWRukA== 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=H5xq2zhplpyo/cHJyDFWEhZBhe9GijIMjmTznFKK2nk=; b=e+zIrtMyshYX91GJrclt+jljGzyhbe1Cc3lWIC6UmH9tY2zSszVgsdem4Ea2OtvdXVOpXri/tWPc8qf0FLNT1+9wLYm2uZWaqUl5vA2QvzNQ19tnOIyWJs3iEAmV1nXSV9eyx7SNRyYWA2l+IXNtD97jwhpfeCEwfcOLBEaS//+FACNpbxJwKH4AJvIR+OrXBI6aQyFnZ9nq6oIj/LiE8IwK1SCwNl6w9vLkQ5QpqOaPh6/o3TYY/oWlFT4ZQ5FxiEIeU+ontLpphDOVSCuaX2sgYJDanAeO8RygqAAGbb+1gjUdIVYZcKM2Uw8ML3DnBfhRgET0U3uw/tPoYgDJCg== 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=H5xq2zhplpyo/cHJyDFWEhZBhe9GijIMjmTznFKK2nk=; b=VOhppNtc+qW6B4oleUAiVaH1f6PKLP3uRf8xSPU94a2JQyQ434Hbt3pLOXtVPYxN6AanslbBkNL8dYe1VxA1i8XmQsRn8dnQ1KFRs7RpL8jNq1pl+WbXLih7u+hetidI5FxYatoIzT+zjB4GF+hE/ZF3i2htgNNN+YeYhfQEh04bhYf50OMzoa4qJbvo4R9CqN/y2TjrTb/Om0cdsCbzVvAKUeNt5U7G04LoSiD/1louw7tuI1wyKGHFq9ID/qkr3yZmBywmyzmVVI+ir1KSfR+71N0LiPW3HYZ1u4947ytluMeV04plf3C9EQXoaYFBLa1xEIE7KPZxju9PD/dbng== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0497.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:33d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Mon, 6 May 2024 12:15:10 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 12:15:10 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 14:14:28 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [E9SsIUkSffaijOYTt01l/HN0ui4DyKcFAVCOQUjpoIU=] X-ClientProxiedBy: ZR2P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::15) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506121434.225228-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0497:EE_ X-MS-Office365-Filtering-Correlation-Id: 74ce3c93-339b-4a4e-6ce6-08dc6dc62ce4 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: DyWkTgQCgV3G5af3+KW5FBQ8SeCB5VSrHYoP1j7cDeb8+A+UHwKEtF7GxK2cPt0s9PTfYiN0TfATnX67Q9PWMHAiViKi9Su5JR+kPljLWafevlGmoEGu67NeoL8vfZJgnqnjepg0vpKHrMH9+r6D3ubR86SKTdcex3HXSWIwXd6/U+GI1+xyMXSBj6c/qFvkVUOvegmjkkzteekMpjDikp4Ha+28YVrPfiQmuEzhM2fwSX/iJzlvwF5e74TQNOiKaP5VCy8L9+qlnss4Elvqh04JAR52rXbKEVXfFrA5JkdYn4gLS5X3QQVEaZUGqdTlZSL2jFp6Yg/BqcpLye5X4SS2prm6qFX0AxEQ4AUIM85uXsaLK2HNZhXRGGUmK7gSxKXtzXgT2igIPn3KCUfe2R8zwQRo3a3dS/sGY2F9WKp5rXhYSZYTUed+1IGThwJNf9Ts6D57RcbB2INrZu+k/DMOd8/D07Usvd9gJQDi9guGrtTmylBNB6H/fX5lbD+zhhCl1nuRL3WWrJsOeSD8LWWVV8iMA7gIuG69TLBpuvEqzNLAzXbp0ZyhA9SpXnMsfADJrsxooHWMvVv6AlTpQIXdi/qBAPmbk4FFrqmwtSQ= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bKo+exjcrMUn2gAFuln5Dae035RR7G4YWlMJ4B+oBrNYj8gaHE8bo5jAq0Jg6p/vt6n5OBDUyGw+Ftxw6uv3FJgctsDJevCxjI482c/KuQQFi7eD7gHo1z2qCu+G3R4pSnXORcSUKtzEz6ixK0+uauWpOd2bEf2CZK3n7chzAZw3p/48VZgI3pGGdPwlWGVTq2PSPax4DJChQmCIaJM6CB9fr/Lt5reKRMBOhHa0NXTrjNGJVBbbZ/tq7DBLvZMZWY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rossTenant-Network-Message-Id: 74ce3c93-339b-4a4e-6ce6-08dc6dc62ce4 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 12:15:10.7151 (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: DB9P250MB0497 Subject: [FFmpeg-devel] [PATCH 06/12] avcodec/aac/aacdec: Avoid branch to set sample_fmt 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: qyGRfFt0syAf Signed-off-by: Andreas Rheinhardt --- libavcodec/aac/aacdec.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index a78a669602..1dc4af8a0d 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -1200,11 +1200,6 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) ac->avctx = avctx; ac->oc[1].m4ac.sample_rate = avctx->sample_rate; - if (ac->is_fixed) - avctx->sample_fmt = AV_SAMPLE_FMT_S32P; - else - avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; - if (avctx->extradata_size > 0) { if ((ret = decode_audio_specific_config(ac, ac->avctx, &ac->oc[1].m4ac, avctx->extradata, @@ -1254,14 +1249,20 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) static av_cold int aac_decode_init(AVCodecContext *avctx) { AACDecContext *ac = avctx->priv_data; + ac->is_fixed = 0; + avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; + return aac_decode_init_internal(avctx); } static av_cold int aac_decode_init_fixed(AVCodecContext *avctx) { AACDecContext *ac = avctx->priv_data; + ac->is_fixed = 1; + avctx->sample_fmt = AV_SAMPLE_FMT_S32P; + return aac_decode_init_internal(avctx); } From patchwork Mon May 6 12:14:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48580 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1334911pzb; Mon, 6 May 2024 05:15:36 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXgujIR5cTjxug/6NTnHc4JTqIHY1kDnKHWKIEMu6b4Nq7SlAAHi0XmElRImNGqyANpTungMbe3QMSkNxqsJepHUf19j8VCRujvoQ== X-Google-Smtp-Source: AGHT+IGZluxL63hZ+t1Yv5ZEYRhLFKGVCPW/gjj5cdpzpkutPHDWTXWGmSGa9C+wce5pUxQleCtk X-Received: by 2002:a17:907:760c:b0:a59:aae5:583d with SMTP id jx12-20020a170907760c00b00a59aae5583dmr3375808ejc.7.1714997736053; Mon, 06 May 2024 05:15:36 -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 lg24-20020a170906f89800b00a59b02bcedesi2358141ejb.1018.2024.05.06.05.15.35; Mon, 06 May 2024 05:15:36 -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="sFc/cKxU"; 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 64CF368D628; Mon, 6 May 2024 15:15:21 +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-db8eur05olkn2059.outbound.protection.outlook.com [40.92.89.59]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2B96D68D60D for ; Mon, 6 May 2024 15:15:17 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h1CO3ksLceIomMxZ/miHQ3PTCtIMTtgdel6uSNDcKWIWIX9a7gfrq+JUUU+biYwwCsgEu03x8VPaMwEQ35y/VfSToRoMGvqBVYRBmPuHKCyuGO9pSR8/s3J3s8GgzKa6o26XSd2vIQQfl7vdDbx9y2Mxjm4PC5TkmG0TxXDXHOJETc5BsoVpUcrYR0aywqeBvviwczznke4UV6s3UHVZhUMPbH0uAGuBoACGTbXeICteaVNuWQMTRLaEkIBzuMSxnIR6FzrjmNB7DBEAxyxCa//guvGoiGXBsEuXmVMHbyBkXo4WoKAlfjcTdIl2EKZ1KonI5fdJpRKHgiL3QH0OzA== 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=ZiBkA6wcvXiYLfXOoB5094a4RHLv4Uwl3iIOiD1lXns=; b=NvNkUfFnwi94AmlaXjdoQ56Pp/kK6EBZXgXiT86z/uSli+KspklO41fLdlhmt9IwEEyGoCgC7oDnOfbKP0NsBhQjY91EFy72F4w6+3/abS6Sf7mCg4yUmi4h2kmOlQyG3ck5y3x+Ck6mDzAz1GUNJu/XzgfNM7mmbdnBWlVZTpd1/PVWuJDdV7sY9EvQ8DGOj61mvZ8uuXwMhTFC9ubkgoWAup0EEoS+c7mkcRhpEzbxp3JbNmJQrvsL3xHiPjv2pvNR7OAN6Cv0lZtDn949K49TUCWksIJgLNrPGyAUJZPAlbX8d9RVVuq3JAmZ7vg7I8h8t45Ckonv7kb37x31zg== 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=ZiBkA6wcvXiYLfXOoB5094a4RHLv4Uwl3iIOiD1lXns=; b=sFc/cKxUG1YdZ1jPLkdgk31InXmHpvKimm1YwyMU+6C671EBYyLvjDo66NgwKceFucB3h/ubAF01sM1s3wJ9rnIdAZE7VeK6rgSJU7lIJ26WD+83nqCT2n5VX3ssvQPf9W6b8ObEpU07d5EO4vDc0vFUIDGM56xy5tSFx8b/8fOWKHHW1QTJad/fmSV0aY/3XDKX8Q8gluBn7G4NtRwz4hjZvDkcSoludYNnsM/vEWw5cwlr9j+hvd5o3fLtEIn0Q86rJoE2bZFbcImMLLbY15P97vbQdSYn0lO0dAi/fksg1AQsh8mEkp0xrlfoD8UfIdKBV/y6hVBK/jxif06k+w== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0497.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:33d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Mon, 6 May 2024 12:15:14 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 12:15:14 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 14:14:29 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [NKME+RP2cDgqmJ5vnOO4iqOr/T6H+rmKVk5aL4jbbto=] X-ClientProxiedBy: ZR2P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::15) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506121434.225228-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0497:EE_ X-MS-Office365-Filtering-Correlation-Id: 3e249b0e-c786-477e-4346-08dc6dc62ee1 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: 5po8nyLM3E49MZAXRQOdweYqbQ8y1IAe0RyLsJxVD77tDbFzarupZhf/smQXZJO+VG2WZjuFrz8VtwHHnEw8JttZ3UPAgfRioVG3AVku/H4pzV2O7TKYkZ82bsZEQw8wJcUUDZRkk4HjXB7+JfQlko6EBQfIwRU25pQzAw9ifkzOCCpvbHH9DclPg+KLLbzQ9itSKoh1/WIfw9nBtBP+YI6xPDnE/dek1DNIemXZEgCSbbsT76QoOcSgMvR21TIMCGUPH8EchgeJs8u0/rD1RfSi0MKcxoHu9u6lrYIFkAB3QWWK6G0yN/p5tQfehbpXdR/xlvPlZX70UtAiitOrWBoGXCdSL8dcoz4D+cq6usaQBdozSCiXcdGVPckspuOuFOTTw648Rim8Futk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ZSdrCGv++WBHuDCQfnUjlV5gjrZcpUu6ddFuuo43fLo6Ys1vReZBYD6Qpyw6JGrDHgEKsl8jv32IFb10W0I4Cn8UuUxG/Wty1mKMwOEHGzdsgTe0aGdj7d1MKS0OF4q/QOnZp/RmlHZ0YoTRsLM/9DZTP9GbEKiqkPk5WQQutExSzoI3Y0mqKkhBQlYiEsWmRGkN/E1D3e6zbIFPi9RTnRlrXoRO1gAGVYjIPrmeZ4Ux+nSE6XzTaBdOvcqejKdkUC4YDoVkMgMS1CoRgk21nJIK7gadpJpEumH4AXfJ0J+P3kUa96GiLYTX10mrxZbYxNTVwAfSYq0haeNc+oFhxvw9A+OQ/DEebk/IMdIzBV6VPUmgtDxPgAGUu3K9zWND4H+6iKIkWSLkJldxHx4OWdArAEr6Omoh3782vr0mUZjGziFl5OYYbo+bF0t3cCS/kiMw5sj27qK7qrXkUkI9PEmL7Vs536nVqUSIeXZPfn6/29ESfuqNEFMDHefh9xyDTRnsahOA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e249b0e-c786-477e-4346-08dc6dc62ee1 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 12:15:13.9632 (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: DB9P250MB0497 Subject: [FFmpeg-devel] [PATCH 07/12] avcodec/aac/aacdec_float: Call ff_aac_float_common_init() only once 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: QtYdg4O01d5N That's enough. Signed-off-by: Andreas Rheinhardt --- libavcodec/aac/aacdec_float.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/aac/aacdec_float.c b/libavcodec/aac/aacdec_float.c index 5c4eec1204..511db1a604 100644 --- a/libavcodec/aac/aacdec_float.c +++ b/libavcodec/aac/aacdec_float.c @@ -64,6 +64,8 @@ static void init_tables_float_fn(void) AAC_RENAME(ff_init_ff_sine_windows)(9); AAC_RENAME(ff_aac_sbr_init)(); + + ff_aac_float_common_init(); } static int init(AACDecContext *ac) @@ -75,8 +77,6 @@ static int init(AACDecContext *ac) if (!ac->fdsp) return AVERROR(ENOMEM); - ff_aac_float_common_init(); - return 0; } From patchwork Mon May 6 12:14:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48581 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1335047pzb; Mon, 6 May 2024 05:15:47 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCW69K7qJkCzr8QUa1rWRNKEJzDGGrw5etg+BPh8Rx/jB5xJh4ClkdjXGJXpvUsuVic9V1havXFb3L9SbxbqrSwA5JoACwuzrpGQZw== X-Google-Smtp-Source: AGHT+IFZEyujdxCF2dg9zZrMcpdLNxex/0wTu8tyna65gNrF4SH+SKdpZCgGeB6c8S/xki33PYGg X-Received: by 2002:a50:955a:0:b0:572:a06e:e406 with SMTP id v26-20020a50955a000000b00572a06ee406mr6313064eda.33.1714997746792; Mon, 06 May 2024 05:15:46 -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 v8-20020aa7d648000000b00571b67239f2si4707111edr.523.2024.05.06.05.15.44; Mon, 06 May 2024 05:15:46 -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=tDXrImlh; 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 AFF9568D631; Mon, 6 May 2024 15:15:22 +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-db8eur05olkn2059.outbound.protection.outlook.com [40.92.89.59]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5AA1468D60D for ; Mon, 6 May 2024 15:15:18 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jr8RuNtanc8pv7JU9gD8YC85FKQCiULikVWRLSM9P/wEru2HfwNfAHLtoUEvulVe0wiFfPNzGdjh46xUvYEWxjP1O/uiYu2tlBLRAoMQP6nsSk/aqXyWZoENkdWDPv8+htr0l/7WHv5aRrC4trK8wohQ3Jduiyq67IYbA/7Len4dwQIlJSV5GcdaqZp5HiMHp6F8OHOWYWJM1a7XFe/BeE8m1dfobiQbOaHYNtgUwymB7if0bDd91N4R988D3ifbugemI8BzayXNZ5iSeYvayW7aqCz/R1wFpB8urSi9SD2NzNIeMO0dEB/zBfVEbcIhfpzXhi6l4DwqtxgRdxgTFg== 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=zKUFlZ+QlsKI5Lv/oSbypsvxNUEC96+8tV0lP/gAx8s=; b=CA8cS2bd77iZRy6lhfCv2JaFEuCtFgcjgOtQxzW7BteoDHE5SRuiUwM3NUWiZknOx4ONp2PEvWe15FzpcgdgLv9zzR80xp4EEXCOOBAOgJ4xkjUvSPaeMusCjh3ehEJ8v+tgYqQCQwjboJDlv3RJnHUfNZ8LKyEETp1mdULMIfVP+btMiGx/5KDYNHrkhgaC7XRezotqR4K/Outa4BbtHZD3DkalUsSdLuIiA1gpPf51GuBg74KeL6AXcUzyXPuWlRYwJdTgKqfzXas9Cr6AnNbWJpw8uEaRwTU1Uv3qJVQ3dHWVFEpUdpjnk7dzxPq323L1FaENh556vkef83Dy7w== 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=zKUFlZ+QlsKI5Lv/oSbypsvxNUEC96+8tV0lP/gAx8s=; b=tDXrImlhyCrKhPIaJzkrPMS4IjcnJVGuGDSKuCDObHoFwdFMn42MUikFh86IfnJl/tsH4Tcqeq6nY8OQMvIQCUrBVQlwe7nZocfwHO/RWbRmcjJqdwKBxrPrD6kigSV667XIcJuIiJgRLUUcfrgQtvexLVV5f1OCiwQVVbZS6qw7yUyrGQRwBGHNSgM6nfvdPDVz8LHzqw4NUVPMXNJXEpf/KcM+7iylYKRcCbg1/d5W8eVocOGGsWuBXpxsgwb9MBh+1+5PdS3atX6JCyu0l7roTYO+I6OCTOjlOmIoCL0GAOUtu0odzL9i/8MjReFgkyk61rLUpnIWtAzdFC8usg== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0497.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:33d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Mon, 6 May 2024 12:15:16 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 12:15:16 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 14:14:30 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [Svu2o0VcZ8P5gEFdNMPGkItLHyVkG7qqqzy0R9ROo5k=] X-ClientProxiedBy: ZR2P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::15) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506121434.225228-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0497:EE_ X-MS-Office365-Filtering-Correlation-Id: 06a41fac-1942-481d-eda8-08dc6dc6302e X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: 13yvFnIzQRgFdjNNi1jA4zsPK+ZxkmzDIEOu2WClq5Hsa8AZk32gjtK1bGzDqCZ93A3j6XcJZcDhfvG4XsUQ5Oz21LTa0ffjL6Xo3kV+mVAe0o433UIlAo6htWuqyaAzufSxtbESxRTGXbODWS4ORt5bPpxkKu6S1YihoT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Uv0ojP6mOBDg165Z7HVt+Xk/MZyUkz3uEmN8erTxw2Lc5+smrjs94PsTQxmQ54fbU+y43jNG94FuNo4YZp/ufR/0FmzjDZ5fBKTkD4mnVkoIblWccUsYSx6UWiRMPNPAZygC/LMFmHcfmybaTeo25SN898Q7bLw0tv9I30quyDRYOl9Z3/0aMA91W4TSP0PnvN1a1RdaZDJDz+FboP0tLw8n10IvqbfQkeYp9O2hqlfwLRpIv2wyiG6TpwrRY2IFXgCK/hMynGeprylclhWDK+/wTp3L+A6GhHN2NaT/v33JfYnv8zZ+EyPzUR2DadFzthcMGmTeDu6Zk4kaP3kv3eR/sqfRiJ2YBzEcXSy5tHir+NxqrRy3Z9ElPQwL7wWyqBpGmG2Dn9ocuKBFqgkUFzgm4kVjWWhecoHgcJ9p+rtHIiZwJGLdzGIQtfmT0yLBu3RAwY8IkYbJl5epkRdDLBqFpBJDXH+9XO+cZdcifgihEtxjt2bgD8CxRdMG1p7KV1nKLsLUukWIhIL3ehggbK8hRA6Qs8relD3T26w4zEJz4kdOV94Zzi8PhpEE6fNVwzTxhtmKIaWHHurQWl1ldfs62x7UFXmGtL3ULNgN9l89E4IUItMjelszjc0zX5j4euudhwro8KSw/sAnghfw5AnoBRrXhXFLPgE3haaAMrBuuFKfMQg3zOa2K649diz2mxkQC5B8wZbL8xObX+UtmRA/p19o88Tc6TQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06a41fac-1942-481d-eda8-08dc6dc6302e X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 12:15:16.0939 (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: DB9P250MB0497 Subject: [FFmpeg-devel] [PATCH 08/12] avcodec/aac/aacdec_(fixed|float): Avoid AAC_RENAME, INTFLOAT 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: 0TmY7D3XZqqu Unnecessary now that this has been detemplatized. Signed-off-by: Andreas Rheinhardt --- libavcodec/aac/aacdec_fixed.c | 20 ++++++++++---------- libavcodec/aac/aacdec_float.c | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/libavcodec/aac/aacdec_fixed.c b/libavcodec/aac/aacdec_fixed.c index 92204180a1..083f3b073e 100644 --- a/libavcodec/aac/aacdec_fixed.c +++ b/libavcodec/aac/aacdec_fixed.c @@ -43,22 +43,22 @@ #include "libavcodec/cbrt_data.h" #include "libavcodec/aacsbr.h" -DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME2(aac_kbd_long_1024))[1024]; -DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME2(aac_kbd_short_128))[128]; -DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(aac_kbd_long_960))[960]; -DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(aac_kbd_short_120))[120]; +DECLARE_ALIGNED(32, static int, aac_kbd_long_1024_fixed)[1024]; +DECLARE_ALIGNED(32, static int, aac_kbd_short_128_fixed)[128]; +DECLARE_ALIGNED(32, static int, aac_kbd_long_960_fixed)[960]; +DECLARE_ALIGNED(32, static int, aac_kbd_short_120_fixed)[120]; static void init_tables_fixed_fn(void) { - AAC_RENAME(ff_cbrt_tableinit)(); + ff_cbrt_tableinit_fixed(); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_long_1024), 4.0, 1024); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_short_128), 6.0, 128); + ff_kbd_window_init_fixed(aac_kbd_long_1024_fixed, 4.0, 1024); + ff_kbd_window_init_fixed(aac_kbd_short_128_fixed, 6.0, 128); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_long_960), 4.0, 960); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_short_120), 6.0, 120); + ff_kbd_window_init_fixed(aac_kbd_long_960_fixed, 4.0, 960); + ff_kbd_window_init_fixed(aac_kbd_short_120_fixed, 6.0, 120); - AAC_RENAME(ff_aac_sbr_init)(); + ff_aac_sbr_init_fixed(); init_sine_windows_fixed(); } diff --git a/libavcodec/aac/aacdec_float.c b/libavcodec/aac/aacdec_float.c index 511db1a604..5efc0c1e54 100644 --- a/libavcodec/aac/aacdec_float.c +++ b/libavcodec/aac/aacdec_float.c @@ -51,19 +51,19 @@ DECLARE_ALIGNED(32, static float, aac_kbd_short_120)[120]; static void init_tables_float_fn(void) { - AAC_RENAME(ff_cbrt_tableinit)(); + ff_cbrt_tableinit(); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_long_1024), 4.0, 1024); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_short_128), 6.0, 128); + ff_kbd_window_init(ff_aac_kbd_long_1024, 4.0, 1024); + ff_kbd_window_init(ff_aac_kbd_short_128, 6.0, 128); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_long_960), 4.0, 960); - AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_short_120), 6.0, 120); + ff_kbd_window_init(aac_kbd_long_960, 4.0, 960); + ff_kbd_window_init(aac_kbd_short_120, 6.0, 120); - AAC_RENAME(ff_sine_window_init)(AAC_RENAME(sine_960), 960); - AAC_RENAME(ff_sine_window_init)(AAC_RENAME(sine_120), 120); - AAC_RENAME(ff_init_ff_sine_windows)(9); + ff_sine_window_init(sine_960, 960); + ff_sine_window_init(sine_120, 120); + ff_init_ff_sine_windows(9); - AAC_RENAME(ff_aac_sbr_init)(); + ff_aac_sbr_init(); ff_aac_float_common_init(); } From patchwork Mon May 6 12:14:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48582 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1335106pzb; Mon, 6 May 2024 05:15:53 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUtzUtHWva5QH2Ometg6nowG9kiMgnjtOThGGxP/X2/sL9i3kEsYJhddCKzkh9PcRT1A4l1f4+FZ6yZytwub4VrO4C68sQdpulX/g== X-Google-Smtp-Source: AGHT+IHwZuYnVH9mrGumipLBwfFE9HHJrbZOvbw0MglRLIA/zemgWZbVFyXitAhl6Nunr2KDTwXZ X-Received: by 2002:a17:906:c10e:b0:a59:ab55:a58 with SMTP id do14-20020a170906c10e00b00a59ab550a58mr4431705ejc.22.1714997753495; Mon, 06 May 2024 05:15:53 -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 gt7-20020a1709072d8700b00a59cf1057f7si1010581ejc.225.2024.05.06.05.15.52; Mon, 06 May 2024 05:15:53 -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=mVVuO9EX; 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 40EC168D637; Mon, 6 May 2024 15:15:24 +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-db8eur05olkn2082.outbound.protection.outlook.com [40.92.89.82]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F1E5568D618 for ; Mon, 6 May 2024 15:15:19 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QRTiFacObXAj/M9mxLO3Bduy6GfbgKQbsASMD01bK602XGS16S1qe4NfXREn1G7uiRS+eMd0l/gZzXdz0vrrBS1AqYkaLhPPj3ZCFKbyCP2Umy889/eOrd/bEpz+TBdv02x9iD5JHxcoMboifOOzQRV9VTB1yOkmJFz5D1F3EqQrLkL36a094R2cqGZ3j/2LSE/n//ct6uF0Q+6oWjLlofw55tTsDQ1kT5i8E1oFjNgpDA5Ufad4pJdttBgFcw6InBIMamNK84rEmKbv9B+IS8HukkJz0I/2iq0VR8oRFezQ8TkHr6m/fSOgx3wdDIytK9mv6VbZtIq4CkgWZrNmvg== 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=xkYxl/ePTlAyV0tFdduDu4yCMEZVdWL0dJqfo/vl+Zc=; b=VWC85aMpovhD1yiIlpJWg9IatzM7Q2xcqDygvharZ/bSzVQYCFI7pNuExmNKFP+e3Lqo0K4j7a9yA6l+3unHwffBTlP47M6+mUCe3l8JipdwMSDU1FeKPE+m0Qh0E088tkZd6EfMXuYJ/cIhpePR666CK77WvGQFt3aTp++OFEirY016IqJuIdsbceOHxSle2B4hEE5QNyqtBQsFxpjumuXZmiNM0S4g7+8rxFD1qKrc/rCIvqyrhgr+l1Nmtc72wM0ZNUoVcXh0L5nheBuJIBP2J66wOPdv2XrLcuKfV2qY68d9k40YgErLQH/SrVeYzWX7pBGxzhCReXMA8/k7DQ== 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=xkYxl/ePTlAyV0tFdduDu4yCMEZVdWL0dJqfo/vl+Zc=; b=mVVuO9EX6Y9vtWq0Y9uhSGqgnd+rsG1BwRho5zeqvw6KVDni+nj9gAaTll507y5ooqq9pQAVQT1TowW/5PLCZpDoEANUERppRpXaWK7pZUFzrz1vAUU2lkIi5/hFv2/10nZpybSC+CEdAHWXQcWwQdRzCqtbEY6IrH7xRLX9ZHFnoPabrVOct6Vi6VCkYv690m4MFwATUp9HOvX6yw+ujIrgLbdcB7I5N4VaBYx8IV6U+lBexYuQ4+TJuPV6DcfZTcM+DNn6T/hmGEoihTVdObQhKxMv28J3FAiSAj4mMmc9gHYpngK360ZhMQrp1A2djI0mlcW8ecLoaPfSDWp2dQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0497.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:33d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Mon, 6 May 2024 12:15:18 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 12:15:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 14:14:31 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [qIdpKd/UQ1m//JeNhZxJAnuG5p98+gGIQWQG6VJvRUI=] X-ClientProxiedBy: ZR2P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::15) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506121434.225228-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0497:EE_ X-MS-Office365-Filtering-Correlation-Id: 83efc300-5599-4c1e-673c-08dc6dc63144 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: dht9csMEa9dpG+59C4kcHwQwW+WSxcHvlU6I6OjwRY6Lk2EfmxDvpY++VRSp6m5lZDck7bPeGw6Z2MbEWd4PycyjPLxDzhfKO4TxYvEuGqhJZPj19k8G69G+endRLWVMPE+RijHaZQBRSO+lEfgRsvaBOFUikuo/DVSIsfpTDj0t1m05utLrZcqWzttjrAoPWGmbRfmZxKIQzGCHxqpzZ0NTJXYgC5EurMR1AXBM/PB4gRRqynz0cbU16Dcv8SlpyN2Fa7/KoLq/74b6vYsQURpbiqewp7vao/xR9kk1doAVq8K4WTE8scNseMh13yiOHUNAdFG2EmTbxCKtcqbULBSVe8XMnMqx6TdooWP/wY9/X9efQJVvBkadPDQkAQ1XreEaCY/eMA5e221jowOMf6uBaI153wuMNFMkCNtmznb3ZK6WcOZwNvNAbQQzuQL2l+68BgOJTvGxhFQ1/CYVl04P6KDqJ90q8io1rOPW2XMNoS5uuD+a0jVzfzh3gmO2BVxRS42Neu9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2DbN7kw6S4HKsprZ3Xqs8oa4n9VCNgjDkVh+9tGhmE63doGh8nRVXkxDqqjuhiuCwq2YZD29yfU5jhodb31SVprCwGpRrR/Fg5LrGh4uJD0Pwe5SwLuoJ8XNaxyb3PtZcXcxCG+Pm8yEbFlSJuAr25AEuSXRiA82jsquVkx96L3Agb2t9PLEGY5UynvRL3HNc3o4ii/GeP0vEDGoJUrIPaIL9ECo01PiOClRf4kt9XMNDzC69fwRVv7LrVXRs/4t1vCZbuMstnqOxLQ77jFNymwl88WYowp+KAdHIZ9p5Gzs3GCmU8AhOB3/kzflcms9blJJMYhCnS3nAtyn5Hd7TU9caEGWRCMpD+yDi3mh58+/dK2QL/W80bovmTOEeAcqll0Pw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 83efc300-5599-4c1e-673c-08dc6dc63144 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 12:15:17.9918 (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: DB9P250MB0497 Subject: [FFmpeg-devel] [PATCH 09/12] avcodec/aac/aacdec: Mark flush as cold 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: yJK3UYVOLeFC Signed-off-by: Andreas Rheinhardt --- libavcodec/aac/aacdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index 1dc4af8a0d..07dcc2672a 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -539,7 +539,7 @@ static int output_configure(AACDecContext *ac, return 0; } -static void flush(AVCodecContext *avctx) +static av_cold void flush(AVCodecContext *avctx) { AACDecContext *ac= avctx->priv_data; int type, i, j; From patchwork Mon May 6 12:14:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48585 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1335310pzb; Mon, 6 May 2024 05:16:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXafsfFRz6laJ/gi9KV/2fm2CR4ppGsqRccZqG4PQih+JlxKRasfQmveBFljbd+OC0fSVOJ0IrfJ0r+sg3rW6+pg6aKCk18oYSjlQ== X-Google-Smtp-Source: AGHT+IEGosNp1a4QYRqQR4/I1Ksy1taXX69bzvL07eLoN48J4VkIT0Z7VCZ+UiDubzXHgzIxPib2 X-Received: by 2002:a19:a401:0:b0:51b:18f7:6a9e with SMTP id q1-20020a19a401000000b0051b18f76a9emr5001177lfc.45.1714997781092; Mon, 06 May 2024 05:16:21 -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 r24-20020ac24d18000000b0051eff32169bsi2877473lfi.92.2024.05.06.05.16.20; Mon, 06 May 2024 05:16:21 -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=QMT3lTQe; 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 8C5C968D63F; Mon, 6 May 2024 15:15:25 +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-db8eur05olkn2024.outbound.protection.outlook.com [40.92.89.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D187468D565 for ; Mon, 6 May 2024 15:15:20 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JXM6zb1sFt7DGp910dyLIj+0bbnYN5v+DFAAkJqOd5Uwy9Q1JaPRzAXFA6fAAbNR+6C6j10CkKR/WGnkkcnMMRz91gtn8Y9BNQreNpDiuv4Bb7Qoi8twOdHlLNUG6dLcqghbGGqF0Yji4m3w/wXUh9xJtZVMghDUE0altfhae9AkINka3FlSh7r3S/rZU/u8xskv0nCDTtEYMdzUoRGRfbK78Fev+pvnpuKr/YTK7Ch99S6d/0yapIhw0vxuqWPCEfKsdCgD+5csUtVmuFzeRXwfz0NNzhYK2hmolXgoVOdiQbaumWVMuxsRCXbEDUTB/aOuJC7U7L86mkBVCTeWYw== 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=gT2ojOk9xx9Z8aikBjQe5MOyhxIut8oiemoRW03S8cY=; b=B/zplCLpWtremTPBT0HUAtbudsrmcfV0ndgnDD6eYZTaYsOCP8NfF8L2pzBWIzLME6mQPZ64WinlDIfLya5sBi4nUIk/vw+psG8jHhUUi7bKvuo2/paWgxopBHvfvSrjN2SPLj/UCuhcYIdybNaevrbfPZQb3BK8zV4HRmzDDZWaJYi1E/H6EQmbx87gxL7xw+x7Klg+RpZD6exwzstNjLJdVCHLWs9uOI+moFtuBQP/lRRBpoJ6BvMM7pnWOFepjA+QQdi9WR5c2Uf2l7fJFAr9JfpuR1GVYPpC/2B3CyyiCLNZPLEOL/0wyU2FjxvT8pFFJBMGvClk6KIcl3mHxQ== 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=gT2ojOk9xx9Z8aikBjQe5MOyhxIut8oiemoRW03S8cY=; b=QMT3lTQeYryY2f+5oIk320uYciv1A7sX5ycyaTHCEJLNNnAFaTrr8RqJOTAvhd8HHYZuaWsu5n7WR/Lon/00NgyRwSuEy6/yRjoNMwt4kTb2RaRrYk7jpAfFEoNREXIPLwQ1mBqW9IlOlOhTUlOVyf+oGe7hmlx+jYYUwlo06xQQCHXziEFkGAJGg6LkY+ZcugAfvDU57NrD2Y91KaOl21EiBe+XEmL18Q9i/UdXSjC2RDmb80ZIxRKzpMtZSdEVXuhEMuzjoCXv2yPV0WbUX0KZpVhq7HJcjWdEjW+IsIbvNOZ4HFXPz7a5n1Zkr8YEDR4OPDnxv6H4h5n7jqZdlA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0497.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:33d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Mon, 6 May 2024 12:15:19 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 12:15:19 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 14:14:32 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [gawx+aUtx8p2QeW9yatbw+pTOsf7fvD9i815hmcHETM=] X-ClientProxiedBy: ZR2P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::15) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506121434.225228-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0497:EE_ X-MS-Office365-Filtering-Correlation-Id: 52bfbfb4-1c6e-4dd4-7dbe-08dc6dc63201 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: aW5c749qgcX5g4dFxrAa79+r9ZvCqUGokA0Vg5u2zeTxCeO9Rjlu5JwXMyg5J5GSOYLIk9qw3qY2wPBc2ZiNvkZsLfP7AQyZogl8jfhRZsOQgx4WsH3u7LQrt+/p3ZZrRT+/hxtna1wdUelHmgDKAyUuBYkFhsW+R2yeSi6GkaiayGKgLIvGIgLe4kgbN0DEMtZl6w+vOg45E5lPHg4bsKC1u3wpz/RcXzIrauGIEK6jkG3t+VA4zMgtPtFb+2xuqkU9NBr5MTFfvYPDOUUP2rc3RiLdcdEes+ZU9uF2bNCCOx3fYFXfW8moXWmTjHaOHmuitZ6/F4dnDNnaDyYpLy5N62/9hNtGneleYcWKXskOY0mbJzbXwWac0USSAs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+aFHLGOmu6ueu08liePgj9mAH14bln5qrsAlT+tm5pRD9xxPD8H2wNbs6Y/DzPZ0c0jUqRW5IHEI8Kw3eo95HE9y3Uo0gP1QdoSs0lN1ir/LD4HoXjhqr0G20KJddMeZjwWGKW6VN0G9zaQLMFYemI+y5ekHAiXU5kDAq0jPE4pXUbkOlxaEo1vvHaHITg21CxCF53oMSg8Qlsjab/Bow4KO2nW/8ozSsDWVaa0SNdGHAEXaHq0RcqLs2gPAy8vVc6V/NRk9IXt2CT0SPLbSd1Q343e0h1aIIwcf3ImM4oa8H1bTN/LYXRBr0GfkrPlmmgLhEhShmmWXuhhun6G7Q1Ha6tRPLqRjlZlyYWit1O/gPBXs+2njT9IYZl9uR9ZxNTLx70inS8Bt1WGsCKX4T+4EXMJD9nKXhwAEK4uevOBlhP53I+bmn7k8Xd/eddO1rAIfBiW3v0IXnj1tvYolnleSPS3YJQDmGRVh4on7nib5VJI7F+/g+swj+htqyJ1MzpaZiAfuB06+Ml754JjCTpdrFgemqs2RXlDw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52bfbfb4-1c6e-4dd4-7dbe-08dc6dc63201 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 12:15:19.4027 (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: DB9P250MB0497 Subject: [FFmpeg-devel] [PATCH 10/12] avcodec/aac/aacdec: Avoid compiling latm decoder if disabled 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: LpDVPKc9jhqT Signed-off-by: Andreas Rheinhardt --- libavcodec/aac/aacdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index 07dcc2672a..cd80dd1d7a 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -2510,7 +2510,9 @@ static int aac_decode_frame(AVCodecContext *avctx, AVFrame *frame, return buf_size > buf_offset ? buf_consumed : buf_size; } +#if CONFIG_AAC_LATM_DECODER #include "aacdec_latm.h" +#endif #define AACDEC_FLAGS AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_AUDIO_PARAM #define OFF(field) offsetof(AACDecContext, field) From patchwork Mon May 6 12:14:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48583 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1335233pzb; Mon, 6 May 2024 05:16:11 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUy7kPu/0s3nT1vBzWLomPRel/WIRWO+WSr0WHnWnwUjEtyCHs4r/H6qCQMNZkDg6LmNrAPWZ7Du7+yDF3V4lFPjS0Z97CWJVoyFA== X-Google-Smtp-Source: AGHT+IGwH/oVLI73c188upoKRmvpR71NgEG8Sbnko+x6A+h2kwkjLcfOZZJxEjmvoQnWmjCCdTQs X-Received: by 2002:a17:907:da9:b0:a59:c944:de4 with SMTP id go41-20020a1709070da900b00a59c9440de4mr2842135ejc.2.1714997771427; Mon, 06 May 2024 05:16: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 jx12-20020a170906ca4c00b00a59c33db750si1805259ejb.99.2024.05.06.05.16.10; Mon, 06 May 2024 05:16: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=CIObOsnU; 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 E899068D646; Mon, 6 May 2024 15:15:27 +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-db8eur05olkn2013.outbound.protection.outlook.com [40.92.89.13]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0E5AF68D61B for ; Mon, 6 May 2024 15:15:25 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e3aSOmuP/zFkgb9lDBdrjmOMQxTCcM6lt+mNWTcQDD8ThUrnt2bXe/y77N2XXaCHh0RgIbhg4TWMDPX+MDPzsVQZl3UQUYJqgg5fj/r7VAOFfCSlOd/e477aAe7yreWIruT2qQLjRPpUoyPeYTeFWZiOFOaUPZohp64zPsLNos2cUgKzGBRO05VUDOfueE7CZHdeIHwGnuRdkdc/d7TaiAOdTaDpidpbzMQZC3b7NdiClHLT82Tz5LEsbMQWA/24M9bY5o1mLv+jdN618JuP+ZJljUK9dG64wyw41tN6Nt1f4l0402Ve5/jEvMiwWJZaTuwaUN9JV17aku4yejSmtw== 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=sQd+rfftcdkq8K2kawP6EuY5C/sbLOX1gfNEGHCLKTM=; b=iaEL0tTPf0cH/pIhx3kMJpaBs0Us5sfWc6hQkcN30Py2YjNde7knvW0wp3EA/tzyunscr/5cNozNbNPAIuURWzU9vVCWQ1x34lqXEgBEuUJcF5osGHz1BB2ZOQGisCb+UthAsCTjK+koT26b8TLL239PxQkkS+WMZtionkRb5Elv4Y3adPN/DSHU2gMVW7t/Q9YrEIJ/WxC3gtHr50kMKZoXPQIfo3XHUtDCWJkb8sZKpLNL31Yx1JG44NME53pQf0s3JjpFtJT0Hnh5UAlMq9gtJK1DXZHjCAXCA4TgogUVEbtyHMI2dnCSy/Pv0XgRFhqsX9JKJTgP7JCFfbqyQA== 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=sQd+rfftcdkq8K2kawP6EuY5C/sbLOX1gfNEGHCLKTM=; b=CIObOsnU9ewc2div5McEXS5IGkhSF/rrJmTuJnLmitm3BLSb5lVH4vtN3ngwm58EdDR0QpSDAaxtbC4OUBGS9mSZvb/8/ChbxOHWRPEi/eEaaGcv61QFPAYeGRw4pYbePRLlSJyTrznShprsYPjhevfecvx+WvytME13qoKc1KO9kT6RgUYqEp+oTNoN5DuQMu2ks5GOfqcnZAr0W/fFFW3B77Fg5PkDg03SwP7wE6hnlKdD6ajAiNBt9uATQr3n9syUz/PbNR6xgJWLKfCK7TZnJxWfFf8dr4HTEOz44KciYQsfFhwQLf4Bo9xbqLjwERZoj1ybWGz8kONuANjPcg== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0497.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:33d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Mon, 6 May 2024 12:15:22 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 12:15:22 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 14:14:33 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [QgU4KrUO+KdOqPaOPcD76qNtakTPeuwRqxNScRpgWtY=] X-ClientProxiedBy: ZR2P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::15) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506121434.225228-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0497:EE_ X-MS-Office365-Filtering-Correlation-Id: 22c34d88-713d-45a4-dc13-08dc6dc633b6 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-Info: lF6+qAPRepqjE9YydYJ7AGcAbJEAPO+IWZqCJoPXBDoGyA2KhZNjQGXvmxzdK6mzn9hzpZGeyqrvwzFzUsHJ83Pi0MgA4yMF5hEvnBuNJ3ZZgbs2lEjBy+dhAq6ye+x9zsyLQvteAS9rB2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TZKKqokIs2SS21OBUdmdSFsxUglfEJtbWd1J4T9k5gLxQMbe0eDHLJ33kf688AC2SlRArw3tnHkgQHGVJ8qMvIEcbpOngiiTmgMsTpvBQvD5hWWP/7DA8EIeJslL/ZgQzdbXuDp/tujDL4qsMEBCon+vLOBs3Ir1MQC/Yuwc9fz6rbiSG0YttHx8XBS+iDQWCgf1Wzuso/xrekz0CCJVnXYeLy8Un2PojxqdQhWxWAt5fv2C2uCczgw6hzPFdeVIrpmy33jO274+nzVUJaWaaJI3CoHk8ZWk6xeiapUwrh//qQxh24ec69CfSa6GiihHaCGFrSDxfYVxpGLcuSIM13NrKsXuMIqDG5rwNIeE5UDxbkflWxGFnJEClyDva8/lrnvJHqM2c2pZz68/d9x1ftLynCE5ESo/dSnVwNuuHLpVgfbRQtgMrGMklEg3LS1tUjCbHtzsyKnuoMH1iTxGM3OSKalyHWNItl2CoMj1JKUh1H3/WoJomfsaRtSSSyFmGBZ+aUO8PRGUgNMje/CwPIi5VgXbkVbIgXiQ3JwrpbzWJVKHurhgD/uHspiGUyNqIL/5ZQGrBpyHgUa0dqG2IZYe/f1X4aOTqMYfFLOjEeTb9TwwFriOmkEOW97l/0NN/l1uu5JCFcD3my/IUgBU/CTrwBGuWHAzTEZPd9zkdFsSej5VoSN/61yDnbMC+MU4TN0TK6JyyAJ0RV6J+NoZ0IQ6+dBK1+1LZCfURTdBVNITLw56m6mjGBX5OA7OiEBG4PY4pvyGQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 22c34d88-713d-45a4-dc13-08dc6dc633b6 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 12:15:22.1419 (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: DB9P250MB0497 Subject: [FFmpeg-devel] [PATCH 11/12] avcodec/aac/aacdec: Move init functions to aacdec_fixed/float 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: MLcyaA4PjSXX This allows to merge it with AACDecDSP.init and remove the latter (it is called only once anyway); it also allows to make the fixed/float AACDecDSP and AACDecProc implementations internal to aacdec_fixed/float.c (which also fixes a violation of our naming conventions). And it avoids a -Wunused-function warning when either decoder is disabled. Signed-off-by: Andreas Rheinhardt --- One could also move the FFCodecs, too. This would necessitate using external linkage for several decode_frame-related functions as well as flush and close; but it would allow to make the fixed/float init function static. libavcodec/aac/aacdec.c | 31 ++++---------------------- libavcodec/aac/aacdec.h | 11 +++------ libavcodec/aac/aacdec_dsp_template.c | 4 +--- libavcodec/aac/aacdec_fixed.c | 32 +++++++++++++++++---------- libavcodec/aac/aacdec_float.c | 32 +++++++++++++++++---------- libavcodec/aac/aacdec_latm.h | 2 +- libavcodec/aac/aacdec_proc_template.c | 2 +- 7 files changed, 50 insertions(+), 64 deletions(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index cd80dd1d7a..dc81df174c 100644 --- a/libavcodec/aac/aacdec.c +++ b/libavcodec/aac/aacdec.c @@ -1181,13 +1181,10 @@ static av_cold int init_dsp(AVCodecContext *avctx) if (ret < 0) return ret; - ac->dsp = FIXED_OR_FLOAT(is_fixed, aac_dsp, ); - ac->proc = FIXED_OR_FLOAT(is_fixed, aac_proc, ); - - return ac->dsp.init(ac); + return 0; } -static av_cold int aac_decode_init_internal(AVCodecContext *avctx) +av_cold int ff_aac_decode_init(AVCodecContext *avctx) { AACDecContext *ac = avctx->priv_data; int ret; @@ -1246,26 +1243,6 @@ static av_cold int aac_decode_init_internal(AVCodecContext *avctx) return init_dsp(avctx); } -static av_cold int aac_decode_init(AVCodecContext *avctx) -{ - AACDecContext *ac = avctx->priv_data; - - ac->is_fixed = 0; - avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; - - return aac_decode_init_internal(avctx); -} - -static av_cold int aac_decode_init_fixed(AVCodecContext *avctx) -{ - AACDecContext *ac = avctx->priv_data; - - ac->is_fixed = 1; - avctx->sample_fmt = AV_SAMPLE_FMT_S32P; - - return aac_decode_init_internal(avctx); -} - /** * Skip data_stream_element; reference: table 4.10. */ @@ -2555,7 +2532,7 @@ const FFCodec ff_aac_decoder = { .p.id = AV_CODEC_ID_AAC, .p.priv_class = &decoder_class, .priv_data_size = sizeof(AACDecContext), - .init = aac_decode_init, + .init = ff_aac_decode_init_float, .close = decode_close, FF_CODEC_DECODE_CB(aac_decode_frame), .p.sample_fmts = (const enum AVSampleFormat[]) { @@ -2577,7 +2554,7 @@ const FFCodec ff_aac_fixed_decoder = { .p.id = AV_CODEC_ID_AAC, .p.priv_class = &decoder_class, .priv_data_size = sizeof(AACDecContext), - .init = aac_decode_init_fixed, + .init = ff_aac_decode_init_fixed, .close = decode_close, FF_CODEC_DECODE_CB(aac_decode_frame), .p.sample_fmts = (const enum AVSampleFormat[]) { diff --git a/libavcodec/aac/aacdec.h b/libavcodec/aac/aacdec.h index 4cf764e2e9..775c007aeb 100644 --- a/libavcodec/aac/aacdec.h +++ b/libavcodec/aac/aacdec.h @@ -216,8 +216,6 @@ typedef struct AACDecProc { * DSP-specific primitives */ typedef struct AACDecDSP { - int (*init)(AACDecContext *ac); - void (*dequant_scalefactors)(SingleChannelElement *sce); void (*apply_mid_side_stereo)(AACDecContext *ac, ChannelElement *cpe); @@ -339,12 +337,9 @@ struct AACDecContext { #define fdsp RENAME_FIXED(fdsp) #endif -extern const AACDecDSP aac_dsp; -extern const AACDecDSP aac_dsp_fixed; - -extern const AACDecProc aac_proc; -extern const AACDecProc aac_proc_fixed; - +int ff_aac_decode_init(struct AVCodecContext *avctx); +int ff_aac_decode_init_float(struct AVCodecContext *avctx); +int ff_aac_decode_init_fixed(struct AVCodecContext *avctx); int ff_aac_decode_ics(AACDecContext *ac, SingleChannelElement *sce, GetBitContext *gb, int common_window, int scale_flag); diff --git a/libavcodec/aac/aacdec_dsp_template.c b/libavcodec/aac/aacdec_dsp_template.c index a42b40f674..70f0a3cce6 100644 --- a/libavcodec/aac/aacdec_dsp_template.c +++ b/libavcodec/aac/aacdec_dsp_template.c @@ -615,9 +615,7 @@ static void AAC_RENAME(apply_prediction)(AACDecContext *ac, SingleChannelElement reset_all_predictors(sce->AAC_RENAME(predictor_state)); } -const AACDecDSP AAC_RENAME(aac_dsp) = { - .init = &AAC_RENAME(init), - +static const AACDecDSP AAC_RENAME(aac_dsp) = { .dequant_scalefactors = &AAC_RENAME(dequant_scalefactors), .apply_mid_side_stereo = &AAC_RENAME(apply_mid_side_stereo), .apply_intensity_stereo = &AAC_RENAME(apply_intensity_stereo), diff --git a/libavcodec/aac/aacdec_fixed.c b/libavcodec/aac/aacdec_fixed.c index 083f3b073e..79d35e05fb 100644 --- a/libavcodec/aac/aacdec_fixed.c +++ b/libavcodec/aac/aacdec_fixed.c @@ -63,18 +63,6 @@ static void init_tables_fixed_fn(void) init_sine_windows_fixed(); } -static int init_fixed(AACDecContext *ac) -{ - static AVOnce init_fixed_once = AV_ONCE_INIT; - ff_thread_once(&init_fixed_once, init_tables_fixed_fn); - - ac->fdsp = avpriv_alloc_fixed_dsp(ac->avctx->flags & AV_CODEC_FLAG_BITEXACT); - if (!ac->fdsp) - return AVERROR(ENOMEM); - - return 0; -} - static const int cce_scale_fixed[8] = { Q30(1.0), //2^(0/8) Q30(1.0905077327), //2^(1/8) @@ -93,3 +81,23 @@ static const int cce_scale_fixed[8] = { #include "aacdec_fixed_prediction.h" #include "aacdec_dsp_template.c" #include "aacdec_proc_template.c" + +av_cold int ff_aac_decode_init_fixed(AVCodecContext *avctx) +{ + static AVOnce init_fixed_once = AV_ONCE_INIT; + AACDecContext *ac = avctx->priv_data; + + ac->is_fixed = 1; + avctx->sample_fmt = AV_SAMPLE_FMT_S32P; + + ac->dsp = aac_dsp_fixed; + ac->proc = aac_proc_fixed; + + ac->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & AV_CODEC_FLAG_BITEXACT); + if (!ac->fdsp) + return AVERROR(ENOMEM); + + ff_thread_once(&init_fixed_once, init_tables_fixed_fn); + + return ff_aac_decode_init(avctx); +} diff --git a/libavcodec/aac/aacdec_float.c b/libavcodec/aac/aacdec_float.c index 5efc0c1e54..d48a21eef2 100644 --- a/libavcodec/aac/aacdec_float.c +++ b/libavcodec/aac/aacdec_float.c @@ -68,18 +68,6 @@ static void init_tables_float_fn(void) ff_aac_float_common_init(); } -static int init(AACDecContext *ac) -{ - static AVOnce init_float_once = AV_ONCE_INIT; - ff_thread_once(&init_float_once, init_tables_float_fn); - - ac->fdsp = avpriv_float_dsp_alloc(ac->avctx->flags & AV_CODEC_FLAG_BITEXACT); - if (!ac->fdsp) - return AVERROR(ENOMEM); - - return 0; -} - static const float cce_scale[] = { 1.09050773266525765921, //2^(1/8) 1.18920711500272106672, //2^(1/4) @@ -163,3 +151,23 @@ static inline float *VMUL4S(float *dst, const float *v, unsigned idx, #include "aacdec_float_prediction.h" #include "aacdec_dsp_template.c" #include "aacdec_proc_template.c" + +av_cold int ff_aac_decode_init_float(AVCodecContext *avctx) +{ + static AVOnce init_float_once = AV_ONCE_INIT; + AACDecContext *ac = avctx->priv_data; + + ac->is_fixed = 0; + avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; + + ac->dsp = aac_dsp; + ac->proc = aac_proc; + + ac->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT); + if (!ac->fdsp) + return AVERROR(ENOMEM); + + ff_thread_once(&init_float_once, init_tables_float_fn); + + return ff_aac_decode_init(avctx); +} diff --git a/libavcodec/aac/aacdec_latm.h b/libavcodec/aac/aacdec_latm.h index 22153dec83..e40a2fe1a7 100644 --- a/libavcodec/aac/aacdec_latm.h +++ b/libavcodec/aac/aacdec_latm.h @@ -315,7 +315,7 @@ static int latm_decode_frame(AVCodecContext *avctx, AVFrame *out, static av_cold int latm_decode_init(AVCodecContext *avctx) { struct LATMContext *latmctx = avctx->priv_data; - int ret = aac_decode_init(avctx); + int ret = ff_aac_decode_init_float(avctx); if (avctx->extradata_size > 0) latmctx->initialized = !ret; diff --git a/libavcodec/aac/aacdec_proc_template.c b/libavcodec/aac/aacdec_proc_template.c index 319bf61993..1ffea2f93b 100644 --- a/libavcodec/aac/aacdec_proc_template.c +++ b/libavcodec/aac/aacdec_proc_template.c @@ -433,7 +433,7 @@ static int AAC_RENAME(decode_cce)(AACDecContext *ac, GetBitContext *gb, ChannelE return 0; } -const AACDecProc AAC_RENAME(aac_proc) = { +static const AACDecProc AAC_RENAME(aac_proc) = { .decode_spectrum_and_dequant = AAC_RENAME(decode_spectrum_and_dequant), .decode_cce = AAC_RENAME(decode_cce), }; From patchwork Mon May 6 12:14:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 48584 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:e68f:b0:1af:836d:81b3 with SMTP id mz15csp1335305pzb; Mon, 6 May 2024 05:16:21 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUI2go8T5vkf/CfTGtpSc/bCdpPB59l789zBpuMnm0My/e9BVSuaRWw6K3uISxOHwHLcKE/B386rriWAE/k0lB6L88GbkikrzjaNg== X-Google-Smtp-Source: AGHT+IEXyW60Z3sHimKBgMFg46zBFHJClAUSuF2Z/8G2v6Lvk7fdr3UehlQNbDgWDQjFVQoUCpB1 X-Received: by 2002:ac2:5b4d:0:b0:516:c766:5b4f with SMTP id i13-20020ac25b4d000000b00516c7665b4fmr7081826lfp.67.1714997780675; Mon, 06 May 2024 05:16:20 -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 x14-20020a056512130e00b0051d92eff121si2963457lfu.246.2024.05.06.05.16.20; Mon, 06 May 2024 05:16:20 -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=jbxpBGKG; 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 E2B6868D649; Mon, 6 May 2024 15:15:28 +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-db8eur05olkn2013.outbound.protection.outlook.com [40.92.89.13]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 39D1168D53B for ; Mon, 6 May 2024 15:15:26 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lQy/ysnX45xF8BXL9geT4ulyP/njCT6PzxtYdWPOw7i8+wrRM6rpbjbRzWXvTYisRywMj7tC2ADhkR3HZVahal0V0DsbcVSfA5WOjuoNrQA4GPL7Q6CrQf+p1Uj+kPs2f/V9C6GsAHGwBXmpAXNS+2IupRlQ/A9teuYqOQNHucYZDFooblfukAhVl/7/QfPw70v/XPF9Xb96eMB2/Uz31OdM4koIZY+TepALSBFN4Q6xd9MZKdc7EgZsSOLzNMXTQI/nuHsFv5ztIUz0LjwnZ08CMn8AEQIj2or3nXeUKAWSMv3iZK8N+2/cAxoG3GfIkuVSkbGje58zOu7L0tAjvg== 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=8ISiiZIE27+ppjZxle5SDY4qcN/i5cKRzMJ+jUvr7Rw=; b=Ic0q8LVfUZsebKMjId55aC3lrtLChjmtGK7DQuaEAO640yCn0BoLLZdC6KIrWJyf+nWXZLB9pHSK50sWit3VQotH+//QDnN2pULDc+i43DTzw2z6D09JIBzjS2q26oJJRxRxzAjFKOeI5cSaiVHuH4BB7LKk0jtjnoXbAwR9mC9E/tQdVdmZnlRAWCIzP2EPjARTGvbOIeBXeUBXvTWoB5SapSgAZb6vJDxIzAgL5CG8ggJeo3fcxi3Or95x8zvvj6MoiqgpYFDJr39nC4EErZuR62gx9lZrab5BSrx3I/CQgh6PJHumURtogj6EdyNyG/K72nd+OMwsEtcvyKodYw== 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=8ISiiZIE27+ppjZxle5SDY4qcN/i5cKRzMJ+jUvr7Rw=; b=jbxpBGKG0kr1nJfFgFu1oqM/PxUBuSU8DoEf7M6yiLQRS55eNKZ8f1QVmT2KCkHaYzxcs9cc8W2G6ueALOdIws1Yx+iMEjBTVR4IVGNdytiOsjcAhD5mCLjTBA3eEU+n8lQl2hHfppVQz9Uba3dByeRhpeg0uGCEjl05disGjlxQe8SrF2ohbPrrW8A9D4Ln/emkMyJUQ06rhU6zH1I76gTB8ZWsGrQk1dl/NdTD6sxtScbzDo4zLMOO7TdIWVAKZhtSgO6mvhZR8sog3DEoPO57pG4tUNrzZiFAl0YFZEsJtDES5P60xZiUL5ixXZQollKtrrSH4Ea5hIIFAo8Y3w== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DB9P250MB0497.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:33d::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.39; Mon, 6 May 2024 12:15:23 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::d6a1:e3af:a5f1:b614%7]) with mapi id 15.20.7544.029; Mon, 6 May 2024 12:15:23 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 6 May 2024 14:14:34 +0200 Message-ID: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: X-TMN: [jlNhSEJX5PPfQT1nJ8/St01VJmfpRz5H9vF+PZT6Cfk=] X-ClientProxiedBy: ZR2P278CA0069.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:52::15) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20240506121434.225228-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DB9P250MB0497:EE_ X-MS-Office365-Filtering-Correlation-Id: 9ce793db-805b-4588-5f63-08dc6dc63472 X-Microsoft-Antispam: BCL:0; ARA:14566002|461199019|440099019|3412199016|1710799017; X-Microsoft-Antispam-Message-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WaS+Gcam4a7vGFaJSUr3KDP5ckGBnM/Ezk++lLYFSjrlN2+YwH2/va4rxOATJW4V3rkgT1rNF8RhYCUAjIPKfouk3bAHU8BX1FWVcf7Fshy7F1rc0t6hxF5TLJ+hqoeTOitDJRC6RuQH3hf8jCNR9A0kD5gW3a8Ko/9ZOuh0fzXF+NoPXHd2AJzkZtkZ+LsYCGLOQVP/3NXOKIHwCMQmHQ0OLNjawdVk6d6XkMewms0I+cJyU9oAJVBLEJ/aoGViFMbv12OtQo2y6q2DDHWB/uia5zTqRnhR/Xup1GkW0iu1Bvm/9mYIWjR2A1ivhOPje2a4nYMIVmUNhbt6Y3qHdupoBlm1ojuVjlhd3D0fhtwN3i1hoDI8EJqGkE+0go4Y7s0wsk9lyb0kdn2gtixylXmTmHfRzqNYMXs2NR/hMSBuEZGgGmyQvRk2ZYrr9qYLOdcgb0Uig7NhdUA/o41HvDDUD54ofe23wPCpx9aBYo+OI58d+O19SS3U0YzTvjVbYDJlePP//BCHgv7UZq7lyCu/j5+ea9nediP6pVmPoqGR5xyQrixUsIMosMlraOFUJP5bH+D5kgWaPvCCRHShZ09F8ut8ntl3d3hvEtw4AJY85ep8YmFnklzrKfSwgaM2QrxP5EwWNexuUAYtIFUjVpRufHcTZnFW/o4DEuaK3Zm0n3dzdsVU7stSinp1km6LC8so7D5a69Pow0AfvZniuw5G7wjWoAz3vyLnCAFogrEd1RqlAfV808nQQOn+N32I0TQOka9WIPmGcfMb6XkVVT4t4Bcl8uMqXp2mID6QBTVtuWeV0PTsUyxJCaPDzDhDRB0CcNDrcu4nU32U8DTPS0Zv+L9166iMsj7N4Ow5xTU3LTvx91SFGO+aHTAR30g+bHdAGSdmjzKS8UjeIuOeSJhNk+SQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9ce793db-805b-4588-5f63-08dc6dc63472 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 May 2024 12:15:23.2712 (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: DB9P250MB0497 Subject: [FFmpeg-devel] [PATCH 12/12] avcodec/aac/aacdec_(fixed|float): Set AACDecDSP, AACDecProc directly 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: ovSFOkCFURrW This is more in line with how we initialize DSP functions and avoids tables of function pointers as well as relocations for these. Signed-off-by: Andreas Rheinhardt --- libavcodec/aac/aacdec_dsp_template.c | 43 ++++++++++++++------------- libavcodec/aac/aacdec_fixed.c | 4 +-- libavcodec/aac/aacdec_float.c | 4 +-- libavcodec/aac/aacdec_proc_template.c | 11 ++++--- 4 files changed, 34 insertions(+), 28 deletions(-) diff --git a/libavcodec/aac/aacdec_dsp_template.c b/libavcodec/aac/aacdec_dsp_template.c index 70f0a3cce6..621baef8ca 100644 --- a/libavcodec/aac/aacdec_dsp_template.c +++ b/libavcodec/aac/aacdec_dsp_template.c @@ -615,23 +615,26 @@ static void AAC_RENAME(apply_prediction)(AACDecContext *ac, SingleChannelElement reset_all_predictors(sce->AAC_RENAME(predictor_state)); } -static const AACDecDSP AAC_RENAME(aac_dsp) = { - .dequant_scalefactors = &AAC_RENAME(dequant_scalefactors), - .apply_mid_side_stereo = &AAC_RENAME(apply_mid_side_stereo), - .apply_intensity_stereo = &AAC_RENAME(apply_intensity_stereo), - .apply_tns = &AAC_RENAME(apply_tns), - .apply_ltp = &AAC_RENAME(apply_ltp), - .update_ltp = &AAC_RENAME(update_ltp), - - .apply_prediction = AAC_RENAME(apply_prediction), - - .imdct_and_windowing = AAC_RENAME(imdct_and_windowing), - .imdct_and_windowing_960 = AAC_RENAME(imdct_and_windowing_960), - .imdct_and_windowing_ld = AAC_RENAME(imdct_and_windowing_ld), - .imdct_and_windowing_eld = AAC_RENAME(imdct_and_windowing_eld), - - .apply_dependent_coupling = AAC_RENAME(apply_dependent_coupling), - .apply_independent_coupling = AAC_RENAME(apply_independent_coupling), - - .clip_output = AAC_RENAME(clip_output), -}; +static av_cold void AAC_RENAME(aac_dsp_init)(AACDecDSP *aac_dsp) +{ +#define SET(member) aac_dsp->member = AAC_RENAME(member) + SET(dequant_scalefactors); + SET(apply_mid_side_stereo); + SET(apply_intensity_stereo); + SET(apply_tns); + SET(apply_ltp); + SET(update_ltp); + + SET(apply_prediction); + + SET(imdct_and_windowing); + SET(imdct_and_windowing_960); + SET(imdct_and_windowing_ld); + SET(imdct_and_windowing_eld); + + SET(apply_dependent_coupling); + SET(apply_independent_coupling); + + SET(clip_output); +#undef SET +} diff --git a/libavcodec/aac/aacdec_fixed.c b/libavcodec/aac/aacdec_fixed.c index 79d35e05fb..de90880884 100644 --- a/libavcodec/aac/aacdec_fixed.c +++ b/libavcodec/aac/aacdec_fixed.c @@ -90,8 +90,8 @@ av_cold int ff_aac_decode_init_fixed(AVCodecContext *avctx) ac->is_fixed = 1; avctx->sample_fmt = AV_SAMPLE_FMT_S32P; - ac->dsp = aac_dsp_fixed; - ac->proc = aac_proc_fixed; + aac_dsp_init_fixed(&ac->dsp); + aac_proc_init_fixed(&ac->proc); ac->fdsp = avpriv_alloc_fixed_dsp(avctx->flags & AV_CODEC_FLAG_BITEXACT); if (!ac->fdsp) diff --git a/libavcodec/aac/aacdec_float.c b/libavcodec/aac/aacdec_float.c index d48a21eef2..885d824fa7 100644 --- a/libavcodec/aac/aacdec_float.c +++ b/libavcodec/aac/aacdec_float.c @@ -160,8 +160,8 @@ av_cold int ff_aac_decode_init_float(AVCodecContext *avctx) ac->is_fixed = 0; avctx->sample_fmt = AV_SAMPLE_FMT_FLTP; - ac->dsp = aac_dsp; - ac->proc = aac_proc; + aac_dsp_init(&ac->dsp); + aac_proc_init(&ac->proc); ac->fdsp = avpriv_float_dsp_alloc(avctx->flags & AV_CODEC_FLAG_BITEXACT); if (!ac->fdsp) diff --git a/libavcodec/aac/aacdec_proc_template.c b/libavcodec/aac/aacdec_proc_template.c index 1ffea2f93b..fecf228b3b 100644 --- a/libavcodec/aac/aacdec_proc_template.c +++ b/libavcodec/aac/aacdec_proc_template.c @@ -433,7 +433,10 @@ static int AAC_RENAME(decode_cce)(AACDecContext *ac, GetBitContext *gb, ChannelE return 0; } -static const AACDecProc AAC_RENAME(aac_proc) = { - .decode_spectrum_and_dequant = AAC_RENAME(decode_spectrum_and_dequant), - .decode_cce = AAC_RENAME(decode_cce), -}; +static av_cold void AAC_RENAME(aac_proc_init)(AACDecProc *aac_proc) +{ +#define SET(member) aac_proc->member = AAC_RENAME(member) + SET(decode_spectrum_and_dequant); + SET(decode_cce); +#undef SET +}