diff options
author | Graham Booker <gbooker@tamu.edu> | 2007-06-09 19:13:34 +0000 |
---|---|---|
committer | Guillaume Poirier <gpoirier@mplayerhq.hu> | 2007-06-09 19:13:34 +0000 |
commit | f057cc03995b6fc216ed85a106a320a867172155 (patch) | |
tree | 2f56cb78a141e90335b42c6f81c4e01abbd327cd /libavcodec/ppc/dsputil_altivec.h | |
parent | 12807c8d874746d143d7f6a945e031e1aa646709 (diff) | |
download | ffmpeg-f057cc03995b6fc216ed85a106a320a867172155.tar.gz |
Altivec version of h264_(h|v)_loop_filter_luma
patch by Graham Booker % perian A cod3r P com% with some minor fixes by me.
historic of the patch: http://trac.perian.org/ticket/113
Original thread:
Date: May 11, 2007 9:45 PM
Subject: [FFmpeg-devel] [PATCH] Altivec version of-altivec h264_h-v_loop_filter_luma
Originally committed as revision 9264 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ppc/dsputil_altivec.h')
-rw-r--r-- | libavcodec/ppc/dsputil_altivec.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/ppc/dsputil_altivec.h b/libavcodec/ppc/dsputil_altivec.h index 560d778bbd..218240b6b5 100644 --- a/libavcodec/ppc/dsputil_altivec.h +++ b/libavcodec/ppc/dsputil_altivec.h @@ -101,6 +101,17 @@ do { \ h = vec_mergel (D2, H2); \ } while (0) + +/** \brief loads unaligned vector \a *src with offset \a offset + and returns it */ +static inline vector unsigned char unaligned_load(int offset, uint8_t *src) +{ + register vector unsigned char first = vec_ld(offset, src); + register vector unsigned char second = vec_ld(offset+15, src); + register vector unsigned char mask = vec_lvsl(offset, src); + return vec_perm(first, second, mask); +} + #endif /* HAVE_ALTIVEC */ #endif /* _DSPUTIL_ALTIVEC_ */ |