From patchwork Sun Oct 16 20:43:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38746 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1305252pzb; Sun, 16 Oct 2022 13:43:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7o2h3RKFFqmxdUWmgag3v4aekQ0bRP+NIKlQY7Wdryvtx97lvnPY+datjngUzGWicySF8r X-Received: by 2002:a17:907:a059:b0:78d:1a16:fc5c with SMTP id gz25-20020a170907a05900b0078d1a16fc5cmr6353674ejc.31.1665953015969; Sun, 16 Oct 2022 13:43:35 -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 mp28-20020a1709071b1c00b0078e27f2fbe3si6012798ejc.115.2022.10.16.13.43.34; Sun, 16 Oct 2022 13:43:35 -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=TcMXJqXD; 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 0848F68BC1D; Sun, 16 Oct 2022 23:43:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075031.outbound.protection.outlook.com [40.92.75.31]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2148B68BB29 for ; Sun, 16 Oct 2022 23:43:23 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jArGIyycEYmfUcI90us1UbW7R1JMIElV0kXqw8HxAme873jAkPtAI3BH/nLAIV5Pb8y1eg/PbYZUWxrWemP3LVjoFIlod6OqNSrU8bderUoP7N4jVg6ICUcHHWXZcfe+8+tk5VvwsxMzr0lqlAhddrAISr4wIzwUNlEp6piVtaNjDSl+z90lFRoU/bMsHExb3fEfFzJfsDQfCxO6kym/tjGFEUuCcxIzA+cljM7Ekawsxyi0j6tZQpgeHiYTviX30bRoUwXKDMjgg4bZSRh2bGQVVQ0mvsfVNVGjZQmxyDBm5ADYm+xBYapmHRkTzvV1hCkV+WrfGZI+zWRJ5CWCDQ== 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=CLFlD3HTMj4ExaWKcKqXTyPTtWTzyma0JH+Vzs0TdUQ=; b=HzcdK+KxRRR0rZeEQ6HfMkusY0vqQhq+cHyjfppzzyc/YMIHdvMsjEnwCk7gw4mq/vAFbsWk+IuFPoh6NpjIz1L35yqsUc8rvnU5BV47kd4/Ph8zDYHDUL8QO4uWnPKpLGu3fRn4xSmkO0hghjQIdKtYK8KnxgJfnhPpQmZIWWPfJse4oFvhWjuO6xqrmutKLORtx+8nPdkh7o8VEsxhE9JegYeU9PuPxpvFM4rTpEpInOumiGnSnbCgthk/+wCOgvS7Josfd+ysnONQ3kUzogB+RQu+xEw0472UTmU2IOZffsnfTjK0p6WQdojLFUISBLR2uASRfM6kkdQzppQAsg== 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=CLFlD3HTMj4ExaWKcKqXTyPTtWTzyma0JH+Vzs0TdUQ=; b=TcMXJqXDq53ErlVDG9KqOiAgOTdd6yFZ2hdBG4tRbfnmoXYfdHhlXwQiVApSC8paBDAkrkL/O1ncP+mvG2Fy4TKrw8v0MHacEAsFSJhOwLUWKa/2GybYNYBxfOiRC6M8xdeRpB1se+8Wq7HBK73L6o3Fo5oqB5DSFn3BRdl0rNmz5FpsTgN8lMtDTwJ6W/0hxrCO9Pjuo18xp5rf3uvrkF0pKUSpjdtyLCIcVx9AdjaF8ZPx6ZDbw+6ean7VYkw4cFJFHg7Ff71h9O7S+ARReEDSAmNJeUZvN5hFwYyZt2Qk0Cp9C9bddSm1HYW6IHiAdc1EqOUDmEkXVESrhG3OuA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0090.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:36d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sun, 16 Oct 2022 20:43:21 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f%2]) with mapi id 15.20.5723.033; Sun, 16 Oct 2022 20:43:21 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Oct 2022 22:43:12 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [AEcqktx3d8HiHHJRyXsnVwfwzVEcm0gKGPDkuR8IuvQ=] X-ClientProxiedBy: AS9PR06CA0400.eurprd06.prod.outlook.com (2603:10a6:20b:461::29) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221016204320.605128-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0090:EE_ X-MS-Office365-Filtering-Correlation-Id: 7a0fad22-1b2d-451d-51cc-08daafb70f1f X-MS-Exchange-SLBlob-MailProps: ZILSnhm0P3lt+CQaDQ/GFpCdwpyShCnwIgZXAYIQ32pnM+p1jviA6nAdrTner905pv9ljfmMvl2KOoJRLbAHh9Z2tyI9mYypR9Vp2PpvB4+Hz4Y7Y3q4xk+Dj7KKuNlupjxCin++WXM0e3YCeHFryCN0W5Hz0/mOhZZqUCZGzTU3+n8FMOsWXuyzIhE6u6VQBbwJQ9zGyVhN0oCU2yEAcCSYiUxMMIx85gnl6I92asjFA1E/AQkL5tbWNmetlOsGgWxngOSQ1GQ780GtieVhw0RJaoOL79/g4T3fTOU4kVKHv3BU+/9N4QwySSLHiUSW9McqWb0G+NfTr7U8VG+Rcga+sK9QYCe1wwjfF99eZWxHvRYVnvqnIen5MoNWm438pl/4a/QxVP6rcHVlFeAlNJKwHMT88oyN1dKwSZ96S5SEj1dnuYl9fUxxG89mKMpE2AiOSorq+5PuNaAFox5l0hadWBWtzoh6Vyx+YCA09DUE3GWsgSWzrQ7ByalMBjadKvUxHYUj3s61C/3diLEVjJCW84HANLKCvvnXjc+loTGo98d3m5rl6B8bS0neFmPBZQVGcAI7XBcdUQ2rEfYGMPUxbVS9Zo6VHhbpYePnZfiHUBe6vb4XCu2pA25YzSGqPiHPhm4XW3R2Bp7c66Qjkoe5BM6eDJqgGSF45KZAK9etenwLFdLNy2WpVbwKN1C4ZmL7/PcBPh4bTEVEP4pxlKp2R/EiX5G4eZezoBKKvazOWQfUAJ64iC64HK2q/ndhImujtMYBsXfq6wJGdaGnHs0+Ytns2abh X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Gw7mZY/JS9tDex+zp2Pr9tP+7bav4AC3qwxGVzNRL0Kyak6ihR2azN6xZ/Pd1JftMbPrD0h4mupK8CYzj71D4wT+z3VBYLEkVtz89Qk9GL8czPYoMKrieCwlvOn8wUMFKh1u4xyMRdWfE29Mx70vxTonACKPyKbWDHCwU2Sm6NDQi3aWMyDF7V1x7XIFS2Y3U2QMZv8Tv3P9azs/B6vLqxlzXb7LnOm0fof6z8LQtxn7gax3InVhztJx1XDVXkFJOHQpxsmnHmcLUnxn/jLEt1hqT8nqXPFV4lTmC9UWCGPAWxrNedsBRNEC4wG1Q3h6iQ5lz/+U90CbSU++fwik0KQyGZUvAW3TW0jNhXO+Ca6lk6DW0aXiROhLMemx6oYAZy1Dzp4xL6e2odwzOpu+8ldhyMLQz7XdoVOFuXaY0RdvttM34P4oPmMb/S3w64yVEYlv3x7/jp/TFiXN8A+L+CNjAvF8wKmJ5aQ8K3B3iAch3Z233kJyOYbt+BF3gMYhyStWVsFlT8jXyTZzEM2r5Ks4AOMJUmByp1A5DSA/ucytHM4xxRgxQJUZzmZ1IxYDGyL4nnZVv2959+CbBgfKX58OAL5g5iUNWnJS1nZhEqw3RS5g7Bl3BUEIzwvtZxSW8zyOPT2cmP22eiHL6yIaX0A/w8sb+yFY7OeHH5Ef+20416TwfgYEveeS7cU11VC9 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /ridirFqX9jkWVG60i5oP389Uob+mVj6IC90/Xshsc1IUXMnlzMZHlTV5mC7L30qfC5aNoZZoO5J8Ocn+jWiv7sMr+nx/eF3L2btciAzrbeAQM2ja22we0wOU/HNpGjDzNct/ojdLppbn5rQ/QXYXkm6YiEOtHih+GtBl2FrW10EL/yf6AvLkZa2fARX8ijd7U9wJaJG003VdU9fLeVbELXoewFzpxqNrsI2Prvzki1SoqLAZ13LR1alJut641PfBfDkp6PHt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com X-MS-Exchange-CrossTenant-Network-Message-Id: 7a0fad22-1b2d-451d-51cc-08daafb70f1f X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 20:43:21.4097 (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: AM8P250MB0090 Subject: [FFmpeg-devel] [PATCH 1/9] avcodec/(ffv1|h264|png|snow)dec: Remove comment out DRAW_HORIZ_BAND cap 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: wc2KJQnH16et Signed-off-by: Andreas Rheinhardt --- libavcodec/ffv1dec.c | 2 +- libavcodec/h264dec.c | 2 +- libavcodec/pngdec.c | 4 ++-- libavcodec/snowdec.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index d4bc60a7da..9a610c2ff9 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -1099,7 +1099,7 @@ const FFCodec ff_ffv1_decoder = { .close = ffv1_decode_close, FF_CODEC_DECODE_CB(decode_frame), UPDATE_THREAD_CONTEXT(update_thread_context), - .p.capabilities = AV_CODEC_CAP_DR1 /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/ | + .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS | AV_CODEC_CAP_SLICE_THREADS, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_ALLOCATE_PROGRESS, diff --git a/libavcodec/h264dec.c b/libavcodec/h264dec.c index 8f56f3ff92..6ede4e8c9f 100644 --- a/libavcodec/h264dec.c +++ b/libavcodec/h264dec.c @@ -1075,7 +1075,7 @@ const FFCodec ff_h264_decoder = { .init = h264_decode_init, .close = h264_decode_end, FF_CODEC_DECODE_CB(h264_decode_frame), - .p.capabilities = /*AV_CODEC_CAP_DRAW_HORIZ_BAND |*/ AV_CODEC_CAP_DR1 | + .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS | AV_CODEC_CAP_FRAME_THREADS, .hw_configs = (const AVCodecHWConfigInternal *const []) { diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 3c3eca601e..8080094d65 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -1723,7 +1723,7 @@ const FFCodec ff_apng_decoder = { .close = png_dec_end, FF_CODEC_DECODE_CB(decode_frame_apng), UPDATE_THREAD_CONTEXT(update_thread_context), - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/, + .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_ICC_PROFILES, @@ -1741,7 +1741,7 @@ const FFCodec ff_png_decoder = { .close = png_dec_end, FF_CODEC_DECODE_CB(decode_frame_png), UPDATE_THREAD_CONTEXT(update_thread_context), - .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/, + .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, .caps_internal = FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM | FF_CODEC_CAP_ALLOCATE_PROGRESS | FF_CODEC_CAP_INIT_CLEANUP | FF_CODEC_CAP_ICC_PROFILES, diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 5c95ffde11..bed29d3390 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -662,6 +662,6 @@ const FFCodec ff_snow_decoder = { .init = ff_snow_common_init, .close = decode_end, FF_CODEC_DECODE_CB(decode_frame), - .p.capabilities = AV_CODEC_CAP_DR1 /*| AV_CODEC_CAP_DRAW_HORIZ_BAND*/, + .p.capabilities = AV_CODEC_CAP_DR1, .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; From patchwork Sun Oct 16 20:46:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38745 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1306270pzb; Sun, 16 Oct 2022 13:47:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7xcHghtiYYZrjHrJKnKhXX503/tzih74zfM22fxbnO/XX92XXquxASwjONZYawQGVhjVSt X-Received: by 2002:a17:906:db05:b0:741:5730:270e with SMTP id xj5-20020a170906db0500b007415730270emr5959412ejb.609.1665953223531; Sun, 16 Oct 2022 13:47:03 -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 l22-20020a056402125600b0044f441d2372si7299846edw.88.2022.10.16.13.47.02; Sun, 16 Oct 2022 13:47:03 -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=h17lPiwC; 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 8175D68BC53; Sun, 16 Oct 2022 23:47: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-db8eur05olkn2047.outbound.protection.outlook.com [40.92.89.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 080A568BB00 for ; Sun, 16 Oct 2022 23:46:54 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iTJwkaGwr4uQeiKmVktZeiz56KPZN/yThkfV+WFPm58sfJyettyp4w0a3p6oIxakW6JwTm5g3gRwsPSfQjkka1mPRdqgfB3zGkal1+4ZvGQVpUODRmfR+P0WJ+KA8NPvKHTYaG4jvyyk3ozBKPWsJRn7HiKHk9wDIJ8XD7J7Poop6FWrjSQGhsTc4FLOWmtNlBt0iyw0OtpAWav3bD9ZFD86pIxh3pFtPHDhmHpyJH2JemfzSZg4StyMbKyr57QTARlqqKkcwczuUMkLbPBOgx6re3QB37lXzZb7/EoxtjrjXTnIJ5Lmi/45LgQrC7B8GLPTC0gulyUZIbbj42Y2Iw== 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=NT75l2NR03yOEoK8HH0yYw3wEuaT1CE5Djp0ury+5BI=; b=f0dkPr1rRwcu8mpYBSeW6fWA+/sdfwjfzu0/F3/bOnTWmpFcuqrTRQBuhHCTovr3dgM9zNYTT38M0q49LBpjya4x6ApcLG+e8tsl0SY+3kOoDiCx6Rc9T8DOa0PUdmKWSRT298f3W4TZb0aQWEjKIvDyWCeC9SXk3YoLQlzRfoINJ+vtuW49NIcrASlv/EK+2PGL9SM4p/M/mzZWhe79/qUuvr217G0OFBapVIu9kn91ghPkzT9mLULluVv6qtrMHdn16LYQ/dJhO7/PVyzk4ENhEaBzcGpEFdYPOiXcDEqOONvsjohCDzuHIFxlqxenDSChMBmmcmUHWNYdX9GfIQ== 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=NT75l2NR03yOEoK8HH0yYw3wEuaT1CE5Djp0ury+5BI=; b=h17lPiwC8JZoflUnH7bB6DbPdw6WG/Q0n4dxxTyJV2Zc4AuSD8X5W38vzZq3YS0z7xfBY386Dx07761j9uyudXWSHyscmeVIO6iWzKDigXO845Ng3hRj1VBVHXx+orZmnIn+/EudWSbbwUUK8ciuUSNHKStJW3AnTkUOsFD/mDcaejQQ62MyXqPMlkIxJwV5bN2EklgPcsR76B/112eaLOdm920SDhoUNdomjRtJWPJa/X/Plc+0PHO4OiHOTWzKYPlVfhmgbUdnTjvSfUbqs8M+Hr2liPbH8mvUH/v572Kv9nxysfsjzDiLvPCn3duYCM1APLZT7W0JjjOpNkGuCA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0090.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:36d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sun, 16 Oct 2022 20:46:52 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f%2]) with mapi id 15.20.5723.033; Sun, 16 Oct 2022 20:46:52 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Oct 2022 22:46:48 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [fNbgzmE7vQvUgZ77jUx/3mQBWzxTTp+VbrU+NCRsYFk=] X-ClientProxiedBy: AM6PR08CA0035.eurprd08.prod.outlook.com (2603:10a6:20b:c0::23) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221016204655.605202-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0090:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e2ffae5-8495-411e-646e-08daafb78dff X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmriMkceEMr8g+y2B+GCHAesgpc10gVkZdOmmhjPBUV83Kq7mQcJiD5PcPKIITuUfIB0xq7XtE611gL157PvomTKe599GDC2CIQps3+PLENjZLRi3tun1k4eNFO9+rtpfYWlHhexbN18gIYFQBROhEcaWOVsdFnz21FgnTBUqidd93IArr9lJulYYgT5Gp3hyWxAt9kJUuPnEp1Pibyc9flPvbmKtJxwgToRXOFstCljtE5zOz7cKvP8srTlZ4lIcDBJkUbpurPodF3aKi/NOpnnu4qTnmW/hCqr5AANDxZVAmj8+U+vo3Aqcn/G2EOJz3W2m6258FgHDkBE90fQajG1+R5S3B85Q3jfwGmYegUJ02ZEEwE9QTcWa/xmU61rdYgLqM//KBEcs/x404LhJEE+SO8J9u7OyFVF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/2UV3d0bNBgg2DXm9wwQKG7QyNJSLlhRkFgbwosLV6/pSicUrIj3KMsq+NuX6es715VL+rTwLSXXSeOlRAgN56vL2ZpH3POaXdzK56jO3MRey8dW5sl0TgkaXo9X5UM6b7XpgTcvb14HB8P8XSchhq2t+7lsZ1Oyc3RKYJN6qzB97eTNwFAPROtoLYWorbIuHCO6cog4yeRi0C1ORoDpUC4ELYjxWX6dcdY3qwhZyGM7KXNihRaH0wfDeAgU4KQXYTv6TrR5033emUweMUpcVWlSRRLaY5CDRhYRiRF4W8VTvX97NqeFIxS38rw5YB6JuwVrj63uFAdSoPCF X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e2ffae5-8495-411e-646e-08daafb78dff X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 20:46:52.4733 (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: AM8P250MB0090 Subject: [FFmpeg-devel] [PATCH 2/9] avcodec/vc1_block: Remove dead calls to ff_mpeg_draw_horiz_band() 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: jT+xl/ag/BBB The VC-1 decoders don't support draw_horiz_band at all. Signed-off-by: Andreas Rheinhardt --- libavcodec/dxva2_vc1.c | 2 -- libavcodec/vaapi_vc1.c | 2 -- libavcodec/vc1_block.c | 23 ----------------------- 3 files changed, 27 deletions(-) diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c index cf660a50d2..12e3de59ec 100644 --- a/libavcodec/dxva2_vc1.c +++ b/libavcodec/dxva2_vc1.c @@ -372,8 +372,6 @@ static int dxva2_vc1_end_frame(AVCodecContext *avctx) &ctx_pic->pp, sizeof(ctx_pic->pp), NULL, 0, commit_bitstream_and_slice_buffer); - if (!ret) - ff_mpeg_draw_horiz_band(&v->s, 0, avctx->height); return ret; } diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c index d82336a3b3..fb2132e814 100644 --- a/libavcodec/vaapi_vc1.c +++ b/libavcodec/vaapi_vc1.c @@ -457,8 +457,6 @@ static int vaapi_vc1_end_frame(AVCodecContext *avctx) if (ret < 0) goto fail; - ff_mpeg_draw_horiz_band(s, 0, s->avctx->height); - fail: return ret; } diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index 3267fc269b..ef8ce40e68 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -2640,15 +2640,9 @@ static void vc1_decode_i_blocks(VC1Context *v) v->left_blk_idx = (v->left_blk_idx + 1) % (v->end_mb_x + 2); v->cur_blk_idx = (v->cur_blk_idx + 1) % (v->end_mb_x + 2); } - if (!v->s.loop_filter) - ff_mpeg_draw_horiz_band(s, s->mb_y * 16, 16); - else if (s->mb_y) - ff_mpeg_draw_horiz_band(s, (s->mb_y - 1) * 16, 16); s->first_slice_line = 0; } - if (v->s.loop_filter) - ff_mpeg_draw_horiz_band(s, (s->end_mb_y - 1) * 16, 16); /* This is intentionally mb_height and not end_mb_y - unlike in advanced * profile, these only differ are when decoding MSS2 rectangles. */ @@ -2786,15 +2780,9 @@ static int vc1_decode_i_blocks_adv(VC1Context *v) inc_blk_idx(v->left_blk_idx); inc_blk_idx(v->cur_blk_idx); } - if (!v->s.loop_filter) - ff_mpeg_draw_horiz_band(s, s->mb_y * 16, 16); - else if (s->mb_y) - ff_mpeg_draw_horiz_band(s, (s->mb_y-1) * 16, 16); s->first_slice_line = 0; } - if (v->s.loop_filter) - ff_mpeg_draw_horiz_band(s, (s->end_mb_y - 1) * 16, 16); ff_er_add_slice(&s->er, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, (s->end_mb_y << v->field_mode) - 1, ER_MB_END); return 0; @@ -2882,12 +2870,8 @@ static void vc1_decode_p_blocks(VC1Context *v) memmove(v->luma_mv_base, v->luma_mv - s->mb_stride, sizeof(v->luma_mv_base[0]) * 2 * s->mb_stride); - if (s->mb_y != s->start_mb_y) - ff_mpeg_draw_horiz_band(s, (s->mb_y - 1) * 16, 16); s->first_slice_line = 0; } - if (s->end_mb_y >= s->start_mb_y) - ff_mpeg_draw_horiz_band(s, (s->end_mb_y - 1) * 16, 16); ff_er_add_slice(&s->er, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } @@ -2964,14 +2948,8 @@ static void vc1_decode_b_blocks(VC1Context *v) memmove(v->is_intra_base, v->is_intra - s->mb_stride, sizeof(v->is_intra_base[0]) * 2 * s->mb_stride); - if (!v->s.loop_filter) - ff_mpeg_draw_horiz_band(s, s->mb_y * 16, 16); - else if (s->mb_y) - ff_mpeg_draw_horiz_band(s, (s->mb_y - 1) * 16, 16); s->first_slice_line = 0; } - if (v->s.loop_filter) - ff_mpeg_draw_horiz_band(s, (s->end_mb_y - 1) * 16, 16); ff_er_add_slice(&s->er, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, (s->end_mb_y << v->field_mode) - 1, ER_MB_END); } @@ -2992,7 +2970,6 @@ static void vc1_decode_skip_blocks(VC1Context *v) memcpy(s->dest[0], s->last_picture.f->data[0] + s->mb_y * 16 * s->linesize, s->linesize * 16); memcpy(s->dest[1], s->last_picture.f->data[1] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8); memcpy(s->dest[2], s->last_picture.f->data[2] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8); - ff_mpeg_draw_horiz_band(s, s->mb_y * 16, 16); s->first_slice_line = 0; } s->pict_type = AV_PICTURE_TYPE_P; From patchwork Sun Oct 16 20:46:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38747 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1306319pzb; Sun, 16 Oct 2022 13:47:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4YZvzeE08gXM8KPZ+B+UP5wicrB9+neBlkwmnRPmdhEsMNkltqMkdek+ryNkRO7DnrUwDQ X-Received: by 2002:a05:6402:538a:b0:457:b602:d5a6 with SMTP id ew10-20020a056402538a00b00457b602d5a6mr7398211edb.371.1665953231504; Sun, 16 Oct 2022 13:47:11 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 25-20020a508e59000000b0045cf468c3fdsi7452843edx.534.2022.10.16.13.47.11; Sun, 16 Oct 2022 13:47:11 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=rVYVGtR8; 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 6BCAE68BC6A; Sun, 16 Oct 2022 23:47:05 +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-db8eur05olkn2047.outbound.protection.outlook.com [40.92.89.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2D17E68BC51 for ; Sun, 16 Oct 2022 23:46:59 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oTkfmS+KKYrzsSAjrnDdDiIvhbbSTlXfWhOwC9uZYdnSfcq13VA5TFoQ+bhgw3dn5RWvWMQBeJThpf/S5cER8CP5rHu8IJkvTP0YNqlqIabultijVtmQKXHCip6lkSUEaWFslT4wPY7n3SsEpjr1m8DlK1EKA5tVVotkD5xnDHXnrOW1PeBm8Z3jqUJ2N6ICrrHaBoQRm6Cncy3lPKPdeyTjhaoFaNAOmMINjFtUI2mmdAxDdgciQHjhW95lBwOaVZwl3CWhO6X6+RNxisdtXCG21oz9M8omVAnfwVWfl2mtb9R2qPV7LPOx+aMq6Vx9PNcjUQXymBRGzRlPVoGMTw== 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=OiQvwEnE47VgJs7Fvv61fi/KGMxoNxCqLcKVvdNc/Ag=; b=M5RfG8VM2mcxhil2PC63sKKC27ExgZSZvnEUSfkif6ytAaFEjByvdfh2zpR3Xg5bx0Bv8dBC5WS+VPycUeKw2owCUYj0Fs2UOPAPkatGOREOy1SaQscjxoK/bmepkX1ecfEFFluvMXe2tYHWItk/3dmPGXdo+lrFnVCOn/oEC1ab7fdDCEaX9TCza9d4ZtnSXvZKMD6fYoD9BJbCvnv4VrrfWancJZmRsSNaYL5NAYDfyToBKpGUJMNvo85oTvl9AlPjoSyj5z7Sd0URvF8ZaPTxTjp6wcf6PbwLAXNzY/EkOFFaTGVNyT4AV8gIBmTc0ojoa1OnElV/Yi6hOq+76Q== 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=OiQvwEnE47VgJs7Fvv61fi/KGMxoNxCqLcKVvdNc/Ag=; b=rVYVGtR88Oi93dU0Tml3aakihFTXgEJhfnQfdiZo27BWVNqm1616cEVdNuQRrJvIFbIUl5qrzvkqLbbfe4TNFjcGcMCAk/EBeQEWTb/Ji/8BJ/wkSAovKCOkQoJKJeTxUJ9THhfbhbDRbJzMUnANF/eaVwOMwjkxVVj1lDsBa/erH7Orw8ACfd7Pvr7wgJ/EsyVfiKj2mY49uxs0YKY8z2xj1640pOVyeFvEJP9hthSsWUVBOEmiWkGcelqEBbjRSgNU/BAVQUAUBHFo60J5q/5t5Zeqv0cK6c3bKxGWUN9nnBbymFD+NP1mkHrauWFZeupXn6rPsGcFMhOJp4H+3Q== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0090.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:36d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sun, 16 Oct 2022 20:46:53 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f%2]) with mapi id 15.20.5723.033; Sun, 16 Oct 2022 20:46:53 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Oct 2022 22:46:49 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [uM1h71nLBR8HmLrLGopPtjZejrnERTryaYpu8TE5WoE=] X-ClientProxiedBy: AM6PR08CA0035.eurprd08.prod.outlook.com (2603:10a6:20b:c0::23) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221016204655.605202-2-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0090:EE_ X-MS-Office365-Filtering-Correlation-Id: fe9e7c0e-b295-4421-7d55-08daafb78ed6 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmriMkceEMr8g+y2B+GCHAes2lAOgDFG+pyhttgb9sxgMn7mdtNWqz9bqmH1NbN0ZVe9HiDvyurFlnodm0kjEjScuwtqYgAZMlF7Bk1drolU04iUfDd24UP5WneT5EpuqaySh54m+K+eQomKTQkKJpmUQgZ+kI5X274UoAxb2JxxFRpgHxEgzkl4rPJMLB38jUIPMv53X58VYnuPNSYwhLPHgQy5jSzZZXIHu17fJLo1GtSDqET9f0I61eHkkb9RaYXC6VNDpGtnr8T6gRAwKfChbG7LnaBqSeeKI8C7V/QQTib72RxmOYOk00zBRMBKtQm+jR30aUesKC1N2nU4oXomVuefq/Z5dcHGVdQ2ZHD4XljwhD75NUwuKvxX4StaiODzDsSJTpCOQdDwKP/I3dp1k4iz6VIV1gJz/AVWiQYC7DP7wPCWGC/v9IVZit0I1I+JV11+/sOl6g17Gtp54LUQXhWZnTWf3wakc/zAtJAgt3uD2G8tv2DfRnyqlFd4OcTdWyJXT8nmXNtQfRf40DYKqA/bPKbJPDmIv6ZeAxFbLxLbD32oQ4ptnmwhUQeg2oePUcjq5X053soGl+gj+q2XEh0Fo4I4VbUOV55ejMC7bzKpviJNVCYQB9E+f6/Om09N2m65TFi3D5EHLZouUC02NhyEDPFLs3X1qGMHgq55YR1i8s5rAY4tIdWLZdj6qQhPQlBB2IxTr+nnQLH9IgO1AHZaJpsFAGsFu8CrAVfumdhFtvK9tgKhomlmVD6kfVw= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: WypIJSw5L3q3yc+deD5QMZnN6uiu9ACmwGI2ZsRh59khP+YlI5fnKb9Y2eP1aWjMwN2gAS2y5QIhZ5ADjCATIsLDdkQ9aNu7Er+ZkG9BKgLhkijBqsLboPwzYa4tL4TwRoWofaxswykgXGTNPt3fDXbqE4h8yMSDds6pa7j7NsmaZDk/dialnx4sDHoXbThsv+w5qZ2jiKWjVxy7DSgz+r7XO21yumYAuXDi8fCpzU5MGiApZyfYm5EMHZT3B7hPF46Hzfkgr0chYGTfZtCrq2Pg0zbBgUPWIJbNiWMBT5eblYEsKbiAPV26u/Cl7JlDyhePZ0liK+25yZtqjrGQ20Q5D06yBPYWOnsbGN8+qIteM5nIg/bTtzuLYRIzb+O9xZV9bWEX5j/cWMIfORfyEPZIOfgPTHqOVXrQJ+mupUzk4BWs8/GfgVeU2AuGKyFPUqgYF5uUndnaWA92RL4NmuABmchrzQh2alh+DzJa6OQZG+hnP3ErV5zofzdSk4rbMnx4K8/m4fKgQ83jRag64rnUJzGBNCHvyLY7U3wO05+CngpK5mUBG3dLATEyLsVT0mzsEQZyPh2hlZzrLnfBfDRhDXezGAY/yGRzw6ie5Jp7OGgltYrmxKOeMXYsWCUz6nCXF+jR3TlxhgTQb08IAIzk0UDA8+EHja6KHRHTMn5tVnK266i/+cAhjj6JRmxy X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: //DP5xH6djDV9oA8Aix8l4lXXRWMAV5BiX39hvmD1SdPQacewUcOOY4H1N2rPc0+qYBoq/BKIKCzMQrVfmw87wX0Clww9o7DOBQH7TFWjnV7te3E2bAxcHpNc/pufYgJyZVQ3hox4ug+mdDnJrkWxgegPKG4rJLHkacUwklQvX9A2hzSXe8eq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BR2u7xWz6v0jsHz0aW0PSUH6zSHIAi1V5zpE1okeagxfkjDK1mM2PqhjfVR4TS3Mf30EYolFgtnInHMuqzO X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe9e7c0e-b295-4421-7d55-08daafb78ed6 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 20:46:53.8987 (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: AM8P250MB0090 Subject: [FFmpeg-devel] [PATCH 3/9] avcodec/mpegvideo: Don't check for draw_horiz_band 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: zuqGccDP8o+D Some parts of mpegvideo.c behave differently depending upon whether AVCodecContext.draw_horiz_band is set or not. This differing behaviour makes lots of FATE tests fail and leads to garbage output, although setting this callback is not supposed to change the output at all. These checks have been added in commits 3994623df2efd2749631c3492184dd8d4ffa9d1b and b68ab2609c67d07b6f12ed65125d76bf9a054479. The commit messages do not contain a real reason for adding the checks and it is indeed a mystery to me. But removing these checks fixes the FATE tests when one adds an (empty) draw_horiz_band when using a codec that claims to support it. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 5095149eaa..ad13832fff 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1337,7 +1337,7 @@ void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], qpel_mc_func (*op_qpix)[16]; const int linesize = s->current_picture.f->linesize[0]; //not s->linesize as this would be wrong for field pics const int uvlinesize = s->current_picture.f->linesize[1]; - const int readable = s->pict_type != AV_PICTURE_TYPE_B || IS_ENCODER(s) || s->avctx->draw_horiz_band || lowres_flag; + const int readable = s->pict_type != AV_PICTURE_TYPE_B || IS_ENCODER(s) || lowres_flag; const int block_size= lowres_flag ? 8>>s->avctx->lowres : 8; /* avoid copy if macroblock skipped in last frame too */ @@ -1584,8 +1584,6 @@ void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename s->dest[1] = s->current_picture.f->data[1] + (int)((s->mb_x - 1U) << (width_of_mb - s->chroma_x_shift)); s->dest[2] = s->current_picture.f->data[2] + (int)((s->mb_x - 1U) << (width_of_mb - s->chroma_x_shift)); - if(!(s->pict_type==AV_PICTURE_TYPE_B && s->avctx->draw_horiz_band && s->picture_structure==PICT_FRAME)) - { if(s->picture_structure==PICT_FRAME){ s->dest[0] += s->mb_y * linesize << height_of_mb; s->dest[1] += s->mb_y * uvlinesize << (height_of_mb - s->chroma_y_shift); @@ -1596,7 +1594,6 @@ void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename s->dest[2] += (s->mb_y>>1) * uvlinesize << (height_of_mb - s->chroma_y_shift); av_assert1((s->mb_y&1) == (s->picture_structure == PICT_BOTTOM_FIELD)); } - } } /** From patchwork Sun Oct 16 20:46:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38748 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1306336pzb; Sun, 16 Oct 2022 13:47:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ghGca6gBzCMwJ+go8Jq0n0XHmxUhTbGqyPcZxng2Tnh8HIRIt5BMRtvJOO1l9eP4efw9E X-Received: by 2002:a17:906:8a64:b0:78d:b00d:fe with SMTP id hy4-20020a1709068a6400b0078db00d00femr6469422ejc.32.1665953239967; Sun, 16 Oct 2022 13:47:19 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id r15-20020a17090638cf00b0078e11e92257si6502105ejd.333.2022.10.16.13.47.19; Sun, 16 Oct 2022 13:47:19 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=tG21b2r4; 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 7986268BC7C; Sun, 16 Oct 2022 23:47:08 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075074.outbound.protection.outlook.com [40.92.75.74]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0E6F868BC72 for ; Sun, 16 Oct 2022 23:47:01 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=m4wYy6jPQRscx+kSKJ0SqZKy51zLsN5MJs0QqVvdbfBwmheR7Mf8IxlWMEaCkW4hAJwvRBNs6lk3lvqfrX66Ek8Zq+qnRgRHE5hO16l5YaE6wSdt0IshP1UXIVB6plkM2X6OHNB7MdCQk3CvHY+9Q8GfGWUpC1Br3jyw8fr/l+rpagDAz/rX6NhzFCWoYFf6F8KhVDcxc0G0NQD/ROwXKUtyRQHnXpESF8cXNIF2AmnlFuGOYbPyIWnsz2zX444xeECRmIV8dO8RHD8I/kaIO2nFh/Su6C2j1bdqW4przOCxitNJpZgiMf+ny2qDRrP+tTQkSzukILaNJ+YSOeIjIQ== 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=iISBC3y+Sht+LMrqgW21a+6dhJbXY6nWzb/G7vDeqHw=; b=Ly1Lgk0RZRZq4203BArjoWKif3/7emsFMcZOrl5hsY3cUelKAMR6GV4KCtItGM+Kecc7YkEpDmUOEphpnoqEULRgLYSQaNbcIuqEm6Hy5vol+GYG3OVRvQ1qhfk61DlIg7zkpd4y4gSbCsNKmrGysW3DEo5+ZnrjVKCnd28NXwOmyrl1BeuY9zwhU6Qv2nJzDJa0GMOp9/TG2w6uEdMjKknw7fB3Whs+feX9f+vlgArOjnZ2tMEpwDUVDtllXdRano2iekeKU9S4zsCuFLDjPOZdUzP0dZrnqmP/o46Zv6xLzXXlyfOY/uTlR/hsZKwt23VYqabf0D2VYgz3qthQiQ== 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=iISBC3y+Sht+LMrqgW21a+6dhJbXY6nWzb/G7vDeqHw=; b=tG21b2r41R8+8ilp+zxpW+Kbf1JDQ+CSvejLcrNJy0IuA1QzI7VRc7Hi7ASeOfzwiztfzOWY2zx42C9HyRd+5quOEE3ESYQXhOPdAvUA0ZtWvPkxGGHAKAr9x38KkGTnQlWy1ZCgUK+yh6eUtZoI/zoafK9oiFdOw4dOAqW4UvDaPngww7qY3ZmZHajDybTKdmK/y/GGPpusu8we7yqv81/whs0EZwym7wHovPSz1SDyDRUBuJdGWaSs9ck3aYHRqeA8tndUCNlMfQuzQnB6V+cAnhMcREOhdz9oy/6g7W8UGqRQxtKpbhOK49hA9CPQ1PCp/S23JcuzKxjCmJorVA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0090.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:36d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sun, 16 Oct 2022 20:46:55 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f%2]) with mapi id 15.20.5723.033; Sun, 16 Oct 2022 20:46:55 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Oct 2022 22:46:50 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [huBrIV982uZsrZZ0uNgCTEAwJdk8XX0NWHfPA1cTUVI=] X-ClientProxiedBy: AM6PR08CA0035.eurprd08.prod.outlook.com (2603:10a6:20b:c0::23) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221016204655.605202-3-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0090:EE_ X-MS-Office365-Filtering-Correlation-Id: a4e81c5f-438d-4543-bd1b-08daafb78f7f X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmriMkceEMr8g+y2B+GCHAesWGbqWWI/pEa2fs+/f+yRRVjKDzWRMuPoiMxD3bImCS7OKXC6+gRC5pLH1+gHwIdKzQ8ZhEznZVeYeMloFGKSqKVdFRastNyBXso2G/1qvg47I+T7Z0MiqjQVzWEa2vnCHRyx9cv5BE+yf5IJvSllZQ4FJOrzVIOkBJYwdZkh4Thnbbxxt+QIDuaS/0RjCTi+DdA1GlKHHMUaaOw3zRuApgHxBtQJuXioGQu1Xf8vgowKu1e1ej32pBJ8pPSlivKFtXfV/JvcG32UdQBjD3llau6Sz8MpuQ84C6wEYGhatDThvKGHrIUm8+n0OR4/GOeJvwM1AbHhGGh6Q0I0voeXj5aYEEYVqrAoyx5cz976AxvrQ68vb0YH1E87PlajGd5HNtd1mBYue84wZCO1bI2WobAV4gv1YkpGLMgOYPzla3CymadSOydpzZITALdJidJDetgAiSVv9jatKSahShcVUa4BLI02Yd7vM9FiuE1X8RTh1enjlEDqxgY34PjuZGdnNvBr10n7fl02hm+A388+4/P8Ie+qIN3ALVj52l5IcCfUG9+k4KmYNWnxC784s7WT6oEtysKsIapJPK0epEkbXSLmOsHdB3wXPHc9x93CiRtAWeXYBci09OKLD7VF4PywZhKX/JMxkX27PjAOhofceXEEC2hlD+qrNicn8PFRKpiEXObrN/pfMYTmE8+NXW7ZTJ3lnUieoKBXjFeSc/CyaB1x1eZwFs2gNqWyHpWpDkA= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CwCoF/xdGHp021P+ivHp9MMHU0H1fVb1z/fJru+1jdPNvh/0i9dtN5yj++0QGSPWQHRQ73z7RXzd5h3IbO0yvkZrkxTkpOVALZzhIUql1+UE3L6Ujnod/FHPzDgKuQCnax/wIxGfaWZZvFcUOnqOhQp0Cjrj6By8zPN+q+TgsZMrE7oi6YQW0mcCjhKSlOsYbIdfsqqNgKy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BNiJmIS3AC7WMlcLr+ibVQY5TmdAR0lk4kY+KKAzyCoj7zrye/rfyaURF4VNkqHwUpiBNVs9Ybnu4jZS/EpiYPHD/ip4WxBT1U+QjXe5cZiSrTllGFxfoAqfqwvpWwU8Aaxxa4zVup7YfF3wSdSMvHMEmCX6mKxlbCe9IpWyr96qvklp2/M/445n8ILYBX4dSrbAtcjfwlMxV9TPCdnYds0dyq1JSXAZFGLKaegB5bCVuVgsRccGb4xx9tkgMrTloBFYzznjWK2GuUqjGsQpcdC/ofLeRg/3eqxwFolVbTzK5YalYwSFP2d34GHFKhM2L0DHhVbv9Fv5TC+SYjhs3Ws72H3GI6gT349M6g8eUNv6KIsKXgLVGOmKxh4GElLtRRQh43LZEkXyvQ24P9zH+DXx14DPwcRRQp7V6bG3E6t1SM8kJ8TMw45jJvMFPLULH9scTBCpGUyyKPeahdSLk56AQ2B2SiUzIA9TXx1X4z28E9XgHk0ywliimxO4JLOOsSj6kQLK0dFmTjuVn17eeJY7AvZoz8KG4vdRYa2uWn4qd4iVsBv574BGe81u8W54cl65p8kTABKhFpikearVeUU777k21Bh0PGOJWLlcc+jNS2DqPA0fqrrrLw9BS7s/7V/p9ZkXb1KNM8hjRnev3Zpvqib4JobaTThIRaYwmzL6UZ2LJC/AJDJ0APrNNETfPWICdBFqHYwXmXLbpzuHh91fXUoj4BZQFxmCnB0+5V/vxImzYVdcD4mRQrf57Z5ajLXcf387/D0uV1+JPu3iJudisJMl880IfR2p0OkcGiUyfut+xA2GJjo X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a4e81c5f-438d-4543-bd1b-08daafb78f7f X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 20:46:55.0092 (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: AM8P250MB0090 Subject: [FFmpeg-devel] [PATCH 4/9] avcodec/mpegvideo: Reindent after the last commit X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: p/eHOEEI9PjF Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index ad13832fff..87dae1b098 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -1584,16 +1584,16 @@ void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename s->dest[1] = s->current_picture.f->data[1] + (int)((s->mb_x - 1U) << (width_of_mb - s->chroma_x_shift)); s->dest[2] = s->current_picture.f->data[2] + (int)((s->mb_x - 1U) << (width_of_mb - s->chroma_x_shift)); - if(s->picture_structure==PICT_FRAME){ + if (s->picture_structure == PICT_FRAME) { s->dest[0] += s->mb_y * linesize << height_of_mb; s->dest[1] += s->mb_y * uvlinesize << (height_of_mb - s->chroma_y_shift); s->dest[2] += s->mb_y * uvlinesize << (height_of_mb - s->chroma_y_shift); - }else{ - s->dest[0] += (s->mb_y>>1) * linesize << height_of_mb; - s->dest[1] += (s->mb_y>>1) * uvlinesize << (height_of_mb - s->chroma_y_shift); - s->dest[2] += (s->mb_y>>1) * uvlinesize << (height_of_mb - s->chroma_y_shift); - av_assert1((s->mb_y&1) == (s->picture_structure == PICT_BOTTOM_FIELD)); - } + } else { + s->dest[0] += (s->mb_y>>1) * linesize << height_of_mb; + s->dest[1] += (s->mb_y>>1) * uvlinesize << (height_of_mb - s->chroma_y_shift); + s->dest[2] += (s->mb_y>>1) * uvlinesize << (height_of_mb - s->chroma_y_shift); + av_assert1((s->mb_y&1) == (s->picture_structure == PICT_BOTTOM_FIELD)); + } } /** From patchwork Sun Oct 16 20:46:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38749 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1306359pzb; Sun, 16 Oct 2022 13:47:28 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6XvXAa26hbZHULjqdZRMn6lQLgc+I4NayeqUNuDjNocT5k24Ld+W/bqs5GC/Mpzf1zULY2 X-Received: by 2002:a17:907:3f27:b0:78d:ad42:f733 with SMTP id hq39-20020a1709073f2700b0078dad42f733mr6419761ejc.320.1665953248004; Sun, 16 Oct 2022 13:47:28 -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 m22-20020a056402051600b0045bf7253827si6710566edv.67.2022.10.16.13.47.27; Sun, 16 Oct 2022 13:47:27 -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=YVLXNfwr; 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 9264768BC89; Sun, 16 Oct 2022 23:47:11 +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-db8eur05olkn2047.outbound.protection.outlook.com [40.92.89.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 535E568BC73 for ; Sun, 16 Oct 2022 23:47:04 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UDOH7z85MsL5dEt+M48vUtI6cv/LljnkfUiKKci8VUV3Nl3hikNSFAcsNTLYE8l/6MQJAmRDqBx2iIh+dnyo2vSlCo3HK0cDJpoFIyldBQyNU3OcM/ws2koED+c0igHlZtESRRHsu4cxfjydFpfy+NZZ7ktCBHshRqmMQcfa44d2YOxu5bqAqx607P69lNaOAZ8U3z1/zQh5a6P2KnyTtS20N2P9TAm1lmM171vOuwGMyMbqk+438JtrUdJORD1YlE14bTBR803HhXhU+RWkMfRi/NFboKFdg03uchtN6HrAa+yvvaf3Kc5hwIK0L8U/DaqA+8Q4uu+0A4ePcg+twQ== 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=1rA4uErPPX43l7p5C3gNhAgglZDwZ3lD3IQE6cuhCC4=; b=Mh4cq+ge7QD9wI30R98ZagodozTNbU0mjV5EMj50thqU4sbepS+ptGY5I6vSQ8/TKwI/6oXGIDW0APO72f+pHJ5o0Y0hkO85yFQ5qSAwHnwtSAbSYO/c0zUC3l0gkp1tmRWIveJ8W977fsMg0oziXgTSUALxv46S3KwNrvzb+aZOgIUvDsX1abWXFxyaACABn4UCjqpiV/fPE/jmHdID6iICwvaTvacKE22GUDkt+3E5yKIvBZW8Ah8aW61EeiwbHjdW8zEyxEt3X/06uVVOGPXCoAEba8CAYm7rdMrb2TaAEksMrYf29EoytF/TMQknTMKkOTMXxpNOwe0iSQSMEA== 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=1rA4uErPPX43l7p5C3gNhAgglZDwZ3lD3IQE6cuhCC4=; b=YVLXNfwrJjmhsTdQqB5NhJRAlc2QNnSHyJKXInXC7nf1OQQUDFtfaIcsvTG2ZpmV82ZofgWs69oRMnnddeByd/PUZB0iJW+R91a/RzWE92mPFx4FYaWR8DEPuiPEwIc4jb0MWviLSjS+J/9V3U5QCar5kqGuYJel1L+p9PTp4SddJZcPKIaNJ55ySY1lDxnuRpCLy/WZ7tfrSz06ALE8ozV+DgsbC1WKIRLiBxAFotikzJJV1jYe0F2xzBvR10rao1y5H3751JqAurC2ojtSHc9492uOivsNMwQD17yH0cYIyhQTeX4FJHc4AD1WmqhcCA4970tNcZji6IwpzGF9pA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0090.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:36d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sun, 16 Oct 2022 20:46:56 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f%2]) with mapi id 15.20.5723.033; Sun, 16 Oct 2022 20:46:56 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Oct 2022 22:46:51 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [rSSw3pLNzIT6ZvSeVeF2Y9GGUQ0WU6rAR1gZrhYOmS0=] X-ClientProxiedBy: AM6PR08CA0035.eurprd08.prod.outlook.com (2603:10a6:20b:c0::23) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221016204655.605202-4-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0090:EE_ X-MS-Office365-Filtering-Correlation-Id: ba501718-1e86-4617-cc61-08daafb79026 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKxJXwPqhMYR2wBU/Rw/opxi7KkcgZCik9+6ktqrcv0FfPF+3AB68XETcREqsx6/Phb724c12KacX59RbW4gGWdmaLj8AquhfPqovXtd2st29WrOxGu1ayB+Jp52AW8r4p2iSWQUhXy4PYaE88+ABsz0+tOhFmDPUyH1vfYKhdVrSqY9w0tm271noIV870sC8XoqQ0ghjxICqpk0z2fVc1eEUp0ZzC57Wck9BTkbgZrXE5B04pHnUi92M3cq0MUWzmcx/yw4Y0bCCb/ACfkLSGtIZ214szLDL9/QiaiEShKUwrU9wXe9kKgVrqDaCwRJ4TIHsrn+Nr9/NIx/pdVGHJHvVQWt2YvxbBAf0VL/u4PBM16VxvcBmhK+Ck0VRDTcCMnQgMXldEOTc+XwhXhMO0iY2dn2Sc9xjXYIFZBXL9u2KZkHqVe8PKMb9nGIWhQmA08ndsyZ5DOFwWWiMbHyWAPH49Ha/rP6pbzw9DaLjpYl/jkZAl2KEr6RJsbYxhilyHZyiixT7OjGm6WzfN0n0RAU6DwWNj1rT4lMikA95OluJl5+vLIWMITJmqVvzJyqWZe7T0CVQLWqJ7aC6Ktkn7JYJSm1eimZhyEAYAimCXoUsLjLKL0HhZNKrvvH17LyLpTYvtfJyyNY7cb9aUWX0yM5PRyaPonvnbdoAkU30mjrAfwJza3I2UnpMtihL36JviCkTVTIXU6PLBCejcUVH3B1LBbwqUcRjxo= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ksNqCX/y8OQzJwR2lGWZJ0qjr77eT80ytCQffJtWbt4Y8XLQZyRwopvwjrtacPX+b19Rnw9veqrXzwPkJBaJ/GAXR177baSyWSLcJRCCYm9n5Yr4RX9SK7YVOjAepkeCujEEe7vyhCUTvDOFmx61/K/KjdHCVOiQSKl2nRUv1DlwKSTQpCALoxT6MgfRArEnJ+QdN1EDyB65B0ZGF2P3hnVjvEga8DiFEej+OvqfWBn77L23KAADOSkF5dlYEcrCJYOTVgncvOASJZ3wgIMkUIaPiNekLOHZOQgaWE3ruuL7A292jN93xzJiALJGCZDvN55Q1An2bcHNqpBmxaHNCI6GX6XyTGMXaWyDcH9EExnClxk1TDOhDIO7523daHT11FPQSNjoLTgWMvRAOA4M1j6jDPqPiFNTRCF4z4kvOfgoznrnsgKFHs9X7+YvlvYGBQRa2ymzvB80sbjQqo68AH554Fp+UPxdvqs0GEv/AFgZEpsxY2Cnu1hpDgcZfRsxloL5mbAh+yuLGde/tR2o4HV/qE4mlqc945mPy0FvtQHcws7bw2BeORXYSNIu/x+ZCqJWk3ONxGFmaLFvKIvAr7tEGEwsYPocIgIbVhI9F/s5OP5JeR+KtWOmJLhEYRTPFw+Un0F90ptKt3mQautd4/UEvC/GzfhoWGlQ87dWsc9ZhFSFIHlTDBIHbfoXrTga X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ijPXep/s8WV+74DYND07fihIS1rMLniQ0JP2ZMIxg5U6qlO7NnywsXZYMgvU1BawyZsiHMf/NKo5iVvoI/NxCuor5uivx7Bl+KyYfIZOPicBgs4eimnLB72YKTUQRSjlvSoktGbklhO6rrEyy+eMdIjnmEkLeoILrvzbxx/I7ygj1/MZY658b26GyAF0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VYgYq2TI/kTVo7oohIeK4M9OjHoIgHXlnsRcsgaYJyuC/vUB77I6g1tHoM4ld7Nbu63l59v8LkZVAKxG5Ufn5RX7 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba501718-1e86-4617-cc61-08daafb79026 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 20:46:56.1652 (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: AM8P250MB0090 Subject: [FFmpeg-devel] [PATCH 5/9] avcodec/h261: Use ptrdiff_t for stride 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: 9Hvkq0JgtKDl Signed-off-by: Andreas Rheinhardt --- libavcodec/h261.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/h261.c b/libavcodec/h261.c index 7dfaee7dc4..8e0e13459a 100644 --- a/libavcodec/h261.c +++ b/libavcodec/h261.c @@ -30,9 +30,9 @@ #define IS_FIL(a) ((a) & MB_TYPE_H261_FIL) -static void h261_loop_filter(uint8_t *src, int stride) +static void h261_loop_filter(uint8_t *src, ptrdiff_t stride) { - int x, y, xy, yz; + int x, y; int temp[64]; for (x = 0; x < 8; x++) { @@ -41,8 +41,8 @@ static void h261_loop_filter(uint8_t *src, int stride) } for (y = 1; y < 7; y++) { for (x = 0; x < 8; x++) { - xy = y * stride + x; - yz = y * 8 + x; + ptrdiff_t xy = y * stride + x; + ptrdiff_t yz = y * 8 + x; temp[yz] = src[xy - stride] + 2 * src[xy] + src[xy + stride]; } } @@ -51,8 +51,8 @@ static void h261_loop_filter(uint8_t *src, int stride) src[y * stride] = (temp[y * 8] + 2) >> 2; src[y * stride + 7] = (temp[y * 8 + 7] + 2) >> 2; for (x = 1; x < 7; x++) { - xy = y * stride + x; - yz = y * 8 + x; + ptrdiff_t xy = y * stride + x; + ptrdiff_t yz = y * 8 + x; src[xy] = (temp[yz - 1] + 2 * temp[yz] + temp[yz + 1] + 8) >> 4; } } @@ -61,8 +61,8 @@ static void h261_loop_filter(uint8_t *src, int stride) void ff_h261_loop_filter(MpegEncContext *s) { H261Context *const h = s->private_ctx; - const int linesize = s->linesize; - const int uvlinesize = s->uvlinesize; + const ptrdiff_t linesize = s->linesize; + const ptrdiff_t uvlinesize = s->uvlinesize; uint8_t *dest_y = s->dest[0]; uint8_t *dest_cb = s->dest[1]; uint8_t *dest_cr = s->dest[2]; From patchwork Sun Oct 16 20:46:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38750 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1306388pzb; Sun, 16 Oct 2022 13:47:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4NYbOIh4er3COMYWne1+sgWDEBgNZ1LAMHucmAW4A1cFQ5SxCtsrAo2jKuEhCBrFS7/qoe X-Received: by 2002:a05:6402:3215:b0:45c:97de:b438 with SMTP id g21-20020a056402321500b0045c97deb438mr7456776eda.7.1665953256175; Sun, 16 Oct 2022 13:47:36 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id ht10-20020a170907608a00b0077fb99b8cfcsi7543300ejc.301.2022.10.16.13.47.35; Sun, 16 Oct 2022 13:47:36 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=QXF3U9f3; 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 C465A68BCA2; Sun, 16 Oct 2022 23:47:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075074.outbound.protection.outlook.com [40.92.75.74]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2984568BC73 for ; Sun, 16 Oct 2022 23:47:06 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OyNFbcsZ4iMyqcQgiRWwrWUJ49oNtA0YW9CiBQXXe2ntL01VyD5ZfWT4q1/VytObsabA/3myK5W4kSj6sEHsX/cEGDojBGssHsQ7w6jmvqQMIZHku7L8/EUXkP08aHMZK35X4a9qMkOaQ1tOMWJB/I4wCbB9FDJD0a745B+4wSceaLwfsDy3tOjZkOckHvQO1W7/FVl016A10QemaA07bB7j90WzhAuUM5BQn4hyhPTS9IKO/wJ+o9aq2ESrCPf65BZtj6iA/I6QYwNIaD0xbxAijRUB96Y5T8+rZ8c0dxZ3MTuMNWQvkT0OkcimDD5Z+wLIcJE3wmcv8eiDhmFwcA== 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=7ROdl3W8ervAKhFWo0WHE/wTNxrw8pOsIo/JUg01JYQ=; b=Qci2Jh74nhheIRjtj8ogIBhE2qsjsmpREoMhA3DwcgEjVWa07SKRDLDVRAx/bx9p6IieViCZlmGgG3BGEhHx4elcewYFfeNbU/ULw9ArgEJxIzcEhjJoKf1RlBPoaZLzKxVprm08kBy2+aJiCy9PcZIvOOl/O/aPqJomw5KofvhkpKPGNsa4lV8SDscbVkXM9W8PsnIbMLTbJJwEO27OHKVfHWKAYaYOLN2J4pMkdIAktClg6weY61N+Vyu+XvnnDDm/6fKbnJjEISbj7QoRCVdBrl5DrrbGJy+s3sJXjBA/4d187l42p7pON7xBuHinrw2A+dRjg+F4OsHFCVnCEA== 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=7ROdl3W8ervAKhFWo0WHE/wTNxrw8pOsIo/JUg01JYQ=; b=QXF3U9f3V3kfhFXI49PAXBcADcLxV8YkgWKGONw9rTOx1+FyGlrgI/DNuH9g1QMw3gpRsQ4NL7pZXiqAHadLZeqHFz8cD4PuEuOxF/ecdPloP7CzpnN8y7JFUhWBE48c1QcLcBZI+HBHKxnRc/WTTikGkhXopfjO7kUfEEOJkCiJURIXhOCXmtTMRcidc5brcyAge6C/jcSDUSYTarjZgB6CxphfCiKaIM/tiY1rtiAhKMfpUPLpIBjo5z58eRu1iB/sGzbLfNnmaM9v6CguMq0s1XbEK8a5OBXkIbVdxsCD1RlT5ZcpbPHEVr5wbiNeXDHfCjPb1aXVTQf+wLIAaQ== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0090.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:36d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sun, 16 Oct 2022 20:46:57 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f%2]) with mapi id 15.20.5723.033; Sun, 16 Oct 2022 20:46:57 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Oct 2022 22:46:52 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [tycLFOmImUQDQ4RVuGKxnodhoUjaoP4WJocmTIpZ7a8=] X-ClientProxiedBy: AM6PR08CA0035.eurprd08.prod.outlook.com (2603:10a6:20b:c0::23) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221016204655.605202-5-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0090:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e2f0251-04ca-44f8-fabb-08daafb790fa X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmriMkceEMr8g+y2B+GCHAesFoaKGDW5wEMDBAQEfAM36Vg02a/sMN3qvc5jIQgkHdw5r9oVubiXvucjBQBWGNdzPcFWRfDxlf3p4VwMkeSa/GvebREEFLPBT9mWP91Nh0HawvR36SzPJnItAr/uoerWmlxAZ9I2lHHad/6zYgyeuFC4tgQ5JvxZmxOwdMLNlX5c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7k3vzYBkH7XCfD6/YUJF7rzPtfHk0/VqpIg6apseRcpElufvLZUN4rOeFb9gCBpU44cjMyqUZkZkerDPYfJn26hQ3I6Mn0X6/EmVKUsdwbdGRGrmD7zYxGjLcBfPb7hiq4tjlA+6BeLSNkZJhJ7gbrTuQP+OozGfxi9yco6mp9HcBj32vb9n7GsyiYjfg3atVsUxW2pjrfmjUYUTgNOq7240pEIg+GHeB+aaulrrtMO2Hwo89/z7hvP67l6t7EQwgtsp7e3sQ8QKFgB3evq1ebhFRsnfOHvp2zhvnvpYL1KVqIl61rRp9jd4OKmyQCRDlIbupuaaGDFAgp16adwtvv6OX3ZUuB8GlmaL+e9frBSU2bp7+vP2LdGDgDX/48FWr91mywBtWb7XS5I0760oenrelZxPZS0qbcfkkZcBfOx637NRrFj2GS/3nkGRMBypIEFxKDMvMMVGPLd1z1nFKr3+RPoDb4DB+e/GNTn+FUAY5xx70y7yYG02TeKbcJrAoMjpsLc2eAByzoToNp1B1DvGeQ/HNyQ0VN8S0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e2f0251-04ca-44f8-fabb-08daafb790fa X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 20:46:57.4933 (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: AM8P250MB0090 Subject: [FFmpeg-devel] [PATCH 6/9] avcodec/mpegvideo: Move VIDEO_FORMAT_* defines to mpeg12enc.c 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: lOhUtA6kBjLr Forgotten in f899e3b51bc85c45f54f7ac64abfbde6b2cd7d3d. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12enc.c | 6 ++++++ libavcodec/mpegvideo.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index 01cfd1c1fa..c3df924b64 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -83,6 +83,12 @@ typedef struct MPEG12EncContext { int a53_cc; int seq_disp_ext; int video_format; +#define VIDEO_FORMAT_COMPONENT 0 +#define VIDEO_FORMAT_PAL 1 +#define VIDEO_FORMAT_NTSC 2 +#define VIDEO_FORMAT_SECAM 3 +#define VIDEO_FORMAT_MAC 4 +#define VIDEO_FORMAT_UNSPECIFIED 5 } MPEG12EncContext; #define A53_MAX_CC_COUNT 0x1f diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 1ddf8034aa..daaa7c95b4 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -445,12 +445,6 @@ typedef struct MpegEncContext { int brd_scale; int intra_vlc_format; int alternate_scan; -#define VIDEO_FORMAT_COMPONENT 0 -#define VIDEO_FORMAT_PAL 1 -#define VIDEO_FORMAT_NTSC 2 -#define VIDEO_FORMAT_SECAM 3 -#define VIDEO_FORMAT_MAC 4 -#define VIDEO_FORMAT_UNSPECIFIED 5 int repeat_first_field; int chroma_420_type; int chroma_format; From patchwork Sun Oct 16 20:46:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38753 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1306460pzb; Sun, 16 Oct 2022 13:48:01 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4WTOQOBRRqo8bKT2Wnd1pqtDQBNNLT2uZ5bzi8zOlFFWbKg89LEV8Trlex2tZRdqY28Okc X-Received: by 2002:a17:907:2da7:b0:78e:4ea:dbf7 with SMTP id gt39-20020a1709072da700b0078e04eadbf7mr6091244ejc.616.1665953280887; Sun, 16 Oct 2022 13:48:00 -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 cs10-20020a170906dc8a00b0078b0865d469si4342185ejc.751.2022.10.16.13.48.00; Sun, 16 Oct 2022 13:48:00 -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=VJeEozkp; 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 C4DDF68BCB7; Sun, 16 Oct 2022 23:47:15 +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-db8eur05olkn2047.outbound.protection.outlook.com [40.92.89.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 76F6668BCAA for ; Sun, 16 Oct 2022 23:47:09 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BAwuT+D4vYH865xT61tOMepiPkfRxRgI0oBKrUV8auEpIQBJbzVSgmo/B12CvdYViC7j7K2lQ2Va4uneIdHDqP/20yVFx443hOSQoJe8qadJn4RxSGY8dk6emt51PrRrg/YLHOMDlZJIZrl3dk18LqIF9v+kNGNaA5vvGESNxT8QmodNouT5pfq3SpXKYnkory1aP4YsMUuuoxqleOzYAN0Oyq6dM05TO4RQX9GuiSQDpXKwmtBLVAxDQJS0cnuV/4vZlPzBYNCxkBmCeFTqStL+21w0KPFe0RSzbBFGmLPaughTz5a6zsfej/7bQEmFEvjf/9ojT4Fr6FbrTtXk3A== 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=/W9XNAjXJxOSblMzGHLbosMP6uYPREbasaBZPjHrYsQ=; b=jHSvlKFouNEq7L4TVIkBcg4vsJg6Js5G5tPbA5Fq4g5Pql3/R/QSMJi6RW869dLGwVj37UYr7Ols6pxL4NnkXfEWvsVvFfc5MRB8j3mLEoKvLnlHPkAnmTZf+4fz3iYmaXlNM183nj312JQuqKr3yt0pmptCvCva7fCjzm4f/j/hfb1DlrJep6si1Ucq2hekyxSVXIfwocgqlzp35AqzKJU1oCBC2yZc4VLpt44i8erFY7tqRxielLvg6pSroKPS29eSz2aJT+fzJlooC2kKzrR5fNQw0zzhTcjN5s2Z5IOtYDIT6PMH9EvfAdOuP0M9SF2ICVK5EYY3wNj6gUqzcQ== 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=/W9XNAjXJxOSblMzGHLbosMP6uYPREbasaBZPjHrYsQ=; b=VJeEozkpEhk1xPIPXkeNY8zNsEJN7rVPTFolKwGuYZIVIwe/oCWfEdiE40JdNo+5haFPe271ulBORL+Cv4MpjAtBDn+xUzsFNPE0FNXhu7WqCgYoAQYXkPwJypaYTLrFNlaRwvCbJpPo8onSbTI/l9gS1/2byb16lACOM1nzRZGWTbzV8QyRJMUCEBazLB0jxJzFD41FSaB7PhLs0KLM/xazvF5Syfb4oVQuAAnDqV0cCz2RlFWpJnYAkq+pnNLrwAZIEnPTSrjLGdaArE8fYxP/N+HHLBzZuJSEy7ZmvmXiALqrrsCPUsa4N6uKg0/0cbRxWpXyCWf4SRQjacZ2LA== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0090.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:36d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sun, 16 Oct 2022 20:46:58 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f%2]) with mapi id 15.20.5723.033; Sun, 16 Oct 2022 20:46:58 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Oct 2022 22:46:53 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [DYLzNjbXjzDNgQ+VPuCwT50l4qAXMJnd7a6YS4j5cFE=] X-ClientProxiedBy: AM6PR08CA0035.eurprd08.prod.outlook.com (2603:10a6:20b:c0::23) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221016204655.605202-6-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0090:EE_ X-MS-Office365-Filtering-Correlation-Id: 44026f6f-d21c-4f37-fd4e-08daafb791a8 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmriMkceEMr8g+y2B+GCHAes9PXOR/AtSPJTX/UZ7LsRisFfNulhPaQbJt6U3ZbOPdsBJ1AVvdCiTPV/andAA2pio8EgiwAf0PUIN1Fqg1nls3bUU49Rq5jJsHxAwtXMdA1BUE7JmSGrfKjCVO0yLvU0ezkS7X8NeCHI79UF3TPbeakFahiSBT4N+rmKxLb7ohQ9x5MQQnxQZ9LShF7I0NbGwvaol8VxHCIK6PT+kqMrOxX1oWd5PND1V/r6RJdTsQnQnecRRfXMMrQKA0flKHasSc4IjhPgeMYB6VR0PGxPtnlq48CD1mNdP6Qv/on3BIH2TUItZUM4VTkYT3Pi4DoDkG27p3yzflrhBOOBwplTJ+X1FhFayAQUO2XQF+NdUwWROpbWpKI8ck6ybeQEL1cX5y33dW3sulgfuAs41rvpVhQGBWTxbyuCnkcdh0dkZYL+toZ7o+WKuy0xE3Easg7UjG4q0L03UVke7GwCwchlR7bXotNGtuk9L3NnTUnzJE7Lxw9yRKLwlcsE1qfLF6xY/fu5WVP4XKxrwU7pkpv5Ek6yNb2tuQ2sPtleLMLa1relKdquuMzYeHoP8O9X7ElfqQNX+8zX0R4YRIYLL8V8YaLkJ6Frzy2f7qDjtcaiwZtottyOPXAz0VFNaCMK6eqPn6FKIU3S454OygNu/CElLA+g7lQo4yv9H8e7zNn+aujtFha4Avxb2G8hvJY7hEjL4bcRueP3JnfrUMqnEIcRrLfP8nafJNOGYUuOzoJqGJQ= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: sAK5ZY+Rau9CQPiWeIDPpYT6O5RbT53TepCh0nhafhNr/riZA7RU/8jjYTyyysJL6rZfDfc9bmxYCWZ/0AAy8vUKE2R9IEEu5BDGeV0yOfGMXqV4DvvMG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X6Ljl9c9h3Fq7q1KyYypUHWOudjPklAn5XuzbH6jZTWc8ZBUSsmNgQ88JbsF5hZQyh/r9ZtCjRkGo7mR3U/xzYqgsOt9BIZmmyCh7toHoU+92WoJbu/YDjhyDy+4ZbrJXAJGA0FxsuRD8i8oYWkPg5ORFG/vILYgToWJLVKay6mRtp5lPnG2rJ220sAVuBp+sxVQtEtwHM+lT2tvubYikgMfOpfKI1VFQRzB4ddr2Ks2ZsTYAMvQ77/+ci8EBcZNbzFQBVrB8SS8Xpo2Uz4/QdpLFMy5T/v7S1qPAfAMJfaLq+asIRyFqlgGLAB57aL51lv50+YjzwxbwuIdml/0RgfwosZZdjE1r8nRRitRnQR4Wbxxl9NCBlKw8k4mrXxVC1KLoMMUQtNaUErsU1R3Ck1lbdT+DWY84PZ3VJPxaT3AQaYG6YfLfED4/toDyqcgH6T+rb18ZW4Ts/p5+Y/rP8NOyX15AAonV0FkJtimTszTNOGIl+fHvHUHxU09nKwey2hCKI8r8eHNkjWj762z+NVCjcyICVRU+3MPSBGhzdIWvbTpb9z73dJ0r222kEnFcMp0mxWueWG0eD+ozWHxgtrmAtqjO5faa2DM1B8n1sk8pRFACVS+zMqla3iah/gLGAizaWhxh/M64GJ2EVVah1mAAgODkX5MSJEbjJFGdlGPWadAoCZldNhuVr6ZqXkwfnaSMdGly3/OWrN3DItg0E6r07hEWzuTzoYK6aaquDkiLZvo4G/w1S70kj1XPVcWOhTeL2a0uQ6eOus2lRDITPJnoUBRZQ+9lTb1cwcR1QLeitZK+RwnbkDhxrzMUGFU7Qbecpu6RxP+fCJZX9VW7bbmSYzDBnWV8b/7Hs+DMqPovV6eh1uhcoZyNFYvUn9zLtywK5NTn X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 44026f6f-d21c-4f37-fd4e-08daafb791a8 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 20:46:58.6024 (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: AM8P250MB0090 Subject: [FFmpeg-devel] [PATCH 7/9] avcodec/mpegutils: Return early in ff_draw_horiz_band() 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: oqcM9DgQW8l2 Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegutils.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/libavcodec/mpegutils.c b/libavcodec/mpegutils.c index ff9418232b..afbb16e201 100644 --- a/libavcodec/mpegutils.c +++ b/libavcodec/mpegutils.c @@ -53,9 +53,14 @@ void ff_draw_horiz_band(AVCodecContext *avctx, int y, int h, int picture_structure, int first_field, int low_delay) { - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); - int vshift = desc->log2_chroma_h; const int field_pic = picture_structure != PICT_FRAME; + const AVFrame *src; + int offset[AV_NUM_DATA_POINTERS]; + int i; + + if (!avctx->draw_horiz_band) + return; + if (field_pic) { h <<= 1; y <<= 1; @@ -67,11 +72,6 @@ void ff_draw_horiz_band(AVCodecContext *avctx, !(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) return; - if (avctx->draw_horiz_band) { - const AVFrame *src; - int offset[AV_NUM_DATA_POINTERS]; - int i; - if (cur->pict_type == AV_PICTURE_TYPE_B || low_delay || (avctx->slice_flags & SLICE_FLAG_CODED_ORDER)) src = cur; @@ -86,6 +86,9 @@ void ff_draw_horiz_band(AVCodecContext *avctx, for (i = 0; i < AV_NUM_DATA_POINTERS; i++) offset[i] = 0; } else { + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); + int vshift = desc->log2_chroma_h; + offset[0]= y * src->linesize[0]; offset[1]= offset[2]= (y >> vshift) * src->linesize[1]; @@ -97,7 +100,6 @@ void ff_draw_horiz_band(AVCodecContext *avctx, avctx->draw_horiz_band(avctx, src, offset, y, picture_structure, h); - } } static char get_type_mv_char(int mb_type) From patchwork Sun Oct 16 20:46:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38751 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1306414pzb; Sun, 16 Oct 2022 13:47:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5Xkh3zT2prEVcM+95dlV5hMbQB5IlDTQY3TkoT/oe5oCQNpTvRDgu8vYGNbxaejvX/9mDe X-Received: by 2002:a17:906:30c8:b0:73c:81a9:f8e1 with SMTP id b8-20020a17090630c800b0073c81a9f8e1mr6276730ejb.649.1665953264764; Sun, 16 Oct 2022 13:47:44 -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 dn18-20020a17090794d200b00787b0b0a96esi7248364ejc.131.2022.10.16.13.47.44; Sun, 16 Oct 2022 13:47:44 -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=IDlbIiEz; 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 D9E7868BC90; Sun, 16 Oct 2022 23:47:13 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075074.outbound.protection.outlook.com [40.92.75.74]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5AAC768BC89 for ; Sun, 16 Oct 2022 23:47:11 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n+Srfr3CsNWjYhbUyf8o4SVvK95WFRdnZbU86Uyze2OzMCrdaIIc8Iq1ZwPdkMzzfgxjm387h2FBNYQfuaT+TTHHuTT5b2+UmS4CpclQrFrT1mogUTy+8/eeP8MNuxJRN71XTSfCYKGyhOKvNccVcke2VWbfHx9+0hJ8SxJ68URdXJBXpz1n77Q7p03P87TUgYhZ3MHpW/kI4CUQPaVoFthCrQefES7w9/mbzuh/r/Nc3U8ia3eohIm4gDG88gITGzYWZjRPT/ucd/7FldI2qBGWOiwkNREL88GGGPyz1LPMhCCQL+8jOgfxsM2rzCm4X4qWT/7rzzMBNzey9wedcg== 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=0kKUDBw+pAOXSjC+01JnZYMyMJNON+zEzliBrI2kKAs=; b=NKewO3zeT19jbBwQh9KpPaCxvDnjmh93EHBECppevaiI5916xJE4w8qWyxM78csUgwbJHOe6H3CHdjr1u+hwh87Zr8+hdCmwnV9eZ6MGjk5NyLwX8AxVGYXhLIGlafCdE4vrqaa8EhzgmjRNeYOf5DzUb3tqpHwJy6u998apFlASr3NOtlMp2/xsM6nyHCi3AUqYiJKpHl4EuaiKtVAbjB7ZFw26jnb1YgQhAYfL+dVEnwHSjL+SWJxMUJjdHZEtZxTuv1/89km/9kanvdSNlCbnK/W7o46lSrDrLyVWutZLXFXCG0bK9evFfYcZuSgRHVnmc2fgyVX7xejp7io20Q== 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=0kKUDBw+pAOXSjC+01JnZYMyMJNON+zEzliBrI2kKAs=; b=IDlbIiEzW85aP1IzyBaHPHiKPlVtF2myerj3plmaeXstH1t5+hnKp7h4S8UCMcnfIl0fcTDmIAxFHm2YiClndlE5hHRF2CL/lKY+x7bqwbNWtiU+Wm+CspxKM8XM2J1pygHP1Bguqv/CbQAESLg5d9mjfm7NzZzFZnj1WYfNVqPWkaqLjwCKFfdXckgU4YE5coFw5e9Kj++VB33CNwQE5JDhXo9wgrq7/veZhR7IxH0A6HRWKBM4saNA0aXPB+8E9ZDmUYQt1m9e3xhndXd2W0ti3DupGLM7fQigffI+X3byWh0Nbj0pmVnKG2L6rVST86fJqTrtTZxUrtU489q03g== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0090.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:36d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sun, 16 Oct 2022 20:46:59 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f%2]) with mapi id 15.20.5723.033; Sun, 16 Oct 2022 20:46:59 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Oct 2022 22:46:54 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [KWflVosIwFjQ3FbbeKk2U8pTY7T92XeQ3bScQ7AMJ3M=] X-ClientProxiedBy: AM6PR08CA0035.eurprd08.prod.outlook.com (2603:10a6:20b:c0::23) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221016204655.605202-7-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0090:EE_ X-MS-Office365-Filtering-Correlation-Id: e8e7dbd2-0455-4309-7f8a-08daafb79246 X-MS-Exchange-SLBlob-MailProps: AZnQBsB9XmriMkceEMr8g+y2B+GCHAesLWpIlWrniRv2wXGXkX0p3InHhOqiYR956kj2vUhww1+CUuxb6gE+uz9oCMlFMRTIqDHifEmwBwaaImD2Cp4i8f6/udqLs10KgcrKiAbK2fdNb9JxdlTcW0zv3QfLkiFUBAOhoUKAuomkvPPBYm4WJa5OzegvX32j7uYANbtZRfJuDMqrRsUYl9gNU7NPl2xfB2y1IO73wuZm1jrbR2wbUb2XzoePadqaJSxSqy2R1kx2b/b/haZVvd9Do6VPqUC+4lygAEIpQMp8ZeNdOAVUBevjVG73Xz0gabx7R+w9Les3SjT7NY96zngwhItVdFw2Giiakjvfuqd8pC1YRPNb5UM/mTA6tp6dVcG+wKrTvtDzSHJ7S0MSYi9Uswu0uAKRgtoXJePidm/OOYkEJO5Rze5GIaxOiJ3eP1k82RioQT5O9IYvEjRsQ5VFyr9zM/zdj60vXNMsi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1X2SZc8PGjYBg0bjKx4YpFbpPL7u9deskJYozzearpGgUnNOJABJKvFQBgxD9nZ2naD/HdzlvL/aZYn/KsY4ieVUxiFaY7qHJCb+2ZBhLse29BL5MDBNtqrbJ/2lOmv/CD2n/fpPCmbC/uv89tDWEeX5sQK3To4REAxEJV0Rzm5me5PnTHUpFQ5B4ZJUigixim2SWOgLBX3EP98LBULonX3RBLnUa4ILcZBTcGtrynXdypRB32L/6MuHSsQFXiDwDTwZPm0Re7ZVsZ2/D X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8e7dbd2-0455-4309-7f8a-08daafb79246 X-MS-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 20:46:59.6346 (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: AM8P250MB0090 Subject: [FFmpeg-devel] [PATCH 8/9] avcodec/mpegutils: Reindent after the previous commit X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 3IAnwhyeZY1m Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegutils.c | 51 +++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/libavcodec/mpegutils.c b/libavcodec/mpegutils.c index afbb16e201..36d75b9633 100644 --- a/libavcodec/mpegutils.c +++ b/libavcodec/mpegutils.c @@ -56,7 +56,6 @@ void ff_draw_horiz_band(AVCodecContext *avctx, const int field_pic = picture_structure != PICT_FRAME; const AVFrame *src; int offset[AV_NUM_DATA_POINTERS]; - int i; if (!avctx->draw_horiz_band) return; @@ -72,34 +71,34 @@ void ff_draw_horiz_band(AVCodecContext *avctx, !(avctx->slice_flags & SLICE_FLAG_ALLOW_FIELD)) return; - if (cur->pict_type == AV_PICTURE_TYPE_B || low_delay || - (avctx->slice_flags & SLICE_FLAG_CODED_ORDER)) - src = cur; - else if (last) - src = last; - else - return; + if (cur->pict_type == AV_PICTURE_TYPE_B || low_delay || + (avctx->slice_flags & SLICE_FLAG_CODED_ORDER)) + src = cur; + else if (last) + src = last; + else + return; - if (cur->pict_type == AV_PICTURE_TYPE_B && - picture_structure == PICT_FRAME && - avctx->codec_id != AV_CODEC_ID_SVQ3) { - for (i = 0; i < AV_NUM_DATA_POINTERS; i++) - offset[i] = 0; - } else { - const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); - int vshift = desc->log2_chroma_h; - - offset[0]= y * src->linesize[0]; - offset[1]= - offset[2]= (y >> vshift) * src->linesize[1]; - for (i = 3; i < AV_NUM_DATA_POINTERS; i++) - offset[i] = 0; - } + if (cur->pict_type == AV_PICTURE_TYPE_B && + picture_structure == PICT_FRAME && + avctx->codec_id != AV_CODEC_ID_SVQ3) { + for (int i = 0; i < AV_NUM_DATA_POINTERS; i++) + offset[i] = 0; + } else { + const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(avctx->pix_fmt); + int vshift = desc->log2_chroma_h; + + offset[0] = y * src->linesize[0]; + offset[1] = + offset[2] = (y >> vshift) * src->linesize[1]; + for (int i = 3; i < AV_NUM_DATA_POINTERS; i++) + offset[i] = 0; + } - emms_c(); + emms_c(); - avctx->draw_horiz_band(avctx, src, offset, - y, picture_structure, h); + avctx->draw_horiz_band(avctx, src, offset, + y, picture_structure, h); } static char get_type_mv_char(int mb_type) From patchwork Sun Oct 16 20:46:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 38752 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:4a86:b0:9d:28a3:170e with SMTP id fn6csp1306439pzb; Sun, 16 Oct 2022 13:47:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5m8hwzdOuuL43U37NIdU58YJPyCgArbjk+JTvQwxNEpjXL0I57J6A/aq3zVc9Ys7JP1N4p X-Received: by 2002:a17:906:3852:b0:78d:b3d2:97a9 with SMTP id w18-20020a170906385200b0078db3d297a9mr6015096ejc.565.1665953272924; Sun, 16 Oct 2022 13:47:52 -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 ji15-20020a170907980f00b0078df86528d4si7423961ejc.655.2022.10.16.13.47.52; Sun, 16 Oct 2022 13:47:52 -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=dXAd5UOO; 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 CD0D468BCAA; Sun, 16 Oct 2022 23:47:14 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-oln040092075074.outbound.protection.outlook.com [40.92.75.74]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 762C768BC73 for ; Sun, 16 Oct 2022 23:47:11 +0300 (EEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=k340cg9H6gQj9b0qKvExETIwUxofHlr+xzxQYGdfgfka1okZ4ji8L24Ar+BbulNmO1wQ9ir0v7uV0BDkBcCXH3W3nQDPHIidcUVpy9nWuFJ8eJq3VB3NJmcAl2AnFrD+l0scHa1Mp2ieHraah9ncv0q02kq4sjtb9Dl+lN2o5jnE8k41XzHRAYszoF0NdGWPkQ2RFfwIOJxNwNAXxyQ3pTYXSlW0pKbGLyrOeC5/kILNUxmGClUQIkCU80qoZciBi1lthGWnp7q3RnGMkypwV4/6Ne4Mr3OQnEoq8NNJYpdFWr3OJHGyjLigvrNEZBp8A/yxwM+q+vHNX5elk8H3SQ== 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=LK3W+r+4PHLL4i3+TSKD8lgr1yHU9woQx2hMu58dWlo=; b=exztPhTZkSkqJHNEt3sAIzE/f384686q04OaTdT77mtYU+4vxEgaND8bxsSA8si373QGU5winLCIQWbzW9GwkYF9DGlE6RFTmvgNBaqRkwy7sdZ7GANkOSt3elJZ2jBK8V1Rcvnvad8ulbZjB0VFoBaUD5+PPokzzlsHCx0saQ3WWzkZ8bek8fRzmXI9LV1WZaaO4IL9h7vjLekBzqdvfU1JOQLjA93ve7FDdGJLmDsJ/K+Th+JM2SkNRqh7YEgXZuYi/telXBYQL063vKyQwJQkzAnoEO7aN67+TKXWGSf4RIZUwo2xjBKbOAd5hssQwDSpm4GG2bfrkDgKprzYFA== 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=LK3W+r+4PHLL4i3+TSKD8lgr1yHU9woQx2hMu58dWlo=; b=dXAd5UOOOreVXHTxfA+DKvbSuLepDm+53DcXxj4Q0x+17dLSyt/rVu5E+BGRX/OGPZUCoWVs/lubfp6se4z4uKEjfBfJP1KTdlzJqhFSQ1hb6Eciz9/jx4epPRx9MjN5IrKghaa7sI7pKZZld4VDdEWRDb0p4+UeOb8Gp/nLLVMdXJG/ZmkVoN0zvogPJ62h+qfU6Sz7ge9+QECZzdOyIeXFIgSJ8mGTAY1WknA5U12mc5j+PAqxcC/dtQl8mpg6kRRhNBROkVrK7t+mDSEPmJbk8dqRgnnqFeRwLbpAxszx65XEPBu6FS6PIF9C9InhmwJuDArY5YhXtbSth7Xdww== Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) by AM8P250MB0090.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:36d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.26; Sun, 16 Oct 2022 20:47:00 +0000 Received: from GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f]) by GV1P250MB0737.EURP250.PROD.OUTLOOK.COM ([fe80::20c0:9c9e:87f:79f%2]) with mapi id 15.20.5723.033; Sun, 16 Oct 2022 20:47:00 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 16 Oct 2022 22:46:55 +0200 Message-ID: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: X-TMN: [Qt/VZIALVR74MmjPu/JBXh2CJAJblzIda/0GXTvbsuM=] X-ClientProxiedBy: AM6PR08CA0035.eurprd08.prod.outlook.com (2603:10a6:20b:c0::23) To GV1P250MB0737.EURP250.PROD.OUTLOOK.COM (2603:10a6:150:8e::17) X-Microsoft-Original-Message-ID: <20221016204655.605202-8-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: GV1P250MB0737:EE_|AM8P250MB0090:EE_ X-MS-Office365-Filtering-Correlation-Id: f93600b3-5f0f-44d8-8219-08daafb792f4 X-MS-Exchange-SLBlob-MailProps: EgT5Wr3QDKxJXwPqhMYR2wBU/Rw/opxiBZwWdwzCd8LlpkmdUgxxadOfvg6wXmcjCgiZI/uHQCYOJBhWg4aOXNJq++gt426GPNj3Wvb7YjM2uYBc9pmFpah3cC8cf0CuNC8Md2BGKRCndcTGlAfj3V20Y/pBXtvBAGi82dRrfbBbXG2MrgGAzMDB77oxjCM5XRNg0hdYaw7WiexmhVJkQJuOUXRhH5Mpk7ljF54C6r9H2/MU4MeJHIN1ka87ajdwLI8baPwCXyXVDFYFqjh2WhK86GF6RQKVQ4JHcPB44UjfmeOjkYwVvRRyR1NPvbCTe/XVD41KZK66+abL3XZKi45jhikrTJ5QVOaDE5n5fCn3ddFzjJNnXtkoB30hsN6+uF/gbNCC72IfQISasoDnvhr/qixKlB5hg6/44ZISIyh99GqjPmVmiqRLVC5qTSefYHXTu60sxXWJv4K/Qjb4mTin3tb+Yq3Bwmbr78nl0CH7AKBAxIkR+8Pn4Hd1Liz9eAzyVq7FBCuy3PVyOXOwCuCf6Ylu2Vs5d8kVpaUdJCJ7zB0IWXL44hdlM4TudZ3v0kmH3uqbZ4/V0uTRixIpNvXMvq6kGwU02HKdrnEWmo9bxkd+rBGQBibjvoB54ER61sY1upghBoPEggaqwU0xjaPlTNoPH4kgqWr/+N/flHq9n85SCC91dw6g63pLzhKsOazKOfIgpTAczFASThpQYK4yIel+9mKkBJY1KbgOgSQ= X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: F70k8+Ba3mU7zCviMssumNpVmSvn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S-Exchange-CrossTenant-AuthSource: GV1P250MB0737.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 20:47:00.7750 (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: AM8P250MB0090 Subject: [FFmpeg-devel] [PATCH 9/9] avcodec/ffv1: Move ffv1_template.c inclusion to dec/enc templates 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: o/Ta58tlRUBw Both the FFV1 decoder and encoder use a template of their own to generate code multiple times. They also use a common template, used by both decoder and encoder templates which is currently instantiated in ffv1.h (and therefore also in ffv1.c, which doesn't need it at all). All these templates have the prerequisite that two macros are defined, namely RENAME() and TYPE. The codec-specific templates call the functions generated via the common template via the RENAME() macro and therefore the macros used for the common template must coincide with the macros used for the codec-specific templates. But then it is better to not instantiate the common template in ffv1.h, but in the codec specific templates. Signed-off-by: Andreas Rheinhardt --- libavcodec/ffv1.h | 12 ------------ libavcodec/ffv1dec_template.c | 2 ++ libavcodec/ffv1enc_template.c | 2 ++ 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index 3532815501..005f308784 100644 --- a/libavcodec/ffv1.h +++ b/libavcodec/ffv1.h @@ -182,16 +182,4 @@ static inline void update_vlc_state(VlcState *const state, const int v) state->count = count; } -#define TYPE int16_t -#define RENAME(name) name -#include "ffv1_template.c" -#undef TYPE -#undef RENAME - -#define TYPE int32_t -#define RENAME(name) name ## 32 -#include "ffv1_template.c" -#undef TYPE -#undef RENAME - #endif /* AVCODEC_FFV1_H */ diff --git a/libavcodec/ffv1dec_template.c b/libavcodec/ffv1dec_template.c index 9b1d65e825..590ccac022 100644 --- a/libavcodec/ffv1dec_template.c +++ b/libavcodec/ffv1dec_template.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "ffv1_template.c" + static av_always_inline int RENAME(decode_line)(FFV1Context *s, int w, TYPE *sample[2], int plane_index, int bits) diff --git a/libavcodec/ffv1enc_template.c b/libavcodec/ffv1enc_template.c index 8a4a387923..8953dbe07c 100644 --- a/libavcodec/ffv1enc_template.c +++ b/libavcodec/ffv1enc_template.c @@ -20,6 +20,8 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include "ffv1_template.c" + static av_always_inline int RENAME(encode_line)(FFV1Context *s, int w, TYPE *sample[3], int plane_index, int bits)