Everything you ever wanted to know about a Codec - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Everything you ever wanted to know about a Codec

Description:

Stands for coder-decoder or compressor-de-compressor ... for full screen NTSC (National Television Standards Committee decided on 30 ... – PowerPoint PPT presentation

Number of Views:17
Avg rating:3.0/5.0
Slides: 27
Provided by: jb50
Category:

less

Transcript and Presenter's Notes

Title: Everything you ever wanted to know about a Codec


1
Everything you ever wanted to know about a Codec
  • But were afraid to ask????

2
Its software
  • In simplest form, a codec is a software algorithm
    that transforms data from one format to another
  • Stands for coder-decoder or compressor-de-compress
    or
  • Codec used to compress file must be the same used
    to decompress file

3
Two main types
  • Lossless codecs the original can be recreated
    exactly for the compressed file
  • Lossy codecs decompressed file is an
    approximation of the original file. How
    approximate depends on amount of compression used

4
Many file formats use codecs
  • JPEG images - lossy
  • GIF images - lossy
  • ZIP files - lossless
  • StuffIt archives - lossless

5
How lossless codecs work
  • Original files can be recreated exactly
  • Takes advantage of redundant information
    reprenting more efficiently
  • AAAAAAAA becomes 8A reducing storage by 75
  • Huffman coding replaces frequently occurring
    sequences with shorter code
  • Hyper Text Markup Language becomes HTML.

6
  • When de-compressed HTML becomes Hyper Text Markup
    Language
  • Great for quality concerns but minimal
    compression ratios.
  • Would not work well for Streaming Media, for
    example.

7
Lossy codecs
  • GIF
  • JPEG
  • They are only approximations of the original image

8
  • Achieve much higher rates of file size reduction
    by discarding data that is deemed unnecessary or
    redundant.
  • Since information is discarded, recreating the
    original file exactly is not possible when file
    is de-compressed.
  • Ideally, some data can be discarded and not
    missed.

9
Poor, poor Codecs
  • The codecs job is difficult and underappreciated
    they must try to keep the most important
    information in the file and discard the rest.
  • In cases of extreme compression, codecs MUST be
    ruthless in discarding data
  • They try to retain original quality or to
    retain at least enough information to keep you
    interested.

10
  • Try to take some time to tell codecs you love and
    appreciate them.
  • Theirs is a tough and thankless job.

11
Streaming Media Codecs
  • Its a tough job but somebodys gotta do it.
  • Uncompressed audio 1.4Mbits per second
  • Raw video gt25Mbytes per second for full screen
    NTSC (National Television Standards Committee
    decided on 30 frames per second as the standard)
  • 56K modem downloading at the speed of wait

12
Extreme Compression
  • Staggering divide between raw bit rates of audio
    and video and bit rates available to Internet
    users bridged by codecs
  • If sustained 34K data rate (of 56K modem)
    CD-quality audio must be compressed approximately
    401.
  • With video, compression numbers are ludicrous

13
Perceptual Coding
  • What is a conscientious codec to do?
  • Use models about how humans perceive audio and
    video
  • Allow for reasonably intelligent decisions about
    what to keep and what to throw out

14
  • When digitizing audio and video, goal is to
    accurately represent input signal
  • Audio sample input 44,100 times per second,
    using 16-bit words to represent each sample.
    Assumes our ears give equal attention to each and
    frequency
  • Video assumes that 24 bits of information needed
    for every pixel on the screen, all 640 X 480 of
    them, 30 times a second - NOT

15
  • Human eyes and ears register extremely wide range
    of audio and video inputs, though both are more
    sensitive to particular ranges of audio and video
    spectrum.
  • And, what is perceived is determined by the
    brain, which filters raw information.
  • Perceptual coding makes decisions about
    compressing audio and video based on how humans
    perceive sight and sound.

16
  • For example loud sounds take precedence over
    quieter sounds in the brain bright objects and
    movement take visual precedence
  • Evolved from primitive survival characteristics
    it was more important to hear the saber tooth
    tiger roaring at you than your wife telling you
    to take out the trash and, you want to be able
    to see that bright tiger running through the
    grass toward you.

17
  • Humans retain these perceptual characteristics
  • perceptual coding is effective in keeping what is
    important and discarding what is not
    important.

18
Audio Codecs
  • Balance between fidelity, frequency response,
    dynamics number of channels.
  • Collapsing from stereo to mono cuts amount of
    data in half
  • Sampling rate further reduces data to be
    processed
  • frequency response and
  • sample bit depth

19
  • FM radio frequency - 12KhZ drop frequency
    response and maintain quality
  • For voice 8kHz or even 5kHz
  • Thus dont have to use full 16 bits to represent
    dynamic range
  • Technology making it even better need less to
    sound good

20
What about music?
  • Must be prepared for wide range of sounds from
    screaming bass guitar to cymbals to soft flute in
    the background.
  • Thus, special AND different codecs for audio,
    speech and video

21
  • Voice codecs and music codecs are completely
    different
  • Not interchangeable voice codecs make music
    sound awful
  • and mostly visa versa.

22
Video Coding
  • Video content with motion smooth at about 20
    fps
  • Little motion can go below that
  • But that is still not enough
  • Economize by using inter-frame compression

23
  • Theoretically, much of frame will remain
    unchanged between frames
  • Digitize or encode only the section of the frame
    that changes

24
  • Video codec digitizes one complete frame to
    establish all elements in the frame
  • After background established subsequent frames
    digitize only changing elements or differences
  • Establishing frames are keyframes
  • Rest are called difference frames

25
  • Video keyframes allow you to change an effect
    over time, or move the position and size of the
    frame over time.
  • Video keyframes are used during custom special
    effects, but are not needed for most common
    operations.

26
  • Thats all I want to confuse you with
  • Just remember the jist
Write a Comment
User Comments (0)
About PowerShow.com