From patchwork Wed Sep 20 02:26:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chen, Wenbin" X-Patchwork-Id: 43854 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:a886:b0:149:dfde:5c0a with SMTP id ca6csp353934pzb; Tue, 19 Sep 2023 19:26:38 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmzSf2lSAM5Bz/Ro7CxHUnyTYx3lr3hSCM//XBd79ilcZC3nUlyCX1/W6L/X0BW5PJWdyi X-Received: by 2002:a17:906:18a2:b0:9a6:426f:7dfd with SMTP id c2-20020a17090618a200b009a6426f7dfdmr834411ejf.66.1695176798458; Tue, 19 Sep 2023 19:26:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695176798; cv=none; d=google.com; s=arc-20160816; b=gPyRfJRZv28FkLyKsXwp6/Jp/1yC9icq6dXt+43cPD19eKPWyq6qGInK9Fo/6QMYX8 yakXpvbQXu5GgrNw+bGPH2pb/fdzcKdcHVhEhEandVy3q4xggcJ5AuTWv3CPHgzhesNr 47kDBrnfaJVA73ClLBjehXuICcJz+Ydz4+2Qs1A0/DVNMPVDu7kjcPC386sMjfs7/kQG rlyq5h8IjfYDfXv+zXTbB0s7WPJtXtmgptcjDi5Z02nI+nV4TpcxV355dTrc7RS21Bde cIsprT4ya6JlHPMrX/hEnea9ZLaTKH9uYB1fDsdbd1w4hTUoJkTwiSAst1QyFriexxK0 tfNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=/6y8Yq5dTMYI5uTEqVbr9kBhxbAqCLTYElCP0cpYu+g=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=gg3voE4m4cbWhLAn4OzrfcXBiaOFY1RoPkwSWO05v08s6A6Y9xLXoXZGWiwwxFK/xj TmCjPjXLmaI+yawXfo5mLPq2D29RCwndbr/woPILo9vkoIIAw0jchkGoVnk4o3G9T669 f89hHYXPlbtuaOrwROjY3y4RjPig9aT4kCH8rAZB8PdRdAgpyveAQ5pIRZM2ZyoUUhIZ 71aDt2eZhEf6X9GBrbQ9uDrTNZUxKkX1iIerCqSXMDEf31maPgr4+9aocwIrMSSyvzU1 ES+YEkyQOkGiQIKmarME4My1jrv52hQoyiElfod4ouKwguMkpwMtcK8UlttnmVhEC7Cr aTfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b="I/JRDbmA"; 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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id u25-20020a1709060b1900b0099318060d40si10788454ejg.459.2023.09.19.19.26.38; Tue, 19 Sep 2023 19:26:38 -0700 (PDT) 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; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b="I/JRDbmA"; 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 Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id EA21168C986; Wed, 20 Sep 2023 05:26:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1D03668C975 for ; Wed, 20 Sep 2023 05:26:18 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695176784; x=1726712784; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=J2GkwqK7R6lhmm/tgvFd0zO36HIJGyOceSlxFrcOqco=; b=I/JRDbmAN7BA/17y5VCySmO/oMxWnC+6ArMOZokZfMhVpx4V3t3zLU46 3Iq5HmqZBf9a1HMJOG7wfFk9Qpd/xMUCTnTQO+iVeaEo/mdHMpHaFVOxP 8c6PR+9KAkNNIvZjkjHejBTlq3psy2NRaS1dqaDbNdQmQAvupC1eW+d45 DQpgr851W4FYzWMZCuNdysSsMCzSaEDskn1Wd+R95ZB13+Rurfujp7Jpp vJ6fWKAU/R1sZ5vb0dEEwWpns5JsHNmgPPKv1vdUpN1QTIXE53J0KCA/n 0NNw6LBWP10LFfT0NpiF3H+XtOiJw3k6uJrnlzGQknY8P/RCGiIao5NE3 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10838"; a="466421600" X-IronPort-AV: E=Sophos;i="6.02,160,1688454000"; d="scan'208";a="466421600" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Sep 2023 19:26:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10838"; a="749712580" X-IronPort-AV: E=Sophos;i="6.02,160,1688454000"; d="scan'208";a="749712580" Received: from wenbin-z390-aorus-ultra.sh.intel.com ([10.239.156.43]) by fmsmga007.fm.intel.com with ESMTP; 19 Sep 2023 19:26:12 -0700 From: wenbin.chen-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Wed, 20 Sep 2023 10:26:09 +0800 Message-Id: <20230920022609.3393635-3-wenbin.chen@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230920022609.3393635-1-wenbin.chen@intel.com> References: <20230920022609.3393635-1-wenbin.chen@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/3] libavfilter/dnn: Initialze DNNData variables 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: u2LtIefsV0Dt From: Wenbin Chen Signed-off-by: Wenbin Chen --- libavfilter/dnn/dnn_backend_tf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index b521de7fbe..e1e8cef0d2 100644 --- a/libavfilter/dnn/dnn_backend_tf.c +++ b/libavfilter/dnn/dnn_backend_tf.c @@ -629,6 +629,7 @@ static int fill_model_input_tf(TFModel *tf_model, TFRequestItem *request) { TFContext *ctx = &tf_model->ctx; int ret = 0; + memset(&input, 0, sizeof(input)); lltask = ff_queue_pop_front(tf_model->lltask_queue); av_assert0(lltask); task = lltask->task; @@ -724,7 +725,7 @@ static void infer_completion_callback(void *args) { TFModel *tf_model = task->model; TFContext *ctx = &tf_model->ctx; - outputs = av_malloc_array(task->nb_output, sizeof(*outputs)); + outputs = av_calloc(task->nb_output, sizeof(*outputs)); if (!outputs) { av_log(ctx, AV_LOG_ERROR, "Failed to allocate memory for *outputs\n"); goto err;