Home | History | Annotate | Download | only in mosaic

Lines Matching refs:scr

148 void PyramidShort::BorderExpandOdd(PyramidShort *in, PyramidShort *out, PyramidShort *scr,
157 for (i = -scr->border; i < scr->width + scr->border; i++) {
158 scr->ptr[j2][i] = (short)
160 scr->ptr[j2+1][i] = (short)((in->ptr[j][i] + in->ptr[j+1][i] + 1) >> 1);
164 BorderSpread(scr, 0, 0, 3, 3);
167 for (i = -off; i < scr->width + off; i++) {
171 (mode * ((6 * scr->ptr[j][i] +
172 scr->ptr[j][i-1] + scr->ptr[j][i+1] + 4) >> 3)));
174 (mode * ((scr->ptr[j][i] + scr->ptr[j][i+1] + 1) >> 1)));
183 PyramidShort *scr = allocateImage(pyr[1].width, pyr[0].height, pyr->border);
184 if (scr == NULL) return 0;
189 scr->width = tpyr[0].width;
190 scr->height = tpyr[-1].height;
191 BorderExpandOdd(tpyr, tpyr - 1, scr, 1);
197 scr->width = pyr[0].width;
198 scr->height = pyr[-1].height;
199 BorderExpandOdd(pyr, pyr - 1, scr, -1);
203 freeImage(scr);
207 void PyramidShort::BorderReduceOdd(PyramidShort *in, PyramidShort *out, PyramidShort *scr)
211 int off = scr->border - 2;
212 s = scr->ptr[-scr->border] - (off >> 1);
213 ns = s + scr->pitch;
214 ls = scr->ptr[scr->height + scr->border - 1] + scr->pitch - (off >> 1);
215 int width = scr->width + scr->border;
216 p = in->ptr[-scr->border] - off;
220 for (; s < ls; s = ns, ns += scr->pitch, p = np, np += in->pitch) {
228 BorderSpread(scr, 5, 4 + ((in->width ^ 1) & 1), 0, 0); //
233 p = scr->ptr[-off] - out->border;
234 int pitch = scr->pitch;
250 PyramidShort *scr = allocateImage(pyr[1].width, pyr[0].height, pyr->border);
251 if (scr == NULL)
256 BorderReduceOdd(pyr, pyr + 1, scr);
258 scr->width = pyr[1].width;
259 scr->height = pyr[0].height;
262 freeImage(scr);