You are on page 1of 6

Celis, Mark Jesson A.

18October2010

ECE-4 ECE121/

A codec is a device or computer program capable of encoding and/or


decoding a digital data stream or signal. The word codec is a portmanteau of
'compressor-decompressor' or, more commonly, 'coder-decoder'. A codec
(the program) should not be confused with a coding or compression format
or standard – a format is a document (the standard), a way of storing data,
while a codec is a program (an implementation) which can read or write such
files. In practice "codec" is sometimes used loosely to refer to formats,
however.

A codec encodes a data stream or signal for transmission, storage or


encryption, or decodes it for playback or editing. Codecs are used in
videoconferencing, streaming media and video editing applications. A video
camera's analog-to-digital converter (ADC) converts its analog signals into
digital signals, which are then passed through a video compressor for digital
transmission or storage. A receiving device then runs the signal through a
video decompressor, then a digital-to-analog converter (DAC) for analog
display. The term codec is also used as a generic name for a video
conferencing unit.

An endec (encoder/decoder) is a similar yet different concept mainly used for


hardware. In the mid 20th century, a "codec" was hardware that coded
analog signals into Pulse-code modulation (PCM) and decoded them back.
Late in the century the name came to be applied to a class of software for
converting among digital signal formats, and including compander functions.

A modem is a contraction of modulator/demodulator (modem was called


dataset by telcos) and converted digital data from computers to analog for
phone line transmission. On the receiving end the analog was converted
back to digital. Codecs do the opposite (convert audio analog to digital and
then computer digital sound back to audio).

An audio codec converts analog audio signals into digital signals for
transmission or storage. A receiving device then converts the digital signals
back to analog using an audio decompressor, for playback. An example of
this are the codecs used in the sound cards of personal computers.
Lossy codecs: Many of the more popular codecs in the software world are
lossy, meaning that they reduce quality by some amount in order to achieve
compression. Often, this type of compression is virtually indistinguishable
from the original uncompressed sound, depending on the codec and the
settings used.[5] Smaller data sets ease the strain on relatively expensive
storage sub-systems such as non-volatile memory and hard disk, as well as
write-once-read-many formats such as CD-ROM, DVD and Blu-ray Disc. Lower
data rates also reduce cost and improve performance when the data is
transmitted.

Lossless codecs: There are also many lossless codecs which are typically
used for archiving data in a compressed form while retaining all of the
information present in the original stream. If preserving the original quality
of the stream is more important than eliminating the correspondingly larger
data sizes, lossless codecs are preferred. This is especially true if the data is
to undergo further processing (for example editing) in which case the
repeated application of processing (encoding and decoding) on lossy codecs
will degrade the quality of the resulting data such that it is no longer
identifiable (visually, audibly or both). Using more than one codec or
encoding scheme successively can also degrade quality significantly. The
decreasing cost of storage capacity and network bandwidth has a tendency
to reduce the need for lossy codecs for some media.

Codecs are often designed to emphasize certain aspects of the media, or


their use, to be encoded. For example, a digital video (using a DV codec) of a
sports event needs to encode motion well but not necessarily exact colors,
while a video of an art exhibit needs to perform well encoding color and
surface texture.

Audio codecs for cell phones need to have very low latency between source
encoding and playback; while audio codecs for recording or broadcast can
use high-latency audio compression techniques to achieve higher fidelity at a
lower bit-rate.

There are thousands of audio and video codecs ranging in cost from free to
hundreds of dollars or more. This variety of codecs can create compatibility
and obsolescence issues. By contrast, raw uncompressed PCM audio (44.1
kHz, 16 bit stereo, as represented on an audio CD or in a .wav or .aiff file) is
a standard across multiple platforms.

Many multimedia data streams contain both audio and video, and often
some metadata that permit synchronization of audio and video. Each of
these three streams may be handled by different programs, processes, or
hardware; but for the multimedia data streams to be useful in stored or
transmitted form, they must be encapsulated together in a container format.

Lower bit rate codecs allow more users, but they also have more distortion.
Beyond the initial increase in distortion, lower bit rate codecs also achieve
their lower bit rates by using more complex algorithms that make certain
assumptions, such as those about the media and the packet loss rate. Other
codecs may not make those same assumptions. When a user with a low bit-
rate codec talks to a user with another codec, additional distortion is
introduced by each transcoding.

The notion of AVI being a codec is incorrect as AVI is a container format,


which many codecs might use (although not to ISO standard). There are also
other well-known containers such as Ogg, ASF, QuickTime, RealMedia,
Matroska, DivX Media Format and containers defined as ISO standards, such
as MPEG transport stream, MPEG program stream, MP4 and ISO base media
file format.

Encoder

An encoder is a device, circuit, transducer, software program, algorithm or


person that converts information from one format or code to another, for the
purposes of standardization, speed, secrecy, security, or saving space by
shrinking size.

Examples:

Media

Software for encoding audio, video, text into standardized formats:

• A compressor encodes data (e.g., audio/video/images) into a smaller


form (See codec.)

• An audio encoder may be capable of capturing, compressing and


converting audio

• A video encoder may be capable of capturing, compressing and


converting audio/video
• An email encoder secures online email addresses from email
harvesters

• A PHTML encoder preserves script code logic in a secure format that is


transparent to visitors on a web site

• A multiplexer combines multiple inputs into one output.

Job positions

• A Data Entry Encoder may enter data from phone surveys in a coded
format into a database.

• A Data Entry Encoder may enter payment amounts from legal tender
documents from financial institutions into a database.

• A Manual Encoder may manually scan code tags on baggage that were
missed by an automated system.

Security

• A device or person that encodes or encrypts military messages, such


as the ADFGVX Cipher in WWI or the Enigma device in WWII.

• A Microchip hopping encoder integrated circuit for non-fixed-code


secured entry.

• Medical encoding software

• EncoderPro searches ICD-9-CM, CPT and HCPCS Level II medical codes,


to increase accuracy and allow ease of auditing for compliance.

Transducers

• Transducers (such as optical or magnetic encoders) sense position or


orientation for use as a reference or active feedback to control
position:

• A rotary encoder converts rotary position to an analog (e.g., analog


quadrature) or digital (e.g., digital quadrature, 32-bit parallel, or USB)
electronic signal.

• A linear encoder similarly converts linear position to an electronic


signal.
• Such encoders can be either absolute or incremental. The signal from
an absolute encoder gives an unambiguous position within the travel
range without requiring knowledge of any previous position. The signal
from an incremental encoder is cyclical, thus ambiguous, and requires
counting of cycles to maintain absolute position within the travel
range. Both can provide the same accuracy, but the absolute encoder
is more robust to interruptions in transducer signal.

Telecommunications

• A device used to change a signal (such as a bitstream) or data into a


code.

• Encoder circuits

• A simple encoder assigns a binary code to an active input line.

• Priority encoders establish the priority of competing inputs (such as


interrupt requests) by outputting a binary code representing the
highest-priority active input.

Decoder

A decoder is a device which does the reverse of an encoder, undoing the


encoding so that the original information can be retrieved. The same method
used to encode is usually just reversed in order to decode.

In digital electronics, a decoder can take the form of a multiple-input,


multiple-output logic circuit that converts coded inputs into coded outputs,
where the input and output codes are different. e.g. n-to-2n, binary-coded
decimal decoders. Enable inputs must be on for the decoder to function,
otherwise its outputs assume a single "disabled" output code word. Decoding
is necessary in applications such as data multiplexing, 7 segment display
and memory address decoding.

The example decoder circuit would be an AND gate because the output of an
AND gate is "High" (1) only when all its inputs are "High." Such output is
called as "active High output". If instead of AND gate, the NAND gate is
connected the output will be "Low" (0) only when all its inputs are "High".
Such output is called as "active low output".
A slightly more complex decoder would be the n-to-2n type binary decoders.
These type of decoders are combinational circuits that convert binary
information from 'n' coded inputs to a maximum of 2n unique outputs. We
say a maximum of 2n outputs because in case the 'n' bit coded information
has unused bit combinations, the decoder may have less than 2n outputs.
We can have 2-to-4 decoder, 3-to-8 decoder or 4-to-16 decoder. We can form
a 3-to-8 decoder from two 2-to-4 decoders (with enable signals).

Similarly, we can also form a 4-to-16 decoder by combining two 3-to-8


decoders. In this type of circuit design, the enable inputs of both 3-to-8
decoders originate from a 4th input, which acts as a selector between the
two 3-to-8 decoders. This allows the 4th input to enable either the top or
bottom decoder, which produces outputs of D(0) through D(7) for the first
decoder, and D(8) through D(15) for the second decoder.

A decoder that contains enable inputs is also known as a decoder-


demultiplexer. Thus, we have a 4-to-16 decoder produced by adding a 4th
input shared among both decoders, producing 16 outputs.

You might also like