Changeset 19129 for trunk/psLib/test/imageops/tap_psImageInterpolate2.c
- Timestamp:
- Aug 19, 2008, 6:06:31 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/test/imageops/tap_psImageInterpolate2.c
r12812 r19129 86 86 87 87 for (int i = 0; i < num; i++) { 88 float x = psRandomUniform(rng) * xSize;89 float y = psRandomUniform(rng) * ySize;88 float x = psRandomUniform(rng) * (xSize - 1); 89 float y = psRandomUniform(rng) * (ySize - 1); 90 90 91 91 // Values from interpolation … … 93 93 psMaskType maskVal; 94 94 95 bool success = psImageInterpolate(&imageVal, &varianceVal, &maskVal, x, y, interp);96 ok(s uccess, "Interpolation at %.2f,%.2f", x, y);97 skip_start( !success, 1, "Interpolation failed");95 psImageInterpolateStatus status = psImageInterpolate(&imageVal, &varianceVal, &maskVal, x, y, interp); 96 ok(status != PS_INTERPOLATE_STATUS_ERROR, "Interpolation at %.2f,%.2f (%x)", x, y, status); 97 skip_start(status == PS_INTERPOLATE_STATUS_ERROR, 1, "Interpolation failed"); 98 98 99 99 int xCentral, yCentral; // Central pixel of interpolation … … 112 112 if (xCentral - (xKernel - 1) / 2 < 0 || xCentral + xKernel / 2 > xSize - 1 || 113 113 yCentral - (yKernel - 1) / 2 < 0 || yCentral + yKernel / 2 > ySize - 1) { 114 ok(isnan(imageVal), "Interpolation = %f vs NAN (border)", imageVal); 114 ok(status == PS_INTERPOLATE_STATUS_BAD || status == PS_INTERPOLATE_STATUS_POOR, 115 "Interpolation at border"); 115 116 } else { 116 117 is_double_tol(imageVal, imageFunc(x, y), tol, "Interpolation = %f vs %f",
Note:
See TracChangeset
for help on using the changeset viewer.
