From patchwork Sat Feb 12 06:24:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34240 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3847512nkb; Fri, 11 Feb 2022 22:24:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJwusoA2JxxTjbFlLb5nOLb3Ro0uWAkGr85u6cRmCBnE7vMjDYvwx9T0Si8jTXIkoK1GPsQB X-Received: by 2002:aa7:d299:: with SMTP id w25mr5330063edq.21.1644647093626; Fri, 11 Feb 2022 22:24:53 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id v8si16562748ejv.536.2022.02.11.22.24.52; Fri, 11 Feb 2022 22:24:53 -0800 (PST) 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=oGQkngdm; 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 3C86168B0FD; Sat, 12 Feb 2022 08:24:49 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2107.outbound.protection.outlook.com [40.92.91.107]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 019A968AEDA for ; Sat, 12 Feb 2022 08:24:42 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n1tPPh/bCkKvwH4B8E1v2dRXZDZbpuPRTmn1xLirE45cZxlp4aGR7NfMFzNK2exJXsXKlR2awzkE9SSlMlPEm26kMYIbYASTHlKm6SQUF6vCjluICqjmZTUm0cqn2EMRD+u4LYiSYub7fRfppzgj3q00gHBXmTyXGeDtCWEeAkG4PXGUVsA7bO/F3zvN4KqfNNyPODaDpNVDsKr9tqu1Sei7yhqZkMXJ1ftvsoD/QxkkUxDIe2Z2pDo+3vQzqTWARC60Q/+fqEDk9GUgj8svbfc1cFCvyU7a/hfbO9IEli/g4iz1T30AX36jEOfqiFjLJk+ZN4m2V84UhF2wEww3Sg== 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=Um725QyCUmlwy3TUF1RHCCbq4sejxLyj+wyrG3Kw5To=; b=dbF3CGN2U7Bzk05vy8SmwVxx3blRYpL2VBsm6fGNBWP8MnYTTSoO35aJpYBe64LlBuSa3viKWGKIFnmCfI9sNoLWZIsOnzX/JQXgFiO5HGM4OrYFg7GdwVI9JpECn/RtpY5IAEmnUQuTO6WHmKsjbJ7aGNGR43GiIDYdghzRBJDeEoGqfYBHQmQqRNh15xgmYuK4JogEAuF4gHHGNtbLcyI2sFCMmmN6/42Et8eQ3jzDLC1RAKpaR1rddPkZaFizju4hlKu9+06q9/8eyELeAaXkLG3bIsgGu4o4edcWgZOk5jS0lHsZ+iZ2QSDL0Xs7Z0hagT+iaYUgVshPMQF6DA== 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=Um725QyCUmlwy3TUF1RHCCbq4sejxLyj+wyrG3Kw5To=; b=oGQkngdmAoytQMT5x6tr4zH6UtTUAcx9EpZRDo9UBLIbl7gAkGtFycabWORkdnkb4UBri8duIwVNvRyq3Ff/03ydIcx8vUd/2Q8T5eLuVeictGUz0BeeHHJ0wsg0CXRFbukkf2iTm2Ezek/3lF9lyiB5qOcH2pFZen2sK7ce175+G2dR4SGMVLyqrm7sjVzwlJ3603/aEmYaoFFGGX5s8uwmBiKzpMyOLHXiQx3mDh3PPCMUvO7K2xrc7HIubvvrpocjX8Kg30Rf5H6sCAiO4pdEZiHxxcIIQNtQ/JsjYm/XT6l9EVL20kdTgCKONs84jVFVhGOT4PwwOrX9aa2rUQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by DBBPR03MB7147.eurprd03.prod.outlook.com (2603:10a6:10:20f::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.15; Sat, 12 Feb 2022 06:24:35 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:24:35 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:24:12 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 X-TMN: [oMRLteWLNF6SHsYk74T2X9m8zyPAAzQW] X-ClientProxiedBy: AM5PR04CA0030.eurprd04.prod.outlook.com (2603:10a6:206:1::43) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212062428.2265202-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8642a4f6-e267-4151-2ef5-08d9edf056e4 X-MS-Exchange-SLBlob-MailProps: ZTmCor6bjd8dSgDwRnp6WjjVpMCJmnDTE7fDkbAu9DoipU+nTD+CJN/luxjz39+fO8PhcsFufcrlnW4AoxuzolmIl4XgLsxMtaW7vRhsWCTGz5vw8F74mZdIqGfj/Hyo43Rnq14/fwi0uu+0VUJ7SVjWglyraKcwbC2SQjMjhsYxCiE+41GExtE1X+RntLn621GroWvZdvX2UxXOFsKFVdvSy/gxSN27Ae8GaURKfp4OVDBgRFE5734bIkWw8H6GZPe8RG+ydfwLZSeDa6XB2347TxqU9XsyyIby4WDY1igmtCTVahKZzpa08srpAvqgBQoycCaILMYEeuf4pY3SaC1ZPOta6vudkdTI948bv7L5bEBJ4jKj6yyzAseaXIDqoy2Ffaslk96MJ2mHDynknRT5HsJzXQJ0CK+ITwrizy9G1uJCv8UMxxCJw6p+OMqYAp1+zDytd7+LDChuz/+6vRLoTIuj4MbeJ8YI+Wy0ZG3ETs2ft38BGXNUBakbguI41KwZW/8HQ571hP9B/Bk13lzIgBpjDQRlBJVnbx51B07WDRxgbpwevSBAV06oixAv2JyuZSbtuIAmAdPHC+xkpFDhB1x5IkS99O5MmkCS2Y/Nx4+Xq32LAUJmVSZlNX4mHxRlKpgmzcwSD60zmlZafFPzBMxnJ+HEic5aa8CgBNViJmxSR90hQ6WbT+Ich/a86ISxeCqEiNAEhOAKTaCUe8dqkGZ58IhDr4nfvpA2qhNmH5QrBD1Bu1wMOgFNEJJVmlcjg9AhKLzuRo+mBE5I8GuQ8GzcK6RsvQAWgic3KI+Uq0cqpv3y1wvvOgMQrhHT X-MS-TrafficTypeDiagnostic: DBBPR03MB7147:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aDqz09CcrRgrRsxw3QuV/LFJQqK++sLEFahnvFJoV32gtoovvmz8AzjgDgFQftpbRiEMxGlvPb3gY/EtxgKPC254y1IDqrMh1iK9tF+RYcaUx8p0qMlBCX14SaraU2okvul1gf+Ty1MlKf11tlcB1Dl6VJyNaJ7XdbXrEUyKT9z4RAzM4pE+Zymf+aHKugk+YvTxanaOaJjzSBQcilVLA0Sk2QjNjvZLCK5NX32nDVW8gH6COX5TSz/lKPITqL9dUOzBR8p4zbL9mPdid9+OxrZxOO2Bi78wRhdK8Qgj4DLxWxdDv8St2o0kVtLRiJ08mEMMrJE96oCk3+wl+6fs0CdmG32B8WFI/vYC9UelQznccVfOf1JdwEZ7RWgqbhGHHHYJLGajYu2TUzCXb3z3N+doQAIlZa2KfDNb5J2QrHYOlyHEnwk+G1kIxQOJxBYfY2q5t9rJV7LKt4rIBLMjggrJv85gN8arFuefLHKxhvZ7/qMtQXPUMERnsDWea5FuArtklR2EgcdDWlW30qmbt8RpDTlb6jTiYkixFu742fE9ADvEfKrKBOOqV21gYTfsoN+WDJ6URFlS/m0iv++EfJm160IX9u18Bj0PvUG7a9QeFM5i9zEROG5H/ykIwbxq X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ag30SEHfvgh4bQ694vL1icpCitlfQ8pXrTzWqVs7cabEXeAfarUC5LgBwtTJZdKB8EyHKnAA6wrpkG8yA2PNr+DzYcD1NDwEwSsI+F4HFW4xeWcyfKcP1KJrAFpJVARQvV6a2SmMm2yE5B3Ylj8dhgB4HZLfnuokbvWYaH26OHviANgOIMWJ2fMAmxYfpP/4JX6vP14h0g/7W+bgKFwwYqIDLBzi0h1ARdScup16pkxVOr/9LgrZV+TS0cjXyIZrCofVGKiUC82MUZpWho0oBBjycdM/rhSBPsxhRH+I74JI+3864kvuiXwOwNIPVi20uzB5snDdrn4xBjvYDWrsNXg77QTxgY2nL3vx3boT0Vd5GaHBcYfKSIW7VaYG2Ud/3qqEAFAcRNl2Tyi03PnJD/64j4OZGLNeocWsoAx1nIWCcq2ov7mQPe5FXLnqyljUw8SxM5DjX5o85r5dXXHV8cyhorQFmv4mirGPtt5Z31zyWF/CVN8oZR3HdILeVcqVlLK+ZrrS5+GKZImvIM3rh3a8J+T5+qHeHS7UyDIZuh8Gz0anwDt4ITjJPKJ7ecu1a62H6OkTnbeqtdCKA0CrPnEq+zjuwtDczUIjyxgI69SZgxZbLJFwkxoUhIuWAqBav/2WayEBdrYiuyCvZNrh3ko0xju5LNdSjzImofA6gr/d4A8M46Hd+a9Ds6yK+LJfdbkpG2ZeXdBoOXymRCkOx2MJcBwNX1LwR22nc2/+VPZuHrLoJwLLbxiMO6QyjbSO4fqZa5MkgprKwmvWYa72wUOvpLRo2mSL03e5hygF3iAinbECUCwpYegOW9G4gfsigkPkSsMe/fDC1jylLefeauNKLQOW9yfAaW4VFaUV6moEM+QF3Jzq5hC2XE8Ac0IGfrtiATvYWCl9A4tCEhlPrsskg5FT3kyPsrvlzpww3dG8OJJcQz3lcVmbRTunBY1gLurNKpxf1Hezh0+rAHnD7w== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8642a4f6-e267-4151-2ef5-08d9edf056e4 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:24:35.8814 (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: DBBPR03MB7147 Subject: [FFmpeg-devel] [PATCH 01/17] avcodec/svq3: Mark decoder as init-threadsafe 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: P2V7awCR32fn The only interesting thing done in SVQ3's init function is using zlib, but this is fine: https://zlib.net/zlib_faq.html#faq21 Signed-off-by: Andreas Rheinhardt --- libavcodec/svq3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index be95e222aa..da61617f4e 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1601,5 +1601,5 @@ const AVCodec ff_svq3_decoder = { AV_CODEC_CAP_DELAY, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE}, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, }; From patchwork Sat Feb 12 06:41:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34241 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855287nkb; Fri, 11 Feb 2022 22:41:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUD1ATJlythnnkGvxz2k9GHV1TJ8g5yDm/jhjIX64UR78CN7dtC5FA0CwEf7CGAJKyY5tQ X-Received: by 2002:a17:907:c0c:: with SMTP id ga12mr4044818ejc.592.1644648112878; Fri, 11 Feb 2022 22:41:52 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id sh37si12943523ejc.929.2022.02.11.22.41.52; Fri, 11 Feb 2022 22:41:52 -0800 (PST) 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=biQ9IOE+; 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 8FF4A68B172; Sat, 12 Feb 2022 08:41:48 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 00155680090 for ; Sat, 12 Feb 2022 08:41:41 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RQxNE8GYrobNAx3z/+7VyVyyDNe6PM+h7s24sh5LHKKWFYTz2zNBqt5JfTodglbI6OMZmfBFtlvHbMMC4l+/ZMia2AjjDBaXSS+ZrFa9cSDZjUB++f+XznuHIsDoWuQ1zcW3S780f5fd0YzrnWEW6axR2K9ulK4HUGLHLCdJUW0lH2H7niOgk8K/iu4Y579pJ+AoNTmUHc8emYxO6ZWGklL3Nvd7KAQQ+S3X+E/39cn+gRdr1dvrOXMsKg3KCU5PVZtrBhyozzrb3itj1w79zrbWWtX6EButQ7wHv5n6ri12LU+0xtUkeHjRzf0X5L7RUX2ad37eIXGfe88IVFfNpA== 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=yTxWK3bzDgZFNTeOrwtujrNvWlpWWwzbw1XECJsdjp8=; b=l8KuZ3fZoHksvtGuB8Fb+12NGbOaTPlEq204roabIXB5bXktazyCYXZm07uSg5FEGSbBKvjhUDQ8F1KXrQ9Un9npUSbJD0k0rI+c243tdgxtwSkFw2A0l3WtmBlnEdMaSlgNvhNWuOTSs2vNbsB17Yi2njA7xBRdSLJMuX3kqKZVV7Hz1adbh1I3LlPol7NUMr0NLYh0dxNw8tFbZVwJwDNXQjblyAyGDPc502fNnEXUfhc1lm7Jg5t4/RLdEsW694cesMuWBTVKy3JH4OjZS5RRbQL/Zk6YiVD+8mBEcHp3ZSbDfHTD+mAry9deidXx33rRmLUjiv6TH98Nsp6S8g== 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=yTxWK3bzDgZFNTeOrwtujrNvWlpWWwzbw1XECJsdjp8=; b=biQ9IOE+3XmAsMfFL1yu5OWeTvt4WsbAjIqjgFGgdx6hzckBzyw4cqhq7oAdxJI/Wt9QOWRfzzpbZN+lyVQqVGjLgoIvff9gJOIL8/mcU/FtyYbFWHBKePyBOVMNhF7e7GwNvQ/Ww5DK24S0k/bbmxMq++PSWSJ7uqyrfIUE7d0UtVWSw00cBOyWH4Xp+9S+ikTYb/Er20XSuCJRFp/DVLuqHg3Nk3YLxXYNAll8QJI0xSSmo2We5/wDYWbl9c3PY8mSOczYexWqVeNV+gZybMrsHiGqU5W2vcaQ8IIGdarOjVgaOwXQ6x1f6eFwYltI9JNa82A/FtoiNXqSqJ5p+g== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:40 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:40 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:16 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [LTanIoWgk4a/uIAyGe1k6G72Lvidkrhr] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a3c07a15-5849-4fec-5e71-08d9edf2b959 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlRX1iPs2ebQR6GNcN3ofHQUVUpfKy1yJj2RaOBu7/LLypf9XncPNMDIfwluFR+pVssxRKiPAdCve/wlwrCyQpIKeM0MT+CC11bUtcO2TTWX4pR5bIWmLQGBZ7gyLmrvzwfx+JWRPdihoSnyA2POmJwU9RJLFQo1jE8/rpnhsRJtjMvuM7NT47tQczFbBe9o4S25jJjMYx+9Y6SXYIsfAAOTnkNwLT/UkDM6OC6eDVvuxNua42ymKfnUyVV6JLHLxSzi2jGg6IKxphEyQaq7kEqNdcLAxETckt4SN9JYZCUHj1S1GeZ3nQyMlNFlpzpg/r7oZbHteIz3yofiPETyuWsC4szwjAsL8ICE4+ORktQwItMYlRNGFEeslkWuXB+uzmaGhWfI0olbwauWsAbzRPRfp9QzHcrjs60VZc8KA8PM9S3r87VsVUlS8ckcZPBZhgoCM8x2CBHkNWjWd26/jqcY+rX5i7sitNlURhzF6E7zZd7Gs6v0XkzBoVcIZQgMufl8UtItVbK/JbTujAfL7S01g74/MgfeR9ea53b7oag/Axak8vcd/IBrqlRf91vkVKuZ475ype8GwpoN4x3d/4IHVcEwr19K/L9LjnqyfoFkgJb1hhV/0zuO4HZmV4OaHm67JHSLmQWtYweSKQFWfrzeDvZ3Ea+8CedMMdkXI4vEme2NcETGnifBuPWCyu/rYOcumrgLK9SjsIgAax5Ed1R/yfS1dwOnFuoqIVlfrd2Sc= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CTQbO7PT7fqByD9WDiNG+XLRPoTFUFVBrXdTnPnrlKr+7dTMCC1Wn6ecX7oIoARcJCC4V1ACxbkD+xJji3Q6myXq1TcX+3bbCAYmEakJvn2A0YLBJeaDNMzKfMFoM4NWdlDA3RfACOWmZ0P794BDFePC+XKry8Ufi6wfqTWgho1ZrD5vEDq5bvXlwg7hKSpLKt3EQYHoMTeVfs/hSYGdegcuUrCNVhbQHVggsSRPKjWKkMNz260NdvEv99/hLrTCQwlU7HOaBXU+qkn/3Z2Dt2d1l9p5QoowK0iuAYDJ69HTTwoehaidZBJeQmztJfLLDPhWCnVG539YgMKTut5lWCUikchGto7vuSDdJ8zpqn2J5LNpfWZXoYkIi3jnbSokHy5KmNVqY+KbHUfbostA7gqdU+OUOyEoGmhR3W39d1PBxo+h8Quxsv0FVtyzDfY8BmIPBf8Rkku+lySXB2iIgDcdA+6BX4rG4eNmcMQ6yTJhRLypGco5zOeBaAPme14l3C3Kn9PzFrs5L59BzUMwo0y6GbFGP7MI5C5h+/F4AZf/nzIH0GjnHo8KrmI/s4YbGWdn6uNXCAGaLL7Kk3ZxoA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KHcnIwRYo9NXmWblAz+fpeDOwYyzc5lXbTLtKT07r+/DOgL84YSxf9gPTTGqXIDplbDcb+XY+SNG80AzPG9ukYHnS6pJ0V+Hs2JUNI5v5ZEztX65G5KNY/k7S2g4eyO2PJDUw3i6Kpd6PSj20icG5Hnl+rWavUAX7U5nOdmsuAD5bLAbTbutyCCQBeKoq6j7ztGD4usqLBoGGb03f7XMEiyDlOLujt8Yoi9bfU4wPIL2mwUdqzKvV1bqggPbq0JPY1CXfqGF+2pTRqU08MtL6p4ipN+okYC4oO6AjLdpgEl5bXgruKGN9vQ3ULEEtlrFjsWiH/4C/+QGH3ueEBQo84uzQ7oUfAjc/LLmmKX0XI+c/eGAsSupKCWdzzElz1Tt8VOLJ7sBoQ2sL/C3abbaBozqKviq3ccEfU1v9cDheSR+7QC90y+yEBVxYhRivLi4SS//LH+5JosWLxsgVh4OoVi8JwPLCMc6wlTt1q+UV/9GQzEYVHrQnryDcSeXTsTNCh5kN6H0NV+irdr5SLd3cu+FPoSnS5nLSEl8Fy2LLIawmQDEN7TF8hQ77rTa4VE5+ZKdzOxiWB1+LngLy+hiE6XtjKyiJ0yRwRbuCfL5Lx2lNq0+AnerWorSAnhu+kFJ+3dX+Phz6oisUooT86f0P20cA2cSdHxn1mp3EF9IQoBARZ2XfxYwuMxdGShCsA12E3HDHq21z62jf2W04PfCdm2SmD3qEPfZdlZvorBThl79DGgPMC+WTVgvesN6McE5kl3kae/7UN0azlvynA3gg8xVDHTaawLRoG/3bOze6M5hZsUnswiCAfKt3FUTiYLDM/fNbSf5utNRLS7pljuihV5H2hVwGpaxHV5mWeACerk5f+vj+P8qntYOSsvZMDom70EYFz5sikep/tKt+KH1Ob/PaVJFEknPoBfpTn0FgGYe+a15sZVwruRmqfHNOelCzXtXptwiyLXrmV3eNGf6hg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a3c07a15-5849-4fec-5e71-08d9edf2b959 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:40.0114 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 02/17] avcodec/amrnbdec: Mark decoder as init-threadsafe 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: JveU6ToLcXM/ It performs no initialization of static data during its init function. Signed-off-by: Andreas Rheinhardt --- libavcodec/amrnbdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c index d8e0370a3b..1e11445cd3 100644 --- a/libavcodec/amrnbdec.c +++ b/libavcodec/amrnbdec.c @@ -1107,4 +1107,5 @@ const AVCodec ff_amrnb_decoder = { .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; From patchwork Sat Feb 12 06:41:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34242 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855362nkb; Fri, 11 Feb 2022 22:42:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJwiDJTSP/inaXDqJlHx2hxdCrW0L881/mEhwPxLom8Um3jU4ksGp2lyPDyVXyWvn2cc7WKf X-Received: by 2002:a17:906:604d:: with SMTP id p13mr3907485ejj.639.1644648122531; Fri, 11 Feb 2022 22:42:02 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 21si16060414ejc.509.2022.02.11.22.42.02; Fri, 11 Feb 2022 22:42:02 -0800 (PST) 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="FwFFg/Ms"; 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 9534B68B1F2; Sat, 12 Feb 2022 08:41:53 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2C3A7680090 for ; Sat, 12 Feb 2022 08:41:47 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TtJTm6LeTOlwAxdlzflDWpaaFB+TQqVosvUuU5kGrvRFbQCEYVTgcFk8YuDbAveS16eBkpUbquRhTrHMnv1pjpMtaZriDkKMiOqvB2VgNM0V5+37L9jjENKyuyOrlcAbGUBj6/5Ms51X+TOnI1/DSPwjnlI1t/Mdzk8vxjD/rFRvgTkfg2nb++RC3wNLWzbQJzr/DTcXPw/eQX7kuZL99plaA7jqD13TBmuH4h3cQebyRjmSaLCE/DjFfhCpaJ5aNnZ7u5xc6BNigFgZTtAgCxoc2lYfd2YIZMG7QxkuaBimMTw4OydGycm0Wk0oll8OyCVJFUi5ZIRVV40GWgwAKQ== 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=tTxow+eDCnG+z27zsK6Wl1r5EkW+SZ5AGlgfjUzJ3mM=; b=NjQ0wO8Ue7YFBP62+BQjmefKnq+PUlBmzUlyjKT7k0MhDbPQEdWZBNCDKE0VsJToOPVGIrlI1vvSH19PFxDeDXsBGf/V3o33YvYQ0hU9+I03tcu+XKgLRaJyYgXzp1SNbw9MXLuQZIcjij4/RdICEX3OydntWC8AXC6lDBZW+ejpfikzfg5gDa1eAuCD5+17Z7i8Obmzxp5Ug0fJE7Y5xsOhCTVxXmaTbuDOFUzWZrDyeI+F3wNa+m0PxNQWrsusiODNUnFLn6yXC6kGI0N6z632Ijk8lPXV6kw3H+O4srCvfZ4TQrT+ZJkl9VebmXaswaG8uM+5F5lrlyE08/OlSg== 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=tTxow+eDCnG+z27zsK6Wl1r5EkW+SZ5AGlgfjUzJ3mM=; b=FwFFg/MsvycD694Oray1RRu1GcsL/ZrRZpFenISaKAZH4+CMl3IaiWeMlkUTW5qwRC1tKTHbnq7iHPDmiwenl0myWST/YgbRPJxecAcMvHhg4YTqqiVNwQlUNuEUPwafaOj2UJ/jnzOm0dbDg1wHup1IS1EzllLYZ7JxTOzXb018saXD9PODE+w1xouywb5GI0siUWy7AxBRqOZhHR8WMpajYupCZUJFsX3y5cqsGhhItdb4sXW4zxBJuZXYc3P2WvajHrHn7q+m/9DgrKcaDXaclT0BC8dVnGGi/0qmTpVyIaujfxaLq/1GkzgXyX2nRoV8nnDwucsvZu5JTih/Kg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:41 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:41 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:17 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [Hu1Q71Lqgoj7pZqeowT8kYtAQKUgaUY5] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f10a670e-d424-4e32-3543-08d9edf2ba40 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlRX1iPs2ebQSeMqURNSKa/55o8Ox251reZSsg/EzB09pIevYrFxXtiGSuEE7yFoLlofdk62nzjqxQxcaVocJnHCcnaRsOTL4gRUUG9VwQllbvnT700kt0pZ2jj5c3fi6Tc9xei6TmCU/kqySW3g/4jOpJAIrCgWnaFzNMUeTidNdfaU6/FHIBhtxh2zTqeK8TjokxMayFTTlBRnXXCMc3GsNp3mDf7Ej7sSxkqthdP2Ae0y0il9Jlt/8q47D3SsmcKAAODartcX5fM8+t4PU4f1op1J2D7UHQABl2P/RO+smi19c7h88b0VrtmSEweVAU2gTGc77h4gayw/XLjs0/amWI8frl8ggdGcY4FIeBOncP7/CrBKzP2Vgr8DIhsBPFxos5Cp5Hq2XlPdOimVOmVOfKGyjWVNW4+gXnvYleK4eCaumf5Ko9n0Z0fsXHEp5jbF4evgHhtfvaJQejStXA9c0r4y4Rm03N4gVo9N6TQRejAnTTbVaQmfru9BzYWrJAncL20BzrqOainDemcNDnS4Q2UTRmu+YhqwSLePZVcT5vfqrM95Zn95Co6uzVL3VkMvW+rKRt+5U+rjjU7RdTgqCBvunc38HGAT/0e7LTD1PKjyiK9/pD5kCb6ceNPgZgPSI1Ca11wQmgmOJaQGINwExnWpfa+JinJIZ4yE7OcKZYDoWCBU9IsUVED+fnYiVoeAtR0Itk5jiC4+jBDA7RUQKKjBp55ZZYuJoCeJO5OMM= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mBbZ4/QM0t3WVNjxuGd4TTO2u05GV5qGiqpeTl81HNaX0I/zedYCTqezonVAeR5CLR3UZTV10S61wyUtzrG/7tVCNIOIMqcUAH3wvP4E0utMEFp7ouQ0dNIrnBNeVqoTHne6vYd060NuiGzSezZIQQBcpHxpuZc3Bz9XwDyZTNCx4JN9QzOPWKPdyvKxn071uEDpKpwU6Mr/7w/RDeWHpC4zAuwGwyRer6wct/8w5/FGSt8BdJeqCk1zkTTbXKNgycgxIElMuUnFg6ZWliffC3EkHIbGSKnK5vLHZyzC8n7BVLxLe7e8Zu0Gh5QUsMnCixwwzBhZSNYAZzxCM8oP8aUoIFQV9X+xnAQgXh/vqBP/Xl4SdWok3+ujgT+55m6T7WLdOOhSfLrHSd2rHT4K5nznN02fR1zRrFVpcoggldW654beN5d/TDxVF55eqHrguydyNY4pKHzjCN5WqCpoYghEni9opJWcFkUjejxDWSh/d7a5B8XlWIoeg03+UqbhYfi+5OpWeNKjElbcfj+Sy5QYgwICLjLZrnia+vzfQxUdOJZFl4gtVSGGnkbVR+OiF6Fob7nMqI7aA+DQzf8/uw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ss3yoUk7Wj85lk5uRLF1vJ7ps91dWqnyNpf9yCnD+MMJoahCHnpw38K8wfY4wUKk7o62VQ+7TQeoKRSy6BH9/rDBpC+IVLCJN5u+QYP6MvWgKjDFHdXqEfhw4VIkJv9awtVm1qyziYUJGql7QzJh47Ba2jbYH+WPCRXL4ixfPe6VwH+viDO+NrDlZ7NC8Bfa39ncoK9VrjEuoHmDLIaSZ7Vu1tlg/mNFzuRn/H3Mf2pCRgtFcxPtmZN5F0qIWl5t/WaYMRee+7LQq4HrhHRy+fqdHdwp5uh9mNWIuGVh19iQEXxQri3FgI4q7Zl7jHD8MXTexInik7p7kGk4NmI9/V7M6ErgQ9XyyYkoRTF1udrmmhK+iGMnvZaJEqa6cxJiNQXZJgAGbpu+tIJ1FecnXUS7bLfDDBTbptrD+zg2aszhV46rBf1qQnFrmbi1cGe4ICMksdVpxRN0Pug3nURrj1HiKBRnEKQMEvB+sIJnLvY+9zYSJM78TvRhyUBbMTVUW90TbV3o3696A76T4T7aa/aqwWF4vqCRiPAwgESyFARWGqNNoAzLg6rCtkT5MGN8Pyxj61ngMmONVJLJxuuJXBfl4Ya3dzz91AQj2f4/8aOJMjl5SjEI57N6/pyzr12T8xwoy2Zeop1wskP1cnPfD/JRQhRzupX6OkfyOQuTf+D5WsED1Kau5dfw7JUFFKyBYKHSPvy+onJLmicPHKhQMfSmWP7qbv8qPBQU8SE5fJCcAu0pzK/PclDQtxucYtLhde+jE9v2Z1KPVwbeNVAhxFgPBRxMwJ657yDEP4wUxNa2JttJLyY88TV7q+Drnd9OY+2ayxxg7VLJ08sPdOX++SQYLDprPb8FQsvdrDzEGAB9wPN8OdaD53Ce/zcnqwyw4R/qI1hGFy5xodQH2Ka5ByZKzObnaaHdbFtuzQ3PqigElF6dwafQXOgR5bjedF3GuVE4BzTYI1/qUytznGY7Qg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f10a670e-d424-4e32-3543-08d9edf2ba40 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:41.7117 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 03/17] avcodec/amrwbdec: Mark decoder as init-threadsafe 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: R9WezRY599WH It performs no initialization of static data in its init function. Signed-off-by: Andreas Rheinhardt --- libavcodec/amrwbdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index 3ff4077f7f..7d1b820bbb 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -1303,4 +1303,5 @@ const AVCodec ff_amrwb_decoder = { .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, .sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_NONE }, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; From patchwork Sat Feb 12 06:41:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34243 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855426nkb; Fri, 11 Feb 2022 22:42:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJwbw3GCFuMb5JD3Y9blar04pEw9AEY09DvU5KNlk1S8xbjYHxlmRzNlqeGinL+psw/UmEEA X-Received: by 2002:a17:907:7203:: with SMTP id dr3mr4063730ejc.19.1644648132197; Fri, 11 Feb 2022 22:42:12 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id f17si1499191edq.71.2022.02.11.22.42.11; Fri, 11 Feb 2022 22:42:12 -0800 (PST) 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=jAjTHMVz; 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 AE2EF68B262; Sat, 12 Feb 2022 08:41:58 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 509FD68B219 for ; Sat, 12 Feb 2022 08:41:52 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FEJSB7FNbelVxBEgFYibZN98duNQS27mVt5f9cSlxqkaukLfUCWGSSHxyBPguGG2Zt9XgoHH9zZK6sXUaMlri/Tg1m+Qu2popLFu/uK2ECloi6KDusqIxgmQaQBFoj2hv1IBSjMar/WdbppyYokXzZMlNwSifejFWhmAzjsgrayJR2mb9rDJNN7OBAU/eCVzX3IHqX1oG1AERvuFJ6BoyohX8yMENzxItDrRzuBrULOEyiShybFZ7EgC6E+ZyqjJEmSIwDOHbxMxWyfosNkLCeDEBbbqgBImQ7ktRNYsM3hqFhiUhmTRhuwFBEg3n7bIx6Jl9uRe3drsKA7GsbPprQ== 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=fT6WPS3iuHcQzLdrCE1PgCCSNtULnfld08MNEL2s2KU=; b=j59cmkln5Rdp5yDFLx8f0kLKbusv+Wm+p0TThj39RLVbcRKvWaPhz6lepklcJDvRgQqFM+I5Sv8Qjzm2ABANgnUXm0Gm/96yyjF6OHupU+oo6hwQBRzK0B1XbEpp2McD0Po8prgYBeuQ2TBmy4/Nz3RZuecGasXU/ZM4lqSmpTJudUXDf9S2qgp3a7qx3xeW3himTEevGo/piFBR8rMY5sZ4lVZtW34BGj213PghOBHCi+4QCAbPWeZJu6K1hz4H+DBfPvXYX67eudzrbib8rov2w0mowIs8sObTItcs+xLhW4110DM4ZHYIjZWEQozKycC96M7nRG3HP7owcDu3Ew== 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=fT6WPS3iuHcQzLdrCE1PgCCSNtULnfld08MNEL2s2KU=; b=jAjTHMVzwk31nSnDEKYlf45Ri6h9G9R4ujBcKBMveXpeJFA3igGEL7sDm5iKioHihNdxgTxCONBe7mCqCnuxYz+HgPb6a5KoYU07R1PQwxLeXy5dt+2PGjiKpqPyEBzY/MbWFPybAIzei7RRKNQLWVyJDPSRlWmUAxhaNaGobkQUuPgKRptZVS/LG45KaGYtrfknV6rJeFA2N/pYq7SdZH7AULoi9Q/ILlzC650mvlkSbH5SAQHft54x40ubv3p4OH+XGHrE6aSvVVNAjHA7zgSx8OCssOC/AUyO3f1NLuzTX5a1ap+VeDaPAufeSloTKeWad6V6jVTzOudfs2A45Q== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:42 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:42 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:18 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [5NOg4lp8yr1D2Y2IPIR+1frZDkmg25U1] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b1d7e794-5750-468c-21a1-08d9edf2bb01 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlA1cCWdadoNhRyqCP6yxpT1r4vgpygEXEo6ufbmJEOXXxKTNOKEV/CK4ISnOoAiPmp++sAGUwgFyPX3DeorO2OcCN0/ZpS+LHQG4gmFfszPPxIMwGHL79Gkdks4Uc+Nw2pIq4zte0p1eT6neeTdqhpxhuQmLvT1dGmCj3oMOBpQnagIGnA49j54kE/UYBcZ4TdM00Kfl0s6Cg2f/NFG1UjMNko32CFuTwt6JYeRaxwlF4GPp2my6ziQhauKqEMYCdfpkqLRRehfpTMb26qHUEBxwzJoSIBSJHL3HkuxxEfJTGbsNBPo+dRaeRs0wXVY4xu3tQQlsH2OBuoInF39Td9+C2RhHddRa5GMuy7egn6E2SXitSC/kJkWQtzm5lfHZMzkFHz08GdjFko1rEvJcNkF4/PCERuFJgsnsyKeaZQUzVjwZeixOVcqqe4LFc74cP7f3oSHQOd/CMdaUQ6jX9EEvEUyrqdg1oj5C7CtRLu/A6Mv7QZnjbFTTN5TtCKE/X/VJ7qVjITFw4HGV6P39xoS7g+RhqG2DA+AwBgyR/eiq4wB2Av2A6NFPXzBCel6tg9sKfIE9tyOkdfPAKSnqmcDNLPG2YyFbbSJkgvTUYxoWpSdIwu9jQgSjh84SgkdPgi3Mk9qaL/i6m2huYwSO81JXZg9HCmKe3/09RhjN7WukuDqPjs5EKRM8WktiI1mgFDP0ica2GOVgXhAdfd26OC7Yq3rGka0SmJTUPpfE51+I= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i9xUp3zGBpMZs+RJ5ZA4IMxtXIAF7PrjTcFl1jilPXmheUabpTVxVnJ5zvOon5P5tgUKG1lI34CoV+wSgp5fdGsY1Iiw6wTt4keqFKiNiNRJM4eAogBn7RlJl5gzKnkXNCp/sWkdRhablA7PsrfO7+PXBHB2LatjhhWTpMq3CWVGm63+PfLduQv1TivZVjijrkvQnhBYqdRx5pgmIRBCyzmOhcpggRrecsgVuXocjMmAafylpARG00sj7q66eNKUKhe+uxqUUa57F44F28nbqzbpVhdqTfmfOHFg5QIzBB54iCjOLOyMBjd06DdxTQNubiVm8zPmvjDV9EbCl5ZT7+2BSxvFLd9ro+rq90OidJYu+4ojhaJbT8TjXPO0LIPU82zas72a8pVn85e2i9lWgWfGFIZMLSWMjBE+Al6A69pLtQVizm4ZdMBm3BK2Et0VeHvlZBhHG7NYMBJ8upCH7yJvl1C2OFJdisVguPZslAa38nI4wVm62Ic9qNv4V4d0yNyJMmDOcgWvG4AUip4c1GIt9YeQJaxqejWxlADJwKhBS4i25M/F0Yx/GQkEalk5xdo/5COQsIkh+8Tw66JROw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Wg7Mq7HvjgT1EyweCp0FTaubt3olKzV2AK/rJ6sXr0EAeiNncC9Gfzgc13hwLwbWyYOqTzmqvRXcu0wfxy9sflsr2sIP2IgnYrZAB+OUGE5w+t0mVpqOcsYyewFvV9qdYFWk3zF7oEwObILB6PV7X5ZFVgF/vi/S8Zs2WDLn6KHBYkqRQ/X8Vuu4y932pcYJskmOgXtlpepwz4HkYW4d+68HrQbHGFdBF5BzaCVs/6i9/U7lpQKaMzNbba2alQKn2AJO0Nl54737lxNh3i4e4zgV0KMQqUeTFl2+jS6wW6XUratavBR/6EdoNflUI6asJi/Dv2UPJovLhJrnF0jKGWtSbD81hCOTFBLsn9F5+F5th6IZdANkn/FkKnkznUetcS9wfno6a43nIDsZuht0L45CoRzCeitM2kwjVs81wZBUdC1Psn75zoPUs0LMJRfVXzldGjcq2vK6eBEY63guOrbAKyOHWKluNA4FSC0gobt49wS2UgxQD5dTTLcwlLLtIjQe4W0fG88GTKjkZqP8zTB5lGh8+EY6Mo2rXUvzDvJiVYneZypU2pdW2rfL4RW2MrR+UPHIOLucc6GRPvncIkDp03bETdfCONbupGaKxLUjqnFOFm2IqbnsJYGz+DaTjCx3n2wUpTiUSbmeyfeG984C99mO89mOoIDfhbC6Ud0metX3WKb6kT3R4CxspKMIK/56e2rEr8ArYkz4z7loXyWl05d+ZPld6SiF1iTwsQFYdVXT0ZrCs93+B5uSA1hpf2PwleATHY13nXemz+4RVCmSTjDj0+rjmO5PQYkhYlD8SNi4LoTwocTDIe6m7xFZIOHd+CMZFHGucKsIp3QdUYN0X/rXTSIL8OVhz0vNgyeifRySY5oc4pYeuKbKXnmzCjjh/Zi0+s3t6lojsrxDs33i9k/BxHRN6TAYsJK+jPFDZehfy036r9tkEPdw3zGByaEwormWdfRQftAqVrZiQQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b1d7e794-5750-468c-21a1-08d9edf2bb01 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:42.7886 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 04/17] avcodec/rv30: Mark decoder as init-threadsafe 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: YSarRxscGoPg Init-threadsafe since f697622f687c22392194d6939914c9a6a01ce69e. Signed-off-by: Andreas Rheinhardt --- libavcodec/rv30.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c index 751647bebe..bd4d43aeeb 100644 --- a/libavcodec/rv30.c +++ b/libavcodec/rv30.c @@ -306,5 +306,6 @@ const AVCodec ff_rv30_decoder = { AV_PIX_FMT_NONE }, .update_thread_context = ONLY_IF_THREADS_ENABLED(ff_rv34_decode_update_thread_context), - .caps_internal = FF_CODEC_CAP_ALLOCATE_PROGRESS, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_ALLOCATE_PROGRESS, }; From patchwork Sat Feb 12 06:41:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34244 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855490nkb; Fri, 11 Feb 2022 22:42:22 -0800 (PST) X-Google-Smtp-Source: ABdhPJy7c7ktSBN7vSpq2WPLdwMqFSc4ISsLgKPCeE2+CFC4UhxDPxIDtvo82P2BPmU2geuTznP7 X-Received: by 2002:a17:907:3e0d:: with SMTP id hp13mr3996616ejc.244.1644648141871; Fri, 11 Feb 2022 22:42:21 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dn17si4048502ejc.383.2022.02.11.22.42.21; Fri, 11 Feb 2022 22:42:21 -0800 (PST) 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=AmvR7gAH; 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 D54B668B28B; Sat, 12 Feb 2022 08:42:03 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074027.outbound.protection.outlook.com [40.92.74.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 719A368B1BA for ; Sat, 12 Feb 2022 08:41:56 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G3sPar1rd1W5C4QGLmIsWUvnyTfY+lxHlWa6DvZyKzmd3fGzYLXMo+4/dTKGNvB+1uLz5R8pq2GhEKw+C/GcyWK5L3mN02IIGXFpX8mR395e8wH3+47X5ZN1RwI2KPiwJnaRmUi9KyxTaZ6BS5XCj2RsH3s0oLgbQZ6I5+8PgbUihCRnKgN1C5uZdmfjfL6HhUw4pBkyDzJdTlyYG7okEHOsxNanBycRdZF0fTMnzkRnZx8fEUOtX8p5DUrFQABYz4Ptyo7O8a+KH/C42UwcJhNU7hemTfmeNe/H28BVVQoCgsX6Ifjk4gRlXMC3Cr+V5mid7fguG2VAm0tC7NvuMQ== 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=vGQY+dUA4fHVyke2LVtF6mAquCu7r/farjGRiPbPGY0=; b=ZY1olJ6ppiz1t9lce1wPigcAOcDGYmfE0IDJknLUZylnZHIqvYaRtiMnfDHtiaohdDVxXYsekmhtGbD3KwjYTC6d3bOZNb2Xu3uEAFHV0Ay24dnYO80PE4Gukk+uQ8/qk0jlin0hSVIQmOX2BmF01upOWcKlyjvImBrnIFbdaEM6WEhNtTGBUFEwkqrHHy6C+DyiulD9gxsQwlrProWteh6RzkPxine1AiF/Xzww7OQ/J8ab4a3i0WjMyW1XSS8h2hTZgVDsc2qvgld098vVBmS7EydYxw5jMRQ+pDMFwmI4iSLpQDRCikG5dXlDt2J9Ve7Hue0f88skQPr9/l622A== 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=vGQY+dUA4fHVyke2LVtF6mAquCu7r/farjGRiPbPGY0=; b=AmvR7gAHAu3yqcE3LqsrWyhTwSR7rCVsKvKaThMjDuKegt5+8pHVpUdAvKCtvejhc80CrRv0T13n7nbAQYmDpn2fKw9O/kWAHCMI7cXuw4Ygsy6n/V5Fdf1rOt4hJZ8ZE3D7MPfbhOUwyKUtam0/jdJX7AZh2YDduSepdKcwMSENu1/7w5zSFNRqqwQlXShrnjqrsgNWpRQtS27ZYoZnlfSznFv1ZPSZ62JYg/gFdWwIUMhOAViAQt6LDjZ5oUunhnB1pE4LmHEmuAWwF0PWypdJL2KGvIPpbdhX7Ew0AxSkZ3rwXjPzWK10XO/470qhOHX0E9ivSCeY/9RH9LRzHg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:44 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:44 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:19 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [c0hp6ZnBnNn4R3h2QQ6soMUOJNsOYOs1] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4302b369-e1f6-41e3-926f-08d9edf2bc07 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlFMKdKSxmEfFj0GW2SGu7W33IxWhUPDRnPgrulhA5irc6Sz/5yrY6Dy0H3+p38dSWAkGIxEI2Qt/HGKnvUv5pF3ypll6KeJGQ0gReUdPOv53sR5AWFBpuWrdmj5cJdFBK5IpY9G6Yng0OZ//9Zs6rhnwj3xR6stSFqrehnste2KtI+Ef/6NDrsE+k8L8ma2Y2t1YAOk8SwCUQG83hwkrOwgjvTfWkbKfLxiVdxpaKawq1sR9uaUETtqj++tSVCLc9OvJ4Xkco/fP5+K1+aYg9KYmjbvscIQ6FQHTZdeWf3R2QqIAK/sM8yTgHbnZ+dIVQZmO0ZNx1EE2R3hKSP7Za2c1OvCAZWZl+oEPIdZbF5MDAQqfy9A8cJNdSBRCxDEF30qyCZT1FYDewYYEZSyNBBIvVeZgrO4e1INJe5KyKC3DhfuVEPndGvdl5+l3KFx7WwMioCz1mW6EXNETMXOh6ywTAzRsioTL3KoBKIcXggFidTn/CFYpohVdqlvWxnoDT1Oshj1ZuQib/odAy5pyVI51j7SVHctrGWTYeTlQnJculkJI+cR7eKVbYd1JXILJY4Yup88ZquyHN5wLV4DuhaQxNnUGbPwRSWa9NP4aY9I2Q9tEXFTNmXkE+cNaYRzMRehZGgQdf212jqqKjc95wdQ9t/7s8LiAj8MPTIrfbgEhnNRcj5lBf85lEvvFipWh5ap0kry478RK+DIk6Wp2SdhLZxbouyE7MBl4g1BJ+QiI= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: o50Ep3UKNFnRV5PkJcsEtofv11GyCvuPii8p2bSERLX6SRgKItLjR2E5RktYvMv48zK51pueKFB4xyxhSqW8mfbEYioWamNQaOhXjx12ZpzgIoi+enRiKEAKdcho+bDuRRUrLS8UdbxLqP5FlA2UtYAskM1PX+FufJZf1ushxl76h0f+SQ0yF+/W+xJlQU4Y2bKeoYQ0b8OYJRPkwEbVfiVUtryAbPExPz8HdpZPPdFEPJ6oQlbcu1kWCDFzrytaYyzanHJrDwxgUvT24hXKzMFZUzxKe6yJ1c/eKFTL2oSEzimw0mejwDtLuQbC1JmorvXHJZtgL/0TdF9nKQe/bvW0DbgyEvPbqY2wYxS1fM9pStXdw2p2RUFDbNgAV5eIQUW90BlhqiDko19OphX2+yg4s8RON/OlOB0jmZvoxMERIAoh6G4r32yE+00ldt+cn14s+GKdtTEJhVNRX9Y2jB3AUp9BPKwzj18rGXV6UgROykeDWGw+nl953EoG5Wb7dA/WrYK7jOu79Yium98nkOLf+zzusCzfTCMXAe4+bV1pNcB3i4pfci0e3uHo0BoP6LoyqAwZK4HXb41hXdmUkA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vPiDucZKNNVfTC41z/RpeRQ48jtOA68WN4UwWCk85LhHoupiFZQDOgJUtoK2at00X/XMW4UJivoaw39tfulEuL92tEmEknzKbh3k/AUjgyZJfVJ9Vrk27N+IcCxVGJcoTzQobzqpZFU7hJ2NcBHw7kLPpsG+qvW6MZehBME6TOTtjg0/kCaVgodhFmEWbJwzGeaT93K62moUF/y8FfHgTRs2DdOnA58xP2402T/f5r02BOjA00sh+9IMezD/YFgGzrJZTYUpEx34shRjs6n2mwO1uuLvg3aP8W0UYk+BreNkszJJ55zAgniz0A0RrNu5qReqtjfq+AcD5C8ZstEny/sWtq3EnKfdhYO93Ffjkzunzn5ajKtUFt/lJgcv9gzVsFPzTMasnSe4rbhJomT+/SIb7JlyrPVkFN2+aE6gX9r68lu8N3y3GRHQumLUY/VZdJcVftQ0olieiiW4yeJNeEgWbAQ6uwQGtketLNVwP+wkJtnpLK+1JqBCKaXL2FsYFOzK+G5itVK2M6L7wfH8br624eBVJOJByYgisnPiU+z/rI9vCO0mfuGjWMC11PZZynC4tj7e4pQPUzkm1IZP5LNXlz9hfvu0avb3dBj80YQTOzgiw9T2cNUcIem+dMmsucllRZWkNftmtWJtENqOgJ+2Hi/EsC8iQAAvQ/ZW6uXzIn6xpW4gbOHnrpnNLxpi//VE5aJH0Qe6Tityp0OTZqNicbUNfgbiMeWdOqo96QUqkFPnmbiI6WuiEioZPWMziZsBK3L9K+c45Zf2NZn+t49+BSb/EOiOVlgpudqIDl7xTZhMJpKm2FvgGbVWdRwnjaWD5hTeT2ox90GvHwXv9UqWy8JNUq3VtJkpR8I+jNUGO6bcQ3Y5DYO+2NyG3fqmSPShlu8tk+CNrXAZZsoVIMqMM3+uO3+EZWNye8kstkE3+dHZ1A3tPzBv84XG9Z78QpJVP9bDJBcVfRf1lDqBvA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4302b369-e1f6-41e3-926f-08d9edf2bc07 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:44.3835 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 05/17] avcodec/rv40: Make decoder init-threadsafe 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: OP3DQgoTTWBe Signed-off-by: Andreas Rheinhardt --- libavcodec/rv40.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 31a7a04e51..8f7589242d 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -27,6 +27,7 @@ #include "config.h" #include "libavutil/imgutils.h" +#include "libavutil/thread.h" #include "avcodec.h" #include "mpegutils.h" @@ -553,14 +554,13 @@ static void rv40_loop_filter(RV34DecContext *r, int row) */ static av_cold int rv40_decode_init(AVCodecContext *avctx) { + static AVOnce init_static_once = AV_ONCE_INIT; RV34DecContext *r = avctx->priv_data; int ret; r->rv30 = 0; if ((ret = ff_rv34_decode_init(avctx)) < 0) return ret; - if(!aic_top_vlc.bits) - rv40_init_tables(); r->parse_slice_header = rv40_parse_slice_header; r->decode_intra_types = rv40_decode_intra_types; r->decode_mb_info = rv40_decode_mb_info; @@ -568,6 +568,7 @@ static av_cold int rv40_decode_init(AVCodecContext *avctx) r->luma_dc_quant_i = rv40_luma_dc_quant[0]; r->luma_dc_quant_p = rv40_luma_dc_quant[1]; ff_rv40dsp_init(&r->rdsp); + ff_thread_once(&init_static_once, rv40_init_tables); return 0; } @@ -588,5 +589,6 @@ const AVCodec ff_rv40_decoder = { AV_PIX_FMT_NONE }, .update_thread_context = ONLY_IF_THREADS_ENABLED(ff_rv34_decode_update_thread_context), - .caps_internal = FF_CODEC_CAP_ALLOCATE_PROGRESS, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_ALLOCATE_PROGRESS, }; From patchwork Sat Feb 12 06:41:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34245 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855537nkb; Fri, 11 Feb 2022 22:42:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJwGZQtLRmR6nFT/JRGMtOOT5LeU7CrxrQOEBlAkB66eeenTvKW7tGR0paT3FUZuDwm/C3p0 X-Received: by 2002:a17:907:2bc4:: with SMTP id gv4mr4065155ejc.357.1644648151495; Fri, 11 Feb 2022 22:42:31 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id j13si16521768edj.500.2022.02.11.22.42.31; Fri, 11 Feb 2022 22:42:31 -0800 (PST) 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=cwpGy8LW; 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 C67D368B290; Sat, 12 Feb 2022 08:42:04 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 745D568B1BA for ; Sat, 12 Feb 2022 08:41:57 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cBrwIcOA4pJGS1p0L+k15SWMGDBmhSRA1dSVLAg2+KT7IVawKSXpELI2Za2IK3bRoABG7V2NP62F7QW65OE/WAp3NUNDQ3apZE5JlnVmJDpaQ42z/c2AteFIdnNo3R0JPQ+YfGOHjgNeX8/meFDR+Yxx6R18QvpYFDCMcoZzFou9PMYk7KYYFaGoclgxuTDV2Fto//FQOij9CYnQJb2P4WWFFaSCnVd0+Z2rq3kpmnHMRkzhit5Sbly/dfs1NkC1dWr0yv+tZTCO7QCOlDOFNM/tzenujVFUybRuAuw3IyKrO7AC/ewQ33Hne8uMuMzl9LbmN+Z72xE/dTpXQ9i3mg== 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=gxQ7UZCaaBg76KKusEmOANQ/TAF8Q7PmyLTIqSrKPX0=; b=c50ufVoAcJ7aUwMZed8+MlGXEpPz3iZepwkbXXQsIGkd2H88/+SxuexXu1dnwhojWMLru7tZb7uo9oeB6RTPsf7/YO825EY4DS1YI/kWOsu5dS3+UlNLGiotixh9kjLZoFSRBLVlgfun/J/zJ2ZbE91HG8A/rQpoWSPviTJTxfNa0fqIYqvb98nby127g/FNhesyA27Rj/JZo7ps17iIq3wJqJvySLDhHHNv1lk06jRp6j9st391p4TrQ/3Sq3lbPEz0Nfr/oUG2znwuDaoc5pUngaqIBIw0g36Zwjy577wEdld6zny5JrDdFxpZ+0tMiwUdVtjHqDNTm3P4qWyI2Q== 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=gxQ7UZCaaBg76KKusEmOANQ/TAF8Q7PmyLTIqSrKPX0=; b=cwpGy8LWOOb5igydW0fYIp0amSleYSmhzN07nacmaXAbVGh8+jF24oOHy74sHPynlRhW0rn8Qbdi1ImVBT916kITS8rsFarqWNCDtBYB7kRFmKyBrPNfe3PUIBcTPoKggfkI3nGuBtE5KXB71VC+GRMoihUd0Q3ci6qO5I9ejwW1BjdJGVSFcmiWAgKwTCBXigIwNmDBXlkDGzImunFI2eASSKjY92LpycJBveZrFuvk3IHggWCMvhuGFDN3cw9X3+qshrgTt7Oyen6adXW1Y9cfsQv1QJWWolYgxTHDH+Kboxpe68Is6SPVDLNUhXkKRLmoklbsRXMUaFivmdeRaA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:47 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:47 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:20 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [zBju0TuHPWFsqb99DLY4PqaA5Ol6wZU2] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0b7d8152-84f3-4850-0dad-08d9edf2bd96 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlRX1iPs2ebQSeMqURNSKa/0Ky73LhomRtHoQIQ86Vryg231oSUwhjR0zvKZSNw+dO+RYbdv1WaymNQXJSlZ6JMbzUXke6DcgZ/2YW1se7PQCNZBluqliW1RolGjtO5V5nQ0fAuzj6ZRKi9DSaZZwrlC1syeOxUM78hLA4p7ns6HI2ng9odpomQFlnRv+em8CWrxfu1YDKX1Y3TWu/oJHKviKczetPRlcky6AAaIfZQkdMejLJgwn1ODaOquAxHjEshiM22cG5O/YKdOr4mKAn+E+mfN3Uc5oSXEI5qYqXOH2q3mC78FsQZuO/bjAzHQiN2lKgDK/3Eu2HzPuoNc/nShTtgUxB2gjVBiteGMxsVsdrxgdd7YCywZfT19hqnPhnyoFiv5tq/T+VfRXVoL9rnerwgD+eUCW6tnODpaWobfVC2lthDKb5FLsB1OsDUyXlLJ0j5MWHnIwM91eKvgSmJVLVDo+pg6KgcndVqXQj/ntFA2Of2FFTx9xJYEPsG4vVsPUUL8LMz7c1BUZNktub693gSGr3xRS43vei1MptvtjNx5gQJDAOJN+h2r1OvwyOAuooTMXp1jH2i6KoPdPrQg6RSVLndcIEM/y8QFRepN0rmB+IKiT2ZNVsSms9r204Fcy71q1zHE80X5t7PBRH8KzvyOWA0pqp9lJQlg4rewCi31PZDzMCZ46xI4xq+YWMqLlT14VH9K3BfNGnRmD1ARuPUpu9XZDNZS8hNNFEBxc= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5+AH1SmfjCEJLtaQIS3bUoZ/qmNi+x4BoMJ08gGOtz00S/h1RU1bQHh5Jh8WSL4Kz4KaL0ZOSBwfk2PPAonSWV0Qoh3VaSElPqRz+2t3Ot/NjAIBdVdE4OCr8txe6LDCtko+JOHeGb6J3w4/0zeMUt701dwr/RRqZO9FdV5x/KPBDCGwGSue3RdL0KMXdf7gvKCTVU9rX+RyiARkfAOtUAz7CO7GjVTyRVKGsNm3HNFV/IglHkf8gP/jTyGSJreCk1pt/UfYcoMPHoNwF+LBNG8w/pWoB7ItxDRKMOz6aQHV/DtDWwMSottHlKSAlpaAQdqUakqrEsIWNQFlUW74u68u5i9nk42RKS4ZcWEf3wAZe8C7LWZ+4qoYVuIULNWx6cgboh9gWuOKkuX6Hk7ycdmwQOUfSUDIKsNvJK79DgyH6k4DOVyuojnfai9X05CZxZ6tTq44GjhTIuWYhIde80VuHegyTKG0e9NiX+7Pbpk75yl+eNX25K9CuaMuiGVroe5Ukc4ep5LO3MvEfkvctZCVQ7DjkBsYG7M9WJ+ujjUzed41RFyLEYfwZ/hNXW6SqcRGUEHDwDZ7/urNjSpvnQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dEgblXqzjv94fMYxVh+42MZ6DZIEwlfPLjcTeI4IEg0RNphPWI7yARDPOACvv8pxWSPmZUlPF1i8NGULDiBVAPgH8j+IwT7FmIcNbwhpfWKLj0bbiyn7fhlLNR8OAgj+iIK04lZ1DMlGOWqMgiwwX7kv6Og3eLAGmG6kqLGxZ81aZ8Mhk0/JRm+BpiRbTfboTi0l8VvQ5cBhutImbGF7jY5DrzXKaQF1FBcP4FPXaxIjel+e2Wr0ARyFUhfBGBOOxMmO6RWu3HivBI51p8cN14PnM4GbSdwpzfVqkSAZSAtNhFkV3JbOG4rqTBO/8t2HnvkDuSkvvAhjioZKqBW3DAZitWpzRIgQ/2b+0K5NUL8j+Q/E+WSbK41W2vgROAV4mMFGoqCJ+B4C6vHZJo9inFS1oghwgxqsZn8G5iYsstkPzJGTHQwz0W1VJ/Dq+pJs+FQmdqt00HexFQpVNqPDZ4AuS1Db1oek/owvxrDbfC+r6Tx9isHooB/DCHTjD+q/U7WddimF2cslm2h2nwJxtmqwQjQg5ZOduBZDb/LGsXgXoTm+7qLKUWoi1QGujsW/vNdWTE7q4xZogdY1hTkwIQGwIdrwTf/VCMK8zrn0t8/rClgDUSIy9GFEZteZRQaGTNOhU/ZWLVnqg30L4SfuKlMOp9P7c0S0BkInoALD6+u9lPiVFnuLX3/b+ePmmnEGn/h7qFGIAKnmzft9lp1RQzRgWeK0GmRM0gOhKf0Z0q//jsxyCqFeygN3HTsobAfLasjGMmpf9ZZnWDjciKba9GB2V0MpV8AzLTjYL2NJQjsKkrThTBw3nW8VI3ncQPS1Y2/7lITe7trrWq0d0f1ZKKyluz6SMnaeXJsHeuSqAbnP/lOGgSONOAzAqWbKHVuOP30xFa7+nyRl5/EIzPjtk5iTyxFPbD8IWeClWpri+Q2vlSpe9o5i9auJvMjJoucdyV+ri683P2nF3FyLwproBQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0b7d8152-84f3-4850-0dad-08d9edf2bd96 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:47.0991 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 06/17] avcodec/apedec: Mark decoder as init-threadsafe 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: NaMHmHaJrP9K Signed-off-by: Andreas Rheinhardt --- libavcodec/apedec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 607304fe36..923f79046b 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -1666,7 +1666,7 @@ const AVCodec ff_ape_decoder = { .decode = ape_decode_frame, .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .flush = ape_flush, .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_U8P, AV_SAMPLE_FMT_S16P, From patchwork Sat Feb 12 06:41:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34255 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3856147nkb; Fri, 11 Feb 2022 22:44:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJyVwV2XrrMwwuXZN6s2xZmVmeDVI/2HEW1HrSC4RhXRyYh+eoq7ScRqX5MA9Meg3/qcFfBV X-Received: by 2002:a17:907:1c81:: with SMTP id nb1mr4124181ejc.275.1644648241782; Fri, 11 Feb 2022 22:44:01 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id eq24si1946766edb.318.2022.02.11.22.44.01; Fri, 11 Feb 2022 22:44:01 -0800 (PST) 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="D0/3/M8J"; 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 97B1868B284; Sat, 12 Feb 2022 08:42:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074029.outbound.protection.outlook.com [40.92.74.29]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6DC0C68B2A4 for ; Sat, 12 Feb 2022 08:42:01 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S1yI5D7EByEeSh4STzjo08/b1ruMVzcU6xvq92Vznx31DkBupFOW6Ev+xpxhFbC2aONdn9HEa0lC8kfHwPyFap+7rINzTKZKNUBNS301Glh42+/pELqIsxGisA11knOSBwqGtLZ4H+IKRWPzq06raWbI2M06eb+5hKgDhsIDycNMXH/mas8jSP//+n0Lbktznt9G8bFaesOBN/C7hJupMPhXn9DzBu/8wEeka4BXwYRhomDemf0Eso2haJJk5AfzaGjcbnxar509jGhgNQh0IoL2D6XmPys7AP3mwM4Fu8CDil9dTCiAw6LOkbeiGJZs6HxMivula4Z6sxdVQovk9g== 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=ZUPkbXViDDTTXKRbjT3C9p7eqBj1ev+6kULIv8STG4w=; b=gSdkUPUwmNwGehr+IIxeGrSuzG6D7rX6ZBrJNNb3k1R5Gcj8Ut4NYxJ3QqnL2vedFvIrMUjKlImGI+mzoVm9q2oT8eFLTf7Q2RMhp22bD7FJnGIDm2VoH4FVFEhwndPttv9AJKtz1LGCpLCQTX49cvb0iI8V4sFT6YPacUSgMESXUI/7rvN7a+Knxhl9F4Y9rlo78kBlu9vwbHH1nUfevpLcmo/OsLI47Jw3wwgttKnsApGOntWMmsKyxa8jVZl49DaazLfQNj5FMHe1ueO+w7kvvETZlS91KIbAKRL78TA+jbok9FEx83j6h8jR3xg0DJXO5HziKq/xhKAhY/liJw== 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=ZUPkbXViDDTTXKRbjT3C9p7eqBj1ev+6kULIv8STG4w=; b=D0/3/M8J0q5zVvs7L/5VMh4ZiLhOYOX5UcSAf0SArsxbyhbALoUWynIbMfIOqeV7cnbuI5b9OyJhTstBaK0BfTeMUoXlzrp4Ov1UV0HBkyFKL5CEPhzbZb+sL8s/nuxAUNGRYZvssbs8rx+lFGpkQrJ+cNcz64zHZ6oRc2NCx//nSWZTKGIxTWg+rUxb1vRcMKYx1f3Mq7k18RjcvfbO5d+NTnUQjvtooLOxZNva65Iv/lMVb4TVZusiOVHaJic6ozQFOpIfilisbeWnNZwqS63j85hMS2yWbTR/w4FBciVBcUeRHENBpzKbtxau5aTqc4Ln3JTqrE1adTkZN7qwvg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:48 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:48 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:21 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [s2AwAKC09ssDNQyOYJWCy+4AIeZRhP2c] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6776f645-faca-48a0-4c44-08d9edf2be7d X-MS-Exchange-SLBlob-MailProps: q+fD6XS3/UJsdM8Yzk49XyLWh7Bm6qMbAgjLStt1DU0yH3GJw/yY1K17y5MEE5wxF7laNhkjJuT3FCRnEAjNg3sBOGKs/jquEHlWG2urUKZy2ArXLYBv/LczRuyaWevyy5tcNFwJkWTFcTxJ2ADPwZjkXKI19mvu0aMNuyJ8t8HyO6sODNYQfU72HcswlCTJNTH39ERrqolkFYwnXTosQC3zvoZ9smnt80SNEgeaQJPlnNzyxWXWRIFB4NnM7Dfm9qLgwBS4cVeAn7V5gDTD6dsoCBACA83XLf1syighvrykPEoT77Lj6qOic7tLsm/GU66/V39dPEYW7Y8Zw1WrOEfzkQNyq0/Ls2Al4WHq3LxXw7aiUmabB6AonSniPxQHmuBzHJVWlr0lvFFCnkw1cQWFuITR/mZ6bh6J9SBZkbnRFkh7NqUQvQQXdPZ3oTFcsLOCOH66fnJNpgCJM3HWYMibhV1LWVQMi13p+FnFdti18Dd1X675F6has7spaevh4bT0Lk/tq6OlTzRb48Uus9TZlnVJsHC6H4x4+XgEJdH1NLFolIO7xyj5xNSNP8YM4OIgY8QuN4aY0fvhL/geFT83vsyUDp5yHC0aNnV+m/4MO5zcBrYigk4vQ3180CHpQepuKT6u0pUqqt3gxDJrjgY8DDO6pHWtv+y8h4G3wMpRjsFjAbI1s/3ukEZkQQSwAA3sXN8R7svEB95uQGGP/g== X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LdYSWYvJbdi7PzOvXtMNkp5+w96zfjxuORcrs606KKD2c9javbeVYPvPcItbBP76Bo5R2peqZhzulzQ70h4zLg1SIBthnedFYXNGG5j2Tqh4nh/gXeWkgEbt9IrtzEn3w5KjsE9WwEmn/+Vpj6Y/wzKswjcIK+xzbd7SSj9+2OOgbKNFDfMRbsz9fGQRP3YmHPyF0KyKKbyTEtP5f46uEpZIr38e2v7rCnOTgyrg+VBFncekPNJjShLbITZuTW53dXKKAcRJiWVgH9cwZpTo+AJRpubmboovBtQkYQaeWRmtCZW3JMXSku2NrUBjp658Vy9UpOhC/lGdNnmutwXqPu/u6OR1in7IJlzhrooaNIzc6NURj6qo/vPpV0bmhBrI4l5tq6nRywC8H3UpK1wkhza9k3dilebJcZvyLPE9rTK9nrVFKSVfH7+uvuz03H0IwxGbOBSNfNLIl/Y3pjbOV3BaHbIB8Rk8DAFOQb+C4V87zK+wlbrqZLq3MPajs88Rf1WMcpo89mVbeIlOlMJyQAFXP4BGmszHEZ9K6Kclya1x9KKRaBXEiZPLuAEas1ph5DSOgMRV0b3Y2v5IplUJ9g== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: rcvGHtVXcotd1O0hv8SnYQeHKUuYBl6z0IkmnrNkF9SaelIXWc3NZl7F7YBsxcIhpqs/Ee5r/bUTddmZMP0LyzaqA4826cpUSqc/gz0rn66K1UUXMANZiwiSp8H3XPp+M4htjy89/V08DsTcVglK3wGyU5I14WuRzdISlgeW9iqH7wYBrwGC60SgJQlsJhiKI/vHkBO5rKIsPnTfn2zduKhejad3mwC3cWj8qM2Xayx3oL14NWwGK/a2dVU85/fOYa0s9IsdUUAeeBsempewICFbEK7lIl3sHj7/pxlUUUsN5+OPOCUvcjEM72YjRCLMvOLxpeFq0zPxmxKm4WrN9lNR/bUnsokQUh6icA9DoANPhF5PN7sQwEYpOFhwA8q+TJAgSysBP9QCBnrNS6IHF/xrOwYgzN1uuoPK5PDevI7Bfa1oyw5L/72JG6qP1aGRA5RdB3hsF2Mo6lrHhalNA/0GuPfuE9rLjb68afB5+CZsFwe0W0hCROyXY1auRRfp6sjgz1CE2UHsTsWkAV/+dRNM09RriVwopaR6IQ+o9ARMbYDtdhF93xJq99B1lUG3UsLcK7RhxBlg8eKc2UUry4s4jtKnfL8deSjbthSYztFpdTsiLO84++FraP98UFPGhmHvYvU9kdDiwr94WelX8lD/LjmgiDHEvVon1CYnavNTq34J+FBJKl03cGkL/QT5ENoYq/UmTAG3KDsan1G0YSWsQ3I/KFay0fDBUme0nRJrCQnBisunHnmE4s5Diok5hoI7S8KdNoQ0pmnD8MVBr4X4ezKgpTd3KPphutPyDOanAVbAsTWU46UFmsfPFj0asiZ6smjVOu/Py8G+pK/noRkyUrzKIPVBfr2QzioZ3LMrQTg8oRxWkz/e9UEEWtpjyoSAlq5o2ofaDo0vKumEc4mHUrlaMKbtTk/TO2SodYn5XA6Qi1ldyYqhtYv5/rd5G7f1efnliD/TSHGALrkM1Q== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6776f645-faca-48a0-4c44-08d9edf2be7d X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:48.4949 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 07/17] avcodec/alsdec: Return directly upon error 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: DoJNylFevBEI Signed-off-by: Andreas Rheinhardt --- libavcodec/alsdec.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 9e1aaf065a..f8609e61fd 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1990,17 +1990,17 @@ static av_cold int decode_init(AVCodecContext *avctx) if ((ret = read_specific_config(ctx)) < 0) { av_log(avctx, AV_LOG_ERROR, "Reading ALSSpecificConfig failed.\n"); - goto fail; + return ret; } if ((ret = check_specific_config(ctx)) < 0) { - goto fail; + return ret; } if (sconf->bgmc) { ret = ff_bgmc_init(avctx, &ctx->bgmc_lut, &ctx->bgmc_lut_status); if (ret < 0) - goto fail; + return ret; } if (sconf->floating) { avctx->sample_fmt = AV_SAMPLE_FMT_FLT; @@ -2012,8 +2012,7 @@ static av_cold int decode_init(AVCodecContext *avctx) if (avctx->bits_per_raw_sample > 32) { av_log(avctx, AV_LOG_ERROR, "Bits per raw sample %d larger than 32.\n", avctx->bits_per_raw_sample); - ret = AVERROR_INVALIDDATA; - goto fail; + return AVERROR_INVALIDDATA; } } @@ -2044,8 +2043,7 @@ static av_cold int decode_init(AVCodecContext *avctx) !ctx->quant_cof_buffer || !ctx->lpc_cof_buffer || !ctx->lpc_cof_reversed_buffer) { av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n"); - ret = AVERROR(ENOMEM); - goto fail; + return AVERROR(ENOMEM); } // assign quantized parcor coefficient buffers @@ -2069,8 +2067,7 @@ static av_cold int decode_init(AVCodecContext *avctx) !ctx->use_ltp || !ctx->ltp_lag || !ctx->ltp_gain || !ctx->ltp_gain_buffer) { av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n"); - ret = AVERROR(ENOMEM); - goto fail; + return AVERROR(ENOMEM); } for (c = 0; c < num_buffers; c++) @@ -2086,8 +2083,7 @@ static av_cold int decode_init(AVCodecContext *avctx) if (!ctx->chan_data_buffer || !ctx->chan_data || !ctx->reverted_channels) { av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n"); - ret = AVERROR(ENOMEM); - goto fail; + return AVERROR(ENOMEM); } for (c = 0; c < num_buffers; c++) @@ -2118,8 +2114,7 @@ static av_cold int decode_init(AVCodecContext *avctx) if (!ctx->mlz || !ctx->acf || !ctx->shift_value || !ctx->last_shift_value || !ctx->last_acf_mantissa || !ctx->raw_mantissa) { av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n"); - ret = AVERROR(ENOMEM); - goto fail; + return AVERROR(ENOMEM); } ff_mlz_init_dict(avctx, ctx->mlz); @@ -2133,8 +2128,7 @@ static av_cold int decode_init(AVCodecContext *avctx) // allocate previous raw sample buffer if (!ctx->prev_raw_samples || !ctx->raw_buffer|| !ctx->raw_samples) { av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n"); - ret = AVERROR(ENOMEM); - goto fail; + return AVERROR(ENOMEM); } // assign raw samples buffers @@ -2151,17 +2145,13 @@ static av_cold int decode_init(AVCodecContext *avctx) sizeof(*ctx->crc_buffer)); if (!ctx->crc_buffer) { av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n"); - ret = AVERROR(ENOMEM); - goto fail; + return AVERROR(ENOMEM); } } ff_bswapdsp_init(&ctx->bdsp); return 0; - -fail: - return ret; } From patchwork Sat Feb 12 06:41:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34256 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3856202nkb; Fri, 11 Feb 2022 22:44:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJyeGQtWnTfK0zyj7Y9e5AtG/aphxHpLzcApa2WtmvPMJ1QdO2THh+hOpwkKlh2YtQaGiUNH X-Received: by 2002:a17:906:7306:: with SMTP id di6mr3975898ejc.410.1644648250394; Fri, 11 Feb 2022 22:44:10 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id fz1si9043411ejc.316.2022.02.11.22.44.10; Fri, 11 Feb 2022 22:44:10 -0800 (PST) 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=OtizUKvk; 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 6EF9068B2D3; Sat, 12 Feb 2022 08:42:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074027.outbound.protection.outlook.com [40.92.74.27]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E255F68B2AB for ; Sat, 12 Feb 2022 08:42:01 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VN0qDflVzjSbKu6W8NDGAbBDMqeFTUmnQK6vc1QUpNfX616yujqhFq9rVejkEB1BdQMuG58eZwaVAj4wOGBuAhMy7+k5/KTS2arLyvz+MRDfCRF8sUpXN31GSeAe4dfCQ5Kq27aJEGAJ6P5vBr3QzvLV7Wk/18YxMD1esRzw1NxH8R9Vqt4F72zb0UDtOU3wx+9cdtr2SqSsKq6R6C+uxp13WVMtFujh3dhpYvWDnrIC6yh5T43nO6HSTk/vj3WrN+787mUZ06DghcHS4OffItznG5+lgk4O99wLQFcR0OK90sty7LVySts5syY0HjKk2IAMgraobI9XzD4bsHIdOg== 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=8abhhGbYUQGnIYQolTX5rTLAlQnrUPVHOW4wvlt7WXg=; b=eEB3Ez1irU6Mtsv3eiGQtjmyZ/vBsmXxdcG8xgivsKNdEpir7wxlMOwrLIJnRYtKiYVTbzRg5hQ8JFKGz7O7Gn1C+X6kORCa67i9GbO/qIKN4e1AurzZb6EKNtZEXGFlZpo/9C6yJwdn0jIiteKv3luwYjAqBl3OU2gSkBJp5fAWSCkBcUnO581d2EsUWV16hl05hmAaog4ErtKTSXhSlboZ77XkL0/BYUod73y/1u+meCH/Wh31tc+fs842na1mKcxrQFlYiQTLE0UaBYxdqIoaGSQFpbZ/XpZ9n0eRZyjsaXgmyDRFACtLOSmUYfDVv1X0Wb+mdGwGfb46yr2VrQ== 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=8abhhGbYUQGnIYQolTX5rTLAlQnrUPVHOW4wvlt7WXg=; b=OtizUKvke45P+k+G9+48IZ2kqOu65QzF7ayCfAUBbAhMii/ZztAcWO3vc3KhLpOcREBa3d5r6zvexoP1yKo5U073xo+zWmScudxPtAkT4sfQt6DcG4vFTLiw3dxZV57TtbiUqnAsID9x9w67uHPYrN68I0rQK2nvusEwQRPjJDgOAta5jnZDrdiP5/3UiRTMPB5wvDKxEuG6Vq8lyNkMt9PDqIzhfxKZP2LMWr2nKcl7cqOtapC7m4p7vBFl7w6ZMPD95pvMaaGvpogh9TYHCAOzo/GFxvdQDwP/XRowNnXm/uNmavI5zmEX3H27qaVopmlJAv8/AvY/xncdTG65fg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:50 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:50 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:22 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [cu0RwkOHNuPmHguJrUVy0WZfGQ+4ujUO] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: abfe0e85-a29e-4ed9-48da-08d9edf2bf86 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNUp0/JksszMwZGXS7aFQs58gD9p+KWVfU7S25niUSJEonGXzsdJ4bYNZMzg7sDgfaOgf7wvePjoMV6oha1amIC3PgoGVxW0fKSNmOZrKmR03bofhIVAGAF6QOGoaG4Y2ZSe99zqnTLVZJerKnvSuhKJ18f6cWB+X8bKEpt9WGl4wlNZAO3OxZx7IcSOK47QWsSuJbmkJ6kVt7GxPlVSoLFwPGyuwAxc95rpme154gaZ1R+iojjEtFIbk1HJqbi6AsdEw9N/BciezyoMnvlmZC25D4fjzVCQo0yo6TxcgOpvmXneGimDFNxr3WpjNPsXRexx207EwNWMnMjrHdacfqT9+4ZKGHJ2SOMh50n03xgKsJrw3/RoOHCjZVWPgWw42h/au9NXLKs6sDjbSjESfDXUXta4DKyIsdTgVhPtWKdzajaFlBlSjfLlI1/3/Y1XECt+0is/hcXSpuJ0pzIIIKXbBXMeVML5QcduB34wBmOH6u+ZH8yNjP/bOL/r6GPqTXA3wReiqT9Ig2DrSPgeOi31EffEyBy6KjYaJN8dNE8Vf9OWIlOXoSrjVqDvRevme/AecH/102yx7+T5wnB1yQEEymyPu89JZEI7cr7vX+vXePYVNavoyz6irnOX+g+t3gmn/FioMennaq1QEUy3SXbufNgjPSYnepWcnUs9F3XSVo2I5xEqj6k8wun1xUj+OUDRa4p2ScXhhdBQj8dAyf3CY9M+cAk0lK4= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 9xLWT5/Sw6AISprB61cYvCS16wou62LVmIyj/NaNv9zApmlomwL15wDeeMOjGiLKrPosuF2zzkvcRIW6KkWB36CgkI1C5WGLaRve1w+kdvjBkU/x+6N9C3PMiEmk4QTPYQJ3iD9gLkRi1gmI/ReSuvcnBqV4t9YJ7m+77Zwl4wOO03MIrZt8rviXOrhfJLsobtn02dF19dlRArIh6PXij4PJD05AygEi/sbuNlxA6nU4eBwf7qJ0PvLZQ7I7lav12w0HYeYMbHORfmgunNUem8msxM/LJjXprg4Mfz71lBYAES1pqLVTELrh9cNkafx2l3I4m+uxBIbFZgtcha7ubaDQ5aof4C5aTEwNS/aFUs5DDcNTMOTwSEP3xHYnfbIm1yxb8x0cUtr2reUxj9K74O+LpBO3vpXcgCt1z3fmI6S1pwo8XQ13YZKvYw1uBVL3d2oI8BcqyAtJ2VSHxnFAVh1MvgGv+/QnRz7QkrT2mb2SxRqFdI1SqPrhDPg2vINQ4Bmy95xt3H45d1J3wN4JBKEgW9orWnvLNOsmpug38GwnRjcjYk+vcmnItNMij8+7UNv2Ip/I3Sr4mBRuoKXDyQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bwuWeaf/jfAX6IsgxLzKPHEq5Rm95g+Y+U6Z/DppLp/MJPjojvIfTPXfVk75rnoeKMdyPOjUhDi9YBiIwb0LCPvmPmzi4t2ojYtLxISmSKhJmGYzPm3PkcW4U8VS5SMd10/GcGUvc/UQiPejHA39oeA/eb6q4jnj3oeUOnd8sz8nnLgOVYtRBmSgCAy+d18VND8qwN1Pn3dbEr510rrE5aIoSFZgcoRFz1PbbYvWwYaqaL8iX+xBngNDT5CmAaM7pM1WZPGio8Jv0nGk7dAY7xg1QgD29QQenGC1Od3VimY8eprI0cuJJQepabibRgUczptiTdSEmGppf9gU0nUGha0feZUxtljQ1yqP5u8pVtjEw3qVlPOtvSzZ9HEVVvXJYXD57uaoDiTNM6w5zQdl7asxBCIXPoFLYajv2RATamrIs9hiBlRNWsLmzfCtcQU4zK4x266gLCKjWZ1//altpVvGMW/D40wrA26raPUK2F1FbxenSMjIcCg1W5sjPd/pvFl9QtSJ47wX95zYrX4GW4ZdOw1+TUVnWk4HkLFE3L5YuNUUj59sWtAqkKtL388hCZKZV+tYdQNfXGr9/OWxfqc6E8lMXUmFxWpjOSZaqdnwPszscpF57/EDmTyKHkvgBApWWrs0/fFA1VerzUM77amJ1VYnXA0U8fw4RhDiQAEhxvnDxg083r6j4bEnCZ5Nd99K/TzVO4qiK4TLF4NFo5sNb9M0ocEbTrpvJOOve/v9QuKR6GNXOTy7gsgdzDTVFSRAr8pk4m92XxfOg3KkweRPCj6zaBc1PfZ7WTrr9E5XICfWVtPYgpu1vPANO3J5/SXPNsRIzFGwdmnuIX72z/kPwd25sWftQ7xfmVHxSwddGBB+ixTvNz9/QaTeRDwLN8ioHZuv2Gcp0DZHLFlqLHRW+Zpx91GClRvCo92v/T4NVMl7qor0uPttpo0Nm5400Ef83f8G5DatLM1vnl5Hzw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: abfe0e85-a29e-4ed9-48da-08d9edf2bf86 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:50.2627 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 08/17] avcodec/alsdec: Improve code locality 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: Ea/LEP9HWa+V Signed-off-by: Andreas Rheinhardt --- libavcodec/alsdec.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index f8609e61fd..c09401d257 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -2094,12 +2094,6 @@ static av_cold int decode_init(AVCodecContext *avctx) ctx->reverted_channels = NULL; } - channel_size = sconf->frame_length + sconf->max_order; - - ctx->prev_raw_samples = av_malloc_array(sconf->max_order, sizeof(*ctx->prev_raw_samples)); - ctx->raw_buffer = av_calloc(avctx->channels * channel_size, sizeof(*ctx->raw_buffer)); - ctx->raw_samples = av_malloc_array(avctx->channels, sizeof(*ctx->raw_samples)); - if (sconf->floating) { ctx->acf = av_malloc_array(avctx->channels, sizeof(*ctx->acf)); ctx->shift_value = av_malloc_array(avctx->channels, sizeof(*ctx->shift_value)); @@ -2125,7 +2119,12 @@ static av_cold int decode_init(AVCodecContext *avctx) } } + channel_size = sconf->frame_length + sconf->max_order; + // allocate previous raw sample buffer + ctx->prev_raw_samples = av_malloc_array(sconf->max_order, sizeof(*ctx->prev_raw_samples)); + ctx->raw_buffer = av_calloc(avctx->channels * channel_size, sizeof(*ctx->raw_buffer)); + ctx->raw_samples = av_malloc_array(avctx->channels, sizeof(*ctx->raw_samples)); if (!ctx->prev_raw_samples || !ctx->raw_buffer|| !ctx->raw_samples) { av_log(avctx, AV_LOG_ERROR, "Allocating buffer memory failed.\n"); return AVERROR(ENOMEM); From patchwork Sat Feb 12 06:41:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34246 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855606nkb; Fri, 11 Feb 2022 22:42:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxg3CKs6xCfpW8KkYMSOZ+8AHhFbxKI4WyqT0jdt4Y+Yx7bux5OUSxwAu/ceyljaP8ID7iR X-Received: by 2002:a17:906:94d0:: with SMTP id d16mr3920711ejy.412.1644648160143; Fri, 11 Feb 2022 22:42:40 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id qf26si12882399ejc.150.2022.02.11.22.42.39; Fri, 11 Feb 2022 22:42:40 -0800 (PST) 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=qVtSolzb; 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 CB67B68B26F; Sat, 12 Feb 2022 08:42:05 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B39DE68B1BA for ; Sat, 12 Feb 2022 08:42:02 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WhESZWUShXI1RB8pSyIz+p1jk85IHpWCZrOPf+CufM1bJ9afaY+1hyGxNBk87F5zs4DqlJtH+oXkPSPVJnvHVaICuhi2kKA7zz4qRWui0xs2ymkL0AtiRMxsSq9kXQRTNzJ1WPpUCGFWftogov7TYW4Vl3bZKDxX/Xv0+ef6rFZlxZe0gBHF+76t4LPyG2tRz6Xr9XuhMLtW1M3VYZzYOBvpjDhPxEjXmzEOQl1tVl8IqiJMOc+mEfdHhQYNR5a7EEB2qtHgf0VedCNHrP/HNqxJQBXuT7d5ba4ff50BzL9adJUF45B0rOV6hvU/EOJkonGCOsO2/jkxdtl6DoJHVw== 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=1cdPnPuNICvuyTct9iYeDPMztw40aiFcpdOSXekYV2M=; b=TZfDc9FBkBlfg6WNx4sTzXWnLthSwBDp0sS7ynybHsFDZeoNbTumq15FjOBLBMjI9gqrDQvs5syRSY3azz4wp0EOmAZglj0efVQw3RYOKF24Pqr0r0Z83mrXIUjjo+cUenrax8fVC1GvKhZXCMZwBRQjawtkt8Htro8Any0OYZZrtv/MZNcvXmVudTz7jCTU9Yg/dcshFvCUK2JxChrKvRRoAr4gM/4Lc9Y97DG3BO1PCHBdmDeGt1TT36v7L02TX3FuFxHWX8lKE7+AbS8+hEDCGmAiOpDscGhCmN5xYqqyL7uosnZRXqPisG7CK5CQeoVQqZkGAuGXgzkvJnq/+A== 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=1cdPnPuNICvuyTct9iYeDPMztw40aiFcpdOSXekYV2M=; b=qVtSolzbxVq4EPdylXy7OQ821PK7Bi8Wjky6Q+INCkltpGytMvrFK1fqCrpiJiUETf3zMCpMaEabFwrvYAuRxJ1oBSx2QRsHy3k+7RYSC1c1r6GkbRrK70ETDAD49LxSlI4Bj2VWVI9eXlnwBKQ0FrgGu17/L5eBPC+8erMILI6O9+MzYAlLgnZ4TDsIaW3a9xuM+k1eSXpZE4TUHTfe7H6EVjt7YchHp6U/AOCMQdf0blThjhuASCUZnYR3gxk9TxqPUmBJOja7+YZGJCvh/Te8Ri46/uGphEi8Ke9NhbPQ8v4ZgayErPWf80P32S94TCMxW2vbeYxJsLU6PjYQXQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:51 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:51 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:23 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [ffUWTzd6Jk+dQyyDF/UPRlAZXe6WRCl1] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 2d4445b7-470d-47b5-9657-08d9edf2c047 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNUp0/JksszMwZGXS7aFQs58cZ2DTdgfYpkvTUMvhVO90/T8K6dMd771ipcOD/ubPm6FQvIs4LBWF9G0nwK1qB5HU0+COLU0OvbwEKb7BwvN8gRuPoDtFwzIgqtF1atuYnz0R1LqujnskdFQih9mjF+jBUvdDCRuvouMUqKNtyXCrFfY7NQOtxY6DDMPprXPoRtV9y0jCrcBlcjpXQFUYrSXQE3Z82ykrMOHVrJNHffXb5fNjxM/DBhwmao3sCLAZW2MH1wmAXAS6i1HJiL6K623b50DELhackEK8rYTSRy2geVTv8fYkyHSvGkCzGINa6Flzmh94JJigclfVT3vDrd2fnU048Z3TE7MfFDr2+tWa8kP0eqMtA5JyRnFrXsfNVAMZGI0sf/gWHedZjf/AYHhVLJZqiVX7wrwkfiEhPiKtYH0zMZ0e88ZUdTQNutSUBNrYNRpL93OTZCSjqqyQjdifKFLokkv3OkYsAdQdVvvyv0wBHRiSo9e8E9LGHETzN3Ss4iDVFFSHWVUeqhdmsb/fRid388SprfH7kCljmBeuQvtIDELe/o1QEtMzPoYhRAL4zdkzAQtOszG4wq5CExdrAH0fQGVwr2VyBB44o59e/SWpKo+TGAhCWzev4jpdwGHIVyHmc2QD7Y1/vTMS40Y7pMafA2aAeQ+eMyE2kIMwDFZocw+ULOM69SZPC5OjogGowLJACpAXtn7JM8Pb9YF1fOTR/ozqXY= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J3keiM4JacOBFSeMvlCr2bNsau1hmCfbKzMB5bz5Eu3VbYu0gX1dVzbSof9iTMYelvyKsEYVJtgErCHO7QtJrqEdhru6HAM8c5k/2nyN48n5tzXrstMEW0VMj5QuuC23GrQYSWsBH3SMYVsKGIRGmGfLgXApyLQzoOADie2U0yX0xJ/3+Hyzm6UqlgIREj+jwA06aNKoWA/T+vzGHS/Q/WAdz65CB4InaOIpzTh8jSCtDqmcp0SRsAKdGuUwMplulTSSCq1YThWXWnogUw2uTQQGu+LBdOx+bbH2Qt3W6R9ePOXksmCl7odt4kA4A67GoEVZlpLOTy/xyHio/4Tp8HhUmWQ3WLRIKXYgnhdasT0Vpd5Q8/5PMm74zKlmWmfHpYgLWOmr6O70YS1+9FoYdcgGKA4u8VEybB1O7NAqNlOmnVVebU15FNAi3NMxbiRqsoJdt+oGR8dkYnk/jGqZxu/BfPbWrYKqLUVZ5hE3e5XY3NtxEFy9stmoxhX+l1HUqg4GCG3CcEgzWAciWlQYSUAufzltrmiklrctvu6Tm1bKjvghr13TA9VQaLQ5eP4CVU/xSarYnWiGb7Aw0Iz4+A== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tj9/VSU8QDU2wpjioZQU0hK34FgcAv4FqqjCY4wEzNbC5iIPfw9HcaRFi9vkzAcqL5SrEO9ftmT2obbd/oStgpwq9obHNm/bYsPlUVvZsfT5lew/eUJ6Qrzc1/DYA9CtQQv7FJKk40aaDDFHzsuZcUkzW1+QeOXiLlBku8JKH5Q4MVExhzFUmuSMfePAAaKmoABv55C4bwJQd9UddBAlMlNixywJgj4l+RDNnSFf3ZR4gSAnb/598mHfD5UWWHlUGBMwCGwvj1Tw/cH4t0SBaFEREakhDfLtygEDCeOSpUzyyzsCPMAU8pOArnQXLzXqQ4bV3iJnEcFjuPNrujattLJ+PT1vJ/kAapBa7xTF3yO/tftO9evWlJC8jebjUtMo8n0SL5+feAznZP8xPhikVxeqfwE1x+/7RV+S3VOIJ12dQPVTcsMya5v2szUOH6Po+WiL2j/QXjjnDjPZs+9xcrSVsJh/nHkT0lfk19LGA6lGk/cNwPalf2HVRGJSLvdh8GmGbvb8DzdQnwb+zE4WcZ8XyifKIZPy1yD+6/7Yc3cz9ixucJ/abQg02InFlNGXDqW+dpCgIU5hDYoMoG98UfxoYBQx4B3Vpuxr5NbuZEeRkmDwbCYL0n/R4TVHCfuDJZGOQbpibmDicbyrsWOEXe8uFsJom31P70zv2SRnoego8rpIjnkQ576k7l4H3pPN/hLoHM9H61zMYZ57umjJ8DlF68IH5tETiCaBGSdPIvgB8u+EcJoeMsmL87eyFs0TYYImrqT5toCgorKoURCkjH2FhVSJLA8L5CL2c/vwiZPLLXw/Oud+9VgpzRBUKZgKxHY10kyBPbAvlbejVNdNfnNEolBooul7dhA61B1rSp+0h2I/U2Q2FojRplZ04qYOyJH/C7kKPmyksnlzxojQJAAm//2HMp249ONwmB3WSljsBMk2y5m/rZfrlDFGqo0XHlzwN00aMAV8CnM3GivMVA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2d4445b7-470d-47b5-9657-08d9edf2c047 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:51.4983 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 09/17] avcodec/alsdec, mlz: Check allocation 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: EzXqdoDvC2yv Signed-off-by: Andreas Rheinhardt --- libavcodec/alsdec.c | 4 +++- libavcodec/mlz.c | 7 ++++++- libavcodec/mlz.h | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index c09401d257..029c37e99c 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -2111,7 +2111,9 @@ static av_cold int decode_init(AVCodecContext *avctx) return AVERROR(ENOMEM); } - ff_mlz_init_dict(avctx, ctx->mlz); + ret = ff_mlz_init_dict(avctx, ctx->mlz); + if (ret < 0) + return ret; ff_mlz_flush_dict(ctx->mlz); for (c = 0; c < avctx->channels; ++c) { diff --git a/libavcodec/mlz.c b/libavcodec/mlz.c index dbeb7dcad9..9087ffd8f0 100644 --- a/libavcodec/mlz.c +++ b/libavcodec/mlz.c @@ -20,8 +20,11 @@ #include "mlz.h" -av_cold void ff_mlz_init_dict(void* context, MLZ *mlz) { +av_cold int ff_mlz_init_dict(void *context, MLZ *mlz) +{ mlz->dict = av_mallocz(TABLE_SIZE * sizeof(*mlz->dict)); + if (!mlz->dict) + return AVERROR(ENOMEM); mlz->flush_code = FLUSH_CODE; mlz->current_dic_index_max = DIC_INDEX_INIT; @@ -30,6 +33,8 @@ av_cold void ff_mlz_init_dict(void* context, MLZ *mlz) { mlz->next_code = FIRST_CODE; mlz->freeze_flag = 0; mlz->context = context; + + return 0; } av_cold void ff_mlz_flush_dict(MLZ *mlz) { diff --git a/libavcodec/mlz.h b/libavcodec/mlz.h index c3df52c9b4..24993126ca 100644 --- a/libavcodec/mlz.h +++ b/libavcodec/mlz.h @@ -57,7 +57,7 @@ typedef struct MLZ { /** Initialize the dictionary */ -void ff_mlz_init_dict(void* context, MLZ *mlz); +int ff_mlz_init_dict(void *context, MLZ *mlz); /** Flush the dictionary */ From patchwork Sat Feb 12 06:41:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34247 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855691nkb; Fri, 11 Feb 2022 22:42:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIO0ZDC8CWbVEbOtcqDRzXEdMY3RLov6ydOpY4oZrDDgS0l4oFF+WNfMa0u8Burgae3PwK X-Received: by 2002:a17:906:58c8:: with SMTP id e8mr3915248ejs.706.1644648168669; Fri, 11 Feb 2022 22:42:48 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z15si10371225edx.478.2022.02.11.22.42.48; Fri, 11 Feb 2022 22:42:48 -0800 (PST) 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=A3uwqyjr; 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 C82E368B2A5; Sat, 12 Feb 2022 08:42:06 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D523B68B273 for ; Sat, 12 Feb 2022 08:42:02 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TqHczgVqBA1VIHE1T1Ex3US91YG1ywWHx9ub0TPLDa8U5b0HBHF3fIGvzDwLuHDHrBDbCEbLg6p17fspxta6MbcQzAVLLPasLHsykoog0Vb7S8El8sk9OiONZCy0IXbgFPEPPScxcIuZ0SjaVAWR8hOg2tMHEQDg/ry+WIaMGV4sQYCCB+T9m1/bsoMdkf811uzt8aZoP+vZmena31C0oaBrN4WIuzPAtl8meEfdwdEHqlNvAwfQkBzskC4fTbmc4KCrgzE9tA1HKgKm4dbQgqN58gQQy9aQYmq5vc7Z0cO5X9uM1h2j+uUF8J/kBdaeLoUF7RsVxK9cXOg2oSXjzA== 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=+URdJil3iR42WP7LZZ/VJGGL5TmUEYpHs8LKQwSPgyA=; b=h3WN7nsFb6b3cD+FPv90SQCeiL+OrmmTn6EXF5ppI4TYuW3hbDtBjgElDkpziBUidq6LiN5wtDytO+AvP97/8Wo6cWsPyqO0wHsNCbK81oJKgd8sl+QIXJME9QeHW30Xn5tJoYwAL1v4ydHa4kUUeCkdHJSvUKCWgMmzLm9n51JYhl3LyW0y3IEBKF9QH5XaHkraony1w2DdIjULPW6jdgOSd9RiBQNVOckh7KO81iWU8etk4i4shhxet0KSzbQMqwsMcssgAUVaZ6hEhtwG6sX55n+CvyPl945rBNrkMRS+C/4J6xkak1Sc0wmmVA/31t7BhwEjCLVYfU38Qd5Fzw== 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=+URdJil3iR42WP7LZZ/VJGGL5TmUEYpHs8LKQwSPgyA=; b=A3uwqyjr7yVzIGm0e1DRvDBN05Qirdhove9hZKdjLSN3Y+Rfvyt9qpHdEOWmQCEDtv/FJCwaZkMvhbrqSnYuBzBL+R3SU4JwOTgk1zgRyhqPik2DYdzavIp85osdKLq3DCAFyQXfArWVYS61jRahwxTy5umZtaatObx/6YgE1TgTZim1YcjDbduNfVCJ7BwBle+OVWwlcK9vSXQvmPIqLUWMUwzhT0g/MBaHJzXRzr2JVw9pyO4Hbn6moo/pIw7Quzsf/NUx7Zu7ARJUkb5kidpMdzCldansWAJDBI0IhS/XPCcpGTJPxenxKRHOzLIRNr4S/qikXXueAUMFZT1zCw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:52 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:52 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:24 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [ZdZY3dJeQchRmdGQU+4V/d3+wCO+vmal] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 4786897e-1b83-479f-209c-08d9edf2c0e7 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlRX1iPs2ebQR6GNcN3ofHQW7vZ/i0UMfdnGBwlDYFx4WZXb1YOPsl058SCk5UXgYXG7Juw5K/OcNGYjhi+RAqwMY1RFgqwMhMJwzRP4z3nX891q4oz/VaSr/kCoXhObeP6O/+P5QjygebjMMXs9zCR6LbI0TdJbM5suYTzbigGEdaV6+Xzll62x5IL6aGAWfEorBV14lPh7BkSQ0EO4WAlPhdzQX1EtgESiehuie3T3SXgOW2Dauu0JBpo5SHVLr2BmmJc8VsRFgtdTFFGh/UrSTVMM6XzgiWbfH4RiFIf5KB9sMzyK7oQ8ir9jG6KrcoNZdHciKGRO/xNAYVcZalJHFPZLp+aeWT9RRqvCIKmTplzbkIVisonphn0/b53107C3luRpfb8F0RVA9RguEoPSEbjkP9C/j8QmqCHmOZ3PGuNkY6eraDlRRUg5iopcYoQlFWMncT+oOL5vUSWNcPO08xsq9mhyGcy2HqBXP+IBCugNT+eN/HxZErBnAfjgOPWkw9uMccOt8GyUL66z9S9mS1AgwVD9C2wAWs+3d2S/tF9jK03hKZ5jGY2yBvuwl1KT9PUVpocDrj9yqqIiFGvtEJFePhr6qeTBIWZb7xl9vVbO7JSfdl3s5Eo/T4WL+JphWwr39gzTvpAru5n7GVGskx8tnVQW7HQABmwwLlNUqh67egL5kgL7G9wlpk/X903oNqhLCLm9xrL7YLcY522k3gsR71/hBknq/Fm8vSbro= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vdkcmuiVFM3drV9VcXoWg711d0UJpJjRhFROO+I6Nnke+pmcL/vZCraRbWEURyxNAyfoOoUcNCGYDzhgr5MeoBzUA7U5dI7DbPWY4pUpi8owEATclfRDbjammJ5j3CFRqBq1eB41dH4MZzAzxazvg0ANK4iVlnLczjIPILOjRBYqvPNyqpcYHxsMFzSYaYdowTzoN5FkMW8Jy3zJFtqd4cwAsHb2DdpVN+0XkjjZPcXRG2uVSYJL+uLIlLsC173Y8MET2AbZXaE+y25XcSzqCs3ITyJ0Z2tGUyMxQHWzm7tf3itrXpuLvxeVoYgO5z3ja2GHS/sWHU0cHcblDXSD5ecL9R8YsuiDad+s/iisIfuOUrjMveNCEipp5zoeejZqABr1cruK/Mg7gA15Qbv5CswIueW6oG3lCKqee+Iu14SPs/QGuyKIXwFfPPimW/dQxge4zGYZS4ioRAPvd+FtORNidJxFnOZeFNQq4E5np7r2O0z/by6SOmBRBYEHyuZiXHzyUGBm/IrLjQZCPSLH3VlRMkLK2uVX6BwLvliRsnH5THuZGCGhcxFTxFvLEOlcGhsLm7N6WkhlxDjoHLBVyg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: S1J4PwXmInIbScwwjrWgtlGgli0J7baa0WPkPFkghaeC1m8FcwgXKyJGEh4FlibLNyx/evcSBjI9+Grr582mnEriJrI/FUUEgaWEso2I/khitMoZ7gktCsRHodgnp576npZZx2MT/CfVeXSCEls3gKmJrq7u0lJgu6bDeWZTKYn+nO9sA88lM18IPYRs2oMVjGWGZoUUViJBSYkOeTV38EMlv2206K1Uw3+nNABm26+uAec11fDXjl8EJ4ItEWddz1nHVGb6ZrFmacZR7+TcAF5AOYtHzRxqbtaFYnLZskX1ji/J1t7Uz/rHexN2ntqhXUSzQd5DXRaj7bub5d6Bj3ELYaHR4INviiPqdd7l6QMqlvD3GCtLdogW3GlbGSUeUtOtsaT2qEhGgdUcsFh5I19NAjUbdlBeCG0xaplZnRIpKZTG06TFpGky9HDfHJ9INU30nKrGJOkCdMDp0MvG8KJ/QmdINOjpCxt9LnTQxRDdJiDKNwwCifp2APqfH2puq1P2RUvbUsRD9PB5cVQlzRaY5UsAhxACaVUwmNjB1JD9KcC0nOZdnIJXaQqKIK2YHytyhobSj0f7Bm9EMlw0L2T4Ndd4rrXFRbbM3EEyFYDGSOmM3tEE31SSvgr9ZozHo+o5cBgJ4z24WsgYdXROHHwub6KSkvTSE++2cIl0wKaf/s1nq7CzH5EERNNE7gTjMUfe6nv8LukyqRq0OqT6gElhxkJy+r7PCSz8Gqu1PFEwfZype2oPuTOlunA7emn5RnbUY89WkN2ZUijp/ccNvQ03FN+Gj2EN0K7PmVG7YK29YZTUs4ub7Qty5JW9ckFNghpVn+1ZxvOSHktrgyJODeZqHBdv9ofzHNvFF5Vgukb6sdHMEji69guP7n9/dn7d3Ehg7T76YvF6MxImiKrsjx9KPW8AqPTTqWgIKPtPqNTlIlLq+1XRmGp65bYvk/cwd0JbvEcYILB4c9n8QzZvOQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4786897e-1b83-479f-209c-08d9edf2c0e7 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:52.5751 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 10/17] avcodec/alsdec: Mark decoder as init-threadsafe 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: hf37CsZKPXin It does not initialize any static data in its init function. Signed-off-by: Andreas Rheinhardt --- libavcodec/alsdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index 029c37e99c..b9629fc3d2 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -2177,5 +2177,5 @@ const AVCodec ff_als_decoder = { .decode = decode_frame, .flush = flush, .capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, }; From patchwork Sat Feb 12 06:41:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34248 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855741nkb; Fri, 11 Feb 2022 22:42:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2oNhuoNn7X8KdXLBTa/wzrBpMfEgoqN9/GTq5OtUEou4EcaGmP4uy1w/YPCk9xO6qmjZ8 X-Received: by 2002:a05:6402:270a:: with SMTP id y10mr5594606edd.413.1644648177758; Fri, 11 Feb 2022 22:42:57 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id oz7si2914443ejc.911.2022.02.11.22.42.57; Fri, 11 Feb 2022 22:42:57 -0800 (PST) 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=ckSiGcuD; 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 C076F68B29E; Sat, 12 Feb 2022 08:42:07 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 181E768B273 for ; Sat, 12 Feb 2022 08:42:03 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JaZz9kEwt870p0zrxk7E9Vok2H2UMWlyBB9uTSAlWGWtELkNYh880LzmUAYvVB4v0LKaMtUgLUFqyfL1HhEw1B3DNq7EJhuX/bZ01siL5rE8AKMm7uY6xdvXiamETS13vXh/n+Iv95hz2izqeSaIVw7GI7sQxSb3efVaLZXCP7XP9/WBxNAWrLyqN1Amuij/WVB9JvhVh232tkNV3PULoDvIop6bDu8pQJOQfBVQltDWnhb2HCwJgTBGMPFMX8hqodTil4od+ICDEaMk4g4rc8/0Ts+LqH+43C4XlTxJWHqknpB7Yxt1xvNlOgrUxLQp7P7+Rw/1M+6AFxPw1yRfhw== 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=ruQWBkoMxKGraIUej7GnYC5h9Bf5iz3VMY5Y+nZcQ44=; b=I4TKCdRdd7RiOlZJhr2tyiJKZm16HKb+NanIWnLdSfriavI/mDP/DKocZKom00QYhRIXmqFfIfhGikQ+eU1H19bh5lvz4VdadcjEHRo8oYz8MPRvH/O4pGy1nqPKblQ6Fgt1I8pJ920SnAt01dYQLdTsrvHwnSztSm0PzxJj8p9djzlNUec3DO0qCEi6PEoVlJiAMWwL1TT01s6sAvmdpTyJZdBPfHpHcOAY4PWiPIsPkZpY1UVC5kX+BZ6vq6dDH6DUJMFqugM1dhODSXS63SJHNOde4lOK2673eold6yPH+G+inj6HTx78dttXfqW7fb3gAzv6yzPed0fF1VCe4Q== 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=ruQWBkoMxKGraIUej7GnYC5h9Bf5iz3VMY5Y+nZcQ44=; b=ckSiGcuDmwS9EQ7l0b3DZGGUH2XDlD/H6eKM41/h4iW1j6f/dut7YzTuiJkJtyR1je181UM4qrspJB1hZxTqOeFn30+D08F+NRN7GdfEFYAp03Va6XATraadoW3CWRKyTyBGFB0xJ0grJYSgDdgFWDPzwnMotrKaefamrSWW3pm2BtlHGdHs6F1TxtiYFwgp2pZcbl5zs7pYE3Srdi8TNM9PNxlvtLh/YEXT9PzB9yBJzJTJAHW3RPaLdTf6JpDQ86cmRh/T6YZjSwWNek6/anGrrYARI/SUuVproIAE5W8LwQNuhjNF4c9m7VuLwZaSM/lFWYDzQYv/a8WWPREKCw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:53 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:53 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:25 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [WSG5DcenNBIdLQId12jN7ZrUF33t0vD1] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-10-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 49251986-e1e3-4954-565c-08d9edf2c176 X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNUp0/JksszMwZGXS7aFQs58vTR7H7tsd3M7kxJc9YCbtLxQ5hh0B/h88CqiUcNdvqpvQQhhoEmS+gKuMRYXibSQpAIdGKbxXUIm9tfoFBGMYihxW5uR4Wj8xR4uHbSLStJqkk/GWj4Jp5DDciFYX8CvcslE0ac9c+9S7cMgSuCmGKUBsQ3n0mhhmowGvyfpbFpESUuMQrA4Op1kex5KMvjii+vbaZ80s0+vHZ+hmjIWCK4OnqovLdd9Zz8ywTlPaiPlhyUZZ55ixcNMsWBRk/dI1H9GdTHulHazMEIL9F6zUqGpMcgU105KxFboTUSu1fYmsb+/iueL5YcETA8tMq88lq4nnkOnHSmYZVe+eytCEUaQBCWHP5P4YOPrtXVjg2YxYbSdb75LMQL4ismUyU0vgNMKUmqDM4rUNLEoyX+VokVJFU3vcgQhiHe/H8buQ9LzLb93HEn7WiVn9/+rVg6p2J46Yb3RNly27/UvfDJL9xULiOsE/i7Dvz9ht6Yi86ZZ6iCoJB9jD4qqja8ET29eAerWy3HUz0/dnNJBPiQkCHz8BNG/a5NNR3B5Z6SvfbjEnZD4ZZlAz0YkTk0EOiR+08ZBgSY9CCUmrRZL3z/cQSdaOMGuCDwahMpqEpnRuNgJCgecxSuCJPsfKFVGoh0vuY/mXgMgdzXJGz40gF4gakOwLu/MBe6ZQpnvL6v7HiSwvnDRdG7VuEkkQZa9Zbk6UZ8P69gGKfI= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 3Yyuef+yc43jn3SnvoFt67e5FInfZWJmCxBwLDxjLK4a6IGJk2m7VpRVxzyXRbM03ntT8ZjRKhr4lne0/glT/zBVGU526Zm5ML1rxH1i85j0zyymWElBG9mFpL3UOB06nNxd/2YSk+kFo8Q0OvZceoxkFJKRBrJ9YAWAHbyir0asl5tWygqoEQIL+X8sDXsnGU3cTiGsC7aG2kUS033T5eNMvhX9C8J3kBO49XQNAYfZaB7xDcHBoO6ZOCZD6xZ/fYYQEoJtrDcEKcGcXXIZPmcrofbkmZN7XKeE2p4Jbw4I0NlI83E1Ck9MA7a533RUHA9viGICEdngsnynNortQy0vJd7UQh69oDq548/kX6rBcvPJSNuW02V4iT6yh2wY8HNA1FnBMpKZ6sApgQ+ZZ8IfVEGzB3R+8FUgdeyeedRUWs9OL1dw26gEkdyx/fiLx2s7vEkHmR1jQT1wTpySRfnWPP5LjOvmMlrVUT0+E8xPF28vikFt7Y6zdd1CIvvXb1/Dp11Tw5QTLFEi8ksdIA6hP7QF/0cyNd45FH2ulPBi79IRIQiWu0XLIs748Cspr+PKr3EZzovvd6HYg1LeRQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: X+dDOeYbgsqv+dAADTCZfk3LmBbvNfKc0IsbxIm+kujBGJ/Xr/L6fzbvrS6+GDWWCAY43PpzGCmYLvktTuTO3VZZPoCLhuxc/YcM1qY9ZMQ0CZm8PU7g1WgfMzD5p4VuFu7qr8HRifBDTe0Ixgd+OsSPzkuAiwFoyUVhnEMga6AuRd+xsbxzLgKR+yUdbt0NS/qg2Akwf/06qrOlVSZXWq6onZRIKyA0QgTHKqAwSqTf5ZNspkawyIMfZC5sZC6Oa2dw1QBtmfy/ILtiEleVUhRV+Y+EZde+/IOfIN8hbh/h8nQYBpNHYJlQjiL+EijuxNARvsGFVx3fWTrqlACI45lLVEjbQO/CfEEOYM/O+HWK1lzhYXCMRzw7sD67vK05KjRxVdsN71FbObzBmNeltBq5hxqKv1XGf8O5LcA8lcgrcEJRZfdLzPCksf8z69+j975iKWjhef0gXGxvd5umQWRaI/h3unmZmS7KGGGNag6A9XDHHLeW+4PjT9xAbJ7vG9rEpgxZeiK6nc3ER/CgrXh3n5nGhoZFQbVIrI3z3kdVVj1yrtpWXK27LPEqep34ZRjezKOym9t9cijjwVxgHSVoaEkwwgp504SQOug7nwSkbKGn2JPULuObwUItnVsSc4yh5fOPOvi3PUkZzCwpH0r3velJ26osWubFPJphE4xQZaMuY20kLIAE7lGDhBqRpllQuVImjDsOO27jmXolYs5relcerbgjqa5Bh5Mb7MvRSIn7sDEd8HLo3wT5i2xTYmd/ltBa2b6JErQvz3ffC9mkMaanVNWBvbhqMF88J7l37J8tzDMQ9JryDnkCTWZhh4Jsr0C220lLPDsn7wUGQyPkQZlcN30Q85jnAxQg47S8f7D/Zjj9Gi8lRRBe6rTLrlIeqe76sMfupsKuwe8FarLuSiltIemHzcDLVXHwjwTQ4oWYrIJtbaJcpLNfgwslDEtMzYN1xf8RpdtH4d42yA== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 49251986-e1e3-4954-565c-08d9edf2c176 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:53.4980 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 11/17] avcodec/ituh263dec: Make initializing VLCs thread-safe 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: K3QUnX2f/x67 This automatically makes the FLV, H.263, H.263+, Intel H.263, MPEG-4, RealVideo 1.0 and RealVideo 2.0 decoders init-threadsafe. Signed-off-by: Andreas Rheinhardt --- libavcodec/flvdec.c | 3 ++- libavcodec/h263dec.c | 6 ++++-- libavcodec/intelh263dec.c | 3 ++- libavcodec/ituh263dec.c | 15 ++++++++------- libavcodec/mpeg4videodec.c | 3 ++- libavcodec/rv10.c | 2 ++ 6 files changed, 20 insertions(+), 12 deletions(-) diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c index 2bd86b5b47..587cbb3ca5 100644 --- a/libavcodec/flvdec.c +++ b/libavcodec/flvdec.c @@ -122,7 +122,8 @@ const AVCodec ff_flv_decoder = { .close = ff_h263_decode_end, .decode = ff_h263_decode_frame, .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, .max_lowres = 3, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 3466027286..27f9c2932c 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -772,7 +772,8 @@ const AVCodec ff_h263_decoder = { AV_CODEC_CAP_TRUNCATED | #endif AV_CODEC_CAP_DELAY, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, .flush = ff_mpeg_flush, .max_lowres = 3, .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, @@ -793,7 +794,8 @@ const AVCodec ff_h263p_decoder = { AV_CODEC_CAP_TRUNCATED | #endif AV_CODEC_CAP_DELAY, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, .flush = ff_mpeg_flush, .max_lowres = 3, .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, diff --git a/libavcodec/intelh263dec.c b/libavcodec/intelh263dec.c index 9dde247298..b0009f00d7 100644 --- a/libavcodec/intelh263dec.c +++ b/libavcodec/intelh263dec.c @@ -138,7 +138,8 @@ const AVCodec ff_h263i_decoder = { .close = ff_h263_decode_end, .decode = ff_h263_decode_frame, .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 445d5f3f36..6fa5249569 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -35,6 +35,7 @@ #include "libavutil/internal.h" #include "libavutil/mathematics.h" #include "libavutil/mem_internal.h" +#include "libavutil/thread.h" #include "avcodec.h" #include "mpegvideo.h" #include "h263.h" @@ -104,12 +105,8 @@ static VLC cbpc_b_vlc; /* init vlcs */ -/* XXX: find a better solution to handle static init */ -av_cold void ff_h263_decode_init_vlc(void) +static av_cold void h263_decode_init_vlc(void) { - static volatile int done = 0; - - if (!done) { INIT_VLC_STATIC(&ff_h263_intra_MCBPC_vlc, INTRA_MCBPC_VLC_BITS, 9, ff_h263_intra_MCBPC_bits, 1, 1, ff_h263_intra_MCBPC_code, 1, 1, 72); @@ -131,8 +128,12 @@ av_cold void ff_h263_decode_init_vlc(void) INIT_VLC_STATIC(&cbpc_b_vlc, CBPC_B_VLC_BITS, 4, &ff_cbpc_b_tab[0][1], 2, 1, &ff_cbpc_b_tab[0][0], 2, 1, 8); - done = 1; - } +} + +av_cold void ff_h263_decode_init_vlc(void) +{ + static AVOnce init_static_once = AV_ONCE_INIT; + ff_thread_once(&init_static_once, h263_decode_init_vlc); } int ff_h263_decode_mba(MpegEncContext *s) diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 655be5697d..432d3c418c 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -3672,7 +3672,8 @@ const AVCodec ff_mpeg4_decoder = { AV_CODEC_CAP_TRUNCATED | #endif AV_CODEC_CAP_DELAY | AV_CODEC_CAP_FRAME_THREADS, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_ALLOCATE_PROGRESS, .flush = ff_mpeg_flush, .max_lowres = 3, diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 4dfaa3460d..34f9dbf80a 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -690,6 +690,7 @@ const AVCodec ff_rv10_decoder = { .close = rv10_decode_end, .decode = rv10_decode_frame, .capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, .max_lowres = 3, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, @@ -707,6 +708,7 @@ const AVCodec ff_rv20_decoder = { .close = rv10_decode_end, .decode = rv10_decode_frame, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, .flush = ff_mpeg_flush, .max_lowres = 3, .pix_fmts = (const enum AVPixelFormat[]) { From patchwork Sat Feb 12 06:41:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34249 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855817nkb; Fri, 11 Feb 2022 22:43:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyt3WsnXaUyCKHi9WVefj0Bs42jWzsc2oMeKASX4VjHrPxgczvnxiIFnlWyF0Mpep1J6Hf/ X-Received: by 2002:a05:6402:2945:: with SMTP id ed5mr1788340edb.72.1644648186407; Fri, 11 Feb 2022 22:43:06 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id c20si16911753ejj.420.2022.02.11.22.43.06; Fri, 11 Feb 2022 22:43:06 -0800 (PST) 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=MSmKjtFI; 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 9001468B2B5; Sat, 12 Feb 2022 08:42:08 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 398F668B256 for ; Sat, 12 Feb 2022 08:42:03 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Sy29+c0RWSkrx5Kd2Ei4wtdP8IW3lQha2fabc7UMRfPG0aNpDq+m32Mrswfh8ozkqBFJrS/BQF6GLXyGKc0xFVyc2RNjgtVZkW1FypF1iCTDBqKVC5xZ9F7BLVTOzLdkztCcn1hlExlDUoYLKfChtQ204BhCtbSUDseXfEMgnRsNsSle9ucYh5TCah4r2UhFWjvSCLS71dXYlfkm6Za0zSW5hmYBQMv5dzPikcc9rk5kBXeZsfj1ehKKhAkKfrxnSuMti7bXR8iCmqZKR7xAkPOzgH7W2WjOVhnTB6yK2aJPcjSgm8xEgyLHGntO76/pI5JRwtLBAx/50QPSEApBEQ== 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=giQWwhil2II949UeGmJnoqwYClh04PGpmWeDtK/LD1g=; b=AtcFVjUqcvk1GT7JPO/jt/noJYVgLyIL6aVxSEY3IcklK3XvCeRB9PCj0UUrcbBgsrgqCIZONALg0TxO/eJg4C5I8E461Nrtxs9hdP+HJ0zCUWx4HWOCoggRJAVJv8gtVAmYt8hnErjzqABuPHaN05FETYZakYPftbHb85kwdi3mun2107lnrkYbJ7Qt6jBXRSzzs3TmMshENqX/lJGtSWr9ZxAPAYgD3F1TkyK0xeefI3yXV+2ncU80uu9Xn/kaZoDiMotJYh6wN0Nb3M7As0muplcsShvb+joSX7WdVRR14UcJsYazGflCM4+69WzdvJVFGq+TUx6lZ5eOt5kmlA== 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=giQWwhil2II949UeGmJnoqwYClh04PGpmWeDtK/LD1g=; b=MSmKjtFIzX8mQF76E7eimy2QCrIeGZK8PWU1wH+VBBRWJMv7WqTqggstPUw5/rTg4aHoHlhA2af0vKzJqT8rBUAiraiLIl1UuDyHlHu8o5eAlEYF2TOz6t1p+cxf+iKYAhV+NlE4eI/J72CO2mbKqroYUf/d2+Pk42gSkGfL3s5CSzYtkccBmoXWZidBfxk2hxB404vbUua7tKWJag83Cc0qgxTthAsftJg7erQgUZ9NvrmuT6ffe0iGVpj/lS/9la9q8rOqpky/lnyceErfdWEZ964/pqPxeMeU5WVNCBtR3YVx1QzF3ryI8M1Lh91qWyK20eaz0hEihE++6UyRqQ== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:54 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:54 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:26 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [rLTqbhelyKU15gsgncCBj/FoAc9boN1/] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-11-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: dea18398-3a3f-4754-bf93-08d9edf2c207 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlYcuYi20bumQOaeZX4+luwK/f7ObAyaQbCgMQbMhybKkUEEp2BiLGRW4me4ogRTQT7s4bbMaDSa0mKpOVDpQxACVOk3lcgy8YqvwNTnmc4xbKmydjC9A6WyFE9XMIUZUMxeGR4/6lqp8zA/eqm1Ky9SWNfR8okcOgha+Wc62GUBngiwvHz9TnyZX0TsNsd05pJAhpx9nJGZD2rqaHmqdK4G4iMAUvrfLoWYPPTKFW9pfcKmfiizppWUd4z9Wdte9BoxSAO0t4sNPqp5lL3V/Gimo+r34GyB6ChoswjsmhohkvgDoFJ8dA3htiX5bB8z8Poios9Do0mLTJbRh6HMqWf6glp8TjEVy3dZUHJKSrgMHLVboeXXG93gRsTEaE3GTP1NFr140Wf3GS6yGnY8JjHClCwlrHBAco6IktvF5k/I6uYgMLsj3QfNeGuLBg2VP5vXii7vD+d5lWdiw0itwE0OBZZJoD73mhtBRYi2WLt7IKsDSLriMXnYueK93LJ3lkex88USvyPS9h5NJuA+gZUyMhZkh+loV+MTQH+GGDTmqg2J5jhCIyMTZHuvVqNDEAtHQgxXq0DQ+vif6xSgOg2nvhtf7XQQa3LKIv7fXw/L0rYnivdmuzWOIkV98qwAmR8A/iYn1RN1heP+nXbq9kKcgPAgOGYheF6CK5icfALIxPsYuPIFVPeXgJkU4aNBmdyvUvZ+N7p3zG9sEvy8Znr5D36LKRICQPhprRm9RK4SI= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: X22QHKMhIVgi/iMgw5xcQd+Rmord/rHoDvXSiVRufh3lrBDq1etie41lhX64yze5+LgLaaegfXl2/VYS9OiGk80PZHxr+TAmKMRWD7Ak+eg09U5LZET1FstJOMVttKSWQx5Y1fhFKJGOlTNGhugCiOWIKFjqFqQv2i9FTLFHlNhkZe7S6t9HANagIO6pKQzLTKJQK09OJvc5mjHB0cvs32VqX4ixoJqecgwR6sGiot1SID478dq+YH4rhNOgLoz2hFyUv3v/EyWG6dC4FmgaOcZizpZ57XDRTDZyqfKujU+w/XoTJN3vWiENDsv1dchxHa8ut5VclDiZgwvfLrGNWY/c4OZcfqtiWx4y8poQJRQRu+D78Cg9T605T7m6yQlfdii9egB5brvFieK+GTzKIehCwKOdtQ9umBmsTAZmbNWIgEeereiPzLo7Jkyzp7peBLLfFLzbtHBUD1ivsjE+Zx1iZMUlR1ik+XiKm7R3Gq0DgEGL+9Db0UmRH0FAKhYxwQLsqFBIE4wdyUuVzfFe7XtAA+zeEAaTyUO1eAYhV+KOs1KZLeKJN5t9idbtnWxvhDQxWIeBXfvMX7Ww+nz4fw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dLtZRcoJcdp1tToKCkOoVdmA3J++7hvpScwjrxiJrxEzrD3MXBXNmwBdE4LJLwbcwfu/uaY4P2pMRJ8blecDXMjv3vMxiCVZnC6JnQ5/m8KnLlpFU7LVnVNQNWgVE3IUAwTUnN/1wb/dDpr3rgc9SUOpTqyM7IxPwmeYbr0J6zeo05RLKVWQz6m7zOIKAHD4XCt1QukSbVmEsEkZQ1GcXivuVnCXZ7oibiRrZpP0mKbfgtuhfHgAKfQ+W/Ab1Ty5lNmewqamcr7WCkWHieFm9Kp4EHEOYG7zH8K5zXWz72Hqr2gjssTPSJoHpRBtuc43x0/UEYCnrQkqKdvwEEYAROA4zdT14ZYBbMUhgUlAN7QU+EZVvwk6ybwNPNBfWJnKWfJlz33Vm7eY+PTshsblHs3MnxnAjLHSh64Z5ai7sG2Rr4oR2ZGlrOj/5h1NTyhx6qRxzsu5cstXjS1FGfIucCenMFtohOMtHN5oCVrjIJ5UubB2zkloOBmXLMRsGGft7EYipxMGNrV0sCkjJa6EkRd+QHGER6b6LXkYnAmFBOGUYKvB6NXdjxQBKbT9Vz5VNWK2bBJDa56VL3tWpeGmFLtu7YbXk8warkzeqCMetZ6QLqde/bfNNa/xbqEVqiKEQ+zG+ecUeogZ0duH8drmIZRkf0xo2jaB5IciaCEoJyOLKtZVbV9jY9AjAsEc6SCEMxzVwiPiVu6Nrh1VHTENGF/XAC+4fDHm9cPZlD+9woJSI/TkJiSerFupAYcPndjgGWHNwiYZctpISyHdbdKyLk+yxVuTv7jj+31goXuVymAUw5uFL2aiwtilSbFjrko8tDTqc3S7aay9Fexuxz5gl/nlBQAQ9CIkQa9/29qRYQKVEEG4jK6tQc7DpESogNNVU9oRHAaBCECnmk4d9GgCjUcXYf9A3edWKfCMRbSUat+3MoKicDRGbMQMSyOXwEgh/qQzg2AAtrzSaUYoh/e5jQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: dea18398-3a3f-4754-bf93-08d9edf2c207 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:54.4510 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 12/17] avcodec/ituh263dec: Reindent after the last commit 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: DAG10ZtGcMmQ Signed-off-by: Andreas Rheinhardt --- libavcodec/ituh263dec.c | 42 ++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 6fa5249569..c141888003 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -107,27 +107,27 @@ static VLC cbpc_b_vlc; static av_cold void h263_decode_init_vlc(void) { - INIT_VLC_STATIC(&ff_h263_intra_MCBPC_vlc, INTRA_MCBPC_VLC_BITS, 9, - ff_h263_intra_MCBPC_bits, 1, 1, - ff_h263_intra_MCBPC_code, 1, 1, 72); - INIT_VLC_STATIC(&ff_h263_inter_MCBPC_vlc, INTER_MCBPC_VLC_BITS, 28, - ff_h263_inter_MCBPC_bits, 1, 1, - ff_h263_inter_MCBPC_code, 1, 1, 198); - INIT_VLC_STATIC(&ff_h263_cbpy_vlc, CBPY_VLC_BITS, 16, - &ff_h263_cbpy_tab[0][1], 2, 1, - &ff_h263_cbpy_tab[0][0], 2, 1, 64); - INIT_VLC_STATIC(&ff_h263_mv_vlc, H263_MV_VLC_BITS, 33, - &ff_mvtab[0][1], 2, 1, - &ff_mvtab[0][0], 2, 1, 538); - ff_h263_init_rl_inter(); - INIT_VLC_RL(ff_h263_rl_inter, 554); - INIT_FIRST_VLC_RL(ff_rl_intra_aic, 554); - INIT_VLC_STATIC(&h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15, - &ff_h263_mbtype_b_tab[0][1], 2, 1, - &ff_h263_mbtype_b_tab[0][0], 2, 1, 80); - INIT_VLC_STATIC(&cbpc_b_vlc, CBPC_B_VLC_BITS, 4, - &ff_cbpc_b_tab[0][1], 2, 1, - &ff_cbpc_b_tab[0][0], 2, 1, 8); + INIT_VLC_STATIC(&ff_h263_intra_MCBPC_vlc, INTRA_MCBPC_VLC_BITS, 9, + ff_h263_intra_MCBPC_bits, 1, 1, + ff_h263_intra_MCBPC_code, 1, 1, 72); + INIT_VLC_STATIC(&ff_h263_inter_MCBPC_vlc, INTER_MCBPC_VLC_BITS, 28, + ff_h263_inter_MCBPC_bits, 1, 1, + ff_h263_inter_MCBPC_code, 1, 1, 198); + INIT_VLC_STATIC(&ff_h263_cbpy_vlc, CBPY_VLC_BITS, 16, + &ff_h263_cbpy_tab[0][1], 2, 1, + &ff_h263_cbpy_tab[0][0], 2, 1, 64); + INIT_VLC_STATIC(&ff_h263_mv_vlc, H263_MV_VLC_BITS, 33, + &ff_mvtab[0][1], 2, 1, + &ff_mvtab[0][0], 2, 1, 538); + ff_h263_init_rl_inter(); + INIT_VLC_RL(ff_h263_rl_inter, 554); + INIT_FIRST_VLC_RL(ff_rl_intra_aic, 554); + INIT_VLC_STATIC(&h263_mbtype_b_vlc, H263_MBTYPE_B_VLC_BITS, 15, + &ff_h263_mbtype_b_tab[0][1], 2, 1, + &ff_h263_mbtype_b_tab[0][0], 2, 1, 80); + INIT_VLC_STATIC(&cbpc_b_vlc, CBPC_B_VLC_BITS, 4, + &ff_cbpc_b_tab[0][1], 2, 1, + &ff_cbpc_b_tab[0][0], 2, 1, 8); } av_cold void ff_h263_decode_init_vlc(void) From patchwork Sat Feb 12 06:41:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34250 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855880nkb; Fri, 11 Feb 2022 22:43:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwqBOz1A/dCWz7TUnUxfzYxewSivVfkF+aoqYZuL42Kg1OMOnX+hd2oG6ZpafmS7EcnKJRN X-Received: by 2002:a17:907:9605:: with SMTP id gb5mr4335065ejc.490.1644648194998; Fri, 11 Feb 2022 22:43:14 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g19si7149657edu.120.2022.02.11.22.43.14; Fri, 11 Feb 2022 22:43:14 -0800 (PST) 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=NrbN6nDy; 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 7342068B28E; Sat, 12 Feb 2022 08:42:09 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5A60368B1BA for ; Sat, 12 Feb 2022 08:42:03 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i/RcUckyr0N+LRod1yYz12ZFdn+28VDH6ADbphFDPFn90i7iDyz+PIaVasYlX1AE8ouAM8gy7EfFZgfdIW7vhgP8VH7/jCUardLZ3MeXGu/JX9xhfTeDEUFaJFuzDOldweCdWBSMZM39ajP3IdT++disxZE1LxUGN4vi4jcUtAcFTiuOa/3FuKIsPyHREE0BxZcCEQCdnrANq+8CrE6WIM5ojZdwITtQat2sb/r9QDyY72ob9NJ0aP5/V7ABSHRPV06nik9NmDTCmyWacaquQOWrnskVLPbl4Au02LCMOeTzELl4/Bm3Sm2ESInduWoZGENp/dF9P0JI7kSod8TjPA== 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=fm1P09Yfx3RUq2IRUOneDB+2+Jn23yEQ0izuJhnjFoQ=; b=flD43aChMrWVoKIP93uPhFl/Qh/IRno67jOKL1eA/VZY2vr5QwiECqPZWztTpz7k60rq3CHtWgw9SyiYx4JuSymsfIsqyHXlGvXQ7L2ohkOE7Vx2bVHlYgNmRGnJCT3+iHaeEWCe9h0t+AGJzwp9vgf/M1f3gctsWBiVk8Bz+ifWkwFNlsZsyWaE62dhe7eY3whKo9rDP2ngiIlIKotIitXT2qioUzxQZ0qHjtrpQgXqH1L45PzskkukRVh1x0tSOgbQ8YD0ugr/x/d0Dz2CEapSzK7EwK0kOWBId76ZJ1HlR2k5UuzKuHyvqhanN1CAe4tSgLLn2Vtlz5xjC/otxA== 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=fm1P09Yfx3RUq2IRUOneDB+2+Jn23yEQ0izuJhnjFoQ=; b=NrbN6nDyClqNjPgaXH5R3SP5WJE3/dWUX7deHLmCDPlmGAXxa+a2iTdzPaWWidyYMOepeGvjksmMf/cpmJCNxw1r6CXrff5/kbWkpt+Wj1KrCqnzRJF+9zYiFswz7z+SLeFeQYEhtdrmqCc0MXTVlfm67qNDTuR3IIlFxokCms0bWcPRHmAz0iFLA3VKpKS0OsjaHZClbpwTOJZpOmiHtH6YlZUn/XOoebvb9EXDUBTiZry1tyd4vg23Am3e8L9LT8a53dxSepRmkzNGEqxKf/X/mBXSI2GQ45YMTa1/Ci3fQMOWGu6tkghYUQGxAMlRCuzG2hjBVpnw+0xQ+m6u9A== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:55 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:55 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:27 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [Rfi8kjk4N6Kk2uokeuAD+9Is3jmApPL/] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-12-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6fccf968-cb30-47b4-fd40-08d9edf2c2ae X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlA1cCWdadoNhRyqCP6yxpT7ZPgT+YCZJMmj+rJY8PE7FRpD70H2NZLCiBXcQLyaDdrSFU24vM5JuTy4OXhVgf/xANqLNhOLae5ndx2bxFB18WPJjdIZ41DwCSQO0sjxnYOccgOPWK8rb02+72CjfmNCNLpJ0QFQklyrVPEphob4NWnC5qWmG0AgGwS1DOlAvKkGPRiDSnzQ1V4AayYxy2hRaWPAP8g0ar02sPolcvNDoBJdLan3GZ+T1/I+fREZGFWhd8WgLP2ZsBMiCLxgZm+ywG0kd7sJawLWnS/5iIqKTSprKcxUKa2U4SiB6XkoAjMgKKPh7d6AzTw6l8SE/gyWG5Y8unyp+IUu0iTD09KrL5y8hrePWohzc4+AOf9DxOyczF3qG829w+Ht4dwQedeNpJZBrWffk3Xa/TdG4qaXIZVcowYEbCSgjOBSOVeNvWOiS8ss1xoZkvoH3pHBwhO0WtEQr6aQmCqZQ94DjfR/9//1QXXrL1/il67Q3cwnn+Cn5zrzOTzG3SttEgSCeDTHctw4jRVi8pXWtxUJNzc5w/nRE1t1t2L/l5MXiV2RTbAyAZ5MwU9QANBGuxTKEWltSCj+QfprvVeyymQWi5rHuo0ZXAqASVrdQSUJN63Jb3Dh71RXhYNe9UPiFT3YVootDBWF1O0Rjb86xLRV2v1/izFMECl12WDDQEZC0W4I4Ud2AA7pMr/7Qapc7EVBxpAqDryG5OVfVY2vybWKtj8LE= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4oXggtTG/WO15uD7IoHFNQlgRd6B3EFywxSthmuFRl7qb3agIga3E6bR6qGNg06nEhvnOhhKb7gnc0n/1pQ1NwbSGei2nP93j8M0yg1kQXxEDpqDhaCbm/2cqdwP1ve45KHsKr4pUvzMWpFv+zurG8GLDZNg3riZl1OIRvGLNfcLNRbWkNfA54Umb/hPhRmXeXjqjlQuzd6ZEG4pk9YvFcWXMBMCsefljZfnBr8GJICnwmwwOCRDAS4tt7rFLDls7p5L5buC7/JDUpOeN+u9SJt6FKxzJhT8jmJGDSe6gQnbMDfAFnJThoU+tSs/ZuV8QVZzh9pQS0pvDnFzAZJIMQu4qXCEk5lMrIQW57QNjmkDAvPbFNoZpKIOIXGPJ6kNNMPvKX2kIqDCj7oU4fW8LFzH7ccf/sav4A2HPledKv6lsyxh0LYeuzyHmy1f1X1QdpcXxdbnWnFh7CKetdk6KqRSW50C6m2a+Dg2i97KbV3IUsZtOKBwWm87mezr+Jz0BlrucIZSwfNHrlQWEsFVUoTJxmdWYCAXBRqy23GDR0Cvz/g10ZqQ4xsfnx7WFsF8PBp0QKel15O6QLX85W2Cuw== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vnX17UVJdd2/6Vbmf+RSOYS48NYACg8RBHfO/1HO9BJZa6tid0sCos+i6ElOlFkGYfn/VSIL06fAFqRSi7LkCL9sWPgid95b5GGbfnyP70ZyHsDSf1RYxddVwGFtCJsGMeClFJpABAs8DrxKieIjr3EQOoislwoatlCMmKRuZaubhVlAx9pRa9TbDnDhmGLz2VAT4dcfeTBwIXrAniQZ0y/KHRox46IKlQtdk62f5t56G+GgXSNdh0Y6nwP8wLdaXLuQcVTirUlbGJE4W8Yv6KUCrGyJU7lt03QlKmvN4W4r0LDUanecbp6w9jzp59lwjUSnXrU+oQjMVm22hYFMM6L+0TsF5TDjfcmxf2WEI5leFcEnDB3jpdzCshOnLQx6k6d7XkK3rEUapIV5c216pbTm8NBxKGCfHWtZYXnD0zp4jnMFabayJmUXuGN+Asx6F6hAl9iLajS/EzI/Z9p0l3yaxYOLINPsHDS+gzoQ7sYmMQOAtUJXCvNKDM90gzyf1wQm+D6uVi6omV3+ZD1jEVB7IZ37SKOwUOG5SDKJ99zJ5iIHgxymfz4KfPTOHofGzcTWJQlYs18xbELBpXiskfcn94erEYiU5qsXM2KyfSLR1nXrYih/nypQJ31Gw8pz0y3J7HKEAA4TuTOvcyss+W0BAletID9xAI3jLzRyWM5X+Nv+RJl0VY3q5za9kADkdB8UtZXU+NooRYomkLz1KV5uwuptAXCqeU3sfluMoj9aW/4YS9DJ8ZW7TL78KrUuKDvg+MlcWzsWSe61mbb38VBIvAU0v0nuyDzf1YUE8Y1F2ISC7GCrhA2jppHmt0E7fyQ/LtuxCHK3V0hpNzzVsu91bGudXUmGQGMxo98IfjfnKji7SgCdls2ozsXJuYrQJ33ve/vwHCMUin4AimRqzOvvemF6OkKmqSg4M3FIajYIVlBuoCOrDdSlBkr8Ejqp2dlmKW8SSr/GxQaju4sLFQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6fccf968-cb30-47b4-fd40-08d9edf2c2ae X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:55.5939 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 13/17] avcodec/exr: Mark decoder as init-threadsafe 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: cqey/GC03Dp/ This decoder does not initialize any static data in its init function. Signed-off-by: Andreas Rheinhardt --- libavcodec/exr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 8b04fab951..fc32ef1dde 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -2351,5 +2351,6 @@ const AVCodec ff_exr_decoder = { .decode = decode_frame, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, .priv_class = &exr_class, }; From patchwork Sat Feb 12 06:41:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34251 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855946nkb; Fri, 11 Feb 2022 22:43:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZj7H61D+5KbpE0TeAUaLBqCffChNHr4iuw8u2c7j+Z6m7jlKrK9/0s4X7Ilka5upH27VY X-Received: by 2002:a17:906:e20c:: with SMTP id gf12mr3946442ejb.691.1644648204527; Fri, 11 Feb 2022 22:43:24 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id js12si18216098ejc.118.2022.02.11.22.43.23; Fri, 11 Feb 2022 22:43:24 -0800 (PST) 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=r1l1AEsa; 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 8466D68B2BC; Sat, 12 Feb 2022 08:42:10 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7B24668B256 for ; Sat, 12 Feb 2022 08:42:03 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WzI2VGv+s0J4ap3aKBjdr9+yuK5OPPA+09MIZIFoukRnbGHfrzBuEGi2GiSjutgfWMw75mEAMnh7d23VTE7gn7LW203FN/14LyxDicAxZ3saOh5hNxPpsXwYSyTBYnIqK6MLDSujPQ2t/pzdpdRsiUbCTQYXQTcCBj5R2j4Qc4CTiqEJF7jhqfqSArdJop5jNNWQuesAPF2LYv94llnXWWxi7jyUO74iyOvYBW69Ry4K97x8ain2N5gfPfCBV6WPa+1qXVYWEOv2yQR0k3v1w3UQm4A5IABFIuqc8srC5Ta36ij48c5S/zXJnO535ZX8ACJZJbgoqltHCOhQ10oh8A== 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=9LI5AnHQ7zhlwXgJ30WG1+V4VBSFh8FenXDfjkh+T7w=; b=DMaawwK+kWK+3nSYDTLJB5cNfzlsADrnqD2W9ozt0cR1jbiHrh0/FzP0NWc81LsnUGqGpgQK/jI2NS5dI+ke1gUz/MG+cPMohZf67hVCwucP3nbRRN1LrT7UQdxrD7NNu3zuTDi2AHDzv59YvKPzy3hs3++t5AgdmgouMPgGd0a0y8AxcJo5iQZik5Ih8KBeEaAAplQ+t/ekmrKF1soBuektS0zAEF10e0gEdzL722HhfGj9Z9RUiydH4VdIH63y+xQkZjLphyDaH0MQc55CyYfHUrT9DvjsnV5h1WCqTBz0PwF0aLKGCauDqJZbYkv9cFyuTAQogQPgRudp3MRtqA== 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=9LI5AnHQ7zhlwXgJ30WG1+V4VBSFh8FenXDfjkh+T7w=; b=r1l1AEsaf9cOO/n0W6mJM9es+imUw005Y3gusbDjVyldwanVUaRsvs2yfH4BbUg7UVRX1xI/suE3oEHK61Rnab2iOrbwsK6pYZnZzQwbqVhrKlhufiaadV7GW+QnOi/2/Fw0Gqy2GGeVJjyaL1LOE37aLghphIyTwc+WTJfL/+dXJlSV5ukCmndurSViiUwDiEPlC5rEzUTjQhrfVlTxeBQ8ABqRkWMJfYuwVRnXDs7TJ2zCNDW2EYhB2IrDmo9n7OwU4ZACx3jEBLF+/vkGsiYTHRkQOF4AyggeGL2xUUuE1D/f0nu0CRw2zqHnZOnIAoMcEqCXeoKDeaw2SXKCKw== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:56 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:56 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:28 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [tGO9v5i6v3Jx1enkewCEs9wCEeXPr+Zc] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-13-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 11e28cd3-3f8a-472c-edce-08d9edf2c349 X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlB/zKPCVY+C3DMSZm2xjp46sxzPufur+q6jtOclxPrVeTpG2y8/qC0yzp/LBMK+KDvFsZVAad6XSTRwuAzgFePx+QcrtOHS0Dp/cTbtUsxMWryw0cedK3OT81lnmRPmZRLZiB3dKSfddMoIgAGbI2jRnXeKXgivWXPLCmNIbc4ftArwihFqpfE7G2SAAkPgRJM5Lp2D7J8TDUkqycCXUBfTtlgF5xRxIPN3KYv+1sxpy+Hm8jh/PVtoivZNGY5T2zKD4wZDWM5+LTgVxuZMN/ibw+OtnUEWoLDqQhHxw/zchaM+nTG1/7iugqKasdRprFgorv5kYOhnAgE2Z1KngpMgxzw3Rv9kvU10O6vnGKL0L7xcJvw0PIjI/GKEsljzvvqtM3yBcTKlyefntses1e4g0ikKKoOyOSSZF/d/Q8kEJ5lSmY0XVMqV0qcboRY72hWGAn2sw7pXSrjGtSultFbrxwN3jRWUP7iiLJSmS2UY4Rwqfsx2wNhkWoXK0hcO6AJAfQ3LRdZ3yDfyDtuNJLZNCIARdFMO2eAlO3VjCcdS2SymlaLcAlv700zzZCW4QgqDd2qj163/KdohpCoLAALJRpFGMAe658yTg//Yn5KDC92PZ8os6vYdiw70mfPz045+1a58qiucQmx7JWlZ/3tT/WAZI7RwOw7an3GfnCgC/xld5qsxLL9Oi9zhAgU45+6ZFpkh0bxFSoHjZfYaeDVKCrkFCW55pKMsU7cIIHQto= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rvjTBlrJXcg5tap8Fq9DRmGfewtHaqLimgepG9C+CupaU+PqVPn/80KviqGsd/W3jn4XDutxX+OkK03CrEYCiQuPSQyWIy6bmnPsUKRYuHdE++PwmX7EKHjumY7wbhIZU0ptGeNbeWRz3Da7ldXbEKJuTTe7MN6zBdmcw6WUVZa/KHM15+M140vXlPJS+zL5mFY11cBrxBnHkKwRt0uar2HHCQJ9RpMPnQu1nDeVgbkquUAf5eRlcwlsbKa9HSfPsm7XsM0F0+gXSJVZHAiybRIYGnUhgN3/sC6+hxozyJel8zrzDHJH77owQhnTPEdlEr0t7PHENiBNofFX3yj05t8jrYcesNGdWYTvCfFp3Y1ThPinCHW++p0IzwS9RvPNf50J6WUrIS1YFMV2Rgehch9/8eAHrqtRfhzknaZIL43U8BwXpL77EDkY+ugkYCxT3cA/etXcNNo0iHFP+EpUs0yFq5ba7rd2/Mxa8wEeVsRY6GU2EjF0IDxkFUzUt0yjZtXQJXR4W2Vt8HLBjaZQQwfJCZj4S2+oEz5Gk/Mu+45uYq9pCXOfim4UDWopf3gK6n/EforODVlGON2CrqNebg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +hic5wcZqkBAGXrLfByXsI+t/GAPFLb0omD9fjp7TNyR0PsjKHiHeqzP/X1VqpyGvD2/8IsJXM8SuW8M0j7vVU32rOCqW/0pl7+vZdmoNFByK2JtZgvdHScJteHsjoA9ljEqIeWUp52M7n3gRs+0IYtN+WnPL4s9FJXzE+N3DtTRDV9frbLqnPEFvl0FrlsFg75qpDrISgc6moav3YwHCPTzxyEg4ZK0On9zGyOOglQMQfE+4l/vaGKP8G9IaP2HI/+Llaju0+5KWU/9zB5DBF1oclb+BgyApYuGfhNkYPok4UqNi3ZFO4gDLlOYjlXWI7YQqU+8VpyGhGcR14WrJyoUQQkunY+VdMllsoiPDwrerZBitT+0xizCK6Saw5DyY7vvNJiA0TukEvMF8zqWaHx+Sxv0xxLEZQHm1Umb3nuyDH01CJd8yFo21CjrIaRKW4dBwhDSeNof7iWlS2W75bFDIHWRulPWy/t1RNrf0NVivCofpw5yMSaMciYmpoVPHm6JNOoZhbFDBIMPLHfmD4atfSk6BSGSjV3gXBgxTnrXWE2WCGngKVl2j6/bJElLCHSg6+nuBAonp4wQg9uo9U6qV8/miLHE0D2nOycCtTzPPmWHArxeI6NLCsgpWuGjrP6E6Uzj6tJcl4yW/aa5VGxGBTdoBCUWaw2EAk8MESVtcijKwmabiZylSDYunwCSyZd+LOOUR7SfPnEiPFvKseeuLATR9UeomMrHp8+C5KHVZ5/XaifR9lPBhJaQZp2QOGenUoPmHjJwv1puPHiEgGuzl47ZKlWeDLr60iqIE7l02NJMOahF1Qo90rnwJddV3al/AlQn2Yaive492kFuSvpbDABqaHLI+PXyQLYZqzyCB4PxcPaTql+WeukXdtJ0f2W2xwP5X0luFlebLeMC1bXHGX5g6t9r8mKNjvbbUH7nIMy/WTqF4/t17Ov3wOGcKjDGjX7AsPFVyiwgAa2BzQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 11e28cd3-3f8a-472c-edce-08d9edf2c349 X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:56.5468 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 14/17] avcodec/vorbisdec: Mark decoder as init-threadsafe 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: lRurVSbRtYNF It does not modify any static data in its init function. Signed-off-by: Andreas Rheinhardt --- libavcodec/vorbisdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 6e07bc5a8a..be4ac055e0 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1891,7 +1891,7 @@ const AVCodec ff_vorbis_decoder = { .decode = vorbis_decode_frame, .flush = vorbis_decode_flush, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .channel_layouts = ff_vorbis_channel_layouts, .sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, From patchwork Sat Feb 12 06:41:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34252 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3855980nkb; Fri, 11 Feb 2022 22:43:33 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLf9SvtO0lQ9XN8u2xq38e6RH8Qyx4mHLi1U/EEImFnL9sNTPYar7cnfAfEmDqMJWuzLWN X-Received: by 2002:a17:906:880f:: with SMTP id zh15mr3900737ejb.709.1644648213057; Fri, 11 Feb 2022 22:43:33 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hb7si17733558ejc.437.2022.02.11.22.43.32; Fri, 11 Feb 2022 22:43:33 -0800 (PST) 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="aaGHlLq/"; 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 814BA68B2BD; Sat, 12 Feb 2022 08:42:11 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9BABD68B28B for ; Sat, 12 Feb 2022 08:42:03 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L4cbL232Z+zhfGbDsn7xhOCC92OrEuRadkaci6v3iT83tplNE0BmnRX+Oi10SwpCq+s1nIJh4l9AcN5sqIaEDEb0j3gRYG6IfXeIIuUNHB77VePBSd78Rj5psoaYxJ8r+LpVGo4HuIyjEWDWjgh6WNtnxGdtwwac2IEIpu0NYsKd1x3WooyVjV5a5/DWas2hLxR4vozxhmdWOI59YgvspaGlO+rU5efyxabRJOFnA7HjcrhEDxiOB9EVWatt3Ka6+NKh5MkbfwgliQT5obAl9ej4FdfFgsOzFfISYOl5rDS4YzZ+u5aplbZ0V+xVFGQB+CsGsiy3Lv6+SKCFZU8yyA== 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=Hl67cXDC7TNSYT9GIdKuP2qwMLTavXltF+u0BFI3tfg=; b=ACBA/E1jsG9faeoOdmnyLVTACWftRwsAYUcoKQ0PQ7POhoZ3uU1yWRy7X1rPpvQx6D6w7bWsQS6laXaOQnw1bmU49olU8RvfK1yde21WMdfwwirwiTHU041R1oYs4XzBSA9At6fKglTfjF1lQW5F1F+f9TRCglsKt0vev0cNCR9sXXUl1BWI10WLoDUEOBg9i7WzHouBH4942fbnwz1j4JR1CerPOFgCYTvUlW2EXrWuZJIXy0YTha/yra322tivvZtQEtjf5iO3zpZh5PhaK931NwA2p78LYPm5cJcV/O9lyzFe0UndisXC4/KGJzMOYbuH4GBoz/Ys0cAErBkCpw== 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=Hl67cXDC7TNSYT9GIdKuP2qwMLTavXltF+u0BFI3tfg=; b=aaGHlLq/TWKllwszhApEawJg7lj/BpI1Rvv1K5N/rGhbDcRmWgX+5KopBEvC+aU05kAOVsME5aHQt5aMU1AXCgJhRDiioDua8uNOwuss0GAMANTdk4mP8rJ46ixW7x+vB+hsvdFouX8hs+uLGp1/EdMxXFYoTGYAuHV0FnIVwCgdr1467kYaTDtZ4dSic6Rpsabky3FnnqiXmvkwkWDmSoTxicQVT+Ys5L40yMukZ9jIA3/x1YCOLbPDc2VgO/5qsqFBv1qn1BEjxd787+W4ll/eurLGaSEAg9XwikoAUrQda4ICtmeJiPaj4to2ZZSnmcX6roQfV2xAYbYVuSDBAg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:57 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:57 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:29 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [t3hOPh/9T8i2pPnkkd0MfCAvIuJwHvNi] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-14-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d3396511-81a8-4aa1-6298-08d9edf2c3db X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNUp0/JksszMwZGXS7aFQs58Yflif83JrBe4ARLpJ6CmFsVjR4wkiCKiiy8pGRD52tE9gXXzX/tcn2/SmY2hMKLWrg4haSjD6Poh6y4RSI7cGiK6joXWe2B/ktI/e325vgKdXd7wX7KlHX7nc6eZ7Gfd14rvdfbe0jK8dYpTYai7eHp5V8vyrLgW4SeRJcnS5f6n9ONMjFc97TJOHsP3rUUjMSFQlHOx9c+Hg/zB+PUhzhPL4RMt2H6KzkJxr5T3PlZAoapUonS2R1wp+MiXJ/I00EPrxAiRVfRJ4KyWujz2O5P9+1IWhfXqN09PYdAh25wpwi5jLrcAcNp2covc4IO94fq9QjJFoxlVmxYzuivjiegf5YyswYLAIOyMDcxdoAUxfalgxzBaVDMlMKt+TIWJdbvWsYT53txl4o5YxI3aybg4LKruo8ks6MFAzo9FQW9W/YewcwDOhLnusfqKti3ZU0j+JP53aJc1R4hRuKR1eU/U5128rxmEedCIoO5WxSDLf09nQ91g0FLGXYNTsjgInxjVU80P6Tu8M00INrKKCD6ky0BetW9fhvpg2zyNYGp6vbvKfeqZxsrQDA33JJAFi/NIN4gb/b/dKCGxw/9P5lHlB7N8qD9qUwIzPX/iz61q1L3i9yYmJY3BaAg11n8Sr/i1CapyXsmGcS3cF5Pg064BrioDfks70ZMhCCcTZhaEl6v/87z95y3T5w3oyu52RPFzuJgHHr0= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F5PdnhAnhfzUNb842JfxCbbwysiZrknnSniqsstRcMF8MCedZfrxmfutvuXTEFt/g597v6KKoz1s7uEh2AtZmxnOwEypfjHWX7F0LRf+pKThKkI6dj486NWL1deVwOQ9kTtXWkQ9pkbndNOw6U7EfI0tkz9UlTpZV/uCrfb5UGOShkjMq/qaz5H3qmHFKC4XKSJKTnGWLxFwi1+DnSrRjNabGocB5lAKheVz2bkxsgp0N9Xx0DhnykDYa8neDX+sK8fHdpPi0H3CCV/SYzrHMgaD/rIhU9/AjeYHG9X9Oh5HCxXUmFYmGq9QdGxVBD1Q9e25aMQGUTiWBS41Da1SQPGIvDTmdnUch0KYkcQoPxOuwpK4GOZWJ5DqiBtGQTmJRf2nRDbJWDwDLoJZkF/R3Eih3QuQd1ZJdk4GCK/evrFu7FKDLsguDRgGln9wigIm4prD4TTNvhJuKjVAiCNqTetlfamgkgweOzL6vRXuvvxaR2JtCSv4CJzU5Il9l3VtwSbWzMkK4leBcFBiC1pcueE96aF89faBNpEXvdhO9Bof9QIPE7bBtndCedkkUn077kDgWJNGWoLlDWVaI5OkTA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /wg6Fo4d/fV2J2S1MF60RWInHImqoX4OWvCHsepNnQ/TiexDCVgGZg6vrAsCapG5qu12MP2bhAadw4BOxUo+LB4XQ8sw093xYDLi7VVZB1zeiaaWe2j7xSHwVBkrnm2KoKVbrtwG6uHl+lYQs7KEEUZGwxymaWO2xSSAJB3fSBFMviqDw2Daa3hvMgJs81ZH5j/MTR6X4Z8zZ3npp9gL/AKjfcsBmEyX2Vrl1pYXjBfSdBNaGJluZ7GPFO+2moBv9iVI0o0x7OuIiaHwG9ORqdKdg7DIJTuOCzHsT8OcXekNRcsf1L1o0gYYa+Pc4CGD4HoKLoh57kyExm4VBszGpGvgJHuA1TMcT+cN7IWILFx6kzE6GAulNLB0vq34YsUdnXeTaCIvZ1egKb4xXW8okDE67xVtJBcMieJwRyFP1hIHvEjzfLEjAVBO15YprlZkXa6qTPHl9ZZE7bDvoaAM5I1AwR+hJ9xZDdUl1lc5Wj/UfuMRe+CTdpAK6s1MKC8mYorgqI+Z1bWYsjuYI+aYpeFGZBmnWWlrSpEuJKK0iO0KxmgcIDQ7/z8xy5jdxNxpDnovNHIjsAvELatmc7sOdLkBqzFK71srMokvMGjrVzK0WCApkBEGrpBcQGiMoRUGiD6N08jhnXG7qdKYey7h1tCn7pAXHtSQoj88mV6V2muAFb8vM7XljVajvTG5ASOog2jcWpf6VGnDq2NMsWhx7nMsOZheJbl50hpC+QNTOjCB3q0ggI9bmEDar0i69JwlWXGVYoktYf3qX5LtoULGiDqg/1VWAkiRNLq6nQy/pe50mBVpf1hOf1QlvPL3ML/vZSvuD3dN/DABfmjjVSCEx74g0Q0wY98r1mHaOwwK2JpVjVpBj4TcZq8+SwIJxuXmXNMcWyxWV+CSLTw6b98whryCaeL23QDVFfTRclh+JqyHVno0RpDA+y2cFxzGRpFhD8SD0rjRvK96eWuUHAOEtg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3396511-81a8-4aa1-6298-08d9edf2c3db X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:57.5469 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 15/17] avcodec/avcodec: Decrease the amount of time while holding the lock 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: 4FAJ8TP/DkkA Signed-off-by: Andreas Rheinhardt --- libavcodec/avcodec.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index 4df834c708..92639dda6b 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@ -169,8 +169,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code if (avctx->extradata_size < 0 || avctx->extradata_size >= FF_MAX_EXTRADATA_SIZE) return AVERROR(EINVAL); - lock_avcodec(codec); - avci = av_mallocz(sizeof(*avci)); if (!avci) { ret = AVERROR(ENOMEM); @@ -301,16 +299,17 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code av_log(avctx, AV_LOG_WARNING, "Warning: not compiled with thread support, using thread emulation\n"); if (CONFIG_FRAME_THREAD_ENCODER && av_codec_is_encoder(avctx->codec)) { - unlock_avcodec(codec); //we will instantiate a few encoders thus kick the counter to prevent false detection of a problem ret = ff_frame_thread_encoder_init(avctx); - lock_avcodec(codec); if (ret < 0) goto free_and_end; } if (HAVE_THREADS && !(avci->frame_thread_encoder && (avctx->active_thread_type&FF_THREAD_FRAME))) { + /* Frame-threaded decoders call AVCodec.init for their child contexts. */ + lock_avcodec(codec); ret = ff_thread_init(avctx); + unlock_avcodec(codec); if (ret < 0) { goto free_and_end; } @@ -321,7 +320,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code if (!(avctx->active_thread_type & FF_THREAD_FRAME) || avci->frame_thread_encoder) { if (avctx->codec->init) { + lock_avcodec(codec); ret = avctx->codec->init(avctx); + unlock_avcodec(codec); if (ret < 0) { avci->needs_close = avctx->codec->caps_internal & FF_CODEC_CAP_INIT_CLEANUP; goto free_and_end; @@ -369,7 +370,6 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code av_assert0(*(const AVClass **)avctx->priv_data == codec->priv_class); end: - unlock_avcodec(codec); return ret; free_and_end: From patchwork Sat Feb 12 06:41:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34253 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3856048nkb; Fri, 11 Feb 2022 22:43:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJyz16LGR30j402hhO+BzVWOPhViXwlqHfHs7sORXzkKL2XPYGF1EhTKyFc4ivC/FpbNvmcg X-Received: by 2002:a17:907:6088:: with SMTP id ht8mr4050255ejc.528.1644648222303; Fri, 11 Feb 2022 22:43:42 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id s1si20201539ejn.293.2022.02.11.22.43.42; Fri, 11 Feb 2022 22:43:42 -0800 (PST) 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=nD4iSzi3; 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 8643868B2C4; Sat, 12 Feb 2022 08:42:12 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074018.outbound.protection.outlook.com [40.92.74.18]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BC28B68B256 for ; Sat, 12 Feb 2022 08:42:03 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cP7NeoTMDxGJs9wPEraCQy+WNP3FM5HUxRu5o8tk4ykbxqPFflh1ONaiWYiDjcb+wg7pSxRweHFYN3eTHsfClUr32ePEUqO+zG24j+JewUGnYCZfljwdco9duGuUnTX8KVYZ86yo7fw7dKFaAdTm1uXtUNIj6omctWWhAwM6H/nmU6qRhZ1lytoTKtc4EInWolqHVHW0/x7GRRnIZQr6jPe9SES4VeCQs16Vh43sPkBosTuc0zbwC9Z6zSjR2iF6KVGVDW3LguOzdZtD7WswjajEK1SRdc/7nwIrny8NSSZYYnAecmsdnwThiEpuwxAUk3TSFuS717/DOEzaRENvpQ== 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=+wHsVja1VbUKxNUWXneX81w7t0asnv8mcq2U0cUnLF8=; b=Mncv6H5DDoijufkNRih0YpcyCH2WoYOSTB1pJToel0pSm6ECIHonh1JMxGIqCuvnbEH6jsW8DltZuR70o832vS469QWyVhwUbb/DwUe2qD2KTIqVuo9NS+z7mWLhxxj1MbD+cLnI9P/AWEpgF8KmcVK4u/iY4bd8o15NOi2hLidKeofH/PIN3drMDIHr0TcSy4jB8QbUw9Z6OKRISsZSUaA7mqYo6x0wUPNPI+J9QOFsC8Y0LbEO+P7KV/kviFRabWnESQxG0qnRzD7RHVEJ9Id01+AGgilzk+oTSnTPgcvDLWVMoEh/N3HTZ9cpsdvO/5Gx4mzw9Morm9KuEB43MA== 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=+wHsVja1VbUKxNUWXneX81w7t0asnv8mcq2U0cUnLF8=; b=nD4iSzi3lAKazNZdCE/kNevQfCqNyHp0h/B5Ren6cH4rhn19Gf8KmCqsZOkgpDatvhnHIzHiTEeK1Ni/DY72aUQ202f143KzduHzHLzcCH8n2QJOUpgWD2R2hwbqjWxRd89jyLJygpfLMHrFAPaP7IFEURnHiUICGRwCyks8RZchSuaeaWVPZb9VQkzxsnTwBb2Ows7rCPJDCzCDFnuYGlHbp492USvRdfxufRVR988pvQHntFM8uiul6Qp4MH6O74KugF2ugn6e6ebvgm1KUNmP0rjJ9KOs6f7eDfXOkor0GrlYXgewYSR9zU2CnDIbZkJNp+CDUlx+K8F+NN8eTg== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM9PR03MB6723.eurprd03.prod.outlook.com (2603:10a6:20b:2d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:41:58 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:30 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [WB23qR/nAR98xFDHc0sM3ZNOk9YQCMTb] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-15-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fb47535b-2703-4c1b-dc46-08d9edf2c47f X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlothMRrWkmAIJDF5vIc0A0lLkWIL+mqVZJ157OJFVJvU1kCb8+DQOvDjJ3OYLXxuE7lqn6AOmY8zIwBobi/08T+Q/FHDR1kyKJDJetGPUrBH2PQDkHgL6E1XLkUKJBAYUJK1pjGOR5IlEjhiktHOBLoffiVrhzSOr5pcRInwsmQuwy25z96T+gAabQH/HcDULU1dB4MOpqCnZGTfcfaLrgcNly7pceyn188+WxPMIk0mHUEF0XOmyB4ClY1GtVpc30I/gWAJMU8EoslCLdszartIaEzDEoxN2B6ujHeIzA2wEsyQL+0Xy++o3R5wSiFXV+xTnQG2/6AbeFcIp/HGPJYv+ZssWOp2GIVrV+SulDjQPXOgLe4Hz457y/DmTk2u2Q8HGpyYyqwYuR7fd3r7FP63zllGN+cNQhONI3Z5QEgb1aZGCwiJ2F27Jp79wrmDP2f8knzkMxERGE2S0bfYOFKLfAVbkOrXOpmHi3OLry2dbHFqSE1qhe9RSMY9QxyeME7hzgU5ZAIyCX4Y9RwpG/z+wdtMne5CRUHgOuM5+4LxsQaEWrQ51Aoj9ELwSrqTvgSKGk8Z4I5Wc0G9KpNdKLiERlrT4h3IXeV2/mjbEyxxFjR7xjqktNk40l/qwPwRgdQFBWBdfIz5hDzhYusIkFEJD/UVNmcAcDlxlZJJNujV6/uLCdAM/N99TkcGH4qPjT7zdTK4Ut1QrKs1EvxZPg51tSgt+rPVUa97JWsatje4= X-MS-TrafficTypeDiagnostic: AM9PR03MB6723:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2UuswtvpGzE1PMn4OeSPNo7HQTrwryw7przOAvkCurRIvBLha3Y8KlxWuS/Pii3wS1XaAjn+1aFY0BjbPZulhbxgHcd35dQeE5RpHyM84RaHut1H8NsHdcqAE8PZ6PzNlZGr9DHNdLM9iFNyeVDKBTJb52EJtkekiN/T3bF/OvFt1oo+/MFwJ3blpmrgd8GCQCJw/uaiCUKS8+kX/VHy7AK80KJ26D8DpM12T2yY7F6KwLn8PLg79tf8UxMEtRds2CGKVQ72rUeGs68w9G2z+hba8VzURJp6Gh2DE9oJDrP8EecR935SMaRH8mezzkTPCmOpDKh8O8dsqAR55NkaxBmiPVldpNtys1eHawznMq0M8MEPRsPxnIRPGtj2tB2dyrTYZ5uWRtHbLmCUYJk7xKne+slYBkQR8scbK0g4f3gpYaqkcaOzQII7qJkwzPk6mfUmf/rmByVshT68It3aGlx06XNrPTVpzNrnw+qv/pxIJ1QkNgXku9hvJoKpLZSZa9cphACly8i9Nr2VQYglp4iUm8FNv79bK1YnkBG0oAKVKpXs0BoBC/TEd6UAv7Nf17+2nysJkEXroyFzNzf31g== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: BsPCbhAp6s85f60POjDWA1024iIqVNto089Z78YX2dQTcMIRaX2I6EBP+OR8z+w1BCAd3z2BKfLD+aAmISoSUTNmEpREJJ10bPwEU4wUlwh91kMMTBeWXyWF9V+wmDjovBA36jfFuuYkOXSZgEeNoi6Nl9+rDfs88diFma7iMAgXPua7ii1bDGGDb0c1L22RuagKTr941/x/M1IZ7Bc5fE54I/dleENUcj96UQwtT7FTgVAI8ZCy7e84qRt85Ul/SGzuHSN1VIWhAfHm2MwO73NflMYCZqQPeoujeepTMWwBm+nMrmidFw73njbnZoOX/fSiwwserp24lsdCbRg9twb36OBim9KsL9mDyj2ZVXHL7xdtoV0S43OqJWLoxwsE2I0cNa7D13JAN5XIaa6+7XUDrs88eUyKtpcZhRUvEy7BLBRNH+5BVDZEJQsx9SvqNAHnuKwUSLrUK/RE1iaeIv2w31IL0lonmHdSyyol77JyLMGMu0LXv5Ty4wKM9gKxntvty8zHVRs43366VA8wlrTnTSOz30au124F7x6KwNTwvODB0zL634VymunpWnwPMHUxJe9bZkUEF6uN96Y6PrfXT8KU3GZRBdL20Q3kxbp8ZQ/cpGYZkDk4Z3tTMB+bP1msTrbRivHWUbmpIN7LypOg2nVR8RoUzUNixf2Rj4VaN56C9k/NG2QLEXppADWqKvr7VVY/+l6iGn4Zs1j8pjV2FJN8Jy/0TjIh525atD0lXgV48tDhok27YqYMNu5DQJlQjdXbQKyQ4I7rX8aXFjUjM755ZBYrWo/KaH9K+LExhbrWksD6UUFNA0h4MajWee/RbhTFiCjgiEnsi+BGbWAGQHwDtOl1RDPZB4BKFP7TvXAWfItNMfFI07DK6tSJgYETeT5lkmV8SZTT7fJnfNCZB7r03yMLeksaY6GtSE4HjcN41MMVTICX6tTlItWjcn3AGr3/7ckdAlLF8kMQPg== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb47535b-2703-4c1b-dc46-08d9edf2c47f X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:58.6249 (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: AM9PR03MB6723 Subject: [FFmpeg-devel] [PATCH 16/17] avcodec/msmpeg4dec: Make initializing VLCs thread-safe 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: WX7ARKZ+PhYL This automatically makes the remaining mpegvideo-decoders (namely msmpeg4v[1-3], mss2, VC-1, VC-1 Image, WMV-[1-3] and WMV-3 Image) init-threadsafe. These were the last native codecs that were not init-threadsafe; only wrappers for external libraries and for hardware accelerations are now not init-threadsafe. Signed-off-by: Andreas Rheinhardt --- The above is based around the assumption that my other patches marking the VP56 and 8bps decoders as init-threadsafe are already applied. Here is an incomplete list of non-native codecs that are not init-threadsafe yet even after all these patches have been applied (this list is incomplete because it only contains codecs that I include in a fairly, but not completely extensive build of mine; the threading flags stand for frame-slice-other; if all frame-threaded decoders were init-threadsafe, one could avoid locking around ff_thread_init() in avcodec_open2(). This only affects libopenjpeg and I guess that it is init-threadsafe (as are probably most of the following entries): Encoder libaom-av1 is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Encoder libcodec2 is not init-threadsafe yet. Encoder libfdk_aac is not init-threadsafe yet. Encoder libgsm is not init-threadsafe yet. Encoder libgsm_ms is not init-threadsafe yet. Encoder libilbc is not init-threadsafe yet. Encoder libmp3lame is not init-threadsafe yet. Encoder libopencore_amrnb is not init-threadsafe yet. Encoder libopenjpeg is not init-threadsafe yet. Codec supports threading: 1, 0, 0 Encoder libopus is not init-threadsafe yet. Encoder libshine is not init-threadsafe yet. Encoder libspeex is not init-threadsafe yet. Encoder libtheora is not init-threadsafe yet. Encoder libtwolame is not init-threadsafe yet. Encoder libvorbis is not init-threadsafe yet. Encoder libvpx is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Encoder libvpx-vp9 is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Encoder libwebp_anim is not init-threadsafe yet. Encoder libwebp is not init-threadsafe yet. Encoder libx265 is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Encoder libxavs is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Encoder libxavs2 is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Encoder h263_v4l2m2m is not init-threadsafe yet. Encoder h264_nvenc is not init-threadsafe yet. Encoder h264_qsv is not init-threadsafe yet. Encoder h264_v4l2m2m is not init-threadsafe yet. Encoder h264_vaapi is not init-threadsafe yet. Encoder hevc_nvenc is not init-threadsafe yet. Encoder hevc_qsv is not init-threadsafe yet. Encoder hevc_v4l2m2m is not init-threadsafe yet. Encoder hevc_vaapi is not init-threadsafe yet. Encoder mjpeg_qsv is not init-threadsafe yet. Encoder mjpeg_vaapi is not init-threadsafe yet. Encoder mpeg2_qsv is not init-threadsafe yet. Encoder mpeg2_vaapi is not init-threadsafe yet. Encoder mpeg4_v4l2m2m is not init-threadsafe yet. Encoder vp8_v4l2m2m is not init-threadsafe yet. Encoder vp8_vaapi is not init-threadsafe yet. Encoder vp9_vaapi is not init-threadsafe yet. Encoder vp9_qsv is not init-threadsafe yet. Decoder h263_v4l2m2m is not init-threadsafe yet. Decoder h264_crystalhd is not init-threadsafe yet. Decoder h264_v4l2m2m is not init-threadsafe yet. Decoder h264_qsv is not init-threadsafe yet. Decoder h264_rkmpp is not init-threadsafe yet. Decoder hevc_qsv is not init-threadsafe yet. Decoder hevc_rkmpp is not init-threadsafe yet. Decoder hevc_v4l2m2m is not init-threadsafe yet. Decoder mpeg4_crystalhd is not init-threadsafe yet. Decoder mpeg4_v4l2m2m is not init-threadsafe yet. Decoder mpeg1_v4l2m2m is not init-threadsafe yet. Decoder mpeg2_crystalhd is not init-threadsafe yet. Decoder mpeg2_v4l2m2m is not init-threadsafe yet. Decoder mpeg2_qsv is not init-threadsafe yet. Decoder msmpeg4_crystalhd is not init-threadsafe yet. Decoder vc1_crystalhd is not init-threadsafe yet. Decoder vc1_qsv is not init-threadsafe yet. Decoder vc1_v4l2m2m is not init-threadsafe yet. Decoder vp8_rkmpp is not init-threadsafe yet. Decoder vp8_v4l2m2m is not init-threadsafe yet. Decoder vp9_rkmpp is not init-threadsafe yet. Decoder vp9_v4l2m2m is not init-threadsafe yet. Decoder wmv3_crystalhd is not init-threadsafe yet. Decoder libaribb24 is not init-threadsafe yet. Decoder libcelt is not init-threadsafe yet. Decoder libcodec2 is not init-threadsafe yet. Decoder libdavs2 is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Decoder libgsm is not init-threadsafe yet. Decoder libgsm_ms is not init-threadsafe yet. Decoder libilbc is not init-threadsafe yet. Decoder libopencore_amrnb is not init-threadsafe yet. Decoder libopencore_amrwb is not init-threadsafe yet. Decoder libopenjpeg is not init-threadsafe yet. Codec supports threading: 1, 0, 0 Decoder libopus is not init-threadsafe yet. Decoder libspeex is not init-threadsafe yet. Decoder libuavs3d is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Decoder libvorbis is not init-threadsafe yet. Decoder libvpx is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Decoder libvpx-vp9 is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Decoder libzvbi_teletextdec is not init-threadsafe yet. Decoder libaom-av1 is not init-threadsafe yet. Codec supports threading: 0, 0, 1 Decoder av1_cuvid is not init-threadsafe yet. Decoder av1_qsv is not init-threadsafe yet. Decoder h264_cuvid is not init-threadsafe yet. Decoder hevc_cuvid is not init-threadsafe yet. Decoder mjpeg_cuvid is not init-threadsafe yet. Decoder mjpeg_qsv is not init-threadsafe yet. Decoder mpeg1_cuvid is not init-threadsafe yet. Decoder mpeg2_cuvid is not init-threadsafe yet. Decoder mpeg4_cuvid is not init-threadsafe yet. Decoder vc1_cuvid is not init-threadsafe yet. Decoder vp8_cuvid is not init-threadsafe yet. Decoder vp8_qsv is not init-threadsafe yet. Decoder vp9_cuvid is not init-threadsafe yet. Decoder vp9_qsv is not init-threadsafe yet. libavcodec/msmpeg4dec.c | 47 ++++++++++++++++++++++++----------------- libavcodec/mss2.c | 1 + libavcodec/vc1dec.c | 4 ++++ libavcodec/wmv2dec.c | 2 +- 4 files changed, 34 insertions(+), 20 deletions(-) diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index 3d2dcb9429..ba72c7ee50 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -22,6 +22,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "libavutil/thread.h" + #include "avcodec.h" #include "internal.h" #include "mpegutils.h" @@ -292,22 +294,10 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, int16_t block[6][64]) } /* init all vlc decoding tables */ -av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) +static av_cold void msmpeg4_decode_init_static(void) { - MpegEncContext *s = avctx->priv_data; - static volatile int done = 0; - int ret; MVTable *mv; - if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0) - return ret; - - if (ff_h263_decode_init(avctx) < 0) - return -1; - - ff_msmpeg4_common_init(s); - - if (!done) { INIT_FIRST_VLC_RL(ff_rl_table[0], 642); INIT_FIRST_VLC_RL(ff_rl_table[1], 1104); INIT_FIRST_VLC_RL(ff_rl_table[2], 554); @@ -372,8 +362,21 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) INIT_VLC_STATIC(&ff_inter_intra_vlc, INTER_INTRA_VLC_BITS, 4, &ff_table_inter_intra[0][1], 2, 1, &ff_table_inter_intra[0][0], 2, 1, 8); - done = 1; - } +} + +av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) +{ + static AVOnce init_static_once = AV_ONCE_INIT; + MpegEncContext *s = avctx->priv_data; + int ret; + + if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0) + return ret; + + if (ff_h263_decode_init(avctx) < 0) + return -1; + + ff_msmpeg4_common_init(s); switch(s->msmpeg4_version){ case 1: @@ -394,6 +397,8 @@ av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx) s->slice_height= s->mb_height; //to avoid 1/0 if the first frame is not a keyframe + ff_thread_once(&init_static_once, msmpeg4_decode_init_static); + return 0; } @@ -866,7 +871,8 @@ const AVCodec ff_msmpeg4v1_decoder = { .close = ff_h263_decode_end, .decode = ff_h263_decode_frame, .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, .max_lowres = 3, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, @@ -884,7 +890,8 @@ const AVCodec ff_msmpeg4v2_decoder = { .close = ff_h263_decode_end, .decode = ff_h263_decode_frame, .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, .max_lowres = 3, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, @@ -902,7 +909,8 @@ const AVCodec ff_msmpeg4v3_decoder = { .close = ff_h263_decode_end, .decode = ff_h263_decode_frame, .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, .max_lowres = 3, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, @@ -920,7 +928,8 @@ const AVCodec ff_wmv1_decoder = { .close = ff_h263_decode_end, .decode = ff_h263_decode_frame, .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1, - .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | + FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM, .max_lowres = 3, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, diff --git a/libavcodec/mss2.c b/libavcodec/mss2.c index d7a19f6ad2..3b756c9399 100644 --- a/libavcodec/mss2.c +++ b/libavcodec/mss2.c @@ -855,4 +855,5 @@ const AVCodec ff_mss2_decoder = { .close = mss2_decode_end, .decode = mss2_decode_frame, .capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, }; diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index 7ed5133cfa..7568dfc332 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -1209,6 +1209,7 @@ const AVCodec ff_vc1_decoder = { .decode = vc1_decode_frame, .flush = ff_mpeg_flush, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, .pix_fmts = vc1_hwaccel_pixfmt_list_420, .hw_configs = (const AVCodecHWConfigInternal *const []) { #if CONFIG_VC1_DXVA2_HWACCEL @@ -1246,6 +1247,7 @@ const AVCodec ff_wmv3_decoder = { .decode = vc1_decode_frame, .flush = ff_mpeg_flush, .capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, .pix_fmts = vc1_hwaccel_pixfmt_list_420, .hw_configs = (const AVCodecHWConfigInternal *const []) { #if CONFIG_WMV3_DXVA2_HWACCEL @@ -1283,6 +1285,7 @@ const AVCodec ff_wmv3image_decoder = { .close = ff_vc1_decode_end, .decode = vc1_decode_frame, .capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, .flush = vc1_sprite_flush, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, @@ -1302,6 +1305,7 @@ const AVCodec ff_vc1image_decoder = { .close = ff_vc1_decode_end, .decode = vc1_decode_frame, .capabilities = AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE, .flush = vc1_sprite_flush, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index 7518088b6a..71c948df23 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -567,7 +567,7 @@ const AVCodec ff_wmv2_decoder = { .close = wmv2_decode_end, .decode = ff_h263_decode_frame, .capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1, - .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, + .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP, .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, }; From patchwork Sat Feb 12 06:41:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 34254 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp3856094nkb; Fri, 11 Feb 2022 22:43:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXvAahJQwTysZdFRx5NBjRbswFmxF/eHb/x08CzEskapbzUpWafcpmT6OzJJj9kfr0ycKh X-Received: by 2002:a17:906:99c1:: with SMTP id s1mr4251372ejn.298.1644648232218; Fri, 11 Feb 2022 22:43:52 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id g22si18926010edb.619.2022.02.11.22.43.51; Fri, 11 Feb 2022 22:43:52 -0800 (PST) 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=coC7fZj7; 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 9664F68B2C8; Sat, 12 Feb 2022 08:42:13 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05olkn2050.outbound.protection.outlook.com [40.92.91.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 53E5468B281 for ; Sat, 12 Feb 2022 08:42:01 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KB8qJ9ejcc/IXKaM9ZICGuOsQ50oNLM4olOGBQH/Nv+e8Zh1QoKVz71MWkNr7DWNJSdybTF48acspyCHsmMXgIT0xFnaHv28dXMvP+XXxNwLqU0/0YJdRB33fls3NnubNwwsL1ChSwYDGBPoOQn6yZ0UJnr383HU7R1feEqJAhkauvWYE+mq3OcECGKJn4L4IaUvXWQu2pMFBGv4zkvTmR0fXGwtKJbMXEe0f9kVt7yFbb6P6u5mDASOW0eYq9kh3Ir998vpdwYFYhGhr2WaW316sGmk9h8TdnHcMVvPlLOiMVDYEjyghovS/Qu6k52GD8tZnY81rRI7wcZzLZhAcg== 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=UnkCTfQICuqRM+CZdU7euH3TouxkA28EfgD2vRmqaw8=; b=jIz55/jGPMvN7uB7x8hp2rf0CplGdbiLmbdw7Dl7ZXRNg51vD+OAwtmeulLLw5/E1Uo3wYTllotD8mty0+APp3rgJZ49g9XnRJjpUuMDiqYPo7Khz0zBxx0cTwZViYvDooyuTTNP3g45h1Mm7vEhuLlLW+R9k4EoBMW+tG5Dp/XMIUJwAJaGL2aYHLhIB9RC48C5K6rsML42QrciCyHpf5Fetb8lheKRm8wQBHX7q1sfK+HArFhUBZNA/7dFKaz9yxSyvaTHM0+u2Ql6tQ+c9bnAEp/ZD8F3bbGGkE/UcElI4wqF/3CyRnS48GTV9cf7TuzAWLHIgXNdBP5Q30eFZw== 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=UnkCTfQICuqRM+CZdU7euH3TouxkA28EfgD2vRmqaw8=; b=coC7fZj70WEf5A85pDvrXXeCUpHnP3Dp5GwRiMyZygsyfjZgIYInnKmvqEfN3OHBD9m5bG4HoTs5jvf7B57eh1cXvwKq8pgP24mYW9w+ZMWqwttXcIT82zXFhrhF22oX7J0rjSGcuBnOARM7IBobhSzX+TiByTrlkyEKXoC66hg6jh3z4di1tm8Fl2Tue1jIJ1R2ZnN+jzDYYtB19GMxPAcew2psvelL4FgE9zYN0W2+NV8huqJkfJXGm/kKl15mY4wTP6hN5IXlszX+Va7yZxOepLPbBKGSRK3Wv824wSY1NRXdH/Urx05VP+7QSW22xrSmU4OjcJuLpoeDLmH9DA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by HE1PR0301MB2363.eurprd03.prod.outlook.com (2603:10a6:3:68::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Sat, 12 Feb 2022 06:42:00 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::ac56:2ff4:d304:ab22%5]) with mapi id 15.20.4975.011; Sat, 12 Feb 2022 06:41:59 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 12 Feb 2022 07:41:31 +0100 Message-ID: X-Mailer: git-send-email 2.32.0 In-Reply-To: References: X-TMN: [udLiJjAvis7CmoSWbISYeFC2iIkfdm/g] X-ClientProxiedBy: AM7PR03CA0008.eurprd03.prod.outlook.com (2603:10a6:20b:130::18) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20220212064131.2265452-16-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 904120a5-54d5-406c-10d5-08d9edf2c52e X-MS-Exchange-SLBlob-MailProps: S/btQ8cKWiSJybpSSbCo57WJd93pOqVlF6BkQuEdMA1v1syxrMYBSIMrRT/M/COdpGs19/Mlpe4YTZ14Kg8nXBKKJVBqVQSewXbvjSNg60PO/Xz8mV+Dw9K22pX+5VCZD7XLxLHi4oPsMJ2FL/1vK3u6UXjEknDAI4BIAdBVGaL2/c1aP2htvNxMXi9/9pHuGMr46efGR4Zhv5jIpmND3XWVY/UOp1DOGEtYYxrorZi+5Ifgt4S6PuUakg3sIZ6QnrQWsDzQwNkcqoJfNlKhWEylmiW5Pvq+PuOpVPZaCn3GLTkawPkNKTvzNc65KEiJu0sUWzGXQ64n6sYZt8rLlCXpe7QNnLCEhN42d9LKW72Uqju/R6mZvjsmWVlkM0T4ETS0BSvv4xJrb6MbH7qVYK4FX0J1+jIF1Slk1wReQtnNDRD702vNp18rOmQFjVTLdLw2AX12Ub8ceMMKIKmRQ0vqF4gWTQOZ2jNOTSQDwcLEc9gmvczcYANqj59zbD3kTibG5jGNK9SdyXspsAqKrNbBcmSb8drhc1DO5MVbZVVD/g7t4FFOm6gwdrA4gCuNDEM5ZLtXwllAp6pOcj+1UbVxxKhCzxqaFKc2n07OEHKiMOP+hUDWRfDZM9hKhP0aiudY6V8AC8gZogiTQOzUZDipgHV6z/xdAd5opflU4qj5WweKrXEoZ1fmQM3RjaKH6Cs6+/9mGDuKh/XSVAH03fg6HZSy5/e9zmp170Jd0+4jH97cGS3JUBbFYWAX2Og9Gwd2GQGMJSU= X-MS-TrafficTypeDiagnostic: HE1PR0301MB2363:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4xdeAvUaVQB5l5kxP7esSLfVuMx/lLjsFJo2J6EA96E/d2HdoCnA3qIDNFeuomW6WihclxqnKnyBkbMI3rDsEek2h1tT7SRSRKAGWg65ifQ5xxb1Ps2LfDZaTvCvXCXYiccyU34UfV+vPD5v9/O/SmmHNroHY8A/3VfwF6REJXpU0AD4OeftXV71dTDS9OYpO29hQ3T49vxOYBx9QyorEvA52vC38SgMFB/ybPbC2rTmYErk5iyVrzV78mslZ7V0EcQI2iS0svDuGgclH55pEHshKL4J5M2QO6iZa9PeIAHA+DgKfoT3F46MLIC4jx1/ewPaxF0BGk+54W3uB/I4X/9LSmgBdRFDZjjH/sULe/qmyhvzazSllhfktu+cIxvN6qzSjG6L8qU38mcoVKk+LHy8raTbN/eIN88W0JY6vqiT12p3RgkkIt0sD0nJb/g8mFpnRiek9hyYfScyblpOM88YqtzWRAXKhu0d/1hZi147zVTpTJAs8/iaAJ2II4kfSPGqTFpM8WRG3pp41zDlcrvseK3Ee9XuHRSMRMHuiY/Q4uKQtPlknRouW5VNFjb8CwY9lr9dKQSzf+cvMXO6zQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 1X/Zs9t8dbineaGT7g2yTk9fgYuhjJ0072JnIdErHmrlLpG3dSO6AwraKNBxN3lhwBDv1NZaL2J4KSOcJtVN7F46TUxndHErXShA9IOQrHVvYE/Vjx+P0TrKrjreiau+ThiJq3nEyyAcITilx2Y70sxG99kH2kJmFiKAbpm4CHbiuvNmKzV/aaGiO2Lob+XIbH99jWHWWTfTmdKTIINFWJxZv62XPpaCnf3KPGgZYxpYCcA9U/fRjqLhj2g1x/4nNROZBGkdlB9NC4BXUZ5SkjW9G/wuzHH6UtfqS68bW8eXQuK8bcheuXEIF/SfuMcPdR8bhM4sNWGTTzg0FK/PligT2R1BqC0+Fis2Jt01NEwQAfd0mrQeFodYO4jyLwZG+7jQ5pX61jDT3WrCQrgXP4jrvL27Kb/GshZoJCKr8/GB56B2jhJlWp5/xWh10+YLptVtiMPhj/UMBS2LsdSgfr2Kb9EINy7ZmDW1BA51hjFeXnnXd1Rxm8D+9xkkitg0UTpECy0HHH4vQh12Lg69vi1QfeK3XgGc0dr+6KXKD8lUiOZzzm5U4vOXLBo6heWigJWFySdu6h6tf2nV8q/O+tCYPvM/SSREt8lHNRVOOOxZb+SxKjpgZ84JOi2eWRDTQdAoplGB+zmdpozoXH4M+GxqH1Ju+ITUrEMKRUz1UBrHVQ/JiW6GL5YfEzrCr3MZo9TGo+av6AN/YRf4HvhLYI7VI4p8pVxJqy26xiy7Jc7uPGTPFBoCeKonBXmQZbss044m1YnUmKz1Q6RqxEPbk7sO2ddA9XCRgkd3BZQYExvGY3fpjEut58+4xK8OiRV56mIzLKODG8yLOf12AKnrsmeUltxLp+cei1KHPNtbjlCYjXOGd0W4O2XCJp0QIz5ZMeB+1Be2IeT+sA3f+DywSgYs7ZCX2YFxrTp2U9vsOANrXUJPJizCAtvXElVzplhGFbO6VopANg0ALGJtDGrHFQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 904120a5-54d5-406c-10d5-08d9edf2c52e X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2022 06:41:59.7353 (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: HE1PR0301MB2363 Subject: [FFmpeg-devel] [PATCH 17/17] avcodec/msmpeg4dec: Reindent after the previous commit 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: 5Mls6D0d4DNT Signed-off-by: Andreas Rheinhardt --- libavcodec/msmpeg4dec.c | 114 ++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/libavcodec/msmpeg4dec.c b/libavcodec/msmpeg4dec.c index ba72c7ee50..ac7c7d75e2 100644 --- a/libavcodec/msmpeg4dec.c +++ b/libavcodec/msmpeg4dec.c @@ -298,70 +298,70 @@ static av_cold void msmpeg4_decode_init_static(void) { MVTable *mv; - INIT_FIRST_VLC_RL(ff_rl_table[0], 642); - INIT_FIRST_VLC_RL(ff_rl_table[1], 1104); - INIT_FIRST_VLC_RL(ff_rl_table[2], 554); - INIT_VLC_RL(ff_rl_table[3], 940); - INIT_VLC_RL(ff_rl_table[4], 962); - /* ff_rl_table[5] coincides with ff_h263_rl_inter which has just been - * initialized in ff_h263_decode_init() above. So just copy the VLCs. */ - av_assert1(ff_h263_rl_inter.rl_vlc[0]); - memcpy(ff_rl_table[5].rl_vlc, ff_h263_rl_inter.rl_vlc, sizeof(ff_rl_table[5].rl_vlc)); - - mv = &ff_mv_tables[0]; - INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, MSMPEG4_MV_TABLES_NB_ELEMS + 1, + INIT_FIRST_VLC_RL(ff_rl_table[0], 642); + INIT_FIRST_VLC_RL(ff_rl_table[1], 1104); + INIT_FIRST_VLC_RL(ff_rl_table[2], 554); + INIT_VLC_RL(ff_rl_table[3], 940); + INIT_VLC_RL(ff_rl_table[4], 962); + /* ff_rl_table[5] coincides with ff_h263_rl_inter which has just been + * initialized in ff_h263_decode_init() above. So just copy the VLCs. */ + av_assert1(ff_h263_rl_inter.rl_vlc[0]); + memcpy(ff_rl_table[5].rl_vlc, ff_h263_rl_inter.rl_vlc, sizeof(ff_rl_table[5].rl_vlc)); + + mv = &ff_mv_tables[0]; + INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, MSMPEG4_MV_TABLES_NB_ELEMS + 1, mv->table_mv_bits, 1, 1, mv->table_mv_code, 2, 2, 3714); - mv = &ff_mv_tables[1]; - INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, MSMPEG4_MV_TABLES_NB_ELEMS + 1, + mv = &ff_mv_tables[1]; + INIT_VLC_STATIC(&mv->vlc, MV_VLC_BITS, MSMPEG4_MV_TABLES_NB_ELEMS + 1, mv->table_mv_bits, 1, 1, mv->table_mv_code, 2, 2, 2694); - INIT_VLC_STATIC(&ff_msmp4_dc_luma_vlc[0], DC_VLC_BITS, 120, - &ff_table0_dc_lum[0][1], 8, 4, - &ff_table0_dc_lum[0][0], 8, 4, 1158); - INIT_VLC_STATIC(&ff_msmp4_dc_chroma_vlc[0], DC_VLC_BITS, 120, - &ff_table0_dc_chroma[0][1], 8, 4, - &ff_table0_dc_chroma[0][0], 8, 4, 1118); - INIT_VLC_STATIC(&ff_msmp4_dc_luma_vlc[1], DC_VLC_BITS, 120, - &ff_table1_dc_lum[0][1], 8, 4, - &ff_table1_dc_lum[0][0], 8, 4, 1476); - INIT_VLC_STATIC(&ff_msmp4_dc_chroma_vlc[1], DC_VLC_BITS, 120, - &ff_table1_dc_chroma[0][1], 8, 4, - &ff_table1_dc_chroma[0][0], 8, 4, 1216); - - INIT_VLC_STATIC(&v2_dc_lum_vlc, DC_VLC_BITS, 512, - &ff_v2_dc_lum_table[0][1], 8, 4, - &ff_v2_dc_lum_table[0][0], 8, 4, 1472); - INIT_VLC_STATIC(&v2_dc_chroma_vlc, DC_VLC_BITS, 512, - &ff_v2_dc_chroma_table[0][1], 8, 4, - &ff_v2_dc_chroma_table[0][0], 8, 4, 1506); - - INIT_VLC_STATIC(&v2_intra_cbpc_vlc, V2_INTRA_CBPC_VLC_BITS, 4, - &ff_v2_intra_cbpc[0][1], 2, 1, - &ff_v2_intra_cbpc[0][0], 2, 1, 8); - INIT_VLC_STATIC(&v2_mb_type_vlc, V2_MB_TYPE_VLC_BITS, 8, - &ff_v2_mb_type[0][1], 2, 1, - &ff_v2_mb_type[0][0], 2, 1, 128); - - for (unsigned i = 0, offset = 0; i < 4; i++) { - static VLC_TYPE vlc_buf[1636 + 2648 + 1532 + 2488][2]; - ff_mb_non_intra_vlc[i].table = &vlc_buf[offset]; - ff_mb_non_intra_vlc[i].table_allocated = FF_ARRAY_ELEMS(vlc_buf) - offset; - init_vlc(&ff_mb_non_intra_vlc[i], MB_NON_INTRA_VLC_BITS, 128, - &ff_wmv2_inter_table[i][0][1], 8, 4, - &ff_wmv2_inter_table[i][0][0], 8, 4, - INIT_VLC_STATIC_OVERLONG); - offset += ff_mb_non_intra_vlc[i].table_size; - } + INIT_VLC_STATIC(&ff_msmp4_dc_luma_vlc[0], DC_VLC_BITS, 120, + &ff_table0_dc_lum[0][1], 8, 4, + &ff_table0_dc_lum[0][0], 8, 4, 1158); + INIT_VLC_STATIC(&ff_msmp4_dc_chroma_vlc[0], DC_VLC_BITS, 120, + &ff_table0_dc_chroma[0][1], 8, 4, + &ff_table0_dc_chroma[0][0], 8, 4, 1118); + INIT_VLC_STATIC(&ff_msmp4_dc_luma_vlc[1], DC_VLC_BITS, 120, + &ff_table1_dc_lum[0][1], 8, 4, + &ff_table1_dc_lum[0][0], 8, 4, 1476); + INIT_VLC_STATIC(&ff_msmp4_dc_chroma_vlc[1], DC_VLC_BITS, 120, + &ff_table1_dc_chroma[0][1], 8, 4, + &ff_table1_dc_chroma[0][0], 8, 4, 1216); + + INIT_VLC_STATIC(&v2_dc_lum_vlc, DC_VLC_BITS, 512, + &ff_v2_dc_lum_table[0][1], 8, 4, + &ff_v2_dc_lum_table[0][0], 8, 4, 1472); + INIT_VLC_STATIC(&v2_dc_chroma_vlc, DC_VLC_BITS, 512, + &ff_v2_dc_chroma_table[0][1], 8, 4, + &ff_v2_dc_chroma_table[0][0], 8, 4, 1506); + + INIT_VLC_STATIC(&v2_intra_cbpc_vlc, V2_INTRA_CBPC_VLC_BITS, 4, + &ff_v2_intra_cbpc[0][1], 2, 1, + &ff_v2_intra_cbpc[0][0], 2, 1, 8); + INIT_VLC_STATIC(&v2_mb_type_vlc, V2_MB_TYPE_VLC_BITS, 8, + &ff_v2_mb_type[0][1], 2, 1, + &ff_v2_mb_type[0][0], 2, 1, 128); + + for (unsigned i = 0, offset = 0; i < 4; i++) { + static VLC_TYPE vlc_buf[1636 + 2648 + 1532 + 2488][2]; + ff_mb_non_intra_vlc[i].table = &vlc_buf[offset]; + ff_mb_non_intra_vlc[i].table_allocated = FF_ARRAY_ELEMS(vlc_buf) - offset; + init_vlc(&ff_mb_non_intra_vlc[i], MB_NON_INTRA_VLC_BITS, 128, + &ff_wmv2_inter_table[i][0][1], 8, 4, + &ff_wmv2_inter_table[i][0][0], 8, 4, + INIT_VLC_STATIC_OVERLONG); + offset += ff_mb_non_intra_vlc[i].table_size; + } - INIT_VLC_STATIC(&ff_msmp4_mb_i_vlc, MB_INTRA_VLC_BITS, 64, - &ff_msmp4_mb_i_table[0][1], 4, 2, - &ff_msmp4_mb_i_table[0][0], 4, 2, 536); + INIT_VLC_STATIC(&ff_msmp4_mb_i_vlc, MB_INTRA_VLC_BITS, 64, + &ff_msmp4_mb_i_table[0][1], 4, 2, + &ff_msmp4_mb_i_table[0][0], 4, 2, 536); - INIT_VLC_STATIC(&ff_inter_intra_vlc, INTER_INTRA_VLC_BITS, 4, - &ff_table_inter_intra[0][1], 2, 1, - &ff_table_inter_intra[0][0], 2, 1, 8); + INIT_VLC_STATIC(&ff_inter_intra_vlc, INTER_INTRA_VLC_BITS, 4, + &ff_table_inter_intra[0][1], 2, 1, + &ff_table_inter_intra[0][0], 2, 1, 8); } av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)