[Ffmpeg-devel] Re: [Patch] aligned av_realloc

Michael Niedermayer michaelni
Sat Aug 5 22:22:03 CEST 2006


Hi

On Sat, Aug 05, 2006 at 08:37:34PM +0200, Herv? W. wrote:
> On 21/07/06, Herv? W. <H.O.W.aka.V+ffmpeg at gmail.com> wrote:
> >Hi,
> 
> again :-)
> 
> >On 30/06/06, Herv? W. wrote:
> >> The changes:
> >> for the case memalign-hack:
> >> *changed the type of 'diff' from int to long. In this patch diff gets
> >> used in exactly the same way as in av_malloc and per r4911: "long is
> >> better than int for pointer differences"
> >>
> >> *ptr is reallocated. If the data isn't aligned, it gets moved in the
> >> allocated space, and diff is updated.
> >>
> >> with memalign:
> >> *memalign is called, the original data is copied and the old ptr is
> >> av_free'd.
> >
> >[...]
> >
> >> without hack or memalign:
> >> *as regular realloc. The memalign hack isn't needed (or wanted), nor
> >> is memalign, therefore malloc is aligned on 16 (or does not need to
> >> be?) and, presumably, the same applies to realloc.
> >
> >The previous patch had some mistakes.
> 
> Less comments in this patch.
> Any comment whatsoever on the patch would be appreciated.

does this patch fix any bug?
does this patch improve speed?
does this patch reduce memory usage?
if the awnser is no to all then what good does the patch do? yes it aligns
realloc but why?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list