Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avutil/x86/emms: Don't unnecessarily include lavu/cpu.h
@ 2022-02-14 18:41 Andreas Rheinhardt
  2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 02/19] avdevice/decklink_(common_c|dec|enc).h: Fix checkheaders Andreas Rheinhardt
                   ` (17 more replies)
  0 siblings, 18 replies; 36+ messages in thread
From: Andreas Rheinhardt @ 2022-02-14 18:41 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

Only include it if it is needed, namely if __MMX__ is undefined.

X86 is currently the only arch where lavu/cpu.h is basically
automatically included (for internal development): #if ARCH_X86
is true, lavu/internal.h (which is basically included everywhere)
includes lavu/x86/emms.h which can mask missing inclusions
of lavu/cpu.h if the developer works on x86/x64. This has happened
in 8e825ec3ab09d877f12dcf05d76902a8bb9c8b11 and also earlier
(see 6d2365882f281f9452b31b91edb2e6a2d4f5ff08).
By including said header only if necessary ordinary developer machines
will behave like non-x86 arches, so that missing inclusions of cpu.h
won't go unnoticed any more.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavutil/x86/emms.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavutil/x86/emms.h b/libavutil/x86/emms.h
index c21e34b451..8ceec110cf 100644
--- a/libavutil/x86/emms.h
+++ b/libavutil/x86/emms.h
@@ -21,11 +21,14 @@
 
 #include "config.h"
 #include "libavutil/attributes.h"
-#include "libavutil/cpu.h"
 
 void avpriv_emms_asm(void);
 
 #if HAVE_MMX_INLINE
+#ifndef __MMX__
+#include "libavutil/cpu.h"
+#endif
+
 #   define emms_c emms_c
 /**
  * Empty mmx state.
-- 
2.32.0

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2022-02-23 19:45 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-14 18:41 [FFmpeg-devel] [PATCH] avutil/x86/emms: Don't unnecessarily include lavu/cpu.h Andreas Rheinhardt
2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 02/19] avdevice/decklink_(common_c|dec|enc).h: Fix checkheaders Andreas Rheinhardt
2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 03/19] avcodec/cabac_functions: Add missing headers Andreas Rheinhardt
2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 04/19] avcodec/aarch64/idct: Add missing stddef Andreas Rheinhardt
2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 05/19] avcodec/mips: Fix checkheaders Andreas Rheinhardt
2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 06/19] avformat/avio: Don't include common.h Andreas Rheinhardt
2022-02-23 14:46   ` Martin Storsjö
2022-02-23 16:07     ` Andreas Rheinhardt
2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 07/19] avutil/log: Don't include avutil.h Andreas Rheinhardt
2022-02-23 14:47   ` Martin Storsjö
2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 08/19] avutil/audio_fifo: Avoid avutil.h inclusion Andreas Rheinhardt
2022-02-23 14:48   ` Martin Storsjö
2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 09/19] avutil/fifo: Don't include avutil.h Andreas Rheinhardt
2022-02-23 14:49   ` Martin Storsjö
2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 10/19] avutil/file: " Andreas Rheinhardt
2022-02-23 14:49   ` Martin Storsjö
2022-02-15 17:42 ` [FFmpeg-devel] [PATCH 11/19] avutil/eval: " Andreas Rheinhardt
2022-02-23 14:50   ` Martin Storsjö
2022-02-15 17:43 ` [FFmpeg-devel] [PATCH 12/19] avutil/imgutils: " Andreas Rheinhardt
2022-02-23 14:50   ` Martin Storsjö
2022-02-15 17:43 ` [FFmpeg-devel] [PATCH 13/19] avutil/samplefmt: Don't include attributes.h, avutil.h Andreas Rheinhardt
2022-02-23 14:51   ` Martin Storsjö
2022-02-15 17:43 ` [FFmpeg-devel] [PATCH 14/19] avutil/pixelutils: Don't include common.h Andreas Rheinhardt
2022-02-23 14:51   ` Martin Storsjö
2022-02-15 17:43 ` [FFmpeg-devel] [PATCH 15/19] avutil/integer: " Andreas Rheinhardt
2022-02-23 14:51   ` Martin Storsjö
2022-02-15 17:43 ` [FFmpeg-devel] [PATCH 16/19] avutil/display: Don't include avutil.h Andreas Rheinhardt
2022-02-23 14:52   ` Martin Storsjö
2022-02-15 17:43 ` [FFmpeg-devel] [PATCH 17/19] Remove obsolete version.h inclusions Andreas Rheinhardt
2022-02-23 14:54   ` Martin Storsjö
2022-02-23 15:15     ` Andreas Rheinhardt
2022-02-23 19:44       ` Martin Storsjö
2022-02-15 17:43 ` [FFmpeg-devel] [PATCH 18/19] avutil/avassert: Don't include avutil.h Andreas Rheinhardt
2022-02-23 14:58   ` Martin Storsjö
2022-02-15 17:43 ` [FFmpeg-devel] [PATCH 19/19] Remove unnecessary libavutil/(avutil|common|internal).h inclusions Andreas Rheinhardt
2022-02-23 15:02   ` Martin Storsjö

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