160 likes | 358 Views
Source Coding. Jean Walrand EECS. Outline. Compression Losless: Huffman Lempel-Ziv Audio: Examples Differential ADPCM SUBBAND CELP Video: Discrete Cosine Transform Motion Compensation. Compression. Goal:. Reduce the number of bits to encode source. Approaches:.
E N D
Source Coding Jean WalrandEECS
Outline • Compression • Losless: • Huffman • Lempel-Ziv • Audio: • Examples • Differential • ADPCM • SUBBAND • CELP • Video: • Discrete Cosine Transform • Motion Compensation
Compression • Goal: • Reduce the number of bits to encode source • Approaches: • Lossless: For data • Lossy: For voice, video
Lossless Key Idea: Use shorter code words for more frequent symbols EX1: Huffman Encoding
EX2: Huffman Encoding(continued)
If the symbols are independent and identically distributed, the Huffman encoding is the prefix-free code with the minimum average number of bits. Note: The Shannon encoding requires fewer bits, but requires encoding large blocks of symbols. Both codes assume that the distribution is known. Huffman Encoding(continued)
Lempel-Ziv • Lossless • Symbols are not independent • Distribution is not known • Want to minimize the average number of bits • Typical application: any file • Approach: Build dictionary and replace string with location of prefix in the dictionary
Example: Lempel-Ziv(continued)
Audio • Examples: • Speech: • PCM 64kbps • ADPCM 32-64kbps • SBC 16-32kbps • VSELP-CELP 2.4-8kbps • Audio: • PCM 1400kbps • MPEG 48-384kbps
Differential Encoding (also used for Video): Key Idea is that differences between successive samples may be small Difficulty: Error Propagation Audio (c’d)
Differential Encoding (c’d) Audio (c’d)
ADPCM: Adaptive Differential PCMPredict next value, encode error Audio (c’d)
Sub-Band Coding: Improves performance Audio (c’d)
CELP (Code Excited Linear Predictor) Audio (c’d)
Discrete Cosine Transform Objective: Extract “Visible Information” Video f(x, y) = Sm,n F(m, n) cos(mx) cos(ny)
Motion Compensation Idea: Track motion of picture Encode (motion vector, modification) Video (cd)