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 5B16443A18 for ; Thu, 7 Jul 2022 03:18:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 756D368B7A0; Thu, 7 Jul 2022 06:18:23 +0300 (EEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 14B9E68B7A0 for ; Thu, 7 Jul 2022 06:18:16 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657163902; x=1688699902; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=qxqSZjxX5LUaU2SKHgmdiGgRvNGj9EOhWtqJkS/N4Vg=; b=Y2mziXSZSjeHZYnwiE+FHufD8Tj3MMKKJmTQBcWp4rargmcH6RoW31/i LQmEnXdqawqSCJD45WGRoYVpe9ZJk0fsufYx/Bi+62aAdN/jGVabypOAl IT8LWARthqdqLZyl1rG1vDoeu3dsXnyDfTKE1HHjI5nXRCKdmTR9iZDEY LtEVDaots9vgfNrcjmeYQSbJTOtzT09dsyVVzqghErizFs33ueTF3sDKX OZ1jwLjzcvgurPdhWqTjBBtFG/lnQHbCbqteKCp2pK/4a/ulfKv63rI7S 32a7DMI5gv+qeQGtwjc/N9xSK2PHsPRMTntaVItT162Ymf0OzP8PqT68Q g==; X-IronPort-AV: E=McAfee;i="6400,9594,10400"; a="284659350" X-IronPort-AV: E=Sophos;i="5.92,251,1650956400"; d="scan'208";a="284659350" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2022 20:18:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,251,1650956400"; d="scan'208";a="650940850" Received: from wenbin-z390-aorus-ultra.sh.intel.com ([10.239.35.4]) by fmsmga008.fm.intel.com with ESMTP; 06 Jul 2022 20:18:13 -0700 From: Wenbin Chen To: ffmpeg-devel@ffmpeg.org Date: Thu, 7 Jul 2022 11:12:52 +0800 Message-Id: <20220707031252.76494-1-wenbin.chen@intel.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2] libavfilter/vf_overlay_qsv: Use format of first input to set output format for overlay_qsv 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: overlay_qsv hard coded to use nv12 as output format. Now use the format of the first input to set output format. For detailed information of supported format on different platform, please see the "composition" rows in "Video Processing Features" at below link: https://www.intel.com/content/www/us/en/develop/documentation/media-capabilities-of-intel-hardware/top.html Signed-off-by: Wenbin Chen --- libavfilter/vf_overlay_qsv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_overlay_qsv.c b/libavfilter/vf_overlay_qsv.c index 7e76b39aa9..d947a1faa1 100644 --- a/libavfilter/vf_overlay_qsv.c +++ b/libavfilter/vf_overlay_qsv.c @@ -276,6 +276,7 @@ static int config_output(AVFilterLink *outlink) int ret; av_log(ctx, AV_LOG_DEBUG, "Output is of %s.\n", av_get_pix_fmt_name(outlink->format)); + vpp->qsv_param.out_sw_format = in0->format; if ((in0->format == AV_PIX_FMT_QSV && in1->format != AV_PIX_FMT_QSV) || (in0->format != AV_PIX_FMT_QSV && in1->format == AV_PIX_FMT_QSV)) { av_log(ctx, AV_LOG_ERROR, "Mixing hardware and software pixel formats is not supported.\n"); @@ -288,6 +289,7 @@ static int config_output(AVFilterLink *outlink) av_log(ctx, AV_LOG_ERROR, "Inputs with different underlying QSV devices are forbidden.\n"); return AVERROR(EINVAL); } + vpp->qsv_param.out_sw_format = hw_frame0->sw_format; } outlink->w = vpp->var_values[VAR_MW]; -- 2.32.0 _______________________________________________ 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".