From patchwork Sat Sep 10 00:19:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37811 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1229599pzh; Fri, 9 Sep 2022 17:19:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR79bpY9lZ7Q7rUdIOXTf/YR+RnGvOEWOpQWjGEv/8lVvNU8L3Qt95noBTN3eFOsQUgsfRCm X-Received: by 2002:a17:907:7290:b0:77a:27ef:18d3 with SMTP id dt16-20020a170907729000b0077a27ef18d3mr3108546ejc.42.1662769180258; Fri, 09 Sep 2022 17:19:40 -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 sh9-20020a1709076e8900b00772c9838c45si1610653ejc.701.2022.09.09.17.19.39; Fri, 09 Sep 2022 17:19:40 -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=HL9qNGsr; 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 3ED9368BAFE; Sat, 10 Sep 2022 03:19:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-oln040092066028.outbound.protection.outlook.com [40.92.66.28]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B7CE68BAD2 for ; Sat, 10 Sep 2022 03:19:29 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V/jcLiG0vaWDjlCS1wvXQQjZbqRsu/Yd4pK1Wdm0ErKEmepDA3yKASXHlOUhLHWQ297FXBHdMRqJXs7qKXtT8l7Zu3vSWJYXg9hW5WzZok1r+oF/wBR/g2NkpJIOX+rGF1TDirnOrDFpP22AcnDiSHJIJHX4akCrWMRofASrCishvk+ys1/3F0GOqnSImkw+I3CmmVKrDthBpYMitFWbBCv0xPSmE6kcCrJxHhJO1+h3Kvi/SeRsJpb3iowZxXUE88zqR4jKp251hZCdfB00etJyRyL7W/t5VZaDDbuRkknlK1d7Pppva9O1rWTP9jC/tdsshiwENKo3jlAUMC8Gyw== 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=Xxdkp/9JXVw4HtStifA5lNV2puagaSYMTKYbNQb3hfA=; b=fWJbnrq/f7EOWMASXF1Ucu+LX/IJ2E+FbgfxJ4CwyFKb4J8ePLtlVr/8cMR5nPzpwALHwvH2UoZZlYRkkrOzr1Nn6/Lr3Q/a4lPesilEg7scxaCy+w/2bFGm8IWe8ASQHRGwkqlcRiZm5Y5w3jioefRhqV80CKlzipzdi1FhaatWm0AmtPSaF7V2PbS9ax3tHfKzw/oST5VXkq/rwhZaDqm7EWD5FYYrv25jAUEBu4Sk5GGj8aemFkl3EmNURVhqmOfbM3x6LCPCXSAUP6iav7dAzLVWDxV+/kCsXNJJhwl4qoGUAElo4aeRSJsnyBFdWeD/xhzq1Sf4zlTJscscPQ== 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=Xxdkp/9JXVw4HtStifA5lNV2puagaSYMTKYbNQb3hfA=; b=HL9qNGsrSB1iu0XUBzrc8T8GO9NPX1kYfjAalA6/46V9IyGpUaAq0ws/hw0y0KfwdQxqCV0fj41sIBYgeV/OfCOPk+jKg71eXFAEf+srxg45mM4ekqg63erS89bUqHo/XLuxn3D9jjRMmt/s9WLUSchtUZRRbcEad1XAXDoYBGdxtQlAEgmLesOHkqGr9cn//ae2KxVdDE+IiHg0ojoVemSNAmCRdI3O1vKKHmPnJ3PSyi3AhdYnVGkGHsPwD3NxFlWrDHDM/f8Nkw7lihpt4cqFjO5VtZTp0z+lgrYRU8DneyuAqC0mwKEnKBCAkf7IHbriE8/ytaC6EF/KkLwVzw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by AS8P250MB0332.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:37f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.20; Sat, 10 Sep 2022 00:19:28 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 00:19:28 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 02:19:07 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [1OUH6NQuazaRxQfZfLSJr7/6Vn8PONo9F1s1zEPOa0M=] X-ClientProxiedBy: FR3P281CA0134.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:94::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910001924.2960794-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|AS8P250MB0332:EE_ X-MS-Office365-Filtering-Correlation-Id: 651afac8-36a4-452f-9d77-08da92c21fb8 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgs+WSeRwG1BSEYCDiBZA/9vdjcXhNJeElfrL5SizqJm4Xj5s0rX2p0O3rLDO1PmfSMG8VvfPkVEgh7ScRaqdMCBl1ejUaf4UMGWKidpqxCT1lfWLY0RH79JDwFq30YNpgljqfVmKJECJNmi2uQJ3wzXd4Vq87qvY/p/p04TecWEawEBrEp4CpJp8ClSDU353Y5QyXkKJ1yansjQVIzUrVYfv+Tka//fjJouyWSI9CN9gb//FPBCdOtxbSfMgZktiKyTfUCTO7A0aHnqymLkFcWr01ubqMB8K6Af6+ankwLeNFDOSMUrHXGMpRwtennxhJ1GxG0mzEl9opGrddWUCxKd9QZ3hyiL0JDzQANtXMSCvoSYJbG/Ch82nIo+4X7+eRF79Yekc15uWm5S+GKh/Fd7bIQutOUCJswGj7FGzE0LBiOkx8w4XSqW0sbk14NbCzfAUHikKxS03elqZTf7YVP6rzEaCmAOi9CgsN/nsXu0xiJeWc+JP8Lw/rCsebCe8fNgnLgB710zZSxYAuPbbs4AyLvGVkEWscjI8otXgs+yPCW/NyO/Kd3UZadUPp+IqlJzzHE2R0k1XoZ074SgQJFXk4mr1wanxK8m+OURNqA4w9E67cSVHETgRmliIY57gUXTF9miMXoc7v3Hh9e2ot68sfei6OqxzjpSy6LLU/zxADrqN1i7YqNHlt0/tU8Yi6NbhMplODbbK5kRXGn09YTxLFjVRM+d2Yg+pZDp6VhXelXpY4Z2HjNY= X-Microsoft-Antispam: BCL:0; X-Microsoft-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lfvYzUx6M7tlqokwlqBXK5xn8jFpJ9A3TLMr0VL+QL2N0FrdU7LqQlyNU9DejpO8SPVlM1u6//utJRD+uXqsbGrFlpswGNZnV5BuxdleLyrPBteRX9ADD2XPLY+Jc74+ZftlrxP/v8D8BeM/KBDa00b9eNzFmJgutdwM/8BfCWA/aH8stENDvQzwPKuQDp7lWj7B8dCgFMZBhb/RX3tWXrNMhxwyPtrbk+GD4kfMvnSsun6lhOvNvrrMJblPSsufMZTc+kPkk+RXD/AuX3kYuuNqpt6ZJz3uZ47xGy6wGQL+r3kCOfHrW0JheeLoVR3+tNVUfPo9eU0aqSULANlb3Jt/ViB2Px/HkilSR79ybAF8JPuKz/72V40oljITgCj1mgIsZHQ7zs92j361tiX4ul47otKMKGHlvck6jqgNXPrFZjGJatx6TMhexwhtQZD9IKNAh99k+jzLPSTeX9RNbFT+gRTzy+NiWJ2cFAndAPJ+Bq4VRUB8V2yF4TTU7PAkmZVArNbwj/H+F/Fil08qdOYwcU+flH/BjHx5qnywqw1dDM4x/0mWItrqvspIB09PyX2WxJp/e50RXVqkDzEjmquxOjjApHkVaiTo58UiuavveyLtFSqPPPup8eQQgYqHK19xe8+bHFH3Mbt30PHq/DlcnTdFJmYNoHPrZmf2sDaEOTmKOnR6/SnQiNAUNy/YYVmKFcv8ZYlryWsE+l4wy4kshYCrOJvEwoyaEA2gwPNtVIVNHcejlIo9/Y+z7WEWzT037HQ874+cqmAaUpFwWG3wOuS/9PsKMdszkKL2aB2wenjHBNyNyKJ55Cc8OfFNRJBl2F1rh8mZhLIEZ7caz++53y7j9gQD85gKVwKE4pcZu27cMoarjoduSSMQkxpAOPmFnNkY3eQ1SQbn86ZypzMgFn48qY8b4KtubssYUb00C3JA2sReeO16F6ubqo4aS1Qb5Ch79bs/ZgssJrzBLTyV1dKUbrrQuzc9IQSu3Fz X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 651afac8-36a4-452f-9d77-08da92c21fb8 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 00:19:28.2193 (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: AS8P250MB0332 Subject: [FFmpeg-devel] [PATCH 01/18] avcodec/vp8: Disable segmentation for VP7 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: F0YL4KmuGh5m Segmentation is a VP8-feature. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 0e16e75faa..c00c5c975e 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -637,7 +637,6 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si for (i = 0; i < 2; i++) memcpy(s->prob->mvc[i], vp7_mv_default_prob[i], sizeof(vp7_mv_default_prob[i])); - memset(&s->segmentation, 0, sizeof(s->segmentation)); memset(&s->lf_delta, 0, sizeof(s->lf_delta)); memcpy(s->prob[0].scan, ff_zigzag_scan, sizeof(s->prob[0].scan)); } @@ -2165,7 +2164,7 @@ void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, { int interior_limit, filter_level; - if (s->segmentation.enabled) { + if (!is_vp7 && s->segmentation.enabled) { filter_level = s->segmentation.filter_level[mb->segment]; if (!s->segmentation.absolute_vals) filter_level += s->filter.level; @@ -2435,7 +2434,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void else { // Make sure the previous frame has read its segmentation map, // if we re-use the same map. - if (prev_frame && s->segmentation.enabled && + if (!is_vp7 && prev_frame && s->segmentation.enabled && !s->segmentation.update_map) ff_thread_await_progress(&prev_frame->tf, mb_y, 0); mb = s->macroblocks + (s->mb_height - mb_y - 1) * 2; @@ -2791,15 +2790,16 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, memset(s->ref_count, 0, sizeof(s->ref_count)); if (s->mb_layout == 1) { - // Make sure the previous frame has read its segmentation map, - // if we re-use the same map. - if (prev_frame && s->segmentation.enabled && - !s->segmentation.update_map) - ff_thread_await_progress(&prev_frame->tf, 1, 0); - if (is_vp7) + if (is_vp7) { ret = vp7_decode_mv_mb_modes(avctx, curframe, prev_frame); - else + } else { + // Make sure the previous frame has read its segmentation map, + // if we re-use the same map. + if (prev_frame && s->segmentation.enabled && + !s->segmentation.update_map) + ff_thread_await_progress(&prev_frame->tf, 1, 0); ret = vp8_decode_mv_mb_modes(avctx, curframe, prev_frame); + } if (ret < 0) goto err; } From patchwork Sat Sep 10 01:07:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37812 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245273pzh; Fri, 9 Sep 2022 18:07:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR6MmNBPDGeNLCACV5s+VbX1dcw4kB8AsL9lg/v6lb+EDILCNUvZH5W36neeKkr9BeGFvoqV X-Received: by 2002:a17:907:2bc3:b0:76f:5a9b:2039 with SMTP id gv3-20020a1709072bc300b0076f5a9b2039mr11405311ejc.534.1662772067950; Fri, 09 Sep 2022 18:07:47 -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 du21-20020a17090772d500b0073d543f0ca7si1683502ejc.404.2022.09.09.18.07.46; Fri, 09 Sep 2022 18:07:47 -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="K1bSpQ/L"; 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 75F4968BAEB; Sat, 10 Sep 2022 04:07:43 +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-oln040092074065.outbound.protection.outlook.com [40.92.74.65]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E4C1768B96F for ; Sat, 10 Sep 2022 04:07:36 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hp2WHwc0TpL5YthUfd20nGjY0BYvS/25B+ZXtc5pewIqZBrNl7Xzq6t4GEZ170K98tU6WRmFGA9KKAyIsWTYBFUKSMUiG9N5NXXJZXGDX7Ek8m4gkK+5CNpOEQojPLiwEUX1IkwFjs9At4SiMYtDm1zemBTZ5mdSMUhLv7nkH9NwV5x4tLNrRQL1xZLgpnVkYD55ymLfVZu60QtsFMPgMjIRn67z1i7rHdm8c1M42LyqxgRgFzpV71D7Uf9HQA9/6688GnMl0oZiNpPUSV8owPYY72CK2BdPtQSMqMRznuksjH5+y7Mvi4WKHicM2yXrmvpukvV36NSzm0HqMr7jHQ== 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=Z8If49hmlb+Q+i6WfmJnEetTdpEAzillRzi0EMos/iw=; b=VzuWbdb5wAaR1nVPHJUHkcd348YCK5UyZUmvrz9V3qdYT6DbjNBpsstSi0PL2aZXMTva6e4OfWKlyAxCLtBA8jr1ze0kMEMFH/UmJx15Vm0ha2sV0p7FiABVXDQoVDg30bnctsMNScs92tvrh9Kbs+VsbP1YKcFP1NkhmBHB1HQxQqQ9hGz9D02+OQwz2ZuDXmgsVzQ6loae8RzFkljjCzm48ako95U+mjujq38BesoQ5f6XxtVU+mt1i2gS3kOXzY+hULRPpJcg+5B5LfQoQbc19hCsXMoXSgmyYciW5gnd+JcCyw7DKwM0x8hB+N0G9k3vLnzV/3eBwdsr6tPEZA== 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=Z8If49hmlb+Q+i6WfmJnEetTdpEAzillRzi0EMos/iw=; b=K1bSpQ/LMDvH/TEIuJULbGFSFa8rEU4eQgTvkB9etXH5tNR5UyFLhCklNlqNpnwiRAyRMpqKiCTB5muz72QRJKmOzzWabIE/ytslYHT2x0EXuzPr1RZtzc69OxJpUTJmKwUlEp4sFKGL8mLXsafgebxZd3wQ7MY+5li7vaJSxAxSAbAATkwMSO3S5pFnQplyf2qC387vswsX6NGO6pCBqQ7aO9yifiRQ+v1Qkf8eyMZReITSXdfUcSCvzSU9q0Dwc46lofsBb/PiON1nU7KJ9m66as8IQIeood5ZY5IO42cwOySV/OP4nYc+2ae/awEN4xjxSh7tsrFF5iQQ+YkSsA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:07:34 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:07:34 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:13 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [zhS7zGnEYW8BD+ZCRa1XylGp2BGTear5OE2MgriQvO4=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: a8897c25-38f2-4f88-55e8-08da92c8d7f5 X-MS-Exchange-SLBlob-MailProps: feAVlmA1hHUQtsN9OYW0Di7vGBh9sWHZqAF1Q+eyZEuOZ7JsGt6MX5cZ7tuuAS5PP12VO3SuEU9m/uay7z4sjyj38/dL4zBeB3wQt5TjG5fw0QaHFTdUBXmfSQZlEed06hCDtU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2hJ/TKTAQEqz4z40ROiefQxHJ0/bzIfcskzkStA0OQvQGDu94AmiZUhRQowHOEwQgrRkYb82yW5nIMvh5LbXKfdgfy2t8HZkSHXJwy9MhlCH6hgdGo6frg7gMjHocHt/VbPnoNLm4mVQZUi3eOt4NvnTscWUmfginQ5ye8r1Wd7rCupEEnnGYn3RMQBdvrECMRSS/ERrSL6r8Nfj7TP8dTaTuZWjrIoDE4l4titHB+QEl6BGhc2ecFTAknYMMPYcOEWw1ax2M6bI1us8i9XmtA6OM0u1V+ybmPKNCn0iBC0CjxFzV1PKNGbyVCGIit1zoPFFLlNAC0Aor3ihm4JyX+7hGoYMLhoRpbMP2iOuOUu3xl/9P1hmjLdHXGOX3wt9NssUdkY8a5MtMfmyMzQ/BHnF2RcF4QMWdUYwXj0VOXpzTMDyLaA8FTcrq/AO+Nat+HF9fBivfGgV22Zuz0+6T3O9etZmBuvMZmGgzzREV+HaihnYXSluYQ2eZs+gIMqFiaCJb1EB08pPFzM9L6QX/X9NM89ndKuuSS9TEfpLjV7T1OcW79dz X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a8897c25-38f2-4f88-55e8-08da92c8d7f5 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:07:34.3308 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 02/18] avcodec/vp8: Disable lf_delta for VP7 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: 1ER8KjZMCzOV It is a VP8-only feature. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index c00c5c975e..04a2113cc8 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -637,7 +637,6 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si for (i = 0; i < 2; i++) memcpy(s->prob->mvc[i], vp7_mv_default_prob[i], sizeof(vp7_mv_default_prob[i])); - memset(&s->lf_delta, 0, sizeof(s->lf_delta)); memcpy(s->prob[0].scan, ff_zigzag_scan, sizeof(s->prob[0].scan)); } @@ -2171,7 +2170,7 @@ void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, } else filter_level = s->filter.level; - if (s->lf_delta.enabled) { + if (!is_vp7 && s->lf_delta.enabled) { filter_level += s->lf_delta.ref[mb->ref_frame]; filter_level += s->lf_delta.mode[mb->mode]; } From patchwork Sat Sep 10 01:07:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37813 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245334pzh; Fri, 9 Sep 2022 18:07:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR5mE8kIajiIWPdE7vJ+T9VouvycCdppTmWxyFSTKi6X5dDeiQhysGYHiJsWyrSka7g0g5yO X-Received: by 2002:a17:907:74e:b0:74f:83d4:cf58 with SMTP id xc14-20020a170907074e00b0074f83d4cf58mr11921870ejb.178.1662772077421; Fri, 09 Sep 2022 18:07:57 -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 eg46-20020a05640228ae00b00450ed06bd86si1573911edb.619.2022.09.09.18.07.57; Fri, 09 Sep 2022 18:07:57 -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=BrcsuYZ4; 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 8755768BB0B; Sat, 10 Sep 2022 04:07:54 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2089.outbound.protection.outlook.com [40.92.89.89]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2EAC568BAD2 for ; Sat, 10 Sep 2022 04:07:47 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PTBTknodE7oNgh8fFuCZqPGPtBGk0Lp4LlSygu1JRmZ+wyT0/VlNW3cmqKowvuUgmqE2hgHWyyG1y2gKdjqToD6OMeVO8RXX7JXGf/aODHpZxqVMgu+id61M24ZtcDOe5blvuajACXaXd6GR4LJxCoFR9ikoPqIrqao735Ekxtn+zFt5ucLxGQDt/JlGUDj6NjnhbGck71ti7Cd+EKpKLoc44UYaFsQckoJd3082TIrSvaaZePUEUBm1jaaVTj9nHdXf91PL2raGIZSlKlNMxYxQlJfcnuets7Ae2PxBvwuJlxqbs1FBKV92J2MuQEOwXzp02awe0DrqzZPz0nyJ6A== 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=X2J/EMOc7dJj4dlPWUAeqfnNysqoUv6+kztFarI9ZVU=; b=kDBoE8KqQwbbcunBBtQ3/Xyu2KdmSu6Fn+9XHqOWEaPM78PpZLQGlGjG/vAY999jZ4hAg3IpT7Gz674z3RZ5/XaZgpqRgsJlccsn1vtkd/7mCSHkUKSFCtYQ3wK5NDeRk7hib5KNmYaWN1DFbZINDpqmBgvpss+4iPr1ytrxB5dZExRP8KhpZnVNVLlE0ZaarCBDv1qGEUCj0h/S8tc+s+FTGVk+7uFrqbLbO/kkjqKFXSbIFyoZcOBFhpCPPBbFnTvLMw2niisQBoBpnht+3pqY+1cvi5466z3ZTU0o51IGncYrWKn3gEk+gizmeia3ewItsNZ614OjhXgue3tOrQ== 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=X2J/EMOc7dJj4dlPWUAeqfnNysqoUv6+kztFarI9ZVU=; b=BrcsuYZ4d172sikYrg5yFVvxbD16R6qAdGBEzHfMCIHfxatTn/fzho0osUpbVsWc7Kj2CI9lCvNuIZignypJT5pJsrkMgvkQoJne1eGXhDKCnBh8RZnB9V+1L85/lKfoCvuNEn0pmY9ZUs+dmOlGJUv/Asy8xYRQRpXuKUum45Eut89LT1Lc3rXB7UjS/LBP5/DEeGRl2QvlyHqYSq9M8dt4x/BUviazDbMwGBA2nyhVWsmBLIu+DD+kAIcGArjZDBeHEnFKNlRtcDNdL3N9TertKhlYp1QcU69urrdnLWxEQN5StlC7GW77/num5yzIDvpRCBYTqIddhTY1Y6g1Mw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:07:45 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:07:45 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:14 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [chxxE8XoFCK4br6cwk+1t1HzLjCxExlIz95GYGhla2I=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: eb64c71f-ed0d-469e-2cbf-08da92c8ded3 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4So7Lhd0ImI/oLPl9VMvfQM5iAdGBSvRTrAXnkh8OUc8kc+J5vgMXusFg0OmyNsMbZ9KCmnhW6nKrboiy7FHhHGxJo1N0txKs0W//x/wMMWKx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D59z9MhnyW7j4NgwOOgGqK3guOVVaLI3yk3gUoiQk5BC5ebg29tEaodrOa6KbgluVBc4Kbc93cP82cfnxG7CCxjjWA3tTquv2qv6NivSHibmI8TpD+TksuP2wc96gwoS5lGKP3XhWE4VDOsgqEwzZk04d1+7iGC2HDRn/zhveTqNOcouY/CV8nOn/WgTwPnbAXN5evUj3klvi9CRgwZibHZnUMs2rAZ1adPh5BjnbTY9O8vIqFGBG7FaUmUilIbakx5tEqxEMqave+ysMqJS9gjSlbV0h6a/xti6R5qDWy2mG6HXBs+EW+uWpz9DD4oQIuwgpba8svWHiiVDPCRP3qqfpMQv7AEeFx/7BZrzIbUb2jSIYKAW9Kcf2bRtMClH1dQDIfoD1QAkI7ViDnaE3shMxrkUhQyjSLWNqWur59h5fbV7wotyw0MSsoyOYgLb/v1WMHPVnX1cvnn3+9OyWG1/w6kjb6rUph4KTtVjFoEiMiwg5WNK5anu1tAwHNRtxuIJjzHn6ZkUgAW/VhzUyPwED7uYlCzkJ1QxJIyW3q39CmoHcvScgQ5ftDCOhKKmPE4H+f+heidYjhaaMe+aLLGgK39 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb64c71f-ed0d-469e-2cbf-08da92c8ded3 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:07:45.8029 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 03/18] avcodec/vp8: Remove unused macros 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: lcXmi9dzF+X7 Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 04a2113cc8..50e879ef0b 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -44,14 +44,6 @@ # include "arm/vp8.h" #endif -#if CONFIG_VP7_DECODER && CONFIG_VP8_DECODER -#define VPX(vp7, f) (vp7 ? vp7_ ## f : vp8_ ## f) -#elif CONFIG_VP7_DECODER -#define VPX(vp7, f) vp7_ ## f -#else // CONFIG_VP8_DECODER -#define VPX(vp7, f) vp8_ ## f -#endif - // fixme: add 1 bit to all the calls to this? static int vp8_rac_get_sint(VPXRangeCoder *c, int bits) { From patchwork Sat Sep 10 01:07:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 37814 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245387pzh; Fri, 9 Sep 2022 18:08:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR77NUhCgS+gNdIjPYRpOvHTurvgY2Z8wHVGkaIEX8BOZFCZfGWBABwXJ2gtchcMLDtozJsw X-Received: by 2002:a17:906:7094:b0:73d:c95a:e66e with SMTP id b20-20020a170906709400b0073dc95ae66emr11438817ejk.179.1662772087318; Fri, 09 Sep 2022 18:08:07 -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 o8-20020a50c908000000b00448375a5890si1185285edh.393.2022.09.09.18.08.06; Fri, 09 Sep 2022 18:08:07 -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="rQgX/A1x"; 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 AD12868BB19; Sat, 10 Sep 2022 04:07:59 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2089.outbound.protection.outlook.com [40.92.89.89]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5140A68BAA4 for ; Sat, 10 Sep 2022 04:07:52 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ChOCiTD19wM9YPPW0N6xQ+SEkxLS17RS5OvKGYtNKyY4T3WetvY4ktYWHS2j4kVh1YbhnRHiG56+S4YRwihgxxZDray6sp6xJerGSLrI2TTC+OoW1xbncxVMHWkN0yzvfS/1uh5LunLHiIeqLt2cR35+Fs4ojdRm27aLS3odq1SGqpDlgVTJGeXfOreDhCFWqcTKvsZwBjl5X9MntW/ne5HG2ynk13XYv/BhUkC8gsP02PIcSkZztuhKOMsDp1YV4ak/aQJH16rk79af/+t1dmplFwZ/iH5lC7IBVr046adZ6PL9vEIFCn0zs4IwdyDKw4dLhFGxdWdR/LrhfTUlEA== 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=NYkHz8kABEz/q9TF/UQss9tQO19gefBmF5kuH4pAYN4=; b=kdYwHM6LqPbIuZBh6R+pvdvgKYMveH9fl7TNVWVWVDddsXt/BGbeB/6J2oTvGZyZfhzjQX4zN/GmcibJPpYLHBLiqiEJAMj6RIdG88i7XozmEFlIteQgGFA5Yk1nz0ixzP74PQAZTiYTbglm37to3apobDmY0IvM7hNaAlxEt4tf2mr+PYyO1nZWbGJ8RRwlgIGmiOTiOpeCo0FGFOruExESCEpcZzUjlgxXqaS/wCxPfuEhVlf8+9BQAZ4jUiKkeZi6BLPySvWZseZBkPEqgbW7RIZRmLv4ZvMv3cDYmGIOW8UH5VaNAyHig0rlKyTUe1PffdRuyx6AoZp+ENi+Ug== 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=NYkHz8kABEz/q9TF/UQss9tQO19gefBmF5kuH4pAYN4=; b=rQgX/A1x/lZQ98hozya+Nhk3tzbgLuKqBdotQ8dYxwGDX/p5voYduBq4OVt1IztFSoq8xCuy68/dRLFYF5Ry/HrVMvgv+3fFSutu+fuaUNa9aIzfmGqDKSya4yHp0qIA+eiBQ7Y4YSuvGqfuRVBRoKiI0Ipj9WCJWocf8XN8srt16o7Zo1NLBJ18GS2CoAkvhV9pkAAM4ttYVE57SFwCs1ez46cDHTSBrnK9l1zda/Ls6P5Y11qZiEDplsMVlI1ySOc4uE2712EFOCKUdMnQ63ko/+GQmwy0e2YbpAPTcwU8QqMLgOHonxrqINYDwgEFekUJ/T0oZO7KxCvQeO0kgQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:07:51 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:07:51 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:15 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [1ycXOTG5lw8rRc6CGLCHoPVOglQHa6BsD/avWrT0Z04=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d597c22-80b0-480a-95a2-08da92c8e207 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4Iv6XcjRm65lcHkyq540ELxq49dFMi2ErQ24jrjBYgGhdKe1A8eCADxyz5xmqReLAYqP5lUnW+8n+g7XO0u31GWI2YGpvt8C/gAdFB0XhrJm3YOida7k8nTPeqkNNHyZFIJOOsa7Z/dRChfySNHoYuhh93sdtxqikFZ1F3yJn8seQP6sjn0prNYIJXoHyPEmN3BuDIpaWnFXn7XLDIDEDgrQgNV0srP7SP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FE6RhLz0OyCcXJYwKW0cHljZe2I4Deq71wCQ+wChxfSqJR6gql91X4c7Ev14MW/2vSe/K3tN1fza+nN+bmtBU4e233xwPKltT+ZaJCYs96VRx6/JyTH4u9xS5kaKyu6+B7+A5Fm+0VfSq+MidibyFZggmD/PR+TtIbcXuJ6fy8WyDyqL5TuGUPqntT7jnMvj/rZ+W/OIdJUQOXz/XrhQuFEDpCf5BVIAOMOk/n689J8yXOY/5h9ed6GrVzgsB43JM9Dt9GU+Kln7nf8XWWIg9dfmfRs4BuiyIuZkiwJzxJDDZ/f8qxcldZvw1qwRnaSFU5xFeO+90DuqpgRAcfTxWJwmjz+SMYwU1emiX+fXztZlWBwwfgEk0VKms8ZskrzVOmpanzGlNyE9EafJhopuj/b0f7LFr5Q3Y8GjV+5vW+hpOfsO7298Qv02AytzTlNP4qW1yt234G0z6frSJ9tzZGicm0kKRnr+a X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5d597c22-80b0-480a-95a2-08da92c8e207 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:07:51.1483 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 04/18] avcodec/vp8: Inline mb_layout for VP7 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: EBXkDO+waylg It is always one for VP7. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 42 ++++++++++++++++++++---------------------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 50e879ef0b..635e45f87e 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -244,11 +244,11 @@ int update_dimensions(VP8Context *s, int width, int height, int is_vp7) s->mb_layout = is_vp7 || avctx->active_thread_type == FF_THREAD_SLICE && avctx->thread_count > 1; - if (!s->mb_layout) { // Frame threading and one thread + if (!s->mb_layout) { // Frame threading and one thread when VP8 s->macroblocks_base = av_mallocz((s->mb_width + s->mb_height * 2 + 1) * sizeof(*s->macroblocks)); s->intra4x4_pred_mode_top = av_mallocz(s->mb_width * 4); - } else // Sliced threading + } else // Sliced threading or VP7 s->macroblocks_base = av_mallocz((s->mb_width + 2) * (s->mb_height + 2) * sizeof(*s->macroblocks)); s->top_nnz = av_mallocz(s->mb_width * sizeof(*s->top_nnz)); @@ -256,7 +256,7 @@ int update_dimensions(VP8Context *s, int width, int height, int is_vp7) s->thread_data = av_mallocz(MAX_THREADS * sizeof(VP8ThreadData)); if (!s->macroblocks_base || !s->top_nnz || !s->top_border || - !s->thread_data || (!s->intra4x4_pred_mode_top && !s->mb_layout)) { + !s->thread_data || (!s->intra4x4_pred_mode_top && (!is_vp7 && !s->mb_layout))) { free_buffers(s); return AVERROR(ENOMEM); } @@ -1044,7 +1044,7 @@ static const VP8mv *get_bmv_ptr(const VP8Macroblock *mb, int subblock) static av_always_inline void vp7_decode_mvs(VP8Context *s, VP8Macroblock *mb, - int mb_x, int mb_y, int layout) + int mb_x, int mb_y) { VP8Macroblock *mb_edge[12]; enum { CNT_ZERO, CNT_NEAREST, CNT_NEAR }; @@ -1065,11 +1065,8 @@ void vp7_decode_mvs(VP8Context *s, VP8Macroblock *mb, if (vp7_calculate_mb_offset(mb_x, mb_y, s->mb_width, pred->xoffset, pred->yoffset, !s->profile, &edge_x, &edge_y)) { - VP8Macroblock *edge = mb_edge[i] = (s->mb_layout == 1) - ? s->macroblocks_base + 1 + edge_x + - (s->mb_width + 1) * (edge_y + 1) - : s->macroblocks + edge_x + - (s->mb_height - edge_y - 1) * 2; + VP8Macroblock *edge = mb_edge[i] = s->macroblocks_base + 1 + edge_x + + (s->mb_width + 1) * (edge_y + 1); uint32_t mv = AV_RN32A(get_bmv_ptr(edge, vp7_mv_pred[i].subblock)); if (mv) { if (AV_RN32A(&near_mv[CNT_NEAREST])) { @@ -1112,7 +1109,7 @@ void vp7_decode_mvs(VP8Context *s, VP8Macroblock *mb, if (vpx_rac_get_prob_branchy(c, vp7_mode_contexts[cnt[CNT_NEAR]][3])) { mb->mode = VP8_MVMODE_SPLIT; - mb->mv = mb->bmv[decode_splitmvs(s, c, mb, layout, IS_VP7) - 1]; + mb->mv = mb->bmv[decode_splitmvs(s, c, mb, 1, IS_VP7) - 1]; } else { mb->mv.y += vp7_read_mv_component(c, s->prob->mvc[0]); mb->mv.x += vp7_read_mv_component(c, s->prob->mvc[1]); @@ -1310,7 +1307,7 @@ void decode_mb_mode(VP8Context *s, VP8mvbounds *mv_bounds, } else { const uint32_t modes = (is_vp7 ? vp7_pred4x4_mode : vp8_pred4x4_mode)[mb->mode] * 0x01010101u; - if (s->mb_layout) + if (is_vp7 || s->mb_layout) AV_WN32A(mb->intra4x4_pred_mode_top, modes); else AV_WN32A(s->intra4x4_pred_mode_top + 4 * mb_x, modes); @@ -1332,7 +1329,7 @@ void decode_mb_mode(VP8Context *s, VP8mvbounds *mv_bounds, // motion vectors, 16.3 if (is_vp7) - vp7_decode_mvs(s, mb, mb_x, mb_y, layout); + vp7_decode_mvs(s, mb, mb_x, mb_y); else vp8_decode_mvs(s, mv_bounds, mb, mb_x, mb_y, layout); } else { @@ -2420,7 +2417,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void next_td = td; else next_td = &s->thread_data[(jobnr + 1) % num_jobs]; - if (s->mb_layout == 1) + if (is_vp7 || s->mb_layout == 1) mb = s->macroblocks_base + ((s->mb_width + 1) * (mb_y + 1) + 1); else { // Make sure the previous frame has read its segmentation map, @@ -2460,10 +2457,10 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void s->vdsp.prefetch(dst[1] + (mb_x & 7) * s->uvlinesize + 64, dst[2] - dst[1], 2); - if (!s->mb_layout) + if (!is_vp7 && !s->mb_layout) decode_mb_mode(s, &td->mv_bounds, mb, mb_x, mb_y, curframe->seg_map->data + mb_xy, prev_frame && prev_frame->seg_map ? - prev_frame->seg_map->data + mb_xy : NULL, 0, is_vp7); + prev_frame->seg_map->data + mb_xy : NULL, 0, IS_VP8); prefetch_motion(s, mb, mb_x, mb_y, mb_xy, VP8_FRAME_PREVIOUS); @@ -2547,7 +2544,7 @@ static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, curframe->data[2] + 8 * mb_y * s->uvlinesize }; - if (s->mb_layout == 1) + if (is_vp7 || s->mb_layout == 1) mb = s->macroblocks_base + ((s->mb_width + 1) * (mb_y + 1) + 1); else mb = s->macroblocks + (s->mb_height - mb_y - 1) * 2; @@ -2770,17 +2767,18 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, s->uvlinesize = curframe->tf.f->linesize[1]; memset(s->top_nnz, 0, s->mb_width * sizeof(*s->top_nnz)); - /* Zero macroblock structures for top/top-left prediction - * from outside the frame. */ - if (!s->mb_layout) + if (!is_vp7 && !s->mb_layout) { + /* Zero macroblock structures for top/top-left prediction + * from outside the frame. */ memset(s->macroblocks + s->mb_height * 2 - 1, 0, (s->mb_width + 1) * sizeof(*s->macroblocks)); - if (!s->mb_layout && s->keyframe) - memset(s->intra4x4_pred_mode_top, DC_PRED, s->mb_width * 4); + if (s->keyframe) + memset(s->intra4x4_pred_mode_top, DC_PRED, s->mb_width * 4); + } memset(s->ref_count, 0, sizeof(s->ref_count)); - if (s->mb_layout == 1) { + if (is_vp7 || s->mb_layout == 1) { if (is_vp7) { ret = vp7_decode_mv_mb_modes(avctx, curframe, prev_frame); } else { From patchwork Sat Sep 10 01:07: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: 37815 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245459pzh; Fri, 9 Sep 2022 18:08:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR5cFXQSIRFNf7GAW4GAobr+2d3yLxA6bV9hso+agqu6RTwIL3VV6GU22/hagIPopCscy7TE X-Received: by 2002:a17:907:2d23:b0:770:86f3:aafe with SMTP id gs35-20020a1709072d2300b0077086f3aafemr10772530ejc.400.1662772096996; Fri, 09 Sep 2022 18:08:16 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k20-20020a170906579400b007771bc8dbb4si1526667ejq.781.2022.09.09.18.08.16; Fri, 09 Sep 2022 18:08:16 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=d7O9rUme; 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 CA5D368BB1D; Sat, 10 Sep 2022 04:08:00 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2089.outbound.protection.outlook.com [40.92.89.89]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DFB2B68BAA4 for ; Sat, 10 Sep 2022 04:07:57 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l6aOlV/6wy8SfLaorPfEjm9RJrNYmOxveV2SlLIIS2nZDFrxteDaNkSifns1GotDq4G77+7dwEjSkLwKaD7psmYr0qlCp0QF8SqLQ2ED51PpU1ceVH8pJ/f+Ad/R4G4h+9lkA23v4I1PxfSJAc+B/p/rGfxR0HvbT1ZAQgeUb2I2kwycXK+HIKAmDvSNXDu8SKAsRaYQsZ1DdtDsJMoRo55XNeehLyJZpMM9eTr0jc8ZmWc35ieQJdlbWiiyIJtAgFE+0sEdFX6pKh9k4Skt69x7P/uzCgVe4c7riRb6VY2Z/cp9LKQPSbfjjzZ/RiRTnnLc9mnYCYfGL475G/w3lQ== 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=sKC8Pfrvv0HuGOBKGIRBQDx1k5/YXH13+8GemEXPfD0=; b=GJaAfLTJB4CWZQu7yhVs5LF3U8OBsx/ixUXZjEa5/XASzE5W3EEM7Jl3w/jisYSMt91pwiB2VUCmVWtxxjizEyB/msdT8YNph6rdLVomTQ0jFm0mutFSrqhU+vlaXStu6kqRJuGxZ6qNLYJdiOmjCfaxtJxrI1kWsVLj0z1JkgNuAubaTBFb6qlN3mPDMk4pO8za/0o8FECDOf24ilb/TtNonnx/6V7LiPBCFbozByQ5qUSeacmk78Jau/2b5GWQEwlPRcC+bY/Q+zgZHe4tLvEpEOsv6ND+rWqA2JRaKFcmHiAiWBldT5RxUAMm5179SJVVnrt4s7RiKrgMyuVY1A== 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=sKC8Pfrvv0HuGOBKGIRBQDx1k5/YXH13+8GemEXPfD0=; b=d7O9rUmeJ6MALje3+EaXeULbmQs1Tm87R9i4D+GBmAVuN/jy++GlqRZB85OtyWh+pn7teuaiWp67xx+MRefbHHiYgMHMLh0/4HASu6va29BIRfbsFlIr/S4NqFLUv77pCrbqJOgUofMtfzAxI50tmOz+iIfqrDJhd+QRAbdW3PZEyEIIS6xdAROKCd2B/QnCNMXmpFKinxzbQRExnWE2vy2IOEmoDQN1uHqN4/2jLp+oEBLi/DOzpKAVcG5/j7WfwG7lg/gPODtz06XtTOo27EoBK4ElFnUp7eF929PwrE1KrzRr9FPnyxxZyz0VnAvBXp2zYZUjF+DLRTZg8RTfMw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:07:52 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:07:52 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:16 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [6/a5psH+gAOXQrrw2O3Kn6taN9lDv7i2nFfyUoY/naQ=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: c4322bf1-58b9-4d00-8698-08da92c8e2df X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4poxq2B1EyBcOsVAtB8gLUbXGNNmWejVxxZp3UIulfCybHiYBRByNf/bgS4z1uwlt4ec8p1O8oDcz5JH/RkjiTOiKinEvz74Peo6jaAVIE2tnmo1GUwvSuBkmoSTXKD2iHJOwxCCz+UFy81kcFSzujaIq37dirTWLXRswnKuM/QryZSpfFWUEwD37EeLGMdOrDBKVkEGlvcN53GOuIkqeZW8phcSAn2g5SIllLCn6g2UJfeJ7s7c8+krLAM6kQqUw1rNXm99em5qxEdXly1/Zj1zvM20I/itbxR4h1rnw5xhk5dfCLlM7tdM2IA37n4+40/i8NGnnysIdMcf5lN8NLC32HhG6XL54FdFmeGOofflWI++yET6ADZhyPWJatBmHkkAZXs+RylMuEH1L7Mov7TxjHcYp8H6RNP+nfB4hmiQWMFS9Gsxcn9KMY+sRAahRbs2IU6qaHmdNCpS+xNzduW7K8z79XgTXwsqrYNL0Ce+NmcCrSqc3hTv4CRtevFjph2VVs2QmEus4fkjcoGgXADQPWxrYYp6qKBT3O4zbvH66zJ9vwlDPFbzOndZ6VK9x5F+LOEUCZuNiIW5fYSspuzDrkVTZxmDocxuq2zSAKbKiBvmpbuGAAX3BUVzmmQ2fZ4vxJYVcaWxdhj9sZlfTWnoIs2cD8IlF+ZMh6fHqRqZXGJ510N3s2Ib7HM+k6w35N78g6qgFvy00gKgryEHkKDJzgP7EHSP/rj9kyvqisY4= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gdmkqo6lzK2B+GXesC1AzA5+Brx4jE68akmFzf/Hrk6y4ObyslfZJLqGBp/zmokb0Te2QzHiVCLZF938U7g7/uQyOVtt8lQu8XAPfa8eGXh7oxVN9AwVEDSpXco/T2pNpec519TNTu5/P4GxkQ0uLxm0e+qq+nCEKjPJ0xrZ+cGgUZy+NZSKAMIvFJaxrXNpjQhgVwLu1YhBDw/RAUJcspHNcHhmic5+XZgSIG9/a4c8Pb8iuZ2/2aMZPxCHbNe6ZGUZDgepuQQkXVPP9BjfOBl1qw2/cKkyDctb/6MsHSUUrHZgJcK5wFWUuq9BUZpYGcJALec2R99pjZkhcjHXmlDey+d5+1MlWCyAE689aI8SDshTttzkZPJM4QJq3tgG5hJu/IqAzKtNLW5N170QPkya5hE7RYLyAQdH1abbcFgohqimzN5BMFpfEHa6XyZ6BuuPYZOWxYWOnZe8Cb/RVvm7SO9ab59fzqoRAZFvWXOSmU0qna5vr1o5ODmyX6r8JvwT5bO/kCpYn7YEvap/ks+8/WMjBdF+XmOMIRJkK1Y7inkkopJ2bja2E2DMphrfaicHuXRDXDut0ngkxeY/Zi0bhsSsuG059btZIMmZ8WccUldEiSSkL8b3A006wQWX91JS55o7d0u6Wpakx/MPaA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: NrOk1m1JHmxzTao/Yl87DqrEX8dnnGgjjZ86/Eyscj8KQgxvrulYqr8/XdduW06XfglbebehLmaL6upHaICyOD2Fi+DBN5LIcbQ3tapq9YULxOGqFcsBCXFv0JR8YCLHBKCcDsaCNkoC8D5dfQ++x990HKGfzYEzQO2m3WXmscaK1elkP7//FAre6d6dJNDXDu81TJQqaJN54sSBRsb5ybdwSWbc4yGX8opshzZVQ43O2UFEyxGM7Gpmiuy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61K64DIf4xmMK X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4322bf1-58b9-4d00-8698-08da92c8e2df X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:07:52.5479 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 05/18] avcodec/vp8: Inline inner_filter for VP7 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: JBL7QrTH3CFb It is always true for VP7. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 635e45f87e..35d75170f1 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2223,7 +2223,7 @@ void filter_mb(VP8Context *s, uint8_t *dst[3], VP8FilterStrength *f, } #define H_LOOP_FILTER_16Y_INNER(cond) \ - if (cond && inner_filter) { \ + if (cond && (is_vp7 || inner_filter)) { \ s->vp8dsp.vp8_h_loop_filter16y_inner(dst[0] + 4, linesize, \ bedge_lim_y, inner_limit, \ hev_thresh); \ @@ -2247,7 +2247,7 @@ void filter_mb(VP8Context *s, uint8_t *dst[3], VP8FilterStrength *f, mbedge_lim, inner_limit, hev_thresh); } - if (inner_filter) { + if (is_vp7 || inner_filter) { s->vp8dsp.vp8_v_loop_filter16y_inner(dst[0] + 4 * linesize, linesize, bedge_lim_y, inner_limit, hev_thresh); @@ -2268,7 +2268,7 @@ void filter_mb(VP8Context *s, uint8_t *dst[3], VP8FilterStrength *f, static av_always_inline void filter_mb_simple(VP8Context *s, uint8_t *dst, VP8FilterStrength *f, - int mb_x, int mb_y) + int mb_x, int mb_y, int is_vp7) { int mbedge_lim, bedge_lim; int filter_level = f->filter_level; @@ -2284,7 +2284,7 @@ void filter_mb_simple(VP8Context *s, uint8_t *dst, VP8FilterStrength *f, if (mb_x) s->vp8dsp.vp8_h_loop_filter_simple(dst, linesize, mbedge_lim); - if (inner_filter) { + if (is_vp7 || inner_filter) { s->vp8dsp.vp8_h_loop_filter_simple(dst + 4, linesize, bedge_lim); s->vp8dsp.vp8_h_loop_filter_simple(dst + 8, linesize, bedge_lim); s->vp8dsp.vp8_h_loop_filter_simple(dst + 12, linesize, bedge_lim); @@ -2292,7 +2292,7 @@ void filter_mb_simple(VP8Context *s, uint8_t *dst, VP8FilterStrength *f, if (mb_y) s->vp8dsp.vp8_v_loop_filter_simple(dst, linesize, mbedge_lim); - if (inner_filter) { + if (is_vp7 || inner_filter) { s->vp8dsp.vp8_v_loop_filter_simple(dst + 4 * linesize, linesize, bedge_lim); s->vp8dsp.vp8_v_loop_filter_simple(dst + 8 * linesize, linesize, bedge_lim); s->vp8dsp.vp8_v_loop_filter_simple(dst + 12 * linesize, linesize, bedge_lim); @@ -2577,7 +2577,7 @@ static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, } if (s->filter.simple) - filter_mb_simple(s, dst[0], f, mb_x, mb_y); + filter_mb_simple(s, dst[0], f, mb_x, mb_y, is_vp7); else filter_mb(s, dst, f, mb_x, mb_y, is_vp7); dst[0] += 16; From patchwork Sat Sep 10 01:07: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: 37816 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245511pzh; Fri, 9 Sep 2022 18:08:25 -0700 (PDT) X-Google-Smtp-Source: AA6agR7BTi/eGytphGlR/f0LjfLYC1sjLU1sDTwO982X+Se68BcMmxsDhHkmgMnc07L11uV6QfSd X-Received: by 2002:a17:907:7fac:b0:741:4247:d856 with SMTP id qk44-20020a1709077fac00b007414247d856mr11297090ejc.565.1662772105214; Fri, 09 Sep 2022 18:08:25 -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 ds10-20020a170907724a00b00732fa7c5058si1847581ejc.300.2022.09.09.18.08.24; Fri, 09 Sep 2022 18:08:25 -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="Maj/Kzy3"; 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 C984068BB24; Sat, 10 Sep 2022 04:08:01 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2089.outbound.protection.outlook.com [40.92.89.89]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2059768BAA4 for ; Sat, 10 Sep 2022 04:07:58 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RjcqcVEJnGD4Vf7SHCpJwoITOqLlwFC30BdGI1rmLqyPY1iuDVKSJwLelJKnoeMoiHY6Ml5XZYeCs3XdBpibUm7RpCE7shBeslCiwmjjJFKbE0BUINvJPTSvETjIiA1sqKNYEBOycCMB/Z06RS+6ilbGaJQlBogQwIitDd47AwYbGI/N6Z05MwsqtGJWXWuf2VsJZtA9XSxO6tacXdgmbebQrJHyls9fAe5Ek5UhXvNLyoaoT6bPEURT2gXoIMBFBnj0iW+yCRHFSinDisJ0DY0auaBvjCFgGDoUS9Up5Vj18PoUetcCWDklCmLPcPgJVkqJQ6+06N9DE+zzHbZ3gA== 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=dlhNeFiaSFhbQRyySt8qRC9pwofPVlC8I+joz+3+FHE=; b=eXTAzl08Grp35mpQbgj7HI6RylYgEVAnlAyj2YqXjSIxkrkCwqKfAF/HjUNlelu8V562dWnNorwt+/T2TWzPcWmoUUUukEs4PP4c5EdXt/+8NLDFwdKiA298Ic1TNBPfCPJW8hrm0LXaumPV6YshHevhLCi8xIWLBLxxb+8OUWf64klZpyq6aaQQdmMDwQHRKhAfInCzHoRxmYrW7rGMZc2bu3Wm1HeyF+o52uUIOH8573K3PjSYwrj091AsSXxyGuzr5djDijhG+UL9zllPtRTquf0wCT4+zLu30CCdMRdKQdf9q88BtytQaccKNLaAcmQuXz9V80hg7Bu50EBPkg== 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=dlhNeFiaSFhbQRyySt8qRC9pwofPVlC8I+joz+3+FHE=; b=Maj/Kzy3QGTyc1yfCd5PTfxVYC1KCHV7IpXjHmSkysLGvRMJNzug9W4wYZ/rW0FDMuRznoV765xkFoLEyzpaudHbag8m+Oe+i7whDgbsjw+XTVSjK5Esv/LD/harO5y1cLBYO4V089VGwBmNM9bNl2mffalxMXuLJ9Wppb11oCJIKaJHktCYeq0oUnYknIk6qwpmAPhfHr72bazAajaOGiuflFxDc1XslKbHftur50ShM5uGpr2n2buGaINIAc/8puvM3m4hMUMrspVj9WiBSXnBenV3u3rcKJJMU41Xlhl+oD7R+pQoRbLPpoyNBYpnwQwruns+eZqopGzCbf+pxQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:07:55 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:07:55 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:17 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Dp9z65oD+DnjL3dy5OWFcCfJJGxdmzVXQI99vafRZYI=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 01aa7a76-a7c1-47ed-4502-08da92c8e469 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4poxq2B1EyBcOsVAtB8gLUfHaKM96Kp9nvHHb5GZVMgKyamIZfS3+g2MJ4BlcVBNzVz0eGP5lvz3IGSDtUMsYxAGL1t/hiWphtFg6FrPph4gr7og+9P7Sijsb49NCMZAfav5xPLbl+Nka0zGV7AXobhfENKGKTlK+TxYsLm5y9LGdh1wl8H/zMTLSolREXAl7ge+wczreiMEBPy+NNMaYsZUTJGEfZKQBPLE4QEIEwOmS/8/81D6Bg6eQG9e/ssXLD/C/t2H/pXPc+3uPsRy49MQJE8eqNIGZOe0hbXUZm2h6Hi15XJohOXVofCQTAJs6Iv8XH8vx38xSuHvRDC9YQjYpqfBkomNM/sc3wDCcAPvLskSd2lHLlhI9bIbnZrS7R4fJwf0UIaQUeAU/w+tzAc+PYFc401UKvGEiK0OfV38zk1UZTUAJ6IA6+hM/lVYQUCjwnADdfSv69RdsPGAFuklR5xB1h3fY77n6mUHP2Fcv70/ds4ukGxBB3ib1FLFMMPfzfwPAMCGR6l9ckEPTeaGfLWdPztZUVWrq3HyaCxlrMOhW7jAnaSWuHxjp2jUiOMutIbURwiEIlcXWPIi5NE896CoHEBiJwQ/tbtPjNKIOuwyGNBdSMDGobaIc3tFRIWHlYZ2v7H0zQdHVvz4hCWKoYA3ynSyx6+dkd5mjcuqZ1oqQsi/xhOQj1f41o7puSvIEyLHctoI1NbRYHLZbYufIWF1LBa8WQWFVIOqtDxo= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FaltVIzrrQs8WLEdrBM00h/wjWet2iq6Ay4Qr7+bQf+zwAL7QWC18av4U5lddx/qhweMX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QSPf1qhoa0AEjo1VMuG2/+QENFNYWhvQgQcfjnTscWccSIR5Smkvflg5qBPuv7Y/AcviwQMmGwECF7zdnluVjova3oh37v0tT0MS1E/XVpd7xyjZA9duei2zJJj5803Meg8gg3bDt2p3XHPomFBXSuXKl7USCRYXIxjIA+MJ7EOsDD+TJJPP/SiIfqAPiJMjJ2kG4bHMu0Vbm2yqWViQTytZ07B120y6SG4yJdXgssOBR5J5Srw8ONrA37lKsI5xIpHkxK1NNwzo8LxMZICVHxXRXAogZjYDCNe+bJzC37xUizSF2LRXfsBnaZuj1uegbI5VebXjoCc4AddqR0GBV+ZxpqJa+D+/QnQQOz2vgirc/iYxnxipKfxkh7y9baBRzVjVaQhFMwwjfB1/G6i0ZKjd6vXW6hDbMOETkthBdUzt0jjgSE1ZswCPraBpttTe03zjZKYLAA5NqrmM0fs3zXGZ3jBvX7fyBeboWRTUNltEmqP84YdMy4a0CjxnlAOKGoNXhs5hVMyqgOCtWtaLE7XGVXNJM8JprOkBlSE00BvzhcEwBFYDsnlQyymXaTjddyu0ysdIzjrgNoVHnEfd974R9YQMKxQoZgNa4utPV2NHRmFQk87wDCimGIWkDJ8lGaNWEDvlsN/5S1Z2y3uDHlI5s0ENTXX1R86AQe6RBUC0OSjVklsJECttBcloEr/3r1Onp1+F7CDf3HxlhtVfjo8RasrgSYWoOo7ArXFVAiTMKkX8AhU9KLnhASt0CFIl9h41ambLDc1R3kg+eh2m8dCNCcyNQXO/JXLThgRTpAGgp3ym+U3RvcxxyhZzMx7XXGPoeb2jWPAmfM46ZrfJMOJvJ4qmiAvCKsHqbeiP/XVy/x+zFfbV8DIhnfOJ93C65RD5yFGSkmTLWCLbbmNR X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 01aa7a76-a7c1-47ed-4502-08da92c8e469 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:07:55.1751 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 06/18] avcodec/vp8: Inline mbskip_enabled for VP7 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: 6KQuyO94p6Un Always zero for VP7. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 35d75170f1..c259f3588c 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -1296,7 +1296,7 @@ void decode_mb_mode(VP8Context *s, VP8mvbounds *mv_bounds, *segment = ref ? *ref : *segment; mb->segment = *segment; - mb->skip = s->mbskip_enabled ? vpx_rac_get_prob(c, s->prob->mbskip) : 0; + mb->skip = !is_vp7 && s->mbskip_enabled ? vpx_rac_get_prob(c, s->prob->mbskip) : 0; if (s->keyframe) { mb->mode = vp89_rac_get_tree(c, vp8_pred16x16_tree_intra, From patchwork Sat Sep 10 01:07: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: 37817 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245556pzh; Fri, 9 Sep 2022 18:08:33 -0700 (PDT) X-Google-Smtp-Source: AA6agR7cwAWBUjtaXE48PoFu7kEYcsxoQo7LaGJR0j7ZBi/AqrBQsyrb3i/cA98TdPkN/HLqVIU3 X-Received: by 2002:a17:906:58c8:b0:6fe:91d5:18d2 with SMTP id e8-20020a17090658c800b006fe91d518d2mr11952203ejs.190.1662772113486; Fri, 09 Sep 2022 18:08:33 -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 di16-20020a170906731000b006feb76dbd51si1811205ejc.289.2022.09.09.18.08.33; Fri, 09 Sep 2022 18:08:33 -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=cVz+VS+T; 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 A2D1F68BB2D; Sat, 10 Sep 2022 04:08:02 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2089.outbound.protection.outlook.com [40.92.89.89]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 42E3568BB15 for ; Sat, 10 Sep 2022 04:07:58 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V4w6a+9v4Q88VEkzLwOYebKBpaFdg65r3ccxe62eQyzRVe/AeEJa5/mPr0qw3RKwPd3EbOcnfbKm3F+HdrgIGnTpQS+hAufJi27ZpJ7FP/1rbeqYPVKkUAw2+C6rVw1hhmbnpSUl3mRCUy1yqOvDMTPsUNAqOZi7874ibWylAzFwCC/xE2aXIg/gZ1Zvv1ZG7fyNdTMNmAMI4oVSwDVYq8lTEoUhJdztSGwRsQV/Z+vWbAsI5+Kbipi+DkGFZRnQBO8Erez0XgDwfndN8M6eW9jsbKZeUp58OYqCvToSZeILE3UHTgyXTE4zd+mULqHyWstut8hxN3TvixpgL1iLbQ== 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=GjvuQoJy3QSkwjwNLrPSMJ8AIb/wQBxSSwV2FmU283o=; b=Q6NNthu9JROBXP8A4ojvV/h61pGnn3vzHoKqzEEWBFFYARQK5/32sojAlTb/L6njDxRwSw+oUhD4tUHictVBFO+1L5Rx5QvJksoybguaG9X0w51uzHwO08f9nB/YpbtTTqEEf/G6ohMIkKLn3CsNyvy4ZusVvUwClH0jpMqckQMsY8I/RwyD78Omy1lIJ3QQiqLQcg9yDF8N/EHUE54cvnhpTBpO2zUmHfGBL86Rx6et9ZoKTosDLohm3WBtKcAAA24FIVdxFz2PkEVYJUX+lAvjSClABND6q/pZC1Y5mqm9PKHhCbqKJyksy4UeYuimlJj+SGSeAkhHwBVCuaG/Wg== 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=GjvuQoJy3QSkwjwNLrPSMJ8AIb/wQBxSSwV2FmU283o=; b=cVz+VS+TGeHrt+mKHWjMmk4ufWkFn8qSiubc2XDgM7awjLq6oiagd4a0aqbl6AetK53Ll5I1PhULhKuw2LpQHKmNdhpwt5NnBQZxNiOd9dxqPAdNwovJAHSESlggePBHipseUSpolQS6Z6ixAbiaaHiHQo/Hr5wNZg/fzIdR9HOC4UEdtnN5KwrfqKHxfKp2A6UEK0NPs0I3A573JLHRVEIP4qD1LuqsputOUz+LSx6XZRcNz66emtxe5YYkqYUKq5Sza+XO29eSacMEJXCsFCf6J2QaZb+lUbEbstEtgtvwgckJD0ekqcrxOmGkHcywpfP4diB7m3+Itf7oragqkg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:07:56 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:07:56 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:18 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Hbf2YhpzJomkX3ZPyPuwgaBjD3rj8l5EdaS0CYW0O/E=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 0222e281-e2be-4b01-0839-08da92c8e53b X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4hz7uxVOxsgdcn6UgXWar9Zpx2OIsLLZ+G0nZD+4oaKVaYmmTbrUeph8rOHfVqM56tzqTshYJrurRbA+NnQXpIeLkpcllkqWkVwwc7Xu4MwTlLDrMcBPI6tdDiL6MXyruMUzFizXTgGOjglpW32wsE8eI+ZhUJW3MuONeCUC/nXHgu5HR+yCN+MBDjOpkPBNMz9e2gLR1V0FxuXoNyEsNd24tAMA9QSv/VD+mcrqdlbtqh0xnxkYfXVrUw2u2AqsDkDiAttAEpK3+dHTkytCFfmn8G0VJ05JeNGxL15TaMbW3SZiIP1CAhJULIsswWkmpNQymPU80K4G8S4fhQo58eD6pJHDO9bCf4ch/ybH1Pwii0tYt9rSt9ou/QRprb6ttlneiEhnstz7I4hYDBA8cSuD9Q0yhrTdOy73nI3jkx7KeuLdjEhopIp4B8kvscRUkwwMLoGEHHLVdkJgfailwMmBCXz0TBp+UFenZY5vv//0hfkIsP7kNP7gdwutUWoDVfWB9Rwc/+p8/SiOh7e31IBCqLQ/+DzdI66xqH5GEN/ozZYFyW6cioloX29aLp1sRU0QWYpvibQAJVeresBJMgwlc4f5d+ZdCURkCn6iagIvtpZCc/bH3o8pRJc4965lfaUDmTeJlVQjHAIJyIJzbcDk5M9LyTX+3pgVY9D72ge4KBeOVwsRxjKSDTHizGCgoJMxyuy75mXv1MZlNntax5FY7jPYriMGfrYCl5yKJbzE= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: toSjPeG76akCdL6FIghz7dfKtnrIgrwbPIX0aHw6v3+GG9FahaqbItHMJvzUwPece/lfoYZNeKV1CwSMJXAoejDCgcj05bV1sASK1bAbXnvjTZivCYIe9M9hWr9T2QQm8L9etaA7oK0pWBQv09/sZHpQPr9Zh4BDlRhqnongt22oI1m6GKij1tGsVV47c2Yn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8JgenoRkhr7zQN3ixCveSKAqRE3Sic8mVW9VqMvRzM2q08H3dnHjQKfLDjtSgnBcszArVQ7luOVTlsaPKTPkhHKZhqH/f01z7Duo2a2WMZyBTbA069d2miFIvtK5DhHcXy5n1Evm/maJ0Jf4UzfTA3+hw4Jq5YaZvkTvweNxroVT69HUjpJowkA6tbrFT6SCLQGZXrL2/kIlRDED48xETmZRpfUV7CNzSyGz+QuFyjY5E54P95cV2+zfynIz/muIHgypUjxUAd2iemqPoaZEPaQJcpwNoC+dKN7tCv02zbQTT2s2WKGg2MF2TlUVWlK4RJgKbhoac9vvnFFDAMdRmyJRBDj39wwHnor3K8jGTAUrIEqDOaCPpxehMUluuct4ieakycGEHLhmOn80c377O4l+k1GceLPCXSee/Olg8RJgpcQ9T7FKL4Nmv/1NTF37lNitUfb/I7uaUZYO6FsdZNKuUWmqTCFQpGHYgcuVdqaWSOMpuxJ1Nhc2HVHJ9XWwD10+kTsod6KqPNlfc6bUepV6deYfmkeGnZPnEyStAk5Y9dxY9t4q2gPRcyZ2YhVUPj9q3WZo/542d1yBiuVDGKrhmI/bKsSF+koGEJ0WpsCN2GEmJSlQR+JB0CKkWPd3/uAhG59w3gZHmQWQhHUMDT5Y55FeqrxKH4BS3dwbseR9yLtXLuCkGPuku7nsJtUOcFrnhmiUXkkvitczbJeXmupfgKNMgZ8t8cD9+lvyQ4EZscN6byVpKtAGq6e10JKpPTmvl4RwybxlM6kvv X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0222e281-e2be-4b01-0839-08da92c8e53b X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:07:56.5030 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 07/18] avcodec/vp8: Pass mb_y explicitly 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: ueQyVc+ChCzd Avoids atomic stores and loads and is a prerequisite for removing all atomic synchronizations for VP7. Notice that removing the explicit atomic_store() in vp78_decode_mb_row_sliced() does not negatively affect parallelism during slice-threading, because no check_thread_pos() ever waits for an (mb_x, mb_y) pair with mb_x == 0 (which this atomic store signalled). Signed-off-by: Andreas Rheinhardt --- Btw: The code in update_pos looks fishy to me; namely the part that tries to avoid the broadcast. Consider the scenario in which the other threads (prev and next, A and B) are not waiting when the current thread C checks their wait_mb_pos. Then one of the other threads reads C's thread_mb_pos and notices that it needs to wait for an update from C. It therefore locks C's mutex, stores its wait_mb_pos, checks C's thread_mb_pos again (still reading the old value in this scenario) and waits via pthread_cond_wait(). Then C updates its thread_mb_pos, but because C uses outdated values for A and B's wait_mb_pos, it never signals a broadcast. Who will then wake up the waiting thread? This should be fixable by moving the loads after C's update of thread_mb_pos: In case C's read of A's wait_mb_pos value happens before A updates it, then C's update of its thread_mb_pos happens before A updates its wait_mb_pos and A will therefore read C's updated value of thread_mb_pos its atomic_load while holding C's lock (and will therefore never call pthread_cond_wait()). In case C's read of A's wait_mb_pos value happens after A updates it, C will emit its broadcast, waking A which reads the updated value and stops. libavcodec/vp8.c | 30 +++++++++++++++--------------- libavcodec/vp8.h | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index c259f3588c..5ecb9b07e5 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2389,11 +2389,11 @@ static int vp8_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *cur_frame, #endif static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr, int is_vp7) + int jobnr, int threadnr, int mb_y, + int is_vp7) { VP8Context *s = avctx->priv_data; VP8ThreadData *prev_td, *next_td, *td = &s->thread_data[threadnr]; - int mb_y = atomic_load(&td->thread_mb_pos) >> 16; int mb_x, mb_xy = mb_y * s->mb_width; int num_jobs = s->num_jobs; const VP8Frame *prev_frame = s->prev_frame; @@ -2518,23 +2518,24 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void } static int vp7_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr) + int jobnr, int threadnr, int mb_y) { - return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, 1); + return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, mb_y, 1); } static int vp8_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr) + int jobnr, int threadnr, int mb_y) { - return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, 0); + return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, mb_y, 0); } static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr, int is_vp7) + int jobnr, int threadnr, int mb_y, + int is_vp7) { VP8Context *s = avctx->priv_data; VP8ThreadData *td = &s->thread_data[threadnr]; - int mb_x, mb_y = atomic_load(&td->thread_mb_pos) >> 16, num_jobs = s->num_jobs; + int mb_x, num_jobs = s->num_jobs; AVFrame *curframe = s->curframe->tf.f; VP8Macroblock *mb; VP8ThreadData *prev_td, *next_td; @@ -2589,15 +2590,15 @@ static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, } static void vp7_filter_mb_row(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr) + int jobnr, int threadnr, int mb_y) { - filter_mb_row(avctx, tdata, jobnr, threadnr, 1); + filter_mb_row(avctx, tdata, jobnr, threadnr, mb_y, 1); } static void vp8_filter_mb_row(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr) + int jobnr, int threadnr, int mb_y) { - filter_mb_row(avctx, tdata, jobnr, threadnr, 0); + filter_mb_row(avctx, tdata, jobnr, threadnr, mb_y, 0); } static av_always_inline @@ -2615,14 +2616,13 @@ int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr, td->mv_bounds.mv_min.y = -MARGIN - 64 * threadnr; td->mv_bounds.mv_max.y = ((s->mb_height - 1) << 6) + MARGIN - 64 * threadnr; for (mb_y = jobnr; mb_y < s->mb_height; mb_y += num_jobs) { - atomic_store(&td->thread_mb_pos, mb_y << 16); - ret = s->decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr); + ret = s->decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, mb_y); if (ret < 0) { update_pos(td, s->mb_height, INT_MAX & 0xFFFF); return ret; } if (s->deblock_filter) - s->filter_mb_row(avctx, tdata, jobnr, threadnr); + s->filter_mb_row(avctx, tdata, jobnr, threadnr, mb_y); update_pos(td, mb_y, INT_MAX & 0xFFFF); td->mv_bounds.mv_min.y -= 64 * num_jobs; diff --git a/libavcodec/vp8.h b/libavcodec/vp8.h index 30aeb4cb06..ed79bc79c1 100644 --- a/libavcodec/vp8.h +++ b/libavcodec/vp8.h @@ -330,8 +330,8 @@ typedef struct VP8Context { */ int mb_layout; - int (*decode_mb_row_no_filter)(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr); - void (*filter_mb_row)(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr); + int (*decode_mb_row_no_filter)(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr, int mb_y); + void (*filter_mb_row)(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr, int mb_y); int vp7; From patchwork Sat Sep 10 01:07: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: 37818 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245619pzh; Fri, 9 Sep 2022 18:08:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR6QR1VGdIFKR7RZhdcQKJjIBNk+o7iUQvZ1xVURozJfwjh2rVaVXwSWEBphcL0t7/CORr3g X-Received: by 2002:a17:907:7242:b0:741:7cd6:57d5 with SMTP id ds2-20020a170907724200b007417cd657d5mr11524688ejc.419.1662772122109; Fri, 09 Sep 2022 18:08:42 -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 r14-20020a05640251ce00b00446b33b356asi1698763edd.502.2022.09.09.18.08.41; Fri, 09 Sep 2022 18:08:42 -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=YcUGxRT9; 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 A816F68BB0C; Sat, 10 Sep 2022 04:08:03 +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-oln040092074090.outbound.protection.outlook.com [40.92.74.90]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2BA2068BB14 for ; Sat, 10 Sep 2022 04:07:59 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=alcjqa0poCndbKHRqtGtPX+cVVU5s+AKLMA6Nwjc0Sb5Mvz2Oc6qEY+yevq+0c0E45UrvMLeKteSZ3j9u+LukHvQXYiiD9y0Im9M8wnsEj3nPZmwFk9TTYaQgh1Rh6KwLh7tfA1+JZ3GFsBNybQ0yXZeYu5K9YXcvQRqf5Q+3CHknNeOuEz4FZ94P/cUFQ0/Q6P//D/fvOz3ZV5OYGylq8bzIJouMrm3jIlxCRgj5r8WCTzV2WcCsVIwd5Xc6eHAShaijpgf0RO8rDZbOniM6LlZ70vrJlx5T/zUO2QNlzqrJTn5vgbp98pcMRHm8SZYaNIdc4PLl8RTZOQ7XDtQWg== 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=IW7sZKv5Rk5OWIkQGsu5f4VQwykbaNQ/c5PAqpeJvwU=; b=kAUqNPDsEB+J4pryZj2EgyDrBEhsIBtJ3RaLidqPqhBYHggBpO3MVDZi9CwG6drPFXr+yXc3ki6YACz772UI/R4Sh/Ihqg3SyOMMXC7A2sQ7iSgU66AutyG6gGKTvM5WzxVuRhH4lOVYP3dP50+4+Cz1UFcVVmjd+y0Y9akCHnCq6odQTOFyuVUFazBClb+3JFd/5PR+sH+hpBQLW2MzUzyJA5kdQ3ycre5Q3DZAp9XXJS8Wpuvpckb52qx0ONMRdP6yy7vw/ehcKeD0lbp8oyy/8MwL2yeGQ5LFdVG0hCjFN7PpW1UJTZOsarAOGfBu/etivjnbsUrUA5I1tSmJwQ== 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=IW7sZKv5Rk5OWIkQGsu5f4VQwykbaNQ/c5PAqpeJvwU=; b=YcUGxRT9lPnUjFlzO7gGJylDk7pGVmZ7uRGtPc5dHxcxzKfdZpyTzCdBxWwc+FRVrt843W/iKrJzQclh9zniVGgO9sMjnktS4bMT7PMDRjDv1StYdJGAIzTV6TZR33wuGy3JGSt2EFhHCnWll9tVDWYdOl0HDj45+zf7wAxuU7Z7rT3bwK8pE3Iw0JEnfd+dis94TxlZnHa4+qC/IKK7PsOW8ZNLCYFAHQElqB3qaysES+vWPQHXt8qaVujOBB829PRO3AF07gUIxLzV9mMImFPQ85hsTCpwk4yzhYkuRPhIaN2W1cWXoQ+mYvBPn1q4DXUwbcgxh8D6HgziyL6xlA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:07:58 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:07:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:19 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [LdfsX68jnSxuAKoMXG+1MOy2VIvYug5YSDrJ2HVt2bA=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 30b23618-b78e-4999-4849-08da92c8e678 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ45fyxO5AscQNMkOibRheMxHFuBstCvHDVey5XvFpHPbHzt2K9rKKG6PxNSWNoXMw52gMp9IrCP/kng4xF+GSFu1VX/MLcrImYzESA4VrdOpzJtInsAiVoFW3YJptEwxnRq21lnkIS7CYpy5cC6MVbvOzm4u3NK2JWTZbxvODNWR6ilkP0gxx0mtRjvf8sHCs5YhL7nZnkpO5WxrwmquORpD44nyz/NJhAnTLvMyRdb9HN4Dz0cSFgoZcEDYYBuGeUhuzqFM2B9drGSu3qJN3bFU5bvUZy/A54AJHnAw+F1D7AeHPEZEjpzQxU3egPIc/X1A7OVhGyrqD/t67mz8FN46NcXfKd75rkLRf0xmOav0d1RUAZIrzs9tVIHKsm3x3y3Z26HRhUtM7U2GNvubbZEoSQflMqsm9vccafS4FrPD2K4lvqpo7sejyQWGYtUts2W8EiLGYZTtBwojOffcXJbck3BBzawNU4drzlwt/+f/EE1fK6Ok0O1ZEwnmcgSbuxyG99/2vfhS1R73ATr/Xgv/w6n3QsoQg7D0wDCS3ifh/VWn1Pdwq3ilZ2tHfO2JrtDJAAF2+xUOWGYI/IrMjKGfcK2/ifi+DrLrNY6juPyxXNUvHLRifRd+CEvywnRY5TDcJZE8sfUCiqtY0eeXPQ3ApzeKTm5aWm/IByHb4ql7nEkjdtBPRjnHT5WtQgKDVVMEQUCa1VDddxkQm9iJE3pLynJyRehpKhwPrYDgITXG4= X-Microsoft-Antispam: BCL:0; X-Microsoft-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mZ1PeP519mTDHtet/M0SEwtracwa9VEHI93anDh1KpQddLDXkkM+kDtVV2gVTIpIt+Hn8XPVXWkrocKFxZLMsWdf8CXy5WuwBvypjTc83y8Avz68sugQxo03XazuQauYSqW5jMX/945HPNQWNwpRi/OSoumWDUO5M3kze75GdL08sJgzC5FMduISxHwxknQggGaMeQ6FAKo9xdJiUBl1FrpzaetWZ1+hWYrs7h69fMSLdlPN2bTTTC+ztIYOgH/mM/K+WaRWDYzKkCBzuEKITa2uvPHbRjoTVG8zstxpthEkyxpMf1jOJUT5V+EfuegVNmQEIuOizjsIs+y082U4LEnungo5icv2fe2y1G2+dcA4bhSJQjgO8CH0gA/aYIz6rLrWnrIftGK9Wc8L55krjrStl14eRulfhmGNTDaEVm42R6NsvU3SNGPP7904lo86v/Bjov4SIyHekcX5d1EOPBZB+Jt2+TKxpIrU1q++LkyXCcdmWmQgmmzk1kfqIHPNRpClU+h8NEcaX7Jkqf7ugYC4yuW3GEVeAKolOMMW5rLX0q84duMRiQstT6iWfZDVDCnGChoQI3wGihB9pjDVI6tDqCg3lebY70cYME9rBvdBxCu6sKImMM5SXbckWyoBRtHuEOInho/7JoNakAi73XB61jwTNCX4ZQWyIU6kWpDT1Fn76yKjO8ah2rN4+8zYIRofWuummzEEZeKhIobk5CLpPTYYGrQmtWVp5Swif08Y/qTU3s3UISWtOwbfheV4xmykaxGyezFA1UB9ff7MnvQgWVgk3W6dzWEBYxWxoPgFv6vg1XvjkIOya/WwhCvtgiINmWfNe+fc36jA13B6b6cwgLLhT0xcszSQtiyUWTXmdqxhSMU2iYqj1zGLlTUpx/DBIJV4gkhb1i8O2oGGLO0cDnbK++fT+0fuSYbyQpBDG5rTJDB877hmd0d7AXEmdIDosIyN2MZcqkJY1BEmDlPgbGYq2THaI5agTUNePyjYPYqOt+S X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 30b23618-b78e-4999-4849-08da92c8e678 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:07:58.6146 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 08/18] avcodec/vp8: Inline num_coeff_partitions for VP7 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: HhvyqGPyLac5 Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 5ecb9b07e5..f5c05cd84f 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2398,7 +2398,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void int num_jobs = s->num_jobs; const VP8Frame *prev_frame = s->prev_frame; VP8Frame *curframe = s->curframe; - VPXRangeCoder *c = &s->coeff_partition[mb_y & (s->num_coeff_partitions - 1)]; + VPXRangeCoder *c = &s->coeff_partition[is_vp7 ? 0 : mb_y & (s->num_coeff_partitions - 1)]; VP8Macroblock *mb; uint8_t *dst[3] = { curframe->tf.f->data[0] + 16 * mb_y * s->linesize, @@ -2793,7 +2793,7 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, goto err; } - if (avctx->active_thread_type == FF_THREAD_FRAME) + if (is_vp7 || avctx->active_thread_type == FF_THREAD_FRAME) num_jobs = 1; else num_jobs = FFMIN(s->num_coeff_partitions, avctx->thread_count); From patchwork Sat Sep 10 01:07: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: 37821 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245672pzh; Fri, 9 Sep 2022 18:08:50 -0700 (PDT) X-Google-Smtp-Source: AA6agR4rrE3C8hR4j1hE2KEy53Cjs16Lx3Q9HGPF8T3wR8GQC8ysdQOUWZBVYsEfgwO909+YyRvT X-Received: by 2002:a05:6402:40cb:b0:451:2b71:9940 with SMTP id z11-20020a05640240cb00b004512b719940mr2880517edb.237.1662772130483; Fri, 09 Sep 2022 18:08:50 -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 nb21-20020a1709071c9500b00730c028231esi2013533ejc.120.2022.09.09.18.08.50; Fri, 09 Sep 2022 18:08:50 -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=IMhI9mXQ; 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 BA5D968BB36; Sat, 10 Sep 2022 04:08:04 +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-oln040092074104.outbound.protection.outlook.com [40.92.74.104]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A88F268BB21 for ; Sat, 10 Sep 2022 04:08:01 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ae8eKfzsFu9vLMqUmLRnjrRcqaUe7NF3xDLclreo+F3tumaQk/KIZgAVuAgEBvFlEEHP6BNkziaYZLPytSR/+IP9Du6ZcWouxdijmHM7xRDJQegzyo/LNpoNTl011uSWN0h0ipjVrEClcU+dRQEx9ZqvGEdFl03o+93i0PSJyT6KvHSyKOesehSV14vhj1aNYwiD/KMKQU3JxlzkZiIKhkczll8lGBZk4YmCn+QPF4rJc7wHSDtgsobC94NIEYvxE/14AZDzm3ksFc5mURXsct8OGbZ3ckt/anl1GosFKxZ60kN6keYV7w3DWcTndG74JgaKE5VSb0smQnaCBfJNJw== 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=y4vYhNyW1sn7kyYqx9kOc/HeQLDQfNPeg+PuJQX0cVU=; b=U3R4t/Isq+cU0OVrZQPp+M7xkNgm2NEUIDl9cwyK2RXNrZtAn0hnxxDATeGdSuwgaENCSIs8JctRNQszrJEHyReC3iHcpVOKlTGJc9I3UOIwnQEgs1WUr7oF4uZP89sbsvCKMr1hp/KpUB6o6D8kUCA44SnqNQVYKsoU544KReTxCEOLyINNV9dSaff98CWCH5IN4uU8a5OsSXa0CtwoIewbriB5dzm2Eni3vuwDu1D3J6XIWuI6DGZ7SAfcPBUiQ2/dZBk6ZQBH1IBnBYBXvKK6Dnj/aUn7l0PwC8J5E27iXLvhOk6omeK8a24+bvzAcr8im2XZc0sPGoOG2fpaXw== 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=y4vYhNyW1sn7kyYqx9kOc/HeQLDQfNPeg+PuJQX0cVU=; b=IMhI9mXQgkr0l9RLTte6LfGfw+TKId0fxjdp21Xg8fT3O9fhm+G/cVFDoW6Xi7FFeaxh28wuMqqONKtMuQKRHTfP/QRJxOTrvDXD1rmT14SUDGp3VkZ/66zEjQqjlCiyZJ19dgW4+GtYCT8eSqyweoldWK60RhnXt/qnOgCXCAaRkzQx0sNpNDEXQhzAyDmIPaNdGmK9nidRZsJxoMJ3Dexnh3UEcjn4yaOp6n6Q7hVmkerfxWYLDzNfkOhOlZNzt9vNpIWhXItPdFXoKzUhySslMvg8YY+c8Fg1pYCdZpuc2Sxepai5vDAJr3blsEyg2hsdM0ED6eEU9PWjlW6qcA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:08:00 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:08:00 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:20 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [LZDELizYE3rzeYVKvE1BNOzpS2N3aeJUYbT61/CrDB4=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: df58fb2f-1607-4916-f85b-08da92c8e755 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4uYCt9TKY/H5ERn2HEyO4slLcGpBHeZFq1Ol8+SPgJAzm3jBx59ORFdctK4Q1uKhWzzyXNuufBDlgAb8Z2B2xF9OWFTmVVNVnkjB8T3PbcbOn4SvLI/sYohdZn9vZylL1WNW5yZ3phR083ugFmHzpfaakh6IWqQZ10wVWtjB2wzBAtJGTpJ2BgsykG4CHVqJ4tJQvvJVhzgz/WnZwST0QrZ4SomY2OBWZtVeUjn40ZhW2J6f+JMeuqxqfEjreHNIqr/myYyZfm3YBgEtEpWJgFNZMbV+uRDznuf03lBym9wiRnJjDNAFTfI+XEKvlafELX6bf4BYXemzW80ZwRFRoxqgg3UkRarMu39NtgGR6o4IN/IACf5vK1VLZzfWmjfXvzHoqH7GQnqWJ4EZFzxHDkfsToLt8AwqlkHI5Tyf15yChQ3Bns/oeoUez5K5ALlrnZMGn9K57SbA8gAawVAU2E7rGtFokj3EZPXPafB6JY0yQaukugmeowaOAQKtCi5+/ZG+wly+ZRA4TL0PB70XP4EVSm8MIhdOo4JeHadh81/2cPlv97aiKJEqeAcjPCNZtIt11HQjWCtZVH41WGTM0HOFk0Ewa/yMUeBQqVJcQMZRIl6PZMyP/P0kcLI/Wm5+mhGioYM48mUYjTFaEbpbHO5bWT7uD2TefQqKxFeJCmPzhjYyA5xAQOEmqgg9N+13ExYHx9cWOAVb0gGWZpc/NJxL75PXwDFnUjhbDmIGV4IM= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /hCPwprSrmMTnph8tbiR8KRKVPtlyBrGvR7WnI5kkhypABElIWWddD/ZtHzvQXmIIyPY0pQkV0T3EZm3HCVR41UEELASrfngEKRFM3IgxFWf7el6ozo81y4xFUYvGk1+i08ESN/3F7C4cqMOnopK4dYJNj3ubm4X00IlQy39oWEpl50spCjS5M4vJMLGhQwR9UDj64eaQIZLayQYeAicG/BHLylIuVdkfew0eHCB8MfkxivqlCvUMtjrY0iJ4UhxpkXFRpo1lskFJetXEgwM5JOKCzu/b1rIM6RkQVdUGL3Jn3JSgul3gAzYhgsHTZtgk0w7SPJ2medmKYYaPM3JJKhKk8v4mzxyDfy5uBl/ct2umu9hLG7fTQv6MxpH8onpoKAjPT2nlWmsjpIF/ZxEKbCBW6YP/9PMtAnYFfCpvunP0vKqxFozFCY0ugk4WmfTs4l7hFCt9Q5gsqIb5nxK4EaXlVyYGguze6rUx0/xiOHwBv4Kmhddc3m2ot+a5nb2i+pL1VrhYzCJPeUllRd6/tdgDKf/odekQdo3kvMsthvSRxO3ySTleulxoMjEWCeOA809HxKS0HSrl+CReNGNruJn4N2NQBd6OHpCmPDy0dhIHbNZQ/I9IUEF12zbOse2C3Ckh8Y+/uGWyBQiDeG4QQ== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: SNTmZL7uhj153tdPMGR+BTrIbei7uhUZDyS1kj1iqhpx+WYdJgjIVFQxekVZFsBDXxLmIVdUcy9HLozF7ilqLETOC34MU/mZ5YtffRR8buGkNo3zKsARJZBnj5rZIVPOpeGJ1wrn5Wn1m7ruAl885r8n2IfhzWXDV4mcOU7V/OUKTfFMNwkmeBqKv0iDByCFoRzdSV3iKgIGPfcSa3gEr9F24CTpAZDt0ZAwmuoQjCB+SNjPWYsJ2rbHcaR3lkKyWzk9o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X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: df58fb2f-1607-4916-f85b-08da92c8e755 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:08:00.0507 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 09/18] avcodec/vp8: Disable slice-thread synchronization code for VP7 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: z089Ldk4UvCJ The VP7 decoder is not slice-threaded; by its design, VP7 only allows at most two slice threads per frame and if it were ever implemented, it would likely need custom synchronization code anyway, so disable the current code for it. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index f5c05cd84f..dd3d38d342 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2440,7 +2440,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void if (vpx_rac_is_end(c)) return AVERROR_INVALIDDATA; // Wait for previous thread to read mb_x+2, and reach mb_y-1. - if (prev_td != td) { + if (!is_vp7 && prev_td != td) { if (threadnr != 0) { check_thread_pos(td, prev_td, mb_x + (is_vp7 ? 2 : 1), @@ -2508,11 +2508,9 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void td->mv_bounds.mv_min.x -= 64; td->mv_bounds.mv_max.x -= 64; - if (mb_x == s->mb_width + 1) { - update_pos(td, mb_y, s->mb_width + 3); - } else { - update_pos(td, mb_y, mb_x); - } + if (!is_vp7) + update_pos(td, mb_y, mb_x == s->mb_width + 1 ? + s->mb_width + 3 : mb_x); } return 0; } @@ -2561,10 +2559,10 @@ static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, for (mb_x = 0; mb_x < s->mb_width; mb_x++, mb++) { VP8FilterStrength *f = &td->filter_strength[mb_x]; - if (prev_td != td) + if (!is_vp7 && prev_td != td) check_thread_pos(td, prev_td, (mb_x + 1) + (s->mb_width + 3), mb_y - 1); - if (next_td != td) + if (!is_vp7 && next_td != td) if (next_td != &s->thread_data[0]) check_thread_pos(td, next_td, mb_x + 1, mb_y + 1); @@ -2585,7 +2583,8 @@ static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, dst[1] += 8; dst[2] += 8; - update_pos(td, mb_y, (s->mb_width + 3) + mb_x); + if (!is_vp7) + update_pos(td, mb_y, (s->mb_width + 3) + mb_x); } } @@ -2618,12 +2617,14 @@ int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr, for (mb_y = jobnr; mb_y < s->mb_height; mb_y += num_jobs) { ret = s->decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, mb_y); if (ret < 0) { - update_pos(td, s->mb_height, INT_MAX & 0xFFFF); + if (!is_vp7) + update_pos(td, s->mb_height, INT_MAX & 0xFFFF); return ret; } if (s->deblock_filter) s->filter_mb_row(avctx, tdata, jobnr, threadnr, mb_y); - update_pos(td, mb_y, INT_MAX & 0xFFFF); + if (!is_vp7) + update_pos(td, mb_y, INT_MAX & 0xFFFF); td->mv_bounds.mv_min.y -= 64 * num_jobs; td->mv_bounds.mv_max.y -= 64 * num_jobs; @@ -2802,17 +2803,18 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, s->prev_frame = prev_frame; s->mv_bounds.mv_min.y = -MARGIN; s->mv_bounds.mv_max.y = ((s->mb_height - 1) << 6) + MARGIN; - for (i = 0; i < MAX_THREADS; i++) { - VP8ThreadData *td = &s->thread_data[i]; - atomic_init(&td->thread_mb_pos, 0); - atomic_init(&td->wait_mb_pos, INT_MAX); - } - if (is_vp7) + if (is_vp7) { avctx->execute2(avctx, vp7_decode_mb_row_sliced, s->thread_data, NULL, num_jobs); - else + } else { + for (unsigned i = 0; i < MAX_THREADS; i++) { + VP8ThreadData *td = &s->thread_data[i]; + atomic_init(&td->thread_mb_pos, 0); + atomic_init(&td->wait_mb_pos, INT_MAX); + } avctx->execute2(avctx, vp8_decode_mb_row_sliced, s->thread_data, NULL, num_jobs); + } } ff_thread_report_progress(&curframe->tf, INT_MAX, 0); From patchwork Sat Sep 10 01:07: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: 37822 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245738pzh; Fri, 9 Sep 2022 18:08:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR4Vk+ivrwj9ERYsBKBBDpG9htmFWziGCK1+5Xtifk4Hwi9ovzF+OMH8JRx+QSBTQ4+xAI4Z X-Received: by 2002:a17:907:9484:b0:738:6f9f:6032 with SMTP id dm4-20020a170907948400b007386f9f6032mr11572700ejc.602.1662772138980; Fri, 09 Sep 2022 18:08:58 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id cw9-20020a170906c78900b0073d9b010076si1537269ejb.822.2022.09.09.18.08.58; Fri, 09 Sep 2022 18:08:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=Ok98fDqK; 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 A7C4A68BB37; Sat, 10 Sep 2022 04:08:05 +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-oln040092074104.outbound.protection.outlook.com [40.92.74.104]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CB73E68BB26 for ; Sat, 10 Sep 2022 04:08:01 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LkW4wm+Ox+l5Kp+eX1AylwoyT2diqAE9TuzCP9DkyvxUoWdim6skecCdm+ujKrMPewIGh7HI4b3/zmUEc1hVAopFLA5aSjC2Ht1yMCTHOJ27f7+yARdSKMePJ44i7hmlgVkJYuTGHANiEuQ8blkID3tLVX5bmqxHrRRpZbUAuynNVyApr9w/w/hJWPxAlNF/HI37PFlyAZ+taRQfVGFCAbMIvkhhvVyHyh9LfLjF9VYmi2WYu9AxHZ4i241t/8lZ+72b8/7lSZjofM2m/Q7rNFEO5xHk6+IeK2Ip6sVdx1hgKnq2Tao+Mt8QoIK49a0cWXmiJDQuDWSIJJUfl9bFsw== 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=6ioJXhm4BCLM8BALlGowpsnUFisFvKpE0TM06zmXS98=; b=C+EjwsUquI229WrByfEda16XOJ6jp2V2yZ5DHKbFOsycjrOYwGoDXZ4+LdMHs8kIjJayJOPzUgRUK2cWRAzyfyGmiyi0Q8MifbvBf32G/6nI/YswIgeYZVuwth3cnghuuPlvCQbWmjwi55X27eG8RCZKeoMRd9UIclMrkGhS0e1WKm4G9YLBcG22BrNu0OyXieX6md3NVzTV7WlPygxWi1+To3lkInutwBXJ8+erg6wN+PFiNpuukbtzLfQVLK0xEMyVD+AUcPPumVVV+WsGMd9iUe/N9B/6FybjMMFZkDFfn61HOtDZHcB+H6IF8WqnVYlVEasHVk+HEizMbaAmnQ== 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=6ioJXhm4BCLM8BALlGowpsnUFisFvKpE0TM06zmXS98=; b=Ok98fDqKroygLthkO0uXQM/nBcbVwFTZY6IB6iwTTCzpV9gfkuAr1796JXJYCinEMRVCqyrHVpXbY8my0StMx5ERl0zAmbBgGesySaycZrgXDGEHkdoOCiR7khGDH8z2UkxYkxEpo096J13JddM+GMBEYxX6TpuS7vlFdb0BhzMUVl+hWjCwTaD2oM17poRFebr+yvxVB8+DmlxGPGR4T6Whzoc6Zyl9vWXAddV3XMkODbzmP56Ph9epm0Gif8w9u0UNMJDUxCjwnofRpgfgPBdONX225o1gU7U5NiGKYgPNeJ4n0oZUg1PyaqMqDH7vtHP23bbEd0L38Z+/Sw4y3Q== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:08:01 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:08:01 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:21 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [7hXnmdOph0/CYdzO6QyHPERROVAGYgwb05qTJX1znes=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-9-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 986075b9-a0c0-4aa3-2b2d-08da92c8e804 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKyiifK3O4NmONuSB5M1PIcS3tVVBrbnBxFL+CsC35Tz5clFt10064YVMuixzUQtWRLOsG+hjzMvnlj49T/aveCTkKBPOilEcDlJbB7VTsmivexOHT3C+ALbT5BmgITVRy1hWjzuBvRw5C1/wruRXfpANQ3XJ+IhXhVxCOo4yCyvlUB+L0v1hdhYSJp3XpsV76PEIZBBtexXOlX0SmBn8/dEb6Vi6ohrvyDskWicJ9TwkdivB1BC42hnX2zlZjAhusZSO3eEB+yy1PaVKyp82JYDmSXzknXTLP17jtGofji8Z+Q8ERRwyqTIZGN543On7+ltd7r/Uxuo5JFbilApZG33MUgsMIwxJkbLvXM0kudXp01in/baR40eb8r3zCRBmIvNTUoKmzdWD243stv3kLEeZA4oXWPsW/pF1qQPLrAaiqlO/qIG0MgtKGVmKzPux3WS1wfYc+YI4H9bYDWJYulE0XSlsA7surJAOaIhlJXgPHpf8zsdZrRA730zn7uG0YuWsHqju90D3OJW0sritCiEKigS+dgff/nZi6lxjZv5s1wqCrz0mZnALAMAbSyTvrzIrJLgScHQR6MqKr5xpb+r0hwjKeeuDmH0OOjvv8vVr0TNQ3i7doMhhkoJUnh+E447Kkl5rxWYo39Qu1aebLCAwFL0rH7yq/iPwN4OAsn89M8qS0+EchIDVPFzm/5GtV827X5MAiOc6y4vFgLORYh7t0dp/174G44= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CgcguxB1btla7jlhqw96r7Deg4R/NjORsAUBMUGgXOF8mvY5Rph7wyP+wa8ti9YcTVQI6GazyveHlwwfCwqq3IbLPaxExNlylRacrfyb197gofTao33w4869qO3BdGnvUUHBYJmH8nTWPX3aabl99jUSZzR9PLzKNICZBH5aLNfuprGYnAhl6izKCf1NpDnDDY6SO6Ac4Z7xvWsaNX99EExPmXfzHD2iV9NDSkGapDRoJXMXorsJUVLuyjWTVflwcK3nmPQAbFrqWRM2ux4pqJ1yImSNhY48wb6NyM3KvYmnbkzDXvmC1IGoW+GZAUiU5XJSuEHhP28LVBHYTNsB48yNX0hwRZyg4MEMyWlYYPlKVKkLQMjwVs1rPfI+ykFGx9cxutauRYPOSyYNxeAepXj6X7jTRldBPEvbgUD4yCx5uRvIwmkFC0zDjcyOKmbVilVjCFXSGSeFjJDrfP/XHqBHc9e32MDK7DVwdTLOAB14vVxqPfr3OrykM9bCo4khfByYQnu6gLn6Xz1lM255c6YUmu+9+iPCDVe8sV1pFQlXC5GoeSIxedXoU+XnDc/aBaeyZFJYLi7pzcEFlyVXqzn3oJN35gC5uofzEzg5uQvJDYb6PHPUMzOCxJ88eVQn4daFQlcXOU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jECpGj0dH2mLQk3jni/Qf1nc3b0giLqdHzucV3Tfe6D9SOnOSh5cbvx/LsKgr8sJ18sa8Q+oXif3uBuZDvTi2wsrwcK+0wHkcha5SbRTocM1Ij6N5VV4/XayjrwWENWCIfG4UP9VmR9xA78QJ3eq75cuXVdE4VNa5jiQmEi+FJPPJrE2x8BeRY8xRIf0G8qN7kkrl1BfmyT+o7W8fg0rkbXBSMey3ID/Eas0ovGX6gMxXwKMx69iUeAvqFlekdxgwoI26miQZZL7MqUmKZtMQpmZdLs+IwqeD8v1cNT2uxQfSkxJrPPK85zC+yvNSRAQkU2kk5QvmwzcAkEPryzpxh2a X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 986075b9-a0c0-4aa3-2b2d-08da92c8e804 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:08:01.1766 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 10/18] avcodec/vp8: Inline num_jobs for VP7 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: 8ZY3duH8ZwmL Always one. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index dd3d38d342..ce824cec81 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2395,7 +2395,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void VP8Context *s = avctx->priv_data; VP8ThreadData *prev_td, *next_td, *td = &s->thread_data[threadnr]; int mb_x, mb_xy = mb_y * s->mb_width; - int num_jobs = s->num_jobs; + int num_jobs = is_vp7 ? 1 : s->num_jobs; const VP8Frame *prev_frame = s->prev_frame; VP8Frame *curframe = s->curframe; VPXRangeCoder *c = &s->coeff_partition[is_vp7 ? 0 : mb_y & (s->num_coeff_partitions - 1)]; @@ -2491,7 +2491,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void if (s->deblock_filter) filter_level_for_mb(s, mb, &td->filter_strength[mb_x], is_vp7); - if (s->deblock_filter && num_jobs != 1 && threadnr == num_jobs - 1) { + if (s->deblock_filter && !is_vp7 && num_jobs != 1 && threadnr == num_jobs - 1) { if (s->filter.simple) backup_mb_border(s->top_border[mb_x + 1], dst[0], NULL, NULL, s->linesize, 0, 1); @@ -2533,7 +2533,7 @@ static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, { VP8Context *s = avctx->priv_data; VP8ThreadData *td = &s->thread_data[threadnr]; - int mb_x, num_jobs = s->num_jobs; + int mb_x, num_jobs = is_vp7 ? 1 : s->num_jobs; AVFrame *curframe = s->curframe->tf.f; VP8Macroblock *mb; VP8ThreadData *prev_td, *next_td; @@ -2566,7 +2566,7 @@ static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, if (next_td != &s->thread_data[0]) check_thread_pos(td, next_td, mb_x + 1, mb_y + 1); - if (num_jobs == 1) { + if (is_vp7 || num_jobs == 1) { if (s->filter.simple) backup_mb_border(s->top_border[mb_x + 1], dst[0], NULL, NULL, s->linesize, 0, 1); @@ -2608,7 +2608,7 @@ int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr, VP8ThreadData *td = &s->thread_data[jobnr]; VP8ThreadData *next_td = NULL, *prev_td = NULL; VP8Frame *curframe = s->curframe; - int mb_y, num_jobs = s->num_jobs; + int mb_y, num_jobs = is_vp7 ? 1 : s->num_jobs; int ret; td->thread_nr = threadnr; From patchwork Sat Sep 10 01:07: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: 37823 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245800pzh; Fri, 9 Sep 2022 18:09:07 -0700 (PDT) X-Google-Smtp-Source: AA6agR5lxyuUE24MXJCTT3lQAuZjdb5QCD+F3Ht53uKOVUvATdlJkVGkcpmv3L/29LvQl72zZMxa X-Received: by 2002:a17:907:9610:b0:741:757d:62a9 with SMTP id gb16-20020a170907961000b00741757d62a9mr11986636ejc.726.1662772147392; Fri, 09 Sep 2022 18:09:07 -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 xa8-20020a170906fd8800b0077536bd6db5si1699530ejb.974.2022.09.09.18.09.07; Fri, 09 Sep 2022 18:09:07 -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=HFePd9gQ; 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 A253468BB2A; Sat, 10 Sep 2022 04:08:06 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068099.outbound.protection.outlook.com [40.92.68.99]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D890468BB35 for ; Sat, 10 Sep 2022 04:08:04 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HBh4tRB/JXae40/TozHOS6VebI2m/8kwIDH4omNjaUfsIsJE7MW/l7XEM8fTLUTVLYuq42giAMo0FVr7jPB/ss9G3XwwgHwGqQpuFMwm402+4sr5oVYY4GOAoRi22mjxRQN1aNMp+Sunj+UtAk/BES9AD4DPbovlk5xevpoXwI4vkMqpeXc0N9ZnozLByo9CtkmE0U0OHH1gFVw/d187oIPcCA2QqxzA3Ww7z98TTrGhZ2gC+Fg1YtaLDVSJ8FFVplo5noOG0oCXYdM5y0gUGLnMhIRcd2hLxF1YN+WN+rOwi4WKehI42rS5rW4JEaoOc0tFLIrb+9ijRIStowjXnw== 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=oM35w5e2xOYi6pd9I0qE1ptg8kHLmG48dzCp3FiPsBw=; b=O0tTHKiKalsxz4B5cCLlUXEa0y9qXsSCaQuSECZevJsCesixd7i/pXFT6wEYde0LivxOXv/jHXTq6DzsZw3hpoNOJLhOOMNqvrXn50eAy9jhhyUlM003HE9nFJDVafORqpaNo1QHAt8S1xhqRt7xntlsjbrhfU5Z+iivXbLg9fgXlZxmKqv3wGNouz2+aLQeNDZRqsbNMqAuMDxW6OLl3okkr4xWZJ9igo30brmIx+tHaf3Q53EwJf1MY0nV/4wHAj9wwpns6ElRGnxsnrP9MDrhyALE2IAe/3TULRY5jFPnzmhAi9s/5ccI8/mOwCqhXIGyrOmfpbmyVdDscbNEEw== 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=oM35w5e2xOYi6pd9I0qE1ptg8kHLmG48dzCp3FiPsBw=; b=HFePd9gQaQM0n4RqEjplIUxfns5HDPMAq0W/DaoGXbg3nrX2a9KwgbEPvyzw1kMFbb1QQNKyrk8nrVz5QswYxw0noyi8iQwOGGPaJDpnaMhlZ3AEZtkgf3V2mZ2szJ8gSWjcjsxgDDnIs1VtT7nAGzMSCLYOYAeUgTth0VvLMi42/j6AP4C/AIyEOR0e0b7R49Qzl/AE4zpYu4s+XC3yXtJmuvadzwAh185L6z+4SG8gDfTXMB/78Oguqn+1REBG2wBKOjvB8uhawD3McZTjFFcxosdxy2F3p2qG2/fgPcW4m2mTXeAC0fsjbETnkwJ8u6bn3629iocssrLkkC7TjQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:08:02 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:08:02 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:22 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [2SwCqfOdHQiSECp7fOZ4hrOYJiPZLGMm0UsVkEoYCSU=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-10-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 3158c083-e80d-43a2-b4d3-08da92c8e8da X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4poxq2B1EyBcOsVAtB8gLUdX8M6KUjy+vKFPdJ8PlRFnyW69svs67amqncFSyf38HUGytCZZOFiWubGPo/RTBCKsmxfM0IyaVjAa+PZvIKppHSLUnde+gnM0qciol/DyQ9Du7eQrlUOzBpDTSAroaKJSyeqYdyJXYgQoozL2hR9XMY0R/fJH6G0y4ERA4TVhU2+GRwfJImXsFw6h45GLfJVmTHtOkRDt5SoMgavPXaKQfREpuytFAtem56Xn+CndM5j1ypIxcNCo8f0VyOsl240MMyX3gzj+f8HW4HxQWP0exKcEM5XMmZvQf9QFgfsn6mpW3F7LhbCednOGjS2ShT4iV3iADaF5AYGOsFJm8bBNhrXuA8FSOK8OkJGlekykszgHq6wXjMrkxHFKk1GwkEhSSh04NQXx3ZpN3W9Lyw77LCyL9nyv/0uMdkusTvqoXNoaVJE9UryIc2hZ9HdjpSV8uhXH18wwTaEZYze8MBItFJ8PJGSyfisq5wFK7PvR+UFhMC51cnUXK0EN4T7SN7tTaRa5jtO3BgogjLKh9zkiYh6Fa+9731lWPEiswVk4847nZEo9LjrtqkFhTdM4TAbLUhNFlJybWzu/Ye+yHkCDl+G1/xxBe+FW4/KmgR+xQitENp7TpaT8d8vh8HHl4ABvml5YARUcyvjgE5HHAqk/tFFXsGwiF97dGhMgE2F9pWNDC4E+hzNLkj570XQqdRIJBAtlTSrfAjMNYKRY+Hq0= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 66PZCfkC2doWLOQ7gp61iggayKF7PTwzXLDMrvG2h3qbS9zM38fY/x4HLcqgs7snc/qwHQ0aaAYWcAQwPQ5okewtbi8JZTY+L6f1pw3s/jMxCevI5kYu30vEw2nqW5Qj3udYAIvwxtTVZckA9KJmlxTcaCHY1NIhxnrTNpPmaGhPyiJnHk1xgSVAQVFCqpt+s+wO0EMtC9vsNhmubYmgBiPzkbob49pMpUaobvJPwqjznEpOH99KxKzTqS5PQgTcRmXE2YAF3VG1ItH6oyazKIVnoTrSOhvZ4dZnfr+tHkS4n6DtMJrVvSlRmjgUE5AOhMlQpULEdFMZi7FqLAxaKYpSf5T+PacrPufKIO2bdhRkJkPlsvuhE2AE33/kirryfWH0YlL+fBBz2SE2vMW7rAvqaqSkxqOREJGF4eJWr4sfs8fmuQPzODuFofVTCXE7BmV551BbNPfbsX3lFupKVtfnqHpVTpue/3jx/cFWrmV/3NulBO9AK7VusrDNTz9DZZMcJUDAbgG5RCJ2C2oIi1+zaM7m8WoLAATopx4E/utT1gTIF2dEGWVrr6vOxYoLZr3xvReGTIDKzBojcWjnyvAbwrOQYjC0j2y4TBcJ01PPel6oxtHDmssYFopMPg3aYva2punm3rfeN/7vhCjSEA== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3yc5YMFHaDZwOTi1bH3xPW/CM8hu03SO9d7gmhrJvRUz5nzsdden2oLcWHUto9414BOVVPxVmHE+5E+botCODobdpsbisgDpdpApByCBuQQIrg1nabH9aQ5XEhLf+hKlTUJS3x8C68k0HIIqzhMT3Gs4QiUCuUGy5NLpKwffZMt+CmwIC58mKYvV3kaKko+vbJdgg/YcF9bVJU1LQIrtT/xxCcgJg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ftybTbnMDpw0UgES2QsSl8UjK1gdGC19dpa9p8AFzzjfJip6anY+cl5rAZU3NI X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3158c083-e80d-43a2-b4d3-08da92c8e8da X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:08:02.5994 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 11/18] avcodec/vp8: Inline jobnr, threadnr for VP7 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: bLCCysJVth2E Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index ce824cec81..ee30fc2846 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2518,7 +2518,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void static int vp7_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr, int mb_y) { - return decode_mb_row_no_filter(avctx, tdata, jobnr, threadnr, mb_y, 1); + return decode_mb_row_no_filter(avctx, tdata, 0, 0, mb_y, 1); } static int vp8_decode_mb_row_no_filter(AVCodecContext *avctx, void *tdata, @@ -2591,7 +2591,7 @@ static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, static void vp7_filter_mb_row(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr, int mb_y) { - filter_mb_row(avctx, tdata, jobnr, threadnr, mb_y, 1); + filter_mb_row(avctx, tdata, 0, 0, mb_y, 1); } static void vp8_filter_mb_row(AVCodecContext *avctx, void *tdata, @@ -2639,7 +2639,7 @@ int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr, static int vp7_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr) { - return vp78_decode_mb_row_sliced(avctx, tdata, jobnr, threadnr, IS_VP7); + return vp78_decode_mb_row_sliced(avctx, tdata, 0, 0, IS_VP7); } static int vp8_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, From patchwork Sat Sep 10 01:07: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: 37824 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245847pzh; Fri, 9 Sep 2022 18:09:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR6XoIWK9bADh5OFHTOKoJ/jCYnW67J9rHQ76h6FetNM6StQFfljiwmpTbcDhLGJPlBjemH+ X-Received: by 2002:a17:907:d0b:b0:741:7ca6:a2b with SMTP id gn11-20020a1709070d0b00b007417ca60a2bmr11952628ejc.654.1662772155710; Fri, 09 Sep 2022 18:09:15 -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 dm19-20020a170907949300b0076f0ab6f6e0si1827068ejc.527.2022.09.09.18.09.15; Fri, 09 Sep 2022 18:09:15 -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=l74VP90G; 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 858DE68BB44; Sat, 10 Sep 2022 04:08:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068099.outbound.protection.outlook.com [40.92.68.99]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 208FB68BB35 for ; Sat, 10 Sep 2022 04:08:05 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TXU1lobEyT7mSbBYUCMeA7RQSv2M17A+UpcaPX+MEYC/giIYUXgGDi9hmZE3NKk7tsYCSN88LjkjVww/eFGu1eStw4irszYcJ5dL0m1MIsJSoSVqxKh03M5WKA/6neDBedQ+f9ZdaJoFIhC6Uud893RYVAlpMUk2SeS7uv9MgbYPbhQoUnlPFqcNrxDLnB8zaQC58qymSZM6t6IOHLfWhmfGgbG5yF22F1cqmwXpXg6zfP5n7dARfHaEUaELqGPe9YE8Ohchm2EPshlz0U0dNbc4SjxPWDZok3y3vtPPg2zpmBbbcMTVfBfVaTf7sPcrLd1Ll7zNEArrhT9wAzP5AA== 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=r74sw2VdaPfpLWnyPYUL+U/MFhxENi0LdbkontRv93k=; b=oCHqGR3IDa7SozCC2KNrWmh6og+V1vyjpVogLpXi8Xd/xVxfLs2v0L5dzXhy7DhHqLDCI1MNDVVPrv3U467GOKfZ5fYshV4907d+eHSkRgJiuQHECn6w5hN2265aSHZ6VyB+EjVCnPYOhOjCrHw2x+1F/tNTmBDjLU+QYH8k2S1IFvIu+QWmLyWGiPwZxlTe+E9EuePSXaOQFv9kXb1ES9W2CMak7Kt9BYnp/1bheAQB14b2IpjfUMgY0ACm77fL6yklHam8uB0yNm/wxjwVn8J6oNkgNj7vRwdw77WZgoN7QR8YPHvdgV3xezRxwPKVOlhtLBsqyQEeNPxo9c1HvQ== 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=r74sw2VdaPfpLWnyPYUL+U/MFhxENi0LdbkontRv93k=; b=l74VP90Gl09IDBU2rX5wY2qkZ9rXMJlezV1qiB8R+rNSMsiw2il0kCB9PPMnQq1C61aL5YugP3vtxU04xU8Rd/XvF6hY2mYpxYLgZ6aJKhUW2ECDD5g9u8tB43KyBd+mSZ3UZJaAnsNngvEPGJSSIdMCvTRWJVslMj8cBNUgp47k+MqSEaHCgruqsRRzqYpjGSdb3py6p0/3YIARexfXAGNTWHqzX62Uc0gUEFvB6OtPM1t6o6UblWBEdmy0gBVrijgfjqnYTzAamJUT1h68Gb+HAlN1lcR//w1uBeMCub5qqaheJsCbDYxeGexl/BlYW5ONrnOFR2tWz7SRoeE+cA== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:08:03 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:08:03 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:23 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [1A0A0tQ/OIvCMjpgEgvmDiIbGtQWqzJsE4q08zGdC3E=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-11-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: c2d54013-d736-4b13-2300-08da92c8e99c X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4poxq2B1EyBcOsVAtB8gLUbbuuCokjw2NMXeQlR9HJGEvoEbdktXcPUHggv0lmWYQ3ndnPomvuVqZW5iGm3tSDEBvhBX9rSY//meXLDjaG3F44QzprL+XNf/RG8LzV/dprUfsV8UpDCa0ke2kqCDCdqcqskcKXvJXjf8w7w99RUs+Qmz3YwZ4Dzmgwj5t09CVcvsFpWyOH/VptVaXCZTqW7zufO6iKhNpiWa7tJdSacd+alwr9fXYjxhSpxIdouoiavP9KEo89J8BV+dy0Bn5yb5+TdHMkbSx0AT+11P3M36hQC8IEj/C39dlEr+h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vkDC8RyjaupniX/SpF9R8AK0pdS5U0FQsDrgzI2QxhWnZe/tC5OEsy8fqunIX/Tib1bWK+HRWDExfYRCOHSSKvKkPPkB9Cc+VMIRySYilW0gtoltXQc3/RocABv3eHsEOmd49pYevkRK1kdsls8rg5+ubRgBo73IbG33SQqgvja2JBeLigtAfYxeNAoM94calIaPj4/SjTPkgvt0yxaPlVJmVRrzn63zcP/ogRD6YNAR3i0YB7JD5ZVGSbU5OYauVxoBUO07CxfaLs7rPMTmYnaYImIez+S2o0EnjeFRfeNj2iRMT7SsUX4Z30a6CfYhz9t/3bkr4at6dVGeO+0efrQhDZBa9F1LLsT2KBodn9NyMOqQ3889zVIohfK7PbzrvfZR8SvZ X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: c2d54013-d736-4b13-2300-08da92c8e99c X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:08:03.8815 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 12/18] avcodec/vp8: Inline update_last for VP7 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: 1siljFoozeGy Always one. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index ee30fc2846..1f0deddb1a 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2678,7 +2678,7 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, prev_frame = s->framep[VP8_FRAME_CURRENT]; - referenced = s->update_last || s->update_golden == VP8_FRAME_CURRENT || + referenced = is_vp7 || s->update_last || s->update_golden == VP8_FRAME_CURRENT || s->update_altref == VP8_FRAME_CURRENT; skip_thresh = !referenced ? AVDISCARD_NONREF @@ -2740,7 +2740,7 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, else s->next_framep[VP8_FRAME_GOLDEN] = s->framep[VP8_FRAME_GOLDEN]; - if (s->update_last) + if (is_vp7 || s->update_last) s->next_framep[VP8_FRAME_PREVIOUS] = curframe; else s->next_framep[VP8_FRAME_PREVIOUS] = s->framep[VP8_FRAME_PREVIOUS]; From patchwork Sat Sep 10 01:07: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: 37825 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245880pzh; Fri, 9 Sep 2022 18:09:24 -0700 (PDT) X-Google-Smtp-Source: AA6agR6cbJThd532SvVJK0E5JoU6M1Uwz+S1qrmaYR0Iij9T7KzwCzpIkCiDwrNa/pBLE4JzxL38 X-Received: by 2002:a17:906:ef90:b0:730:9d18:17b3 with SMTP id ze16-20020a170906ef9000b007309d1817b3mr12039928ejb.141.1662772164015; Fri, 09 Sep 2022 18:09:24 -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 hv11-20020a17090760cb00b007454d964534si1398156ejc.440.2022.09.09.18.09.23; Fri, 09 Sep 2022 18:09:24 -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=AOpjRZVY; 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 7FB3C68BB50; Sat, 10 Sep 2022 04:08:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068054.outbound.protection.outlook.com [40.92.68.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 700E568BB44 for ; Sat, 10 Sep 2022 04:08:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P63JKehW0RtwIMRIamp7YyvCtYb5RSs6dbT7E+iuCSZ2Vw8JEuICj1i45RDszlT8CPWIR5I+l5c4OAHswi+mQzObFn/zy9lOWuCvvsxXqjXiG19droK8+Rgz2eOl+Y3oghYibKzASwGJ/oD7a3NA0iY0X/qQdkI+TffYhQqNihYtCqbDpuL3LX3AJBG84gHV7DzjB/XDzZt17N8FUU/FUh3TxEbCQkwBHixkuRmjanekXBvejKLh7KpP3USg1jbgU7304c1PIIzfdX2CGsjCRFmUmrLACoWP7KBvR3cHPapZQsOMWpzDGqHen0ijll1Ttl0Zeb9ovjUkCJilBsJpeg== 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=rQXPLYErmUQug7DrV0ZCCwveKoXo4l4x5R/LnLql5BQ=; b=bg4WxK+Dp3uyIbuSDNCDqAa9nEOGiyx5GsAl4dtyUNlSGCByUpM1qP4eYhbO88l9jtkYxQf+t2vaRMepoMd+AvgRBK+9MRDn4BVlwJodEXR/2RgQ1zDLERV9MwFt0nhfoR79qs/OIMxtC/3qs7SVz0+xXmk6RFdhosOx3ufCBrmSEf0POec71UALAgCwnAYV7mvEjeTCiZ05b/QkQ5qT/DrJIW7rrij8CKwD3pCm+LC/YDzZ7x48/++4DLjmcs5rSQ4Xj3zvOsxCVHPanHCIb+3PBYPaWK4TRUD31acJP5ezNg8lbyY9qaK7G0f6pbFGUB5T3B3EdlxVkr2K40meKw== 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=rQXPLYErmUQug7DrV0ZCCwveKoXo4l4x5R/LnLql5BQ=; b=AOpjRZVYoP4oYmk44wn2KywvS9R4RQktLfzNB4oFAoeGjPT6ayf/S8m7Db3mZNYYLHDIQ6X87fdJAHm9BLNgI9kJLayBDbZB6+r9YFe14rqbzgNT+iY5oUJfsELTsskJ9ZvjARISN3SDXUCtcgw+OJFB5z2MxL+8Ocf5zKAbNJzpdpX4oUbsGjvHcVy/PtB1ja08Fgn5ypHlTLNgpIQWk4w20Q4FLXjAD5oHD/VQF5AwyXBs1QKfdp8glsfSuWaRhWjZ8DSrWlWxzVmOIlvQs1TextkBsVYHs1V2XyUKniY+eZScZ7l0K1bBE5aKBlAn9HsLviHuKFwIXpRFts148g== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:08:05 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:08:05 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:24 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [ZPnTahlzJvUat6WXhtGianBdS0D65zXvTL/BxHYlqSM=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-12-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 72cc8fb6-bd6b-4164-f243-08da92c8ea47 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4ugNQeEqQCA+94Oipa6UIxLg8PLNXxJvvgfA6Q3hpN6f02my5YwmeB+RBKL4naJ8R0IfbtlIAyH3nzJj0VpR3qD0LwHvNtEMoLDlH2ocKTsKJFVTK2uu28hlEi3KoGFJeCboCr8WNEsKif3Tt7ImbjgPxKd4xTnVuiGeqXxttJtP4acIgJYXP8I5JUgZabUGqR0/6hhkAGlT0Bgr7WG4fcWGphkSZWbkEcXpLGIP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NGEktlntiRO14GghYatajyPTQgQkt71yda12ZellFQcuvMIlIVK6/JjgfU4MrFW42r4HBOKqgEwByt+PFKlkOpZnStSMiWDj1KJIgDXZKb3G2UbLWh4HJlRMsYEOPu4OyGumw8usFqrolbFk+JmQkPjjGqgRZVbr2dcDuxIWEXhFRA8e363/it8y2v1WSS5HbXVnr2pzwxjUVV4hiBwj3YTtezoWEtWeSfD6c6phYZgZZntQlxbqItTdlibA586q4Y0UoDLesCc7hm15ElJwhVI+1giSmt5JsNov8ocKQ72FT0sobAC6EGPQH2XBJebTuZ2C2fTwZIicdTpuANU5JOhWYhjBaK1pJO4Y5cZftbPLdpdJ6wSrFpt+7AIbmQ8fykeCxndNL1XIb5SPXubIu8Lp15o9ng7HJR6wyZ0gWms2ym7/3lhgJ9W1eNeEYlo X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 72cc8fb6-bd6b-4164-f243-08da92c8ea47 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:08:04.9794 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 13/18] avcodec/vp8: Don't use avctx->execute2 for VP7 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: QAE3oH8dQXWO Our decoder does not support slice-threading at all. Signed-off-by: Andreas Rheinhardt --- vp7_decode_mb_row_sliced() btw can return errors which are currently ignored (both before and after this patch). libavcodec/vp8.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 1f0deddb1a..a7df4601ef 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2636,8 +2636,7 @@ int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr, return 0; } -static int vp7_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, - int jobnr, int threadnr) +static int vp7_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata) { return vp78_decode_mb_row_sliced(avctx, tdata, 0, 0, IS_VP7); } @@ -2804,8 +2803,7 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, s->mv_bounds.mv_min.y = -MARGIN; s->mv_bounds.mv_max.y = ((s->mb_height - 1) << 6) + MARGIN; if (is_vp7) { - avctx->execute2(avctx, vp7_decode_mb_row_sliced, s->thread_data, NULL, - num_jobs); + vp7_decode_mb_row_sliced(avctx, s->thread_data); } else { for (unsigned i = 0; i < MAX_THREADS; i++) { VP8ThreadData *td = &s->thread_data[i]; From patchwork Sat Sep 10 01:07: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: 37826 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1245946pzh; Fri, 9 Sep 2022 18:09:32 -0700 (PDT) X-Google-Smtp-Source: AA6agR7BrWh4WDOr8EFXfUf91hEJwYO+AqQBYGWmhoY7BJcU1B7mMs6SxwasVCSvAWqLuVSV9Jle X-Received: by 2002:a17:906:fe09:b0:73d:90ae:f801 with SMTP id wy9-20020a170906fe0900b0073d90aef801mr10974119ejb.699.1662772172326; Fri, 09 Sep 2022 18:09:32 -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 w4-20020a50fa84000000b0044ee88a08b1si1532812edr.277.2022.09.09.18.09.31; Fri, 09 Sep 2022 18:09:32 -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=RuEw+RvT; 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 6AF6968BB54; Sat, 10 Sep 2022 04:08:09 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068054.outbound.protection.outlook.com [40.92.68.54]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A32AF68BB3E for ; Sat, 10 Sep 2022 04:08:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZeVy+PEn9LzqUhgGcUmim4JyO1VnSf9pLjUBPd10Qnx4R0rfe4eoheXjA6QORZF2q/rrBsOh1dU9fGuHUJTFkjrTjPKQe208hiPnLI6HqXEQDH8WaXcNae1prWLVLDvyOLle1EdaWoJIOyoCu0gqppsrtYcIKic1EoPLbvxJ3HGf/fxhKABPLHWBtjxNSe7Tbbo0VAWMUtXwz5FnDigcXub1RfcwJwbBvMhtV22D4Ao31W0JBlYgE209B3Gg9VfCTNGVs/1quHadDs+GO4d4VwZp2Lvcod8S5FAs+rBVdmYVNPF478ROjYnWCCSxZfzL2oZkfNqPfeLzAW1whbeJqQ== 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=OB+Uot9yZorNmjfvgFtVP2mBAOPBBtbqhVAYP7/+LFc=; b=QhhDyh8TMQXdKti4FTLJRIlT+BtMk8oYsbP6Rmi07y5H+Spd5olmHMwiSda5UqTa8+7hnjc0PLbyJsskE8GtaxAaj9kARvqOLTZWZxKTHsS/CQjgMbaI0GZ9F/V1l+hQcLIiUh6o5WdF1GOpWIqMcygIeloIMnATrwn8D2hb31yCw7oQHPHgApUrgBOgzb5HXaRyaCo/dQ4XeJ8sWQTBCLjBJ/xsdeyirKqxmEWq7241A99HgXkTL6XghhenkH487qOUcOBuDn0xbuUXg33Wb7LVk1w8IyQ9caOgAoZz9RZ00eFZSi7d/y3f/rwnkStdeaWpfkteUg3m0eZKCMiPYA== 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=OB+Uot9yZorNmjfvgFtVP2mBAOPBBtbqhVAYP7/+LFc=; b=RuEw+RvTzy1HyEeXQb6rIzj9J5376VAekqWcNKPzFwoX4qszuoX+atDVPlWGB9ndNIbF1msCWMyE8z2JeB17+cyxrCTy+Opi5f3Dp2YWPe51KADEBJnwVgwNcHGvotfC/wkUSr+cDXo6olHJFHBqsGb683o6xQG49nN3CZhD7q0UiiA/tEsopMnoWrmFuw50yEZRYd57GeCN5/JINgBeOerbCQkc5KCPYcm1ToC0q5Vg7zukd0jVEV1sH7Kh3xU5f36xQrvfidoZmD8eo7plPCghkJ7JLedV8Rkhp5hCSL4psJXhhSb0dzuakoTLLHBr/JeRj2tU4PkQXA7fXljvCg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:08:06 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:08:06 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:25 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [adSBveOCkbUvxmXprrJeQew4sfXTzct25dDh0+rZiW8=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-13-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 1764fc1b-fa2a-47b0-ff16-08da92c8eae0 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4Q1ndWn/48CD8eIkz+N2S0JkHIEhdsQ9r/qCaPRu/aNV4xbnBAipQvwI3ChGg9E2MOUmHr3fWu5H9wglLBx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CzT6Bj5H+1DV3e82la8MAm+h0H0mrjh+iglXDP3pjbfPHcelmuR9+irH9BqzUQj814kItqPFlUJtgenzhLvMDC75Jfof3oYTYhgdzjJLlUqdFfFEZj3BcLCDI4JXksnzr4slban4vx8e2CeolOuX1mVvAAMkHa/FqPbcT90WlQ/p1S5unqMq+W4NuIh2Y3R1rVFwQOzIhRFf/kdzoRbBHhufFCodNFspgRH6F0XKhUSt5XOaCNe8SalPgOCepKf65FpSeDQmoKmb1pNtXi2IgXMwqKXEWUEhJODsGx5OgBMlZPIurZOHSyjV4YhuPwrOl5w/QejOFiN8I2Luc01xIy4agxzNmNL1eH3UIKr3UFElm61QRTjDjicdbzd/LZuOPClUqlonQzuq3/uUCwOsJxoc8Z028d3KTT3tHxQAK/THzzADunLly5vQXnJ9tDTMNGiDDsdbPgViAIKNwGCqyyf743bXCEpfAMEGRp/CSspQ9wyFBknOcDQH3lFcqH5eXXk6XQFlSorVvh/WEGuM0h8De79JeSSa++qcCpjPggPfJblOSjzAqVJxHqzDEWBDB6x62YJ6u7rZw6b7q5vyHdqSu/1lPABg1NpvggajsEVilo2NGvN1yqxVDrts0a X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1764fc1b-fa2a-47b0-ff16-08da92c8eae0 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:08:05.9793 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 14/18] avcodec/vp8: Move fade_present from context to stack 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: cOk1SLK5ZPfZ It is only an auxiliary value used for parsing the VP7 frame header. Signed-off-by: Andreas Rheinhardt --- I think that vp7_fade_frame() needs a check for whether the previous frame is writable before writing to it. Does anyone have a sample for this fading? libavcodec/vp8.c | 6 +++--- libavcodec/vp8.h | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index a7df4601ef..baf9820ce6 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -580,6 +580,7 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si int height = s->avctx->height; int alpha = 0; int beta = 0; + int fade_present = 1; if (buf_size < 4) { return AVERROR_INVALIDDATA; @@ -679,7 +680,6 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si s->update_last = 1; s->update_probabilities = 1; - s->fade_present = 1; if (s->profile > 0) { s->update_probabilities = vp89_rac_get(c); @@ -687,13 +687,13 @@ static int vp7_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si s->prob[1] = s->prob[0]; if (!s->keyframe) - s->fade_present = vp89_rac_get(c); + fade_present = vp89_rac_get(c); } if (vpx_rac_is_end(c)) return AVERROR_INVALIDDATA; /* E. Fading information for previous frame */ - if (s->fade_present && vp89_rac_get(c)) { + if (fade_present && vp89_rac_get(c)) { alpha = (int8_t) vp89_rac_get_uint(c, 8); beta = (int8_t) vp89_rac_get_uint(c, 8); } diff --git a/libavcodec/vp8.h b/libavcodec/vp8.h index ed79bc79c1..db0155237a 100644 --- a/libavcodec/vp8.h +++ b/libavcodec/vp8.h @@ -335,11 +335,6 @@ typedef struct VP8Context { int vp7; - /** - * Fade bit present in bitstream (VP7) - */ - int fade_present; - /** * Interframe DC prediction (VP7) * [0] VP8_FRAME_PREVIOUS From patchwork Sat Sep 10 01:07: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: 37819 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1246004pzh; Fri, 9 Sep 2022 18:09:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR7eWfIFhsXS9IPKEk4ZLDpraNNRbHxc1gr5GqJg8srYKxGf+y4xKLtE6sV0CNdHOE7MJ17e X-Received: by 2002:a17:907:9717:b0:77b:6f08:9872 with SMTP id jg23-20020a170907971700b0077b6f089872mr60530ejc.629.1662772181179; Fri, 09 Sep 2022 18:09:41 -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 dr11-20020a170907720b00b0073d5b609447si1724198ejc.324.2022.09.09.18.09.40; Fri, 09 Sep 2022 18:09:41 -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=gdtUoJ+6; 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 EB15368BB61; Sat, 10 Sep 2022 04:08:15 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068061.outbound.protection.outlook.com [40.92.68.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9629468B980 for ; Sat, 10 Sep 2022 04:08:08 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NDNclFuB5p0XfhDUH/704Nq4F69QbQ1twKpDSKtZ5Sgoufb8GxjmV4IKCxx+HgpwsfcmnGwkau+EEoUpXxSOE1EwpP85P9U8QFEWxalSR4nr85iup6DH1mfNBWdf5E5dUm0II8uncmejjLQ4+rsRdXbsaI0pQvHhthaWPfZCTWDotYdFJmpkLA4rGdoWMXifLTqHXdA/YnrF7ysG9Ex80Y+m7mk/AlA5PYavXitXhXSUUb6dmHHqX0SiFyLtMPzWc2wFCXdLMhsGSQyrJArijar090Sl9vjsT2PsxeaWSbWfSvewEsqlyAmcBQuWteWbGELMOEvaK1KXvPO5+PDBaA== 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=I+B2tf81xZv186pCTM9vNW4cmokMUTI42aGprtf01bw=; b=QZEUYbkV+KT3xAZD0vkowc+dRLfL8FENSB1vgrM+Ewt98qdoWKuyWVAPgUxjc936C/vIeVIzVQxhLCwkLvkvpYmtTcgKOUvHOTyQbHAQptLsyWQsqxpuJgY85qAfRFNnxpEouHeI4GGUv0pUnqITveIF7lULbiVw6Xw+VpatRTGrWzFUis3quIEpuLwejpUhGtPnKZcTV76FS+9uwTjtmT+eKxa4FlChcWHnY4J1f+xgbtuakp+jyFLN/5ZJANWp/5moH4lF0acv2D84awt9XWl/3zKwik5kQEJNf7hDQ+v7vsr2ZdOTb4WfCZ9//+U+DgRNsqp52PMGYYt18qb9UA== 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=I+B2tf81xZv186pCTM9vNW4cmokMUTI42aGprtf01bw=; b=gdtUoJ+6wTbW3EX7NqH+w6dtOqMIEnL3OhXvMICQryoCcmJy2Cp7YoHd6qBNHoNrsxU76aZ3M/fRKua68GfZ/0FCXRufSCHhqcgRWnNBIk2+NeXCo6mPSkecZth92hYHHOop94R0kQNsif0Rdp/ts8zFsfu2L7B0tbEyhBChhIk85rysFozX0Kakcc7BN0H18Mkk1ToBV3hjYRjcU5wCuoU7zP+7xoa32LGxpSKBLftEFeuucLoadWJspuTHrxXUBleVYs+tWBv8A3p1l//Gm8WGDz7uTEWT1Q+jnHRXcGHxN9syTWEEi+Tt+N5PVBW5YD/49oF+ZKFirqsVtMRm7g== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:08:07 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:08:07 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:26 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [OgWJoLTdWbZBrjRG/R161+yCfFjnIBkICWvQn5pSDcE=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-14-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: aea9c36a-47ad-4c0c-f597-08da92c8eb93 X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3nYUjUJgQ1LxEogv9AalAZhYJwX+wV8LTghWJ7E6NkI85BlGc25S3OENmFvTQDBpswQ7hSOazRuHGFu90XU3iJ1Op1xHx8igD/gGqBot+euhhYcw82R1KZagma83z7ABZK3pb6qGi2nwGwRUDkSNM+1YN1IPj4iWcic/oPlu+5cNfaj4M5IPMrTLg1kiqJhNkehlzA8njCor6bVbFDoM42tnippnsnYzfdo9vFmhVHi0oa2EN6VY94TYJgqZGPbBPP+zmYhcLsBKY//0/hR0ZPU1q+qL58WB17k353YpKgEX3RHBP7DYR+rX1Fe4rvxLaYq294V1e5XoNyk7DKOt2Bf3yI24HzCNpBvOQPRjeBtfu6iIaroMwWuxH2pCEcI/jO78BbkUnnBBhgTON7CBfXA2sOFP/SIPD7Fym00+w9tYfgozilSm4Yu4SOdihTRo58N+/sTU01dKnepZJkBWvYvhAMKnYDudrPtyX/Wdbzs/AJSF2EcVXYQn5IGaOrAdkfKDuEvELwwtaFi7jAUQMr1fRh/6MQfz2L84SGQVk4UAY+O4k1nMpmohvoO/rzluset1MzkosFQVdOr5b0/Apr1qnoIqS+CC/9YB142cCqAAkc8VU2gCnOVAS9cdrLUEkHQoyu+JB0Q5U6WfYGdl7N9CPc6WM+Rzz4tzQhWJ3LUhUPudc20zlbY/PizIRixTitQ/4j0X0ZIaZHF0CqbU3+lkhuWgHtwd7kEPusXs/2IgYM7kwIcDE15wuX4/NmgCmctPwXFmCLe9+H7Xnf7Sabw X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: brtww+rqkAKqYcLlEr3l4zC8uyk50gH2yY6iAO80MIz0y9VoUx0t6BrWTSmmqW8R/IYP480i6ZCBvsiWTrVTCFQZpQyJfsEeCsg4VsjHBZagIsSPQUf5rKdefJsv2jD2PZZWRM1rsgNruHqENLa7OemB2gIPLRC1z7WzN2tKJRNhK9wqUN3GI0mcTo3RE1U8QPu63z4nawU9QldGUtkiyftrNtPvWzV6olOUSiq75s2lT6TLVQcQIWZhKchobz3e+Fu2EJRpHO6fAaxBdvKYUJwLeNTJo1JkmIOJy1USR3PNFWJhL40VK3CuEbpSFdBEAhNoVhBA54kxXHsUwLFaPj87xutlNkYoqthXoz7cI8OHU1L5wcqAN1Bizxs1MYWAoqChqWGJwTOgEITZ29MRn+IVqJKSc53LHUGxXPGPTNNGtYb69/LApjdgsoxM+emZ39617s8/5RgnBvvb7EtbULTh6BjOfghTo2f+vGyClPM2VvoH5odwvZi2Nn+xCzyG27zCTet69LhT38fv8tSzjXiBPXpy2gIJ81Qw2lIBaQ8ha/D2xFSUrK6dBEJY5CqZ8TvN8kMkBIWRquU2sZgtB23iVkHaf9+8lwWCBTWLCh8gqt5rrFTcq0QDcyonsGqSxcYbeBYwEmxh+alNQendog== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zwrBE2RyjFUdairIOLf9TQ/sMdLCG85jqMmyy+sNj1DkNiKJTqAPzvrVyde4ew97OWCizSN7Z+q7uRMiGKtFLcgYLcd5W5GKim5T+Wt99n3ruRbYQv/A+8STYeoZ6FO7amGhUh0CsME/gpZNMiTC2mxuv4mlGnLR0T+S2HpX7Eu286L1c6c1nh+Af4cCrZgLnCdtPD5b8Ck0UvIaD51ryNKCfpE77DObmtb+axVR1/QTzUd7LxN9xc3tuG3dKdzBR60vRZLMUMxgQ9lfCJzzLN94OZfZFDTrk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-CrossTenant-Network-Message-Id: aea9c36a-47ad-4c0c-f597-08da92c8eb93 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:08:07.1521 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 15/18] avcodec/vp8: Disable frame-threading code for VP7 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: xQwyLXHUEr+U The VP7 decoder does not support frame threading. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 55 ++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index baf9820ce6..91f3238245 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -1836,7 +1836,7 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst, const ThreadFrame *ref, const VP8mv *mv, int x_off, int y_off, int block_w, int block_h, int width, int height, ptrdiff_t linesize, - vp8_mc_func mc_func[3][3]) + vp8_mc_func mc_func[3][3], int is_vp7) { uint8_t *src = ref->f->data[0]; @@ -1850,7 +1850,8 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst, y_off += mv->y >> 2; // edge emulation - ff_thread_await_progress(ref, (3 + y_off + block_h + subpel_idx[2][my]) >> 4, 0); + if (!is_vp7) + ff_thread_await_progress(ref, (3 + y_off + block_h + subpel_idx[2][my]) >> 4, 0); src += y_off * linesize + x_off; if (x_off < mx_idx || x_off >= width - block_w - subpel_idx[2][mx] || y_off < my_idx || y_off >= height - block_h - subpel_idx[2][my]) { @@ -1866,7 +1867,8 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst, } mc_func[my_idx][mx_idx](dst, linesize, src, src_linesize, block_h, mx, my); } else { - ff_thread_await_progress(ref, (3 + y_off + block_h) >> 4, 0); + if (!is_vp7) + ff_thread_await_progress(ref, (3 + y_off + block_h) >> 4, 0); mc_func[0][0](dst, linesize, src + y_off * linesize + x_off, linesize, block_h, 0, 0); } @@ -1894,7 +1896,7 @@ void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1, uint8_t *dst2, const ThreadFrame *ref, const VP8mv *mv, int x_off, int y_off, int block_w, int block_h, int width, int height, ptrdiff_t linesize, - vp8_mc_func mc_func[3][3]) + vp8_mc_func mc_func[3][3], int is_vp7) { uint8_t *src1 = ref->f->data[1], *src2 = ref->f->data[2]; @@ -1908,7 +1910,8 @@ void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1, // edge emulation src1 += y_off * linesize + x_off; src2 += y_off * linesize + x_off; - ff_thread_await_progress(ref, (3 + y_off + block_h + subpel_idx[2][my]) >> 3, 0); + if (!is_vp7) + ff_thread_await_progress(ref, (3 + y_off + block_h + subpel_idx[2][my]) >> 3, 0); if (x_off < mx_idx || x_off >= width - block_w - subpel_idx[2][mx] || y_off < my_idx || y_off >= height - block_h - subpel_idx[2][my]) { s->vdsp.emulated_edge_mc(td->edge_emu_buffer, @@ -1933,7 +1936,8 @@ void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1, mc_func[my_idx][mx_idx](dst2, linesize, src2, linesize, block_h, mx, my); } } else { - ff_thread_await_progress(ref, (3 + y_off + block_h) >> 3, 0); + if (!is_vp7) + ff_thread_await_progress(ref, (3 + y_off + block_h) >> 3, 0); mc_func[0][0](dst1, linesize, src1 + y_off * linesize + x_off, linesize, block_h, 0, 0); mc_func[0][0](dst2, linesize, src2 + y_off * linesize + x_off, linesize, block_h, 0, 0); } @@ -1943,7 +1947,7 @@ static av_always_inline void vp8_mc_part(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], ThreadFrame *ref_frame, int x_off, int y_off, int bx_off, int by_off, int block_w, int block_h, - int width, int height, VP8mv *mv) + int width, int height, VP8mv *mv, int is_vp7) { VP8mv uvmv = *mv; @@ -1951,7 +1955,7 @@ void vp8_mc_part(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], vp8_mc_luma(s, td, dst[0] + by_off * s->linesize + bx_off, ref_frame, mv, x_off + bx_off, y_off + by_off, block_w, block_h, width, height, s->linesize, - s->put_pixels_tab[block_w == 8]); + s->put_pixels_tab[block_w == 8], is_vp7); /* U/V */ if (s->profile == 3) { @@ -1972,7 +1976,7 @@ void vp8_mc_part(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], dst[2] + by_off * s->uvlinesize + bx_off, ref_frame, &uvmv, x_off + bx_off, y_off + by_off, block_w, block_h, width, height, s->uvlinesize, - s->put_pixels_tab[1 + (block_w == 4)]); + s->put_pixels_tab[1 + (block_w == 4)], is_vp7); } /* Fetch pixels for estimated mv 4 macroblocks ahead. @@ -2002,7 +2006,7 @@ void prefetch_motion(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, */ static av_always_inline void inter_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], - VP8Macroblock *mb, int mb_x, int mb_y) + VP8Macroblock *mb, int mb_x, int mb_y, int is_vp7) { int x_off = mb_x << 4, y_off = mb_y << 4; int width = 16 * s->mb_width, height = 16 * s->mb_height; @@ -2012,7 +2016,7 @@ void inter_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], switch (mb->partitioning) { case VP8_SPLITMVMODE_NONE: vp8_mc_part(s, td, dst, ref, x_off, y_off, - 0, 0, 16, 16, width, height, &mb->mv); + 0, 0, 16, 16, width, height, &mb->mv, is_vp7); break; case VP8_SPLITMVMODE_4x4: { int x, y; @@ -2025,7 +2029,7 @@ void inter_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], ref, &bmv[4 * y + x], 4 * x + x_off, 4 * y + y_off, 4, 4, width, height, s->linesize, - s->put_pixels_tab[2]); + s->put_pixels_tab[2], is_vp7); } } @@ -2054,32 +2058,32 @@ void inter_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], dst[2] + 4 * y * s->uvlinesize + x * 4, ref, &uvmv, 4 * x + x_off, 4 * y + y_off, 4, 4, width, height, s->uvlinesize, - s->put_pixels_tab[2]); + s->put_pixels_tab[2], is_vp7); } } break; } case VP8_SPLITMVMODE_16x8: vp8_mc_part(s, td, dst, ref, x_off, y_off, - 0, 0, 16, 8, width, height, &bmv[0]); + 0, 0, 16, 8, width, height, &bmv[0], is_vp7); vp8_mc_part(s, td, dst, ref, x_off, y_off, - 0, 8, 16, 8, width, height, &bmv[1]); + 0, 8, 16, 8, width, height, &bmv[1], is_vp7); break; case VP8_SPLITMVMODE_8x16: vp8_mc_part(s, td, dst, ref, x_off, y_off, - 0, 0, 8, 16, width, height, &bmv[0]); + 0, 0, 8, 16, width, height, &bmv[0], is_vp7); vp8_mc_part(s, td, dst, ref, x_off, y_off, - 8, 0, 8, 16, width, height, &bmv[1]); + 8, 0, 8, 16, width, height, &bmv[1], is_vp7); break; case VP8_SPLITMVMODE_8x8: vp8_mc_part(s, td, dst, ref, x_off, y_off, - 0, 0, 8, 8, width, height, &bmv[0]); + 0, 0, 8, 8, width, height, &bmv[0], is_vp7); vp8_mc_part(s, td, dst, ref, x_off, y_off, - 8, 0, 8, 8, width, height, &bmv[1]); + 8, 0, 8, 8, width, height, &bmv[1], is_vp7); vp8_mc_part(s, td, dst, ref, x_off, y_off, - 0, 8, 8, 8, width, height, &bmv[2]); + 0, 8, 8, 8, width, height, &bmv[2], is_vp7); vp8_mc_part(s, td, dst, ref, x_off, y_off, - 8, 8, 8, 8, width, height, &bmv[3]); + 8, 8, 8, 8, width, height, &bmv[3], is_vp7); break; } } @@ -2470,7 +2474,7 @@ static av_always_inline int decode_mb_row_no_filter(AVCodecContext *avctx, void if (mb->mode <= MODE_I4x4) intra_predict(s, td, dst, mb, mb_x, mb_y, is_vp7); else - inter_predict(s, td, dst, mb, mb_x, mb_y); + inter_predict(s, td, dst, mb, mb_x, mb_y, is_vp7); prefetch_motion(s, mb, mb_x, mb_y, mb_xy, VP8_FRAME_GOLDEN); @@ -2629,7 +2633,7 @@ int vp78_decode_mb_row_sliced(AVCodecContext *avctx, void *tdata, int jobnr, td->mv_bounds.mv_min.y -= 64 * num_jobs; td->mv_bounds.mv_max.y -= 64 * num_jobs; - if (avctx->active_thread_type == FF_THREAD_FRAME) + if (!is_vp7 && avctx->active_thread_type == FF_THREAD_FRAME) ff_thread_report_progress(&curframe->tf, mb_y, 0); } @@ -2746,7 +2750,7 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, s->next_framep[VP8_FRAME_CURRENT] = curframe; - if (ffcodec(avctx->codec)->update_thread_context) + if (!is_vp7 && ffcodec(avctx->codec)->update_thread_context) ff_thread_finish_setup(avctx); if (avctx->hwaccel) { @@ -2815,7 +2819,8 @@ int vp78_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, } } - ff_thread_report_progress(&curframe->tf, INT_MAX, 0); + if (!is_vp7) + ff_thread_report_progress(&curframe->tf, INT_MAX, 0); memcpy(&s->framep[0], &s->next_framep[0], sizeof(s->framep[0]) * 4); skip_decode: From patchwork Sat Sep 10 01:07: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: 37820 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1246049pzh; Fri, 9 Sep 2022 18:09:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR55CwPlqc6huPhbRNNgizKYn+iglfnL8ERgWadPcoNS3zf7/jjtIUKYndXazqlcqB+As+u7 X-Received: by 2002:a17:907:2cea:b0:741:6251:3a22 with SMTP id hz10-20020a1709072cea00b0074162513a22mr11531998ejc.6.1662772189393; Fri, 09 Sep 2022 18:09:49 -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 f18-20020a056402355200b00447e24d55eesi1963854edd.81.2022.09.09.18.09.49; Fri, 09 Sep 2022 18:09:49 -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=fCluR99t; 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 A855568BB35; Sat, 10 Sep 2022 04:08:17 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068061.outbound.protection.outlook.com [40.92.68.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E06BC68B980 for ; Sat, 10 Sep 2022 04:08:13 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BoEAVaiaLJivpbbHHiWsw8PwoMNFE+bPqnjGiN8ecXcD6BcwQQeBSu5A20dfZhUFI/plRi/4x1Mvq/dV8M5NeWKiCZMIxRVIZXMZevG0efXyc6N/rlF91MtBj5aPQ3TCXyHSaR4nz0TJIBjTl1sEoSYEg4x80fBMbblMEoTnM1tRJxZ+83hf3W9ssfTNQqPH2+nPEmC8KTV1sF5segaFydQWYYh6jLoW86t3CWcHjcHpW9rSIK+v0K63dHQVOhnWkw5JCfofZXSDuN+yVXZk/9od4ZvbYdQRiAqeeO/tEKzcLEexVRXHziQTNpDDFSMCSGbK8cfGrW+uwj/cIvrXBg== 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=i+76MJyXkAJKYRNcKe50iD29dyvuwG33UjvdQhCVVhI=; b=Zsj2yU1Ng8YNN/O+04W7cMag23nVlC5JSUxxPui1u/QyJD4EBtt+ziynFRH2paiW1D4ChBHfZmEXSKoyuLX9uyDMBqLbibg/dBPqFRVtZBATYFmBYP7w42/5lMroIz5E6nfwuzMvPKIGfx8L5ftZDaHE0LxONYF3tA/7whyhzIV1RXkOTEvTp6+BBVtFpzRC+9msXeOTym8ED33+jteLOjcOgeRI+waUXJkrN0oLWW0oh3ooguH7v6gskbPa1XRUt42SARE7XdIhcLCb9bdjxCQ/TC1WbriCjnFvszxVj2qvMlbkZqYgxE0dqYE5g1bCcztwurQ4xRFGEkXNrMM08Q== 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=i+76MJyXkAJKYRNcKe50iD29dyvuwG33UjvdQhCVVhI=; b=fCluR99tS9ijkL3ARdD0d5GZUZyZU/KCa1W5x+cMYhVumXeSE1Ql1STonIB/4SecHTyusn8+VWRFLAQ3Uj2AmpMB99SXkQETHEQjxk5ecn0jJ8IVIh8k2y+gkGBJD6mUKkWfTy9siPiNsLxN7R80kdRJ4trdCR9HiMzZRypXHd6WYFPIcKgWLv5d7/wERAtiC3Lu3b00kXp4ryWHBD5mY2xrIpz58M0UyjPxMe3gXLJgkeX9F4ViRLsukscEyIHBdkfPWXWgjIQ30ZjA1RtZD7YvWz0rnX9ruDWIyZV9hvw7YY080D6mxQqf8XP0EP8/xVd6MKAA4GpnYD0XdDiDsw== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:08:08 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:08:08 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:27 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [9lTeDxIBgwOGFODpItvxfYx3X1W3nsMumaVsceUj638=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-15-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 2afd1fbf-7dec-48fd-8358-08da92c8ec2c X-MS-Exchange-SLBlob-MailProps: AZnQBsB9Xmqc989vEjNQgjm661f4SJJ4OS18aANJnqaR+pF0QEkcM0eCxE5FFp5dg/2HgXNBgbKMJM1B+xdZZidIbM5sGzVb33xlMlcoC3/YESjpNwoizLlbYCsIkaNi3CSLt3l/s8MzQuoaYnNQb6WWMxTNu2qpnLc4pkwzTVQjDKwgBM8rxLfrhcwxPqH3A/A2+b3ATzrnSvZ0g50RGgcZfc30mlcqfjAye9QAlWCrMkduH0cr/BeyegXqkHUwsO94SdhJQtATuhKaKiQ5hIPEvfCwp+WeJIn63L9etYlkGwWTEfj/2NvAO+iJVDXvu/tgZsA/sOYNJPBV+oPAPr1fUyd4h6MXyBUvjhhz6+ciRDDEHVXlH59Urg1751JKWFOrzzVdyXP2AbU94/6qxlh5AThnlzDHdFeemP5YmyFlVBBil/0zPkVd9E/Nl47wLVID9loRkvsfkypP8uaUtIDuxbaWZjCCv1vpfoI0NEuzxM4kMmhVCYqaYtZ9H2iqo8CnmmsyROiFG5iuNO9MqcfuDL4S441eXKR1fpbaez8o+3Fw1GoowPrfbuZs597MMJYanB11rZ6YjJiHx0M/UTlK2qT4vTVOwXL9Ul5u4CJ6NS6nozpihFhiJ4lBJvxC9pTFi5FGw/caWVoh701InX2sjr0Gpbf0/duVj5Sp952tw2QbSXJYzyop/ngtPfhmgBtRAViW6yUYPdcEz9Hm/maEzzAuUOzm/uzDcQDpgCsXewy/QkpLy4vlCRjWHVcq5seAwfzdMmU= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kVKuux4gzYgvF5CL+YzXdhewK+OtWG5vJ3dHnVxWwHvRQKS5p9paRcknXzdh11s6vHF8atYC5tXERnppruqkUBBiZjuvxGmLvqwUd+S0bTufzYJeb6sAyKM0HQLnxgbFPURnyKKgC3k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WA+AmWwuFZI/q5Ph6aWLLDphFtgQhIFhVtxqIXn9lxTFfGswZo2/4h/Xeh1CFTRGdJThNi3OVao0/Lk6LwHC5RZ9blCbKKMUlo2v7yqFNNnjEAINNE77vUTx++L4O8ux63jhuVBD/CHX8oTh1euc5u5Yd49LjlWckvdVcCIVMm4pRmxXmZBWrBHiu/Vy+eqSInWxGM7BkKBlGRCw3GJi8Qd1SXuDKTXn6COwb0Q0hHj4cm2DftxGPWAubERkXuu32g6BnehRt7vy7ZUmmEJ6Nq5aI208vnjW4Ivni/9Eo/x2J6c8l54Iw1v0FDjLhaj2trP4Sm245/jSzROn04u07vcg6aenvWx+4aA64CHUQZYO+KjOyyC4i/SBtYO7V81jO2q+HRPiDFy31U/66YUZGdW/IPdYfn/A9pGvrZSVjO+i15Cj4p/FhbtD4czlRfeB5Q1FrDpXCugC0rsKcJXrUVYHFfI85WzxWhwj2xRa3nNqkylqK1RsiNal3zYp3WG11OtRmzqpJ3EXPBnuyx7s9alzdU6/BpdrKLSHXkSB6ocA8xpNlwK3vZSTQxSXv1iF5/pM16xM5lMejFpBclyv3iRHumxtE6ur1cnKBJvhuo5bgU5r5nVeq1rSALD8wbPNdr8VzbStVD2It/DQ6DQ6yhRCLET4S8ygvXMbN7n3/gku781q3hFUTP3f/Cg+Ku3wCwbpkG3vYs0cu6fnk+TA5tLdvUxnGPNkJwJnMN6u2WzGpK1+1GGaO44UNdLmCAMqubkHrlOQTrleNKGc95rUJGPzbB83bsOhjW8yWLb7RjLUJJQHCBnnI5fNg2YCBCUbB/7bKc1Qcy4LIl349DMWb95qehE6hGIO X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2afd1fbf-7dec-48fd-8358-08da92c8ec2c X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:08:08.1831 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 16/18] avcodec/vp8dsp: Remove declarations of inexistent functions 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: jApPpZpyk4Eu Forgotten in d6f8476be4895c620d58e021ab880823d2fe25bf. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8dsp.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libavcodec/vp8dsp.h b/libavcodec/vp8dsp.h index 7c6208df39..bbd7f60a4f 100644 --- a/libavcodec/vp8dsp.h +++ b/libavcodec/vp8dsp.h @@ -81,13 +81,6 @@ typedef struct VP8DSPContext { vp8_mc_func put_vp8_bilinear_pixels_tab[3][3][3]; } VP8DSPContext; -void ff_put_vp8_pixels16_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride, - int h, int x, int y); -void ff_put_vp8_pixels8_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride, - int h, int x, int y); -void ff_put_vp8_pixels4_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride, - int h, int x, int y); - void ff_vp7dsp_init(VP8DSPContext *c); void ff_vp78dsp_init(VP8DSPContext *c); From patchwork Sat Sep 10 01:07: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: 37827 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1246098pzh; Fri, 9 Sep 2022 18:09:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR6AveiyLWv9IOGfhKzXNZ/iEsV7OtcrjQ0EiTVA+cRESpovcdghnNBQ3mmkVP6iiIww6jnU X-Received: by 2002:a17:907:2cf0:b0:77b:2ad7:121b with SMTP id hz16-20020a1709072cf000b0077b2ad7121bmr529232ejc.577.1662772198638; Fri, 09 Sep 2022 18:09:58 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id cm28-20020a0564020c9c00b0044ed4c0249csi1426410edb.159.2022.09.09.18.09.58; Fri, 09 Sep 2022 18:09:58 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=WLqKkAia; 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 D453168BB17; Sat, 10 Sep 2022 04:08:18 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068061.outbound.protection.outlook.com [40.92.68.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2B74A68B980 for ; Sat, 10 Sep 2022 04:08:14 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fz2OLJan2ez+WBSW1oAp2VYBkZYWeLwJR5RmjBczFpGTjFbgkeiPHbTy6pnnfX6tCARGfPvIdTOJvnggqSlRXnmir5fTXutMpVIKzduZajADE80sWuxA7ikWdV+YW14AQDql9UMMbqcGWEqh8sj3OCRcu0ulI/mk8T36aa7vX+8SaWND1pCeC5pQrkU7zlMYw1GEvdSwzsqnw0N+ooFFlUzJZ6tuy0UtWv0RR3Q3C9mtdm/BdhuPyefdOzsiN8UB+l4ZZUTc2m+cDmV4ScqAHfu8YmwrxvNS3c/soGIHnebGiyZpt3uMGgvDQkklv6vPaSzY/WJsooqqW1hhk8dh0w== 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=INM3naOlZwo41VZom/0xD4MN6JvIZGjgTYCAxEN7sLA=; b=Xb2/zuU3j1ZczzOWVuqIkgFSIoR0TwoGqWSiqSsfqPLIaNg6tlDenHe3QC7BXExJmTkQBeWRZ3G6tWcnM9DxTp1JnnvbTqqf+tGSj1oeM8tqhDFJ8vG576hfQ/rT7NZgJWInAbSDlCP2uM3XckSYzvNAth6JiLHLvZBee1KtlwCcBL3KeQ9HWFt6HPDDxvkwmp+cvCUzRfrIKObMBFlgMnH10kvZxpzJAjPS4Bb+DqNAHDic+ocrtuJ5Zcom6WJUmjRSqhinEyzI+bBoQmWsa6e1DXFzUdW61fgX0iAKQbbQI8uqU6vzSM+XvTJQoMxpvyArbBvr6AWNmTJ1BCgBow== 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=INM3naOlZwo41VZom/0xD4MN6JvIZGjgTYCAxEN7sLA=; b=WLqKkAiao3orm4+IgiKEI7BUdMskZ4gO/XqX+KV9wV1wx4ufUjvjvDTHvjiEEq8mvpaH/DshrZVlZTrgu2dZTYOFPy67mYdj+bgDvLQEkoRYSDbmC+bpn760yO5JFOEKQqinCqfDA7OXwE8RF9yucvW8A2HpJq2e61XveSkKz2810vELVpxrIdQnmw+Xc9eWuE9SH/Aw+QSq0/sEmSndyQBDgbKMYY6iZoDW1Yq/Afi+hUMxIvL3R7/qfCQQ1xRdRPg1NBozGV01BvKXfDy7UxRWF7glXoxmB3HTo6U/KDr+eEMpns/nvn2qV7sZ0bqMDoLg9SezGOBoKrGPzKd9lg== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:08:09 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:08:09 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:28 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Qlls5WLA4lfLuBx37ahGRPGK+IQ2e29oEKTeA+7XBLw=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-16-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 1735cd23-759e-451f-7520-08da92c8ecfe X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKyiifK3O4NmONuSB5M1PIcSXN82ckXCeHA25SIsbS924DDS8PAnZY3oExu8Z2bHAgq644oLWklPgrbaP38npKIZluwBd1gxVSXpXkcrGWUR8l5xXts4rNr6LPuHByACoCjORnDMSjIqrLw3f+bEiFKSyQMRbOPp6ryO1iBzFAK+AHZ2FTeIpvm1J4waoGEhK2boKOcEOj1G8T3PdY1X/I2V0OUwCN+02ES99eQTw9ciEJlhv8TwG/nq+sJa4Zg2uqNSMOZ4MPO7Db3odyHSQ7kZIsIQ8pNaFBF40bIahuLtd+u3U5uZp13K6WQ0Im4waCgCeCRlutBv+YzmD3vgnrxS3JoAWjTHW8EPGIuAuvHxFVsPYKEhhM3EHzp3OeO5YOPmSH4LPlfxofeJHJxjAV2Xooybj+wTHDIKPdej+J0ksiwRw/dXElPnO9YgMPGxaVm7JBbCfxSApp2Q9V1GVAe2UWT9aMiim+kLAS9PKOMIoXjmeB6P0QAw08m7qKZQEeiPB+VKVVfURYeyewXzTvZA0HsqwJL2znM/lpQq88inDh75Y1guKsUF7VefokrpEPYNQM19l7BA3ma/UiJ/clZ75BCOOoYLRXvMqj4KhEvuBOgXhj2KfyZygswOOpGhRZbtZBoZD+5RGYlkZwzGEEgW6g9xe19WrS1UQCmdcWV9NIr1sNn8zwUKm+laI2inmEpcasthXy76bXeaLXsfKsiRpRepMiyBoR8= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cJPVNvJy8QoTc6858l042+//JHI/ujVEoxHSc2yd/TEin8DIyz+eVeI6Fui3mDEItN6XGNub+nmnS/tbR7I3tr0tWCst5C2mp3k72cx+tefKqBhbUWML538b3/Q4TB3GxQtaMbmqXIJBLx5l/14ApQf/dF/t1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Eq33yJ4kCn2gspZIBSaiua5H0Ppo3oy/ziJJ49RO+orX8QNXxuliEmGiOQFOt5Zw+6lU9RjrMvPnVOnk8XtEv7MkRqwwmjPiE9a8fShKQoQr+B6WN5StD6pOzNy0b37VG/9gf93zMUCfvvWN3MNDzyrVou0uBFoap4+hCbGmx30edtr/+aUCN/7yBndxxQAp8NsytO1+wGWa+fx+LiE4Xvv9NFNF2ongn+CiowIce4D4ORmjMR40wA0Y8eqZGhpcHOedkmTz+oEtc0Zr2x5KGP+SqBrH/4eLAqbWonchdNJLMJ0lG/ajYVZ5IrcUtIwAU/b2BfDVxR9ivpr4At8JQUABD9p0qgBwbl3jQ/4JVfKL+Dbw/6QycpZfRDp/cigoVMt6nLnycqpUiAkFRVJe5/4EhitoljVyEfF8mTHQrDqFLPCHThoyfcw6glxaHW4sZwfk/ttt6tnZRAgFYl48TlqDhOSZJn6G/UJVW7M/q8q3e5SVOlV6aSN22has4vwqkaFBddoRqFDqbch8r0L/opWGPwvgmCgNJqP5IQl8WY1xjKsiIAZpr3Ry5ttzM1sqjdQjrvvZr2m7Wl/aUAUIaLdM+1Ox5t5IqpRNnPw4kqV7X8u0IZf+aNOPI/V8Ab+NsoVtaT2S0iU4OAC9AlhZ4/dLYNRd26WEySJaQ4wHaiKDlnVNKxB+SqpchrdKOj8SaAsdaZbaO93mIxh2XfR3zLj6Suzy34sDTpMV5hvGePGGfvh1lySoR0/EopA/xD8zOdEQ/zBTp8BQoje7kYrNu16HRHFUKWp2s9z59GG0s+H6cnBz5E5H3ULta9n3sM8EF X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1735cd23-759e-451f-7520-08da92c8ecfe X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:08:09.5747 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 17/18] avcodec/vp8dsp: Constify src in vp8_mc_func 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: b8penasVIpHF Signed-off-by: Andreas Rheinhardt --- libavcodec/aarch64/vp8dsp.h | 2 +- libavcodec/arm/vp8dsp.h | 2 +- libavcodec/arm/vp8dsp_armv6.S | 6 +- libavcodec/loongarch/vp8_mc_lsx.c | 31 ++--- libavcodec/loongarch/vp8dsp_loongarch.h | 28 ++--- libavcodec/mips/vp8_mc_msa.c | 110 +++++++++--------- libavcodec/mips/vp8dsp_mips.h | 144 ++++++++++++------------ libavcodec/ppc/vp8dsp_altivec.c | 12 +- libavcodec/vp8dsp.c | 14 +-- libavcodec/vp8dsp.h | 2 +- libavcodec/x86/vp8dsp.asm | 2 +- libavcodec/x86/vp8dsp_init.c | 58 +++++----- 12 files changed, 206 insertions(+), 205 deletions(-) diff --git a/libavcodec/aarch64/vp8dsp.h b/libavcodec/aarch64/vp8dsp.h index 871fed7a95..4e59de28b1 100644 --- a/libavcodec/aarch64/vp8dsp.h +++ b/libavcodec/aarch64/vp8dsp.h @@ -53,7 +53,7 @@ #define VP8_MC(n, opt) \ void ff_put_vp8_##n##_##opt(uint8_t *dst, ptrdiff_t dststride, \ - uint8_t *src, ptrdiff_t srcstride, \ + const uint8_t *src, ptrdiff_t srcstride,\ int h, int x, int y) #define VP8_EPEL(w, opt) \ diff --git a/libavcodec/arm/vp8dsp.h b/libavcodec/arm/vp8dsp.h index 7281d0bfb1..11dcc78d7a 100644 --- a/libavcodec/arm/vp8dsp.h +++ b/libavcodec/arm/vp8dsp.h @@ -58,7 +58,7 @@ void ff_vp8dsp_init_neon(VP8DSPContext *dsp); #define VP8_MC(n, opt) \ void ff_put_vp8_##n##_##opt(uint8_t *dst, ptrdiff_t dststride, \ - uint8_t *src, ptrdiff_t srcstride, \ + const uint8_t *src, ptrdiff_t srcstride,\ int h, int x, int y) #define VP8_EPEL(w, opt) \ diff --git a/libavcodec/arm/vp8dsp_armv6.S b/libavcodec/arm/vp8dsp_armv6.S index 2320bf4d23..395debe866 100644 --- a/libavcodec/arm/vp8dsp_armv6.S +++ b/libavcodec/arm/vp8dsp_armv6.S @@ -1113,7 +1113,7 @@ endfunc @ MC -@ void put_vp8_pixels16(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +@ void put_vp8_pixels16(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, @ ptrdiff_t srcstride, int h, int mx, int my) function ff_put_vp8_pixels16_armv6, export=1 push {r4-r11} @@ -1137,7 +1137,7 @@ function ff_put_vp8_pixels16_armv6, export=1 bx lr endfunc -@ void put_vp8_pixels8(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +@ void put_vp8_pixels8(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, @ ptrdiff_t srcstride, int h, int mx, int my) function ff_put_vp8_pixels8_armv6, export=1 push {r4-r11} @@ -1161,7 +1161,7 @@ function ff_put_vp8_pixels8_armv6, export=1 bx lr endfunc -@ void put_vp8_pixels4(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +@ void put_vp8_pixels4(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, @ ptrdiff_t srcstride, int h, int mx, int my) function ff_put_vp8_pixels4_armv6, export=1 ldr r12, [sp, #0] @ h diff --git a/libavcodec/loongarch/vp8_mc_lsx.c b/libavcodec/loongarch/vp8_mc_lsx.c index 80c4f87e80..034d84cc5d 100644 --- a/libavcodec/loongarch/vp8_mc_lsx.c +++ b/libavcodec/loongarch/vp8_mc_lsx.c @@ -122,7 +122,7 @@ static const int8_t subpel_filters_lsx[7][8] = { } ) void ff_put_vp8_epel8_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -187,7 +187,7 @@ void ff_put_vp8_epel8_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -241,7 +241,7 @@ void ff_put_vp8_epel16_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -308,7 +308,7 @@ void ff_put_vp8_epel8_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -389,7 +389,7 @@ void ff_put_vp8_epel16_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -491,7 +491,7 @@ void ff_put_vp8_epel8_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -504,7 +504,7 @@ void ff_put_vp8_epel16_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -561,7 +561,7 @@ void ff_put_vp8_epel8_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -631,7 +631,7 @@ void ff_put_vp8_epel16_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -714,7 +714,7 @@ void ff_put_vp8_epel8_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -728,7 +728,7 @@ void ff_put_vp8_epel16_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -818,7 +818,7 @@ void ff_put_vp8_epel8_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -832,7 +832,7 @@ void ff_put_vp8_epel16_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_pixels8_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t cnt; @@ -889,12 +889,13 @@ void ff_put_vp8_pixels8_lsx(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_pixels16_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t width = 16; int32_t cnt, loop_cnt; - uint8_t *src_tmp, *dst_tmp; + const uint8_t *src_tmp; + uint8_t *dst_tmp; __m128i src0, src1, src2, src3, src4, src5, src6, src7; ptrdiff_t src_stride2 = src_stride << 1; diff --git a/libavcodec/loongarch/vp8dsp_loongarch.h b/libavcodec/loongarch/vp8dsp_loongarch.h index 87e9509db9..09c7e1f91d 100644 --- a/libavcodec/loongarch/vp8dsp_loongarch.h +++ b/libavcodec/loongarch/vp8dsp_loongarch.h @@ -25,49 +25,49 @@ #include "libavcodec/vp8dsp.h" void ff_put_vp8_pixels8_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int x, int y); void ff_put_vp8_pixels16_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int x, int y); void ff_put_vp8_epel16_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel16_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel16_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel16_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel16_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel16_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_h6v4_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_h4v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_h6v6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); void ff_put_vp8_epel8_h6_lsx(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my); /* loop filter */ diff --git a/libavcodec/mips/vp8_mc_msa.c b/libavcodec/mips/vp8_mc_msa.c index a61320625a..be1997f7dd 100644 --- a/libavcodec/mips/vp8_mc_msa.c +++ b/libavcodec/mips/vp8_mc_msa.c @@ -156,7 +156,7 @@ static const int8_t bilinear_filters_msa[7][2] = { out0, out1, out2, out3); \ } -static void common_hz_6t_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_hz_6t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -184,7 +184,7 @@ static void common_hz_6t_4x4_msa(uint8_t *src, int32_t src_stride, ST_W4(out, 0, 1, 2, 3, dst, dst_stride); } -static void common_hz_6t_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_hz_6t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -220,7 +220,7 @@ static void common_hz_6t_4x8_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_epel4_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = subpel_filters_msa[mx - 1]; @@ -233,7 +233,7 @@ void ff_put_vp8_epel4_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -281,7 +281,7 @@ void ff_put_vp8_epel8_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -330,7 +330,7 @@ void ff_put_vp8_epel16_h6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -377,7 +377,7 @@ void ff_put_vp8_epel4_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -427,7 +427,7 @@ void ff_put_vp8_epel8_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -501,7 +501,7 @@ void ff_put_vp8_epel16_v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -576,7 +576,7 @@ void ff_put_vp8_epel4_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -663,7 +663,7 @@ void ff_put_vp8_epel8_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, void ff_put_vp8_epel16_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -677,7 +677,7 @@ void ff_put_vp8_epel16_h6v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_hz_4t_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -704,7 +704,7 @@ static void common_hz_4t_4x4_msa(uint8_t *src, int32_t src_stride, ST_W4(out, 0, 1, 2, 3, dst, dst_stride); } -static void common_hz_4t_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -739,7 +739,7 @@ static void common_hz_4t_4x8_msa(uint8_t *src, int32_t src_stride, ST_W4(out, 0, 1, 2, 3, dst + 4 * dst_stride, dst_stride); } -static void common_hz_4t_4x16_msa(uint8_t *src, int32_t src_stride, +static void common_hz_4t_4x16_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -790,7 +790,7 @@ static void common_hz_4t_4x16_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_epel4_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = subpel_filters_msa[mx - 1]; @@ -805,7 +805,7 @@ void ff_put_vp8_epel4_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -840,7 +840,7 @@ void ff_put_vp8_epel8_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -889,7 +889,7 @@ void ff_put_vp8_epel16_h4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -936,7 +936,7 @@ void ff_put_vp8_epel4_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -982,7 +982,7 @@ void ff_put_vp8_epel8_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1041,7 +1041,7 @@ void ff_put_vp8_epel16_v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1100,7 +1100,7 @@ void ff_put_vp8_epel4_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1167,7 +1167,7 @@ void ff_put_vp8_epel8_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -1182,7 +1182,7 @@ void ff_put_vp8_epel16_h4v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1248,7 +1248,7 @@ void ff_put_vp8_epel4_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1321,7 +1321,7 @@ void ff_put_vp8_epel8_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -1336,7 +1336,7 @@ void ff_put_vp8_epel16_h6v4_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel4_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1400,7 +1400,7 @@ void ff_put_vp8_epel4_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel8_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1475,7 +1475,7 @@ void ff_put_vp8_epel8_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_epel16_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t multiple8_cnt; @@ -1489,7 +1489,7 @@ void ff_put_vp8_epel16_h4v6_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_hz_2t_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_hz_2t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1512,7 +1512,7 @@ static void common_hz_2t_4x4_msa(uint8_t *src, int32_t src_stride, ST_W2(res1, 0, 1, dst + 2 * dst_stride, dst_stride); } -static void common_hz_2t_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_hz_2t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1542,7 +1542,7 @@ static void common_hz_2t_4x8_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear4_h_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = bilinear_filters_msa[mx - 1]; @@ -1554,7 +1554,7 @@ void ff_put_vp8_bilinear4_h_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_hz_2t_8x4_msa(uint8_t *src, int32_t src_stride, +static void common_hz_2t_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1578,7 +1578,7 @@ static void common_hz_2t_8x4_msa(uint8_t *src, int32_t src_stride, ST_D4(src0, src1, 0, 1, 0, 1, dst, dst_stride); } -static void common_hz_2t_8x8mult_msa(uint8_t *src, int32_t src_stride, +static void common_hz_2t_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1642,7 +1642,7 @@ static void common_hz_2t_8x8mult_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear8_h_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = bilinear_filters_msa[mx - 1]; @@ -1656,7 +1656,7 @@ void ff_put_vp8_bilinear8_h_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_bilinear16_h_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1722,7 +1722,7 @@ void ff_put_vp8_bilinear16_h_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_vt_2t_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_vt_2t_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1748,7 +1748,7 @@ static void common_vt_2t_4x4_msa(uint8_t *src, int32_t src_stride, ST_W4(src2110, 0, 1, 2, 3, dst, dst_stride); } -static void common_vt_2t_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_vt_2t_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1783,7 +1783,7 @@ static void common_vt_2t_4x8_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear4_v_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = bilinear_filters_msa[my - 1]; @@ -1795,7 +1795,7 @@ void ff_put_vp8_bilinear4_v_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_vt_2t_8x4_msa(uint8_t *src, int32_t src_stride, +static void common_vt_2t_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter) { @@ -1819,7 +1819,7 @@ static void common_vt_2t_8x4_msa(uint8_t *src, int32_t src_stride, ST_D4(out0, out1, 0, 1, 0, 1, dst, dst_stride); } -static void common_vt_2t_8x8mult_msa(uint8_t *src, int32_t src_stride, +static void common_vt_2t_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter, int32_t height) { @@ -1865,7 +1865,7 @@ static void common_vt_2t_8x8mult_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear8_v_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter = bilinear_filters_msa[my - 1]; @@ -1879,7 +1879,7 @@ void ff_put_vp8_bilinear8_v_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_bilinear16_v_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -1932,7 +1932,7 @@ void ff_put_vp8_bilinear16_v_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_hv_2ht_2vt_4x4_msa(uint8_t *src, int32_t src_stride, +static void common_hv_2ht_2vt_4x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert) @@ -1966,7 +1966,7 @@ static void common_hv_2ht_2vt_4x4_msa(uint8_t *src, int32_t src_stride, ST_W2(res1, 0, 1, dst + 2 * dst_stride, dst_stride); } -static void common_hv_2ht_2vt_4x8_msa(uint8_t *src, int32_t src_stride, +static void common_hv_2ht_2vt_4x8_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert) @@ -2014,7 +2014,7 @@ static void common_hv_2ht_2vt_4x8_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear4_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter_horiz = bilinear_filters_msa[mx - 1]; @@ -2029,7 +2029,7 @@ void ff_put_vp8_bilinear4_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void common_hv_2ht_2vt_8x4_msa(uint8_t *src, int32_t src_stride, +static void common_hv_2ht_2vt_8x4_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert) @@ -2073,7 +2073,7 @@ static void common_hv_2ht_2vt_8x4_msa(uint8_t *src, int32_t src_stride, ST_D4(out0, out1, 0, 1, 0, 1, dst, dst_stride); } -static void common_hv_2ht_2vt_8x8mult_msa(uint8_t *src, int32_t src_stride, +static void common_hv_2ht_2vt_8x8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, const int8_t *filter_horiz, const int8_t *filter_vert, @@ -2154,7 +2154,7 @@ static void common_hv_2ht_2vt_8x8mult_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_bilinear8_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { const int8_t *filter_horiz = bilinear_filters_msa[mx - 1]; @@ -2170,7 +2170,7 @@ void ff_put_vp8_bilinear8_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_bilinear16_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { uint32_t loop_cnt; @@ -2241,7 +2241,7 @@ void ff_put_vp8_bilinear16_hv_msa(uint8_t *dst, ptrdiff_t dst_stride, } void ff_put_vp8_pixels8_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t cnt; @@ -2283,16 +2283,16 @@ void ff_put_vp8_pixels8_msa(uint8_t *dst, ptrdiff_t dst_stride, } } -static void copy_16multx8mult_msa(uint8_t *src, int32_t src_stride, +static void copy_16multx8mult_msa(const uint8_t *src, int32_t src_stride, uint8_t *dst, int32_t dst_stride, int32_t height, int32_t width) { int32_t cnt, loop_cnt; - uint8_t *src_tmp, *dst_tmp; + uint8_t *dst_tmp; v16u8 src0, src1, src2, src3, src4, src5, src6, src7; for (cnt = (width >> 4); cnt--;) { - src_tmp = src; + const uint8_t *src_tmp = src; dst_tmp = dst; for (loop_cnt = (height >> 3); loop_cnt--;) { @@ -2311,7 +2311,7 @@ static void copy_16multx8mult_msa(uint8_t *src, int32_t src_stride, } void ff_put_vp8_pixels16_msa(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my) { int32_t cnt; diff --git a/libavcodec/mips/vp8dsp_mips.h b/libavcodec/mips/vp8dsp_mips.h index 07666ab7a0..3d88db897a 100644 --- a/libavcodec/mips/vp8dsp_mips.h +++ b/libavcodec/mips/vp8dsp_mips.h @@ -28,118 +28,118 @@ #include "constants.h" void ff_put_vp8_pixels4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); void ff_put_vp8_pixels8_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); void ff_put_vp8_pixels16_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); void ff_put_vp8_epel16_h4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h4v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h6v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h4v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h6v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6v4_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6v6_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_h_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_v_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_hv_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_h_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_v_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_hv_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_h_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_v_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_hv_msa(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); /* loop filter */ @@ -184,84 +184,84 @@ void ff_vp8_idct_dc_add4y_mmi(uint8_t *dst, int16_t block[4][16], void ff_vp8_idct_dc_add4uv_mmi(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride); -void ff_put_vp8_pixels4_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_pixels4_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); -void ff_put_vp8_pixels8_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_pixels8_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); -void ff_put_vp8_pixels16_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_pixels16_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int x, int y); -void ff_put_vp8_epel16_h4_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_epel16_h4_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); -void ff_put_vp8_epel16_h6_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_epel16_h6_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); -void ff_put_vp8_epel16_v4_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_epel16_v4_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); -void ff_put_vp8_epel16_v6_mmi(uint8_t *dst, ptrdiff_t dststride, uint8_t *src, +void ff_put_vp8_epel16_v6_mmi(uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h4v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h6v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h4v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel16_h6v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h4v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel8_h6v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6v4_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h4v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_epel4_h6v6_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_h_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_v_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear16_hv_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_h_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_v_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear8_hv_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_h_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_v_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); void ff_put_vp8_bilinear4_hv_mmi(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); + const uint8_t *src, ptrdiff_t srcstride, int h, int mx, int my); // loop filter applied to edges between macroblocks void ff_vp8_v_loop_filter16_mmi(uint8_t *dst, ptrdiff_t stride, int flim_E, diff --git a/libavcodec/ppc/vp8dsp_altivec.c b/libavcodec/ppc/vp8dsp_altivec.c index 273de84778..12dac8b0a8 100644 --- a/libavcodec/ppc/vp8dsp_altivec.c +++ b/libavcodec/ppc/vp8dsp_altivec.c @@ -96,7 +96,7 @@ static const vec_s8 h_subpel_filters_outer[3] = static av_always_inline void put_vp8_epel_h_altivec_core(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int w, int is6tap) { LOAD_H_SUBPEL_FILTER(mx-1); @@ -193,7 +193,7 @@ static const vec_u8 v_subpel_filters[7] = static av_always_inline void put_vp8_epel_v_altivec_core(uint8_t *dst, ptrdiff_t dst_stride, - uint8_t *src, ptrdiff_t src_stride, + const uint8_t *src, ptrdiff_t src_stride, int h, int my, int w, int is6tap) { LOAD_V_SUBPEL_FILTER(my-1); @@ -259,19 +259,19 @@ void put_vp8_epel_v_altivec_core(uint8_t *dst, ptrdiff_t dst_stride, #define EPEL_FUNCS(WIDTH, TAPS) \ static av_noinline \ -void put_vp8_epel ## WIDTH ## _h ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst_stride, uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) \ +void put_vp8_epel ## WIDTH ## _h ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) \ { \ put_vp8_epel_h_altivec_core(dst, dst_stride, src, src_stride, h, mx, WIDTH, TAPS == 6); \ } \ \ static av_noinline \ -void put_vp8_epel ## WIDTH ## _v ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst_stride, uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) \ +void put_vp8_epel ## WIDTH ## _v ## TAPS ## _altivec(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) \ { \ put_vp8_epel_v_altivec_core(dst, dst_stride, src, src_stride, h, my, WIDTH, TAPS == 6); \ } #define EPEL_HV(WIDTH, HTAPS, VTAPS) \ -static void put_vp8_epel ## WIDTH ## _h ## HTAPS ## v ## VTAPS ## _altivec(uint8_t *dst, ptrdiff_t dstride, uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) \ +static void put_vp8_epel ## WIDTH ## _h ## HTAPS ## v ## VTAPS ## _altivec(uint8_t *dst, ptrdiff_t dstride, const uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) \ { \ DECLARE_ALIGNED(16, uint8_t, tmp)[(2*WIDTH+5)*16]; \ if (VTAPS == 6) { \ @@ -299,7 +299,7 @@ EPEL_HV(4, 4,6) EPEL_HV(4, 6,4) EPEL_HV(4, 4,4) -static void put_vp8_pixels16_altivec(uint8_t *dst, ptrdiff_t dstride, uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) +static void put_vp8_pixels16_altivec(uint8_t *dst, ptrdiff_t dstride, const uint8_t *src, ptrdiff_t sstride, int h, int mx, int my) { register vector unsigned char perm; int i; diff --git a/libavcodec/vp8dsp.c b/libavcodec/vp8dsp.c index a92774ed5e..7a85e9f4ca 100644 --- a/libavcodec/vp8dsp.c +++ b/libavcodec/vp8dsp.c @@ -468,7 +468,7 @@ static const uint8_t subpel_filters[7][6] = { #define PUT_PIXELS(WIDTH) \ static void put_vp8_pixels ## WIDTH ## _c(uint8_t *dst, ptrdiff_t dststride, \ - uint8_t *src, ptrdiff_t srcstride, \ + const uint8_t *src, ptrdiff_t srcstride, \ int h, int x, int y) \ { \ int i; \ @@ -492,7 +492,7 @@ PUT_PIXELS(4) #define VP8_EPEL_H(SIZE, TAPS) \ static void put_vp8_epel ## SIZE ## _h ## TAPS ## _c(uint8_t *dst, \ ptrdiff_t dststride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t srcstride, \ int h, int mx, int my) \ { \ @@ -510,7 +510,7 @@ static void put_vp8_epel ## SIZE ## _h ## TAPS ## _c(uint8_t *dst, \ #define VP8_EPEL_V(SIZE, TAPS) \ static void put_vp8_epel ## SIZE ## _v ## TAPS ## _c(uint8_t *dst, \ ptrdiff_t dststride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t srcstride, \ int h, int mx, int my) \ { \ @@ -529,7 +529,7 @@ static void put_vp8_epel ## SIZE ## _v ## TAPS ## _c(uint8_t *dst, \ static void \ put_vp8_epel ## SIZE ## _h ## HTAPS ## v ## VTAPS ## _c(uint8_t *dst, \ ptrdiff_t dststride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t srcstride, \ int h, int mx, \ int my) \ @@ -586,7 +586,7 @@ VP8_EPEL_HV(4, 6, 6) #define VP8_BILINEAR(SIZE) \ static void put_vp8_bilinear ## SIZE ## _h_c(uint8_t *dst, ptrdiff_t dstride, \ - uint8_t *src, ptrdiff_t sstride, \ + const uint8_t *src, ptrdiff_t sstride, \ int h, int mx, int my) \ { \ int a = 8 - mx, b = mx; \ @@ -600,7 +600,7 @@ static void put_vp8_bilinear ## SIZE ## _h_c(uint8_t *dst, ptrdiff_t dstride, \ } \ \ static void put_vp8_bilinear ## SIZE ## _v_c(uint8_t *dst, ptrdiff_t dstride, \ - uint8_t *src, ptrdiff_t sstride, \ + const uint8_t *src, ptrdiff_t sstride, \ int h, int mx, int my) \ { \ int c = 8 - my, d = my; \ @@ -615,7 +615,7 @@ static void put_vp8_bilinear ## SIZE ## _v_c(uint8_t *dst, ptrdiff_t dstride, \ \ static void put_vp8_bilinear ## SIZE ## _hv_c(uint8_t *dst, \ ptrdiff_t dstride, \ - uint8_t *src, \ + const uint8_t *src, \ ptrdiff_t sstride, \ int h, int mx, int my) \ { \ diff --git a/libavcodec/vp8dsp.h b/libavcodec/vp8dsp.h index bbd7f60a4f..16b5e9c35b 100644 --- a/libavcodec/vp8dsp.h +++ b/libavcodec/vp8dsp.h @@ -31,7 +31,7 @@ #include typedef void (*vp8_mc_func)(uint8_t *dst /* align 8 */, ptrdiff_t dstStride, - uint8_t *src /* align 1 */, ptrdiff_t srcStride, + const uint8_t *src /* align 1 */, ptrdiff_t srcStride, int h, int x, int y); typedef struct VP8DSPContext { diff --git a/libavcodec/x86/vp8dsp.asm b/libavcodec/x86/vp8dsp.asm index 1c59e884ed..33d488bf6f 100644 --- a/libavcodec/x86/vp8dsp.asm +++ b/libavcodec/x86/vp8dsp.asm @@ -157,7 +157,7 @@ SECTION .text ; subpel MC functions: ; ; void ff_put_vp8_epel_hv_(uint8_t *dst, ptrdiff_t deststride, -; uint8_t *src, ptrdiff_t srcstride, +; const uint8_t *src, ptrdiff_t srcstride, ; int height, int mx, int my); ;------------------------------------------------------------------------------- diff --git a/libavcodec/x86/vp8dsp_init.c b/libavcodec/x86/vp8dsp_init.c index cceb346ced..bd20da1fc9 100644 --- a/libavcodec/x86/vp8dsp_init.c +++ b/libavcodec/x86/vp8dsp_init.c @@ -32,93 +32,93 @@ * MC functions */ void ff_put_vp8_epel4_h4_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_h6_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_v4_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_v6_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_h4_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_h6_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_v4_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_v6_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_h4_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_h6_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_v4_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel4_v6_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_h4_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_h6_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_v4_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_epel8_v6_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear4_h_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear8_h_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear4_h_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear8_h_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear4_v_mmxext(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear8_v_sse2 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear4_v_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_bilinear8_v_ssse3 (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_pixels8_mmx (uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); void ff_put_vp8_pixels16_sse(uint8_t *dst, ptrdiff_t dststride, - uint8_t *src, ptrdiff_t srcstride, + const uint8_t *src, ptrdiff_t srcstride, int height, int mx, int my); #define TAP_W16(OPT, FILTERTYPE, TAPTYPE) \ static void ff_put_vp8_ ## FILTERTYPE ## 16_ ## TAPTYPE ## _ ## OPT( \ - uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ + uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ ptrdiff_t srcstride, int height, int mx, int my) \ { \ ff_put_vp8_ ## FILTERTYPE ## 8_ ## TAPTYPE ## _ ## OPT( \ @@ -149,7 +149,7 @@ TAP_W16(ssse3, bilinear, v) #define HVTAP(OPT, ALIGN, TAPNUMX, TAPNUMY, SIZE, MAXHEIGHT) \ static void ff_put_vp8_epel ## SIZE ## _h ## TAPNUMX ## v ## TAPNUMY ## _ ## OPT( \ - uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ + uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ ptrdiff_t srcstride, int height, int mx, int my) \ { \ LOCAL_ALIGNED(ALIGN, uint8_t, tmp, [SIZE * (MAXHEIGHT + TAPNUMY - 1)]); \ @@ -186,7 +186,7 @@ HVTAP(ssse3, 16, 6, 6, 4, 8) #define HVBILIN(OPT, ALIGN, SIZE, MAXHEIGHT) \ static void ff_put_vp8_bilinear ## SIZE ## _hv_ ## OPT( \ - uint8_t *dst, ptrdiff_t dststride, uint8_t *src, \ + uint8_t *dst, ptrdiff_t dststride, const uint8_t *src, \ ptrdiff_t srcstride, int height, int mx, int my) \ { \ LOCAL_ALIGNED(ALIGN, uint8_t, tmp, [SIZE * (MAXHEIGHT + 2)]); \ From patchwork Sat Sep 10 01:07: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: 37828 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:139a:b0:8f:1db5:eae2 with SMTP id w26csp1246165pzh; Fri, 9 Sep 2022 18:10:08 -0700 (PDT) X-Google-Smtp-Source: AA6agR5UwySUvsDYhjY/CX85JeJ3fIOkvfERgixY93JhOBAmPdAAhuhLlc/VZqxLKSLEq2nEedhW X-Received: by 2002:a17:906:8a4e:b0:730:9fcd:d988 with SMTP id gx14-20020a1709068a4e00b007309fcdd988mr11712901ejc.636.1662772208211; Fri, 09 Sep 2022 18:10:08 -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 go10-20020a1709070d8a00b0073ce636490esi1701328ejc.272.2022.09.09.18.10.07; Fri, 09 Sep 2022 18:10:08 -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=C+uSDR9V; 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 E1CF968BB6A; Sat, 10 Sep 2022 04:08:19 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-oln040092068061.outbound.protection.outlook.com [40.92.68.61]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 642BC68BB39 for ; Sat, 10 Sep 2022 04:08:14 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RAeBlYxkfQTcLAoSs2glTkIZlgFstLCJoRnvoKjBU2f37UNPlakcdG4BlBYboOny5bBV9TXhOR8cV7Jr5G8fbjNVh5swxM/os6sdlBk20MC4SPAnQv+fsVdgaoSWGys9YG+Q084TMWodkp1cbU+ayJwaVw6WJUIVZ5I6X17VSHwH1Zuo4gRIRADeh0rQHfWp5mFA24s9kFMZdQWBda6ltuTuy8hRxfazh9fu9vcyt46Oli5sQmjNw32SbNj2PaC510LoTTSw0DH3udltElcIkARkYsJACcxzm+JsAfZB0EqtiugFjLH16TRMpa8sxEi9WzuVxnauCuIYvre+nqkPqA== 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=kdGDRY4+hHO8vRY8sLyVukzVv2iEnDjUpFUZ9978b1Q=; b=NRS1A+NdHMkaRihWG5tBzbixydHUcy/i7IUL0b6LtzcsRHHSnI3xFkCQinmZrQzNnS+vMymNq6XL+NY8Gdn3TYLuhhA7lP3zvQ22PlULiNMEhFdVsgIZgeqVe3jJVd4Ht7VFRCFQPPsR8H3nnkTXP1J9PjwpcgCrrzpm6uajfeTY3bMZJuKAJ2pcCK8hjA8XUX4MR8EjBST2GHOO6O00L5iHUZD9KFKzwCsz0jc6YGe7WRR2/xspG2P+uQA9r0aaCqiKRYP9SEt59VdMjtxqeY8E642A7czAR9M8Uw/Jy0A6ol0+Si+zHq7XQqRKCxlANWLYImVmF8eikd15KdifxQ== 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=kdGDRY4+hHO8vRY8sLyVukzVv2iEnDjUpFUZ9978b1Q=; b=C+uSDR9VNkkFhKIy6z0/JHL0iqv04Uf7gMUqC06sk/eqOrJ31lJEx6sLG2HzGwixjsZiJrMt/wk87PpjnSO6JHVWA+Z+4m6q53V3csc0AEc5XWj0ynRxUrZpb9vDWi6EoFXW8stX4YS7PsLzz6YnyLgvVuciZCJP95vnlz9kiNvVhJoLigK2eh+y3aJDAYwLQTNOpJUi0isVa4/OZtFvh7p62HQUUa67cxgGmpeMHa7keOQ5wni/UiF3i1cKlJOlyMcB7CqO4xd2LUruYwfvm9yXGdFGLvDocuXwKt3ZNLJWYe/FPPTjv4TJXfaQivlqM21rkbDJ1chY1v9dV6VfBQ== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by PR3P250MB0242.EURP250.PROD.OUTLOOK.COM (2603:10a6:102:17d::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Sat, 10 Sep 2022 01:08:10 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::611e:1608:45cb:b58a%4]) with mapi id 15.20.5612.019; Sat, 10 Sep 2022 01:08:10 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 10 Sep 2022 03:07:29 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [QFZ38pL3GgGGAylyLgIwSdUzaLg0cWP9iRUOzjnawvY=] X-ClientProxiedBy: FR0P281CA0102.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a9::18) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20220910010729.2961339-17-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|PR3P250MB0242:EE_ X-MS-Office365-Filtering-Correlation-Id: 50350b62-df55-47d8-70e9-08da92c8edba X-MS-Exchange-SLBlob-MailProps: Z9TzpHVL8qqx1qOpeEIbbCwbJAaGJurKIUPNtvf0xrxux1Nw7Fc4fLOZ6/eooiJF+eN0M2QF721BeRbGeOW8cABckRLanM7Q9N3tuXjoBh4G4Hzo01uFPJx7BVAbqezR2HeiugK8aWNPDyiUfr7SNC2DAfLFgQCXVO/g6+ZwZL1WluPho4p5E0vKQWG/PYGV85qVegQ9t7mwvNMzyjQklAz4ZrtGctKZB/czAMcHBCFfwispFEk8ve8R1IviQptDyHm2nGcH5oyTw3y/lElt2uUwuY/wQJ12DQP/WFYkNOf3B2dMROmpF8kmpneuiIZQuY34kfySuPUu2H6vpOrAceEoFMtKvnUrAVvhzM82Amaq9A0qy1N7PrLaQBAdQL83FFWwsJQ5goO+KKv31CDgsfSnR/rdtqx6NLxwMZy5nbUzzXnc0VHcKTfclt9+de0mSSDHB406Ex5+nGi4+vOlKqM/KQ40DCGJLlUx/L2BtsA2t+mffXKKnMy+KP54broGm5I82ZibxE+03hIHH1azsgo0Box7X76u2dOzzYGjalcMxFkuyot3GmGctAoxoHxVaO8ueJyK6OVYKo1kLFkx62t4r4/8PBv0JqIuTfx6nCTRZou8BHW/3sOFdU/TLXOqGrBtdqhRgFllOEz5xq0Auy4iXv37JqCO+RUfmaJHPhYJoHxcy2xPJlJQXx9Radv3BsjQa7a6SqVb/7qmNenML1/x7GEQYeRdgNdJ+Ol7qpPHQrpLiCu3pskIWlzxUkFqsT6OWpmvlxdWKLy12X6HsEIbd8fYDyHnGQRUAmyQVmkzLZwiSLtwbqmwTCCHGo9iq+7043TjV4fRSbXAN0hjeuURHY34RJFJUVi8X7gRA5p0HU4bNtSyDQ== X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: r0hG+swLTe5/YQJiplc2PASvqlIQ3QwdHwiT2K9M0A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22Druv0FsIELhbg8O+0bRCjvgJL3IRc0T2+N6A39HoR2Tl1s39KgoGQ1VaqRbE1LaX0Tpdkp5nMNu+av8cfhmlOUZjVDwdBLOwkXvL5Gne8tkcDZJVDTFhh3t1CAsuWIloKthLOc7KbrsvhgobCSz3aLseb0tmfPcPhrjE5RKtYzpVMwoOsMdidCjK3PvczF1KG6927tOkFXQs6Rhqbb0nPuxAbcMirtn5khUCg1SGurfpZ6I+W5LjJUFZ8uALRBp/JAWikU+qgS0guCaPG6fIO+HJpJQYiHwMRxfPAL/e6BETnpj2mVsuFWoilIxKhSmxEMYvk8uoZcMs2u3P0UGqsYtIutSjPr92HINyvdE5B1suxwU3+NbjRKo9IqBIg0wrF6wYYJjr4zW0kqwsnfVy+RJ3IA8L4+qZWEol/GdZUhtlrAsZDC6MGeDhP9/mVBdhGPxcY2y5jQVt7z9z7wAIC6xd8nBILUFTEbEXIpwYkIKOkdKKUiWEUd123U7K04/91EpeeiVu3X412ToE5hua+Wb36zj4Xkw/IJWq6ptwEn2IltNu0A6yrnF+TsvFwVJyRroLxBdnHFBHvfdg7cHKyZ0Ux/iIdQYa8fs6MfRySdcuJ+PMebmVzSQ+UdC6oZzg8ttVk7eJrac0Trgf3VcHq2tlEqZnw7B3kk6vHcgcEyTMPdZzB7wzOcaffeKMpP0qdSPeTtr9aKyay+QUvowZd5+0vnOqvMNPxBiUMhl+2NpEO0OJXsPcBe8Uq8j6SMvunFpqjjCBc/Gb2mAeDDqMJIq2CkByJIevHNdIm1vk8OwIb5diiAFn86m5DO8oA5Cgk3HM/U/q7vwFvBLQFZX6oON+DMbXp985M0jY7D5SNbbZLwPv4mwPx3tyzEfZWH4DAPDl0gNHFTJioSS3jdbXjZz98qT68iUlt1QmIf49GCd/69x0Sxm9uqYJ X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 50350b62-df55-47d8-70e9-08da92c8edba X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Sep 2022 01:08:10.7610 (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: PR3P250MB0242 Subject: [FFmpeg-devel] [PATCH 18/18] avcodec/vp8: Add const where appropriate 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: jV52BPzrJPAU Signed-off-by: Andreas Rheinhardt --- libavcodec/vp8.c | 101 ++++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 50 deletions(-) diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 91f3238245..22707e2f28 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -132,7 +132,7 @@ static void vp8_release_frame(VP8Context *s, VP8Frame *f) } #if CONFIG_VP8_DECODER -static int vp8_ref_frame(VP8Context *s, VP8Frame *dst, VP8Frame *src) +static int vp8_ref_frame(VP8Context *s, VP8Frame *dst, const VP8Frame *src) { int ret; @@ -508,7 +508,7 @@ static void update_refs(VP8Context *s) s->update_altref = ref_to_update(s, update_altref, VP8_FRAME_ALTREF); } -static void copy_chroma(AVFrame *dst, AVFrame *src, int width, int height) +static void copy_chroma(AVFrame *dst, const AVFrame *src, int width, int height) { int i, j; @@ -542,7 +542,8 @@ static int vp7_fade_frame(VP8Context *s, int alpha, int beta) if (!s->keyframe && (alpha || beta)) { int width = s->mb_width * 16; int height = s->mb_height * 16; - AVFrame *src, *dst; + const AVFrame *src; + AVFrame *dst; if (!s->framep[VP8_FRAME_PREVIOUS] || !s->framep[VP8_FRAME_GOLDEN]) { @@ -550,8 +551,8 @@ static int vp7_fade_frame(VP8Context *s, int alpha, int beta) return AVERROR_INVALIDDATA; } - dst = - src = s->framep[VP8_FRAME_PREVIOUS]->tf.f; + src = + dst = s->framep[VP8_FRAME_PREVIOUS]->tf.f; /* preserve the golden frame, write a new previous frame */ if (s->framep[VP8_FRAME_GOLDEN] == s->framep[VP8_FRAME_PREVIOUS]) { @@ -875,7 +876,7 @@ static int vp8_decode_frame_header(VP8Context *s, const uint8_t *buf, int buf_si } static av_always_inline -void clamp_mv(VP8mvbounds *s, VP8mv *dst, const VP8mv *src) +void clamp_mv(const VP8mvbounds *s, VP8mv *dst, const VP8mv *src) { dst->x = av_clip(src->x, av_clip(s->mv_min.x, INT16_MIN, INT16_MAX), av_clip(s->mv_max.x, INT16_MIN, INT16_MAX)); @@ -942,18 +943,18 @@ const uint8_t *get_submv_prob(uint32_t left, uint32_t top, int is_vp7) * @returns the number of motion vectors parsed (2, 4 or 16) */ static av_always_inline -int decode_splitmvs(VP8Context *s, VPXRangeCoder *c, VP8Macroblock *mb, +int decode_splitmvs(const VP8Context *s, VPXRangeCoder *c, VP8Macroblock *mb, int layout, int is_vp7) { int part_idx; int n, num; - VP8Macroblock *top_mb; - VP8Macroblock *left_mb = &mb[-1]; + const VP8Macroblock *top_mb; + const VP8Macroblock *left_mb = &mb[-1]; const uint8_t *mbsplits_left = vp8_mbsplits[left_mb->partitioning]; const uint8_t *mbsplits_top, *mbsplits_cur, *firstidx; - VP8mv *top_mv; - VP8mv *left_mv = left_mb->bmv; - VP8mv *cur_mv = mb->bmv; + const VP8mv *top_mv; + const VP8mv *left_mv = left_mb->bmv; + const VP8mv *cur_mv = mb->bmv; if (!layout) // layout is inlined, s->mb_layout is not top_mb = &mb[2]; @@ -1046,7 +1047,6 @@ static av_always_inline void vp7_decode_mvs(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y) { - VP8Macroblock *mb_edge[12]; enum { CNT_ZERO, CNT_NEAREST, CNT_NEAR }; enum { VP8_EDGE_TOP, VP8_EDGE_LEFT, VP8_EDGE_TOPLEFT }; int idx = CNT_ZERO; @@ -1065,7 +1065,7 @@ void vp7_decode_mvs(VP8Context *s, VP8Macroblock *mb, if (vp7_calculate_mb_offset(mb_x, mb_y, s->mb_width, pred->xoffset, pred->yoffset, !s->profile, &edge_x, &edge_y)) { - VP8Macroblock *edge = mb_edge[i] = s->macroblocks_base + 1 + edge_x + + const VP8Macroblock *edge = s->macroblocks_base + 1 + edge_x + (s->mb_width + 1) * (edge_y + 1); uint32_t mv = AV_RN32A(get_bmv_ptr(edge, vp7_mv_pred[i].subblock)); if (mv) { @@ -1131,7 +1131,7 @@ void vp7_decode_mvs(VP8Context *s, VP8Macroblock *mb, } static av_always_inline -void vp8_decode_mvs(VP8Context *s, VP8mvbounds *mv_bounds, VP8Macroblock *mb, +void vp8_decode_mvs(VP8Context *s, const VP8mvbounds *mv_bounds, VP8Macroblock *mb, int mb_x, int mb_y, int layout) { VP8Macroblock *mb_edge[3] = { 0 /* top */, @@ -1141,7 +1141,7 @@ void vp8_decode_mvs(VP8Context *s, VP8mvbounds *mv_bounds, VP8Macroblock *mb, enum { VP8_EDGE_TOP, VP8_EDGE_LEFT, VP8_EDGE_TOPLEFT }; int idx = CNT_ZERO; int cur_sign_bias = s->sign_bias[mb->ref_frame]; - int8_t *sign_bias = s->sign_bias; + const int8_t *sign_bias = s->sign_bias; VP8mv near_mv[4]; uint8_t cnt[4] = { 0 }; VPXRangeCoder *c = &s->c; @@ -1161,7 +1161,7 @@ void vp8_decode_mvs(VP8Context *s, VP8mvbounds *mv_bounds, VP8Macroblock *mb, /* Process MB on top, left and top-left */ #define MV_EDGE_CHECK(n) \ { \ - VP8Macroblock *edge = mb_edge[n]; \ + const VP8Macroblock *edge = mb_edge[n]; \ int edge_ref = edge->ref_frame; \ if (edge_ref != VP8_FRAME_CURRENT) { \ uint32_t mv = AV_RN32A(&edge->mv); \ @@ -1266,7 +1266,7 @@ void decode_intra4x4_modes(VP8Context *s, VPXRangeCoder *c, VP8Macroblock *mb, } static av_always_inline -void decode_mb_mode(VP8Context *s, VP8mvbounds *mv_bounds, +void decode_mb_mode(VP8Context *s, const VP8mvbounds *mv_bounds, VP8Macroblock *mb, int mb_x, int mb_y, uint8_t *segment, const uint8_t *ref, int layout, int is_vp7) { @@ -1361,7 +1361,7 @@ void decode_mb_mode(VP8Context *s, VP8mvbounds *mv_bounds, static av_always_inline int decode_block_coeffs_internal(VPXRangeCoder *r, int16_t block[16], uint8_t probs[16][3][NUM_DCT_TOKENS - 1], - int i, uint8_t *token_prob, int16_t qmul[2], + int i, const uint8_t *token_prob, const int16_t qmul[2], const uint8_t scan[16], int vp7) { VPXRangeCoder c = *r; @@ -1444,8 +1444,8 @@ int inter_predict_dc(int16_t block[16], int16_t pred[2]) static int vp7_decode_block_coeffs_internal(VPXRangeCoder *r, int16_t block[16], uint8_t probs[16][3][NUM_DCT_TOKENS - 1], - int i, uint8_t *token_prob, - int16_t qmul[2], + int i, const uint8_t *token_prob, + const int16_t qmul[2], const uint8_t scan[16]) { return decode_block_coeffs_internal(r, block, probs, i, @@ -1456,8 +1456,8 @@ static int vp7_decode_block_coeffs_internal(VPXRangeCoder *r, static int vp8_decode_block_coeffs_internal(VPXRangeCoder *r, int16_t block[16], uint8_t probs[16][3][NUM_DCT_TOKENS - 1], - int i, uint8_t *token_prob, - int16_t qmul[2]) + int i, const uint8_t *token_prob, + const int16_t qmul[2]) { return decode_block_coeffs_internal(r, block, probs, i, token_prob, qmul, ff_zigzag_scan, IS_VP8); @@ -1480,10 +1480,10 @@ static int vp8_decode_block_coeffs_internal(VPXRangeCoder *r, static av_always_inline int decode_block_coeffs(VPXRangeCoder *c, int16_t block[16], uint8_t probs[16][3][NUM_DCT_TOKENS - 1], - int i, int zero_nhood, int16_t qmul[2], + int i, int zero_nhood, const int16_t qmul[2], const uint8_t scan[16], int vp7) { - uint8_t *token_prob = probs[i][zero_nhood]; + const uint8_t *token_prob = probs[i][zero_nhood]; if (!vpx_rac_get_prob_branchy(c, token_prob[0])) // DCT_EOB return 0; return vp7 ? vp7_decode_block_coeffs_internal(c, block, probs, i, @@ -1568,8 +1568,8 @@ void decode_mb_coeffs(VP8Context *s, VP8ThreadData *td, VPXRangeCoder *c, } static av_always_inline -void backup_mb_border(uint8_t *top_border, uint8_t *src_y, - uint8_t *src_cb, uint8_t *src_cr, +void backup_mb_border(uint8_t *top_border, const uint8_t *src_y, + const uint8_t *src_cb, const uint8_t *src_cr, ptrdiff_t linesize, ptrdiff_t uvlinesize, int simple) { AV_COPY128(top_border, src_y + 15 * linesize); @@ -1694,7 +1694,7 @@ int check_intra_pred4x4_mode_emuedge(int mode, int mb_x, int mb_y, } static av_always_inline -void intra_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], +void intra_predict(VP8Context *s, VP8ThreadData *td, uint8_t *const dst[3], VP8Macroblock *mb, int mb_x, int mb_y, int is_vp7) { int x, y, mode, nnz; @@ -1712,14 +1712,14 @@ void intra_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], s->hpc.pred16x16[mode](dst[0], s->linesize); } else { uint8_t *ptr = dst[0]; - uint8_t *intra4x4 = mb->intra4x4_pred_mode_mb; + const uint8_t *intra4x4 = mb->intra4x4_pred_mode_mb; const uint8_t lo = is_vp7 ? 128 : 127; const uint8_t hi = is_vp7 ? 128 : 129; - uint8_t tr_top[4] = { lo, lo, lo, lo }; + const uint8_t tr_top[4] = { lo, lo, lo, lo }; // all blocks on the right edge of the macroblock use bottom edge // the top macroblock for their topright edge - uint8_t *tr_right = ptr - s->linesize + 16; + const uint8_t *tr_right = ptr - s->linesize + 16; // if we're on the right edge of the frame, said edge is extended // from the top macroblock @@ -1732,7 +1732,7 @@ void intra_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], AV_ZERO128(td->non_zero_count_cache); for (y = 0; y < 4; y++) { - uint8_t *topright = ptr + 4 - s->linesize; + const uint8_t *topright = ptr + 4 - s->linesize; for (x = 0; x < 4; x++) { int copy = 0; ptrdiff_t linesize = s->linesize; @@ -1838,7 +1838,7 @@ void vp8_mc_luma(VP8Context *s, VP8ThreadData *td, uint8_t *dst, int width, int height, ptrdiff_t linesize, vp8_mc_func mc_func[3][3], int is_vp7) { - uint8_t *src = ref->f->data[0]; + const uint8_t *src = ref->f->data[0]; if (AV_RN32A(mv)) { ptrdiff_t src_linesize = linesize; @@ -1898,7 +1898,7 @@ void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1, int width, int height, ptrdiff_t linesize, vp8_mc_func mc_func[3][3], int is_vp7) { - uint8_t *src1 = ref->f->data[1], *src2 = ref->f->data[2]; + const uint8_t *src1 = ref->f->data[1], *src2 = ref->f->data[2]; if (AV_RN32A(mv)) { int mx = mv->x & 7, mx_idx = subpel_idx[0][mx]; @@ -1944,10 +1944,10 @@ void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1, } static av_always_inline -void vp8_mc_part(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], - ThreadFrame *ref_frame, int x_off, int y_off, +void vp8_mc_part(VP8Context *s, VP8ThreadData *td, uint8_t *const dst[3], + const ThreadFrame *ref_frame, int x_off, int y_off, int bx_off, int by_off, int block_w, int block_h, - int width, int height, VP8mv *mv, int is_vp7) + int width, int height, const VP8mv *mv, int is_vp7) { VP8mv uvmv = *mv; @@ -1982,8 +1982,8 @@ void vp8_mc_part(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], /* Fetch pixels for estimated mv 4 macroblocks ahead. * Optimized for 64-byte cache lines. Inspired by ffh264 prefetch_motion. */ static av_always_inline -void prefetch_motion(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, - int mb_xy, int ref) +void prefetch_motion(const VP8Context *s, const VP8Macroblock *mb, + int mb_x, int mb_y, int mb_xy, int ref) { /* Don't prefetch refs that haven't been used very often this frame. */ if (s->ref_count[ref - 1] > (mb_xy >> 5)) { @@ -2005,13 +2005,13 @@ void prefetch_motion(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, * Apply motion vectors to prediction buffer, chapter 18. */ static av_always_inline -void inter_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], +void inter_predict(VP8Context *s, VP8ThreadData *td, uint8_t *const dst[3], VP8Macroblock *mb, int mb_x, int mb_y, int is_vp7) { int x_off = mb_x << 4, y_off = mb_y << 4; int width = 16 * s->mb_width, height = 16 * s->mb_height; - ThreadFrame *ref = &s->framep[mb->ref_frame]->tf; - VP8mv *bmv = mb->bmv; + const ThreadFrame *ref = &s->framep[mb->ref_frame]->tf; + const VP8mv *bmv = mb->bmv; switch (mb->partitioning) { case VP8_SPLITMVMODE_NONE: @@ -2089,7 +2089,8 @@ void inter_predict(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], } static av_always_inline -void idct_mb(VP8Context *s, VP8ThreadData *td, uint8_t *dst[3], VP8Macroblock *mb) +void idct_mb(VP8Context *s, VP8ThreadData *td, uint8_t *const dst[3], + const VP8Macroblock *mb) { int x, y, ch; @@ -2151,7 +2152,7 @@ chroma_idct_end: } static av_always_inline -void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, +void filter_level_for_mb(const VP8Context *s, const VP8Macroblock *mb, VP8FilterStrength *f, int is_vp7) { int interior_limit, filter_level; @@ -2184,7 +2185,7 @@ void filter_level_for_mb(VP8Context *s, VP8Macroblock *mb, } static av_always_inline -void filter_mb(VP8Context *s, uint8_t *dst[3], VP8FilterStrength *f, +void filter_mb(const VP8Context *s, uint8_t *const dst[3], const VP8FilterStrength *f, int mb_x, int mb_y, int is_vp7) { int mbedge_lim, bedge_lim_y, bedge_lim_uv, hev_thresh; @@ -2271,7 +2272,7 @@ void filter_mb(VP8Context *s, uint8_t *dst[3], VP8FilterStrength *f, } static av_always_inline -void filter_mb_simple(VP8Context *s, uint8_t *dst, VP8FilterStrength *f, +void filter_mb_simple(const VP8Context *s, uint8_t *dst, const VP8FilterStrength *f, int mb_x, int mb_y, int is_vp7) { int mbedge_lim, bedge_lim; @@ -2306,7 +2307,7 @@ void filter_mb_simple(VP8Context *s, uint8_t *dst, VP8FilterStrength *f, #define MARGIN (16 << 2) static av_always_inline int vp78_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *curframe, - VP8Frame *prev_frame, int is_vp7) + const VP8Frame *prev_frame, int is_vp7) { VP8Context *s = avctx->priv_data; int mb_x, mb_y; @@ -2343,13 +2344,13 @@ int vp78_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *curframe, } static int vp7_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *cur_frame, - VP8Frame *prev_frame) + const VP8Frame *prev_frame) { return vp78_decode_mv_mb_modes(avctx, cur_frame, prev_frame, IS_VP7); } static int vp8_decode_mv_mb_modes(AVCodecContext *avctx, VP8Frame *cur_frame, - VP8Frame *prev_frame) + const VP8Frame *prev_frame) { return vp78_decode_mv_mb_modes(avctx, cur_frame, prev_frame, IS_VP8); } @@ -2562,7 +2563,7 @@ static av_always_inline void filter_mb_row(AVCodecContext *avctx, void *tdata, next_td = &s->thread_data[(jobnr + 1) % num_jobs]; for (mb_x = 0; mb_x < s->mb_width; mb_x++, mb++) { - VP8FilterStrength *f = &td->filter_strength[mb_x]; + const VP8FilterStrength *f = &td->filter_strength[mb_x]; if (!is_vp7 && prev_td != td) check_thread_pos(td, prev_td, (mb_x + 1) + (s->mb_width + 3), mb_y - 1);