Appendix
◾
643
125 megabytes of storage. Now instead of 250 kilobytes, we need 500 times the storage
space! That is the cost of images.
What about video?
To create video, we take a series of still images (pictures) and display
them rapidly where each individual image will be nearly identical to the image that came
before it. The number of images captured per second is known as the
scan rate
. The higher
the scan rate, the higher the quality of the overall video. The
human eye is able to detect
the flicker in video if the frame rate is below a certain threshold (about 12 frames or images
per second), so we typically want a scan rate higher than this. Frame rates of at least 24 per
second are desired and high-quality film has as many as 72 per second.
Let us assume we use a frame rate of 24 images per second and each image is 1000
×
1000
in color using a bitmap. This means 3 megabytes per frame, or 3*24
=
72 megabytes per
second. If the video lasts for 1 minute, we require 60*72 megabytes
=
4320
megabytes or
over 4 gigabytes. Now we are talking about some serious storage sizes.
If you have a computer that stores 8 gigabytes of memory, we could only store up to
2 minutes of video in memory. Alternatively, we could fill a 1 terabyte hard disk with just
about 4 hours’ worth of video. We need to use our
disk storage space more wisely, particu-
larly when we want to move these video files over the Internet.
A number of compression techniques are applied to video storage. For instance, by stor-
ing the first video frame wholly and then for successive frames,
only encode the differ-
ences. For instance, if frame 1 and frame 2 are identical except for three pixels, then frame
1 is stored in its entirety but frame 2 is denoted by the three changed pixels. In this way,
while we need a lot of storage for frame 1, we need almost nothing for frame 2.
There are key frames in the video that take place when we are changing the image
entirely (e.g., a different camera angle or a different scene) and so these key frames must
also be stored wholly. With proper compression, the typical 45-min
video can be stored in
approximately 350 megabytes.
Without compression, 350 megabytes would only store about 5 seconds’ worth of video!
Let us now compare the storage sizes from Table A.6 with compressed images or com-
pressed video. See Table A.7.
We wrap up this section by considering the typical amounts of storage capacity for mem-
ory and storage devices. We start with the memory hierarchy (see Chapter 1, Section 1.8).
• On-chip cache: 16–32 kilobytes for most computers, less or none for handheld devices.
• Off-chip cache: 1–2 megabytes for most desktop and laptop computers, more for
larger computers and less or none for handheld devices.
TABLE A.7
Sizes
for Image and Video
Do'stlaringiz bilan baham: