diff --git a/libsrc/mosaicing/nohalo.cpp b/libsrc/mosaicing/nohalo.cpp index 240b741b..6552095a 100644 --- a/libsrc/mosaicing/nohalo.cpp +++ b/libsrc/mosaicing/nohalo.cpp @@ -778,8 +778,30 @@ vips_interpolate_nohalo_interpolate( VipsInterpolate *interpolate, printf( "\tother_x = %d, other_y = %d\n", other_x, other_y ); printf( "\tp = %p, q = %p\n", p, q ); + printf( "\tshift_1_pixel = %s, shift_1_row = %s\n", + shift_1_pixel, shift_1_row ); #endif /*DEBUG*/ +{ + /* Top-left corner of our window. + */ + const PEL * restrict tl = + (PEL *) IM_REGION_ADDR( in, ix - 2, iy - 2 ); + + /* Bottom-right corner of our window. + */ + const PEL * restrict br = + (PEL *) IM_REGION_ADDR( in, ix + 2, iy + 2 ); + + /* Last pixel we address. + */ + const PEL * restrict last = p + 4 * shift_1_pixel + 4 * shift_1_row; + + g_assert( last >= tl ); + g_assert( last <= br ); + +} + switch( in->im->BandFmt ) { /* case IM_BANDFMT_UCHAR: