From patchwork Mon Oct 17 01:34:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38759 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1375945pzb; Sun, 16 Oct 2022 18:35:38 -0700 (PDT) X-Google-Smtp-Source: AMsMyM75v8rvP0op0QpTyBWxkVROx+5c64O1O+85zgK/h0/iW88Hp2lttcQxXC/HFGxH7uAAhUSr X-Received: by 2002:a05:6402:500d:b0:459:3e56:e6f9 with SMTP id p13-20020a056402500d00b004593e56e6f9mr8268802eda.367.1665970537878; Sun, 16 Oct 2022 18:35:37 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id hc35-20020a17090716a300b0078081036bdasi8697519ejc.501.2022.10.16.18.35.37; Sun, 16 Oct 2022 18:35:37 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=XXUV7VYa; 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 3079C68BCB0; Mon, 17 Oct 2022 04:35:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-oln040092074017.outbound.protection.outlook.com [40.92.74.17]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E538968BC9E for ; Mon, 17 Oct 2022 04:35:14 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YgeE3wAJ7+iFrkHJtcZ5YDeHo5UDkfRkjh8G4JaJ0RiLnioNCE6k2dW0NfUh9MkEXjtdljjcOA/TRnEgtJLmrcTOVwdLnqumsYHjUlgJbr1EcUcDEereeJinHS2+DhCXev/SaHPU/7HsH+s8IxnBJl6GAPSwZd+R13VCHIyE3weBXAe0nIUBGurjcbEkKQOuE4NYb64g8z7Y2T0ynDffhkBXhjBwJrbV1dxhtci/1iAovDoz1+k/O1Hg70feTrlA7i+QmTrlK/yOskpram8p/Mo8Y29h5LKiXcLsbwE4v6jHMuLdy6H4+eZqkWkASl2qur/vOEAlL8bZkiGFyJA6Ew== 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=7NssOlKdLzfHHKWDCDYZXC1mkRJ0vf3w/eYL1VjG9bI=; b=ci6B7mdrV2SnKJJI+l7gr2d7HLxnJLZEoUF3xle6eYcKoFTvJGVALZRlErw4ABiMGNfjs5cbsNJCsRt+F07sasvx/iB0KR2TpC/OeBZobrRbd3IaS8dq0GZFtCy78nSKkEnbkKTxBaGbHC0nx1YWc15UErZcEUNMc5a5wNUrlxJg731LaNbfe9oLeZxTxKJsMUQ5KAyKU1Sg+G5VyJUz6r7hVjBVmiBPH/pWhD1sCeMtgAIB72kGI2eg9Z9Am0OwX2D0wVo286N/mgOZstKN7A1Q1E/rVgEXHsmwr7BZ8g5ht+J3e/uDgsriCgXw+FT6PVn8cpXDge8bnwYfP0nnuw== 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=7NssOlKdLzfHHKWDCDYZXC1mkRJ0vf3w/eYL1VjG9bI=; b=XXUV7VYaSdMm2MkkoS0Q1vFxYiUBvqBXGt8Ps+YRFALULot8ioIH1uIReyVuCinqIfu7WEwW0uUZitS8CrLZecqFQPE/6J65P6am9UgOUjtjT/dDTGe3gFj9OwoUzE13usvvnrpNLX3Ku8/rfjxMaFqPA74CUbXBIQJpr6G57Z12kQldZVCxJjdZ8PShpAyDkEgZisvhQr85WT7uL619jccCLbih4Xe/ZcnKc0Iyvbbav5pmyHL8egGOPMtQ/4S/4xNRFxEAJbklt1/nB3AGK7jZ30BxSylye1PL93POptsqzWHTdCUIJqDdmE/aXuVrcqasK096Wxw8P3a0B5Bq6w== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by DU0P250MB0916.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:3ec::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Mon, 17 Oct 2022 01:35:10 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f%2]) with mapi id 15.20.5723.033; Mon, 17 Oct 2022 01:35:10 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Mon, 17 Oct 2022 03:34:42 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [zYUuFcXHl1808fLjWG8ZjCx8IA07j5Sp17uO2kYZZKQ=] X-ClientProxiedBy: FR3P281CA0056.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4b::6) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221017013442.944352-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|DU0P250MB0916:EE_ X-MS-Office365-Filtering-Correlation-Id: 89c6ef7e-a195-4650-a220-08daafdfd43e X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmriMkceEMr8g00cHUekKy/ufTlndA4FdAcZeqIVNXp5yPMtQx4yQLr1g0QxRRb3EWogldxCXdXQaVvGWvYwRIWoe9hAHbFdLQc6Ms3YepFigkeNxnjSNjziu/I5qSBM4TsmEj1z6UuCVxqxfWp9VuSF1mgJl7aNROAX0zQfs+kDFDa7wwgje4Z8cLv9edC8LDpwLNv1b+U7B7vbinVb8S8RZGKsthgwnrVoVGHF0DHJ2ISvy2pqmdE5CfHIGM7XjRYwCXXbsnpwL9vC6BwMsVa7mqFyCStrc3Irdv2Aj34MRM1BwAvpdrvtslF69ta8MoX6gi9kGXj5oZ/ATOaxCyvSmT2/qYqufzVTS/rwz5wmYJ6+9jK9YIonUMZ6JvFlMF/SuvBbZtgdVSLRFYRdtRyy6za+bPDODfgmwkGNLs4aX9Zd1YKLTnmlLjnj62Xp4PuvK6fNk5NiktczenmEDpP9WCL480rkV9XNppaBUqH0onsBTw0KGkejDsPX7V/14yxETnDjUYFG07T44E8UANQd907lyGLLtVny/5FcoXlFsaTPV1uf8S2ugOKGJMJgUduB2VcJEVABcVWV+VAGevs4tvqdqi9gofSFH22tLfCZZadMiudeamK6wVv/3dTqgbUVL+he9YCaDhTWPw5dwfccZhNOIehr+XC8hdZUbAulUDThuWPkjm9+ZtjaDPspeVyTvfQulTubUKjb1PqqGe7FkMM1zMrhpti3hDfgVN5O+jYFNdomqqsiWCoVa7Fc+4U= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-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 89c6ef7e-a195-4650-a220-08daafdfd43e X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Oct 2022 01:35:10.2287 (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: DU0P250MB0916 Subject: [FFmpeg-devel] [PATCH 6/6] avcodec/mpv_reconstruct_mb_template: Optimize dead code away 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: JEAwnmCpRllF None of the MPEG-1/2 codecs support frame threading, so one can optimize the check for it away. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpv_reconstruct_mb_template.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/mpv_reconstruct_mb_template.c b/libavcodec/mpv_reconstruct_mb_template.c index 7d74ec1f5c..5f2a19e587 100644 --- a/libavcodec/mpv_reconstruct_mb_template.c +++ b/libavcodec/mpv_reconstruct_mb_template.c @@ -121,7 +121,8 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], /* decoding or more than one mb_type (MC was already done otherwise) */ #if !IS_ENCODER - if (HAVE_THREADS && s->avctx->active_thread_type & FF_THREAD_FRAME) { + if (HAVE_THREADS && is_mpeg12 != DEFINITELY_MPEG12 && + s->avctx->active_thread_type & FF_THREAD_FRAME) { if (s->mv_dir & MV_DIR_FORWARD) { ff_thread_await_progress(&s->last_picture_ptr->tf, lowest_referenced_row(s, 0), 0);