OSDN Git Service

ppc: reduce overreads when loading 8 pixels in altivec dsp functions
authorJanne Grunau <janne-libav@jannau.net>
Thu, 13 Feb 2014 11:27:17 +0000 (12:27 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Fri, 14 Feb 2014 17:34:04 +0000 (18:34 +0100)
commit98fdfa99704f1cfef3d3a26c580b92749b6b64cb
tree57d3ad6e86479a6d9b32d0fa8fd91f424f73f859
parent3fbad00714698f59c6326edfcc63db87f525e7c0
ppc: reduce overreads when loading 8 pixels in altivec dsp functions

Altivec can only load naturally aligned vectors. To handle possibly
unaligned data a second vector is loaded from an offset of the original
location and the data is recovered through a vector permutation.
Overreads are minimal if the offset for second load points to the last
element of data. This is 7 for loading eight 8-bit pixels and overreads
are reduced from 16 bytes to 8 bytes if the pixels are 64-bit aligned.
For unaligned pixels the overread is reduced from 23 bytes to 15 bytes
in the worst case.
libavcodec/ppc/dsputil_altivec.c