SlideShare uma empresa Scribd logo
1 de 7
Video compression design, analysis, consulting and research




White Paper:
An Overview of H.264 Advanced Video Coding




Iain Richardson

2007
Vcodex White Paper: An overview of H.264
http://www.vcodex.com - H.264 and video coding expertise and consulting.


                              1   What is H.264 ?

H.264 is an industry standard for video compression, the process of converting digital
video into a format that takes up less capacity when it is stored or transmitted. Video
compression (or video coding) is an essential technology for applications such as digital
television, DVD-Video, mobile TV, videoconferencing and internet video streaming.
Standardising video compression makes it possible for products from different
manufacturers (e.g. encoders, decoders and storage media) to inter-operate. An
encoder converts video into a compressed format and a decoder converts
compressed video back into an uncompressed format.

Recommendation H.264: Advanced Video Coding is a document published by the
international standards bodies ITU-T (International Telecommunication Union) and
ISO/IEC (International Organisation for Standardisation / International Electrotechnical
Commission). It defines a format (syntax) for compressed video and a method for
decoding this syntax to produce a displayable video sequence. The standard document
does not actually specify how to encode (compress) digital video – this is left to the
manufacturer of a video encoder – but in practice the encoder is likely to mirror the
steps of the decoding process. Figure 1 shows the encoding and decoding processes
and highlights the parts that are covered by the H.264 standard.

The H.264/AVC standard was first published in 2003. It builds on the concepts of
earlier standards such as MPEG-2 and MPEG-4 Visual and offers the potential for better
compression efficiency (i.e. better-quality compressed video) and greater flexibility in
compressing, transmitting and storing video.




                Figure 1 The H.264 video coding and decoding process




© Iain Richardson/Vcodex Ltd 2007                                              Page 2 of 7
Vcodex White Paper: An overview of H.264
http://www.vcodex.com - H.264 and video coding expertise and consulting.

2     How does an H.264 codec work ?

An H.264 video encoder carries out prediction, transform and encoding processes (see
Figure 1) to produce a compressed H.264 bitstream. An H.264 video decoder carries
out the complementary processes of decoding, inverse transform and reconstruction to
produce a decoded video sequence.


2.1    Encoder processes

Prediction

The encoder processes a frame of video in units of a Macroblock (16x16 displayed
pixels). It forms a prediction of the macroblock based on previously-coded data,
either from the current frame (intra prediction) or from other frames that have
already been coded and transmitted (inter prediction). The encoder subtracts the
prediction from the current macroblock to form a residual 1.

The prediction methods supported by H.264 are
more flexible than those in previous standards,
enabling accurate predictions and hence efficient
video compression. Intra prediction uses 16x16 and
4x4 block sizes to predict the macroblock from
surrounding, previously-coded pixels within the same
frame (Figure 2).

Inter prediction uses a range of block sizes (from
16x16 down to 4x4) to predict pixels in the current
frame from similar regions in previously-coded                   Figure 2 Intra prediction
frames (Figure 3 ).




                                  Figure 3 Inter prediction


Transform and quantization


1
  Finding a suitable inter prediction is often described as motion estimation. Subtracting an
inter prediction from the current macroblock is motion compensation.


© Iain Richardson/Vcodex Ltd 2007                                                   Page 3 of 7
Vcodex White Paper: An overview of H.264
http://www.vcodex.com - H.264 and video coding expertise and consulting.


A block of residual samples is transformed using a 4x4 or 8x8 integer transform, an
approximate form of the Discrete Cosine Transform (DCT). The transform outputs a
set of coefficients, each of which is a weighting value for a standard basis pattern.
When combined, the weighted basis patterns re-create the block of residual samples.
Figure 4 shows how the inverse DCT creates an image block by weighting each basis
pattern according to a coefficient value and combining the weighted basis patterns.

The output of the transform, a block of transform coefficients, is quantized, i.e. each
coefficient is divided by an integer value. Quantization reduces the precision of the
transform coefficients according to a quantization parameter (QP). Typically, the result
is a block in which most or all of the coefficients are zero, with a few non-zero
coefficients. Setting QP to a high value means that more coefficients are set to zero,
resulting in high compression at the expense of poor decoded image quality. Setting
QP to a low value means that more non-zero coefficients remain after quantization,
resulting in better decoded image quality but lower compression.




  Figure 4 Inverse transform: combining weighted basis patterns to create a 4x4 image block




Bitstream encoding

The video coding process produces a number of values that must be encoded to form
the compressed bitstream. These values include:
    • quantized transform coefficients
    • information to enable the decoder to re-create the prediction
    • information about the structure of the compressed data and the compression
       tools used during encoding



© Iain Richardson/Vcodex Ltd 2007                                                 Page 4 of 7
Vcodex White Paper: An overview of H.264
http://www.vcodex.com - H.264 and video coding expertise and consulting.

      •    information about the complete video sequence.

These values and parameters (syntax elements) are converted into binary codes
using variable length coding and/or arithmetic coding. Each of these encoding
methods produces an efficient, compact binary representation of the information. The
encoded bitstream can then be stored and/or transmitted.


2.2       Decoder processes

Bitstream decoding

A video decoder receives the compressed H.264 bitstream, decodes each of the syntax
elements and extracts the information described above (quantized transform
coefficients, prediction information, etc). This information is then used to reverse the
coding process and recreate a sequence of video images.

Rescaling and inverse transform

The quantized transform coefficients are re-scaled. Each coefficient is multiplied by
an integer value to restore its original scale2. An inverse transform combines the
standard basis patterns, weighted by the re-scaled coefficients, to re-create each block
of residual data. These blocks are combined together to form a residual macroblock.

Reconstruction

For each macroblock, the decoder forms an identical prediction to the one created by
the encoder. The decoder adds the prediction to the decoded residual to reconstruct
a decoded macroblock which can then be displayed as part of a video frame.


3     H.264 in practice

3.1       Performance
Perhaps the biggest advantage of H.264 over previous standards is its compression
performance. Compared with standards such as MPEG-2 and MPEG-4 Visual, H.264 can
deliver:
    • Better image quality at the same compressed bitrate, or
    • A lower compressed bitrate for the same image quality.

For example, a single-layer DVD can store a movie of around 2 hours’ length in MPEG-
2 format. Using H.264, it should be possible to store 4 hours or more of movie-quality
video on the same disk (i.e. lower bitrate for the same quality). Alternatively, the
H.264 compression format can deliver better quality at the same bitrate compared with
MPEG-2 and MPEG-4 Visual (Figure 5 ).




2
  This is often described as inverse quantization but it is important to note that quantization
is not a fully-reversible process. Information removed during quantization cannot be restored
during re-scaling.


© Iain Richardson/Vcodex Ltd 2007                                                    Page 5 of 7
Vcodex White Paper: An overview of H.264
http://www.vcodex.com - H.264 and video coding expertise and consulting.

The improved compression performance of H.264 comes at the price of greater
computational cost. H.264 is more sophisticated than earlier compression methods and
this means that it can take significantly more processing power to compress and
decompress H.264 video.




      Figure 5 A video frame compressed at the same bitrate using MPEG-2 (left), MPEG-4 Visual
                               (centre) and H.264 compression (right)




3.2     Applications
As well as its improved compression performance, H.264 offers greater flexibility in
terms of compression options and transmission support. An H.264 encoder can select
from a wide variety of compression tools, making it suitable for applications ranging
from low-bitrate, low-delay mobile transmission through high definition consumer TV
to professional television production. The standard provides integrated support for
transmission or storage, including a packetised compressed format and features that
help to minimise the effect of transmission errors.

H.264/AVC is being adopted for an increasing range of applications, including:
    • High Definition DVDs (HD-DVD and Blu-Ray formats)
    • High Definition TV broadcasting in Europe
    • Apple products including iTunes video downloads, iPod video and MacOS
    • NATO and US DoD video applications
    • Mobile TV broadcasting
    • Internet video
    • Videoconferencing




© Iain Richardson/Vcodex Ltd 2007                                                   Page 6 of 7
Vcodex White Paper: An overview of H.264
http://www.vcodex.com - H.264 and video coding expertise and consulting.

Further reading

See http://www.vcodex.com/links.html for links to further resources on H.264 and
video compression.


About the author

As a researcher, consultant and author working in the field of video compression
(video coding), my books on video codec design and the MPEG-4 and H.264 standards
are widely read by engineers, academics and managers. I advise companies on video
coding standards, design and intellectual property and lead the Centre for Video
Communications Research at The Robert Gordon University in Aberdeen, UK.


Iain Richardson
iain@vcodex.com
Telephone 020 7193 6500 (UK)




© Iain Richardson/Vcodex Ltd 2007                                          Page 7 of 7

Mais conteúdo relacionado

Destaque

High Efficiency Video Coding
High Efficiency Video CodingHigh Efficiency Video Coding
High Efficiency Video CodingNayan Seth
 
Imagine camp, Developing Image Processing app for windows phone platform
Imagine camp, Developing Image Processing app for windows phone platformImagine camp, Developing Image Processing app for windows phone platform
Imagine camp, Developing Image Processing app for windows phone platformRahat Yasir
 
Error Resiliency and Concealment in H.264 MPEG-4 Part 10
Error Resiliency and Concealment in H.264 MPEG-4 Part 10Error Resiliency and Concealment in H.264 MPEG-4 Part 10
Error Resiliency and Concealment in H.264 MPEG-4 Part 10coldfire7
 
Cac chuan nen ITU
Cac chuan nen ITUCac chuan nen ITU
Cac chuan nen ITUTrung Vi
 
Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data CompressionPratik Pradhan
 
Images compression using huffman algorithm matlab
Images compression using huffman algorithm matlabImages compression using huffman algorithm matlab
Images compression using huffman algorithm matlabTan Hoang Luu
 
Streaming Media Server Setup Manual
Streaming Media Server Setup ManualStreaming Media Server Setup Manual
Streaming Media Server Setup ManualWilliam Lee
 
Basics of Mpeg 4 3D Graphics Compression
Basics of Mpeg 4 3D Graphics CompressionBasics of Mpeg 4 3D Graphics Compression
Basics of Mpeg 4 3D Graphics CompressionMarius Preda PhD
 
H264 video compression explained
H264 video compression explainedH264 video compression explained
H264 video compression explainedcnssources
 
HEVC / H265 Hands-On course
HEVC / H265 Hands-On courseHEVC / H265 Hands-On course
HEVC / H265 Hands-On courseYoss Cohen
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standardanuragjagetiya
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniquesDeep Bhatt
 

Destaque (20)

High Efficiency Video Coding
High Efficiency Video CodingHigh Efficiency Video Coding
High Efficiency Video Coding
 
Imagine camp, Developing Image Processing app for windows phone platform
Imagine camp, Developing Image Processing app for windows phone platformImagine camp, Developing Image Processing app for windows phone platform
Imagine camp, Developing Image Processing app for windows phone platform
 
mpeg4
mpeg4mpeg4
mpeg4
 
Error Resiliency and Concealment in H.264 MPEG-4 Part 10
Error Resiliency and Concealment in H.264 MPEG-4 Part 10Error Resiliency and Concealment in H.264 MPEG-4 Part 10
Error Resiliency and Concealment in H.264 MPEG-4 Part 10
 
MMC MPEG4
MMC MPEG4MMC MPEG4
MMC MPEG4
 
Cac chuan nen ITU
Cac chuan nen ITUCac chuan nen ITU
Cac chuan nen ITU
 
MPEG 4 VIDEO
MPEG 4 VIDEOMPEG 4 VIDEO
MPEG 4 VIDEO
 
Chapter 5 - Data Compression
Chapter 5 - Data CompressionChapter 5 - Data Compression
Chapter 5 - Data Compression
 
Images compression using huffman algorithm matlab
Images compression using huffman algorithm matlabImages compression using huffman algorithm matlab
Images compression using huffman algorithm matlab
 
Mga produktong gawa sa kahoy at tabla
Mga produktong gawa sa kahoy at tablaMga produktong gawa sa kahoy at tabla
Mga produktong gawa sa kahoy at tabla
 
Analog Video
Analog Video Analog Video
Analog Video
 
Streaming Media Server Setup Manual
Streaming Media Server Setup ManualStreaming Media Server Setup Manual
Streaming Media Server Setup Manual
 
Basics of Mpeg 4 3D Graphics Compression
Basics of Mpeg 4 3D Graphics CompressionBasics of Mpeg 4 3D Graphics Compression
Basics of Mpeg 4 3D Graphics Compression
 
H264 video compression explained
H264 video compression explainedH264 video compression explained
H264 video compression explained
 
RTP
RTPRTP
RTP
 
MPEG 4
MPEG 4MPEG 4
MPEG 4
 
HEVC / H265 Hands-On course
HEVC / H265 Hands-On courseHEVC / H265 Hands-On course
HEVC / H265 Hands-On course
 
MPEG video compression standard
MPEG video compression standardMPEG video compression standard
MPEG video compression standard
 
Chương iii
Chương iiiChương iii
Chương iii
 
Data compression techniques
Data compression techniquesData compression techniques
Data compression techniques
 

Mais de Iain Richardson

Compressed Video Quality
Compressed Video QualityCompressed Video Quality
Compressed Video QualityIain Richardson
 
A short history of video coding
A short history of video codingA short history of video coding
A short history of video codingIain Richardson
 
Iain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video CompressionIain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video CompressionIain Richardson
 
The H.264 Integer Transform
The H.264 Integer TransformThe H.264 Integer Transform
The H.264 Integer TransformIain Richardson
 
Configurable Video Coding
Configurable Video CodingConfigurable Video Coding
Configurable Video CodingIain Richardson
 
Getting the most out of H.264
Getting the most out of H.264Getting the most out of H.264
Getting the most out of H.264Iain Richardson
 
Book Launch: The H.264 Advanced Video Compression Standard
Book Launch: The H.264 Advanced Video Compression StandardBook Launch: The H.264 Advanced Video Compression Standard
Book Launch: The H.264 Advanced Video Compression StandardIain Richardson
 

Mais de Iain Richardson (7)

Compressed Video Quality
Compressed Video QualityCompressed Video Quality
Compressed Video Quality
 
A short history of video coding
A short history of video codingA short history of video coding
A short history of video coding
 
Iain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video CompressionIain Richardson: An Introduction to Video Compression
Iain Richardson: An Introduction to Video Compression
 
The H.264 Integer Transform
The H.264 Integer TransformThe H.264 Integer Transform
The H.264 Integer Transform
 
Configurable Video Coding
Configurable Video CodingConfigurable Video Coding
Configurable Video Coding
 
Getting the most out of H.264
Getting the most out of H.264Getting the most out of H.264
Getting the most out of H.264
 
Book Launch: The H.264 Advanced Video Compression Standard
Book Launch: The H.264 Advanced Video Compression StandardBook Launch: The H.264 Advanced Video Compression Standard
Book Launch: The H.264 Advanced Video Compression Standard
 

Último

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
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.pdfEnterprise Knowledge
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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...Igalia
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
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 2024Results
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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 RobisonAnna Loughnan Colquhoun
 
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 2024The Digital Insurer
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 

Último (20)

Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
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
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
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
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 

H.264 video compression: an overview

  • 1. Video compression design, analysis, consulting and research White Paper: An Overview of H.264 Advanced Video Coding Iain Richardson 2007
  • 2. Vcodex White Paper: An overview of H.264 http://www.vcodex.com - H.264 and video coding expertise and consulting. 1 What is H.264 ? H.264 is an industry standard for video compression, the process of converting digital video into a format that takes up less capacity when it is stored or transmitted. Video compression (or video coding) is an essential technology for applications such as digital television, DVD-Video, mobile TV, videoconferencing and internet video streaming. Standardising video compression makes it possible for products from different manufacturers (e.g. encoders, decoders and storage media) to inter-operate. An encoder converts video into a compressed format and a decoder converts compressed video back into an uncompressed format. Recommendation H.264: Advanced Video Coding is a document published by the international standards bodies ITU-T (International Telecommunication Union) and ISO/IEC (International Organisation for Standardisation / International Electrotechnical Commission). It defines a format (syntax) for compressed video and a method for decoding this syntax to produce a displayable video sequence. The standard document does not actually specify how to encode (compress) digital video – this is left to the manufacturer of a video encoder – but in practice the encoder is likely to mirror the steps of the decoding process. Figure 1 shows the encoding and decoding processes and highlights the parts that are covered by the H.264 standard. The H.264/AVC standard was first published in 2003. It builds on the concepts of earlier standards such as MPEG-2 and MPEG-4 Visual and offers the potential for better compression efficiency (i.e. better-quality compressed video) and greater flexibility in compressing, transmitting and storing video. Figure 1 The H.264 video coding and decoding process © Iain Richardson/Vcodex Ltd 2007 Page 2 of 7
  • 3. Vcodex White Paper: An overview of H.264 http://www.vcodex.com - H.264 and video coding expertise and consulting. 2 How does an H.264 codec work ? An H.264 video encoder carries out prediction, transform and encoding processes (see Figure 1) to produce a compressed H.264 bitstream. An H.264 video decoder carries out the complementary processes of decoding, inverse transform and reconstruction to produce a decoded video sequence. 2.1 Encoder processes Prediction The encoder processes a frame of video in units of a Macroblock (16x16 displayed pixels). It forms a prediction of the macroblock based on previously-coded data, either from the current frame (intra prediction) or from other frames that have already been coded and transmitted (inter prediction). The encoder subtracts the prediction from the current macroblock to form a residual 1. The prediction methods supported by H.264 are more flexible than those in previous standards, enabling accurate predictions and hence efficient video compression. Intra prediction uses 16x16 and 4x4 block sizes to predict the macroblock from surrounding, previously-coded pixels within the same frame (Figure 2). Inter prediction uses a range of block sizes (from 16x16 down to 4x4) to predict pixels in the current frame from similar regions in previously-coded Figure 2 Intra prediction frames (Figure 3 ). Figure 3 Inter prediction Transform and quantization 1 Finding a suitable inter prediction is often described as motion estimation. Subtracting an inter prediction from the current macroblock is motion compensation. © Iain Richardson/Vcodex Ltd 2007 Page 3 of 7
  • 4. Vcodex White Paper: An overview of H.264 http://www.vcodex.com - H.264 and video coding expertise and consulting. A block of residual samples is transformed using a 4x4 or 8x8 integer transform, an approximate form of the Discrete Cosine Transform (DCT). The transform outputs a set of coefficients, each of which is a weighting value for a standard basis pattern. When combined, the weighted basis patterns re-create the block of residual samples. Figure 4 shows how the inverse DCT creates an image block by weighting each basis pattern according to a coefficient value and combining the weighted basis patterns. The output of the transform, a block of transform coefficients, is quantized, i.e. each coefficient is divided by an integer value. Quantization reduces the precision of the transform coefficients according to a quantization parameter (QP). Typically, the result is a block in which most or all of the coefficients are zero, with a few non-zero coefficients. Setting QP to a high value means that more coefficients are set to zero, resulting in high compression at the expense of poor decoded image quality. Setting QP to a low value means that more non-zero coefficients remain after quantization, resulting in better decoded image quality but lower compression. Figure 4 Inverse transform: combining weighted basis patterns to create a 4x4 image block Bitstream encoding The video coding process produces a number of values that must be encoded to form the compressed bitstream. These values include: • quantized transform coefficients • information to enable the decoder to re-create the prediction • information about the structure of the compressed data and the compression tools used during encoding © Iain Richardson/Vcodex Ltd 2007 Page 4 of 7
  • 5. Vcodex White Paper: An overview of H.264 http://www.vcodex.com - H.264 and video coding expertise and consulting. • information about the complete video sequence. These values and parameters (syntax elements) are converted into binary codes using variable length coding and/or arithmetic coding. Each of these encoding methods produces an efficient, compact binary representation of the information. The encoded bitstream can then be stored and/or transmitted. 2.2 Decoder processes Bitstream decoding A video decoder receives the compressed H.264 bitstream, decodes each of the syntax elements and extracts the information described above (quantized transform coefficients, prediction information, etc). This information is then used to reverse the coding process and recreate a sequence of video images. Rescaling and inverse transform The quantized transform coefficients are re-scaled. Each coefficient is multiplied by an integer value to restore its original scale2. An inverse transform combines the standard basis patterns, weighted by the re-scaled coefficients, to re-create each block of residual data. These blocks are combined together to form a residual macroblock. Reconstruction For each macroblock, the decoder forms an identical prediction to the one created by the encoder. The decoder adds the prediction to the decoded residual to reconstruct a decoded macroblock which can then be displayed as part of a video frame. 3 H.264 in practice 3.1 Performance Perhaps the biggest advantage of H.264 over previous standards is its compression performance. Compared with standards such as MPEG-2 and MPEG-4 Visual, H.264 can deliver: • Better image quality at the same compressed bitrate, or • A lower compressed bitrate for the same image quality. For example, a single-layer DVD can store a movie of around 2 hours’ length in MPEG- 2 format. Using H.264, it should be possible to store 4 hours or more of movie-quality video on the same disk (i.e. lower bitrate for the same quality). Alternatively, the H.264 compression format can deliver better quality at the same bitrate compared with MPEG-2 and MPEG-4 Visual (Figure 5 ). 2 This is often described as inverse quantization but it is important to note that quantization is not a fully-reversible process. Information removed during quantization cannot be restored during re-scaling. © Iain Richardson/Vcodex Ltd 2007 Page 5 of 7
  • 6. Vcodex White Paper: An overview of H.264 http://www.vcodex.com - H.264 and video coding expertise and consulting. The improved compression performance of H.264 comes at the price of greater computational cost. H.264 is more sophisticated than earlier compression methods and this means that it can take significantly more processing power to compress and decompress H.264 video. Figure 5 A video frame compressed at the same bitrate using MPEG-2 (left), MPEG-4 Visual (centre) and H.264 compression (right) 3.2 Applications As well as its improved compression performance, H.264 offers greater flexibility in terms of compression options and transmission support. An H.264 encoder can select from a wide variety of compression tools, making it suitable for applications ranging from low-bitrate, low-delay mobile transmission through high definition consumer TV to professional television production. The standard provides integrated support for transmission or storage, including a packetised compressed format and features that help to minimise the effect of transmission errors. H.264/AVC is being adopted for an increasing range of applications, including: • High Definition DVDs (HD-DVD and Blu-Ray formats) • High Definition TV broadcasting in Europe • Apple products including iTunes video downloads, iPod video and MacOS • NATO and US DoD video applications • Mobile TV broadcasting • Internet video • Videoconferencing © Iain Richardson/Vcodex Ltd 2007 Page 6 of 7
  • 7. Vcodex White Paper: An overview of H.264 http://www.vcodex.com - H.264 and video coding expertise and consulting. Further reading See http://www.vcodex.com/links.html for links to further resources on H.264 and video compression. About the author As a researcher, consultant and author working in the field of video compression (video coding), my books on video codec design and the MPEG-4 and H.264 standards are widely read by engineers, academics and managers. I advise companies on video coding standards, design and intellectual property and lead the Centre for Video Communications Research at The Robert Gordon University in Aberdeen, UK. Iain Richardson iain@vcodex.com Telephone 020 7193 6500 (UK) © Iain Richardson/Vcodex Ltd 2007 Page 7 of 7