Lines Matching refs:wsz2
112 int x, y, wsz2 = winsize/2; in prefilterNorm() local
113 int* vsum = (int*)alignPtr(buf + (wsz2 + 1)*sizeof(vsum[0]), 32); in prefilterNorm()
127 vsum[x] = (ushort)(sptr[x]*(wsz2 + 2)); in prefilterNorm()
129 for( y = 1; y < wsz2; y++ ) in prefilterNorm()
137 const uchar* top = sptr + srcstep*MAX(y-wsz2-1,0); in prefilterNorm()
138 const uchar* bottom = sptr + srcstep*MIN(y+wsz2,size.height-1); in prefilterNorm()
147 for( x = 0; x <= wsz2; x++ ) in prefilterNorm()
153 int sum = vsum[0]*(wsz2 + 1); in prefilterNorm()
154 for( x = 1; x <= wsz2; x++ ) in prefilterNorm()
162 sum += vsum[x+wsz2] - vsum[x-wsz2-1]; in prefilterNorm()
167 sum += vsum[x+wsz2] - vsum[x-wsz2-1]; in prefilterNorm()
325 int wsz = state.SADWindowSize, wsz2 = wsz/2; in findStereoCorrespondenceBM_SSE2() local
326 int dy0 = MIN(_dy0, wsz2+1), dy1 = MIN(_dy1, wsz2+1); in findStereoCorrespondenceBM_SSE2()
356 htext = (int*)alignPtr((int*)(hsad0 + (height+dy1)*ndisp) + wsz2 + 2, ALIGN); in findStereoCorrespondenceBM_SSE2()
357 cbuf0 = (uchar*)alignPtr((uchar*)(htext + height + wsz2 + 2) + dy0*ndisp, ALIGN); in findStereoCorrespondenceBM_SSE2()
364 memset( htext - wsz2 - 1, 0, (height + wsz + 1)*sizeof(htext[0]) ); in findStereoCorrespondenceBM_SSE2()
366 for( x = -wsz2-1; x < wsz2; x++ ) in findStereoCorrespondenceBM_SSE2()
368 hsad = hsad0 - dy0*ndisp; cbuf = cbuf0 + (x + wsz2 + 1)*cstep - dy0*ndisp; in findStereoCorrespondenceBM_SSE2()
405 int x0 = x - wsz2 - 1, x1 = x + wsz2; in findStereoCorrespondenceBM_SSE2()
406 const uchar* cbuf_sub = cbuf0 + ((x0 + wsz2 + 1) % (wsz + 1))*cstep - dy0*ndisp; in findStereoCorrespondenceBM_SSE2()
407 cbuf = cbuf0 + ((x1 + wsz2 + 1) % (wsz + 1))*cstep - dy0*ndisp; in findStereoCorrespondenceBM_SSE2()
437 for( y = dy1; y <= wsz2; y++ ) in findStereoCorrespondenceBM_SSE2()
439 for( y = -wsz2-1; y < -dy0; y++ ) in findStereoCorrespondenceBM_SSE2()
444 sad[d] = (ushort)(hsad0[d-ndisp*dy0]*(wsz2 + 2 - dy0)); in findStereoCorrespondenceBM_SSE2()
447 for( y = 1 - dy0; y < wsz2; y++, hsad += ndisp ) in findStereoCorrespondenceBM_SSE2()
460 for( y = -wsz2-1; y < wsz2; y++ ) in findStereoCorrespondenceBM_SSE2()
467 hsad = hsad0 + MIN(y + wsz2, height+dy1-1)*ndisp; in findStereoCorrespondenceBM_SSE2()
468 hsad_sub = hsad0 + MAX(y - wsz2 - 1, -dy0)*ndisp; in findStereoCorrespondenceBM_SSE2()
503 tsum += htext[y + wsz2] - htext[y - wsz2 - 1]; in findStereoCorrespondenceBM_SSE2()
575 int wsz = state.SADWindowSize, wsz2 = wsz/2; in findStereoCorrespondenceBM() local
576 int dy0 = MIN(_dy0, wsz2+1), dy1 = MIN(_dy1, wsz2+1); in findStereoCorrespondenceBM()
613 htext = (int*)alignPtr((int*)(hsad0 + (height+dy1)*ndisp) + wsz2 + 2, ALIGN); in findStereoCorrespondenceBM()
614 cbuf0 = (uchar*)alignPtr((uchar*)(htext + height + wsz2 + 2) + dy0*ndisp, ALIGN); in findStereoCorrespondenceBM()
621 memset( htext - wsz2 - 1, 0, (height + wsz + 1)*sizeof(htext[0]) ); in findStereoCorrespondenceBM()
623 for( x = -wsz2-1; x < wsz2; x++ ) in findStereoCorrespondenceBM()
625 hsad = hsad0 - dy0*ndisp; cbuf = cbuf0 + (x + wsz2 + 1)*cstep - dy0*ndisp; in findStereoCorrespondenceBM()
671 int x0 = x - wsz2 - 1, x1 = x + wsz2; in findStereoCorrespondenceBM()
672 const uchar* cbuf_sub = cbuf0 + ((x0 + wsz2 + 1) % (wsz + 1))*cstep - dy0*ndisp; in findStereoCorrespondenceBM()
673 cbuf = cbuf0 + ((x1 + wsz2 + 1) % (wsz + 1))*cstep - dy0*ndisp; in findStereoCorrespondenceBM()
712 for( y = dy1; y <= wsz2; y++ ) in findStereoCorrespondenceBM()
714 for( y = -wsz2-1; y < -dy0; y++ ) in findStereoCorrespondenceBM()
719 sad[d] = (int)(hsad0[d-ndisp*dy0]*(wsz2 + 2 - dy0)); in findStereoCorrespondenceBM()
722 for( y = 1 - dy0; y < wsz2; y++, hsad += ndisp ) in findStereoCorrespondenceBM()
742 for( y = -wsz2-1; y < wsz2; y++ ) in findStereoCorrespondenceBM()
749 hsad = hsad0 + MIN(y + wsz2, height+dy1-1)*ndisp; in findStereoCorrespondenceBM()
750 hsad_sub = hsad0 + MAX(y - wsz2 - 1, -dy0)*ndisp; in findStereoCorrespondenceBM()
818 tsum += htext[y + wsz2] - htext[y - wsz2 - 1]; in findStereoCorrespondenceBM()
905 int wsz2 = wsz/2; in ocl_stereobm() local
925 Rect roi = Rect(Point(wsz2 + mindisp + ndisp - 1, wsz2), Point(cols-wsz2-mindisp, rows-wsz2) ); in ocl_stereobm()