[Ffmpeg-devel] [PATCH] Vorbis decoder

Rich Felker dalias
Fri May 13 18:57:54 CEST 2005


On Fri, May 13, 2005 at 05:28:10PM +0200, Balatoni Denes wrote:
> > > +    uint32_t ret=0;
> >
> > exact width types should only be used when an exact width is needed (not
> > for local variables like ret,i, ...)
> I tried to use the possible minimal size for each variable. So if for example 
> somebody wants to port this decoder to C64 or ZX Spectrum, he will know where 
> he can use native 8 bit types, or needs 16 bits, or must use more than 16 
> bits (in those cases 32 bits are usually not needed though).

This is the exact same design mistake as in FAAD. It makes code slow
and difficult to read. Always use int unless you need a particular
size; specifically-sized types are only for use in addressing sample
buffers and similar data.

> If somebody would like to fix the decoder to handle the new (not yet commited) 
> extradata format, I would appreciate it very much.

:)

Rich





More information about the ffmpeg-devel mailing list