[FFmpeg-devel] [PATCH] RV30/40 decoder

Michael Niedermayer michaelni
Mon Sep 17 14:52:55 CEST 2007


On Mon, Sep 17, 2007 at 01:16:06PM +0100, Steve Lhomme wrote:
> Kostya wrote:
>> On Mon, Sep 17, 2007 at 11:34:17AM +0200, Michael Niedermayer wrote:
>>> Hi
>>> On Mon, Sep 17, 2007 at 08:19:50AM +0300, Kostya wrote:
>>>>>> +    cw = av_mallocz(size * 2);
>>>>>> +    syms = av_malloc(size * 2);
>>>>>> +    bits = av_malloc(size);
>>>>> these could as well use use arrays on the stack, simplifying the source
>>>> Table sizes vary from 16 to 1296 elements. I suspect that it's easier to 
>>>> allocate
>>>> memory instead of remembering where 1296 came from.
>>> then use
>>> int bits[size];
>> I did not know this was possible. I will give it a try. 
> Not every compiler can handle this.

true, only ANSI and ISO C compilers can compile ANSI and ISO C, ffmpeg is
written in ANSI/ISO C thus requires a ANSI/ISO C compiler
you cant compile it with a pascal, ada, fortran, basic, ... compiler

if you want to maintain a port of ffmpeg to a different language like
C#, java, microsofts C++ dialect, ...
thats all fine just dont expect us to choose less readable constructs
because that would make it easier for you to maintain your port

if the alternative is equally readable (and you provide a clean patch)
thats something else ...

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- 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/20070917/2c53aeb5/attachment.pgp>

More information about the ffmpeg-devel mailing list