SlideShare une entreprise Scribd logo
1  sur  16
MPEG COMPRESSION
Group 821
CONTENTS
•

MPEG compression

•

Standards

•

MPEG-1 Part 2

•

Implementation
What is MPEG?
•
•
•

Moving Picture Experts Group
standards for audio video compression and transmission
asymmetric: encoder more complex than decoder
MPEG standards
•

MPEG-1
• first standard for audio and video (lossy compression)
• composed of 5 parts: Systems, Video, Audio,
Compliance testing, Software simulation
• up to 1.5 Mbit/s
• moderate quality
• MP3 audio format
MPEG-1 Part 2
Frames
Types of pictures:
I (intra) frame
compressed using only intra-frame coding
Moderate compression but faster random access

P (predicted) frame
Coded with motion compression using past I frames or P frames
Can be used as reference pictures for additional motion compensation

B (bidirectional) frame
Coded by motion compensation by either past or future I or P frames

D (DC) frame
Limited use: encodes only DC components of intra-frame coding
Only found in MPEG-1
Macroblocks
Macroblocks
-blocks of 16 x 16 pixels
-the smallest unit of data that can select a method of
compression, therefore they can be considered as the
minimum coded units in a picture.
Blocks
-are 8 x 8 blocks of pixels. There are six of these blocks
in each macroblock
Color Space
•

conversion to YcbCr (luma, chroma blue, chroma red)

the human eye is more sensitive to changes in brightness
=> chroma subsampling
•

- 4:2:0 subsampling - Cb and Cr are
subsampled at a factor of 2 both
horizontally and vertically
Motion Estimation
●

Base compression method for a variety of Codecs

●

Idea:
●

create a prediction frame (previous frame + motion)

●

determine the prediction error

●

storage needed: prediction error (small) + one 2D vector per block

●

●

Small prediction errors easy to compress with DCT+Quantization+Entropy
Encoding

Many possible approaches for Motion Estimation:
●

●

Hierachical Block Matching

●

Optical Flow

●

Netravali-Robbins Algorithm

●

●

Block Matching (Sum of Mean Difference, Sum of Absolute Difference)

...

Encoding speed highly dependend on used Motion Estimation Algorithm
Motion Estimation
Sum of absolute Differences
●

Search for the minimum sum of absolute difference between a Macroblock in
previous- and a shifted Macroblock in current frame

●

Macroblock with minimum SAD inherits a shift -> Motion Vector

●

Build a prediction picture from previous frame + Motion Vectors

●

Compute delta(current image, predicition image)

●

Store difference image + motion vector

lot's of motion -> hard to compress

minor motion -> good to compress
DCT
●

●

8x8 block values are coded by means of the discrete cosine
transform
main idea is to determine the brightness (64 pixels) and scale it
to some limits
–

●

0 – 255, 0 is black while 255 white (In MPEG a range from -256 to 255 is
used.)

64values

–

5values by using the following formulas

Where f(x,y) is the brightness of the pixel at position [x,y].
Example

the matrix is transfered to the receiver in zigzag scan order
So the trasmited code is:
700 90 90 -89 0 100 0 0 0 .... 0
Of course, the zeros are not transferred. An End-Of-Block sign is
coded instead.
Quantization
●

●

●

●

The decoder can reconstruct the pixel values by the following formula called inverse discrete cosine
transform (IDCT):

Where F(u,v) is the transform matrix value at position [u,v].
The results are exactly the original pixel values. Therefore the MPEG compression could be
regarded as loss-less.
But that isn't true, because the transformed values are quantized.
–
–
–

–

That means they are (integer) divided by a certain value.
To reduce them under the byte length at least the quantization value 8 is applied.
The decoder multiplies the result by the same value. Of course the result differs from the
original value. But again because of some properties of the human eye the error isn't visible.
In MPEG there is a quantization matrix which defines a different quantization value for every
transform value depending on its position.
Entropy coding
●

●

●

●

Huffman table, small
value -> small code
Input has many 0's
and values near 0
Implemented RunLevel coding for AC
DC coding regular->
Run level coding
●

All AC values has at
least 8 bits

●

●

RS = 00000000 -> EOB
R = 1111 can mean ZRL
but is ignored

Arranged as
RRRRSSSS

●

RS = 11110000 means

●

R is run length of 0's

●

15 0's with a 0 after it.

●

S is category 1-15

●

●

Not done on the GPU
because of wierd errors.
Implementation
•

•

•

MPEG-1 supports resolutions up to 4095×4095 and
bitrates up to 100 Mbit/s
The algorithms used in compression allow SIMD
operations
Implementation done with GPU computing using the
OpenCL standard

Contenu connexe

Tendances

Wavelet based image compression technique
Wavelet based image compression techniqueWavelet based image compression technique
Wavelet based image compression technique
Priyanka Pachori
 

Tendances (20)

JPEG
JPEGJPEG
JPEG
 
Jpeg compression
Jpeg compressionJpeg compression
Jpeg compression
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
 
Video Compression
Video CompressionVideo Compression
Video Compression
 
Wavelet based image compression technique
Wavelet based image compression techniqueWavelet based image compression technique
Wavelet based image compression technique
 
Image restoration and degradation model
Image restoration and degradation modelImage restoration and degradation model
Image restoration and degradation model
 
Mpeg 2
Mpeg 2Mpeg 2
Mpeg 2
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Chapter10 image segmentation
Chapter10 image segmentationChapter10 image segmentation
Chapter10 image segmentation
 
Intensity Transformation
Intensity TransformationIntensity Transformation
Intensity Transformation
 
Transform coding
Transform codingTransform coding
Transform coding
 
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standardsComparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
Comparison between JPEG(DCT) and JPEG 2000(DWT) compression standards
 
Image compression
Image compression Image compression
Image compression
 
Image segmentation
Image segmentationImage segmentation
Image segmentation
 
Presentation of Lossy compression
Presentation of Lossy compressionPresentation of Lossy compression
Presentation of Lossy compression
 
Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Fundamentals of Data compression
Fundamentals of Data compressionFundamentals of Data compression
Fundamentals of Data compression
 
Image compression .
Image compression .Image compression .
Image compression .
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
 
Lecture 4 Relationship between pixels
Lecture 4 Relationship between pixelsLecture 4 Relationship between pixels
Lecture 4 Relationship between pixels
 

Similaire à MPEG-1 Part 2 Video Encoding

image compression in data compression
image compression in data compressionimage compression in data compression
image compression in data compression
Zaabir Ali
 
H 264 in cuda presentation
H 264 in cuda presentationH 264 in cuda presentation
H 264 in cuda presentation
ashoknaik120
 
CyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdfCyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdf
MohammadAzreeYahaya
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
sangusajjan
 

Similaire à MPEG-1 Part 2 Video Encoding (20)

Multimedia basic video compression techniques
Multimedia basic video compression techniquesMultimedia basic video compression techniques
Multimedia basic video compression techniques
 
Jpeg standards
Jpeg   standardsJpeg   standards
Jpeg standards
 
Digital Image Processing - Image Compression
Digital Image Processing - Image CompressionDigital Image Processing - Image Compression
Digital Image Processing - Image Compression
 
5-3.pptx
5-3.pptx5-3.pptx
5-3.pptx
 
image compression in data compression
image compression in data compressionimage compression in data compression
image compression in data compression
 
image processing for jpeg presentati.ppt
image processing for jpeg presentati.pptimage processing for jpeg presentati.ppt
image processing for jpeg presentati.ppt
 
H 264 in cuda presentation
H 264 in cuda presentationH 264 in cuda presentation
H 264 in cuda presentation
 
lossy compression JPEG
lossy compression JPEGlossy compression JPEG
lossy compression JPEG
 
CyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdfCyberSec_JPEGcompressionForensics.pdf
CyberSec_JPEGcompressionForensics.pdf
 
Why Image compression is Necessary?
Why Image compression is Necessary?Why Image compression is Necessary?
Why Image compression is Necessary?
 
FPGA based JPEG Encoder
FPGA based JPEG EncoderFPGA based JPEG Encoder
FPGA based JPEG Encoder
 
Source coding
Source codingSource coding
Source coding
 
Ch7 031102
Ch7 031102Ch7 031102
Ch7 031102
 
Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)Image compression 14_04_2020 (1)
Image compression 14_04_2020 (1)
 
notes_Image Compression_edited.ppt
notes_Image Compression_edited.pptnotes_Image Compression_edited.ppt
notes_Image Compression_edited.ppt
 
Image compression and it’s security1
Image compression and it’s security1Image compression and it’s security1
Image compression and it’s security1
 
Multimedia communication jpeg
Multimedia communication jpegMultimedia communication jpeg
Multimedia communication jpeg
 
Mmclass4
Mmclass4Mmclass4
Mmclass4
 
JPEG
JPEGJPEG
JPEG
 
Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
 

Plus de Christian Kehl

Smooth, Interactive Rendering and On-line Modification of Large-Scale, Geospa...
Smooth, Interactive Rendering and On-line Modification of Large-Scale, Geospa...Smooth, Interactive Rendering and On-line Modification of Large-Scale, Geospa...
Smooth, Interactive Rendering and On-line Modification of Large-Scale, Geospa...
Christian Kehl
 
Computer Graphics Modellering engels
Computer Graphics Modellering engelsComputer Graphics Modellering engels
Computer Graphics Modellering engels
Christian Kehl
 
Video-Konvertierung über GPGPU mit RIA-FrontEnd
Video-Konvertierung über GPGPU mit RIA-FrontEndVideo-Konvertierung über GPGPU mit RIA-FrontEnd
Video-Konvertierung über GPGPU mit RIA-FrontEnd
Christian Kehl
 

Plus de Christian Kehl (20)

From noisy object surface scans to conformal unstructured grids of multiple m...
From noisy object surface scans to conformal unstructured grids of multiple m...From noisy object surface scans to conformal unstructured grids of multiple m...
From noisy object surface scans to conformal unstructured grids of multiple m...
 
Cuberilles Statistical Volume Visualisation for Medical and Geological Data
Cuberilles Statistical Volume Visualisation for Medical and Geological DataCuberilles Statistical Volume Visualisation for Medical and Geological Data
Cuberilles Statistical Volume Visualisation for Medical and Geological Data
 
Mobile Outcrop Geology using tablets
Mobile Outcrop Geology using tabletsMobile Outcrop Geology using tablets
Mobile Outcrop Geology using tablets
 
Towards Distributed, Semi-Automatic Content-Based Visual Information Retrieva...
Towards Distributed, Semi-Automatic Content-Based Visual Information Retrieva...Towards Distributed, Semi-Automatic Content-Based Visual Information Retrieva...
Towards Distributed, Semi-Automatic Content-Based Visual Information Retrieva...
 
Distributed Rendering and Collaborative User Navigation- and Scene Manipulati...
Distributed Rendering and Collaborative User Navigation- and Scene Manipulati...Distributed Rendering and Collaborative User Navigation- and Scene Manipulati...
Distributed Rendering and Collaborative User Navigation- and Scene Manipulati...
 
Conformal multi-material mesh generation from labelled medical volumes (Dec 2...
Conformal multi-material mesh generation from labelled medical volumes (Dec 2...Conformal multi-material mesh generation from labelled medical volumes (Dec 2...
Conformal multi-material mesh generation from labelled medical volumes (Dec 2...
 
Interactive Simulation and Visualization of Large-Scale Flooding Scenarios (J...
Interactive Simulation and Visualization of Large-Scale Flooding Scenarios (J...Interactive Simulation and Visualization of Large-Scale Flooding Scenarios (J...
Interactive Simulation and Visualization of Large-Scale Flooding Scenarios (J...
 
Efficient Navigation in Temporal, Multi-Dimensional Point Sets (April 2013)
Efficient Navigation in Temporal, Multi-Dimensional Point Sets (April 2013)Efficient Navigation in Temporal, Multi-Dimensional Point Sets (April 2013)
Efficient Navigation in Temporal, Multi-Dimensional Point Sets (April 2013)
 
Smooth, Interactive Rendering and On-line Modification of Large-Scale, Geospa...
Smooth, Interactive Rendering and On-line Modification of Large-Scale, Geospa...Smooth, Interactive Rendering and On-line Modification of Large-Scale, Geospa...
Smooth, Interactive Rendering and On-line Modification of Large-Scale, Geospa...
 
WP 4 – Interactive simulation and 3D visualization for water policy developme...
WP 4 – Interactive simulation and 3D visualization for water policy developme...WP 4 – Interactive simulation and 3D visualization for water policy developme...
WP 4 – Interactive simulation and 3D visualization for water policy developme...
 
Topology-conform segmented volume meshing of volume images (Oct 2012)
Topology-conform segmented volume meshing of volume images (Oct 2012)Topology-conform segmented volume meshing of volume images (Oct 2012)
Topology-conform segmented volume meshing of volume images (Oct 2012)
 
Master Thesis: Conformal multi-material mesh generation from labelled medical...
Master Thesis: Conformal multi-material mesh generation from labelled medical...Master Thesis: Conformal multi-material mesh generation from labelled medical...
Master Thesis: Conformal multi-material mesh generation from labelled medical...
 
nteractive visual analysis of flood scnarios using large-scale LiDAR point cl...
nteractive visual analysis of flood scnarios using large-scale LiDAR point cl...nteractive visual analysis of flood scnarios using large-scale LiDAR point cl...
nteractive visual analysis of flood scnarios using large-scale LiDAR point cl...
 
LiDAR acquisition
LiDAR acquisitionLiDAR acquisition
LiDAR acquisition
 
Fluid simulation
Fluid simulationFluid simulation
Fluid simulation
 
Depth image recognition using isomorphic graph theory
Depth image recognition using isomorphic graph theoryDepth image recognition using isomorphic graph theory
Depth image recognition using isomorphic graph theory
 
Graph theory - Traveling Salesman and Chinese Postman
Graph theory - Traveling Salesman and Chinese PostmanGraph theory - Traveling Salesman and Chinese Postman
Graph theory - Traveling Salesman and Chinese Postman
 
GPU Computing
GPU ComputingGPU Computing
GPU Computing
 
Computer Graphics Modellering engels
Computer Graphics Modellering engelsComputer Graphics Modellering engels
Computer Graphics Modellering engels
 
Video-Konvertierung über GPGPU mit RIA-FrontEnd
Video-Konvertierung über GPGPU mit RIA-FrontEndVideo-Konvertierung über GPGPU mit RIA-FrontEnd
Video-Konvertierung über GPGPU mit RIA-FrontEnd
 

Dernier

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 

MPEG-1 Part 2 Video Encoding

  • 3. What is MPEG? • • • Moving Picture Experts Group standards for audio video compression and transmission asymmetric: encoder more complex than decoder
  • 4. MPEG standards • MPEG-1 • first standard for audio and video (lossy compression) • composed of 5 parts: Systems, Video, Audio, Compliance testing, Software simulation • up to 1.5 Mbit/s • moderate quality • MP3 audio format
  • 6. Frames Types of pictures: I (intra) frame compressed using only intra-frame coding Moderate compression but faster random access P (predicted) frame Coded with motion compression using past I frames or P frames Can be used as reference pictures for additional motion compensation B (bidirectional) frame Coded by motion compensation by either past or future I or P frames D (DC) frame Limited use: encodes only DC components of intra-frame coding Only found in MPEG-1
  • 7. Macroblocks Macroblocks -blocks of 16 x 16 pixels -the smallest unit of data that can select a method of compression, therefore they can be considered as the minimum coded units in a picture. Blocks -are 8 x 8 blocks of pixels. There are six of these blocks in each macroblock
  • 8. Color Space • conversion to YcbCr (luma, chroma blue, chroma red) the human eye is more sensitive to changes in brightness => chroma subsampling • - 4:2:0 subsampling - Cb and Cr are subsampled at a factor of 2 both horizontally and vertically
  • 9. Motion Estimation ● Base compression method for a variety of Codecs ● Idea: ● create a prediction frame (previous frame + motion) ● determine the prediction error ● storage needed: prediction error (small) + one 2D vector per block ● ● Small prediction errors easy to compress with DCT+Quantization+Entropy Encoding Many possible approaches for Motion Estimation: ● ● Hierachical Block Matching ● Optical Flow ● Netravali-Robbins Algorithm ● ● Block Matching (Sum of Mean Difference, Sum of Absolute Difference) ... Encoding speed highly dependend on used Motion Estimation Algorithm
  • 10. Motion Estimation Sum of absolute Differences ● Search for the minimum sum of absolute difference between a Macroblock in previous- and a shifted Macroblock in current frame ● Macroblock with minimum SAD inherits a shift -> Motion Vector ● Build a prediction picture from previous frame + Motion Vectors ● Compute delta(current image, predicition image) ● Store difference image + motion vector lot's of motion -> hard to compress minor motion -> good to compress
  • 11. DCT ● ● 8x8 block values are coded by means of the discrete cosine transform main idea is to determine the brightness (64 pixels) and scale it to some limits – ● 0 – 255, 0 is black while 255 white (In MPEG a range from -256 to 255 is used.) 64values – 5values by using the following formulas Where f(x,y) is the brightness of the pixel at position [x,y].
  • 12. Example the matrix is transfered to the receiver in zigzag scan order So the trasmited code is: 700 90 90 -89 0 100 0 0 0 .... 0 Of course, the zeros are not transferred. An End-Of-Block sign is coded instead.
  • 13. Quantization ● ● ● ● The decoder can reconstruct the pixel values by the following formula called inverse discrete cosine transform (IDCT): Where F(u,v) is the transform matrix value at position [u,v]. The results are exactly the original pixel values. Therefore the MPEG compression could be regarded as loss-less. But that isn't true, because the transformed values are quantized. – – – – That means they are (integer) divided by a certain value. To reduce them under the byte length at least the quantization value 8 is applied. The decoder multiplies the result by the same value. Of course the result differs from the original value. But again because of some properties of the human eye the error isn't visible. In MPEG there is a quantization matrix which defines a different quantization value for every transform value depending on its position.
  • 14. Entropy coding ● ● ● ● Huffman table, small value -> small code Input has many 0's and values near 0 Implemented RunLevel coding for AC DC coding regular->
  • 15. Run level coding ● All AC values has at least 8 bits ● ● RS = 00000000 -> EOB R = 1111 can mean ZRL but is ignored Arranged as RRRRSSSS ● RS = 11110000 means ● R is run length of 0's ● 15 0's with a 0 after it. ● S is category 1-15 ● ● Not done on the GPU because of wierd errors.
  • 16. Implementation • • • MPEG-1 supports resolutions up to 4095×4095 and bitrates up to 100 Mbit/s The algorithms used in compression allow SIMD operations Implementation done with GPU computing using the OpenCL standard