Skip to content

Commit bc12142

Browse files
committed
Use sample accumulator type for source/dest iterator USERT
1 parent 7ff7c8a commit bc12142

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libOpenImageIO/imagebufalgo_xform.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1185,16 +1185,16 @@ st_warp_(ImageBuf& dst, const ImageBuf& src, const ImageBuf& stbuf, int chan_s,
11851185
const int filterrad_x = (int)ceilf(filter->width() / 2.0f / xscale);
11861186
const int filterrad_y = (int)ceilf(filter->height() / 2.0f / yscale);
11871187

1188-
ImageBuf::ConstIterator<SRCTYPE> src_iter(src);
1189-
ImageBuf::ConstIterator<STTYPE> st_iter(stbuf, roi);
1190-
ImageBuf::Iterator<DSTTYPE> out_iter(dst, roi);
1191-
11921188
// Accumulation buffer for filter samples, typed to maintain the
11931189
// necessary precision.
11941190
typedef typename Accum_t<DSTTYPE>::type Acc_t;
11951191
const int nchannels = roi.chend - roi.chbegin;
11961192
Acc_t* sample_accum = OIIO_ALLOCA(Acc_t, nchannels);
11971193

1194+
ImageBuf::ConstIterator<SRCTYPE, Acc_t> src_iter(src);
1195+
ImageBuf::ConstIterator<STTYPE> st_iter(stbuf, roi);
1196+
ImageBuf::Iterator<DSTTYPE, Acc_t> out_iter(dst, roi);
1197+
11981198
// The ST buffer defines the output dimensions, and thus the bounds of
11991199
// the outer loop.
12001200
// XXX: Sampling of the source buffer can be entirely random, so there

0 commit comments

Comments
 (0)