poggio@apple.com (Andy Poggio) (03/02/90)
CD Summary Part 3 First Level Error Correction Data errors can arise from production defects in the disk itself, defects arising from subsequent damage to the disk, or jarring during reading. A significant characteristic of these errors is that they often occur in long bursts. This could be due, for example, to a relatively wide mark on the disc that is opaque to the laser beam used to read the disc. A system with two logical components called the Cross Interleave Reed-Solomon Coding (CIRC) is employed for error correction. The cross interleave component breaks up the long error bursts into many short errors; the Reed-Solomon component provides the error correction. As each frame is read from the disc, it is first decoded from fourteen channel bits (the three merging bits are ignored) into eight-bit data bytes. Then, the bytes from each frame (twenty-four data bytes and eight error correction bytes) are passed to the first Reed-Solomon decoder which uses four of the error correction bytes and is able to correct one byte in error out of the 32. If there are no uncorrectable errors, the data is simply passed along. If there are errors, the data is marked as being in error at this stage of decoding. The twenty-four data bytes and four remaining error correction bytes are then passed through unequal delays before going through another Reed-Solomon decoder. These unequal delays result in an interleaving of the data that spreads long error bursts among many different passes through the second decoder. The delays are such that error bursts up to 450 bytes long can be completely corrected. The second Reed-Solomon decoder uses the last four error correction bytes to correct any remaining errors in the twenty-four data bytes. At this point, the data goes through a de-interleaving process to restore the correct byte order. Subcoding Channels and Blocks The eight-bit control and display byte in each frame carries the subcoding channels. A subcoding block consists of 98 subcoding bytes, and thus 98 of the 588-bit frames. A block then can contain 2352 bytes of data. Seventy-five blocks are read each second. With this information, it is now straightforward to calculate that the CD data rate is in fact correct for CD digital audio (CD-DA): Required CD digital audio data rate: 44.1 K samples per second * 16 bits per sample * 2 channels = 1,411,200 bits/sec. CD data rate: 8 bits per byte * 24 bytes per frame * 98 frames per subcoding block * 75 subcoding blocks per second = 1,411,200 bits/sec. The eight subcoding channels are labeled P through W and are encoded one bit for each channel in a control and display byte. Channel P is used as a simple music track separator. Channel Q is used for control purposes and encodes information like track number, track type, and location (minute, second, and frame number). During the lead-in track of the disc, channel Q encodes a table of contents for the disk giving track number and starting location. Standards have been proposed that would use the remaining channels for line graphics and ASCII character strings, but these are seldom used. Track Types Tracks can have two types as specified in the control bit field of subchannel Q. The first type is CD digital audio (CD-DA) tracks. The two-channel audio is sampled at 44.1 Khz with sixteen bit linear sampling encoded as twos complement numbers. The sixteen bit samples are separated into two eight-bit bytes; the bytes from each channel alternate on the disc. Variations for audio tracks include pre-emphasis and four track recording. The other type of track specified by the subchannel Q control bit field is the data track. These must conform to the CD-ROM standard described below. In general, a disc can have a mix of CD digital audio tracks and a CD-ROM track, but the CD-ROM track must come first. Editorial: This first level error correction (the only type used for CD Audio data) is extremely powerful. The CD specification allows for discs to have up to 220 raw errors per second. Every one of these errors is (almost always) perfectly corrected by the CIRC scheme for a net error rate of zero. For example, our tests using Apple's CD-ROM drive (which also plays audio) show that raw error rates are around 50-100 per second these days. Of course, these are perfectly corrected, meaning that the original data is perfectly recovered. We have tested flawed discs with raw rates up to 300 per second. Net errors on all of these discs? Zero! I would expect a typical audio CD player to perform similarly. Thus I expect this raw error rate to have no audible consequences. So why did I say "almost always" corrected above? Because a sufficiently bad flaw may produce uncorrectable errors. These very unusual errors are "concealed" by the player rather than corrected. Note that this concealment is likely to be less noticeable than even a single scratch on an LP. Such a flaw might be a really opaque finger smudge; CDs do merit careful handling. On the two (and only two) occasions I have found these, I simply sprayed on a little Windex glass cleaner and wiped it off using radial strokes. This restored the CDs to zero net errors. One can argue about the quality of the process of conversion of analog music to and from digital representation, but in the digital domain CDs are really very, very good. --andy