CN112887734B - Method and device for transforming in video image encoding and decoding - Google Patents
Method and device for transforming in video image encoding and decoding Download PDFInfo
- Publication number
- CN112887734B CN112887734B CN201911204521.8A CN201911204521A CN112887734B CN 112887734 B CN112887734 B CN 112887734B CN 201911204521 A CN201911204521 A CN 201911204521A CN 112887734 B CN112887734 B CN 112887734B
- Authority
- CN
- China
- Prior art keywords
- transform
- sub
- block
- blocks
- current
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/17—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
- H04N19/176—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/44—Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
- Compression Of Band Width Or Redundancy In Fax (AREA)
Abstract
本公开涉及一种视频编解码中变换的方法,所述方法包括:根据图像的当前编码块预测值和图像原始值得到当前编码块的残差;根据将当前编码块划分为子变换块的模式信息,将当前编码块划分为n个子变换块,并对所生成的不同的子变换块的残差进行与该子变换块相对应的变换,其中,n是大于等于3的整数;通过对变换的结果进行量化以获得子变换块的系数,并且对所述子变换块的系数进行系数编码;以及将所述系数编码的结果以及所述当前编码块划分子变换块的模式信息写入码流。
The present disclosure relates to a method for transformation in video coding and decoding, the method comprising: obtaining a residual of a current coding block according to a prediction value of a current coding block of an image and an original value of the image; dividing the current coding block into n sub-transformation blocks according to mode information for dividing the current coding block into sub-transformation blocks, and performing transformations corresponding to the sub-transformation blocks on the generated residuals of different sub-transformation blocks, wherein n is an integer greater than or equal to 3; quantizing the transformation result to obtain coefficients of the sub-transformation blocks, and performing coefficient coding on the coefficients of the sub-transformation blocks; and writing the coefficient coding result and the mode information for dividing the current coding block into sub-transformation blocks into a bitstream.
Description
技术领域Technical Field
本发明涉及视频编/解码技术领域,更具体地,涉及一种编/解码中变换的方法和装置。发明涉及视频编解码技术领域,特别是涉及一种编解码中变换的方法和装置。The present invention relates to the technical field of video coding/decoding, and more specifically, to a method and device for conversion in coding/decoding. The present invention relates to the technical field of video coding/decoding, and more specifically, to a method and device for conversion in coding/decoding.
背景技术Background Art
在自然视频中,图像与图像之间存在很高的相似性。因此在视频压缩时,为了去除图像与图像之间的信息冗余,往往要进行帧间预测。所谓的帧间预测就是利用已经编码过的图像对当前要编码的图像进行预测,然后将预测误差传递给解码器。与直接传输当前图像的内容相比,预测误差的信息量要小得多,这样就达到了压缩的目的。实际在进行帧间预测时,编码器需要对每个图像块在之前已编码的参考图像中寻找一个尽量与之匹配的参考块,这样才能最大限度地减少预测误差。In natural videos, there is a high degree of similarity between images. Therefore, in order to remove information redundancy between images during video compression, inter-frame prediction is often performed. The so-called inter-frame prediction is to use the already encoded image to predict the current image to be encoded, and then pass the prediction error to the decoder. Compared with directly transmitting the content of the current image, the amount of information in the prediction error is much smaller, thus achieving the purpose of compression. In fact, when performing inter-frame prediction, the encoder needs to find a reference block that matches each image block as much as possible in the previously encoded reference image, so as to minimize the prediction error.
发明内容Summary of the invention
技术问题Technical issues
图像预测残差是指图像预测值与原始图像之间的差值。随着预测技术的不断进步,图像预测残差不断减小,但是图像编\解码块中边缘区域的残差仍远远大于编\解码块中间位置的残差,而现有的传统变换方法并不能解决这一问题。Image prediction residual refers to the difference between the image prediction value and the original image. With the continuous advancement of prediction technology, image prediction residual is constantly decreasing, but the residual in the edge area of the image encoding/decoding block is still much larger than the residual in the middle of the encoding/decoding block, and the existing traditional transformation method cannot solve this problem.
近年来,出现了很多基于位置的变换技术,如PBT(Position based Transform,基于位置的变换),SBT(Sub-block based Transform,基于子块的变换)等。在图1中示出了PBT技术的技术框图,PBT是基于位置的变换,被应用于帧间预测残差块,以更好地拟合帧间残差特性。通过将当前编\解码块划分为4个等大小的变换块(例如,块0、1、2和3),再根据不同的变换块在编\解码块中的不同位置,选择不同的变换核对变换块进行变换,以实现更高效的残差信号表达。PBT允许的变换类型包括离散余弦变换8(DCT8)和离散正弦变换7(DST7)。使用该方法的编码单元尺寸最大为32x32,最小为8x8,且编码单元长宽比不大于2。In recent years, many position-based transform technologies have emerged, such as PBT (Position based Transform), SBT (Sub-block based Transform), etc. The technical block diagram of PBT technology is shown in Figure 1. PBT is a position-based transform, which is applied to inter-frame prediction residual blocks to better fit the inter-frame residual characteristics. By dividing the current encoding/decoding block into 4 transform blocks of equal size (for example, blocks 0, 1, 2 and 3), and then selecting different transform kernels to transform the transform blocks according to the different positions of different transform blocks in the encoding/decoding block, a more efficient residual signal expression can be achieved. The transform types allowed by PBT include discrete cosine transform 8 (DCT8) and discrete sine transform 7 (DST7). The maximum size of the coding unit using this method is 32x32, the minimum is 8x8, and the aspect ratio of the coding unit is not greater than 2.
在图2中示出了SBT技术的技术框图。SBT技术假设帧间预测残差分布的局部性,即,预测残差分布在残差块的局部1/2或者1/4区域,通过将编解码块划分为2个变换块,并将其中一个变换块的残差强制置为0,只对另外一个残差不为0的变换块进行变换,从而降低变换系数的高频分量,提高压缩性能。上述的PBT技术和SBT技术都有效的去除了编解码块边缘位置的残差,提高了编码效率。The technical block diagram of the SBT technology is shown in Figure 2. The SBT technology assumes the local distribution of inter-frame prediction residuals, that is, the prediction residuals are distributed in the local 1/2 or 1/4 area of the residual block. By dividing the codec block into two transform blocks, and forcing the residual of one transform block to 0, only the other transform block with a non-zero residual is transformed, thereby reducing the high-frequency components of the transform coefficients and improving the compression performance. The above-mentioned PBT technology and SBT technology both effectively remove the residuals at the edge of the codec block and improve the coding efficiency.
然而,PBT技术和SBT技术虽然都是针对编解码块边缘位置残差设计的变换方法,但是PBT和SBT技术都有一些局限性,比如说,SBT技术只能去除编解码块一个边缘的残差的冗余;PBT则需要在码流中额外的传输更多的信息,才能去除编解码块边缘的残差的冗余。However, although both PBT and SBT technologies are transformation methods designed for residual errors at the edge of codec blocks, both PBT and SBT technologies have some limitations. For example, SBT can only remove the redundancy of residual errors at one edge of a codec block; PBT needs to transmit more information in the bitstream to remove the redundancy of residual errors at the edge of the codec block.
技术方案Technical Solution
本发明的一方面,提供了一种视频编码中变换的方法,所述方法包括:根据图像的当前编码块预测值和图像原始值得到当前编码块的残差;根据将当前编码块划分为子变换块的模式信息,将当前编码块划分为n个子变换块,并对所生成的不同的子变换块的残差进行与该子变换块相对应的变换,其中,n是大于等于3的整数;通过对变换的结果进行量化以获得子变换块的系数,并且对所述子变换块的系数进行系数编码;以及将所述系数编码的结果以及所述当前编码块划分子变换块的模式信息写入码流。In one aspect of the present invention, a method for transforming in video coding is provided, the method comprising: obtaining a residual of a current coding block according to a prediction value of a current coding block of an image and an original value of the image; dividing the current coding block into n sub-transformation blocks according to mode information for dividing the current coding block into sub-transformation blocks, and performing transforms corresponding to the sub-transformation blocks on the residuals of the generated different sub-transformation blocks, wherein n is an integer greater than or equal to 3; quantizing the result of the transform to obtain coefficients of the sub-transformation blocks, and performing coefficient encoding on the coefficients of the sub-transformation blocks; and writing the result of the coefficient encoding and the mode information for dividing the current coding block into a bitstream.
本发明的一方面,提供了一种视频编码中变换的方法,其中,所述当前编码块划分子变换块的模式信息包括划分方向以及指示当前编码块划分为子变换块的块数信息,其中,所述划分方向用于指示在水平方向或者垂直方向上对当前编码块进行划分。According to one aspect of the present invention, a method for transforming in video coding is provided, wherein the mode information of dividing the current coding block into sub-transform blocks includes a division direction and information indicating the number of sub-transform blocks into which the current coding block is divided, wherein the division direction is used to indicate that the current coding block is divided in a horizontal direction or a vertical direction.
本发明的一方面,提供了一种视频编码中变换的方法,其中,对所生成的不同的子变换块的残差进行与该子变换块相对应的变换包括:当所述划分方向指示水平方向并且n=3时,对于最上层的子变换块,在水平方向上应用离散正弦变换7(DST7)变换核,并且在垂直方向上应用离散余弦变换8(DCT8)变换核;对于中间的子变换块,将其残差强制置为0并且不进行变换;对于最下层的子变换块,在水平方向上应用DST7变换核,并且在垂直方向上应用DST7变换核。According to one aspect of the present invention, a method for transformation in video encoding is provided, wherein the residuals of different generated sub-transform blocks are transformed corresponding to the sub-transform blocks, including: when the division direction indicates the horizontal direction and n=3, for the sub-transform block of the uppermost layer, a discrete sine transform 7 (DST7) transform kernel is applied in the horizontal direction, and a discrete cosine transform 8 (DCT8) transform kernel is applied in the vertical direction; for the middle sub-transform blocks, their residuals are forced to be 0 and no transformation is performed; for the sub-transform block of the lowermost layer, a DST7 transform kernel is applied in the horizontal direction, and a DST7 transform kernel is applied in the vertical direction.
本发明的一方面,提供了一种视频编码中变换的方法,其中,当所述划分方向指示水平方向并且n=3时,将最上层的子变换块和最下层的子变换块的残差强制置为0,并且不对所述最上层的子变换块和最下层的子变换块进行变换,以及对中间的子变换块在水平方向和垂直方向上都采用离散余弦变换2(DCT2)作为变换核。According to one aspect of the present invention, a method for transforming in video coding is provided, wherein, when the division direction indicates the horizontal direction and n=3, the residuals of the sub-transform blocks of the uppermost layer and the sub-transform blocks of the lowermost layer are forced to be set to 0, and the sub-transform blocks of the uppermost layer and the sub-transform blocks of the lowermost layer are not transformed, and discrete cosine transform 2 (DCT2) is used as the transform kernel for the intermediate sub-transform blocks in both the horizontal and vertical directions.
本发明的一方面,提供了一种视频编码中变换的方法,其中,所述当前编码块划分子变换块的模式信息包括:当所述划分方向指示水平方向并且n=3时,将当前编码块水平地划分为高度为当前编码块高度/4的最上层子变换块、高度为当前编码块高度/2的中间子变换块以及高度为当前编码块高度/4的最下层子变换块。According to one aspect of the present invention, a method for transformation in video encoding is provided, wherein the pattern information of dividing the current coding block into sub-transform blocks includes: when the division direction indicates the horizontal direction and n=3, the current coding block is horizontally divided into an uppermost sub-transform block with a height of the current coding block height/4, an intermediate sub-transform block with a height of the current coding block height/2, and a lowermost sub-transform block with a height of the current coding block height/4.
本发明的一方面,提供了一种视频编码中变换的方法,其中,对所生成的不同的子变换块的残差进行与该子变换块相对应的变换包括:当所述划分方向指示垂直方向并且n=3时,对于最左侧的子变换块,在水平方向上应用DCT8变换核,并且在垂直方向上应用DST7变换核;对于中间的子变换块将其残差强制置为0,并且不进行变换;对于最右侧的子变换块,在水平方向上应用DST7变换核,并且在垂直方向上应用DST7变换核。In one aspect of the present invention, a method for transformation in video encoding is provided, wherein the residuals of different generated sub-transform blocks are transformed corresponding to the sub-transform blocks, including: when the division direction indicates the vertical direction and n=3, for the leftmost sub-transform block, the DCT8 transform kernel is applied in the horizontal direction, and the DST7 transform kernel is applied in the vertical direction; for the middle sub-transform block, its residual is forced to be 0, and no transformation is performed; for the rightmost sub-transform block, the DST7 transform kernel is applied in the horizontal direction, and the DST7 transform kernel is applied in the vertical direction.
本发明的一方面,提供了一种视频编码中变换的方法,其中,对所生成的不同的子变换块的残差进行与该子变换块相对应的变换包括:当所述划分方向指示垂直方向并且n=3时,将最左侧的子变换块和最右侧的子变换块的残差都强制置为0,并且对所述最左侧的子变换块和最右侧的子变换块不进行变换,而对中间的子变换块在水平方向和垂直方向上都采用DCT2作为变换核。In one aspect of the present invention, a method for transformation in video coding is provided, wherein the residuals of different generated sub-transform blocks are transformed corresponding to the sub-transform blocks, including: when the division direction indicates the vertical direction and n=3, the residuals of the leftmost sub-transform block and the rightmost sub-transform block are forced to be 0, and the leftmost sub-transform block and the rightmost sub-transform block are not transformed, and DCT2 is used as the transformation kernel in both the horizontal and vertical directions for the middle sub-transform block.
本发明的一方面,提供了一种视频编码中变换的方法,其中,所述当前编码块划分子变换块的模式信息包括:当所述划分方向指示垂直方向并且n=3时,将当前编码块垂直地划分为宽度为当前编码块宽度/4的最左侧子变换块、宽度为当前编码块宽度/2的中间子变换块以及宽度为当前编码块宽度/4的最右侧子变换块。In one aspect of the present invention, a method for transform in video encoding is provided, wherein the mode information of dividing the current coding block into sub-transform blocks includes: when the division direction indicates a vertical direction and n=3, the current coding block is vertically divided into a leftmost sub-transform block with a width of the current coding block width/4, a middle sub-transform block with a width of the current coding block width/2, and a rightmost sub-transform block with a width of the current coding block width/4.
本发明的一方面,提供了一种视频编码中变换的方法,将所述子变换块的系数编码的结果以及所述当前编码块划分子变换块的模式信息写入码流包括:将当前编码块是否需要划分为子变换块的标识写入码流;将指示当前编码块划分为子变换块的块数的标识写入码流;将划分方向写入码流;以及将子变换块的系数编码的结果写入码流。In one aspect of the present invention, a method for transform in video coding is provided, wherein the results of the coefficient encoding of the sub-transform blocks and the mode information of dividing the current coding block into the sub-transform blocks are written into the bitstream, including: writing an identification of whether the current coding block needs to be divided into sub-transform blocks into the bitstream; writing an identification indicating the number of sub-transform blocks into which the current coding block is divided into the bitstream; writing the division direction into the bitstream; and writing the results of the coefficient encoding of the sub-transform blocks into the bitstream.
本发明的一方面,提供了一种视频编码中变换的方法,将指示当前编码块划分为子变换块的块数的标识写入码流包括:在当前编码块的宽度和高度都小于预定阈值时,则不将指示当前编码块划分为子变换块的块数的标识和划分方向写入码流,否则,将指示当前编码块划分为子变换块的块数的标识写入码流,如果划分的子变换块的块数大于等于3,则将划分方向写入码流。In one aspect of the present invention, a method for transforming in video encoding is provided, wherein writing an identifier indicating the number of sub-transformation blocks into which a current coding block is divided into a bitstream comprises: when the width and height of the current coding block are both less than a predetermined threshold, not writing the identifier indicating the number of sub-transformation blocks into which the current coding block is divided and the division direction into the bitstream; otherwise, writing the identifier indicating the number of sub-transformation blocks into which the current coding block is divided into the bitstream; and if the number of sub-transformation blocks divided is greater than or equal to 3, writing the division direction into the bitstream.
本发明的一方面,提供了一种视频编码中变换的方法,其中,将划分方向写入码流包括:如果当前编码块的宽和高的比值大于预定阈值,或者当前编码块的宽和高的比值小于预定阈值时,则不传输划分方向,否则将划分方向写入码流。In one aspect of the present invention, a method for transformation in video encoding is provided, wherein writing a division direction into a bitstream comprises: if a ratio of a width to a height of a current coding block is greater than a predetermined threshold, or a ratio of a width to a height of a current coding block is less than a predetermined threshold, then the division direction is not transmitted; otherwise, the division direction is written into the bitstream.
本发明的一方面,提供了一种视频编码中变换的方法,其中,将划分方向写入码流包括:将当前编码块划分为子变换块的块数的标识写入码流后,如果确定划分的子变换块的块数大于等于3,则将划分方向写入码流。In one aspect of the present invention, a method for transformation in video encoding is provided, wherein writing a division direction into a bitstream comprises: after writing an identifier of the number of sub-transformation blocks into which a current coding block is divided into the bitstream, if it is determined that the number of sub-transformation blocks divided is greater than or equal to 3, writing the division direction into the bitstream.
本发明的一方面,提供了一种视频编码中变换的方法,其中,对所述子变换块的系数进行系数编码包括:不写入指示在每个子变换块中是否含有系数的标识CBF,对于将n=3的情况,默认第一个子变换块系数为1,第二个子变换块系数为0,第三个子变换块系数为1。According to one aspect of the present invention, a method for transformation in video coding is provided, wherein coefficient encoding of the coefficients of the sub-transform blocks comprises: not writing an identifier CBF indicating whether each sub-transform block contains coefficients, and for the case of n=3, the first sub-transform block coefficient is defaulted to 1, the second sub-transform block coefficient is defaulted to 0, and the third sub-transform block coefficient is defaulted to 1.
本发明的一方面,提供了一种视频编码中变换的方法,其中,对所述子变换块的系数进行系数编码包括:不写入指示在每个子变换块中是否含有系数的标识CBF,对于将n=3的情况,默认第一个子变换块系数为0,第二个子变换块系数为1,第三个子变换块系数为0。According to one aspect of the present invention, a method for transform in video encoding is provided, wherein coefficient encoding of the coefficients of the sub-transform blocks comprises: not writing an identifier CBF indicating whether each sub-transform block contains coefficients, and for the case of n=3, the first sub-transform block coefficient is defaulted to 0, the second sub-transform block coefficient is defaulted to 1, and the third sub-transform block coefficient is defaulted to 0.
本发明的另一方面,提供了一种用于视频解码中变换的方法,所述方法包括:所述方法包括:从码流中解析当前解码块划分子变换块的模式信息和子变换块的系数;根据当前编码块划分子变换块的模式信息,将当前解码块划分为n个子变换块,其中,n是大于等于3的整数;对不同的子变换块的系数进行与该子变换块相对应的反变换,以获得子变换块的残差;以及通过当前解码块的子变换块的残差以及当前解码块的预测值来重建图像。In another aspect of the present invention, a method for transform in video decoding is provided, the method comprising: parsing the mode information of dividing the current decoding block into sub-transform blocks and the coefficients of the sub-transform blocks from the bit stream; dividing the current decoding block into n sub-transform blocks according to the mode information of dividing the current coding block into sub-transform blocks, wherein n is an integer greater than or equal to 3; performing inverse transforms corresponding to the sub-transform blocks on the coefficients of different sub-transform blocks to obtain residuals of the sub-transform blocks; and reconstructing the image through the residuals of the sub-transform blocks of the current decoding block and the predicted values of the current decoding block.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,所述当前解码块划分子变换块的模式信息包括划分方向以及指示当前解码块划分为子变换块的块数信息,所述划分方向用于指示在水平方向或者垂直方向上对当前编码块进行划分。Another aspect of the present invention provides a method for transformation in video decoding, wherein the mode information of dividing the current decoding block into sub-transform blocks includes a division direction and block number information indicating that the current decoding block is divided into sub-transform blocks, and the division direction is used to indicate that the current coding block is divided in a horizontal direction or a vertical direction.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,从码流中解析当前解码块划分子变换块的模式信息和子变换块的系数包括:解析当前解码块是否被划分为子变换块的标识,解析指示当前解码块被划分为子变换块的块数的标识,解析当前解码块的划分方向,以及解析子变换块的系数。Another aspect of the present invention provides a method for transformation in video decoding, wherein parsing the mode information of dividing the current decoding block into sub-transform blocks and the coefficients of the sub-transform blocks from the bitstream includes: parsing an identifier of whether the current decoding block is divided into sub-transform blocks, parsing an identifier indicating the number of sub-transform blocks into which the current decoding block is divided, parsing the division direction of the current decoding block, and parsing the coefficients of the sub-transform blocks.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,解析指示当前解码块被划分为子变换块的块数的标识包括:在当前解码块宽和高都小于预定阈值时,不解析指示当前解码块被划分为子变换块的块数的标识和划分方向;否则,解析指示当前解码块被划分为子变换块的块数的标识,如果子变换块的块数大于等于3,则解析划分方向。Another aspect of the present invention provides a method for transformation in video decoding, wherein parsing an identifier indicating the number of sub-transform blocks into which a current decoding block is divided comprises: when the width and height of the current decoding block are both less than a predetermined threshold, not parsing the identifier indicating the number of sub-transform blocks into which the current decoding block is divided and the division direction; otherwise, parsing the identifier indicating the number of sub-transform blocks into which the current decoding block is divided, and if the number of sub-transform blocks is greater than or equal to 3, parsing the division direction.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,解析划分方向包括:如果当前解码块的宽和高的比值大于预定阈值,或者当前解码块的宽和高的比值小于预定阈值,则不解析划分方向;否则,解析划分方向。Another aspect of the present invention provides a method for transformation in video decoding, wherein parsing the division direction includes: if the ratio of the width to the height of the current decoding block is greater than a predetermined threshold, or the ratio of the width to the height of the current decoding block is less than a predetermined threshold, then the division direction is not parsed; otherwise, the division direction is parsed.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,解析划分方向包括:解析指示当前解码块被划分为子变换块的块数的标识后,如果确定划分的子变换块的块数大于等于3,则解析划分方向。Another aspect of the present invention provides a method for transformation in video decoding, wherein parsing the division direction includes: after parsing an identifier indicating the number of sub-transform blocks into which a current decoding block is divided, if it is determined that the number of divided sub-transform blocks is greater than or equal to 3, parsing the division direction.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,解析子变换块的系数包括:不解析指示每个子变换块中是否含有系数的标识CBF,对于n=3的情况,默认第一个子变换块的系数为1,第二个子变换块的系数为0,第三个子变换块的系数为1。Another aspect of the present invention provides a method for transformation in video decoding, wherein parsing the coefficients of the sub-transform blocks includes: not parsing the identifier CBF indicating whether each sub-transform block contains coefficients, and for the case of n=3, the coefficient of the first sub-transform block is defaulted to 1, the coefficient of the second sub-transform block is defaulted to 0, and the coefficient of the third sub-transform block is defaulted to 1.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,解析子变换块的系数包括:不解析指示每个子变换块中是否含有系数的标识CBF,对于n=3的情况,默认第一个子变换块的系数为0,第二个子变换块的系数为1,第三个子变换块的系数为0。Another aspect of the present invention provides a method for transformation in video decoding, wherein parsing the coefficients of the sub-transform blocks includes: not parsing the identifier CBF indicating whether each sub-transform block contains coefficients, and for the case of n=3, the coefficients of the first sub-transform block are defaulted to 0, the coefficients of the second sub-transform block are defaulted to 1, and the coefficients of the third sub-transform block are defaulted to 0.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,当所述划分方向指示水平方向并且n=3时,对于最上层的子变换块,在水平方向上应用DST7变换核来进行反变换,并且在垂直方向上应用DCT8变换核进行反变换;对于中间的子变换块将其残差强制置为0,并且不进行反变换;对于最下层的子变换块,在水平方向上应用DST7变换核进行反变换,并且在垂直方向上应用DST7变换核进行反变换。On the other hand, the present invention provides a method for transformation in video decoding, wherein, when the division direction indicates the horizontal direction and n=3, for the sub-transform block of the uppermost layer, the DST7 transform kernel is applied in the horizontal direction for inverse transformation, and the DCT8 transform kernel is applied in the vertical direction for inverse transformation; for the middle sub-transform block, its residual is forced to be 0, and no inverse transformation is performed; for the sub-transform block of the lowermost layer, the DST7 transform kernel is applied in the horizontal direction for inverse transformation, and the DST7 transform kernel is applied in the vertical direction for inverse transformation.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,对不同的子变换块的系数进行与该子变换块相对应的反变换包括:当所述划分方向指示水平方向并且n=3时,对于最上层的子变换块,在水平方向上应用离散正弦变换7(DST7)变换核来进行反变换,并且在垂直方向上应用离散余弦变换8(DCT8)变换核进行反变换;对于中间的子变换块将其残差强制置为0,并且不进行反变换;对于最下层的子变换块,在水平方向上应用DST7变换核进行反变换,并且在垂直方向上应用DST7变换核进行反变换。Another aspect of the present invention provides a method for transformation in video decoding, wherein the coefficients of different sub-transform blocks are inversely transformed corresponding to the sub-transform blocks, including: when the division direction indicates the horizontal direction and n=3, for the sub-transform block of the uppermost layer, the discrete sine transform 7 (DST7) transform kernel is applied in the horizontal direction for inverse transformation, and the discrete cosine transform 8 (DCT8) transform kernel is applied in the vertical direction for inverse transformation; for the middle sub-transform block, its residual is forced to 0, and no inverse transformation is performed; for the sub-transform block of the lowermost layer, the DST7 transform kernel is applied in the horizontal direction for inverse transformation, and the DST7 transform kernel is applied in the vertical direction for inverse transformation.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,所述当前编码块划分子变换块的模式信息包括:当所述划分方向指示水平方向并且n=3时,将当前编码块水平地划分为高度为当前编码块高度/4的最上层子变换块、高度为当前编码块高度/2的中间子变换块以及高度为当前编码块高度/4的最下层子变换块。Another aspect of the present invention provides a method for transformation in video decoding, wherein the pattern information of dividing the current coding block into sub-transform blocks includes: when the division direction indicates the horizontal direction and n=3, the current coding block is horizontally divided into an uppermost sub-transform block with a height of the current coding block height/4, an intermediate sub-transform block with a height of the current coding block height/2, and a lowermost sub-transform block with a height of the current coding block height/4.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,对不同的子变换块的系数进行与该子变换块相对应的反变换包括:当所述划分方向指示垂直方向并且n=3时,对于最左侧的子变换块,在水平方向上应用DCT8变换核进行反变换,并且在垂直方向上应用DST7变换核进行反变换;对于中间的子变换块将其残差强制置为0,并且不进行反变换;对于最右侧的子变换块,在水平方向上应用DST7变换核进行反变换,并且在垂直方向上应用DST7变换核进行反变换。Another aspect of the present invention provides a method for transformation in video decoding, wherein the coefficients of different sub-transform blocks are inversely transformed corresponding to the sub-transform blocks, including: when the division direction indicates the vertical direction and n=3, for the leftmost sub-transform block, the DCT8 transform kernel is applied in the horizontal direction for inverse transformation, and the DST7 transform kernel is applied in the vertical direction for inverse transformation; for the middle sub-transform block, its residual is forced to be 0, and no inverse transformation is performed; for the rightmost sub-transform block, the DST7 transform kernel is applied in the horizontal direction for inverse transformation, and the DST7 transform kernel is applied in the vertical direction for inverse transformation.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,对不同的子变换块的系数进行与该子变换块相对应的反变换包括:当所述划分方向指示垂直方向并且n=3时,将最左侧的子变换块和最右侧的子变换块的残差都强制置为0,并且对所述最左侧的子变换块和最右侧的子变换块不进行反变换,而对中间的子变换块在水平方向和垂直方向上都采用DCT2作为变换核进行反变换。Another aspect of the present invention provides a method for transformation in video decoding, wherein performing inverse transformation on coefficients of different sub-transform blocks corresponding to the sub-transform blocks comprises: when the division direction indicates the vertical direction and n=3, forcing the residuals of the leftmost sub-transform block and the rightmost sub-transform block to be 0, and not performing inverse transformation on the leftmost sub-transform block and the rightmost sub-transform block, while performing inverse transformation on the middle sub-transform block in both the horizontal and vertical directions using DCT2 as the transformation kernel.
本发明的另一方面,提供了一种用于视频解码中变换的方法,其中,所述当前编码块划分子变换块的模式信息包括:当所述划分方向指示垂直方向并且n=3时,将当前编码块垂直地划分为宽度为当前编码块宽度/4的最左侧子变换块、宽度为当前编码块宽度/2的中间子变换块以及宽度为当前编码块宽度/4的最右侧子变换块。In another aspect of the present invention, a method for transformation in video decoding is provided, wherein the mode information of dividing the current coding block into sub-transform blocks includes: when the division direction indicates a vertical direction and n=3, the current coding block is vertically divided into a leftmost sub-transform block with a width of the current coding block width/4, a middle sub-transform block with a width of the current coding block width/2, and a rightmost sub-transform block with a width of the current coding block width/4.
本发明的另一方面,提供了一种用于执行视频图像编码中进行变换的方法的装置,所述装置包括:预测单元,其被配置为接收图像数据,并且用于预测图像数据中当前编码块的预测值,以及根据图像数据的原始值得到当前编码块的残差;变换单元,其与所述预测单元耦接,并且被配置为根据当前编码块划分子变换块的模式信息,将图像数据的当前编码块划分为n个子变换块,并对所生成的不同的子变换块的残差进行与该子变换块相对应的变换,并且通过对变换结果进行量化来获取子变换块的系数,并且对所述子变换块的系数进行系数编码,其中,n是大于等于3的整数;以及写入单元,其与所述转换单元耦接,并且被配置为将当前编码块划分子变换块的模式信息以及所述系数编码的结果写入到码流中。In another aspect of the present invention, a device for performing a method for transforming in video image encoding is provided, the device comprising: a prediction unit, which is configured to receive image data and is used to predict a predicted value of a current coding block in the image data, and obtain a residual of the current coding block according to the original value of the image data; a transform unit, which is coupled to the prediction unit and is configured to divide the current coding block of the image data into n sub-transform blocks according to mode information of dividing the current coding block into sub-transform blocks, and perform a transform corresponding to the sub-transform block on the residuals of the generated different sub-transform blocks, and obtain coefficients of the sub-transform blocks by quantizing the transform results, and perform coefficient encoding on the coefficients of the sub-transform blocks, wherein n is an integer greater than or equal to 3; and a writing unit, which is coupled to the conversion unit and is configured to write the mode information of dividing the current coding block into sub-transform blocks and the result of the coefficient encoding into a bitstream.
本发明的另一方面,提供了一种用于执行编码中变换的方法的装置,其中,所述当前编码块划分子变换块的模式信息包括划分方向以及指示当前编码块划分为子变换块的块数信息,其中,所述划分方向用于指示在水平方向或者垂直方向上对当前编码块进行划分。According to another aspect of the present invention, a device for performing a method for transforming in coding is provided, wherein the mode information of dividing the current coding block into sub-transform blocks includes a division direction and information indicating the number of blocks into which the current coding block is divided, wherein the division direction is used to indicate that the current coding block is divided in a horizontal direction or a vertical direction.
本发明的另一方面,提供了一种用于执行编码中变换的方法的装置,其中,所述变换单元被配置为对所生成的不同的子变换块的残差进行与该子变换块相对应的变换,包括:当所述划分方向指示水平方向并且n=3时,对于最上层的子变换块,在水平方向上应用离散正弦变换7(DST7)变换核,并且在垂直方向上应用离散余弦变换8(DCT8)变换核;对于中间的子变换块,将其残差强制置为0并且不进行变换;对于最下层的子变换块,在水平方向上应用DST7变换核,并且在垂直方向上应用DST7变换核。On the other hand, the present invention provides an apparatus for performing a method for transforming in encoding, wherein the transform unit is configured to perform a transform corresponding to the sub-transform block on the residuals of different generated sub-transform blocks, including: when the division direction indicates the horizontal direction and n=3, for the sub-transform block of the uppermost layer, a discrete sine transform 7 (DST7) transform kernel is applied in the horizontal direction, and a discrete cosine transform 8 (DCT8) transform kernel is applied in the vertical direction; for the middle sub-transform block, its residual is forced to be 0 and no transformation is performed; for the sub-transform block of the lowermost layer, a DST7 transform kernel is applied in the horizontal direction, and a DST7 transform kernel is applied in the vertical direction.
本发明的另一方面,提供了一种用于执行编码中变换的方法的装置,其中,所述当前编码块划分子变换块的模式信息包括:当所述划分方向指示水平方向并且n=3时,将当前编码块水平地划分为高度为当前编码块高度/4的最上层子变换块、高度为当前编码块高度/2的中间子变换块以及高度为当前编码块高度/4的最下层子变换块。In another aspect of the present invention, a device for performing a method for transforming in encoding is provided, wherein the pattern information of dividing the current coding block into sub-transform blocks includes: when the division direction indicates a horizontal direction and n=3, the current coding block is horizontally divided into an uppermost sub-transform block with a height of the current coding block height/4, an intermediate sub-transform block with a height of the current coding block height/2, and a lowermost sub-transform block with a height of the current coding block height/4.
本发明的另一方面,提供了一种用于执行编码中变换的方法的装置,其中,所述变换单元被配置为对所生成的不同的子变换块的残差进行与该子变换块相对应的变换,包括:当所述划分方向指示垂直方向并且n=3时,对于最左侧的子变换块,在水平方向上应用DCT8变换核,并且在垂直方向上应用DST7变换核;对于中间的子变换块将其残差强制置为0,并且不进行变换;对于最右侧的子变换块,在水平方向上应用DST7变换核,并且在垂直方向上应用DST7变换核。On the other hand, the present invention provides an apparatus for performing a method for transforming in encoding, wherein the transform unit is configured to perform a transform corresponding to the sub-transform block on the residuals of different generated sub-transform blocks, including: when the division direction indicates a vertical direction and n=3, for the leftmost sub-transform block, applying the DCT8 transform kernel in the horizontal direction and the DST7 transform kernel in the vertical direction; for the middle sub-transform block, forcing its residual to 0 and not performing the transform; for the rightmost sub-transform block, applying the DST7 transform kernel in the horizontal direction and the DST7 transform kernel in the vertical direction.
本发明的另一方面,提供了一种用于执行编码中变换的方法的装置,其中,所述当前编码块划分子变换块的模式信息包括:当所述划分方向指示垂直方向并且n=3时,将当前编码块垂直地划分为宽度为当前编码块宽度/4的最左侧子变换块、宽度为当前编码块宽度/2的中间子变换块以及宽度为当前编码块宽度/4的最右侧子变换块。In another aspect of the present invention, a device for performing a method for transforming in coding is provided, wherein the mode information of dividing the current coding block into sub-transform blocks includes: when the division direction indicates a vertical direction and n=3, the current coding block is vertically divided into a leftmost sub-transform block with a width of the current coding block width/4, a middle sub-transform block with a width of the current coding block width/2, and a rightmost sub-transform block with a width of the current coding block width/4.
本发明的另一方面,提供了一种用于执行编码中变换的方法的装置,其中,所述写入单元被配置为将当前编码块划分子变换块的模式信息以及所述系数编码的结果写入到码流,包括:将当前编码块是否需要划分为子变换块的标识写入码流;将指示当前编码块划分为子变换块的块数的标识写入码流;将划分方向写入码流;以及将子变换块的系数编码的结果写入码流。In another aspect of the present invention, a device for performing a method for transforming in coding is provided, wherein the writing unit is configured to write mode information of dividing a current coding block into sub-transform blocks and the result of the coefficient encoding into a bitstream, including: writing an identification of whether the current coding block needs to be divided into sub-transform blocks into the bitstream; writing an identification indicating the number of sub-transform blocks into which the current coding block is divided into the bitstream; writing a division direction into the bitstream; and writing the result of the coefficient encoding of the sub-transform block into the bitstream.
本发明的另一方面,提供了一种用于执行编码中变换的方法的装置,其中,所述写入单元被配置为将指示当前编码块划分为子变换块的块数的标识写入码流,包括:在当前编码块的宽度和高度都小于预定阈值时,则不将指示当前编码块划分为子变换块的块数的标识和划分方向写入码流,否则,将指示当前编码块划分为子变换块的块数的标识写入码流,如果划分的子变换块的块数大于等于3,则将划分方向写入码流。In another aspect of the present invention, a device for performing a method for transforming in coding is provided, wherein the writing unit is configured to write an identifier indicating the number of sub-transformation blocks into which a current coding block is divided into into a bitstream, including: when the width and height of the current coding block are both less than a predetermined threshold, the identifier indicating the number of sub-transformation blocks into which the current coding block is divided and the division direction are not written into the bitstream; otherwise, the identifier indicating the number of sub-transformation blocks into which the current coding block is divided is written into the bitstream; if the number of sub-transformation blocks divided is greater than or equal to 3, the division direction is written into the bitstream.
本发明的另一方面,提供了一种用于执行编码中变换的方法的装置,其中,所述写入单元被配置为将划分方向写入码流,包括:如果当前编码块的宽和高的比值大于预定阈值,或者当前编码块的宽和高的比值小于预定阈值时,则不传输划分方向,否则将划分方向写入码流。Another aspect of the present invention provides an apparatus for performing a method for transforming in encoding, wherein the writing unit is configured to write a division direction into a bitstream, including: if the ratio of the width to the height of the current coding block is greater than a predetermined threshold, or the ratio of the width to the height of the current coding block is less than a predetermined threshold, then the division direction is not transmitted; otherwise, the division direction is written into the bitstream.
本发明的另一方面,提供了一种用于执行编码中变换的方法的装置,其中,所述变换单元被配置为对所述子变换块的系数进行系数编码,包括:不写入在每个子变换块中是否含有系数的标识CBF,对于将n=3的情况,默认第一个子变换块系数为1,第二个子变换块系数为0,第三个子变换块系数为1。Another aspect of the present invention provides an apparatus for performing a method for transforming in coding, wherein the transform unit is configured to perform coefficient encoding on the coefficients of the sub-transform block, including: not writing an identifier CBF indicating whether each sub-transform block contains a coefficient, and for the case of n=3, the first sub-transform block coefficient is defaulted to 1, the second sub-transform block coefficient is defaulted to 0, and the third sub-transform block coefficient is defaulted to 1.
本发明的另一方面,提供了一种用于执行视频图像解码中进行变换的方法的装置,所述装置包括:解析单元,其被配置为接收码流,并且用于解析当前解码块划分子变换块的模式信息和子变换块的系数;变换单元,其与所述解析单元耦接,并且被配置为根据当前编码块划分子变换块的模式信息,将当前解码块划分为n个子变换块,并对不同的子变换块的系数进行与该子变换块相对应的反变换,以获得子变换块的残差,其中,n是大于等于3的整数;以及重建单元,其与所述转换单元耦接,并且被配置为通过当前解码块的子变换块的残差以及当前解码块的预测值来重建图像。In another aspect of the present invention, a device for performing a method for transforming in video image decoding is provided, the device comprising: a parsing unit, which is configured to receive a bit stream and to parse the mode information of dividing a current decoding block into sub-transform blocks and the coefficients of the sub-transform blocks; a transform unit, which is coupled to the parsing unit and is configured to divide the current decoding block into n sub-transform blocks according to the mode information of dividing the sub-transform blocks of the current coding block, and perform an inverse transform corresponding to the sub-transform blocks on the coefficients of different sub-transform blocks to obtain residuals of the sub-transform blocks, wherein n is an integer greater than or equal to 3; and a reconstruction unit, which is coupled to the conversion unit and is configured to reconstruct an image through the residuals of the sub-transform blocks of the current decoding block and the predicted value of the current decoding block.
本发明的另一方面,提供了一种用于执行视频图像解码中进行变换的方法的装置,其中,所述当前解码块划分子变换块的模式信息包括划分方向以及指示当前解码块划分为子变换块的块数信息,所述划分方向用于指示在水平方向或者垂直方向上对当前编码块进行划分。In another aspect of the present invention, a device is provided for executing a method for performing transformation in video image decoding, wherein the mode information of dividing the current decoding block into sub-transformation blocks includes a division direction and block number information indicating that the current decoding block is divided into sub-transformation blocks, and the division direction is used to indicate that the current coding block is divided in a horizontal direction or a vertical direction.
本发明的另一方面,提供了一种用于执行视频图像解码中进行变换的方法的装置,其中,所述解析单元被配置为从码流中解析当前解码块划分子变换块的模式信息和子变换块的系数,包括:解析当前解码块是否被划分为子变换块的标识,解析指示当前解码块被划分为子变换块的块数的标识,解析当前解码块的划分方向,以及解析子变换块的系数。In another aspect of the present invention, a device for executing a method for performing transformation in video image decoding is provided, wherein the parsing unit is configured to parse the mode information of dividing the current decoding block into sub-transform blocks and the coefficients of the sub-transform blocks from the bitstream, including: parsing an identifier of whether the current decoding block is divided into sub-transform blocks, parsing an identifier indicating the number of sub-transform blocks into which the current decoding block is divided, parsing the division direction of the current decoding block, and parsing the coefficients of the sub-transform blocks.
本发明的另一方面,提供了一种用于执行视频图像解码中进行变换的方法的装置,其中,所述解析单元被配置为解析指示当前解码块被划分为子变换块的块数的标识,包括:在当前解码块宽和高都小于预定阈值时,不解析指示当前解码块被划分为子变换块的块数的标识和划分方向;否则,解析指示当前解码块被划分为子变换块的块数的标识,如果子变换块的块数大于等于3,则解析划分方向。In another aspect of the present invention, a device for executing a method for performing transformation in video image decoding is provided, wherein the parsing unit is configured to parse an identifier indicating the number of sub-transformation blocks into which a current decoding block is divided, including: when the width and height of the current decoding block are both less than a predetermined threshold, not parsing the identifier indicating the number of sub-transformation blocks into which the current decoding block is divided and the division direction; otherwise, parsing the identifier indicating the number of sub-transformation blocks into which the current decoding block is divided, and if the number of sub-transformation blocks is greater than or equal to 3, parsing the division direction.
本发明的另一方面,提供了一种用于执行视频图像解码中进行变换的方法的装置,其中,所述解析单元被配置为解析划分方向,包括:如果当前解码块的宽和高的比值大于预定阈值,或者当前解码块的宽和高的比值小于预定阈值,则不解析划分方向;否则,解析划分方向。Another aspect of the present invention provides an apparatus for executing a method for transformation in video image decoding, wherein the parsing unit is configured to parse the division direction, including: if the ratio of the width to the height of the current decoded block is greater than a predetermined threshold, or the ratio of the width to the height of the current decoded block is less than the predetermined threshold, then the division direction is not parsed; otherwise, the division direction is parsed.
本发明的另一方面,提供了一种用于执行视频图像解码中进行变换的方法的装置,其中,所述解析单元被配置为解析子变换块的系数,包括:不解析指示每个子变换块中是否含有系数的标识CBF,对于n=3的情况,默认第一个子变换块的系数为1,第二个子变换块的系数为0,第三个子变换块的系数为1。In another aspect of the present invention, a device for executing a method for transformation in video image decoding is provided, wherein the parsing unit is configured to parse coefficients of sub-transform blocks, including: not parsing an identifier CBF indicating whether each sub-transform block contains coefficients, and for the case of n=3, the coefficient of the first sub-transform block is defaulted to 1, the coefficient of the second sub-transform block is defaulted to 0, and the coefficient of the third sub-transform block is defaulted to 1.
本发明的另一方面,提供了一种用于执行视频图像解码中进行变换的方法的装置,其中,所述变换单元被配置为对不同的子变换块的系数进行与该子变换块相对应的反变换,包括:当所述划分方向指示水平方向并且n=3时,对于最上层的子变换块,在水平方向上应用离散正弦变换7(DST7)变换核来进行反变换,并且在垂直方向上应用离散余弦变换8(DCT8)变换核进行反变换;对于中间的子变换块将其残差强制置为0,并且不进行反变换;对于最下层的子变换块,在水平方向上应用DST7变换核进行反变换,并且在垂直方向上应用DST7变换核进行反变换。On the other hand, the present invention provides an apparatus for executing a method for transformation in video image decoding, wherein the transformation unit is configured to perform inverse transformation on coefficients of different sub-transform blocks corresponding to the sub-transform blocks, including: when the division direction indicates the horizontal direction and n=3, for the sub-transform block of the uppermost layer, applying the discrete sine transform 7 (DST7) transform kernel in the horizontal direction for inverse transformation, and applying the discrete cosine transform 8 (DCT8) transform kernel in the vertical direction for inverse transformation; for the middle sub-transform block, its residual is forced to 0, and no inverse transformation is performed; for the sub-transform block of the lowermost layer, applying the DST7 transform kernel in the horizontal direction for inverse transformation, and applying the DST7 transform kernel in the vertical direction for inverse transformation.
本发明的另一方面,提供了一种用于执行视频图像解码中进行变换的方法的装置,其中,所述当前编码块划分子变换块的模式信息包括:当所述划分方向指示水平方向并且n=3时,将当前编码块水平地划分为高度为当前编码块高度/4的最上层子变换块、高度为当前编码块高度/2的中间子变换块以及高度为当前编码块高度/4的最下层子变换块。In another aspect of the present invention, a device for performing a method for transformation in video image decoding is provided, wherein the pattern information of dividing the current coding block into sub-transform blocks includes: when the division direction indicates the horizontal direction and n=3, the current coding block is horizontally divided into an uppermost sub-transform block with a height of the current coding block height/4, an intermediate sub-transform block with a height of the current coding block height/2, and a lowermost sub-transform block with a height of the current coding block height/4.
本发明的另一方面,提供了一种用于执行视频图像解码中进行变换的方法的装置,其中,所述变换单元被配置为对不同的子变换块的系数进行与该子变换块相对应的反变换,包括:当所述划分方向指示垂直方向并且n=3时,对于最左侧的子变换块,在水平方向上应用DCT8变换核进行反变换,并且在垂直方向上应用DST7变换核进行反变换;对于中间的子变换块将其残差强制置为0,并且不进行反变换;对于最右侧的子变换块,在水平方向上应用DST7变换核进行反变换,并且在垂直方向上应用DST7变换核进行反变换。On the other hand, the present invention provides an apparatus for executing a method for transformation in video image decoding, wherein the transformation unit is configured to perform inverse transformation on coefficients of different sub-transform blocks corresponding to the sub-transform blocks, including: when the division direction indicates a vertical direction and n=3, for the leftmost sub-transform block, applying the DCT8 transform kernel in the horizontal direction for inverse transformation, and applying the DST7 transform kernel in the vertical direction for inverse transformation; for the middle sub-transform block, its residual is forced to be 0, and no inverse transformation is performed; for the rightmost sub-transform block, applying the DST7 transform kernel in the horizontal direction for inverse transformation, and applying the DST7 transform kernel in the vertical direction for inverse transformation.
本发明的另一方面,提供了一种用于执行视频图像解码中进行变换的方法的装置,其中,所述当前编码块划分子变换块的模式信息包括:当所述划分方向指示垂直方向并且n=3时,将当前编码块垂直地划分为宽度为当前编码块宽度/4的最左侧子变换块、宽度为当前编码块宽度/2的中间子变换块以及宽度为当前编码块宽度/4的最右侧子变换块。In another aspect of the present invention, a device for performing a method for transforming in video image decoding is provided, wherein the mode information of dividing the current coding block into sub-transform blocks includes: when the division direction indicates a vertical direction and n=3, the current coding block is vertically divided into a leftmost sub-transform block with a width of the current coding block width/4, a middle sub-transform block with a width of the current coding block width/2, and a rightmost sub-transform block with a width of the current coding block width/4.
从以下附图、描述和权利要求,其他技术特征对于本领域技术人员来说可能是显而易见的。Other technical features may be apparent to those skilled in the art from the following drawings, descriptions, and claims.
发明的有益效果Advantageous Effects of the Invention
本发明根据编解码块的残差特性,将当前编/解码块划分为多个变换单元,如图3所示,并为不同位置的变换块设计了与该变换块相对应的变换。能够同时处理两个边缘的残差,有效的去除了编解码块边缘位置残差的冗余,同时减少了码流中额外的开销,从而提高了编码性能。The present invention divides the current encoding/decoding block into multiple transform units according to the residual characteristics of the encoding/decoding block, as shown in Figure 3, and designs transforms corresponding to the transform blocks at different positions. The residuals of two edges can be processed simultaneously, effectively removing the redundancy of the residuals at the edge positions of the encoding/decoding block, while reducing the extra overhead in the code stream, thereby improving the coding performance.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更完整地理解本公开及其优点,现在结合附图参考以下描述,其中相同的附图标记表示相同的部分:For a more complete understanding of the present disclosure and its advantages, reference is now made to the following description in conjunction with the accompanying drawings, wherein like reference numerals represent like parts:
图1示出了PBT技术的技术框图;FIG1 shows a technical block diagram of the PBT technology;
图2示出了SBT技术的技术框图;FIG2 shows a technical block diagram of the SBT technology;
图3示出了根据本公开实施例的将当前编/解码块划分为多个子变换块的示意图;FIG3 is a schematic diagram showing a current encoding/decoding block divided into a plurality of sub-transform blocks according to an embodiment of the present disclosure;
图4示出了根据本公开实施例的用于视频图像编码中变换的方法的流程图;FIG4 shows a flow chart of a method for transforming in video image encoding according to an embodiment of the present disclosure;
图5示出了根据本公开实施例的用于视频图像解码中变换的方法的流程图;FIG5 shows a flow chart of a method for transforming in video image decoding according to an embodiment of the present disclosure;
图6示出了根据本公开实施例的用于执行视频图像编码中变换的方法的装置的框图;以及FIG6 shows a block diagram of a device for performing a method for transforming in video image coding according to an embodiment of the present disclosure; and
图7示出了根据本公开实施例的用于执行视频图像解码中变换的方法的装置的框图。FIG. 7 shows a block diagram of a device for performing a method for transforming in video image decoding according to an embodiment of the present disclosure.
具体实施方式DETAILED DESCRIPTION
在进行下面的详细描述之前,阐述贯穿本专利文件使用的某些单词和短语的定义可能是有利的。术语“耦接”及其派生词指两个或多个元件之间的任何直接或间接通信,无论那些元件是否彼此物理接触。术语“传输”、“接收”和“通信”及其派生词涵盖直接和间接通信。术语“包括”和“包含”及其派生词是指包括但不限于。术语“或”是包含性的,意思是和/或。短语“与……相关联”及其派生词是指包括、包括在……内、互连、包含、包含在……内、连接或与……连接、耦接或与……耦接、与……通信、配合、交织、并列、接近、绑定或与……绑定、具有、具有属性、具有关系或与……有关系等。术语“控制器”是指控制至少一个操作的任何设备、系统或其一部分。这种控制器可以用硬件、或者硬件和软件和/或固件的组合来实施。与任何特定控制器相关联的功能可以是集中式的或分布式的,无论是本地的还是远程的。短语“至少一个”,当与项目列表一起使用时,意指可以使用所列项目中的一个或多个的不同组合,并且可能只需要列表中的一个项目。例如,“A、B、C中的至少一个”包括以下组合中的任意一个:A、B、C、A和B、A和C、B和C、A和B和C。Before proceeding to the following detailed description, it may be advantageous to set forth the definitions of certain words and phrases used throughout this patent document. The term "coupling" and its derivatives refer to any direct or indirect communication between two or more elements, whether or not those elements are in physical contact with each other. The terms "transmission", "receiving" and "communication" and their derivatives cover direct and indirect communication. The terms "include" and "comprising" and their derivatives refer to including but not limited to. The term "or" is inclusive, meaning and/or. The phrase "associated with..." and its derivatives refer to including, including within, interconnecting, containing, contained within, connecting or connecting with, coupling or coupling with, communicating with, cooperating, interweaving, parallel, approaching, binding or binding with, having, having attributes, having a relationship or having a relationship with, etc. The term "controller" refers to any device, system or part thereof that controls at least one operation. Such a controller can be implemented with hardware, or a combination of hardware and software and/or firmware. The functions associated with any particular controller can be centralized or distributed, whether local or remote. The phrase "at least one of", when used with a list of items, means that different combinations of one or more of the listed items may be used, and only one of the items in the list may be required. For example, "at least one of A, B, C" includes any of the following combinations: A, B, C, A and B, A and C, B and C, A and B and C.
贯穿本专利文件提供了其他特定单词和短语的定义。本领域普通技术人员应该理解,在许多情况下,即使不是大多数情况下,这种定义也适用于这样定义的单词和短语的先前和将来使用。Definitions for other specific words and phrases are provided throughout this patent document. Those of ordinary skill in the art should understand that in many, if not most instances, such definitions apply to prior and future uses of such defined words and phrases.
下面讨论的图1至图7以及在本专利文件中用于描述本公开的原理的各种实施例仅仅是示例性的,不应以任何方式解释为限制本公开的范围。本领域技术人员将理解,本公开的原理可以在任何适当布置的系统或设备中实施。FIG. 1 to FIG. 7 discussed below and the various embodiments used to describe the principles of the present disclosure in this patent document are merely exemplary and should not be interpreted in any way to limit the scope of the present disclosure. Those skilled in the art will appreciate that the principles of the present disclosure can be implemented in any suitably arranged system or device.
图3示出了根据本公开实施例的将当前编/解码块划分为多个子变换块的示意图。图3中示出的实施例仅用于说明。在不脱离本公开的范围的情况下,可以使用其他的划分方式。FIG3 shows a schematic diagram of dividing a current encoding/decoding block into a plurality of sub-transform blocks according to an embodiment of the present disclosure. The embodiment shown in FIG3 is for illustration only. Other division methods may be used without departing from the scope of the present disclosure.
如图3(a)所示,当前编/解码块被水平划分为三个部分(子变换块),在其中:最上层部分为有残差部分(301),对于该有残差部分,在水平方向应用了DST7变换核,在垂直方向应用了DCT8变换核;中间层为无残差部分(302),其残差被强制置为0;最下层为有残差部分(303),对于该有残差部分,在水平方向应用了DST7变换核,在垂直方向应用了DST7变换核。此外,在该实施例中,3个子变换块的高度分别为当前编/解码块高度的1/4、1/2和1/4。上述的变换核的应用组合以及子变换块的划分高度仅用于说明,在不脱离本公开的范围内,变换核的应用组合以及子变换块的划分高度可以具有不同的方式。As shown in FIG3(a), the current encoding/decoding block is horizontally divided into three parts (sub-transform blocks), among which: the top layer is the residual part (301), for which the DST7 transform kernel is applied in the horizontal direction and the DCT8 transform kernel is applied in the vertical direction; the middle layer is the non-residual part (302), whose residual is forced to be set to 0; the bottom layer is the residual part (303), for which the DST7 transform kernel is applied in the horizontal direction and the DST7 transform kernel is applied in the vertical direction. In addition, in this embodiment, the heights of the three sub-transform blocks are 1/4, 1/2 and 1/4 of the height of the current encoding/decoding block, respectively. The above-mentioned application combination of transform kernels and the division height of sub-transform blocks are only for illustration. Without departing from the scope of the present disclosure, the application combination of transform kernels and the division height of sub-transform blocks can have different modes.
如图3(b)所示,当前编/解码块被垂直划分为三个部分(子变换块),在其中:最左侧部分为有残差部分(311),对于该有残差部分,在水平方向应用了DCT8变换核,在垂直方向应用了DST7变换核;中间部分为无残差部分(312),其残差被强制置为0;最右侧部分为有残差部分(313),对于该有残差部分,在水平方向应用了DST7变换核,在垂直方向应用了DST7变换核。此外,在该实施例中,3个子变换块的宽度分别为当前编/解码块宽度的1/4、1/2和1/4。上述的变换核的应用组合以及子变换块的划分高度仅用于说明,在不脱离本公开的范围内,变换核的应用组合以及子变换块的划分高度可以具有不同的方式。As shown in FIG3( b ), the current encoding/decoding block is vertically divided into three parts (sub-transform blocks), among which: the leftmost part is a residual part (311), for which the DCT8 transform kernel is applied in the horizontal direction and the DST7 transform kernel is applied in the vertical direction; the middle part is a non-residual part (312), whose residual is forced to be set to 0; the rightmost part is a residual part (313), for which the DST7 transform kernel is applied in the horizontal direction and the DST7 transform kernel is applied in the vertical direction. In addition, in this embodiment, the widths of the three sub-transform blocks are 1/4, 1/2 and 1/4 of the width of the current encoding/decoding block, respectively. The above-mentioned application combination of transform kernels and the division height of sub-transform blocks are only for illustration. Without departing from the scope of the present disclosure, the application combination of transform kernels and the division height of sub-transform blocks can have different modes.
图4示出了根据本公开实施例的用于编码中变换的方法的流程图。图4所示的用于编码中变换的方法的实施例仅用于说明,在不脱离本公开的范围的情况下,可以使用对图4所示出的实施例进行调整和修改。Figure 4 shows a flow chart of a method for transforming in coding according to an embodiment of the present disclosure. The embodiment of the method for transforming in coding shown in Figure 4 is for illustration only, and the embodiment shown in Figure 4 may be adjusted and modified without departing from the scope of the present disclosure.
如图4所示,用于编码中变换的方法开始于步骤101。在步骤101,根据当前编码块预测值和图像原始值得到当前编码块的残差。针对当前编码块,编码器需要在当前编码块之前已编码的参考图像中寻找一个与当前编码块匹配度较高的参考块,基于该参考块生成当前编码块的预测值。在不脱离本公开的范围的情况下,可以采用本领域中用于产生预测值的各种方法来生成当前编码块的预测值。通过将前编码块预测值和图像原始值进行比较,从而获得了当前编码块的残差。As shown in FIG4 , the method for transforming in coding starts at step 101. In step 101, the residual of the current coding block is obtained according to the prediction value of the current coding block and the original value of the image. For the current coding block, the encoder needs to find a reference block with a high matching degree with the current coding block in the reference image that has been encoded before the current coding block, and generate the prediction value of the current coding block based on the reference block. Without departing from the scope of the present disclosure, various methods for generating prediction values in the art can be used to generate the prediction value of the current coding block. By comparing the prediction value of the previous coding block with the original value of the image, the residual of the current coding block is obtained.
在步骤102,将当前编码块划分为n个子变换块,并对所生成的不同的子变换块的残差进行与该子变换块相对应的变换;通过对变换结果进行量化来得到子变换块的系数,并且对所述子变换块的系数进行系数编码,其中,n是大于等于3的整数。In step 102, the current coding block is divided into n sub-transform blocks, and the residuals of different generated sub-transform blocks are transformed corresponding to the sub-transform blocks; the coefficients of the sub-transform blocks are obtained by quantizing the transformation results, and the coefficients of the sub-transform blocks are coefficient encoded, where n is an integer greater than or equal to 3.
对于当前编码块的划分可以采用多种方式:在划分方向上,可以在水平方向上对编码块进行划分,如图3(a)所示;也可以在垂直方向上对编码块进行划分,如图3(b)所示。There are many ways to divide the current coding block: in the division direction, the coding block can be divided in the horizontal direction, as shown in Figure 3(a); the coding block can also be divided in the vertical direction, as shown in Figure 3(b).
此外,对于子变换块大小的划分存在多种方式,其中一种可能的方式如图3(a)所示,将当前编码块(宽为width,高为height)水平地划分为3个子变换块,3个子变换块的宽高分别为(width,height/4),(width,height/2)和(width,height/4);也可以如图3(b)所示,将当前编码块(宽为width,高为height)垂直地划分为3个子变换块,3个子变换块的宽高分别为(width/4,height),(width/2,height)和(width/4,height)。In addition, there are many ways to divide the sub-transform block size. One possible way is as shown in Figure 3(a), where the current coding block (width is width, height is height) is horizontally divided into three sub-transform blocks, and the width and height of the three sub-transform blocks are (width, height/4), (width, height/2) and (width, height/4) respectively; it is also possible to divide the current coding block (width is width, height is height) vertically into three sub-transform blocks, as shown in Figure 3(b), where the width and height of the three sub-transform blocks are (width/4, height), (width/2, height) and (width/4, height) respectively.
在对所生成的不同的子变换块的残差进行与该子变换块相对应的变换时,可以存在不同的方式。There may be different ways to perform a transform corresponding to the sub-transform block on the generated residual of the different sub-transform blocks.
一种可能的方式如图3(a)所示:对于最上层的子变换块(301),在水平方向上应用了DST7变换核,并且在垂直方向上应用了DCT8变换核;对于中间的子变换块(302)将其残差强制置为0,所以不需要进行变换;对于最下层的子变换块(303),在水平方向上应用了DST7变换核,并且在垂直方向上应用了DST7变换核。One possible approach is shown in FIG3(a): for the uppermost sub-transform block (301), the DST7 transform kernel is applied in the horizontal direction, and the DCT8 transform kernel is applied in the vertical direction; for the middle sub-transform block (302), its residual is forced to be 0, so no transformation is required; for the lowermost sub-transform block (303), the DST7 transform kernel is applied in the horizontal direction, and the DST7 transform kernel is applied in the vertical direction.
上述应用方法仅仅用于示例,对于图3(a)的划分情况,还可以采用不同的变换核的应用方式,例如,可以将最上层的子变换块(301)和最下层的子变换块(303)的残差都强制置为0,因此,对该两个子变换块不需要进行变换,而对中间的子变换块(302)在水平方向和垂直方向上都采用DCT2作为变换核。The above application method is only used as an example. For the division situation of Figure 3(a), different transformation kernel application methods can also be used. For example, the residuals of the uppermost sub-transform block (301) and the lowermost sub-transform block (303) can be forced to be 0. Therefore, the two sub-transform blocks do not need to be transformed, and DCT2 is used as the transformation kernel in both the horizontal and vertical directions for the middle sub-transform block (302).
另一种对所生成的不同的子变换块的残差进行与该子变换块相对应的变换的可能方式如图3(b)所示:对于最左侧的子变换块(311),在水平方向上应用了DCT8变换核,并且在垂直方向上应用了DST7变换核;对于中间的子变换块(312)将其残差强制置为0,所以不需要进行变换;对于最右侧的子变换块(313),在水平方向上应用了DST7变换核,并且在垂直方向上应用了DST7变换核。Another possible way to perform a transform corresponding to the generated residuals of different sub-transform blocks is shown in Figure 3(b): for the leftmost sub-transform block (311), the DCT8 transform kernel is applied in the horizontal direction and the DST7 transform kernel is applied in the vertical direction; for the middle sub-transform block (312), its residual is forced to 0, so no transformation is required; for the rightmost sub-transform block (313), the DST7 transform kernel is applied in the horizontal direction and the DST7 transform kernel is applied in the vertical direction.
上述应用方法仅仅用于示例,对于图3(b)的划分情况,还可以采用不同的变换核的应用方式,例如,可以将最左侧的子变换块(311)和最右侧的子变换块(313)的残差都强制置为0,因此,对该两个子变换块不需要进行变换,而对中间的子变换块(312)在水平方向和垂直方向上都采用DCT2作为变换核。The above application method is only used as an example. For the division situation of Figure 3(b), different transformation kernel application methods can also be used. For example, the residuals of the leftmost sub-transform block (311) and the rightmost sub-transform block (313) can be forced to be 0. Therefore, the two sub-transform blocks do not need to be transformed, and DCT2 is used as the transformation kernel in both the horizontal and vertical directions for the middle sub-transform block (312).
在步骤103,将所述系数编码的结果以及编码块划分子变换块的相应模式写入码流。In step 103, the result of the coefficient encoding and the corresponding mode of dividing the encoding block into sub-transform blocks are written into the bitstream.
可以采用不同的方式来将所述系数编码的结果以及编码块划分子变换块的相应模式写入码流。一种可能的实现方法为:先将当前编码块是否需要划分为子变换块的标识写入码流,然后将指示当前编码块划分为子变换块的块数的标识写入码流,此后将划分方向写入码流,最后将子变换块的系数编码的结果写入码流。上述写入的顺序也可以在本发明的范围内进行适当的变换和调整。Different methods can be used to write the coefficient encoding result and the corresponding mode of dividing the coding block into sub-transform blocks into the bitstream. One possible implementation method is: first write the identification of whether the current coding block needs to be divided into sub-transform blocks into the bitstream, then write the identification indicating the number of blocks into which the current coding block is divided into sub-transform blocks into the bitstream, then write the division direction into the bitstream, and finally write the result of the coefficient encoding of the sub-transform block into the bitstream. The order of the above writing can also be appropriately changed and adjusted within the scope of the present invention.
在其中,将指示当前编码块划分为子变换块的块数的标识写入码流的一种可能的方法为:在当前编码块的宽度和高度都小于预定阈值时,则不将指示当前编码块划分为子变换块的块数的标识和划分方向写入码流,否则,将指示当前编码块划分为子变换块的块数的标识写入码流,若划分的子变换块的块数大于等于3,继续将划分方向写入码流。A possible method for writing the identifier indicating the number of sub-transformation blocks into which the current coding block is divided into a bitstream is as follows: when the width and height of the current coding block are both smaller than a predetermined threshold, the identifier indicating the number of sub-transformation blocks into which the current coding block is divided and the division direction are not written into the bitstream; otherwise, the identifier indicating the number of sub-transformation blocks into which the current coding block is divided is written into the bitstream; if the number of sub-transformation blocks divided is greater than or equal to 3, the division direction continues to be written into the bitstream.
在其中,将划分方向写入码流的一种可能的方法为:如果当前编码块的宽和高的比值大于预定阈值,或者当前编码块的宽和高的比值小于预定阈值时,则不需要传输划分方向,否则将划分方向写入码流。Among them, a possible method of writing the division direction into the bitstream is: if the ratio of the width to the height of the current coding block is greater than a predetermined threshold, or the ratio of the width to the height of the current coding block is less than a predetermined threshold, then the division direction does not need to be transmitted, otherwise the division direction is written into the bitstream.
在其中,将划分方向写入码流的另一种可能的方法为:将当前编码块划分为子变换块的块数的标识写入码流后,如果确定划分的子变换块的块数大于等于3,则将划分方向写入码流。Another possible method of writing the division direction into the bitstream is: after writing the identifier of the number of sub-transformation blocks into which the current coding block is divided into the bitstream, if it is determined that the number of sub-transformation blocks divided is greater than or equal to 3, the division direction is written into the bitstream.
在其中,将子变换块的系数的系数编码结果写入码流的一种可能的方法为:不写入指示在每个子变换块中是否含有系数的标识(CBF,coding block flag),对于将当前编码块划分为3个子变换块的情况,编码端默认第一个子变换块系数为1,第二个子变换块系数为0,第三个子变换块系数为1。Among them, a possible method of writing the coefficient encoding result of the coefficient of the sub-transform block into the bitstream is: do not write an identifier (CBF, coding block flag) indicating whether each sub-transform block contains a coefficient. For the case where the current coding block is divided into 3 sub-transform blocks, the encoding end defaults to the first sub-transform block coefficient being 1, the second sub-transform block coefficient being 0, and the third sub-transform block coefficient being 1.
此外,将子变换块的系数的系数编码结果写入码流的一种可能的方法为:不写入指示在每个子变换块中是否含有系数的标识(CBF,coding block flag),对于将当前编码块划分为3个子变换块的情况,编码端默认第一个子变换块系数为0,第二个子变换块系数为1,第三个子变换块系数为0。In addition, a possible method for writing the coefficient encoding results of the coefficients of the sub-transform block into the bitstream is: do not write an identifier (CBF, coding block flag) indicating whether each sub-transform block contains a coefficient. For the case where the current coding block is divided into 3 sub-transform blocks, the encoding end defaults the coefficient of the first sub-transform block to 0, the coefficient of the second sub-transform block to 1, and the coefficient of the third sub-transform block to 0.
图5示出了根据本公开实施例的用于解码中变换的方法的流程图。图5所示的用于解码中变换的方法的实施例仅用于说明,在不脱离本公开的范围的情况下,可以使用对图5所示出的实施例进行调整和修改。Figure 5 shows a flow chart of a method for transforming in decoding according to an embodiment of the present disclosure. The embodiment of the method for transforming in decoding shown in Figure 5 is for illustration only, and adjustments and modifications may be made to the embodiment shown in Figure 5 without departing from the scope of the present disclosure.
如图5所示,用于解码中变换的方法开始于步骤201。在步骤201,从码流中解析当前解码块被划分为子变换块的模式信息和子变换块的系数(子变换块的残差)。As shown in Fig. 5, the method for transform in decoding starts at step 201. At step 201, the mode information of dividing the current decoding block into sub-transform blocks and the coefficients of the sub-transform blocks (residuals of the sub-transform blocks) are parsed from the code stream.
对于从码流中解析当前解码块被划分为子变换块的模式和子变换块的系数可以存在多种方法,一种可能的实现方法为:先解析当前解码块是否被划分为子变换块的标识,然后解析指示当前解码块被划分为子变换块的块数的标识,此后解析当前解码块的划分方向,最后解析子变换块的系数。上述解析的顺序也可以在本发明的范围内进行适当的变换和调整。There are multiple methods for parsing the mode of dividing the current decoded block into sub-transform blocks and the coefficients of the sub-transform blocks from the bitstream. One possible implementation method is: first parse the flag of whether the current decoded block is divided into sub-transform blocks, then parse the flag indicating the number of sub-transform blocks into which the current decoded block is divided, then parse the division direction of the current decoded block, and finally parse the coefficients of the sub-transform blocks. The above parsing order can also be appropriately changed and adjusted within the scope of the present invention.
在其中,解析指示当前解码块被划分为子变换块的块数的标识的一种可能的方法为:在当前解码块宽和高都小于预定阈值时,则不解析指示当前解码块被划分为子变换块的块数的标识和划分方向,此时不采用本申请的技术;否则,解析指示当前解码块被划分为子变换块的块数的标识,若子变换块的块数大于等于3,则继续解析划分方向。A possible method for parsing the identifier indicating the number of sub-transform blocks into which the current decoding block is divided is as follows: when the width and height of the current decoding block are both smaller than a predetermined threshold, the identifier indicating the number of sub-transform blocks into which the current decoding block is divided and the division direction are not parsed, and the technology of the present application is not adopted at this time; otherwise, the identifier indicating the number of sub-transform blocks into which the current decoding block is divided is parsed, and if the number of sub-transform blocks is greater than or equal to 3, the division direction is continued to be parsed.
在其中,解析划分方向的一种可能的方法为:如果当前解码块的宽和高的比值大于预定阈值,或者当前解码块的宽和高的比值小于预定阈值,则不解析划分方向,否则,解析划分方向。A possible method for parsing the division direction is: if the ratio of the width to the height of the current decoded block is greater than a predetermined threshold, or the ratio of the width to the height of the current decoded block is less than a predetermined threshold, then the division direction is not parsed; otherwise, the division direction is parsed.
在其中,解析划分方向的另一种可能的方法为:解析完子变换块的块数后,如果划分的子变换块的块数大于等于3,则解析划分方向。Another possible method for parsing the division direction is: after parsing the number of blocks of the sub-transform block, if the number of blocks of the divided sub-transform block is greater than or equal to 3, then the division direction is parsed.
在其中,解析子变换块的系数的一种可能的方法为:不解析指示每个子变换块中是否含有系数的标识(CBF,coding block flag),对于将当前解码块划分为3个子变换块的情况,解码端默认第一个子变换块系数为1,第二个子变换块系数为0,第三个子变换块系数为1。Among them, a possible method for parsing the coefficients of the sub-transform blocks is: not parsing the flag (CBF, coding block flag) indicating whether each sub-transform block contains coefficients. When the current decoding block is divided into 3 sub-transform blocks, the decoding end defaults to the first sub-transform block coefficient being 1, the second sub-transform block coefficient being 0, and the third sub-transform block coefficient being 1.
此外,解析子变换块的系数的一种可能的方法为:不解析指示每个子变换块中是否含有系数的标识(CBF,coding block flag),对于将当前解码块划分为3个子变换块的情况,解码端默认第一个子变换块系数为0,第二个子变换块系数为1,第三个子变换块系数为0。In addition, a possible method for parsing the coefficients of the sub-transform blocks is: not parsing the flag (CBF, coding block flag) indicating whether each sub-transform block contains coefficients. When the current decoding block is divided into 3 sub-transform blocks, the decoding end defaults to the first sub-transform block coefficient being 0, the second sub-transform block coefficient being 1, and the third sub-transform block coefficient being 0.
在步骤202,根据编码块划分子变换块的相应模式将当前解码块划分为n个子变换块,并对不同的子变换块的系数进行与该子变换块相对应的反变换,以获得子变换块的残差,其中,n是大于等于3的整数。In step 202, the current decoding block is divided into n sub-transform blocks according to the corresponding mode of dividing the coding block into sub-transform blocks, and the coefficients of different sub-transform blocks are inversely transformed corresponding to the sub-transform blocks to obtain residuals of the sub-transform blocks, where n is an integer greater than or equal to 3.
对于当前解码块的划分可以采用多种方式:在划分方向上,可以在水平方向上对解码块进行划分,如图3(a)所示;也可以在垂直方向上对解码块进行划分,如图3(b)所示。There are many ways to divide the current decoding block: in the division direction, the decoding block can be divided in the horizontal direction, as shown in FIG. 3( a ); the decoding block can also be divided in the vertical direction, as shown in FIG. 3( b ).
此外,对于子变换块大小的划分存在多种方式,其中一种可能的方式如图3(a)所示,将当前解码块(宽为width,高为height)水平地划分为3个子变换块,3个子变换块的宽高分别为(width,height/4),(width,height/2)和(width,height/4);也可以如图3(b)所示,将当前解码块(宽为width,高为height)垂直地划分为3个子变换块,3个子变换块的宽高分别为(width/4,height),(width/2,height)和(width/4,height)。In addition, there are many ways to divide the sub-transform block size. One possible way is shown in Figure 3(a), where the current decoding block (width is width, height is height) is horizontally divided into three sub-transform blocks, and the width and height of the three sub-transform blocks are (width, height/4), (width, height/2) and (width, height/4) respectively; it is also possible to divide the current decoding block (width is width, height is height) vertically into three sub-transform blocks, as shown in Figure 3(b), where the width and height of the three sub-transform blocks are (width/4, height), (width/2, height) and (width/4, height) respectively.
在对所生成的不同的子变换块采用与该子变换块相对应的变换核进行反变换时,可以存在不同的方式。There may be different ways to perform inverse transformation on the generated different sub-transform blocks using the transformation kernel corresponding to the sub-transform blocks.
一种可能的方式如图3(a)所示:对于最上层的子变换块(301),在水平方向上应用了DST7变换核来进行反变换,并且在垂直方向上应用了DCT8变换核进行反变换;对于中间的子变换块(302)将其残差强制置为0,所以不需要进行反变换;对于最下层的子变换块(303),在水平方向上应用了DST7变换核进行反变换,并且在垂直方向上应用了DST7变换核进行反变换。One possible approach is shown in FIG3(a): for the uppermost sub-transform block (301), the DST7 transform kernel is applied in the horizontal direction for inverse transform, and the DCT8 transform kernel is applied in the vertical direction for inverse transform; for the middle sub-transform block (302), its residual is forced to be set to 0, so there is no need for inverse transform; for the lowermost sub-transform block (303), the DST7 transform kernel is applied in the horizontal direction for inverse transform, and the DST7 transform kernel is applied in the vertical direction for inverse transform.
上述应用方法仅仅用于示例,对于图3(a)的划分情况,还可以采用不同的变换核的应用方式,例如,可以将最上层的子变换块(301)和最下层的子变换块(303)的残差都强制置为0,因此,对该两个子变换块不需要进行反变换,而对中间的子变换块(302)在水平方向和垂直方向上都采用DCT2作为变换核来进行反变换。The above application method is only used as an example. For the division situation of Figure 3(a), different transformation kernel application methods can also be used. For example, the residuals of the uppermost sub-transform block (301) and the lowermost sub-transform block (303) can be forced to be 0. Therefore, there is no need to perform inverse transformation on the two sub-transform blocks, and DCT2 is used as the transformation kernel for inverse transformation in both the horizontal and vertical directions for the middle sub-transform block (302).
另一种对所生成的不同的子变换块进行与该子变换块相对应的反变换的可能方式如图3(b)所示:对于最左侧的子变换块(311),在水平方向上应用了DCT8变换核来进行反变换,并且在垂直方向上应用了DST7变换核进行反变换;对于中间的子变换块(312)将其残差强制置为0,所以不需要进行发变换;对于最右侧的子变换块(313),在水平方向上应用了DST7变换核来进行反变换,并且在垂直方向上应用了DST7变换核来进行反变换。Another possible way to perform inverse transforms corresponding to the generated different sub-transform blocks is shown in Figure 3(b): for the leftmost sub-transform block (311), the DCT8 transform kernel is applied in the horizontal direction for inverse transform, and the DST7 transform kernel is applied in the vertical direction for inverse transform; for the middle sub-transform block (312), its residual is forced to 0, so no inverse transform is required; for the rightmost sub-transform block (313), the DST7 transform kernel is applied in the horizontal direction for inverse transform, and the DST7 transform kernel is applied in the vertical direction for inverse transform.
上述应用方法仅仅用于示例,对于图3(b)的划分情况,还可以采用不同的变换核的应用方式,例如,可以将最左侧的子变换块(311)和最右侧的子变换块(313)的残差都强制置为0,因此,对该两个子变换块不需要进行反变换,而对中间的子变换块(312)在水平方向和垂直方向上都采用DCT2作为变换核来进行反变换。The above application method is only used as an example. For the division situation of Figure 3(b), different transformation kernel application methods can also be used. For example, the residuals of the leftmost sub-transform block (311) and the rightmost sub-transform block (313) can be forced to be 0. Therefore, there is no need to perform inverse transformation on these two sub-transform blocks, and DCT2 is used as the transformation kernel for inverse transformation in both the horizontal and vertical directions for the middle sub-transform block (312).
在步骤203处,通过当前解码块的子变换块的残差来重建图像。通过在步骤202中获得的子变换块的残差以及当前解码块的预测值,重建当前解码块,从而实现图像的重建。At step 203, the image is reconstructed by the residual of the sub-transform block of the current decoded block. The current decoded block is reconstructed by the residual of the sub-transform block obtained in step 202 and the prediction value of the current decoded block, thereby achieving image reconstruction.
图6示出了根据本公开实施例的用于执行编码中变换的方法的装置的框图。图6所示的用于执行编码中变换的方法的装置的实施例仅用于说明,在不脱离本公开的范围的情况下,可以使用对图6所示出的实施例进行调整和修改。FIG6 shows a block diagram of an apparatus for performing a method for transforming in coding according to an embodiment of the present disclosure. The embodiment of the apparatus for performing a method for transforming in coding shown in FIG6 is for illustration only, and adjustments and modifications may be made to the embodiment shown in FIG6 without departing from the scope of the present disclosure.
在图6中,用于执行编码中变换的方法的装置包括:预测单元(601)、变换单元(602)以及写入单元(603)。在其中,预测单元(601)接收原始图像数据,并且用于预测图像数据中当前编码块的预测值,以及根据图像数据的原始值得到当前编码块的残差。所述变换单元(602)与所述预测单元(601)耦接,并且被配置为根据当前编码块划分子变换块的模式信息,将图像数据的当前编码块划分为n个子变换块,并对所生成的不同的子变换块的残差进行与该子变换块相对应的变换;通过对变换结果进行量化来得到子变换块的系数,并且对所述子变换块的系数进行系数编码,其中,n是大于等于3的整数。所述写入单元(603)与所述转换单元(602)耦接,并且将编码块划分子变换块的相应模式以及所述子变换块的系数编码结果写入到码流中。In FIG6 , the apparatus for performing the method of transform in coding includes: a prediction unit (601), a transform unit (602) and a write unit (603). The prediction unit (601) receives original image data and is used to predict the prediction value of the current coding block in the image data, and obtain the residual of the current coding block according to the original value of the image data. The transform unit (602) is coupled to the prediction unit (601) and is configured to divide the current coding block of the image data into n sub-transform blocks according to the mode information of dividing the current coding block into sub-transform blocks, and perform a transform corresponding to the sub-transform block on the residuals of the generated different sub-transform blocks; obtain the coefficients of the sub-transform blocks by quantizing the transform results, and perform coefficient encoding on the coefficients of the sub-transform blocks, wherein n is an integer greater than or equal to 3. The write unit (603) is coupled to the conversion unit (602) and writes the corresponding mode of dividing the coding block into the sub-transform blocks and the coefficient encoding result of the sub-transform blocks into the bitstream.
图7示出了根据本公开实施例的用于执行解码中变换的方法的装置的框图。图7所示的用于执行解码中变换的方法的装置的实施例仅用于说明,在不脱离本公开的范围的情况下,可以使用对图7所示出的实施例进行调整和修改。FIG7 shows a block diagram of an apparatus for performing a method for transforming in decoding according to an embodiment of the present disclosure. The embodiment of the apparatus for performing a method for transforming in decoding shown in FIG7 is for illustration only, and adjustments and modifications may be made to the embodiment shown in FIG7 without departing from the scope of the present disclosure.
参考图7,用于执行解码中变换的方法的装置包括:解析单元(701)、变换单元(702)以及重建单元(703)。在其中,所述解析单元(701)接收来自编码端的码流,并且用于解析当前解码块划分子变换块的模式信息和子变换块的系数。所述变换单元(702)与所述解析单元(701)耦接,并且被配置为根据编码块划分子变换块的相应模式将当前解码块划分为n个子变换块,并对不同的子变换块的系数进行与该子变换块相对应的反变换,以获得子变换块的残差,其中,n是大于等于3的整数。所述重建单元(703)与所述转换单元(702)耦接,并且被配置为通过当前解码块的子变换块的残差以及当前解码块的预测值,重建图像。Referring to FIG7 , the apparatus for performing the method of transform in decoding includes: a parsing unit (701), a transform unit (702) and a reconstruction unit (703). The parsing unit (701) receives a code stream from an encoding end and is used to parse the mode information of dividing the current decoding block into sub-transform blocks and the coefficients of the sub-transform blocks. The transform unit (702) is coupled to the parsing unit (701) and is configured to divide the current decoding block into n sub-transform blocks according to the corresponding mode of dividing the coding block into sub-transform blocks, and perform an inverse transform corresponding to the sub-transform blocks on the coefficients of different sub-transform blocks to obtain the residual of the sub-transform block, wherein n is an integer greater than or equal to 3. The reconstruction unit (703) is coupled to the conversion unit (702) and is configured to reconstruct an image through the residual of the sub-transform block of the current decoding block and the prediction value of the current decoding block.
尽管已经用示例性实施例描述了本公开,但是可以向本领域技术人员建议各种改变和修改。本公开旨在涵盖落入所附权利要求范围内的这种改变和修改。Although the present disclosure has been described with exemplary embodiments, various changes and modifications may be suggested to one skilled in the art. The present disclosure is intended to encompass such changes and modifications as fall within the scope of the appended claims.
本申请中的任何描述都不应被理解为暗示任何特定的元件、步骤或功能是必须包括在权利要求范围内的必要元件。专利主题的范围仅由权利要求限定。Any description in this application should not be construed as implying that any particular element, step, or function is an essential element that must be included in the claims scope. The scope of the patented subject matter is limited solely by the claims.
Claims (50)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911204521.8A CN112887734B (en) | 2019-11-29 | 2019-11-29 | Method and device for transforming in video image encoding and decoding |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911204521.8A CN112887734B (en) | 2019-11-29 | 2019-11-29 | Method and device for transforming in video image encoding and decoding |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112887734A CN112887734A (en) | 2021-06-01 |
CN112887734B true CN112887734B (en) | 2024-10-15 |
Family
ID=76038877
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911204521.8A Active CN112887734B (en) | 2019-11-29 | 2019-11-29 | Method and device for transforming in video image encoding and decoding |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112887734B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110324668A (en) * | 2018-03-31 | 2019-10-11 | 华为技术有限公司 | The inverse transform method and device in transform method, decoding in image block coding |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101457894B1 (en) * | 2009-10-28 | 2014-11-05 | 삼성전자주식회사 | Method and apparatus for encoding image, and method and apparatus for decoding image |
CN104270641B (en) * | 2014-09-30 | 2018-12-14 | 杭州华为数字技术有限公司 | The treating method and apparatus of transformation coefficient |
US9807423B1 (en) * | 2015-11-24 | 2017-10-31 | Google Inc. | Hybrid transform scheme for video coding |
US11265578B2 (en) * | 2016-02-04 | 2022-03-01 | Samsung Electronics Co., Ltd. | Video decoding method and apparatus by chroma-multi-transform, and video encoding method and apparatus by chroma-multi-transform |
US11095892B2 (en) * | 2016-09-20 | 2021-08-17 | Kt Corporation | Method and apparatus for processing video signal |
WO2018092868A1 (en) * | 2016-11-21 | 2018-05-24 | パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ | Coding device, decoding device, coding method, and decoding method |
CN110392256B (en) * | 2019-03-09 | 2020-12-11 | 杭州海康威视数字技术股份有限公司 | Method, encoding end, decoding end and system for encoding and decoding |
CN110234008B (en) * | 2019-03-11 | 2020-06-16 | 杭州海康威视数字技术股份有限公司 | Encoding method, decoding method and device |
-
2019
- 2019-11-29 CN CN201911204521.8A patent/CN112887734B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110324668A (en) * | 2018-03-31 | 2019-10-11 | 华为技术有限公司 | The inverse transform method and device in transform method, decoding in image block coding |
Also Published As
Publication number | Publication date |
---|---|
CN112887734A (en) | 2021-06-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7384736B2 (en) | Method and apparatus for video encoding and video decoding of binary sets using adaptive tree selection | |
KR101375668B1 (en) | Method and apparatus for encoding transformed coefficients and method and apparatus for decoding transformed coefficients | |
US9380308B2 (en) | Method of coding and decoding images, coding and decoding device and computer programs corresponding thereto | |
US20060078049A1 (en) | Method and system for entropy coding/decoding of a video bit stream for fine granularity scalability | |
KR101344973B1 (en) | Adaptive entropy coding for images and videos using set partitioning in generalized hierarchical trees | |
CN100403801C (en) | A context-based adaptive entropy encoding/decoding method | |
Le et al. | Mobilecodec: neural inter-frame video compression on mobile devices | |
CN107925763A (en) | The transcoding, coding transform method and apparatus of the selection of block level transforming and implicit signaling in Multi-level segmentation | |
RU2555226C2 (en) | Encoding signal into scalable bitstream and decoding said bitstream | |
CN108965887B (en) | Video information hiding method and device based on inter-block decoupling | |
CN101321283B (en) | Codec methods and codecs compatible with different size block transformations | |
CN101742330B (en) | Image coding method and device | |
JP2002016925A (en) | Encoding device and method | |
CN101366282A (en) | Method and apparatus for encoding and decoding video signals on a group basis | |
TWI804999B (en) | Encoding and decoding a picture | |
CN112887734B (en) | Method and device for transforming in video image encoding and decoding | |
US7643689B2 (en) | Encoded data conversion method | |
RU2434356C2 (en) | Creating watermarks in coded information content | |
CN112204979A (en) | Data dependency in coding/decoding | |
CN120186325A (en) | Video encoding and decoding method and device, computer readable medium and electronic equipment | |
WO2019181354A1 (en) | Video encoding device, method and program, and video decoding device, method and program | |
KR20060103409A (en) | Method and apparatus for region of interest coding and decoding with slice structure | |
JPH11331612A (en) | Picture processor, its method and storage medium | |
JP2001223593A (en) | Data coding method and system, and recording medium | |
WO2019181353A1 (en) | Video encoding device, method and program, and video decoding device, method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |