From patchwork Mon Jul 9 12:41:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Danil Iashchenko X-Patchwork-Id: 9654 Delivered-To: ffmpegpatchwork@gmail.com Received: by 2002:a02:104:0:0:0:0:0 with SMTP id c4-v6csp2462705jad; Mon, 9 Jul 2018 05:44:22 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeL1/JLt3vpKKzSr3OnAGs0QhuCWQwjVQjQp/tzMebh9uww9aSr0SS4USBN/vr44ih8YQZp X-Received: by 2002:a1c:cbc2:: with SMTP id b185-v6mr12916185wmg.117.1531140262076; Mon, 09 Jul 2018 05:44:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531140262; cv=none; d=google.com; s=arc-20160816; b=VA8aficvRcSUvtmLJgpGzaLqIkJfrqRdgmEcymEFho1fkE390CpRkyPbOMfWAve4xU 1+FCbIVEXuJSHl0eiDnCZ3fnHY++B5bqeRfcQdjSrl8PPXtdbFo7kYUk7yDEen6cQOqI bVAkhFMDOEZY/BmzxcBNRetbOaaV9rpdnXMK8FWFgq70xzV+4mM/KP9JcRqBmTbk5/y0 smTc4vzbPWmtKlcjhCGTOKxxVODMWP04hiaWUnOAiuRrfpapg1JOUh6qcgotDfFPQ3B0 AJF+oxRPkNrLdawzJU2GU1IW+J9IaB2RqZDTCwilUt5uVH8Vx2PDWkouXuiX8G0nDK+b yiZA== 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:dkim-signature :delivered-to:arc-authentication-results; bh=mRHCRyE64rDDyB07CME3DtcO1lDukuk7u+uXHEz5vc8=; b=0jEyxEU8H1mJfE/r+f8rcbfbR38Od3KgzDNIjTlo0eqambJl/V1lQLYDdZK3NR6T3s jBm+dLa9g1XVbnoZnp8hwz09yrCX5HvBdAYnX8fMwPQiPM4g0jlWbx61QaYb2HGYhPiM KQOYdph9mRgWuUPlUrVH/BmsIJai/2mnk5fl1FZ+FNIkoFK9e6MyQvhMZKmEARPpvZsp R0G3VUiadsXWN/7ddmthpqG+lH9H70C+49W5AnKbKBag1ge4J/EiKXyoNObQPDhA6pCU PlxmO5IsXc9My6OclS1aL4OWscF/fjAbQclhC+2T8bvJXvyo+NiA0BBczmGSnx6ENr7R u8bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=dOe9Urel; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id y15-v6si13278681wrn.343.2018.07.09.05.44.21; Mon, 09 Jul 2018 05:44:22 -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=@gmail.com header.s=20161025 header.b=dOe9Urel; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id CCCC968A3EE; Mon, 9 Jul 2018 15:44:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3831F68829D for ; Mon, 9 Jul 2018 15:44:06 +0300 (EEST) Received: by mail-lj1-f178.google.com with SMTP id 203-v6so2955035ljj.13 for ; Mon, 09 Jul 2018 05:44:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=AyhRLWWTCn+r5nvAzDKJQErosdqB2dpnwcmD7TgjwV0=; b=dOe9UrelICOrZt3GzhX2llRF0KyWDgR+e6SrXK8qORMi5VZ4nyxMggH7yayfLQXu2a 8GKPf0MspCV8JffnwE6ebjbszNteD+lZB0DDEXp+ySPkMStBDWT+Ggw/ZbrJiP1oVnEg prV936j7rXWETkZQ5e6MxDbSo2m2n9elvQXXJ/4HHJjpsjWTXt/wi7pP+u3FFnGDJah9 Z/1sXzQD6GFctucuTOVPNDUkpUH3pJJO8ms7xJwTkbg2vpGDD9ohIEkS0BPN/z99UfwR +dJaa8tMxArvaxX+EVSytGd8ceCJd4uMedcsW0YQS1iqJxQ2x0btGPZptIq4SChWMcUc D35w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=AyhRLWWTCn+r5nvAzDKJQErosdqB2dpnwcmD7TgjwV0=; b=gqDhtU75khrF1qm+rTWIfXz5vUuW+5yjM5/sMPkmo1d1vk59/lRV8apdOMXY3L5h6b otMzo5KV5WJHFR0DC2PnBALavN6ImUVY0ixZogrDMEsxyNZRLT3jJys1oiSXBBjeIQp5 PkDre4cxqW0L/SM9t0k4LN5HE1MvjJP3PU6Z4lH+dJUUoFuOd7QbVYfzAoVHUngZrtGi CcI7YzjtvvwxFQVEYoiWn3s79ySmlM9l84b+1zu15EfQGQZiOSEXZzj/3wKYivDhkAjt 1Rs3meetuvXsFMYMVpK22DTDESqL7GY3uiJDRr7a+i5Dz3J4BFlzTw8OJ8ufPxPhRyuo S4Mg== X-Gm-Message-State: APt69E0MWduNdIBZCtVEVn/dwpHOMszEudjb+aZTTVX3qupOAZMOnm6k 80tmiF1qIC6KvxxZ9wd2tWt3oZk= X-Received: by 2002:a2e:29da:: with SMTP id p87-v6mr13308297ljp.12.1531140252017; Mon, 09 Jul 2018 05:44:12 -0700 (PDT) Received: from dan-acer.lan (campus.ifmo.ru. [194.85.161.2]) by smtp.gmail.com with ESMTPSA id k10-v6sm2356950ljh.5.2018.07.09.05.44.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 09 Jul 2018 05:44:11 -0700 (PDT) From: Danil Iashchenko To: ffmpeg-devel@ffmpeg.org Date: Mon, 9 Jul 2018 15:41:48 +0300 Message-Id: <1531140108-24729-1-git-send-email-danyaschenko@gmail.com> X-Mailer: git-send-email 2.7.4 Subject: [FFmpeg-devel] [PATCH] lavfi/avgblur_opencl: fix using uninitialized value X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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: Danil Iashchenko MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Fixed using uninitialized value "global_work[0]" when calling "av_log". --- libavfilter/vf_avgblur_opencl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_avgblur_opencl.c b/libavfilter/vf_avgblur_opencl.c index d1d3eb1..772b14e 100644 --- a/libavfilter/vf_avgblur_opencl.c +++ b/libavfilter/vf_avgblur_opencl.c @@ -215,10 +215,6 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input) radius_y = 0; } - av_log(avctx, AV_LOG_DEBUG, "Run kernel on plane %d " - "(%"SIZE_SPECIFIER"x%"SIZE_SPECIFIER").\n", - p, global_work[0], global_work[1]); - for (i = 0; i < ctx->power[p]; i++) { CL_SET_KERNEL_ARG(ctx->kernel_horiz, 0, cl_mem, &inter); CL_SET_KERNEL_ARG(ctx->kernel_horiz, 1, cl_mem, i == 0 ? &src : &dst); @@ -233,6 +229,10 @@ static int avgblur_opencl_filter_frame(AVFilterLink *inlink, AVFrame *input) if (err < 0) goto fail; + av_log(avctx, AV_LOG_DEBUG, "Run kernel on plane %d " + "(%"SIZE_SPECIFIER"x%"SIZE_SPECIFIER").\n", + p, global_work[0], global_work[1]); + cle = clEnqueueNDRangeKernel(ctx->command_queue, ctx->kernel_horiz, 2, NULL, global_work, NULL, 0, NULL, NULL);