[Ffmpeg-devel] alignment in H264 with altivec optimizations

Loren Merritt lorenm
Fri Apr 21 10:05:40 CEST 2006


On Thu, 20 Apr 2006, Mauricio Alvarez wrote:

> I am making some Altivec optimizations to the ffmpeg H.264 decoder.
>
> I have submitted a patch some months ago but it was rejected because it
> does not produce correct decoded videos for some users.
>
> I think that the problem is related with some assumptions that I made
> with respect to the alignment of the pointers in some kernels:

None of the h264 dsp functions should ever need a misaligned store (up to 
the width of the block, of course: a 4x4 function only guarantees 4 byte 
alignment).
Stride alignment depends on architecture, but for ppc64 it should always 
be divisible by 16.

I can't guarantee that these are followed, since the x86 code would only 
slow and not break without them, but if they are violated it's a bug 
somewhere.

--Loren Merritt





More information about the ffmpeg-devel mailing list