JPEG Compression in CUDA

Hi,

I am currently looking in to the possibilities of implementating JPEG compression using CUDA .I saw many queries on this topic, but I couldnt find any implementation. It would be very helpful if anyone can provide source code that can assist me in jpeg compression using GPU.

NVIDIA performance primitives has DCT functions

I am getting error while calling NPP API nppiDCTQuantFwd8x8LS_JPEG_8u16s_C1R.

The error is NPP_TEXTURE_BIND_ERROR. I couldnt find anything from NPP documents.