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 636C3410F6 for ; Wed, 15 Jun 2022 02:55:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5BF3E68B66B; Wed, 15 Jun 2022 05:55:08 +0300 (EEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1457368B611 for ; Wed, 15 Jun 2022 05:55:01 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655261707; x=1686797707; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=cx7AV+BPmEyCGTXbD1lJIsOdPsrEuvOJGuQgl+lpD8A=; b=gAOWyurWR5YekBYw3VuUtdlk5/W/Q/7QyTT2CFc4ygiPisA2Czw+xRby e1PPfGGi1FNepVnGX70V0q37CGTsp/mxeNS1xtNCq0yFCZYlXPXccJnUD q8jXCCwjDU2CHJwN7mzf6/uU6WnNNnQGQLGt7c9WXCEJX73l+Nq1wb3qj t0NgElQLCn0R+xNtw/wVaT97X15j0DCiLhDT4Q6qHe9a7q1ieYf6Jg0ID Y1tF8EaIeYv3JN5u+YB1ddT0oRLiV/ahKq1PfqcSuILevI2vKpLAcOrKI GK66qdSRn22Gj0c5IqsQNz6qoofFCfLC6YDVtVeSnbIdrEhdYr2A0Ihz7 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10378"; a="277603026" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="277603026" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 19:54:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="582992955" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga007.jf.intel.com with ESMTP; 14 Jun 2022 19:54:58 -0700 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Tue, 14 Jun 2022 19:54:58 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Tue, 14 Jun 2022 19:54:58 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.105) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Tue, 14 Jun 2022 19:54:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RQQ2+Ba9lm5bk91RCocfkczujuVISAVG8g6c/ynMsovWSBjEO1iRQgJyr3FAzYZAtzEvMBF6kwH+S2KqjoJ5jPSd8m5/uRmt3uKSHa3HjgSsofWvkD6jD9DbZ6S9pK/YiUuzlzzqEEumMxS3hUql3h8L/VtdzzEDbnN+y3vo60B1/YQBneNrwREP7yXaHZacTdq1wGezsQfSS6G5Opvw6QkqpnNSx7wtjmzwQMZ6CfGkR8CNTR56qnZA7ZInqKkb4StQxJ1NMZEu0NNBbrc95IppA+MDEH280dAHZUvwTtLnCn4MQInA0PGZTJUqugUKKvp94I81mVmfMo/97gUkFQ== 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=cx7AV+BPmEyCGTXbD1lJIsOdPsrEuvOJGuQgl+lpD8A=; b=hBkKTvXqiAy+oUBZ1uEsDlPydm/R+GBynv/cJqasZHvZrqNNGjEw4htnl2X1kVMXYrsuU7J6xsUyKnLQdfKL+4CVUgmZ0sZmMxekSfixhiymObY3+rUOVnSJNo+MVHJd23US5FUN9SKUJd2znju5zx8EBn1DQv8Pw8ooIvMZ/b6ujLMV4jjH3tGbWiydmeGjReO0FuyZdSPWFZMbcsbIFY949Vtzmx/oGfUQti0aAjvbYXwm2GbYeejsihZKNxg247KLIG0V9zWA0E49Q/hf+bCwVK1apX0HG3sJyuGvgW89Q5T/h/WVyHsoyIFBwzmaXEa8F+0bv3C9mh3PUNkl1A== 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 DM6PR11MB4329.namprd11.prod.outlook.com (2603:10b6:5:201::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.12; Wed, 15 Jun 2022 02:54:56 +0000 Received: from SN6PR11MB2990.namprd11.prod.outlook.com ([fe80::c8d3:c41:710c:5b5b]) by SN6PR11MB2990.namprd11.prod.outlook.com ([fe80::c8d3:c41:710c:5b5b%6]) with mapi id 15.20.5332.022; Wed, 15 Jun 2022 02:54:56 +0000 From: "Wu, Tong1" To: FFmpeg development discussions and patches Thread-Topic: [FFmpeg-devel] [PATCH] avcodec/qsvenc: make QSV encoder encode VAAPI and D3D11 frames directly Thread-Index: AQHYelBIrfmrHmmeCkGerD9R7hwrYa1DrrOAgAlm2KWAArrNMA== Date: Wed, 15 Jun 2022 02:54:56 +0000 Message-ID: References: <20220607092216.405-1-tong1.wu@intel.com> <165459441749.13099.5448522665688495977@lain> =?utf-8?q?=3CSN6PR11MB2990406?= =?utf-8?q?28F0C7EEFD3CB3184C0A49=40SN6PR11MB2990=2Enamprd11=2Eprod=2Eoutloo?= =?utf-8?q?k=2Ecom=3E?= <165511125475.13099.11373631191477965886@lain> In-Reply-To: <165511125475.13099.11373631191477965886@lain> 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.500.17 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: cc854299-7255-4a17-79f5-08da4e7a6ddf x-ms-traffictypediagnostic: DM6PR11MB4329: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: 5GGxBQ27Qx1vOTcGbCHx0VNIzO7uQTLvZfgMEtk9nR5oRIAKs3wHilgyvvmCThE+T3zJNgpQG8tHXoKvvyuxx4TdYIIwPj9/Hi7IfhkeJHsGd0vJd25VPEJJqisUS9IF4gzpDA46dLyhCYVHoW0kW5RY1UEGlq/8mON3v6ANMs6biP8p4wFg0AwO/PXXGbJBffk6vj2lMYwbfk02mNvynJmIjbTAaEuHiDfoI2fF5uNVxAM2hk8RJIrCy1GMijJEhst7J9lIOnvSGgAkZjrfQAn6OXi4qsEPNhsZefOKFuiWile8jwTxkq2TjEbiP46WNTEfd0McswrG22iDdHDSVIz3E8ts5AmEVQs75+7mpnxduneM2GKAswsY+uVOT3BXuKjCZXiBJXqfgxGRi2k7aMbOyhI6V1QxLIhn/tTDa4M+woOVNY0exQg2uur0ORI8B028xEN2iUNhMLinM/PgzYxPnCFtSc/Rcza+Q4jE4oNjBFgKPg0L3ovyU/sKACCbkbdp0IVo4hTqpV1hKSBb2PX8AddqOQaBnG9JMTW8XealcMQ3E9RekSjwn+jO/pporfDCuObRPqNboYp9DGkoGrQJM3QYss05hUgEX93JxYaYhmrIJjK2+rOD0lEOAXr4T+lpvJwmLQXV5lhKLoJKLFOWstRMPhb0vOhiA/Es84z7NpPbOly5HbyJhxqJBO33tuDdceUw0ah4AHolM3qbDg== 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:(13230016)(366004)(86362001)(316002)(186003)(38070700005)(66476007)(107886003)(66946007)(71200400001)(82960400001)(66446008)(122000001)(6916009)(66556008)(55016003)(76116006)(4326008)(64756008)(8676002)(2906002)(5660300002)(7696005)(52536014)(33656002)(8936002)(38100700002)(508600001)(9686003)(6506007)(26005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4l+T2pkGOgtfpqyHukSeYqNWoKB5GvvVmxXyAjcGNcaJ4dnynypl0l8PH2HR?= =?us-ascii?Q?G6jXdhmFe1OoiUK7cw7QGMHvuW7gVxlMUQmQuDc63lXIc9ocf34p1y0se3t3?= =?us-ascii?Q?ajo//+zZn7FD440bt6n9K5L9oJbTQkMTWqXJK6t22r4cE49Zo/qlzlU01uym?= =?us-ascii?Q?vJFW1TqDAPHV6awUGNIdrJ774yPc/p/s2UzBKY12weS9Q7kZSXCN/7eLwrkm?= =?us-ascii?Q?H1bufOJ6iGVAB74x44UKRezIqKTRYKmxoPHDb4OlwCKA7TjlnfvWr6fMLa81?= =?us-ascii?Q?t7JQ0hTmEXY7uP5NUYEOOo5dFdtQ2MFCJrJ9gX0Z6J1zvorGOlZfmnJJn4Br?= =?us-ascii?Q?FtghAssDc/xQJeyj65Ov7+X/c1xxyIOrCm4HvqN38EmEUNwsFuBwh0kcret6?= =?us-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EzQoU2ORbW6/Vk?= =?us-ascii?Q?1n/yYA22ilGlKEKWRRQCGcUcYgnFYYPiuRby5amC28fvlx8MrHYHpObHEQg5?= =?us-ascii?Q?8+WGYZl4mEAGmXQhJlg83Xmw1BeyWb351HCld65bv1OQcy3j/UbdfPwHswxZ?= =?us-ascii?Q?Co8SQu6omBl8pq2GA0EjhlHercV+JANupzInEnfblHnLw/dJUgGKNoCiY1Pm?= =?us-ascii?Q?1vu14BweisnjseOrStC13p8e84p6yo3ccCLc4C/OinUMGeqkamCnpcOw+Nlm?= =?us-ascii?Q?fOzMuLkXYQHCAgwPnHvRL6LVndGMrSX7whL9yia0ZSAR4QFIM+nV3azennK2?= =?us-ascii?Q?cI7fZz5RGelkkEcL/Bnz2FwY4VzDFlXYbcp2lmWBBxnKp/QhssONh1ZS/xz1?= =?us-ascii?Q?WaK0EA3aSTXfzo77745kumJc5VidYqbpv+ZPYgIqPwppzfBuNxH87qBR5hxj?= =?us-ascii?Q?pO4QvMNaxQ=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: cc854299-7255-4a17-79f5-08da4e7a6ddf X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Jun 2022 02:54:56.2372 (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: CbLF/wWxxj2CEL5BuR4+cYpUE04MRzATR3Wv9Hn/y47YN0SGd3GarWeN+1KvgBAO4skoBU8MTYlp/kFD/m8UKw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4329 X-OriginatorOrg: intel.com Subject: Re: [FFmpeg-devel] [PATCH] avcodec/qsvenc: make QSV encoder encode VAAPI and D3D11 frames directly 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: "Chen, Wenbin" 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: > Quoting Wu, Tong1 (2022-06-08 06:47:27) > > > > > > Quoting Tong Wu (2022-06-07 11:22:16) > > > > QSV encoder is able to encode frames with VAAPI or D3D11 pixel > > > > format directly. This patch adds support for qsv encoder to accept > > > > VAAPI and > > > > D3D11 pixel formats as input. > > > > > > This looks like an ad-hoc hack to me. Encoders should not do these > > > kinds of tricks. > > > > > > -- > > > Anton Khirnov > > > > Thanks for the comments. The MFXSurface is based on VaSurface on Linux > > and D3D texture on Windows. Since the QSV encoder can accept > > AV_PIX_FMT_QSV as input, it seems kind of reasonable to accept VAAPI > > and D3D as its input. And it just may not look like a 'real' trick, > > let's say, for example, make QSV encoder accept VULKAN format > > directly. By adding this patch, we just want QSV encoder have more > > input format supports like what nvenc does. > > The difference with nvenc is that the nvenc API actually supports d3d > textures directly, our encoder wrapper merely passes them through. > > Your patch, on the other hand, derives a new device inside the decoder. > The intent behind the hwcontext interface is that such operations should be > left to the library caller, and are actually quite easy to do. So I don't see why > is this patch really needed. > > > Plus, this patch can really help the users who have hybrid transcode needs. > > Could you elaborate? How would this patch be useful in this specific case. > Why can't the callers dervice the device themselves? > > -- > Anton Khirnov It looks easier and more convenient for the users because they don't derive them manually. But yes, I'm convinced that it may be not the work that an encoder should do. Thanks for the comments. Regards, Tong _______________________________________________ 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".