37 vector
unsigned char perm =
38 (vector
unsigned char) {0x00,0x10, 0x01,0x11,0x02,0x12,0x03,0x13,\
39 0x04,0x14,0x05,0x15,0x06,0x16,0x07,0x17};
40 const vector
unsigned char zero =
41 (
const vector
unsigned char) vec_splat_u8(0);
43 for (
i = 0;
i < 8;
i++) {
47 vector
unsigned char bytes = vec_vsx_ld(0, pixels);
51 vector
signed short shorts = (vector
signed short) vec_perm(bytes,
zero,
perm);
54 vec_vsx_st(shorts,
i * 16, (vector
signed short *)
block);
66 for (
i = 0;
i < 8;
i++) {
71 vec_u8 pixl = vec_ld(0, pixels);
72 vec_u8 pixr = vec_ld(7, pixels);
89 const uint8_t *s2, ptrdiff_t
stride)
92 const vector
unsigned char zero =
93 (
const vector
unsigned char) vec_splat_u8(0);
94 vector
signed short shorts1, shorts2;
96 for (
i = 0;
i < 4;
i++) {
100 vector
unsigned char bytes = vec_vsx_ld(0, s1);
103 shorts1 = (vector
signed short) vec_mergeh(bytes,
zero);
106 bytes =vec_vsx_ld(0, s2);
109 shorts2 = (vector
signed short) vec_mergeh(bytes,
zero);
112 shorts1 = vec_sub(shorts1, shorts2);
115 vec_vsx_st(shorts1, 0, (vector
signed short *)
block);
127 bytes = vec_vsx_ld(0, s1);
130 shorts1 = (vector
signed short) vec_mergeh(bytes,
zero);
133 bytes = vec_vsx_ld(0, s2);
136 shorts2 = (vector
signed short) vec_mergeh(bytes,
zero);
139 shorts1 = vec_sub(shorts1, shorts2);
142 vec_vsx_st(shorts1, 0, (vector
signed short *)
block);
151 const uint8_t *s2, ptrdiff_t
stride)
158 for (
i = 0;
i < 4;
i++) {
162 perm = vec_lvsl(0, s1);
163 vec_u8 pixl = vec_ld(0, s1);
164 vec_u8 pixr = vec_ld(15, s1);
171 perm = vec_lvsl(0, s2);
172 pixl = vec_ld(0, s2);
173 pixr = vec_ld(15, s2);
174 bytes = vec_perm(pixl, pixr,
perm);
180 shorts1 = vec_sub(shorts1, shorts2);
195 perm = vec_lvsl(0, s1);
196 pixl = vec_ld(0, s1);
197 pixr = vec_ld(15, s1);
198 bytes = vec_perm(pixl, pixr,
perm);
204 perm = vec_lvsl(0, s2);
205 pixl = vec_ld(0, s2);
206 pixr = vec_ld(15, s2);
207 bytes = vec_perm(pixl, pixr,
perm);
213 shorts1 = vec_sub(shorts1, shorts2);
227 unsigned high_bit_depth)
231 if (!high_bit_depth) {
#define i(width, name, range_min, range_max)
static int zero(InterplayACMContext *s, unsigned ind, unsigned col)
Macro definitions for various function/variable attributes.
av_cold void ff_pixblockdsp_init_altivec(PixblockDSPContext *c, unsigned high_bit_depth)
static void get_pixels_altivec(int16_t *restrict block, const uint8_t *pixels, ptrdiff_t stride)
static void diff_pixels_altivec(int16_t *restrict block, const uint8_t *s1, const uint8_t *s2, ptrdiff_t stride)
Contains misc utility macros and inline functions.