[FFmpeg-devel] [PATCH] Escape 124 (RPL) decoder rev2
Måns Rullgård
mans
Sat Mar 29 02:15:21 CET 2008
Michael Niedermayer <michaelni at gmx.at> writes:
> On Sat, Mar 29, 2008 at 12:49:17AM +0000, M?ns Rullg?rd wrote:
>> Michael Niedermayer <michaelni at gmx.at> writes:
>>
>> > On Fri, Mar 28, 2008 at 04:57:42PM -0700, Eli Friedman wrote:
>> >> On Fri, Mar 28, 2008 at 4:11 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>> >> > [...]
>> >> > > +static CodeBook* unpack_codebook(GetBitContext* gb, uint32_t depth,
>> >> > > + uint32_t length, uint32_t alloc_length) {
>> >> > > + uint32_t i, j;
>> >> >
>> >> > These dont need to be exactly 32 bit, so unsigned (int) seems more appropriate.
>> >>
>> >> They need to be more than 16 bits, so unsigned isn't appropriate.
>> >
>> > Quoting POSIX:
>> > {UINT_MAX}
>> >
>> > Maximum value of type unsigned.
>> > [CX] Minimum Acceptable Value: 4 294 967 295
>> > ------------
>> >
>> > Now if you want your code to run on pre POSIX 16bit systems, you
>> > could try
>>
>> That is not only pre-, but also current non-POSIX systems. C99
>> requires a minimum of only 16 bits for int. It still won't work, of
>> course.
>
> Which 16bit system was designed after above was added to POSIX? ;)
8-bit and 16-bit microcontrollers are being sold by the million. The
software they run obviously doesn't claim POSIX conformance in any
way, but that's irrelevant in the context.
> And yes ill try to be more precisse with what i say, i really seem to
> have lost some precission over time :(
> The correct thing to say probably is something like:
>
> Systems which conform to IEEE Std 1003.1-2001/Cor 2-2004 have at least a
> UINT_MAX of 4 294 967 295, systems not conforming to above may have lower
> values. Ffmpeg will not function correctly on systems having lower UINT_MAX.
> Systems conforming to ISO/ANSI C will have at least a UINT_MAX of 65535.
Come on, we all know it's called ISO/IEC 9899:1999 ;-)
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list