[MPlayer-cvslog] CVS: main/libmpdemux ebml.c,1.4,1.5

Michael Niedermayer michaelni at gmx.at
Tue Jul 19 19:27:32 CEST 2005


Hi

On Tuesday 19 July 2005 18:53, Reimar Döffinger wrote:
> Hi,
>
> > thats possible but not portable, see av_{flt|dbl}2int() and
> > av_int2{flt|dbl}() in libavcodec/utils.c for how to do this in a
> > hopefully much more portable way
>
> Annoyingly complicated. And for matroska even a long double variant 
> would be needed (and at least the long double variant of ldexp seems to
> be not so portable, from what I see in the man page :-( ).

long double itself is not portable!!! the IEEE spec only specifies lower 
bounds on the precission, i doubt that the x86 long double can be read by any 
non x86 system with the union hack, though i didnt try ...
but at a least a quick google indicates that ppc&sparcs long double have even 
a differnt number of bits then x86


> Also, at what point and how would you do a portable big/little endian
> conversion (for MPlayer I just decided to assume float endianness ==
> integer endianness, which seems not to be the case for a few systems)?

nowhere, the format and bit ordering the cpu uses internally for its floating 
point variables has no effect at all on the av_*2*() code, it would even work 
if sizeof(float) != 4

[...]
-- 
Michael




More information about the MPlayer-cvslog mailing list