Context modeling for simplified quadratic transforms in video

文档序号:411941 发布日期:2021-12-17 浏览:2次 中文

阅读说明:本技术 视频中的简化二次变换的上下文建模 (Context modeling for simplified quadratic transforms in video ) 是由 张莉 张凯 刘鸿彬 王悦 于 2020-05-11 设计创作,主要内容包括:提供了一种视频处理方法,包括:执行视频的当前视频块和视频的编解码表示之间的转换,其中执行转换包括基于视频的当前视频块的特性来配置用于对二进制位进行编解码或对与二次变换工具的索引相对应的二进制位串的二进制位进行旁路编解码的上下文模型,其中索引指示二次变换工具的应用性和/或二次变换工具的核信息,并且其中二次变换工具包括在编码期间,在量化之前对应用于视频块的残差的正一次变换的输出应用正二次变换,或者其中二次变换工具包括在解码期间,在应用逆一次变换之前对视频块的解量化的输出应用逆二次变换。(There is provided a video processing method comprising: performing a transformation between a current video block of a video and a codec representation of the video, wherein performing the transformation comprises configuring a context model for coding or bypass coding of bins of a bin string corresponding to an index of a secondary transformation tool based on a characteristic of the current video block of the video, wherein the index indicates applicability of the secondary transformation tool and/or kernel information of the secondary transformation tool, and wherein the secondary transformation tool comprises applying a positive secondary transformation to an output of the positive primary transformation corresponding to a residue of the video block prior to quantization during encoding, or wherein the secondary transformation tool comprises applying an inverse secondary transformation to an output of a dequantization of the video block prior to applying the inverse primary transformation during decoding.)

1. A video processing method, comprising:

a conversion between a current video block of video and a codec representation of the video is performed,

wherein performing the conversion comprises configuring a context model for coding or bypass coding bits of a bin string corresponding to an index of a secondary transform tool based on a characteristic of a current video block of the video,

wherein the index indicates applicability of the secondary transformation tool and/or core information of the secondary transformation tool, and

wherein the secondary transform means comprises applying a positive secondary transform to the output of the positive primary transform applied to the residual of the video block prior to quantization, or

Wherein the secondary transform means comprises applying an inverse secondary transform to the dequantized output of the video block prior to applying the inverse primary transform during decoding.

2. The method of claim 1, wherein the quadratic transform tool corresponds to a low frequency undifferentiated transform (LFNST) tool.

3. The method according to claim 1, wherein the context model allows the first bin and/or the second bin to be coded with only one context or to be bypassed.

4. The method of claim 1, wherein a characteristic is an enablement of explicit or implicit multi-transform selection (MTS).

5. The method of claim 4, wherein, with explicit multiple transform selection enabled, a context is selected based on a type of intra prediction mode applied to a current video block, the type of intra prediction mode being used to select a context for another block.

6. The method of claim 5, wherein a context is selected based on a size of a current video block.

7. The method of claim 4, wherein a transform matrix basis is used instead of checking a transform index for explicit Multiple Transform Selection (MTS) coding.

8. The method of claim 1, wherein the characteristic is an enablement of a cross-component linear model (CCLM) codec mode that uses a linear mode to derive a prediction value for a chroma component of the current video block.

9. The method of claim 1, wherein an enablement of a cross-component linear model (CCLM) codec mode that uses a linear mode to derive a prediction value for a chroma component of a current video block determines an enablement or selection of a context model for coding an index of a secondary transform tool.

10. The method of claim 1, wherein the enabling or selection of the context model for coding the index of the quadratic transform tool depends on whether a chroma block of a current video block is coded in a DM mode in which the chroma block inherits the same intra prediction coding mode of a corresponding luma block.

11. The method of claim 1, wherein the characteristic is a size of the current video block.

12. The method of claim 1, wherein the characteristic is a partitioning depth of a partitioning process applied to the current video block.

13. The method of claim 12, wherein the partitioning process is a Quadtree (QT) partitioning process, a Binary Tree (BT) partitioning process, or a Ternary Tree (TT) partitioning process.

14. The method of claim 1, wherein a characteristic is a color format or a color component of a current video block.

15. The method of claim 1, wherein a characteristic excludes an index of a multi-transform selection (MTS) process and/or an intra prediction mode of a current video block.

16. The method of any of claims 1 to 15, wherein performing a conversion comprises generating a codec representation from a video or generating a video from a codec representation.

17. An apparatus in a video system comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to implement the method of any of claims 1-16.

18. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method of any of claims 1 to 16.

Technical Field

This patent document relates to video processing techniques, devices, and systems.

Background

Despite advances in video compression, digital video still accounts for the largest bandwidth usage on the internet and other digital communication networks. As the number of connected user devices capable of receiving and displaying video increases, the bandwidth requirements for pre-counting the use of digital video will continue to grow.

Disclosure of Invention

To apparatus, systems, and methods of digital video processing, and in particular, to context modeling for residual coding in video processing. The described method may be applied to existing video codec standards, such as High Efficiency Video Codec (HEVC), and future video codec standards or video codecs.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: performing a conversion between a current video block of video and a codec representation of the video, wherein the conversion comprises: selecting a transform set or a transform matrix for a current video block of the video to be used in application of a quadratic transform tool to the current video block based on a characteristic of the current video block; and applying the selected transform set or transform matrix to the current video block, and wherein, using a quadratic transform tool: a forward secondary transform is applied to the output of the forward transform applied to the residual of the current video block prior to quantization during encoding, or an inverse secondary transform is applied to the output of the dequantization of the current video block prior to application of the inverse primary transform during decoding.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: performing a transformation between a current video block of the video and a codec representation of the video, wherein the transformation comprises applying a quadratic transformation tool to a sub-region of the current video block that is not the top left portion of the current video block, and wherein, using the quadratic transformation tool: a forward secondary transform is applied to the output of the forward primary transform applied to the residuals of the sub-regions of the current video block prior to quantization during encoding, or an inverse secondary transform is applied to the output of the dequantization of the sub-regions of the current video block prior to application of the inverse primary transform during decoding.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: determining applicability of a secondary transform tool to a current video block of a current picture of a video for a transition between the current video block and a codec representation of the video due to rules related to an intra prediction direction used to codec the current video block, use of the codec tool, and/or a color component of the video from which the current video block is derived; and performing a conversion based on the determination.

In another representative aspect, the disclosed techniques can be used to provide a method for video processing. The method comprises the following steps: performing a transformation between a current video block of a video and a codec representation of the video, wherein the codec representation complies with a format rule that specifies a last non-zero coefficient in a residual of the current video block and controls whether or how side information about a secondary transform tool is included in the codec representation, and wherein the secondary transform tool comprises applying, during encoding, a positive secondary transform to an output of a positive primary transform applied to the residual of the video block prior to quantization, or applying, during decoding, an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: performing a transformation between a current video block of a video and a codec representation of the video, wherein the codec representation conforms to one or more coefficients in a residual specifying a portion of the current video block and controls a format rule regarding whether or how side information of a secondary transform tool is included in the codec representation, and wherein the secondary transform tool comprises applying, during encoding, a positive secondary transform to an output of the positive transform applied to the residual of the video block prior to quantization or applying, during decoding, an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: performing a transform between a current video block of a video and a codec representation of the video, wherein performing the transform comprises determining applicability of a secondary transform tool to the current video block based on presence of non-zero coefficients in one or more codec groups of the current video block, and wherein the secondary transform tool comprises applying a positive secondary transform to an output of a positive primary transform applied to a residual of the video block prior to quantization during encoding or applying an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform during decoding.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: performing a transform between a current video block of a video and a codec representation of the current video block, wherein the codec representation complies with a format rule specifying that syntax elements corresponding to side information of a secondary transform tool of the current video block are signaled in the codec representation prior to transform related information, wherein the secondary transform tool comprises applying a positive secondary transform to an output of a positive primary transform applied to a residual of the video block prior to quantization during encoding or applying an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform during decoding.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: performing a transformation between a current video block of a video and a codec representation of the video, wherein the codec representation complies with a format rule specifying that syntax elements corresponding to side information of a secondary transform tool for the current video block are signaled in the codec representation before residual codec information, wherein the secondary transform tool comprises applying a positive secondary transform to an output of a positive primary transform for a residual of the video block before quantization during encoding or applying an inverse secondary transform to an output of a dequantization of the video block before applying the inverse primary transform during decoding.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: performing a transform between a current video block of the video and a codec representation of the video, wherein performing the transform comprises codec a residual of the current video block according to a rule based on information related to a secondary transform tool, wherein the secondary transform tool comprises applying a positive secondary transform to an output of the positive primary transform applied to the residual of the video block prior to quantization during encoding or applying an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform during decoding.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: performing a transformation between a current video block of video and a codec representation of the video, wherein performing the transformation includes applying arithmetic codec to one or more portions of the current video block using different context modeling methods according to rules.

In another representative aspect, the disclosed techniques can be used to provide a method for video processing. The method includes performing a transform between a current video block of the video and a codec representation of the video, wherein performing the transform includes configuring a context model for coding or bypass coding bits of a bin string corresponding to an index of a secondary transform tool based on characteristics of the current video block of the video, wherein the index indicates applicability of the secondary transform tool and/or kernel information of the secondary transform tool, and wherein the secondary transform tool includes applying a positive secondary transform to an output of the positive primary transform for a residual of the video block prior to quantization during encoding, or wherein the secondary transform tool includes applying an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform during decoding.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: performing a transform between a current video block of the video and a codec representation of the current video block, wherein performing the transform comprises determining whether a syntax element is included in the codec representation based on a size of the current video block, wherein the syntax element corresponds to side information for which a secondary transform tool includes at least one of an indication to apply a secondary transform and an index of a transform kernel used in the secondary transform process, and wherein using the secondary transform, an inverse secondary transform is used to decode the codec representation and is applied to a dequantized output of the current video block prior to applying the inverse primary transform.

In one representative aspect, the disclosed technology can be used to provide a method for video processing. The method comprises the following steps: performing a transform between a current video block of the video and a codec representation of the current video block, wherein performing the transform comprises determining whether a syntax element is included in the codec representation of the current video block based on a size of the current video block, wherein the syntax element corresponds to side information for which a secondary transform comprises at least one of an indication to apply the secondary transform and an index of a transform kernel used in the secondary transform process, and wherein using the secondary transform, the positive secondary transform is used to encode the current video block and is applied to an output of the primary transform of the current video block prior to applying the quantization process.

In yet another representative aspect, the above-described methods are embodied in the form of processor-executable code and stored in a computer-readable program medium.

In yet another representative aspect, an apparatus configured or operable to perform the above-described method is disclosed. The apparatus may include a processor programmed to implement the method.

In yet another representative aspect, a video decoder device may implement the methods described herein.

The above and other aspects and features of the disclosed technology are described in more detail in the accompanying drawings, description and claims.

Drawings

Fig. 1 shows a block diagram of an example encoder.

Fig. 2 shows an example of 67 intra prediction modes.

Fig. 3 shows an example of ALWIP for a 4 × 4 block.

Fig. 4 shows an example of ALWIP for an 8 × 8 block.

Fig. 5 shows an example of ALWIP for an 8 × 4 block.

Fig. 6 shows an example of ALWIP for a 16 × 16 block.

Fig. 7 shows an example of four reference lines adjacent to a prediction block.

Fig. 8 shows examples of the division of 4 × 8 and 8 × 4 blocks.

Fig. 9 shows an example of division of all blocks except for 4 × 8, 8 × 4, and 4 × 4.

Fig. 10 shows an example of quadratic transformation of JEM.

Fig. 11 shows an example of the proposed simplified quadratic transformation (RST).

Fig. 12 shows examples of a forward simplified transform and an inverse simplified transform.

Fig. 13 shows an example of a positive RST 8x8 process utilizing a 16x48 matrix.

Fig. 14 shows an example of a return-to-zero (zero-out) region of an 8 × 8 matrix.

FIG. 15 shows examples of sub-block transform modes SBT-V and SBT-H

Fig. 16 shows an example of a diagonal upper-right scan order of a 4 × 4 codec group.

Fig. 17 shows an example of a diagonal upper-right scan order of an 8 × 8 block having a coding-decoding group of size 4 × 4.

FIG. 18 shows an example of a template for selecting a probabilistic model.

Fig. 19 shows an example of two scalar quantizers for dependent quantization.

Fig. 20 shows an example of the proposed state transitions and quantizer selection depending on the quantization process.

Fig. 21 is an example of an 8 × 8 block having 4 coding-decoding groups.

Fig. 22A and 22B are block diagrams of examples of hardware platforms for implementing the visual media decoding or visual media encoding techniques described in this document.

Fig. 23A and 23B show a flow diagram of an example method for video processing.

Detailed Description

Embodiments of the disclosed techniques may be applied to existing video codec standards (e.g., HEVC, h.265) and future standards to improve compression performance. Section headings are used in this document to enhance readability of the description, and do not limit the discussion or the embodiments (and/or implementations) in any way to only the corresponding sections.

2 video codec introduction

Due to the increasing demand for higher resolution video, video coding methods and techniques are ubiquitous in modern technology. Video codecs typically include electronic circuits or software that compress or decompress digital video and are continually being improved to provide higher codec efficiency. Video codecs convert uncompressed video into a compressed format and vice versa. There is a complex relationship between video quality, the amount of data used to represent the video (as determined by the bit rate), the complexity of the encoding and decoding algorithms, susceptibility to data loss and errors, ease of editing, random access, and end-to-end delay (latency). The compression format typically conforms to a standard video compression specification, such as the High Efficiency Video Codec (HEVC) standard (also known as h.265 or MPEG-H Part 2), the multifunctional video codec standard to be finalized, or other current and/or future video codec standards.

The video codec standard has evolved largely through the development of the well-known ITU-T and ISO/IEC standards. ITU-T has established H.261 and H.263, ISO/IEC has established MPEG-1 and MPEG-4 visualizations, and these two organizations have jointly established the H.262/MPEG-2 Video and H.264/MPEG-4 Advanced Video Coding (AVC) and H.265/HEVC standards. Since h.262, video codec standards have been based on hybrid video codec structures, in which temporal prediction plus transform coding is utilized. In order to explore future Video coding and decoding technologies beyond HEVC, VCEG and MPEG united in 2015 to form Joint Video Exploration Team (jfet). Thereafter, JFET adopted many new methods and placed them into a reference software named Joint Exploration Model (JEM) [3] [4 ]. In month 4 of 2018, the joint Video experts group (jviet) between VCEG (Q6/16) and ISO/IEC JTC1 SC29/WG11(MPEG) holds in an effort to the VVC (Versatile Video Coding) standard, with a 50% reduction in bitrate compared to HEVC.

2.1 codec flow for typical video codecs

Fig. 1 shows an example of an encoder block diagram for a VVC, which contains three in-loop filter blocks: deblocking Filter (DF), Sample Adaptive Offset (SAO), and ALF. Unlike DF using predefined filters, SAO and ALF utilize the original samples of the current picture, signaling the offsets and the codec side information of the filter coefficients, reducing the mean square error between the original samples and the reconstructed samples by adding the offsets and by applying a Finite Impulse Response (FIR) filter, respectively. ALF is located in the last processing stage of each picture and can be viewed as a tool trying to capture and fix artifacts (artifacts) created by previous stages.

2.2 Intra coding in VVC

2.2.1 Intra mode codec with 67 Intra prediction modes

To capture any edge direction present in natural video, the number of directional intra modes extends from 33 to 65 used in HEVC. The additional directional mode is depicted as a dashed arrow in fig. 2, and the planar mode and the DC mode remain unchanged. These dense directional intra prediction modes are applicable to all block sizes as well as luma and chroma intra prediction.

The conventional angular intra prediction direction is defined as from 45 degrees to-135 degrees in the clockwise direction as shown in fig. 2. In VTM2, several conventional angular intra prediction modes are adaptively replaced with wide angular intra prediction modes for non-square blocks. The alternative patterns are signaled using the original method and remapped to the indices of the wide-angle pattern after parsing. The total number of intra prediction modes is unchanged, 67, and the intra mode codec is unchanged.

In HEVC, each intra coded block has a square shape with a length of each side being a power of 2. Therefore, no division operation is required to generate the intra prediction value using the DC mode. In VVV2, chunks may have a rectangular shape, which typically requires the use of a division operation for each chunk. To avoid division operations for DC prediction, only the longer edges are used to calculate the average of the non-square blocks.

In addition to 67 intra prediction modes, Wide Angle Intra Prediction (WAIP) and location dependent intra prediction combining (PDPC) methods of non-square blocks are enabled for a particular block. PDPC is applied without signaling to the following intra modes: planar, DC, horizontal, vertical, left bottom angular pattern and its eight adjacent angular patterns, and right top angular pattern and its eight adjacent angular patterns.

2.2.2 affine Linear weighted Intra prediction (ALWIP or matrix based Intra prediction)

Affine linear weighted intra prediction (ALWIP, also known as matrix-based intra prediction (MIP)) is proposed in jfet-N0217.

2.2.2.1 generating a simplified prediction Signal by matrix vector multiplication

Neighboring reference samples are first downsampled via averaging to generate a reduced reference signal bdryred. The simplified prediction signal pred is thenredBy calculating the matrix vector product and adding an offset:

predred=A·bdryred+b

here, a is a matrix, and if W ═ H ═ 4, then W is presentred·HredRows and 4 columns, and in all other cases, 8 columns. b is a dimension Wred·HredThe vector of (2).

2.2.2.2 Explanation of the entire ALWIP Process

The whole process of averaging, matrix vector multiplication and linear interpolation is shown for different shapes in fig. 3-6. Note that the remaining shape is considered to be one of the described cases.

1. Given a 4x4 block, the ALWIP takes two averages along each axis of the boundary. And the obtained four input sampling points enter matrix vector multiplication. The matrix being taken from the set s0. After adding the offset, this yields 16 final predicted samples. Linear interpolation is not necessary for generating the prediction signal. Therefore, a total of (4 · 16)/(4 · 4) ═ 4 multiplications per sample are performed.

2. Given an 8x8 block, the ALWIP takes four averages along each axis of the boundary. And the obtained eight input sampling points enter matrix vector multiplication. The matrix being taken from the set S1. This produces 16 samples at odd positions of the prediction block. Therefore, a total of (8 · 16)/(8 · 8) × 2 multiplications per sample are performed. After adding the offset, these samples are interpolated vertically by using the simplified top boundary. The original left border is used for horizontal interpolation.

3. To giveTaking an 8x4 block, the ALWIP takes four averages along the horizontal axis of the boundary and takes four original boundary values on the left boundary. And the obtained eight input sampling points enter matrix vector multiplication. The matrix being taken from the set S1. This produces 16 samples at odd horizontal and each vertical position of the prediction block. Therefore, a total of (8 · 16)/(8 · 4) ═ 4 multiplications per sample are performed. After adding the offset, these samples are interpolated horizontally by using the original left boundary.

4. Given a 16x16 block, the ALWIP takes four averages along each axis of the boundary. And the obtained eight input sampling points enter matrix vector multiplication. The matrix being taken from the set S2. This produces 64 samples at odd positions of the prediction block. Therefore, a total of (8 · 64)/(16 · 16) ═ 2 multiplications per sample are performed. After adding the offset, these samples are interpolated vertically by using the eight averages of the top boundary. The original left border is used for horizontal interpolation. In this case, the interpolation process does not add any multiplication. Therefore, computing the ALWIP prediction requires a total of two multiplications per sample.

For larger shapes the process is substantially the same and it is easy to check that the number of multiplications per sample is less than four.

For a W × 8 block (where W >8), only horizontal interpolation is needed because samples are given at odd horizontal and every vertical position.

Finally, for a W × 4 block (where W >8), let a _ kbe be the matrix that appears by omitting each row corresponding to an odd entry along the horizontal axis of the downsample block. Therefore, the output size is 32, and again, only the horizontal interpolation remains performed.

The situation after the transposition is treated accordingly.

2.2.2.3 grammar and semantics

7.3.6.5 codec Unit syntax

2.2.3 Multiple Reference Lines (MRL)

Multi-reference line (MRL) intra prediction uses more reference lines for intra prediction. In fig. 7, an example of 4 reference lines is depicted, where the samples of segments a and F are not extracted from reconstructed neighboring samples, but filled with the closest samples from segments B and E, respectively. HEVC intra picture prediction uses the nearest reference line (i.e., reference line 0). In MRL, 2 additional lines (reference line 1 and reference line 3) are used.

The index (mrl _ idx) of the selected reference line is signaled and used to generate an intra prediction value. For reference line indexes greater than 0, additional reference line modes are included only in the MPM list, and only the MPM indexes are signaled without remaining modes. The reference line index is signaled before the intra prediction mode, and in case a non-zero reference line index is signaled, the planar mode and the DC mode are excluded from the intra prediction mode.

The MRL is disabled for blocks of the first line within the CTU to prevent the use of extended reference samples outside the current CTU line. Further, PDPC is disabled when the additional line is used.

2.2.4 Intra-frame sub-block partitioning (ISP)

In jfet-M0102, an ISP is proposed that divides the luma intra prediction block vertically or horizontally into 2 or 4 sub-partitions according to block size, as shown in table 1. Fig. 8 and 9 show examples of two possibilities. All sub-partitions satisfy the condition of having at least 16 samples. For block sizes, 4xN or Nx4 (where N >8), there may be 1xN or Nx1 sub-partitions, if allowed.

Table 1: number of sub-partitions according to block size (maximum transform size by representation of maxTBSize)

For each of these sub-partitions, a residual signal is generated by entropy decoding the coefficients transmitted by the encoder, and then inverse quantizing and inverse transforming them. Then, the sub-partitions are intra-predicted, and finally, corresponding reconstructed samples are obtained by adding a residual signal to the prediction signal. Thus, the reconstructed value of each sub-partition will be available to generate the next prediction, which will repeat the process, and so on. All sub-partitions share the same intra mode.

Table 2: according to the specifications of trTypeHor and trTypeVer of predModeIntra

2.2.4.1 grammar and semantics

7.3.7.5 codec Unit syntax

Intra _ subportions _ mode _ flag x0 y0 equal to 1 specifies the partitioning of the current intra codec unit into numintrasubportions x0 y0 rectangular transform block sub-partitions. Intra _ sub _ modes _ flag x0 y0 equal to 0 specifies that the current intra codec unit is not partitioned into rectangular transform block sub-partitions.

When intra _ subpartitions _ mode _ flag [ x0] [ y0] is not present, it is inferred to be equal to 0.

intra _ sub _ partitions _ split _ flag x0 y0 specifies whether the intra sub-partition type is horizontal or vertical. When intra _ sub _ splits _ flag [ x0] [ y0] is not present, it is inferred as follows:

if cbHeight is greater than MaxTbSizeY, intra _ sub _ splits _ flag x0 y0 is inferred to be equal to 0.

Else (cbWidth greater than MaxTbSizeY), intra _ sub _ split _ flag [ x0] [ y0] is inferred to be equal to 1.

The variable intrasubportionssplit type specifies the type of partitioning for the current luma codec block, as shown in tables 7-9. Intrasubportionssplittype is derived as follows:

-if intra _ subportions _ mode _ flag x0 y0 is equal to 0, the IntraSubPartitionsSplitType is set equal to 0.

-otherwise, IntraSubPartitionsSplitType is set equal to 1+ intra _ sub _ partitionions _ split _ flag [ x0] [ y0 ].

TABLE 7-9 name Association of IntraSubPartitionsSplitType

IntraSubPartitionsSplitType Name of IntraSubPartitionsSplitType
0 ISP_NO_SPLIT
1 ISP_HOR_SPLIT
2 ISP_VER_SPLIT

The variable NumIntraSubPartitions specifies the number of transform block subdivisions into which the intra luma codec block is divided. NumIntraSubPartitions is derived as follows:

-if intrasubportionssplittype equals ISP _ NO _ SPLIT, numintrasubportions is set equal to 1.

Otherwise, if one of the following conditions is true, then NumIntraSubPartitions is set equal to 2:

-cbWidth is equal to 4 and cbHeight is equal to 8,

cbWidth is equal to 8 and cbHeight is equal to 4.

Otherwise, NumIntraSubPartitions is set equal to 4.

2.3 chroma Intra mode coding

For chroma intra mode coding, a total of 8 or 5 intra modes are allowed for chroma intra mode coding, depending on whether cross-component linear model (CCLM) is enabled. These modes include five conventional intra modes and three cross-component linear model modes. The chrominance DM mode uses a corresponding luminance intra prediction mode. Since separate block division structures of luminance and chrominance components are enabled in the I-band, one chrominance block may correspond to a plurality of luminance blocks. Therefore, for the chroma DM mode, the intra prediction mode of the corresponding luminance block covering the center position of the current chroma block is directly inherited.

TABLE 8-2-based on when sps _ cclm _ enabled _ flag is equal to 0

Intra _ chroma _ pred _ mode [ xCb ] [ yCb ] and IntraPredModeC [ xCb ] [ yCb ] IntraPredModeY [ xCb + cbWidth/2] [ yCb + cbHeight/2]

TABLE 8-3 — Specifications for IntraPredModeC [ xCb ] [ yCb ] according to Intra _ chroma _ pred _ mode [ xCb ] [ yCb ] and IntraPredModeY [ xCb + cbWidth/2] [ yCb + cbHeight/2] when sps _ cclm _ enabled _ flag is equal to 1

2.4 transform codec in VVC

2.4.1 Multiple Transform Sets (MTS) in VVC

2.4.1.1 explicit Multiple Transform Sets (MTS)

In VTM4, large block size transform with sizes up to 64 × 64, which is mainly used for higher resolution video, such as 1080p and 4K sequences. For a transform block with a size (width or height, or both) equal to 64, the high frequency transform coefficients are zeroed out so that only the low frequency coefficients remain. For example, for an M × N transform block, with M as the block width and N as the block height, when M equals 64, only the left 32 columns of transform coefficients are retained. Similarly, when N equals 64, only the top 32 rows of transform coefficients are retained. When the transform skip mode is used for large blocks, the entire block will be used without zeroing any values.

In addition to DCT-II, which has been adopted in HEVC, a Multiple Transform Selection (MTS) scheme is used for residual coding of inter and intra coded blocks. It uses a number of selected transforms from the DCT8/DST 7. The newly introduced transformation matrices are DST-VII and DCT-VIII. Table 4 below shows the basis functions of the DST/DCT chosen.

Table 4: basis functions of transformation matrices used in VVC

To preserve the orthogonality of the transform matrices, the transform matrices are quantized more accurately than in HEVC. In order to keep the median of the transform coefficients in the 16-bit range, all coefficients have 10 bits after the horizontal and vertical transforms.

To control the MTS scheme, separate enable flags are specified at the SPS level for intra and inter frames, respectively. When MTS is enabled at SPS, CU level flag is signaled to indicate whether MTS is applied. Here, MTS is only applicable to luminance. The MTS CU level flag is signaled when the following conditions are met.

O has a width and a height of 32 or less

The omic CBF flag is equal to 1

If the MTS CU flag is equal to zero, the DCT2 is applied in both directions. However, if the MTS CU flag is equal to 1, two other flags are additionally signaled to indicate the transform type in the horizontal and vertical directions, respectively. The transformation and signaling mapping table is shown in table 5. When transform matrix precision is involved, an 8-bit primary transform kernel is used. Thus, all transform cores used in HEVC remain the same, including 4-point DCT-2 and DST-7, 8-point, 16-point, and 32-point DCT-2. In addition, other transform kernels, including 64-point DCT-2, 4-point DCT-8, 8-point, 16-point, 32-point DST-7, and DCT-8, use an 8-bit primary transform kernel.

Table 5: mapping of decoded values of tu _ mts _ idx to corresponding transformation matrices in horizontal and vertical directions

To reduce the complexity of large size DST-7 and DCT-8, the high frequency transform coefficients are zeroed out for DST-7 and DCT-8 blocks with a size (width or height, or both) equal to 32. Only the coefficients in the 16x16 low frequency region are retained.

In addition to applying different transforms, VVC also supports a mode called Transform Skip (TS), similar to the concept of TS in HEVC. TS is considered a special case of MTS.

2.4.2 simplified quadratic transformation (RST) proposed in JFET-N0193

Indivisible quadratic transformation (NSST) in JEM 2.4.2.1

In JEM, a quadratic transform is applied between the forward primary transform and the quantization (at the encoder) and between the dequantization and the inverse primary transform (at the decoder side). As shown in fig. 10, a 4x4 (or 8x8) quadratic transform is performed according to a block size. For example, for each 8x8 block, a 4x4 quadratic transform is applied to small blocks (i.e., min (width, height) <8), and an 8x8 quadratic transform is applied to larger blocks (i.e., min (width, height) > 4).

The application of the indivisible transformation is described below using the input as an example. To apply the indivisible transform, 4X4 input block X

Is first expressed as a vector

The indivisible transformation is calculated asWhereinA transform coefficient vector is indicated, and T is a 16x16 transform matrix. The 16x1 coefficient vector is then scanned using the scan order (horizontal, vertical, or diagonal) of the blockReorganized into 4x4 chunks. The coefficients with the smaller index will be placed in a 4x4 coefficient block with the smaller scan index. There are a total of 35 transform sets, and each transform set uses 3 indivisible transform matrices (kernels). The mapping from intra prediction mode to transform set is predefined. For each transform set, the selected indistinguishable quadratic transform (NSST) candidates are further specified by explicitly signaled quadratic transform indices. The index is signaled by the CU once per frame in the bitstream after the coefficients are transformed.

2.4.2.2 simplified quadratic transformation (RST) in JFET-N0193

RST (also known as low frequency inseparable transform (LFNST)) was introduced in JFET-K0099, and 4 transform set (instead of 35 transform set) mappings were introduced in JFET-L0133. In this jfet-N0193, 16x64 (further simplified to 16x48) and 16x16 matrices are utilized. For ease of notation, the 16x64 (abbreviated 16x48) transition is denoted RST 8x8, and the 16x16 transition is denoted RST 4x 4. Fig. 11 shows an example of RST.

2.4.2.2.1 RST calculation

The main idea of the simplified transform (RT) is to map N-dimensional vectors to R-dimensional vectors in different spaces, where R/N (R < N) is a simplification factor.

The RT matrix is an R × N matrix as follows:

where the R rows of the transform are R bases of the N-dimensional space. The inverse transform matrix of RT is the transpose of its forward transform. Positive RT and inverse RT are depicted in fig. 12.

In this document, RST 8x8 with a simplification factor of 4(1/4 size) is applied. Thus, instead of 64x64, a 16x64 direct matrix is used, which is the traditional 8x8 indivisible transform matrix size. In other words, the kernel (primary) transform coefficients in the 8 × 8 top left region are generated at the decoder side using a 64 × 16 inverse RST matrix. The positive RST 8x8 uses a 16x64 (or 8x64 for an 8x8 block) matrix such that it produces non-zero coefficients only in the top left 4x4 region within a given 8x8 region. In other words, if RST is applied, the 8 × 8 area, except the top left 4 × 4 area, will have only zero coefficients. For RST 4x4, 16x16 (or 8x16, for 4x4 blocks) direct matrix multiplication is applied.

The inverse RST is conditionally applied when the following two conditions are satisfied:

the block size is greater than or equal to a given threshold (W > -4 & & H > -4)

O transform skip mode flag is equal to zero

If both the width (W) and height (H) of the transform coefficient block are greater than 4, RST 8x8 is applied to the top left 8x8 region of the transform coefficient block. Otherwise, RST 4x4 is applied to the top left min (8, W) × min (8, H) region of the transform coefficient block.

If the RST index is equal to 0, then RST is not applied. Otherwise, the RST is applied, with its core selected along with the RST index. The RST selection method and the encoding and decoding of the RST index will be explained later.

Furthermore, RST is applied to intra CUs in intra and inter slices, as well as luma and chroma. If dual trees are enabled, the RST indices for luma and chroma are signaled separately. For inter-frame stripes (dual tree disabled), a single RST index is signaled and used for luma and chroma.

2.4.2.2.2 RST restriction

When ISP mode is selected, RST is disabled and RST index is not signaled, since the performance improvement is marginal even if RST is applied to every feasible partition. Furthermore, disabling the RST for the ISP prediction residual may reduce coding complexity.

2.4.2.2.3 RST selection

The RST matrix is selected from four sets of transforms, each set of transforms consisting of two transforms. Which transform set to apply is determined from the intra prediction mode as follows:

(1) if one of the three CCLM modes is indicated, transform set 0 is selected.

(2) Otherwise, transform set selection is performed according to the following table:

transformation set selection table

The index of the table above, denoted IntraPredMode, is accessed, ranging from [ -14,83], which is the transform mode index for wide-angle intra prediction.

2.4.2.2.4 reduced size RST matrix

As a further simplification, a 16x48 matrix was applied instead of 16x64 with the same transform set configuration, each matrix taking 48 input data from three 4x4 blocks excluding the bottom right 4x4 block from the top left 8x8 block (as shown in fig. 13).

2.4.2.2.5 RST signaling

The positive RST 8x8 uses a 16x48 matrix such that it produces non-zero coefficients only in the top left 4x4 area of the first 3 x4 areas. In other words, if RST 8x8 is applied, only the top left 4x4 (due to RST 8x8) and bottom right 4x4 regions (due to one transform) may have non-zero coefficients. As a result, when any non-zero element is detected within the top right 4x4 and bottom left 4x4 block regions (referred to as "return to zero" regions as shown in fig. 14), the RST index is not coded, as this implies that the RST is not applied. In this case, the RST index is inferred to be zero.

2.4.2.2.6 Return-to-zero region within a CG

In general, any coefficients in the 4 × 4 sub-block may be non-zero before applying the inverse RST to the 4 × 4 sub-block. However, constrained in some cases, some of the coefficients in the 4 × 4 sub-block must be zero before applying the inverse RST to the sub-block.

Let nonZeroSize be a variable. Any coefficient having an index not smaller than nonZeroSize must be zero when it is required to be rearranged into a 1-D array before inversion RST.

When nonZeroSize equals 16, the coefficients in the top left 4 × 4 sub-block have no zeroing constraint.

In jfet-N0193, when the current block size is 4 × 4 or 8 × 8, nonZeroSize is set equal to 8 (i.e., the scan index is a coefficient in the range of [8,15], which should be 0 as shown in fig. 14). For other chunk sizes, nonZeroSize is set equal to 16.

2.4.2.2.7 description of RST in working draft

7.3.2.3 sequence parameter set RBSP syntax

7.3.7.11 residual codec syntax

7.3.7.5 codec Unit syntax

Sps _ st _ enabled _ flag equal to 1 specifies that st _ idx may be present in the residual codec syntax of the intra codec unit. Sps _ st _ enabled _ flag equal to 0 specifies that st _ idx is not present in the residual codec syntax of the intra codec unit.

st _ idx [ x0] [ y0] specifies which quadratic transform core to apply between two candidate cores in the selected transform set. St _ idx [ x0] [ y0] equal to 0 specifies that no quadratic transformation is applied. The array indices x0, y0 specify the position of the transform block under consideration relative to the top left sample of the picture (x0, y 0).

When st _ idx [ x0] [ y0] is not present, st _ idx [ x0] [ y0] is inferred to be equal to 0.

The binary bits of st _ idx are context coded. More specifically, the following applies:

TABLE 9-9-syntax elements and associated binarization

Table 9-15-assignment of ctxInc to syntax elements with context codec bin

9.5.4.2.8 derivation of ctxInc of syntax element st _ idx

The inputs to this process are the color component index cIdx, the luma or chroma position (x0, y0) specifying the left top sample of the current luma or chroma codec block relative to the left top sample of the current picture according to cIdx, the tree type treeType, the luma Intra prediction mode IntraPredModeY [ x0] [ y0] specified in stripe 8.4.2, the syntax element intra _ chroma _ pred _ mode [ x0] [ y0] specifying the intra prediction mode of chroma samples specified in stripe 7.4.7.5, and the multiple transform selection index tu _ mts _ idx [ x0] [ y0 ].

The output of this process is the variable ctxInc.

The variable intraModeCtx is derived as follows:

if cIdx equals 0, intraModeCtx is derived as follows:

intraModeCtx=(IntraPredModeY[x0][y0]<=1)?1:0

otherwise (cIdx is greater than 0), intraModeCtx is derived as follows:

intraModeCtx=(intra_chroma_pred_mode[x0][y0]>=4)?1:0

the variable mtsCtx is derived as follows:

mtsCtx=(tu_mts_idx[x0][y0]==0&&treeType!=SINGLE_TREE)?1:0

the variable ctxInc is derived as follows:

ctxInc=(binIdx<<1)+intraModeCtx+(mtsCtx<<2)

2.4.2.2.8 overview of RST usage

RST can only be enabled if the number of non-zero coefficients in a block is greater than 2 and 1 for a single tree and a separate tree, respectively. Further, when the RST is enabled, the following restriction of the position of the non-zero coefficient of the coding-decoding group (CG) applied to the RST is also required.

Table 1: use of RST

2.4.3 sub-block transformations

For inter-predicted CUs with CU cbf equal to 1, CU sbt flag may be signaled to indicate whether the entire residual block or a sub-portion of the residual block is decoded. In the former case, the inter-frame MTS information is further parsed to determine the transform type of the CU. In the latter case, a portion of the residual block is coded with an inferred adaptive transform and another portion of the residual block is zeroed out. SBT does not apply to the combined inter-intra mode.

In the sub-block transform, a position-dependent transform is applied to the luminance transform block in SBT-V and SBT-H (the chrominance TB always uses DCT-2). The two positions of SBT-H and SBT-V are associated with different core transformations. More specifically, the horizontal and vertical transforms for each SBT location are specified in fig. 3. For example, the horizontal and vertical transforms for SBT-V position 0 are DCT-8 and DST-7, respectively. When one side of the residual TU is greater than 32, the corresponding transform is set to DCT-2. Thus, the sub-block transform jointly specifies TU tiling (tiling), cbf, and the horizontal and vertical transforms of the residual block, which can be considered as syntax shortcuts for the case where the main residual of the block is on one side of the block.

2.4.3.1 syntax element

7.3.7.5 codec Unit syntax

Cu _ sbt _ flag equal to 1 specifies that for the current codec unit, a sub-block transform is used. Cu _ sbt _ flag equal to 0 indicates that for the current codec unit, no sub-block transform is used.

When cu _ sbt _ flag is not present, its value is inferred to be equal to 0.

Note that when using sub-block transform, the coding-decoding unit is divided into two transform units; one transform unit has residual data and the other does not.

Cu _ sbt _ quad _ flag equal to 1 specifies that for the current codec unit, the sub-block transform includes 1/4-sized transform units of the current codec unit. Cu _ sbt _ quad _ flag equal to 0 specifies that for the current codec unit, the sub-block transform includes 1/2-sized transform units of the current codec unit.

When cu _ sbt _ quad _ flag is not present, its value is inferred to be equal to 0.

Cu _ sbt _ horizontal _ flag equal to 1 specifies that the current codec unit is horizontally divided into 2 transform units. Cu _ sbt _ horizontal _ flag x0 y0, equal to 0, specifies that the current codec unit is vertically divided into 2 transform units.

When cu _ sbt _ horizontal _ flag is not present, its value is derived as follows:

-cu sbt horizontal flag is set equal to allowstbhorq if cu sbt quad flag is equal to 1.

Otherwise (cu _ sbt _ quad _ flag equal to 0), cu _ sbt _ horizontal _ flag is set equal to allowSbtHorH.

Cu _ sbt _ pos _ flag equal to 1 specifies that tu _ cbf _ luma, tu _ cbf _ cb, and tu _ cbf _ cr of the first transform unit in the current codec unit are not present in the bitstream. Cu _ sbt _ pos _ flag equal to 0 specifies that tu _ cbf _ luma, tu _ cbf _ cb, and tu _ cbf _ cr of the second transform unit in the current codec unit are not present in the bitstream.

The variable sbtnumfourthtb 0 is derived as follows:

sbtMinNumFourths=cu_sbt_quad_flag1:2 (7-117)

SbtNumFourthsTb0=cu_sbt_pos_flag?(4-sbtMinNumFourths):sbtMinNumFourths (7-118)

sps _ sbt _ max _ size _64_ flag equal to 0 specifies that the maximum CU width and height of the sub-block transform is allowed to be 32 luma samples. Sps _ sbt _ max _ size _64_ flag equal to 1 specifies that the maximum CU width and height of the sub-block transform is allowed to be 64 luma samples.

MaxSbtSize=sps_sbt_max_size_64_flag64:32 (7-33)

2.4.4 quantization residual block differential pulse code modulation coding and decoding (QR-BDPCM)

In JFET-N0413, the quantized residual domain BDPCM (hereinafter referred to as RBDPCM) is proposed. Intra-prediction is performed on the entire block by sample copy in a prediction direction (horizontal or vertical prediction) similar to intra-prediction. The residual is quantized and the delta between the quantized residual and its predicted (horizontal or vertical) quantized value is coded.

For a block of size M (rows) N (columns), let ri,jI ≦ 0 ≦ M-1, j ≦ 0 ≦ N-1, which is the prediction residual after performing intra prediction either horizontally (copying left neighbor pixel values row by row across the prediction block) or vertically (copying the top neighbor line to each line in the prediction block) using unfiltered samples from the top or left block boundary samples. Let Q (r)i,j) I is more than or equal to 0 and less than or equal to M-1, and j is more than or equal to 0 and less than or equal to N-1 represents residual error ri,jOf the quantized version of (1), wherein the residual errorIs the difference between the original block and the predicted block value. Then, the block DPCM is applied to the quantized residual sampling points to obtain the sampling points with elementsM N array of uniform modificationsWhen signaling vertical BDPCM:

for horizontal prediction, a similar rule applies, obtaining residual quantized samples by

Residual quantized sampling pointsIs transmitted to the decoder.

On the decoder side, the above calculations are reversed to produce Q (r)i,j) I is more than or equal to 0 and less than or equal to M-1, and j is more than or equal to 0 and less than or equal to N-1. For the case of a vertical prediction,

in the case of the horizontal case,

inverse quantized residual Q-1(Q (r)i,j) Is added to the intra block prediction value to produce a reconstructed sample value.

When QR-BDPCM is selected, no transform is applied.

Entropy coding and decoding of 2.5 coefficients

2.5.1 coefficient coding and decoding of transform application blocks

In HEVC, the transform coefficients of a coded block are coded using non-overlapping sets (or sub-blocks) of coefficients, and each CG contains the coefficients of a 4x4 block of the coded block. The CG within the codec block and the transform coefficients within the CG are codec according to a predefined scan order.

The CG within the codec block and the transform coefficients within the CG are codec according to a predefined scan order. The coefficients within both CG and CG follow a diagonal top-right scan order. Examples of 4x4 blocks and 8x8 scan orders are depicted in fig. 16 and 17, respectively.

Note that the codec order is the reverse scan order (i.e., decoding from CG3 to CG0 in fig. 17), and when decoding a block, the coordinates of the last non-zero coefficient are decoded first.

The coding of transform coefficient levels for CGs having at least one non-zero transform coefficient may be separated into multiple scan passes. In the first pass, the first bin (represented by bin0, also referred to as significant _ coeff _ flag, which indicates that the magnitude of the coefficient is greater than 0) is coded. Next, two scan passes of context coding the second/third bin (denoted bin1 and bin2, respectively, also referred to as coeff _ abs _ greater1_ flag and coeff _ abs _ greater2_ flag) may be applied. Finally, two more scan passes of coding and decoding the symbol information and the remaining values of the coefficient levels (also called coeff _ abs _ level _ remaining) are invoked, if necessary. Note that only the bits in the first three scan passes are coded in the normal mode, and these bits are referred to as normal bits in the following description.

In VVC3, for each CG, the normal codec bits and bypass codec bits are separated in codec order; first, all the regular codec bits of the sub-block are transmitted, and thereafter, the bypass codec bits are transmitted. The transform coefficient levels of the sub-blocks are coded and decoded in five passes at the scanning position as follows:

omicron 1: the codecs of the significance (sig _ flag), the greater than 1 flag (gt1_ flag), the parity (par level _ flag), and the greater than 2 flag (gt2_ flag) are processed in the codec order. If sig _ flag is equal to 1, gt1_ flag is first coded (specifying whether the absolute level is greater than 1). If gt1_ flag is equal to 1, par _ flag is additionally coded (it specifies the parity of absolute level minus 2).

Omicron 2: the codec of the remaining absolute levels (remainder) is processed for all scan positions having gt2_ flag equal to 1 or gt1_ flag equal to 1. The non-binary syntax elements are binarized using Golomb-Rice codes and the resulting bins are coded in a bypass mode of the arithmetic coding and decoding engine.

Omicron, pass 3: the absolute level (absLevel) of coefficients for which no sig _ flag was coded in the first pass (due to the constraint of reaching the conventional coding bin) is fully coded using the Golomb-Rice code in the bypass mode of the arithmetic coding engine.

Degree 4: coding and decoding of symbols (sign _ flag) for all scan positions with sig _ coeff _ flag equal to 1

For the 4 × 4 subblock, it is guaranteed that no more than 32 conventional coding bits (sig _ flag, par _ flag, gt1_ flag, and gt2_ flag) are encoded or decoded. For a 2x2 chroma subblock, the number of conventional codec bins is limited to 8.

The Rice parameter (ricePar) for non-binary syntax element remainder (in pass 3) coding is derived similar to HEVC. At the beginning of each sub-block, ricePar is set equal to 0. After encoding and decoding the syntax element remainder, the Rice parameter is modified according to a predefined equation. For the codec on the non-binary syntax element absLevel (in pass 4), sum of absolute values sumAbs in the local template are determined. The variables ricePar and posZero were determined by table lookup based on dependent quantization and sumAbs. The intermediate variable codeValue is derived as follows:

if absLevel [ k ] is equal to 0, codeValue is set equal to posZero;

otherwise, if absLevel [ k ] is less than or equal to posZero, codeValue is set equal to absLevel [ k ] -1;

otherwise (absLevel [ k ] is greater than posZero), codeValue is set equal to absLevel [ k ].

The value of codeValue is coded using a Golomb-Rice code with a Rice parameter ricePar.

2.5.1.1 context modeling for coefficient coding and decoding

The choice of the probability model for the syntax elements related to the absolute value of the transform coefficient level depends on the value of the absolute level in the local neighborhood or the partially reconstructed absolute level. The template used is shown in fig. 18.

The probability model selected depends on the sum of the absolute levels (or partially reconstructed absolute levels) in the local neighborhood and the number of absolute levels greater than 0 in the local neighborhood (given by the number of sig _ coeff _ flags equal to 1). Context modeling and binarization depend on the following measures of local neighborhood:

omicron: the number of non-zero levels in the local neighborhood;

omicronabs 1: the sum of the absolute levels of partial reconstructions after the first pass in the local neighborhood (absLevel 1);

omicron: sum of absolute levels of reconstruction in local neighborhood

-diagonal position (d) sum of horizontal and vertical coordinates of current scanning position within transform block

Based on the values of numSig, sumAbs1, and d, probability models for coding sig _ flag, par _ flag, gt1_ flag, and gt2_ flag are selected. The Rice parameter used to binarize abs _ remainder is selected based on the values of sumAbs and numSig.

2.5.1.2 Dependent Quantization (DQ)

Furthermore, the same HEVC scalar quantization is used with a new concept, called dependent scalar quantization. Dependent scalar quantization refers to a method in which the set of allowable reconstruction values for a transform coefficient depends on the values of the transform coefficient level preceding the current transform coefficient level in reconstruction order. The main effect of this approach is to allow the reconstructed vectors to be packed more densely in the N-dimensional vector space (N represents the number of transform coefficients in the transform block) than the traditional independent scalar quantization used in HEVC. This means that for a given average number of allowed reconstruction vectors per N-dimensional unit volume, the average distortion between the input vector and the closest reconstruction vector is reduced. The method of dependent scalar quantization is implemented by: (a) defining two scalar quantizers having different levels of reconstruction, and (b) defining a switching process between the two scalar quantizers.

The two scalar quantizers used are denoted by Q0 and Q1 as shown in fig. 19. The position of the available reconstruction level is uniquely specified by the quantization step size Δ. The scalar quantizer used (Q0 or Q1) is not explicitly signaled in the bitstream. Instead, the quantizer for the current transform coefficient is determined by the parity of the transform coefficient level preceding the current transform coefficient in codec/reconstruction order.

As shown in fig. 20, switching between two scalar quantizers (Q0 and Q1) is achieved via a state machine having four states. The state may take four different values: 0. 1, 2 and 3. It is uniquely determined by the parity of the transform coefficient level preceding the current transform coefficient in codec/reconstruction order. At the beginning of the inverse quantization of the transform block, the state is set equal to 0. The transform coefficients are reconstructed in scan order (i.e., in the same order as they were entropy decoded). After the current transform coefficient is reconstructed, the state is updated as shown in fig. 20, where k denotes the value of the transform coefficient level.

2.5.1.3 grammar and semantics

7.3.7.11 residual codec syntax

Coefficient coding and decoding of 2.5.2 TS coding and decoding block and QR-BDPCM coding and decoding block

QR-BDPCM follows the context modeling method of TS coding and decoding blocks.

Modified transform coefficient level coding of TS residuals. With respect to the conventional residual codec case, the residual codec of TS includes the following changes:

(1) signaling without last x/y position

(2) Coded _ sub _ block _ flag coded for every subblock except the last subblock when all previous flags are equal to 0

(3) Modeled with the sig _ coeff _ flag context of the simplified template,

(4) a single context model of abs _ level _ gt1_ flag and par _ level _ flag,

(5) context modeling of symbolic tokens, appending tokens greater than 5, 7, 9,

(6) modified Rice parameter derivation for remainder binarization

(7) The limit on the number of context codec bits per sample, 2 bits per sample within a block.

2.5.2.1 grammar and semantics

7.3.6.10 transform unit syntax

For each CG, the number of context codec bins is limited to no more than 2 bins per sample point.

Table 915-assignment of ctxInc to syntax elements with context codec bin

3. Disadvantages of the existing embodiments

The current design has the following problems:

(1) the four predefined transform sets for the chrominance components are the same as for the luminance components. In addition, luma and chroma blocks having the same intra prediction mode use the same transform set. However, chrominance signals are generally smoother than luminance components. Using the same set may be suboptimal.

(2) RST is applied only to a particular CG, not all CGs. However, the decision on signaling the RST index depends on the number of non-zero coefficients in the whole block. When all coefficients in the CG to which the RST is applied are zero, there is no need to signal the RST index. However, current designs may still signal indexes that waste unnecessary bits.

(3) The RST index is signaled after residual coding because it needs to record how many non-zero coefficients there are, whether there are non-zero coefficients at a particular location (e.g., numZeroOutSigCoeff, numSigCoeff in section 2.3.2.2.7). Such a design makes the parsing process more complicated.

(4) The RST index is context coded and the context modeling depends on the coded luma/chroma intra prediction mode and the MTS index. Such a design introduces an analysis delay in the reconstruction of the intra prediction mode. And introduces 8 contexts, which can be a burden on hardware implementation.

(a) DM and CCLM share the same context index offset, which is meaningless because they are two different chroma intra prediction methods.

(5) Current designs of non-TS residual coding first encode the coefficient information, followed by RST indexing (i.e., with or without RST, and if used, which matrix to select). In the case of such a design, the on/off information of RST cannot be considered in entropy coding and decoding of the residual.

(6) RST is always applied to the top left area of the transform block to which the primary transform is applied. However, for different primary transform bases, the energy is not always concentrated in the top left region of the transform block.

4 example method for context modeling for residual coding

Embodiments of the presently disclosed technology overcome the disadvantages of the prior embodiments, thereby providing video codecs with higher codec efficiency. Based on the disclosed techniques, the method of context modeling for residual codec may enhance existing and future video codec standards, which are set forth in the following examples described for various embodiments. The examples of the disclosed technology provided below illustrate the general concepts and are not meant to be construed as limiting. In examples, various features described in these examples may be combined unless explicitly indicated to the contrary.

In these examples, RST may be any variant of the design in JFET-N0193. RST can be any technique that can apply a quadratic transform to a block or a transform to a Transform Skip (TS) codec block (e.g., RST applied to a TS codec block as set forth in jfet-N0193).

Furthermore, "zeroed-out regions" or "zeroed-out CGs" may indicate those regions/CGs that always have zero coefficients due to the reduced transform size used in the quadratic transform process. For example, if the quadratic transform size is 16x32, and the CG size is 4x4, it will be applied to the first two CGs, but only the first CG may have non-zero coefficients, the second 4x4CG also being referred to as a return-to-zero CG.

Selection of transformation matrices in RST

The sub-region to which RST is applied may be a sub-region that is not the top left portion of the block.

a. In one example, RST may be applied to the top right or bottom left or center sub-region of the block.

Which sub-region the rst is applied to may depend on the intra prediction mode and/or the primary transform matrix (e.g., DCT-II, DST-VII, identity transform).

2. The choice of the set of transforms and/or the transform matrix used in RST may depend on the color components.

a. In one example, one set of transform matrices may be used for the luma (or G) component and one set for the chroma component (or B/R).

b. In one example, each color component may correspond to a set.

c. In one example, the at least one matrix is different in any of the two or more sets for different color components.

3. The selection of the transform set and/or transform matrix used in RST may depend on the intra prediction method (e.g., CCLM, multi-reference line based intra prediction method, matrix based intra prediction method).

a. In one example, one set of transform matrices may be used for CCLM codec blocks and another set for non-CCLM codec blocks.

b. In one example, one set of transform matrices may be used for normal intra-prediction coded blocks and another set for multi-reference line enabled blocks (i.e., which do not use neighboring lines for intra-prediction).

c. In one example, one set of transform matrices may be used for blocks coded with joint chroma residual coding and another set for blocks where joint chroma residual coding is not applied.

d. In one example, the at least one matrix is different in any of the two or more sets for different intra prediction methods.

e. Alternatively, RST may be disabled for blocks that are coded with a particular intra prediction direction and/or a particular coding tool (e.g., CCLM, and/or joint chroma residual coding) and/or a particular color component (e.g., chroma).

4. The choice of the set of transformations and/or transformation matrices used in RST may depend on one transformation.

a. In one example, if the primary transform applied to a block is an identity transform (e.g., a TS pattern is applied to a block), the set of transforms and/or the transform matrix used in the RST can be different from other kinds of primary transforms.

b. In one example, if the horizontal and vertical 1-D primary transforms applied to a block are the same basis (e.g., both DCT-II), the transform set and/or transform matrix used in RST may be different from the primary transforms of different basis from different directions (vertical or horizontal).

Signaling of RST side information and residual coding

5. Whether and/or how side information of the RST (e.g., st _ idx) is signaled may depend on the last non-zero coefficient in the block (in scan order).

a. In one example, the RST may be enabled only when the last non-zero coefficient is located in the CG to which the RST is applied, and the index of the RST may be signaled.

b. In one example, if the last non-zero coefficient is not located in the CG to which the RST is applied, the RST is disabled and signaling of the RST is skipped.

6. Whether and/or how to signal the side information of the RST (e.g., st _ idx) may depend on the coefficients within a partial area of one block rather than the entire block.

a. In one example, the partial area may be defined as a CG to which RST is applied.

b. In one example, a partial region may be defined as M (e.g., M ═ 1 or 2) CGs before or after in scan order or in inverse scan order of a block.

i. In one example, M may depend on the block size.

in one example, if the block size is 4xN and/or Nx4(N >8), then M is set to 2.

in one example, if the block size is 4x8 and/or 8x4 and/or WxH (W > -8, H > -8), then M is set to 1.

c. In one example, it may depend on the position of the non-zero coefficients within the partial region.

d. In one example, it may depend on the energy (such as the sum of squares or the sum of absolute values) of the non-zero coefficients within the partial region.

e. In one example, it may depend on the number of non-zero coefficients within a partial region of a block rather than the entire block.

i. The signaling of the side information of the RST can be skipped when the number of non-zero coefficients within the partial region of a block is less than a threshold.

in one example, the threshold may depend on the stripe type/picture type/split tree type (dual or single)/video content (screen content or camera capture content).

in one example, the threshold may depend on the color format (such as 4:2:0 or 4:4:4) and/or the color component (such as Y or Cb/Cr).

7. RST should be disabled when there are no non-zero coefficients in the CG to which it can be applied.

a. In one example, when RST is applied to a block, at least one CG to which RST is applied must contain at least one non-zero coefficient.

b. In one example, for 4xN and/or Nx4(N >8), if RST is applied, the first two 4x4CG must contain at least one non-zero coefficient.

c. In one example, for 4x8 and/or 8x4, the top left 4x4 must contain at least one non-zero coefficient if RST is applied.

d. In one example, for WxH (W > -8, H > -8), if RST is applied, the top left 4x4 must contain at least one non-zero coefficient.

e. The consistent bitstream must satisfy one or more of the above conditions.

8. The RST-related syntax element may be signaled prior to coding the residual (e.g., transform coefficients/direct quantization).

a. In one example, the count of the number of non-zero coefficients in the return-to-zero area (e.g., numzerosigcoeff) and the number of non-zero coefficients in the entire block (e.g., numSigCoeff) is removed in the parsing of the coefficients.

b. In one example, the RST-related syntax element (e.g., st _ idx) may be coded before residual _ coding.

c. The RST-related syntax element may be conditionally signaled (e.g., based on a codec block flag, TS mode usage).

in one example, the RST-related syntax element (e.g., st _ idx) may be codec after signaling of the codec block flag or after signaling of the TS/MTS-related syntax element.

v. in one example, when TS mode is enabled (e.g., decoded transform _ skip _ flag is equal to 1), signaling of RST-related syntax elements is skipped.

d. The residual related syntax may not be signaled for the zeroed CG.

e. How the residual is coded (e.g., scan order, binarization, syntax to decode, context modeling) may depend on the RST.

i. In one example, a raster scan order may be applied instead of a diagonal top-right scan order.

1) The raster scan order is from left to right and top to bottom, or in reverse order.

2) Alternatively, a vertical scan order (from top to bottom and left to right, or in reverse order) may be applied instead of the diagonal top-right scan order.

3) Further, alternatively, the context modeling may be modified.

a. In one example, context modeling may depend on previous codec information in the template, which is the nearest N neighbors in scan order, rather than using the right, bottom, right bottom neighbors.

b. In one example, context modeling may depend on previous codec information in the template according to the scanned index (e.g., -1, -2,. provided the current index is equal to 0).

in one example, different binarization methods (e.g., rice parameter derivation) may be applied to encode the residuals associated with the RST and non-RST encoded blocks.

in one example, signaling of a particular syntax element may be skipped for the RST coded block.

1) Signaling of a CG codec block flag (coded _ sub _ block _ flag) of the CG to which RST is applied may be skipped.

a. In one example, when RST 8x8 applies to the first three CGs in diagonal scan order, signaling of CG codec block flags is skipped for the second and third CGs (e.g., top right 4x4CG and bottom left 4x4CG in the top left 8x8 region of the block).

i. Further alternatively, the corresponding CG codec block flag is inferred to be 0, i.e. all coefficients are zero.

b. In one example, when RST is applied to a block, signaling of the CG codec block flag is skipped for the first CG in scan order (or the last CG in reverse scan order).

Further alternatively, the CG codec block flag of the top left CG in the block is inferred to be 1, i.e. it contains at least one non-zero coefficient.

c. An example of an 8x8 block is depicted in fig. 21. When RST 8x8 or RST 4x4 is applied to the 8x8 blocks, the coded _ sub _ block _ flag of CG0 is inferred to be 1, and the coded _ sub _ block _ flag of CG1 and CG2 is inferred to be 0.

2) The signaling of the magnitude of the coefficients and/or the sign of the specific coordinates may be skipped.

a. In one example, the signaling of coefficients may be skipped if the index relative to one CG in scan order is not less than the maximum allowed index at which non-zero coefficients may exist (e.g., nonZeroSize in section 0).

b. In one example, signaling of syntax elements such as sig _ coeff _ flag, abs _ level _ gtX _ flag, par _ level _ flag, abs _ remaining, coeff _ sign _ flag, dec _ abs _ level may be skipped.

3) Alternatively, signaling of residuals (e.g., CG codec block flags, magnitude of coefficients, and/or sign flags for particular coordinates) may be maintained, however, context modeling may be modified differently than other CGs.

in one example, the codecs of the residuals in the CG and other CGs of the RST application may be different.

1) For the above sub-item symbols, they may be applied only to the CG to which the RST is applied.

The RST related syntax element can be signaled prior to other transition indications, such as transition skip and/or MTS index.

a. In one example, signaling of transition skipping may depend on RST information.

i. In one example, if RST is applied in a block, then for that block, the transition skip indication is not signaled and is inferred to be 0.

b. In one example, signaling of the MTS index may depend on the RST information.

i. In one example, if RST is applied in a block, one or more MTS transition indications are not signaled and are inferred as unused for the block.

10. It is proposed to use different context modeling methods in arithmetic coding for different parts within a block.

a. In one example, a block is treated as two parts, the first M CGs in scan order, and the remaining CGs.

i. In one example, M is set to 1.

in one example, M is set to 2 for 4xN and Nx4(N >8) blocks; for all other cases, M is set to 1.

b. In one example, a block is treated as two parts, a sub-area with RST applied and a sub-area with RST not applied.

i. If RST 4x4 is applied, the sub-region to which RST is applied is the previous CG or both CGs of the current block.

if RST 4x4 is applied, then the sub-region where RST is applied is the first three CGs of the current block.

c. In one example, it is proposed to disable the use of previous codec information in the context modeling process for a first part within a block, while enabling it for a second part.

d. In one example, when decoding the first CG, the information of the remaining CG or CGs may not be allowed to be used.

i. In one example, the value of the second CG (e.g., to the right or below) is not considered when encoding and decoding the CG codec block flag of the first CG.

in one example, when the CG codec block flag of the first CG is codec, the values of the second and third CGs (e.g., the right and lower CGs of WxH (W > ═ 8 and H > ═ 8)) are not considered.

in one example, when coding a current coefficient, if its neighbor in the context template is in a different CG, then the information from that neighbor is not allowed to be used.

e. In one example, when decoding coefficients in a region to which RST is applied, information of the remaining region to which RST is not applied may not be allowed to be used.

f. Further alternatively, the above method may be applied under specific conditions.

i. The condition may include whether RST is enabled.

The condition may include a block size.

Context modeling in arithmetic coding of RST side information

11. When encoding the RST index, context modeling may depend on whether explicit or implicit multi-transform selection (MTS) is enabled.

a. In one example, when implicit MTS is enabled, different contexts may be selected for blocks that are coded in the same intra prediction mode.

i. In one example, a block size, such as a shape (square or non-square), is used to select a context.

b. In one example, instead of checking the transform index (e.g., tu _ MTS _ idx) for explicit MTS codec, a transform matrix base may be used instead.

i. In one example, for the transform matrix base of DCT-II with horizontal and vertical 1-D transforms, the corresponding context may be different from other kinds of transform matrices.

12. When encoding the RST index, context modeling may depend on whether CCLM is enabled (e.g., sps _ CCLM _ enabled _ flag).

a. Alternatively, whether or how to select the context of RST index coding is enabled may depend on whether or not the CCLM is applied to a block.

b. In one example, context modeling may depend on whether CCLM is enabled for the current block.

i. In one example, is intraModeCtx? (intra _ chroma _ pred _ mode [ x0] [ y0] is CCLM: intra _ chroma _ pred _ mode [ x0] [ y0] is DM)? 1:0.

c. Alternatively, whether RST index coding is enabled or how to select the context may depend on whether the current chroma block is coded in DM mode.

i. In one example, is intraModeCtx ═ (intra _ chroma _ pred _ mode [ x0] [ y0 ═ sps _ cclm _ enabled _ flag7: 4))? 1:0.

13. When encoding the RST index, context modeling may depend on the block size/partition depth (e.g., quad-tree depth and/or BT/TT depth).

14. When encoding the RST index, the context modeling may depend on the color format and/or color components.

15. When encoding the RST index, the context modeling may be independent of the intra-prediction mode and/or the MTS index.

16. When encoding the RST index, the first and/or second bin may be context encoded with only one context; or bypass coding.

Conditionally invoking RST procedure

17. Whether the reverse RST process is invoked may depend on the CG codec block flag.

a. In one example, if the left top CG codec block flag is zero, then the procedure need not be invoked.

i. In one example, if the left top CG codec block flag is zero and the block size is not equal to 4xN/Nx4(N >8), then the procedure need not be invoked.

b. In one example, if the first two CG codec block flags in scan order are both equal to zero, then the procedure need not be invoked.

i. In one example, if the first two CG codec block flags in scan order are both equal to zero and the block size is equal to 4xN/Nx4(N >8), then the procedure need not be invoked.

18. Whether the reverse RST process is invoked may depend on the block size.

a. In one example, RST may be disabled for a particular block size, such as 4x8/8x 4. Further, alternatively, signaling of the RST-related syntax element may be skipped.

5 example implementation of the disclosed technology

In the following exemplary embodiment, the changes on JFET-N0193 are highlighted in bold and italics. Deleted text is marked with double brackets (e.g., [ [ a ] ] representing the deleted character "a").

5.1 example #1

The signaling of the RST index depends on the number of non-zero coefficients within the sub-region of the block rather than the entire block.

7.3.6.11 residual codec syntax

Alternatively, the condition may be replaced by:

if(i=0[[||(i==1&&(log2TbWidth+log2TbHeight==5))]])

5.2 example #2

Depending on the codec block flag of a particular CG, RST may not be called.

8.7.4. Transformation process for scaling transform coefficients

8.7.4.1 general purpose

The inputs to this process are:

-a luminance position (xTbY, yTbY) specifying a top left sample of the current luminance transform block relative to a top left luminance sample of the current picture,

a variable nTbW specifying the width of the current transform block,

a variable nTbH specifying the height of the current transform block,

a variable cIdx specifying the color component of the current block,

-scaling an (nTbW) x (nTbH) array d [ x ] [ y ] of transform coefficients, wherein x ═ 0.. nTbW-1, y ═ 0.. nTbH-1.

The output of this process is an (nTbW) x (nTbH) array r [ x ] [ y ] of residual samples, where x ═ 0.. nTbW-1, y ═ 0.. nTbH-1.

The variable bInvokeST is set to 0 and is further modified to 1 if one of the following conditions is true:

-if coded _ sub _ block _ flag [0] [0] equals 1 and nTbW x nTbH! 32 ═ 32

-if coded _ sub _ block _ flag [0] [0] and coded _ sub _ block _ flag [0] [1] are equal to 1, and nTbW is equal to 4 and nTbH is greater than 8

-if coded _ sub _ block _ flag [0] [0] and coded _ sub _ block _ flag [1] [0] are equal to 1, and nTbW is greater than 8 and nTbH is equal to 4

If bInvokeST is equal to 1 and st _ idx [ xTbY ] [ yTbY ] is not equal to 0, then the following applies:

1. the variables nStSize, log2StSize, numStX, numStY and nonZeroSize are derived as follows:

if both nTbW and nTbH are greater than or equal to 8, log2StSize is set to 3 and nstsoutsize is set to 48.

Otherwise, log2StSize is set to 2 and nStOutSize is set to 16.

-nStSize is set to (1< < log2 StSize).

-numStX is set equal to 2 if nTbH is equal to 4 and nTbW is greater than 8.

Else, numStX is set equal to 1.

-numStY is set equal to 2 if nTbW is equal to 4 and nTbH is greater than 8.

Else, numStY is set equal to 1.

-nonZeroSize is set equal to 8 if nTbW and nTbH are both equal to 4 or nTbW and nTbH are both equal to 8.

Else, nonZeroSize is set equal to 16.

2. For xsbdx ═ 0.. numStX-1 and ysbdx ═ 0.. numStY-1, the following applies:

-a variable array u [ x ] (where x is 0.. non zerosize-1) is derived as follows:

xC=(xSbIdx<<log2StSize)+DiagScanOrder[log2StSize][log2StSize][x][0]

yC=(ySbIdx<<log2StSize)+DiagScanOrder[log2StSize][log2StSize][x][1]

u[x]=d[xC][yC]

-u [ x ] (where x ═ 0.. no zerosize-1) is transformed into an array of variables v [ x ] (where x ═ 0.. no zerosize-1) by calling the one-dimensional transformation process specified in item 8.7.4.4 with the transformation input length no zerosize of the scaled transform coefficients, the transformation output length nstout size of the list u [ x ] (where x ═ 0.. no zerosize-1), the index stpredmodeintrara of the transformation set selection and the index st _ idx [ xTbY ] [ yty ] of the transformation selection in the transformation set as inputs, and the output is the list v [ x ] (where x ═ 0.. no zerosize-1). The variable stPredModeIntra is set to predModeIntra specified in clause 8.4.4.2.1.

The array d [ (xsbeidx < < log2StSize) + x ] [ (ysbeidx < < log2StSize) + y ] (where x 0.. nstize-1, y 0.. nstize-1) is derived as follows:

if stPredModeIntra is less than or equal to 34, or equal to INTRA _ LT _ CCLM, INTRA _ T _ CCLM or INTRA _ L _ CCLM, then the following applies:

d[(xSbIdx<<log2StSize)+x][(ySbIdx<<log2StSize)+y]=(y<4)?v[x+(y<<log2StSize)]:((x<4)?v[32+x+((y–4)<<2)]:d[(xSbIdx<<log2StSize)+x][(ySbIdx<<log2StSize)+y])

otherwise, the following applies:

d[(xSbIdx<<log2StSize)+x][(ySbIdx<<log2StSize)+y]=(y<4)?v[y+(x<<log2StSize)]:((x<4)?v[32+(y–4)+(x<<2)]:d[(xSbIdx<<log2StSize)+x][(ySbIdx<<log2StSize)+y])

the variable implicitimtsenenabled is derived as follows:

-if sps _ mts _ enabled _ flag is equal to 1, and one of the following conditions is true, then implicitMtsEnabled is set to 1:

IntraSubPartitionsSplitType not equal to ISP _ NO _ SPLIT

-cu sbt flag is equal to 1 and Max (nTbW, nTbH) is less than or equal to 32

-sps _ explicit _ mts _ INTRA _ enabled _ flag and sps _ explicit _ mts _ inter _ enabled _ flag are both equal to 0, and CuPredMode [ xTbY ] [ yTbY ] is equal to MODE _ INTRA

-otherwise, implicitMtsEnabled is set equal to 0.

The variable trTypeHor specifying the horizontal transform kernel and the variable trTypeVer specifying the vertical transform kernel are derived as follows:

-if cIdx is greater than 0, trTypeHor and trTypeVer are set equal to 0.

Otherwise, if implicitMtsEnabled is equal to 1, then the following applies:

-if IntraSubPartitionsSplitType is not equal to ISP _ NO _ SPLIT, then trTypeHor and trTypeVer are specified in tables 8-15 according to intraPredMode.

Otherwise, if cu _ sbt _ flag is equal to 1, trTypeHor and trTypeVer are specified in tables 8-14 according to cu _ sbt _ horizontal _ flag and cu _ sbt _ pos _ flag.

Otherwise (sps _ explicit _ mts _ intra _ enabled _ flag and sps _ explicit _ mts _ inter _ enabled _ flag equal to 0), trTypeHor and trTypeVer are derived as follows:

trTypeHor=(nTbW>=4&&nTbW<=16&&nTbW<=nTbH)?1:0 (8-1029)

trTypeVer=(nTbH>=4&&nTbH<=16&&nTbH<=nTbW)?1:0 (8-1030)

otherwise, trTypeHor and trTypeVer are specified in tables 8-13 according to tu _ mts _ idx [ xTbY ] [ yTbY ].

The variables nonZeroW and nonZeroH are derived as follows:

nonZeroW=Min(nTbW,(trTypeHor>0)?16:32) (8-1031)

nonZeroH=Min(nTbH,(trTypeVer>0)?16:32) (8-1032)

the (nTbW) x (ntbh) array r of residual samples is derived as follows:

1. when nTbH is greater than 1, each (vertical) column of the scaling transform coefficient d [ x ] [ y ] (where x is 0.. non zerow-1, y is 0.. non zeroh-1) is transformed into e [ x ] [ y ] (where x is 0.. non zerow-1, y is 0.. nTbH-1) by calling the one-dimensional transform process specified in section 8.7.4.2 for each column x [ x ] [ y ] (where y is 0.. non zeroz h-1) with the height of the transform block nTbH, the non-zero height of the scaling transform coefficient nonzeroz, the list d [ x ] [ y ] (where y is 0.. non zeroh-1), and the transform type variable trType set equal to typever as inputs, and the output is a list of list e [ x ] (where y.. non zerow-1).

2. When nTbH and nTbW are both greater than 1, the intermediate sample value g [ x ] [ y ] (where x is 0.. nonZeroW-1, y is 0.. nTbH-1) is derived as follows:

g[x][y]=Clip3(CoeffMin,CoeffMax,(e[x][y]+64)>>7) (8-1033)

when nTbW is greater than 1, each (horizontal) row of the result array g [ x ] [ y ] (where x is 0.. nonZeroW-1, y is 0.. nTbH-1) is transformed into r [ x ] [ y ] (where x is 0.. nTbW-1, y is 0.. nTbH-1) by calling the one-dimensional transformation process specified in the 8.7.4.2 bar for each row y · nTbH-1 with the width nTbW of the transformation block, the non-zero width nonZeroW of the result array g [ x ] [ y ], the list g [ x ] [ y ] (where x is 0.. nonZeroW-1), and a transformation type variable trType set equal to trTypeHor as inputs, and the output is the list [ x ] [ y ] (where x.. ntw-1).

5.3 example #3

Context modeling of modified RST indices.

5.3.1 alternative #1

9.5.4.2.8 derivation of ctxInc of syntax element st _ idx

The inputs to this process are the color component index cIdx, the luma or chroma position (x0, y0) specifying the left top sample of the current luma or chroma codec block relative to the left top sample of the current picture according to cIdx, the tree type treeType, the luma Intra prediction mode IntraPredModeY [ x0] [ y0] specified in stripe 8.4.2, the syntax element intra _ chroma _ pred _ mode [ x0] [ y0] of the intra prediction mode specifying chroma samples specified in stripe 7.4.7.5, the block width nTbW and height nTbH, and the multiple transform selection index tu _ mts _ idx [ x0] [0 ].

The output of this process is the variable ctxInc.

The variable intraModeCtx is derived as follows:

if cIdx equals 0, intraModeCtx is derived as follows:

intraModeCtx=(IntraPredModeY[x0][y0]<=1)?1:0

otherwise (cIdx is greater than 0), intraModeCtx is derived as follows:

intraModeCtx=(intra_chroma_pred_mode[x0][y0]>=4)?1:0

the variable mtsCtx is derived as follows:

mtsCtx=((sps_explicit_mts_intra_enabled_flagtu_mts_idx[x0][y0]==0:nTbW==nTbH)&&treeType!=SINGLE_TREE)?1:0

the variable ctxInc is derived as follows:

ctxInc=(binIdx<<1)+intraModeCtx+(mtsCtx<<2)

5.3.2 alternative #2

Table 9-15-assignment of ctxInc to syntax elements with context codec bin

Derivation process of ctxInc of [ [9.5.4.2.8 syntax element st _ idx

The inputs to this process are the color component index cIdx, the luma or chroma position (x0, y0) specifying the left top sample of the current luma or chroma codec block relative to the left top sample of the current picture according to cIdx, the tree type treeType, the luma Intra prediction mode IntraPredModeY [ x0] [ y0] specified in stripe 8.4.2, the syntax element intra _ chroma _ pred _ mode [ x0] [ y0] specifying the intra prediction mode of chroma samples specified in stripe 7.4.7.5, and the multiple transform selection index tu _ mts _ idx [ x0] [ y0 ].

The output of this process is the variable ctxInc.

The variable intraModeCtx is derived as follows:

if cIdx equals 0, intraModeCtx is derived as follows:

intraModeCtx=(IntraPredModeY[x0][y0]<=1)?1:0

otherwise (cIdx is greater than 0), intraModeCtx is derived as follows:

intraModeCtx=(intra_chroma_pred_mode[x0][y0]>=4)?1:0

the variable mtsCtx is derived as follows:

mtsCtx=(tu_mts_idx[x0][y0]==0&&treeType!=SINGLE_TREE)?1:0

the variable ctxInc is derived as follows:

ctxInc=(binIdx<<1)+intraModeCtx+(mtsCtx<<2)]]

fig. 22A is a block diagram of the video processing apparatus 2210. Apparatus 2210 may be used to implement one or more of the methods described herein. The apparatus 2210 may be embodied in a smartphone, tablet, computer, internet of things (IoT) receiver, and/or the like. The apparatus 2210 may include one or more processors 2212, one or more memories 2214, and video processing hardware 2216. The processor(s) 2212 may be configured to implement one or more methods described in this document. The memory (es) 2214 may be used to store data and code for implementing the methods and techniques described herein. Video processing hardware 2216 may be used to implement some of the techniques described in this document in hardware circuitry.

Fig. 22B is another example of a block diagram of a video processing system in which the disclosed techniques may be implemented. Fig. 22B is a block diagram illustrating an example video processing system 2220 in which various techniques disclosed herein may be implemented. Various embodiments may include some or all of the components of system 2220. The system 2220 may include an input 2222 for receiving video content. The video content may be received in a raw or uncompressed format, e.g., 8 or 10 bit multi-component pixel values, or may be in a compressed or encoded format. Input 2222 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as ethernet, Passive Optical Networks (PONs), etc., and wireless interfaces such as Wi-Fi or cellular interfaces.

The system 2220 may include a codec component 2224 that may implement the various codecs or encoding methods described in this document. The codec component 2224 may reduce the average bit rate of the video from the input 2222 to the output of the codec component 2224 to produce a codec representation of the video. Codec techniques are therefore sometimes referred to as video compression or video transcoding techniques. The output of the codec component 2224 may be stored or transmitted via a communication connection as represented by component 2226. The stored or communicated bitstream (or codec) of video received at input 2222 represents displayable video that may be used by component 2228 to generate pixel values or communicated to display interface 2229. The process of generating user-viewable video from a bitstream representation is sometimes referred to as video decompression. Further, while a particular video processing operation is referred to as a "codec" operation or tool, it will be understood that the codec tool or operation is used at the encoder and that a corresponding decoding tool or operation that inverts the codec result will be performed by the decoder.

Examples of a peripheral bus interface or display interface may include a Universal Serial Bus (USB), or a High Definition Multimedia Interface (HDMI), or a Displayport (Displayport), among others. Examples of storage interfaces include SATA (serial advanced technology attachment), PCI, IDE interfaces, and the like. The techniques described in this document may be embodied in various electronic devices, such as mobile phones, laptops, smart phones, or other devices capable of performing digital data processing and/or video display.

The examples described above may incorporate the context of the methods described below, such as methods 2310 and 2320, which may be implemented at a video decoder or video encoder.

Fig. 23A shows a flow diagram of an exemplary method for video processing. Method 2310 includes, at step 2312, performing a transition between a current video block of video and a codec representation of the video. In some embodiments, the secondary transform means comprises applying a positive secondary transform to the output of a positive primary transform applied to the residual of the current video block prior to quantization during encoding, or applying an inverse secondary transform to the output of a dequantization of the current video block prior to applying an inverse primary transform during decoding.

In some embodiments, the converting comprises: selecting a transform set or a transform matrix for a current video block of the video to be used in application of a quadratic transform tool to the current video block based on a characteristic of the current video block; and applying the selected transform set or transform matrix to the current video block. In some implementations, the converting includes applying a quadratic transform tool to a sub-region of the current video block that is not the top left portion of the current video block.

In some embodiments, the codec representation conforms to a format rule that specifies the last non-zero coefficient in the residual of the current video block and controls whether or how side information about the secondary transform tool is included in the codec representation. In some implementations, the codec representation conforms to a format rule that specifies one or more coefficients in a residual of the portion of the current video block and controls whether or how side information about a secondary transform tool is included in the codec representation. In some implementations, performing the transform includes determining applicability of a secondary transform tool to the current video block based on presence of non-zero coefficients in one or more codec groups of the current video block.

In some embodiments, the codec representation conforms to a format rule that specifies that syntax elements corresponding to side information of a secondary transform tool for the current video block are signaled in the codec representation prior to the transform-related information. In some embodiments, the codec representation conforms to a format rule that specifies that syntax elements corresponding to side information of a secondary transform tool for the current video block are signaled in the codec representation before the residual codec information. In some embodiments, performing the transformation includes coding a residual of the current video block according to a rule based on information related to a quadratic transform tool. In some embodiments, performing the transformation includes applying an arithmetic codec to one or more portions of the current video block using different context modeling methods according to a rule.

In some implementations, performing the conversion includes configuring a context model for coding or bypass coding bits of a bin string corresponding to an index of a secondary transform tool based on characteristics of a current video block of the video, and the index indicates applicability of the secondary transform tool and/or kernel information of the secondary transform tool. In some implementations, performing the conversion includes determining whether a syntax element is included in the codec representation based on a size of the current video block. In some implementations, the syntax element corresponds to side information of at least one of an indication to apply the secondary transform and an index of a transform core used in the secondary transform process.

Fig. 23B shows a flow diagram of an exemplary method for video processing. Method 2320 includes, at step 2322, determining applicability of a secondary transform tool to a current video block due to rules related to an intra prediction direction used to codec the current video block, use of a codec tool, and/or a color component of video from which the current video block is derived, for a transition between the current video block of a current picture of the video and a codec representation of the video. The method 2320 further includes, at step 2324, performing a conversion based on the determination.

In some embodiments, the video codec method may be implemented using an apparatus implemented on a hardware platform as described with reference to fig. 23A or 23B.

Some embodiments of the disclosed technology include making a decision or determination to enable a video processing tool or mode. In an example, when a video processing tool or mode is enabled, the encoder will use or implement the tool or mode in the processing of blocks of video, but does not necessarily modify the resulting bitstream based on the use of the tool or mode. That is, when a video processing tool or mode is enabled based on the decision or determination, the conversion from a block of video to a bitstream representation of the video will use the video processing tool or mode. In another example, when a video processing tool or mode is enabled, the decoder will process the bitstream knowing that the bitstream has been modified based on the video processing tool or mode. That is, the conversion from a bitstream representation of the video to a block of the video will be performed using a video processing tool or mode that is enabled based on the decision or determination.

Some embodiments of the disclosed technology include making a decision or determination to disable a video processing tool or mode. In an example, when a video processing tool or mode is disabled, the encoder will not use the tool or mode in the conversion of blocks of video to bitstream representations of the video. In another example, when a video processing tool or mode is disabled, the decoder will process the bitstream knowing that the bitstream was not modified using the disabled video processing tool or mode based on the decision or determination.

In this document, the term "video processing" may refer to video encoding, video decoding, video compression, or video decompression. For example, a video compression algorithm may be applied during the conversion from a pixel representation of the video to a corresponding bitstream representation, and vice versa. The bitstream representation of the current video block may, for example, correspond to bits that are collocated or dispersed in different places within the bitstream, as defined by the syntax. For example, a block may be encoded according to transform and codec error residual values and also using bits in headers and other fields in the bitstream. Herein, a block may correspond to a grouping of samples or pixels for an operation, such as a codec unit or a transform unit or a prediction unit, etc.

Various techniques and embodiments may be described using the following clause-based format. In the following, a quadratic transform tool may be used, during encoding a positive quadratic transform being applied to the output of the positive quadratic transform applied to the residual of the current video block before quantization, or during decoding an inverse quadratic transform being applied to the output of the dequantization of the current video block before applying the inverse quadratic transform. The quadratic transform tool is adapted to the block between the forward primary transform and the quantization step or between the de-quantization step and the inverse primary transform, and wherein the reduced size corresponds to a sub-block reduced from the size of the block. In some embodiments, the second transformation tool corresponds to a low frequency undifferentiated transformation (LFNST) tool.

The first set of clauses describes certain features and aspects of the disclosed technology in the previous section.

1. A method for video processing, comprising: selecting a transform set or a transform matrix for simplifying application of a quadratic transform to the current video block based on characteristics of the current video block; and applying the selected transform set or transform matrix to the portion of the current video block as part of a conversion between the current video block and a bitstream representation of video that includes the current video block.

2. The method of clause 1, wherein the portion of the current video block is a top right sub-region, a bottom left sub-region, or a center sub-region of the current video block.

3. The method of clause 1 or 2, wherein the characteristic of the current video block is an intra prediction mode or a primary transform matrix of the current video block.

4. The method of clause 1, wherein the characteristic is a color component of the current video block.

5. The method of clause 4, wherein a first transform set is selected for a luma component of the current video block, and wherein a second transform set different from the first transform set is selected for one or more chroma components of the current video block.

6. The method of clause 1, wherein the characteristic is an intra prediction mode or an intra coding method of the current video block.

7. The method of clause 6, wherein the intra prediction method comprises a multi-reference line (MRL) based prediction method or a matrix based intra prediction method.

8. The method of clause 6, wherein a first set of transforms is selected when the current video block is a cross-component linear model (CCLM) codec block, and wherein a second set of transforms different from the first set of transforms is selected when the current video block is a non-CCLM codec block.

9. The method of clause 6, wherein the first transform set is selected when the current video block is coded using a joint chroma residual coding method, and wherein the second transform set, different from the first transform set, is selected when the current video block is not coded using the joint chroma residual coding method.

10. The method of clause 1, wherein the characteristic is a transform of the current video block.

11. A method for video processing, comprising: making a decision, based on one or more coefficients associated with a current video block, regarding signaling to selectively include side information in a bitstream representation of the current video block for simplifying application of a secondary transform (RST); and based on the determination, performing a transition between the current video block and video comprising a bit stream representation of the current video block.

12. The method of clause 11, wherein the one or more coefficients comprise a last non-zero coefficient in a scan order of the current video block.

13. The method of clause 11, wherein the one or more coefficients comprise a plurality of coefficients within a partial region of the current video block.

14. The method of clause 13, wherein the partial region comprises one or more coding-decoding groups to which RST can be applied.

15. The method of clause 13, wherein the partial region comprises the first M codec groups or the last M codec groups in the scan order of the current video block.

16. The method of clause 13, wherein the partial region comprises the first M codec groups or the last M codec groups in reverse scan order of the current video block.

17. The method of clause 13, wherein making the decision is further based on the energy of one or more non-zero coefficients of the plurality of coefficients.

18. A method for video processing, comprising: configuring a bitstream representation of the current video block to simplify application of a secondary transform (RST) to the current video block, wherein syntax elements related to the RST are signaled in the bitstream representation prior to coding residual information; and based on the configuration, performing a conversion between the current video block and a bitstream representation of the current video block.

19. The method of clause 18, wherein signaling the syntax element related to RST is based on use of at least one codec block flag or transform selection mode.

20. The method of clause 18, wherein the bitstream indicates that the codec residual information corresponding to the codec group having all zero coefficients is excluded.

21. The method of clause 18, wherein the codec residual information is based on application of the RST.

22. A method for video processing, comprising: configuring a bitstream representation of a current video block to simplify application of a secondary transform (RST) to the current video block, wherein syntax elements related to the RST are signaled in the bitstream representation prior to a transform skip indication or a Multiple Transform Set (MTS) index; and based on the configuration, performing a conversion between the current video block and a bitstream representation of the current video block.

23. The method of clause 22, wherein the transform skip indication or the MTS index is based on a syntax element related to the RST.

24. A method for video processing, comprising: configuring a context model for encoding and decoding an index of a simplified secondary transform (RST) based on a characteristic of a current video block; and based on the configuration, performing a conversion between the current video block and a bitstream representation of the video that includes the current video block.

25. The method of clause 24, wherein the characteristic is an explicit or implicit invocation of a Multiple Transform Selection (MTS) procedure.

26. The method of clause 24, wherein the characteristic is an enablement of a cross-component linear model (CCLM) codec mode in the current video block.

27. The method of clause 24, wherein the characteristic is a size of the current video block.

28. The method of clause 24, wherein the characteristic is a partition depth of a partitioning process applied to the current video block.

29. The method of clause 28, wherein the partitioning process is a Quadtree (QT) partitioning process, a Binary Tree (BT) partitioning process, or a Ternary Tree (TT) partitioning process.

30. The method of clause 24, wherein the characteristic is a color format or a color component of the current video block.

31. The method of clause 24, wherein the characteristic excludes an intra prediction mode of the current video block and an index of a Multiple Transform Selection (MTS) process.

32. A method for video processing, comprising: making a decision regarding the selective application of an inverse simplified secondary transform (RST) process to the current video block based on characteristics of the current video block; and based on the determination, performing a conversion between the current video block and a bitstream representation of the video that includes the current video block.

33. The method of clause 32, wherein the characteristic is a coded block flag of a coded block of the current video block.

34. The method of clause 33, wherein the reverse RST process is not applied, and wherein the codec block flag of the top left codec group is zero.

35. The method of clause 33, wherein the inverse RST process is not applied, and wherein the coded block flags of the first coded block and the second coded block in the scan order of the current video block are zero.

36. The method of clause 32, wherein the characteristic is a height (M) or a width (N) of the current video block.

37. The method of clause 36, wherein the inverse RST process is not applied, and wherein (i) M-8 and N-4, or (ii) M-4 and N-8.

38. An apparatus in a video system comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to implement the method of any of clauses 1 to 37.

39. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method of any of clauses 1 to 37.

The second clause set describes certain features and aspects of the disclosed technology in previous sections, such as example embodiments 1-4.

1. A video processing method, comprising: performing a conversion between a current video block of video and a codec representation of the video, wherein the conversion comprises:

selecting a transform set or a transform matrix for a current video block of the video to be used in application of a quadratic transform tool to the current video block based on a characteristic of the current video block; and applying the selected transform set or transform matrix to the current video block, and wherein, using a quadratic transform tool: a forward secondary transform is applied to the output of the forward transform applied to the residual of the current video block prior to quantization during encoding, or an inverse secondary transform is applied to the output of the dequantization of the current video block prior to application of the inverse primary transform during decoding.

2. The method of clause 1, wherein the secondary transformation tool corresponds to a low frequency undifferentiated transformation (LFNST) tool.

3. The method of clause 1 or 2, wherein the characteristic is a color component of the current video block.

4. The method of clause 3, wherein a first transform set is selected for a luma component of the current video block and a second transform set, different from the first transform set, is selected for one or more chroma components of the current video block.

5. The method of clause 3, wherein each color component of the current video block corresponds to one transform set.

6. The method of clause 3, wherein the multiple sets of transform matrices are selected for different color components of the current video block such that one set of the multiple sets includes at least one transform matrix that is different from the matrices of the remaining set.

7. The method of clause 1, wherein the characteristic is an intra prediction method of the current video block.

8. The method of clause 7, wherein the intra prediction method of the current video block comprises a cross-component linear model (CCLM) or a matrix-based intra prediction Method (MIP) mode, wherein the CCLM uses a linear mode to derive a prediction value for a chroma component of the current video block, and wherein the MIP mode comprises determining the prediction value of the current video block by performing a boundary downsampling operation on previously coded samples of the video, followed by a matrix vector multiplication operation, and optionally followed by an upsampling operation.

9. The method of clause 7, wherein selecting the transform set or the transform matrix is according to a rule based on use of a cross-component linear model (CCLM) that derives prediction values for chroma components of the current video block using a linear mode.

10. The method of clause 7, wherein selecting the transform set or transform matrix is according to a rule based on the use of single or multiple reference lines in the prediction mode of the current video block.

11. The method of clause 7, wherein selecting the transform set or the transform matrix is according to a rule based on the use of joint chroma residual coding of the current video block.

12. The method of clause 1, wherein the characteristic is a type of a forward transform or a type of an inverse transform of the current video block.

13. The method of clause 12, wherein the primary transform and the inverse primary transform are identity transforms, and wherein the set of transforms and/or the transform matrix used in the application of the secondary transform tool is different from the metric used in the primary transform and the inverse primary transform.

14. The method of clause 12, wherein the primary forward transform or the primary inverse transform is performed with a horizontal 1D transform and a vertical 1-D transform having the same basis functions, and wherein the transform set and/or the transform matrix used in the application of the quadratic transform tool are different basis functions of the vertical and horizontal transforms used in the primary forward transform or the primary inverse transform.

15. The method of any of clauses 1-14, wherein performing a conversion comprises generating a codec representation from a current video block or generating a current video block from a codec representation.

16. A video processing method, comprising: performing a transformation between a current video block of the video and a codec representation of the video, wherein the transformation comprises applying a quadratic transformation tool to a sub-region of the current video block that is not the top left portion of the current video block, and wherein, using the quadratic transformation tool: a forward secondary transform is applied to the output of the forward primary transform applied to the residuals of the sub-regions of the current video block prior to quantization during encoding, or an inverse secondary transform is applied to the output of the dequantization of the sub-regions of the current video block prior to application of the inverse primary transform during decoding.

17. The method of clause 16, wherein the secondary transformation tool corresponds to a low frequency undifferentiated transformation (LFNST) tool.

18. The method of clause 16, wherein the sub-region of the current video block corresponds to a top right, bottom left, or center of the current video block.

19. The method of clause 16, wherein the sub-region is determined based on an intra prediction mode or a one-time transform matrix of the current video block.

20. The method of any of clauses 16-19, wherein performing a conversion comprises generating a codec representation from a current video block or generating a current video block from a codec representation.

21. A video processing method, comprising: determining applicability of a secondary transform tool to a current video block of a current picture of a video for a transition between the current video block and a codec representation of the video due to rules related to an intra prediction direction used to codec the current video block, use of the codec tool, and/or a color component of the video from which the current video block is derived; and performing a conversion based on the determination.

22. The method of clause 21, wherein the secondary transformation tool corresponds to a low frequency undifferentiated transformation (LFNST) tool.

23. The method of clause 21, wherein the determining determines that a secondary transform tool is applied to the current video block, and wherein, using the secondary transform tool: during encoding, a positive secondary transform is applied to the output of the positive primary transform applied to the residual of the current video block prior to quantization; or during decoding, an inverse quadratic transform is applied to the dequantized output of the current video block before applying the inverse primary transform.

24. The method of clause 21, wherein the determining determines that no secondary transform tool is applied to the current video block, and wherein during encoding no positive secondary transform is applied to the output of the positive primary transform applied to the residual of the current video block prior to quantization; or wherein during decoding, an inverse quadratic transform of the dequantized output of the current video block is omitted prior to applying the inverse quadratic transform.

25. The method of clause 21, wherein the coding tool corresponds to cross-component linear model (CCLM) or joint chroma residual coding.

26. The method of clause 21, wherein the color component corresponds to a chroma component of the current video block.

27. The method of clause 21, wherein the determining determines that a secondary transform tool is not applied to the current video block if the color component corresponds to the chroma component.

28. The method of clause 21, wherein the coding tool corresponds to an intra prediction method.

29. The method of any of clauses 21-28, wherein performing a conversion comprises generating a codec representation from a current video block or generating a current video block from a codec representation.

30. An apparatus in a video system comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to implement the method of any of clauses 1 to 29.

31. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method of any of clauses 1 to 29.

A third set describes certain features and aspects of the disclosed technology in previous sections, such as example embodiments 5-7.

1. A video processing method, comprising: performing a transformation between a current video block of a video and a codec representation of the video, wherein the codec representation complies with a format rule that specifies a last non-zero coefficient in a residual of the current video block and controls whether or how side information about a secondary transform tool is included in the codec representation, and wherein the secondary transform tool comprises applying, during encoding, a positive secondary transform to an output of a positive primary transform applied to the residual of the video block prior to quantization, or applying, during decoding, an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform.

2. The method of clause 1, wherein the secondary transformation tool corresponds to a low frequency undifferentiated transformation (LFNST) tool.

3. The method of clause 1, wherein the format rule specifies a last non-zero coefficient in a scan order of the current video block.

4. The method of clause 1, wherein the format rule control performs signaling the side information of the LFNST tool in case the last non-zero coefficient is located in the coding/decoding block of the current video block to which the quadratic transform tool is applied.

5. The method of clause 1, wherein the format rule controls the signaling of the skip side information in case the last non-zero coefficient is not located in the coding/decoding group of the current video block to which the quadratic transform tool is applied.

6. The method of clause 1, wherein the side information comprises at least one of an indication to apply the quadratic transformation tool, an index of transformation cores used in the quadratic transformation tool.

7. The method of clause 1, wherein in the event that the transformed side-information is not included in the codec representation, the quadratic transform tool is disabled for the current video block.

8. The method of any of clauses 1-7, wherein performing the conversion comprises generating a codec representation from the video or generating the video from the codec representation.

9. A video processing method, comprising: performing a transformation between a current video block of a video and a codec representation of the video, wherein the codec representation conforms to one or more coefficients in a residual specifying a portion of the current video block and controls a format rule regarding whether or how side information of a secondary transform tool is included in the codec representation, and wherein the secondary transform tool comprises applying, during encoding, a positive secondary transform to an output of the positive transform applied to the residual of the video block prior to quantization or applying, during decoding, an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform.

10. The method of clause 9, wherein the secondary transformation tool corresponds to a low frequency undifferentiated transformation (LFNST) tool.

11. The method of clause 9, wherein the format rule defines the portion as one or more codec groups to which the secondary conversion tool is applied.

12. The method of clause 9, wherein the format rule defines the portion as the first M codec groups or the last M codec groups of the current video block in scan order or inverse scan order.

13. The method of clause 12, wherein M depends on the size of the current video block.

14. The method of clause 12, wherein M is 2 where the current video block is of size 4xN and/or Nx4, where N is an integer greater than 8.

15. The method of clause 12, wherein M is 1 where the current video block is of size 4x8 and/or 8x4 and/or WxH, where W and H are integers equal to or greater than 8.

16. The method of clause 9, wherein the formatting rule is based on the location of one or more coefficients within the portion.

17. The method of clause 9, wherein the formatting rule is based on the energy of one or more non-zero coefficients within the portion.

18. The method of clause 9, wherein the formatting rule is based on a number of one or more coefficients within the portion.

19. The method of clause 18, wherein the format rule controls the signaling of the skip-side information in case the number of one or more coefficients within the portion is less than a threshold.

20. The method of clause 19, wherein the threshold is based on a slice type, a picture type, a partition tree type, or video content.

21. The method of clause 19, wherein the threshold is based on the color format and/or color component of the current video block.

22. The method of clause 9, wherein the side information comprises at least one of an indication to apply the quadratic transformation tool, an index of transformation cores used in the quadratic transformation tool.

23. The method of clause 9, wherein in the event that the transformed side-information is not included in the codec representation, the quadratic transform tool is disabled for the current video block.

24. The method of any of clauses 9 to 23, wherein performing a conversion comprises generating a codec representation from the video or generating the video from the codec representation.

25. A video processing method, comprising: performing a transform between a current video block of a video and a codec representation of the video, wherein performing the transform comprises determining applicability of a secondary transform tool to the current video block based on presence of non-zero coefficients in one or more codec groups of the current video block, and wherein the secondary transform tool comprises applying a positive secondary transform to an output of a positive primary transform applied to a residual of the video block prior to quantization during encoding or applying an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform during decoding.

26. The method of clause 25, wherein the secondary transformation tool corresponds to a low frequency undifferentiated transformation (LFNST) tool.

27. The method of clause 25, wherein the determining determines to apply a quadratic transform tool if at least one of the codec groups contains at least one non-zero coefficient.

28. The method of clause 25, wherein the determining determines that a quadratic transform tool is enabled if the first two 4x4 codec groups include at least one non-zero coefficient for a current video block of size 4xN and/or Nx4, where N is an integer greater than 8.

29. The method of clause 25, wherein the determining determines that the quadratic transform tool is enabled if the top-left 4x4 codec group contains at least one non-zero coefficient for the current video block of size 4x8 and/or 8x 4.

30. The method of clause 25, wherein the determining determines that a quadratic transform tool is enabled in the event that the top-left 4x4 codec group contains at least one non-zero coefficient for a current video block of size WxH, where W and H are integers equal to or greater than 8.

31. The method of clause 25, wherein the determining determines that the LFNST tool is not allowed in the absence of non-zero coefficients in the encoding and decoding block.

32. The method of clause 31, wherein the determining determines to disable a quadratic transform tool if there are no non-zero coefficients in the first two 4x4 coding blocks for a current video block of size 4xN and/or Nx4, where N is an integer greater than 8.

33. The method of clause 31, wherein the determining determines to disable the quadratic transform tool if there are no non-zero coefficients in the top left 4x4 coding-decoding block for a current video block of size 4x8 and/or 8x 4.

34. The method of clause 31, wherein the determining determines to disable the quadratic transform tool if there are no non-zero coefficients in the top left 4x4 coding decoding block for a current video block of size WxH, where W and H are integers equal to or greater than 8.

35. The method of clause 31, wherein the determining determines to disable the quadratic transform tool if there are no non-zero coefficients in the top left 4x4 coding decoding block for a current video block of size WxH, where W and H are integers equal to or greater than 8.

36. The method of any of clauses 25 to 35, wherein, in the event that a quadratic transform tool is disabled for the current video block, side information of the quadratic transform tool is not included in the codec representation.

37. The method of clause 36, wherein the side information comprises at least one of an indication to apply the secondary transformation tool, an index of a transformation core used in the secondary transformation process.

38. The method of any of clauses 25-37, wherein performing a conversion comprises generating a codec representation from the video or generating the video from the codec representation.

39. The method of any of clauses 1-38, wherein at least some blocks of the video are codec in the codec representation using a quadratic transform tool.

40. An apparatus in a video system comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to implement the method of any of clauses 1 to 39.

41. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method of any of clauses 1 to 39.

The fourth set describes certain features and aspects of the disclosed technology in previous sections, such as example embodiments 8-10.

1. A video processing method, comprising: performing a transform between a current video block of a video and a codec representation of the current video block, wherein the codec representation complies with a format rule specifying that syntax elements corresponding to side information of a secondary transform tool of the current video block are signaled in the codec representation prior to transform related information, wherein the secondary transform tool comprises applying a positive secondary transform to an output of a positive primary transform applied to a residual of the video block prior to quantization during encoding or applying an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform during decoding.

2. The method of clause 1, wherein the secondary transformation tool corresponds to a low frequency undifferentiated transformation (LFNST) tool.

3. The method of clause 1, wherein the side information comprises at least one of an indication to apply a secondary transformation tool, an index of a transformation core used in the secondary transformation process.

4. The method of clause 1, wherein the transform-related information comprises at least one of a transform skip indication indicating to skip the forward/inverse transform, side information of a multi-transform set (MTS) tool.

5. The method of clause 4, further comprising the side information of the MTS tool including an index indicating one or more transform types in a transform set for the current video block.

6. The method of clause 4, wherein the format rule controls the signaling of the transform skip indication based on the syntax element.

7. The method of clause 4, wherein the format rule controls signaling of a Multiple Transform Set (MTS) index based on the syntax element.

8. The method of clause 7, wherein for the current video block for which the quadratic transformation facility is enabled, the multi-transform set (MTS) index is not signaled and is inferred to be zero.

9. The method of any of clauses 1-8, wherein the syntax element is an LFNST (low frequency non-differentiable transform) index.

10. The method of any of clauses 1-9, wherein performing the conversion comprises generating a codec representation from the video or generating the video from the codec representation.

11. A video processing method, comprising: performing a transformation between a current video block of a video and a codec representation of the video, wherein the codec representation complies with a format rule specifying that syntax elements corresponding to side information of a secondary transform tool for the current video block are signaled in the codec representation before residual codec information, wherein the secondary transform tool comprises applying a positive secondary transform to an output of a positive primary transform for a residual of the video block before quantization during encoding or applying an inverse secondary transform to an output of a dequantization of the video block before applying the inverse primary transform during decoding.

12. The method of clause 11, wherein the secondary transformation tool corresponds to a low frequency undifferentiated transformation (LFNST) tool.

13. The method of clause 11, wherein the side information comprises at least one of an indication to apply the secondary transformation tool, an index of a transformation core used in the secondary transformation process.

14. The method of clause 11, wherein counting the number of non-zero coefficients in the partial region and the entire region of the current video block is omitted.

15. The method of clause 11, wherein the syntax element is coded before the syntax element related to coding of the residual coding information.

16. The method of clause 11, wherein the format rule specifies that the syntax element is signaled based on signaling of a codec block flag or use of a transform selection mode.

17. The method of clause 16, wherein the format rule specifies that the syntax element is coded after signaling of a coding block flag or use of a transform selection mode.

18. The method of clause 16, wherein the format rule specifies that the syntax element is skipped due to use of a transform selection mode that is a Transform Skip (TS) mode.

19. The method of clause 11, wherein the coding means excluding residual coding information corresponding to a coding group that always has zero coefficients.

20. The method of any of clauses 11-16, wherein performing a conversion comprises generating a codec representation from a video or generating a video from a codec representation.

21. A video processing method, comprising: performing a transform between a current video block of the video and a codec representation of the video, wherein performing the transform comprises codec a residual of the current video block according to a rule based on information related to a secondary transform tool, and wherein the secondary transform tool comprises applying a positive secondary transform to an output of the positive primary transform applied to the residual of the video block prior to quantization during encoding or applying an inverse secondary transform to an output of a dequantization of the video block prior to applying the inverse primary transform during decoding.

22. The method of clause 21, wherein the rule specifies that a raster scan order or a vertical scan order is applied instead of a diagonal top-right scan order.

23. The method of clause 21, wherein the rule specifies that context modeling is applied based on previous codec information in the template that is the nearest N neighbors in scan order.

24. The method of clause 21, wherein the rule specifies that context modeling is applied based on previous codec information in the template according to the scanned index.

25. The method of clause 21, wherein the rule specifies that a different binarization method is applied depending on whether a quadratic transform tool is applied to the current video block.

26. The method of clause 21, wherein the rule specifies that the signaling of the syntax element is skipped due to the application of the quadratic transform tool.

27. The method of clause 26, wherein the rule specifies that the signaling of the flag indicating the application of the secondary transform tool is skipped for the coding/decoding group of the current video block.

28. The method of clause 27, wherein the flag is inferred to be 0 or 1.

29. The method of clause 21, wherein the rule specifies skipping signaling of the sign flags for the coefficients and/or coordinates due to application of a quadratic transformation tool.

30. The method of clause 21, wherein the rule specifies applying modified context modeling to the coding block of the current video block to which the LFNST tool is applied, different from context modeling applied to other coding blocks.

31. The method of any of clauses 21-30, wherein performing a conversion comprises generating a codec representation from a video or generating a video from a codec representation.

32. A video processing method, comprising: performing a transformation between a current video block of video and a codec representation of the video, wherein performing the transformation includes applying arithmetic codec to one or more portions of the current video block using different context modeling methods according to rules.

33. The method of clause 32, wherein the one or more portions comprise a first portion and a second portion, wherein the first portion comprises the first M coded-decoded groups of the current video block according to the scan order, and the second portion comprises the remaining coded-decoded groups of the current video block, wherein M is an integer.

34. The method of clause 33, wherein M is 1 or 2.

35. The method of clause 32, wherein the one or more portions comprise a sub-region of the one or more coded blocks to which the current video block includes a low frequency inseparable transform (LFNST) tool is applied and the current video block comprises another sub-region of the one or more coded blocks to which LFNST is not applied.

36. The method of clause 32, wherein the rule specifies that use of previous codec information in the context modeling method is disabled for a first portion of the current video block but enabled for a second portion of the current video block.

37. The method of clause 32, wherein the rule specifies that information for the remaining one or more coding-decoding groups of the current video block is not allowed for decoding of the first coding-decoding group of the current video block.

38. The method of clause 37, wherein the rule specifies that the value of the second codec group and/or the third codec group is not considered for the flag whose codec corresponds to the first codec group.

39. The method of clause 37, wherein the rule specifies that information from neighbors in context templates that are in different coding groups is not considered for coding the current transform coefficient.

40. The method of clause 32, wherein the rule specifies that information used in another part to which a low frequency undifferentiated transform (LFNST) tool is not allowed for decoding of coefficients used in the part to which the LFNST tool is applied.

41. The method of clause 32, wherein the rule specifies that the applying is performed based on whether a low frequency inseparable transform (LFNST) tool is applied and/or a block size of the current video block.

42. The method of any of clauses 35, 40 and 41, wherein, using an LFNST tool, a positive secondary transform is applied to an output of the positive primary transform applied to the residual of the current video block prior to quantization during encoding, or wherein, using an LFNST tool, an inverse secondary transform is applied to an output of dequantization of the current video block prior to application of the inverse primary transform during decoding.

43. The method of any of clauses 32-42, wherein performing a conversion comprises generating a codec representation from the video or generating the video from the codec representation.

44. The method of any of clauses 1-43, wherein at least some blocks of the video are codec in the codec representation using a quadratic transform tool.

45. An apparatus in a video system comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to implement the method of any of clauses 1 to 44.

46. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method of any of clauses 1 to 44.

A fifth set of clauses describes certain features and aspects of the disclosed technology in previous sections, such as example embodiments 11-16.

1. A video processing method, comprising: performing a transformation between a current video block of a video and a codec representation of the video, wherein performing the transformation comprises configuring a context model for coding or bypass coding of bins of a bin string corresponding to an index of a secondary transformation tool based on a characteristic of the current video block of the video, wherein the index indicates applicability of the secondary transformation tool and/or kernel information of the secondary transformation tool, and wherein the secondary transformation tool comprises applying a positive secondary transformation to an output of the positive primary transformation corresponding to a residue of the video block prior to quantization during encoding, or wherein the secondary transformation tool comprises applying an inverse secondary transformation to an output of a dequantization of the video block prior to applying the inverse primary transformation during decoding.

2. The method of clause 1, wherein the secondary transformation tool corresponds to a low frequency undifferentiated transformation (LFNST) tool.

3. The method of clause 1, wherein the context model allows the first bin and/or the second bin to be coded with only one context or to be bypassed.

4. The method of clause 1, wherein the characteristic is an enablement of explicit or implicit Multiple Transform Selection (MTS).

5. The method of clause 4, wherein, where explicit multi-transform selection is enabled, the context is selected based on a type of intra prediction mode applied to the current video block, the type of intra prediction mode being used to select a context for another block.

6. The method of clause 5, wherein the context is selected based on a size of the current video block.

7. The method of clause 4, wherein a transform matrix basis is used instead of checking a transform index for explicit Multiple Transform Selection (MTS) codec.

8. The method of clause 1, wherein the characteristic is an enablement of a cross-component linear model (CCLM) codec mode that uses a linear mode to derive a prediction value for a chroma component of the current video block.

9. The method of clause 1, wherein enablement of a cross-component linear model (CCLM) coding mode that uses a linear mode to derive a prediction value for a chroma component of a current video block determines enablement or selection of a context model for coding an index of a secondary transform tool.

10. The method of clause 1, wherein the enabling or selection of the context model for coding the index of the quadratic transform tool depends on whether the chroma block of the current video block is coded in a DM mode in which the chroma block inherits the same intra prediction coding mode of the corresponding luma block.

11. The method of clause 1, wherein the characteristic is a size of the current video block.

12. The method of clause 1, wherein the characteristic is a partition depth of a partitioning process applied to the current video block.

13. The method of clause 12, wherein the partitioning process is a Quadtree (QT) partitioning process, a Binary Tree (BT) partitioning process, or a Ternary Tree (TT) partitioning process.

14. The method of clause 1, wherein the characteristic is a color format or a color component of the current video block.

15. The method of clause 1, wherein the characteristic excludes an intra prediction mode of the current video block and/or an index of a Multiple Transform Selection (MTS) process.

16. The method of any of clauses 1-15, wherein performing a conversion comprises generating a codec representation from a video or generating a video from a codec representation.

17. An apparatus in a video system comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to implement the method of any of clauses 1 to 16.

18. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method of any of clauses 1 to 16.

A sixth set describes certain features and aspects of the disclosed technology in previous sections, such as example embodiments 17 and 18.

1. A video processing method, comprising: performing a transform between a current video block of the video and a codec representation of the current video block, wherein performing the transform comprises determining whether a syntax element is included in the codec representation based on a size of the current video block, wherein the syntax element corresponds to side information for which a secondary transform tool includes at least one of an indication to apply a secondary transform and an index of a transform kernel used in the secondary transform process, and wherein using the secondary transform, an inverse secondary transform is used to decode the codec representation and is applied to a dequantized output of the current video block prior to applying the inverse primary transform.

2. A video processing method, comprising: performing a transform between a current video block of the video and a codec representation of the current video block, wherein performing the transform comprises determining whether a syntax element is included in the codec representation of the current video block based on a size of the current video block, wherein the syntax element corresponds to side information for which a secondary transform comprises at least one of an indication to apply the secondary transform and an index of a transform kernel used in the secondary transform process, and wherein using the secondary transform, the positive secondary transform is used to encode the current video block and is applied to an output of the primary transform of the current video block prior to applying the quantization process.

3. The method of clause 1 or 2, wherein the quadratic transformation corresponds to a low frequency undifferentiated transformation (LFNST) tool.

4. The method of any of clauses 1-3, wherein the size of the current video block is the height (M) or width (N) of the current video block.

5. The method of any of clauses 1, 3, and 4, wherein the syntax element is not included in the codec representation and the inverse quadratic transform is not applied in the case of (i) M-8 and N-4 or (ii) M-4 and N-8.

6. The method of any of clauses 1, 3 and 4, wherein syntax elements related to the inverse quadratic transform are skipped without applying the inverse quadratic transform.

7. The method of any of clauses 1-3, wherein the syntax element comprises one or more codec flags of one or more codec groups of the current video block.

8. The method of clause 7, wherein in the event that the codec flag of the top-left codec group is zero, the inverse quadratic transform is not applied.

9. The method of clause 8, wherein the current video block has a size not equal to 4xN or Nx4, where N is an integer greater than 8.

10. The method of clause 7, wherein in the case where the coding flags of the first coding-decoding group and the second coding-decoding group according to the scanning order of the current video block are zero, the inverse secondary transform is not applied.

11. The method of clause 10, wherein the current video block has a size equal to 4xN or Nx4, where N is an integer greater than 8.

12. The method of any of clauses 1-11, wherein performing the conversion comprises generating the video from the codec representation or generating the codec representation from the video.

13. The method of any of clauses 1-12, wherein at least some blocks of the video are codec in the codec representation using a quadratic transform tool.

14. An apparatus in a video system comprising a processor and a non-transitory memory having instructions thereon, wherein the instructions, when executed by the processor, cause the processor to implement the method of any of clauses 1 to 13.

15. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for performing the method of any of clauses 1 to 13.

From the foregoing it will be appreciated that specific embodiments of the presently disclosed technology have been described herein for purposes of illustration, but that various modifications may be made without deviating from the scope of the invention. Accordingly, the presently disclosed technology is not limited except as by the appended claims.

Implementations of the subject matter and the functional operations described in this patent document can be implemented in various systems, digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a tangible and non-transitory computer readable medium for execution by, or to control the operation of, data processing apparatus. The computer readable medium can be a machine-readable storage device, a machine-readable storage substrate, a memory device, a combination of substances which affect a machine-readable propagated signal, or a combination of one or more of them. The term "data processing unit" or "data processing apparatus" encompasses all apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.

A computer program (also known as a program, software application, script, or code) can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.

The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit).

Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. However, a computer does not require such a device. Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

It is intended that the specification and figures be considered as exemplary only, with an exemplary meaning being exemplary. As used herein, the use of "or" is intended to include "and/or" unless the context clearly indicates otherwise.

While this patent document contains many specifics, these should not be construed as limitations on the scope of any invention or of what may be claimed, but rather as descriptions of features specific to particular embodiments of particular inventions. Certain features that are described in this patent document in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination. Furthermore, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order, or that all illustrated operations be performed, to achieve desirable results. Moreover, the separation of various system components in the embodiments described in this patent document should not be understood as requiring such separation in all embodiments.

Only some embodiments and examples are described and other embodiments, enhancements and variations can be made based on what is described and illustrated in this patent document.

72页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于视频编解码的去方块滤波器

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类