[FFmpeg-devel] [PATCH] vda: use fast reallocation.
Sebastien Zwickert
dilaroga at gmail.com
Fri Nov 11 18:55:21 CET 2011
On Nov 11, 2011, at 6:43 PM, Reimar Döffinger wrote:
> On Fri, Nov 11, 2011 at 06:40:00PM +0100, Sebastien Zwickert wrote:
>>
>> On Nov 11, 2011, at 5:55 PM, Reimar Döffinger wrote:
>>
>>> On Fri, Nov 11, 2011 at 04:21:37PM +0100, Sebastien Zwickert wrote:
>>>> Hi,
>>>>
>>>> The patch in attachment reuses the buffer in order to take benefits of av_fast_realloc().
>>>
>>> Why av_fast_realloc and not av_fast_malloc? I can't see the need to
>>> preserve previous contents.
>>
>> reusing buffer isn't faster ?
>
> Both reuse buffers.
> However by using av_fast_realloc instead of av_fast_malloc you have to
> do more effort to handle allocation failures and you force it to copy
> the old contents over to the new buffer if the buffer can't be reused.
Thanks for your explanation.
Indeed, av_fast_malloc should be better. I'll provide a patch to use
av_fast_malloc instead of av_fast_realloc.
Best regards,
Sebastien
More information about the ffmpeg-devel
mailing list