5Intra Prediction
5.1 Introduction
Intra prediction is the process of creating a prediction block based on pixels in the same frame as the current block. Consider the block of pixels highlighted in Figure 5.1. We want to use pixels outside the block to create a prediction for the pixels inside the block. In this example, we can use some or all of the pixels marked X, above and to the left, to create a prediction of the current block. We might not be able to use the pixels marked Y, below and to the right. Typically, video encoders and decoders process blocks in a raster order, from left to right and top to bottom, as shown in Figure 5.2. This means that the pixels marked Y in Figure 5.1 might not be available when we are processing the current block, but some or all of the pixels marked X may be available.
Intra prediction involves predicting a current block from nearby, previously coded pixels in other blocks, such as pixels above and/or to the left of the current block. Some or all of these pixels may be available in previously coded blocks. Figure 5.3 shows three examples of intra prediction types, which are as follows:
- Flat or DC: All samples have the same prediction value, for example, the average value of adjacent pixels. The prediction block is a flat region with all samples the same.
- Planar: Samples are predicted by fitting a plane function to adjacent pixels. The prediction block is a gradient, with a smooth progression in value depending on the plane function.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access