From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 5B57940C9E for ; Thu, 30 Dec 2021 00:29:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 889D568A7BB; Thu, 30 Dec 2021 02:29:14 +0200 (EET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11olkn2082.outbound.protection.outlook.com [40.92.18.82]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 75180689D48 for ; Thu, 30 Dec 2021 02:29:07 +0200 (EET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DYau3aXoW8bt5T8mvdU3JZzrqNr0ZCepJDJQU03a0cyRxcgYNTjmABaNUJpX+g9a1A3cOtixyVAlvTKK+OwvXDlltOIqat6kdYTKbaYCqg262n3wnn0uOqAA6VOegZP99zcYhiPnYnP3sQOBFnPPVPR69DocatEPfhG62AjIaV8rHuWKGoYxzxl9Gtad9YTaEld2+BfL1+yZ8BVcBDQpKidbOyo0gOGhijkCdHCK1PLrUjKSU5d5az0tHRw16bpml/QSg2FMKg5cdXvcoETTDpbQ2y8UBiEr9oeJnPC2SWHtfVYE2c5B7KtovFNm/d9vacmiaS41FnFnjBWUqhQ5BQ== 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=h2IN4tL05agAPQqAdBjqHaY/mLBMr3d5b+xuaczrTjE=; b=RXq6Dgm7+bsAhPG3VJpjUQY9bntgcz8TDKt+baZNEu0dhKtXUeC3XyRoQ2qwKPcb0RcaxDFfaIT9u3qx/Mt+IWEYMV/LFtAwJUxTYn1yHGN3eMkW1oASbGN68bbozNslQOf0opvvrVf2HcewrwBF3EKSv+Z5NOpPJPnR7IDkv21avjbwmegUKVvGp3IATsDsve2E/qnBOFOJw1VebUXBal79efyHQEVHCKWdF1ku77vqnggDRme8wJ0Fxxvt+5PXIV4+A62Mm47ZI+aRUKxLPf8Mq2mG86Z6mpIOsH9zIqkHjB7s0ibshsCdqEyKrj05Ujh5KHrf7uaHexiGJNvzmA== 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=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h2IN4tL05agAPQqAdBjqHaY/mLBMr3d5b+xuaczrTjE=; b=dygaEiSidiWFRe9oKoo4OaMFHSZsTu3p5HEUacLlGblkEQ25gHIHq8ilH/bB6KvSC8yqtv2ZZrdWES4Krp/2T5OMoye7DiMg4CiLClGkyTK0ziakdaArqvOCm8SZdIK3u3eWMeZTw2e1Wapvw9y+C9MPWyz/VVhxNGxodVVxjkp3v/D46PpPkqySJDzmYRuylH17ksRr2yK31nVsnFQ3LeWP2JpTZUklHaVI6AW6bDdjldHjlD6FG2ScSddpKIm2aoI/Bf6XYp8eqW7Z7u5LsRLhu1XBSzLVEH5L2YBWXsyqt00FK6y2rZlpaAcpjyzsmCZdTcMFXSFj6NPshqgvYQ== Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM (2603:10b6:8:b::20) by DM8P223MB0112.NAMP223.PROD.OUTLOOK.COM (2603:10b6:8:5::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4844.13; Thu, 30 Dec 2021 00:29:04 +0000 Received: from DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM ([fe80::54ae:66eb:e304:96d6]) by DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM ([fe80::54ae:66eb:e304:96d6%5]) with mapi id 15.20.4844.014; Thu, 30 Dec 2021 00:29:04 +0000 From: Soft Works To: FFmpeg development discussions and patches Thread-Topic: [FFmpeg-devel] [PATCH v4 1/1] avutils/hwcontext: When deriving a hwdevice, search for existing device in both directions Thread-Index: AQGnQV+GaP/9mUjFEoNhMBDgx+itSwJHT6uBrJlTkwCAAAIsQA== Date: Thu, 30 Dec 2021 00:29:04 +0000 Message-ID: References: <0d168258-b2d3-f60e-87af-28b01e809038@jkqxz.net> In-Reply-To: <0d168258-b2d3-f60e-87af-28b01e809038@jkqxz.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-tmn: [O+ZOpBxKlAmLARBdi6EfUoC/fKeaJx5S] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9a39008a-2391-4f58-eac0-08d9cb2b629b x-ms-traffictypediagnostic: DM8P223MB0112:EE_ x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7nzM2gA2rwzhzYWDAqstB+H3pMUO10emSUtpIXY8S6Xisv7KjSD4dZZ6enpd6H3NVg1GaRWSMkB38LonuR00W4ITblQZh4JNQK2e5okbqFKqBUjuOzlovbPQDkqqsydR70aeESxanRZ23d7rW9tEfCExs8VNK09wr9Ru/38GxOygf6JRWVBhNVKgpxlQ88gSWHfnRom7ntjzIZzYu9Msj1nvSRtEGooO2K8D1pMFoUIxhYop8+9X3BdbqGMWhaXPpkg/MpaTiywN17zwg4y23DVGCA3qKX39cRmSJ7Cj/zcMGxaX1Ee/SPHPtnoYkqraeb/GDYQTwb3wO3v24p/3CuOI7ghlMDW1V9WyR5thzh3Ui5PLD1YZrHkqXYpG390LXoo7g9sJTCoOsK3NEWH3FWtqjnVCQRc4AWu5zsIC/ZemU2jHrYwYugQePVt3R41+wL9Gh36FLfTFMKIFjS+zmt5yGiweKeg31+379ypIUSYrrUdtxpXOaYJJVe5m9nzJrjAVrnjVa5/aSM9z0xebZvci6z51k1qo89P1ST/koiIeSJOelnk10zWAGpbu5AGzTrMYNIT4atDwazKRHsuxJw== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: 45guX3ZcYhZ7N5pTpxtbcYRobZRRRXsNOoR0ChrBEatRHxG/OLUodt4J6TXbM/G6zZbxVVJcWgMicAbaAJYjJNH/Jkd63zF/i2UZ7IrQ/PY406wltDWB55Bd0Cov53HwFqMxYHtg/N4xuwrxwfSpbFXJqHCmlTPgxWWTnQHDsImNhCNiKeL3dFKLZn8leXexO8w5oAjf5COExyd1raDFYxkbfrE70sbpMAatzxBokc2UMW5phCbqdbvle8RiLOliHGCMRy8uZxrC39FwiUq0y2NL0x6b0ehS8H3orJnLEq7TfIuCW00r06eRkk/I2A1tPHQObrLF4o/Ctfjf+zvyJGhHHxz2VGR4/cCw+xfziaDIUMoCjX2WIErgAI65u7uvGVCg9AApEig38m9H8cfbZ4ASCv83z1hn+XF50S+9heI/6j7E+UddDs9a4BkuVvIC4DLNayymukAC0YIrrVBgzQ+Naq+46LdOwQnkDkFDN78a5lyRsrIkXwuSODZUh9ftkukU5AIDLcbaMYm9DrtVr+E+DXVgIA63Sp/1P+//tulNSuuWsjmz2jmhSEbg6FDnJhwTUTrmxmfv4tgqx4iVxrhrkZ9Q39bEWyjbUtNst8VyMQ6bV06SxjSYAaU1UfluXfpTOwtnahntRlyUvLzouf3+rjxRZ0bwnJRVg1CLTmpzCXDAP4mhWfYoyy7w5F1GefTCHILDAKccq9e8qyzHiNoV4YvlZBuEvtA0D1hFLuQhHdqBYcPqDm9tOT59RYkutNtvZjHhYfFyrNEsU9OugJ+IGKRr9ZH+ORzlkoCI+d82rJFUVYb6d2s6qQKOsYNEGmpMVootM+X6Sno4j/ePNEig1RL5cdJDn+TnSyeI/QqGAvTurXqlAQCIREke6/vFs0ASooOuyPSY+wXZbVaOlusSEvC8sn9aAZSLh8mtG4BJVXPVRLzGK8RasRN1p6EU MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-1ff67.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8P223MB0365.NAMP223.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 9a39008a-2391-4f58-eac0-08d9cb2b629b X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Dec 2021 00:29:04.7585 (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: DM8P223MB0112 Subject: Re: [FFmpeg-devel] [PATCH v4 1/1] avutils/hwcontext: When deriving a hwdevice, search for existing device in both directions 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: > -----Original Message----- > From: ffmpeg-devel On Behalf Of Mark > Thompson > Sent: Thursday, December 30, 2021 12:04 AM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v4 1/1] avutils/hwcontext: When deriving a > hwdevice, search for existing device in both directions > > On 25/11/2021 02:41, Soft Works wrote: > > The test /libavutil/tests/hwdevice checks that when deriving a device > > from a source device and then deriving back to the type of the source > > device, the result is matching the original source device, i.e. the > > derivation mechanism doesn't create a new device in this case. > > > > Previously, this test was usually passed, but only due to two different > > kind of flaws: > > > > 1. The test covers only a single level of derivation (and back) > > > > It derives device Y from device X and then Y back to the type of X and > > checks whether the result matches X. > > > > What it doesn't check for, are longer chains of derivation like: > > > > CUDA1 > OpenCL2 > CUDA3 and then back to OpenCL4 > > > > In that case, the second derivation returns the first device (CUDA3 == > > CUDA1), but when deriving OpenCL4, hwcontext.c was creating a new > > OpenCL4 context instead of returning OpenCL2, because there was no link > > from CUDA1 to OpenCL2 (only backwards from OpenCL2 to CUDA1) > > Yes, this is exactly what I expect. > > Because of how these APIs work, device derivation is always one-way - you can > make an OpenCL device from a D3D11 one, but not the other direction. I don't > think there is any case which allows both directions hwmap=reverse=1 > Saying that derivation from A should always return the same B is not > intended, nor do I think it should be. Why not? Looking at the reality of API users: - I'm covering a wide range of different processing pipelines and found that this behavior is crucial to make important and relevant processing pipelines work - Intel have three different workaround-patches in their backlog/queue of ffmpeg patches to get certain processing setups working - The developers working on Vulkan have confirmed that this change is necessary and crucial for certain setups to work - Nobody has named any case or scenario that would be negatively affected by this change Given that situation, I don't think it's useful to talk about theoretical implications. Kind regards, softworkz _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".