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 91F7445B94 for ; Fri, 24 Mar 2023 14:39:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BCF7E68C7C2; Fri, 24 Mar 2023 16:39:45 +0200 (EET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 363B268C47E for ; Fri, 24 Mar 2023 16:39:38 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679668784; x=1711204784; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=cw26D7FaNrGFCS/qScC894V2r2jrwzlTizAPCKd5kqk=; b=U3Xng3yxMRXislk3BrYTGPWYOONaHxaKkfO1vqc7/MnuW2NVWJwJ0FF6 EteUBjZZaFbOFuRYdcbcWBrSlgZSgBW0cQa0YJ/SbVW7Ivin909HBq2UQ oltGkIDLLjm55Bf8iEhifBxiREhjxncC7HFJ25Io50yiWxXpx8/mz3j2e Az7G0xCy04XE7I1AEGoU42yqG3IewA9tu9KVzaxCjSccSMU5HV9y8zmdy 11oA5ORibjppdVsZbwXLDFambkHZEjJhg9EybbK2yaZ8RkiXYxTEkiFJG t/RzF+olYJhLqjoeSp4ZnTB7B6mm/62X1jQPIUyytSxo3b7TKUyipV9Ht g==; X-IronPort-AV: E=McAfee;i="6600,9927,10659"; a="328210185" X-IronPort-AV: E=Sophos;i="5.98,288,1673942400"; d="scan'208";a="328210185" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2023 07:39:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10659"; a="676156201" X-IronPort-AV: E=Sophos;i="5.98,288,1673942400"; d="scan'208";a="676156201" Received: from mvelez-mobl.amr.corp.intel.com (HELO uaeoff-desk1.intel.com) ([10.255.36.32]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Mar 2023 07:39:34 -0700 From: "U. Artie Eoff" To: ffmpeg-devel@ffmpeg.org Date: Fri, 24 Mar 2023 10:39:16 -0400 Message-Id: <20230324143916.755104-1-ullysses.a.eoff@intel.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavfi: add hwdevice flag to hwupload/hwdownload/hwmap 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: "U. Artie Eoff" 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: This fixes a regression introduced by: commit 3f63685c3554aea7f72bab1fdbde440820816d37 and commit 632c34993195f716e9fa575af3de80d07fd50991 ...where command-lines like: ffmpeg -v verbose -hwaccel qsv \ -init_hw_device qsv=qsv,child_device=/dev/dri/renderD128 \ -hwaccel_output_format qsv -f rawvideo -pix_fmt yuv420p \ -s:v 352x288 -r:v 25 -i input.yuv \ -vf 'format=nv12,hwupload=extra_hw_frames=120' \ -an -c:v h264_qsv -y output.h264 ffmpeg -v verbose -hwaccel qsv \ -init_hw_device qsv=qsv,child_device=/dev/dri/renderD128 \ -hwaccel_output_format qsv -f rawvideo -pix_fmt nv12 \ -s:v 352x288 -r:v 25 -i input.yuv \ -vf 'format=nv12|qsv,hwupload=extra_hw_frames=16,vpp_qsv=procamp=1:saturation=1.0,hwdownload,format=nv12' \ -pix_fmt nv12 -f rawvideo -fps_mode passthrough -an -y output.yuv ...produced errors like: [hwupload @ 0x55b6171d0dc0] A hardware device reference is required to upload frames to. [Parsed_hwupload_1 @ 0x55b6172053c0] Query format failed for 'Parsed_hwupload_1': Invalid argument Error reinitializing filters! Failed to inject frame into filter network: Invalid argument Signed-off-by: U. Artie Eoff --- libavfilter/vf_hwdownload.c | 1 + libavfilter/vf_hwmap.c | 1 + libavfilter/vf_hwupload.c | 1 + 3 files changed, 3 insertions(+) diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c index 5ef23cb5d465..8e8044d5bc0a 100644 --- a/libavfilter/vf_hwdownload.c +++ b/libavfilter/vf_hwdownload.c @@ -199,4 +199,5 @@ const AVFilter ff_vf_hwdownload = { FILTER_OUTPUTS(hwdownload_outputs), FILTER_QUERY_FUNC(hwdownload_query_formats), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, + .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c index 2e03dfc1fec7..e246b22603b5 100644 --- a/libavfilter/vf_hwmap.c +++ b/libavfilter/vf_hwmap.c @@ -427,4 +427,5 @@ const AVFilter ff_vf_hwmap = { FILTER_OUTPUTS(hwmap_outputs), FILTER_QUERY_FUNC(hwmap_query_formats), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, + .flags = AVFILTER_FLAG_HWDEVICE, }; diff --git a/libavfilter/vf_hwupload.c b/libavfilter/vf_hwupload.c index dbc41734ccc3..ef61bb413757 100644 --- a/libavfilter/vf_hwupload.c +++ b/libavfilter/vf_hwupload.c @@ -258,4 +258,5 @@ const AVFilter ff_vf_hwupload = { FILTER_OUTPUTS(hwupload_outputs), FILTER_QUERY_FUNC(hwupload_query_formats), .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE, + .flags = AVFILTER_FLAG_HWDEVICE, }; -- 2.38.1 _______________________________________________ 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".