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 D72594284F for ; Thu, 5 May 2022 09:50:46 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6C39568B3AD; Thu, 5 May 2022 12:50:43 +0300 (EEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B63E268B072 for ; Thu, 5 May 2022 12:50:35 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651744241; x=1683280241; h=from:to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version; bh=L4RstRPfp1EXbP6frpVXeIoq/u7WY+FfKRJNGwCKfKs=; b=OQh1XPqLlPIzGEwneFgV8ICDHsJzT5+tVCucuxumq8Lh3KRoIoHQBgyG lNCBoOomWVadcCzqGhJ4X6jpIoqgl2ALqIs3D9AD6XJ+E+G0LIPiAJxkB Zk+HSbRkRj20kvILIl6W8IuvH2z0JeKJWigsMEXpO/1DLtUQw6lYuYMWd 9i+FItnICSaUnoMjFTbYO24SpzYlTtFTXOCAFlX3zjv7Q0w032TxAx+Oa 7CtdO2DFXiYiXiTSBmfyg46mr+IJMo03OC/t4yKRypEvNe1OWan4K9Z/C 8cGJr7XRAZHQajGD0CuvP94rnEpGtoxxsqgm/beuUNuQkjFeAM4msqI4V A==; X-IronPort-AV: E=McAfee;i="6400,9594,10337"; a="267655364" X-IronPort-AV: E=Sophos;i="5.91,200,1647327600"; d="scan'208";a="267655364" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 May 2022 02:50:31 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,200,1647327600"; d="scan'208";a="891262948" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga005.fm.intel.com with ESMTP; 05 May 2022 02:50:31 -0700 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX604.amr.corp.intel.com (10.22.229.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 5 May 2022 02:50:31 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 5 May 2022 02:50:31 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 5 May 2022 02:50:30 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y8ioPBEXXdzJv91RWaXfytUthsTE0T9IgpsndeipZZwSJQqQfOwkKvNFuXhpJxmTloiod3YolkNGanqPXE1adgMiWYdSelwaFZ/K+4hAP9SJdXx4tKLgejiAC2/SDiOK3MN8PT79WQiQDjMk/I4NCh1Qb3dRCyYRQkKtKaAaf6B0MKBx4S0A9597+TPPzVzjrvTPMzsTGVCoR0a4s6DMDGVAJhTQjYAS0sUtVsaRkmwbfb9y2jHa6d4q5k72HwxNuWfufYVYkuVygj5Ti6nW3uBxDY+Y7WsVVC0tkKU1iahRIys72pL/30aUTa32brtjYEDg0Hl4g/c8wlzvZOg2vg== 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=RZHrbuBU0FND4k9j5zHp50XKU/Uf/AyQAsFn7mybUnw=; b=Mqo0EKT2JBndsPAx93VguCRt5zCUumozcKOngHxeE1U47eq2UQnN1kiDOI94ebXik8JJ4dZeIGwOJFuTpCptoO23DjQOZGBcEbk38/LfSHgMgMID7e39LQOsQ7TJD1/Vl8CQK6Hzl/XwqpKX8fy2IKivole/MeJJx3TaOrQ7yXuslwBJjh1mQE7vTZKUINOWy4yfE9eLncwFQunlvMnhis1co27j272wyIyuHBwZNoB6xfyIZqTPgB94UjQIsPScYf6U/I/C7uu4b9P/Q7fW0J/rjjk6oS7NGXszGo+Xnm8F6RoqKcETT35TtibZQgAbbhAJW6jtZggyTjsJrqW33g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from SN6PR11MB2990.namprd11.prod.outlook.com (2603:10b6:805:cf::21) by MWHPR11MB1695.namprd11.prod.outlook.com (2603:10b6:300:22::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.20; Thu, 5 May 2022 09:50:29 +0000 Received: from SN6PR11MB2990.namprd11.prod.outlook.com ([fe80::803f:b151:703f:f8fd]) by SN6PR11MB2990.namprd11.prod.outlook.com ([fe80::803f:b151:703f:f8fd%3]) with mapi id 15.20.5206.027; Thu, 5 May 2022 09:50:29 +0000 From: "Wu, Tong1" To: FFmpeg development discussions and patches Thread-Topic: [FFmpeg-devel] [PATCH v2 1/5] avutil/hwcontext_d3d11va: fix the uninitialized texture bindflag Thread-Index: AQHYW7ZA/7sjOvj+c02qH/snbRSHb60HcgaAgAELs4CAAO7qgIAADzeAgACyk4CAAAFkAIAA98gAgATp26A= Date: Thu, 5 May 2022 09:50:29 +0000 Message-ID: References: <20220429104505.1747-1-tong1.wu@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.401.20 dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: a08710eb-e337-41a7-66ba-08da2e7cb068 x-ms-traffictypediagnostic: MWHPR11MB1695:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fzBUf5Yr7q2zcXZSb7aMqdvnfLg0d8ZYNaDUou6WW+WM2JUPfYp1O5Fn/lqFoNDX/YXse9nRbYvUre5qNisARAE862/Vi9490Cv1Io+/RxHsiabW6SrDY1Dahh9N3zUoriQ/azArkTp1fWBryxCsrPNF7+LMdz79PUOjsxQngWUxxX9/sKzYt7zfAhJRFLoCCpYiRuGveA1iomlCtUfUxrSPUUpM+OIfehmWV6ynXL1s0v1PaMieL84Xc5lUXQPOIvy3WCwH/z+JIybQyHeQhBiban1rrsNkbKNMAcgF4Ry4aTRuDZkLrLnHYzsxwOAz6kUaIrKSvDeckTA0TtvsHcHua+I7X4FjHHRtsI4oUtHSkqkuSxDwWY2iWUkdTiIqJYeWOnMh/P2srRKaOQsyYet1BIl3BPr6reefDA4g2PjWZMlYiTsh36Xa2QjFozQX1iE3Ldg01fW4bdJ8UXztbLXRm487Cxf8/ANnGJZVkKgFvIWgNHUxTq7a9yEL2HBnueHCzU++prreAIvWkf5I9hb+QeTG54fB2uUrUjeX4Vv1m9Op+PN+HcBM7ku6Hlf04ZP5jhR+8G0ohrAhOFBQTsJVYRquPQOXYz2t5CVbMfDE3Y5VeId1FpNLlsK4Im7vAIizsb3RHAwKLeux9vkL4ALce3th+yYpOpSZT5AWuk6jWw+uVLUzB5kW4zJsIrT4vSZ8uaDs/qlaFj/nJ9LYDoZAsPhiIOun3TDPItDDnOlF8CPP+UCkpbzKP/ZzWqt99Klqu5+OtbvecdDdov3q+sp12vzZMeY6EBAeB+8FLXc= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB2990.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(55016003)(508600001)(7696005)(966005)(38070700005)(6916009)(38100700002)(5660300002)(76116006)(186003)(52536014)(86362001)(8936002)(82960400001)(122000001)(9686003)(26005)(6506007)(53546011)(33656002)(71200400001)(64756008)(316002)(2906002)(83380400001)(66556008)(66476007)(66446008)(66946007)(8676002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vwAcHMMqpSZoqfWujHY/aJPARwbymxVv5iBgzMpecpugUzZ3Fh+wgpoWU7iM?= =?us-ascii?Q?OtroAADsH7qPfs/pY2zCIxo+VEAb3I+ynWbuZDLd2Baf1xzqhutgiIvN+Y19?= =?us-ascii?Q?HBkWWWEhs7egE6fDz/lbKoqpttkcIX/mdjnU0Le7GghlUCIOBmb3NLBHzZN4?= =?us-ascii?Q?14g2wmjB+IFQxCzZRR3M4yhk8ZMWvoOquH616wSClDQ9A5kgUxjDyj1P4dB3?= =?us-ascii?Q?VeWgd8pD3J5yh0O3CHNPSgdXehyK8kfwrEPdnl2v5gh931eGDn8OEEd0FX0D?= =?us-ascii?Q?To1Aq2vYnL1ItvWO4oA7RtW8gHc50EoVD92QmI4ERNCQaev8nJO0rbGRFL3D?= =?us-ascii?Q?R6Xc9UmUWHP+aHoy7IIhjttaPm8sRSzqulICSkhSRjZTV/rr/NzzsfRIfCbl?= =?us-ascii?Q?4JNwhvFNcfeRZuocTR4f+S6U19/EmR6apv5YhJG5DcgssqVKJ2fAFhSxz0ot?= =?us-ascii?Q?qhC8YrRvFzDjp50Yc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ascii?Q?tSdObczef2kEi933wAT4kmFiOuqCGOHPfTs5gCv3Ik5psBUc87UZxCw9j5fz?= =?us-ascii?Q?6kHlcgg4Ev2CJnhEA0va0bDVYgQM0xD+6JieszDNiaZz8rxzY05RRJLMY/i/?= =?us-ascii?Q?WZDu3ACVZk6vh7SdGUL8QlpuNZ8APlooLPwlQ4em+tV3r+ogX8zgD5mhRiXg?= =?us-ascii?Q?LCxNJAdRvXT/zi57Nv1m2wtrkrRXi0aGVCopDXNbApcenWr8ei1bJAa7OzQR?= =?us-ascii?Q?XYfrraYEhxt7AFDdyuwDRSrADpDzqLIONEAcFg7dsgjORhq405NlWsqbVFJ4?= =?us-ascii?Q?j/Rv85qjK8IEV1SEAg6WtXfZNA+94p6+mAaF6Q+L4ZdGcL1LnVTBOplfM/uC?= =?us-ascii?Q?J1LuY8lBeg=3D=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2990.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a08710eb-e337-41a7-66ba-08da2e7cb068 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2022 09:50:29.6332 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: MRu8J1K4CecGdj5iclbf5rbCwUJXiMP6+0emnlN/ULsolFk6t5W7K7yH8ak2aB5idyBekyLZw5uGLrS9V+1Qng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1695 X-OriginatorOrg: intel.com Subject: Re: [FFmpeg-devel] [PATCH v2 1/5] avutil/hwcontext_d3d11va: fix the uninitialized texture bindflag 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 > > Hendrik Leppkes > > Sent: Sunday, May 1, 2022 5:54 PM > > To: FFmpeg development discussions and patches > devel@ffmpeg.org> > > Subject: Re: [FFmpeg-devel] [PATCH v2 1/5] avutil/hwcontext_d3d11va: > > fix the uninitialized texture bindflag > > > > On Sun, May 1, 2022 at 5:48 PM Hendrik Leppkes > > wrote: > > > > > > On Sun, May 1, 2022 at 7:09 AM Soft Works > > wrote: > > > > I think that's what Hendrik wanted to point out as far as I > > understood. > > > > > > > > > > Basically, I want explicit behavior, not implicit defaults. Anytime > > a > > > hwcontext is created, something should tell it what its going to be > > > used for, so we can determine which flags make sense (or ideally, it > > > should just specify the flags). > > > > > > This patch creates an implicit default for one use-case, is this > > going > > > to work with all others? No, of course not, because it has to know > > > what flags to set. Thats why explicitly setting those flags is > > > important, instead of just fixing one implicit case. > > I said I agree with you - basically, just that we need to differentiate between > the use case: > > 1. Use via API > => No defaults should be applied, caller is responsible for specifying > the flags > > 2. Use via ffmpeg cli > => Applying the render target flag would be safe here. > We could require this to set via parameter, but there won't ever > be a case to specify something different than the render target flag > > Why? Let's look at the possible flags: > > D3D11_BIND_DECODER > In all decoding cases, this flag is set explicitly, so it overrides any default we > would set > > D3D11_BIND_VIDEO_ENCODER > Set explicitly when required, so it overrides any default we would set > > D3D11_BIND_RENDER_TARGET > All other cases require this flag (e.g. video processing) > > No Flag > Dead end, texture would be unusable for any kind of video processing > > > > On that note, the example commandline it fixes just does hwupload and > > nothing else - does that even require render target to be flagged? > > From what I can tell it uses a simple > > ID3D11DeviceContext::CopySubresourceRegion to copy from the staging > > texture, which should not require any particular bind flags. Bind > > Flags in turn would then depend on what you are actually trying to do > > with the texture (shader input, etc), in this example... nothing? > > We are still in the context of ffmpeg cli - you know that there are no shaders > or 3d operations and no etc. > > But at this point, you can derive to another context or you can hwmap. > For all of those things, you need D3D11_BIND_RENDER_TARGET. > > > Summary > > As mentioned I see two possibilities: > > 1. Use D3D11_BIND_RENDER_TARGET as a default when used in context of > ffmpeg cli, otherwise no default flags > > 2. Require a device initialization parameter in the command line > (but it would always be about setting the render target flag > and there's no case where you would NOT want to set it) > Thanks for the possible solutions for this issue. The No.1 seems more reasonable because No.2 just seems more unnecessary. But I will still need to find a better place to set the flag. Before that I am going to resubmit the other 4 patches which have less comments and objections for further review. Thanks, Tong > Let me know what you think. > > Best 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". _______________________________________________ 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".