急!!!关于linux的...vector函数
for (i = 0; i < width - 31; i+= 32) {
const unsigned int j = i >> 1;
vector unsigned char v_yA = vec_ld(i, ysrc);
vector unsigned char v_yB = vec_ld(i + 16, ysrc);
vector unsigned char v_yC = vec_ld(i + 32, ysrc);
vector unsigned char v_y1 = vec_perm(v_yA, v_yB, yperm);
vector unsigned char v_y2 = vec_perm(v_yB, v_yC, yperm);
vector unsigned char v_uA = vec_ld(j, usrc);
vector unsigned char v_uB = vec_ld(j + 16, usrc);
vector unsigned char v_u = vec_perm(v_uA, v_uB, vec_lvsl(j, usrc));
vector unsigned char v_vA = vec_ld(j, vsrc);
vector unsigned char v_vB = vec_ld(j + 16, vsrc);
vector unsigned char v_v = vec_perm(v_vA, v_vB, vec_lvsl(j, vsrc));
vector unsigned char v_uv_a = vec_mergeh(v_u, v_v);
vector unsigned char v_uv_b = vec_mergel(v_u, v_v);
vector unsigned char v_uyvy_0 = vec_mergeh(v_uv_a, v_y1);
vector unsigned char v_uyvy_1 = vec_mergel(v_uv_a, v_y1);
vector unsigned char v_uyvy_2 = vec_mergeh(v_uv_b, v_y2);
vector unsigned char v_uyvy_3 = vec_mergel(v_uv_b, v_y2);
vec_st(v_uyvy_0, (i << 1), dst);
vec_st(v_uyvy_1, (i << 1) + 16, dst);
vec_st(v_uyvy_2, (i << 1) + 32, dst);
vec_st(v_uyvy_3, (i << 1) + 48, dst);
}
vec_ld(i, ysrc);vec_perm(v_yA, v_yB, yperm);vec_mergeh(v_u, v_v);vec_mergel(v_u, v_v);vec_st(v_uyvy_0, (i << 1), dst);以上几个函数是关于vector函数的,从国外网站和国内网站资料都很少,有没有人知道这几个函数是在哪个库函数里的,是怎么实现的?如果有人知道请告诉我,小弟在这里感谢了!!!
[解决办法]
我在外文网站里看到了这个
$ grep vec_perm /usr/lib/gcc/powerpc-linux-gnu/4.1.2/include/altivec.h
#define vec_vperm vec_perm
#define vec_perm __builtin_vec_perm
[解决办法]
看看这个:http://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/PowerPC-AltiVec-Built-in-Functions.html
头文件:<altivec.h>
PowerPC AltiVec Built-in Functions PowerPC系统内置函数