NPP jpeg compression doesn't work if resulting jpeg is > 1 MB

Easy to reproduce:

Take jpegNPP program from cuda v5.5 samples, try to run it on a jpeg file which is larger than 1 MB.
Use large scale, so the jpeg will not go under 1MB. I used scale of 0.95 because scale 1.0 doesn’t work.

If resulting jpeg should be greater than 1 MB then the resulting file will be very small and corrupted.

The problem seems to be in nppiEncodeHuffmanScan_JPEG_8u16s_P3R. Returned scan length is too small.

For files just below 1MB it works fine.


I would suggest filing a bug report via the bug reporting form linked from the registered developer website, and attaching a self-contained repro app. Thanks.


Also nppiEncodeHuffmanScan_JPEG_8u16s_P1R has same issue: if the size of the output > 1048576 bytes, then it returns garbage.

Thanks for filing the bug. It would be helpful if you could update the bug report with any additional observations you may have. Thank you for your help.

Where can I update the bug report? All I can find about bug reports is this page: but there’s no update option available.

Sorry, I never use the bug database from the outside, so I am not sure how that works. I see updates to bugs filed by customers, so there must be a way to update given the bug number.

I just tested this with CUDA 6.0 and it seems it was fixed.

Thank you!!!

Was this other JPEG bugfixed too?

As far as I know, it used to be the case that customers were notified when their filed bugs have been fixed. I am not up to date on how the various teams handle customer bugs reports these days. If you filed a bug report and have not received notification that the bug is fixed in CUDA 6.0 that could mean the issue has not been addressed yet.

I will use this occasion to mention again that the forums are designed to facilitate a programmer community (“users helping users”). Bugs and requests for enhancements should be filed using the bug reporting form linked from the registered developer website, and in the case of bugs be accompanied by self-contained repro code. Thank you for your help in improving the CUDA platform by filing bug reports.