Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to decode lossless jpeg with the format of "num_components == 2 and color space == JCS_UNKNOWN" #5560

Open
1 task done
yayaxinyu opened this issue Jul 12, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@yayaxinyu
Copy link

Describe the question.

Describe the question.

num_components == 2 and color space == JCS_UNKNOWN

Is there any way for nvJPEG to support lossless jpeg decode with the format of num_components == 2 and color space == JCS_UNKNOWN ?
JCS_UNKNOWN was defined by libjpeg-turbo.

num_components == 1 and color space == JCS_GRAYSCALE

I have already used nvJPEG to decoded losslesss jpeg with the format of 1 components and gray color space, as the official sample as below:

And it can decoded successfully with nvJPEG.

Check for duplicates

  • I have searched the open bugs/issues and have found no duplicates for this bug report
@yayaxinyu yayaxinyu added the question Further information is requested label Jul 12, 2024
@JanuszL JanuszL assigned jantonguirao and unassigned awolant Jul 12, 2024
@zohebk-nv
Copy link

nvjpeg can support 2 component lossless jpeg files as long as both the components use the same huffman table

@yayaxinyu
Copy link
Author

So, is there any example about generate the 2 component lossless jpeg file that both the components use the same huffman table?
I'm not very clear how to use libjpeg-turbo to generate it, I just write a simple c++ demo about generate a 2 component jpeg file with libjpeg-turbo, but nvjpeg can't decode it correctly.
And, with the url below, it only show the way to generate 1 component jpeg file.
https://github.com/NVIDIA/DALI_extra/blob/v1.39.0/db/single/reference/jpeg_lossless/generating.py

@zohebk-nv
Copy link

I tried to create a sample lossless jpeg file with lossless libjpeg-turbo for a 3 channel and it was using a single huffman table. Would it be possible for you share the 2 channel lossless jpeg file that nvjpeg fails to decode and also the c++ demo? I can take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants