 |
CD Data Coding
The data on a CD is stored with error
correction codes to ensure that the data is recovered without
errors even if the disc is scratched |
It is not possible to manufacture CDs where every pit is intact. Small defects in
manufacture are permissible and even minor scratches, which can occur with use, do not
usually affect the disc's playability. Therefore the CD specification includes
error correction to compensate for these defects. A modulation
scheme is also used to ensure that data can be read correctly.
Frames & Blocks
When converting audio data to the pits stored on the disc, the audio
data is divided into groups of 6 samples per channel, ie a total of 192
bits (6 x 2 x 16) or 24 bytes. To this audio data is then added the
subcode channels and CIRC parity data as shown below, resulting in a
total of 36 bytes and is called a frame. 98 frames are combined to form a
block. The structure of frames and blocks is shown in the
diagram below.
Each block comprises 2352 bytes and 75 such blocks are read from a CD
every second at normal speed. A 74-minute disc will therefore
contain 74 x 60 x 75 = 333,000 blocks.
Each 36 byte frame comprises the
following:
- Sync (3 bytes)
- Subcode data (1 byte)
- Audio data (24 bytes) representing 6 samples for each of the
stereo channels.
- Parity (8 bytes) for the CIRC error correction. These are
actually interleaved with the audio within the block.
CIRC &
Modulation
CIRC (Cross Interleaved Read-Solomon Code) adds two
dimensional parity information, to correct errors, and also
interleaves the data on the disc to protect from burst errors. CIRC
corrects error bursts up to 3,500 bits (2.4 mm in length) and
compensates for error bursts up to 12,000 bits (8.5 mm) such as
caused by minor scratches. CD-ROM discs generally have extra error protection.
The EFM (Eight to Fourteen) modulation scheme encodes each 8-bit
symbol as 14 bits plus 3 merging bits (17 bits in all). The EFM data is
then used to define the length and spacing of pits on the disc. The
merging bits ensure that pit & land lengths are not less than 3 and
no more than 11 channel bits. This reduces the effect of jitter and
other distortions on the error rate.
Subcode Channels
In addition to the main data channel (which contains audio or other data) there are 8
subcode channels labelled P to W interleaved with the main channel on the disc and
available for use by CD audio and CD-ROM players.
- P-channel indicates the start and end of each track
and was intended for simple audio players which did not have full Q-channel decoding.
- Q-channel contains the time codes (minutes, seconds and
frames), the Table of Contents (TOC), in the
lead-in, track type and catalogue number..
- Channels R to W are for subcode graphics (known as CD-G) and
CD Text which accompany the main
audio data.
When the CD was first developed, the subcode was included
as a means of placing control data on the disc. The main channel was intended entirely for
audio not any other form of data. Since then the main channel has been used for other
types of data and the new DVD specification omits the subcode channels used for
CDs.
|