From patchwork Thu Sep 21 01:26:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chen, Wenbin" X-Patchwork-Id: 43860 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1e62:b0:149:dfde:5c0a with SMTP id cy34csp315505pzb; Wed, 20 Sep 2023 18:27:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGXvx99DOBNfrF+RjYVbC9y1EuHhvFaLfai6Ws8oOABfyLBOMumxtapNtfD1dEA4j+Nf2Sp X-Received: by 2002:a5d:460b:0:b0:321:63b4:f109 with SMTP id t11-20020a5d460b000000b0032163b4f109mr3874154wrq.41.1695259630793; Wed, 20 Sep 2023 18:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695259630; cv=none; d=google.com; s=arc-20160816; b=k7T1jo7V6boZt8fWc4XeihwX8AN1u9SjKz7XuNg6DTcXONmiboRPkK0XD68DCITTJu Md1Tho4w2NKu2Imxu7y43xZPDlx+kqCgS1wMhSfohWzyJzg6Dw1Xa7jiGBhxoStUgkDS m3zZCK8YESIm2fQFKF+3ALYuvVJoRpzSBQTSYusD0wfmindISd1yYHwvYmj21ElffSGc 74CmjwBgSlnNdyP8oIw8oYuNpC8L4ezUbOk/HNnJwMyd8VNNnkGxSobL86RTZyayLJeM 5n760Gf0PJjOVTHxj6vEzw0iz3CniW0HkE2zAgYdYe69Nd8DA+G7MxZnn1k0/7tuRI+3 jgfw== 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=NRuLO3H4jfyHqRgsevd3MSE8hrdciDM9NOX58a8zoCQ=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=R2JwKbRf/8p4TmjFUd5JsCEQqRNOXVlFGCrsKU+lpMzCi+j3Dt8GUW3ZNEzRPxszJs 4zdUnMzgT2liPgp8dNrSVZVSjFMu/NXANAlhBOiTFiKzfmzt8i3juPMUm+4O6Cuxzws5 L7BYJes959NoG4d2xkc8eDffdyTAEwOhSbgRsqKpUp/S6tR1Cf4ZwbtZQ3jKGJKhBn9f EiKO2IqXj0Lql1JBddKqF3du92BcLAuaIKEgCvW+4cdaxRM+wGqTPpitAtTpUBRpRvjl KSB5sczNUdCIzNXLyz6s5eHgQaBR4ISHdKXa+M/MyaLx2URFCu46QQHdgrBLMIxP5XOt gM0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=AuLsHNaN; 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 lo4-20020a170906fa0400b0099bcb187a0bsi316353ejb.387.2023.09.20.18.27.10; Wed, 20 Sep 2023 18:27:10 -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=AuLsHNaN; 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 B3FEA68C912; Thu, 21 Sep 2023 04:26:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 867E568C378 for ; Thu, 21 Sep 2023 04:26:46 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695259611; x=1726795611; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=gRJBrY+gH9zsE1C5n70x4p5LXa2QAHNCe0vbFOx70Aw=; b=AuLsHNaNfs6cXAg1FJ6GWHsFVntD6tCxMjfci2u/Q/Jv7zeQlIldIte6 Zcr103BMiX0PgaXq0GYJFq5YCspbxgEbTsa3fhU9QefMjzMuKByzOeqUK Nw9jLi1AUxH8hcY1VuQU3INcS+q+jeiyxxE+uhy3xOGVh8XddWEFwALmU F+/szm/9ADULGEzZdBSZpgSTvHBVjG0JVsfaXsuqAl6WyWkiG8gQ3mpOF lphhceE8jqyiQAMrmgPDpEo5VmeVLuhIsQdNq0ovAPi9xknWCLHhtYZMw XQodM9SxV5rV5bMDJa+fdE1+Tg//pl+1M78F1Yva8T/spBkzEz3Swn2c3 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="370700950" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="370700950" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 18:26:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="781943214" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="781943214" Received: from wenbin-z390-aorus-ultra.sh.intel.com ([10.239.156.43]) by orsmga001.jf.intel.com with ESMTP; 20 Sep 2023 18:26:37 -0700 From: wenbin.chen-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Thu, 21 Sep 2023 09:26:33 +0800 Message-Id: <20230921012633.16241-3-wenbin.chen@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230921012633.16241-1-wenbin.chen@intel.com> References: <20230921012633.16241-1-wenbin.chen@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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: CnPCNdqV5ubY From: Wenbin Chen Signed-off-by: Wenbin Chen --- libavfilter/dnn/dnn_backend_tf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_tf.c b/libavfilter/dnn/dnn_backend_tf.c index b521de7fbe..25046b58d9 100644 --- a/libavfilter/dnn/dnn_backend_tf.c +++ b/libavfilter/dnn/dnn_backend_tf.c @@ -622,7 +622,7 @@ err: } static int fill_model_input_tf(TFModel *tf_model, TFRequestItem *request) { - DNNData input; + DNNData input = { 0 }; LastLevelTaskItem *lltask; TaskItem *task; TFInferRequest *infer_request = NULL; @@ -724,7 +724,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;