Video encoding and decoding method, computer-readable storage medium, and sending method

By designing and optimizing the coding method of 4×4 block reduced quadratic transform, the problem of efficiently processing next-generation video content is solved, the computational complexity is reduced and the coding efficiency is improved.

CN115604470BActive Publication Date: 2025-09-05LG ELECTRONICS INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211233328.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-04-01
Filing Date
2019-04-01
Publication Date
2025-09-05
Estimated Expiration
2039-04-01

AI Technical Summary

Technical Problem

Existing technologies have difficulty in efficiently processing the high spatial resolution, high frame rate, and high scene representation characteristics of next-generation video content, resulting in a significant increase in memory storage, memory access rate, and processing power.

Method used

A 4×4 block reduced secondary transform (RST) design is adopted to optimize the layout and scanning order of transform coefficients, and different coding methods are applied to luminance blocks and chrominance blocks by conditionally encoding transform indices and residual coding.

Benefits of technology

Significantly reduces computational complexity and enhances coding efficiency, reducing the amount of computation required when encoding still images or moving pictures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115604470B_ABST
    Figure CN115604470B_ABST
Patent Text Reader

Abstract

Video encoding and decoding method, computer-readable storage medium, and transmission method. The present disclosure provides a method for reconstructing a video signal based on a reduced quadratic transform. The method includes: obtaining a quadratic transform index from the video signal; deriving a quadratic transform corresponding to the quadratic transform index, where the quadratic transform represents a reduced quadratic transform, and the reduced quadratic transform represents a transform that outputs L (L < N) transform coefficient data (L×1 transform coefficient vector) based on N input residual data (N×1 residual vector); obtaining a transform coefficient block by performing entropy decoding and dequantization on a current block (N×N); performing an inverse quadratic transform on the transform coefficient block using the reduced quadratic transform; performing an inverse primary transform on the block to which the inverse quadratic transform is applied; and reconstructing the current block using the block to which the inverse primary transform is applied.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original invention patent application with application number 201980034874.X (International application number: PCT / KR2019 / 003812, application date: April 1, 2019, invention name: Method and device for processing video signals using reduced quadratic transform). Technical Field

[0002] The present disclosure relates to a method and apparatus for processing a video signal, and more particularly, to a design of a reduced secondary transform (RST) applicable to a 4×4 block, a layout and scanning order of transform coefficients generated after the 4×4 RST, and a transform index encoding method for specifying the 4×4 RST to be applied. Background Art

[0003] The next generation of video content will have the characteristics of high spatial resolution, high frame rate and high dimensionality of scene representation. In order to process this content, technologies such as memory storage, memory access rate and processing power will increase significantly.

[0004] Therefore, it is necessary to design a new coding tool for more efficiently processing next generation video content. Specifically, it is necessary to design a transform that is more efficient in terms of coding efficiency and complexity when applying the transform. Summary of the Invention

[0005] [Technical Issues]

[0006] Embodiments of the present disclosure provide an encoder / decoder structure for reflecting a new transform design.

[0007] In addition, embodiments of the present disclosure provide a design of a reduced secondary transform (RST) applicable to a 4×4 block, a layout and scanning order of transform coefficients generated after the 4×4 RST, and a transform index encoding method and structure for specifying the 4×4 RST to be applied.

[0008] [Technical solution]

[0009] The present disclosure provides a method to reduce complexity and enhance coding efficiency through a new transform design.

[0010] The present disclosure provides a method for designing an RST applicable to a 4×4 block.

[0011] The present disclosure provides a region configuration to which 4×4 RST is to be applied, a method of setting transformation coefficients generated after applying 4×4 RST, a scanning order of the set transformation coefficients, a method of sorting and combining transformation coefficients generated for respective blocks, and the like.

[0012] The present disclosure provides a method for encoding a transform index of a specified 4×4 RST.

[0013] The present disclosure provides a method of conditionally encoding a corresponding transform index by checking whether a non-zero transform coefficient exists in an unacceptable region when 4×4 RST is applied.

[0014] The present disclosure provides a method for conditionally encoding a corresponding transform index after encoding the last non-zero transform coefficient position, and then omitting the related residual encoding for unacceptable positions.

[0015] The present disclosure provides a method of applying different transform index encoding and residual encoding to a luma block and a chroma block when 4×4 RST is applied.

[0016] [Beneficial Effects]

[0017] According to the present disclosure, when encoding a still image or a moving picture, by applying 4×4 RST, the amount of calculation can be significantly reduced compared to a case where another non-separable secondary transform (NSST) is applied.

[0018] Furthermore, by considering the absence of significant transform coefficients in a specific region when 4x4 RST is applied, performance may be enhanced by conditionally encoding a transform index specifying 4x4 RST and applying optimization of the associated residual coding.

[0019] As described above, through the new low-complexity calculation algorithm, the calculation complexity can be reduced and the encoding efficiency can be enhanced. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a block diagram illustrating a configuration of an encoder for encoding a video signal according to an embodiment of the present disclosure.

[0021] Figure 2 is a block diagram illustrating a configuration of a decoder for decoding a video signal according to an embodiment of the present disclosure.

[0022] Figures 3A to 3D Showing embodiments to which the present disclosure can be applied, Figure 3A is a diagram for describing a block splitting structure based on a quadtree (hereinafter referred to as "QT"), Figure 3B is a diagram used to describe a block splitting structure based on a binary tree (hereinafter referred to as "BT"), Figure 3C is a diagram for describing a block splitting structure based on a ternary tree (hereinafter referred to as "TT"), Figure 3D A diagram for describing a block splitting structure based on an asymmetric tree (hereinafter referred to as "AT").

[0023] Figure 41 is a schematic block diagram illustrating an embodiment of the present disclosure and a transform and quantization unit 120 / 130 and a dequantization and transform unit 140 / 150 in an encoder.

[0024] Figure 5 2 is a schematic block diagram illustrating a dequantization and transform unit 220 / 230 in a decoder to which an embodiment of the present disclosure is applied.

[0025] Figure 6 : is a table showing a transform configuration group to which multi-transform selection (MTS) is applied as an embodiment to which the present disclosure is applied.

[0026] Figure 7 : is a flowchart illustrating an encoding process of performing multi-transform selection (MTS) as an embodiment to which the present disclosure is applied.

[0027] Figure 8 : is a flowchart illustrating a decoding process of performing multiple transform selection (MTS) as an embodiment to which the present disclosure is applied.

[0028] Figure 9 is a flowchart for describing a process of encoding an MTS flag and an MTS index as an embodiment to which the present disclosure is applied.

[0029] Figure 10 1 is a flowchart for describing a decoding process of applying horizontal transform or vertical transform to a row or column based on an MTS flag and an MTS index as an embodiment to which the present disclosure is applied.

[0030] Figure 11 This is a flowchart of performing inverse transformation based on transformation-related parameters as an embodiment to which the present disclosure is applied.

[0031] Figure 12 4 is a table showing allocation of transform sets to respective intra prediction modes in NSST as an embodiment to which the present disclosure is applied.

[0032] Figure 13 This is a calculation flowchart of Givens rotation as an embodiment to which the present disclosure is applied.

[0033] Figure 14 A configuration of one round in a 4×4 NSST consisting of a Givens rotation layer and permutation is shown as an embodiment to which the present disclosure is applied.

[0034] Figure 15 It is a block diagram for describing operations of forward reduced transform and inverse reduced transform as an embodiment to which the present disclosure is applied.

[0035] Figure 16 This is a diagram showing the process of performing inverse scanning from the 64th to the 17th in reverse scanning order as an embodiment applying the present disclosure.

[0036] Figure 17 Shows three forward scanning orders of a transform coefficient block (transform block) as an embodiment applying the present disclosure.

[0037] Figure 18 Shows the positions and forward scanning orders of the valid transform coefficients of each 4×4 block when diagonal scanning is applied and 4×4 RST is applied in the upper left 4×8 block as an embodiment applying the present disclosure.

[0038] Figure 19 Shows the case where the valid transform coefficients of two 4×4 blocks are combined into one 4×4 block when diagonal scanning is applied and 4×4 RST is applied in the upper left 4×8 block as an embodiment applying the present disclosure.

[0039] Figure 20 This is a flowchart for encoding a video signal based on a reduced quadratic transform as an embodiment applying the present disclosure.

[0040] Figure 21 This is a flowchart for decoding a video signal based on a reduced quadratic transform as an embodiment applying the present disclosure.

[0041] Figure 22 This is an architecture diagram of a content stream system as an embodiment applying the present disclosure. Detailed Embodiments

[0042] The present disclosure provides a method for reconstructing a video signal based on a reduced quadratic transform, the method comprising the following steps: obtaining a quadratic transform index from the video signal; deriving a quadratic transform corresponding to the quadratic transform index, wherein the quadratic transform represents a reduced quadratic transform, and the reduced quadratic transform represents a transform for outputting L (L < N) transform coefficient data (L×1 transform coefficient vector) based on N input residual data (N×1 residual vector); obtaining a transform coefficient block by performing entropy decoding and dequantization on a current block (N×N); performing an inverse quadratic transform on the transform coefficient block using the reduced quadratic transform; performing an inverse primary transform on the block to which the inverse quadratic transform is applied; and reconstructing the current block using the block to which the inverse primary transform is applied.

[0043] The present disclosure is characterized in that the reduced quadratic transform is applied to a specific region of the current block, and the specific region is the upper left M×M (M ≤ N) in the current block.

[0044] The present disclosure is characterized in that when performing an inverse quadratic transform, a 4×4 reduced quadratic transform is applied to each divided 4×4 block in the current block.

[0045] The present disclosure is characterized in that it determines whether to obtain a quadratic transform index based on the position of the last non-zero transform coefficient in the transform coefficient block.

[0046] The present disclosure is characterized in that when the last non-zero transform coefficient is not located in a specific region, a quadratic transform index is obtained, and if a reduced quadratic transform is applied, the specific region represents the remaining region except for the positions where non-zero transform coefficients may exist when the transform coefficients are set according to the scanning order.

[0047] The method further includes: obtaining a primary transform index of the current block from a video signal, where the primary transform index corresponds to any one of a plurality of transform combinations configured by a combination of DST7 and / or DCT8; and deriving a transform combination corresponding to the primary transform index, where the transform combination includes a horizontal transform and a vertical transform, and the horizontal transform and the vertical transform correspond to any one of DST7 or DCT8, and performing an inverse primary transform using the transform combination.

[0048] The present disclosure provides a device for reconstructing a video signal based on a reduced quadratic transform. The device includes: an analysis unit that obtains a quadratic transform index from a video signal; a transform unit that derives a quadratic transform corresponding to the quadratic transform index, where the quadratic transform represents a reduced quadratic transform, and the reduced quadratic transform represents a transform that outputs L (L < N) transform coefficient data (L×1 transform coefficient vector) based on input N residual data (N×1 residual vector); an entropy decoding unit that performs entropy decoding on the current block (N×N); a dequantization unit that performs dequantization on the current block on which entropy decoding has been performed to obtain a transform coefficient block; the transform unit performs an inverse quadratic transform on the transform coefficient block using the reduced quadratic transform, and performs an inverse primary transform on the block to which the inverse quadratic transform has been applied; and a reconstruction unit that reconstructs the current block using the block to which the inverse primary transform has been applied.

[0049] [Mode of the present invention]

[0050] Hereinafter, the configuration and operation of the embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. The configuration and operation of the present disclosure described with reference to the accompanying drawings are described as embodiments, and the scope, core configuration, and operation of the present disclosure are not limited thereto.

[0051] In addition, the terms used in the present disclosure are selected from general terms that are currently widely used, but in specific cases, terms randomly selected by the applicant are used. In this case, since their meanings are clearly described in the detailed description of the corresponding part, the terms should not be simply interpreted by the names of the terms used in the description of the present disclosure, but the meanings of the corresponding terms should be understood and interpreted.

[0052] In addition, when there is a general term selected to describe the present invention or another term with a similar meaning, the term used in this disclosure can be replaced to more appropriately explain it. For example, in each encoding process, signal, data, sample, picture, frame, and block can be appropriately replaced and explained. In addition, in each encoding process, segmentation, decomposition, splitting, and division can be appropriately replaced and explained.

[0053] In the present disclosure, multi-transform selection (MTS) may refer to a method of performing transforms using at least two transform types. This may also be expressed as adaptive multi-transform (AMT) or explicit multi-transform (EMT), and similarly, mts_idx may also be expressed as AMT_idx, EMT_idx, tu_mts_idx, AMT_TU_idx, EMT_TU_idx, transform index, or transform combination index, although the present disclosure is not limited to these expressions.

[0054] Figure 1 A schematic block diagram of an encoder for encoding a video signal according to one embodiment of the present disclosure is shown.

[0055] Reference Figure 1 , the encoder 100 may include an image segmentation unit 110, a transform unit 120, a quantization unit 130, a dequantization unit 140, an inverse transform unit 150, a filtering unit 160, a decoded picture buffer (DPB) 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185 and an entropy encoding unit 190.

[0056] The image segmentation unit 110 may segment the input image (or picture or frame) input to the encoder 100 into one or more processing units. For example, the processing unit may be a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), or a transform unit (TU).

[0057] However, the terms used are merely for the convenience of illustrating the present disclosure, and the present disclosure is not limited to the definitions of these terms. In the present disclosure, for the convenience of illustration, the term "coding unit" is used as a unit used in the process of encoding or decoding a video signal. However, the present disclosure is not limited thereto, and another processing unit may be appropriately selected based on the content of the present disclosure.

[0058] The encoder 100 may generate a residual signal by subtracting the prediction signal output from the inter prediction unit 180 or the intra prediction unit 185 from the input image signal. The generated residual signal may be transmitted to the transform unit 120.

[0059] The transform unit 120 may generate transform coefficients by applying a transform scheme to the residual signal.The transform process may apply blocks (square or rectangular) split in a quadtree structure, a binary tree structure, a ternary structure, or a square block of an asymmetric structure.

[0060] The transform unit 120 may perform transform based on multiple transforms (or transform combinations), and this transform scheme may be referred to as Multiple Transform Selection (MTS). MTS may also be referred to as Adaptive Multi-Transform (AMT) or Enhanced Multi-Transform (EMT).

[0061] MTS (or AMT or EMT) may refer to a transformation scheme performed based on a transform (or a transform combination) adaptively selected from a plurality of transforms (or transform combinations).

[0062] Multiple transformations (or combinations of transformations) may include the Figure 6 In this disclosure, a transform or transform type may be denoted as, for example, DCT type 2, DCT-II, DCT2, or DCT-2.

[0063] The transform unit 120 may perform the following embodiments.

[0064] The present disclosure provides a method for designing an RST applicable to a 4×4 block.

[0065] The present disclosure provides a region configuration to which 4×4 RST is to be applied, a method of setting transformation coefficients generated after applying 4×4 RST, a scanning order of the set transformation coefficients, a method of sorting and combining transformation coefficients generated for respective blocks, and the like.

[0066] The present disclosure provides a method for encoding a transform index of a specified 4×4 RST.

[0067] The present disclosure provides a method of conditionally encoding a corresponding transform index by checking whether a non-zero transform coefficient exists in an unacceptable region when 4×4 RST is applied.

[0068] The present disclosure provides a method for conditionally encoding a corresponding transform index after encoding the last non-zero transform coefficient position, and then omitting the related residual encoding for unacceptable positions.

[0069] The present disclosure provides a method of applying different transform index encoding and residual encoding to a luma block and a chroma block when 4×4 RST is applied.

[0070] Detailed embodiments thereof will be described in more detail in this disclosure.

[0071] The quantization unit 130 may quantize the transform coefficient and transmit the quantized transform coefficient to the entropy encoding unit 190 , and the entropy encoding unit 190 may entropy-encode the quantized signal and output the entropy-encoded quantized signal as a bitstream.

[0072] Although the transform unit 120 and the quantization unit 130 are described as separate functional units, the present disclosure is not limited thereto and they may be combined into one functional unit. The dequantization unit 140 and the inverse transform unit 150 may also be similarly combined into one functional unit.

[0073] The quantized signal output from the quantization unit 130 may be used to generate a prediction signal. For example, inverse quantization and inverse transformation are applied to the quantized signal in a loop through the dequantization unit 140 and the inverse transformation unit 150 to reconstruct a residual signal. The reconstructed residual signal is added to the prediction signal output from the inter-frame prediction unit 180 or the intra-frame prediction unit 185 to generate a reconstructed signal.

[0074] Furthermore, due to quantization errors that occur during this compression process, image block boundaries may be degraded. This phenomenon is known as blocking artifacts and is a key factor in evaluating image quality. A filtering process can be performed to reduce this artifact. This filtering process removes block artifacts and reduces errors in the current image, enhancing image quality.

[0075] The filtering unit 160 applies filtering to the reconstructed signal and outputs the applied reconstructed signal to a reproduction device or transmits the output reconstructed signal to the decoded picture buffer 170. The inter-frame prediction unit 180 may use the filtered signal transmitted to the decoded picture buffer 170 as a reference picture. Thus, the filtered picture is used as a reference picture in the inter-frame prediction mode to enhance image quality and encoding efficiency.

[0076] The decoded picture buffer 170 may store the filtered picture in order to use the filtered picture as a reference picture in the inter prediction unit 180 .

[0077] The inter-frame prediction unit 180 performs temporal prediction and / or spatial prediction to remove temporal redundancy and / or spatial redundancy with reference to the reconstructed picture. Here, since the reference picture used for prediction is a transformed signal quantized and dequantized in units of blocks during the previous encoding / decoding, blocking artifacts or ringing artifacts may exist.

[0078] Therefore, the inter-frame prediction unit 180 can interpolate the signal between pixels in sub-pixel units by applying a low-pass filter to address the performance degradation caused by discontinuity or quantization of such signals. Here, sub-pixels refer to virtual pixels generated by applying an interpolation filter, and integer pixels refer to actual pixels present in the reconstructed picture. As interpolation methods, linear interpolation, bilinear interpolation, Wiener filter, etc. can be used.

[0079] An interpolation filter is applied to the reconstructed picture to enhance the accuracy of prediction. For example, the inter-frame prediction unit 180 applies an interpolation filter to integer pixels to generate interpolated pixels, and may perform prediction using an interpolated block composed of the interpolated pixels as a prediction block.

[0080] Furthermore, the intra-frame prediction unit 185 may predict the current block by referencing samples near the block currently being encoded. The intra-frame prediction unit 185 may perform the following process to perform intra-frame prediction. First, reference samples required for generating a prediction signal may be prepared. Furthermore, the prepared reference samples may be used to generate a prediction signal. Thereafter, the prediction mode is encoded. In this case, reference samples may be prepared through reference sample padding and / or reference sample filtering. Since reference samples undergo prediction and reconstruction processes, quantization errors may exist. Therefore, a reference sample filtering process may be performed for each prediction mode used for intra-frame prediction to reduce such errors.

[0081] The prediction signal generated by the inter prediction unit 180 or the intra prediction unit 185 may be used to generate a reconstructed signal or to generate a residual signal.

[0082] Figure 2 is a schematic block diagram of a decoder that performs decoding of a video signal as an embodiment to which the present disclosure is applied.

[0083] Reference Figure 2 , the decoder 200 can be configured to include a parsing unit (not shown), an entropy decoding unit 210, a dequantization unit 220, an inverse transform unit 230, a filtering unit 240, a decoded picture buffer (DPB) unit 250, an inter-frame prediction unit 260 and an intra-frame prediction unit 265.

[0084] In addition, the reconstructed video signal output through the decoder 200 may be reproduced through a reproducing apparatus.

[0085] The decoder 200 may receive Figure 1 The received signal may be entropy-decoded by the entropy decoding unit 210 .

[0086] The dequantization unit 220 obtains a transform coefficient from the entropy-decoded signal using the quantization step size information.

[0087] The inverse transform unit 230 performs an inverse transform on the transform coefficients to obtain a residual signal.

[0088] Here, the present disclosure provides a method for configuring a transform combination for each transform configuration group divided according to at least one of a prediction mode, a block size, or a block shape, and the inverse transform unit 230 can perform an inverse transform based on the transform combination configured by the present disclosure. In addition, the embodiments described in the present disclosure can be applied.

[0089] The inverse transform unit 230 can perform the following embodiments.

[0090] The present disclosure provides a method for reconstructing a video signal based on a reduced quadratic transform.

[0091] The inverse transform unit 230 can derive a quadratic transform corresponding to a quadratic transform index, perform an inverse quadratic transform on a transform coefficient block using the quadratic transform, and perform an inverse first transform on the block on which the inverse quadratic transform has been performed. Here, the quadratic transform refers to a reduced quadratic transform, and the reduced quadratic transform represents a transform that inputs N residual data (N×1 residual vector) and outputs L (L < N) transform coefficient data (L×1 transform coefficient vector).

[0092] The present disclosure is characterized in that a reduced quadratic transform is applied to a specific region of a current block, and the specific region is the upper left M×M (M≤N) in the current block.

[0093] The present disclosure is characterized in that when performing an inverse quadratic transform, a 4×4 reduced quadratic transform is applied to each 4×4 block divided in the current block.

[0094] The present disclosure is characterized in that it is determined whether to obtain a quadratic transform index based on the position of the last non-zero transform coefficient in the transform coefficient block.

[0095] The present disclosure is characterized in that when the last non-zero transform coefficient is not in a specific region, a quadratic transform index is obtained, and the specific region indicates the remaining region other than the position where non-zero transform coefficients may exist when setting transform coefficients according to a scan order in the case of applying a reduced quadratic transform.

[0096] The inverse transform unit 230 can derive a transform combination corresponding to a first transform index and use the transform combination to perform an inverse first transform. Here, the first transform index corresponds to any one of a plurality of transform combinations composed of a combination of DST7 and / or DCT8, and the transform combination includes a horizontal transform and a vertical transform. In this case, the horizontal transform and the vertical transform correspond to DST7 or DCT8.

[0097] The dequantization unit 220 and the inverse transform unit 230 are described as separate functional units, but the present disclosure is not limited thereto. The dequantization unit 220 and the inverse transform unit 230 may be combined into a single functional unit.

[0098] A reconstructed signal is generated by adding the obtained residual signal to the prediction signal output by the inter prediction unit 260 or the intra prediction unit 265 .

[0099] The filtering unit 240 may output or transmit the reconstructed signal to the playback device or the decoded picture buffer unit 250 by applying filtering to the reconstructed signal. The filtered signal transmitted to the decoded picture buffer unit 250 may be used as a reference picture in the inter prediction unit 260.

[0100] In the present disclosure, the embodiments described in the transform unit 120 and the respective functional units of the encoder 100 may be identically applied to the inverse transform unit 230 and the corresponding functional units of the decoder.

[0101] Figures 3A to 3D Showing embodiments to which the present disclosure can be applied, Figure 3A is a diagram for describing a block splitting structure based on a quadtree (hereinafter referred to as "QT"), Figure 3B is a diagram used to describe a block splitting structure based on a binary tree (hereinafter referred to as "BT"), Figure 3C is a diagram for describing a block splitting structure based on a ternary tree (hereinafter referred to as "TT"), Figure 3D A diagram for describing a block splitting structure based on an asymmetric tree (hereinafter referred to as "AT").

[0102] In video coding, a block can be split based on a quadtree (QT). In addition, a subblock split by QT can be further recursively split using QT. Page blocks that are no longer QT-split can be split using at least one of a binary tree (BT), a ternary tree (TT), or an asymmetric tree (AT). BT can have two types of splits: horizontal BT (2NxN, 2NxN) and vertical BT (N×2N, N×2N). TT can have two types of splits: horizontal TT (2N×1 / 2N, 2N×N, 2N×1 / 2N) and vertical TT (1 / 2N×2N, N×2N, 1 / 2N×2N). AT can have four types of splits: horizontal upper AT (2N×1 / 2N, 2N×3 / 2N), horizontal lower AT (2N×3 / 2N, 2N×1 / 2N), vertical left AT (1 / 2N×2N, 3 / 2N×2N), and vertical right AT (3 / 2N×2N, 1 / 2N×2N). Each BT, TT, or AT can be further recursively split using BT, TT, or AT.

[0103] Figure 3AAn example of QT splitting is shown. Block A can be split into four sub-blocks A0, A1, A2, and A3 according to QT. Sub-block A1 can be split into four sub-blocks B0, B1, B2, and B3 according to QT.

[0104] Figure 3B An example of BT splitting is shown. Block B3, which is no longer split by QT, can be split into vertical BTs C0 and C1 or horizontal BTs T0 and D1. As in block C0, each sub-block can be further recursively split in a similar manner as horizontal BTs E0 and E1 or vertical BTs F0 and F1.

[0105] Figure 3C An example of TT splitting is shown. Block B3, which is no longer split by QT, can be split into vertical TTs C0, C1, and C2 or horizontal TTs D0, D1, and D2. As in block C1, each sub-block can be further recursively split in a similar manner as horizontal TTs E0, E1, and E2 or vertical TTs F0, F1, and F2.

[0106] Figure 3D An example of AT splitting is shown. Block B3, which is no longer split by QT, can be split into vertical ATs C0 and C1 or horizontal ATs D0 and D1. As in block C1, each sub-block can be further recursively split in a similar manner as horizontal ATs E0 and E1 or vertical TTs F0 and F1.

[0107] Furthermore, BT, TT, and AT splits can be split together. For example, a sub-block split by BT can be split by TT or AT. Furthermore, a sub-block split by TT can be split by BT or AT. A sub-block split by AT can be split by BT or TT. For example, after a horizontal BT split, each sub-block can be split into a vertical BT, or after a vertical BT split, each sub-block can be split into a horizontal BT. The two types of splitting methods differ in the order of the splits, but have the same final split shape.

[0108] Furthermore, if a block is split, the order in which blocks are searched can be defined in various ways. Typically, the search is performed from left to right or from top to bottom. The search block can refer to the order in which additional blocks are used to determine whether to split each split sub-block, or the order in which each sub-block is coded if the block is no longer split, or the search order when a sub-block references information from another adjacent block.

[0109] Figure 4 and Figure 5 This is an embodiment to which the present disclosure is applied. Figure 4 A schematic block diagram showing a transform and quantization unit 120 / 130 and a dequantization and transform unit 140 / 150 within an encoder, Figure 5 A schematic block diagram of a dequantization and transform unit 220 / 230 within a decoder is shown.

[0110] Reference Figure 4 The transform and quantization unit 120 / 130 may include a primary transform unit 121, a secondary transform unit 122, and a quantization unit 130. The dequantization and transform unit 140 / 150 may include a dequantization unit 140, an inverse secondary transform unit 151, and an inverse primary transform unit 152.

[0111] Reference Figure 5 , the dequantization and transformation unit 220 / 230 may include a dequantization unit 220 , an inverse secondary transformation unit 231 , and an inverse primary transformation unit 232 .

[0112] In the present disclosure, when performing a transformation, the transformation may be performed through multiple steps. For example, Figure 4 As in

[0045] , two steps of primary and secondary transforms may be applied, or more transform steps may be used depending on the algorithm. In this case, the primary transform may be referred to as a core transform.

[0113] The primary transform unit 121 may apply a primary transform to the residual signal. In this case, the primary transform may be predefined in the form of a table in the encoder and / or decoder.

[0114] Discrete cosine transform type 2 (hereinafter, "DCT2") may be applied to primary transform. Alternatively, discrete sine transform type 7 (hereinafter, referred to as "DST7") may be applied to specific cases. For example, in intra prediction mode, DST7 may be applied to a 4×4 block.

[0115] In addition, a transform can use a combination of various transforms DST 7, DCT 8, DST 1 and DCT 5 of the Multiple Transform Selection (MTS). For example, Figure 6 .

[0116] The secondary transform unit 122 may apply a secondary transform to the primary transformed signal. Here, the secondary transform may be predefined in a table in an encoder and / or a decoder.

[0117] As an embodiment, the secondary transform may conditionally adopt a non-separable secondary transform (hereinafter referred to as "NSST"). For example, NSST may be applied only to intra-prediction blocks and may have a transform set applicable to each prediction mode group.

[0118] Here, prediction mode groups can be configured based on symmetry with respect to the prediction direction. For example, since prediction mode 52 and prediction mode 16 are symmetric with respect to prediction mode 34 (diagonal direction), they can be grouped together to apply the same transform set. In this case, when applying the transform for prediction mode 52, the input data is transposed and then applied, since prediction mode 52 has the same transform set as prediction mode 16.

[0119] In addition, since there is no directional symmetry in the case of the planar mode and the DC mode, each mode has a different transform set, and the corresponding transform set can be composed of two transforms. Regarding the remaining directional modes, each transform set can be composed of three transforms.

[0120] As another embodiment, the secondary transform may use a combination of various transforms DST 7, DCT 8, DST 1 and DCT 5 of the Multi-Transform Selection (MTS). For example, Figure 6 .

[0121] As another embodiment, DST 7 may be applied to the secondary transform.

[0122] As another embodiment, NSST may not be applied to the entire first-transformed block, but may be applied only to the upper left 8×8 region. For example, when the block size is 8×8 or larger, 8×8 NSST is applied, and when the block size is smaller than 8×8, 4×4 NSST is applied. In this case, the block is divided into 4×4 blocks, and then 4×4 NSST is applied to each divided block.

[0123] As another embodiment, even in the case of 4×N / N×4 (N>=16), 4×4 NSST may be applied.

[0124] Will refer to Figures 12 to 15 and other embodiments in this disclosure describe NSST, 4×4 NSST, and 8×8 NSST in more detail.

[0125] The quantization unit 130 may perform quantization on the secondary transformed signal.

[0126] The dequantization unit 140 and the inverse transform unit 150 perform the above-described process in reverse, and a redundant description thereof will be omitted.

[0127] Figure 5 is a schematic block diagram of the dequantization unit 220 and the inverse transform unit 230 in the decoder.

[0128] Refer to the above Figure 5 , the dequantization unit 220 and the inverse transform unit 230 may include a dequantization unit 220 , an inverse secondary transform unit 231 , and an inverse primary transform unit 232 .

[0129] The dequantization unit 220 obtains a transform coefficient from the entropy-decoded signal using the quantization step size information.

[0130] The inverse secondary transform unit 231 performs an inverse secondary transform on the transform coefficients. Here, the inverse secondary transform means the above Figure 4 The inverse of the quadratic transform described in .

[0131] As another embodiment, the secondary transform may use a combination of various transforms DST 7, DCT 8, DST 1 and DCT 5 of the Multi-Transform Selection (MTS). For example, Figure 6 .

[0132] The inverse primary transform unit 232 performs an inverse primary transform on the inverse secondary transformed signal (or block) and obtains a residual signal. Here, the inverse primary transform represents Figure 4 The inverse of a transformation described in .

[0133] As an embodiment, a transformation may be performed using a combination of various transformations DST 7, DCT 8, DST 1, and DCT 5 of Multi-Transform Selection (MTS). For example, Figure 6 .

[0134] As an embodiment of the present disclosure, DST 7 may be applied to a primary transformation.

[0135] As an embodiment of the present disclosure, DCT 8 may be applied for primary transform.

[0136] The present disclosure provides a method for configuring transform combinations for each transform configuration group divided by at least one of prediction mode, block size, or block shape, and the inverse primary transform unit 232 can perform inverse transform based on the transform combinations configured in the present disclosure. In addition, the embodiments described in the present disclosure can be applied.

[0137] Figure 6 : is a table showing a transform configuration group to which multi-transform selection (MTS) is applied as an embodiment to which the present disclosure is applied.

[0138] Applying a transform configuration group with Multi-Transform Selection (MTS)

[0139] In this disclosure, the transformation configuration group G i The j-th transformation combination candidate of is represented by the pair shown in the following formula 1.

[0140] [Formula 1]

[0141] (H(G i ,j),V(G i ,j))

[0142] Here, H(G i ,j) indicates the horizontal transformation of the jth candidate, V(G i ,j) indicates the vertical transformation of the jth candidate. Figure 6 In the example above, H(G3,2)=DST7 and V(G3,2)=DCT8 can be represented. i ,j) or V(G i,j) may be a nominal value to distinguish the transformation, or may be an index value indicating the transformation, or may be a 2-dimensional (D) matrix of the transformation.

[0143] Furthermore, in the present disclosure, 2D matrix values ​​of DCT and DST may be expressed as shown in the following Equations 2 and 3.

[0144] [Formula 2]

[0145] DCT Type 2: DCT Type 8:

[0146] [Formula 3]

[0147] DST Type 7: DST Type 4:

[0148] Here, whether the transform is DST or DCT is indicated by S or C, the type number is represented by superimposed Roman numerals, and the subscript N indicates that the transform is an N×N transform. and The 2D matrix assumes that the column vectors form the transformation basis.

[0149] Refer to the above Figure 6 , the transform configuration group may be determined based on the prediction mode, and the number of groups may be a total of six groups G0 to G5. In addition, G0 to G4 correspond to the case where intra prediction is applied, and G5 represents a transform combination (or a transform set and a transform combination set) applied to the residual block generated by inter prediction.

[0150] One transform combination may consist of a horizontal transform (or row transform) applied to rows of the corresponding 2D block and a vertical transform (or column transform) applied to columns.

[0151] Here, each of all transform configuration groups may have four transform combination candidates. The four transform combinations may be selected and determined by transform combination indexes from 0 to 3, and the transform combination indexes may be encoded and transmitted from the encoder to the decoder.

[0152] As an embodiment, the residual data (or residual signal) obtained by intra prediction may have different statistical characteristics depending on the intra prediction mode. Figure 6 As shown, transforms other than the general cosine transform can be applied to each intra prediction mode.

[0153] Refer to the above Figure 6, showing the case where 35 intra prediction modes are used and the case where 67 intra prediction modes are used. Multiple transform combinations can be applied to each transform configuration group divided in each intra prediction mode column. For example, the multiple transform combinations can be composed of four (row-direction transform and column-direction transform) combinations. As a specific example, DST-7 and DST-5 can be applied in the row (horizontal) direction and the column (vertical) direction in group 0, resulting in a total of four combinations available.

[0154] Since a total number of transform kernel combinations can be applied to each intra prediction mode, a transform combination index for selecting one of the transform kernel combinations can be transmitted per transform unit. In the present disclosure, the transform combination index may be referred to as an MTS index and expressed as mtx_idx.

[0155] In addition to the above Figure 6 In addition to the transform kernels presented in [1], it may happen that DCT2 is optimal for both the row and column directions due to the characteristics of the residual signal. Therefore, an MTS flag is defined for each coding unit to adaptively perform the transform. Here, when the MTS flag is 0, DCT2 can be applied to both the row and column directions, and when the MTS flag is 1, one of four combinations can be selected or determined by the MTS index.

[0156] As an embodiment, when the MTS flag is 1, if the number of non-zero transform coefficients of a transform unit is not greater than the threshold, DST-7 can be applied to both the row direction and the column direction without applying the above Figure 6 For example, the threshold value may be set to 2, which may be set differently based on the block size or the size of the transform unit. This also applies to other embodiments in this specification.

[0157] As an embodiment, if the number of non-zero transform coefficients is not greater than a threshold by first parsing the transform coefficient values, the amount of additional information transmission may be reduced by applying DST-7 without parsing the MTS index.

[0158] As an embodiment, when the MTS flag is 1, if the number of non-zero transform coefficients for one transform unit is greater than a threshold, an MTS index may be parsed and horizontal transform and vertical transform may be determined based on the MTS index.

[0159] As an embodiment, MTS may be applied only when both the width and height of a transform unit are equal to or less than 32.

[0160] As an embodiment, the above Figure 6 Can be pre-configured through offline training.

[0161] As an embodiment, the MTS index may be defined as one index that may indicate both horizontal transform and vertical transform. Alternatively, the MTS index may define the horizontal transform index and the vertical transform index separately.

[0162] As an embodiment, an MTS flag or an MTS index may be defined at at least one level of a sequence, a picture, a slice, a block, a coding unit, a transform unit, or a prediction unit. For example, an MTS flag or an MTS index may be defined at at least one level of a sequence parameter set (SPS), a coding unit, or a transform unit.

[0163] As another embodiment, a transform combination (horizontal transform or vertical transform) corresponding to a transform index may be configured independently of the MTS flag, prediction mode, and / or block shape. For example, the transform combination may be configured by at least one of DCT2, DST7, and / or DCT8. As a specific example, when the transform index is 0, 1, 2, 3, or 4, the transform combinations may be (DCT2, DCT2), (DST7, DST7), (DCT8, DST7), (DST7, DCT8), or (DCT8, DCT8).

[0164] Figure 7 : is a flowchart illustrating an encoding process of performing multi-transform selection (MTS) as an embodiment to which the present disclosure is applied.

[0165] In the present disclosure, an embodiment in which transforms are applied separately to the horizontal direction and the vertical direction is basically described, but a transform combination may be configured as an inseparable transform.

[0166] Alternatively, the transform combination may be configured from a mix of separable and non-separable transforms. In this case, when non-separable transforms are used, row / column transform selection or horizontal / vertical direction selection may not be required, and the above transform selections may only be used when separable transforms are selected. Figure 6 transformation combination.

[0167] Furthermore, the scheme proposed in the present disclosure can be applied regardless of whether a primary transform or a secondary transform is used. That is, the scheme is not limited to being applied to only one of the primary transform and the secondary transform, and the scheme can be applied to both the primary transform and the secondary transform. Here, the primary transform may refer to a transform that first transforms the residual block, and the secondary transform may refer to a transform that applies a transform to a block generated as a result of the primary transform.

[0168] First, the encoder can determine the transform configuration group corresponding to the current block. Here, the transform configuration group can refer to the above Figure 6 The transformation configuration group is not limited thereto, and the transformation configuration group may be composed of other transformation combinations.

[0169] The encoder may perform transform on candidate transform combinations available in the transform configuration group ( S720 ).

[0170] As a result of performing the transform, the encoder may determine or select a transform combination having a minimum distortion (RD) cost ( S730 ).

[0171] The encoder may encode a transform combination index corresponding to the selected transform combination ( S740 ).

[0172] Figure 8 : is a flowchart illustrating a decoding process of performing multiple transform selection (MTS) as an embodiment to which the present disclosure is applied.

[0173] First, the decoder may determine a transform configuration group of a current block ( S810 ).

[0174] The decoder may parse (or obtain) a transform combination index from the video signal. Here, the transform combination index may correspond to any one of a plurality of transform combinations in a transform configuration group (S820). For example, the transform configuration group may include discrete sine transform type (DST) 7 and discrete cosine transform type (DCT) 8. The transform combination index may be referred to as an MTS index.

[0175] As an embodiment, the transform configuration group may be configured based on at least one of a prediction mode, a block size, or a block shape of the current block.

[0176] The decoder may derive a transform combination corresponding to the transform combination index (S830). Here, the transform combination may include horizontal transform and vertical transform, and may include at least one of DST-7 or DCT-8.

[0177] In addition, the transformation combination can mean the above Figure 6 The transformation combination described in , but the present disclosure is not limited thereto. That is, according to other embodiments in the present disclosure, the transformation combination can be configured by other transformation combinations.

[0178] The decoder may perform an inverse transform on the current block based on the transform combination (S840). When the transform combination includes a row (horizontal) transform and a column (vertical) transform, the column (vertical) transform may be applied after the row (horizontal) transform is applied first. However, the present disclosure is not limited thereto, and the transform order may be reversed, or when the transform combination includes an inseparable transform, the inseparable transform may be applied immediately.

[0179] As an embodiment, when the vertical transform or the horizontal transform is DST-7 or DCT-8, inverse transform of DST-7 or inverse transform of DCT-8 may be applied to each column and then to each row.

[0180] As an embodiment, regarding vertical transform or horizontal transform, different transforms may be applied to each row and / or each column.

[0181] As an embodiment, the transform combination index may be acquired based on an MTS flag indicating whether MTS is executed. That is, when MTS is executed according to the MTS flag, the transform combination index may be acquired.

[0182] As an embodiment, the decoder may check whether the number of non-zero transform coefficients is greater than a threshold value. In this case, when the number of non-zero transform coefficients is greater than the threshold value, a transform combination index may be obtained.

[0183] As an embodiment, an MTS flag or an MTS index may be defined at at least one level of a sequence, a picture, a slice, a block, a coding unit, a transform unit, or a prediction unit.

[0184] As an embodiment, the inverse transform may be applied only when both the width and height of the transform unit are equal to or less than 32.

[0185] On the other hand, as another embodiment, the process of determining the transform configuration group and the process of parsing the transform combination index can be performed simultaneously. Alternatively, the above step S810 can be pre-configured and omitted in the encoder and / or decoder.

[0186] Figure 9 is a flowchart for describing a process of encoding an MTS flag and an MTS index as an embodiment to which the present disclosure is applied.

[0187] The encoder may determine whether to apply multi-transform selection (MTS) to a current block ( S910 ).

[0188] When multiple transform selection (MTS) is applied, the encoder may encode MTS flag=1 (S920).

[0189] In addition, the encoder may determine an MTS index based on at least one of the prediction mode, horizontal transform, and vertical transform of the current block (S930). Here, the MTS index may refer to an index of any one of a plurality of transform combinations indicating each intra prediction mode, and the MTS index may be transmitted for each transform unit.

[0190] When the MTS index is determined, the encoder may encode the MTS index ( S940 ).

[0191] On the other hand, when multiple transform selection (MTS) is not applied, the encoder may encode MTS flag=0 (S950).

[0192] Figure 10 1 is a flowchart for describing a decoding process of applying horizontal transform or vertical transform to a row or column based on an MTS flag and an MTS index as an embodiment to which the present disclosure is applied.

[0193] The decoder may parse the MTS flag from the bitstream ( S1010 ). Here, the MTS flag may indicate whether multiple transform selection (MTS) is applied to the current block.

[0194] The decoder may determine whether to apply multi-transform selection (MTS) to the current block based on the MTS flag ( S1020 ). For example, it may be checked whether the MTS flag is 1.

[0195] When the MTS flag is 1, the decoder may check whether the number of non-zero transform coefficients is greater than (or equal to or greater than) a threshold (S1030). For example, the threshold may be set to 2, which may be set differently based on the block size or the size of the transform unit.

[0196] When the number of non-zero transform coefficients is greater than the threshold, the decoder may parse the MTS index (S1040). Here, the MTS index may refer to any one of a plurality of transform combinations of each intra prediction mode or inter prediction mode, and the MTS index may be sent for each transform unit. Alternatively, the MTS index may refer to an index indicating any one of the transform combinations defined in a preconfigured transform combination table. Here, the preconfigured transform combination table may refer to the above Figure 6 , but the present disclosure is not limited thereto.

[0197] The decoder may derive or determine horizontal transform and vertical transform based on at least one of the MTS index and the prediction mode ( S1050 ).

[0198] Alternatively, the decoder may derive a transform combination corresponding to the MTS index. For example, the decoder may derive or determine a horizontal transform and a vertical transform corresponding to the MTS index.

[0199] In addition, when the number of non-zero transform coefficients is not greater than the threshold, the decoder may apply a pre-configured vertical inverse transform to each column (S1060). For example, the vertical inverse transform may be an inverse transform of DST7.

[0200] In addition, the decoder may apply a pre-configured horizontal inverse transform to each row (S1070). For example, the horizontal inverse transform may be the inverse transform of DST7. That is, when the number of non-zero transform coefficients is not greater than a threshold, a transform kernel pre-configured by the encoder or decoder may be used. For example, the above Figure 6 The transformation combinations shown in the table are not defined but are widely used transformation kernels.

[0201] In addition, when the MTS flag is 0, the decoder may apply a pre-configured vertical inverse transform to each column (S1080). For example, the vertical inverse transform may be an inverse transform of DCT2.

[0202] In addition, the decoder may apply a pre-configured horizontal inverse transform to each row (S1090). For example, the horizontal inverse transform may be an inverse transform of DCT2. That is, when the MTS flag is 0, a transform kernel pre-configured by the encoder or decoder may be used. For example, the above Figure 6 The transformation combinations shown in the table are not defined but are widely used transformation kernels.

[0203] Figure 11 This is a flowchart of performing inverse transformation based on transformation-related parameters as an embodiment to which the present disclosure is applied.

[0204] A decoder to which the present disclosure is applied may obtain sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag (S1110). Here, sps_mts_intra_enabled_flag indicates whether tu_mts_flag is present in the residual coding syntax of an intra-frame coding unit. For example, when sps_mts_intra_enabled_flag = 0, tu_mts_flag is not present in the residual coding syntax of the intra-frame coding unit, and when sps_mts_intra_enabled_flag = 0, tu_mts_flag is present in the residual coding syntax of the intra-frame coding unit. In addition, sps_mts_inter_enabled_flag indicates whether tu_mts_flag is present in the residual coding syntax of an inter-frame coding unit. For example, when sps_mts_inter_enabled_flag=0, tu_mts_flag does not exist in the residual coding syntax of the intra-frame coding unit, and when sps_mts_inter_enabled_flag=0, tu_mts_flag exists in the residual coding syntax of the inter-frame coding unit.

[0205] The decoder may obtain tu_mts_flag based on sps_mts_intra_enabled_flag or sps_mts_inter_enabled_flag (S1120). For example, when sps_mts_intra_enabled_flag = 1 or sps_mts_inter_enabled_flag = 1, the decoder may obtain tu_mts_flag. Here, tu_mts_flag indicates whether multi-transform selection (hereinafter referred to as "MTS") is applied to the residual samples of the luma transform block. For example, when tu_mts_flag = 0, MTS is not applied to the residual samples of the luma transform block, and when tu_mts_flag = 1, MTS is applied to the residual samples of the luma transform block.

[0206] As another example, at least one embodiment of this document may be applied to tu_mts_flag.

[0207] The decoder may obtain mts_idx based on tu_mts_flag ( S1130 ). For example, when tu_mts_flag=1, the decoder may obtain mts_idx. Here, mts_idx indicates which transform kernel is applied to the luma residual samples along the horizontal and / or vertical directions of the current transform block.

[0208] For example, at least one embodiment of this document may be applied to mts_idx. As a specific example, the above Figure 6 at least one embodiment of .

[0209] The decoder may derive a transform kernel corresponding to mts_idx ( S1140 ). For example, the transform kernel corresponding to mts_idx may be defined by dividing into horizontal transform and vertical transform.

[0210] As another example, different transform kernels may be applied to horizontal transform and vertical transform. However, the present disclosure is not limited thereto, and the same transform kernel may be applied to horizontal transform and vertical transform.

[0211] As an implementation method, mts_idx may be defined as shown in Table 1 below.

[0212] [Table 1]

[0213] mts_idx[x0][y0] trTypeHor trTypeVer 0 0 0 1 1 1 2 2 1 3 1 2 4 2 2

[0214] In addition, the decoder may perform inverse transform based on the transform kernel ( S1150 ).

[0215] As another embodiment of the present disclosure, a decoding process of performing a transform process is described.

[0216] The decoder may check the transform size nTbS ( S10 ) Here, the transform size nTbS may be a variable representing a horizontal sample size of a scaled transform coefficient.

[0217] The decoder may check the transform core type trType (S20). Here, the transform core type trType may be a variable representing the type of the transform core, and various embodiments of the present disclosure may be applied. The transform core type trType may include a horizontal transform core type trTypeHor and a vertical transform core type trTypeVer.

[0218] Referring to Table 1 above, when the transform kernel type trType is 0, the transform kernel type may represent DCT2, when the transform kernel type trType is 1, the transform kernel type may represent DST7, and when the transform kernel type trType is 2, the transform kernel type may represent DCT8.

[0219] The decoder may perform transform matrix multiplication based on at least one of the transform size nTbS or the transform kernel type ( S30 ).

[0220] As another example, when the transform kernel type is 1 and the transform size is 4, a predetermined transform matrix 1 may be applied when performing the transform matrix multiplication.

[0221] As another example, when the transform kernel type is 1 and the transform size is 8, a predetermined transform matrix 2 may be applied when performing the transform matrix multiplication.

[0222] As another example, when the transform kernel type is 1 and the transform size is 16, a predetermined transform matrix 3 may be applied when performing the transform matrix multiplication.

[0223] As another example, when the transform kernel type is 1 and the transform size is 32, a predefined transform matrix 4 may be applied when performing the transform matrix multiplication.

[0224] Similarly, when the transform kernel type is 2 and the transform size is 4, 8, 16, or 32, predefined transform matrices 5, 6, 7, and 8 may be applied, respectively.

[0225] Here, each of the predefined transformation matrices 1 to 8 may correspond to any one of various types of transformation matrices. As an example, the above Figure 6 A transformation matrix of the type shown.

[0226] The decoder may derive transformed samples based on the transform matrix multiplication ( S40 ).

[0227] The above-described respective embodiments may be used, but the present disclosure is not limited thereto and may be used in combination with the above-described embodiments and other embodiments of the present disclosure.

[0228] Figure 12 : is a table showing allocation of transform sets to respective intra prediction modes in NSST as an embodiment to which the present disclosure is applied.

[0229] Non-separable quadratic transform (NSST)

[0230] The secondary transform unit may apply a secondary transform to the primary transformed signal. Here, the secondary transform may be defined in a table in the encoder and / or the decoder.

[0231] As an embodiment, the secondary transform may conditionally adopt a non-separable secondary transform (hereinafter referred to as "NSST"). For example, NSST may be applied only to intra-prediction blocks and may have a transform set applicable to each prediction mode group.

[0232] Here, prediction mode groups can be configured based on symmetry with respect to the prediction direction. For example, since prediction mode 52 and prediction mode 16 are symmetric with respect to prediction mode 34 (diagonal direction), they can be grouped together to apply the same transform set. In this case, when applying the transform for prediction mode 52, the input data is transposed and then applied, since prediction mode 52 has the same transform set as prediction mode 16.

[0233] In addition, since there is no directional symmetry in the case of the planar mode and the DC mode, each mode has a different transform set, and the corresponding transform set can be composed of two transforms. For the remaining directional modes, each transform set can be composed of three transforms. However, the present disclosure is not limited to this, and each transform set can be composed of multiple transforms.

[0234] Figure 13 This is a calculation flowchart of Givens rotation as an embodiment to which the present disclosure is applied.

[0235] As another embodiment, NSST may not be applied to the entire first-transformed block, but may be applied only to the upper left 8×8 region. For example, when the block size is 8×8 or larger, 8×8 NSST is applied, and when the block size is smaller than 8×8, 4×4 NSST is applied. In this case, the block is divided into 4×4 blocks, and then 4×4 NSST is applied to each divided block.

[0236] As another embodiment, even in the case of 4×N / N×4 (N>=16), 4×4 NSST may be applied.

[0237] Since both 8×8 NSST and 4×4 NSST follow the transform combination configuration described in the present disclosure and are inseparable transforms, 8×8 NSST receives 64 data and outputs 64 data, and 4×4 NSST has 16 inputs and 16 outputs.

[0238] Both 8×8 NSST and 4×4 NSST are configured by hierarchical combination of Givens rotations. The matrix corresponding to one Givens rotation is shown in Equation 4 below, and the matrix product is shown in Equation 5 below.

[0239] [Formula 4]

[0240]

[0241] [Formula 5]

[0242] t m =x m cosθ-x n sinθ

[0243] t n =xm sinθ+x n cosθ

[0244] As above Figure 13 As shown, since one Givens rotation rotates two data, a total of 32 or 8 Givens rotations are required to process 64 data (for 8×8 NSST) or 16 data (for 4×4 NSST).

[0245] Therefore, a Givens rotation layer is formed using a beam of 32 or 8. Output data of one Givens rotation layer is transferred as input data of the next Givens rotation layer through a certain arrangement.

[0246] Figure 14 A configuration of one round in a 4×4 NSST consisting of givens rotation layers and permutations is shown as an embodiment to which the present disclosure is applied.

[0247] Refer to the above Figure 14 , showing that four Givens rotation layers are processed sequentially in the case of 4×4 NSST. Figure 14 As shown, the output data of one Givens rotation layer is transferred as the input data of the next Givens rotation layer through a certain arrangement (ie, shuffling).

[0248] As above Figure 14 As shown, the pattern to be arranged is regularly determined, and in the case of 4×4 NSST, four Givens rotation layers and corresponding arrangements are combined to form one round.

[0249] In the case of 8×8 NSST, six Givens rotation layers and corresponding permutations form one round. 4×4 NSST uses two rounds, and 8×8 NSST uses four rounds. Different rounds use the same permutation pattern, but the angles of the Givens rotations applied vary. Therefore, it is necessary to store the angle data for all Givens rotations that make up each transformation.

[0250] As the last step, a permutation is finally performed on the data output by the Givens rotation layer, and the corresponding permutation information is stored separately for each transformation. In the forward NSST, the corresponding permutation is performed last, and in the inverse NSST, the corresponding inverse permutation is applied first.

[0251] In the case of inverse NSST, the Givens rotation layers and permutations applied to the forward NSST are performed in reverse order, and rotation is performed by taking negative values ​​even for the angles of each Givens rotation.

[0252] Figure 15It is a block diagram for describing operations of forward reduction transform and inverse reduction transform which are embodiments applying the present disclosure.

[0253] Reduced Quadratic Transform (RST)

[0254] When assuming that an orthogonal matrix representing a transform has an N×N form, the reduction transform (hereinafter referred to as "RT") only leaves R transform basis vectors (R < N) among N transform basis vectors. The matrix of the forward RT for generating transform coefficients is given by Equation 6 below.

[0255] [Equation 6]

[0256]

[0257] Since the matrix of the inverse RT becomes the transposed matrix of the forward RT matrix, the application of the forward RT and the inverse RT is as shown above Figure 15 shown.

[0258] When assuming the case where RT is applied to the upper left 8×8 block of a transformed block after one transformation, RT can be referred to as eight-by-eight reduction second transform (8×8RST).

[0259] When the R value in Equation 6 above is 16, the forward 8×8RST has a 16×64 matrix form, and the inverse 8×8RST has a 64×16 matrix form.

[0260] In addition, the same transform set configuration as shown above Figure 12 can even be applied to 8×8RST. That is, the corresponding 8×8RST can be applied according to the transform set above Figure 12 shown.

[0261] As an embodiment, when according to the intra prediction mode above Figure 12 shown, one transform set includes two or three transforms, up to one of the four transforms including the case where no second transform is applied can be configured for selection. Here, one transform can be regarded as an identity matrix.

[0262] When assigning indices 0, 1, 2, and 3 to the four transforms respectively, a syntax element called NSST index can be signaled for each transform block to specify the corresponding transform. That is, in the case of NSST, 8×8NSST can be specified for the upper left 8×8 block by the NSST index, and 8×8RST can be specified in the RST configuration. In addition, in this case, index 0 can be assigned to the case where no identity matrix (i.e., second transform) is applied.

[0263] When the forward 8×8 RST shown in equation 6 is applied, 16 valid transform coefficients are generated. As a result, it can be considered that the 64 input data constituting the 8×8 area are reduced to 16 output data. From the perspective of the two-dimensional area, only one-quarter of the area is filled with valid transform coefficients. Therefore, Figure 16 The 4×4 upper left area in can be filled with 16 output data obtained by applying the forward 8×8 RST.

[0264] Figure 16 17 is a diagram illustrating a process of performing reverse scanning from the 64th to the 17th according to the reverse scanning order as an embodiment to which the present disclosure is applied.

[0265] above Figure 16 It is shown that the forward scanning order starts from 1 and scans from the 17th coefficient to the 64th coefficient (in the forward scanning order). Figure 16 Inverse scanning is shown, and this shows that inverse scanning is performed from the 64th coefficient to the 17th coefficient.

[0266] Refer to the above Figure 16 , the upper left 4×4 area is the region of interest (ROI) to which valid transform coefficients are assigned, and the remaining area is empty. That is, the value 0 can be assigned to the remaining area by default.

[0267] If it is above Figure 16 If there are valid transform coefficients other than 0 in the area outside the ROI area, this means that 8×8 RST is not applied. As a result, in this case, the corresponding NSST index encoding can be omitted.

[0268] On the contrary, if above Figure 16 If there are no non-zero transform coefficients in the area outside the ROI area (if 8×8 RST is applied, when 0 is assigned to the area outside the ROI), there is a possibility that 8×8 RST will be applied, and as a result, the NSST index can be encoded.

[0269] Therefore, conditional NSST index encoding may be performed after the residual encoding process since it is necessary to check for the presence of non-zero transform coefficients.

[0270] The present disclosure provides a method for designing RST and an associated optimization method, which can be applied to 4x4 blocks from the RST structure.In addition to 4x4 RST, the embodiments disclosed in this disclosure can be applied to 8x8 RST or another type of transform.

[0271] Figure 17 Three forward scanning orders of a transform coefficient block (transform block) as an embodiment to which the present disclosure is applied are shown.

[0272] Implementation 1: RST applied to 4×4 blocks

[0273] The non-separable transform applicable to a 4×4 block is a 16×16 transform. That is, when the data elements constituting the 4×4 block are arranged in row-major or column-major order, the non-separable transform is applied using a 16×1 vector.

[0274] The forward 16×16 transform consists of 16 basis vectors transformed row by row, and when the inner product is applied to the 16×1 vector and each transform basis vector, the transform coefficient of the transform basis vector is obtained. The process of obtaining the transform coefficients corresponding to all 16 transform basis vectors is equivalent to multiplying the 16×16 non-separable transform matrix by the input 16×1 vector.

[0275] The transform coefficients obtained through matrix multiplication have a 16×1 vector form, and each transform coefficient may have different statistical characteristics. For example, when a 16×1 transform coefficient vector consists of elements 0 through 15, the variance of the 0th element may be greater than the variance of the 15th element. In other words, as elements are positioned further in front, their corresponding variance values ​​increase, resulting in elements having greater energy values.

[0276] When the inverse 16×16 non-separable transform is applied from the 16×1 transform coefficients, the original 4×4 block signal can be reconstructed. When the forward 16×16 non-separable transform is an orthogonal transform, the corresponding inverse 16×16 transform can be obtained by the transposed matrix of the forward 16×16 transform.

[0277] When a 16×1 transform coefficient vector is multiplied by an inverse 16×16 non-separable transform matrix, data in the form of a 16×1 vector can be obtained, and when the obtained data is arranged in a row-first or column-first order applied first, a 4×4 block signal can be reconstructed.

[0278] As described above, elements constituting a 16×1 transform coefficient vector may have different statistical characteristics.

[0279] If the transform coefficients arranged at the front side (near the 0th element) have greater energy, even if the inverse transform is applied to some of the first transform coefficients without using all the transform coefficients, a signal very close to the original signal can be reconstructed. For example, when the inverse 16×16 non-separable transform is composed of 16-column basis vectors, only L-column basis vectors remain to form a 16×L matrix. In addition, when only L important transform coefficients are left (L×1 vectors) among the transform coefficients, when the 16×L matrix and the L×1 vector are multiplied with each other, when the 16×L matrix and the L×1 vector are multiplied with each other, a 16×1 vector can be reconstructed, which has a smaller error than the 16×1 vector data of the original input.

[0280] As a result, since only L coefficients are used for data reconstruction, even when obtaining transform coefficients, an L×1 transform coefficient vector is obtained, not a 16×1 transform coefficient vector. That is, when an L×16 transform is configured by selecting L corresponding row-wise transform vectors in a forward 16×16 non-separable transform matrix and then multiplying the configured L×16 transform by a 16×1 input vector, L significant transform coefficients are obtained.

[0281] The L value has a range of 1≤L<16. Generally, L vectors can be selected from the 16 transform basis vectors by any method, but from the perspective of encoding and decoding, selecting transform basis vectors that are highly important in terms of signal energy may be advantageous in terms of coding efficiency.

[0282] Implementation 2: Configuration of the application area of ​​4×4 RST and setting of transform coefficients

[0283] 4×4 RST can be applied as a secondary transform and can be secondary applied to a block to which a primary transform, such as DCT type 2, has been applied. When the size of a block to which the primary transform is applied is N×N, the size of the block to which the primary transform is applied is generally larger than 4×4. Therefore, when 4×4 RST is applied to an N×N block, there are two possible methods.

[0284] Embodiment 2-1) 4×4 RST is not applied to all N×N regions, but may be applied only to some regions. For example, 4×4 RST may be applied only to the upper left M×M region (M≤N).

[0285] Embodiment 2-2) A region to which secondary transform is applied may be divided into 4×4 blocks, and then 4×4 RST may be applied to each of the divided blocks.

[0286] As an embodiment, embodiments 2-1) and 2-2) may be mixed and applied. For example, only the upper left M×M area may be divided into 4×4 blocks, and then 4×4 RST may be applied.

[0287] As an embodiment, the secondary transform may be applied only to the upper left 8×8 area, and when the N×N block is equal to or greater than 8×8, 8×8 RST may be applied. When the N×N block is less than 8×8 (4×4, 8×4, and 4×8), as in the above embodiment 2-2), the N×N block may be divided into 4×4 blocks, and then 4×4 RST may be applied to each 4×4 block. In addition, even in the case of 4×N / N×4 (N>=16), 4×4 NSST may be applied.

[0288] When L (1≤L<16) transform coefficients are generated after applying 4×4 RST, there is a degree of freedom in how the L transform coefficients are arranged. However, since there will be a predetermined order when processing the transform coefficients in the residual encoding step, encoding performance may vary depending on how the L transform coefficients are arranged in the 2D block.

[0289] For example, in the case of residual coding of HEVC, coding starts from the position farthest from the DC position. This is to enhance coding performance by utilizing the fact that the quantized coefficient value is zero or close to zero as it moves away from the DC position.

[0290] Therefore, it may be advantageous in terms of encoding performance to set more important coefficients with high energy even for the L transform coefficients so that the L transform coefficients are encoded later in the order of residual encoding.

[0291] Figure 17 The three forward scanning orders are shown in units of 4×4 transform blocks (coefficient groups (CGs)) used in HEVC. Figure 17 The encoding is performed in the reverse order of the scanning order of (i.e., encoding is performed in the order of 16 to 1).

[0292] Since the above is selected according to the intra prediction mode Figure 17 Therefore, the present disclosure may be configured to determine the scanning order according to the intra prediction mode similarly even for L transform coefficients.

[0293] Figure 18 Shown are positions of significant transform coefficients of respective 4×4 blocks and a forward scanning order when diagonal scanning is applied and 4×4 RST is applied in an upper left 4×8 block as an embodiment to which the present disclosure is applied.

[0294] When following the above Figure 17 When the diagonal scan order in is used and the upper left 4×8 block is divided into 4×4 blocks and 4×4 RST is applied to each 4×4 block, if the L value is 8 (i.e., if only 8 transform coefficients are left among the 16 transform coefficients), the transform coefficients may be as shown above. Figure 18 Set up as in .

[0295] Only half of each 4x4 block may have transform coefficients, and a value of 0 may be applied by default to positions marked with an X.

[0296] Therefore, according to the above Figure 17 The scan order shown sets L transform coefficients for each 4x4 block, and residual coding is applied assuming that the 16-L remaining positions of each 4x4 block are filled with zeros.

[0297] Figure 19 A case where significant transform coefficients of two 4×4 blocks are combined into one 4×4 block when diagonal scanning is applied and 4×4 RST is applied in the upper left 4×8 block is illustrated as an embodiment to which the present disclosure is applied.

[0298] Refer to the above Figure 19, L transform coefficients set in two 4×4 blocks can be combined into one. Specifically, when the value of L is 8, since the transform coefficients of the two 4×4 blocks are combined while completely filling one 4×4 block, no transform coefficients are left in the other 4×4 block.

[0299] Therefore, since most residual coding is not required with respect to an empty 4×4 block, the corresponding coded_sub_block_flag may be coded with 0.

[0300] Furthermore, as an embodiment of the present disclosure, various schemes may be applied even to how the transform coefficients of two 4×4 blocks are mixed. The transform coefficients may be combined according to a random order, but the present disclosure may provide the following method.

[0301] 1) The transform coefficients of two 4×4 blocks are mixed alternately in the scanning order. Figure 18 In the example, when the transformation coefficient of the top block is and And the transformation coefficient of the bottom block is and When , the transform coefficients can be mixed alternately one by one, similar to Alternatively, and The order of can be changed. That is, Can be configured to come out first.

[0302] 2) The transform coefficients of the first 4×4 block may be set first, and then the transform coefficients of the second 4×4 block may be set. That is, the transform coefficients may be connected and set, similar to Alternatively, the order can be changed, like

[0303] Implementation 3: Method for encoding NSST index of 4×4 RST

[0304] As above Figure 18 As shown, when 4×4 RST is applied, the L+1st to 16th blocks may be filled with 0 values ​​according to the transform coefficient scanning order of each 4×4 block.

[0305] Therefore, when non-zero values ​​are generated at the L+1st to 16th positions in even one of the two 4×4 blocks, it can be known that this is a case where 4×4 RST is not applied.

[0306] When the 4×4 RST also has a structure in which one of the transform sets prepared as the NSST is selected and applied, a transform index (which may be referred to as an NSST index in an embodiment) of the applied transform may be signaled.

[0307] It is assumed that any decoder can know the NSST index through bitstream parsing and perform parsing after residual decoding.

[0308] When residual decoding is performed and it is confirmed that there is at least one non-zero transform coefficient between the L+1st and 16th, 4×4 RST is not applied and thus it may be configured not to parse the NSST index.

[0309] Therefore, the NSST index is only selectively parsed when necessary to reduce signaling cost.

[0310] If as above Figure 18 If 4×4 RST is applied to multiple 4×4 blocks in a specific area (for example, the same 4×4 RST may be applied to all of the multiple 4×4 blocks, or different 4×4 RSTs may be applied), the 4×4 RST applied to all of the 4×4 blocks may be specified by one NSST index. In this case, the same 4×4 RST may be specified, or a 4×4 RST applied to each of all of the 4×4 blocks may be specified.

[0311] Since whether 4×4 RST is applied to all 4×4 blocks is determined by one NSST index, it is possible to check whether there are non-zero transform coefficients at positions L+1 to 16 of all 4×4 blocks during the residual decoding process. As a result of the check, when there are non-zero transform coefficients at unacceptable positions (positions L+1 to 16) even in one 4×4 block, the NSST index may be configured not to be encoded.

[0312] NSST indexes may be signaled separately for luma blocks and chroma blocks, and in the case of chroma blocks, separate NSST indexes may be signaled for Cb and Cr, and one NSST index may be shared.

[0313] When one NSST index is shared for Cb and Cr, a 4x4 RST specified by the same NSST index may be applied. In this case, the 4x4 RSTs of Cb and Cr may be the same, or the NSST indexes may be the same but separate 4x4 RSTs may be provided.

[0314] In order to apply conditional signaling to the shared NSST index, it is checked for Cb and Cr whether there are non-zero transform coefficients in the L+1st to 16th of all 4×4 blocks, and when there are non-zero transform coefficients, the NSST index can be configured not to be signaled.

[0315] As above Figure 19 As shown, even in the case where transform coefficients of two 4×4 blocks are combined, when 4×4 RST is applied, it is checked whether there is a non-zero transform coefficient at a position where there is no valid transform coefficient, and then it can be determined whether to signal NSST.

[0316] For example, as above Figure 19 As shown in (b), when the L value is 8 and a 4×4 block (a block marked with X) does not have a valid transform coefficient when 4×4 RST is applied, the coded_sub_block_flag of the block without a valid transform coefficient may be checked. In this case, when the coded_sub_block_flag is 1, the NSST index may be configured not to be signaled.

[0317] Embodiment 4: Optimization method for the case where NSST index encoding is performed before residual encoding

[0318] When encoding of the NSST index is performed before residual encoding, whether to apply 4×4 RST is predetermined, and as a result, for a position where 0 is allocated to a transform coefficient, residual encoding may be omitted.

[0319] Here, whether 4×4 RST is applied can be configured to be known by the NSST index. For example, when the NSST index is 0, 4×4 RST is not applied.

[0320] Alternatively, the NSST index may be signaled by a separate syntax element (e.g., an NSST flag). For example, if the separate syntax element is called an NSST flag, the NSST flag is first parsed to determine whether 4x4 RST is applied, and if the NSST flag value is 1, residual coding may be omitted for positions where there may be no significant transform coefficients.

[0321] As an embodiment, when residual coding is performed, the last non-zero transform coefficient position on the TU is encoded first. When encoding the NSST index after encoding the last non-zero transform coefficient position, and assuming that 4×4 RST is applied to the position of the last non-zero transform coefficient, if the last non-zero transform coefficient position is determined to be a position where a non-zero transform coefficient may not be generated, then when the NSST index is not encoded, it can be configured not to apply 4×4 RST to the last non-zero transform coefficient position.

[0322] For example, since in the above Figure 18 In the case of positions marked with X in the 4×4 RST, no significant transform coefficients are located when 4×4 RST is applied (e.g., these positions may be filled with zero values), so encoding of the NSST index may be omitted when the last non-zero transform coefficient is located in a region marked with X. When the last non-zero transform coefficient is not located in a region marked with X, encoding of the NSST index may be performed.

[0323] As an embodiment, when checking whether 4x4 RST is applied by conditionally encoding the NSST index after encoding the last non-zero transform coefficient position, the remaining residual coding part may be processed by the following two schemes.

[0324] 1) When 4×4 RST is not applied, general residual coding remains as it is, that is, coding is performed under the assumption that non-zero transform coefficients may exist at any position from the non-zero transform coefficient position to DC.

[0325] 2) When 4×4 RST is applied, since for a specific position or a specific 4×4 block (e.g., Figure 18 There is no transform coefficient at the X position of , which may be filled with 0 by default, so the residual of the corresponding position or block may not be performed.

[0326] For example, before reaching the Figure 18 In the case of a position marked as X in , encoding of sig_coeff_flag can be omitted. Here, sig_coeff_flag means a flag indicating whether there is a non-zero transform coefficient at the corresponding position.

[0327] When the transform coefficients of the two blocks are as above Figure 19 When combined as shown, for a 4x4 block assigned with 0, encoding of coded_sub_block_flag may be omitted and the corresponding value may be derived as 0, and all corresponding 4x4 blocks may be derived as zero values ​​without separate encoding.

[0328] In the case where the NSST index is encoded after encoding the non-zero transform coefficient positions, when the x position P of the last non-zero transform coefficient x and y position P y Less than T x and T y , NSST index encoding may be omitted and 4×4 RST may not be applied.

[0329] For example, T x =1 and T y =1 means that for the case where there is a non-zero transform coefficient at the DC position, NSST index encoding is omitted.

[0330] The scheme of determining whether to encode the NSST index by comparing with a threshold value can be applied differently to luma and chroma. For example, different T values ​​can be applied to luma and chroma. x and T y , and the threshold can be applied to luma but not chroma, or vice versa.

[0331] The above two methods (i.e., the first method of omitting NSST index encoding when the non-zero transform coefficient is located in an area where no valid transform coefficient exists and the second method of omitting NSST index encoding when each of the X coordinate and Y coordinate of the non-zero transform coefficient is less than a predetermined threshold) can be applied simultaneously.

[0332] For example, a threshold value of the position coordinates of the last non-zero transform coefficient may be checked first, and then it may be checked whether the last non-zero transform coefficient is located in a region where no significant transform coefficient exists. Alternatively, the order may be changed.

[0333] The method presented in Embodiment 4 is applicable even to 8×8 RST. That is, when the last non-zero transform coefficient is located in an area other than the upper left 4×4 in the upper left 8×8 area, encoding of the NSST index can be omitted. If not, NSST index encoding can be performed.

[0334] Furthermore, when both the X and Y coordinate values ​​of the non-zero transform coefficient are less than a threshold, encoding of the NSST index may be omitted. Alternatively, the two methods may be applied together.

[0335] Implementation 5: Applying different NSST index coding and residual coding schemes to luma and chroma when applying RST

[0336] The schemes described in Embodiments 3 and 4 above can be applied differently to luma and chroma, respectively. That is, the NSST index encoding and residual encoding schemes of luma and chroma can be applied differently.

[0337] For example, luma may adopt the scheme of embodiment 4 above, and chroma may adopt the scheme of embodiment 3 above. Alternatively, luma may adopt the conditional NSST index encoding presented in embodiment 3 or 4 above, while chroma may not adopt conditional NSST index encoding, or vice versa.

[0338] Figure 20 The flowchart of encoding a video signal based on a reduced quadratic transform is an embodiment to which the present disclosure is applied.

[0339] The encoder may determine (or select) a forward secondary transform based on at least one of the prediction mode, block shape, and / or block size of the current block (S2010). In this case, the candidates for the forward secondary transform may include the above Figure 6 and / or Figure 12 at least one of the embodiments of .

[0340] The encoder can determine the optimal forward quadratic transform through rate-distortion optimization. The optimal forward quadratic transform may correspond to one of multiple transform combinations, and the multiple transform combinations may be defined by transform indices. For example, for RD optimization, all results of the forward quadratic transform, quantization, residual coding, etc. may be performed for each candidate comparison. In this case, equations such as cost = rate + λ distortion or cost = distortion + λ rate may be used, but the present disclosure is not limited thereto.

[0341] The encoder may signal a secondary transform index corresponding to the optimal forward secondary transform (S2020). Here, the secondary transform index may adopt other embodiments described in the present disclosure.

[0342] For example, the secondary transformation index can be used as above Figure 12 Since one transform set includes two or three transforms depending on the intra prediction mode, it can be configured to select one of up to four transforms, except when a secondary transform is not applied. When indices 0, 1, 2, and 3 are assigned to the four transforms, respectively, the applied transform can be specified by signaling a secondary transform index for each transform coefficient block. In this case, index 0 can be assigned when the identity matrix (i.e., the secondary transform) is not applied.

[0343] As another embodiment, the signaling of the secondary transform index may be performed in any of the following steps: 1) before residual coding; 2) in the middle of residual coding (after encoding the non-zero transform coefficient positions); or 3) after residual coding. The embodiments will be described in detail below.

[0344] 1) Method of signaling secondary transform index before residual coding

[0345] The encoder may determine the forward quadratic transform.

[0346] The encoder may signal a secondary transform index corresponding to the forward secondary transform.

[0347] The encoder may encode the position of the last non-zero transform coefficient.

[0348] The encoder may perform residual encoding on syntax elements other than the position of the last non-zero transform coefficient.

[0349] 2) Method of signaling the secondary transform index in the middle of residual coding

[0350] The encoder may determine the forward quadratic transform.

[0351] The encoder may encode the position of the last non-zero transform coefficient.

[0352] When the non-zero transform coefficient is not located in a specific region, the encoder may encode a secondary transform index corresponding to the forward secondary transform. Here, when a reduced secondary transform is applied, the specific region refers to a remaining region other than the location where the non-zero transform coefficient may exist when the transform coefficient is arranged according to the scan order. However, the present disclosure is not limited thereto.

[0353] The encoder may perform residual encoding on syntax elements other than the position of the last non-zero transform coefficient.

[0354] 3) Method for signaling a secondary transform index before residual coding

[0355] The encoder can determine a forward secondary transform.

[0356] The encoder can encode the position of the last non-zero transform coefficient.

[0357] When the non-zero transform coefficients are not in a specific region, the encoder can perform residual coding on syntax elements other than the position of the last non-zero transform coefficient. Here, in the case of applying a reduced secondary transform, the specific region represents the remaining region other than the positions where non-zero transform coefficients may exist when the transform coefficients are set according to the scan order. However, the present disclosure is not limited thereto.

[0358] The encoder can signal a secondary transform index corresponding to the forward secondary transform.

[0359] In addition, the encoder can perform a forward first-order transform (S2030) on the current block (residual block). Here, step S2010 and / or step S2020 can be similarly applied to the forward first transform.

[0360] The encoder can perform a forward secondary transform (S2040) on the current block using an optimal forward secondary transform. For example, the optimal forward secondary transform can be a reduced secondary transform. A reduced secondary transform is a transform that takes N residual data (N×1 residual vector) as input and outputs L (L < N) transform coefficient data (L×1 transform coefficient vector).

[0361] As an implementation, a reduced secondary transform can be applied to a specific region of the current block. For example, when the current block is N×N, the specific region can mean the upper left N / 2×N / 2 region. However, the present disclosure is not limited thereto and can be configured differently according to at least one of the prediction mode, block shape, or block size. For example, when the current block is N×N, the specific region can mean the upper left M×M region (M ≤ N).

[0362] In addition, the encoder performs quantization on the current block to generate a transform coefficient block (S2050).

[0363] The encoder performs entropy coding on the transform coefficient block to generate a bitstream.

[0364] Figure 21 It is a flowchart for decoding a video signal based on a reduced secondary transform as an implementation mode applying the present disclosure.

[0365] The decoder can obtain a secondary transform index from the bitstream (S2110). Here, the secondary transform index can adopt other implementation modes described in the present disclosure. For example, the secondary transform index can include at least one of the above Figure 6 and / or Figure 12 implementation modes.

[0366] As another implementation, the obtaining of the secondary transform index can be performed in any one of the following steps: 1) before residual coding; 2) in the middle of residual coding (after decoding the positions of non-zero transform coefficients); or 3) after residual coding.

[0367] The decoder can derive the secondary transform corresponding to the secondary transform index (S2120). In this case, the candidates for the secondary transform can include at least one of the above Figure 6 and / or Figure 12 implementations.

[0368] However, steps S2110 and S2120 are implementations, and the present disclosure is not limited thereto. For example, the decoder may not obtain the secondary transform index, but instead derive the secondary transform based on at least one of the prediction mode, block shape, and / or block size of the current block.

[0369] In addition, the decoder can obtain the transform coefficient block by performing entropy decoding on the bitstream, and perform dequantization on the transform coefficient block (S2130).

[0370] The decoder can perform an inverse secondary transform on the dequantized transform coefficient block (S2140). For example, the inverse secondary transform can be a reduced secondary transform. A reduced secondary transform means a transform that takes in N residual data (N×1 residual vector) and outputs.L (L < N) transform coefficient data (L×1 transform coefficient vector).

[0371] As an implementation, the reduced secondary transform can be applied to a specific region of the current block. For example, when the current block is N×N, the specific region can mean the upper left N / 2×N / 2 region. However, the present disclosure is not limited thereto, and can be configured differently according to at least one of the prediction mode, block shape, or block size. For example, when the current block is N×N, the specific region can mean the upper left M×M region (M ≤ N) or M×L (M ≤ N, L ≤ N).

[0372] In addition, the decoder can perform an inverse primary transform on the result of the inverse secondary transform (S2150).

[0373] The decoder generates a residual block through step S2150, and the residual block and the prediction block are added together to generate a reconstructed block.

[0374] Figure 22 A content stream system to which the present disclosure is applied is shown.

[0375] Refer to Figure 22 , the content stream system to which the present disclosure is applied can basically include an encoding server, a stream server, a web server, a media storage device, a user device, and a multimedia input device.

[0376] The encoding server is basically used to compress the content input from the multimedia input device (e.g., a smartphone, camera, or camcorder) into digital data to generate a bitstream and send the bitstream to the streaming server. For another example, if the multimedia input device (e.g., a smartphone, camera, or camcorder) directly generates the bitstream, the encoding server can be omitted.

[0377] The bitstream may be generated by applying the encoding method or bitstream generation method of the present disclosure. The streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0378] The streaming server sends multimedia data to user devices via a web server based on user requests. The web server acts as an intermediary to inform users of available services. When a user requests a desired service from the web server, the web server sends the request to the streaming server. The streaming server then sends the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the instructions and responses between devices within the content streaming system.

[0379] The streaming server may receive content from a media storage device and / or an encoding server. For example, if the content is received from an encoding server, the streaming server may receive the content in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a given time.

[0380] Examples of user devices may include mobile phones, smart phones, laptop computers, terminals for digital broadcasting, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., watch-type terminals (smart watches), glasses-type terminals (smart glasses), and head-mounted displays (HMDs)), digital TVs, desktop computers, and digital signage.

[0381] The servers in the content streaming system can operate as distributed servers. In this case, the data received from the servers can be distributed and processed.

[0382] As described above, the embodiments described in the present disclosure may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in the drawings may be implemented and executed on a computer, processor, microprocessor, controller, or chip.

[0383] In addition, the decoder and encoder to which the present disclosure is applied may be included in multimedia broadcast transmission and reception devices, mobile communication terminals, home theater video devices, digital theater video devices, cameras for surveillance, video conversation devices, real-time communication devices such as video communication, mobile streaming devices, storage media, cameras, video on demand (VoD) service providing devices, over-the-top (OTT) video devices, Internet streaming service providing devices, three-dimensional (3D) video devices, video phone devices, and medical video devices, and may be used to process video signals or data signals. For example, OTT video devices may include game consoles, Blu-ray players, Internet access TVs, home theater systems, smart phones, tablet PCs, and digital video recorders (DVRs).

[0384] In addition, the processing method to which the present disclosure is applied can be generated in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the present disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include all types of storage devices that store computer-readable data. For example, computer-readable recording media may include Blu-ray discs (BDs), universal serial buses (USBs), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. In addition, computer-readable recording media include media implemented in the form of carrier waves (e.g., transmission over the Internet). In addition, the bit stream generated using the encoding method can be stored in a computer-readable recording medium or can be sent via wired and wireless communication networks.

[0385] In addition, the embodiments of the present disclosure may be implemented as a computer program product using program code. According to the embodiments of the present disclosure, the program code may be executed by a computer. The program code may be stored on a carrier that can be read by a computer.

[0386] Industrial Applicability

[0387] The above-described preferred embodiments of the present disclosure are disclosed for illustrative purposes, and those skilled in the art may improve, change, replace or add various other embodiments without departing from the technical spirit and scope of the present disclosure disclosed in the appended claims.

Claims

1. A video decoding method performed by a decoder, the video decoding method comprising the following steps: deriving quantized transform coefficients for a current block from a bitstream; deriving transform coefficients by performing dequantization on the quantized transform coefficients; performing an inverse quadratic transform on the transform coefficients based on an inverse quadratic transform matrix; inducing a residual block by performing an inverse primary transform on the transform coefficients on which the inverse secondary transform is performed; and generating a reconstructed block based on a prediction block for the current block and the residual block, The inverse quadratic transform is a transform that inputs L transform coefficients and outputs N transform coefficients, where L is less than N, and The secondary transform index associated with the inverse secondary transform matrix is ​​obtained from the bitstream based on the fact that there is no last non-zero transform coefficient at the positions of the (L+1)th to Nth transform coefficients among the transform coefficients of the current block.

2. The video decoding method according to claim 1, wherein: The inverse secondary transform is applied to an upper left M×M area in the current block, where M≤N.

3. The video decoding method according to claim 1, wherein: Based on the inverse secondary transform being performed, a 4×4 secondary transform is applied to each of the divided 4×4 blocks in the current block.

4. The video decoding method according to claim 1, further comprising the following steps: Obtaining a primary transform index of the current block from the bitstream, wherein the primary transform index is related to any one of a plurality of transform combinations configured by a combination of discrete sine transform type 7 DST7 and / or discrete cosine transform type 8 DCT8; and Derivation of a transformation combination associated with the primary transformation index, wherein the transform combination comprises a horizontal transform and a vertical transform, and the horizontal transform and the vertical transform are associated with either the DST7 or the DCT8, and Wherein, the inverse primary transform is performed based on the transform combination.

5. A video encoding method performed by an encoder, the video encoding method comprising the following steps: Derive the residual block for the current block; Performing a transformation on the residual block; deriving a transform coefficient for the current block by performing a secondary transform based on a secondary transform matrix on a result of the primary transform; deriving quantized transform coefficients by performing quantization on the transform coefficients; as well as encoding information on the quantized transform coefficient and a secondary transform index associated with the secondary transform matrix to generate a bitstream, The secondary transform is a transform that inputs N transform coefficients and outputs L transform coefficients, where L is less than N, and The secondary transform index is configured to be obtained from the bitstream based on the fact that there is no last non-zero transform coefficient at positions of the (L+1)th to Nth transform coefficients among the transform coefficients of the current block.

6. A method for transmitting video data, the method comprising the following steps: Obtaining a bitstream of the video, wherein the bitstream is generated based on the following steps: deriving a residual block for a current block, performing a primary transform on the residual block, deriving transform coefficients for the current block by performing a secondary transform based on a secondary transform matrix on a result of the primary transform, deriving quantized transform coefficients by quantizing the transform coefficients, and encoding information about the quantized transform coefficients and a secondary transform index related to the secondary transform matrix to generate a bitstream; and sending said data comprising said bitstream, The secondary transform is a transform that inputs N transform coefficients and outputs L transform coefficients, where L is less than N, and The secondary transform index is configured to be obtained from the bitstream based on the fact that there is no last non-zero transform coefficient at positions of the (L+1)th to Nth transform coefficients among the transform coefficients of the current block.

Citation Information

Patent Citations

  • Method and device for processing video signal by using reduced secondary transform

    CN112166613A

  • Encoder, decoder, computer readable storage medium, and device for transmitting data

    CN115604468A