From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id AE5B8467AA for ; Sun, 18 Jun 2023 11:21:52 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6795468C172; Sun, 18 Jun 2023 14:20:24 +0300 (EEST) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1B0AC68BFC0 for ; Sun, 18 Jun 2023 14:20:16 +0300 (EEST) Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 095D64B86A; Sun, 18 Jun 2023 13:20:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1687087213; bh=fWjpXdoK20l/IaW4vJjoLrF4KjHBxuWk+yq3+DMs+vc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ACv+WVeY0bbjjbhd/IyIBXWwFiFQGBWNZroSW74MqsKEI23nHwXqWxh7IQ5iumQ6j xLVRiYqOsENUNgsuS2271C4vB8J+4BrgvEx2/RPmM2DtB8RAZKzUQtTsWtq2uiLkDa NaDmygBrwes4foh6fM35RJ2CtUPwIhX2QqxNJi4U= From: Niklas Haas To: ffmpeg-devel@ffmpeg.org Date: Sun, 18 Jun 2023 13:17:11 +0200 Message-ID: <20230618111955.40994-21-ffmpeg@haasn.xyz> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230618111955.40994-2-ffmpeg@haasn.xyz> References: <20230618111955.40994-2-ffmpeg@haasn.xyz> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 19/22] lavfi/vf_libplacebo: skip cache selectively per-input 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 Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: From: Niklas Haas It may be the case that we want to skip the single frame cache for some inputs but not others. --- libavfilter/vf_libplacebo.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index 627223256c6..f7b9bdba742 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c @@ -182,7 +182,6 @@ typedef struct LibplaceboContext { float antiringing; int sigmoid; int skip_aa; - int skip_cache; float polar_cutoff; int disable_linear; int disable_builtin; @@ -471,7 +470,6 @@ static int update_settings(AVFilterContext *ctx) .num_hooks = s->num_hooks, .skip_anti_aliasing = s->skip_aa, - .skip_caching_single_frame = s->skip_cache, .polar_cutoff = s->polar_cutoff, .disable_linear_scaling = s->disable_linear, .disable_builtin_scalers = s->disable_builtin, @@ -883,8 +881,10 @@ static int output_frame(AVFilterContext *ctx, int64_t pts) s->params.blend_params = NULL; for (int i = 0; i < s->nb_inputs; i++) { LibplaceboInput *in = &s->inputs[i]; + int high_fps = av_cmp_q(in->link->frame_rate, outlink->frame_rate) > 0; if (in->qstatus != PL_QUEUE_OK) continue; + s->params.skip_caching_single_frame = high_fps; update_crops(ctx, in, &target, out->pts * av_q2d(outlink->time_base)); pl_render_image_mix(in->renderer, &in->mix, &target, &s->params); s->params.skip_target_clearing = true; @@ -1198,9 +1198,6 @@ static int libplacebo_config_output(AVFilterLink *outlink) if (s->fps.num) { outlink->frame_rate = s->fps; outlink->time_base = av_inv_q(s->fps); - s->skip_cache = av_cmp_q(inlink->frame_rate, s->fps) > 0; - } else { - s->skip_cache = true; } /* Static variables */ -- 2.41.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".