Feb. 2, 2011, 9:33 a.m.
posted by mv
Because both the Compact Disc and Digital Versatile Disc were conceived as distribution media for software—in this case, software meaning audio for the CD and video for the DVD—standardization has been of the utmost importance. Without hard and fast standards, you cannot be sure that the disc you buy will play back in your drive. Consequently, every format of disc has an official standard that guides both drive- and disc-makers so their products can be compatible.
The Sony-Philips standards are published in books that are commonly referred to by the colors of their covers. This small rainbow covers all currently recognized CD standards and was enlarged to embrace the new Super Audio CD. The DVD standards, promulgated by the DVD Forum and published by Toshiba, wear more prosaic identifying names based on a simple letter designation. The five standards recognized at the time of this writing include those for audio, video, read-only data, write-once data, and read/write data. Figure summarizes these standards.
The primary DVD standard is maintained by Toshiba Corporation. It is freely available but hardly free. Anyone can obtain a copy from the DVD Forum at http://www.dvdforum.org after paying a $5,000 fee and signing a nondisclosure agreement.
Each of the most widely used of the CD and DVD standards is separately discussed in the following sections.
Note that the original format for CDs was audio. The data format, CD-ROM, was separately developed around the audio parameters. In DVD, the original format was DVD-ROM, with the first application, DVD-Video, being a subset of the DVD-ROM format.
CD-DA, which stands for Compact Disc, Digital Audio, is standardized in the Red Book. It was the original Compact Disc application, storing audio information in digital form. The name Red Book refers to the international standard (ISO 10149), which was published as a book with a red cover and specifies the digitization and sampling rate details, including the data-transfer rate and the exact type of pulse code modulation used.
Under the standard, a CD-DA disc holds up to 74 minutes of stereo music with a range equivalent to today's FM radio station—the high end goes just beyond 15KHz (depending on the filtering in the playback device); at the low frequency end, nearly to DC, zero hertz. The system stores audio data with a resolution of 16 bits, so each analog audio level is quantified as one of 65,536 levels. With linear encoding, that's sufficient for a dynamic range of 96 decibels. To accommodate an upper frequency limit of 15KHz with adequate roll-off for practical antialiasing filters, the system uses a sampling rate of 44.1KHz.
Under the Red Book standard, this digital data is restructured into 24-byte blocks, arranged as six samples, each of a pair of stereophonic channels (each of which has a depth of 16 bits). These 24 bytes are encoded along with control and subchannel information into the 588 optical bits of a small frame, each of which stores about 136 microseconds of music. Ninety-eight of these small frames are grouped together in a large frame, and 75 large frames make one second of recorded sound.
In CD-DA systems, the large frame lacks the sync field, header, and error-correction code used in CD-ROM storage, discussed later. Instead, the error-correction and control information is encoded in the small frames. The necessary information to identify each large frame is spread through all 98 bits of subchannel Q in a given large frame. One bit of the subchannel Q data is drawn from each small frame.
From the subchannel Q data, a sector is identified by its ordinary playing time location (in minutes, seconds, and frame from the beginning of the disc). The 98 bits of the subchannel Q signal spread across the large frame is structured into nine separate parts: a two-bit synchronization field; a four-bit address field to identify the format of the subchannel Q data; a four-bit control field with more data about the format; an eight-bit track number; an eight-bit index number; a 24-bit address, counting up from the beginning of the track (counting down from the beginning of the track in the pre-gap area); eight reserved bits; a 24-bit absolute address from the start of the disc; and 16 bits of error-correction code. At least nine of ten consecutive large frames must have their subchannel Q signals in this format.
In the remaining large sectors, two more subchannel Q formats are optional. If used, they must occur in at least 1 out of 100 consecutive large frames. One is a disc catalog number that remains unchanged for the duration of the disc; the other is a special recording code that is specific and unchanging to each track.
Super Audio CD
The standard allows for three forms—a single-layer disc that only supports Super Audio, a disc with two Super Audio layers, and a hybrid disc that mates a Super Audio layer with a conventional CD-A layer for compatibility with old equipment. A hybrid disc works and sounds like a conventional CD in a conventional CD drive but plays back Super Audio in an SA drive.
To store all the data necessary for Super Audio, all Super Audio layers use basic DVD technology. The data on these layers takes the form of Sony's proprietary Direct Stream Digital (DSD) encoding technology (discussed later). The CD layer uses conventional CD technology (16-bit audio sampled at 44.1KHz).
The DSD encoding system provides frequency response to 100KHz and a dynamic range in excess of 120 dB. Although few people can hear anything beyond 20KHz, the highest quality analog master tapes recorded at a speed of 30 inches per second often have information out to 50KHz. The high-frequency range of DSD will finally put to rest complaints that digital doesn't sound as good as analog.
The DSD system uses one-bit sampling at a 2.8224MHz rate, the same as used in a high-quality pulse-code modulation (PCM) encoding system that uses 64x oversampling. Instead of converting the resulting code to PCM, the DSD system records the one-bit sample values. Delta sigma modulation determines the one-bit value for each sample—that is, the sample represents the sum (sigma) of the changes (delta) of the signal. The system maintains a running total of the bits representing the strength of the analog waveform. At each sampling interval, it compares the present value with the previous value. If the new value is higher than the previous value, the system adds a logical "1" to the code stream. If the current value is lower than the previous value, the system adds a logical "0" to the code stream. If a value does not change, it is nevertheless evaluated and will produce an alternating pattern of 1's and 0's that correct one another.
The overall result is that a rising (positive) waveform will be a dense string of 1's, and a full falling (negative) waveform will be a dense string of 0's. Consequently, this form of modulation is often termed Pulse Density Modulation (PDM). As with all digital signals, the PDM output is resistant to noise and distortion—and alteration to the signal smaller than an entire pulse will be ignored in processing and excluded from the reconstructed signal. Unlike coded digital signals, however, PDM signals (and the signals of a similar digital modulation system, called Pulse Width Modulation) are closely allied to their analog equivalent. The pulses in the signal mimic the analog signal in strength and frequency. In fact, a simple low-pass filter can convert the digital signals into analog form.
In the case of Sony's DSD, the simple analog conversion isn't very good. Digital artifacts make the simple conversion noisy. The Sony system uses high-order filtering to move the noise out of the audio band.
The CD-compatible layer of a Super Audio CD is created during mastering through a process Sony calls super bit mapping direct downstream conversion. It is essentially the same process used in mastering ordinary audio CDs from 64x oversampled masters.
Although the standard Super Audio CD format uses two audio channels of DSD signals, the specification allows for up to six such channels for future applications. In addition, storage space on the outside of the audio signal area is reserved for text, graphics, or videos—for example, to accompany the audio presentation.
The Super Audio CD also includes provisions for watermarking (invisibly indicating the origin of the media) discs through coding embedded in the wobble of the track. This feature can be used for tracking the origins of a particular disc (for example, for controlling disc piracy) or in copy-protection schemes.
According to Sony, a hybrid Super Audio CD will play in any drive—CD, DVD, or SA-CD. In a CD drive, it will deliver better than CD quality thanks to the super bit mapping downstream conversion. Current DVD drives will also play the discs with CD quality. The true beauty of the disc will come out only on special SA-CD players or a future generation of DVD drives that have the proper playback algorithms.
The Yellow Book, first introduced in 1984, describes the data format standards for CD-ROM discs and includes CD-XA, which adds compressed audio information to other CD-ROM data. The Yellow Book divides CD-ROM operation into two modes. Mode 1 is meant for ordinary computer data. Mode 2 handles compressed audio and video data. Because Yellow Book discs can contain audio, video, and data in their two modes, they are often termed mixed mode discs. Yellow Book is the standard that first enabled multimedia CDs. It is now an internationally recognized standard as ISO 10149:1989 (E).
As the full name implies, Compact Disc Read-Only Memory is fundamentally an adaptation of the Compact Disc for storing digital information—Rock and Roll comes to computer storage. Contrary to the implications of the name, however, you can write to CD-ROM discs with your computer, providing you buy the right (which means expensive) equipment. For most applications, however, the CD-ROM is true to its designation—it delivers data from elsewhere into your computer. Once a CD-ROM disc is pressed, the data it holds cannot be altered. Its pits are present for eternity.
In the beginning, CD-ROM was an entity into itself, a storage medium that mimicked other mass storage devices. It used its own storage format. The kind of data that the CD-ROM lent itself to was unlike that of other storage systems, however. The CD-ROM supplied an excellent means for distributing sounds and images for multimedia systems, consequently engineers adapted its storage format to better suit a mixture of data types. The original CD-ROM format was extended to cover these additional kinds of data with its Extended Architecture. The result was the Yellow Book standard.
As with other disc media, the CD's capacity is divided into short segments called sectors. In the CD-ROM realm, however, these sectors are also called large frames and are the basic unit of addressing. Because of the long spiral track, the number of sectors or large frames per track is meaningless—it's simply the total number of sectors on the drive. The number varies but can reach about 315,000 (for example, for 74 minutes of music) or about 340,000 for newer, 80-minute discs.
Large frames define the physical format of a Compact Disc and are defined by the CD-ROM media standards to contain 2352 bytes. (Other configurations can put 2048, 2052, 2056, 2324, 2332, 2340, or 2352 bytes in a large frame.) The CD-ROM media standards allow for several data formats within each large frame, dependent on the application for which the CD-ROM is meant. In simple data-storage applications, Data Mode 1, 2048 bytes in a 2352-byte large frame actually store data. The remaining 304 bytes are divided among a synchronization field (12 bytes), a sector address tag field (4 bytes), and an auxiliary field (288 bytes). In Data Mode 2, which was designed for less critical applications not requiring heavy-duty error correction, some of the bytes in the auxiliary field may also be used for data storage, providing 2336 bytes of useful storage in each large frame. Other storage systems allocate storage bytes differently but in the same large-frame structure.
The four bytes of the sector address tag field identify each large frame unambiguously. The identification method hints at the musical origins of the CD-ROM system—each large frame bears an identification by minute, second, and frame, which corresponds to the playing time of a musical disc. One byte each is provided for storing the minute count, second count, and frame count in binary coded decimal (BCD) form. BCD storage allows up to 100 values per byte, more than enough to encode 75 frames per second, 60 seconds per minute, and the 74 minute maximum playing time of a Compact Disc (as audio storage). The fourth byte is a flag that indicates the data storage mode of the frame.
In Data Mode 1, the auxiliary field is used for error detection and correction. The first four bytes of the field store a primary error-detection code and are followed by eight bytes of zeros. The last 276 hold a layered error-correction code. This layered code is sufficient for detecting and repairing multiple-bit errors in the data field.
Extended architecture rearranges the byte assignment of these data modes to suit multisession applications. In XA Mode 2 Form 1, the 12 bytes of sync and four of header are followed by an eight-byte subheader that helps identify the contents of the data bytes, 2048 of which follow. The frame ends with an auxiliary field storing four bytes of error-detection code and 276 bytes of error-correction code. In XA Mode 2 Form 2, the auxiliary field shrinks to four bytes; the leftover bytes extending the data contents to 2324 bytes.
The bytes of the large frame do not directly correspond to the bit-pattern of pits that are blasted into the surface of the CD-ROM. Much as hard discs use different forms of modulation to optimize both the capacity and integrity of their storage, the Compact Disc uses a special data-to-optical translation code. Circuitry inside the Compact Disc system converts the data stream of a large frame into a bit-pattern made from 98 small frames.
Each small frame stores 24 bytes of data (thus 98 of them equal a 2352-byte large frame) but consists of 588 optical bits. Besides the main data channel, each small frame includes an invisible data byte called the subchannel and its own error-correction code. Each byte of this information is translated into 14 bits of optical code. To these 14 bits, the signal-processing circuitry adds three merging bits, the values of which are chosen to minimize the low-frequency content of the signal and optimize the performance of the phase-lock loop circuit used in recovering data from the disc.
The optical bits of a small frame are functionally divided into four sections. The first 27 bits comprise a synchronization pattern. They are followed by the byte of subchannel data, which is translated into 17 bits (14-bit data code plus three merging bits). Next comes the 24 data bytes (translated in 408 bits), followed by eight bytes of error-correction code (translated into 136 bits).
The subchannel byte actually encodes eight separate subchannels, designated with letters P through W. Each bit has its own function. For example, the P subchannel is a flag used to control audio muting. The Q subchannel is used to identify large frames in audio recording.
As with a hard disk, this deep structure is hidden from your normal application software. The only concern of your application is to determine how the 2048 (or so) bytes of active storage in each large frame are divided up and used. The CD-ROM drive translates the block requests made by the SCSI interface (or other interface) into the correct values in the synchronization field to find data.
A session is a single recorded segment on a CD and may comprise multiple tracks. The session is normally recorded all at once in a single session, hence the name. Under the Orange Book standard, a session can contain data, audio, or images.
On the disc, each session begins with a lead-in, which provides space for a table of contents for the session. The lead-in length is fixed at 4500 sectors, equivalent to one minute of audio or 9MB of data. When you start writing a session, the lead-in is left blank and is filled in only when you close the session.
At the end of the session on the disc is a lead-out, which contains no data but signals to the CD player that it has reached the end of the active data area. The first lead-in on a disc measures 6750 sectors long, the equivalent of 1.5 minutes of audio or 13MB of data. Any subsequent lead-outs on a single disc last for 2250 sectors (half a minute, or about 4MB of data).
The basic addressing scheme of the Compact Disc is the track, but CD tracks are not the same as hard disk tracks. Instead of indicating a head position or cylinder, the track on a CD is a logical structure akin to the individual tracks or cuts on a phonograph record.
A single Compact Disc is organized as one of up to 99 tracks. Although a single CD can accommodate a mix of audio, video, and digital data, each track must be purely one of the three. Consequently, a disc mixing audio, video, and data would need to have at least three tracks.
The tracks on a disc are contiguous and sequentially numbered, although the first track containing information may have a value greater than one. Each track consists of at least 300 large frames (that's four seconds of audio playing time). Part of each track is a transition area called pre-gap and post-gap areas (for data discs) or pause areas (for audio discs).
Each disc has a lead-in area and a lead-out area corresponding to the lead-in and lead-out of phonograph records. The lead-in area is designated track zero, and the lead-out area is track 0AA(hex). Neither is reported as part of the capacity of the disc, although the subchannel of the lead-in contains the table of contents of the disc. The table of contents lists every track and its address (given in the format of minutes, seconds, and frames).
Tracks are subdivided into up to 99 indices by values encoded in the subchannel byte of nine out of ten small frames. An index is a point of reference that's internal to the track. The number and location of each index is not stored in the table of contents. The pre-gap area is assigned an index value of zero.
The nominal maximum capacity of a CD amounts to 74 minutes of music recording time or about 650MB when used for storing data. With 80-minute discs, the data capacity extends to about 700MB. These capacities are only approximate, however. A number of factors control the total capacity of a given disc. For example, mass-produced audio CDs sometimes contain more than 74 minutes of sound because disc-makers can cram more onto each disc by squeezing the track on the glass master disc into a tighter, longer spiral. This technique is the secret to extending the playing time 80-minute discs.
The special CDs that you can write on with your computer cannot benefit from this tighter-track strategy because their spiral is put in place when the discs are manufactured. The standard formats yield four capacity levels on two different sizes of disc, as discussed in the upcoming CD-R section. In any case, these numbers represent the maximum storage capacity of a recordable CD. Nearly anything you do when making a CD cuts into that capacity.
The Yellow Book describes how to put information on a CD-ROM disc. It does not, however, define how to organize that data into files. In the DOS world, two file standards have been popular. The first was called High Sierra format. Later this format was upgraded to the current standard, the ISO 9660 specification.
The only practical difference between these two standards is that the driver software supplied with some CD-ROM players, particularly older ones, meant for use with High Sierra–formatted discs may not recognize ISO 9660 discs. You're likely to get an error message that says something like "Disc not High Sierra." The problem is that the old version of the Microsoft CD-ROM extensions—the driver that adapts your CD-ROM player to work with DOS—cannot recognize ISO 9660 discs.
To meld CD-ROM technology with DOS, Microsoft Corporation created a standard bit of operating code to add onto DOS to make the players work. These are called the DOS CD-ROM extensions, and several versions have been written. The CD-ROM extensions before Version 2.0 exhibit the incompatibility problem between High Sierra and ISO 9660, noted earlier. The solution is to buy a software upgrade to the CD-ROM extensions that came with your CD-ROM player from the vendor who sold you the equipment. A better solution is to avoid the problem and ensure any CD-ROM player you purchase comes with Version 2.0 or later of the Microsoft CD-ROM extensions.
ISO 9660 embraces all forms of data you're likely to use with your computer. Compatible discs can hold files for data as well as audio and video information.
For Windows 95, Microsoft created another set of extensions to ISO 9660. Called the Joliet CD ROM Recording Specification, these extensions add support for longer file names—but to 128 characters instead of the 255-character maximum of Windows 95—as well as nesting of directories beyond eight levels, allowing directory names to use extensions, and broadening the character set. To maintain compatibility with ISO 9660, the extra Joliet data must fit in a 240-character limit, foreclosing on the possibility of encoding all Windows 95 directory data.
The Orange Book is the official tome that describes the needs and standards for Compact Disc-Recordable (CD-R) systems. It turns the otherwise read-only medium into a write-once medium so that you can make your own CDs. Introduced in 1992, the Orange Book standard introduced multisession technology. A multisession disc can contain blocks of data written at different times (sessions). Each session has its own lead-in track and table of contents.
Developed jointly by Philips and Sony (sound familiar?), the Orange Book defines both the physical structure of recordable CDs and how various parts of the data area on the disc must be used. These include the program area, which holds the actual data the disc is meant to store; the program memory area, which records the track information for the whole disc and all the sessions it contains; the lead-in and lead-out areas; and a power calibration area that's used to calibrate the power of the record laser.
The nature of the CD-ROM medium and the operation of CD recorders make the creation and writing of a CD-ROM a more complex operation than simply copying files to a hard disk drive. Because CD-ROMs are essentially sequentially recorded media, the CD recorder wants to receive data and write it to disc as a continuous stream. In most CD recorders, the stream of data cannot be interrupted once it starts. An interruption in the data flow can result in an error in recording. Moreover, to obtain the highest capacity possible from a given CD, you want to limit the number of sessions into which you divide the disc. As noted earlier, each session steals at least 13MB from disc capacity for the overhead of the session's lead-in and lead-out.
If your system cannot supply information to your CD recorder fast enough, the result is a buffer underrun error. When you see such an error message on your screen, it means your CD recorder has exhausted the software buffer and run out of data to write to the disc. You can prevent this error by increasing the size of the buffer if your software allows it. Or you can better prepare your files for transfer to CD. In particular, build a CD image on a hard disk that can be copied on the fly to the CD.
The best strategy is to give over your computer to the CD-writing process, unloading any TSR programs, background processes, or additional tasks in a multitasking system. Screensavers, pop-up reminders, and in-coming communications (your modem answering the phone for data or a fax) can interrupt your CD session and cause you to waste your time, a session, or an entire disc.
Your system needs to be able to find the files it needs to copy to your CD-ROM as efficiently as possible. Copying multiple short files can be a challenge, particularly if your hard disk is older and slower or fragmented. CD recorder–makers recommend discs with access times faster than about 19 milliseconds. An AV-style hard disk is preferable because such drives are designed for the smooth, continuous transfer of data and don't interrupt the flow with housekeeping functions, such a thermal calibration. You'll also want to be sure your files are not fragmented before transferring them to CD. Run your defrag utility before writing to your CD.
Depending on the manufacturer of your CD recorder and the software accompanying it, you may have a choice of more than one mode for copying data to CD. In general, you have two choices: building a CD image on your hard disk and copying that image intact to your CD. Some manufacturers call this process "writing on the fly." From a hardware standpoint, this is the easiest for your system and CD recorder to cope with because the disc image is already in the form of a single huge file with all the directory structures needed for the final CD in their proper places. Your system needs to only ready your hard disk and send a steady stream of data to the CD recorder.
The alternative method is to create the CD structure in its final form on the CD itself. Some manufacturers call this "writing a virtual image." In making a CD by this method, your CD recorder's software must follow a script or database to find which files it should include on the disc and locate the files on your hard disk. The program must allocate the space on your CD, dividing it into sectors and tracks, while at the same time reading the hard disk and transferring the data to the CD.
With a read-only medium, you normally don't have to concern yourself with the issue of storage capacity. That's for the disc-maker to worry about—the publisher has to be sure everything fits. With about 650 megabytes of room on the typical CD and many products requiring only a few megabytes for code, the big problem for publishers is finding enough stuff to put on the disc so that you think you're getting your money's worth.
The advent of recordable CDs changes things entirely. With CDs offering convenient long-term storage for important files such as graphic archives, you'll be sorely tempted to fill your CDs to the brim. You'll need to plan ahead to make all your files fit.
CD-ROM capacities are measured in minutes, seconds, and sectors, based on the audio format from which engineers derived the medium. Recordable CDs come in five capacities: 18- and 21-minute discs are 80 millimeters in diameter; 63-, 74-, and 80-minute discs are 120 millimeters in diameter.
Two kinds of file overhead affect the number of bytes available on a given recordable CD, which can actually be used for storage. One is familiar from other mass storage devices, resulting from the need to allocate data in fixed-size blocks. The other results from the format structure required by the CD standards.
Logical Block Padding
As with most hard and floppy discs, CD-ROMs allocate their storage in increments called logical blocks. Although logical block sizes of 512, 1024, and 2048 bytes are possible with today's CD drives, only the 2048-byte logical block format is in wide use. If a file is smaller than a logical block, it is padded out to fill a logical block. If a file is larger than one logical block, it fills all its logical blocks except the last, which is then padded out to be completely filled. As a result of this allocation method, all files except those that are an exact multiple of the logical block size require more disc space than their actual size. In addition, all directories on a CD require at least one logical block of storage.
In addition to the block-based overhead shared with most mass storage devices, CD-ROMs have their own format overhead that is unique to the CD system. These are remnants of the audio origins of the CD medium.
Because audio CDs require lead-in and lead-out tracks, the Yellow Book standard for CD-ROM makes a similar allowance. The specifications require that data on a CD-ROM begin after a two-second pause, followed by a lead-in track 6500-sectors long. Consequently, the first two seconds of storage space and the lead-in area on a CD are not usable for data. These two seconds comprise a total of 150 sectors, each holding 2048 bytes, which trims the capacity of the disc by 307,200 bytes. The 6500-sector lead-in consumes another 13,312,000 bytes. The lead-out gap at the end of a storage session and the pre-gap that allows for a subsequent session consume another 4650 sectors or 9,523,200 bytes.
The ISO 9660 file structure also eats away at the total disc capacity. The standard reserved the first 16 sectors of the data area—that's 32,768 bytes—for system use. Various elements of the disc format also swallow up space. The root file, primary volume descriptor, and volume descriptor set terminator each require a minimum of one sector. The path tables require at least two sectors. The required elements consequently take another five sectors or 10,120 bytes of space. Discs with complex file structures may exceed these minima and lose further storage space.
The more sessions you divide a given CD into, the less space that will be available for your data. Each session on a multisession CD requires its own lead-in. Consequently, each session requires at least 13MB of space in addition to the file structure overhead.
Creating a CD is a complete process. The drive doesn't just copy down data blocks as your computer pushes them out. Every disc, even every session, requires its own control areas to be written to the disc. Your CD-R drive doesn't know enough to handle these processes automatically because the disc data structure depends on your data and your intentions. Your CD-R drive cannot fathom either of these. The job falls to the software you use to create your CD-R discs.
Your CD-creation software organizes the data for your disc. As it sends the information to your CD-R drive, it also adds the control information required for making the proper disc format. After you've completed writing to your disc, the software fixates the disc so that it can be played. The last job is left to you—labeling the disc so you can identify the one you need from a stack more chaotic than the pot of an all-night poker game.
As with ordinary CD-ROM, the speed of CD-R drives is the transfer rate of the drive measured in multiples of the basic audio CD speed, 150KBps. The very first CD recorders operated at 1x speed, and each new generation has doubled that speed. The fastest drives currently operate at 4x, although technical innovation can increase that just as it has improved basic CD speed.
Most CD recorders have two speed ratings—one for writing and one for reading. The writing speed is invariably the same or less than the reading speed. Advertisements usually describe drives using two numbers, the writing speed (lower number) first. The most common speed combinations are 1x1, single-speed read and write; 1x2, single-speed write and double-speed read; 2x2 double-speed writing and reading; 2x4 double-speed writing and quadruple-speed reading; and 4x4 quadruple-speed in both writing and reading.
How fast a CD recorder writes is only one factor in determining how long making one or more CDs will take. Other variables include your system, writing mode (whether you try to put files together for a CD session on the fly or try to write a disc image as one interrupted file), and the number of drives.
Your system and writing mode go hand in hand. As noted later in this section, a CD recorder requires a constant, uninterrupted stream of data to make a disc. The speed at which your computer can maintain that data flow can constrain the maximum writing speed of a CD-R drive. Factors that determine the rate of data flow include the speed of the source of the data (your hard disk), the fragmentation of the data, and the interfaces between the source disc and your CD recorder.
Most CD recorders have built-in buffers to bridge across temporary slowdowns in the data supply, such as may be involved when your hard disk's read/write head repeatedly moves from track to track to gather a highly fragmented file or when an older, non-A/V drive performs a thermal calibration. Even with this bridge action, however, such hard disk slowdowns reduce the net flow of data to the CD recorder. If you try to create a CD by gathering together hundreds of short hard disk files on the fly, your hard disk may not be able to keep up with the data needs of a 4x CD recorder. In fact, if the files are many and small, the hard disk may not even be able to maintain 1x speed, forcing you to resort to making an image file before writing to the disc.
On the other hand, one manufacturer (Mitsumi) reports that higher writing speeds produce more reliable CDs. At the 1x writing speed, the laser remains focused on a given disc area longer, possibly overheating it. In other words, you may want to avoid 1x speed unless the performance of your system and its software requires it. Although early software, drives, and computers often could not keep up with speeds in excess of 1x, most current products do not have difficulties at higher speeds.
When you have to produce a large number of CDs quickly, one of the best strategies is to use multiple drives. Five drives writing simultaneously cuts the net creation time of an individual CD by 80 percent. For moderate-volume applications, stacks of CD writers can make a lot of sense—and CDs. For large-volume applications (generally more than a few hundred), pressing CDs is the most cost-effective means of duplication, albeit one that requires waiting a few days for mastering and pressing.
Depending on your CD-R drive and your CD-creation software, you may have your choice of the mode you use for writing to your CD. The mode determines what you can write to your discs and when. Typically you don't have to worry about the writing mode because your software takes care of the details automatically. However, some drives and software may be limited to the modes under which they can operate.
The basic CD-writing modes are four: track-at-once, multisession, disc-at-once, and incremental writing. Each has its own requirements, limitations, and applications. A new standard, Mount Rainier, discussed separately, ensures compatible on incrementally written discs.
The most basic writing method for CDs is the creation of a single track. A track can be in any format that your CD-R drive can write (for example, a CD-ROM compatible disc or a CD-DA disc for your stereo system). The track-at-once process writes an entire track in a single operation. A track must be larger than 300 blocks and smaller than the total capacity of the disc minus its overhead.
Writing track-at-once requires only that you designate what files you want to put on a CD. Your CD-creation software takes over and handles the entire writing process.
Originally the big limitation of track-at-once writing was that you could write only one track on a disc in a single session. Consequently, unless you had a lot to write to your disc already prepared beforehand, this process was wasteful of disc space. Some modern CD systems can add one track at a time to a disc within a single session, even allowing you to remove the disc from the drive and try it in another in the middle of the process.
Each track has overhead totaling 150 blocks for run-in, run-out, pre-gap and linking. CD standards allow 99 tracks per disc. Consequently, if your tracks are small, you may waste substantial capacity. Writing the maximum number of blocks of minimal size (300 blocks plus 150 blocks of overhead each) will only about half-fill the smallest, 18-minute CD disc (44,550 blocks on a 81,000 block disc).
Sometimes called track incremental mode, track multisession mode is the most common means of allowing you to take advantage of the full capacity of CDs. Track multisession writing allows you to add to CDs as you have the need for it by dividing the capacity of the disc into multiple sessions, up to about 50 of them. Each session has many of the characteristics of a complete CD, including its own lead-in and lead-out areas as well as a table of contents.
In fact, the need for these special formatting areas for each session is what limits the number of sessions on the disc. The lead-in and lead-out areas together require about 13.5MB of disc space. Consequently, CDs with a total capacity of 680MB can hold no more than about 50 sessions.
When the CD standards were first created, engineers didn't even consider the possibility that individual consumers would ever be able to write their own discs. Consequently, they assumed that all discs would be factory mastered in a single session. They designed early CD drives to recognize only one session on a disc. Many older CD-ROM drives (particularly those with 1x and 2x speed ratings) were single-session models and cannot handle multisession discs written in track multisession mode. Single-session drives generally read only the first session on a disc and ignore the rest.
Another problem that may arise with multisession discs is the mixing of formats. Many CD players are incapable of handling discs on which CD-ROM Mode 1 or 2 sessions are mixed with XA sessions. The dangerous aspect of this problem is that some CD-mastering software (and CD drives) allow you to freely mix formats in different sessions. You may create a disc that works when you read it on your CD drive that cannot function in other CD drives. The moral is not to mix formats on a disc. (Don't confuse format with data type. You can freely mix audio, video, and pure data as long as they are written in the same format, providing the one you choose is compatible with all three data types.)
Most modern CD-R machines allow you to write more than one track in a given session. The advantage of this technique is the elimination of most of the 13.5MB session overhead. Instead of lead-in and lead-out tracks, each pair of tracks is separated by 150 blocks (two seconds) of pre-gap—overhead of only about 300KB. The entire session must, of course, be framed by its own lead-in, table of contents, and lead-out areas.
In multisession discs, the drive writes to the lead-in area after it finishes with the data on the disc. The lead-in contains the table of contents for the session as well as an indication of the remaining writable area on the disc. The lead-in of the last session on the disc indicates that no more sessions are present, closing the disc.
Old-fashioned vinyl phonograph records were cut as a single, continuous process. From the moment the cutting stylus plunked down on the master disc until it finished the disc, spinning around in the capture track, the mastering process had to be free of interruptions. After all, any gap in the spiral track of the phonograph record would stall your record player. To cut a master record, the engineers prepared a master tape that was complete in every detail of everything that was to go on the final disc, including blank tape for the gaps between cuts on the final disc.
The CD equivalent to making such a master disc is the disc-at-once process. As with cutting a master record, the disc-at-once process must be completely free from interruption from the beginning of the lead-in area to the completion of the lead-out area. The table of contents, all tracks, and the Q channel must all be prepared before the writing process begins. The entire disc will be written in one swoop so that the formatting data will appear on the disc (for example, the lead-in will be written before the data). Typically, to make a CD using disc-at-once writing, you'll prepare an exact image of the CD and store it on a hard disc. The hard disc must be A/V rated so that it does not interrupt the data stream for thermal calibration or other housekeeping and thus cause buffer underrun (see the section titled "Underrun," later in the chapter).
In effect, disc-at-once is a combination of track-at-once and multisession writing that simply extends across the entire CD (or as much of it as will ever be used).
Disc-at-once is the recording method that must be used when you prepare a disc to serve as the master for making mass-produced CDs. Because the laser never turns off, a disc recorded using the disc-at-once mode contains no link blocks.
If you could make a CD-R work like a conventional hard disc, it would be capable of incremental writing. That is, you could add data to your disc whenever you needed to simply by saving a file. In CD terminology, this is called packet writing. With appropriate software drivers, you can drag and drop files to your CD recorder as if it were a hard disk drive.
In this context, a packet is a block of data smaller than a track. Your drive accepts the packet and writes it to the disc, identifying it with four blocks of run-in information, two of run-out information, and a link block. Each packet thus suffers seven blocks or about 15KB of overhead in addition to that required for directory information.
The ISO 9660 file system comes up short in packet writing. It requires that all the file information be written in the table of contents when you create a session. Multisession discs sidestep this problem by creating a new file system every time you write a new session, with all the overhead of a complete file system (whoops, there goes another 13.5MB). Packet writing therefore requires drives and software that follow the Universal Data Format (UDF) system, discussed under "DVD-ROM," later in the chapter.
Whereas packet writing requires software added as an application on top of an operating system, the Mount Rainier standard incorporates the same functionality (and more) within the operating system. Jointly developed by Compaq (now Hewlett-Packard), Microsoft, Philips Electronics, and Sony, the Mount Rainier specification obsoletes packet writing with a similar drag-and-drop interface to allow random writing to CD and DVD drives. In addition, the specification requires that drives be able to access data in 2KB allocation units, like those used on magnetic disks.
One of the most important parts of the Mount Rainier specification is shifting responsibility for managing disc defects from the packet-writing software to the disc drive itself. The drive maintains a map of bad sections of the disc in a special table carved from the user data area of the disc. Using the table, the drive can skip over bad areas of the disc when writing data without any intervention from the operating system—without the operating system even knowing the bad areas exist.
This feature alone requires new drive designs. Conventional CD and DVD drives cannot be upgraded to Mount Rainier technology. On the other hand, conventional media work with Mount Rainier drives, and Mount Rainier drives can read discs written under earlier standards.
Mount Rainier eliminates much of the hassle of formatting CDs by moving the process to the background. Although you can use preformatted discs with a Mount Rainier drive, using unformatted discs imposes no penalty. Slide a new disc in the drive, and the drive automatically starts formatting it even as you write data.
Discs created using Mount Rainier technology cannot be read by conventional drives without special software drivers. Make a Mount Rainier disc in one computer, and you won't be able to read it on another machine that does not have a driver that supports the technology. You can enable an older system to read (but not write) Mount Rainier discs by installing new driver software (when it becomes available).
The common name for Mount Rainier is EasyWrite technology. The promoters of the new format have developed a certification program and a logo that lets you quickly identify drives that correctly implement the technology.
The Mount Rainier specification was first published on July 30, 2002. The Web site www.mt-rainier.org provides access to the full specification.
No matter the mode, the CD-writing process is continuous, start to finish. The laser switches on at the beginning of a session and remains in continuous operation until that session is finished. The CD format requires the interleaving of data between blocks during the writing process to help ensure data integrity. To properly sort the interleaved data, the drive needs an overview of the data. To gain this overview, the drive has a data buffer from which it draws the data to write.
For the laser in a CD-R drive to operate continuously, it must have a continuous supply of data to keep its buffer filled with enough information to properly perform the interleaving. If at any time it runs out of data to write, the writing process is interrupted. Unlike hard disks, the CD drive can't pick up where it left off on the next spin of the disc. The error resulting from the interruption of the data flow is termed buffer underrun.
CD players see the interrupted session as an error (which it is) that may render the disc unplayable. In other words, buffer underrun ruins a disc. Better CD-R drives allow you to close the interrupted session and recover the remaining space on the disc for other sessions.
To prevent you from wasting discs with inadvertent data underruns, most CD-R mastering software makes a trial run or test of the recording session before actually committing your data to disc. The test involves performing exactly the same steps as the actual write operation—including operating the laser in the drive in its write mode—but keeps the power of the laser at read level. The CD-R drive runs through the entire write operation, but the lower power of the laser prevents it from affecting (and potentially ruining) a disc.
If the recording software discovers a problem during recording that would cause an underrun or other problem, it will advise you how to sidestep the problem, typically by stepping down to a lower writing speed on your CD-R drive or, as a last resort, defragmenting your hard disk.
The only problem with pre-write testing is that the trial run takes as long as writing everything to your disc, essentially doubling the write time of every disc you make. Most CD-mastering programs allow you to switch off this pre-write testing. Although you do this at your own peril (and the expense of ruined CDs), if you're making a batch of discs it is a viable timesaving option. In general, if you can write the first disc successfully, you can run through dozens of additional copies without worry.
Before a CD that you write can be read by a CD-ROM drive or the audio CD player in your stereo system, it must have an overall table of contents that follows the ISO 9660 standard. The process of finishing the disc for reading is termed fixation. In the process of fixation, the disc is finalized when your CD-R drive writes an overall absolute lead-in area and absolute lead-out area for the entire disc.
Multisession drives also can create discs that are fixated for appending. The individual sessions each have their own table of contents that reflects the sessions actually written on the disc, but the disc lacks the overall lead-in and lead-out areas. When you've added the last session to the disc, the finalization process writes an indication on the disc that no further sessions are present, then writes the overall disc lead-in and lead-out areas, completing a table of contents compatible with the ISO 9660 standard. Most CD-mastering programs refer to this finalization process as closing the disc.
Software that performs packet writing—for example, Sony's Compact Disc Recordable File System (CDRFS)—may require a process termed freezing the disc before you can use packet-written discs in ordinary CD players. The freezing process writes lead-in and lead-out areas on the disc. After a disc has been frozen, you can still write additional sessions onto it, providing, of course, additional capacity is available. The freeze process only subtracts from the available capacity, draining away the 13MB of overhead required by any single session.
CD-RW stands for CD-Rewritable, meaning that these drives can create new CDs that you can erase and use again. In fact, you can treat a rewritable CD as if it were a big floppy disk drive or slow hard disk drive. All CD-RW drives also function as CD-R drives, and they are standardized under the Orange Book just as are CD-R drives.
The difference between CD-R and CD-RW is in the media. Put a blank CD-R disc in a CD-RW drive, and you make a permanent record that you cannot change. With a CD-RW disc, you can rewrite and reuse disc space thanks to its phase-change medium.
CD-RW drives are actually the third incarnation of phase-change technology. The first drives, under the Phase Change Recordable banner (or PCR), were made by Toray Industries. It used a medium slightly larger than CDs, 130 millimeters in diameter as opposed to the CD's 120 mm, that was consequently physically incompatible with CD drives. Both sides of the disc had a recordable surface, allowing for a total capacity of 1.5GB per disc. Panasonic's PD discs reduced the size of the disc to the same as CDs and modified the storage format. The actual writing format uses sectors of 512 bytes versus the 2048 byte or larger sectors used by CD, so PD discs are also logically incompatible with CDs. You cannot duplicate a CD on the PD medium. Moreover, the logical format of the PD system limits its capacity to 650MB per disc, as opposed to the 680MB total of CDs. Further, the phase-change material used by the Panasonic PD drives is not compatible with the optical heads and electronics of CD drives. Although the electronics of the Panasonic drives adapted to handle either phase-change or conventional CD media, PD discs work only in PD drives.
Because of the lower reflectivity of CD-RW media, phase-change discs often are unreadable in early (pre-1998) CD-ROM and CD-R drives. Newer drives have compensatory circuitry built in called automatic gain control.
In operation, a CD-RW drive can function more like a conventional hard disk than a CD-R. The drive can update the disc table of contents at any time, so you can add files and tracks without additional session overhead. Under Windows, you typically drag and drop files to your CD-RW drive just like you would with any other disk. The Mount Rainier standard, discussed earlier, formalizes a system with this capability and more.
Discs written by CD-RW drives made before the Mount Rainier standard are not entirely compatible with all CD drives. The format used during CD-RW operation in pre–Mount Rainier drives is usually different from that of conventional CDs. To read a CD-RW disc in a CD-ROM or CD-R drive, the disc must be closed, an operation that effectively reorganizes its format. In the typical implementation, the reorganization process requires blank space on the disc, so you cannot fill one of these CD-RW discs with data and expect to later use it in another drive.
To your computer, the storage on a DVD looks much like that of any disk system. Information is organized into 2KB blocks that correspond to the clusters on disk systems. The file structure takes the form of the Micro UDF/ISO Bridge format. In effect it bridges two storage formats.
Universal Data Format (UDF) was designed by the Optical Storage Technology Association (OSTA), a group of companies involved in optical data storage, to make data stored on optical discs independent of any operating system (hence, universal). The goal was to allow you to write an optical disc on your computer and read it on any other computer in the world, regardless of operating system, microprocessor, or even whether it was powered by electricity or steam. UDF defines the data structures (partitions, files, sectors), error correction, character sets, and read/write method of the DVD system. ISO 9660 defines the tree-oriented directory structure (the same as on computer CDs) compatible with Windows and other popular operating systems. The overall structure of the disc fits the UDF format with the ISO 9660 structure on top, the intent being to eventually eliminate ISO 9660 support.
The UDF specification has incremented up to version 2.01, the level that OSTA recommends DVD-ROM publishers follow. DVD-Video discs and players are locked to the UDF version 1.02 specifications. You can download both versions of the specification in their entirety from www.osta.org.
The Micro UDF/ISO Bridge format imposes some limits on DVDs. One oft-quoted limit is a maximum file size of 1GB. This constraint applied only to DVD-Video discs. Although it seems incompatible with two hours of continuous video playback, the DVD system was designed to agglomerate multiple small files (including video, audio, and control information), process them together, and output a single continuous video stream.
On the disc itself, the block is chopped and scattered to help in error recovery. The tiny size of the pits on the disc means that a splotch or scratch will likely span a considerable storage area. Spreading the data out scatters potential read errors into small pieces in different storage units so that they can be more readily detected and corrected.
Each 2KB block is translated into a 2064-byte physical sector for storage on the disc. The sector gets further subdivided into 12 rows of 172 bytes each. The central ten rows store only data. The first starts with a 12-byte sector header to identify the storage unit. Four bytes provide the actual ID information with two additional bytes used for error correction dedicated to the ID data. The remaining six bytes in the header are reserved. The following 160 bytes in the first row contain data. The last row of each sector ends with four bytes of error-detection and error-correction information for the data area of the sector.
Sixteen sectors are then interleaved together to form a larger storage unit, the block. Ten bytes of error-correction code are added to each row in the block, and the resulting overall block gains another 16 rows of error-correction code. The result is a block that's 37,856 bytes, with about 15 percent of its contents devoted to error-correction information. These blocks are then written sequentially to the disc.
The DVD-ROM format allows for both constant linear velocity and constant angular velocity recording. The former favors capacity in sequential access applications (audio and video). The latter improves random access speed for data applications but reduces the capacity of each layer. Although it is an inherent part of the DVD-ROM specification, the chief application of CAV recording in DVD has been the various rewritable formats.
The required support to read UDF-based DVD-ROM discs is built in to Windows 98 and later Windows versions. Earlier Windows versions will require add-on drivers, which are usually included with DVD drives. In addition to decoder software, playback of DVD-Video requires DirectShow 5.2 or newer, which is included with Windows 98. More recent versions can be downloaded from Microsoft's Web site at www.microsoft.com. Again, DVD drives usually include the necessary decoder (as software or as a separate hardware MPEG-decoder board) as well as DirectShow.
The DVD-Video system devotes one track to video information that may use either MPEG-1 or MPEG-2 encoding. All commercial discs use MPEG-2 because it simply looks (and works) better. A dedicated DVD player can render either into video for your television or monitor. With current technologies, a DVD-ROM player in a computer works best with a separate hardware-based MPEG-2 decoder. Only the fastest computer processor can decode MPEG-2 in real time, and even these don't work as well as dedicated hardware decoders. Moreover, because your computer must devote nearly all its power to decoding the video, there's little left for doing other work at the same time.
DVD-Video would not be possible without compression (nor would any other digital video system be practical). DVD-Video data originates with a bit-rate of 124Mbps, and it must be compressed down to the maximum rate permitted under the DVD standard, 9.6Mbps. The average bit rate is about 3.5Mbps. Despite the heavy-duty compression, DVD still delivers about twice the resolution of VHS videocassettes. A typical DVD-Video system produces horizontal resolution of about 500 lines, compared to less than 240 lines for a VHS tape.
DVD-Video goes far beyond today's VHS and CD-Video systems. It allows both conventional-style images with the 4:3 aspect ratio as well as those with the 16:9 ratio favored by High-Definition Television systems. DVD players are required to have built-in filters to translate 16:9 images into the full-width of a 4:3 aspect ratio screen—in other words, built-in letterbox format translation. The DVD players will also allow you to zoom in to fill the screen height with a 16:9 image and pan to either side of the picture. The MPEG-2 encoding delivers about four times the spatial resolution as MPEG-1 (used by some CD systems) and allows a high-quality display with 480 lines of 720 pixels, each to fit into a 4MBps data stream. As with any video-compression technique, the exact data rate depends on the complexity of the image. Typically a high-quality image requires less data than a low-quality one plagued by noise. The onscreen resolution produced by a DVD system is in the range of 480–500 horizontal lines. Unlike other video systems—VCRs and laserdisc systems—DVD stores video images in component format (separate red, green, and blue images). Other consumer formats use composite video.
DVD-Video also introduces the concept of subpictures, which are additional images of limited color depth that can be multiplexed with the main audio and video data. The DVD standard allows for up to 32 subpictures, which typically will be menus for control systems, subtitles for foreign language films, or production credits. Each subpicture can measure as large as 720 by 480 pixels in four colors.
Note that DVD-Video is not High-Definition Television (HDTV). About the only thing in common between the two is the 16:9 aspect ratio supported by both. DVD-Video is more closely aligned with standard NTSC video, offering quality similar to that in the television studio. An HDTV image has about five times the number of pixels as the DVD-Video format. Its compressed format requires about twice the data rate (about 19.4Mbps). Certainly the DVD-18 medium has enough capacity to store HDTV, but it will require a new storage and playback format to cope with the HDTV data rate.
DVD mimics HDTV by offering a wide aspect ratio format. The DVD standard allows for both the old television and video aspect ratio of 4:3 and the HDTV aspect ratio of 16:9. The wide aspect ratio images have the same number of pixels as 4:3 images. The image is compressed anamorphically to fit. On playback the ostensibly square pixels get stretched horizontally to the wider aspect ratio. The standard allows the display of wide aspect ratio images in three different ways, which you can select when playing back a disc. These include the following:
The audio accompanying DVD-Video can take any of many forms. The most common (used on nearly all releases of theatrical movies) is Dolby Digital. Although the Dolby Digital system can accommodate up to 5.1 channels of PCM audio, the standard embraces lesser configurations as well—including simple monophonic and stereophonic recordings. In other words, a label proclaiming "Dolby Digital" on a movie box does not guarantee anything in the way of true multichannel sound.
The required audio support depends on the standard followed by the recorded video. Discs containing NTSC video (the standard in North America and Japan) are required to use Dolby Digital. Discs containing PAL video (Europe and most of the rest of the world) must use MPEG-2 audio. Other audio formats may optionally accompany either video standard.
The DVD-Video standard accommodates eight tracks of audio, each track being a single data stream that may comprise one or more audio channels. Each of these channels may use any of five encoding systems. In addition to Dolby Digital (with up to 5.1 channels per track), all DVD drives must also be able to decode PCM audio, up to eight channels per track (potentially 64 channels per disc, but real data rates ordain the channel count be lower), and MPEG audio (up to 7.1 channels per track). Optional decoding systems—which may or may not be included within the circuitry of a given DVD drive but can be attached as an accessory—include Digital Theater Sound (DTS) and Sony Dynamic Digital Sound (SDDS). Chapter 25, "Audio Systems," discusses these systems in more detail.
Video DVDs are burdened with several layers of copy protection that are entwined both with hardware and operating system software. Copy-protection occurs at three levels:
In addition, DVDs are marked with a regional code, a number that specifies the part of the world in which playback of the DVD's content is permitted. The DVD player checks to see whether a region code on the software matches that encoded into its hardware. If the two don't match, the disc won't play. DVD media boxes are marked with the region code as a number on a globe icon, the number corresponding to one of six regions, as listed in Figure.