Contextual modeling of side information for reduced quadratic transforms in video
By introducing reduced secondary transformation technology into video encoding and decoding, dynamically selecting transformation matrices and transformation sets, and optimizing the transformation process of video blocks, the problem of insufficient video encoding and decoding performance in the existing technology is solved, and higher compression efficiency and Encoding and decoding efficiency.
Patent Information
- Application Number
- CN202311507470.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2019-12-24
- Filing Date
- 2020-08-17
- Publication Date
- 2024-09-10
AI Technical Summary
Existing video encoding and decoding technology has deficiencies in compression performance and encoding and decoding efficiency, especially in the selection of transformation sets for chroma components and luminance components that are not optimized enough, resulting in encoding and decoding complexity and performance loss.
A video processing method is proposed that introduces reduced quadratic transform (RST) technology into video encoding and decoding, dynamically selects the transformation matrix and transformation set, determines the applicable transformation tool according to the intra prediction mode and main transformation type, and optimizes the video block transformation process, and apply forward or inverse secondary transformation in a timely manner during the encoding and decoding stages to reduce unnecessary transformation operations.
It improves the compression performance and coding efficiency of video coding and decoding, reduces coding complexity and bit stream redundancy, and improves video quality and coding speed.
Smart Images

Figure CN118632034A
Abstract
Description
[0001] This application is a divisional application of the invention patent application with application number 202080057870.6, application date August 17, 2020, and invention name “Contextual modeling of side information for reduced secondary transform in video”.
[0002] CROSS-REFERENCE TO RELATED APPLICATIONS
[0003] The parent application of this application is an application for entering the Chinese national phase of international patent application PCT / CN2020 / 109476 filed on August 17, 2020, which claims priority to international patent application PCT / CN2019 / 101230 filed on August 17, 2019, international patent application PCT / CN2019 / 107904 filed on September 25, 2019, and international patent application PCT / CN2019 / 127829 filed on December 24, 2019. The entire disclosure of the above applications is incorporated by reference as part of the disclosure of this application. Technical Field
[0004] This patent document relates to video processing technology, equipment and systems. Background Art
[0005] Despite advances in video compression, digital video still accounts for the largest usage of bandwidth on the Internet and other digital communications networks. As the number of connected user devices capable of receiving and displaying video increases, bandwidth requirements for digital video usage are expected to continue to grow. Summary of the invention
[0006] Disclosed are devices, systems and methods related to digital video processing, and in particular, to context modeling for residual coding in video coding. The described methods can be applied to both existing video coding standards (e.g., High Efficiency Video Coding (HEVC)) and future video coding standards or video codecs.
[0007] In one representative aspect, a method of video processing can be provided using the disclosed technology. The method includes: performing conversion between a video region of a video and a coded representation of the video, wherein the conversion includes configuring a context model based on a segmentation type of the video region, the context model being used to encode and decode a first binary bit, the first binary bit and the second binary bit being included in a binary string corresponding to an index of a secondary transform tool applied to the video region, wherein the index indicates the applicability of the secondary transform tool and / or kernel information of the secondary transform tool, and wherein the secondary transform tool includes applying a forward secondary transform to an output of a forward primary transform applied to a residual of a video block before quantization during encoding, or wherein the secondary transform tool includes applying an inverse secondary transform to an inverse quantized output of a video block before applying an inverse primary transform during decoding.
[0008] In another representative aspect, a method of video processing can be provided using the disclosed technology. The method includes: determining a zeroing region for coefficients to be zeroed for a current video block of a video including a sub-block based on a codec condition of the current video block; and performing a conversion between the current video block and a codec representation of the video based on the determination, wherein the conversion includes applying a secondary transform tool, and wherein the secondary transform tool includes applying a forward secondary transform to an output of a forward main transform applied to a residual of the video block before quantization during encoding, or wherein the secondary transform tool includes applying an inverse secondary transform to an inverse quantized output of the video block before applying an inverse main transform during decoding.
[0009] In another representative aspect, a method of video processing can be provided using the disclosed technology. The method includes: determining a transform matrix and / or an inverse transform matrix of a reduced size less than N×N to use when applying a secondary transform to the current video block of the video for a conversion between a current video block of the video having a dimension N×N and a codec representation of the video; and performing the conversion between the video and the codec representation of the video based on the determination, wherein the secondary transform tool includes applying a forward secondary transform to an output of a forward main transform applied to a residual of the video block before quantization during encoding, or wherein the secondary transform tool includes applying an inverse secondary transform to an inverse quantized output of the video block before applying an inverse main transform during decoding.
[0010] In another representative aspect, a method of video processing can be provided using the disclosed technology. The method includes: determining, based on a rule, to use a residual pattern from one or more residual patterns for a conversion between a current video block of a video and a codec representation of the video, wherein each of the one or more residual patterns corresponds to a mask that provides information about the location of return-to-zero samples; and performing the conversion between the video and the codec representation of the video based on the determination. .
[0011] In another representative aspect, a method for video processing can be provided using the disclosed techniques. The method includes: determining a secondary transform tool associated with a current video block of a video based on a type of primary transform; and performing a conversion between the video and a codec representation of the video based on the determination, wherein the secondary transform tool includes applying a forward secondary transform to an output of a forward primary transform applied to 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 inverse quantized output of the video block prior to applying an inverse primary transform during decoding.
[0012] In yet another representative aspect, a method for video processing can be provided using the disclosed techniques. The method includes: determining to use a plurality of sets of transform matrices to be used for processing a video region of the video; and based on the determination, performing a conversion between the video and a codec representation of the video, and wherein the codec representation includes an indication of which of the plurality of sets is used for the video region.
[0013] In yet another exemplary aspect, a method of video processing is disclosed. The method includes: determining, based on a rule, a transform matrix or an inverse transform matrix to be used when applying a secondary transform tool to a current video block of the video; and performing a conversion between the video and a coded representation of the video based on the determination, wherein the secondary transform tool includes applying a forward secondary transform to an output of a forward primary transform applied to a residual of the video block before quantization during encoding, or wherein the secondary transform tool includes applying an inverse secondary transform to an output of an inverse quantization of the video block before applying an inverse primary transform during decoding, wherein the rule specifies that coefficients of the transform matrix or the inverse transform matrix are determined based on a variable that specifies a transform output length.
[0014] In yet another exemplary aspect, a method of video processing is disclosed. The method includes: determining a transform matrix or an inverse transform matrix to be used when applying a secondary transform tool to a current video block of a video based on a rule; and performing a conversion between the video and a codec representation of the video, wherein the secondary transform tool includes applying a forward secondary transform to an output of a forward primary transform applied to a residual of the video block before quantization during encoding, or wherein the secondary transform tool includes applying an inverse secondary transform to an output of an inverse quantization of the video block before applying an inverse primary transform during decoding, wherein the rule provides for determining the transform matrix or the inverse transform matrix by using a retraining process.
[0015] In yet another representative aspect, the above method is embodied in the form of processor executable code and stored in a computer readable program medium.
[0016] In yet another representative aspect, a device configured or operable to perform the above method is disclosed. The device may include a processor programmed to implement the method.
[0017] In yet another representative aspect, a video decoder device may implement the methods described herein.
[0018] The above and other aspects and features of the disclosed technology are described in more detail in the drawings, the description, and the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A block diagram of an exemplary encoder is shown.
[0020] Figure 2 Examples of 67 intra prediction modes are shown.
[0021] Figure 3 An example of ALWIP (affine linear weighted intra prediction) for a 4×4 block is shown.
[0022] Figure 4 An example of ALWIP for an 8x8 block is shown.
[0023] Figure 5 An example of ALWIP for an 8x4 block is shown.
[0024] Figure 6 An example of ALWIP for a 16x16 block is shown.
[0025] Figure 7 An example of four reference lines adjacent to a prediction block is shown.
[0026] Figure 8 Examples of partitioning of 4×8 blocks and partitioning of 8×4 blocks are shown.
[0027] Fig. 9 Examples of partitioning of all blocks except 4×8, 8×4, and 4×4 are shown.
[0028] Fig.10 An example of a quadratic transform in JEM is shown.
[0029] Fig.11 An example of the proposed reduced secondary transform (RST) is shown.
[0030] Fig.12 Examples of forward downscaling transform and inverse downscaling transform are shown.
[0031] Fig.13 An example is shown employing positive RST 8×8 processing within a 16×48 matrix.
[0032] Fig.14 An example of a zeroing region for an 8×8 matrix is shown.
[0033] Fig.15 Examples of sub-block transform modes SBT-V and SBT-H are shown.
[0034] Fig.16 An example of an upward right diagonal scan order for a 4x4 codec group is shown.
[0035] Fig.17 An example of an upward right diagonal scan order for an 8x8 block with a codec group of size 4x4 is shown.
[0036] Fig.18 An example of a template for selecting a probabilistic model is shown.
[0037] Fig.19 An example of two scalar quantizers for dependency quantization is shown.
[0038] Fig. 20 An example of state transition and quantizer selection for the proposed dependency quantization process is shown.
[0039] Fig.21 An example of an 8x8 block with 4 codec groups is shown.
[0040] FIG. 22A to FIG. 22F A flow chart of an exemplary method for video processing is shown.
[0041] Fig.23A and Fig. 23B is a block diagram of an example of a hardware platform for implementing the visual media decoding or visual media encoding techniques described in this document.
[0042] Fig.24A An example of a chrominance block is shown, and Fig. 24B Its corresponding luma block in the case of dual-tree partitioning is shown.
[0043] Fig.25 An example of the "CR" position used for DM derivation from the corresponding luma block is shown.
[0044] Fig.26 An example of a partial area that is allowed to have coefficients is shown.
[0045] FIG. 27A to FIG. 27H A flow chart of an exemplary method for video processing is shown. DETAILED DESCRIPTION
[0046] Embodiments of the disclosed technology can be applied to existing video codec standards (e.g., HEVC, H.265) and future standards to improve compression performance. In this document, section headings are used to improve the readability of the description and do not in any way limit the discussion or embodiments (and / or implementation methods) to the corresponding section.
[0047] 2. Video Codec Introduction
[0048] Due to the increasing demand for higher resolution video, video coding and decoding methods and techniques are ubiquitous in modern technology. Video codecs generally include electronic circuits or software that compress and decompress digital video, and are constantly being improved to provide higher coding and decoding efficiency. Video codecs convert uncompressed video into a compressed format, or vice versa. There is a complex relationship between video quality, the amount of data used to represent the video (determined by the bit rate), the complexity of the encoding and decoding algorithms, the sensitivity to data loss and errors, the ease of editing, random access, and end-to-end delay (latency). The compression format usually complies with standard video compression specifications, such as the High Efficiency Video Coding (HEVC) standard (also known as H.265 or MPEG-H Part 2), the upcoming versatile video codec standard, or other current and / or future video codec standards.
[0049] Video codec standards have evolved primarily through the development of the well-known ITU-T and ISO / IEC standards. ITU-T developed H.261 and H.263, ISO / IEC developed MPEG-1 and MPEG-4 Vision, and the two organizations jointly developed the H.262 / MPEG-2 Video, H.264 / MPEG-4 Advanced Video Coding (AVC), and H.265 / HEVC standards. Since H.262, video codec standards have been based on a hybrid video codec structure that uses temporal prediction plus transform codec. To explore future video codec technologies beyond HEVC, VCEG and MPEG jointly established the Joint Video Exploration Team (JVET) in 2015. Since then, JVET has adopted many new methods and applied them to the reference software called the Joint Exploration Model (JEM) [3][4]. In April 2018, a Joint Video Expert Team (JVET) was created between VCEG (Q6 / 16) and ISO / IEC JTC1 SC29 / WG11 (MPEG) to work on the VVC standard with the goal of a 50% bit rate reduction compared to HEVC.
[0050] 2.1 Encoding and decoding process of typical video codecs
[0051] Figure 1 An example of an encoder block diagram for VVC is shown, which contains three loop filter blocks: deblocking filter (DF), sample adaptive offset (SAO), and ALF. Unlike DF, which uses a predefined filter, SAO and ALF use the original samples of the current picture to reduce the mean square error between the original and reconstructed samples by adding an offset and applying a finite impulse response (FIR) filter, respectively, with the offset and filter coefficients signaled by the side information after encoding and decoding. ALF is located at the last processing stage of each picture and can be seen as a tool that tries to capture and fix artifacts created by previous stages.
[0052] 2.2 Intra-frame Coding and Decoding in VVC
[0053] 2.2.1 Intra-mode codec with 67 intra-prediction modes
[0054] To capture arbitrary edge directions present in natural videos, the number of directional intra modes is extended from 33 (as used in HEVC) to 65. Additional directional modes are Figure 2 These more intensive directional intra prediction modes apply to all block sizes and both luma intra prediction and chroma intra prediction.
[0055] The conventional angular intra prediction direction is defined from 45 degrees to -135 degrees in the clockwise direction, such as Figure 2 As shown. In VTM2, for non-square blocks, several conventional angle intra prediction modes are adaptively replaced by wide angle intra prediction modes. The replaced modes are signaled using the original method, and after parsing, the replaced modes are remapped to the index of the wide angle mode. The total number of intra prediction modes is unchanged, i.e. 67, and the intra mode encoding and decoding is unchanged.
[0056] In HEVC, each intra-coded block has a square shape, and the length of each side is a power of 2. Therefore, in case of using DC mode, no split operation is required to generate intra predictors. In VVV2, blocks can have a rectangular shape, which in general requires the use of a split operation for each block. In order to avoid the split operation for DC prediction, only the longer side is used to calculate the mean of non-square blocks.
[0057] In addition to these 67 intra prediction modes, wide-angle intra prediction (WAIP) method for non-square blocks and position-dependent intra prediction combination (PDPC) method are further enabled for some blocks. PDPC is applied to the following intra modes without signaling: planar, DC, horizontal, vertical, bottom left angle mode and its eight adjacent angle modes, and top right angle mode and its eight adjacent angle modes.
[0058] 2.2.2 Affine Linear Weighted Intra Prediction (ALWIP or Matrix-based Intra Prediction)
[0059] Affine linear weighted intra prediction (ALWIP, also known as matrix based intra prediction (MIP)) was proposed in JVET-N0217.
[0060] 2.2.2.1 Generate Reduced Prediction Signal by Matrix-Vector Multiplication
[0061] First, adjacent reference samples are downsampled by averaging to generate a reduced reference signal bdry red Afterwards, the reduced prediction signal pred is calculated by computing the matrix-vector product and adding the offset red :
[0062] pred red =A.bdry red +b
[0063] Here, A is a matrix with W red ·H red rows, and has 4 columns in the case of W=H=4, and 8 columns in all other cases. b is a red ·H red Vector.
[0064] 2.2.2.2 Description of the entire ALWIP process
[0065] exist Figure 3-Figure 6 The whole process of averaging, matrix-vector multiplication, and linear interpolation is shown for different shapes in . Note that the remaining shapes are treated as in the one of the depicted cases.
[0066] 1. Given a 4×4 block, ALWIP takes two averages along each axis of the boundary. The resulting four input samples participate in a matrix-vector multiplication. The matrix is taken from set S0. After adding the offset, it results in 16 final prediction samples. Linear interpolation is not necessary to generate the prediction signal. Thus, a total of (4·16) / (4·4)=4 multiplications are performed per sample.
[0067] 2. Given an 8×8 block, ALWIP takes four averages along each axis of the boundary. The resulting eight input samples participate in a matrix-vector multiplication. The matrix is taken from set S1. It obtains 16 samples at odd positions of the prediction block. Thus, a total of (8·16) / (8·8)=2 multiplications are performed per sample. After adding the offset, these samples are interpolated vertically by using the reduced top boundary. Next, horizontal interpolation is performed by using the original left boundary.
[0068] 3. Given an 8×4 block, ALWIP takes four averages along the horizontal axis of the boundary and four original boundary values on the left boundary. The resulting eight input samples are subjected to matrix-vector multiplication. The matrix is taken from set S1. It obtains 16 samples at odd horizontal positions and at every vertical position of the prediction block. Thus, a total of (8·16) / (8·4)=4 multiplications are performed per sample. After adding the offset, these samples are interpolated horizontally by using the original left boundary.
[0069] 4. Given a 16×16 block, ALWIP takes four averages along each axis of the border. The resulting eight input samples participate in a matrix-vector multiplication. The matrix is taken from set S2. It obtains 64 samples at odd positions of the prediction block. Thus, a total of (8·64) / (16·16)=2 multiplications are performed per sample. After adding the offset, these samples are interpolated vertically by using the eight averages of the top border. Next, they are interpolated horizontally by using the original left border. In this case, the interpolation process does not add any multiplications. Therefore, two multiplications per sample are required to compute the ALWIP prediction.
[0070] For larger shapes, the process is essentially the same, and it is easy to check that the number of multiplications per sample point is less than four.
[0071] For W×8 blocks (where W>8), only horizontal interpolation is necessary because samples are given at odd horizontal positions and at every vertical position.
[0072] Finally, for W×4 blocks (where W>8), let A_k be the matrix that appears by leaving out every row corresponding to odd entries along the horizontal axis of the downsampled block. Thus, the output size is 32, and still only horizontal interpolation needs to be performed.
[0073] Treat the transposed case accordingly.
[0074] When constructing the MPM list for intra prediction blocks, if the neighboring blocks are encoded and decoded in MIP mode, the MIP mode will be mapped to the intra prediction mode by using the following table. Here, assuming that the width and height of the adjacent luminance block are widthNeig and heightNeig respectively, the MipSizeId is derived as follows:
[0075] If widthNeig and heightNeig are both equal to 4, then set MipSizeId equal to 0.
[0076] Otherwise, if widthNeig and heightNeig are both less than or equal to 8, then set MipSizeId equal to 1.
[0077] Otherwise, set MipSizeId equal to 2.
[0078] Table 8-4 - Specification of the mapping between MIP and intra prediction modes
[0079]
[0080]
[0081]
[0082] 2.2.2.3 Syntax and Semantics
[0083] 7.3.6.5 Codec unit syntax
[0084]
[0085]
[0086] 2.2.3 Multiple reference line (MRL)
[0087] Multiple reference line (MRL) intra prediction uses more reference lines for intra prediction. Figure 7 In FIG. 4 , an example of 4 reference lines is shown, where the samples of segments A and F are not taken from the reconstructed adjacent samples, but are filled with the closest samples from segments B and E, respectively. HEVC intra 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.
[0088] The index of the selected reference line (mrl_idx) is signaled and used to generate the intra prediction value (predictor). For reference line indices greater than 0, only additional reference line modes are included in the MPM list, and only the MPM index is signaled without the remaining modes. The reference line index is signaled before the intra prediction mode, and in the case of a non-zero reference line index being signaled, planar mode and DC mode are excluded from the intra prediction mode.
[0089] For the first line of a block inside a CTU, MRL is disabled to prevent the use of extended reference samples outside the current CTU line. In addition, PDPC is disabled when additional lines are used.
[0090] 2.2.4 Intra sub-block partitioning (ISP)
[0091] In JVET-M0102, ISP is proposed, which divides the luma intra prediction block vertically or horizontally into 2 or 4 sub-partitions, depending on the block size dimension, as shown in Table 1. Figure 8 and Fig. 9 Examples of two possibilities are shown. All subpartitions satisfy the condition of having at least 16 samples. If allowed, for block sizes 4xN or Nx4 (where N>8), there can be 1xN or Nx1 subpartitions.
[0092] Table 1: Number of sub-partitions depending on the block size (maximum transform size represented by maxTBSize)
[0093]
[0094] For each of these sub-divisions, a residual signal is generated by entropy decoding the coefficients sent by the encoder, followed by inverse quantization and inverse transformation. After that, intra prediction is performed on the sub-division, and finally the corresponding reconstructed samples are obtained by adding the residual signal to the prediction signal. Therefore, the reconstructed values of each sub-division will be used to generate the prediction of the next sub-division, and the process is repeated for the next sub-division, and so on. All sub-divisions share the same intra mode.
[0095] Table 2: Specification of trTypeHor and trTypeVer depending on predModeIntra
[0096]
[0097] 2.2.4.1 Syntax and Semantics
[0098] 7.3.7.5 Codec unit syntax
[0099]
[0100] intra_subpartitions_mode_flag[x0][y0] equal to 1 specifies that the current intra codec unit is partitioned into NumIntraSubPartitions[x0][y0] rectangular transform block subpartitions. intra_subpartitions_mode_flag[x0][y0] equal to 0 specifies that the current intra codec unit is not partitioned into rectangular transform block subpartitions.
[0101] When intra_subpartitions_mode_flag[x0][y0] is not present, it is inferred to be equal to 0.
[0102] intra_subpartitions_split_flag[x0][y0] specifies whether the intra subpartition split type is horizontal or vertical. When intra_subpartitions_split_flag[x0][y0] is not present, it is inferred as follows:
[0103] – If cbHeight is greater than MaxTbSizeY, then intra_subpartitions_split_flag[x0][y0] is inferred to be equal to 0.
[0104] – Otherwise (cbWidth is greater than MaxTbSizeY), intra_subpartitions_split_flag[x0][y0] is inferred to be equal to 1.
[0105] The variable IntraSubPartitionsSplitType specifies the partition type used for the current luma codec block, as shown in Table 7-9. IntraSubPartitionsSplitType is derived as follows:
[0106] – If intra_subpartitions_mode_flag[x0][y0] is equal to 0, then set IntraSubPartitionsSplitType equal to 0.
[0107] – Otherwise, set IntraSubPartitionsSplitType equal to 1 + intra_subpartitions_split_flag[x0][y0].
[0108] Table 7-9 - Names associated with IntraSubPartitionsSplitType
[0109] IntraSubPartitionsSplitType Name of IntraSubPartitionsSplitType 0 ISP_NO_SPLIT 1 ISP_HOR_SPLIT 2 ISP_VER_SPLIT
[0110] The variable NumIntraSubPartitions specifies the number of transform block subpartitions into which the intra luma codec block is divided. NumIntraSubPartitions is derived as follows:
[0111] – If IntraSubPartitionsSplitType is equal to ISP_NO_SPLIT, then set NumIntraSubPartitions equal to 1.
[0112] – Otherwise, if one of the following conditions is true, then set NumIntraSubPartitions equal to 2:
[0113] –cbWidth is equal to 4 and cbHeight is equal to 8,
[0114] –cbWidth is equal to 8 and cbHeight is equal to 4.
[0115] – Otherwise, set NumIntraSubPartitions equal to 4.
[0116] 2.3 Chroma Intra Mode Codec
[0117] For chroma intra mode encoding and decoding, a total of 8 or 5 intra modes are allowed for chroma intra mode encoding and decoding, depending on whether the cross-component linear model (CCLM) is enabled. These modes include five traditional intra modes and three cross-component linear model modes. The chroma DM mode uses the corresponding luma intra prediction mode. Since the separate block partitioning structure for luma components and chroma components is enabled in the I stripe, a chroma block can correspond to multiple luma blocks. Therefore, for the chroma DM mode, the intra prediction mode of the corresponding luma block covering the center position of the current chroma block is directly inherited.
[0118] Table 8-2 - Specification of IntraPredModeC[xCb][yCb] depending on intra_chroma_pred_mode[xCb][yCb] and IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] when sps_cclm_enabled_flag is equal to 0
[0119]
[0120] Table 8-3 - Specification of IntraPredModeC[xCb][yCb] depending on intra_chroma_pred_mode[xCb][yCb] and IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] when sps_cclm_enabled_flag is equal to 1
[0121]
[0122] 2.4 Transform Codec in VVC
[0123] 2.4.1 Multiple Transform Set (MTS) in VVC
[0124] 2.4.1.1 Explicit Multiple Transform Set (MTS)
[0125] In VTM4, large block size transforms (up to 64×64 in size) are enabled, which are mainly useful for higher resolution video, such as 1080p sequences and 4K sequences. For transform blocks with a size (width or height, or both width and height) equal to 64, the high-frequency transform coefficients are zeroed, so that only the low-frequency coefficients are retained. For example, for an M×N transform block (where M is the block width and N is the block height), when M is equal to 64, only the 32 columns of transform coefficients on the left are retained. Similarly, when N is equal to 64, only the top 32 rows of transform coefficients are retained. When transform skip mode is used for large blocks, the entire block is used without zeroing any values.
[0126] In addition to the DCT-II already adopted in HEVC, the Multiple Transform Selection (MTS) scheme is also used for residual coding of both inter-frame codec blocks and intra-frame codec blocks. It adopts multiple selected transforms from DCT8 / DST7. The newly introduced transform matrices are DST-VII and DCT-VIII. Table 4 below shows the basis functions of the selected DST / DCT.
[0127] Table 4: Basis functions of the transformation matrix used in VVC
[0128]
[0129] To maintain the orthogonality of the transform matrices, these transform matrices are quantized more accurately than those in HEVC. To keep the intermediate values of the transformed coefficients within 16 bits, all coefficients will have 10 bits after horizontal transform and after vertical transform.
[0130] To control the MTS scheme, separate enable flags are specified at the SPS level for intra and inter, respectively. When MTS is enabled on SPS, a CU-level flag is signaled to indicate whether MTS is applied. Here, MTS is applied only to luma. The MTS CU-level flag is signaled when the following conditions are met.
[0131] ○ Both width and height are less than or equal to 32.
[0132] ○CBF flag equals 1
[0133] If the MTS CU flag is equal to 0, DCT2 is applied in both directions. However, if the MTS CU flag is equal to 1, the other two flags are additionally signaled to indicate the transform type for the horizontal and vertical directions, respectively. The transform and signaling mapping table is shown in Table 5. When it comes to transform matrix precision, an 8-bit main transform core is adopted. Therefore, all transform cores used in HEVC are kept the same, including 4-point DCT-2 and DST-7 as well as 8-point, 16-point and 32-point DCT-2. In addition, other transform cores include 64-point DCT-2, 4-point DCT-8, and 8-point, 16-point, 32-point DST-7 and DCT-8, using an 8-bit main transform core.
[0134] Table 5: Mapping of decoded values of tu_mts_idx to the corresponding transform matrices in the horizontal and vertical directions
[0135]
[0136] To reduce the complexity of large-size DST-7 and DCT-8, high-frequency transform coefficients are zeroed for DST-7 blocks and DCT-8 blocks with size (width or height, or both) equal to 32. Only coefficients in the 16×16 lower frequency region are retained.
[0137] In addition to the case where different transforms are applied, VVC also supports a mode called transform skip (TS), which is similar to the concept of TS in HEVC. TS is treated as a special case of MTS.
[0138] 2.4.2 Reduced Quadratic Transform (RST) proposed in JVET-N0193
[0139] 2.4.2.1 Non-separable quadratic transform (NSST) in JEM
[0140] In JEM, a secondary transform is applied between the forward main transform and quantization (at the encoder) and between dequantization and inverse main transform (at the decoder). Fig.10 As shown, 4×4 (or 8×8) secondary transform is performed according to the block size. For example, 4×4 secondary transform is applied to small blocks (i.e., min(width, height)<8), and 8×8 secondary transform is applied to larger blocks (i.e., min(width, height)>4) according to each 8×8 block.
[0141] The application of the non-separable transform will be described below using the input as an example. To apply the non-separable transform, the 4×4 input block X
[0142]
[0143] First, it is represented as a vector
[0144]
[0145] According to compute the non-separable transform, where indicates the transform coefficient vector, and T is a 16×16 transform matrix. Next, reorganize the 16×1 coefficient vector into 4×4 blocks using the scan order (horizontal, vertical, or diagonal) for this block. In the 4×4 coefficient block, the coefficient with the smaller index will be replaced by this smaller scan index. There are a total of 35 transform sets, and each transform set employs 3 non-separable transform matrices (kernels). The mapping from the intra prediction mode to the transform set is predefined. For each transform set, the selected non-separable second transform (NSST) candidate is further specified by the explicitly signaled second transform index. The index is signaled once per intra CU in the bitstream after the transform coefficients.
[0146] 2.4.2.2 Reduced Second Transform (RST) in JVET-N0193
[0147] RST (also known as Low Frequency Non-Separable Transform, LFNST) was introduced in JVET-K0099 and a mapping of 4 transform sets (instead of 35 transform sets) was also introduced in JVET-L0133. In this JVET-N0193, 16×64 (further reduced to 16×48) matrices and 16×16 matrices are employed. For labeling convenience, the 16×64 (reduced to 16×48) transform is denoted as RST 8×8, and the 16×16 transform is denoted as RST 4×4. Fig.11 An example of RST is shown.
[0148] 2.4.2.2.1 RST Computation
[0149] The main idea of the reduced transform (RT) is to map an N-dimensional vector to an R-dimensional vector in a different space, where R / N (R < N) is the reduction factor.
[0150] The RT matrix is an R×N matrix as follows:
[0151]
[0152] where the R rows of this transform are the R bases of the N-dimensional space. The inverse transform matrix of RT is the transpose of its forward transform. The forward RT and inverse RT are depicted in Fig.12 .
[0153] In this document, RST 8×8 with a reduction factor of 4 (1 / 4 size) is applied. Thus, a 16×64 direct matrix is used instead of 64×64, which is the size of a conventional 8×8 indivisible transform matrix. In other words, a 64×16 inverse RST matrix is used on the decoder side to generate the core (main) transform coefficients in the upper left region of the 8×8. Positive RST 8×8 uses a 16×64 (or 8×64 for 8×8 blocks) matrix so that it only produces non-zero coefficients in the upper left 4×4 region within a given 8×8 region. In other words, if RST is applied, the 8×8 region will have only zero coefficients except for the upper left 4×4 region. For RST 4×4, a 16×16 (or 8×16 for 4×4 blocks) direct matrix multiplication is applied.
[0154] Inverse RST is applied conditionally when the following two conditions are met:
[0155] ○Block size is greater than or equal to a given threshold (W>=4&&H>=4)
[0156] ○ Transform skip mode flag equals 0
[0157] If the width (W) and height (H) of the transform coefficient block are both greater than 4, then RST 8×8 is applied to the upper left 8×8 area of the transform coefficient block. Otherwise, RST 4×4 is applied to the upper left min(8,W)×min(8,H) area of the transform coefficient block.
[0158] If the RST index is equal to 0, then the RST is not applied. Otherwise, the RST is applied and its kernel is selected with the help of the RST index. The RST selection method and the encoding and decoding of the RST index will be explained later.
[0159] In addition, for intra CUs within both intra and inter slices, and for both luma and chroma, RST is applied. If dual tree is enabled, RST indexes for luma and chroma are signaled separately. For inter slices (dual tree disabled), a single RST index is signaled and used for both luma and chroma.
[0160] 2.4.2.2.2 Limitations of RST
[0161] When ISP mode is selected, RST is disabled and the RST index is not signaled, because even if RST is applied to every feasible partition, the performance improvement is negligible. In addition, disabling RST for ISP prediction residuals may reduce coding complexity.
[0162] 2.4.2.2.3RST Selection
[0163] The RST matrix is selected from four transform sets (each of which consists of two transforms). Which transform set to apply is determined from the intra prediction mode as follows:
[0164] (1) If one of the three CCLM modes is indicated, transform set 0 is selected.
[0165] (2) Otherwise, perform transformation set selection according to the following table:
[0166] Transform Set Selection Table
[0167]
[0168]
[0169] The index denoted as IntraPredMode used to access the above table has a range of [-14, 83], which is the transformed mode index for wide angle intra prediction.
[0170] Afterwards, the low frequency non-separable transform (LFNST, also known as RST) set selection for chroma blocks encoded and decoded in CCLM mode is modified to be based on the variable IntraPredMode_CCLM, where IntraPredMode_CCLM has a range of [-14, 80]. IntraPredMode_CCLM is determined by concatenating the luma intra prediction mode and the dimensions of the current chroma block.
[0171] When dual tree is enabled, a block (eg, PU) of corresponding luma samples covering the top left chroma sample in the current chroma block is defined as a collocated luma block. Examples are shown in Figures 24a and 24b, where the collocated position is represented by TL.
[0172] 2.4.2.2.4 RST Matrix with Reduced Dimensionality
[0173] As a further simplification, 16×48 matrices are applied instead of 16×64 matrices with the same transform set configuration, each of which takes 48 input data from three 4×4 blocks in the upper left 8×8 block excluding the lower right 4×4 block (e.g. Fig.13 ).
[0174] 2.4.2.2.5 RST signaling
[0175] Positive RST 8×8 uses a 16×48 matrix so that it only produces non-zero coefficients in the top left 4×4 region of the first 3 4×4 regions. In other words, if RST 8×8 is applied, only the top left 4×4 (due to RST 8×8) and bottom right 4×4 (due to the main transform) regions can have non-zero coefficients. Therefore, when the top right 4×4 and bottom left 4×4 block regions (such as Fig.14 When any non-zero element is detected in the , and is referred to as the "zeroed" region), the RST index is not decoded because it implies that the RST has not been applied. In such a case, the RST index is inferred to be zero.
[0176] 2.4.2.2.6 Zeroing Area within a CG
[0177] In general, any coefficient within a 4x4 subblock may be non-zero before inverse RST is applied to the 4x4 subblock. However, there is a constraint that in some cases, some coefficients within the 4x4 subblock must be zero before inverse RST is applied to the 4x4 subblock.
[0178] Let nonZeroSize be a variable. For any coefficient with an index not less than nonZeroSize, it is required that it must be zero when it is rearranged into a 1-D array before inverse RST.
[0179] When nonZeroSize is equal to 16, there is no zero constraint on the coefficients in the upper left 4×4 sub-block.
[0180] In JVET-N0193, when the current block size is 4×4 or 8×8, nonZeroSize is set equal to 8 (that is, Fig.14 The coefficients shown with scan indices in the range [8,15] must be 0). For other block dimensions, nonZeroSize is set equal to 16.
[0181] 2.4.2.2.7 Description of RST in the working draft
[0182] 7.3.2.3 Sequence parameter set RBSP syntax
[0183]
[0184] 7.3.7.11 Residual Codec Syntax
[0185]
[0186] 7.3.7.5 Codec unit syntax
[0187]
[0188]
[0189] sps_st_enabled_flag equal to 1 specifies that st_idx may be present in the residual codec syntax for intra codec units. sps_st_enabled_flag equal to 0 specifies that st_idx is not present in the residual codec syntax for intra codec units.
[0190] st_idx[x0][y0] specifies which secondary transform kernel to apply between the two candidate kernels in the selected transform set. st_idx[x0][y0] equal to 0 specifies that no secondary transform is applied. Array index x0, y0 specifies the position (x0, y0) of the top left sample of the considered transform block relative to the top left sample of the picture.
[0191] When st_idx[x0][y0] does not exist, st_idx[x0][y0] is inferred to be equal to 0.
[0192] It should be noted that whether to send st_idx depends on the number of non-zero coefficients among all TUs in the CU (e.g., for a single tree, the number of non-zero coefficients in 3 blocks (i.e., Y, Cb, Cr); for a dual tree and for luma codec, the number of non-zero coefficients in the luma block; for a dual tree and for chroma codec, the number of non-zero coefficients in the two chroma blocks). In addition, the threshold depends on the partition structure, i.e., (treeType == SINGLE_TREE)? 2:1).
[0193] The bits of st_idx are context encoded. More specifically, the following apply:
[0194] Table 9-9 - Syntax elements and associated binarization
[0195]
[0196] Table 9-15 - ctxInc assignment for syntax elements with context codec bits
[0197]
[0198] 9.5.4.2.8 Derivation of ctxInc for syntax element st_idx
[0199] The inputs to this process are the color component index, the luma or chroma position (x0, y0) specifying the top left sample of the current luma or chroma codec block relative to the top left sample of the current picture depending on cIdx, the treeType, the luma intra prediction mode IntraPredModeY[x0][y0] as specified in clause 8.4.2, the syntax element intra_chroma_pred_mode[x0][y0] specifying the intra prediction mode for chroma samples as specified in clause 7.4.7.5, and the multiple transform selection index tu_mts_idx[x0][y0].
[0200] The output of this process is the variable ctxInc.
[0201] The variable intraModeCtx is derived as follows:
[0202] If cIdx is equal to 0, then intraModeCtx is derived as follows:
[0203] intraModeCtx=(IntraPredModeY[x0][y0]<=1)? 1:0
[0204] Otherwise (cIdx is greater than 0), intraModeCtx is derived as follows:
[0205] intraModeCtx=(intra_chroma_pred_mode[x0][y0]>=4)? 1:0
[0206] The variable mtsCtx is derived as follows:
[0207] mtsCtx=(tu_mts_idx[x0][y0]==0&&treeType !=SINGLE_TREE)?1L00 The variable ctxInc is derived as follows:
[0208] ctxInc=(binIdx<<1)+intraModeCtx+(mtsCtx<<2)
[0209] 2.4.2.2.8 Summary of RST usage
[0210] For single tree and split tree, RST can be enabled only when the number of non-zero coefficients in a block is greater than 2 and greater than 1, respectively. In addition, when RST is enabled, the following restrictions on the positions of non-zero coefficients of the coding group (Coding Group, CG) to which RST is applied are also required.
[0211] Table 1: Use of RST
[0212]
[0213]
[0214] 2.4.3 Sub-block Transformation
[0215] For an inter-predicted CU with cu_cbf equal to 1, cu_sbt_flag may be signaled to indicate whether the entire residual block is decoded or a sub-portion of the residual block is decoded. In the former case, the inter MTS information is further parsed to determine the transform type of the CU. In the latter case, part of the residual block is encoded and decoded using the inferred adaptive transform, and the rest of the residual block is zeroed. SBT is not applied to combined inter-intra mode.
[0216] In the sub-block transform, a position-dependent transform is applied to the luma transform blocks in SBT-V and SBT-H (chroma TBs always use DCT-2). The two positions of SBT-H and SBT-V are associated with different core transforms. More specifically, in Figure 3 The horizontal and vertical transforms for each SBT position are specified in . 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. Therefore, the sub-block transform jointly specifies the TU tiling, cbf, and horizontal and vertical transforms of the residual block, which can be regarded as a syntactic shortcut for the case where the main residual of the block is on one side of the block.
[0217] 2.4.3.1 Syntactic Elements
[0218] 7.3.7.5 Codec unit syntax
[0219]
[0220]
[0221] cu_sbt_flag equal to 1 specifies that for the current codec unit, sub-block transform is used.
[0222] cu_sbt_flag equal to 0 specifies that sub-block transform is not used for the current codec unit.
[0223] When cu_sbt_flag is not present, then its value is inferred to be equal to 0.
[0224] Note: When sub-block transform is used, the codec unit is divided into two transform units; one transform unit has residual data and the other does not have residual data.
[0225] cu_sbt_quad_flag equal to 1 specifies that for the current codec unit, the sub-block transform includes a transform unit with a size of 1 / 4 of the current codec unit. cu_sbt_quad_flag equal to 0 specifies that for the current codec unit, the sub-block transform includes a transform unit with a size of 1 / 2 of the current codec unit.
[0226] When cu_sbt_quad_flag is not present, then its value is inferred to be equal to 0.
[0227] cu_sbt_horizontal_flag equal to 1 specifies that the current codec unit is split horizontally into 2 transform units. cu_sbt_horizontal_flag[x0][y0] equal to 0 specifies that the current codec unit is split vertically into 2 transform units.
[0228] When cu_sbt_horizontal_flag is not present, its value is derived as follows:
[0229] – If cu_sbt_quad_flag is equal to 1, then set cu_sbt_horizontal_flag equal to
[0230] allowSbtHorQ.
[0231] – Otherwise (cu_sbt_quad_flag is equal to 0), set cu_sbt_horizontal_flag equal to
[0232] allowSbtHorH.
[0233] 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.
[0234] The variable SbtNumFourthsTb0 is derived as follows:
[0235] sbtMinNumFourths=cu_sbt_quad_flag? 1:2(7-117)
[0236] SbtNumFourthsTb0=cu_sbt_pos_flag? (4-sbtMinNumFourths)
[0237] sps_sbt_max_size_64_flag equal to 0 specifies that the maximum CU width and height allowed for sub-block transform is 32 luma samples. sps_sbt_max_size_64_flag equal to 1 specifies that the maximum CU width and height allowed for sub-block transform is 64 luma samples.
[0238] MaxSbtSize = sps_sbt_max_size_64_flag? 64 : 32 (7-33)
[0239] 2.4.4 Quantized residual domain Block differential pulse-code modulation coding (QR-BDPCM)
[0240] In JVET-N0413, quantized residual domain BDPCM (hereinafter referred to as RBDPCM) is proposed. Intra-frame prediction is performed on the entire block by copying samples in the prediction direction (horizontal or vertical prediction) similar to intra-frame prediction. The residual is quantized, and the delta between the quantized residual and its predicted value (horizontal or vertical) is encoded and decoded.
[0241] For a block of size M (rows) × N (columns), let r i ,j,0≤i≤M-1,0≤j≤
[0242] N-1. is the prediction residual after performing intra prediction using unfiltered samples from the upper or left block boundary samples horizontally (copying the left neighbor pixel values line by line across the prediction block) or vertically (copying the top neighbor line to every line in the prediction block). Let Q(r i ,j),0≤i≤M-1,0≤j≤
[0243] N-1 represents the residual r i ,j, where the residual is the difference between the original block and the predicted block value. Block DPCM is then applied to the quantized residual samples to obtain a modified M×N array Its elements are When signaling vertical BDPCM:
[0244]
[0245] For horizontal prediction, similar rules apply and the residual quantization samples are obtained by the following equation
[0246]
[0247] Quantize the residual samples Send to the decoder.
[0248] On the decoder side, the above calculation is reversed, yielding Q(r i,j ),0≤i≤M-1,0≤j≤N-1. For vertical prediction,
[0249]
[0250] For the horizontal case,
[0251]
[0252] The inverse quantized residual Q -1 (Q(r i,j )) is added to the intra block prediction value to produce the reconstructed sample value.
[0253] When QR-BDPCM is selected, no transformation is applied.
[0254] 2.5 coefficient entropy encoding and decoding
[0255] 2.5.1 Coefficient encoding and decoding of blocks with transforms applied
[0256] In HEVC, the transform coefficients of a codec block are encoded and decoded using non-overlapping coefficient groups (or sub-blocks), and each CG contains coefficients of a 4×4 block of the coding block. The CGs within the codec block and the transform coefficients within the CGs are encoded and decoded according to a predefined scan order.
[0257] The CG within the codec block and the transform coefficients within the CG are encoded and decoded according to a predefined scan order. Both the CG and the coefficients within the CG follow a diagonal scan order towards the upper right. Fig.16 and Fig.17 Examples of 4×4 block and 8×8 scanning orders are depicted in FIG. 1 , respectively.
[0258] Note that the encoding and decoding order is the reverse scanning order (i.e., from Fig.17 CG3 to CG0 decoding), when decoding a block, the coordinates of the last non-zero coefficient are decoded first.
[0259] The encoding and decoding of the transform coefficient levels of the CG with at least one non-zero transform coefficient can be divided into multiple scanning passes. In the first pass, the first binary bit (represented by bin0, also known as significant_coeff_flag, which indicates that the amplitude of the coefficient is greater than 0) is encoded and decoded. Next, two scanning passes for context encoding and decoding of the second / third binary bits (represented by bin1 and bin2, also known as coeff_abs_greater1_flag and coeff_abs_greater2_flag, respectively) can be applied. Finally, if necessary, two more scanning passes are called to encode and decode the sign information and residual value of the coefficient level (also known as coeff_abs_level_remaining). Note that only the binary bits in the first three scanning passes are encoded and decoded according to the normal mode, and these binary bits are referred to as normal binary bits in the description below.
[0260] In VVC3, for each CG, the regular codec bits and bypass codec bits are separated according to the codec order; all regular codec bits of the sub-block are transmitted first, and then the bypass codec bits are transmitted. For the scan position, the transform coefficient levels of the sub-block are encoded and decoded in five rounds, as follows:
[0261] ○ Round 1: Process the encoding and decoding of significance (sig_flag), greater than 1 flag (gt1_flag), parity (par_level_flag), and greater than 2 flag (gt2_flag) in the encoding and decoding order. If sig_flag is equal to 1, then first encode and decode gt1_flag (which specifies whether the absolute level is greater than 1). If gt1_flag is equal to 1, then additionally encode and decode par_flag (which specifies the parity of the absolute level minus 2).
[0262] o Pass 2: Process the encoding and decoding of the remaining absolute levels (remainders) for all scan positions with gt2_flag equal to 1 or gt1_flag equal to 1. Binarize the non-binary syntax elements using Golomb-Rice codec and encode and decode the resulting bins in bypass mode of the arithmetic codec engine.
[0263] o Pass 3: AbsLevel of coefficients whose sig_flag was not coded in the first pass (due to reaching the conventional codec bin limit) are fully coded using Golomb-Rice coding in the bypass mode of the arithmetic codec engine.
[0264] ○ Round 4: Encode and decode the sign (sign_flag) of all scan positions when sig_coeff_flag is equal to 1
[0265] It is guaranteed that for a 4x4 subblock no more than 32 conventional codec bits (sig_flag, par_flag, gt1_flag and gt2_flag) are encoded or decoded. For a 2x2 chroma subblock the number of conventional codec bits is limited to 8.
[0266] The Rice parameter (ricePar) for the encoding and decoding of the non-binary syntax element remainder (in round 3) is derived in a similar manner 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 formula. For the encoding and decoding of the non-binary syntax element absLevel (in round 4), the sum of the absolute values in the local template is determined, sumAbs. The variables ricePar and posZero are determined based on the dependency quantization and sumAbs by table lookup. The derivation of the intermediate variable codeValue is as follows:
[0267] ○ If absLevel[k] is equal to 0, then codeValue is set equal to posZero;
[0268] ○ Otherwise, if absLevel[k] is less than or equal to posZero, then codeValue is set equal to absLevel[k] – 1;
[0269] ○ Otherwise (absLevel[k] is greater than posZero), then codeValue is set equal to absLevel[k].
[0270] The value of codeValue is encoded and decoded using the Golomb-Rice codec with the help of the Rice parameter ricePar.
[0271] 2.5.1.1 Context Modeling for Coefficient Encoding and Decoding
[0272] The choice of probability model for syntax elements related to the absolute value of transform coefficient levels depends on the value of the absolute levels or partially reconstructed absolute levels in the local neighborhood. Fig.18 The template used is shown in .
[0273] The chosen probability model 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 depends on the following metrics for the local neighborhood:
[0274] ○numSig: the number of non-zero ranks in the local neighborhood;
[0275] ○sumAbs1: the sum of the partial reconstruction absolute levels (absLevel1) in the local neighborhood after the first round;
[0276] ○sumAbs: the sum of the reconstructed absolute levels in the local neighborhood;
[0277] ○ Diagonal position (d): The sum of the horizontal and vertical coordinates of the current scan position within the transform block.
[0278] Based on the values of numSig, sumAbs1, and d, the probability mode for encoding and decoding sig_flag, par_flag, gt1_flag, and gt2_flag is selected. The Rice parameter for binarizing abs_remainder is selected based on the values of sumAbs and numSig.
[0279] 2.5.1.2 Dependency Quantification (DQ)
[0280] In addition, the same HEVC scalar quantization is used with a new concept called dependent scalar quantization. Dependent scalar quantization refers to a scheme in which a set of allowable reconstruction values for a transform coefficient depends on the values of the transform coefficient level that precedes the current transform coefficient level in the reconstruction order. The main effect of this scheme is to fill the allowable reconstruction vectors more densely in the N-dimensional vector space (N represents the number of transform coefficients in the transform block) compared to the conventional independent scalar quantization used in HEVC. This means that for the average number of allowable reconstruction vectors for each given N-dimensional unit volume, the average distortion between the input vector and the closest reconstruction vector is reduced. The dependent scalar quantization scheme is implemented by the following operations: (a) defining two scalar quantizers with different reconstruction levels and (b) defining a process for switching between the two scalar quantizers.
[0281] exist Fig.19The two used scalar quantizers, denoted by Q0 and Q1, are shown in FIG. The position of the available reconstruction levels is uniquely specified by the quantization step size Δ. The used scalar quantizer (Q0 or Q1) is not explicitly signaled in the bitstream. Instead, the quantizer used for the current transform coefficient is determined by the parity of the transform coefficient level that precedes the current transform coefficient in the coding / reconstruction order.
[0282] like Fig. 20 As shown, the switching between the two scalar quantizers (Q0 and Q1) is implemented by a state machine with four states. The state can take four different values: 0, 1, 2, 3. It is uniquely determined by the parity of the transform coefficient level that precedes the current transform coefficient in the encoding / reconstruction order. At the beginning of the inverse quantization of the transform block, the state is set to 0. The transform coefficients are reconstructed in the scanning order (i.e., in the same order in which they were entropy decoded). After the reconstruction of the current transform coefficient, the state is updated as Fig. 20 As shown, where k represents the value of the transform coefficient level.
[0283] 2.5.1.3 Syntax and Semantics
[0284] 7.3.7.11 Residual Codec Syntax
[0285]
[0286]
[0287]
[0288]
[0289] 2.5.2 Coefficient Encoding and Decoding of TS Codec Block and QR-BDPCM Codec Block
[0290] QR-BDPCM follows the context modeling approach for TS codec blocks.
[0291] Modified transform coefficient level coding for TS residual. The residual coding for TS includes the following changes relative to the conventional residual coding case:
[0292] (1) No signaling of the final x / y position
[0293] (2) coded_sub_block_flag for each sub-block except the last sub-block when all previous flags are equal to 0;
[0294] (3) sig_coeff_flag context modeling using reduced template,
[0295] (4) is a single context model for abs_level_gt1_flag and par_level_flag,
[0296] (5) Context modeling for the symbol flag and the additional greater than 5 flag, greater than 7 flag, and greater than 9 flag,
[0297] (6) is the modified Rice parameter derivation for the binarization of the remainder,
[0298] (7) The limit of the number of context encoding and decoding bits per sample point is 2 bits per sample point in a block.
[0299] 2.5.2.1 Syntax and Semantics
[0300] 7.3.6.10 Transformation unit syntax
[0301]
[0302]
[0303]
[0304]
[0305] The number of context coding bits is limited to no more than 2 bits per sample point for each CG.
[0306] Table 9-15 - Assignment of ctxInc to syntax elements with context codec bits
[0307]
[0308] 2.5 Chroma Direct Mode
[0309] In direct mode (DM), the prediction mode of the collocated luma block is used to derive the chroma intra prediction mode.
[0310] First, the intra prediction mode lumaIntraPredMode is derived.
[0311] If the collocated luma block is coded in MIP mode, then set lumaIntraPredMode equal to planar mode.
[0312] Otherwise, if the collocated luma block is encoded or decoded in IBC mode or palette mode, then lumaIntraPredMode is set equal to DC mode.
[0313] Otherwise, lumaIntraPredMode is set equal to the intra prediction mode of the collocated luma block covering the corresponding luma sample at the center of the chroma block. Fig.25 An example is described.
[0314] Next, the intra chroma prediction mode (denoted as IntraPredModeC) is derived from lumaIntraPredMode, as highlighted in bold italics in the table below. Note that intra_chroma_pred_mode equal to 4 refers to DM mode.
[0315] Table 8-2 - Specification of IntraPredModeC[xCb][yCb] depending on cclm_mode_flag, cclm_mode_idx, intra_chroma_pred_mode and lumaIntraPredMode
[0316]
[0317] Finally, if the chroma format of the picture is 4:2:2, then for DM mode, IntraPredModeC is further modified according to the following table.
[0318] Specification of the 4:2:2 mapping process from chroma intra prediction mode X to mode Y when chroma_format_idc is equal to 2
[0319]
[0320] The detailed draft provisions are as follows.
[0321] 8.4.3 Derivation Process for Chroma Intra Prediction Modes
[0322] The input to this process is:
[0323] – Luma position (xCb, yCb), specifies the top left sample of the current chroma codec block relative to the top left luma sample of the current picture,
[0324] – The variable cbWidth specifies the width of the current codec block in luminance samples.
[0325] – The variable cbHeight specifies the height of the current codec block in luma samples.
[0326] In this process, the chrominance intra prediction mode IntraPredModeC[xCb][yCb] is derived.
[0327] The corresponding luma intra prediction mode lumaIntraPredMode is derived as follows:
[0328] – If intra_mip_flag[xCb][yCb] is equal to 1, then lumaIntraPredMode is set equal to INTRA_PLANAR.
[0329] – Otherwise, if CuPredMode[0][xCb][yCb] is equal to MODE_IBC or MODE_PLT, then set lumaIntraPredMode equal to INTRA_DC.
[0330] – Otherwise, set lumaIntraPredMode equal to IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2].
[0331] The chroma intra prediction mode IntraPredModeC[xCb][yCb] is derived using cclm_mode_mode_flag, cclm_mode_idx, intra_chroma_pred_mode and lumaIntraPredMode as specified in Table 8-2.
[0332] Table 8-2 - Specification of IntraPredModeC[xCb][yCb] depending on cclm_mode_flag, cclm_mode_idx, intra_chroma_pred_mode and lumaIntraPredMode
[0333]
[0334] When chroma_format_idc is equal to 2, chroma intra prediction mode Y is derived using chroma intra prediction mode X in Table 8-2 as specified in Table 8-3, and chroma intra prediction mode X is then set equal to chroma intra prediction mode Y.
[0335] Table 8-3 – Specification of the 4:2:2 mapping process from chroma intra prediction mode X to mode Y when chroma_format_idc equals 2
[0336]
[0337] 3 Disadvantages of existing implementation methods
[0338] The current design has the following problems:
[0339] (1) The four predefined transform sets for chroma components are the same as those for luma components. In addition, luma blocks and chroma blocks using the same intra prediction mode use the same transform set. However, chroma signals are usually smoother than luma components. Using the same set may be suboptimal.
[0340] (2) RST is applied only to some CGs but not all CGs. However, the decision on signaling the RST index depends on the number of non-zero coefficients in the entire block. When all coefficients in the CG to which RST is applied are zero, there is no need to signal the RST index. However, the current design may still signal the index, which wastes unnecessary bits.
[0341] (3) The RST index is signaled after residual coding, because it requires recording how many non-zero coefficients there are and whether there are non-zero coefficients at certain positions (e.g., numZeroOutSigCoeff, numSigCoeff in Section 2.3.2.2.7). This design makes the parsing process more complicated.
[0342] (4) The RST index is context-encoded, and the context modeling depends on the encoded luminance / chrominance intra prediction mode and the MTS index. This design introduces parsing delay in the reconstruction of the intra prediction mode. And it introduces 8 contexts, which may be a burden for hardware implementation.
[0343] (a) DM and CCLM share the same set of context indices, which is unreasonable because they are two different chroma intra prediction methods.
[0344] (5) The current design of non-TS residual codec first encodes and decodes the coefficient information, followed by the index of RST (i.e., whether RST is used, and if so, which matrix to choose). For such a design, the RST on / off information can be ignored in the entropy codec of the residual.
[0345] (6) RST is always applied to the upper left region of the transform block to which the main transform is applied. However, it is not always true that the energy is concentrated in the upper left region of the transform block for different main transform bases.
[0346] (7) For the dual-tree and single-tree coding structures, the judgment on whether to signal the RST related information is performed in different ways.
[0347] (8) When there is more than one TU in a CU (e.g., CU size is 128×128), then whether to parse RST related information can only be determined after all TUs are decoded. For example, for a 128×128 CU, the first PB cannot be processed without waiting for the LFNST index to arrive after the last PB. Although this does not necessarily destroy the overall 64×64 based decoder pipeline (if CABAC can be decoupled), it increases the data buffering by 4 times for a certain number of decoder pipeline stages. This is costly.
[0348] (9) In JVET-00219, the intra-prediction mode of the collocated luma block is used to determine the LFNST transform set of the CCLM mode coded chroma block. However, the collocated luma block may be coded or decoded using a non-intra-prediction mode (i.e., not a conventional intra-prediction method such as using DC / plane / angle prediction directions). For example, in the dual-tree case, the collocated luma block may be coded or decoded according to a palette mode, an IBC mode, etc. In this case, the intra-prediction mode of the collocated luma block is not defined. Therefore, it is unknown how to derive the secondary transform set of the chroma block.
[0349] (10) The derivation of the chroma intra prediction block defined in subclause 8.4.4 checks whether the luma block covering the corresponding top left luma sample is coded in MIP / IBC / palette mode. If it is true, then the default mode is given. Otherwise, the intra prediction mode of the center luma sample is used. This leads to two problems:
[0350] a. When the MIP mode is used to encode and decode the codec block covering the upper left luma sample (i.e., TL in FIG. 24 (a) and FIG. 24 (b), the luma sample corresponding to the upper left chroma sample in the current chroma block) and the normal intra mode is used to encode and decode the codec block covering the center luma sample (e.g., Fig.25 When encoding and decoding a codec block with a CR in the frame, in this case, the default mode is used and set to the chroma intra prediction mode, which will destroy the correlation between the current chroma block and the luminance block covering the CR. This will result in lower encoding and decoding performance.
[0351] b. In the intra-frame mode, the codec block covering the upper left luma sample (i.e., TL in FIG. 24 (a) and FIG. 24 (b), the corresponding luma sample of the upper left chroma sample in the current chroma block) is encoded and decoded, and IBC / palette / MIP is used to cover the center luma sample (e.g., Fig.25 In this case, the chroma DM mode is derived using the intra prediction mode from the codec block covering the CR. However, there is no integration with MIP / IBC /
[0352] Definition of such intra prediction modes associated with palette modes.
[0353] (11) In the most recent VVC working draft (which can be downloaded from http: / / phenix.it-sudparis.eu / jvet / doc_end_user / documents / 15_Gothenburg / wg11 / JVET-O2001-v14.zip), the zeroing region size (i.e., nonZeroSize) is not uniform for RST 4×4 and RST 8×8. When the block size is 4×N or N×4 (N>=4), RST 4×4 applies. When N is 4 (i.e., the block size is 4×4), the zeroing region size is equal to 8. When N is greater than 4, nonZeroSize is set equal to 16. For RST 8×8, when the block size is 8×8, the zeroing region size is equal to 8. Otherwise (i.e., when the block width is greater than 8 and the block height is not less than 8, or when the block height is greater than 8 and the block width is not less than 8), the zeroing region size is equal to 16. A larger return-to-zero range value brings higher computational complexity on both the encoder and decoder sides.
[0354] (12) The memory usage for storing the RST matrix is high.
[0355] 4 Example Method for Context Modeling for Residual Coding and Decoding
[0356] Embodiments of the disclosed technology overcome the defects of existing implementations, thereby providing higher coding efficiency for video coding. The method for context modeling for residual coding based on the disclosed technology can enhance both existing video coding standards and future video coding standards, and will be illustrated in the following examples described for various implementations. The examples of the disclosed technology provided below explain the general principles and are not intended to be interpreted as limiting. In the examples, the various features described in these examples can be combined unless explicitly indicated to the contrary.
[0357] In the following description, a "block" may refer to a codec unit (CU) or a transform unit (TU) or any rectangular video data region. A "current block" may refer to a codec unit (CU) currently being decoded / encoded or a transform unit (TU) currently being decoded / encoded or any rectangular video data region currently being decoded / encoded. A "CU" or a "TU" may also be referred to as a "codec block" and a "transform block".
[0358] In these examples, RST can be any variation of the design in JVET-N0193. RST can be any technique that can apply a secondary transform to a block or apply a transform to a block that is decoded by a transform skip (TS) codec (e.g., RST proposed in JVET-N0193 applied to TS-coded blocks).
[0359] Hereinafter, "normal intra prediction mode" is used to refer to a conventional intra prediction method, in which a prediction signal is generated by extrapolating adjacent pixels from a certain direction. For example, it can be a DC mode, a plane mode, and an angle intra prediction mode (for example, it can further include a wide angle intra prediction mode). For a block that is not encoded and decoded using the normal intra prediction mode, at least one of the encoding and decoding methods such as IBC, MIP, palette, and BDPCM intra prediction modes can be used to encode and decode the block.
[0360] In addition, "zeroed regions" or "zeroed CGs" can indicate those regions / CGs that always have zero coefficients due to the reduced transform size used in the secondary transform process. For example, if the secondary transform size is 16×32 and the CG size is 4×4, then it is only applied to the first two CGs, but only the first CG can have non-zero coefficients, and the second 4×4 CG is also called the zeroed CG.
[0361] Selection of transformation matrix in RST
[0362] 1. The sub-region to which RST is applied may be a sub-region other than the upper left portion of the block.
[0363] a. In one example, RST may be applied to the top right or bottom right or bottom left or center sub-region of the block.
[0364] b. To which sub-region RST is applied may depend on the intra prediction mode and / or the main transform matrix (eg, DCT-II, DST-VII, Identity transform).
[0365] 2. The choice of transform set and / or transform matrix used in RST may depend on the color components.
[0366] a. In one example, one set of transform matrices may be used for luma (or G) components and one set of transform matrices may be used for chroma components (or B / R).
[0367] b. In one example, each color component may correspond to one set.
[0368] c. In one example, among any of the two or more sets for different color components, at least one matrix is different.
[0369] 3. The selection of the transform set and / or transform matrix used in the RST may depend on the intra prediction method (eg, CCLM, multi-reference line based intra prediction method, matrix based intra prediction method).
[0370] a. In one example, one set of transform matrices may be used for CCLM codec blocks and another set of transform matrices may be used for non-CCLM codec blocks.
[0371] b. In one example, one set of transform matrices may be used for normal intra prediction codec blocks, and another set of transform matrices may be used for blocks with multiple reference lines enabled (ie, which do not use neighboring lines for intra prediction).
[0372] c. In one example, one set of transform matrices may be used for blocks that employ joint chroma residual coding, and another set of transform matrices may be used for blocks that do not apply joint chroma residual coding.
[0373] d. In one example, among any of the two or more sets for different intra prediction methods, at least one matrix is different.
[0374] e. Alternatively, RST may be disabled for blocks employing certain intra prediction directions and / or certain codec tools (eg, CCLM) and / or joint chroma residual codec and / or certain color component (eg, chroma) codec.
[0375] 4. A default intra prediction mode may be assigned to blocks (eg, CU / PU / CB / PB) that are not coded or decoded using a common intra prediction mode (eg, MIP, IBC, palette).
[0376] a. The default mode may depend on the codec method (MIP / IBC / Palette).
[0377] b. The default mode may be signaled or derived on the fly.
[0378] c. This default mode can be utilized in the derivation of the chrominance derivation mode (DM).
[0379] d. The default mode can be used to predict the intra prediction mode of other blocks. For example, it can be used to derive the most probable mode (MPM) list for encoding and decoding subsequent blocks of the current block.
[0380] e. The default mode assigned to a block of one color component (eg, luma) may be used in the derivation of a transform set or transform index for another color component (eg, chroma).
[0381] f. Alternatively, furthermore, the default mode may be stored together with the prediction modes (eg, intra / inter / IBC).
[0382] g. A default mode may not be assigned to an inter-codec block.
[0383] 5. It is proposed to use the information of a luma codec block (which may also be referred to as a corresponding luma block) covering the same predefined position of a chroma codec block in all operations of the chroma intra prediction mode derivation process. For example, the same luma codec block covering the same predefined position of a chroma codec block is used to check the prediction mode (or coding method, such as IBC / MIP / palette) of the luma codec block, and to remove the intra prediction mode of the luma codec block.
[0384] a. In one example, the same predefined position is defined as the corresponding luma sample of the center chroma sample of the current chroma block (e.g., Fig.25 CR in .
[0385] b. In one example, the same predefined position is defined as being associated with the corresponding luma sample of the top left chroma sample of the current chroma block (eg, TL in FIG. 24b ).
[0386] c. Alternatively, if the codec block covering the same predefined position is encoded using IBC / palette / MIP mode / any other non-ordinary intra prediction mode, the chroma intra prediction mode can be derived using the default intra prediction mode. Otherwise, the chroma intra prediction mode can be derived using the decoded intra prediction mode of the codec block covering the same predefined position.
[0387] 6. For chroma blocks encoded and decoded using non-normal intra-frame prediction modes (e.g., CCLM), when the corresponding luminance blocks are encoded and decoded using non-normal intra-frame prediction modes (e.g., IBC / palette / MIP), the transform set / transform matrix used in RST or other encoding and decoding tools can be derived from one or more default modes or default transform sets.
[0388] a. Whether to use the default transform set / transform matrix or to derive the transform set / transform matrix from the intra-frame luma prediction mode of the corresponding luma block may depend on the encoding and decoding mode of the corresponding luma block.
[0389] i. In one example, if the corresponding luminance block is encoded using a normal intra-frame prediction mode and / or BDPCM, a transform set / transform matrix may be derived based on the luminance intra-frame prediction mode associated with the corresponding luminance block (e.g., a collocated luminance block or a luminance block defined in item 5 of the present invention).
[0390] ii. In one example, if the corresponding luma block is encoded using a non-normal intra prediction mode (e.g., IBC / palette and / or BDPCM), a default transform set may be used (e.g., using a set index equal to K (e.g., K=0)).
[0391] b. Whether to enable RST for a block of one color component may depend on the encoding and decoding method of one or more corresponding blocks in another color component and / or the encoding method of the current block.
[0392] i. Whether to enable RST for a chroma block may depend on the encoding and decoding method of one or more corresponding luminance blocks and / or the encoding and decoding method of the current chroma block.
[0393] ii. In one example, if the corresponding luma block is encoded in normal intra prediction mode and / or BDPCM, then RST may be enabled for the chroma block.
[0394] iii. In one example, RST may be disabled for chroma blocks if the corresponding luma block is encoded using a non-normal intra prediction mode (eg, IBC / palette and / or BDPCM).
[0395] 1) Alternatively, RST may be disabled for chroma blocks encoded using a non-normal intra prediction mode (e.g., CCLM) if, in addition, the corresponding luma block is encoded using a non-normal intra prediction mode (e.g., IBC / palette and / or BDPCM).
[0396] c. When the collocated luminance block is not encoded or decoded according to the normal intra-frame prediction mode, a predefined intra-frame prediction mode can be assigned, which will then be used for the selection of the transform set and / or transform matrix used in the RST (for example, according to the transform set selection table shown in Section 2.4.2.2.3).
[0397] i. In one example, if the collocated luma block is coded in IBC (Intra Block Copy) mode, a first predefined intra prediction mode (eg, DC or planar mode) may be assigned.
[0398] ii. In one example, if the collocated luma block is coded in palette mode, a second predefined intra prediction mode (eg, DC or planar mode) may be assigned.
[0399] iii. In one example, if the collocated luma block is coded in MIP mode, a third predefined intra prediction mode (eg, planar or DC mode) may be assigned.
[0400] iv. In one example, if the collocated luminance block is encoded and decoded in BDPCM (Block-based Delta Pulse Code Modulation) mode, a fourth predefined intra prediction mode (eg, planar or DC mode) may be assigned.
[0401] v. In one example, for each of the predefined intra prediction modes, it may be a DC mode or a planar mode or a vertical mode or a horizontal mode or a 45 degree mode or a 135 degree mode.
[0402] vi. Alternatively, if the collocated luminance block is encoded and decoded in a MIP mode, then the MIP mode can be mapped to an intra-frame prediction mode based on the MIP mode and the dimension of the collocated luminance block, for example, by using the table "Mapping specification between MIP and intra-frame prediction mode" in Section 2.2.2.2.
[0403] vii. The predefined mode can be adaptively selected from several candidates such as DC mode and planar mode.
[0404] 1) The predefined pattern can be signaled from the encoder to the decoder.
[0405] 2) The predefined pattern can be derived from the encoder to the decoder.
[0406] a. For example, if the decoder determines that the current picture is a screen content picture, then the predefined mode may be a DC mode, otherwise, the predefined mode is a planar mode.
[0407] viii. The predefined modes may be defined in the same way as those used for the chroma DM derivation process (eg, lumaIntraPredMode in subclause 8.4.3).
[0408] d. When the collocated luma block is encoded and decoded in the normal intra prediction mode or / and the BDPCM mode, the chroma intra prediction mode may be derived from the intra prediction mode of the collocated luma block in the same manner as the DM mode (e.g., as specified in Section 2.7). The derived chroma intra prediction mode is then used for the selection of the transform set and / or transform matrix used in the RST (e.g., according to the transform set selection table shown in Section 2.6).
[0409] e. In the above bullet points, the collocated luminance block can be a block that covers a specific luminance position (e.g., TL in FIG. 24b or Fig.25 The codec block of CR in .
[0410] 7. The selection of transform sets and / or transform matrices used in the RST may depend on the primary transform.
[0411] a. In one example, the primary transform may include, but is not limited to, DCT-II, DST-VII, DCT-VIII, a transform skip mode, an identity transform, or a variant from a trained transform such as a KLT-based transform.
[0412] b. In one example, if the primary transform applied to a block is an identity transform (eg, TS mode is applied to a block), then the transform set and / or transform matrix used in the RST may be different from other kinds of primary transforms.
[0413] i. In one example, one set of transform matrices may be used for transform skip mode.
[0414] 1) Alternatively, in addition, a syntax element may be signaled to indicate whether to use RST for transform skip mode, or which matrix in the transform matrix set is used for a block.
[0415] c. In one example, if the horizontal and vertical 1-D primary transforms applied to a block are of the same basis (e.g., both are DCT-II), then the transform set and / or transform matrix used in the RST can be different from the primary transforms from different bases for different directions (vertical or horizontal).
[0416] d. In one example, one set of transform matrices may be used for DCT-II (or first primary transform), and one or more sets of transform matrices may be used for other primary transform modes.
[0417] e. In one example, each main transformation mode may correspond to one RST matrix set.
[0418] f. In one example, among any of the two or more sets for different primary transform modes, at least one matrix in a set is different.
[0419] 8. The choice of transform set and / or transform matrix used in RST may depend on block dimensions (width / height or ratio) / block shape (square or non-square).
[0420] a. In one example, multiple sets of transform matrices may be used, and each set may correspond to a category of blocks, where the category is determined by block dimension / block shape.
[0421] 9. Multiple transform matrix sets may be enabled for encoding / decoding video processing units (e.g., sequence / video / picture / strip / slice / brick / sub-picture), and an indication of which of these multiple sets may be used may be signaled at the picture / strip / slice / brick / sub-picture level.
[0422] Signaling and residual encoding and decoding of RST side information
[0423] 10. Whether and / or how to signal side information of RST (e.g., st_idx) may depend on the last non-zero coefficient (in scan order) in the block.
[0424] a. In one example, RST can be enabled and the index of RST can be signaled only when the last non-zero coefficient is in the CG where RST is applied.
[0425] b. In one example, if the last non-zero coefficient is not within the CG where RST is applied, then RST is disabled and signaling of RST is skipped.
[0426] 11. Whether and / or how to signal side information of RST (e.g., st_idx) may depend on the coefficients of a certain color component rather than all available color components in the CU.
[0427] a. In one example, it can be determined whether and / or how to signal side information of RST using only luminance information.
[0428] i. Alternatively, in addition, the above method can be applied only when the block dimensions meet certain conditions.
[0429] 1) These conditions are W < T1 or H < T2.
[0430] 2) For example, T1 = T2 = 4. Thus, for a 4×4 CU, the luminance block size is 4×4, and the two chrominance blocks with 4:2:0 format are 2×2. In this case, only luminance information can be used.
[0431] ii. Alternatively, in addition, the above method can be applied only when the current partition type tree is a single tree.
[0432] b. Whether to use the information of one color component or the information of all color components may depend on the block dimensions / encoding and decoding information.
[0433] 12. Whether and / or how to signal side information of RST (e.g., st_idx) may depend on the coefficients of a partial region of a block rather than the entire block.
[0434] a. In one example, the partial region can be defined as the CG where RST is applied.
[0435] b. In one example, the partial region can be defined as the first M or last M (e.g., M = 1 or 2) CGs in the scan order or reverse scan order of the block.
[0436] i. In one example, M can depend on the block dimension.
[0437] ii. In one example, if the block size is 4×N and / or N×4 (N > 8), then set M to 2.
[0438] iii. In one example, if the block size is 4×8 and / or 8×4 and / or WxH (W >= 8, H >= 8), then set M to 1.
[0439] c. In one example, it may not be allowed to consider the information of the block with dimension W×H (e.g., the number of non-zero coefficients of the block) to determine the use of RST and / or the signaling of RST-related information.
[0440] i. For example, if W < T1 or H < T2, then the number of non-zero coefficients of the block may not be counted. For example, T1 = T2 = 4.
[0441] d. In one example, the partial region can be defined as the upper left M×N region of the current block with dimension W×H.
[0442] i. In one example, M can be less than W, and / or N can be less than H.
[0443] ii. In one example, M and N can be fixed numbers. For example, M = N = 4.
[0444] iii. In another example, M and / or N can depend on W and / or H.
[0445] iv. In one example, M and / or N can depend on the maximum allowable transform size.
[0446] 1) For example, if W is greater than 8 and H is equal to 4, then M = 8 and N = 4.
[0447] 2) For example, if H is greater than 8 and W is equal to 4, then M = 4 and N = 8.
[0448] 3) For example, if neither of the above two conditions is met, then M = 4 and N = 4.
[0449] v. Alternatively, in addition, these methods can be applied only to certain block dimensions, for example, those that do not meet the conditions in 7.c.
[0450] e. In one example, the partial region can be the same for all blocks.
[0451] i. Alternatively, it can be changed based on the block dimension and / or the encoding / decoding information.
[0452] f. In one example, the partial area may depend on a given range of scan order indices.
[0453] i. In one example, the partial area may be a partial area covering coefficients within a specific range based on a coefficient scanning order (e.g., inverse decoding order) of a current block having dimensions W×H, where the scanning order indices of these coefficients are within the range of [dxS, IdxE] (including endpoints).
[0454] 1) In one example, IdxS is equal to 0.
[0455] 2) In one example, IdxE may be less than W×H-1.
[0456] 3) In one example, IdxE may be a fixed number, for example, IdxE=15.
[0457] 4) In one example, IdxE may depend on W and / or H.
[0458] a. For example, if W is greater than 8 and H is equal to 4, then IdxE=31.
[0459] b. For example, if H is greater than 8 and W is equal to 4, then IdxE=31.
[0460] c. For example, if W equals 8 and H equals 8, then IdxE=7.
[0461] d. For example, if W equals 4 and H equals 4, then IdxE=7.
[0462] e. For example, if neither of the above two conditions a) and b) is satisfied, then IdxE=15.
[0463] f. For example, if any of the above four conditions a), b), c) and d) are not met, then IdxE=15.
[0464] g. For example, if neither of the above two conditions c) and d) is satisfied, then IdxE=15.
[0465] ii. Alternatively, furthermore, these methods may be applied only for certain block dimensions, e.g., not satisfying the conditions in 7.c.
[0466] g. In one example, it may depend on the location of the non-zero coefficients within the partial region.
[0467] h. In one example, it may depend on the energy (eg, the sum of squares or the sum of absolute values) of the non-zero coefficients in the partial region.
[0468] i. In one example, it may depend on the number of non-zero coefficients within a partial area of a block rather than within the entire block.
[0469] i. Alternatively, it may depend on the number of non-zero coefficients within a partial region of one or more blocks within the CU.
[0470] ii. When the number of non-zero coefficients in a partial area of a block is less than a threshold, the signaling of the side information of the RST may be skipped.
[0471] iii. In one example, the threshold is fixed to N (eg, N=1 or 2).
[0472] iv. In one example, the threshold may depend on slice type / picture type / segmentation tree type (dual or single) / video content (screen content or camera captured content).
[0473] v. 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).
[0474] 13. When there are no non-zero coefficients within the CG to which RST can be applied, RST must be disabled.
[0475] a. In one example, when RST is applied to a block, at least one CG to which the RST is applied must contain at least one non-zero coefficient.
[0476] b. In one example, for 4×N and / or N×4 (N>8), if RST is applied, the first two 4×4 CGs must contain at least one non-zero coefficient.
[0477] c. In one example, for 4x8 and / or 8x4, if RST is applied, the top left 4x4 must contain at least one non-zero coefficient.
[0478] d. In one example, for W×H (W>=8 and H>=8), if RST is applied, the upper left 4×4 must contain at least one non-zero coefficient.
[0479] e. A conforming bitstream must satisfy one or more of the above conditions.
[0480] 14. RST related syntax elements may be signaled before encoding and decoding the residual (eg transform coefficients / direct quantized).
[0481] a. In one example, the counts of the number of non-zero coefficients within the zeroed region (eg, numZeroOutSigCoeff) and the number of non-zero coefficients in the entire block (eg, numSigCoeff) are removed during the parsing of coefficients.
[0482] b. In one example, RST related syntax elements (eg, st_idx) may be encoded and decoded before residual_coding.
[0483] c. RST-related syntax elements may be signaled conditionally (e.g., based on coding block flag, TS mode usage).
[0484] vi. In one example, RST related syntax elements (eg, st_idx) may be encoded and decoded after signaling of a codec block flag or after signaling of TS / MTS related syntax elements.
[0485] vii. In one example, when TS mode is enabled (eg, transform_skip_flag after decoding is equal to 1), signaling of RST-related syntax elements is skipped.
[0486] d. For the zeroed CG, the residual related syntax may not be signaled.
[0487] e. How to encode and decode the residual (eg, scanning order, binarization, syntax to decode, context modeling) may depend on the RST.
[0488] i. In one example, a raster scan order may be applied instead of an upper right diagonal scan order.
[0489] 1) The raster scan order is from left to right and from top to bottom, or in reverse order.
[0490] 2) Alternatively, a vertical scanning order (from top to bottom and from left to right, or in reverse order) may be applied instead of a diagonal scanning order towards the upper right.
[0491] 3) Alternatively, furthermore, the context modeling may be modified.
[0492] a. In one example, context modeling can depend on previous codec information in the template, which is the nearest N neighbors in scan order instead of using right, bottom, bottom-right neighbors.
[0493] b. In one example, context modeling may depend on previously decoded information in the template according to the scanned index (eg, -1, -2, ..., assuming the current index is equal to 0).
[0494] ii. In one example, different binarization methods (e.g., Rice) can be applied
[0495] Parameter derivation) for the residual codec associated with the RST codec block and the non-RST codec block.
[0496] iii. In one example, some syntax can be skipped for the RST codec block
[0497] Signaling notification of the element.
[0498] 1) For CG applying RST, the signaling notification of the CG codec block flag (coded_sub_block_flag) can be skipped.
[0499] a. In one example, when RST 8×8 is applied to the first three CGs in a diagonal scan order, signaling of the CG codec block flag is skipped for the second and third CGs (e.g., the upper right 4×4 CG and the lower left 4×4 CG within the upper left 8×8 region of the block).
[0500] i. Alternatively, in addition, the corresponding CG codec block flag is inferred to be 0, ie all coefficients are zero.
[0501] 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 the scanning order (or the last CG in the reverse scanning order).
[0502] ii. Alternatively, in addition, the CG codec block flag of the upper left CG in the block is inferred to be 1, i.e., it contains at least one non-zero coefficient.
[0503] c. Fig.21 An example of an 8×8 block is shown in . When RST 8×8 or RST 4×4 is applied to the 8×8 block, coded_sub_block_flag of CG0 is inferred to be 1 and coded_sub_block_flag of CG1 and CG2 are inferred to be 0.
[0504] 2) Signaling of the magnitude and / or sign of the coefficients may be skipped for certain coordinates.
[0505] a. In one example, if the index relative to a CG in the scan order is not less than the maximum allowed index where a non-zero coefficient can exist (e.g., nonZeroSize in chapter 0), then signaling of the coefficient can be skipped.
[0506] b. In one example, signaling of syntax elements such as sig_coeff_flag, abs_level_gtX_flag, par_level_flag, abs_remainder, coeff_sign_flag, dec_abs_level may be skipped.
[0507] 3) Alternatively, signaling of the residual (e.g., CG codec block flags, coefficient amplitudes for certain coordinates, and / or sign flags) may be maintained, however the context modeling may be modified to be different for other CGs.
[0508] iv. In one example, the encoding and decoding of the residual in the CG to which RST is applied and other CGs may be different.
[0509] 1) For the above sub-bullets, they can be applied only to the CG to which RST is applied.
[0510] 15. RST related syntax elements may be signaled before other transform indications (such as transform skip and / or MTS index).
[0511] a. In one example, the signaling of the transition skip may depend on the RST information.
[0512] i. In one example, for a block, if RST is applied in the block, the transform skip indication may not be signaled and is inferred to be 0.
[0513] b. In one example, signaling of the MTS index may depend on the RST information.
[0514] i. In one example, for a block, if RST is applied in the block, one or more MTS change indications are not signaled and are inferred not to be used for the block.
[0515] 16. It is proposed to use different context modeling methods in arithmetic coding and decoding for different parts within a block.
[0516] a. In one example, the block is treated as two parts, namely, the first M CGs and the remaining CGs in the scanning order.
[0517] i. In one example, M is set to 1.
[0518] ii. In one example, M is set to 2 for 4×N and N×4 (N>8) blocks; and M is set to 1 for all other cases.
[0519] b. In one example, the block is treated as two parts, a sub-region where RST is applied and a sub-region where RST is not applied.
[0520] i. If RST 4×4 is applied, the sub-region to which RST is applied is the first or first two CGs of the current block.
[0521] ii. If RST 4×4 is applied, the sub-region to which RST is applied is the first three CGs of the current block.
[0522] c. In one example, it is proposed to disable previously coded information in the context modeling process for a first part within a block, but enable previously coded information for a second part.
[0523] d. In one example, when decoding the first CG, the use of information of the remaining one or more CGs may not be allowed.
[0524] i. In one example, when encoding the CG coding block flag of the first CG, the value of the second CG (e.g., the right side or the bottom side) is not considered.
[0525] ii. In one example, when encoding and decoding the CG codec block flag of the first CG, the values of the second and third CGs (right CG and lower CG for W×H (W>=8 and H>=8)) are not considered.
[0526] iii. In one example, when encoding and decoding the current coefficient, if its neighbor in the context template is in a different CG, then the use of information from this neighbor is not allowed.
[0527] e. In one example, when decoding coefficients in a region where RST is applied, it may not be allowed to use information in the remaining regions where RST is not applied.
[0528] f. Alternatively, furthermore, the above method may be applied under certain conditions.
[0529] i. These conditions may include whether RST is enabled.
[0530] ii. These conditions may include block dimensions.
[0531] Context Modeling in Arithmetic Coding and Decoding of RST Side Information
[0532] 17. When encoding and decoding RST indexes, context modeling may depend on whether explicit or implicit multiple transform selection (MTS) is enabled.
[0533] a. In one example, when implicit MTS is enabled, different contexts can be selected for blocks encoded in the same intra prediction mode.
[0534] i. In one example, the block dimensions, e.g., shape (square or non-square), are used to select the context.
[0535] b. In one example, instead of checking the transform index (eg, tu_mts_idx) for explicit MTS codecs, a transform matrix basis may be used.
[0536] i. In one example, for a transform matrix basis that employs DCT-II for both horizontal and vertical 1-D transforms, the corresponding context may be different from other kinds of transform matrices.
[0537] 18. When encoding and decoding RST indexes, context modeling may depend on whether CCLM is enabled (eg, sps_cclm_enabled_flag).
[0538] a. Alternatively, whether to enable or how to select a context for RST index encoding and decoding may depend on whether CCLM is applied to a block.
[0539] b. In one example, context modeling may depend on whether CCLM is enabled for the current block.
[0540] i. In one example, intraModeCtx=sps_cclm_enabled_flag?(intra_chroma_pred_mode[x0][y0] is CCLM:intra_chroma_pred_mode[x0][y0] is DM)?1:0.
[0541] c. Alternatively, whether to enable or how to select the context for RST index coding may depend on whether the current chroma block is coded in DM mode.
[0542] i. In one example, intraModeCtx=(intra_chroma_pred_mode[x0][y0]==(sps_cclm_enabled_flag?7:4))?1:0.
[0543] 19. When encoding and decoding RST indexes, context modeling can depend on the block dimension / partition depth (quadtree depth and / or BT / TT depth).
[0544] 20. When encoding and decoding RST indexes, context modeling can depend on color format and / or color components.
[0545] 21. When encoding and decoding the RST index, context modeling can be independent of the intra prediction mode and / or MTS index.
[0546] 22. When encoding and decoding the RST index, only one context may be used to context-encode or bypass-encode the first and / or second binary bits.
[0547] a. In one example, the first bin may be context coded and the context modeling may depend purely on the partition tree type (ie, single tree or dual tree), and the second bin may be bypass coded.
[0548] i. Alternatively, in addition, the above method is called for a given stripe type. For different stripe types, different contexts may be utilized.
[0549] Call the RST procedure based on the condition
[0550] 23. Whether to call the inverse RST process may depend on the CG codec block flag.
[0551] a. In one example, if the upper left CG codec block flag is zero, then there is no need to call this process.
[0552] i. In one example, if the upper left CG codec block flag is zero and the block size is not equal to 4×N / N×4 (N>8), then there is no need to call this process.
[0553] b. In one example, if the first two CG codec block flags in the scan order are both equal to zero, then there is no need to call this process.
[0554] i. In one example, if the first two CG codec block flags in the scan order are both equal to zero and the block size is equal to 4×N / N×4 (N>8), then there is no need to call this process.
[0555] 24. Whether to call the inverse RST process may depend on the block dimension.
[0556] a. In one example, for certain block dimensions, e.g., 4×8 / 8×4, RST may be disabled.
[0557] Alternatively, furthermore, signaling of RST related syntax elements may be skipped.
[0558] Unification of dual-tree and single-tree encoding and decoding
[0559] 25. The use of RST and / or the signaling notification of RST related information may be determined in the same manner in dual-tree and single-tree coding and decoding.
[0560] a. For example, when the number of counted non-zero coefficients (e.g., numSigCoeff specified in JVET-N0193) is not greater than T1 in dual-tree coding or not greater than T2 in single-tree coding, RST should not be applied and relevant information is not signaled, where T1 is equal to T2.
[0561] b. In one example, both T1 and T2 are set to N, for example, N=1 or 2.
[0562] Consider multiple TUs in a CU.
[0563] 26. Whether and / or how to apply RST may depend on the block dimensions W×H.
[0564] a. In one example, if W>T1 or H>T2, then RST may not be applied.
[0565] b. In one example, if W>T1 and H>T2, then RST may not be applied.
[0566] c. In one example, if W*H>=T, then RST may not be applied.
[0567] d. For the above example, the following applies:
[0568] i. In one example, the block is a CU.
[0569] ii. In one example, T1=T2=64.
[0570] iii. In one example, T1 and / or T2 may depend on the maximum allowed transform size. For example, T1 = T2 = maximum allowed transform size.
[0571] iv. In one example, T is set to 4096.
[0572] e. Alternatively, further, if it is determined that RST is not to be applied, relevant information may not be signaled.
[0573] 27. When there are N (N>1) TUs in a CU, the codec information of only one TU among the N TUs is used to determine the use of RST and / or the signaling of RST-related information.
[0574] a. In one example, the first TU in decoding order in the CU may be used to make this determination.
[0575] b. In one example, the top left TU of the CU in decoding order may be used to make this determination.
[0576] c. In one example, the determination to employ the particular TU may be made in the same manner as when there is only one TU in the CU.
[0577] 28. The use of RST and / or signaling of RST-related information may be performed at the TU level or PU level rather than at the CU level.
[0578] a. Alternatively, different TU / PUs within a CU may select different secondary transform matrices or enable / disable control flags.
[0579] b. Alternatively, furthermore, for the dual-tree case and for chroma block coding, different color components may select different secondary transform matrices or enable / disable control flags.
[0580] c. Alternatively, whether within which video unit level the RST related information is signaled may depend on the partition tree type (dual or single).
[0581] d. Alternatively, whether or not to signal RST related information within which video unit level may depend on the relationship between the CU / PU / TU and the maximum allowed transform block size, such as larger or smaller than.
[0582] Unification of zero range
[0583] 29. The zeroing region may depend on the dimensions (eg, size) of the sub-block to which the RST is applied.
[0584] a. In one example, assume that: when the size of the current sub-block is M×N, nonZeroSize is equal to nonZeroSizeA, and when the size of the current sub-block is K×L, nonZeroSize (i.e., the number of samples in the zeroing region) is equal to nonZeroSizeB. When Min(M,N) is not less than Min(K,L), nonZeroSizeA is not less than nonZeroSizeB. For example, M=8, N=8, K=4, L=4 and nonZeroSizeA=16, nonZeroSizeB=8.
[0585] b. In one example, if the sub-block size is 4×4 (eg, the width or height of the block is equal to 4), then nonZeroSize can be set to a fixed value L (eg, L is equal to 8).
[0586] i. In one example, for 4×N or N×4 blocks, nonZeroSize may be set to a fixed value L.
[0587] c. In one example, if the sub-block size is 8×8 (eg, the width or height of the block is equal to 8), then nonZeroSize can be set to a fixed value L (eg, L is equal to 8).
[0588] i. In one example, for 8×N or N×8 blocks, nonZeroSize may be set to a fixed value L.
[0589] d. Alternatively, nonZeroSize may be set to a fixed value L (eg, L equals 8) regardless of the block size.
[0590] 30. The zeroing area can depend on the secondary transform size.
[0591] e. In one example, it may depend on whether RST 4×4 or RST 8×8 is applied.
[0592] f. In one example, assume that nonZeroSize (i.e., the number of samples in the zeroing region) is equal to nonZeroSizeA when RST 8×8 is applied, and nonZeroSize is equal to nonZeroSizeB when RST 4×4 is applied. At this time, nonZeroSizeA is not less than nonZeroSizeB. For example, nonZeroSizeA=16 and nonZeroSizeB=8.
[0593] Reduction of the dimensionality of the transformation matrix
[0594] 31. The dimension(s) of the transform and / or inverse transform matrices used for RST may be reduced.
[0595] g. In one example, the dimension of the transformation matrix of RST 4×4 can be reduced to 1 / 2, 1 / 4 or 1 / 8 of its original dimension(s). For example, the original dimension(s) of the transformation matrix of RST 4×4 is 16×16. This dimension can be reduced to 16×8, 16×4 or 16×2.
[0596] h. In one example, the dimensions of the transform and / or inverse transform matrix of RST 8×8 may be reduced to 1 / 2, 1 / 4, or 1 / 8 of its original dimensions. For example, the dimensions of the transform matrix of RST 8×8 may be reduced from 48×16 to 48×8, 48×4, or 48×2.
[0597] i. Alternatively, furthermore, the zeroing region may depend on the dimension of the reduced dimension.
[0598] 32. One or more residual patterns may be defined. A residual pattern may be a block with a mask to define where the inverse transformed coefficients may be assigned. For example, for regions with dimension M*N, only parts of them are allowed to have coefficients.
[0599] a. In one example, it is defined Fig.26 A pattern in which the highlighted portions may be associated with transform coefficients and the remaining portions may be associated with zero coefficients.
[0600] i. In one example, the pattern may be discontinuous, that is, one position may be associated with a coefficient and four of its neighboring positions may not be associated with coefficients.
[0601] b. In one example, the above pattern may be applied to certain blocks, such as 8×8 and / or M×N (M>8, N>8), regardless of the signaled transform index.
[0602] c. In one example, whether and / or how to apply the above pattern may depend on which transform(s) are used in the current block (eg, whether to apply RST or a certain main transform (eg, DCT2)).
[0603] i. For example, the pattern is applied only when RST is applied.
[0604] 1) For example, the pattern is applied when and only when RST is applied to M×N (M>=8, N>=8) blocks, regardless of the signaled transform index.
[0605] a. Alternatively, in addition, bullet points 27-29 may apply.
[0606] ii. For example, the pattern is applied when a certain transformation is used.
[0607] d. In one example, there may be multiple residual patterns defined or derived from a larger residual pattern with more allowed coefficients.
[0608] iii. In one example, for each residual pattern, multiple transformation matrices may be defined.
[0609] 1) Alternatively, in addition, an indication of a selected residual pattern and a transform among a plurality of transforms associated with the selected pattern may also be signaled.
[0610] iv. In one example, the residual pattern may be derived by excluding positions associated with smaller transform coefficients in the K*L transform matrix.
[0611] 1) In one example, the first residual pattern may be derived by excluding positions associated with the first K0 smallest transform coefficients. Thus, residuals may be allocated to (K*L-K0) positions.
[0612] 2) In one example, the second residual pattern may be derived by excluding positions associated with the first K1 smallest transform coefficients, where K1 is not equal to K0. Therefore, the residuals may be allocated to (K*L-K1) positions.
[0613] e. In one example, the above example can be applied to blocks smaller than the largest transform block.
[0614] f. In one example, how to select the pattern may depend on the color components / coding information of the current block and / or its neighboring blocks.
[0615] g. In one example, “applying RST to a block” means applying a secondary transform to the block (eg, LFNST index is not equal to 0 (eg, equal to 1 or 2)).
[0616] Retrained LFNST matrix and signaling
[0617] 33. The RST matrix can be modified.
[0618] a. In one example, the 16×16 RST matrix can be modified to the lowFreqTransMatrix shown in 5.17, where nTrS is equal to 16.
[0619] b. In one example, the 16×48 RST matrix can be modified to the lowFreqTransMatrix shown in 5.17, where nTrS is equal to 48.
[0620] 34. The RST matrix can be modified through online retraining.
[0621] a. In one example, the RST matrix can be retrained from the reconstructed transform coefficient blocks, and eigendecomposition (or spectral decomposition) can be applied to calculate eigenvalues or eigenvectors. The eigenvectors or sorted eigenvectors can constitute the retrained RST matrix.
[0622] i. In one example, RST retraining can be applied at both the encoder and the decoder.
[0623] ii. In one example, RST retraining may be applied only at the encoder.
[0624] b. In one example, the RST matrix may be modified only after encoding or decoding an intra slice (or intra picture).
[0625] c. In one example, the retrained RST matrix can be used instead of the original RST matrix.
[0626] i. Alternatively, the retrained RST matrix can be used to replace parts of the original RST matrix.
[0627] d. In one example, the retrained RST matrix can be used as an additional RST matrix set.
[0628] e. In one example, the retrained RST matrix can be signaled from the encoder to the decoder.
[0629] i. In one example, the retrained RST matrix may be signaled in a slice header, a picture header (or a picture parameter set (PPS)), or an adaptation parameter set (APS).
[0630] ii. In one example, the difference between the original RST matrix and the retrained RST matrix may be signaled.
[0631] 1) Alternatively, the difference between the previously signaled RST matrix and the retrained RST matrix may be signaled.
[0632] iii. In one example, only the portion of the retrained RST matrix may be signaled.
[0633] 1) In one example, only N sets (N <M)。
[0634] 2) In one example, only the upper left W*H sub-matrix in the RST matrix is signaled.
[0635] The examples described above may be incorporated into the context of the methods described below (eg, methods 2200 , 2210 , 2220 , 2230 , 2240 , and 2250 ), which may be implemented at a video decoder or a video encoder.
[0636] Fig.22A A flow chart of an exemplary method for video processing is shown. The method 2200 includes, at step 2202, selecting a transform set or a transform matrix based on characteristics of the current video block for applying a downscaled secondary transform to the current video block.
[0637] The method 2200 includes, in step 2204, applying the selected transform set or transform matrix to a portion of the current video block as part of a conversion between the current video block and a bitstream representation of a video including the current video block.
[0638] In some embodiments, the portion of the current video block is an upper right sub-region, a lower right sub-region, a lower left sub-region, or a center sub-region of the current video block.
[0639] In some embodiments, the characteristic of the current video block is an intra prediction mode or a primary transform matrix of the current video block.
[0640] In some embodiments, the characteristic is a color component of the current video block.In one example, 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.
[0641] In some embodiments, the feature is an intra-frame prediction mode or an intra-frame coding method of the current video block. In one example, the intra-frame prediction method includes a prediction method based on multiple reference lines (MRL) or a matrix-based intra-frame prediction method. In another example, a first transform set is selected when the current video block is a cross-component linear model (CCLM) codec block, and wherein a second transform set different from the first transform set is selected when the current video block is a non-CCLM codec block. In yet another example, a first transform set is selected when the current video block is encoded and decoded using a joint chroma residual codec method, and wherein a second transform set different from the first transform set is selected when the current video block is not encoded and decoded using the joint chroma residual codec method.
[0642] In some embodiments, the feature is a major transform of the current video block.
[0643] Fig. 22B A flow chart of an exemplary method for video processing is shown. The method 2210 includes, in step 2212, making a decision regarding selectively including signaling of side information for application of a reduced secondary transform (RST) into a bitstream representation of the current video block based on one or more coefficients associated with the current video block.
[0644] The method 2210 includes, in step 2214, performing a conversion between the current video block and a bitstream representation of a video including the current video block based on the decision.
[0645] In some embodiments, the one or more coefficients include a last non-zero coefficient in a scan order of the current video block.
[0646] In some embodiments, the one or more coefficients include a plurality of coefficients within a partial region of the current video block. In one example, the partial region includes one or more codec groups to which RST may be applied. In another example, the partial region includes the first M codec groups or the last M codec groups in a scan order of the current video block. In yet another example, the partial region includes the first M codec groups or the last M codec groups in a reverse scan order of the current video block. In yet another example, the decision is also made based on the energy of one or more non-zero coefficients of the plurality of coefficients.
[0647] Fig. 22C A flow chart of an exemplary method for video processing is shown. The method 2220 includes, in step 2222, configuring a bitstream representation of the current video block to apply a reduced secondary transform (RST) to the current video block, wherein syntax elements related to the RST are signaled in the bitstream representation before encoding and decoding residual information.
[0648] The method 2220 includes, in step 2224, performing a conversion between the current video block and a bitstream representation of the current video block based on the configuration.
[0649] In some embodiments, signaling of syntax elements related to RST is based on usage of at least one codec block flag or transform selection mode.
[0650] In some embodiments, the bitstream representation excludes codecs of residual information corresponding to codec groups having all-zero coefficients.
[0651] In some embodiments, the encoding and decoding residual information is based on the application of RST.
[0652] Fig.22D A flow chart of an exemplary method for video processing is shown. The method 2230 includes, in step 2232, configuring a bitstream representation of the current video block to apply a reduced secondary transform (RST) to the current video block, wherein a syntax element related to the RST is signaled in the bitstream representation before a transform skip indication or a multiple transform set (MTS) index.
[0653] The method 2230 includes, in step 2234, performing a conversion between the current video block and a bitstream representation of the current video block based on the configuration.
[0654] In some embodiments, the transform skip indication or MTS index is based on syntax elements related to the RST.
[0655] Fig.22EA flow chart of an exemplary method for video processing is shown. The method 2240 includes, at step 2242, configuring a context model for encoding and decoding an index of a reduced secondary transform (RST) based on characteristics of a current video block.
[0656] The method 2240 includes, in step 2244, performing a conversion between a current video block and a bitstream representation of a video including the current video block based on the configuration.
[0657] In some embodiments, this feature is the explicit or implicit enabling of a Multiple Transform Selection (MTS) process.
[0658] In some embodiments, the feature is enabling a cross-component linear model (CCLM) codec mode in the current video block.
[0659] In some embodiments, the characteristic is the size of the current video block.
[0660] In some embodiments, the characteristic is the partition depth of the partitioning process applied to the current video block. In one example, the partitioning process is a quadtree (QT) partitioning process, a binary tree (BT) partitioning process, or a ternary tree (TT) partitioning process.
[0661] In some embodiments, the characteristic is the color format or color components of the current video block.
[0662] In some embodiments, this feature excludes the index of the intra prediction mode and the multiple transform selection (MTS) process for the current video block.
[0663] Fig.22F A flow chart of an exemplary method for video processing is shown. The method 2250 includes, at step 2252, making a decision regarding selectively applying an inverse downscaled secondary transform (RST) process to the current video block based on characteristics of the current video block.
[0664] The method 2250 includes, in step 2254, performing a conversion between the current video block and a bitstream representation of a video including the current video block based on the decision.
[0665] In some embodiments, the characteristic is a codec block flag of a codec group of the current video block. In one example, inverse RST processing is not applied, and wherein the codec block flag of the top left codec group is zero. In another example, inverse RST processing is not applied, and wherein the codec block flags of the first and second codec groups in the scan order of the current video block are zero.
[0666] In some embodiments, the characteristic is the height (M) or width (N) of the current video block.In one example, no inverse RST processing is applied, and wherein (i) M=8 and N=4, or (ii) M=4 and N=8.
[0667] As further described in the enumeration in the previous section (e.g., items 27 to 29), in some embodiments, a video processing method includes: for conversion between a codec representation of a current video block including a sub-block and the current video block, determining a zeroing region to be applied for conversion of the sub-block based on a codec condition; and performing the conversion based on the determination.
[0668] In this method, the encoding and decoding conditions include the size of the sub-block (eg, see item 27).
[0669] In this approach, the codec conditions include the size of the secondary transform used during the conversion (eg, see item 28).
[0670] In some embodiments, the conversion is performed using a down-sizing transform matrix (eg, see item 29).
[0671] 5 Example Implementations of the Disclosed Technology
[0672] In the exemplary embodiments below, changes applied to JVET-N0193 are highlighted by bold italics. Deleted text is marked with double brackets (eg, [[a]] indicates deletion of the letter "a").
[0673] 5.1 Example #1
[0674] The signaling of the RST index depends on the number of non-zero coefficients within a sub-region of the block rather than within the entire block.
[0675] 7.3.6.11 Residual Codec Syntax
[0676]
[0677]
[0678]
[0679] Alternatively, this condition can be replaced by the following:
[0680]
[0681] 5.2 Example #2
[0682] Depending on the codec block flags of some CGs, RST may not be called.
[0683] 8.7.4. Transformation Process for Scaled Transform Coefficients
[0684] 8.7.4.1 Overview
[0685] The input to this process is:
[0686] – Luma position (xTbY, yTbY), specifies the top left sample of the current luma transform block relative to the top left luma sample of the current picture,
[0687] – The variable nTbW specifies the width of the current transform block,
[0688] – The variable nTbH specifies the height of the current transform block,
[0689] – The variable cIdx specifies the color component of the current block,
[0690] – a (nTbW)×(nTbH) array d[x][y] of scaled transform coefficients, where
[0691] x=0..nTbW-1, y=0..nTbH-1.
[0692] The output of this process is an (nTbW)×(nTbH) array r[x][y] of residual samples, where x=0..nTbW-1 and y=0..nTbH-1.
[0693]
[0694] st_idx[xTbY][yTbY] is not equal to 0, then the following applies:
[0695] 1. Derived variables nStSize, log2StSize, numStX, numStY, and nonZeroSize as follows:
[0696] – If both nTbW and nTbH are greater than or equal to 8, then set log2StSize to 3 and nStOutSize to 48.
[0697] – Otherwise, set log2StSize to 2 and nStOutSize to 16.
[0698] – Set nStSize to (1 < <log2StSize)。
[0699] – If nTbH is equal to 4 and nTbW is greater than 8, then set numStX equal to 2.
[0700] – Otherwise, set numStX equal to 1.
[0701] – If nTbW is equal to 4 and nTbH is greater than 8, then set numStY equal to 2.
[0702] Otherwise, set numStY equal to 1.
[0703] - If nTbW and nTbH are both equal to 4, or nTbW and nTbH are both equal to 8, then set nonZeroSize equal to 8.
[0704] Otherwise, set nonZeroSize equal to 16.
[0705] 2. For xSbIdx=0..numStX-1 and ySbIdx=0..numStY-1, the following applies:
[0706] - The variable array u[x] is derived as follows, where x=0..nonZeroSize-1:
[0707] xC=(xSbIdx<<log2StSize)+DiagScanOrder[log2StSize][log2StSize][x][0]
[0708] yC=(ySbIdx<<log2StSize)+DiagScanOrder[log2StSize][log2StSize][x][1]
[0709] u[x]=d[xC][yC]
[0710] - transform u[x] (where x=0..nonZeroSize-1) into a variable array v[x] (where x=0..nStOutSize-1) by invoking the one-dimensional transform process specified in clause 8.7.4.4 with as input the transform input length nonZeroSize of scaled transform coefficients, the transform output length nStOutSize, the list u[x] (where x=0..nonZeroSize-1), the index stPredModeIntra of the transform set selection, and the transform selection index st_idx[xTbY][yTbY] in the transform set, and output as a list v[x] (where x=0..nStOutSize-1). Set the variable stPredModeIntra to predModeIntra specified in clause 8.4.4.2.1.
[0711] - The array d[(xSbIdx<<log2StSize)+x][(ySbIdx<<log2StSize)+y] is derived as follows, where x=0..nStSize-1, y=0..nStSize-1:
[0712] - 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:
[0713] 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])
[0714] - Otherwise, the following applies:
[0715] 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])
[0716] The variable implicitMtsEnabled is derived as follows:
[0717] - If sps_mts_enabled_flag is equal to 1 and one of the following conditions is true, then implicitMtsEnabled is set equal to 1:
[0718] -IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT
[0719] -cu_Sbt_flag is equal to 1 and Max(nTbW, nTbH) is less than or equal to 32
[0720] -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.
[0721] The variable trTypeHor that specifies the horizontal transform kernel and the variable trTypeVer that specifies the vertical transform kernel are derived as follows:
[0722] -If cIdx is greater than 0, then set trTypeHor and trTypeVer equal to 0.
[0723] Otherwise, if implicitMtsEnabled is equal to 1, then the following applies:
[0724] - If IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT, then trTypeHor and trTypeVer are specified in Table 8-15 according to intraPredMode.
[0725] - Otherwise, if cu_sbt_flag is equal to 1, then trTypeHor and trTypeVer are specified in Table 8-14 according to cu_sbt_horizontal_flag and cu_sbt_pos_flag.
[0726] - Otherwise (sps_explicit_mts_intra_enabled_flag and sps_explicit_mts_inter_enabled_flag are equal to 0), trTypeHor and trTypeVer are derived as follows:
[0727] trTypeHor=(nTbW>=4&&nTbW<=16&&nTbW<=nTbH)? 1:0 (8-1029)
[0728] trTypeVer=(nTbH>=4&&nTbH<=16&&nTbH<=nTbW)? 1:0 (8-1030) - Otherwise, trTypeHor and trTypeVer are defined in Table 8-13 according to tu_mts_idx[xTbY][yTbY].
[0729] The variables nonZeroW and nonZeroH are derived as follows:
[0730] nonZeroW=Min(nTbW, (trTypeHor>0)? 16:32) (8-1031)
[0731] nonZeroH=Min(nTbH, (trTypeVer>0)?16:32) (8-1032)
[0732] The (nTbW)×(nTbH) array r of residual samples is derived as follows:
[0733] 1. When nTbH is greater than 1, each (vertical) column of scaled transform coefficients d[x][y] (where x=0..nonZeroW-1, y=0..nonZeroH-1) is transformed into e[x][y] (where x=0..nonZeroW-1, y=0..nTbH-1) by calling the one-dimensional transform process specified in clause 8.7.4.2 for each column x=0..nonZeroW-1 with the transform block height nTbH, the non-zero height nonZeroH of the scaled transform coefficients, the list d[x][y] (where y=0..nonZeroH-1) and the transform type variable trType set to trTypeVer as input, and the output is a list e[x][y] (where y=0..nTbH-1).
[0734] 2. When both nTbH and nTbW are greater than 1, the intermediate sample value g[x][y] is derived as follows, where:
[0735] x=0..nonZeroW-1, y=0..nTbH-1: g[x][y]=Clip3(CoeffMin, CoeffMax, (e[x][y]+64)>>7) (8-1033)
[0736] When nTbW is greater than 1, each (horizontal) row of the resulting array g[x][y] (where x = 0..nonZeroW-1, y = 0..nTbH-1) is transformed into r[x][y] (where x = 0..nTbW-1, y = 0..nTbH-1) by calling the one-dimensional transform process specified in clause 8.7.4.2 with the width of the transform block nTbW, the non-zero width nonZeroW of the resulting array g[x][y], the list g[x][y] (where x = 0..nonZeroW-1) and the transform type variable trType set to trTypeHor as input, and the output is a list r[x][y] (where x = 0..nTbW-1).
[0737] 5.3 Example #3
[0738] Revised context modeling of RST indexes.
[0739] 5.3.1 Alternative #1
[0740] 9.5.4.2.8 Derivation of ctxInc for syntax element st_idx
[0741] The inputs to this process are the color component index cIdx, the luma or chroma position (x0, y0) that specifies the top left sample of the current luma or chroma codec block relative to the top left sample of the current picture in terms of cIdx, the treeType, the luma intra prediction mode IntraPredModeY[x0][y0] as specified in clause 8.4.2, the syntax element intra_chroma_pred_mode[x0][y0] that specifies the intra prediction mode for chroma samples as specified in clause 7.4.7.5, And the multi-transform selection index tu_mts_idx[x0][y0].
[0742] The output of this process is the variable ctxInc.
[0743] The variable intraModeCtx is derived as follows:
[0744] If cIdx is equal to 0, then intraModeCtx is derived as follows:
[0745] intraModeCtx=(IntraPredModeY[x0][y0]<=1)? 1:0
[0746] Otherwise (cIdx is greater than 0), intraModeCtx is derived as follows:
[0747] intraModeCtx=(intra_chroma_pred_mode[x0][y0]>=4)? 1:0
[0748] The variable mtsCtx is derived as follows:
[0749]
[0750] The variable ctxInc is derived as follows:
[0751] ctxInc=(binIdx<<1)+intraModeCtx+(mtsCtx<<2)
[0752] 5.3.2 Alternative #2
[0753]
[0754] Table 9-15 - ctxInc assignment for syntax elements with context codec bits
[0755]
[0756] [[9.5.4.2.8 Derivation of ctxInc for syntax element st_idx
[0757] The inputs to this process are the color component index cIdx, the luma or chroma position (x0, y0) specifying the top left sample of the current luma or chroma codec block relative to the top left sample of the current picture in terms of cIdx, the tree type treeType, the luma intra prediction mode IntraPredModeY[x0][y0] as specified in clause 8.4.2, the syntax element intra_chroma_pred_mode[x0][y0] specifying the intra prediction mode for the chroma samples as specified in clause 7.4.7.5, and the multiple transform selection index tu_mts_idx[x0][y0].
[0758] The output of this process is the variable ctxInc.
[0759] The variable intraModeCtx is derived as follows:
[0760] If cIdx is equal to 0, then intraModeCtx is derived as follows:
[0761] intraModeCtx=(IntraPredModeY[x0][y0]<=1)? 1:0
[0762] Otherwise (cIdx is greater than 0), intraModeCtx is derived as follows:
[0763] intraModeCtx=(intra_chroma_pred_mode[x0][y0]>=4)? 1:0
[0764] The variable mtsCtx is derived as follows:
[0765] mtsCtx=(tu_mts_idx[x0][y0]==0&&treeType!=SINGLE_TREE)? 1:0
[0766] The variable ctxInc is derived as follows:
[0767] ctxInc=(binIdx<<1)+intraModeCtx+(mtsCtx<<2)]]
[0768] 5.4 Example #4
[0769] Corresponds to bullets 7.c and 7.d.
[0770] 7.3.7.11 Residual Codec Syntax
[0771]
[0772] In an alternative example, the following may apply:
[0773]
[0774]
[0775]
[0776] 5.5 Example #5
[0777] Corresponds to bullet point 19.
[0778] 7.3.6.5 Codec unit syntax
[0779]
[0780]
[0781] 5.6 Example #6
[0782] Corresponds to bullet point 20.
[0783] 7.3.6.5 Codec unit syntax
[0784]
[0785]
[0786] 5.7 Example #7
[0787] Corresponds to bullet point 21.
[0788] 7.3.7.11 Residual Codec Syntax
[0789]
[0790]
[0791]
[0792] 5.8 Example #8
[0793] The RST transform set index is derived from the default mode assigned to non-normal intra prediction modes. New additions are highlighted in bold italics, and deleted parts are marked and highlighted with double brackets (e.g., [[a]] indicates the deletion of the letter "a").
[0794] 8.7.4.1 Overview
[0795] The input to this process is:
[0796] – Luma position (xTbY, yTbY), specifies the top left sample of the current luma transform block relative to the top left luma sample of the current picture,
[0797] – The variable nTbW specifies the width of the current transform block,
[0798] – The variable nTbH specifies the height of the current transform block,
[0799] – The variable cIdx specifies the color component of the current block,
[0800] – A (nTbW)×(nTbH) array d[x][y] of scaled transform coefficients, where x=0..nTbW−1, y=0..nTbH−1.
[0801] The output of this process is an (nTbW)×(nTbH) array r[x][y] of residual samples, where x=0..nTbW-1 and y=0..nTbH-1.
[0802] When lfnst_idx[xTbY][yTbY] is not equal to 0 and both nTbW and nTbH are greater than or equal to 4, the following applies:
[0803] - Derived the variables predModeIntra, nLfnstOutSize, log2LfnstSize, nLfnstSize, and nonZeroSize as follows:
[0804] predModeIntra=(cIdx==0)? IntraPredModeY[xTbY][yTbY]: IntraPredModeC[xTbY][yTbY] (8-965)
[0805] nLfnstOutSize=(nTbW>=8&&nTbH>=8)? 48:16 (8-966)
[0806] log2LfnstSize=(nTbW>=8&&nTbH>=8)? 3:2 (8-967)
[0807] nLfnstSize=1<<log2LfnstSize (8-968)
[0808] nonZeroSize=((nTbW==4&&nTbH==4)||
[0809] (nTbW==8&&nTbH==8))? 8:16 (8-969)
[0810] - When intra_mip_flag[xTbComp][yTbComp] is equal to 1 and cIdx is equal to 0, set predModeIntra equal to INTRA_PLANAR.
[0811] -When predModeIntra is equal to INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM, predModeIntra: [[Set equal to IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2]. ]]
[0812]
[0813] - Invoke the wide angle intra prediction mode mapping process as specified in clause 8.4.5.2.6 with predModeIntra, nTbW, nTbH and cIdx as input and the modified predModeIntra as output.
[0814] Alternatively, the following applies:
[0815] -When predModeIntra is equal to INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM, predModeIntra: [[Set equal to IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2]. ]]
[0816]
[0817]
[0818] 5.9 Example #9
[0819] Depending on the color format, the RST transform set index is derived from the default mode assigned to non-normal intra prediction modes. New additions are highlighted in bold italics, and deleted parts are marked and highlighted with double brackets (e.g., [[a]] indicates the deletion of the letter "a").
[0820] 8.7.4.2 Overview
[0821] The input to this process is:
[0822] – Luma position (xTbY, yTbY), specifies the top left sample of the current luma transform block relative to the top left luma sample of the current picture,
[0823] – The variable nTbW specifies the width of the current transform block,
[0824] – The variable nTbH specifies the height of the current transform block,
[0825] – The variable cIdx specifies the color component of the current block,
[0826] – A (nTbW)×(nTbH) array d[x][y] of scaled transform coefficients, where x=0..nTbW−1, y=0..nTbH−1.
[0827] The output of this process is an (nTbW)×(nTbH) array r[x][y] of residual samples, where x=0..nTbW-1 and y=0..nTbH-1.
[0828] When lfnst_idx[xTbY][yTbY] is not equal to 0 and both nTbW and nTbH are greater than or equal to 4, the following applies:
[0829] - Derived the variables predModeIntra, nLfnstOutSize, log2LfnstSize, nLfnstSize, and nonZeroSize as follows:
[0830] predModeIntra=(cIdx==0)? IntraPredModeY[xTbY][yTbY]: IntraPredModeC[xTbY][yTbY] (8-965)
[0831] nLfnstOutSize=(nTbW>=8&&nTbH>=8)? 48:16 (8-966)
[0832] log2LfnstSize=(nTbW>=8&&nTbH>=8)? 3:2 (8-967)
[0833] nLfnstSize=1<<log2LfnstSize (8-968)
[0834] nonZeroSize=((nTbW==4&&nTbH==4)||(nTbW==8&&nTbH==8))? 8:16(8-969)
[0835] - When intra_mip_flag[xTbComp][yTbComp] is equal to 1 and cIdx is equal to 0, set predModeIntra equal to INTRA_PLANAR.
[0836] -When predModeIntra is equal to INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM, predModeIntra: [[Set equal to IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2]. ]]
[0837]
[0838] - Invoke the wide angle intra prediction mode mapping process as specified in clause 8.4.5.2.6 with predModeIntra, nTbW, nTbH and cIdx as input and the modified predModeIntra as output.
[0839] Table 8-3 – Specification of the 4:2:2 mapping process from chroma intra prediction mode X to mode Y when chroma_format_idc equals 2
[0840]
[0841] Alternatively, the following applies:
[0842] – When predModeIntra is equal to INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM, predModeIntra is derived as follows: [[Set equal to IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2]. ]]
[0843]
[0844] 5.10 Example #10
[0845] In this embodiment, it is checked whether the central luminance sample of the corresponding luminance area of the current chrominance block is encoded and decoded in the MIP mode, the IBC mode, or the palette mode; and the setting of DM is also based on the central luminance sample.
[0846] New additions are highlighted in bold italics, and deleted parts are marked and highlighted using double brackets (eg, [[a]] indicates a deletion of the letter "a").
[0847] 8.4.3 Derivation of Chroma Intra Prediction Mode
[0848] The input to this process is:
[0849] – Luma position (xCb, yCb), specifies the top left sample of the current chroma codec block relative to the top left luma sample of the current picture,
[0850] – The variable cbWidth specifies the width of the current codec block in luminance samples.
[0851] – The variable cbHeight specifies the height of the current codec block in luma samples.
[0852] In this process, the chrominance intra prediction mode IntraPredModeC[xCb][yCb] is derived.
[0853] The corresponding luma intra prediction mode lumaIntraPredMode is derived as follows:
[0854] – If intra_mip_flag[xCb+ ][yCb+ ] is equal to 1, then lumaIntraPredMode is set to INTRA_PLANAR.
[0855] – Otherwise, if CuPredMode[0][xCb+ ][yCb+ ] is equal to MODE_IBC or MODE_PLT, then set lumaIntraPredMode to INTRA_DC.
[0856] – Otherwise, set lumaIntraPredMode equal to IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2].
[0857] The chroma intra prediction mode IntraPredModeC[xCb][yCb] is derived using cclm_mode_mode_flag, cclm_mode_idx, intra_chroma_pred_mode and lumaIntraPredMode as specified in Table 8-2.
[0858] Table 8-2 - Specification of IntraPredModeC[xCb][yCb] according to cclm_mode_flag, cclm_mode_idx, intra_chroma_pred_mode and lumaIntraPredMode
[0859]
[0860] When chroma_format_idc is equal to 2, chroma intra prediction mode Y is derived using chroma intra prediction mode X in Table 8-2 as specified in Table 8-3, and chroma intra prediction mode X is then set equal to chroma intra prediction mode Y. 5.11
[0862] Use MIP or IBC or palette mode encoding and decoding; and DM is set to embodiment #11
[0863] In this embodiment, it is checked whether the upper left luma sample of the corresponding luma area of the current chroma block is also based on the central luma sample.
[0864] New additions are highlighted in bold italics, and deleted parts are marked and highlighted with double brackets (eg, [[a]] indicates a deletion of the letter "a").
[0865] 8.4.3 Derivation of Chroma Intra Prediction Mode
[0866] The input to this process is:
[0867] – Luma position (xCb, yCb), specifies the top left sample of the current chroma codec block relative to the top left luma sample of the current picture,
[0868] – The variable cbWidth specifies the width of the current codec block in luminance samples.
[0869] – The variable cbHeight specifies the height of the current codec block in luma samples.
[0870] In this process, the chrominance intra prediction mode IntraPredModeC[xCb][yCb] is derived.
[0871] The corresponding luma intra prediction mode lumaIntraPredMode is derived as follows:
[0872] – If intra_mip_flag[xCb][yCb] is equal to 1, then lumaIntraPredMode is set equal to INTRA_PLANAR.
[0873] – Otherwise, if CuPredMode[0][xCb][yCb] is equal to MODE_IBC or MODE_PLT, then set lumaIntraPredMode equal to INTRA_DC.
[0874] – Otherwise, set lumaIntraPredMode equal to IntraPredModeY[xCb[[+cbWidth / 2]]][yCb[[+cbHeight / 2]]].
[0875] The chroma intra prediction mode IntraPredModeC[xCb][yCb] is derived using cclm_mode_mode_flag, cclm_mode_idx, intra_chroma_pred_mode and lumaIntraPredMode as specified in Table 8-2.
[0876] Table 8-2 - Specification of IntraPredModeC[xCb][yCb] according to cclm_mode_flag, cclm_mode_idx, intra_chroma_pred_mode and lumaIntraPredMode
[0877]
[0878] When chroma_format_idc is equal to 2, chroma intra prediction mode Y is derived using chroma intra prediction mode X in Table 8-2 as specified in Table 8-3, and chroma intra prediction mode X is then set equal to chroma intra prediction mode Y.
[0879] Example #12
[0880] This embodiment shows an example of context modeling for RST (aka LFNST) indexing. Double brackets are used to mark and highlight deleted parts (eg, [[a]] indicates deletion of the letter "a").
[0881] Table 9-82 - ctxInc assignment for syntax elements with context codec bits
[0882]
[0883] Alternatively, the following may apply:
[0884] lfnst_idx[][] 0 bypass na na na na
[0885] Example #13
[0886] Revised zeroing range for RST 4×4. New additions to JVET-O2001 are highlighted in bold italics, and deleted portions are marked and highlighted with double brackets (eg, [[a]] indicates a deletion of the letter "a").
[0887] 7.3.8.11 Residual Codec Syntax
[0888]
[0889]
[0890] Alternatively, the following may apply:
[0891]
[0892] 8.7.4.1 Overview
[0893] The input to this process is:
[0894] – Luma position (xTbY, yTbY), specifies the top left sample of the current luma transform block relative to the top left luma sample of the current picture,
[0895] – The variable nTbW specifies the width of the current transform block,
[0896] – The variable nTbH specifies the height of the current transform block,
[0897] – The variable cIdx specifies the color component of the current block,
[0898] – A (nTbW)×(nTbH) array d[x][y] of scaled transform coefficients, where x=0..nTbW−1, y=0..nTbH−1.
[0899] The output of this process is an (nTbW)×(nTbH) array r[x][y] of residual samples, where x=0..nTbW-1 and y=0..nTbH-1.
[0900] When lfnst_idx[xTbY][yTbY] is not equal to 0 and both nTbW and nTbH are greater than or equal to 4, the following applies:
[0901] - Derived the variables predModeIntra, nLfnstOutSize, log2LfnstSize, nLfnstSize, and nonZeroSize as follows:
[0902] predModeIntra=(cIdx==0)? IntraPredModeY[xTbY][yTbY]: IntraPredModeC[xTbY][yTbY] (8-965)
[0903] nLfnstOutSize=(nTbW>=8&&nTbH>=8)? 48:16 (8-966)
[0904] log2LfnstSize=(nTbW>=8&&nTbH>=8)? 3:2 (8-967)
[0905] nLfnstSize=1<<log2LfnstSize (8-968)
[0906] - When intra_mip_flag[xTbComp][yTbComp] is equal to 1 and cIdx is equal to 0, set predModeIntra equal to INTRA_PLANAR.
[0907] Example #14
[0908] The dimensions of the RST 4×4 transformation matrix are reduced by half. New additions to JVET-O2001 are highlighted in bold italics, and deleted parts are marked and highlighted with double brackets (eg, [[a]] indicates the deletion of the letter "a").
[0909] 8.7.4.3 Derivation process of low-frequency inseparable transformation matrix
[0910] The input to this process is:
[0911] - variable nTrS, specifies the transform output length,
[0912] - the variable predModeIntra specifies the intra prediction mode selected for the LFNST set,
[0913] - A variable lfnstIdx specifies the LFNST index selected for the transform in the selected LFNST set.
[0914] The output of this process is the transformation matrix lowFreqTransMatrix.
[0915] The variable lfnstTrSetIdx is defined in Table 8-16 according to predModeIntra.
[0916] Table 8-16 - Specification of lfnstTrSetIdx
[0917] predModeIntra lfnstTrSetIdx predModeIntra<0 1 0<=predModeIntra<=1 0 2<=predModeIntra<=12 1 13<=predModeIntra<=23 2 24<=predModeIntra<=44 3 45<=predModeIntra<=55 2 56<=predModeIntra<=80 1
[0918] The transformation matrix lowFreqTransMatrix is derived based on nTrS, lfnstTrSetIdx and lfnstIdx as follows:
[0919] – If nTrS is equal to 16, lfnstTrSetIdx is equal to 0, and lfnstIdx is equal to 1, then the following applies:
[0920]
[0921] Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 0, and lfnstIdx is equal to 2, then the following applies:
[0922]
[0923] Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 1, and lfnstIdx is equal to 1, then the following applies:
[0924]
[0925] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 1, and lfnstIdx is equal to 2, then the following applies:
[0926]
[0927] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 2, and lfnstIdx is equal to 1, then the following applies:
[0928]
[0929] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 2, and lfnstIdx is equal to 2, then the following applies:
[0930]
[0931] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 3, and lfnstIdx is equal to 1, then the following applies:
[0932]
[0933] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 3, and lfnstIdx is equal to 2, then the following applies:
[0934]
[0935] – Otherwise, if nTrS is equal to 48, lfnstTrSetIdx is equal to 0, and lfnstIdx is equal to 1, then the following applies:
[0936] Example #13
[0937] The zero range is unified for all blocks. New additions to JVET-O2001 are highlighted in bold italics, and deleted parts are marked and highlighted with double brackets (eg, [[a]] indicates the deletion of the letter "a").
[0938] 7.3.8.12 Residual Codec Syntax
[0939]
[0940] 8.7.4.2 Overview
[0941] The input to this process is:
[0942] – Luma position (xTbY, yTbY), specifies the upper left sample point of the current luminance transform block relative to the upper left luminance sample point of the current picture,
[0943] – The variable nTbW specifies the width of the current transform block,
[0944] – The variable nTbH specifies the height of the current transform block,
[0945] – The variable cIdx specifies the color component of the current block,
[0946] – A (nTbW)×(nTbH) array d[x][y] of scaled transform coefficients, where x=0..nTbW−1, y=0..nTbH−1.
[0947] The output of this process is an (nTbW)×(nTbH) array r[x][y] of residual samples, where x=0..nTbW-1 and y=0..nTbH-1.
[0948] When lfnst_idx[xTbY][yTbY] is not equal to 0 and both nTbW and nTbH are greater than or equal to 4, the following applies:
[0949] - Derived the variables predModeIntra, nLfnstOutSize, log2LfnstSize, nLfnstSize, and nonZeroSize as follows:
[0950] predModeIntra=(cIdx==0)? IntraPredModeY[xTbY][yTbY]: IntraPredModeC[xTbY][yTbY] (8-965)
[0951] nLfnstOutSize=(nTbW>=8&&nTbH>=8)? 48:16 (8-966)
[0952] log2LfnstSize=(nTbW>=8&&nTbH>=8)? 3:2 (8-967)
[0953] nLfnstSize=1<<log2LfnstSize (8-968)
[0954] nonZeroSize[[=((nTbW==4&&nTbH==4)||(nTbW==8&&nTbH==8))? ]]8[[:16]] (8-969)
[0955] When intra_mip_flag[xTbComp][yTbComp] is equal to 1 and cIdx is equal to 0, predModeIntra is set equal to INTRA_PLANAR.
[0956] Example #14
[0957] This embodiment gives an example of a 16×32 residual pattern for an M×N (M>=8, N>=8) block decoded with RST (aka LFNST). Alternatively, this embodiment gives an example for a block decoded with RST (aka LFNST), and nLfnstSize is equal to 8.
[0958] New additions to JVET-O2001 are highlighted in bold italics, and deleted parts are marked and highlighted using double brackets (eg, [[a]] indicates a deletion of the letter "a").
[0959] Transformation process for scaled transform coefficients
[0960] 8.7.4.1 Overview
[0961] The input to this process is:
[0962] - luma position (xTbY, yTbY), specifies the top left sample of the current luma transform block relative to the top left luma sample of the current picture,
[0963] - variable nTbW, specifies the width of the current transform block,
[0964] - variable nTbH, specifies the height of the current transform block,
[0965] - variable cIdx, specifies the color component of the current block,
[0966] - A (nTbW) x (nTbH) array d[x][y] of scaled transform coefficients, where x = 0..nTbW-1, y = 0..nTbH-1.
[0967] The output of this process is an (nTbW)×(nTbH) array r[x][y] of residual samples, where x=0..nTbW-1 and y=0..nTbH-1.
[0968] When lfnst_idx[xTbY][yTbY] is not equal to 0 and both nTbW and nTbH are greater than or equal to 4, the following applies:
[0969] - Derived the variables predModeIntra, nLfnstOutSize, log2LfnstSize, nLfnstSize, and nonZeroSize as follows:
[0970] predModeIntra=(cIdx==0)? IntraPredModeY[xTbY][yTbY]: IntraPredModeC[xTbY][yTbY] (8-965)
[0971]
[0972] log2LfnstSize=(nTbW>=8&&nTbH>=8)? 3:2 (8-967)
[0973] nLfnstSize=1<<log2LfnstSize (8-968)
[0974] nonZeroSize=((nTbW==4&&nTbH==4)||(nTbW==8&&nTbH==8))? 8:16(8-969)
[0975] - When intra_mip_flag[xTbComp][yTbComp] is equal to 1 and cIdx is equal to 0, set predModeIntra equal to INTRA_PLANAR.
[0976] - When predModeIntra is equal to INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM, set predModeIntra equal to IntraPredModeY[xTbY+nTbW / 2][yTbY+nTbH / 2].
[0977] - Invoke the wide angle intra prediction mode mapping process as specified in clause 8.4.5.2.6 with predModeIntra, nTbW, nTbH and cIdx as input and the modified predModeIntra as output.
[0978] - The values of the list u[x] are derived as follows, where x=0..nonZeroSize-1:
[0979] xC=DiagScanOrder[2][2][x][0] (8-970)
[0980] yC=DiagScanOrder[2][2][x][1] (8-971)
[0981] u[x]=d[xC][yC] (8-972)
[0982] - The one-dimensional low-frequency inseparable transform process specified in clause 8.7.4.2 is called with as input the input length nonZeroSize of scaled transform coefficients, the transform output length nTrS set equal to nLfnstOutSize, the list u[x] of scaled non-zero transform coefficients (where x=0..nonZeroSize-1), the intra prediction mode predModeIntra for LFNST set selection, and the LFNST index lfnst_idx[xTbY][yTbY] for transform selection in the selected LFNST set, and with as output the list v[x] (where x=0..nLfnstOutSize-1).
[0983] - The array d[x][y] is derived as follows, where x=0..nLfnstSize-1, y=0..nLfnstSize-1:
[0984] -
[0985] - If predModeIntra is less than or equal to 34, then the following applies:
[0986]
[0987] - Otherwise, the following applies:
[0988]
[0989]
[0990] The variable implicitMtsEnabled is derived as follows:
[0991] - If sps_mts_enabled_flag is equal to 1 and one of the following conditions is true, then implicitMtsEnabled is set equal to 1:
[0992] -IntraSubPartitionsSplitType is not equal to ISP_NO_SPLIT
[0993] -cu_sbt_flag is equal to 1 and Max(nTbW, nTbH) is less than or equal to 32
[0994] -sps_explicit_mts_intra_enabled_flag is equal to 0 and CuPredMode[0][xTbY][yTbY] is equal to MODE_INTRA and lfnst_idx[x0][y0] is equal to 0 and intra_mip_flag[x0][y0] is equal to 0
[0995] - Otherwise, set implicitMtsEnabled equal to 0.
[0996] …
[0997] 8.7.4.3 Derivation process of low-frequency inseparable transformation matrix
[0998] The input to this process is:
[0999] - variable nTrS, specifies the transform output length,
[1000] - the variable predModeIntra specifies the intra prediction mode selected for the LFNST set,
[1001] - A variable lfnstIdx specifies the LFNST index selected for the transform in the selected LFNST set.
[1002] The output of this process is the transformation matrix lowFreqTransMatrix.
[1003] The variable lfnstTrSetIdx is defined in Table 8-16 according to predModeIntra.
[1004] Table 8-16 - Specification of lfnstTrSetIdx
[1005] predModeIntra lfnstTrSetIdx predModeIntra<0 1 0<=predModeIntra<=1 0 2<=predModeIntra<=12 1 13<=predModeIntra<=23 2 24<=predModeIntra<=44 3 45<=predModeIntra<=55 2 56<=predModeIntra<=80 1
[1006] The transformation matrix lowFreqTransMatrix is derived based on nTrS, lfnstTrSetIdx and lfnstIdx as follows:
[1007] - If nTrS is equal to 16, lfnstTrSetIdx is equal to 0, and lfnstIdx is equal to 1, then the following applies:
[1008]
[1009] - Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 0, and lfnstIdx is equal to 2, then the following applies:
[1010]
[1011] - Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 1, and lfnstIdx is equal to 1, then the following applies:
[1012]
[1013] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 1, and lfnstIdx is equal to 2, then the following applies:
[1014]
[1015] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 2 and lfnstIdx is equal to 1, then the following applies:
[1016]
[1017] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 2 and lfnstIdx is equal to 2, then the following applies:
[1018]
[1019] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 3, and lfnstIdx is equal to 1, then the following applies:
[1020]
[1021] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 3 and lfnstIdx is equal to 2, then the following applies:
[1022]
[1023] – Otherwise, if nTrS is equal to [
[48] ] lfnstTrSetIdx is equal to 0 and lfnstIdx is equal to 1, then the following applies:
[1024] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where, n=0..15
[1025]
[1026] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol16to31[m-[
[16] ]12][n], where, n=0..15
[1027]
[1028] in, n=0..15
[1029]
[1030] – Otherwise, if nTrS is equal to [
[48] ] lfnstTrSetIdx is equal to 0 and lfnstIdx is equal to 2, then the following applies:
[1031] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where, n=0..15
[1032]
[1033] in, n=0..15
[1034]
[1035] in, n=0..15
[1036]
[1037] – Otherwise, if nTrS is equal to lfnstTrSetIdx is equal to 1 and lfnstIdx is equal to 1, then the following applies:
[1038] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where, n=0..15
[1039]
[1040] in, n=0..15
[1041]
[1042] in, n=0..15
[1043]
[1044] – Otherwise, if nTrS is equal to [
[48] ] lfnstTrSetIdx is equal to 1 and lfnstIdx is equal to 2, then the following applies:
[1045] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where, n=0..15
[1046]
[1047] in, n=0..15
[1048]
[1049] in, n=0..15
[1050]
[1051] – Otherwise, if nTrS is equal to [
[48] ] lfnstTrSetIdx is equal to 2 and lfnstIdx is equal to 1, then the following applies:
[1052] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where, n=0..15
[1053]
[1054] in, n=0..15
[1055]
[1056] in, n=0..15
[1057]
[1058] – Otherwise, if nTrS is equal to [
[48] ] lfnstTrSetIdx is equal to 2 and lfnstIdx is equal to 2, then the following applies:
[1059] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where, n=0..15
[1060]
[1061] in, n=0..15
[1062]
[1063] in, n=0..15
[1064]
[1065] – Otherwise, if nTrS is equal to [
[48] ] lfnstTrSetIdx is equal to 3 and lfnstIdx is equal to 1, then the following applies:
[1066] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where, n=0..15
[1067]
[1068] in, n=0..15
[1069]
[1070] in, n=0..15
[1071]
[1072] – Otherwise, if nTrS is equal to [
[48] ] lfnstTrSetIdx is equal to 3 and lfnstIdx is equal to 2, then the following applies:
[1073] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where, n=0..15
[1074]
[1075] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol16to31[m-[
[16] ]12][n], where m=[
[16] ]12..[
[31] ]23, n=0..15
[1076]
[1077] in, n=0..15
[1078]
[1079] Example #15
[1080] This embodiment gives examples for a 16x16 RST (aka LFNST) matrix and a 16x48 RST matrix. New additions to JVET-P2001 are highlighted in bold italics, and deleted text is marked with double brackets (eg, [[a]] indicates a deletion of the letter "a").
[1081] Derivation process of low-frequency inseparable transformation matrix
[1082] The input to this process is:
[1083] – variable nTrS, specifies the transform output length,
[1084] – The variable predModeIntra specifies the intra prediction mode used for LFNST set selection.
[1085] The output of this process is the transformation matrix lowFreqTransMatrix.
[1086] The variable lfnstTrSetIdx is defined in Table 39 according to predModeIntra.
[1087] Table 39 - Specification of lfnstTrSetIdx
[1088] –predModeIntra –lfnstTrSetIdx –predModeIntra<0 –1 –0<=predModeIntra<=1 –0 –2<=predModeIntra<=12 –1 –13<=predModeIntra<=23 –2 –24<=predModeIntra<=44 –3 –45<=predModeIntra<=55 –2 –56<=predModeIntra<=80 –1
[1089] The transformation matrix lowFreqTransMatrix is derived based on nTrS, lfnstTrSetIdx and lfnst_idx as follows:
[1090] – If nTrS is equal to 16, lfnstTrSetIdx is equal to 0 and lfnst_idx is equal to 1, then
[1091] The following applies:
[1092]
[1093] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 0 and lfnst_idx is equal to 2, then the following applies:
[1094]
[1095] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 1 and lfnst_idx is equal to 1, then the following applies:
[1096]
[1097] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 1 and lfnst_idx is equal to 2, then the following applies:
[1098]
[1099] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 2 and lfnst_idx is equal to 1, then the following applies:
[1100]
[1101] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 2 and lfnst_idx is equal to 2, then the following applies:
[1102]
[1103] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 3 and lfnst_idx is equal to 1, then the following applies:
[1104]
[1105] – Otherwise, if nTrS is equal to 16, lfnstTrSetIdx is equal to 3 and lfnst_idx is equal to 2, then the following applies:
[1106]
[1107] – Otherwise, if nTrS is equal to 48, lfnstTrSetIdx is equal to 0 and lfnst_idx is equal to 1, then the following applies:
[1108] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where m=0..15, n=0..15
[1109]
[1110]
[1111] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol16to31[m-16][n], where m=16..31, n=0..15
[1112]
[1113] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol32to47[m-32][n], where m=32..47, n=0..15
[1114]
[1115]
[1116] – Otherwise, if nTrS is equal to 48, lfnstTrSetIdx is equal to 0 and lfnst_idx is equal to 2, then the following applies:
[1117] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where m=0..15, n=0..15
[1118]
[1119]
[1120] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol16to31[m-16][n], where m=16..31, n=0..15
[1121]
[1122] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol32to47[m-32][n], where m=32..47, n=0..15
[1123]
[1124]
[1125] – Otherwise, if nTrS is equal to 48, lfnstTrSetIdx is equal to 1 and lfnst_idx is equal to 1, then the following applies:
[1126] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where m=0..15, n=0..15
[1127]
[1128]
[1129] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol16to31[m-16][n], where m=16..31, n=0..15
[1130]
[1131] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol32to47[m-32][n], where m=32..47, n=0..15
[1132]
[1133]
[1134] – Otherwise, if nTrS is equal to 48, lfnstTrSetIdx is equal to 1 and lfnst_idx is equal to 2, then the following applies:
[1135] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where m=0..15, n=0..15
[1136]
[1137]
[1138] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol16to31[m-16][n], where m=16..31, n=0..15
[1139]
[1140] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol32to47[m-32][n], where m=32..47, n=0..15
[1141]
[1142]
[1143] – Otherwise, if nTrS is equal to 48, lfnstTrSetIdx is equal to 2 and lfnst_idx is equal to 1, then the following applies:
[1144] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where m=0..15, n=0..15
[1145]
[1146]
[1147] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol16to31[m-16][n], where m=16..31, n=0..15
[1148]
[1149] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol32to47[m-32][n], where m=32..47, n=0..15
[1150]
[1151]
[1152] – Otherwise, if nTrS is equal to 48, lfnstTrSetIdx is equal to 2 and lfnst_idx is equal to 2, then the following applies:
[1153] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where m=0..15, n=0..15
[1154]
[1155]
[1156] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol16to31[m-16][n], where m=16..31, n=0..15
[1157]
[1158] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol32to47[m-32][n], where m=32..47, n=0..15
[1159]
[1160] – Otherwise, if nTrS is equal to 48, lfnstTrSetIdx is equal to 3 and lfnst_idx is equal to 1, then the following applies:
[1161] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where m=0..15, n=0..15
[1162]
[1163]
[1164] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol16to31[m-16][n], where m=16..31, n=0..15
[1165]
[1166] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol32to47[m-32][n], where m=32..47, n=0..15
[1167]
[1168] – Otherwise, if nTrS is equal to 48, lfnstTrSetIdx is equal to 3, and lfnst_idx is equal to 2, then the following applies:
[1169] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol0to15[m][n], where m=0..15, n=0..15
[1170]
[1171]
[1172] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol16to31[m-16][n], where m=16..31, n=0..15
[1173]
[1174]
[1175] lowFreqTransMatrix[m][n]=lowFreqTransMatrixCol32to47[m-32][n], where m=32..47, n=0..15
[1177]
[1178] Fig.23A 2300. The device 2310 may be used to implement one or more of the methods described herein. The device 2310 may be embodied in a smart phone, a tablet computer, a computer, an Internet of Things (IoT) receiver, etc. The device 2310 may include one or more processors 2312, one or more memories 2304, and video processing hardware 2316. The (multiple) processors 2312 may be configured to implement one or more methods described herein (including, but not limited to, methods 2210, 2220, 2230, 2240, and 2250). The (multiple) memories 2304 may be used to store data and code for implementing the methods and techniques described herein. The video processing hardware 2306 may be used to implement some of the techniques described in this document in hardware circuits. In some embodiments, the hardware 2306 may be at least partially within the processor 2312 (e.g., a graphics coprocessor).
[1179] Fig. 23B is another example of a block diagram of a video processing system in which the disclosed technology may be implemented. Fig. 23Bis a block diagram illustrating an example video processing system 2320 in which various techniques disclosed herein may be implemented. Various implementations may include some or all of the components of system 2320. System 2320 may include an input 2322 for receiving video content. The video content may be received in a raw or uncompressed format, such as 8-bit or 10-bit multi-component pixel values, or may have a compressed or encoded format. Input 2322 may represent a network interface, a peripheral bus interface, or a storage interface. Examples of network interfaces include wired interfaces such as Ethernet, a passive optical network (PON), and the like, and wireless interfaces such as Wi-Fi or cellular interfaces.
[1180] System 2320 may include a codec component 2324 that may implement various codecs or encoding methods described in this document. Codec component 2324 may reduce the average bit rate of the video from input 2322 to the output of codec component 2324 to generate a codec representation of the video. Therefore, codec technology is sometimes referred to as video compression or video transcoding technology. The output of codec component 2324 may be stored or may be transmitted by a connected communication, as represented by component 2326. The storage or communication bitstream (or coded) representation of the video received at input 2322 may be used by component 2328 to generate pixel values or to send to a displayable video of display interface 2340. The process of generating a user-viewable video from a bitstream representation is sometimes referred to as video decompression. In addition, although some video processing operations are referred to as "codec" operations or tools, it should be understood that codec tools or operations are used at encoders, and the corresponding decoding tools or operations that reverse the codec results will be performed by decoders.
[1181] Examples of peripheral bus interfaces or display interfaces may include Universal Serial Bus (USB) or High Definition Multimedia Interface (HDMI) or Displayport, etc. Examples of storage interfaces include SATA (Serial Advanced Technology Attachment), PCI, IDE interfaces, etc. The technology 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.
[1182] Some embodiments of the disclosed technology include making a decision or determination to enable a video processing tool or mode. In one example, when a video processing tool or mode is enabled, the encoder will use or implement the tool or mode in the processing of a video block, but will 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 a decision or decision, the conversion from a video block to a bitstream representation of a video will use the video processing tool or mode. In another example, when a video processing tool or mode is enabled, a 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 the bitstream representation of a video to a video block will be performed using a video processing tool or mode enabled based on a decision or decision.
[1183] Some embodiments of the disclosed technology include making a decision or determination to disable a video processing tool or mode. In one example, when a video processing tool or mode is disabled, the encoder will not use the tool or mode in converting video blocks to a bitstream representation of the video. In another example, when a video processing tool or mode is disabled, the decoder will process the bitstream knowing that no modifications have been made to the bitstream using the video processing tool or mode that was disabled based on the decision or determination.
[1184] As used herein, 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 a video to a corresponding bitstream representation, or vice versa. The bitstream representation of the current video block may correspond, for example, to bits that are concatenated or interspersed in different places within the bitstream, as defined by the syntax. For example, a macroblock may be encoded in accordance with a transformed and encoded error residual value and also using bits in a header and other fields in the bitstream.
[1185] In some embodiments, the Fig.23A Or a device implemented on the hardware platform described in 23B to implement these video encoding and decoding methods.
[1186] Various techniques and embodiments may be described using the following clause-based format: The first set of clauses describes certain features and aspects of the disclosed techniques in the previous sections.
[1187] 1. A method for video processing, comprising: selecting a transform set or a transform matrix based on characteristics of a current video block to apply a reduced secondary transform to the current video block; and applying the selected transform set or transform matrix to a portion of the current video block as part of a conversion between the current video block and a bitstream representation of a video including the current video block.
[1188] 2. The method of clause 1, wherein the portion of the current video block is an upper right sub-region, a lower right sub-region, a lower left sub-region, or a center sub-region of the current video block.
[1189] 3. A method according to clause 1 or 2, wherein the characteristic of the current video block is an intra-frame prediction mode or a primary transform matrix of the current video block.
[1190] 4. The method of clause 1, wherein the characteristic is a color component of the current video block.
[1191] 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.
[1192] 6. The method of clause 1, wherein the characteristic is an intra prediction mode or an intra coding method of the current video block.
[1193] 7. The method of clause 6, wherein the intra prediction method comprises a multiple reference line (MRL) based prediction method or a matrix based intra prediction method.
[1194] 8. The method of clause 6, wherein a first transform set is selected when the current video block is a cross-component linear model (CCLM) codec block, and wherein a second transform set different from the first transform set is selected when the current video block is a non-CCLM codec block.
[1195] 9. The method according to clause 6, wherein a first transform set is selected when the current video block is encoded using a joint chroma residual codec method, and wherein a second transform set different from the first transform set is selected when the current video block is not encoded using the joint chroma residual codec method.
[1196] 10. The method of clause 1, wherein the characteristic is a major transform of the current video block.
[1197] 11. A method for video processing, comprising: making a decision regarding selectively including signaling notification of side information for application of a reduced secondary transform (RST) into a bitstream representation of the current video block based on one or more coefficients associated with a current video block; and performing a conversion between the current video block and a bitstream representation of a video including the current video block based on the decision.
[1198] 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.
[1199] 13. The method of clause 11, wherein the one or more coefficients include a plurality of coefficients that are within a partial region of the current video block.
[1200] 14. The method of clause 13, wherein the partial region comprises one or more codec groups to which RST can be applied.
[1201] 15. The method of clause 13, wherein the partial region comprises the first M codec groups or the last M codec groups in a scanning order of the current video block.
[1202] 16. The method of clause 13, wherein the partial region comprises the first M codec groups or the last M codec groups in a reverse scan order of the current video block.
[1203] 17. The method of clause 13, wherein making the decision is further based on an energy of one or more non-zero coefficients of the plurality of coefficients.
[1204] 18. A method for video processing, comprising: configuring a bitstream representation of the current video block in order to apply a reduced secondary transform (RST) to a current video block, wherein syntax elements related to the RST are signaled in the bitstream representation before encoding and decoding residual information; and performing conversion between the current video block and the bitstream representation of the current video block based on the configuration.
[1205] 19. A method according to clause 18, wherein signalling of syntax elements related to the RST is based on usage of at least one codec block flag or a transform selection mode.
[1206] 20. A method as recited in clause 18, wherein the bitstream representation excludes coding of residual information corresponding to codec groups having all-zero coefficients.
[1207] 21. A method according to clause 18, wherein encoding and decoding of the residual information is based on application of RST.
[1208] 22. A method for video processing, comprising: configuring a bitstream representation of a current video block to apply a reduced secondary transform (RST) to a current video block, wherein syntax elements related to the RST are signaled in the bitstream representation before a transform skip indication or a multiple transform set (MTS) index; and performing conversion between the current video block and the bitstream representation of the current video block based on the configuration.
[1209] 23. A method according to clause 22, wherein the transform skip indication or the MTS index is based on a syntax element related to the RST.
[1210] 24. A method for video processing, comprising: configuring a context model as an index of a codec reduced secondary transform (RST) based on characteristics of a current video block; and performing conversion between the current video block and a bitstream representation of a video including the current video block based on the configuration.
[1211] 25. A method according to clause 24, wherein the feature is the explicit or implicit enabling of multiple transform selection (MTS) processing.
[1212] 26. The method of clause 24, wherein the feature is enabling a cross-component linear model (CCLM) codec mode in the current video block.
[1213] 27. The method of clause 24, wherein the characteristic is the size of the current video block.
[1214] 28. The method of clause 24, wherein the characteristic is a partitioning depth of a partitioning process applied to the current video block.
[1215] 29. The method of clause 28, wherein the segmentation process is a quadtree (QT) segmentation process, a binary tree (BT) segmentation process, or a ternary tree (TT) segmentation process.
[1216] 30. The method of clause 24, wherein the characteristic is a color format or a color component of the current video block.
[1217] 31. The method of clause 24, wherein the characteristic excludes an intra prediction mode and an index of a multiple transform selection (MTS) process for the current video block.
[1218] 32. A method for video processing, comprising: making a decision regarding selectively applying an inverse reduced secondary transform (RST) process to a current video block based on characteristics of a current video block; and performing a conversion between the current video block and a bitstream representation of a video including the current video block based on the decision.
[1219] 33. The method of clause 32, wherein the characteristic is a codec block flag of a codec group of the current video block.
[1220] 34. A method as described in clause 33, wherein no inverse RST processing is applied, and wherein the codec block flag of the top left codec group is zero.
[1221] 35. The method of clause 33, wherein inverse RST processing is not applied, and wherein the codec block flags of the first codec group and the second codec group in a scan order of the current video block are zero.
[1222] 36. The method of clause 32, wherein the characteristic is a height (M) or a width (N) of the current video block.
[1223] 37. A method as described in clause 36, wherein no inverse RST processing is applied, and wherein (i) M=8 and N=4, or (ii) M=4 and N=8.
[1224] 38. A method for video processing, comprising: making a decision about selectively applying an inverse reduced secondary transform (RST) process to the current video block based on characteristics of the current video block; and performing a conversion between the current video block and a bitstream representation of a video including the current video block based on the decision; wherein the bitstream representation includes side information about the RST, wherein coefficients based on a single color component or a luminance component of the current video block include the side information.
[1225] 39. The method of clause 38, wherein the side information is further included based on a dimension of the current video block.
[1226] 40. A method according to clause 38 or 39, wherein the side information is included without regard to block information of the current video block.
[1227] 41. A video processing method, comprising: for conversion between a codec representation of a current video block including a sub-block and the current video block, determining a zeroing region to be applied for conversion of the sub-block based on a codec condition; and performing the conversion based on the determination.
[1228] 42. A method according to clause 41, wherein the encoding and decoding conditions include the size of the sub-block.
[1229] 43. A method according to clause 41 or 42, wherein the encoding and decoding conditions include the size of the secondary transform used during the transform.
[1230] 44. A method according to any of clauses 1 to 43, wherein the conversion comprises generating a bitstream representation from the current video block.
[1231] 45. A method according to any of clauses 1 to 43, wherein the converting comprises generating the current video block from a bitstream representation.
[1232] 46. 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 one of clauses 1 to 45.
[1233] 47. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for implementing the method according to any of clauses 1 to 45.
[1234] 48. A method, apparatus or system as herein described.
[1235] The second group of clauses describes certain features and aspects of the disclosed technology in the previous sections (e.g., example items 7-9, 22, and 29-34).
[1236] 1. A method for video processing (eg, Fig.27A The method 2710 shown in ) comprises: performing (2712) a conversion between a video region of a video and a coded representation of the video, wherein performing the conversion comprises configuring a context model based on a segmentation type of the video region, the context model being used to encode and decode a first binary bit, the first binary bit and a second binary bit being included in a binary string corresponding to an index of a secondary transform tool applied to the video region, wherein the index indicates the applicability of the secondary transform tool and / or kernel information of the secondary transform tool, and wherein the secondary transform tool comprises applying a forward secondary transform to an output of a forward main transform applied to a residual of a video block before quantization during encoding, or wherein the secondary transform tool comprises applying an inverse secondary transform to an inverse quantized output of the video block before applying an inverse main transform during decoding.
[1237] 2. The method according to clause 1, wherein the partition type is a single tree type or a dual tree type.
[1238] 3. The method of clause 1, wherein the converting is performed for a given slice type such that the context model for the given slice type is different from the context model for another slice type.
[1239] 4. A method for video processing (e.g., Fig.27B The method 2720 shown in FIG. 2 comprises: determining (2722) a zeroing region in which coefficients are zeroed for a current video block of a video including a sub-block based on a codec condition of the current video block; and performing (2724) a conversion between the current video block and a codec representation of the video based on the determination, wherein the conversion comprises applying a secondary transform tool, and wherein the secondary transform tool comprises applying a forward secondary transform to an output of a forward main transform applied to a residual of the video block before quantization during encoding, or wherein the secondary transform tool comprises applying an inverse secondary transform to an inverse quantized output of the video block before applying an inverse main transform during decoding.
[1240] 5. A method according to clause 4, wherein the coding condition comprises a size of a sub-block.
[1241] 6. A method according to clause 4, wherein, when the size of the current sub-block is M×N, nonZeroSizeA indicates the number of samples within the zero region, and when the size of the current sub-block is K×L, nonZeroSizeB indicates the number of samples within the zero region, and wherein, when Min(M,N) is not less than Min(K,L), nonZeroSizeA is not less than nonZeroSizeB.
[1242] 7. A method according to clause 4, wherein, when the width or height of the sub-block is equal to 4 or 8, the number of samples within the zeroing region is set to a fixed value.
[1243] 8. A method according to clause 4, wherein the number of samples within the zeroing region is set to a fixed value regardless of the size of the sub-block.
[1244] 9. The method according to clause 4, wherein the encoding and decoding conditions include the size of the secondary transform tool.
[1245] 10. The method of clause 9, wherein the codec condition comprises whether to use 16x64 transform or 16x16 transform during the conversion.
[1246] 11. A method according to clause 10, wherein when a 16×64 transform is used, nonZeroSizeA indicates the number of samples within the zeroing region, and when a 16×16 transform is used, nonZeroSizeB indicates the number of samples within the zeroing region, and wherein nonZeroSizeA is not less than nonZeroSizeB.
[1247] 12. A method of video processing (eg, Fig.27C The method 2730 shown in ) comprises: determining (2732) a transformation matrix and / or an inverse transformation matrix of a reduced size less than N×N to use when applying a secondary transformation to the current video block of the video for a transformation between a current video block of dimension N×N and a coded representation of the video; and performing (2734) the transformation between the video and the coded representation of the video, wherein the secondary transformation tool comprises applying a forward secondary transformation to an output of a forward main transformation applied to a residual of the video block before quantization during encoding, or wherein the secondary transformation tool comprises applying an inverse secondary transformation to an inverse quantized output of the video block before applying an inverse main transformation during decoding.
[1248] 13. A method according to clause 12, wherein the reduced size corresponds to 1 / 2, 1 / 4 or 1 / 8 of the original size of the transformation matrix and / or inverse transformation matrix.
[1249] 14. The method of clause 12, wherein the zeroed regions with zeroed coefficients in the current video block are based on a reduced size of the transform matrix and / or the inverse transform matrix.
[1250] 15. A method for video processing (e.g., Fig.27D The method 2740 shown in ) comprises: for conversion between a current video block of a video and a codec representation of the video, determining (2742) based on a rule to use a residual pattern from one or more residual patterns, wherein each of the one or more residual patterns corresponds to a mask that provides information about the location of return-to-zero samples; and performing (2744) conversion between the video and the codec representation of the video based on the determination.
[1251] 16. A method according to clause 15, wherein each of the one or more residual patterns comprises a portion associated with non-zero transform coefficients and another portion associated with zero coefficients.
[1252] 17. The method of clause 15, wherein the rule determines to use a residual pattern for a current video block having size MxN regardless of a signaled transform index, wherein M and N are equal to or greater than 8.
[1253] 18. The method of clause 15, wherein the rule specifies whether and / or how to apply the residual pattern based on the type of transform tool used in the current video block.
[1254] 19. A method according to clause 18, wherein the determination to use the residual pattern is due to a secondary transform tool used in the current video block, and
[1255] wherein the secondary transform tool comprises applying a forward secondary transform to the output of a forward primary transform applied to a residual of a video block prior to quantization during encoding, or
[1256] The secondary transform tool includes applying an inverse secondary transform to an inverse quantized output of the video block prior to applying an inverse primary transform during decoding.
[1257] 20. The method of clause 15, wherein the one or more residual patterns are derived from a larger residual pattern having more coefficients.
[1258] 21. A method according to clause 20, wherein a plurality of transformation matrices are defined for each of the one or more residual patterns.
[1259] 22. A method according to clause 20, wherein an indication of the residual pattern and a transform matrix associated with the residual pattern are signalled.
[1260] 23. The method of clause 20, wherein the one or more residual patterns are derived by excluding positions associated with relatively small transform coefficients in a K x L transform matrix, where K and L are integers.
[1261] 24. A method according to clause 23, wherein the one or more residual patterns include a first residual pattern derived by excluding positions associated with the first K0 smallest transform coefficients, and wherein (K*L-K0) positions are assigned with residuals, wherein K0 is an integer.
[1262] 25. A method according to clause 24, wherein the one or more residual patterns include a second residual pattern derived by excluding positions associated with the first K1 smallest transform coefficients, and wherein (K*L–K1) positions are assigned with residuals, wherein K1 is an integer different from K0.
[1263] 26. The method of clause 15, wherein the current video block has a size smaller than a largest transform block.
[1264] 27. The method of clause 15, wherein the rule specifies using the residual pattern based on at least one of color components or codec information of the current video block and / or neighboring blocks of the current video block.
[1265] 28. A video processing method (e.g., Fig.27E The method 2750 shown in FIG. 2 comprises: determining (2752) a secondary transform tool associated with a current video block of a video based on a type of primary transform; and performing (2754) a conversion between the video and a codec representation of the video, wherein the secondary transform tool comprises applying a forward secondary transform to an output of a forward primary transform applied to a residual of the video block prior to quantization during encoding, or wherein the secondary transform tool comprises applying an inverse secondary transform to an inverse quantized output of the video block prior to applying an inverse primary transform during decoding.
[1266] 29. A method according to clause 28, wherein the determining comprises selecting, for a current video block of the video, a transform set or a transform matrix to be used when applying the secondary transform tool to the current video block based on a rule, wherein the rule specifies selecting the transform set or the transform matrix based on i) a type of a forward main transform or a type of an inverse main transform of the current video block, ii) a size of the current video block, or iii) a shape of the current video block.
[1267] 30. A method according to clause 28 or 29, wherein the forward main transform or the inverse main transform comprises a variant of DCT-II, DST-VII, DCT-VIII, a transform skip mode, an identity transform or a transform from a training.
[1268] 31. A method according to clause 29, wherein the rules specify a set of transform matrices used in a transform skip mode in which either the transform is bypassed or an identity transform is applied.
[1269] 32. The method of clause 29, wherein the codec representation comprises a syntax element indicating whether to use the secondary transform tool for transform skip mode or which matrix in the set to use for the current video block.
[1270] 33. A method according to clause 29, wherein the rule specifies one set of transform matrices for DCT-II or a first forward main transform or a first inverse main transform, and another set of transform matrices for another forward main transform or inverse main transform.
[1271] 34. A method according to clause 29, wherein the rule specifies that the set of transform matrices corresponds to a corresponding main transform mode used in a forward main transform or an inverse main transform.
[1272] 35. A method according to clause 29, wherein the rule provides that the set of transform matrices for a primary transform mode includes at least one matrix that is different from any of the matrices in two or more sets of transform matrices for a different primary transform mode.
[1273] 36. The method of clause 29, wherein the set of transform matrices for the current video block corresponds to a category determined based on a size or shape of the current video block, the category being different from a category of another video block having a different size or a different shape than the current video block.
[1274] 37. A video processing method (e.g., Fig.27F The method 2760 shown in FIG. 2 comprises: determining (2762) a plurality of sets of transform matrices to be used to process a video region of a video; and performing (2764) a conversion between the video and a codec representation of the video, and wherein the codec representation includes an indication of which of the plurality of sets to use for the video region.
[1275] 38. A method according to clause 37, wherein the video region corresponds to a sequence, a picture, a strip, a slice, a tile, a sub-picture or a video.
[1276] 39. A method for video processing (e.g., Figure 27GThe method 2770 shown in ) comprises: determining (2772) a transform matrix or an inverse transform matrix to be used when applying a secondary transform tool to a current video block of a video based on a rule; and performing (2774) a conversion between the video and a coded representation of the video, wherein the secondary transform tool comprises applying a forward secondary transform to the output of a forward main transform applied to a residual of the video block before quantization during encoding, or wherein the secondary transform tool comprises applying an inverse secondary transform to the output of a dequantized output of the video block before applying an inverse main transform during decoding, wherein the rule specifies that the coefficients of the transform matrix or the inverse transform matrix are determined based on a variable that specifies the transform output length.
[1277] 40. A method according to clause 39, wherein coefficients of the transformation matrix or inverse transformation matrix have a lower frequency than coefficients of a transformation matrix or inverse transformation matrix not based on the variable.
[1278] 41. A method according to clause 39 or 40, wherein the variable is 16 or 48.
[1279] 42. A method for video processing (e.g., Fig.27H The method 2780 shown in FIG. 2 comprises: determining (2782) based on a rule a transform matrix or an inverse transform matrix to be used when applying a secondary transform tool to a current video block of a video; and performing (2784) a conversion between the video and a codec representation of the video, wherein the secondary transform tool comprises applying a forward secondary transform to an output of a forward main transform applied to a residual of the video block prior to quantization during encoding, or wherein the secondary transform tool comprises applying an inverse secondary transform to an output of a dequantization of the video block prior to applying an inverse main transform during decoding, wherein the rule provides for determining the transform matrix or the inverse transform matrix by using a retraining process.
[1280] 43. A method according to clause 42, wherein the retraining process comprises retraining the reconstructed transform coefficient blocks and applying eigendecomposition to calculate eigenvalues and eigenvectors.
[1281] 44. A method according to clause 42, wherein the rule provides that the transform matrix or the inverse transform matrix is determined only after encoding or decoding an intra slice or intra picture of the video.
[1282] 45. A method according to clause 42, wherein the transformation matrix or the inverse transformation matrix is used to replace at least part of an original transformation matrix or an original inverse transformation matrix obtained without using a retraining process.
[1283] 46. A method according to clause 42, wherein the transformation matrix or the inverse transformation matrix is used as an additional set of original transformation matrices obtained without using a retraining process.
[1284] 47. A method according to clause 42, wherein the codec representation includes information corresponding to the following options: i) at least part of a retrained transform matrix, ii) a first difference between the retrained transform matrix and the transform matrix, or iii) a second difference between the retrained transform matrix and a previously signaled transform matrix.
[1285] 48. A method according to clause 47, wherein the information is included in a slice header, a picture header or a picture parameter set (PPS) or an adaptation parameter set (APS).
[1286] 49. A method according to any of clauses 1 to 48, wherein the secondary transform tool corresponds to a low frequency non-separable transform (LFNST) tool, and wherein the secondary transform tool is used: during encoding, a forward secondary transform is applied to the output of a forward main transform of a residual applied to a chroma block before quantization, or during decoding, an inverse secondary transform is applied to the output of an inverse quantization of a chroma block before applying an inverse main transform.
[1287] 50. A method as described in any of clauses 1 to 49, wherein the performance of the conversion includes generating a codec representation from the current video block.
[1288] 51. A method according to any of clauses 1 to 49, wherein the performance of the conversion includes generating the current video block from a codec representation.
[1289] 52. 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 according to any one of clauses 1 to 51.
[1290] 53. A computer program product stored on a non-transitory computer readable medium, the computer program product comprising program code for implementing the method according to any of clauses 1 to 51.
[1291] From the foregoing, it will be appreciated that specific embodiments of the technology of the present disclosure have been described herein for illustrative purposes, but various modifications may be made without departing from the scope of the present invention. Accordingly, the technology of the present disclosure is not limited except by the appended claims.
[1292] The embodiments of the subject matter and functional operations described in this patent document can be implemented in various systems, digital electronic circuits, or computer software, firmware or hardware, including the structures disclosed in this specification and their structural equivalents or a combination of one or more of them. The embodiments of the subject matter described in this specification can be implemented as one or more computer program products, for example, one or more modules of computer program instructions encoded on a tangible and non-transitory computer-readable medium, for data processing devices to execute or control the operation of data processing devices. The computer-readable medium can be a machine-readable storage device, a machine-readable storage substrate, a storage device, a material composition that affects machine-readable propagation signals, or a combination of one or more of them. The term "data processing unit" or "data processing device" covers all devices, equipment and machines for processing data, including (for example) a programmable processor, a computer or multiple processors or computers. In addition to hardware, the device may also include code that creates an execution environment for a computer program, for example, code constituting processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[1293] A computer program (also referred to as a program, software, software application, script, or code) may be written in any form of programming language (including compiled or interpreted languages) and may 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 may 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, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or portions of code). A computer program may be deployed to be executed on one or more computers that are located at one site or distributed across multiple sites and interconnected by a communications network.
[1294] The processes and logic flows described in this specification can be performed by executing one or more computer programs by one or more programmable processors to perform functions by operating on input data and generating output. These processes and logic flows can also be performed by special purpose logic circuits, and the apparatus can also be implemented as special purpose logic circuits, such as FPGAs (field programmable gate arrays) or ASICs (application specific integrated circuits).
[1295] For example, processors suitable for executing computer programs include general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally speaking, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic elements of a computer are a processor that executes instructions and one or more storage devices that store instructions and data. Typically, a computer will also include one or more large-capacity storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, or be operatively coupled to receive data from or transmit data to one or more large-capacity storage devices, or both. However, a computer does not necessarily have 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 (for example) semiconductor storage devices, such as EPROM, EEPROM, and flash memory devices. The processor and memory can be supplemented by a dedicated logic circuit, or incorporated into the dedicated logic circuit.
[1296] It is intended that the specification, together with the drawings, be considered exemplary only, with exemplary representations of examples.As used herein, the use of "or" is intended to include "and / or" unless the context clearly dictates otherwise.
[1297] Although this patent document contains many details, they should not be interpreted as limitations on any invention or the scope of the claims, but rather as descriptions of specific features of specific embodiments of specific inventions. Certain features described in this patent document in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination. In addition, although certain features may be described above as working in certain combinations and even initially claimed as such, one or more features from the claimed combination may be removed from the combination in some cases, and the claimed combination may involve sub-combinations or variations of sub-combinations.
[1298] Similarly, although operations are shown in a particular order in the drawings, this should not be understood as requiring such operations to be performed in a sequential order or the particular times shown, or requiring all of the operations shown to be performed to achieve the desired results. In addition, the division of various system components among the embodiments described in this patent document should not be understood as requiring such division in all embodiments.
[1299] Only a few implementations and examples are described, and other implementations, enhancements, and variations can be made based on what is described and illustrated in this patent document.
Claims
1. A method for processing video data, comprising: performing a conversion between a current video region of a video and a bitstream of said video, The performing of the conversion includes configuring a context increment for a first binary bit of the codec based only on the segmentation type of the current video region, the context increment is used to determine a context model, the first binary bit and the second binary bit are included in a binary string, the binary string corresponds to a first index of a secondary transform tool applied to the current video region, wherein the first index indicates the applicability of the secondary transformation tool and / or the kernel information of the secondary transformation tool, and wherein the secondary transform means comprises applying a forward secondary transform to the residual output of the forward primary transform applied to the video block prior to quantization during encoding, or The secondary transform tool comprises applying an inverse secondary transform to an inverse quantized output of the video block prior to applying an inverse primary transform during decoding.
2. The method according to claim 1, wherein: The partition type is a single-tree type or a dual-tree type.
3. The method according to claim 1, wherein: In case the partition type is a single tree type, the context increment ctxInc is set equal to 0.
4. The method according to claim 1, wherein: In case the partition type is not a single tree type, the context increment ctxInc is set equal to 1.
5. The method according to claim 1, wherein: The current video region is a current video block, and whether the first index is included in the bitstream is based on a relationship between at least one of a width (W) and a height (H) of the current video block and an allowed maximum transform size (T).
6. The method according to claim 5, wherein: A position of a last non-zero coefficient in a residual of the current video block is determined based on at least one syntax element in the bitstream, and whether and how the first index exists in the bitstream is based on the position of the last non-zero coefficient.
7. The method according to claim 6, wherein: In the event that the last non-zero coefficient is not located in a region of the current video block to which the secondary transform tool is applied, the first index is not included in the bitstream.
8. The method according to claim 1, wherein: In response to the first index indicating enabling of the secondary transform tool, a second index indicating applicability of the forward main transform or the inverse main transform and kernel information of the forward main transform or the inverse main transform is not present in the bitstream and is inferred to be not applicable to the current video region.
9. The method according to claim 1, wherein: The quadratic transform tool corresponds to a low frequency non-separable transform (LFNST) tool.
10. The method according to claim 1, wherein: The converting includes encoding the current video region into the bitstream.
11. The method according to claim 1, wherein: The converting includes decoding the current video region from the bitstream.
12. An apparatus for processing video data, comprising a processor and a non-transitory memory having instructions thereon, wherein: The instructions, when executed by the processor, cause the processor to: performing a conversion between a current video region of a video and a bitstream of said video, The performing of the conversion includes configuring a context increment for a first binary bit of the codec based only on the segmentation type of the current video region, the context increment is used to determine a context model, the first binary bit and the second binary bit are included in a binary string, the binary string corresponds to a first index of a secondary transform tool applied to the current video region, wherein the first index indicates the applicability of the secondary transformation tool and / or the kernel information of the secondary transformation tool, and wherein the secondary transform means comprises applying a forward secondary transform to the residual output of the forward primary transform applied to the video block prior to quantization during encoding, or The secondary transform tool comprises applying an inverse secondary transform to an inverse quantized output of the video block prior to applying an inverse primary transform during decoding.
13. The device according to claim 12, wherein: The partition type is a single-tree type or a dual-tree type; Wherein, in the case where the segmentation type is a single tree type, the context increment ctxInc is set equal to 0; and Wherein, when the segmentation type is not a single tree type, the context increment ctxInc is set equal to 1.
14. The device according to claim 12, wherein: The current video region is a current video block, and whether the first index is included in the bitstream is based on a relationship between at least one of a width (W) and a height (H) of the current video block and an allowed maximum transform size (T); wherein a position of a last non-zero coefficient in a residual of the current video block is determined based on at least one syntax element in the bitstream, and whether and how the first index exists in the bitstream is based on the position of the last non-zero coefficient; wherein, in the case where the last non-zero coefficient is not located in the region of the current video block to which the secondary transform tool is applied, the first index is not included in the bitstream; wherein, in response to the first index indicating enabling of the secondary transform tool, a second index indicating applicability of the forward main transform or the inverse main transform and kernel information of the forward main transform or the inverse main transform does not exist in the bitstream and is inferred to be not applicable to the current video region; and The secondary transform tool corresponds to a low frequency non-separable transform (LFNST) tool.
15. A non-transitory computer-readable storage medium storing instructions that cause a processor to: performing a conversion between a current video region of a video and a bitstream of said video, in, The performing of the conversion includes configuring a context increment for a first binary bit of the codec based only on the partition type of the current video region, the context increment being used to determine a context model, the first binary bit and the second binary bit being included in a binary string corresponding to a first index of a secondary transform tool applied to the current video region, wherein the first index indicates the applicability of the secondary transformation tool and / or the kernel information of the secondary transformation tool, and wherein the secondary transform means comprises applying a forward secondary transform to the residual output of the forward primary transform applied to the video block prior to quantization during encoding, or The secondary transform tool comprises applying an inverse secondary transform to an inverse quantized output of the video block prior to applying an inverse primary transform during decoding.
16. The non-transitory computer-readable storage medium of claim 15, wherein: The partition type is a single-tree type or a dual-tree type; Wherein, in the case where the segmentation type is a single tree type, the context increment ctxInc is set equal to 0; and Wherein, when the segmentation type is not a single tree type, the context increment ctxInc is set equal to 1.
17. The non-transitory computer-readable storage medium of claim 15, wherein: The current video region is a current video block, and whether the first index is included in the bitstream is based on a relationship between at least one of a width (W) and a height (H) of the current video block and an allowed maximum transform size (T); wherein a position of a last non-zero coefficient in a residual of the current video block is determined based on at least one syntax element in the bitstream, and whether and how the first index exists in the bitstream is based on the position of the last non-zero coefficient; wherein, in the case where the last non-zero coefficient is not located in the region of the current video block to which the secondary transform tool is applied, the first index is not included in the bitstream; wherein, in response to the first index indicating enabling of the secondary transform tool, a second index indicating applicability of the forward main transform or the inverse main transform and kernel information of the forward main transform or the inverse main transform does not exist in the bitstream and is inferred to be not applicable to the current video region; and The secondary transform tool corresponds to a low frequency non-separable transform (LFNST) tool.
18. A non-transitory computer-readable recording medium storing a bit stream of a video, the bit stream being generated by a method performed by a video processing device, wherein: The method comprises: generating a bitstream of the video for a current video region of the video, wherein generating the bitstream comprises configuring a context increment for a first binary bit of encoding and decoding based only on a segmentation type of the current video region, the context increment being used to determine a context model, the first binary bit and the second binary bit being included in a binary string corresponding to a first index of a secondary transform tool applied to the current video region, wherein the first index indicates the applicability of the secondary transformation tool and / or the kernel information of the secondary transformation tool, and wherein the secondary transform means comprises applying a forward secondary transform to the residual output of the forward primary transform applied to the video block prior to quantization during encoding, or The secondary transform tool comprises applying an inverse secondary transform to an inverse quantized output of the video block prior to applying an inverse primary transform during decoding.
19. The non-transitory computer-readable storage medium of claim 18, wherein: The partition type is a single-tree type or a dual-tree type; Wherein, in the case where the segmentation type is a single tree type, the context increment ctxInc is set equal to 0; and Wherein, when the segmentation type is not a single tree type, the context increment ctxInc is set equal to 1.
20. The non-transitory computer-readable storage medium of claim 18, wherein: The current video region is a current video block, and whether the first index is included in the bitstream is based on a relationship between at least one of a width (W) and a height (H) of the current video block and an allowed maximum transform size (T); wherein a position of a last non-zero coefficient in a residual of the current video block is determined based on at least one syntax element in the bitstream, and whether and how the first index exists in the bitstream is based on the position of the last non-zero coefficient; wherein, in the case where the last non-zero coefficient is not located in the region of the current video block to which the secondary transform tool is applied, the first index is not included in the bitstream; wherein, in response to the first index indicating enabling of the secondary transform tool, a second index indicating applicability of the forward main transform or the inverse main transform and kernel information of the forward main transform or the inverse main transform does not exist in the bitstream and is inferred to be not applicable to the current video region; and The secondary transform tool corresponds to a low frequency non-separable transform (LFNST) tool.
21. A method for storing a bit stream of a video, comprising: generating a bitstream of the video for a current video region of the video, storing the bitstream in a non-transitory computer-readable storage medium, wherein generating the bitstream comprises configuring a context increment for a first binary bit of encoding and decoding based only on a segmentation type of the current video region, the context increment being used to determine a context model, the first binary bit and the second binary bit being included in a binary string corresponding to a first index of a secondary transform tool applied to the current video region, wherein the first index indicates the applicability of the secondary transformation tool and / or the kernel information of the secondary transformation tool, and wherein the secondary transform means comprises applying a forward secondary transform to the residual output of the forward primary transform applied to the video block prior to quantization during encoding, or The secondary transform tool comprises applying an inverse secondary transform to an inverse quantized output of the video block prior to applying an inverse primary transform during decoding.
