Well, you definitely don't want to use Tile::at() as that does bounds checking.
Using tile[z][y][x] is relatively fast except that it's doing the pointer multiplies at each pixel - it's fastest to do organize the loop by channel (z) and initialize a pointer to the start of each line (y) and iterate across pre-incrementing the pointer. Not sure what a tile-per-pixel means relative to a tile-per-row - got a reference to that quote in the docs? -jonathan On Jun 6, 2012, at 5:00 AM, Stephen Newbold wrote: > Hi, > > I have a IOP that uses a largish tile to do some filtering. I'm looking to > do some basic optimisation to speed things up by skipping doing the filtering > on any back pixel. What's the most efficient way of checking the value of > the current pixel, which is also the centre value of my tile? > > My tile is the size of my entire row plus the width/height of the filter. > I'm iterating through each X value in the row, should I just directly access > the pixel from the tile with tile[z][y][x]. Or is there a more efficient way > of doing this? > > Also, in the docs there is talk of maybe creating a tile per pixel is faster > than a tile per row. Is there a clear distinction for when one is faster > than the other (ie. does tile size determine this)? > > Cheers, > Steve > > -- > Stephen Newbold > Compositing Lead - Film > MPC > 127 Wardour Street > Soho, London, W1F 0NL > Main - + 44 (0) 20 7434 3100 > www.moving-picture.com > > _______________________________________________ > Nuke-dev mailing list > [email protected], http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev _______________________________________________ Nuke-dev mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-dev
