Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Differential Pulse Code Modulation

created by alisdair

(idea) by alisdair (1.1 y) (print)   ?   (I like it!) 1 C! Sat Oct 19 2002 at 11:04:19

An extension of pulse code modulation which differentially encodes the data to increase transmission efficiency, differential PCM (DPCM) is used in many image and video compression algorithms, including JPEG.

The principle behind differential pulse code modulation is that the source data is likely to be an analogue signal, which is likely to change in amplitude quite gradually; there are unlikely to be any large jumps in amplitude over a short time. Therefore, the signal can be efficiently represented by an initial value, and incremental deltas against this value thereafter. Since these differences are likely to be small, fewer bits may be used to encode such a signal, and therefore throughput may be increased.

For the given sampled signal:

A 9|           #
m 8|           #
p 7|           # #
l 6|         # # #             #
i 5|       # # # #           # #
t 4|     # # # # # #         # #
u 3|     # # # # # # #     # # #
d 2|   # # # # # # # #   # # # #
e 1| # # # # # # # # #   # # # #
  0 ---------------------------->
                Time

the sampled values are 1, 2, 4, 5, 6, 9, 7, 4, 3, 0, 2, 3, 5, 6. Encoded using standard pulse code modulation, this data set would require ceil(log2(9))1 = 4 bits per sample.

Notice, however, that the delta between two samples is never less than -3 or greater than +3. This gives a range of 7 values, which can be encoded in ceil(log2(7))1 = 3 bits per sample. If the encoding scheme used was differential pulse code modulation, the output would be:

 ------------------------------------------------------
| Source    | 1  2  4  5  6  9  7  4  3  0  2  3  5  6 |
| Prev. Out | 0  1  2  4  5  6  9  7  4  3  0  2  3  5 |
 ------------------------------------------------------
| Delta     | 1  1  2  1  1  3 -2 -3 -1 -3  2  1  2  1 |
 ------------------------------------------------------

In a more generous case, where the source signal's peak amplitude is higher, and the average differences are lower, differential PCM becomes far more efficient than PCM. However, it can be a lossy encoding method: in the case given, should a delta of more than ±3 occur in the source, the differential pulse code modulation output will not be able to represent it accurately.

However, differential PCM need not necessarily be lossy. If a scheme is chosen such that the largest possible difference is encodable, the signal may be fully and accurately reconstituted. This is counter-intuitive: allowing for differences of this magnitude makes DPCM even less efficient than vanilla PCM! It is possible, however, to use Shannon-Fano encoding or run length encoding to encode signals which have unequally likely deltas in a more efficient manner than PCM: the more common changes are encoded with fewer bits, and so the average length of a symbol is lower.

Differential pulse code modulation is used in the JPEG image compression algorithm to compress the DC component of each 8x8 block after the "quantization" step. For images with large blocks of similar colour, as most photographs have, this is a highly efficient method of compression.


1: The minimum number of bits required to encode N values is log2(N), rounded up; therefore, ceil(log2(N)).

Sources:

Digital Compression and Coding of Continuous-Tone Still Images (JPEG standard), ITU Recommendation T.81, CCITT
Introduction to Communication Systems, Ferrel G. Stremler, Addison-Wesley
Data Communications and Networks: An Engineering Approach, Irvine & Harle, Wiley


printable version
chaos

Pulse Code Modulation Adaptive Differential Pulse Code Modulation JPEG analog
CODEC Differentially Log Analogue
code Dia de los Muertos Dirac delta function image
video Differential efficiency encode
quantization efficient delta amplitude
MDCT Pam Ceil Holstein Cow
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Just another sprinkling of indeterminacy
Three Gold Coins
Maria Montessori
Civil Rights Movement
Never Forget the Ghosts
Try cock
HATEDOME
the book of clean white pages, a poem of self absorption
We are a people in whose bodies old sea-seeking rivers roar with blood
dwarf planet
Dem Bones
How to make a car last nearly forever
Alumni website follies
Worcestershire sauce
New Writeups
Tom Rook
Talk is cheap(poetry)
shaogo
Adelle Davis(person)
Aerobe
race car g sfjsgsd(poetry)
Binah
Dream Log: July 5, 2008(dream)
StrawberryFrog
Forgotten things in space(idea)
antigravpussy
velvet revolution fairy tale(idea)
Heitah
Nerve agent VX(thing)
Pavlovna
shite(idea)
wonton
Days and nights come together in a slow falling down(fiction)
Pavlovna
wee(idea)
katherine
root log: July 2008(log)
Madara
There’s nothing like a trail of blood to find your way back home(fiction)
Heitah
After sneeze(idea)
froggy7384
Why we smoke(personal)
SubSane
Loneliness is a Warm Tuna Melt on a Cold Summer Night(person)
This page courtesy of The Everything Development Company