[FFmpeg-devel] [PATCH] RV30/40 decoder
Mon Sep 17 14:16:06 CEST 2007
> On Mon, Sep 17, 2007 at 11:34:17AM +0200, Michael Niedermayer wrote:
>> 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. I can be replaced by alloca().
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 124 bytes
Desc: not available
More information about the ffmpeg-devel