BiCubic Intepol hardware oprerator for bicubic interpol

Hello,

I want to use the hardware operator for BiCubic interpol like the BiLinear Interpol (tex2D(tex, i, j); and tex.filterMode = cudaFilterModeLinear;).

There is the cudaFilterModeLinear and cudaFilterModePoint but not the cudaFilterModeCubic !!!

Would you have a solution ?

Thanks for your help.

PS : I know how to do it in the software way but this is not what I am looking for.

All you can do is hope that the shortly forthcoming CUDA 2.0 beta includes cubic interpolation. If not, your only option is to do it yourself in the kernel.

The texture hardware doesn’t support bicubic interpolation, but it is possible to compose a cubic filter out of 4 bilinear lookups:

http://developer.download.nvidia.com/SDK/9…s2_ch20_SDK.pdf

I guess this might be a nice sample to add to the SDK.

Thanks,

Looking forward to trying Cuda 2.0

i tryed the GEM2 sample but the results were false, or the approximations weren’t precise enough for my implemantation.

Yes, the only problem with this technique is that the texture coordinates only have 9 bits of fractional position in the hardware. If you want more accurate results you will have to do 16 texture lookups.

Btw, Lanczos interpolation isn’t too hard to do. It’s not especially hardware accelerated, but the results are more accurate than cubic anyway.

Have a look at the RenderMan interface specfication, its addition includes some useful code.