Professional Documents
Culture Documents
For High probability symbol assign less no of bits and for Low
probability symbol assign more no of bits.
Specification
We have to be able to provide the compressor with a new symbol table.
We should be able to flush the symbol buffer to cause the system to
release all pending symbols that have been partially packed
The class has three methods as follows:
Encode - performs the basic encoding function
New-symbol-table - installs a new symbol table into the object
Flush - returns the current state of the buffer, including the number of valid
bits in the buffer
Data-compressor class
Additional class definitions for the data compressor.
Testing
Requirements
Audio players are often called MP3 players after the popular audio data format.
The earliest portable MP3 players were based on compact disc mechanisms.
Modern MP3 players use either flash memory or disk drives to store music.
Theory of operatrion & Requirements
An MP3 player performs three basic functions:
Audio Decompression :
It is a lossy process that relies on perceptual coding .The coder eliminates certain
features of the audio stream so that the result can be encoded in fewer bits.
One tone can be masked by another if the tones are sufficiently close in time after
another feature.
The Term MP3 comes from MPEG-1, Layer 3; (MPEG-Moving Picture Expert
Group)
MP3 spec is part of the MPEG-1 std. That std defined three layers of audio
compression.
User Interface :
The user interface of an MP3 player is usually kept simple to minimize both the
physical size and power consumption of the device.
File System:
The file system of the player generally must be compatible with PCs.
CD/MP3 players used compact disc that had been created on PCs.
Today players can be plugged into USB Ports and treated as disk drivers on the
host processor.
Specification :
The file system can either implement a known standard such as DOS FAT
(Disk Operating System File Allocation Table) or can implement a new file
system.
The audio output system should be tested separately from the compression
system.
The most challenging part of system integration and debugging is ensuring that
audio palys smoothly and without interruption.
The audio o/p can be tested by the sample test signals such as tones.
Design Example: Software Modem
WHAT IS THE PURPOSE OF A MODEM?
Modem stands for MOdulator/DEModulator. A modem converts digital signals
generated by the computer into analog signals which can be transmitted over a
telephone or cable line and transforms incoming analog signals into their digital
equivalents.
Definition:
A software modem is a modem with minimum hardware capability designed to
work using a host computer's resources.
Low-cost modems generally use specialized chips, but some PCs implement the
modem functions in software.
Before jumping into the modem design itself, we discuss principles of how to
transmit digital data over a telephone line
The modem will use frequency-shift keying (FSK), a technique used in 1,200-
baud modems.
Keying alludes to Morse code–style keying.
The FSK scheme transmits sinusoidal tones, with 0 and 1 assigned to different
frequencies
Frequency-shift keying
The scheme used to translate the audio input into a bit stream is illustrated
in Figure below.
The analog input is sampled and the resulting stream is sent to two digital
filters (such as an FIR filter).
The FSK detection scheme.
Name Modem
Purpose A fixed baud rate frequency-shift keyed
modem.
Inputs Analog sound input, reset button.
Outputs Analog sound output, LED bit display.
Functions Transmitter: Sends data stored in
microprocessor memory in 8-bit bytes.
Sends start bit for each byte equal in
length to one bit.
Receiver: Automatically detects bytes
and stores results in main memory.
Displays currently received bit on LED.
The classes include physical classes for line-in and line-out plus
classes for the receiver and transmitter.
SYSTEM ARCHITECTURE
The modem consists of one small subsystem (the interrupt handlers for the
samples) and
The transmitter and receiver can be tested relatively thoroughly on the host
platform because the timing-critical code only delivers data samples.
The transmitter’s output is relatively easy to verify, particularly if the data are
plotted.
A testbench can be constructed to feed the receiver code sinusoidal inputs
and test its bit recognition rate.
The receiver must then be retested when moved to the target system to
ensure that it still functions properly with the library code.
First, a shared variable can be used to directly pass data from the transmitter to
the receiver.
Second, an audio cable can be used to plug the analog output to the analog
input. In this case it is also possible to inject analog noise to test the resiliency
of the detection algorithm.
Design Example: Digital Still Camera
we design a simple digital still camera (DSC). Video cameras share some
similarities with DSCs but are different in several ways, most notably their
emphasis on streaming media.
• Capture image.
Imaging algorithms
It may also evaluate the image’s histogram. The histogram is composed by
sorting the pixels into bins by luminance; 256 bins is a common choice for the
resolution of the histogram.
active rangefinding,
phase detection,
contrast detection.
CMOS.
Most image sensors capture color images using a color filter array—color filters
that cover a single pixel.
The filters usually capture one of the primary colors—red, green, and blue—and
are arranged in a two-dimensional pattern.
The first such color filter array was proposed by Bayer .His pattern is still widely
used and known as the Bayer pattern.
Bayer pattern is a 2 × 2 array with two green, one blue, and one red pixels.
More green pixels are used because the eye is most sensitive to green, which
Bayer viewed as a simple luminance signal.
Because each image sensor pixel captured only one of the primaries, the other two
primaries must be interpolated for each pixel.
Some lossless compression methods are used that do not throw away
information from the image
The JPEG standard was extended as JPEG 2000 but classic JPEG is still
widely used
The typical compression process used for JPEG images has five main
steps:
•Color space conversion.
• Color downsampling.
• Quantization.
• Entropy coding.
Zig-zag pattern for reading coefficients.
SPECIFICATION
A digital still camera must comply with a number of standards.
File formats
DCF specifies three major steps: JPEG compression, EXIF file generation, and DOS
FAT image storage
The multiple buffering points in the picture taking process can help to simplify
testing.
Some tests can be performed by substituting pixel value streams for the
sensor data.
Final tests should make use of a target image so that qualities such as
sharpness and color fidelity can be judged.
Design Example: Telephone Answering Machine
The system will store messages in digital form rather than on an analog tape.
we use a simple algorithm to compress the voice data so that we can make
more efficient use of the limited amount of available memory.
The compression scheme we will use is known as adaptive differential pulse code
modulation (ADPCM).
An ADPCM compression system
The answering machine will ultimately be connected to a telephone subscriber
line.
Off-hook: The telephone industry term for answering a call is going off-hook;
Functions Default mode: When machine receives ring indicator, it signals off-hook, plays the OGM,
(Out Going Msg) and then records the incoming message. Maximum recording length for
incoming message is 30 seconds, at which time the machine hangs up. If the machine runs
out of memory, the OGM is played and the machine then hangs up without recording.
Playback mode: When the play button is depressed, the machine plays all messages. If the
play button is depressed again within five seconds, the messages are played again.
Messages are erased after playback.
OGM editing mode: When the user hits the record OGM button, the machine records an
outgoing message of up to 10 seconds. When the user holds down the record OGM button
and hits the play button, the OGM is played back.
Performance Should be able to record about 30 minutes of total voice, including incoming and outgoing
messages. Voice data are sampled at the standard telephone rate of 8 kHz.
The machine consists of two major subsystems from the user’s point of view:
• The telephone line module handles off-hook detection and on-hook commands.
• The telephone input and output modules handle receiving samples from and
sending samples to the telephone line.
Final testing with real voice data must wait until the application is moved to the
target platform
Testing your system by connecting it directly to the phone line is not a very
good idea.
we design a simple engine control unit (ECU). This unit controls the operation of
a fuel-injected engine based on several measurements taken from the running
engine.
We will design a basic engine controller for a simple fuel injected engine .The
throttle is the command input. The engine measures throttle, RPM, intake air
volume, and other variables
Periods for data in the engine controller.
SPECIFICATION
• As the intake air temperature (THA) increases during engine warm-up, the
controller reduces the injection duration.
• The controller adjusts duration up or down based upon readings from the
exhaust oxygen sensor (OX).
Engines generate huge amounts of electrical noise that can cripple digital
electronics
They also operate over very wide temperature ranges:
VIDEO COMPRESSION
Before examining the video accelerator itself, let’s look at video
compression algorithms in order to understand the role played by a motion
estimation engine.
Block diagram of MPEG-2 compression algorithm
JPEG-style compression alone does not reduce video bandwidth enough for
many applications
MPEG uses motion to encode one frame in terms of another. Rather than
send each frame separately, as in motion JPEG, some frames are sent as
modified forms of other frames using a technique known as block motion
estimation.
For every macroblock in the frame, we want to find the region in the previous
frame that most closely matches the macroblock.
We measure similarity using the following sum-of-differences measure:
The computations for each correlation are distributed among the processing
elements;
The comparator is responsible for collecting the results, finding the best
match value, and remembering the corresponding motion vector.
Object diagram for the video accelerator
COMPONENT DESIGN
If we are designing our own accelerator board, we have to design both the
video accelerator design proper and the interface to the PCI bus.
SYSTEM TESTING
Testing video algorithms requires a large amount of data.
we are designing only a motion estimation accelerator and not a complete video
compressor, it is probably easiest to use images, not video, for test data.
We can use standard video tools to extract a few frames from a digitized
video and store them in JPEG format.
These programs can be modified to read JPEG images and put out pixels
in the format required by the accelerator.