diff --git a/src/libOpenImageIO/imagebufalgo_xform.cpp b/src/libOpenImageIO/imagebufalgo_xform.cpp index e735a46995..c72f1b187a 100644 --- a/src/libOpenImageIO/imagebufalgo_xform.cpp +++ b/src/libOpenImageIO/imagebufalgo_xform.cpp @@ -1185,16 +1185,16 @@ st_warp_(ImageBuf& dst, const ImageBuf& src, const ImageBuf& stbuf, int chan_s, const int filterrad_x = (int)ceilf(filter->width() / 2.0f / xscale); const int filterrad_y = (int)ceilf(filter->height() / 2.0f / yscale); - ImageBuf::ConstIterator src_iter(src); - ImageBuf::ConstIterator st_iter(stbuf, roi); - ImageBuf::Iterator out_iter(dst, roi); - // Accumulation buffer for filter samples, typed to maintain the // necessary precision. typedef typename Accum_t::type Acc_t; const int nchannels = roi.chend - roi.chbegin; Acc_t* sample_accum = OIIO_ALLOCA(Acc_t, nchannels); + ImageBuf::ConstIterator src_iter(src); + ImageBuf::ConstIterator st_iter(stbuf, roi); + ImageBuf::Iterator out_iter(dst, roi); + // The ST buffer defines the output dimensions, and thus the bounds of // the outer loop. // XXX: Sampling of the source buffer can be entirely random, so there