Back Next
Information is stored in frames/sectors

  Each 8 bits of sampled music encoded onto a 14 bit byte.

  3-bit (all ones) separator between each byte.
    Now up to 17-bits for each byte of 'data'.

    * EFMPlus on DVDs uses an 8 on 16 bit mapping but does away with the
      separator.

  ***************

  Bytes arranged in a frame  (channel-frame)

    8 CIRC error-correction bytes. 4 bytes P parity, 4 bytes Q Parity.

    1 sub-code byte (contains digital info about music). 
      Treated as 8 separate channels (each bit a different channel).
      Sub-code byte from all 98 frames that make up a sector must be 
        concatenated to get data.
      - can store info such as album name.

      en.wikipedia.org/wiki/Compact_Disc_subcode

    24 bytes audio
      - 6 samples * 2 channel stereo * 16 bits (2 bytes) per sample.
               6 * 2 * 2 = 24 bytes.
    
    ******

    33 bytes in a frame.  8 + 1 + 24  

    Each frame is separated by a 27 bit sync word.
      - 24 bit sync and 3 bit merge bits between frames.
 
    (14 bits/byte + 3 bits/separator) * 33 bytes/frame + 27 bit sync word 
      = 588 bits (192 bits actual music sample).

  ***************

  Played at 75 timecode-frames/second. (Sector = timecode-frame)
    
    Timecode-frame consists of 98 channel-frames (2352 byte) 
    * Various documentation may refer to a frame as a sector.

    75 sectors/sec 
  * 98 channel-frames/sector 
  * 6 samples(each stereo channel)/channel-frame.
  =  44100 samples/sec or 44100 Hz.
   
    The 24 byte data is scrambled so that a scratch won't destroy a sequential
      series of data bits. So, if a scratch took out the 1st 3 bytes of a frame,
      they might actually be bytes 1, 7, 18.

  Audio CDs use interpolation for error correction - attempts to substitute 
    missing byte by duplicating previous byte or averaging previous and next 
    good byte.

  Additional error check 
    No additional ECC - all 2352 bytes data.  Missing bytes are guessed.
 
  Audio is structured as lead-in, program-area (music), lead-out.

  Lead-in area contains 'silent' audio but the sub-code in each frames 
    holds a Table of content (TOC) which lists the distance from start of 
    each song (track) in minutes, seconds, and fractions where 1 fraction
    is one frame of 1/75 of a second. 

    Reader approximates location on disc and then read sub-code blocks to
    id start of "track".

  Data Mode 1 or Mode 2 
    Uses same 98 frame 2352 byte sectors 

    Mode 1 - used for digital data, 
      Contains addressing and error correcting code - 2048/2352 data.
      12 byte sync block, 4 byte header, 2048 bytes data, 288 ECC.
        23% of sector is overhead. 

    Mode 2 - video/audio.
      2336/2352 data.
      12 byte sync block, 4 byte header, 2336 bytes data.
        ECC discarded for more data storage.
      Data in frame may be either sampled audio/video or data.

 **************
   If you add up all the bits used for timing, sync, error correcting, etc.
     Only about 28-30% of the information on a CD is the actual data being
     stored.