[Ffmpeg-devel] [PATCH] Chinese AVS video decoder
Tue Jul 4 08:19:49 CEST 2006
Roman Shaposhnik wrote:
> On Mon, 2006-07-03 at 16:51 -0400, The Wanderer wrote:
>> (I've been Googling for a copy of the C standard
Thank you; this will presumably be quite useful for future reference.
>> If char is 16-bit, then either the statement which prompted my
>> original question was wrong (sizeof(char) would have to return 2,
>> not 1), or sizeof(foo) does not necessarily return the number of
>> bytes necessary to store foo - which I thought was the entire point
>> of sizeof in the first place.
> I believe it is OK for char to be 16-bit. In that case, sizeof(char)
> == 1 (as per 188.8.131.52 para 3). I think the trouble you have with
> understanding the semantics of sizeof stems from the fact that you
> always assume bytes to be 8bits in size. Which is not true as far as
> C standard is concerned.
Ah. That would, indeed, be what was tripping me up; I had taken it as a
fundamental assumption underlying all modern computer systems that "one
byte is 8 bits", period. (Certainly attempting to cleanly handle
interactions between systems that define the width of a byte differently
looks, at a glance, like it would be a massive headache...)
> See a definition of byte on a page 7(17) para 3.4:
Thank you. That resolves my confusion. I now return you to your
regularly scheduled on-topic list traffic.
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