[MPlayer-dev-eng] configure endian autodetection
Bertrand Baudet
bertrand_baudet at yahoo.com
Fri Aug 2 09:41:07 CEST 2002
If the patch looks ok for you, please commit it, I'm going in vacation
and will be away for a least a week.
Bertrand
On Wednesday 31 July 2002 12:07 am, Bertrand Baudet wrote:
> On Tuesday 30 July 2002 04:35 pm, Felix Buenemann wrote:
> > On Thursday 18 July 2002 02:42, Bertrand Baudet wrote:
> > > Nobody had a chance to look at this?
> > > Any comments are welcomed!
> >
> > it works on my x86 system, I think we should probably push it into cvs
> > and we can still revert (or find different detection) if it happens not
> > to work eg. on 64bit cpus.
> > Btw. in ffmpeg I saw this check, what do you think?
> > +
> > +# ---
> > +# big/little endian test
> > +cat > $TMPC << EOF
> > +#include <inttypes.h>
> > +int main(int argc, char ** argv){
> > + volatile uint32_t i=0x01234567;
> > + return (*((uint8_t*)(&i))) == 0x67;
> > +}
> > +EOF
> > +
> > +if $cc -o $TMPO $TMPC 2>/dev/null ; then
> > +$TMPO && bigendian="yes"
> > +else
> > +echo big/little test failed
> > +fi
>
> Yes, the C code kinda do the same test...
> I'm gonna use their test, so if it fail we can blame ffmpeg :p
>
> I redone my patch since it was broken.
> I tested it on x86 and PPC, little endian MIPS and it worked.
>
> I'm waiting for the go ahead to commit it.
>
> Bertrand
More information about the MPlayer-dev-eng
mailing list