8Entropy Coding
8.1 Introduction
A video encoder produces many different symbols or syntax elements, containing information such as transform coefficients, prediction choices, block sizes and many other parameters. Some of the syntax elements occur many thousands of times in even a short video clip, while others occur occasionally or just once per video. Certain syntax elements such as transform coefficients can have a range of values, while others are binary. The actual value of a syntax element may be statistically related to other syntax element values and other information. We can take all of these factors into account when we are trying to find an efficient encoding for all the syntax elements in a coded video clip.
In this chapter, we will look at:
- Where entropy coding sits in a video codec and what it achieves.
- Pre‐processing symbols before entropy coding.
- The main types of entropy coding used in video codecs.
- Arithmetic coding in detail.
- Probabilities, context models and adaptation.
- How entropy coding works in H.265/high‐efficiency video coding (HEVC) and H.266/versatile video coding (VVC).
An entropy encoder converts a sequence of symbols or syntax elements, S1, S2, S3, etc., into a bitstream, and an entropy decoder converts the bitstream back into a sequence of symbols (see Figure 8.1). The entropy encoder and decoder can make use of certain information during encoding and decoding, such as:
- The expectation or probability that the current symbol S has value V
Get Coding Video now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.