------------------------------------------------------------------------------
MC logo
Ch. 11: Multimedia Encoding
[^] Chapter Outlines
------------------------------------------------------------------------------
<<Ch. 8: Bits and Bytes Ch. 7: Debugging>>
  1. Binary system.
    1. Humans use decimal numbers: base 10.
    2. Computers like binary numbers: base 2.
    3. Place value.
      1. Rightmost place value is one.
      2. Multiply by the base each time.
      3. Decimal: 105 = 100000, 104 = 10000, 103 = 1000, 102 = 100, 101 = 10, 100 = 1
      4. Binary: 27 = 128, 26 = 64, 25 = 32, 24 = 16, 23 = 8, 22 = 4, 21 = 2, 20 = 1
    4. Conversion from.
      1. Decimal (42581):
        Powers104103102101100
        Digits 42581
        Product 400002000 500 80 1 Sum: 42581
      2. Binary (101011011):
        Powers282726252423222120
        Digits 101011011
        Product 2560 64 0 16 8 0 2 1 Sum: 347
      3. More
    5. Conversion to binary.
      1. 211:
        Number211 211 83 19 19 3 3 3 1
        Place2561286432168421
        Subtract8319310
        Bits011010011
      2. 78:
        Number78 14 14 14 6 2 0
        Place6432168421
        Subtract14620
        Bits1001110
      3. More
    6. Binary addition.
      110010
      +1001
      111011
      1111
      1011
      +11011
      100110
      11
      1110
      +101
      10011
      1111
      110101
      +10010101
      11001010

      Carry-out when the sum is ≥ the base.
      More
  2. Images.





    1. Colors.
      1. A color is represented by three component levels: Red, Green and Blue.
      2. Typical size is 24 bits, eight for each component, as HTML.
        1. Each component is 0-255.
          255 = 27 + 26 + 25 + 24 + 23 + 22 + 21 + 20
        2. 255 is full on, 0 is off.
        3. Equal components are white, black, or grays
    2. Images are arrays of pixels.
      1. Image is a 2-dimensional array of pixels.
      2. Each pixel has a color.
    3. Modify images using tests and arithmetic.
      1. Add to each pixel to brighten.
      2. Re-color selectively.
      3. Moon picture (book example).
        1. All pixels are initially grey; each component equal.
        2. Turn any less than 64 to zero.
        3. Red: Leave
        4. Green: reduce by 42.
        5. Blue: reduce by 123.
        6. Makes b&w image orange (b).
        7. Increase red half way to max (c).
      4. Reduced green.
  3. Video: Sequence of images. frames.
  4. Sound.
    1. Sampling.
      1. A to D, D to A.
      2. Sampling rate.
      3. Sample precision.
    2. Examples
      1. Music CDs are recorded at 44.1 kHz, using 16 bits per channel.
      2. Telephone calls are sampled at 8 kHz, using 8-bit samples.
    3. Nyquist Rule: Sampling must be twice the largest frequency.
  5. Compression.
    1. Multimedia files are large: Need to make 'em smaller.
    2. Lossless (classical) compression.
      1. Run-length encoding.
      2. Decompressed data is identical to the original.
    3. Color tables.
    4. Lossy compression.
      1. Data may differ from the original.
      2. Designed to “look” or “sound” the same.
      3. Sacrifices imperceptible detail for better compression. Examples
    5. Video: Record difference.
  6. Optical Character Recognition (OCR).
  7. Virtual Reality
    1. Our actions reflected in what the computer shows us.
    2. Haptic devices: Touch and feel.
    3. Latency and bandwidth.
  8. Meaning is imposed
    0000 0000 1111 0001 0000 1000 0010 0000
    1. Binary 15,796,256
    2. A reddish color
    3. ADD 1, 7, 17 MIPS assembler.
    4. Left 241, right 281 sound sample.
    5. IP address 0.241.8.32.
<<Ch. 8: Bits and Bytes Ch. 7: Debugging>>