From patchwork Tue Jun 6 07:27:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Mark X-Patchwork-Id: 3856 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.10.2 with SMTP id 2csp1717856vsk; Tue, 6 Jun 2017 00:27:25 -0700 (PDT) X-Received: by 10.237.51.197 with SMTP id v63mr17599052qtd.199.1496734045089; Tue, 06 Jun 2017 00:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1496734045; cv=none; d=google.com; s=arc-20160816; b=VzMTxfxskPRN1ISNgBMTLEb++6cJPTwd/ICNu2WDn7F3r5mn3oVbZM+TmWl74TSpmo IdJTAb0wlsRBFfqdre9ePeZyc3mwpuPtVvdYL/U8WtCt8t5BJw6lSjIb4M7eHjoJFoBI iP2+gUyWMHxIxHAuippCJBPC4JVP3XIwYZizyn/qK7rQqwAF+1qLZq7Ql5EEZvsFXsTR Zc2F2rWbrAqvVSrOOjGjt4CJ727HbWK4v/ak1e9sfROYdmwgSeWoCa9nRPxujKmxRdnv S+m6SECfESr9OEF9JAyQEdwGsP5VBjkCwadJISuL2AqFW3A/xGEDHxw3EjsFIU82AgbJ 8H7Q== 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=+mc3+BNwOco5fDS/zpkmSC6+/Rry+Jxi6gtdAbdvkq4=; b=vFZHU/ocFtUmKSD+rXgJDxApbO4KUOduT4HKX+7ztRYHY6cyNhR9sZl0i4BguUZon6 mZryofDiPXk7uYL5zTYPC7kuG0eCm22Nt6l2ZZBugS/n12aduUUcdksp/DLc68jhmZsP 09s5hacMCR4wUPihiAiaqNRqsLJ9/yfxVHI4XuVjs1R3VMw8L1cQzOnU9EpuAy9+a9O0 /PMOS2MPM4G2Iqf6D4d3o1UsGLqQWjj/Iq0ND0ms2CMGFiHmiBACKDY+BUU1VdxACRUD ls5tRSO9+JJV8rhJwtE8/gKb1vgiUuX1xzlUQMQB2fQXIBbSBclVcxXogiqhZOgCeiKh +/SQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com; 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 a9si17988571qtc.273.2017.06.06.00.27.23; Tue, 06 Jun 2017 00:27:25 -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; 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 BBA64689D7E; Tue, 6 Jun 2017 10:27:12 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f196.google.com (mail-qt0-f196.google.com [209.85.216.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3E2976899D2 for ; Tue, 6 Jun 2017 10:27:06 +0300 (EEST) Received: by mail-qt0-f196.google.com with SMTP id x58so14290347qtc.2 for ; Tue, 06 Jun 2017 00:27: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=vVcz+OSEHpzIwPz56/MA0WFWuuJ7Lgkd8x1RaBBIipw=; b=WkTRuUPW+auV9siFZHy10SX5wTda9QyJZEckRfCIIaXD7VJmcqtg8md+ce2p/zr1Ac ZnWmvEb/HITEb9aVRyrSIJi6ncDIrC0PKDib0h/L852kzorqIIBHYzlum3sujiMxL9zM lmq+L6Vc91ABBZApwK/DpNwkJXC4lkj1X/tjLlaLcKUcWGBfwmR3JzQ81Qxxta72jq8N ApzzlIGj/LVIY7EsNNYnC+kdXEayZzGXfzyb1FgiTjWJOg2FRUK2By9rcTzn/fDb58b+ jKd+1nc6VcyOr9Mor9dLnFYuEtDnvsOufaQHY/A8Gh1t5RQLcXtCYrcD6tzg9yrQVtPL O/Gw== 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=vVcz+OSEHpzIwPz56/MA0WFWuuJ7Lgkd8x1RaBBIipw=; b=iRpYjboQqD3FPEviSXXFuBj1CJvP60iBcNIeK74Dx1CUv7ZtGOiTqsCTWRtOnmT1VY SXXBWqIZd0o7HEvfenUjEKALOWoy+JEBHM6PDI7h9m7BnbnhemzAmmcw+ZyMw5bBW54h 9PO1QzwZtiTmvhgeono+T8V85yfEI0SMmwhBfALAqpQvGaLQ7/V3WoC8V+6mjJrH9HjO 9jwZ67wkZDI1cnJCqfzWQRK1Twc8m9uGg+EdCzOuVa3ZpzFgtVfpfkT/fOaxyinHNLIw TGs5XBXcglOe3sykpICnopsl5kvL+YajkVTuq4yeiGAludWbg9JiFwRDyfed4+urKKrV PXHA== X-Gm-Message-State: AKS2vOxmDCCT/L/a3ZrIONAVIEvWA7ycXF8tAaz3lOZPzCgwHtAYsiof twonbSzaRsVXS1bjwIM= X-Received: by 10.55.21.232 with SMTP id 101mr27582752qkv.15.1496734031914; Tue, 06 Jun 2017 00:27:11 -0700 (PDT) Received: from Klingon.fios-router.home (pool-173-69-140-247.bltmmd.fios.verizon.net. [173.69.140.247]) by smtp.gmail.com with ESMTPSA id a15sm22609812qkb.24.2017.06.06.00.27.10 (version=TLS1 cipher=AES128-SHA bits=128/128); Tue, 06 Jun 2017 00:27:10 -0700 (PDT) From: Kevin Mark To: ffmpeg-devel@ffmpeg.org Date: Tue, 6 Jun 2017 03:27:06 -0400 Message-Id: <20170606072706.85743-1-kmark937@gmail.com> X-Mailer: git-send-email 2.13.0 Subject: [FFmpeg-devel] [PATCH] doc/filters: Correct scale doc regarding w/h <= 0 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: Kevin Mark MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" According to libavfilter/scale.c, if the width and height are both less than or equal to 0 then the input size is used for both dimensions. It does not need to be -1. -1:-1 is the same as 0:0 which is the same as -10:-42, etc. if (w < 0 && h < 0) eval_w = eval_h = 0; Signed-off-by: Kevin Mark --- doc/filters.texi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 65eef89d07..b9d6eafc74 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -12125,12 +12125,13 @@ the complete list of scaler options. Set the output video dimension expression. Default value is the input dimension. -If the value is 0, the input width is used for the output. +If the width value is 0, the input width is used for the output. If the +height value is 0, the input height is used for the output. If one of the values is -1, the scale filter will use a value that maintains the aspect ratio of the input image, calculated from the -other specified dimension. If both of them are -1, the input size is -used +other specified dimension. If both of them are negative, the behavior +will be identical to both values being set to 0 as explained above. If one of the values is -n with n > 1, the scale filter will also use a value that maintains the aspect ratio of the input image, calculated from the other