From patchwork Mon May 31 07:55:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 27993 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a6b:b214:0:0:0:0:0 with SMTP id b20csp2656927iof; Mon, 31 May 2021 00:57:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9xN9gKZ+DARcu+XVhCsBY2H3fPRETZbxMoB1m5rELADh9N/mx81qruwgDKud9wE7dXdLN X-Received: by 2002:a17:906:1dd1:: with SMTP id v17mr21631523ejh.31.1622447850823; Mon, 31 May 2021 00:57:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622447850; cv=none; d=google.com; s=arc-20160816; b=RKt17cB31yvE2R4r6Ce2T3Vgik628NME2k+dBfu45Pz8MayUyz3QbMesDNqmbJCSRK K/v09sZnlNp1uEJbm+irmlhkgdvDm/l2WMd7A8ZflWCCjXP3+Cx4CQBkoOVKT1DZyf3f 7v41+wuFM6l9amxO02mzs+HR+ckMjFR9NK0XBKQpNsthZTFvG4nOU3BwfgtLEua86qBu VK2yxUmWYupESfZlFbGakU6Q6bbHoSRSESeND7d4K7nfpwjoEf6PcRFPvixs4Ay5gra1 YEOtM8drAhlbeuMEEMYpe1HR7T7y8CauFJUa/pFjWJADwJjUNE3PIRZmwv3EfXuPjpEC JpxA== 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:delivered-to; bh=6K88j8yXX+86RgiD3XCiyER2Y30+3BHvfyGG/ys7V4A=; b=Ed0hTstOrDyyOyupRisQoodNSTPI2IDT8WDim+YTc5Emdcv3Za7T20RW5Re8s5Nud5 CVozeWP2LroI8CyLWoWh3pvD0iR8OHWie8uXgR6K3RFXVMDFt1jA3QJxUd7oZPp2jxcG et5ltzpQopz5JqeJGwr9DwgvF/FPXNeepNpU0bHnnqeSu3sIsgvILyDp8xtgYst9jkPr 0OkzfFnlIn8aqsZ1FTnzhhYcAFmQBhYPQ3Co9UvEYE55KkvBOYYlOqUbB76aj2p7uqTj M+u6dy1ek153oTD5OqZ6NVp5UHU4Zey4t9dq3ff5b0sMdj7Pwdj81FxkPOcHTJIFFa2O gnZQ== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w11si15480325ede.2.2021.05.31.00.57.30; Mon, 31 May 2021 00:57:30 -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; 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 C776D68991B; Mon, 31 May 2021 10:55:41 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 1750E687FF1 for ; Mon, 31 May 2021 10:55:29 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 15C9924069F for ; Mon, 31 May 2021 09:55:26 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id OfYF0CeYXlTX for ; Mon, 31 May 2021 09:55:25 +0200 (CEST) Received: from libav.khirnov.net (libav.khirnov.net [IPv6:2a00:c500:561:201::7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "libav.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 4C8A624069E for ; Mon, 31 May 2021 09:55:22 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id 18F6C3A177F; Mon, 31 May 2021 09:55:21 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 31 May 2021 09:55:07 +0200 Message-Id: <20210531075515.19544-16-anton@khirnov.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210531075515.19544-1-anton@khirnov.net> References: <20210531075515.19544-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 16/24] sws: simplify setting sliceDir 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: 42rBFlFSgay0 --- libswscale/swscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 73bc0c5617..270adcc072 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -918,7 +918,7 @@ int attribute_align_arg sws_scale(struct SwsContext *c, return AVERROR(EINVAL); } - if (srcSliceY == 0) c->sliceDir = 1; else c->sliceDir = -1; + c->sliceDir = (srcSliceY == 0) ? 1 : -1; } if (usePal(c->srcFormat))