Download presentation
Presentation is loading. Please wait.
Published byAlexia Richardson Modified over 9 years ago
1
Concepts of Multimedia Processing and Transmission IT 481, Lecture 5 Dennis McCaughey, Ph.D. 19 February, 2007
2
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 2 GIF Compression Principles: Basic Operational Mode
3
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 3 GIF Compression Principles: Dynamic Mode Using LZW Encoding
4
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 4 GIF interlaced mode
5
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 5 ITU-T Facsimile Standards T2 (Group1) – no longer used T3 (Group 2) – no longer used T4 (Group 3) –Intended for use with modems on analog PSTN lines T6 (Group 4) –All digital for use with digital networks such as ISDN Compression ratios of 10:1 are common
6
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 6 Termination and Make-up Codes Termination Codes –White or black run-lengths from 0 to 63 pixels Make-up Codes –For run lengths that are multiples of 64 pixels Overscanning –All lines start with a minimum of one white pixel –Receiver knows the first codeword relates to white pixels and the alternates between black and white Since two code tables are used they are denoted Modified Huffman Codes Examples: –Run-length of 12 black pixels is encoded 001000 –A Run-length of 140 black pixels = 128 + 12 is encoded as 000011001000 + 0000111
7
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 7 Group 3 (T4) Group 3 provides no error correction –If one or more pixels is corrupted, receiver will lose synchronization –Each line is terminated with a known EOL code –If synch is lost receiver searches for the EOL code and if not found within a preset number of lines, it aborts the reception process and informs the sending machine the sending machine to terminate One dimensional process –Works well for documents contain significant areas of black and white pixels such as letter documents –For documents containing half-tones it can result in a negative compression ratio
8
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 8 Group 4 (T6) T6 is an optional feature in Group 3, but is compulsory in Group 4 2-D scheme –Identified black and white run-lengths by comparing adjacent scan lines –Known as Modified Relative Element Address Designate (READ) (MMR) coding MMR encoding exploits the fact that most scan lines differ from the previous ones by only a few pixels –Always assume the first reference line is an imaginary “all white” line
9
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 9 Modified READ Coding Procedure
10
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 10 Two-Dimensional Code Table Additional Codes necessary to identify mode Extension Mode –Aborts the encoding prematurely before the end of the page –Allows a portion of the page to e sent in its uncompressed form or with a different encoding scheme Mode Run- Length AbbreviationsCodeword Passb1b2b1b2 P0001+b 1 b 2 Horizontala 0 a 1,a 1 a 2 H001+a 0 a 1 +a 1 a 2 Vertical a 1 b 1 = 0 a 1 b 1 = -1 a 1 b 1 = -2 a 1 b 1 = -3 a 1 b 1 = +1 a 1 b 1 = +2 a 1 b 1 = +3 V(0) V R (1) V R (2) V R (3) V L (1) V L (2) V L (3) 1 011 000011 0000011 010 000010 0000010 Extensions 0000001000
11
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 11 Figure 3.11
12
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 12 Some example run-length possibilities: pass mode This is the case when the run-length in the reference line (b 1,b 2 ) is to the left of the next run-length in the coding line ( a 1,a 2 ), that is b 2 is to the left of a 1. The run-length b 1 b 2 is coded using the code words given in Figure 3.11 If the next pixel on the coding line, a 1, is directly below b 2 this is not pass mode
13
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 13 Some example run-length possibilities: vertical mode This is the case when the run-length in the reference line (b 1,b 2 ) overlaps the next run-length in the coding line (a 1,a 2 ) by a maximum of + 3 pixels that is b 2 is to the left of a 1. Two examples are shown, and for this mode just the difference run length a 1 b 2 is coded Most codewords are in this category
14
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 14 Some example run-length possibilities: horizontal mode This is the case when the run-length in the reference line (b 1,b 2 ) overlaps the next run-length in the coding line (a 1,a 2 ) by more than + 3 pixels that is b 2 is to the left of a 1. Two examples are shown, and for this mode the two run-lengths a 0 a 1 and a 1 a 2 are coded using the code words given in Figure 3.11
15
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 15JPEG Joint Photographic Experts Group Standard- ISO/IEC10918 Lossy algorithm Focus attention on the Baseline Mode Five main stages 1.Image/Block Preparation 2.Forward DCT 3.Quantization 4.Entropy Encoding 5.Frame Building
16
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 16 JPEG Encoder Schematic 5 2 1 4 3
17
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 17 1. Image/block preparation: image preparation Block Image planes into 8x8 Blocks Can use either: R,G,B or Y,Cb,Cr
18
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 18 1. Image/block preparation: block preparation
19
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 19 2. Forward DCT
20
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 20 DCT Computation Features
21
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 21 3. Quantization Eye responds primarily to the DC and lower frequency components –If the magnitude of the higher frequency components is less than a certain threshold the eye will not perceive it –Within the quantization process frequencies below a threshold are zeroed Quantization process reduces the magnitude of the DC and the AC coefficients so that less bandwidth is required for transmission This is achieved by dividing the coefficients by a normalization matrix which will zero the smaller coefficients
22
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 22 Example computation of a set of quantized DCT coefficients
23
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 23Observations The computation of the quantized coefficients involves divideing the coefficients by a normalization factor and rounding the coefficients to the nearest integer value The normalization values used, in general, increase in magnitude with increasing spatial frequency The DC coefficient in the matrix is the largest Many of the higher frequency coefficients are zero
24
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 24 Example 3.4
25
4. Entropy Coding
26
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 26 Vectoring Using a Zigzag Scan: (a) Principle; (b) for previous example AC ={(0,6) (0,7) (0,3) (0,3) (0,3) (0,2) (0,2) (0,2) (0,2) (0,0)}
27
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 27 AC Coefficient Encoding AC coefficients are encoded within a block using run-length coding Most coefficients are zeros due to normalization Codes indicate the length of the zero run- length and the coefficient value terminating it. i.e. –(Skip, Value) (Skip, Value) are mapped to (SSS, Value) –SSS is Huffman Encoded, Value is encoded in 1’s complement binary code words of length specified by SSS
28
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 28 SSS vs. Value Null 0,1 00,01,10,11 000,001,010,011,100,101,110,111. 0 1 2 3 4 5 6 7 8 9 10 11 0 -1,1 -3,2,2,3 -7..-4,4..7 -15…-8,8…15 -31…,-16,16….31 -63.….-32,32…..63 -127……-64,64……127 -255…....-128,128…….255 -511……...-256,256………511 -1023….…..-512,512………1023 -2047.….....,-1023,1023…..…..2047 Encoded ValueSSSDifference Value
29
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 29Process
30
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 30 Default Huffman Code Words for SSS (DC Coefficients)
31
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 31 DC Coefficients DC coefficients are differentially encoded across the blocks –Takes advantage of the local correlation in the average value among local blocks –{12,13,11,11,10} -> {12,1,-2,0,-1}
32
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 32 5. Frame Building Frame Header –Overall width and height of the image in pixels –The number and type of components that are used to represent the image (CLUT, RGB, YC b C r ) –Digitization format used: (4:2:2,4;2;0, etc) Scan Header –Identity of the components (RGB etc) –The number of bits used to digitize each component; –The quantizatio table of values used to encode each component
33
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 33 5. JPEG Encoder Output Bit Stream Format
34
02/12/2007 Dennis Mccaughey, IT 481, Spring 2007 34 JPEG decoder schematic
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.