Download presentation
Presentation is loading. Please wait.
Published byGeorgiana Bradford Modified over 9 years ago
1
Performed by: Dor Kasif, Or Flisher Instructor: Rolf Hilgendorf Jpeg decompression algorithm implementation using HLS PDR presentation Winter 2013-14 Duration: one semester
2
Background HLS 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
Background JPEG 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
Background Our objective Implement an hardware based decompressor for 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: 1.Converting the color representation of the image from RGB to (not used in our algorithm), and down sampling. 2.Splitting the image matrix into 8X8 size sub matrices. 3.subtracting a value of 128 from the image. 4.Performing a Discrete Cosine Transform on the sub matrices. 5.The transformed sub matrices are quantized by a predetermined quantization matrix. 6.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 Input picture Picture after encoding and decompressing
9
Block diagram JPEG_test bench Module 20 bits 8x8 decompressed block Encoder Matlab Hand shake protocol
10
Implementing the encoding/decoding process Extracting the image bit map from the raw image (BMP file) using a Matlab script. 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 Huffman decoding 20 bits DE quantization Inverse DCT adding the block 128 8x8 decompressed block The module will do this operation for all (640X480)/(8X8)=4800 blocks Hand shake protocol Building the sub matrix
14
Project Status Targets achieved: Acquired a C/C++ encoding/decoding algorithm from 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 NumTaskDuration(days)Start dateEnd date 1Eliminating the use of Cosine functions in the module713- נוב 20- נוב 2adjusting the decoder and test_bench for 8x8 blocks+handshake protocole720- נוב 27- נוב 3debuging727- נוב 04- דצמ 4detecting potential bottle necks in the implementation+hardware improvements+initial error checking2804- דצמ 01- ינו 5hardware improvements+finilizing error checking4701- ינו 17- פבר
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.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.