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

Michael Niedermayer michaelni
Sat Mar 29 01:19:47 CET 2008


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
uint_fast32_t, though ffmpeg itself will not run on such systems.

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

While the State exists there can be no freedom; when there is freedom there
will be no State. -- Vladimir Lenin
-------------- 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/3f017398/attachment.pgp>



More information about the ffmpeg-devel mailing list