[FFmpeg-devel] [PATCH] h264 luma interpolation 8x8 for altivec

Guillaume POIRIER poirierg
Sun Aug 12 23:25:37 CEST 2007


On 6/26/07, Luca Barbato <lu_zero at gentoo.org> wrote:
> Mauricio Alvarez wrote:
> > part2: removes alignment correction of the destination pointers in
> > luma_16x6
> > interpolations. As I mentioned before I have made a test and these pointers
> > are always aligned to 128-bit- The only source of misalignment (with
> > respect
> > to 128-bit) is the variable block size, but in the 16x16 case the
> > destination is always aligned.
> Ok

If in all cases these
IMHO, it would be a good idea to add a code to allow an easy test of
these alignment thingies in case we need to do some debug.

I'd like to add smth like this
#define ASSERT_ALIGNED(ptr) assert(!((unsigned long)ptr&0x0000000F));
#else ASSERT_ALIGNED(ptr) 0;

and add ASSERT_ALIGNED() wherever we were handling unaligned memory accesses.

That way, if for some reason a user experiences corruptions, we can
advise him to test for alignment by defining DEBUG_ALIGNMENT.

So, what do you guys think?

A soldier will fight long and hard for a bit of colored ribbon.
 -- Napoleon Bonaparte

More information about the ffmpeg-devel mailing list