int bw = blockDim.x;
int bh = blockDim.y;
int tx = threadIdx.x%bw;
int ty = threadIdx.y%bh;
\_\_shared\_\_ uchar2 ys0\[\]\[\];
\_\_shared\_\_ uchar2 ys1\[\]\[\];
\_\_shared\_\_ uchar2 uvs\[\]\[\];
ys0\[ty\]\[tx\] = y0y1;
ys1\[ty\]\[tx\] = y2y3;
uvs\[ty\]\[tx\] = uv;
\_\_syncthreads();
if (threadIdx.x == && threadIdx.y == ) {
for (int j = ; j != bh; ++j) {
uchar2\* py0 = (uchar2\*)(pDst + (iy + j) \* \* nPitch + ix \* );
uchar2\* py1 = (uchar2\*)(pDst + ((iy + j) \* +) \* nPitch + ix \* );
uchar2\* puv = (uchar2\*)(pDstUv + (iy + j)\*nWidth + ix \* );
for (int i = ; i != bw; ++i) {
\*py0++ = ys0\[j\]\[i\];
\*py1++ = ys1\[j\]\[i\];
//\*puv++ = uvs\[j\]\[i\];
}
}
}
手机扫一扫
移动阅读更方便
你可能感兴趣的文章