DCT

Greetings,

I am going thru’ the DCT code in the SDK samples and noticed that the integer coordinates are incremented by 0.5f then passed to Tex2D() .
The texture refence was set up as cudaFilterModePoint.
What is the purpose of this +0.5f?
Does it invoke a filtering function, such as interpolating the value of a half-texel?

Regards

Off the top of my head, the texture interpolant is notionally “cell-centred”, so that the data value is presumed to lie at the centroid of the unit length/area/volume. Adding 0.5 to any coordinate centers the interpolant so it will report the correct value.