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 1C69247394 for ; Wed, 6 Sep 2023 06:03:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 18D8B68C886; Wed, 6 Sep 2023 09:01:40 +0300 (EEST) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9587F68C80A for ; Wed, 6 Sep 2023 09:01:33 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1693980093; x=1725516093; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UY7SPJZIHV3V4D4ZxplWAwEK9rHHV89VzDb9vqqvEog=; b=Bv3O2/8bG+mEFlS3xBUgJpiNZ/+JnXxIXNMsqDTGAEfqe+8FviR0KvLh 4n72tspUlkDjeD1kLnL/E28tixMra3xiFyvrwjf5VBoDZ2ssKxAktcH5t 81BoXokyII8Xydzw/q/AQ//zzdD2QW2AmIlEhKtZKCQvn9tYPmDUhhn7o lv/Kp/0TjM+u3hF9pYlSm5WRCq7A00YdAu2M5DeNx8xQTB8XEUvQAA21Z EWIJvewqXKfoK6ShF2VvpJbBdMuTbYlH8xpxI0SoEvoj+nx1IX2J2hke0 n1AQCcuN+YRHu+7fVg/y6vi4XuxEsBF8Ibf83AYmPkMgmWH+09OhgNpAw w==; X-IronPort-AV: E=McAfee;i="6600,9927,10824"; a="374372473" X-IronPort-AV: E=Sophos;i="6.02,231,1688454000"; d="scan'208";a="374372473" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2023 23:01:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10824"; a="734919106" X-IronPort-AV: E=Sophos;i="6.02,231,1688454000"; d="scan'208";a="734919106" Received: from xhh-dg264.sh.intel.com ([10.238.2.76]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Sep 2023 23:01:24 -0700 From: "Xiang, Haihao" To: ffmpeg-devel@ffmpeg.org Date: Wed, 6 Sep 2023 14:00:52 +0800 Message-Id: <20230906060052.698620-13-haihao.xiang@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230906060052.698620-1-haihao.xiang@intel.com> References: <20230906060052.698620-1-haihao.xiang@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 13/13] lavfi/vaapi_vpp: use dynamic frame pool for output link with libva2 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: Haihao Xiang 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: From: Haihao Xiang This can avoid out of memory with vaapi filters since commit 5fa00b3. Example: $ ffmpeg -init_hw_device vaapi=hw:/dev/dri/renderD128 -hwaccel_output_format vaapi -hwaccel vaapi -i input.mp4 -vf 'scale_vaapi=w=720:h=480' -vframes 1 -f null - ... [vf#0:0 @ 0x55ffe793ba80] Error while filtering: Cannot allocate memory Signed-off-by: Haihao Xiang --- libavfilter/vaapi_vpp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavfilter/vaapi_vpp.c b/libavfilter/vaapi_vpp.c index cf2592e068..818bc7d58a 100644 --- a/libavfilter/vaapi_vpp.c +++ b/libavfilter/vaapi_vpp.c @@ -199,7 +199,10 @@ int ff_vaapi_vpp_config_output(AVFilterLink *outlink) output_frames->width = ctx->output_width; output_frames->height = ctx->output_height; - output_frames->initial_pool_size = 4; + if (CONFIG_VAAPI_1) + output_frames->initial_pool_size = 0; + else + output_frames->initial_pool_size = 4; err = ff_filter_init_hw_frames(avctx, outlink, 10); if (err < 0) -- 2.34.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".