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 9943A4A720 for ; Sun, 5 May 2024 14:02:53 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 436EE68D5D0; Sun, 5 May 2024 17:02:50 +0300 (EEST) Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5845F68D530 for ; Sun, 5 May 2024 17:02:43 +0300 (EEST) Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-1edfc57ac0cso1082475ad.3 for ; Sun, 05 May 2024 07:02:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714917761; x=1715522561; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=Sz2D+jB+w0lctyKr8Fb5y6DtWRNC1DCUrueuOkcZuD4=; b=SaYLVLGlf/sNToOR1onAwHwRuLJvgcYJZJJi+xfiNWzik9uymB/sHxhJhwXE/0gURi cTpBwu4Q2jM0ZC7k19/ogIIsq9lnJAMKJvloj4ghfWNj80xd5rT4ic8CUokbkyLaP2gM X9TWveVRWF9H9T8CS6Ubw45gTNk2oEgUQ1zuneysPFyt5Y703olRtzopxkQmVXrzYCzO liXUn4uXDEB3fps1Ru99Kl9Fk35Ut2LicN+pyTAgbY1QRMJzCu2zGou0KoQN1Jvlu788 S7KOjh+U0PGwXIT3p4xjo5vpGYimDk1yA79oHcDt5jkQU9LB1A6VBiLAvwbChp5T7yUB cxhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714917761; x=1715522561; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Sz2D+jB+w0lctyKr8Fb5y6DtWRNC1DCUrueuOkcZuD4=; b=Fk3Rg2DjAmEqKVWIOsJ9zyAa2AzzpEk/l5/XBkPm8j6Eqrmc+UGtiD9lpX7eM16j9T i+K67fuEKFd78UHsuSXPeueYmdhdvhxPybpYR3g9afb2Zi0R2IKjksGtMMLHxEO7aH4l eejlna0Ld3kFb0D1UL5PYTHsVG6iKi8q1W+BON3WlLXj6ciG2D3GU85L8OsgJ4SVRUqP V++l40w4UNaf3xUT1rahc985fA7qMdRqFaRfiPo4IkAnxnCBsU6CrPQAvk+l+wT1/2kV W5pz7kqRMVj+PdgMFjpm0VZnYXHm197Rg8zzZ5IF1TJjsz4ohUYPbgQHAAOqMpZKvWVu mXNg== X-Gm-Message-State: AOJu0YxmCabRWy9Mkj74CELHWdRBlFce6dqS9aRf3FUtOtgcNW81qTWn OfsVQMAl59r0OlXZ+Nxh5UUPgmtbC07YIeXZfPFkMg6NrOabYJHyKJTVZw== X-Google-Smtp-Source: AGHT+IG9sJmp4m2XYc4bzttJ9mGk8TRuQ05ZE9Eg9ZSW6MmEvbbuuEsdDPnmY4Fo7dCy/lf75OfUSw== X-Received: by 2002:a17:902:f607:b0:1e5:1867:d9fa with SMTP id n7-20020a170902f60700b001e51867d9famr10202230plg.44.1714917760870; Sun, 05 May 2024 07:02:40 -0700 (PDT) Received: from localhost.localdomain ([190.194.167.233]) by smtp.gmail.com with ESMTPSA id n20-20020a170902969400b001e434b1c6a6sm6524511plp.58.2024.05.05.07.02.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 07:02:40 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Sun, 5 May 2024 11:02:19 -0300 Message-ID: <20240505140219.3508-1-jamrial@gmail.com> X-Mailer: git-send-email 2.44.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avfilter/vf_scale: don't expose framesync options in vf_scale2ref 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 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: It doesn't use it. Signed-off-by: James Almer --- libavfilter/vf_scale.c | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 60d301dcd8..07e9025335 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -1228,7 +1228,7 @@ static const AVOption scale_options[] = { }; static const AVClass scale_class = { - .class_name = "scale(2ref)", + .class_name = "scale", .item_name = av_default_item_name, .option = scale_options, .version = LIBAVUTIL_VERSION_INT, @@ -1268,6 +1268,31 @@ const AVFilter ff_vf_scale = { .flags = AVFILTER_FLAG_DYNAMIC_INPUTS, }; +static const AVClass *scale2ref_child_class_iterate(void **iter) +{ + const AVClass *c = *iter ? NULL : sws_get_class(); + *iter = (void*)(uintptr_t)c; + return c; +} + +static void *scale2ref_child_next(void *obj, void *prev) +{ + ScaleContext *s = obj; + if (!prev) + return s->sws_opts; + return NULL; +} + +static const AVClass scale2ref_class = { + .class_name = "scale(2ref)", + .item_name = av_default_item_name, + .option = scale_options, + .version = LIBAVUTIL_VERSION_INT, + .category = AV_CLASS_CATEGORY_FILTER, + .child_class_iterate = scale2ref_child_class_iterate, + .child_next = scale2ref_child_next, +}; + static const AVFilterPad avfilter_vf_scale2ref_inputs[] = { { .name = "default", @@ -1303,7 +1328,7 @@ const AVFilter ff_vf_scale2ref = { .init = init, .uninit = uninit, .priv_size = sizeof(ScaleContext), - .priv_class = &scale_class, + .priv_class = &scale2ref_class, FILTER_INPUTS(avfilter_vf_scale2ref_inputs), FILTER_OUTPUTS(avfilter_vf_scale2ref_outputs), FILTER_QUERY_FUNC(query_formats), -- 2.44.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".