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

Michael Niedermayer michaelni
Sun Jan 17 18:49:33 CET 2010


On Sun, Jan 17, 2010 at 04:52:12PM +0100, Stefano Sabatini wrote:
> On date Sunday 2010-01-17 14:57:15 +0000, M?ns Rullg?rd encoded:
> > Stefano Sabatini <stefano.sabatini-lala at poste.it> writes:
> > 
> > > On date Sunday 2010-01-17 14:30:35 +0000, M?ns Rullg?rd encoded:
> > >> Reimar D?ffinger <Reimar.Doeffinger at gmx.de> writes:
> > > [...]
> > >> >> > +#ifdef HAVE_AV_CONFIG_H
> > >> >> > +#include "config.h"
> > >> >> >  #if HAVE_BIGENDIAN
> > >> >> >  #   define PIX_FMT_NE(be, le) PIX_FMT_##be
> > >> >> >  #else
> > >> >> > @@ -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
> > >> >> >
> > >> >> >  #endif /* AVUTIL_PIXFMT_H */
> > >> >> 
> > >> >> This is the type of temporary hack that will stay forever.  If we
> > >> >> intend to ever fix it, we might as well do so now.  Having a broken
> > >> >> API serves nobody.
> > >> >
> > >> > Uh, that actually is my fix. What more do you want?
> > >> 
> > >> I want a f*cking sane API without internal ifdefs sprinkled about it.
> > >> Either the _NE formats move to a non-public header, or they go away
> > >> entirely.  I don't really care which, but the current situation is
> > >> nonsensical.
> > >
> > > +1 with feeling.
> > >
> > > What would be the problem with a pixfmt_internal.h header with the _NE
> > > stuff used by both lavc and lsws?
> > >
> > > This would break public API compatibiliy, but giving the fact that the
> > > _NE stuff is currently broken I don't believe people is actually using
> > > it.
> > 
> > Breaking something that doesn't work hardly counts as breaking...
> 
> This is the simplest of the many variants we may adopt, others:
> * create a pixfmt_internal.h included automatically in
>   libavutil/internal.h
> * make each file to explicitely include the pixfmt_internal.h header
>   when required.
> 
> I saw mans' RFC after writing the patch, so another option could be to
> *sanely* expose the _NE stuff.
> 
> Regards.
> -- 
> FFmpeg = Foolish and Fiendish Multimedia Powered Evangelical Gadget

>  internal.h |   22 ++++++++++++++++++++++
>  pixfmt.h   |   25 -------------------------
>  2 files changed, 22 insertions(+), 25 deletions(-)
> f632d952c51d36f801e49e834c28550bc0fe6f00  fix-pixfmt-ne-stuff.patch

iam not in favor of this patch
its semantically wrong, as that stuff are pixel formats and it would force
us to include libavutil/internal.h from many places. And whatever you say
people will include libavutil/internal.h if half of the API they want to
use is there

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Incandescent light bulbs waste a lot of energy as heat so the EU forbids them.
Their replacement, compact fluorescent lamps, much more expensive, dont fit in
many old lamps, flicker, contain toxic mercury, produce a fraction of the light
that is claimed and in a unnatural spectrum rendering colors different than
in natural light. Ah and we now need to turn the heaters up more in winter to
compensate the lower wasted heat. Who wins? Not the environment, thats for sure
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100117/8ad1156c/attachment.pgp>



More information about the ffmpeg-devel mailing list