32 int srcStride[],
int srcSliceY,
33 int srcSliceH,
uint8_t *dstParam[],
36 uint8_t *
dst = dstParam[0] + dstStride_a[0] * srcSliceY;
43 const int height = srcSliceH;
44 const int lumStride = srcStride[0];
45 const int chromStride = srcStride[1];
46 const int dstStride = dstStride_a[0];
47 const vector
unsigned char yperm = vec_lvsl(0, ysrc);
48 const int vertLumPerChroma = 2;
49 register unsigned int y;
59 for (y = 0; y <
height; y++) {
61 for (i = 0; i < width - 31; i += 32) {
62 const unsigned int j = i >> 1;
63 vector
unsigned char v_yA = vec_ld(i, ysrc);
64 vector
unsigned char v_yB = vec_ld(i + 16, ysrc);
65 vector
unsigned char v_yC = vec_ld(i + 32, ysrc);
66 vector
unsigned char v_y1 = vec_perm(v_yA, v_yB, yperm);
67 vector
unsigned char v_y2 = vec_perm(v_yB, v_yC, yperm);
68 vector
unsigned char v_uA = vec_ld(j, usrc);
69 vector
unsigned char v_uB = vec_ld(j + 16, usrc);
70 vector
unsigned char v_u = vec_perm(v_uA, v_uB, vec_lvsl(j, usrc));
71 vector
unsigned char v_vA = vec_ld(j, vsrc);
72 vector
unsigned char v_vB = vec_ld(j + 16, vsrc);
73 vector
unsigned char v_v = vec_perm(v_vA, v_vB, vec_lvsl(j, vsrc));
74 vector
unsigned char v_uv_a = vec_mergeh(v_u, v_v);
75 vector
unsigned char v_uv_b = vec_mergel(v_u, v_v);
76 vector
unsigned char v_yuy2_0 = vec_mergeh(v_y1, v_uv_a);
77 vector
unsigned char v_yuy2_1 = vec_mergel(v_y1, v_uv_a);
78 vector
unsigned char v_yuy2_2 = vec_mergeh(v_y2, v_uv_b);
79 vector
unsigned char v_yuy2_3 = vec_mergel(v_y2, v_uv_b);
80 vec_st(v_yuy2_0, (i << 1), dst);
81 vec_st(v_yuy2_1, (i << 1) + 16, dst);
82 vec_st(v_yuy2_2, (i << 1) + 32, dst);
83 vec_st(v_yuy2_3, (i << 1) + 48, dst);
86 const unsigned int j = i >> 1;
87 vector
unsigned char v_y1 = vec_ld(i, ysrc);
88 vector
unsigned char v_u = vec_ld(j, usrc);
89 vector
unsigned char v_v = vec_ld(j, vsrc);
90 vector
unsigned char v_uv_a = vec_mergeh(v_u, v_v);
91 vector
unsigned char v_yuy2_0 = vec_mergeh(v_y1, v_uv_a);
92 vector
unsigned char v_yuy2_1 = vec_mergel(v_y1, v_uv_a);
93 vec_st(v_yuy2_0, (i << 1), dst);
94 vec_st(v_yuy2_1, (i << 1) + 16, dst);
96 if ((y & (vertLumPerChroma - 1)) == vertLumPerChroma - 1) {
108 int srcStride[],
int srcSliceY,
109 int srcSliceH,
uint8_t *dstParam[],
112 uint8_t *
dst = dstParam[0] + dstStride_a[0] * srcSliceY;
119 const int height = srcSliceH;
120 const int lumStride = srcStride[0];
121 const int chromStride = srcStride[1];
122 const int dstStride = dstStride_a[0];
123 const int vertLumPerChroma = 2;
124 const vector
unsigned char yperm = vec_lvsl(0, ysrc);
125 register unsigned int y;
135 for (y = 0; y <
height; y++) {
137 for (i = 0; i < width - 31; i += 32) {
138 const unsigned int j = i >> 1;
139 vector
unsigned char v_yA = vec_ld(i, ysrc);
140 vector
unsigned char v_yB = vec_ld(i + 16, ysrc);
141 vector
unsigned char v_yC = vec_ld(i + 32, ysrc);
142 vector
unsigned char v_y1 = vec_perm(v_yA, v_yB, yperm);
143 vector
unsigned char v_y2 = vec_perm(v_yB, v_yC, yperm);
144 vector
unsigned char v_uA = vec_ld(j, usrc);
145 vector
unsigned char v_uB = vec_ld(j + 16, usrc);
146 vector
unsigned char v_u = vec_perm(v_uA, v_uB, vec_lvsl(j, usrc));
147 vector
unsigned char v_vA = vec_ld(j, vsrc);
148 vector
unsigned char v_vB = vec_ld(j + 16, vsrc);
149 vector
unsigned char v_v = vec_perm(v_vA, v_vB, vec_lvsl(j, vsrc));
150 vector
unsigned char v_uv_a = vec_mergeh(v_u, v_v);
151 vector
unsigned char v_uv_b = vec_mergel(v_u, v_v);
152 vector
unsigned char v_uyvy_0 = vec_mergeh(v_uv_a, v_y1);
153 vector
unsigned char v_uyvy_1 = vec_mergel(v_uv_a, v_y1);
154 vector
unsigned char v_uyvy_2 = vec_mergeh(v_uv_b, v_y2);
155 vector
unsigned char v_uyvy_3 = vec_mergel(v_uv_b, v_y2);
156 vec_st(v_uyvy_0, (i << 1), dst);
157 vec_st(v_uyvy_1, (i << 1) + 16, dst);
158 vec_st(v_uyvy_2, (i << 1) + 32, dst);
159 vec_st(v_uyvy_3, (i << 1) + 48, dst);
162 const unsigned int j = i >> 1;
163 vector
unsigned char v_y1 = vec_ld(i, ysrc);
164 vector
unsigned char v_u = vec_ld(j, usrc);
165 vector
unsigned char v_v = vec_ld(j, vsrc);
166 vector
unsigned char v_uv_a = vec_mergeh(v_u, v_v);
167 vector
unsigned char v_uyvy_0 = vec_mergeh(v_uv_a, v_y1);
168 vector
unsigned char v_uyvy_1 = vec_mergel(v_uv_a, v_y1);
169 vec_st(v_uyvy_0, (i << 1), dst);
170 vec_st(v_uyvy_1, (i << 1) + 16, dst);
172 if ((y & (vertLumPerChroma - 1)) == vertLumPerChroma - 1) {