From: Nicolas George via ffmpeg-devel <ffmpeg-devel@ffmpeg.org>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Len Woodward <len@artisan.build>, Nicolas George <george@nsup.org>
Subject: [FFmpeg-devel] Re: [PATCH RFC] libavfilter: expose expression variable metadata via AVFilter struct
Date: Fri, 23 Jan 2026 14:06:09 +0100
Message-ID: <aXNyQZPmzie8w96T@phare.normalesup.org> (raw)
In-Reply-To: <CAEwAiAE6pfrcmdk99pDnmfkM3=6BEUC3ZpJkLcKa5BLR8o3rXQ@mail.gmail.com>
Hi. Sorry, been busy.
Len Woodward via ffmpeg-devel (HE12026-01-14):
> Thanks for the feedback. To clarify my understanding:
>
> 1. Define AVExprVar in libavutil/eval.h so non-filter code can use it
> 2. Add accessor functions instead of direct struct iteration
> 3. Add the field to AVFilter (or AVFilterContext)
Yes, my recommendation would be something like that.
> On point 3 — is your thinking that AVFilterContext would allow variables
> to depend on runtime state (e.g., configured input dimensions)? For most
> filters the variables are static, but I can see cases where that matters.
If it goes through an accessor, then it does not matter where the fields
are. We could even have the field in both AVFilter and AVFilterContext
and have the accessor merge the two lists.
>
> On the accessor approach, something like:
>
> // libavutil/eval.h
> typedef struct AVExprVar {
> const char *name;
> const char *help;
> } AVExprVar;
>
> // libavfilter/avfilter.h
> int avfilter_get_nb_expr_vars(const AVFilter *f);
> const AVExprVar *avfilter_get_expr_var(const AVFilter *f, int index);
>
> Or if we go with AVFilterContext:
>
> int avfilter_ctx_get_nb_expr_vars(const AVFilterContext *ctx);
> const AVExprVar *avfilter_ctx_get_expr_var(const AVFilterContext *ctx,
> int index);
>
> Which do you think fits better? I'm leaning toward AVFilter since the
> variables are compile-time constants for all the filters I've looked at.
I would suggest AVFilterContext, because ctx->filter gives you the
corresponding AVFilter whereas the opposite is not possible.
You will need to be careful when generic functions in libavutil get
AVExprVar pointers that may come from libavfilter: they could be too
small. The best way to do that would probably to lock all libraries
versions together, as we discussed multiple times, but nobody
implemented it yet.
Regards,
--
Nicolas George
_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org
prev parent reply other threads:[~2026-01-23 13:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-09 19:54 [FFmpeg-devel] " Len Woodward via ffmpeg-devel
2026-01-10 20:03 ` [FFmpeg-devel] " Nicolas George via ffmpeg-devel
2026-01-14 19:10 ` Len Woodward via ffmpeg-devel
2026-01-23 13:06 ` Nicolas George via ffmpeg-devel [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aXNyQZPmzie8w96T@phare.normalesup.org \
--to=ffmpeg-devel@ffmpeg.org \
--cc=george@nsup.org \
--cc=len@artisan.build \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git