VVC 算法描述 R2002(VTM 9) IBC部分 机器翻译

基于JVET-R2002 Algorithm description for Versatile Video Coding and Test Model 9 (VTM 9)

JVET-S2002 VTM 10 这部分内容完全相同,没有修改。

3.9 Screen content coding tools

3.9.1 Intra block copy (IBC)

Intra block copy (IBC) is a tool adopted in HEVC extensions on SCC. It is well known that it significantly improves the coding efficiency of screen content materials. Since IBC mode is implemented as a block level coding mode, block matching (BM) is performed at the encoder to find the optimal block vector (or motion vector) for each CU. Here, a block vector is used to indicate the displacement from the current block to a reference block, which is already reconstructed inside the current picture. The luma block vector of an IBC-coded CU is in integer precision. The chroma block vector rounds to integer precision as well. When combined with AMVR, the IBC mode can switch between 1-pel and 4-pel motion vector precisions. An IBC-coded CU is treated as the third prediction mode other than intra or inter prediction modes. The IBC mode is applicable to the CUs with both width and height smaller than or equal to 64 luma samples.
块内复制(IBC)是在HEVC SCC扩展中采用的工具。众所周知,它显著提高了屏幕内容材料的编码效率。由于IBC模式被实现为块级编码模式,所以在编码器处执行块匹配,以找到每个CU的最佳块向量bv(或运动向量)。这里,块向量用于指示从当前块到参考块的位移,参考块已经在当前画面内重建。IBC编码的CU的亮度块向量是整数精度的。色度块向量也舍入到整数精度。当与AMVR结合时,IBC模式可以在1像素和4像素运动矢量精度之间切换。IBC编码的CU被视为除帧内或帧间预测模式之外的第三种预测模式。IBC模式适用于宽度和高度均小于或等于64个亮度样本的CUs。

At the encoder side, hash-based motion estimation is performed for IBC. The encoder performs RD check for blocks with either width or height no larger than 16 luma samples. For non-merge mode, the block vector search is performed using hash-based search first. If hash search does not return valid candidate, block matching based local search will be performed.
在编码器侧,对IBC执行基于散列的运动估计。编码器对宽度或高度不大于16个亮度采样的块执行RD check。对于非合并non-merge模式,首先使用基于哈希的搜索来执行块向量搜索。如果哈希搜索没有返回有效的候选项,将执行基于块匹配的本地搜索。

In the hash-based search, hash key matching (32-bit CRC) between the current block and a reference block is extended to all allowed block sizes. The hash key calculation for every position in the current picture is based on 4x4 subblocks. For the current block of a larger size, a hash key is determined to match that of the reference block when all the hash keys of all 4× 4 subblocks match the hash keys in the corresponding reference locations. If hash keys of multiple reference blocks are found to match that of the current block, the block vector costs of each matched reference are calculated and the one with the minimum cost is selected.
在基于散列的搜索中,当前块和参考块之间的散列关键字hash key匹配(32位循环冗余校验)被扩展到所有允许的块大小。当前图片中每个位置的哈希键计算基于4x4子块。**对于较大尺寸的当前块,散列关键字被确定为匹配参考块的散列关键字,当所有4× 4子块的所有散列关键字hash key匹配相应参考位置中的散列关键字hash key时。**如果发现多个参考块的散列关键字与当前块的散列关键字匹配,则计算每个匹配参考的块向量成本,并选择成本最小的那个。

In block matching search, the search range is set to cover both the previous and current CTUs.
在块匹配搜索中,搜索范围被设置为覆盖先前和当前的CTU。

At CU level, IBC mode is signalled with a flag and it can be signaled as IBC AMVP mode or IBC skip/merge mode as follows:
在CU级,IBC模式用一个标志来表示,它可以表示为IBC AMVP模式或IBC skip/merge 跳过/合并模式,如下所示:

– IBC skip/merge mode: a merge candidate index is used to indicate which of the block vectors in the list from neighboring candidate IBC coded blocks is used to predict the current block. The merge list consists of spatial, HMVP, and pairwise candidates.
– IBC跳过/合并模式:合并候选索引用于指示来自相邻候选IBC编码块的列表中的哪个块向量用于预测当前块。合并列表由空间、HMVP和成对候选项组成。

– IBC AMVP mode: block vector difference is coded in the same way as a motion vector difference. The block vector prediction method uses two candidates as predictors, one from left neighbor and one from above neighbor (if IBC coded). When either neighbor is not available, a default block vector will be used as a predictor. A flag is signaled to indicate the block vector predictor index.
– IBC AMVP模式:块矢量差bvd的编码方式与运动矢量差mvd相同。块向量预测方法使用两个候选作为预测器,一个来自左邻居,一个来自上邻居(如果IBC编码)。当任一邻居不可用时,默认块向量bv将用作预测器。用一个标志位来指示块向量预测器索引。

3.9.1.1 IBC reference region

To reduce memory consumption and decoder complexity, the IBC in VTM9 allows only the reconstructed portion of the predefined area including the region of current CTU and some region of the left CTU. Figure 57 illustrates the reference region of IBC Mode, where each block represents 64x64 luma sample unit.
为了降低内存消耗和解码器复杂性,VTM9中的IBC只允许预定义区域的重建部分,包括当前CTU的区域和左CTU的一些区域。图57显示了IBC模式的参考区域,其中每个块代表64x64亮度采样单位。

在这里插入图片描述

Figure 57 –current CTU processing order and its available reference samples in current and left CTU
图57–当前CTU处理顺序及其在当前和左侧CTU的可用参考区域

Depending on the location of the current coding CU location within the current CTU, the following applies:
根据当前CTU内当前编码CU位置的位置,以下内容适用:

– If current block falls into the top-left 64x64 block of the current CTU, then in addition to the already reconstructed samples in the current CTU, it can also refer to the reference samples in the bottom-right 64x64 blocks of the left CTU, using CPR mode. The current block can also refer to the reference samples in the bottom-left 64x64 block of the left CTU and the reference samples in the top-right 64x64 block of the left CTU, using CPR mode.
如果当前块落入当前CTU的左上角64x64块中,那么除了当前CTU中已经重建的样本之外,使用CPR模式它还可以引用左CTU的右下角64x64块中的参考样本。使用CPR模式,当前块还可以参考左CTU的左下64x64块中的参考样本和左CTU的右上64x64块中的参考样本。

– If current block falls into the top-right 64x64 block of the current CTU, then in addition to the already reconstructed samples in the current CTU, if luma location (0, 64) relative to the current CTU has not yet been reconstructed, the current block can also refer to the reference samples in the bottom-left 64x64 block and bottom-right 64x64 block of the left CTU, using CPR mode; otherwise, the current block can also refer to reference samples in bottom-right 64x64 block of the left CTU.
如果当前块落入当前CTU的右上64x64块中,那么除了当前CTU中已经重建的样本之外,如果相对于当前CTU的亮度位置(0,64)还没有被重建(这里没看懂),则当前块还可以使用CPR模式参考左CTU的左下64x64块和右下64x64块中的参考样本;否则,当前块也可以引用左CTU的右下64x64块中的参考样本。

– If current block falls into the bottom-left 64x64 block of the current CTU, then in addition to the already reconstructed samples in the current CTU, if luma location (64, 0) relative to the current CTU has not yet been reconstructed, the current block can also refer to the reference samples in the top-right 64x64 block and bottom-right 64x64 block of the left CTU, using CPR mode. Otherwise, the current block can also refer to the reference samples in the bottom-right 64x64 block of the left CTU, using CPR mode.
如果当前块落入当前CTU的左下64×64块中,那么除了当前CTU中已经重建的样本之外,如果相对于当前CTU的亮度位置(64,0)还没有被重建,则当前块还可以使用CPR模式参考左CTU的右上64×64块和右下64×64块中的参考样本。否则,当前块也可以使用CPR模式参考左CTU的右下角64x64块中的参考样本。

– If current block falls into the bottom-right 64x64 block of the current CTU, it can only refer to the already reconstructed samples in the current CTU, using CPR mode.
如果当前块落入当前CTU的右下角64x64块,则它只能使用CPR模式引用当前CTU中已经重建的样本。

This restriction allows the IBC mode to be implemented using local on-chip memory for hardware implementations.
这种限制允许使用硬件实现的本地片上存储器来实现IBC模式。

3.9.1.2 IBC interaction with other coding tools

The interaction between IBC mode and other inter coding tools in VTM9, such as pairwise merge candidate, history based motion vector predictor (HMVP), combined intra/inter prediction mode (CIIP), merge mode with motion vector difference (MMVD), and geometric partitioning mode (GPM) are as follows:
VTM9中IBC模式与其他帧间编码工具的交互,如成对合并候选pairwise merge candidate、基于历史的运动矢量预测器(HMVP)、组合帧内/帧间预测模式(CIIP)、具有运动矢量差异的合并模式(MMVD)、几何分割模式(GPM)如下:

– IBC can be used with pairwise merge candidate and HMVP. A new pairwise IBC merge candidate can be generated by averaging two IBC merge candidates. For HMVP, IBC motion is inserted into history buffer for future referencing.
IBC可以用于成对合并候选和HMVP。通过对两个IBC合并候选进行平均,可以生成新的成对IBC合并候选。对于HMVP,IBC运动被插入历史缓冲区,以供将来参考。

– IBC cannot be used in combination with the following inter tools: affine motion, CIIP, MMVD, and GPM.
IBC不能与以下交互工具结合使用:仿射运动affine motion、CIIP、MMVD和GPM。

– IBC is not allowed for the chroma coding blocks when DUAL_TREE partition is used.
当使用DUAL_TREE分区时,色度编码块不允许使用IBC。

Unlike in the HEVC screen content coding extension, the current picture is no longer included as one of the reference pictures in the reference picture list 0 for IBC prediction. The derivation process of motion vectors for IBC mode excludes all neighboring blocks in inter mode and vice versa. The following IBC design aspects are applied:
与HEVC屏幕内容编码扩展不同,对于IBC预测来说,当前图片不再包括在参考图片列表0中作为参考图片之一。IBC模式的运动矢量的推导过程排除了帧间模式中的所有相邻块,反之亦然。以下IBC设计方法被应用:

– IBC shares the same process as in regular MV merge including with pairwise merge candidate and history based motion predictor, but disallows TMVP and zero vector because they are invalid for IBC mode.
IBC与常规MV合并拥有相同的过程,包括成对合并候选和基于历史的运动预测,但不允许TMVP和零矢量,因为它们对于IBC模式无效。

– Separate HMVP buffer (5 candidates each) is used for conventional MV and IBC.
单独的HMVP缓冲区(每个5个候选)用于常规MV和IBC。

– Block vector constraints are implemented in the form of bitstream conformance constraint, the encoder needs to ensure that no invalid vectors are present in the bitsream, and merge shall not be used if the merge candidate is invalid (out of range or 0). Such bitstream conformance constraint is expressed in terms of a virtual buffer as described below.
单独的HMVP缓冲区(每个5个候选)用于常规MV和IBC。

– For deblocking, IBC is handled as inter mode.
对于去块效应,IBC被处理为帧间模式。

– If the current block is coded using IBC prediction mode, AMVR does not use quarter-pel; instead, AMVR is signaled to only indicate whether MV is inter-pel or 4 integer-pel.
如果当前块使用IBC预测模式编码,则AMVR不使用四分之一像素;取而代之的是,AMVR被发信号通知仅指示MV是像素间的还是整数像素的。

– The number of IBC merge candidates can be signalled in the slice header separately from the numbers of regular, subblock, and geometric merge candidates.
IBC合并候选项的数量可以在切片报头中与常规、子块和几何合并候选项的数量分开进行标记。

A virtual buffer concept is used to describe the allowable reference region for IBC prediction mode and valid block vectors. Denote CTU size as ctbSize, the virtual buffer, ibcBuf, has width being wIbcBuf = 128x128/ctbSize and height hIbcBuf = ctbSize. For example, for a CTU size of 128x128, the size of ibcBuf is also 128x128; for a CTU size of 64x64, the size of ibcBuf is 256x64; and a CTU size of 32x32,
the size of ibcBuf is 512x32.
虚拟缓冲器概念用于描述IBC预测模式和有效块向量的允许参考区域。将CTU大小表示为ctbSize,虚拟缓冲区ibcBuf的宽度为wIbcBuf = 128x128/ctbSize,高度为hIbcBuf = ctbSize。例如,对于128x128的CTU大小,ibcBuf的大小也是128 x128;对于64x64的CTU尺寸,ibcBuf的尺寸是256x64;对于CTU的尺寸是32×32,ibcBuf的尺寸是512×32。

The size of a VPDU is min(ctbSize, 64) in each dimension, Wv = min(ctbSize, 64).
VPDU的大小在每个维度上都是min(ctbSize, 64), W v = m i n ( c t b S i z e , 64 ) W_v = min(ctbSize, 64) Wv=min(ctbSize,64)

The virtual IBC buffer, ibcBuf is maintained as follows.
虚拟IBC缓冲区ibcBuf的维护如下。

– At the beginning of decoding each CTU row, refresh the whole ibcBuf with an invalid value −1.
在开始解码每个CTU行时,用无效值1刷新整个ibcBuf。

– At the beginning of decoding a VPDU (xVPDU, yVPDU) relative to the top-left corner of the picture, set the ibcBuf[ x ][ y ] = −1, with x = xVPDU%wIbcBuf, …, xVPDU% wIbcBuf + Wv − 1; y = yVPDU%ctbSize, …, yVPDU%ctbSize + Wv − 1.
在解码相对于画面左上角的一个VPDU (xVPDU,yVPDU)的开始时,设置ibcBuf[ x ][ y ] = −1, 同时 x = x V P D U % w I b c B u f , … , x V P D U % w I b c B u f + W v − 1 x = xVPDU\%wIbcBuf, …, xVPDU\% wIbcBuf + Wv − 1 x=xVPDU%wIbcBuf,,xVPDU%wIbcBuf+Wv1 y = y V P D U % c t b S i z e , … , y V P D U % c t b S i z e + W v − 1 y = yVPDU\%ctbSize, …, yVPDU\%ctbSize + Wv − 1 y=yVPDU%ctbSize,,yVPDU%ctbSize+Wv1

– After decoding a CU contains (x, y) relative to the top-left corner of the picture, set
解码包含相对于图片左上角(x,y)的CU后,设置

ibcBuf[ x % wIbcBuf ][ y % ctbSize ] = recSample[ x ][ y ]
i b c B u f [ x % w I b c B u f ] [ y % c t b S i z e ] = r e c S a m p l e [ x ] [ y ] ibcBuf\big[ x \% wIbcBuf \big]\big[ y \% ctbSize \big] = recSample[ x ][ y ] ibcBuf[x%wIbcBuf][y%ctbSize]=recSample[x][y]

For a block covering the coordinates (x, y), if the following is true for a block vector bv = (bv[0], bv[1]), then it is valid; otherwise, it is not valid:
对于覆盖坐标(x,y)的块,对于块向量如果以下式子成立 b v = ( b v [ 0 ] , b v [ 1 ] ) bv = (bv[0],bv[1]) bv=(bv[0]bv[1]),则它是有效的;否则,它无效:

ibcBuf[ (x + bv[0])% wIbcBuf] [ (y + bv[1]) % ctbSize ] shall not be equal to −1.
i b c B u f [ ( x + b v [ 0 ] ) % w I b c B u f ] [ ( y + b v [ 1 ] ) % c t b S i z e ] ibcBuf\Big[ (x + bv[0])\% wIbcBuf\Big] \Big[ (y + bv[1]) \% ctbSize \Big] ibcBuf[(x+bv[0])%wIbcBuf][(y+bv[1])%ctbSize] 不应该等于 −1.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值