Lines Matching refs:dy0
183 int dy0 = MIN(_dy0, wsz2+1), dy1 = MIN(_dy1, wsz2+1);
204 int cstep = (height + dy0 + dy1)*ndisp;
210 hsad0 = (ushort*)cvAlignPtr(sad + ndisp + 1 + dy0*ndisp);
212 cbuf0 = (uchar*)cvAlignPtr(htext + height + wsz2 + 2 + dy0*ndisp);
218 memset( hsad0 - dy0*ndisp, 0, (height + dy0 + dy1)*ndisp*sizeof(hsad0[0]) );
223 hsad = hsad0 - dy0*ndisp; cbuf = cbuf0 + (x + wsz2 + 1)*cstep - dy0*ndisp;
224 lptr = lptr0 + MIN(MAX(x, -lofs), width-lofs-1) - dy0*sstep;
225 rptr = rptr0 + MIN(MAX(x, -rofs), width-rofs-1) - dy0*sstep;
227 for( y = -dy0; y < height + dy1; y++, hsad += ndisp, cbuf += ndisp, lptr += sstep, rptr += sstep )
253 const uchar* cbuf_sub = cbuf0 + ((x0 + wsz2 + 1) % (wsz + 1))*cstep - dy0*ndisp;
254 uchar* cbuf = cbuf0 + ((x1 + wsz2 + 1) % (wsz + 1))*cstep - dy0*ndisp;
255 hsad = hsad0 - dy0*ndisp;
256 lptr_sub = lptr0 + MIN(MAX(x0, -lofs), width-1-lofs) - dy0*sstep;
257 lptr = lptr0 + MIN(MAX(x1, -lofs), width-1-lofs) - dy0*sstep;
258 rptr = rptr0 + MIN(MAX(x1, -rofs), width-1-rofs) - dy0*sstep;
260 for( y = -dy0; y < height + dy1; y++, cbuf += ndisp, cbuf_sub += ndisp,
286 for( y = -wsz2-1; y < -dy0; y++ )
287 htext[y] = htext[-dy0];
291 sad[d] = (ushort)(hsad0[d-ndisp*dy0]*(wsz2 + 2 - dy0));
293 hsad = hsad0 + (1 - dy0)*ndisp;
294 for( y = 1 - dy0; y < wsz2; y++, hsad += ndisp )
306 hsad_sub = hsad0 + MAX(y - wsz2 - 1, -dy0)*ndisp;
391 int dy0 = MIN(_dy0, wsz2+1), dy1 = MIN(_dy1, wsz2+1);
411 int cstep = (height+dy0+dy1)*ndisp;
416 hsad0 = (int*)cvAlignPtr(sad + ndisp + 1 + dy0*ndisp);
418 cbuf0 = (uchar*)cvAlignPtr(htext + height + wsz2 + 2 + dy0*ndisp);
424 memset( hsad0 - dy0*ndisp, 0, (height + dy0 + dy1)*ndisp*sizeof(hsad0[0]) );
429 hsad = hsad0 - dy0*ndisp; cbuf = cbuf0 + (x + wsz2 + 1)*cstep - dy0*ndisp;
430 lptr = lptr0 + MIN(MAX(x, -lofs), width-lofs-1) - dy0*sstep;
431 rptr = rptr0 + MIN(MAX(x, -rofs), width-rofs-1) - dy0*sstep;
433 for( y = -dy0; y < height + dy1; y++, hsad += ndisp, cbuf += ndisp, lptr += sstep, rptr += sstep )
459 const uchar* cbuf_sub = cbuf0 + ((x0 + wsz2 + 1) % (wsz + 1))*cstep - dy0*ndisp;
460 uchar* cbuf = cbuf0 + ((x1 + wsz2 + 1) % (wsz + 1))*cstep - dy0*ndisp;
461 hsad = hsad0 - dy0*ndisp;
462 lptr_sub = lptr0 + MIN(MAX(x0, -lofs), width-1-lofs) - dy0*sstep;
463 lptr = lptr0 + MIN(MAX(x1, -lofs), width-1-lofs) - dy0*sstep;
464 rptr = rptr0 + MIN(MAX(x1, -rofs), width-1-rofs) - dy0*sstep;
466 for( y = -dy0; y < height + dy1; y++, cbuf += ndisp, cbuf_sub += ndisp,
482 for( y = -wsz2-1; y < -dy0; y++ )
483 htext[y] = htext[-dy0];
487 sad[d] = (int)(hsad0[d-ndisp*dy0]*(wsz2 + 2 - dy0));
489 hsad = hsad0 + (1 - dy0)*ndisp;
490 for( y = 1 - dy0; y < wsz2; y++, hsad += ndisp )
502 hsad_sub = hsad0 + MAX(y - wsz2 - 1, -dy0)*ndisp;