lossless JPEG fast decompression on CUDA
Hi all,


I'd like to know if some CUDA programmer has already tried to port jpeglib 6.0 (the most used lib for jpeg).

In other words, can one get very fast jpeg decompression on GPU ? I guess that the DCT part of decompression should fit quite well on CUDA architecture and Hoffmann counterpart shoul be the bottleneck. I'm I right ? Have you some clue about it ?

Many thanks

David
Hi all,





I'd like to know if some CUDA programmer has already tried to port jpeglib 6.0 (the most used lib for jpeg).



In other words, can one get very fast jpeg decompression on GPU ? I guess that the DCT part of decompression should fit quite well on CUDA architecture and Hoffmann counterpart shoul be the bottleneck. I'm I right ? Have you some clue about it ?



Many thanks



David

#1
Posted 10/11/2007 04:10 PM   
In my experience with porting codecs to CUDA (no, haven't done jpeg) you should make a split between the things the CPU is good in, like serial manipulation of bitstreams, and the things the GPU can do very fast, such as parallel transforms of data.

I suggest starting with the part you can obviously speed up (in this case, the DCT transform) then slowly trying to more things to the GPU, regularly benchmarking to see if it is still worth the trouble.
In my experience with porting codecs to CUDA (no, haven't done jpeg) you should make a split between the things the CPU is good in, like serial manipulation of bitstreams, and the things the GPU can do very fast, such as parallel transforms of data.



I suggest starting with the part you can obviously speed up (in this case, the DCT transform) then slowly trying to more things to the GPU, regularly benchmarking to see if it is still worth the trouble.

#2
Posted 10/11/2007 07:20 PM   
[quote name='wumpus' date='Oct 11 2007, 02:20 PM']In my experience with porting codecs to CUDA (no, haven't done jpeg)  ...
[right][snapback]263603[/snapback][/right]
[/quote]
Any chance you have looked at PNG compression? If so what sort of performance did you obtain?
[quote name='wumpus' date='Oct 11 2007, 02:20 PM']In my experience with porting codecs to CUDA (no, haven't done jpeg)  ...

[snapback]263603[/snapback]




Any chance you have looked at PNG compression? If so what sort of performance did you obtain?

#3
Posted 10/14/2007 04:52 PM   
I thought a long time ago there was some sort of JPEG acceleration built into graphics cards; if anyone finds a way to access it, please post it here! Thanks!
I thought a long time ago there was some sort of JPEG acceleration built into graphics cards; if anyone finds a way to access it, please post it here! Thanks!

#4
Posted 03/09/2009 01:22 AM   
[quote name='wildcat4096']
Any chance you have looked at PNG compression?
[/quote]

Curious about this: anyone know of PNG compression leveraging CUDA?
wildcat4096 said:

Any chance you have looked at PNG compression?





Curious about this: anyone know of PNG compression leveraging CUDA?

James Malcolm (email: malcolm - at - accelereyes.com)

Working on the ArrayFire and Jacket software platforms, and helping clients with custom development and training.

#5
Posted 03/19/2012 10:59 PM   
You can try using nvCUVID lib, it is meant to decode video streams but if you throw a singe JPEG frame ( starting at 0xFFD8 ) it will decode it and callback you with the resulting YUV_NV12 image.
You can try using nvCUVID lib, it is meant to decode video streams but if you throw a singe JPEG frame ( starting at 0xFFD8 ) it will decode it and callback you with the resulting YUV_NV12 image.

#6
Posted 03/24/2012 11:25 AM   
I can't find it in the documentation, but line 62 of cuviddec.h (CUDA 4.2) reveals support for the JPEG codec:

[code]
typedef enum cudaVideoCodec_enum {
cudaVideoCodec_MPEG1=0,
cudaVideoCodec_MPEG2,
cudaVideoCodec_MPEG4,
cudaVideoCodec_VC1,
cudaVideoCodec_H264,
cudaVideoCodec_JPEG, // <-----Line 62: JPEG codec defined in enumerated type 'cudaVideoCodec'
cudaVideoCodec_H264_SVC,
cudaVideoCodec_H264_MVC,
cudaVideoCodec_NumCodecs,
// Uncompressed YUV
cudaVideoCodec_YUV420 = (('I'<<24)|('Y'<<16)|('U'<<8)|('V')), // Y,U,V (4:2:0)
cudaVideoCodec_YV12 = (('Y'<<24)|('V'<<16)|('1'<<8)|('2')), // Y,V,U (4:2:0)
cudaVideoCodec_NV12 = (('N'<<24)|('V'<<16)|('1'<<8)|('2')), // Y,UV (4:2:0)
cudaVideoCodec_YUYV = (('Y'<<24)|('U'<<16)|('Y'<<8)|('V')), // YUYV/YUY2 (4:2:2)
cudaVideoCodec_UYVY = (('U'<<24)|('Y'<<16)|('V'<<8)|('Y')), // UYVY (4:2:2)
} cudaVideoCodec;
[/code]
I can't find it in the documentation, but line 62 of cuviddec.h (CUDA 4.2) reveals support for the JPEG codec:





typedef enum cudaVideoCodec_enum {

cudaVideoCodec_MPEG1=0,

cudaVideoCodec_MPEG2,

cudaVideoCodec_MPEG4,

cudaVideoCodec_VC1,

cudaVideoCodec_H264,

cudaVideoCodec_JPEG, // <-----Line 62: JPEG codec defined in enumerated type 'cudaVideoCodec'

cudaVideoCodec_H264_SVC,

cudaVideoCodec_H264_MVC,

cudaVideoCodec_NumCodecs,

// Uncompressed YUV

cudaVideoCodec_YUV420 = (('I'<<24)|('Y'<<16)|('U'<<8)|('V')), // Y,U,V (4:2:0)

cudaVideoCodec_YV12 = (('Y'<<24)|('V'<<16)|('1'<<8)|('2')), // Y,V,U (4:2:0)

cudaVideoCodec_NV12 = (('N'<<24)|('V'<<16)|('1'<<8)|('2')), // Y,UV (4:2:0)

cudaVideoCodec_YUYV = (('Y'<<24)|('U'<<16)|('Y'<<8)|('V')), // YUYV/YUY2 (4:2:2)

cudaVideoCodec_UYVY = (('U'<<24)|('Y'<<16)|('V'<<8)|('Y')), // UYVY (4:2:2)

} cudaVideoCodec;

#7
Posted 05/03/2012 10:19 AM   
I don't know about the lossless JPEG, but there is a talk about some JPEG at GTC 2012: "Fast JPEG Coding on the GPU" - http://tinyurl.com/87hr9hh

wumpus, do you still work on reverse engineering CUDA binaries? Did you look into Kepler? I can't get through the encoding of the dependency information :(
I don't know about the lossless JPEG, but there is a talk about some JPEG at GTC 2012: "Fast JPEG Coding on the GPU" - http://tinyurl.com/87hr9hh



wumpus, do you still work on reverse engineering CUDA binaries? Did you look into Kepler? I can't get through the encoding of the dependency information :(

#8
Posted 05/03/2012 08:20 PM   
Scroll To Top