PDA

View Full Version : Run Length Encoding implementation on GPU?



WatchAndLearn
10-15-2011, 09:16 AM
hello:
I want to use RLE to compress an image in GPU. Does anyone know how to implement a GPU RLE algorithm using GLSL? Any references?thx:)

Alfonse Reinheart
10-15-2011, 12:14 PM
I want to use RLE to compress an image in GPU.

Why? GPUs only excel at tasks that are very parallelizable. And RLE is not a very parallelizable algorithm. You will likely get nothing out of putting this on the GPU.

trinitrotoluene
10-15-2011, 06:59 PM
There is a very small paper (http://www.google.ca/url?sa=t&source=web&cd=5&sqi=2&ved=0CEoQFjAE&url=h ttp%3A%2F%2Ftesla.rcub.bg.ac.rs%2F~taucet%2Fdocs%2 Fpapers%2FHIPEAC-ShortPaper-AnaBalevic.pdf&rct=j&q=run%20length%20encoding%20o n%20gpu&ei=EjSaTtmADsnL0QHm79nYBA&usg=AFQjCNFwir1R GNumaG0XPBFWtV5EIVX17Q) about parallel run length encoding using cuda. The paper suggest to use parallel reduction for summing. But if I read well the speedup given in the paper, it is only 4 times faster on gpu with variable length encoding using shared memory. Using global memory, the performance is worst on GPU.

WatchAndLearn
10-15-2011, 09:25 PM
I want to use RLE to compress an image in GPU.

Why? GPUs only excel at tasks that are very parallelizable. And RLE is not a very parallelizable algorithm. You will likely get nothing out of putting this on the GPU.

thanks a lot. I just accelerate the RLE process and read back a compressed image from GPU.

WatchAndLearn
10-15-2011, 09:29 PM
There is a very small paper (http://www.google.ca/url?sa=t&source=web&cd=5&sqi=2&ved=0CEoQFjAE&url=h ttp%3A%2F%2Ftesla.rcub.bg.ac.rs%2F~taucet%2Fdocs%2 Fpapers%2FHIPEAC-ShortPaper-AnaBalevic.pdf&rct=j&q=run%20length%20encoding%20o n%20gpu&ei=EjSaTtmADsnL0QHm79nYBA&usg=AFQjCNFwir1R GNumaG0XPBFWtV5EIVX17Q) about parallel run length encoding using cuda. The paper suggest to use parallel reduction for summing. But if I read well the speedup given in the paper, it is only 4 times faster on gpu with variable length encoding using shared memory. Using global memory, the performance is worst on GPU.

thank you, I will consider the CUDA solution.