在AV1中,一个块的预测模式可以分为帧内预测(Intra Prediction)和帧间预测(Inter Prediction),与其他的编解码器一样,帧内预测只能在当前帧内部寻找参考,而帧间预测是在时域上的参考帧上寻找参考。
AV1 帧内预测
首先,不同于其他编码标准的一点,AV1的帧内预测并不是依据Super block子划分获得的block来进行的,而是根据依据变换块的大小来进行的(transform block),之所以这么做,是因为认为当一个块(Block)中若被划分为多块进行transform,对这些块分别进行预测要比对其整体进行预测要来的精准。
When the transform size is smaller than the block size, the prediction is invoked multiple times in raster order with the block, thus allowing the prediction of a transform block to use the previous predicted and reconstructed transform block as a better reference.
AV1的帧内预测,相比起其前身VP9,或者是ITU系的编解码标准(H.264&HEVC等),预测模式要丰富很多,主要包含以下六种;
- Recursive Intra Prediction
- Directional Intra Prediction(36° - 212°)
- Smooth Intra Prediction
- DC Intra Prediction
- Paeth Intra Prediction
- Chroma from Luma (CfL)
然后另外还包含两种SCC的预测模式
- Palette Prediction
- Intra Block Copy
下图描述了在参考软件Libaom AV1中的intra prediction在解码端的简易流程图
当一个块采用帧内预测的时候,那么语法元素intra_frame_y_mode 就表示 y 分量的预测模式,其包含以下的取值
intra_frame_y_mode | 模式名称 |
---|---|
0 | DC_PRED |
1 | V_PRED |
2 | H_PRED |
3 | D45_PRED |
4 | D135_PRED |
5 | D113_PRED |
6 | D157_PRED |
7 | D203_PRED |
8 | D67_PRED |
9 | SMOOTH_PRED |
10 | SMOOTH_V_PRED |
11 | SMOOTH_H_PRED |
12 | PAETH_PRED |
色度成分的预测模式由语法元素 uv_mode 来表示,相比起 y 分量,色度分量多了第13号预测模式 | |
uv_mode | 模式名称 |
– | – |
0 | DC_PRED |
1 | V_PRED |
2 | H_PRED |
3 | D45_PRED |
4 | D135_PRED |
5 | D113_PRED |
6 | D157_PRED |
7 | D203_PRED |
8 | D67_PRED |
9 | SMOOTH_PRED |
10 | SMOOTH_V_PRED |
11 | SMOOTH_H_PRED |
12 | PAETH_PRED |
13 | UV_CFL_PRED |