Author: @Hsu Tzu Ting Date: Dec 24, 2020 性質: Tech Share
→ text and data files
RLE (Run-length encoding)
Huffman Code (bottom up)
Shannon-Fano (top down)
LZ77
→ multimedia data
Quantization 量化
{x | x∈R, 0 ≤ x ≤ 7} → {x | x∈Z, 0 ≤ x ≤ 7}
GIF
Transform coding
RGB → YCbCr
Y: brightness of the color (明度)
→ more sensitive to the human eye
Cb: blue component relative to the green component (彩度)
→ less sensitive to the human eye
Cr: red component relative to the green component (彩度)
→ less sensitive to the human eye
example
DCT
Perceptual coding
JPEG
Transform coding: RGB → YCbCr
Chroma subsampling 色彩採樣
DCT Transformation
Encoding
without compression: 1920x1080pixels / frame = 2073600 pixels / frame = 60M pixels / second
Long sequence of images
MPEG
Compression Failure
I-frame 壞掉或來不及運算更新frame
How data compression works: exploring LZ77