Video information is one of the most complex types of information to capture, compress, and still get a result that makes sense to the human eye. Video clips contain the equivalent of many still images, each of which must be compressed. The Web is full of video clips with widely varying levels of quality. Some of the quality issues depend on the sophistication of video compression techniques, which are referred to as video codecs.
Codec stands for COmpressor/DECompressor. A video codec refers to the methods used to shrink the size of a movie so that it can be played on a computer or over a network. Almost all video codecs use lossy compression to minimize the huge amounts of data associated with video. The goal, therefore, is not to lose information that affects the viewer’s senses.
Most codecs are block oriented, meaning that each frame of a video is divided into rectangular blocks. The various codecs differ in how the blocks are encoded. Some video codecs are accomplished completely in software, whereas others require special hardware.
Video codecs employ two types of compression: temporal and spatial. Temporal compression looks for differences between consecutive frames. If most of an image in two frames hasn’t changed, why should we waste space by duplicating all of the similar information? A keyframe is chosen as the basis on which to compare the differences, and its entire image is stored. For consecutive images, only the changes (called delta frames) are stored. Temporal compression is effective in video that changes little from frame to frame, such as a scene that contains little movement.
Spatial compression removes redundant information within a frame. This problem is essentially the same as the one we face when compressing still images. Spatial video compression often groups pixels into blocks (rectangular areas) that have the same color, such as a portion of a clear blue sky. Instead of storing each pixel, the color and the coordinates of the area are stored instead. This idea is similar to run-length encoding.
Various video codecs are popular today, including Sorenson, Cinepak, MPEG, and Real Video. The details of how these codecs represent and compress video are beyond the scope of this book.
Computers are multimedia devices that manipulate data varying in form from numbers to graphics to video. Because a computer can manipulate only binary values, all forms of data must be represented in binary form. Data is classified as being either continuous (analog) or discrete (digital).
Integer values are represented by their binary equivalent using one of several techniques for representing negative numbers, such as a signed-magnitude or two’s complement. Real numbers are represented by a triple made up of the sign, the digits in the number, and an exponent that specifies the radix point.
A character set is a list of alphanumeric characters and the codes that represent each character. The most commonly used character set today is Unicode (16 bits for each character), which has ASCII as a subset. The 8-bit ASCII set is sufficient for English but not for other (or multiple) languages. There are various ways for compressing text so that it takes less space to store it or less time to transmit it from one machine to another.
Audio information is represented as digitized sound waves. Color is represented by three values that represent the contributions of red, blue, and green, respectively. Two basic techniques are used for representing pictures, bitmaps, and vector graphics. Video is broken up into a series of still images, each of which is represented as a picture.
For Exercises 1–20, mark the answers true or false as follows:
True
False
For Exercises 21–26, choose the correct term from the following list.
Signed-magnitude representation
Radix point
Frequency of use
Sampling
Analog
Digital
Exercises 27–79 are problems or short-answer questions.
Four bits?
Five bits?
Six bits?
Seven bits?
X + Y
X + W
Z + W
Y + Z
W – Z
X – W
Y – W
Z – Y
A + B
A – B
B + A
B – A
How many positive integers can be represented?
How many negative integers can be represented?
Draw the number line showing the three smallest and largest positive numbers, the three smallest and largest negative numbers, and zero.
A + B
A - B
B + A
B - A
35768
–35768
–444455
–123456
39. In calculating the ten’s complement in Exercise 38, did you have trouble borrowing from so many zeros? Such calculations are error prone. There is a trick you can use that makes the calculation easier and thus less prone to errors: Subtract from all 9s and then add 1. A number subtracted from all 9s is called the nine’s complement of the number.
Prove that the nine’s complement of a number plus one is equal to the ten’s complement of the same number.
Use the nine’s complement plus one to calculate the values in Exercise 38(b), (c), and (d).
Which did you find easier to use, the direct calculation of the ten’s complement or the nine’s complement plus one? Justify your answer.
A + B
A − B
B − A
−B
− (−A)
Draw the number line.
Show examples of addition and subtraction.
Develop a representation of negative numbers based on the eleven’s complement.
0.50
0.26
0.10
0.50
0.26
0.10
HUFFMAN CODE | CHARACTER |
00 | A |
11 | E |
010 | T |
0110 | C |
0111 | L |
1000 | S |
1011 | R |
10010 | O |
10011 | I |
101000 | N |
101001 | F |
101010 | H |
101011 | D |
1101110001011
0110101010100101011111000
101001001010000100010000101 00110110
101000100101010001000111010 00100011
What are some advantages of using a common (standardized) character set? What are some disadvantages?
When converting whole numbers from one base to another, we divide by the new base. When converting fractional parts from one base to another, we multiply by the new base. Can positional notation be used to explain these algorithms?
Technology is changing rapidly. What changes have occurred in data compression since this book was written?
Where is Edward Snowden now? How do you think his actions will be characterized in the future?
3.135.183.89