From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 04/10] fftools/cmdutils: split common option handlers into their own file
Date: Sun, 20 Mar 2022 11:07:31 +0100
Message-ID: <164777085166.6085.15922817974814479379@lain.red.khirnov.net> (raw)
In-Reply-To: =?utf-8?q?=3CAS1PR01MB95646DAF0BAE7EE297B41BC98F129=40AS1PR01MB?= =?utf-8?q?9564=2Eeurprd01=2Eprod=2Eexchangelabs=2Ecom=3E?=
Quoting Andreas Rheinhardt (2022-03-17 16:30:04)
> Anton Khirnov:
> > ---
> > fftools/Makefile | 2 +-
> > fftools/cmdutils.c | 1399 +--------------
> > fftools/cmdutils.h | 202 ---
> > fftools/ffmpeg_opt.c | 1 +
> > fftools/ffplay.c | 1 +
> > fftools/ffprobe.c | 1 +
> > fftools/{cmdutils.c => opt_common.c} | 2450 ++++++++------------------
> > fftools/opt_common.h | 231 +++
> > 8 files changed, 985 insertions(+), 3302 deletions(-)
> > copy fftools/{cmdutils.c => opt_common.c} (60%)
> > create mode 100644 fftools/opt_common.h
>
> Very weird stats. When I apply this, I get:
>
> fftools/Makefile | 2 +-
> fftools/cmdutils.c | 1399
> +------------------------------------------------
> fftools/cmdutils.h | 202 -------
> fftools/ffmpeg_opt.c | 1 +
> fftools/ffplay.c | 1 +
> fftools/ffprobe.c | 1 +
> fftools/opt_common.c | 1445
> +++++++++++++++++++++++++++++++++++++++++++++++++++
> fftools/opt_common.h | 231 ++++++++
> 8 files changed, 1685 insertions(+), 1597 deletions(-)
Probably because I have diff.renames=copy in my gitconfig.
> > +#if CONFIG_AVFILTER
> > +static void show_help_filter(const char *name)
> > +{
> > +#if CONFIG_AVFILTER
> > + const AVFilter *f = avfilter_get_by_name(name);
> > + int i, count;
> > +
> > + if (!name) {
> > + av_log(NULL, AV_LOG_ERROR, "No filter name specified.\n");
> > + return;
> > + } else if (!f) {
> > + av_log(NULL, AV_LOG_ERROR, "Unknown filter '%s'.\n", name);
> > + return;
> > + }
> > +
> > + printf("Filter %s\n", f->name);
> > + if (f->description)
> > + printf(" %s\n", f->description);
> >
> > - printf(" Supported framerates:");
> > - while (fps->num) {
> > - printf(" %d/%d", fps->num, fps->den);
> > - fps++;
> > - }
> > - printf("\n");
> > + if (f->flags & AVFILTER_FLAG_SLICE_THREADS)
> > + printf(" slice threading supported\n");
> > +
> > + printf(" Inputs:\n");
> > + count = avfilter_filter_pad_count(f, 0);
> > + for (i = 0; i < count; i++) {
>
> You can use a local loop variable here and in several other places here.
I would much prefer this to remain a simple move to the extent this is
possible. With diff.colorMoved=true, git will show you that almost
everything is a pure move.
All other cleanups should be applied later as separate commits.
--
Anton Khirnov
_______________________________________________
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".
next prev parent reply other threads:[~2022-03-20 10:07 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-15 9:05 [FFmpeg-devel] [PATCH 01/10] fftools/cmdutils: drop prototypes for nonexistent functions Anton Khirnov
2022-03-15 9:05 ` [FFmpeg-devel] [PATCH 02/10] fftools/cmdutils: drop extern declarations for nonexistent variables Anton Khirnov
2022-03-17 14:21 ` Andreas Rheinhardt
2022-03-15 9:05 ` [FFmpeg-devel] [PATCH 03/10] fftools: drop useless indirection Anton Khirnov
2022-03-17 14:21 ` Andreas Rheinhardt
2022-03-15 9:05 ` [FFmpeg-devel] [PATCH 04/10] fftools/cmdutils: split common option handlers into their own file Anton Khirnov
2022-03-17 15:30 ` Andreas Rheinhardt
2022-03-20 10:07 ` Anton Khirnov [this message]
2022-03-15 9:05 ` [FFmpeg-devel] [PATCH 05/10] fftools: move opt_timelimit from cmdutils to ffmpeg Anton Khirnov
2022-03-17 15:34 ` Andreas Rheinhardt
2022-03-15 9:05 ` [FFmpeg-devel] [PATCH 06/10] fftools/ffmpeg: drop mistakenly added empty line Anton Khirnov
2022-03-17 15:35 ` Andreas Rheinhardt
2022-03-15 9:05 ` [FFmpeg-devel] [PATCH 07/10] fftools/ffplay: drop options deprecated since 2011 Anton Khirnov
2022-03-15 9:05 ` [FFmpeg-devel] [PATCH 08/10] fftools/ffprobe; drop -show_format_entry Anton Khirnov
2022-03-15 9:05 ` [FFmpeg-devel] [PATCH 09/10] fftools: drop the fake "default" option from ffplay/ffprobe Anton Khirnov
2022-03-15 9:05 ` [FFmpeg-devel] [PATCH 10/10] fftools/cmdutils: drop redundant code Anton Khirnov
2022-03-17 14:19 ` [FFmpeg-devel] [PATCH 01/10] fftools/cmdutils: drop prototypes for nonexistent functions Andreas Rheinhardt
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=164777085166.6085.15922817974814479379@lain.red.khirnov.net \
--to=anton@khirnov.net \
--cc=ffmpeg-devel@ffmpeg.org \
/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