Lossy and Lossless Compression Techniques
Lossy and Lossless Compression Techniques
Lossy and Lossless Compression Techniques
Lossless Compression
Lossless compression compresses the data in such a way that when data is
decompressed it is exactly the same as it was before compression i.e. there is no loss of data.
A lossless compression is used to compress file data such as executable code, text
files, and numeric data, because programs that process such file data cannot tolerate mistakes
in the data.
Lossless compression will typically not compress file as much as lossy compression
techniques and may take more processing power to accomplish the compression.
Lossy Compression
Lossy compression is the one that does not promise that the data received is exactly
the same as data send i.e. the data may be lost.
This is because a lossy algorithm removes information that it cannot later restore.
Lossy algorithms are used to compress still images, video and audio.
Lossy algorithms typically achieve much better compression ratios than the lossless
algorithms.
Audio Compression
• Audio compression is used for speech or music.
• For speech, we need to compress a 64-KHz digitized signal; For music, we need to
compress a 1.411.MHz signal
• Two types of techniques are used for audio compression:
1. Predictive encoding
2. Perceptual encoding
Predictive encoding
• In predictive encoding, the differences between the samples are encoded instead of
encoding all the sampled values.
• This type of compression is normally used for speech.
• Several standards have been defined such as GSM (13 kbps), G. 729 (8 kbps), and G.723.3
(6.4 or 5.3 kbps).
Perceptual encoding
• Perceptual encoding scheme is used to create a CD-quality audio that requires a
transmission bandwidth of 1.411 Mbps.
• MP3 (MPEG audio layer 3), a part of MPEG standard uses this perceptual encoding.
• Perceptual encoding is based on the science of psychoacoustics, a study of how people
perceive sound.
• The perceptual encoding exploits certain flaws in the human auditory system to encode a
signal in such a way that it sounds the same to a human listener, even if it looks quite
different on an oscilloscope.
• The key property of perceptual coding is that some sounds can mask other sound. For
example, imagine that you are broadcasting a live flute concert and all of a sudden someone
starts striking a hammer on a metal sheet. You will not be able to hear the flute any more. Its
sound has been masked by the hammer.
• Such a technique explained above is called frequency masking-the ability of a loud sound in
one frequency band to hide a softer sound in another frequency band that would have been
audible in the absence of the loud sound.
• Masking can also be done on the basis of time. For example: Even if the hammer is not
striking on a metal sheet, the flute will be inaudible for a short period of time because the ears
turn down its gain when they start and take a finite time to turn up again.
• Thus, a loud sound can numb our ears for a short time even after the sound has stopped.
This effect is called temporal masking.
MP3
• MP3 uses these two phenomena, i.e. frequency masking and temporal masking to compress
audio signals.
• In such a system, the technique analyzes and divides the spectrum into several groups. Zero
bits are allocated to the frequency ranges that are totally masked.
• A small number of bits are allocated to the frequency ranges that are partially masked.
• A larger number. of bits are allocated to the frequency ranges that are not masked.
• Based on the range of frequencies in the original analog audio, MP3 produces three data
rates: 96kbps, 128 kbps and 160 kbps.
MultiMedia Systems/Multimedia Input & Output
Technologies/MultiMedia Systems
Hardware for Multimedia
Monitors
Graphics display board
Used in addition to monitor to speed up graphics
Special hardware circuits for 2D and 3D graphics
Simple graphics boards just translate image data from ram into one
usable by monitor
Complex boards can even speed up the refresh rate of screen
Qualities of a good multimedia monitor
Size, refresh rate, dot pitch
Other concerns about monitor include weight and ambient light
Liquid crystal display monitors
Flat screen displays
Crystals allow more or less light to pass through them, depending upon
the strength of an electric field
Not appropriate for multimedia presentation as the view angle is
extremely important
3D monitors in the future
Human factor concerns
Production of sound
1. Digitized representation of frequency and sound transmitted at appropriate time to the
loudspeaker (.WAV �les) ** common method 2. Commands for sound synthesis can be
transmitted to a synthesizer at appropriate time (midi �les) ** used for the generation of
music
Musical Instruments Digital Interface (midi)
Standard to permit interface for both hardware and control logic
between computers and music
synthesizers
Adopted in 1982
Hardware for Multimedia 21
Consists of two parts
1. Hardware standard � Speci�es cables, circuits, connectors, and electrical signals to be
used 2. Message standard � Types and formats of messages to be transmitted to/from
synthesizers, control units (keyboards), and computers � Messages consist of a device
number, a control segment to tell the device the function to be performed (turn on/o� a
speci�ed circuit), and a data segment to provide the information necessary for the action
(volume of sound, or frequency of basic sound
Still image
Snapshot of an instance
Motion image
Sequence of images giving the impression of continuous motion
Graininess in real images (Individual dots observed when a photograph taken by
conventional camera and enlarged)
Digital image capture
Scanning mechanism shines bright light on the image and codes and records the
reflected light for each point
Scanner does not store data but sends it to the computer, possibly after compression of
the same
Quality of images
Preferable to scan at the highest possible resolution under given hardware and storage
space constraints to get the most detail in the original image
Like MP3s, Advanced Audio Coding (AAC) files are also lossy audio files. However, AAC
files, in their original state, are much higher in quality than any of the other audio file formats
on the list. AAC files are generally similar in size to MP3s, despite being a tad higher in
quality.
They can also be created with a variable bit rate or constant bit rate. AAC files are also open-
source, which means you don’t need to pay royalties to create and distribute them (unlike
MP3 files).
.AAC files are most commonly associated with iTunes, though they can be used on other
player devices and gaming consoles.
AVI
Audio Video Interleaved is a Windows movie file with high video quality, but a large file
size. Approximately 25 GB is required for 60 minutes of video.
MP3
MPEG 1 Audio Layer 3 is a digital audio format that is designed for high compression of
audio files while maintaining high audio quality.
.MP3 files are the most common audio file around. MP3s feature lossy compression, which
means their quality will degrade over subsequent edits. MP3s are still relatively large in size
when compared to other audio file formats on this list.
MP3 files can be encoded at a constant bit rate or variable bit rate. A constant bit rate ensures
the same quality throughout the audio file, but results in a higher file size. Variable bit rate
detracts from quality during silent or near-silent moments of a file, resulting in a smaller
overall file size. Most smart phones and music players use the MP3 format.
MP3 VBR
MP3 using Variable Bit Rates that provides better quality and smaller files.
Audible 2, 3 and 4
Audio file format (.aa file extension) used for audio books or other voice recordings. Entire
books can be stored in a single file.
Apple Lossless
Uses the .m4a file extension, the same as AAC. Creates a larger file than AAC, but retains
more information and quality.
AIFF
Audio Interchange File Format similar to WAV. AIFF provides original sound quality and
large file size.
WAV
Wave provides the same file sound quality and large file size as the original CD.
Video
H.264
This is a digital video codec noted for high data compression while maintaining high quality.
MPEG-2
A combination of audio and video compression for storage of movies.
Mov
QuickTime Movie Format
m4v
A MPEG-4 Video file.
MP4
MPEG-4 is a versatile file format that can include audio, video, images and animations.
DAT
Digital Data Storage. Data file format that can be used for text, graphics or binary data.
VOB
Video Object is a MPEG-2 DVD video movie file.
Distributed DBMS Architectures
DDBMS architectures are generally developed depending on three
parameters −
Architectural Models
Some of the common architectural models are −