[FFmpeg-devel] pixfmt.h installed header using HAVE_BIGENDIAN?

Reimar Döffinger Reimar.Doeffinger
Sun Jan 17 14:59:07 CET 2010

On Sun, Jan 17, 2010 at 01:48:23PM +0000, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> > Hello,
> > am I missing something or is this a double-WTF?
> > First, pixfmt.h uses HAVE_BIGENDIAN which is a big no-no for an installed header,
> > but in addition it does not include config.h, so even pixdesc.c ends up saying
> > In file included from pixdesc.c:22:
> > pixfmt.h:130:5: warning: "HAVE_BIGENDIAN" is not defined
> I know, and it's a problem.  Some discussion here:
> http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/81522

That one I though was fixed. Any objections if I just apply patch
below for now, in the worst case it breaks building of some
applications, but that's still better than breaking them
at runtime on bigendian which would happen right now.
Index: pixfmt.h
--- pixfmt.h	(revision 21108)
+++ pixfmt.h	(working copy)
@@ -127,6 +127,8 @@
     PIX_FMT_NB,        ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
+#include "config.h"
 #   define PIX_FMT_NE(be, le) PIX_FMT_##be
@@ -148,5 +150,6 @@
 #define PIX_FMT_YUV420P16 PIX_FMT_NE(YUV420P16BE, YUV420P16LE)
 #define PIX_FMT_YUV422P16 PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
 #define PIX_FMT_YUV444P16 PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
 #endif /* AVUTIL_PIXFMT_H */

More information about the ffmpeg-devel mailing list