From patchwork Thu Dec 14 02:49:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Chen, Wenbin" X-Patchwork-Id: 45131 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a20:1225:b0:181:818d:5e7f with SMTP id v37csp4691544pzf; Wed, 13 Dec 2023 18:50:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IFg8jjt78pfog2t1vHgaH4G8hyaeRrD1p9X7+gbG0yc/8b+ePnl46uRjw4ZJ5K0c5u75eqs X-Received: by 2002:a1c:7216:0:b0:40b:4aa9:91a9 with SMTP id n22-20020a1c7216000000b0040b4aa991a9mr4539565wmc.8.1702522205305; Wed, 13 Dec 2023 18:50:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702522205; cv=none; d=google.com; s=arc-20160816; b=jfA/CCz17LHsKtuI5Q5pqnmLzrxE6drFh8U5wZ4ZdpoNoWjjlrv+rSlidGgO9ap/vZ Dmy8RVUwG5MvfRPZKX5ooVhkcX/t1qI87S+gyR7YMbrJJ5h6pumKRnSSiTTXhkKcjjyK 5AfTc3647DXLIewAcnlZ/0nwxYFgShEFwncJKBSWapFmfG5WJgGogPPVnq41E8TqzmLp PdPBZf7ST2QVggPSdPv3eo8Cu30ivfniVSy56QrFSsetXVWVLCW8H9Bz4yW5u01mTbt5 wc579LWzEnH/9XJI7sakD30NWIboURpO8bbMK798KIv4QHJWA97b19ZnO4wGykvULKxH s//Q== 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=y5ZA4xvNd1vF26IVqPKdHE6Vc7j7yCz8IlhPJKXO7GI=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=UN5y7TwXTrZXtuM2KmHkOJk/6uWucmTw7YluEHLtS+5I6vQJxq+wgnPITa/XZJRgF/ McRBT14Z0LGW9GWwGCFeOIOaiFDPsfhk+ShOFxnvOAcYoGrl3hC43BAiPlzGLmhIrUtk 81MWwNsXzrqjNGc2bWHwDHBoxEEq13tFfN8O1ab803er38eNiesxyObomWc1QwCgwGc8 S+E6y5zZe0UfQ65yQDpMQtMltT07ENeQQMUcY0IWsBPXc+KdV4EhyHJnDM78aEmqCU2B N1akNoGLc6+Qbh6JfjdGhMFjf4L2jHe0HwxC0L3lYvf9KJlbdQuo2eWS5FFbpSgswOLz +JbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=nt1thtPM; 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 x19-20020a170906711300b00a230f3b9019si96928ejj.290.2023.12.13.18.50.01; Wed, 13 Dec 2023 18:50: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; dkim=neutral (body hash did not verify) header.i=@intel.com header.s=Intel header.b=nt1thtPM; 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 203CB68D197; Thu, 14 Dec 2023 04:49:46 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id F321468D1A4 for ; Thu, 14 Dec 2023 04:49:38 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702522184; x=1734058184; h=from:to:subject:date:message-id:in-reply-to:references: mime-version:content-transfer-encoding; bh=qCDrOSnNmDBL2atM1sCtrluHgHtjmwnrSScPe1qLKHc=; b=nt1thtPMGh1pJIQDH/0fXjhdb95mYr6AjbQ3FvQPsiC8qs+b3eL7xjlP b5mQwCclpBWrmFZP5dFNC7o5Z0R2yFKf+KxGJfJLzZ8+SvhA3zf2LmBpP M72PdHOfNP6K8KVYai0yrPNh4/skTPeTmgMUrmm4OHF8uMjtpd+j3vkje thj5DD0D6cF7JUrnivPKgvZIDSSGpHKMofhb1kbQQPDRAa1N8gJec95Lm Ww7FxpCyZ27tpffCoI0joOzManRhqpJ/BrIsKddVnXfIPdEQd7sA1QXVP 8rTr8KVHpWWKlTj23js6fh13iS9Kx2pBvzo9WchNhoiF64i+Pcx2xSYIG Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="16610004" X-IronPort-AV: E=Sophos;i="6.04,274,1695711600"; d="scan'208";a="16610004" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Dec 2023 18:49:32 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10923"; a="947403474" X-IronPort-AV: E=Sophos;i="6.04,274,1695711600"; d="scan'208";a="947403474" Received: from wenbin-z390-aorus-ultra.sh.intel.com ([10.239.156.43]) by orsmga005.jf.intel.com with ESMTP; 13 Dec 2023 18:49:30 -0800 From: wenbin.chen-at-intel.com@ffmpeg.org To: ffmpeg-devel@ffmpeg.org Date: Thu, 14 Dec 2023 10:49:27 +0800 Message-Id: <20231214024928.230112-3-wenbin.chen@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214024928.230112-1-wenbin.chen@intel.com> References: <20231214024928.230112-1-wenbin.chen@intel.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/4] libavfilter/vf_dnn_detect: Fix uninitialized variables error 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: BjXVGqPNAtv0 From: Wenbin Chen Signed-off-by: Wenbin Chen --- libavfilter/vf_dnn_detect.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_dnn_detect.c b/libavfilter/vf_dnn_detect.c index b2e9b8d4c6..5668b8b017 100644 --- a/libavfilter/vf_dnn_detect.c +++ b/libavfilter/vf_dnn_detect.c @@ -139,7 +139,8 @@ static int dnn_detect_parse_yolo_output(AVFrame *frame, DNNData *output, int out { DnnDetectContext *ctx = filter_ctx->priv; float conf_threshold = ctx->confidence; - int detection_boxes, box_size, cell_w, cell_h, scale_w, scale_h; + int detection_boxes, box_size; + int cell_w = 0, cell_h = 0, scale_w = 0, scale_h = 0; int nb_classes = ctx->nb_classes; float *output_data = output[output_index].data; float *anchors = ctx->anchors;