[Ffmpeg-devel] alignment in H264 with altivec optimizations

Romain Dolbeau romain
Fri Apr 21 11:01:11 CEST 2006

Mauricio Alvarez wrote:

> I think that the problem is related with some assumptions that I made
> with respect to the alignment of the pointers in some kernels:

It's easy to check on development code: just put
assert everywhere and start playing videos on as
many hardware as you can. ("assert((ptr & 0xF) == 0)"
will do). Just remove the assert in the submitted patch :-)

> question-2.
> If the stride is a multiple of 16 it is possible to take the
> vec_lvsl(0,dat) out of the loop?

if the dst pointer is only incremented by multiple of 16,
then yes, the result of vec_lvsl(0,dat) is constant, and
as a loop invariant can be moved out of the loop.

> With this information I can correct my implementation of these kernels
> and possible speed-up the H264 decoder in the PPC architecture.

Thay would be very nice (even on my highest-end PPC laptop,
some H264 videos at DVD resolution can't be played w/o
removing the loop filter :-( ).

Romain Dolbeau
<romain at dolbeau.org>

More information about the ffmpeg-devel mailing list