[FFmpeg-devel] [PATCH] Decrease stack usage in svq1_encode_plane()

Zuxy Meng zuxy.meng
Fri Jan 8 10:58:03 CET 2010


2010/1/8 M?ns Rullg?rd <mans at mansr.com>:
> Zuxy Meng <zuxy.meng at gmail.com> writes:
>
>> Hi,
>>
>> The stack usage can be substantially high if stride is large, which
>> causes "make test" under Windows to fail due to stack overflow.
>>
>> --
>> Zuxy
>> Beauty is truth,
>> While truth is beauty.
>> PGP KeyID: E8555ED6
>>
>> Index: libavcodec/svq1enc.c
>> ===================================================================
>> --- libavcodec/svq1enc.c ? ? ?(???? 21032)
>> +++ libavcodec/svq1enc.c ? ? ?(????????)
>> @@ -275,6 +275,7 @@
>> ? ? ?int block_width, block_height;
>> ? ? ?int level;
>> ? ? ?int threshold[6];
>> + ? ?uint8_t *src = av_mallocz(stride*16*sizeof(uint8_t));
>
> av_malloc() should be enough, no need to zero the memory.


Sure. Will get it updated when committing.

-- 
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6



More information about the ffmpeg-devel mailing list