1 / 18

Jpeg decompression algorithm implementation using HLS

Jpeg decompression algorithm implementation using HLS. PDR presentation Winter 2013-14 Duration: one semester. Performed by: Dor Kasif, Or Flisher Instructor: Rolf Hilgendorf. Background HLS. HLS- ( High Level Synthesis) –a powerful tool which enables

orsen
Download Presentation

Jpeg decompression algorithm implementation using HLS

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Jpeg decompression algorithm implementation using HLS PDR presentation Winter 2013-14Duration: one semester Performed by: Dor Kasif, Or FlisherInstructor: Rolf Hilgendorf

  2. BackgroundHLS HLS- (High Level Synthesis) –a powerful tool which enables the use of a high level programming language (such as C/C++) as the design and synthesis language, skipping the intermediate level of design using Hardware Languages (such as VHDL/Verilog).

  3. BackgroundJPEG JPEG- the leading standard for Lossy or Lossless compression of computer images. Usually all the handling of the decompression/compression of said Images is done by software, utilizing the main processor resources.

  4. BackgroundOur objective Implement an hardware based decompressorfor the widely used Jpeg standard, thus accelerating the handling process of Jpeg images and improving CPU utilization.

  5. Project Goals • Creation and Implementation of the Jpeg decompression algorithm on a FPGA • Using HLS • Optimization of the implementation to reach the optimal performances possible within the performance envelope of the FPGA. • Displaying the decompressed image in a RGB/YCbCr format on screen. • Compare the software decompressed picture to the hardware decompressed picture in terms of Structural Similarity Index Metric (SSIM) .

  6. Project’s requirements • Using standard Bit Map(Raw or uncompressed) Image with a resolution of 640X480, • 24 bit color depth. • Compressing the image using a custom Lossy Jpeg format (in the future • using the standard Lossy Jpeg format). • Modifying an existing Lossy Jpeg encoding/decoding algorithm, and adjusting it • for the HLS synthesis requirements. • Optimizing the decoding algorithm for the use of the Zynq FPGA card.

  7. Jpeg-encoding/decoding Encoding Consists of several steps: Converting the color representation of the image from RGB to (not used in our algorithm), and down sampling. Splitting the image matrix into 8X8 size sub matrices. subtracting a value of 128 from the image. Performing a Discrete Cosine Transform on the sub matrices. The transformed sub matrices are quantized by a predetermined quantization matrix. Using a simple Huffman encoding and differential encoding (for DC components only) and converting the image matrix into a variable sized string, namely the encoded or compressed image. Decoding is done exactly the same but in reverse order!

  8. Example picture- Lena Picture after encoding and decompressing Input picture

  9. Block diagram Module 20 bits Encoder JPEG_testbench Matlab 8x8 decompressed block Hand shake protocol

  10. Implementing the encoding/decoding process • Extracting the image bit map from the raw image (BMP file) using aMatlabscript. • Inputting the image matrix file into the C++ language encoder file. • The encoder output is a long stream of bits which is the encoded compressed image.

  11. Implementing the encoding/decoding process • Next we use the test bench file ,which inputs the stream of bits into the module file aka the decoder. • The test bench is sending a stream of 20 bits to the module each time • The module constructs a full sub matrix block of size 8x8. • The module will announce the completion of the 8x8 sub matrix through a handshake procedure.

  12. Implementing the encoding/decoding process • The module performs on each sub matrix: • Decoding of the compressed image using Huffman coding • De quantization • Inverse DCT • Adding 128 to the image bit map • The module sends back the sub matrix block to the test bench where the test bench will assemble the reconstructed image.

  13. Block diagram module Huffmandecoding 20 bits DE quantization Inverse DCT Building the sub matrix 8x8 decompressed block adding the block 128 Hand shake protocol The module will do this operation for all (640X480)/(8X8)=4800 blocks

  14. Project Status • Targets achieved: • Acquired a C/C++ encoding/decoding algorithmfrom Northwestern university department of Computer Science. • Modified the encoding/decoding algorithm for C++ usage (removing the use of Magick++ library, removing user interface etc.) . • Making the encoding/decoding algorithm work for our currently custom jpeg. • Developing auxiliary Matlab scripts for handling of the images. • In progress: • Modifying the decoding algorithm for synthesis in HLS • Eliminating the use of Cosine functions in the decoding process. • Adjusting the decoder and test-bench for 8x8 blocks + handshake protocol.

  15. Project Status • Targets until midterm presentation: • Finish modifying and improving the decoding algorithm for synthesis in HLS. • Detecting a potential bottle necks in the implementation. • Initial error checking. • Future planning: • Improving the hardware implementation • Exanimating the possibility of concurrent operations. • Determent the time assessment. • Making the algorithm usable for the standard Lossy Jpeg format and skipping the use of the aux scripts in Matlab. • Compare the hardware generated decompressed picture to the software generated decompressed picture in terms of SSIM.

  16. Gantt chart

  17. Gantt chart Midterm presentation

  18. Resources http://www.cs.northwestern.edu/~agupta/_projects/image_processing/web/JPEGEncoding/report.html -source for the encoding/decoding code http://en.wikipedia.org/wiki/JPEG -jpeg Wikipedia entry http://sipl.technion.ac.il/ -the technion signal and image processing lab-experiment 3 www.stanford.edu/class/ee398a/handouts/lectures/08-JPEG.pdf -Stanford university , department of electrical engineering explanation of the Jpeg format. Essay- The JPEG Still Picture Compression Standard-by Gregory K.Wallace and co. -explanation of the Jpeg format.

More Related