[Ffmpeg-devel] swscale and memalign

Reimar Döffinger Reimar.Doeffinger
Tue Jul 25 09:41:50 CEST 2006


Hello,
On Mon, Jul 24, 2006 at 09:23:11AM +0200, Luca Abeni wrote:
> A patch like the first attached one (build_fix.diff) seems to fix the
> issue. I think it is correct, and I would be tempted to commit it ASAP,
> because it fixes a compilation issue. Michael, is it ok?

Actually... I already replaced all memaligns by av_malloc, since it was
completely wrong when using the MEMALIGN_HACK (av_free would then be
operating on a pointer that points at a completely wrong place, most
likely causing a segfault before), and also the comments to
av_malloc said it would provide memory suitably aligned for everything.

> But is this change valid? For example, I see that some of the replaced
> memalign() request a 64-bytes alignment, and I do not think av_malloc()
> provides it...

True, the actual code seems to use 16, but the comments talk about 64.
I don't think we really need different alignments (is there really
someone who cares about a few bytes? Well, those people can overwrite
av_malloc...).

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list