You are on page 1of 7

Predictive Coding

ANISHA M. LAL
Introduction
• Predictive coding achieves good compression without significant
computational overhead and can be either lossless or lossy.
• Based on eliminating the inter-pixel redundancies of closely spaced pixels in
space/or in time by extracting and coding the new information in each pixel.
• The new information of a pixel is defined as the difference between the
actual and the predicted value of the pixel.
• The coding system consists of an encoder and a decoder, each contains an
identical predictor.
Predictive encoding
Predictor
• In many cases the prediction is formed as a linear combination of m
previous samples.
• 𝑓 𝑛 = 𝑟𝑜𝑢𝑛𝑑 𝑚 𝑖=1 𝛼𝑖 𝑓(𝑛 − 𝑖)
• In the case of images,
• 𝑓 𝑥, 𝑦 = 𝑟𝑜𝑢𝑛𝑑 𝑚
𝑖=1 𝛼𝑖 𝑓(𝑥, 𝑦 − 𝑖)
• Prediction error 𝑒 𝑛 = 𝑓 𝑛 − 𝑓 𝑛
Predictive encoding - Example

• Consider 𝑓 𝑥, 𝑦 = 10 2 3 4
5 6 7 8
• Find 𝑓 𝑥, 𝑦 = 𝑟𝑜𝑢𝑛𝑑 𝑚
𝑖=1 𝛼𝑖 𝑓(𝑥, 𝑦 − 𝑖)
• Assume 𝛼𝑖 =1 and 𝑚=1
• Then, 𝑓 𝑥, 𝑦 = 𝑓 𝑥, 𝑦 − 1

• 𝑒(𝑥, 𝑦) = 10 − 8 1 1
5 1 1 1
• Apply Huffman encoding [1111100100000]
Predictive decoding
Predictive decoding - Example
• Decompression
• 𝑓 𝑛 =𝑒 𝑛 +𝑓 𝑛
• 𝑓 𝑥, 𝑦 = 𝑒 𝑥, 𝑦 + 𝑓 𝑥, 𝑦 − 1
• Apply Huffman decoding
• Find 𝑒 𝑥, 𝑦
• Find 𝑓 𝑥, 𝑦

You might also like