VVC intra prediction (a)

1, the intra prediction mode

To accommodate more predicted direction, a VVC intra prediction mode increases as the angle 65, together with the planar mode and a DC mode, an intra prediction mode of a VVC 67. The red line at VVC ratio is increased HEVC prediction direction.

 

In HEVC, each of the intra prediction block is a square and the side length is a power of 2, without using division when the DC intra-prediction mode. In the VVC, since intra prediction block may be rectangular, in order to avoid the need for division calculation only mean longer side of the DC intra prediction mode as the prediction value.

2, the intra prediction mode encoding

If the direct mode prediction block is encoded, then for 67 kinds of modes to encode 7bit needed, the amount of data. VVC taken and HEVC the same way, to construct the most probable mode list (most probable mode, MPM), in the VVC MPM List Six of the 32 prediction mode, if the block prediction modes MPM only need to code its index number ( only 3bit), if the prediction mode of the block but not in the MPM 61 non-MPM mode, using the truncated binary codes (truncated Binary code, TBC) in its coding mode, the entropy encoding stage.

MPM was constructed as follows:

  • When the mode of the left block and the upper block coding can not be a reference, which is set to the intra mode Planar default mode.

  • When the mode of the left block and the upper block coding the angle mode is not:

    • MPM list = {Planar,DC,V,H,V-4,V+4}

  • When the coding block and a left upper block is the angle mode, another non-angle mode:

    • Max = (left and top edges of the larger mode)

    • MPM list = {Planar,Max,DC,Max-1,Max+1,Max-2}

  • When the mode of the coding block and the upper block are left angle mode, and the angle is not the same:

    • Max = (left and top edges of the larger mode)

    • If the difference in the left and upper patterns 2-62, MPM list = {Planar, Left, Above, DC, Max-1, Max + 1}

    • 否则,MPM list = {Planar,Left,Above,DC,Max-2,Max+2}

  • When the upper block and the left block coding mode is the mode angle, and the angle of the same:

    • MPM list = {Planar,Left,Left-1,Left+1,DC,Left-2}

MPM in the construction process, if there is a repeating pattern of the MPM is removed.

3, the intra prediction wide-angle rectangular block (Wide-angle intra prediction, WAIP)

In HEVC, since intra prediction block is a square so that the probability of each prediction mode using the angles are equal. In the VVC, intra prediction block may be a rectangular block, the horizontal block type (wider than high) the upper reference pixel using the probability is greater than the probability of use left reference pixel, the class block for the vertical (height greater than width) of the top left reference pixel using the probability is less than the probability of using reference pixels. Therefore VVC proposed WAIP, replacing the original direction when the non-square block of intra prediction with a wide angle of angular direction.

 

As shown above, wherein the mode 2 to 66 showing a conventional intra prediction mode, Mode-1 and Mode 67 -14 to 80 represents WAIP prediction mode.

However, when the prediction mode or the transmission transmit the original prediction mode, the mode is the decoding side will be mapped to a wide angle mode, so the total number of intra prediction modes and coding scheme do not change.

To replace the prediction mode and the aspect ratio of the wide-angle block is related to the following table.

Aspect ratio Replaced intra prediction modes
W / H == 16 Modes 12, 13,14,15
W / H == 8 Modes 12, 13
W / H == 4 Modes 2,3,4,5,6,7,8,9,10,11
W / H == 2 Modes 2,3,4,5,6,7,
W / H == 1 None
W / H == 1/2 Modes 61,62,63,64,65,66
W / H == 1/4 Mode 57,58,59,60,61,62,63,64,65,66
W / H == 1/8 Modes 55, 56
W / H == 1/16 Modes 53, 54, 55, 56

For example, when the aspect ratio is 2 (class block level), 2,3,4,5,6,7 mode to replace a wide angle mode.

In particular VTM5 conventional mapping between patterns and the wide angle mode to achieve the following:

  int IntraPrediction::getWideAngle( int width, int height, int predMode )
  {
    if ( predMode > DC_IDX && predMode <= VDIA_IDX )
    {
      int modeShift[] = { 0, 6, 10, 12, 14, 15 };
      int deltaSize = abs(g_aucLog2[width] - g_aucLog2[height]);
      if (width > height && predMode < 2 + modeShift[deltaSize])
      {
        predMode += (VDIA_IDX - 1);
      }
      else if (height > width && predMode > VDIA_IDX - modeShift[deltaSize])
      {
        predMode -= (VDIA_IDX - 1);
      }
    }
    return predMode;
  }

 

如上图所示,在对矩形块进行WAIP预测时,垂直相邻的两个像素可能使用不相邻的参考像素,为了减少参考像素间距过大的影响,需要对参考像素进行低通滤波和平滑处理。当预测模式是[-14, -12, -10, -6, 72, 76, 78, 80]时,参考像素可以不经处理直接使用。

4、Mode Dependent Intra Smoothing (MDIS)

在VVC中使用6bit 4抽头高斯插值滤波器对角度模式的参考像素进行滤波,对非角度模式(planar模式和DC模式)不进行滤波。对模式2, HOR_IDX, DIA_IDX, VER_IDX, 66也不进行处理。其处理过程如下:

  1. 将帧内预测模式分类如下:

    • A:垂直或水平模式(HOR_IDX,VER_IDX)

    • B:对角线模式(2, DIA_IDX, VDIA_IDX)

    • C:其他

  2. 如果角度模式属于A,不进行滤波处理,直接将参考像素作为预测像素。

  3. 如果角度模式属于B,使用[1, 2, 1]滤波器对参考像素进行滤波,直接将滤波后的值作为预测像素不进行插值处理。

  4. 如果角度模式属于C,对落到非整数位置的参考像素进行插值处理(不再进行滤波)。

下面是VTM5内滤波相关的代码:

 //left column (bottom to top)
  for( int i = 1; i < predHSize; i++, piDestPtr -= predStride, piSrcPtr -= predStride)
  {
    *piDestPtr = (piSrcPtr[predStride] + 2 * piSrcPtr[0] + piSrcPtr[-predStride] + 2) >> 2;
  }
    //top row (left-to-right)
  for( uint32_t i=1; i < predSize; i++, piDestPtr++, piSrcPtr++ )
  {
    *piDestPtr = (piSrcPtr[1] + 2 * piSrcPtr[0] + piSrcPtr[-1] + 2) >> 2;
  }

感兴趣的可以关注微信公众号Video Coding

 

发布了87 篇原创文章 · 获赞 108 · 访问量 25万+

Guess you like

Origin blog.csdn.net/Dillon2015/article/details/103395945