From patchwork Fri Nov 19 13:52:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wu Jianhua X-Patchwork-Id: 31498 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:d206:0:0:0:0:0 with SMTP id q6csp2412938iob; Fri, 19 Nov 2021 05:53:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJz/CozTKIfk33YsItbEZtHW/kdRP7u5Gas/m19SjF/4daqcB0gP9yDh5HP4JKm6x9EdOQTB X-Received: by 2002:a17:907:97c3:: with SMTP id js3mr8301235ejc.240.1637329985270; Fri, 19 Nov 2021 05:53:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1637329985; cv=none; d=google.com; s=arc-20160816; b=HYeOkki6a6iy42ZILRDHFSYnESVJMVcicdVrA0i/HvrkA7yAbaZlrTLrhIf361qaDI LXCzN083ZKvEvVfha8AUzP/r6UJboNV371WyPQ6mwrGGpbfbfuavGS1XTaSihG4CC8mv OCStM8Uxz/A3Mn/5zHz/ZzGIPPiuxbJkJgZr2kwkJ6IsrTt3krXp3NUfIF2mVlCDGwt/ 1U6j4Ywuojc1mVxFpQhy/KgJYWsAxws3/yrHWwI5wtjlmgFwaICwQGgsH6Z0HBGWh7rk GeZPzhUxyO/9IiOhrZP3WODM+WWZ+0ETiqNzci9F01VAzS8LgsKEPvt+U64ygyGQl+UR SqUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to; bh=fTwErZV3M0r9LDedcRYbh6KFEuO9n0k1Y0RawbTm8UU=; b=AxDZ4FbAKI0FlpySmhbihkJo9UleGUtUMroOhLWHxWZCqPpyTbQ4WrdEhJARfLhS/Q oe/epmANpvbNjbdR0Cp3t2FRVIzFHbs1DVQkI4/5oxsTSNdvKkgb/cz96Sccgmulc77K r2MZv7eqLsbsPan6Mgy0SKGFD0DjomSBlemCHm/zrxDO7RW+VhhMIIZkydah6wFdSdUX X4gVvHMGJyFrh08QxmxNrUedgydWWU+VuVq7Cc0RdgU1YFlWxaKoK5kSjwmfd4S0i5n6 uAVySHv2PzqwG8csiEwOnd9CvuRiYNsVRydG5ATvrGspXOlI4BQulM05i2VV+Sn3oYuh dKSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id dm18si9887710ejc.250.2021.11.19.05.53.04; Fri, 19 Nov 2021 05:53:05 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 93C8468A6E7; Fri, 19 Nov 2021 15:53:02 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E1997680500 for ; Fri, 19 Nov 2021 15:52:55 +0200 (EET) X-IronPort-AV: E=McAfee;i="6200,9189,10172"; a="231896448" X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="231896448" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Nov 2021 05:52:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,247,1631602800"; d="scan'208";a="507905937" Received: from otc-skl-e5-server.sh.intel.com ([10.239.43.106]) by orsmga008.jf.intel.com with ESMTP; 19 Nov 2021 05:52:52 -0800 From: Wu Jianhua To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Nov 2021 21:52:38 +0800 Message-Id: <20211119135248.14518-1-jianhua.wu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [FFmpeg-devel] [PATCH 01/11] avfilter/avgblur_vulkan: check if shader is created with success 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: Wu Jianhua MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DY08e3/ZGjSd Signed-off-by: Wu Jianhua --- libavfilter/vf_avgblur_vulkan.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavfilter/vf_avgblur_vulkan.c b/libavfilter/vf_avgblur_vulkan.c index d37d5a62b1..93b59ebb7d 100644 --- a/libavfilter/vf_avgblur_vulkan.c +++ b/libavfilter/vf_avgblur_vulkan.c @@ -111,6 +111,8 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) shd = ff_vk_init_shader(s->pl_hor, "avgblur_compute_hor", VK_SHADER_STAGE_COMPUTE_BIT); + if (!shd) + return AVERROR(ENOMEM); ff_vk_set_compute_shader_sizes(shd, (int [3]){ CGS, 1, 1 }); @@ -154,6 +156,8 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in) shd = ff_vk_init_shader(s->pl_ver, "avgblur_compute_ver", VK_SHADER_STAGE_COMPUTE_BIT); + if (!shd) + return AVERROR(ENOMEM); ff_vk_set_compute_shader_sizes(shd, (int [3]){ 1, CGS, 1 });