NWA-PCUG Newsletter Article, January 2004
Sounds, Images, and Numbers
by Grant Wales
gwales@cox-internet.com
(click to email author)


Along with an expanded use of entertainment from digital devices, we can benefit from an overview of demands placed on the data to support it.

It is intuitive that a complex media form will take more data than a simple media form. This note will serve as a guide in becoming just a bit more familiar with the quantitive measures of data needed to support visual and sonic presentations. On this journey, we hope to encounter a few worthwhile concepts of the ways and means of providing presentations, and to understand how the data requirements and the resultant quality of the presentation are linked.

Compressed and uncompressed data
The most simplistic forms of data which represent media are those which are uncompressed, and make no adaptation to those portions of the media content that don’t demand a detailed representation. In other words, if we have a data coding scheme capable of discriminating between the most subtle shading of content, and there are major portions of the presentation that don’t care about this subtlety, the uncompressed coding scheme doesn’t alter the way it handles any part of the presentation, it simply produces the data in sufficient form to meet all the requirements of all subtleties, whether or not they are needed throughout the presentation. A lot of data is conveyed that is not essential to the overall result.

In music, a simple coding scheme like the WAV format selects a bit-sample accuracy for the measurement of the analog value in time, and samples are selected from the analog waveform at regular intervals. Based on Shannon’s sampling theorem, the highest audio frequency that may be reproduced from this data is half the sampling rate. Thus, a 10 KHz sampling rate will enable an ability to represent a tone no higher than 5 Khz.

In images, a simple coding scheme like the BMP format selects a bit-sample accuracy for measurement of chrominance within each cell (pixel – or picture element) of a rectangular grid that represents the boundary of the image. No further discrimination is made about the minimum requirements to provide the desired image quality. There may be lots of blue sky of nearly constant shading, and there may be a lot of excess data used to represent it.

Compressed data
In a compressed data format, lots of data samples are not used, as they are not critical in making an adequate representation. It takes a special kind of coding scheme to decide which samples are not needed and how best to reassemble the data in order to make the representation. The data sampling schemes are a form of analog-to-digital transformation, and the re-assembling schemes are a form of digital-to-analog transformation. Thus, there is a need for a coding-decoding (codec) standard to identify how the process is standardized.

The compression algorithm depends on some sophisticated means for making judgements, based on a priori standards, about how to decide which samples are retained, and may re-assemble the data in a form which makes use of how a sample differs from the previous sample rather than on the simplistic ritual of placing a value in the designated spot.

Data and data rates
Standard measures for data are the bit and the byte. A bit recognizes either of two states. It is often associated with a binary condition like “Yes” or “No,” “1” or “0,” etc. A byte may be represented by some combination of 8 bits. Thus, the relationship is one byte equals 8 bits. A byte of data is sometimes represented by a three-digit binary number.

Large quantites of data are usually represented with larger measures of data such as KiloBytes, MegaBytes, or GigaBytes. In decimal represntation, the prefixes Kilo, Mega, and Giga correspond to multiplying factors of 103, 106, and 109, respectively. However, in digital representation, the prefix Kilo is really 210, or 1,024 in decimal value, not 1,000. Thus, a near equivalence is often assumed for values represented by these prefixes, although there is a 2.4 percent error when using the Kilo prefix and a correspondingly higher error for Mega and Giga.

Data rate takes into account the time involved in transferring data. A channel of sufficient bandwidth is required to supply data rates that meet a user’s needs.

Multimedia implementations
Sound

The standard uncompressed sound format is WAV. Standards for sampling accuracy are 8-bit and 16-bit, and sampling intervals tend to range from 8,000 per second to 44,100 per second. For some purposes, the full-fidelity standard of 16-bit, 44,100 samples per second and two-channel (stereo) is the “gold-standard,” and this format often serves as a “go-between” for making conversions to other formats.

Various compressed sound formats are in use. Those often found in internet use are MP3, RA (Real Audio), and WMA (Windows Media Audio). Compressed formats tend to use sampling rates between 40,000 and 60,000 per second, and are able to get rid of lots of data samples when the music content doesn’t have many high-pitched notes. Compressed data file sizes depend on the a priori settings made for their creation. Data rates of 24 Kbits/second (3 Kbytes/second) were often at the low end of the scale available for compressed sound files. Recent sound conversion programs tend to set this low end value at 32 Kbits/second (4 Kbytes/second). Of course, we recognize that quality suffers at the low end, and a good compromise should be made between adequate quality and moderate file size.

Various forms of software are available for converting between formats.

Still images

The standard uncompressed format for a “still” image is BMP (Bitmap). Further, it has become standard that most viewers will present an image at 96 dot per inch (dpi), and that sampling accuracy is 24 bits for color.

Color is represented by three parameters, and it is perhaps easiest to think of the Red, Green, Blue color model. There is a three-color triad of data within each presented pixel, and each of these colors has a data value corresponding to the luminance represented by that color. A standard of 8-bits (256 levels) of luminance discrimination has served well in presenting an image. Thus, the 24-bit color standard is based on 8 bits for each color.

Compressed image formats in wide use include JPG (JPEG, JFIF, etc.) and GIF. A JPG file will often be 5 to 15 percent of the size of a corresponding WAV file. The JPG format is often selected for photos, as it does well with many shadings of color. The GIF format is often preferred for images with few levels of shadings, including graphs and tables, as well as “clip art.” GIF files tend to to be smaller than JPG files when they depict images with few shades.

JPG and GIF images are often embedded in the HTML files you see on the internet. A user with a system that has a slow internet connection and/or a slow processor, may notice that a large GIF file may open in an odd way by showing an image that becomes clear as you see it develop into it’s final form. A JPG file tends to develop by scrolling down from the top, and each new line will be clear as it is presented.

Videos
Digital videos are nearly all in compressed form, as the data rates are huge. Quality will depend on a number of the issues stated for still images, as well as the frame rate. Sound data is often an integral part of the video file.

Formats include MPG (MPEG), AVI, RV, WMV, MOV, etc.

Recapping an overview
This exercise was not meant to be too heavy or too light. A reader should be able to feel that they have acquired a warmer, fuzzier feeling about the topic, and hey, isn’t that what you take away from any learning experience?

Click here to return to top



==================================================================