From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH] lavc: move bitstream filters into bsf/ subdir Date: Mon, 29 Jan 2024 11:55:19 +0100 Message-ID: <AS8P250MB07440BD5C71E004FD7E24ABB8F7E2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw) In-Reply-To: <170652369508.1197.9274216714495603536@lain.khirnov.net> Anton Khirnov: > 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. > Why not just use libavcodec/bsf/%.o: CPPFLAGS += -I$(SRC_PATH)/libavcodec/ >> 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/. > Both 2. and 3. were not meant about headers/include folders, but about the fact that you add dependencies to files in libavcodec/ in this very Makefile. > 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. > I was actually proposing that the dependencies for stuff in libavcodec/ stays in libavcodec/Makefile. - Andreas PS: Why don't you move e.g. bsf_internal.h as well as bsf.c itself? And where has this actually been discussed for there to be "overwhelming" consensus for it? _______________________________________________ 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:[~2024-01-29 10:53 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 2024-01-29 10:55 ` Andreas Rheinhardt [this message] 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=AS8P250MB07440BD5C71E004FD7E24ABB8F7E2@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \ --to=andreas.rheinhardt@outlook.com \ --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