Error! Jpeg Compression using NPP

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.

I appreciate any help people can give.

Hi Avatar3D,

I think your problem may be a consequence of our incomplete documentation of the JPEG functions. Here’s what I think is going wrong. Internally we bind the quantization table to a texture which simplifies accessing this data in the kernel code. This texture bind is the only thing that can cause the error code you’re seeing.

The way the nppi JPEG functions work is, that the quantization table creation methods assume HOST POINTERS. The DCT and iDCT functions do exptect those tables given as DEVICE POINTERS though. It is up to the user to create the tables on the host and then do a cudaMemcpy(…) to move the quantization tables to device memory.

If this is what you’re already doing, I would have to get some code from you that would let me reproduce the issue here, so I can investigate.

–Frank

Thanks Frank. The API returns NPP_NO_ERROR.

But the output doesn’t seems similar to CPU version.

Can you please provide some samples on JPEG compression using NPP ?

At this point I only have unit test code that is not very instructive. I’d propose we take this off the formum and try to figure out why the primitive doesn’t produce the correct result in your application; my unit tests say that it works correctly (well at least for the cases we’re testing).

I would find this quite useful as well, although I am more interested in jpeg decompression. :))