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 0B91643458 for ; Mon, 13 Jun 2022 09:07:44 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0CD5868B628; Mon, 13 Jun 2022 12:07:42 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4EEF568B342 for ; Mon, 13 Jun 2022 12:07:36 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 4A125240175; Mon, 13 Jun 2022 11:07:35 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id f1Y-dIrgPUHp; Mon, 13 Jun 2022 11:07:34 +0200 (CEST) Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id AB17E2400F5; Mon, 13 Jun 2022 11:07:34 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id CEBD41601B2; Mon, 13 Jun 2022 11:07:34 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: =?utf-8?q?=3CSN6PR11MB299040628F0C7EEFD3CB3184C0A49=40SN6PR11MB?= =?utf-8?q?2990=2Enamprd11=2Eprod=2Eoutlook=2Ecom=3E?= 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?= Mail-Followup-To: FFmpeg development discussions and patches , "Chen, Wenbin" Date: Mon, 13 Jun 2022 11:07:34 +0200 Message-ID: <165511125475.13099.11373631191477965886@lain> User-Agent: alot/0.8.1 MIME-Version: 1.0 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 _______________________________________________ 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".