[Ffmpeg-devel] Re: [Patch] aligned av_realloc
Michael Niedermayer
michaelni
Sun Aug 13 00:48:57 CEST 2006
Hi
On Sun, Aug 13, 2006 at 12:17:15AM +0200, Luca Barbato wrote:
> Michael Niedermayer wrote:
> > 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?
>
> Inconsistency between av_realloc and av_malloc
>
> > does this patch improve speed?
>
> SIMD code for audio could avoid some unaligned store.
wheres that offending av_realloc() exactly?
[...]
--
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