[Mplayer-cvslog] CVS: main/TOOLS avifix.c,NONE,1.1

D Richard Felker III dalias at aerifal.cx
Fri Feb 6 23:34:05 CET 2004


On Fri, Feb 06, 2004 at 01:08:33PM +0100, Alex Beregszaszi wrote:
> Hi,
> 
> > note: doesnt work on ppc and other reverse-endian systems yet.
> > anyone interested to fix?? i'm lazy...
> intel is the "reverse-endian" :)

IMO not. Little endian has much more merit, except for reading numbers
in a hex-editor. When you write up numbers in a column, which place do
you align them at? The lsd or the msd? The lsd of course, so that
places of the same magnitude will line up when you want to
add/subtract them. Of course on a computer you have other benefits of
writing lsb first, such as being able to load a 32bit int as a 16bit
one by just casting the pointer (without having to add 2). And for
variable-length ints (multi-precision libs, etc.) you always want to
store the lsb at the beginning or your array and expand at the end
depending on how big the value is, so it makes sense for all numbers
to be stored that way. Also think of an add/adc loop for adding
variable-length ints, and which direction makes sense...

Big endian is a classic example of stupidly trying to make computers
mimic human systems (writing msd at the left) rather than having
humans learn a system that's most suited to computers.

Now yes, Intel sucks. But little endian makes a lot more sense than
big endian, for a machine.

Rich





More information about the MPlayer-cvslog mailing list