[Ffmpeg-devel] [PATCH] Chinese AVS video decoder
Sun Jul 2 04:45:56 CEST 2006
M?ns Rullg?rd wrote:
> "Stefan Gehrer" <stefan.gehrer at gmx.de> writes:
>> Points which are still open:
>> - AMD64 bug reported by Benjamin. All my 64bit knowledge comes from
>> Wikipedia :)
>> Is it correct to assume that I have to deal with LP64 data model?
>> So I only need to check for wrong assumptions about pointer size?
>> (I have not used any 'long')
> You don't have to "deal with" anything. You only need to follow a
> couple of simple rules:
> - Never assume any type has a particular size; use sizeof. The only
> exception is that sizeof(char) == 1 by definition.
I'm curious - where (i.e. in what standard) is this defined, and why?
The understanding I got when first learning C was that sizeof(char) ==
"number of bytes necessary to store one printable character", which will
be 1 if the compiling system is using basic ASCII or similar but may be
2 or more if the compiling system is using a fixed-size multibyte text
From a purely coding perspective (i.e., considering just type sizes and
not semantic meaning), that definition doesn't necessarily make much
sense... but without it, the minimum amount of data to represent a
single printable character will not necessarily fit into the data type,
so it doesn't make much sense to call the type "char".
Warning: Simply because I argue an issue does not mean I agree with any
side of it.
Secrecy is the beginning of tyranny.
More information about the ffmpeg-devel