Presentation is loading. Please wait.

Presentation is loading. Please wait.

Page 1 CS Department Parallel Design of JPEG2000 Image Compression Xiuzhen Huang CS Department UC Santa Barbara April 30th, 2003.

Similar presentations


Presentation on theme: "Page 1 CS Department Parallel Design of JPEG2000 Image Compression Xiuzhen Huang CS Department UC Santa Barbara April 30th, 2003."— Presentation transcript:

1 Page 1 CS Department Parallel Design of JPEG2000 Image Compression Xiuzhen Huang CS Department UC Santa Barbara April 30th, 2003

2 Page 2 CS Department Outline Introduction to image compression JPEG2000 compression scheme Parallel implementation of JPEG2000 – On distributed-memory multiprocessors – On shared-memory multiprocessors Conclusion

3 Page 3 CS Department Introduction to Image Compression Why do we need image compression? 1280 pixels 800 pixels 1280  800  3 (RGB) = 3 M bytes File size of a small digital photo without compression: To speedup the image transmission over Internet and reduce image storage space, we need compression

4 Page 4 CS Department Introduction to Image Compression Original Picture 3 M bytes JPEG2000 Compression 19 K bytes Compression Ratio: >150 times ! No noticeable difference in picture quality

5 Page 5 CS Department JPEG2000 International Standard JPEG2000: the new international standard for image compression, is much more efficient than the old JPEG international standard. For the same compression ratio / bit rate / file size, the JPEG2000 picture has much better quality. JPEGJPEG2000 Original Picture Compression ratio : 50:1 Strong blockiness

6 Page 6 CS Department JPEG2000 International Standard JPEG2000 has a much Higher computational complexity than JPEG, especially for larger pictures. Need parallel implementation to reduce compression time.

7 Page 7 CS Department JPEG2000 Compression Scheme Wavelet Transform Input Blockwise Partition Coding of each block Binary Compressed data Major steps of JPEG2000 image compression Wavelet transform uses most of the image compression time (>80%) parallel implementation should focus on wavelet transform

8 Page 8 CS Department JPEG2000 Compression Scheme Brief Introduction to Wavelet Transform Step 1: Horizontal wavelet transform of an image for each row do 1-D wavelet transform; end What is 1-D wavelet transform ?

9 Page 9 CS Department A simple example: 1-D Haar wavelet transform One array of image data [1, 1] [1, -1] 2 2 First half of the output Second half of the output JPEG2000 Compression Scheme Horizontal Wavelet Transform of Each Row Average of neighboring pixels Difference of neighboring pixels Low- Frequency coefficients High- Frequency coefficients Low High Low-pass filter high-pass filter Down-sample by 2

10 Page 10 CS Department JPEG2000 Compression Scheme Wavelet Transform Step 2: Vertical transform of image for each column of the new image do 1-D wavelet transform; end

11 Page 11 CS Department Horizontal Wavelet Transform of Each Row Low High Vertical Wavelet Transform of Each Column Low High Low High JPEG2000 Compression Scheme

12 Page 12 CS Department Parallel Design of JPEG2000 Compression Two Parallel Computing Architectures Shared-Memory Multiprocessors Has a single address space. Allow processors to communicate through variables stored in a shared address space Programming tool: openMP Distributed-Memory Multiprocessors Each processor has its own memory module Processors communicate to each other over a high-speed network Programming tool: MPI (Message Passing Interface)

13 Page 13 CS Department Parallel Implementation of JPEG2000 Compression on Distributed-Memory Multiprocessors

14 Page 14 CS Department Parallel Design of JPEG2000 Compression-DMP Traditional Approach The image is first divided into n regions on rows. Each processor performs 1-D horizontal wavelet transform Then, the new image is divided into n regions on columns. Each processor performs 1-D vertical wavelet transform. This approach requires intensive data transmission among processors, has very high network communication cost.

15 Page 15 CS Department Parallel Design of JPEG2000 Compression-DMP Tiling Approach JPEG2000 international standard supports tile- based image compression. A large image is divided into several tiles and each image tile is compressed independently. P1P2P3 P5 P8 P7 P4P6 P9

16 Page 16 CS Department Choose MPI for parallel implementation of JPEG2000, because the JPEG2000 software is written in C, which supported by MPI. Basic framework is: Parallel Design of JPEG2000 Compression-DMP

17 Page 17 CS Department Number of processors Compression Time (Sec) The picture shows the compression time using different tile size. For each tile size,processor number increases,compression time is reduced.The small tile need larger computation overhead. Size: 32 Size: 256 Image: 512x512 Parallel Design of JPEG2000 Compression-DMP

18 Page 18 CS Department There is a jump between one process and two processes. When there is only one process, JPEG2000 compression is sequential If there are more than two processes involved in the program, Process 1 is responsible for collecting data, while the others are responsible for processing different tiles and sending processed data back to the Process 1. Note Parallel Design of JPEG2000 Compression-DMP

19 Page 19 CS Department Parallel Implementation of JPEG2000 Compression on Shared-Memory Multiprocessors

20 Page 20 CS Department Parallel Design of JPEG2000 Compression-SMP A problem with tile-based approach Images compressed by JPEG, JPEG2000, and JPEG2000 with relatively small tiles. Each tile is compressed independently, which causes discontinuity across tile edges, also called blockiness.

21 Page 21 CS Department Parallel Design of JPEG2000 Compression-SMP Another parallel architecture is shared-memory multiprocessors. The excellent price-performance ratio of Intel-based SMPs make such systems very popular in many data processing applications. There are also many available programming tools for shared memory processor, such as openMP and Java Threads.

22 Page 22 CS Department In SMP, we do not need worry about data communication over network, because the data is in the shared memory. So there is no need for tile partitioning. Therefore, we can use the traditional data partitioning approach for horizontal and vertical wavelet transforms. Parallel Design of JPEG2000 Compression-SMP

23 Page 23 CS Department Parallel Design of JPEG2000 Compression-SMP JPEG2000 image compression is implemented on a 4- processor SMP system using direct openMP. The speedup in wavelet transform is only about 1.6 times, which is supposed to be near 4 times. Why?

24 Page 24 CS Department Parallel Design of JPEG2000 Compression-SMP It is found that the vertical wavelet transform requires more than 10 times the horizontal transform. But we know that both vertical and horizontal transforms have the same number of operations. verticalhorizontal

25 Page 25 CS Department Cache Miss Problem Parallel Design of JPEG2000 Compression-SMP In computer memory, the image data is stored line by line in a raster-scan order (from left to right, from top to bottom). Each continuous block of image data is brought into the cache from memory for wavelet transform. In horizontal wavelet transform, as the filter window is moving, the data of next transform is often available, few cache miss.

26 Page 26 CS Department Cache Miss Problem Parallel Design of JPEG2000 Compression-SMP In vertical wavelet transform, the filtering is done in the vertical direction, however, the data is brought into cache in a horizontal way. So, there are very frequent cache miss. data filtering Solution Do vertical transform of several columns at the same time to make full use of the existing data in the cache., instead of column by column Significantly reduces cache miss.

27 Page 27 CS Department Original Vertical transform Parallel Design of JPEG2000 Compression-SMP Improved Vertical transform The vertical transform is speed up by about 10 times.

28 Page 28 CS Department Parallel Design of JPEG2000 Compression-SMP Using the improved vertical wavelet transform, the overall speedup times of wavelet transform is now close to the number of processors.

29 Page 29 CS Department Give a brief review JPEG2000 image compression. Discussed two approaches for parallel implementation of JPEG2000 image compression: distributed memory multiprocessor and shared memory multiprocessor. Conclusion Question?


Download ppt "Page 1 CS Department Parallel Design of JPEG2000 Image Compression Xiuzhen Huang CS Department UC Santa Barbara April 30th, 2003."

Similar presentations


Ads by Google