Hey Welcome to BTER Rajasthan Polytechnic.
1. Join Groups for PDF's & Regular Updates
Join the community of Civil Engineering students at BTER Polytechnic and stay updated:
- Telegram Channel: Join Telegram Channel 📱
- WhatsApp Group: Join WhatsApp Group 💬
- YouTube Channel: Visit YouTube Channel 🎥
2. Help & Donations 💖
If you find our resources helpful and wish to support our initiative, your donation will help us continue improving and providing valuable study material.
- UPI ID: garimakanwarchauhan@oksbi
- QR Code:
💰 Your support matters! Every contribution helps us reach more students and provide better resources! 🙏
3. Notes Website
- Official Notes Website: Visit Notes Website 📝
This website provides all study materials, notes, and important updates for Civil Engineering students.
4. Important Links
Explore the following links for additional resources and exam preparation:
- Syllabus: Download Syllabus 📚
- Previous Year Papers: View Previous Year Papers 🗂️
- Study Materials: Download Study Materials 📑
UNIT 2: Basic Compression Techniques
Compression is an essential concept in multimedia technologies. It is the process of reducing the size of data (such as video, audio, images) to save storage space or to transmit it more efficiently over networks. Compression can be done using two basic methods: Lossy Compression and Lossless Compression.
This unit will cover these two types of compression and introduce you to several key algorithms and standards used in both video and audio data compression.
2.1 Video and Audio Data Compression Techniques – Lossy and Lossless
Lossy Compression:
In lossy compression, some of the data from the original file is lost during the compression process. This type of compression achieves a higher level of reduction in file size by eliminating data that is less important or harder to detect by human senses. The loss of data is usually perceptible only under certain conditions, and the decompressed file is generally smaller in size than the original.
Key Characteristics:
- File size reduction: Significant reduction in size (up to 90% or more).
- Loss of quality: Some of the original data is discarded, which results in a loss of quality, but the loss is usually not noticeable to the user, depending on the compression ratio and the type of media.
- Used in multimedia: Commonly used for compressing video, audio, and images.
Examples of Lossy Compression Formats:
- JPEG (for images)
- MP3 (for audio)
- MPEG (for video)
- H.264 / H.265 (for video)
Advantages:
- High compression ratio.
- Useful for streaming over the internet or saving storage space.
Disadvantages:
- Quality degradation, especially at high compression ratios.
- Cannot recover the original file perfectly.
Lossless Compression:
Lossless compression reduces file size without losing any of the original data. The decompressed file is identical to the original. This technique is used where data integrity is crucial, such as in medical imaging, archival storage, or professional audio recordings.
Key Characteristics:
- No data loss: The decompressed file is identical to the original.
- Lower compression ratio: Typically, the file size reduction is not as significant as with lossy compression.
- Preserves quality: No perceptible quality loss.
Examples of Lossless Compression Formats:
- FLAC (Free Lossless Audio Codec for audio)
- ALAC (Apple Lossless Audio Codec for audio)
- PNG (for images)
- ZIP and GZIP (for general data compression)
Advantages:
- No loss of quality.
- Useful for preserving important data.
Disadvantages:
- Lower compression ratios than lossy compression.
- Requires more storage space compared to lossy formats.
2.2 Example Algorithms and Standards
Huffman Coding:
Huffman coding is a lossless compression algorithm widely used for data compression. It is a variable-length prefix coding algorithm that assigns shorter codes to more frequent symbols and longer codes to less frequent ones.
How It Works:
- It builds a Huffman tree, where frequently occurring data symbols have shorter binary codes, and less frequent symbols have longer binary codes.
- This method is used in many file formats, such as ZIP and JPEG.
Example:
- In a text file, if the letter "E" appears very frequently, Huffman coding will assign it a short binary code, like
01
, while a less frequent letter like "Z" might get a longer code like11101
.
Run-Length Encoding (RLE):
RLE is one of the simplest compression algorithms. It works by reducing sequences of repeated data (runs) into a single value and a count. It is effective for compressing simple data like monochrome images or certain types of video and audio files.
How It Works:
- If a sequence of the same data (like
AAAABBBCCDA
) is encountered, it is compressed as(4A)(3B)(2C)(1D)(1A)
.
Use Cases:
- Often used in TIFF images and bitmap graphics.
- Suitable for data with long sequences of identical symbols.
JPEG (Joint Photographic Experts Group):
JPEG is one of the most popular lossy image compression algorithms. It is specifically designed for compressing photographic images, where slight loss of quality is generally imperceptible to the human eye.
How It Works:
- DCT (Discrete Cosine Transform): JPEG divides an image into small blocks (usually 8x8 pixels) and applies the DCT to transform these blocks into a frequency domain.
- Quantization: The coefficients are quantized, removing less visually important information, resulting in compression.
- Entropy Coding: Huffman coding or other methods are applied to further compress the image.
Use Cases:
- Web images, digital photographs, and online media.
MPEG (Moving Picture Experts Group):
MPEG is a group of video and audio compression standards used for digital video and audio. The most common MPEG standards include MPEG-1, MPEG-2, and MPEG-4.
How It Works:
- MPEG-1: Used for video CDs and some streaming video applications.
- MPEG-2: Used in DVDs, digital television broadcasts, and some streaming applications.
- MPEG-4: Used for compressing video files, enabling high-quality video streams in lower bandwidth environments (used in YouTube, MP4 videos, and streaming platforms).
Use Cases:
- Streaming video, DVDs, television broadcasts.
MP3 (MPEG-1 Audio Layer 3):
MP3 is a lossy audio compression format that reduces the file size of audio by eliminating audio information that is less perceptible to human hearing.
How It Works:
- Psychoacoustic Modeling: MP3 compression analyzes the audio and removes parts of the sound that are less important or inaudible to humans (like very high or low frequencies).
- Bitrate: The user can select different bitrates, affecting the level of compression and quality.
Use Cases:
- Music files, podcasts, audio streaming.
MP4 (MPEG-4 Part 14):
MP4 is a digital multimedia format used for storing video, audio, images, and subtitles. It is a container format that allows multiple types of data to be stored in a single file.
How It Works:
- MP4 files often use H.264 for video compression and AAC (Advanced Audio Coding) for audio compression.
- MP4 supports high-quality video with relatively small file sizes, making it ideal for streaming.
Use Cases:
- Video streaming (YouTube, Vimeo), online media, mobile videos.
LZMA (Lempel-Ziv-Markov chain algorithm):
LZMA is a lossless data compression algorithm that is known for its high compression ratio. It is used in 7z format (7-Zip) and is also a part of many general-purpose compression utilities.
How It Works:
- LZMA uses a dictionary compression technique, where repeated strings are replaced with shorter references.
- It has a high compression ratio but requires more time for compression and decompression.
Use Cases:
- General-purpose file compression, software distribution.
FLAC (Free Lossless Audio Codec):
FLAC is a lossless audio compression format that reduces the size of audio files without losing any data. It is ideal for audiophiles and professionals who need high-quality sound.
How It Works:
- FLAC uses predictive coding to identify redundant parts in the audio and compress them without loss.
Use Cases:
- Audio archiving, professional music storage, audiophile collections.
ALAC (Apple Lossless Audio Codec):
ALAC is Apple's proprietary lossless audio codec, similar to FLAC. It compresses audio files without losing any quality.
How It Works:
- ALAC applies similar compression techniques to FLAC, reducing file size while retaining the full fidelity of the original audio.
Use Cases:
- iTunes, Apple Music, and other Apple devices.
ITU G.722:
ITU G.722 is a speech codec used for audio compression in telecommunication systems, offering wideband speech (better quality than narrowband).
How It Works:
- It compresses speech signals to around 64 kbps, providing better audio quality for voice calls.
Use Cases:
- VoIP (Voice over Internet Protocol), video conferencing, and telecommunication.
H.261:
H.261 is a video compression standard used for video conferencing and video communication over ISDN networks.
How It Works:
- It uses block-based DCT and motion compensation to compress video.
Use Cases:
- Video conferencing, telemedicine.
H.265 (HEVC - High-Efficiency Video Coding):
H.265 is the successor to H.264 and offers higher compression efficiency, making it ideal for 4K and high-definition video.
How It Works:
- H.265 uses advanced compression techniques, such as larger prediction blocks and improved motion compensation.
Use Cases:
- Streaming 4K video, Blu-ray Discs, online video platforms.
Summary:
This unit introduced different compression techniques and standards used in video and audio compression. The two primary types of compression—lossy and lossless—are essential in multimedia technologies, each suited for specific use cases. Standards like JPEG, MPEG, MP3, FLAC, and H.265 are widely adopted for multimedia compression, offering varied trade-offs between quality and file size.
📢 🔔 Download PDF & Join Study Groups:
📥 WhatsApp Group: Join Now
📥 Telegram Channel: Join Now
📺 Watch Lecture on YouTube: BTER Polytechnic Classes
📍 Stay connected for more study materials! 🚀
Thank You for Visiting!
We wish you all the best for your studies. Keep learning, and don't hesitate to reach out for help! 📚✨
0 Comments