Docsity

cmpt 165 lecture one, Exercises of Computer Science

Partial preview of the text

Download cmpt 165 lecture one and more Exercises Computer Science in PDF only on Docsity!

Lecture 1

Digital Media

Prof. Shervin Shirmohammadi

The Internet

Application Type

Text

  • Traditionally presented in ASCII (American Standard Code for Information Interchange) - 7 bits per character
  • What about non-English characters?

Extended ASCII

  • 8 - bit or larger characters

Audio

  • Sound representation. Physically speaking, audio

is a waveform.

  • Digital audio:
    • Logical representation (Midi, MOD)
    • Sampled (PCM)
  • Compressed audio
    • Most common type for music : MPEG-1 Layer 3 (mp3) - At 128 kbps it is around 1 MB per minute
    • Windows Media Audio (wma)
    • Real Audio
    • etc. Prof. Shervin Shirmohammadi CMPT 165 1 - 7

Digitizing Audio

  • Psycho-acoustic analysis: human ear picks up

signals from 20 Hz to 20Khz.

  • Nyquist’s theorem states we need to sample

twice the highest frequency.

  • Sample rate of 40Khz should be enough (44.

Khz in practice).

  • 16 bits per sample is usually adequate
  • Leads to 1.4 Mbps for standard audio CD

(stereo, PCM).

LPCM

  • Linear Pulse Code Modulation ( LPCM ), most-widely used digital uncompressed audio format.
  • Encodes one channel, at 8, 16, 20 or 24 bits per sample.
  • Can support 1 to 8 channels (7.1 surround)
    • For 7.1 audio: 8 channels × 48 kHz × 16 - bit per sample = 6.144 Mbit/s (supported in video DVDs).
    • Multi-channel requires synchronization of multiple LPCM streams.
  • Sampling frequencies typically 44.1 kHz (CDs), and 48 kHz (video DVDs).
  • Also supports 96 kHz and 192 kHz for digital archival material. (^) How to compress audio?

Frequency Compression

  • Two ways in the frequency domain: (a) The threshold of audibility for a human as a function of frequency. (b) The frequency masking effect.

MPEG-1 Audio

  • Specified in MPEG-1 Part 3, supports:
    • Mono
    • Joint Stereo
    • Dual (two mono channels)
  • Sampling rates: 32000, 44100, and 48000 Hz
  • Bitrates:
    • Layer I: 32, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416 and 448 kbit/s
    • Layer II: 32, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320 and 384 kbit/s
    • Layer III: 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256 and 320 kbit/s

MPEG-1 Audio Layers

  • Layer I (practically obsolete):
    • Same as Layer II, except it uses a smaller frame size and finer resolution for low-delay apps like teleconferencing.
    • It also has lower complexity suitable for early 1990s software/hardware.
  • Layer II :
    • Uses Fast Fourier Transform (FFT) to generate 32 sub-bands.
    • Uses audibility threshold, frequency, and temporal compression.
    • Reduces quantization accuracy for less important sub-bands.
    • Best used for orchestras, human voices, audience applause, and percussive sounds such as triangle and glockenspiel.
  • Layer III :
    • known as mp3 ; popular at 128-192 kbps for near CD-quality audio

Image

  • Each natural image can be thought of as a set of pixels, each pixel with a different colour.
  • The dimensions of this pixel (and its quantized value) will determine the quality of the digital picture compared to its natural version.

Pixel Colour

  • Each pixel is represented by three values: Red, Green, and Blue, together known as the RGB value.
  • The reason is that:
    • Any colour can be constructed based on various values for R, G, and B.
    • Traditional colour TVs actually use 3 dots or strips (phosphors) on their screen. If you look closely at a traditional color TV’s screen while it’s on you will be able to see the three R, G, and B dots close to each other.

YUV

  • YUV and its digital successor YC b C r have also been proposed as image representation formats.
  • YC b C r breaks the picture itself into three components:
  • Y: Luminance , is an indication of the brightness of each pixel. This essentially leads to the greyscale version of the picture.
  • Cb and Cr: The Chrominance components corresponding to blue-difference and red-difference chroma components. CC^ Yb r

Bitmap Image

  • Essentially Bitmap image is the uncompressed digital image in RGB format.
  • Using the Bitmap file format, one can store and transmit an image.