Changeset 30341
- Timestamp:
- Jan 22, 2011, 11:55:36 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/psLib/src/imageops/psImageConvolve.c
r30299 r30341 275 275 float threshold = sumKernel * (1.0 - frac); // Threshold for truncation 276 276 277 int truncateRadius = maxSize; // Truncation radius 278 bool truncate = false; 279 277 280 // Find truncation size 278 int truncate = 0; // Truncation radius 279 for (int radius = 1; truncate == 0 && radius < maxSize; radius++) { 281 for (int radius = 1; !truncate && (radius < maxSize); radius++) { 280 282 int uMin = PS_MAX(-radius, xMin); 281 283 int uMax = PS_MIN(radius, xMax); … … 293 295 } 294 296 } 297 // This is the truncation radius 295 298 if (sum > threshold) { 296 // This is the truncation radius 297 truncate = radius; 298 } 299 } 300 if (truncate == maxSize) { 301 // No truncation possible 299 truncate = true; 300 truncateRadius = radius; 301 } 302 } 303 304 // Do nothing if no truncation is possible 305 if (!truncate) { 302 306 return true; 303 307 }
Note:
See TracChangeset
for help on using the changeset viewer.
