Home | History | Annotate | Download | only in mosaic

Lines Matching defs:scr

148 void PyramidShort::BorderExpandOdd(PyramidShort *in, PyramidShort *out, PyramidShort *scr,
157 int limit = scr->width + scr->border;
158 for (i = -scr->border; i < limit; i++) {
161 scr->ptr[j2][i] = (short)
163 scr->ptr[j2+1][i] = (short)((t1 + t2 + 1) >> 1);
167 BorderSpread(scr, 0, 0, 3, 3);
172 for (i = -off; i < scr->width + off; i++) {
174 int t1 = scr->ptr[j][i];
175 int t2 = scr->ptr[j][i+1];
178 scr->ptr[j][i-1] + t2 + 4) >> 3)));
189 PyramidShort *scr = allocateImage(pyr[1].width, pyr[0].height, pyr->border);
190 if (scr == NULL) return 0;
195 scr->width = tpyr[0].width;
196 scr->height = tpyr[-1].height;
197 BorderExpandOdd(tpyr, tpyr - 1, scr, 1);
203 scr->width = pyr[0].width;
204 scr->height = pyr[-1].height;
205 BorderExpandOdd(pyr, pyr - 1, scr, -1);
209 freeImage(scr);
213 void PyramidShort::BorderReduceOdd(PyramidShort *in, PyramidShort *out, PyramidShort *scr)
217 int off = scr->border - 2;
218 s = scr->ptr[-scr->border] - (off >> 1);
219 ns = s + scr->pitch;
220 ls = scr->ptr[scr->height + scr->border - 1] + scr->pitch - (off >> 1);
221 int width = scr->width + scr->border;
222 p = in->ptr[-scr->border] - off;
226 for (; s < ls; s = ns, ns += scr->pitch, p = np, np += in->pitch) {
234 BorderSpread(scr, 5, 4 + ((in->width ^ 1) & 1), 0, 0); //
239 p = scr->ptr[-off] - out->border;
240 int pitch = scr->pitch;
256 PyramidShort *scr = allocateImage(pyr[1].width, pyr[0].height, pyr->border);
257 if (scr == NULL)
262 BorderReduceOdd(pyr, pyr + 1, scr);
264 scr->width = pyr[1].width;
265 scr->height = pyr[0].height;
268 freeImage(scr);