Message ID | AM7PR03MB66606FCD4B75E15EB72C574A8F7D9@AM7PR03MB6660.eurprd03.prod.outlook.com |
---|---|
State | Accepted |
Commit | be736e42372ddb311ff6d7bf8898f67bf3a20793 |
Headers | show
Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:cd86:0:0:0:0:0 with SMTP id d128csp6022429iog; Tue, 21 Dec 2021 19:26:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+PXA/mTDre34fD09T0Q0ha833I4LdG+1o/xW8UVfjPd84byXBLOCHsJQaKmD8x986bVRd X-Received: by 2002:a17:906:150c:: with SMTP id b12mr923598ejd.284.1640143564396; Tue, 21 Dec 2021 19:26:04 -0800 (PST) Return-Path: <ffmpeg-devel-bounces@ffmpeg.org> Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id m26si443540edp.323.2021.12.21.19.26.04; Tue, 21 Dec 2021 19:26:04 -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=bW1Xt7xq; 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 8707568AFAA; Wed, 22 Dec 2021 05:25:42 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-oln040092073083.outbound.protection.outlook.com [40.92.73.83]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5563568AFAA for <ffmpeg-devel@ffmpeg.org>; Wed, 22 Dec 2021 05:25:35 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=M1RubWqFt31Q9dz3YiX2fozRfDOZiWwY98e6LaJ2BQVazZvaoGf5e43qHMukdYWBh9ZyCSmOR2xF/rFHwByH2e+pGDRXMJWeKY590elnJD0h7VIfob9WnfmYxBo9NV9vkS4yPAj4NtrRNgh9wFLVLM4NJok02jLpfvGCX5gsocunmKqtKVfzFJfWIlLJY2Lob9Pgw10/qM/+3cym/Kk5XBKqGIwYce90IN5OmTR5O0fF5WWp4R2/haPor7VBuHvhkLvN38T46Qv1V1pUv7OUel6HE20yoqZcP3tcUwN5Os03M+ND6xzsNophHS9z5Lu0YwElb5NVQBn0yhDUiutqOg== 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=8qr28Wwxpluq31BKU/cDGqrKPZ5dIfAutIiH5GjQxNY=; b=FO3Xt2OzU7kAwuNRW/lA0ZqMrmuafOB12eJw1nPmK3zKjw00HQYxcbE1k0N536a4l8aFWV8I/6qOesbWQw6U05CpDw681qLFo0wVEs8NH3vSoTRUrE5Xv816zF+j0uQdkcrNb0v9Caer/Yyg2d3HPXls+MSpOo6+f29AaoMIeDPxFq90d9bOr2CREYN8/YvRVsZ5XKHYHIfuR946PKYm0hLVrkwoMGB/HDohYqV7kcIQCQnsjZemF8/5NAyLBzJ4sGyRYkRNxewKrVkvcl0du8hVqJq1yc6chjyT6tqzulT76nhcSked8wa/TZMj+ivgvXRz9s/XYbaqxxbrx7yCSQ== 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=8qr28Wwxpluq31BKU/cDGqrKPZ5dIfAutIiH5GjQxNY=; b=bW1Xt7xqz4UdnxFP5Gwgl44rF37J2PTJyBkwp9iYlg40FeATq3WAohx7pgNfRSb7BrZgq46sBJkXhnGxMnqHpGxMx7oMgt+ffO/B+JSYInGxKMF+0yYg2WLIXFdyC2xaXm4+JsPxq9QHCB/LVGd2gVmXYCS4iU1iyoJeKlKg8LMU1sca840GedLI4hRI2o0yP4dAzumvLSko7P91t28Ibgp/IC0oJ8pgLuzX4pO3YDcnmG3WvUGSLrCd1wG7voTy6LwLuSMr01JzAsLqbHUkN89QM71yFIqrtF20ryUSCHhwmr5keSbq/WF75ATCMfOk+tSX2TTkehof1vz7P9TbBA== Received: from AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) by AM6PR03MB4104.eurprd03.prod.outlook.com (2603:10a6:20b:18::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4801.15; Wed, 22 Dec 2021 03:25:25 +0000 Received: from AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca]) by AM7PR03MB6660.eurprd03.prod.outlook.com ([fe80::f0dc:92f5:6bc2:45ca%6]) with mapi id 15.20.4801.022; Wed, 22 Dec 2021 03:25:25 +0000 From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Date: Wed, 22 Dec 2021 04:25:04 +0100 Message-ID: <AM7PR03MB66606FCD4B75E15EB72C574A8F7D9@AM7PR03MB6660.eurprd03.prod.outlook.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <AM7PR03MB66606013F665BF849CE7CAD68F7D9@AM7PR03MB6660.eurprd03.prod.outlook.com> References: <AM7PR03MB66606013F665BF849CE7CAD68F7D9@AM7PR03MB6660.eurprd03.prod.outlook.com> X-TMN: [K2tnNEuU9FqHIj+npKfIQJ0TZb9wSx+I] X-ClientProxiedBy: AS9PR06CA0323.eurprd06.prod.outlook.com (2603:10a6:20b:45b::19) To AM7PR03MB6660.eurprd03.prod.outlook.com (2603:10a6:20b:1c1::22) X-Microsoft-Original-Message-ID: <20211222032514.896794-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 756e7c25-a711-4bf8-d8a6-08d9c4fab17b X-MS-Exchange-SLBlob-MailProps: gjx25WM8ZNWm3GLoeUntTG6KfWWWbWhlmDb3O7sZQbZ2Rv2VWZd+ZvF67Lec0qd1qziuQGExWoo7IRmeKE2pTcXyT7dqhk6lof6NWcdOlLEqZ9aHTR3Y2Opqv4OemAcKVMq6TzEXRC3aR91/mLGB0S8QCWGmvALgsC0ZjV/koL3pGtVC6X1eCTUVh8Y0fqXjIV3z5OjhHDr4qyM3z5h4mjig3nYhuNMaU85kO+dxFAUXhlvl2opgsdxRwAar4HD8zTp+b+iv+kIbdO/5rhJ56KxwwK3VyyJ+4+oy5j///LPwP3Ef+YBudTFhzHuWAX7sGAuz35KXQn4baLhHyzm3QMMPAS/7r/twFEfkgamh9+kAXnLCHA2iFnU8HpYm5FmwmY+Te4ODqAYP3WQNKeITPYIbqi3BtlrPuVIvPCA8+ZEWUCNLmW1bHmmHG8PFK0nefh+18mmN2Zbzrs88IlKIOb+g9/zivKzSPpK4MyXfaFvC04iQNw5/sOZk8sR1KmEkrOR7ERIdniTL88Di+26TlvVI3aGnhD5Mom2Vj48seRPxKBt/YxmFMYDJXaiT3uJrSVZVZjjG4OnjvQ3y9aoru1sa2burVGP/a9+R1bCsagdhoLoM2XekNpbRS+OR6jD/EzH3sTqzjmsPSaIr4NWkjtZKcNxDK/txvU4lYke03Tem6l4BrsMPVcv5LTIfzBRx5S/nQpN9WRg7WeA8N/VNn29dUCt7h1zng4LT/j3s8iA= X-MS-TrafficTypeDiagnostic: AM6PR03MB4104:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: QM9FjpkvtXTLH7ifaPQtcQty+VHyu0/akplkftIBB/vjaWgJZlgqxaLaay9b3dx/QtqV0qQ+Sc37sH4rM3TCsMIU2g8ZCG/Bz0poDLT+V3lYzUFTc5Fu9nLRjIB4pF8o2dnFkORaMI3PGPd/kQA53W1CbZMjwEFpi5BcQYtV52zDC8c79GJmdIHESAXoCYtEXKrX50sgKtuZ1TXFoFAM4b+QjH0el2wtjFxLZt4eXc/hVtiUVx1PQHRwE9i/f6tlgKj2lSZgOAIWdkXrIMAwOTPmkrQ7PwYnWPNkdn1+I8VN2QHGDnPbclGNaI5sqtIL8kSDtuPD4FDMF6+0WvKOZfuaKskmQ262dm9jKmJzx5B329x8krYm2BlPotY8nCp69ZIb/Lyt1pZ3JBn/N9KcUgnTGLv4YMIDS/uhJ3tfNRXYHJYyPZcKUOEPBepRWqNX89DBVBU1do/QcwkgINSIKaEBcy/YDoihsc5lVpxOU8DNchCtzdgBwONBVuWhZQZ3zQkn2vX4svsjr5Ae7wzA1xzV7lurV8+sq1VmrUN+ciwaDzdaYlhMFd3MUEGzKD2tZAenRH3F7Te+/lTfh/IXsg== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: E9Ci1Haviyc99d1W8vqmWIViSh6qpvfxmq1txV0gLlj2R4rn1VfiagTPDEUMEcaC/pwr4fNeb/zOoV7PagpqCUUv7w6O7qsUQKTlOa8vz1olKX/cNd+8/pNEqFE5qXrKnNTFKHUQg+rc+k8h4sRszHgkRjFxHfeGtglzd1DQrX9yfLnoVi4bnpZVLQw5DO8TomjH8Ysrn+n4lzeGQlpz/X2rx0BTs1qGZ+xxtfj+9t4/izyIX5tFdzQdkpdSLW1ULiOMUIVSFpspOa7Qz9pj83v1ogApZJmrzNhuY7utqq/fpfuRmaXVQpsHFWwKug1czpwB0P79FCZjWy3z+b3EYgjlPe+O+BOZwwh5lMRXA567pOpaIWFNpm3n7YRh16kFEE3NrwgRhztx1FQnkpu/JP6bPvpLQ8AohxuWcF3kbJO6HywikZYIW2rJJxuYGCq/goRSMABkmSjuAAgkjByPGrrRTrkfoVkSjHTJqzCaHubwDWPu5bL6V05Ra+Mrg5FowqWp796JLlSAv/m67PbLQ085cAqSQ2U1ST/xRYKTUPXNcRvGHbyHHhJzXmyx9NvOR59090N3+3p6vnC5jK5TgD4KTM+Lw/DOzeEG1YmvHHubEipoaS0zPM/ShXBQ5MULlONPn1xiV0qWY05GKX/PmbHzLfbqcWjYKy9V9pwk3o9xgRqJHx/yt0saLz0CH4FW45jEbbZk/5/85MLKPHE+o18cw8lyx4In46RGRSyB2MNazzb/dPKMsCgCqQX7YvwrxKASgc2NpeWSIlgnI04ImeXCeK+Qmqygq7NeH98a19uMvXgE7pFyyWRrQz5veMAComCINMXyu93XRGFSB4QdW2chuxGKIyQgvve3If2XdlyF8pwcm54QEqjnbWIt8eIJP137883RsAN95CdUrjSygMpuABPtIO/iHNT5fdhxEV8PHFvAbur6Kf5oWmjoAtdzRR42zr72YbgriD/HocsRrw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 756e7c25-a711-4bf8-d8a6-08d9c4fab17b X-MS-Exchange-CrossTenant-AuthSource: AM7PR03MB6660.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2021 03:25:25.0062 (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: AM6PR03MB4104 Subject: [FFmpeg-devel] [PATCH 04/14] avcodec/mpegvideo_enc: Remove redundant checks for multithreading X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org> List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe> List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel> List-Post: <mailto:ffmpeg-devel@ffmpeg.org> List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help> List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>, <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe> Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org> X-TUID: b6r0ut7AUE8Z |
Series |
[FFmpeg-devel,01/14] avcodec/mjpegenc: Use custom close function directly
|
expand
|
Context | Check | Description |
---|---|---|
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
andriy/make_ppc | success | Make finished |
andriy/make_fate_ppc | success | Make fate finished |
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 7e45fd0ff3..23e8a41a86 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -607,24 +607,6 @@ av_cold int ff_mpv_encode_init(AVCodecContext *avctx) return AVERROR(EINVAL); } - if (avctx->thread_count > 1 && - s->codec_id != AV_CODEC_ID_MPEG4 && - s->codec_id != AV_CODEC_ID_MPEG1VIDEO && - s->codec_id != AV_CODEC_ID_MPEG2VIDEO && - s->codec_id != AV_CODEC_ID_MJPEG && - (s->codec_id != AV_CODEC_ID_H263P)) { - av_log(avctx, AV_LOG_ERROR, - "multi threaded encoding not supported by codec\n"); - return AVERROR_PATCHWELCOME; - } - - if (avctx->thread_count < 1) { - av_log(avctx, AV_LOG_ERROR, - "automatic thread number detection not supported by codec, " - "patch welcome\n"); - return AVERROR_PATCHWELCOME; - } - if (s->b_frame_strategy && (avctx->flags & AV_CODEC_FLAG_PASS2)) { av_log(avctx, AV_LOG_INFO, "notice: b_frame_strategy only affects the first pass\n");
The generic code ensures that only codecs with the FF_CODEC_CAP_AUTO_THREADS internal cap ever have to handle the case avctx->thread_count == 0 themselves; moreover, it is also ensured generically that only codecs that support some form of threading have thread_count set to something else than one. So these checks are unnecessary. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> --- libavcodec/mpegvideo_enc.c | 18 ------------------ 1 file changed, 18 deletions(-)