0

I have a project where I should implement JPEG on a GPU.

Can anyone tell me where to start and how should I implement the algorithm?

I have installed Python, PyOpenCL and PyOpenGL. I also have Code Blocks and Microsoft Visual Studio.

krlzlx
  • 5,752
  • 14
  • 47
  • 55
Beginner1111
  • 41
  • 1
  • 9
  • What is your goal and what exactly have you tried so far? Are you having difficulties with understanding the JPEG compression algorithm in general, or with a specific part in your code? Also, are the images that will be compressed as a JPEG coming from a scene you are rendering in pyopengl, or are you passing in images to be compressed? – CodeSurgeon Nov 02 '16 at 04:11
  • Theoretical approach is given every where. There are like a bunch of papers. But the problem is implementation on GPU. First of all how to write a code that works on GPU. Secondly, I need something that describes the algorithm well with detailed explanation or at least on DWT. It will really help and Thankyou in advance. – Beginner1111 Nov 02 '16 at 08:18
  • Not sure if you already saw [this](http://www.whydomath.org/node/wavlets/basicjpg.html) site, but if you are fine with JPEG instead of JPEG2000, then you can use the DCT (Discrete Cosine Transform) instead. The special matrix you use to multiply each 8x8 block is found under a link in step 2. – CodeSurgeon Nov 02 '16 at 16:09

1 Answers1

1

If you want to implement JPEG 2000 on CUDA, you may want to take a look at existing implementations such as CUJ2K (http://cuj2k.sourceforge.net/), or the one by the Applications Department at Poznan (http://apps.man.poznan.pl/trac/jpeg2k/browser).

However, be aware that the JPEG 2000 standard is quite complex. Given the chance, you may want to go for JPEG. In that case, as answered in this thread,

The NPP library includes building block routines for implementing a JPEG codec. It is included as part of the CUDA distribution. Check out the JpegNPP sample in the SDK: http://docs.nvidia.com/cuda/cuda-samples/

Community
  • 1
  • 1
mhernandez
  • 607
  • 5
  • 14