comparison ppc/dsputil_altivec.h @ 5119:ad0c45e0008c libavcodec

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
author gpoirier
date Sat, 09 Jun 2007 19:13:34 +0000
parents fec25fd9febf
children 35cc7c922a76
comparison
equal deleted inserted replaced
5118:3b190bc34546 5119:ad0c45e0008c
99 f = vec_mergel (C2, G2); \ 99 f = vec_mergel (C2, G2); \
100 g = vec_mergeh (D2, H2); \ 100 g = vec_mergeh (D2, H2); \
101 h = vec_mergel (D2, H2); \ 101 h = vec_mergel (D2, H2); \
102 } while (0) 102 } while (0)
103 103
104
105 /** \brief loads unaligned vector \a *src with offset \a offset
106 and returns it */
107 static inline vector unsigned char unaligned_load(int offset, uint8_t *src)
108 {
109 register vector unsigned char first = vec_ld(offset, src);
110 register vector unsigned char second = vec_ld(offset+15, src);
111 register vector unsigned char mask = vec_lvsl(offset, src);
112 return vec_perm(first, second, mask);
113 }
114
104 #endif /* HAVE_ALTIVEC */ 115 #endif /* HAVE_ALTIVEC */
105 116
106 #endif /* _DSPUTIL_ALTIVEC_ */ 117 #endif /* _DSPUTIL_ALTIVEC_ */