From patchwork Sun Feb 11 16:19:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 46182 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:9002:b0:19e:cdac:8cce with SMTP id d2csp250676pzc; Sun, 11 Feb 2024 08:17:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IENx3vMYb0w9Rn/Xlr3jqhiUpCnf3eLB2u4KIp+vgN/aI20GJZXxv8TSqKV1D+xiAWnmh3w X-Received: by 2002:a50:fa90:0:b0:55f:6b8:b2f7 with SMTP id w16-20020a50fa90000000b0055f06b8b2f7mr2925949edr.8.1707668251974; Sun, 11 Feb 2024 08:17:31 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVc73QPgoqUbMyAOH7a/JJ9FnsB2zcwgQ42BNE+m73NSWvWyh2pzlPhzOoS3qAQGG4vdKhWcnDyYDfX8IId/8/VT/1TlDSEh7zvq9huHC0Z9KYUP0DPa6TIxV0KTZFST3Dpz8DSAw6D1R6r7ONeqHjYFSFAZdTo5nL3LxPNJjqlT201cRBDPW2wU/TJtqcmHqyWIgUP3aXEQQrCTUT/H918YhtvbwVt6ER4IB3mQsqnlRFQ+hp+uGnO40W4GqEqsPu4bkbv37rpMylv2Oi0eI36fWnR5a2RkvnQxp7FaCWZH9uAN9QP+Vv0t8NIlIhCi2dH8ocdlI1lEiFkKv957YaZPNeLQ0JutW47tAf/MwjOWeOKCABvSaPcWxcwYOyJpiPF7ZVPDTITYhYUuCzVl3Dz7h6VAEyWP87HR+eeAVti0w0smp4m8FV/chKydwgUAhprhAwhysyMpcXRHHwhWF2JHecweB49tqy5c/JfSFgD664xJWTJlR0tkdqR/MLM0Tix0VgupwoaCl+rR57ydnSbLUxx/Pm9+OmIMiqFN43bObOquidyldVKSePAyffN93MrZYsEOa2g7h6gRzfTQ95OkUQn922/FiLPb4RgyfjnCL/lBISbLEpHGOfrfdfyULp0fQHSaNGiSPtuxl1D2k7y8Me7NCw6NDYJ4hlc5DnZJdTPa4dwUTjoaW6UkHzAMZI+zadrMILejRi+qcWGqSc340ZmkNl9/xyOJ6vK0Oj0yvC116XJmUtJ6/AUBKIgV5wanKFnR0+r/MGwLUCHWzDFTTDH4R2dWA1GY3k1fhV433McihkTvEssqhlwLsMCfvZWmwhZ9pDlEdXob51hEaktK4JbTzSFV63+v6oKYfyvkRUr1WX5mhlrv2PtTAnMsR1lZLyCia8C6NLNoSUcs+YOz/iKtaUe7e3nt4krsDRqEqg3l6120Po0t7EYNMQ+Fol0xP SfEjJ/0MqZJTegz0m9TXxBHAP94LI+J2X5LiaGWmIOifDiugY0Z4tK9zfKfhXU8hWUE44QkL8EayKnO29s+ZkA2GEnt47268IJYgrDLgXRUMxjyARv7UmOHq79F2oyqOOEQ84+HQBX3vrx12WZmN1mSe0+6jQJrVVuYLNWyrJj9IH29p8uirH6YFNzmSAPZlbJm95hG2V6uB/krV7ShQrjlHc9/fmLCV/e9/7W1791+4y8mVUkGJEhtYRoLttDvU+p/bWmZCfFSKKp7uIJevHl0p2w+6PSWEMZGUuyNSzQonBUfbO/IX1D+3+ezX2cd4f0EPRaxxEiIu70Au+VGVmq1ptvc3sGtNyzLfO73X26D0C1HSG3hHVIZo4rwyDREMYd1oM8n3gCA97AM9STgc2TboXX2+mYj8UOI+yLK8GL4x9AqSOV/M75eIB90GixzGFob+jNUax5R+nTPhK+hgpZqqucHK8xMOXpnvawqWOvU3Fo2nGUDD7A7E8kUyYz9TxLuv97m0wQ4j2onfSAq10A2CGhe7PfaucBAQrD/xgCS27eSwEh3erJO80f6UhGRbJsuTuUoefk742XSzhaVJvva6hCXXm4SlOA Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id k2-20020aa7d8c2000000b0055f009a3b1asi1855238eds.627.2024.02.11.08.17.31; Sun, 11 Feb 2024 08:17:31 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@outlook.com header.s=selector1 header.b=PPvY+pXB; 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 73A4E68D0DD; Sun, 11 Feb 2024 18:17:27 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05olkn2075.outbound.protection.outlook.com [40.92.89.75]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DE78C68D091 for ; Sun, 11 Feb 2024 18:17:20 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=llJOCIku6gz+2tYMtAojyH/77AXmPHUsIwW4J1G1MSxF6dyiXCB8xkzIOWY0jp8eZGupWZ1uGSOOWUgZY+2Nqe0Gmb2mP0b6QO6l5BB9NxOks+cwF2uL9EFeWVyfWsv5GK0jx54CqzhEPPvP2YIs2KMC3NJPcXDbbw/Bd2DDHKvWUTRo+y5/9L24HrLOjoFVU7VXMlWsBntXG3yzsTIXapFTViLCfqrozt2DvpHlEiFShuWLxTCb1Cq4umzfBZIs3cK8yLrRj5X4Dbit5HkHjGPd0oXheAINY4UXMt5W20TsmLDlEq5Zk4DhDyaOYrBFsvjsLfStUSXhDPHKLe8YCA== 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=baX2WwXWWZvFzsGeQqFUHgZjsOfws2P/dqyWYQTdSy4=; b=jEzEFYri5cKrm5oVDj8IRG4aYuLJ/aUvDRccAEjMJ2sX1cKcsJGVNcyzkHmDl9mrlgeX86TbCVeMfra58ExFQRsMvnbJSbo/GQ4UbNTQrRk9Z6F6k9RbvPjhKu58LiGS6Gj1C3DhanTttDTvZ8ezQ34d3Ip1zpoqjej3E9XmFZb3Or5tM5kpXt3No/ARAbUqu7H6Eu4K1eJvVJkD4os5BT6qjC1y5sXL933R/aWcJ7/2yrKoAc6myG9KANsVcQgvRUeBhfh7F5f2TOby8hsGk0egcRWTog2stsyDWbhvpOZVi9BKjE4Or9bQnS7gxSQe2WxCBOOV+5M2Zi+ApziCiA== 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=baX2WwXWWZvFzsGeQqFUHgZjsOfws2P/dqyWYQTdSy4=; b=PPvY+pXB8/RZ9BQ0L3Nxo4PgYai95j5iv4AMN2GlirRTYm677WI7rz/0tpBAPpMpCHdDD27PDRmxijhMAd0Q/fpvFP5XVxDPd9stgttqoReAcUGCkXIgqpu/IstDKENJp2kOPOivx/hSrNdN7n+kq7MwpmitMAlhtOZdnOeMjBcTCFrDgfo+MnBKDfzrXTBJ+8rX7NRrx7ABx+ngWaeOt4j/BFZ+D+SWT4ne5Yskhq3B6ERs8WuAHr3cESZ23XogFC5CdHiX05k7DCbSDHzaszIIyVZd33MKSrtmBBDS76qPBukObIIDVfxFtLP7MJll02CNPAv4Xh7we5SazQ867Q== Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) by DU2P250MB0317.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:27a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.37; Sun, 11 Feb 2024 16:17:18 +0000 Received: from AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::65aa:deb0:a18e:d48d]) by AS8P250MB0744.EURP250.PROD.OUTLOOK.COM ([fe80::65aa:deb0:a18e:d48d%5]) with mapi id 15.20.7270.033; Sun, 11 Feb 2024 16:17:18 +0000 From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sun, 11 Feb 2024 17:19:06 +0100 Message-ID: X-Mailer: git-send-email 2.34.1 X-TMN: [AyZbgPZJKFrhqG2HQ+q1O0CsJEa7ndYegn3oHBYI9/8=] X-ClientProxiedBy: ZRAP278CA0004.CHEP278.PROD.OUTLOOK.COM (2603:10a6:910:10::14) To AS8P250MB0744.EURP250.PROD.OUTLOOK.COM (2603:10a6:20b:541::14) X-Microsoft-Original-Message-ID: <20240211161906.3643245-1-andreas.rheinhardt@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P250MB0744:EE_|DU2P250MB0317:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ca9a766-e354-45bf-2fee-08dc2b1ceb38 X-MS-Exchange-SLBlob-MailProps: Cq7lScuPrnqwZHg0HfSFdjBH+qQmcHAPJ3o4B1gGYkngIkB3W8zpoAPAYX2cvza8gOuVSWYo2ynKBQu43iP1nGHiZ4iRRNn78rHIaA7lCeLezujeYTixcOQ1kIoEBJXlY6dE8/d9Ln4JvyukCsqpEJUfsT1Eb2ILUGqiWfvZ7jjt5UbI7gm6Y6z+SDXwCRIq3Lg7CAkgvg79CjZrX0Tt/Kdhn3jklbiBjsOiqqeea27d8Sf6JA34XI7Mi1OuH/44nHy2DlMBgkPzoqhpFK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8XZwEc74BEQ8O1fzz5djTR6652Ky3MbFQC8o0u0akNP+ycUqJx0dp9CVjCcbgI1fz2hgxoze2zOQjBgA1HB+cePbmX7qVRB12cgcXIypF905p+CEUjIySqe4G6gwPGDudVTWYKNPaG4ML/DFU/tYTO+8Q4TrLi3wfO4RgfZj7fnIvFgwbiuc4twioLKpuzr6G8d+flXna7qR5N1Xs+w+DxmuVIQz208D6IEj3oHKgt/EEvOar3fpoU8ZOHPypxNoiFkZTl1gL2xp4Qkg27NunH1MFhrIA3oq2zjru7Y1lV5bTtoQFvxOp9rzMLDOIhXZ6tCGWEgiBkYxChaS4oEDctLK4XB+DSujW3CfMPzxI4SE0ySv0sfdbA7gPofHU6ZzXo2adVk7k+0lvXTQ== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3ca9a766-e354-45bf-2fee-08dc2b1ceb38 X-MS-Exchange-CrossTenant-AuthSource: AS8P250MB0744.EURP250.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Feb 2024 16:17:18.7070 (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: DU2P250MB0317 Subject: [FFmpeg-devel] [PATCH] avutil/hwcontext_opencl: Use proper OpenCLFramesContext 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: 4L6nVP1S+/x2 The currently used pointer when unmapping DXVA2 and D3D11 actually points to an OpenCLDeviceContext. Signed-off-by: Andreas Rheinhardt --- Untested. Both of these structures have command queues at the start which is probably why this seems to work. libavutil/hwcontext_opencl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c index 247834aaf6..c1764ed098 100644 --- a/libavutil/hwcontext_opencl.c +++ b/libavutil/hwcontext_opencl.c @@ -2346,7 +2346,7 @@ static void opencl_unmap_from_dxva2(AVHWFramesContext *dst_fc, { AVOpenCLFrameDescriptor *desc = hwmap->priv; OpenCLDeviceContext *device_priv = dst_fc->device_ctx->internal->priv; - OpenCLFramesContext *frames_priv = dst_fc->device_ctx->internal->priv; + OpenCLFramesContext *frames_priv = dst_fc->internal->priv; cl_event event; cl_int cle; @@ -2511,7 +2511,7 @@ static void opencl_unmap_from_d3d11(AVHWFramesContext *dst_fc, { AVOpenCLFrameDescriptor *desc = hwmap->priv; OpenCLDeviceContext *device_priv = dst_fc->device_ctx->internal->priv; - OpenCLFramesContext *frames_priv = dst_fc->device_ctx->internal->priv; + OpenCLFramesContext *frames_priv = dst_fc->internal->priv; cl_event event; cl_int cle;