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 36468400BD for ; Sun, 20 Mar 2022 10:07:41 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B52E468AE56; Sun, 20 Mar 2022 12:07:38 +0200 (EET) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ADD5068991B for ; Sun, 20 Mar 2022 12:07:32 +0200 (EET) Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id EBE6D240179 for ; Sun, 20 Mar 2022 11:07:31 +0100 (CET) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id uXZ5NuhcQNz7 for ; Sun, 20 Mar 2022 11:07:31 +0100 (CET) Received: from lain.red.khirnov.net (lain.red.khirnov.net [IPv6:2001:67c:1138:4306::3]) (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 "lain.red.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id 644AC2400F5 for ; Sun, 20 Mar 2022 11:07:31 +0100 (CET) Received: by lain.red.khirnov.net (Postfix, from userid 1000) id A8BEB1601AD; Sun, 20 Mar 2022 11:07:31 +0100 (CET) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: =?utf-8?q?=3CAS1PR01MB95646DAF0BAE7EE297B41BC98F129=40AS1PR01MB?= =?utf-8?q?9564=2Eeurprd01=2Eprod=2Eexchangelabs=2Ecom=3E?= References: <20220315090532.27295-1-anton@khirnov.net> <20220315090532.27295-4-anton@khirnov.net> =?utf-8?q?=3CAS1PR01MB95646DAF0B?= =?utf-8?q?AE7EE297B41BC98F129=40AS1PR01MB9564=2Eeurprd01=2Eprod=2Eexchangel?= =?utf-8?q?abs=2Ecom=3E?= Mail-Followup-To: FFmpeg development discussions and patches Date: Sun, 20 Mar 2022 11:07:31 +0100 Message-ID: <164777085166.6085.15922817974814479379@lain.red.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 04/10] fftools/cmdutils: split common option handlers into their own file 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: 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".