From patchwork Mon Jul 12 11:07:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anton Khirnov X-Patchwork-Id: 28897 Delivered-To: andriy.gelman@gmail.com Received: by 2002:a25:bbc9:0:0:0:0:0 with SMTP id c9csp2811887ybk; Mon, 12 Jul 2021 04:08:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyCLZekNATUQ4pbgI7CmHwzF7x0+9y+BBu1B6PqxtMnTNMjO6/M8LihhfOm1X2wtjSH39C5 X-Received: by 2002:a05:6402:1a3c:: with SMTP id be28mr24572621edb.15.1626088106478; Mon, 12 Jul 2021 04:08:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626088106; cv=none; d=google.com; s=arc-20160816; b=oQ2ToGJwLGYswPiiHjwjOIMwYaqEbGtuBHm95CxcXj8aH5iOhhHHah01d4UorJyIPX xruFhnKoIyzxh0jB7D6MR6RjnL358W6zJm+xnSAfETOXCGZExgFOokVT7s8+t/WJMyGo gRcKIEdcodESEykFfoC/wfaIYdHUjEJKpbIefPbCxeUjT1+AQhiOK+zQnNyelJYMubgT w0eJhbcn9/94xLLX1ULHUFLeX3DnP6I3aN5CuDwRmAyg9jolsJdSAgItYjid8Tf4/8+a BnkHi6v4/7I2cu/B6R6E1tQbLoNlb3FiumL+VNIrsVVPt/EO04XH/1UO0daXuO0XgSaG GO3g== 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=298tljHZ+CIBrR4svUmWvFPCkRn7psjpt5DYfMei4vg=; b=kHLtfR5neCyc4l+uHIVugjUxotrwQolXNAcM/HWTdv0FnO++fPedFkk6zBVw8buGJP FrZTy7IUScbD7x8iS1K/K8507JI+7/0FI4cXCDRQXHGdCOpwPSrHmXusWmrGe/VaVcWK oUWjvl1zUyS8HGVCaT8jNp1/spqdS9C6EKfM2WzOdvcR7ZByoQdmZYeoRnsxPpPDmMMg rswYFzIgaZtID1DpSGiaheahcyikepjQFRuLNdYgrniTIxiEU2Ilj++ebWwolHXfdh+G gV0bzGbYsOA/BfE0Xb+MOSmtLXq79hgeXqtBdzlI5+u2ugnmDDRvOjH4wLJ2Tsy5zM0Q QYdA== 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 p21si1134995eds.89.2021.07.12.04.08.25; Mon, 12 Jul 2021 04:08:26 -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 62D8268A943; Mon, 12 Jul 2021 14:08:03 +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 2F3F76898E4 for ; Mon, 12 Jul 2021 14:07:55 +0300 (EEST) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id D29972404B2 for ; Mon, 12 Jul 2021 13:07:54 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id tgyWAgaz-Y2j for ; Mon, 12 Jul 2021 13:07:52 +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 6707B2404C8 for ; Mon, 12 Jul 2021 13:07:52 +0200 (CEST) Received: by libav.khirnov.net (Postfix, from userid 1000) id A0D453A0B51; Mon, 12 Jul 2021 13:07:50 +0200 (CEST) From: Anton Khirnov To: ffmpeg-devel@ffmpeg.org Date: Mon, 12 Jul 2021 13:07:04 +0200 Message-Id: <20210712110709.15532-4-anton@khirnov.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210712110709.15532-1-anton@khirnov.net> References: <20210712110709.15532-1-anton@khirnov.net> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 3/8] lavfi/vf_scale: remove the nb_slices option 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: Pcom58YP92wI Content-Length: 2811 It was intended for debugging only and has been superseded by the standalone tool for testing sliced scaling. --- libavfilter/vf_scale.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 71d7fa2890..39ab3a4b28 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -149,8 +149,6 @@ typedef struct ScaleContext { int force_original_aspect_ratio; int force_divisible_by; - int nb_slices; - int eval_mode; ///< expression evaluation mode } ScaleContext; @@ -794,17 +792,6 @@ scale: ret = scale_slice(scale, out, in, scale->isws[0], 0, (link->h+1)/2, 2, 0); if (ret >= 0) ret = scale_slice(scale, out, in, scale->isws[1], 0, link->h /2, 2, 1); - } else if (scale->nb_slices) { - int i, slice_h, slice_start, slice_end = 0; - const int nb_slices = FFMIN(scale->nb_slices, link->h); - for (i = 0; i < nb_slices; i++) { - slice_start = slice_end; - slice_end = (link->h * (i+1)) / nb_slices; - slice_h = slice_end - slice_start; - ret = scale_slice(scale, out, in, scale->sws, slice_start, slice_h, 1, 0); - if (ret < 0) - break; - } } else { ret = scale_slice(scale, out, in, scale->sws, 0, link->h, 1, 0); } @@ -936,7 +923,6 @@ static const AVOption scale_options[] = { { "force_divisible_by", "enforce that the output resolution is divisible by a defined integer when force_original_aspect_ratio is used", OFFSET(force_divisible_by), AV_OPT_TYPE_INT, { .i64 = 1}, 1, 256, FLAGS }, { "param0", "Scaler param 0", OFFSET(param[0]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, FLAGS }, { "param1", "Scaler param 1", OFFSET(param[1]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, FLAGS }, - { "nb_slices", "set the number of slices (debug purpose only)", OFFSET(nb_slices), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, FLAGS }, { "eval", "specify when to evaluate expressions", OFFSET(eval_mode), AV_OPT_TYPE_INT, {.i64 = EVAL_MODE_INIT}, 0, EVAL_MODE_NB-1, FLAGS, "eval" }, { "init", "eval expressions once during initialization", 0, AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_INIT}, .flags = FLAGS, .unit = "eval" }, { "frame", "eval expressions during initialization and per-frame", 0, AV_OPT_TYPE_CONST, {.i64=EVAL_MODE_FRAME}, .flags = FLAGS, .unit = "eval" },