[FFmpeg-devel] [PATCH] Escape 124 (RPL) decoder rev2

Michael Niedermayer michaelni
Sat Mar 29 02:01:15 CET 2008


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? ;)
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.


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is not what we do, but why we do it that matters.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080329/50f74029/attachment.pgp>



More information about the ffmpeg-devel mailing list