Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Anton Khirnov <anton@khirnov.net>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] lavc: move bitstream filters into bsf/ subdir
Date: Mon, 29 Jan 2024 11:21:35 +0100
Message-ID: <170652369508.1197.9274216714495603536@lain.khirnov.net> (raw)
In-Reply-To: <AS8P250MB07446425DCC181E2F685A8768F7E2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM>

Quoting Andreas Rheinhardt (2024-01-29 10:57:19)
> Anton Khirnov:
> > +# add libavcodec/ to include path for bsfs
> > +$(addprefix libavcodec/, $(sort $(filter bsf/%,$(OBJS_BSF-yes)))): CPPFLAGS += -I$(SRC_PATH)/libavcodec/
> 
> 1. Why sort?

To get rid of duplicates, otherwise the flags can be added multiple
times.

> 2. Adding dependencies for stuff not in this folder is different from
> how we do it for arch-specific stuff.

Yes, but as I said in the previous email - bitstream filters tend to
include more headers from libavcodec/ than code in arch/.

By my count, the 96 *.[ch] files in under libavcodec/x86 only include 98
headers from libavcodec/, 1.02 per file on average.
By contrast the 43 *.c files under bsf/ include 187 files from
libavcodec/, which averages to 4.35 per file.
So IMO it makes sense to avoid the pointless noise and busywork from adding
libavcodec/ prefixes to all those includes.

I would also be fine with adding -Ilibavcodec for arch files.

> 3. And actually, it is worse: Imagine someone changed
> h265_profile_level.c in such a way that h265_profile_level.o now relies
> on stuff provided by a different translation unit. Then you need to add
> said dependency to all the components that require h265_profile_level.o.
> If such a dependency exists in another Makefile for a subfolder, it is
> likely that this will be forgotten.
> (Of course, seeing that a BSF requires h265_profile_level.o might make
> the developer think twice whether it is really a good idea to add this
> new code to it.)

That's an argument against subfolders in general though, not against
modifying include flags. And it seems to me we have an overwhelming
consensus in favor of subfolders.

-- 
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".

  reply	other threads:[~2024-01-29 10:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-26 10:39 Anton Khirnov
2024-01-26 12:11 ` Lynne
2024-01-26 12:17   ` Zhao Zhili
2024-01-26 12:17   ` Anton Khirnov
2024-01-26 16:09     ` James Almer
2024-01-26 16:17       ` Anton Khirnov
2024-01-26 16:22         ` James Almer
2024-01-26 16:24           ` Anton Khirnov
2024-01-26 12:35 ` Andreas Rheinhardt
2024-01-26 16:22   ` Anton Khirnov
2024-01-28 17:49   ` Anton Khirnov
2024-01-29  9:57     ` Andreas Rheinhardt
2024-01-29 10:21       ` Anton Khirnov [this message]
2024-01-29 10:55         ` Andreas Rheinhardt
2024-01-29 11:07           ` Anton Khirnov
2024-01-29 11:15           ` Anton Khirnov
2024-01-29 11:29             ` 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=170652369508.1197.9274216714495603536@lain.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