Hello.
I have noticed that there is a question in implementing the Jpeg Encoder by referring to the jpegNPP sample code in the CUDA Toolkit.
We are using the Nvidia GPU to develop a process of HEVC decoding → jpeg encoding using NPP lib,
There is a problem that the result image of the jpeg encoder using NPP is slightly different from the original image.
I was able to check the following facts during various tests.
1. Perform jpeg decoding → jpeg encoding with jpegNPP (sample code)
: obtain the same image as the original
2. hevc decoding (using Nvidia Video SDK API) → jpegNPP Refer to the sample code and perform jpeg encoding:
: obtain a slightly brighter image than the original.
3. Dump the raw pixel which is decoded by hevc decoder
: obtain the same image as the original
4. Dump the raw pixel after jpeg decoding within jpegNPP(sample code)
: obtain a slightly brighter image than the original.
(The original used here is a 4096x4096 jpeg file, and the image used for hevc decoding was converted to jpeg-> hevc using ffmpeg libx265.)
I guess that there is a problem with the coefficients of the DCT in the NPP library.
If possible, I would like to ask you to check the above, and if it have an issue in the NPP library, could I ask for an update library?
Please leave an answer if you have any data or questions you need for analysis!
Thank you.