165 |
src = image->y; |
src = image->y; |
166 |
|
|
167 |
for (i = 0; i < EDGE_SIZE; i++) { |
for (i = 0; i < EDGE_SIZE; i++) { |
168 |
// if interlacing, edges contain top-most data from each field |
/* // if interlacing, edges contain top-most data from each field |
169 |
if (interlacing && (i & 1)) { |
if (interlacing && (i & 1)) { |
170 |
memset(dst, *(src + edged_width), EDGE_SIZE); |
memset(dst, *(src + edged_width), EDGE_SIZE); |
171 |
memcpy(dst + EDGE_SIZE, src + edged_width, width); |
memcpy(dst + EDGE_SIZE, src + edged_width, width); |
172 |
memset(dst + edged_width - EDGE_SIZE, |
memset(dst + edged_width - EDGE_SIZE, |
173 |
*(src + edged_width + width - 1), EDGE_SIZE); |
*(src + edged_width + width - 1), EDGE_SIZE); |
174 |
} else { |
} else {*/ |
175 |
memset(dst, *src, EDGE_SIZE); |
memset(dst, *src, EDGE_SIZE); |
176 |
memcpy(dst + EDGE_SIZE, src, width); |
memcpy(dst + EDGE_SIZE, src, width); |
177 |
memset(dst + edged_width - EDGE_SIZE, *(src + width - 1), |
memset(dst + edged_width - EDGE_SIZE, *(src + width - 1), |
178 |
EDGE_SIZE); |
EDGE_SIZE); |
179 |
} |
/*}*/ |
180 |
dst += edged_width; |
dst += edged_width; |
181 |
} |
} |
182 |
|
|
189 |
|
|
190 |
src -= edged_width; |
src -= edged_width; |
191 |
for (i = 0; i < EDGE_SIZE; i++) { |
for (i = 0; i < EDGE_SIZE; i++) { |
192 |
// if interlacing, edges contain bottom-most data from each field |
/* // if interlacing, edges contain bottom-most data from each field |
193 |
if (interlacing && !(i & 1)) { |
if (interlacing && !(i & 1)) { |
194 |
memset(dst, *(src - edged_width), EDGE_SIZE); |
memset(dst, *(src - edged_width), EDGE_SIZE); |
195 |
memcpy(dst + EDGE_SIZE, src - edged_width, width); |
memcpy(dst + EDGE_SIZE, src - edged_width, width); |
196 |
memset(dst + edged_width - EDGE_SIZE, |
memset(dst + edged_width - EDGE_SIZE, |
197 |
*(src - edged_width + width - 1), EDGE_SIZE); |
*(src - edged_width + width - 1), EDGE_SIZE); |
198 |
} else { |
} else {*/ |
199 |
memset(dst, *src, EDGE_SIZE); |
memset(dst, *src, EDGE_SIZE); |
200 |
memcpy(dst + EDGE_SIZE, src, width); |
memcpy(dst + EDGE_SIZE, src, width); |
201 |
memset(dst + edged_width - EDGE_SIZE, *(src + width - 1), |
memset(dst + edged_width - EDGE_SIZE, *(src + width - 1), |
202 |
EDGE_SIZE); |
EDGE_SIZE); |
203 |
} |
/*}*/ |
204 |
dst += edged_width; |
dst += edged_width; |
205 |
} |
} |
206 |
|
|