Entropy coding

Post on 22-Feb-2016

81 views 1 download

description

Entropy coding. Present by 陳群元. constraints. Compression efficiency Computational efficiency Error robustness. Encoding. DCT Reordering Run-level coding Entropy coding. Encoding. DCT Reordering Run-level coding Entropy coding. DCT. Reordering. - PowerPoint PPT Presentation

Transcript of Entropy coding

Entropy coding

Present by 陳群元

constraints Compression efficiency Computational efficiency Error robustness

Encoding DCT Reordering Run-level coding Entropy coding

Encoding DCT Reordering Run-level coding Entropy coding

DCT

Reordering The optimum method of reordering the

quantised data depends on the distribution of the non-zero coefficients.

Evenly distribution

Zigzag reordering pattern

Interlaced video-vary more in vertical

Modified reordering pattern

Encoding DCT Reordering Run-level coding Entropy coding

Run-level coding Long sequences of identical values (zeros in

this case) can be represented as a (run, level) code

(run) indicates the number of zeros preceding a non-zero value

(level) indicates the sign and magnitude of the non-zero coefficient

Run-level coding(ex)

Encoding DCT Reordering Run-level coding Entropy coding

Huffman Coding ‘True’ Huffman Coding Modified Huffman Coding Table Design Entropy Coding Example Variable Length Encoder Design Variable Length Decoder Design Dealing with Errors

Huffman Coding ‘True’ Huffman Coding Modified Huffman Coding Table Design Entropy Coding Example Variable Length Encoder Design Variable Length Decoder Design Dealing with Errors

True Huffman Coding

Generating the HufSman code tree 1. Order the list of data in increasing order of

probability. 2. Combine the two lowest-probability data

items into a ‘node’ and assign the joint probability of the data items to this node.

3. Reorder the remaining data items and node(s) in increasing order of probability and repeat step 2.

encoding

decoding

disadvantage the decoder must use the same codeword set

as the encoder reduces compression efficiency.

calculating the probability table for a large video sequence a significant computational overhead cannot be done until after the video data is

encoded

Huffman Coding ‘True’ Huffman Coding Modified Huffman Coding Table Design Entropy Coding Example Variable Length Encoder Design Variable Length Decoder Design Dealing with Errors

Table designFinal pair

Table design

H.263/MPEG-4 motion vector difference (MVD) The H.263MPEG-4 differentially coded motion

vectors (MVD) are each encoded as a pair of VLCs, one for

the x-component and one for the y-component

mvd

mvd

H.26L universal VLC (UVLC) The emerging H.26L standard takes a step

away from individually calculated Huffman tables by using a ‘universal’ set of VLCs for any coded element. Each codeword is generated from the following systematic list:

Huffman Coding ‘True’ Huffman Coding Modified Huffman Coding Table Design Entropy Coding Example Variable Length Encoder Design Variable Length Decoder Design Dealing with Errors

Entropy Coding Example

Huffman Coding ‘True’ Huffman Coding Modified Huffman Coding Table Design Entropy Coding Example Variable Length Encoder Design Variable Length Decoder Design Dealing with Errors

Variable Length Encoder Design

Huffman Coding ‘True’ Huffman Coding Modified Huffman Coding Table Design Entropy Coding Example Variable Length Encoder Design Variable Length Decoder Design Dealing with Errors

Variable Length Decoder Design

Huffman Coding ‘True’ Huffman Coding Modified Huffman Coding Table Design Entropy Coding Example Variable Length Encoder Design Variable Length Decoder Design Dealing with Errors

Dealing with Errors

Arithmetic Coding

Ex . encode (0,-1,0,2)

0.394

Ex . decode (0,-1,0,2)

Arithmetic coding vs huffman Ideal

0.394 in this case, which can be represented as a fixed-point number with sufficient accuracy using 9 bits

Huffman: 1;0011;1;0000110=>13 bits

The end Thank you