From patchwork Mon Nov 20 10:29:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyan X-Patchwork-Id: 6223 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.94 with SMTP id m30csp3722540jah; Mon, 20 Nov 2017 02:29:33 -0800 (PST) X-Google-Smtp-Source: AGs4zMYj1i20WrXue+44VjS4KL7YsinGEZAJucOTEdvVHqQqptbu0sZeWmDa+DUUCN0cx6Ov8IYt X-Received: by 10.28.216.137 with SMTP id p131mr9295560wmg.50.1511173773888; Mon, 20 Nov 2017 02:29:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511173773; cv=none; d=google.com; s=arc-20160816; b=GLm+02NLi/t+zqdQjDlWFcZVdJLBsalhs3zT4XkAOEj5ZH8Hlqf9pJSCxBpdR99IHj B9Q9nrvNBCiPkHHsXKEh/7F7BaifHrWUu1hSBJeqxqI6xFpd5akFvJxVsAdWr5rTBsHA irfv176r5P1byspJUTMEhqPVQI/lCyjIdX5pDG3sVSSy1gupTH6nJ0IcmciwzrioMcod RF1AVEAUXsTqTjZKXLXFNzmRogZOLPwMuF4Xeg19kO5d2ayc7CZMB3CWB0I3xaYy9+8K O3780+F86ubQA03Zgc5usMRfMHZtKri7TnKEcXhX+77FBdp1ymNnVpAWiUnRXWJhosFA /eSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject :content-language:mime-version:user-agent:date:message-id:from:to :dkim-signature:delivered-to:arc-authentication-results; bh=C/Vpzze+TB9F+SYM2wyBZv3z9yEkXLUamiCmhtGvyys=; b=I2xn6Dt5XchLGrfZu9zpk3vy69J3AB3UQt8BTol6zQKxio7KSkliagXN7LILFv+XsC xZ7lhU9wCFQTUkJxd3oqxKpTxvtbGRbAFYMZQ8vY/1+QWLfDm2LkJB5ZWqMfOUhSwUST cyANzpR5DY7+1jFhxytVS+BTEF2rFEfKnj8oiL5LAVWEkspYvECDCGMgu00b0aA6k1PV 8CdIvAGTEZ+vIg9ridtdt+WVmotg9JO84FVfOQpjAd9msqSDNIeDEHgQv1MnIlQfWXoP rs958vZdzpFh9pfAPkvM7XNWMmZhEiQ+0Dg3+zyqFzGRqFwzhAnDedz/d05IEKUzU+m2 JvQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=hlIP4bXr; 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=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 b75si8149948wrd.485.2017.11.20.02.29.33; Mon, 20 Nov 2017 02:29:33 -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=@gmail.com header.s=20161025 header.b=hlIP4bXr; 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=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7D714689BFE; Mon, 20 Nov 2017 12:29:14 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-pg0-f48.google.com (mail-pg0-f48.google.com [74.125.83.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1B9EC687EC8 for ; Mon, 20 Nov 2017 12:29:08 +0200 (EET) Received: by mail-pg0-f48.google.com with SMTP id p9so7030245pgc.8 for ; Mon, 20 Nov 2017 02:29:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=ZlmcnqAN0bOG5Q+tK2j8fcxjeimFBysHXQzkMvW7Jrk=; b=hlIP4bXrs9EtduzMitys8XmWqP85sQA9TyddnUt6R2M3Snk4NSoISankgOFTmFTjyr NmnJemKCZBlugyXCvQAx2Vhyys6dG4j0lYQsiV8zpSZ4uPFxtpPCvyqmjR+TTI6T9ALs h06+xbDSH4tIYl1jb0D9V6AfS7vnfEWgD5zHq6TPRtGRVw+Wuiq83oyM05nMj7soO2AA +O6Fe9a5YW+0POobwIFbzcWxkLI/CCZFyfTyA3Y/ynMHwF8fwgf5nXC0e3KQ335H2wYP 5NZPi4Mh7aeKeCR6/oheFHNwUKhHWeAEYbO0zQeCXgoTNtSnpN25WbyP1aFEuPP/v8t1 Rk1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=ZlmcnqAN0bOG5Q+tK2j8fcxjeimFBysHXQzkMvW7Jrk=; b=llsBBHFootvq9uVeetFFns3NgkVCm6/9aUcsDKILVLNPGW5jtTQ6MHvpIwAYpwKvjb BvoHkjIC+OqWPa2OynWAjUH8kEO9dQx2CqgxUFIAjReHKJltMMOPQqAevJ5/CSvK741x ZE2Q/wmr3f3B1GFvczOIRf9SrQPNMk8ojQ5sdUBAewou0KHEtIPAeM+5GJMvT/uo9QTe JeNSMNh241G4kpFGIvIbrDEF1fysh/SBa88/qomABrLfJ1jZLj6Txr93bRxkBURshfYw 5HSv0AjUOLQb9Qgqe+D8y/jg9xstCDjlrsdLL1tMcS43Y+V9JNTNHgUrBpUZRoRc5Kkw KEdw== X-Gm-Message-State: AJaThX6guYE6C+H1u9gNXTFx5xGsmMhuT5c8EIkHn3iSr/LAPcyo+XjW 5Wx1XnLARAxekiiIFZn9A+HuCPX+ X-Received: by 10.84.129.1 with SMTP id 1mr13424634plb.40.1511173763076; Mon, 20 Nov 2017 02:29:23 -0800 (PST) Received: from [192.168.1.105] ([103.206.133.10]) by smtp.gmail.com with ESMTPSA id z7sm15135242pgp.91.2017.11.20.02.29.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 Nov 2017 02:29:21 -0800 (PST) To: ffmpeg-devel@ffmpeg.org From: Gyan Doshi Message-ID: Date: Mon, 20 Nov 2017 15:59:16 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Language: en-US Subject: [FFmpeg-devel] [PATCH] avfilter/drawbox: rename variable for maximum thickness 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" At present, the value name 'max' for maximum thickness in drawbox (and drawgrid) filter leads to a parse error if the thickness expression contains 'max(val1,val2)' i.e. [Eval @ ...] Invalid chars '(20,30)' at the end of expression 'max(20,30)' Renamed to 'fill'; tested & documented. Regards, Gyan From 3d8d9a35a15f9588ef660abff47c0410371985f3 Mon Sep 17 00:00:00 2001 From: Gyan Doshi Date: Mon, 20 Nov 2017 15:36:39 +0530 Subject: [PATCH] avfilter/drawbox: rename variable for maximum thickness The present value name for maximum thickness is 'max' which results in a parse error of any thickness expression containing 'max(val1,val2)'. Value renamed to 'fill'. Tested locally and documented. --- doc/filters.texi | 5 +++-- libavfilter/vf_drawbox.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 63ce899784..3c69546bf3 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -7086,7 +7086,8 @@ value @code{invert} is used, the box edge color is the same as the video with inverted luma. @item thickness, t -The expression which sets the thickness of the box edge. Default value is @code{3}. +The expression which sets the thickness of the box edge. +A value of @code{fill} will create a filled box. Default value is @code{3}. See below for the list of accepted constants. @end table @@ -7149,7 +7150,7 @@ drawbox=x=10:y=20:w=200:h=60:color=red@@0.5 @item Fill the box with pink color: @example -drawbox=x=10:y=10:w=100:h=100:color=pink@@0.5:t=max +drawbox=x=10:y=10:w=100:h=100:color=pink@@0.5:t=fill @end example @item diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c index 88bb9ae5c0..d351846594 100644 --- a/libavfilter/vf_drawbox.c +++ b/libavfilter/vf_drawbox.c @@ -47,7 +47,7 @@ static const char *const var_names[] = { "h", ///< height of the rendered box "w", ///< width of the rendered box "t", - "max", + "fill", NULL };