SlideShare a Scribd company logo
1 of 13
1
Data Compression
Video Compression
Prepared by
Hassanein Alwan
2017-2018
University Of Technology
Information System
MCs
2
Digital Video
an image that consists of pixels Digital video is, in principle, a sequence of
images, called frames, displayed at a certain frame rate (so many frames per
second, or fps) to create the illusion of animation.
1. It can be easily edited
2. It can be stored on any digital medium, such as hard disks, removable
cartridges, CD-ROMs, or DVDs.
3. It can be compressed. This allows for more storage (when video is stored
on a digital medium) and also for fast transmission. Sending compressed
video between computers makes video telephony possible, which, in turn,
makes video conferencing possible. Transmitting compressed video also
makes it possible to increase the capacity of television cables and thus add
channels.
Video compression
Videos normally contain huge data (visual and audio data), a simple
calculation shows that an uncompressed video produces an enormous
amount of data: a resolution of 720x576 pixels, with a refresh rate of 25 fps
and 8-bit color depth, would require about 1.66 Mb/s bandwidth, and for
High Definition Television (HDTV): 1.99 Gb/s .
Even with powerful computer systems (storage, processor power, network
bandwidth), such data amount cause extreme high computational demands
for managing the data. Fortunately, digital video contains a great deal of
redundancy. Thus it is suitable for compression, which can reduce these
problems significantly.
3
Especially lossy compression techniques deliver high compression ratios for
video data. However, one must keep in mind that there is always a trade-off
between data size (therefore computational time) and quality.
*The higher the compression ratio, the lower the size and the lower the
quality.
The encoding and decoding process itself also needs computational
resources, which have to be taken into consideration. It makes no sense, for
example for a real-time application with low bandwidth requirements, to
compress the video with a computational expensive algorithm which takes
too long to encode and decode the data.
4
Video compression is based on two principles:-
1- Intra frame refers to the fact that the various lossless and lossy
compression techniques are performed relative to information that is
contained only within the current frame , and not relative to any other
frame in the video sequence, is concern with the spatial redundancy
that exists in each frame, Figure below
2- Inter frame is a frame in a video compression stream which is
expressed in terms of one or more neighboring frames. The "inter"
part of the term refers to the use of Inter frame prediction. This kind
of prediction tries to take advantage from temporal redundancy
between neighboring frames allowing achieve higher compression
rates, It should encode each successive frame by identifying the
differences between the frame and its predecessor, and encoding these
differences. If the frame is very different from its predecessor, it
should be coded independently of any other frame, Figure below.
5
Video Compression – MPEG.
One of the best-known audio and video streaming techniques is the
standard called MPEG (initiated by the Motion Picture Experts Group in
the late 1988s)
At the same time it describes a whole family of international standards
for the compression of audio-visual digital data. The most known are
MPEG-1, MPEG-2 and MPEG-4
it provided lower bit rates (10Kb/s to 1Mb/s) with a good quality.
It was a major development from MPEG-2 and was designed for the use
in interactive environments, such as multimedia applications and
video communication. It enhances the MPEG family with tools to lower
the bit-rate individually for certain applications. It is therefore more
adaptive to the specific area of the video usage.
MPEG Compression
‱ For Still PictureSpatial
(intra-frame)
‱ For the FramesTemporal
(inter-frame)
Compression
6
Spatial Redundancy Reduction
7
The MPEG compression algorithm
The MPEG compression algorithm encodes the data in 5 steps :
First a reduction of the resolution is done, which is followed by a Motion
Estimation in order to reduce temporal redundancy. The next steps are the
Discrete Cosine Transformation (DCT) and a quantization as it is used for
the JPEG compression; this reduces the spatial redundancy (referring to
human visual perception). The final step is an entropy coding using the Run
Length Encoding and the Huffman coding algorithm.
Step 1:Reduction of the Resolution
The human eye has a lower sensibility to color information than
to dark-bright contrasts. A conversion from RGB color-space into YUV
color components help to use this effect for compression. The
chrominance components U and V can be reduced (subsampling) to half
of the pixels in horizontal direction (4:2:2), or a half of the pixels in both
the horizontal and vertical (4:2:0).
*The subsamplingreducesthe data volumeby 50% for the 4:2:0 and by
33% for the 4:2:2 subsampling.
8
Step 2:Motion Estimation
An MPEG video can be understood as a sequence of frames.
Because two successive frames of a video sequence often have small
differences (except in scene changes), the MPEG-standard offers a way
of reducing this temporal redundancy. It uses three types of frames:
I-frames (intra), P-frames (predicted) and B-frames
(bidirectional).
The I-frames are “key-frames”, which have no reference to other
frames and their compression is not that high
The P-frames can be predicted from an earlier I-frame or P-
frame. P-frames cannot be reconstructed without their referencing
frame, but they need less space than the I-frames, because only the
differences are stored.
The B-frames are a two directional version of the P-frame,
referring to both directions (one forward frame and one backward
frame). B-frames cannot be referenced by other P- or B-frames, because
they are interpolated from forward and backward frames.
*P-frames and B-frames are called inter coded frames, whereas I-
frames are known as intra coded frames.
9
The usage of the particular frame type defines the quality and the
compression ratio of the compressed video. I-frames increase the
quality (and size), whereas the usage of B-frames compresses better but
also produces poorer quality. The distance between two I-frames can be
seen as a measure for the quality of an MPEG-video. In practice
following sequence showed to give good results for quality and
compression level: IBBPBBPBBPBBIBBP.
The references between the different types of frames are realized
by a process called motion estimation or motion compensation. The
correlation between two frames in terms of motion is represented by a
motion vector. The resulting frame correlation, and therefore the pixel
arithmetic difference, strongly depends on how good the motion
estimation algorithm is implemented. Good estimation results in higher
compression ratios and better quality of the coded video sequence.
However, motion estimation is computational intensive operation,
which is often not well suited for real time applications.
10
The motion estimation algorithm
Frame Segmentation - The Actual frame is divided into non-
overlapping blocks (macro blocks) usually 8x8 or 16x16 pixels.
The smaller the block sizes are chosen, the more vectors need to
be calculated; the block size therefore is a critical factor in terms
of time performance, but also in terms of quality: if the blocks are
too large, the motion matching is most likely less correlated. If the
blocks are too small, it is probably, that the algorithm will try to
match noise. MPEG uses usually block sizes of 16x16 pixels.
Search Threshold - In order to minimize the number of
expensivemotion estimation calculations, they are only calculated
if the difference between two blocks at the same position is higher
than a threshold, otherwise the whole block is transmitted.
Block Matching - the current frame is compared with a past
frame within a search area The process of block matching is the
most time consuming one during encoding. In order to find a
matching block, each block of the current frame is compared with
a past frame within a search area. Only the luminance information
is used to compare the blocks, but obviously the color information
will be included in the encoding. The search area is a critical factor
for the quality of the matching. It is more likely that the algorithm
finds a matching block, if it searches a larger area. Obviously the
number of search operations increases quadratically, when
extending the search area. Therefore too large search areas slow
down the encoding process dramatically. To reduce these
problems often rectangular search areas are used, which take into
account, that horizontal movements are more likely than vertical
ones.
11
What does "prediction" mean?
Imagine an I-frame showing a triangle on white background! A
following P-frame shows the same triangle but at another
position. Prediction means to supply a motion vector which
declares how to move the triangle on I-frame to obtain the
triangle in P-frame. This motion vector is part of the MPEG stream
and it is divided in a horizontal and a vertical part. These parts
can be positive or negative. A positive value means motion to the
right or motion downwards, respectively. A negative value means
motion to the left or motion upwards, respectively.
Prediction Error Coding - Video motions are often more
complex, and a simple “shifting in 2D” is not a perfectly suitable
description of the motion in the actual scene, causing so called
prediction errors.
The MPEG stream contains a matrix for compensating this error.
After prediction the, the predicted and the original frame are
compared, and their differences are coded. Obviously less data is
needed to store only the differences (yellow and black regions in
Figure below).
12
Note that the prediction error compensation requires less bytes than the whole
frame because the white parts are zero and can be discarded from MPEG
stream. Furthermore the DCT compression is applied to the prediction error
which decreases its memory size.
Vector Coding - After determining the motion vectors and
evaluating the correction, these can be compressed. Large parts of
MPEG videos consist of B- and P-frames as seen before, and most
of them have mainly stored motion vectors. Therefore an efficient
compression of motion vector data, which has usually high
correlation, is desired.
Block Coding- Every macro blockcontains 4 luminance blocks
and 2 chrominance blocks. Every block has a dimension of 8x8
values. The luminance blocks contain information of the
brightness of every pixel in macro block. The chrominance blocks
contain color information. Becauseof some propertiesof the
human eye it isn't necessary to give color information for every
pixel. Instead 4 pixels are related to one color value. This color
valueis divided into two parts. The first is in Cb color block the
second is in Cr color block. Dependingon the kind of macro block
the blocks contain pixel information or predictionerror
information asmentioned above. In any case the information is
compressed usingthe discrete cosine transform (DCT).
13
Step 3:Discrete Cosine Transform(DCT)
DCT allows, similar to the Fast Fourier Transform (FFT), a
representation of image data in terms of frequency components. So the
frame-blocks (8x8 or 16x16 pixels) can be represented as frequency
components.
Step 4:Quantization
 Divide each frame into small rectangular blocks (’vectors’)
 Code Book – collection ofconstantvectors representing
typical patterns (edges,textures, flat color,
)
 Compress byreplacing each vector in image by index of
vector from code bookthat most closelyresembles it
Step 5:Entropy Coding
The entropy coding takes two steps: Run Length Encoding (RLE )
and Huffman coding. These are well known lossless compression
methods, which can compress data, depending on its redundancy.
References
- Data CompressionThe Complete Reference (4th
)
- DjordjeMitrovic–VideoCompression– University of
Edinburgh

More Related Content

What's hot

Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and videosangusajjan
 
Video Compression Basics - MPEG2
Video Compression Basics - MPEG2Video Compression Basics - MPEG2
Video Compression Basics - MPEG2VijayKumarArya
 
Image compression standards
Image compression standardsImage compression standards
Image compression standardskirupasuchi1996
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standardanuragjagetiya
 
Hy3115071512
Hy3115071512Hy3115071512
Hy3115071512IJERA Editor
 
Secured Data Transmission Using Video Steganographic Scheme
Secured Data Transmission Using Video Steganographic SchemeSecured Data Transmission Using Video Steganographic Scheme
Secured Data Transmission Using Video Steganographic SchemeIJERA Editor
 
Presentation of Lossy compression
Presentation of Lossy compressionPresentation of Lossy compression
Presentation of Lossy compressionOmar Ghazi
 
Mpeg video compression
Mpeg video compressionMpeg video compression
Mpeg video compressionGem WeBlog
 
Seminar Report on image compression
Seminar Report on image compressionSeminar Report on image compression
Seminar Report on image compressionPradip Kumar
 
comparision of lossy and lossless image compression using various algorithm
comparision of lossy and lossless image compression using various algorithmcomparision of lossy and lossless image compression using various algorithm
comparision of lossy and lossless image compression using various algorithmchezhiyan chezhiyan
 
Compression: Images (JPEG)
Compression: Images (JPEG)Compression: Images (JPEG)
Compression: Images (JPEG)danishrafiq
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standardsMazin Alwaaly
 
VISUAL ATTENTION BASED KEYFRAMES EXTRACTION AND VIDEO SUMMARIZATION
VISUAL ATTENTION BASED KEYFRAMES EXTRACTION AND VIDEO SUMMARIZATIONVISUAL ATTENTION BASED KEYFRAMES EXTRACTION AND VIDEO SUMMARIZATION
VISUAL ATTENTION BASED KEYFRAMES EXTRACTION AND VIDEO SUMMARIZATIONcscpconf
 
Project presentation image compression by manish myst, ssgbcoet
Project presentation image compression by manish myst, ssgbcoetProject presentation image compression by manish myst, ssgbcoet
Project presentation image compression by manish myst, ssgbcoetManish Myst
 

What's hot (20)

Compression of digital voice and video
Compression of digital voice and videoCompression of digital voice and video
Compression of digital voice and video
 
Multimedia Object - Video
Multimedia Object - VideoMultimedia Object - Video
Multimedia Object - Video
 
Video Compression Basics - MPEG2
Video Compression Basics - MPEG2Video Compression Basics - MPEG2
Video Compression Basics - MPEG2
 
Image compression standards
Image compression standardsImage compression standards
Image compression standards
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standard
 
Hy3115071512
Hy3115071512Hy3115071512
Hy3115071512
 
Secured Data Transmission Using Video Steganographic Scheme
Secured Data Transmission Using Video Steganographic SchemeSecured Data Transmission Using Video Steganographic Scheme
Secured Data Transmission Using Video Steganographic Scheme
 
Presentation of Lossy compression
Presentation of Lossy compressionPresentation of Lossy compression
Presentation of Lossy compression
 
Image Compression Techniques: A Survey
Image Compression Techniques: A SurveyImage Compression Techniques: A Survey
Image Compression Techniques: A Survey
 
Mpeg video compression
Mpeg video compressionMpeg video compression
Mpeg video compression
 
Mpeg 2
Mpeg 2Mpeg 2
Mpeg 2
 
Seminar Report on image compression
Seminar Report on image compressionSeminar Report on image compression
Seminar Report on image compression
 
comparision of lossy and lossless image compression using various algorithm
comparision of lossy and lossless image compression using various algorithmcomparision of lossy and lossless image compression using various algorithm
comparision of lossy and lossless image compression using various algorithm
 
Jpeg standards
Jpeg   standardsJpeg   standards
Jpeg standards
 
Compression: Images (JPEG)
Compression: Images (JPEG)Compression: Images (JPEG)
Compression: Images (JPEG)
 
Multimedia image compression standards
Multimedia image compression standardsMultimedia image compression standards
Multimedia image compression standards
 
VISUAL ATTENTION BASED KEYFRAMES EXTRACTION AND VIDEO SUMMARIZATION
VISUAL ATTENTION BASED KEYFRAMES EXTRACTION AND VIDEO SUMMARIZATIONVISUAL ATTENTION BASED KEYFRAMES EXTRACTION AND VIDEO SUMMARIZATION
VISUAL ATTENTION BASED KEYFRAMES EXTRACTION AND VIDEO SUMMARIZATION
 
JPEG Image Compression
JPEG Image CompressionJPEG Image Compression
JPEG Image Compression
 
Image Compression
Image CompressionImage Compression
Image Compression
 
Project presentation image compression by manish myst, ssgbcoet
Project presentation image compression by manish myst, ssgbcoetProject presentation image compression by manish myst, ssgbcoet
Project presentation image compression by manish myst, ssgbcoet
 

Similar to video comparison

An overview Survey on Various Video compressions and its importance
An overview Survey on Various Video compressions and its importanceAn overview Survey on Various Video compressions and its importance
An overview Survey on Various Video compressions and its importanceINFOGAIN PUBLICATION
 
A Novel Approach for Compressing Surveillance System Videos
A Novel Approach for Compressing Surveillance System VideosA Novel Approach for Compressing Surveillance System Videos
A Novel Approach for Compressing Surveillance System VideosINFOGAIN PUBLICATION
 
Gg3311121115
Gg3311121115Gg3311121115
Gg3311121115IJERA Editor
 
Effective Compression of Digital Video
Effective Compression of Digital VideoEffective Compression of Digital Video
Effective Compression of Digital VideoIRJET Journal
 
Video compression
Video compressionVideo compression
Video compressionDeepa K C
 
Video Forgery Detection: Literature review
Video Forgery Detection: Literature reviewVideo Forgery Detection: Literature review
Video Forgery Detection: Literature reviewTharindu Rusira
 
A VIDEO COMPRESSION TECHNIQUE UTILIZING SPATIO-TEMPORAL LOWER COEFFICIENTS
A VIDEO COMPRESSION TECHNIQUE UTILIZING SPATIO-TEMPORAL LOWER COEFFICIENTSA VIDEO COMPRESSION TECHNIQUE UTILIZING SPATIO-TEMPORAL LOWER COEFFICIENTS
A VIDEO COMPRESSION TECHNIQUE UTILIZING SPATIO-TEMPORAL LOWER COEFFICIENTSIAEME Publication
 
A Study of Image Compression Methods
A Study of Image Compression MethodsA Study of Image Compression Methods
A Study of Image Compression MethodsIOSR Journals
 
Performance and Analysis of Video Compression Using Block Based Singular Valu...
Performance and Analysis of Video Compression Using Block Based Singular Valu...Performance and Analysis of Video Compression Using Block Based Singular Valu...
Performance and Analysis of Video Compression Using Block Based Singular Valu...IJMER
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)IJERD Editor
 
NEW IMPROVED 2D SVD BASED ALGORITHM FOR VIDEO CODING
NEW IMPROVED 2D SVD BASED ALGORITHM FOR VIDEO CODINGNEW IMPROVED 2D SVD BASED ALGORITHM FOR VIDEO CODING
NEW IMPROVED 2D SVD BASED ALGORITHM FOR VIDEO CODINGcscpconf
 
Multimedia presentation video compression
Multimedia presentation video compressionMultimedia presentation video compression
Multimedia presentation video compressionLaLit DuBey
 
Video Compression Algorithm Based on Frame Difference Approaches
Video Compression Algorithm Based on Frame Difference Approaches Video Compression Algorithm Based on Frame Difference Approaches
Video Compression Algorithm Based on Frame Difference Approaches ijsc
 
RESPONSIVE VIDEO FORMAT FOR ADAPTIVE STREAMING
RESPONSIVE VIDEO FORMAT FOR ADAPTIVE STREAMINGRESPONSIVE VIDEO FORMAT FOR ADAPTIVE STREAMING
RESPONSIVE VIDEO FORMAT FOR ADAPTIVE STREAMINGJournal For Research
 
IBM VideoCharger and Digital Library MediaBase.doc
IBM VideoCharger and Digital Library MediaBase.docIBM VideoCharger and Digital Library MediaBase.doc
IBM VideoCharger and Digital Library MediaBase.docVideoguy
 

Similar to video comparison (20)

An overview Survey on Various Video compressions and its importance
An overview Survey on Various Video compressions and its importanceAn overview Survey on Various Video compressions and its importance
An overview Survey on Various Video compressions and its importance
 
A Novel Approach for Compressing Surveillance System Videos
A Novel Approach for Compressing Surveillance System VideosA Novel Approach for Compressing Surveillance System Videos
A Novel Approach for Compressing Surveillance System Videos
 
Gg3311121115
Gg3311121115Gg3311121115
Gg3311121115
 
Effective Compression of Digital Video
Effective Compression of Digital VideoEffective Compression of Digital Video
Effective Compression of Digital Video
 
Video compression
Video compressionVideo compression
Video compression
 
Video Forgery Detection: Literature review
Video Forgery Detection: Literature reviewVideo Forgery Detection: Literature review
Video Forgery Detection: Literature review
 
A VIDEO COMPRESSION TECHNIQUE UTILIZING SPATIO-TEMPORAL LOWER COEFFICIENTS
A VIDEO COMPRESSION TECHNIQUE UTILIZING SPATIO-TEMPORAL LOWER COEFFICIENTSA VIDEO COMPRESSION TECHNIQUE UTILIZING SPATIO-TEMPORAL LOWER COEFFICIENTS
A VIDEO COMPRESSION TECHNIQUE UTILIZING SPATIO-TEMPORAL LOWER COEFFICIENTS
 
A Study of Image Compression Methods
A Study of Image Compression MethodsA Study of Image Compression Methods
A Study of Image Compression Methods
 
Performance and Analysis of Video Compression Using Block Based Singular Valu...
Performance and Analysis of Video Compression Using Block Based Singular Valu...Performance and Analysis of Video Compression Using Block Based Singular Valu...
Performance and Analysis of Video Compression Using Block Based Singular Valu...
 
International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)International Journal of Engineering Research and Development (IJERD)
International Journal of Engineering Research and Development (IJERD)
 
NEW IMPROVED 2D SVD BASED ALGORITHM FOR VIDEO CODING
NEW IMPROVED 2D SVD BASED ALGORITHM FOR VIDEO CODINGNEW IMPROVED 2D SVD BASED ALGORITHM FOR VIDEO CODING
NEW IMPROVED 2D SVD BASED ALGORITHM FOR VIDEO CODING
 
Multimedia presentation video compression
Multimedia presentation video compressionMultimedia presentation video compression
Multimedia presentation video compression
 
Video Compression Algorithm Based on Frame Difference Approaches
Video Compression Algorithm Based on Frame Difference Approaches Video Compression Algorithm Based on Frame Difference Approaches
Video Compression Algorithm Based on Frame Difference Approaches
 
M.sc.iii sem digital image processing unit v
M.sc.iii sem digital image processing unit vM.sc.iii sem digital image processing unit v
M.sc.iii sem digital image processing unit v
 
report
reportreport
report
 
Image compression
Image compressionImage compression
Image compression
 
RESPONSIVE VIDEO FORMAT FOR ADAPTIVE STREAMING
RESPONSIVE VIDEO FORMAT FOR ADAPTIVE STREAMINGRESPONSIVE VIDEO FORMAT FOR ADAPTIVE STREAMING
RESPONSIVE VIDEO FORMAT FOR ADAPTIVE STREAMING
 
Be36338341
Be36338341Be36338341
Be36338341
 
IBM VideoCharger and Digital Library MediaBase.doc
IBM VideoCharger and Digital Library MediaBase.docIBM VideoCharger and Digital Library MediaBase.doc
IBM VideoCharger and Digital Library MediaBase.doc
 
Presentation on Image Compression
Presentation on Image Compression Presentation on Image Compression
Presentation on Image Compression
 

More from Hassanein Alwan

ARABIC TEXT MINING AND ROUGH SET THEORY FOR DECISION SUPPORT SYSTEM.
ARABIC TEXT MINING AND ROUGH SET THEORY FOR DECISION SUPPORT SYSTEM.ARABIC TEXT MINING AND ROUGH SET THEORY FOR DECISION SUPPORT SYSTEM.
ARABIC TEXT MINING AND ROUGH SET THEORY FOR DECISION SUPPORT SYSTEM.Hassanein Alwan
 
Community Engagement
Community EngagementCommunity Engagement
Community EngagementHassanein Alwan
 
Planning for contingencies
Planning for contingenciesPlanning for contingencies
Planning for contingenciesHassanein Alwan
 
Project Organizations
Project Organizations Project Organizations
Project Organizations Hassanein Alwan
 

More from Hassanein Alwan (9)

Feasibility study
Feasibility studyFeasibility study
Feasibility study
 
ARABIC TEXT MINING AND ROUGH SET THEORY FOR DECISION SUPPORT SYSTEM.
ARABIC TEXT MINING AND ROUGH SET THEORY FOR DECISION SUPPORT SYSTEM.ARABIC TEXT MINING AND ROUGH SET THEORY FOR DECISION SUPPORT SYSTEM.
ARABIC TEXT MINING AND ROUGH SET THEORY FOR DECISION SUPPORT SYSTEM.
 
Community Engagement
Community EngagementCommunity Engagement
Community Engagement
 
Data Management
Data ManagementData Management
Data Management
 
Planning for contingencies
Planning for contingenciesPlanning for contingencies
Planning for contingencies
 
Data link layer
Data link layerData link layer
Data link layer
 
data replication
data replicationdata replication
data replication
 
deep learning
deep learningdeep learning
deep learning
 
Project Organizations
Project Organizations Project Organizations
Project Organizations
 

Recently uploaded

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.arsicmarija21
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxChelloAnnAsuncion2
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 

Recently uploaded (20)

Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.AmericanHighSchoolsprezentacijaoskolama.
AmericanHighSchoolsprezentacijaoskolama.
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptxGrade 9 Q4-MELC1-Active and Passive Voice.pptx
Grade 9 Q4-MELC1-Active and Passive Voice.pptx
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 

video comparison

  • 1. 1 Data Compression Video Compression Prepared by Hassanein Alwan 2017-2018 University Of Technology Information System MCs
  • 2. 2 Digital Video an image that consists of pixels Digital video is, in principle, a sequence of images, called frames, displayed at a certain frame rate (so many frames per second, or fps) to create the illusion of animation. 1. It can be easily edited 2. It can be stored on any digital medium, such as hard disks, removable cartridges, CD-ROMs, or DVDs. 3. It can be compressed. This allows for more storage (when video is stored on a digital medium) and also for fast transmission. Sending compressed video between computers makes video telephony possible, which, in turn, makes video conferencing possible. Transmitting compressed video also makes it possible to increase the capacity of television cables and thus add channels. Video compression Videos normally contain huge data (visual and audio data), a simple calculation shows that an uncompressed video produces an enormous amount of data: a resolution of 720x576 pixels, with a refresh rate of 25 fps and 8-bit color depth, would require about 1.66 Mb/s bandwidth, and for High Definition Television (HDTV): 1.99 Gb/s . Even with powerful computer systems (storage, processor power, network bandwidth), such data amount cause extreme high computational demands for managing the data. Fortunately, digital video contains a great deal of redundancy. Thus it is suitable for compression, which can reduce these problems significantly.
  • 3. 3 Especially lossy compression techniques deliver high compression ratios for video data. However, one must keep in mind that there is always a trade-off between data size (therefore computational time) and quality. *The higher the compression ratio, the lower the size and the lower the quality. The encoding and decoding process itself also needs computational resources, which have to be taken into consideration. It makes no sense, for example for a real-time application with low bandwidth requirements, to compress the video with a computational expensive algorithm which takes too long to encode and decode the data.
  • 4. 4 Video compression is based on two principles:- 1- Intra frame refers to the fact that the various lossless and lossy compression techniques are performed relative to information that is contained only within the current frame , and not relative to any other frame in the video sequence, is concern with the spatial redundancy that exists in each frame, Figure below 2- Inter frame is a frame in a video compression stream which is expressed in terms of one or more neighboring frames. The "inter" part of the term refers to the use of Inter frame prediction. This kind of prediction tries to take advantage from temporal redundancy between neighboring frames allowing achieve higher compression rates, It should encode each successive frame by identifying the differences between the frame and its predecessor, and encoding these differences. If the frame is very different from its predecessor, it should be coded independently of any other frame, Figure below.
  • 5. 5 Video Compression – MPEG. One of the best-known audio and video streaming techniques is the standard called MPEG (initiated by the Motion Picture Experts Group in the late 1988s) At the same time it describes a whole family of international standards for the compression of audio-visual digital data. The most known are MPEG-1, MPEG-2 and MPEG-4 it provided lower bit rates (10Kb/s to 1Mb/s) with a good quality. It was a major development from MPEG-2 and was designed for the use in interactive environments, such as multimedia applications and video communication. It enhances the MPEG family with tools to lower the bit-rate individually for certain applications. It is therefore more adaptive to the specific area of the video usage. MPEG Compression ‱ For Still PictureSpatial (intra-frame) ‱ For the FramesTemporal (inter-frame) Compression
  • 7. 7 The MPEG compression algorithm The MPEG compression algorithm encodes the data in 5 steps : First a reduction of the resolution is done, which is followed by a Motion Estimation in order to reduce temporal redundancy. The next steps are the Discrete Cosine Transformation (DCT) and a quantization as it is used for the JPEG compression; this reduces the spatial redundancy (referring to human visual perception). The final step is an entropy coding using the Run Length Encoding and the Huffman coding algorithm. Step 1:Reduction of the Resolution The human eye has a lower sensibility to color information than to dark-bright contrasts. A conversion from RGB color-space into YUV color components help to use this effect for compression. The chrominance components U and V can be reduced (subsampling) to half of the pixels in horizontal direction (4:2:2), or a half of the pixels in both the horizontal and vertical (4:2:0). *The subsamplingreducesthe data volumeby 50% for the 4:2:0 and by 33% for the 4:2:2 subsampling.
  • 8. 8 Step 2:Motion Estimation An MPEG video can be understood as a sequence of frames. Because two successive frames of a video sequence often have small differences (except in scene changes), the MPEG-standard offers a way of reducing this temporal redundancy. It uses three types of frames: I-frames (intra), P-frames (predicted) and B-frames (bidirectional). The I-frames are “key-frames”, which have no reference to other frames and their compression is not that high The P-frames can be predicted from an earlier I-frame or P- frame. P-frames cannot be reconstructed without their referencing frame, but they need less space than the I-frames, because only the differences are stored. The B-frames are a two directional version of the P-frame, referring to both directions (one forward frame and one backward frame). B-frames cannot be referenced by other P- or B-frames, because they are interpolated from forward and backward frames. *P-frames and B-frames are called inter coded frames, whereas I- frames are known as intra coded frames.
  • 9. 9 The usage of the particular frame type defines the quality and the compression ratio of the compressed video. I-frames increase the quality (and size), whereas the usage of B-frames compresses better but also produces poorer quality. The distance between two I-frames can be seen as a measure for the quality of an MPEG-video. In practice following sequence showed to give good results for quality and compression level: IBBPBBPBBPBBIBBP. The references between the different types of frames are realized by a process called motion estimation or motion compensation. The correlation between two frames in terms of motion is represented by a motion vector. The resulting frame correlation, and therefore the pixel arithmetic difference, strongly depends on how good the motion estimation algorithm is implemented. Good estimation results in higher compression ratios and better quality of the coded video sequence. However, motion estimation is computational intensive operation, which is often not well suited for real time applications.
  • 10. 10 The motion estimation algorithm Frame Segmentation - The Actual frame is divided into non- overlapping blocks (macro blocks) usually 8x8 or 16x16 pixels. The smaller the block sizes are chosen, the more vectors need to be calculated; the block size therefore is a critical factor in terms of time performance, but also in terms of quality: if the blocks are too large, the motion matching is most likely less correlated. If the blocks are too small, it is probably, that the algorithm will try to match noise. MPEG uses usually block sizes of 16x16 pixels. Search Threshold - In order to minimize the number of expensivemotion estimation calculations, they are only calculated if the difference between two blocks at the same position is higher than a threshold, otherwise the whole block is transmitted. Block Matching - the current frame is compared with a past frame within a search area The process of block matching is the most time consuming one during encoding. In order to find a matching block, each block of the current frame is compared with a past frame within a search area. Only the luminance information is used to compare the blocks, but obviously the color information will be included in the encoding. The search area is a critical factor for the quality of the matching. It is more likely that the algorithm finds a matching block, if it searches a larger area. Obviously the number of search operations increases quadratically, when extending the search area. Therefore too large search areas slow down the encoding process dramatically. To reduce these problems often rectangular search areas are used, which take into account, that horizontal movements are more likely than vertical ones.
  • 11. 11 What does "prediction" mean? Imagine an I-frame showing a triangle on white background! A following P-frame shows the same triangle but at another position. Prediction means to supply a motion vector which declares how to move the triangle on I-frame to obtain the triangle in P-frame. This motion vector is part of the MPEG stream and it is divided in a horizontal and a vertical part. These parts can be positive or negative. A positive value means motion to the right or motion downwards, respectively. A negative value means motion to the left or motion upwards, respectively. Prediction Error Coding - Video motions are often more complex, and a simple “shifting in 2D” is not a perfectly suitable description of the motion in the actual scene, causing so called prediction errors. The MPEG stream contains a matrix for compensating this error. After prediction the, the predicted and the original frame are compared, and their differences are coded. Obviously less data is needed to store only the differences (yellow and black regions in Figure below).
  • 12. 12 Note that the prediction error compensation requires less bytes than the whole frame because the white parts are zero and can be discarded from MPEG stream. Furthermore the DCT compression is applied to the prediction error which decreases its memory size. Vector Coding - After determining the motion vectors and evaluating the correction, these can be compressed. Large parts of MPEG videos consist of B- and P-frames as seen before, and most of them have mainly stored motion vectors. Therefore an efficient compression of motion vector data, which has usually high correlation, is desired. Block Coding- Every macro blockcontains 4 luminance blocks and 2 chrominance blocks. Every block has a dimension of 8x8 values. The luminance blocks contain information of the brightness of every pixel in macro block. The chrominance blocks contain color information. Becauseof some propertiesof the human eye it isn't necessary to give color information for every pixel. Instead 4 pixels are related to one color value. This color valueis divided into two parts. The first is in Cb color block the second is in Cr color block. Dependingon the kind of macro block the blocks contain pixel information or predictionerror information asmentioned above. In any case the information is compressed usingthe discrete cosine transform (DCT).
  • 13. 13 Step 3:Discrete Cosine Transform(DCT) DCT allows, similar to the Fast Fourier Transform (FFT), a representation of image data in terms of frequency components. So the frame-blocks (8x8 or 16x16 pixels) can be represented as frequency components. Step 4:Quantization  Divide each frame into small rectangular blocks (’vectors’)  Code Book – collection ofconstantvectors representing typical patterns (edges,textures, flat color,
)  Compress byreplacing each vector in image by index of vector from code bookthat most closelyresembles it Step 5:Entropy Coding The entropy coding takes two steps: Run Length Encoding (RLE ) and Huffman coding. These are well known lossless compression methods, which can compress data, depending on its redundancy. References - Data CompressionThe Complete Reference (4th ) - DjordjeMitrovic–VideoCompression– University of Edinburgh