Video signal processing method and device based on intra-frame prediction

By using a combination of intra-frame sub-partitioning and position-related intra-frame prediction in video signal processing, combined with low-frequency inseparable transformation, the problem of low video signal processing efficiency in the existing technology is solved, and more efficient video signal encoding and decoding is achieved.

CN118694973APending Publication Date: 2024-09-24VIDACIO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410905478.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-03-27
Filing Date
2020-02-28
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

Existing video signal processing technology has low efficiency in the encoding and decoding process and is difficult to meet the latest media and data transmission requirements. In particular, there are insufficient efficiency problems in intra-frame prediction and transformation.

Method used

The position-dependent intra prediction combination (PDPC) and low-frequency non-separable transform (LFNST) methods based on intra-frame sub-partitions are used to improve the accuracy and compression performance of intra-frame prediction by dividing intra-frame sub-partitions and performing position-dependent intra prediction sample filtering .

Benefits of technology

It improves the efficiency of video signal encoding and decoding, enhances prediction accuracy and compression performance, and is suitable for modern media and data transmission needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118694973A_ABST
    Figure CN118694973A_ABST
Patent Text Reader

Abstract

The invention discloses a video signal processing method and device based on intra-frame prediction. The video signal processing method may comprise the steps of: determining whether an intra sub-partition (ISP) mode is applicable to a current block; if the ISP mode is applicable to the current block, splitting the current block into a plurality of rectangular transform blocks in a horizontal or vertical direction; generating a prediction block of the transform blocks by performing intra prediction on each of the transform blocks; and reconstructing the current block based on the residual block and the prediction block of the transform block.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with application number 202080016690.3 (PCT / KR2020 / 002920) filed on August 25, 2021, and international application date of February 28, 2020, and the invention name is “Video signal processing method and device based on intra-frame prediction”. Technical Field

[0002] The present disclosure relates to a video signal processing method and device, and more particularly, to a video signal processing method and device based on intra-frame prediction encoding or decoding of a video signal. Background Art

[0003] Compression coding refers to a series of signal processing techniques for sending digitized information through communication lines or storing information in a form suitable for storage media. Objects of compression coding include objects such as voice, video, and text, and in particular, the technology for performing compression coding on images is called video compression. Compression coding of video signals is performed by removing excess information in consideration of spatial correlation, temporal correlation, and random correlation. However, with the recent development of various media and data transmission media, more efficient video signal processing methods and devices are needed. Summary of the invention

[0004] Technical issues

[0005] One aspect of the present disclosure is to improve video signal coding efficiency. Specifically, the present disclosure proposes a method for performing position-dependent intra prediction combination (PDPC) and low frequency non-separable transform (LFNST) according to the application of intra sub-partitioning to perform prediction and reconstruction units.

[0006] Technical Solution

[0007] In view of this, the present disclosure provides the following video signal processing device and video signal processing method.

[0008] According to an embodiment of the present disclosure, a video signal processing method may include: determining whether to apply an intra sub-partitioning (ISP) mode to a current block; when the ISP mode is applied to the current block, dividing the current block into multiple horizontal or vertical rectangular transform blocks; generating a prediction block of the transform block by performing intra prediction on each of the transform blocks; and reconstructing the current block based on the residual block and the prediction block of the transform block, wherein generating the prediction block includes performing position-dependent intra prediction sample filtering in units of transform blocks obtained by dividing the current block.

[0009] As an embodiment, generating the prediction block may further include determining whether to apply position-dependent intra prediction sample filtering based on at least one of a width and a height of each of the transform blocks.

[0010] As an embodiment, determining whether to apply position-dependent intra-frame prediction sample filtering may include: if the width of each of the transform blocks is equal to or greater than a preconfigured reference value, and the height of each of the transform blocks is equal to or greater than a preconfigured reference value, determining to apply position-dependent intra-frame prediction sample filtering.

[0011] As an embodiment, a residual block of a transform block may be derived by performing inverse secondary transform and inverse primary transform in units of a transform block.

[0012] As an embodiment, the method may further include: determining whether to apply a secondary transform to the current block; when applying a secondary transform to the current block, deriving a secondary transform core set applied to the current block from a secondary transform core set predefined based on an intra prediction mode of the current block; determining a secondary transform core applied to the current block from the determined secondary transform core set; generating a secondary inverse transform block of the transform block by performing an inverse secondary transform in units of transform blocks; and generating a residual block of the transform block by performing an inverse primary transform on the secondary inverse transform block.

[0013] An embodiment of the present disclosure provides a video signal processing device including a processor, wherein the processor is configured to: determine whether to apply an intra sub-partitioning (ISP) mode to a current block; when the ISP mode is applied to the current block, divide the current block into multiple horizontal or vertical rectangular transform blocks; generate a prediction block of the transform block by performing intra prediction on each of the transform blocks; and reconstruct the current block based on the residual block and the prediction block of the transform block, and the processor is configured to perform position-dependent intra prediction sample filtering in units of transform blocks obtained by dividing the current block.

[0014] As an embodiment, the processor may determine whether to apply position-dependent intra prediction sample filtering based on at least one of a width and a height of each of the transform blocks.

[0015] As an embodiment, if the width of each of the transform blocks is equal to or greater than a preconfigured reference value and the height of each of the transform blocks is equal to or greater than a preconfigured reference value, the processor may determine to apply position-dependent intra prediction sample filtering.

[0016] As an embodiment, a residual block of a transform block may be derived by performing inverse secondary transform and inverse primary transform in units of a transform block.

[0017] As an embodiment, the processor may: determine whether to apply a secondary transform to the current block; if the secondary transform is applied to the current block, derive a secondary transform core set applied to the current block from a secondary transform core set predefined based on an intra prediction mode of the current block; determine a secondary transform core applied to the current block from the determined secondary transform core set; perform an inverse secondary transform in units of transform blocks to generate a secondary inverse transform block of the transform block; and generate a residual block of the transform block by performing an inverse primary transform on the secondary inverse transform block.

[0018] An embodiment of the present disclosure provides a video signal processing method, including: determining whether to apply an intra sub-partitioning (ISP) mode to a current block; when the ISP mode is applied to the current block, dividing the current block into a plurality of horizontal or vertical rectangular transform blocks; generating a prediction block of the transform block by performing intra prediction on each of the transform blocks; and generating a residual block of the transform block by subtracting the prediction block from the original block, wherein generating the prediction block includes performing position-dependent intra prediction sample filtering in units of transform blocks obtained by dividing the current block.

[0019] An embodiment of the present disclosure provides a non-transitory computer-readable medium, in which a computer-executable component configured to be executed by one or more processors of a computing device is stored, wherein the computer-executable component: determines whether to apply an intra sub-partitioning (ISP) mode to a current block; if the ISP mode is applied to the current block, divides the current block into multiple horizontal or vertical rectangular transform blocks; generates a prediction block of the transform block by performing intra prediction on each of the transform blocks; and reconstructs the current block based on the residual block and the prediction block of the transform block, and the computer-executable component performs position-dependent intra-frame prediction sample filtering in units of transform blocks obtained by dividing the current block.

[0020] Beneficial Effects

[0021] According to an embodiment of the present disclosure, the video signal coding efficiency can be improved. In addition, according to an embodiment of the present disclosure, position-dependent intra prediction combination (PDPC) and LFNST are performed in units of transform blocks divided by intra sub-partitioning, so that the accuracy of prediction can be improved and the compression performance can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention.

[0023] Figure 2 is a schematic block diagram of a video signal decoding apparatus according to an embodiment of the present invention.

[0024] Figure 3 An embodiment in which a coding tree unit is divided into coding units in a picture is shown.

[0025] Figure 4 Embodiments of methods for signaling partitioning of quadtrees and multi-type trees are shown.

[0026] Figure 5 and Figure 6 According to an embodiment of the present disclosure, the intra prediction method is illustrated in more detail.

[0027] Figure 7 An inter-frame prediction method according to an embodiment of the present disclosure is illustrated.

[0028] Figure 8 is a diagram specifically illustrating a method for transforming a residual signal by an encoder.

[0029] Fig. 9 is a diagram specifically illustrating a method for obtaining a residual signal by inversely transforming a transform coefficient through an encoder and a decoder.

[0030] Fig.10 is a diagram illustrating a method of applying an intra prediction mode if a coding block is divided into a plurality of transform blocks according to an embodiment of the present disclosure.

[0031] Fig.11 is a diagram illustrating a method for applying position-dependent intra prediction combining (PDPC) according to an embodiment of the present disclosure.

[0032] Fig.12 is a diagram illustrating an example of reference samples for PDPC according to an intra prediction mode as an embodiment of the present disclosure.

[0033] Fig.13 is a diagram illustrating an example of reference samples for PDPC according to an intra prediction mode as an embodiment of the present disclosure.

[0034] Fig.14 is a diagram illustrating an example of a method for applying intra sub-partitioning (ISP) and position-dependent intra prediction combination (PDPC) to a coding block according to an embodiment to which the present disclosure is applied.

[0035] Fig.15 is a diagram illustrating a transform unit partition processing method according to an embodiment of the present disclosure.

[0036] Fig.16 is a diagram illustrating a process of performing encoding / decoding through primary transform and secondary transform according to an embodiment to which the present disclosure is applied.

[0037] Fig.17 is a diagram illustrating a method for selecting a transform kernel for secondary transform according to an embodiment of the present disclosure.

[0038] Fig.18is a diagram illustrating an example of a method for applying secondary transform in units of transform blocks according to an embodiment of the present disclosure.

[0039] Fig.19 is a diagram illustrating a method for applying PDPC to a current coding block to which an intra prediction mode has been applied according to an embodiment to which the present disclosure is applied.

[0040] Fig. 20 is a flowchart illustrating a video signal processing method according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0041] Considering the functions in the present disclosure, the terms used in this specification may be common terms that are currently widely used, but may be changed according to the intention of those skilled in the art, customs, or the emergence of new technologies. In addition, in some cases, there may be terms arbitrarily selected by the applicant, and in this case, their meanings are described in the corresponding description section of the present disclosure. Therefore, the terms used in this specification should be interpreted based on the substantial meaning of the terms and contents throughout the specification.

[0042] In this specification, some terms may be explained as follows. In some cases, coding may be explained as encoding or decoding. In this specification, a device that generates a video signal bit stream by performing coding (coding) of a video signal is referred to as a coding device or encoder, and a device that performs decoding (decoding) of a video signal bit stream to reconstruct a video signal is referred to as a decoding device or decoder. In addition, in this specification, a video signal processing device is used as a term that includes the concepts of both encoders and decoders. Information is a term that includes all values, parameters, coefficients, elements, etc. In some cases, the meaning is interpreted differently, so the present disclosure is not limited thereto. "Unit" is used as a meaning that refers to a basic unit of image processing or a specific position of a picture, and refers to an image area that includes both luminance components and chrominance components. In addition, "block" refers to an image area that includes a specific component among luminance components and chrominance components (ie, Cb and Cr). However, depending on the embodiment, terms such as "unit", "block", "partition" and "area" may be used interchangeably. In addition, in this specification, a unit may be used as a concept that includes all of a coding unit, a prediction unit and a transform unit. A picture indicates a field or a frame, and these terms may be used interchangeably according to an embodiment.

[0043] Figure 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention. Figure 1 The encoding device 100 of the present invention includes a transform unit 110, a quantization unit 115, an inverse quantization unit 120, an inverse transform unit 125, a filtering unit 130, a prediction unit 150 and an entropy coding unit 160.

[0044] The transform unit 110 obtains the value of the transform coefficient by transforming the residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit 150. For example, discrete cosine transform (DCT), discrete sine transform (DST) or wavelet transform can be used. DCT and DST perform transformation by dividing the input picture signal into a plurality of blocks. In the transformation, the coding efficiency can vary according to the distribution and characteristics of the values ​​in the transformation area. The quantization unit 115 quantizes the value of the transform coefficient value output from the transform unit 110.

[0045] In order to improve the coding efficiency, instead of the method of coding the picture signal as it is, a method is used to predict the picture using the area that has been encoded by the prediction unit 150, and to obtain the reconstructed picture by adding the residual value between the original picture and the predicted picture to the predicted picture. In order to prevent the mismatch between the encoder and the decoder, when the prediction is performed in the encoder, information that can be used in the decoder should be used. To this end, the encoder performs the process of reconstructing the encoded current block again. The inverse quantization unit 120 inversely quantizes the value of the transform coefficient, and the inverse transform unit 125 reconstructs the residual value using the inversely quantized transform coefficient value. At the same time, the filtering unit 130 performs a filtering operation to improve the quality of the reconstructed picture and improve the coding efficiency. For example, a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter may be included. The filtered picture is output or stored in a decoded picture buffer (DPB) 156 to be used as a reference picture.

[0046] In order to improve coding efficiency, the picture signal is not coded as it is, but a method of predicting the picture via the prediction unit 150 by using the coded area and adding the residual value between the original picture and the predicted picture to the predicted picture is used to obtain a reconstructed picture. The intra prediction unit 152 performs intra prediction in the current picture, and the inter prediction unit 154 predicts the current picture by using the reference picture stored in the decoded picture buffer 156. The intra prediction unit 152 performs intra prediction from the reconstructed area in the current picture and transmits the intra coding information to the entropy coding unit 160. The inter prediction unit 154 may include a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains a motion vector value of the current area by referring to a specific reconstructed area. The motion estimation unit 154a transmits the position information (reference frame, motion vector, etc.) of the reference area to the entropy coding unit 160 so that the position information is included in the bitstream. The motion compensation unit 154b performs inter motion compensation by using the motion vector value transmitted from the motion estimation unit 154a.

[0047] The prediction unit 150 includes an intra prediction unit 152 and an inter prediction unit 154. The intra prediction unit 152 performs intra prediction within the current picture, and the inter prediction unit 154 performs inter prediction to predict the current picture by using the reference picture stored in the DBP 156. The intra prediction unit 152 performs intra prediction from the reconstructed sample in the current picture, and transmits intra coding information to the entropy coding unit 160. The intra coding information may include at least one of an intra prediction mode, a most probable mode (MPM) flag, and an MPM index. The intra coding information may include information about the reference sample. The inter prediction unit 154 may include a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains a motion vector value of a current area by referring to a specific area of ​​the reconstructed reference picture. The motion estimation unit 154a transmits a motion information set (reference picture index, motion vector information, etc.) for the reference area to the entropy coding unit 160. The motion compensation unit 154 b performs motion compensation by using the motion vector value transferred from the motion estimation unit 154 a . The inter prediction unit 154 transfers inter encoding information including motion information about the reference region to the entropy coding unit 160 .

[0048] According to another embodiment, the prediction unit 150 may include an intra block copy (BC) prediction unit (not shown). The intra BC prediction unit performs intra BC prediction based on the reconstructed sample in the current picture, and transmits intra BC coding information to the entropy coding unit 160. The intra BC prediction unit obtains a block vector value indicating a reference area for predicting the current area with reference to a specific area in the current picture. The intra BC prediction unit may perform intra BC prediction using the obtained block vector value. The intra BC prediction unit transmits the intra BC coding information to the entropy coding unit 160. The intra BC coding information may include block vector information.

[0049] When performing the above-mentioned picture prediction, the transform unit 110 transforms the residual value between the original picture and the predicted picture to obtain a transform coefficient value. In this case, the transform can be performed in units of a specific block within the picture, and the size of the specific block can be changed within a preset range. The quantization unit 115 quantizes the transform coefficient value generated in the transform unit 110 and sends it to the entropy coding unit 160.

[0050] The entropy coding unit 160 performs entropy coding on information indicating quantized transform coefficients, intra-frame coding information, inter-frame coding information, etc. to generate a video signal bit stream. In the entropy coding unit 160, a variable length coding (VLC) scheme, an arithmetic coding scheme, etc. can be used. The variable length coding (VLC) scheme includes transforming input symbols into continuous codewords, and the length of the codeword can be variable. For example, frequently occurring symbols are represented by short codewords, while rarely occurring symbols are represented by long codewords. A context-based adaptive variable length coding (CAVLC) scheme can be used as a variable length coding scheme. Arithmetic coding can transform continuous data symbols into a single prime number, wherein arithmetic coding can obtain the best bit required to represent each symbol. Context-based adaptive binary arithmetic coding (CABAC) can be used as arithmetic coding. For example, the entropy coding unit 160 can binarize the information indicating the quantized transform coefficients. The entropy coding unit 160 can generate a bit stream by arithmetic coding binary information.

[0051] The generated bitstream is encapsulated using a network abstraction layer (NAL) unit as a basic unit. A NAL unit includes an integer number of coded coding tree units. In order to decode the bitstream in a video decoder, first, the bitstream must be separated into NAL units, and then each separated NAL unit must be decoded. At the same time, the information required to decode the video signal bitstream can be sent through a raw byte sequence payload (RBSP) of a high-level set such as a picture parameter set (PPS), a sequence parameter set (SPS), a video parameter set (VPS), etc.

[0052] at the same time, Figure 1 The block diagram of the encoding device 100 according to an embodiment of the present invention is shown, and the blocks shown separately logically distinguish and show the elements of the encoding device 100. Therefore, the elements of the encoding device 100 described above may be installed as one chip or multiple chips depending on the design of the device. According to an embodiment, the operation of each element of the encoding device 100 described above may be performed by a processor (not shown).

[0053] Figure 2 2 is a schematic block diagram of a video signal decoding apparatus 200 according to an embodiment of the present invention. Figure 2 The decoding device 200 of the present invention includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 225, a filtering unit 230 and a prediction unit 250.

[0054] The entropy decoding unit 210 performs entropy decoding on the video signal bit stream to extract transform coefficient information, intra-frame coding information, inter-frame coding information, etc. for each region. For example, the entropy decoding unit 210 can obtain a binarization code for transform coefficient information for a specific region from the video signal bit stream. The entropy decoding unit 210 obtains a quantized transform coefficient by inverse binarization of the binary code. The inverse quantization unit 220 inverse quantizes the quantized transform coefficient, and the inverse transform unit 225 restores the residual value by using the inverse quantized transform coefficient. The video signal processing device 200 restores the original pixel value by adding the residual value obtained by the inverse transform unit 225 to the predicted value obtained by the prediction unit 250.

[0055] At the same time, the filtering unit 230 performs filtering on the picture to improve the image quality. This may include a deblocking filter for reducing block distortion and / or an adaptive loop filter for removing distortion of the entire picture. The filtered picture is output or stored in the DPB 256 to be used as a reference picture for the next picture.

[0056] The prediction unit 250 includes an intra prediction unit 252 and an inter prediction unit 254. The prediction unit 250 generates a predicted picture by using the encoding type, the transform coefficient of each region, and the intra / inter encoding information decoded by the above-mentioned entropy decoding unit 210. In order to reconstruct the current block in which decoding is performed, the decoded region of the current picture or other pictures including the current block may be used. In reconstruction, only the current picture, that is, the picture (or tile / slice) in which only intra prediction or intra BC prediction is performed is referred to as an intra picture or an I picture (or tile / slice), and the picture (or tile / slice) in which all intra prediction, inter prediction, and intra BC prediction can be performed is referred to as an inter picture (or tile / slice). In order to predict the sample values ​​of each block in an inter-frame picture (or tile / slice), a picture (or tile / slice) using up to one motion vector and a reference picture index is called a predicted picture or a P picture (or tile / slice), and a picture (or tile / slice) using up to two motion vectors and a reference picture index is called a bidirectional predicted picture or a B picture (or tile / slice). In other words, a P picture (or tile / slice) uses up to one motion information set to predict each block, and a B picture (or tile / slice) uses up to two motion information sets to predict each block. Here, a motion information set includes one or more motion vectors and a reference picture index.

[0057] The intra prediction unit 252 generates a prediction block using the intra coding information and the reconstructed samples in the current picture. As described above, the intra coding information may include at least one of an intra prediction mode, a most probable mode (MPM) flag, and an MPM index. The intra prediction unit 252 predicts the sample value of the current block by using the reconstructed samples located to the left and / or above the current block as reference samples. In the present disclosure, the reconstructed samples, the reference samples, and the samples of the current block may represent pixels. Moreover, the sample value may represent a pixel value.

[0058] According to an embodiment, the reference sample may be a sample included in a neighboring block of the current block. For example, the reference sample may be a sample adjacent to the left boundary of the current block and / or the sample may be a sample adjacent to the upper boundary. Moreover, the reference sample may be a sample located on a line within a predetermined distance from the left boundary of the current block and / or a sample located on a line within a predetermined distance from the upper boundary of the current block among the samples of the neighboring blocks of the current block. In this case, the neighboring blocks of the current block may include a left (L) block, an upper (A) block, a lower left (BL) block, an upper right (AR) block, or an upper left (AL) block.

[0059] The inter prediction unit 254 generates a prediction block using the reference picture and inter coding information stored in the DPB 256. The inter coding information may include a motion information set (reference picture index, motion vector information, etc.) for the current block of the reference block. Inter prediction may include L0 prediction, L1 prediction, and bidirectional prediction. L0 prediction means prediction using one reference picture included in the L0 picture list, and L1 prediction means prediction using one reference picture included in the L1 picture list. To this end, a motion information set (e.g., motion vector and reference picture index) may be required. In the bidirectional prediction method, up to two reference areas may be used, and the two reference areas may exist in the same reference picture or may exist in different pictures. That is, in the bidirectional prediction method, up to two motion information sets (e.g., motion vector and reference picture index) may be used, and the two motion vectors may correspond to the same reference picture index or different reference picture indexes. In this case, in terms of time, the reference picture may be displayed (or output) before and after the current picture. According to an embodiment, the two reference areas used in the bidirectional prediction scheme may be areas selected from the picture list L0 and the picture list L1, respectively.

[0060] The inter-frame prediction unit 254 can use the motion vector and the reference picture index to obtain the reference block of the current block. The reference block is in the reference picture corresponding to the reference picture index. Moreover, the sample value of the block specified by the motion vector or its interpolated value can be used as the predictor of the current block. For motion prediction with sub-pel unit pixel accuracy, for example, an 8-tap interpolation filter for luminance signal and a 4-tap interpolation filter for chrominance signal can be used. However, the interpolation filter for motion prediction in sub-pixel units is not limited to this. In this way, the inter-frame prediction unit 254 performs motion compensation to predict the texture of the current unit based on the motion picture previously reconstructed using motion information. In such a case, the inter-frame prediction unit can use a motion information set.

[0061] According to another embodiment, the prediction unit 250 may include an intra BC prediction unit (not shown). The intra BC prediction unit may reconstruct the current region by referring to a specific region including the reconstructed sample in the current picture. The intra BC prediction unit obtains intra BC encoding information of the current region from the entropy decoding unit 210. The intra BC prediction unit obtains a block vector value of the current region indicating the specific region in the current picture. The intra BC prediction unit may perform intra BC prediction by using the obtained block vector value. The intra BC encoding information may include block vector information.

[0062] The reconstructed video picture is generated by adding the prediction value output from the intra prediction unit 252 or the inter prediction unit 254 to the residual value output from the inverse transform unit 225. That is, the video signal decoding apparatus 200 reconstructs the current block using the prediction block generated by the prediction unit 250 and the residual obtained from the inverse transform unit 225.

[0063] at the same time, Figure 2 The block diagram of the decoding device 200 according to an embodiment of the present invention is shown, and the blocks shown separately logically distinguish and show the elements of the decoding device 200. Therefore, the elements of the above-mentioned decoding device 200 may be installed as one chip or multiple chips depending on the design of the device. According to the embodiment, the operation of each element of the above-mentioned decoding device 200 may be performed by a processor (not shown).

[0064] Figure 3An embodiment in which a coding tree unit (CTU) is partitioned into coding units (CU) in a picture is illustrated. In the encoding process of a video signal, a picture may be partitioned into a series of coding tree units (CTUs). A coding tree unit consists of an NxN block of luminance samples and two blocks of chrominance samples corresponding thereto. A coding tree unit may be partitioned into a plurality of coding units. A coding tree unit may not be partitioned and may be a leaf node. In this case, the coding tree unit itself may be a coding unit. A coding unit refers to a basic unit for processing a picture in the processing of the above-mentioned video signal, i.e., intra / inter prediction, transform, quantization and / or entropy coding. The size and shape of a coding unit in a picture may not be constant. A coding unit may have a square or rectangular shape. A rectangular coding unit (or rectangular block) includes a vertical coding unit (or vertical block) and a horizontal coding unit (or horizontal block). In this specification, a vertical block is a block whose height is greater than the width, and a horizontal block is a block whose width is greater than the height. In addition, in this specification, a non-square block may refer to a rectangular block, but the present disclosure is not limited thereto.

[0065] refer to Figure 3 , firstly, the compilation tree unit is split into a quadtree (QT) structure. That is, a node having a size of 2NX2N in the quadtree structure can be split into four nodes having a size of NXN. In this specification, a quadtree may also be referred to as a quadtree. Quadtree splitting may be performed recursively, and not all nodes need to be split at the same depth.

[0066] At the same time, the leaf nodes of the above-mentioned quadtree can be further divided into a multi-type tree (MTT) structure. According to an embodiment of the present invention, in a multi-type tree structure, a node can be divided into a binary or ternary tree structure divided horizontally or vertically. That is, in a multi-type tree structure, there are four segmentation structures, such as vertical binary segmentation, horizontal binary segmentation, vertical ternary segmentation and horizontal ternary segmentation. According to an embodiment of the present invention, in each tree structure, the width and height of the node can have a power of 2. For example, in a binary tree (BT) structure, a node of 2NX2N size can be divided into two NX2N nodes by vertical binary segmentation, and divided into two 2NXN nodes by horizontal binary segmentation. In addition, in a ternary tree (TT) structure, a node of 2NX2N size is divided into (N / 2)X2N, NX2N and (N / 2)X2N nodes by vertical ternary segmentation, and is divided into 2NX(N / 2), 2NXN and 2NX(N / 2) nodes by horizontal ternary segmentation. This multi-type tree splitting can be performed recursively.

[0067] The leaf nodes of the multi-type tree can be coding units. If the partitioning for the coding unit is not indicated or the coding unit is not large for the maximum transform length, the coding unit is used as a unit of prediction and transformation without further division. On the other hand, at least one of the following parameters in the above-mentioned quadtree and multi-type tree can be predefined or sent through the RBSP of the high-level set such as PPS, SPS, VPS, etc. 1) CTU size: the root node size of the quadtree, 2) Minimum QT size MinQtSize: the minimum allowed QT leaf node size, 3) Maximum BT size MaxBtSize: the maximum allowed BT root node size, 4) Maximum TT size MaxTtSize: the maximum allowed TT root node size, 5) Maximum MTT depth MaxMttDepth: the maximum allowed depth of the MTT partitioned from the leaf node of the QT, 6) Minimum BT size MinBtSize: the minimum allowed BT leaf node size, 7) Minimum TT size MinTtSize: the minimum allowed TT leaf node size.

[0068] Figure 4 An embodiment of a method for signaling the partitioning of a quadtree and a multi-type tree is shown. A preset flag may be used to signal the partitioning of the quadtree and the multi-type tree. Figure 4 , at least one of the flag “qt_split_flag” indicating whether to split a quadtree node, the flag “mtt_split_flag” indicating whether to split a multi-type tree node, the flag “mtt_split_vertical_flag” indicating the split direction of the multi-type tree node, or the flag “mtt_split_binary_flag” indicating the split type of the multi-type tree node may be used.

[0069] According to an embodiment of the present invention, the coding tree unit is the root node of the quadtree and can be first split into a quadtree structure. In the quadtree structure, a signal "qt_split_flag" is sent for each node "QT_node". If the value of "qt_split_flag" is 1, the node is split into 4 square nodes, and if the value of "qt_split_flag" is 0, the corresponding node becomes a leaf node "QT_leaf_node" of the quadtree.

[0070] Each quad leaf node "QT_leaf_node" can be further split into a multi-type tree structure. In the multi-type tree structure, "mtt_split_flag" is signaled for each node "MTT_node". When the value of "mtt_split_flag" is 1, the corresponding node is split into multiple rectangular nodes, and when the value of "mtt_split_flag" is 0, the corresponding node is a leaf node "MTT_leaf_node" of the multi-type tree. When the multi-type tree node "MTT_node" is split into multiple rectangular nodes (that is, when the value of "mtt_split_flag" is 1), the "mtt_split_vertical_flag" and "mtt_split_binary_flag" of the node "MTT_node" can be additionally signaled. When the value of "mtt_split_vertical_flag" is 1, it indicates the vertical division of the node "MTT_node", and when the value of "mtt_split_vertical_flag" is 0, it indicates the horizontal division of the node "MTT_node". In addition, when the value of "mtt_split_binary_flag" is 1, the node "MTT_node" is divided into 2 rectangular nodes, and when the value of "mtt_split_binary_flag" is 0, the node "MTT_node" is divided into 3 rectangular nodes.

[0071] Picture prediction (motion compensation) for encoding is performed on a coding unit that is no longer divided (ie, a leaf node of a coding unit tree). Hereinafter, a basic unit for performing prediction will be referred to as a "prediction unit" or a "prediction block".

[0072] Hereinafter, the term "unit" used herein may replace a prediction unit, which is a basic unit for performing prediction. However, the present disclosure is not limited thereto, and the "unit" may be understood as broadly covering the concept of a coding unit.

[0073] Figure 5 and Figure 6 The intra prediction method according to an embodiment of the present invention is illustrated in more detail. As described above, the intra prediction unit predicts sample values ​​of the current block by using reconstructed samples located on the left and / or above the current block as reference samples.

[0074] first, Figure 5 An embodiment of a reference sample used for prediction of a current block in an intra prediction mode is shown. According to an embodiment, the reference sample may be a sample adjacent to the left boundary of the current block and / or a sample adjacent to the upper boundary. Figure 5As shown in , when the size of the current block is WXH and samples of a single reference line adjacent to the current block are used for intra prediction, a maximum of 2W+2H+1 neighboring samples located on the left and top of the current block can be used to configure the reference samples.

[0075] When at least some samples to be used as reference samples have not been recovered, the intra prediction unit may obtain reference samples by performing a reference sample filling process. The intra prediction unit may perform a reference sample filtering process to reduce errors in intra prediction. That is, filtering may be performed on adjacent samples and / or reference samples obtained by the reference sample filling process to obtain filtered reference samples. The intra prediction unit predicts samples of the current block by using the reference samples obtained as above. The intra prediction unit predicts samples of the current block by using unfiltered reference samples or filtered reference samples. In the present disclosure, adjacent samples may include samples on at least one reference line. For example, adjacent samples may include adjacent samples on a line adjacent to a boundary of the current block.

[0076] Next, Figure 6 An embodiment of a prediction mode for intra prediction is shown. For intra prediction, intra prediction mode information indicating an intra prediction direction may be signaled. The intra prediction mode information indicates one of a plurality of intra prediction modes included in an intra prediction mode set. When a current block is an intra prediction block, a decoder receives the intra prediction mode information of the current block from a bitstream. An intra prediction unit of the decoder performs intra prediction on the current block based on the extracted intra prediction mode information.

[0077] According to an embodiment of the present invention, the intra prediction mode set may include all intra prediction modes used in intra prediction (e.g., a total of 67 intra prediction modes). More specifically, the intra prediction mode set may include a plane mode, a DC mode, and a plurality of (e.g., 65) angle modes (i.e., directional modes). Each intra prediction mode may be indicated by a preset index (i.e., an intra prediction mode index). For example, Figure 6As shown, intra-frame prediction mode index 0 indicates plane mode, and intra-frame prediction mode index 1 indicates DC mode. In addition, intra-frame prediction mode indexes 2 to 66 may indicate different angle modes, respectively. The angle modes respectively indicate angles that are different from each other within a preset angle range. For example, the angle mode may indicate an angle within an angle range (i.e., a first angle range) between 45 degrees and -135 degrees in a clockwise direction. The angle mode may be defined based on the 12 o'clock direction. In this case, intra-frame prediction mode index 2 indicates a horizontal diagonal (HDIA) mode, intra-frame prediction mode index 18 indicates a horizontal (horizontal, HOR) mode, intra-frame prediction mode index 34 indicates a diagonal (DIA) mode, intra-frame prediction mode index 50 indicates a vertical (VER) mode, and intra-frame prediction mode index 66 indicates a vertical diagonal (VDIA) mode.

[0078] In the following, reference is made to Figure 7 An inter-frame prediction method according to an embodiment of the present disclosure is described. In the present disclosure, the inter-frame prediction method may include a general inter-frame prediction method optimized for translational motion and an inter-frame prediction method based on an affine model. In addition, the motion vector may include at least one of a general motion vector for motion compensation according to the general inter-frame prediction method and a control point motion vector for affine compensation.

[0079] Figure 7 The inter-frame prediction method according to an embodiment of the present disclosure is illustrated. As described above, the decoder can refer to the reconstructed samples of another decoded picture to predict the current block. Figure 7 , the decoder obtains a reference block 702 within a reference picture 720 based on a motion information set of a current block 701. In this case, the motion information set may include a reference picture index and a motion vector (MV). The reference picture index indicates a reference picture 720 including a reference block for inter prediction of the current block in a reference picture list. According to an embodiment, the reference picture list may include at least one of an L0 picture list or an L1 picture list. The motion vector indicates an offset between a coordinate value of the current block 701 within the current picture 710 and a coordinate value of the reference block 702 within the reference picture 720. The decoder obtains a predictor of the current block 701 based on a sample value of the reference block 702 and reconstructs the current block 701 using the predictor.

[0080] Specifically, the encoder can obtain a reference block by searching for a block similar to the current block in a picture with a higher recovery sequence. For example, the encoder can search for a reference block with the smallest sum of differences in sample values ​​from the current block within a preset search area. In this case, in order to measure the similarity between the samples of the current block and the reference block, at least one of the sum of absolute differences (SAD) and the sum of Hadamard transform differences (SATD) can be used. Here, SAD may be a value obtained by adding all absolute values ​​of the differences in sample values ​​included in the two blocks. In addition, SATD may be a value obtained by adding all absolute values ​​of Hadamard transform coefficients obtained by Hadamard transform of the differences in sample values ​​included in the two blocks.

[0081] At the same time, one or more reference areas may be used to predict the current block. As described above, two or more reference areas may be used to inter-predict the current block through a pair of prediction methods. According to an embodiment, the decoder may obtain two reference blocks based on two motion information sets of the current block. Further, the decoder may obtain a first predictor and a second predictor of the current block based on sample values ​​of the two obtained reference blocks. In addition, the decoder may reconstruct the current block using the first predictor and the second predictor. For example, the decoder may reconstruct the current block based on the average value of each sample of the first predictor and the second predictor.

[0082] As described above, for motion compensation of the current block, one or more motion information sets may be signaled. In this case, similarities between motion information sets used for motion compensation of each of the multiple blocks may be used. For example, the motion information set used to predict the current block may be derived from the motion information set used to predict one of the other reconstructed samples. To this end, the encoder and decoder may reduce signaling overhead.

[0083] For example, there may be multiple candidate blocks that are likely to be predicted based on a motion information set that is the same as or similar to the motion information set of the current block. The decoder may generate a merge candidate list based on the multiple candidate blocks. Here, the merge candidate list may include candidates corresponding to samples that are likely to have been predicted based on a motion information set related to the motion information set of the current block among samples reconstructed earlier than the current block. The encoder and the decoder may configure the merge candidate list of the current block according to predefined rules. Here, the merge candidate lists configured by the encoder and the decoder, respectively, may be the same. For example, the encoder and the decoder may configure the merge candidate list of the current block based on the position of the current block in the current picture. Referring to Fig. 9 A method of configuring a merge candidate list of a current block by an encoder and a decoder is described. In the present disclosure, a position of a specific block indicates a relative position of an upper left sample of the specific block in a picture including the specific block.

[0084] At the same time, in order to improve the coding efficiency, the transform coefficient value obtained by transforming the residual signal using quantization and coding the quantized transform coefficient instead of coding the above-mentioned residual method as it is. As described above, the transform unit can obtain the transform coefficient value by transforming the residual signal. In this case, the residual signal of a specific block can be distributed over the entire area of ​​the current block. Therefore, the energy can be concentrated in the low-frequency area by frequency domain conversion of the residual signal, thereby improving the coding efficiency. In the following, the method of transforming or inverse transforming the residual signal will be described in detail.

[0085] Figure 8 is a diagram specifically showing a method for transforming a residual signal by an encoder. As described above, the residual signal in the spatial domain can be transformed into the frequency domain. The encoder can obtain a transform coefficient by transforming the obtained residual signal. First, the encoder can obtain at least one residual block including a residual signal for a current block. The residual block can be a current block or one of the blocks divided from the current block. In the present disclosure, the residual block can be referred to as a residual array or a residual matrix, which includes residual samples of the current block. In the present disclosure, the residual block can represent a transform unit or a block having the same size as a transform block.

[0086] Next, the encoder may transform the residual block by using a transform kernel. The transform kernel used to transform the residual block may be a transform kernel having separable characteristics of vertical transform and horizontal transform. In this case, the transform for the residual block may be performed as a vertical transform and a horizontal transform, respectively. For example, the encoder may perform a vertical transform by applying a transform kernel in a vertical direction of the residual block. The encoder may perform a horizontal transform by applying a transform kernel in a horizontal direction of the residual block. In the present disclosure, a transform kernel may be used as a term referring to a set of parameters for a transform of a residual signal, such as a transform matrix, a transform array, a transform function, and a transform. According to an embodiment, the transform kernel may be any one of a plurality of available kernels. Transform kernels based on different transform types may be used for each of the vertical transform and the horizontal transform. Reference will be made to Figures 12 to 20 A method for selecting one of a plurality of available transform kernels is described.

[0087] The encoder may pass the transform block transformed from the residual block to the quantization unit and quantize the transform block. The transform block may include a plurality of transform coefficients. Specifically, the transform block may include a plurality of transform coefficients arranged in two dimensions. As in the case of the residual block, the size of the transform block may be the same as the size of the current block or the block divided from the current block. The transform coefficients passed to the quantization unit may be represented as quantized values.

[0088] The encoder may perform additional transforms before quantizing the transform coefficients. Figure 8As shown, the above-mentioned transformation method may be referred to as a primary transformation, and the additional transformation may be referred to as a secondary transformation. For each residual block, a secondary transformation is optional. According to an embodiment, the encoder may improve coding efficiency by performing a secondary transformation on an area where it is difficult to concentrate energy in a low-frequency area only by the primary transformation. For example, a secondary transformation may be added to a block in which residual values ​​in directions other than the horizontal or vertical direction of the residual block show a large value. Compared with the residual values ​​of the inter-frame prediction block, the residual values ​​of the intra-frame prediction block have a higher transformation probability in directions other than the horizontal or vertical direction. Therefore, the encoder may additionally perform a secondary transformation on the residual signal of the intra-frame prediction block. The encoder may omit the secondary transformation of the residual signal for the inter-frame prediction block.

[0089] As another example, it can be determined whether to perform a secondary transform according to the size of the current block or the residual block. In addition, transform kernels with different sizes can be used according to the size of the current block or the residual block. For example, an 8X8 secondary transform can be applied to a block whose shorter side length in width or height is equal to or greater than the first preconfigured length. In addition, a 4X4 secondary transform can be applied to a block whose shorter side length in width or height is equal to or greater than the second preconfigured length and less than the first preconfigured length. The first preconfigured length may be greater than the second preconfigured length, but the present disclosure is not limited thereto. In addition, unlike the primary transform, the secondary transform may not be divided into a vertical transform and a horizontal transform. This secondary transform may be referred to as a low-frequency inseparable transform (LFNST).

[0090] In the case of a video signal in a specific area, even if a frequency transform is performed due to a sudden change in brightness, the energy in the high frequency band is not reduced. Therefore, the compression performance attributed to quantization may be degraded. When a transform is performed on an area where residual values ​​rarely exist, the encoding time and the decoding time may be unnecessarily increased. Therefore, the transform of the residual signal of a specific area can be omitted. Whether to perform a transform on the residual signal of a specific area can be determined by a syntax element related to the transform of the specific area. For example, the syntax element may include transform skip information. The transform skip information may be a transform skip flag. If the transform skip information about the residual block indicates a transform skip, the transform of the residual block is not performed. In this case, the encoder may immediately quantize the residual signal on which the transform of the corresponding area is not performed. It can be performed via Figure 1 The transformation unit performs the reference Figure 8 Describes the operation of the encoder.

[0091] The above-mentioned transform-related syntax elements may be information parsed from a video signal bitstream. The decoder may perform entropy decoding on the video signal bitstream to obtain the transform-related syntax elements. The encoder may perform entropy coding on the transform-related syntax elements to generate a video signal bitstream.

[0092] Fig. 9 It is a diagram specifically illustrating a method for obtaining a residual signal by inversely transforming a transform coefficient through an encoder and a decoder. For ease of description, the inverse transform operation performed by the inverse transform unit of each of the encoder and the decoder will be described. The inverse transform unit can obtain a residual signal by inversely transforming the inverse quantized transform coefficient. First, the inverse transform unit can detect whether to perform an inverse transform on a specific region from the transform-related syntax element of the region. According to an embodiment, when the transform-related syntax element for a specific transform block indicates a transform skip, the transform of the transform block can be omitted. In this case, the above-mentioned primary inverse transform and secondary inverse transform of the transform block can be omitted. The inverse quantized transform coefficient can be used as a residual signal. For example, the decoder can reconstruct the current block by using the inverse quantized transform coefficient as a residual signal.

[0093] According to another embodiment, the transform-related syntax element for a specific transform block may not indicate transform skipping. In this case, the inverse transform unit may determine whether to perform a secondary inverse transform on the secondary transform. For example, when the transform block is a transform block of an intra-frame prediction block, a secondary inverse transform may be performed on the transform block. The secondary transform kernel for the transform block may be determined based on the intra-frame prediction mode corresponding to the transform block. As another example, it may be determined whether to perform a secondary inverse transform based on the size of the transform block. The secondary inverse transform may be performed after inverse quantization and before the primary inverse transform.

[0094] The inverse transform unit may perform a primary inverse transform on the inverse quantized transform coefficient or the transform coefficient of the secondary inverse transform. In the case of the primary inverse transform, as in the case of the primary transform, the vertical transform and the horizontal transform may be performed separately. For example, the inverse transform unit may obtain a residual block by performing a vertical inverse transform and a horizontal inverse transform on the transform block. The inverse transform unit may inverse transform the transform block based on a transform core for transforming the transform block. For example, the encoder may explicitly or implicitly signal information indicating a transform core applied to the current transform block among a plurality of available transform cores. The decoder may select a transform core to be used for the inverse transform of the transform block from among a plurality of available transform cores using information indicating the signaled transform core. The inverse transform unit may reconstruct the current block by using a residual signal obtained by inverse transforming the transform coefficients.

[0095] Fig.101 is a diagram illustrating a method of applying an intra prediction mode when a coding block is divided into a plurality of transform blocks according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, an intra prediction mode may be determined in units of a coding unit (or a coding block) (hereinafter referred to as a block). In addition, a coding unit may be divided into a plurality of transform blocks. In an embodiment, an intra prediction mode may be modified (or analyzed, determined, improved) based on the shape of a coding block.

[0096] In an embodiment, a method is provided for reanalyzing intra prediction modes when a block is not a square block. Fig.10 , nTbW may be a variable indicating the width of a transform block, and nTbH may be a variable indicating the height of a transform block. nTbW may be a variable indicating the width of a coding block, and nTbH may be a variable indicating the height of a coding block. With respect to a block to which intra sub-partitioning (ISP) has been applied, nTbW may be a variable indicating the width of a coding block, and nTbH may be a variable indicating the height of a coding block. In addition, in the present disclosure, whRatio is a variable indicating the ratio between width and height. For example, whRatio may be configured (or defined) as Abs(Log2(nTbW / nTbH)). Hereinafter, the intra prediction mode signaled from the encoder to the decoder may be referred to as a first prediction mode (or a first intra prediction mode), and the modified (or re-analyzed, determined, improved) mode may be referred to as a second prediction mode (or a second intra prediction mode). Hereinafter, abs() indicates an operator (or function) that applies an absolute value. The modified intra prediction mode may be derived based on the following conditions.

[0097] -First condition: nTbW>nTbH

[0098] - Second condition: The first prediction mode is equal to or greater than 2

[0099] - Third condition: If whRatio>1, then the first prediction mode is less than (8+2*whRatio); if whRatio<1, then the first prediction mode is less than 8

[0100] If three conditions including the first to third conditions are satisfied, the decoder may configure 1 as wideAngle, and may configure (first prediction mode+65) as the second prediction mode. wideAngle is a variable indicating whether to use the wide angle mode.

[0101] -Fourth condition: nTbW>nTbH

[0102] -Fifth condition: The first prediction mode is equal to or less than 66

[0103] - Sixth condition: if whRatio>1, then the first prediction mode is greater than (60-2*whRatio), and if whRatio<1, then the first prediction mode is greater than 60

[0104] If the fourth to sixth conditions are all satisfied, the decoder may configure 1 as wideAngle, and may configure (first prediction mode - 67) as the second prediction mode.

[0105] According to an embodiment of the present disclosure, the intra-frame prediction mode can be divided into a basic angle mode and an extended angle mode. The basic angle mode can be an angle mode within the range of +-45 degrees relative to the vertical mode / horizontal mode, and the extended angle mode can be an angle mode exceeding +-45 degrees relative to the vertical mode / horizontal mode. Therefore, the signaled mode information can indicate whether to use the basic angle mode or the extended angle mode according to the shape of the coding block. The number of available extended angle modes can be defined based on the shape of the coding block according to the ratio between the horizontal length and the vertical length (or the ratio between the vertical length and the horizontal length). For example, the ratio can be defined (configured) by 2:1, 4:1, 8:1, 16:1, etc.

[0106] For example, Fig.10 As shown in (a), the cbWidth xcbHeight coding block determined to use intra prediction mode 2 can be divided into Fig.10 (b) shows two horizontal transform blocks. If tbWidth_1 is greater than tbHeight_1, the first transform block having a size of tbWidth_1 x tbHeight_1 may have a horizontal rectangular block shape. cbWidth is a variable indicating the width of the coding block, and cbHeight is a variable indicating the height of the coding block. tbWidth is a variable indicating the width of the transform block, and tbHeight is a variable indicating the height of the transform block.

[0107] The signaled intra prediction mode 2 may be re-analyzed based on the shape of the first transform block and then modified to an extended angle mode, which is (2+65) according to the described analysis method. Therefore, the second prediction mode may be derived (determined) as 67. That is, the intra prediction mode determined in the unit of the coding block may not be used in the same way for the unit of the transform block. In this case, performance variation may result.

[0108] Therefore, an embodiment of the present disclosure proposes the following method for applying the method for determining the wide-angle mode to apply the same intra-frame prediction mode as determined for the coding block to the transform block. As an embodiment, the encoder / decoder may configure nTbW and nTbH as cbWidth and cbHeight of the coding block to derive the second prediction mode. The encoder / decoder may determine (or decide) whether to use the wide-angle mode by using the height and width of the coding block including the transform block. Fig.10 In the embodiment, the case of dividing the transform block having a horizontal rectangular shape is shown as an example, but the present disclosure is not limited thereto. That is, the proposed embodiment can even be applied to the case of separating vertical rectangular, square or various combination shapes in the same manner.

[0109] Fig.11 is a diagram illustrating a method for applying position-dependent intra prediction combining (PDPC) according to an embodiment of the present disclosure. PDPC may be applied to an intra block if all of the following conditions are satisfied.

[0110] Condition 1. IntraSubPartitionsSplitType (ISP partition type) is ISP_NO_SPLIT, or cIdx (component index) is not equal to 0.

[0111] Condition 2: refIdx (reference sample line index) is the same as 0, or cIdx is different from 0.

[0112] Condition 3. If at least one of the following conditions is met:

[0113] -predModeIntra (intra prediction mode) is INTRA_PLANAR

[0114] -predModeIntra (intra prediction mode) is INTRA_DC

[0115] -predModeIntra (intra prediction mode) is INTRA_ANGULAR18

[0116] -predModeIntra (intra prediction mode) is INTRA_ANGULAR50

[0117] -predModeIntra (intra prediction mode) is equal to or less than INTRA_ANGULAR10

[0118] -predModeIntra (intra prediction mode) is equal to or greater than INTRA_ANGULAR58 According to an embodiment of the present disclosure, the PDPC operation may be applied according to the following method. The PDPC described in the present disclosure is not limited to its name, and such PDPC may be referred to as position-dependent intra prediction sample filtering.

[0119] As an embodiment, pred(x, y) as a prediction sample located at (x, y) may be predicted by using a linear combination of reference samples according to PDPC and an intra prediction mode (eg, DC, planar, or directional mode) as in Equation 1 below.

[0120] [Equation 1]

[0121] pred(x,y)=(wL×R -1,y +wT×R x,-1 –wTL×R -1,-1 +(64–wL–wT

[0122] +wTL)×pred(x,y)+32)>>6

[0123] In this equation, R x,-1 and R -1,y Indicates the reference samples located to the left and above the current sample (x, y), R -1,-1 Indicates a reference sample located at the upper left of the current block. If the DC mode is applied to the current block, a weight (which may be referred to as a PDPC weight) may be calculated based on Equation 2 below.

[0124] [Equation 2]

[0125] wT=32>>((y<<1)>>shift),wL=32>>((x<<1)>>shift),wTL=(wL>>4)+(wT>>4)

[0126] In Equation 2, the shift may be configured as ((log2(width)–2+log2(height)–2+2)>>2. For planar mode, wTL may be configured as 0 (wTL=0), for horizontal mode, wTL may be configured as wT (wTL=wT), and for vertical mode, wTL may be configured as wL (wTL=wL). The PDPC weight may be calculated based only on summation and shift operations. The value of pred(x,y) may be calculated through a single stage using Equation 1 above.

[0127] If PDPC is applied to DC, planar, horizontal and / or vertical modes, additional boundary filtering may not be needed. As an example, the additional boundary filtering may include DC mode boundary filtering or horizontal / vertical mode edge filtering based on conventional image compression techniques (e.g., HEVC).

[0128] Fig.12 is a diagram illustrating an example of reference samples for PDPC according to an intra prediction mode as an embodiment of the present disclosure. Fig.12 ,exist Fig.12 In (a), it is assumed that the intra prediction mode is prediction mode 2, and Fig.12 In (b), it is assumed that the intra prediction mode is prediction mode 66. Specifically, Fig.12 Reference sample R showing the case where PDPC is applied to the upper right diagonal pattern x,-1 , R -1,y and R -1,-1 The prediction sample pred(x',y') represents the prediction sample at (x',y') in the prediction block. Reference sample R x,-1 The coordinate x of the reference sample R is given by x=x'+y'+1. -1,y The coordinate y of is given as y=x'+y'+1.

[0129] According to an embodiment of the present disclosure, the PDPC weight for the upper right diagonal pattern may be determined according to Equation 3 below.

[0130] [Equation 3]

[0131] wT=16>>((y'<<1)>>shift),wL=16>>((x'<<1)>>shift),wTL=0

[0132] Fig.13 is a diagram illustrating an example of reference samples for PDPC according to an intra prediction mode as an embodiment of the present disclosure. Fig.13 ,exist Fig.13 In (a), it is assumed that the mode number (or mode index) of the intra prediction mode is one of 3 to 10, and Fig.13 In (b), it is assumed that the mode number of the intra prediction mode is one of 58 to 65. Fig.12 , Fig.13 Reference sample R showing the case where PDPC is applied to the lower left diagonal pattern x,-1 , R -1,y and R -1,-1 The prediction sample pred(x',y') represents the prediction sample at (x',y') in the prediction block. Reference sample R x,-1The coordinate x of is given as x=x'+y'+1. In addition, similarly, the reference sample R -1,y The coordinate y of is given as y=x'+y'+1.

[0133] According to an embodiment of the present disclosure, the PDPC weight for the lower left diagonal pattern may be determined according to Equation 4 below.

[0134] [Equation 4]

[0135] wT=16>>((y'<<1)>>shift), wL=16>>((x'<<1)>>shift), wTL=0.

[0136] exist Fig.13 In case (a), regarding the upper right diagonal pattern, the PDPC weight can be defined as in the following Equation 5.

[0137] [Equation 5]

[0138] wT=32>>((y'<<1)>>shift),wL=0,wTL=0

[0139] In the same way, Fig.13 In case (b), regarding the lower left diagonal pattern, the PDPC weight can be defined as in the following Equation 6.

[0140] [Equation 6]

[0141] wL=32>>((x'<<1)>>shift),wT=0,wTL=0

[0142] refer to Fig.12 and Fig.13 , as an example, in the case of applying PDPC to DC, planar, horizontal and / or vertical modes, as Fig.13 As shown, for diagonal patterns and patterns adjacent to diagonal patterns, additional boundary filtering may not be required.

[0143] can be derived based on the table defined for directional mode intra prediction Fig.13 The coordinates of the reference sample of the example shown. As described above, the table can be defined by a diagonal pattern and its adjacent patterns. Therefore, the advantage is that no additional table is required according to the PDPC implementation described in the present disclosure. In addition, when calculating the coordinates x and y, multiplication operations may not be used. In addition, in an embodiment, when the coordinates of the reference sample are fractional, linear interpolation can be performed on the reference sample.

[0144] Fig.141 is a diagram illustrating an example of a method for applying intra sub-partitioning (ISP) and position-dependent intra prediction combination (PDPC) to a coding block according to an embodiment to which the present disclosure is applied. Fig.14 (a), the current coding block can be represented by W×H using width (W) and height (H). Fig.14 (b) illustrates an example of vertically dividing the current coding block into four transform blocks in case the ISP mode is applied. Fig.14 (c) shows the Fig.14 (b) is an example of applying PDPC in units of divided transform blocks.

[0145] In an embodiment, the encoder / decoder may use (or apply) interpolation filtering in units of transform blocks to which ISP has been applied, such as Fig.14 (b). Interpolation filtering indicates a method of obtaining sample values ​​from reference samples. As an embodiment, if the filter flag is 0, the encoder / decoder may use cubic interpolation filter coefficients, and if the filter flag is 1, Gaussian interpolation filter coefficients may be used. The encoder / decoder may determine the reference sample value by using the determined interpolation filter coefficients, and may use the value as a prediction value. In addition, in an embodiment, the encoder / decoder may configure 1 as a filter flag for a block whose transform block is a luminance component and to which ISP has been applied. As another example, the encoder / decoder may determine whether to apply an interpolation filter based on the filter flag.

[0146] In addition, in an embodiment, the encoder / decoder may configure (or determine) the filter flag value based on the width (W) and height (H) of the block relative to the transform block as the luminance component and to which the ISP has been applied. As an embodiment, the encoder / decoder may configure the flag value by comparing the number of samples (W*H) of the block with a predefined (or preconfigured) specific reference value. For example, the encoder / decoder may perform comparisons such as W*H>reference value, W*H>=reference value, W*H<reference value, and W*H<=reference value. As another method, the encoder / decoder may configure the filter flag value differently by comparing each of the width and height of the block with a reference value. As an embodiment, the condition for determining the filter flag value may be defined by (W>reference value and H>reference value) or (W>reference value or H>reference value). In the above example, the sign of the inequality is not limited to "greater than the reference value", but may also be defined as "equal to", "equal to or greater than", "less than", "equal to or less than". The reference values ​​applied to W and H may be different from each other, and different inequality signs may be applied to them. Alternatively, the filter flag value may be configured according to whether the block size belongs to a specific block size range.

[0147] Reference Fig.14 (c), in an embodiment of the present disclosure, the encoder / decoder may apply PDPC to a block to which ISP has been applied. For example, the encoder / decoder may determine whether to apply PDPC to a block to which ISP has been applied based on the number of samples of the block (W*H). In an embodiment, a condition for determining whether to apply PDPC based on the number of samples of the block may be defined. For example, the condition may be W*H>reference value, W*H>=reference value, W*H<reference value, and W*H<=reference value. The reference value may be a pre-configured value. As another embodiment, the condition for determining whether to apply PDPC may be defined by (W>reference value and H>reference value) or may be defined by (W>reference value or H>reference value). In the above example, the sign of the inequality is not limited to "greater than the reference value", but may also be defined as "equal to", "equal to or greater than", "less than", "equal to or less than". For example, the condition for determining whether to apply PDPC may be defined by (W≥reference value and H≥reference value) or may be defined by (W≥reference value or H≥reference value). As an example, reference values ​​applied to W and H may be the same as or different from each other, and may be defined with the same sign (or the same inequality sign) or different signs.

[0148] In addition, refer to Fig.14 (c), in an embodiment of the present disclosure, a process of dividing a block to which ISP is applied into a plurality of rectangular transform blocks and performing encoding / decoding in units of the divided transform blocks may be performed. In an embodiment, the encoder / decoder may apply PDPC in units of coding blocks rather than in units of transform blocks. That is, with respect to a coding block to which ISP is applied, the encoder / decoder may perform PDPC in units of coding blocks rather than in units of transform blocks.

[0149] Reference Fig.14 (c), in an embodiment of the present disclosure, when the encoder / decoder applies PDPC to a block to which ISP has been applied, the encoder / decoder may apply PDPC to certain modes among the modes to which PDPC is applied only when specific conditions defined for certain modes are satisfied. For example, as in the above-mentioned embodiment, if the application of PDPC is determined based on the number of samples or width / height, the reference value may be configured differently for the planar mode, the horizontal mode, and the vertical mode.

[0150] In addition, according to an embodiment of the present disclosure, when the encoder / decoder determines whether to apply reference sample filtering, the encoder / decoder may configure a filter flag indicating whether filtering is applied based on whether the block is a block to which ISP and / or PDPC are applied. For example, the filter flag of a block to which ISP and PDPC have been applied may be configured to have a fixed value of 0 or 1. Alternatively, the filter flag value of a block to which ISP and PDPC have been applied may be determined by a mode-dependent intra-frame smoothing (MDIS) condition. Alternatively, the encoder / decoder may apply different filter flag values ​​to blocks to which ISP and PDPC have been applied and to blocks to which only ISP has been applied.

[0151] In addition, according to an embodiment of the present disclosure, when the encoder / decoder determines the wide-angle mode, the encoder / decoder may reconfigure the intra prediction mode based on the width and height of the coding block. For example, the encoder / decoder may perform a process of reanalyzing the wide-angle mode based on the width and height of the coding block for the block to which the ISP has been applied, and may configure the reference sample filter flag based on the process. Alternatively, the encoder / decoder may configure the wide-angle mode application method differently based on the partition direction / size of the block to which the ISP has been applied. As an embodiment, a specific partition direction may be applied based on the width / height of the transform block or the width / height of the coding block, and other directions may be applied according to different schemes. As another embodiment, the encoder / decoder may apply the wide-angle mode based on the width and height of each of the divided transform blocks. For example, if the minimum value of the width and height of the transform block is greater than or equal to or greater than the reference value, the wide-angle mode may be applied using the height and width of the coding block, and if the minimum value is less than or equal to or less than the reference value, the wide-angle mode may be applied using the width and height of the transform block. Alternatively, conversely, if the minimum value of the width and height of the transform block is greater than or equal to or greater than the reference value, the wide-angle mode may be applied using the width and height of the transform block, and if the minimum value is less than or equal to or less than the reference value, the wide-angle mode may be applied using the height and width of the coding block.

[0152] In the above description, references may be applied in combination or individually. Figures 10 to 14 Furthermore, the above-described embodiments may be applied by a decoder and an encoder in substantially the same manner.

[0153] Fig.15 2 is a diagram illustrating a transformation unit partition processing method according to an embodiment of the present disclosure. Fig.15In an embodiment of the present disclosure, the encoder / decoder may split a current block (coding block or coding unit) into a plurality of transform blocks to encode or decode the current block. As an embodiment, if the intra sub-partitioning (ISP) mode is applied, the coding block may be divided into a plurality of transform blocks. Alternatively, if the size of the coding block is greater than the maximum transform size, the coding block may be divided into a plurality of transform blocks. If the intra sub-partitioning mode is applied, the coding block may be divided into horizontal or vertical rectangular transform blocks and may be divided into two or four transform blocks, such as Fig.15 shown.

[0154] Fig.16 is a diagram illustrating a process of performing encoding / decoding through primary transform and secondary transform according to an embodiment to which the present disclosure is applied. As described above, a coding block may be divided into a plurality of transform blocks, and an encoder / decoder may apply transform to the divided transform blocks. Fig.16 An example of applying two transforms to a transform block is shown. Fig.16 The forward primary transform shown indicates the transform that is first applied by the reference encoder side and may be referred to as the primary transform in this disclosure. Fig.16 The forward secondary transform shown indicates the transform applied for the second time with reference to the encoder side, and may be referred to as the secondary transform in the present disclosure. The secondary transform (i.e., inverse secondary transform) and the primary transform (i.e., inverse primary transform) may be sequentially performed on the inverse quantized transform block with reference to the decoder side. As described above, the secondary transform may be referred to as a low frequency non-separable transform (LFNST).

[0155] In an embodiment of the present disclosure, the transformation matrix (or transformation kernel, transformation type) used for the primary transformation can be a transformation matrix known in traditional image compression technology, such as DCT-2, DST-7 and DCT-8. The secondary transformation can be applied to a partial area in the transformation block according to the size of the coding block. For example, the partial area can be a 4x4 area, or an 8x8 area. The position of the partial area can be the upper left area of ​​the coding block (or transformation block). As an embodiment, if the width and height of the coding block are both greater than 4, the transformation can be applied to the upper left 8x8 area, and if one of the width and height is equal to 4, the transformation can be applied to the upper left 4x4 area. The secondary transformation can be applied to the luminance component and chrominance component of the block that has been coded according to the intra-frame mode.

[0156] Fig.17 is a diagram illustrating a method for selecting a transform kernel for secondary transform according to an embodiment of the present disclosure. Fig.17 , the transform kernel set (or transform type set, transform matrix set) can be determined based on the prediction mode for intra prediction and defined in the encoder / decoder Fig.17 In this embodiment, the intra prediction mode can be defined by -14 to 83. Fig.17 As shown, a transform kernel set can be determined for each intra prediction mode group. The same index can be applied to the luminance component and the chrominance component. The secondary transform kernel set is determined based on the intra prediction mode, and the transform kernel set can be determined after obtaining (or determining) the intra prediction mode. Therefore, a correlation problem is caused. Therefore, in an embodiment of the present disclosure, a method for eliminating this correlation is described.

[0157] As an embodiment, the encoder / decoder may determine the transform kernel set applied to the current block according to the intra prediction mode by considering the following matters.

[0158] -The ratio of the horizontal length to the vertical length, or the ratio of the vertical length to the horizontal length of the CU

[0159] -CU size

[0160] -Type of initial transformation

[0161] -MTS Index

[0162] -Whether to apply implicit MTS

[0163] The encoder / decoder may determine the transform kernel set based on the above matters. One of the above matters or a combination of multiple thereof may be used to determine the transform kernel set.

[0164] Fig.18 is a diagram illustrating an example of a method for applying a secondary transform in units of transform blocks according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, an encoder / decoder may divide a coding block (or coding unit) into a plurality of transform blocks (or transform units), and may apply a secondary transform to each transform block. The secondary transform may be applied to each of a plurality of transform blocks into which one coding unit is divided. The size of each transform block is determined based on a method of dividing the coding unit. The size of each transform block of a coding unit to which an ISP has been applied may be determined based on vertical division or horizontal division, such as Fig.15 As shown, the size can be determined according to the number of additional partitions. The number of partitions of the block to which ISP has been applied can be 2 or 4. Fig.18 The case where vertical partitioning is one coding unit of a block to which ISP is applied and the number of partitions is 4 is illustrated. Fig.14 In (b), if the size of the coding unit is WxH, the size of each transform block may be W / 4xH. The size of the transform block may be used as the width and height to determine whether to apply a secondary transform.

[0165] According to an embodiment of the present disclosure, the encoder / decoder may use the same transform core set for each of the transform blocks, or may use different transform core sets. If the divided transform blocks use the same intra prediction mode and are the same size, the blocks may use the same transform core. Conversely, the encoder / decoder may determine and use a core set for each of the transform blocks. The luminance component of the coding unit to which the intra sub-partitioning mode has been applied is transformed into multiple transform blocks, but its chrominance component may not be divided. In this case, the luminance transform block and the chrominance transform block may use the same secondary transform core set, and the size of the coding block to which the secondary transform block is applied needs to be satisfied. In addition, the luminance transform block and the chrominance transform block may have different sizes. The encoder / decoder may apply a secondary transform to a 4x4 or 8x8 region according to the condition of the block size to which the secondary transform block is applied. As another method, the encoder / decoder may use the same region as the region applied to the luminance transform for the chrominance component. The intra-frame prediction mode for luminance and the intra-frame prediction mode for chrominance may be different from each other, so the encoder / decoder may use different transform core sets. This description is given with respect to a method for determining a kernel set based on an intra prediction mode, but it can be applied to reference Fig.17 All methods described for determining the set of kernels for quadratic transforms.

[0166] According to an embodiment of the present disclosure, if the size of a coding unit is larger than the maximum transform size, the coding unit may be divided into multiple transform blocks without separate signaling. In this case, if a secondary transform is applied, performance may be reduced and complexity may increase. Therefore, the maximum coding block to which the secondary transform is applied may be limited. The size of the maximum coding block may be the same as the maximum transform size. Alternatively, a pre-configured size of the coding block may be used. The pre-configured value may be 64, 32, or 16, but the present disclosure is not limited thereto. The pre-configured value may be the length value of the longer side or the total number of samples.

[0167] In addition, in an embodiment, the encoder / decoder may not limit the size of the secondary transform block to the upper left 4x4 or 8x8 area of ​​the coding unit, and may define 2x8, 8x2, 4x16, 16x4, 2x32, and 32x2 areas. The encoder / decoder may adaptively / without signaling determine the area to which the secondary transform is applied, taking into account the ratio of the horizontal length to the vertical length or the ratio of the vertical length to the horizontal length of the coding block.

[0168] Fig.19It is a diagram illustrating a method for applying PDPC to a current coding block to which an intra prediction mode is applied according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, if the current block is not a square, in the case of a DC mode among the intra prediction modes, the encoder / decoder may perform prediction using only the reference samples of the longer side. In this case, the prediction for the current coding block may not reflect the sample values ​​of the shorter side at all. In this case, the prediction value of the current block and the reference sample of the shorter side may be very different. Therefore, the encoder / decoder may perform position-based filtering on the sample during intra prediction. As described above, in the present disclosure, this position-based filtering method for samples may be referred to as PDPC. If PDPC is applied, the encoder / decoder may perform filtering based on weights in the DC mode by using the first reference sample, the second reference sample, and the reference sample value adjacent to the upper left corner. The reference sample and / or the weight applied to each reference sample may be derived by using equations 7 to 12 below.

[0169] [Equation 7]

[0170] refL[x][y]=p[-1][y]

[0171] [Equation 8]

[0172] refT[x][y]=p[x][-1]

[0173] [Equation 9]

[0174] wT[y]=32>>((y<<1)>>nScale)

[0175] [Equation 10]

[0176] wL[x]=32>>((x<<1)>>nScale)

[0177] [Equation 11]

[0178] wTL[x][y]=(predModeIntra==INTRA_DC)? ((wL[x]>>4)+(wT[y]>>4)):0

[0179] [Equation 12]

[0180] predSamples[x][y]=clip1Cmp((refL[x][y]*wL[x]+refT[x][y]*wT[y]-p[-1][-1]*wTL[x][y]+(64-wL[x]-wT[y]+wTL[x][y])*predSamples[x][y]+32)>>6)

[0181] In the above equations, the left reference sample may be derived by using equation 7, and the right reference sample may be derived by using equation 8. The weight value applied to the right reference sample may be derived by using equation 9, and the weight value applied to the left reference sample may be derived by using equation 10, and the weight value applied to the reference sample located at the upper left edge may be derived by using equation 11. Thereafter, the encoder / decoder may generate a prediction sample according to equation 12 based on the determined weight value.

[0182] According to an embodiment of the present disclosure, the encoder / decoder may configure different weight values ​​for relatively longer and shorter sides of non-square blocks (not square blocks). For example, the encoder / decoder may configure the weight value applied to the relatively longer side to be less than the weight value applied to the shorter side. In the above equations 9 and 10, if the side belongs to the shorter side, the weight value may be configured to be different from the weight value of the longer side. For example, the weight value may be configured to be 16, 8, 4, etc. instead of 32. Alternatively, the scaling variable nScale used in the above equations 9 and 10 may be used. The encoder / decoder may configure the values ​​of the longer and shorter sides according to their positions.

[0183] In an embodiment, if multiple reference line samples are used, the encoder / decoder may apply PDPC to the vertical mode and / or the horizontal mode. Alternatively, the encoder / decoder may apply PDPC to the vertical, horizontal, DC and planar modes.

[0184] Fig. 20 is a flowchart illustrating a video signal processing method according to an embodiment of the present disclosure. Fig. 20 For the sake of convenience, the description is mainly focused on the decoder, but the present disclosure is not limited thereto. The video signal processing method according to this embodiment can also be applied to the encoder in a substantially similar manner.

[0185] Reference Fig. 20 , the decoder determines whether to apply the intra sub-partitioning (ISP) mode to the current block (S2001).

[0186] If the ISP mode is applied to the current block, the decoder divides the current block into a plurality of horizontal or vertical rectangular transform blocks (S2002).

[0187] The decoder generates a prediction block of the transform block by performing intra prediction on each of the transform blocks (S2003).

[0188] The decoder reconstructs the current block based on the residual block of the transformed block and the predicted block (S2004).

[0189] As described above, the generation of the prediction block may include performing position-dependent intra prediction sample filtering in units of transform blocks obtained by dividing the current block.

[0190] Furthermore, as described above, the generation of the prediction block may further include determining whether to apply position-dependent intra prediction sample filtering based on at least one of a width and a height of each of the transform blocks.

[0191] In addition, as described above, determining whether to apply position-dependent intra-frame prediction sample filtering may include: if the width of each of the transform blocks is equal to or greater than a preconfigured reference value, and the height of each of the transform blocks is equal to or greater than a preconfigured reference value, determining to apply position-dependent intra-frame prediction sample filtering.

[0192] In addition, as described above, a residual block of a transform block may be derived by performing inverse secondary transform and inverse primary transform in units of a transform block.

[0193] In addition, as described above, the method may further include: determining whether to apply a secondary transform to the current block; when the secondary transform is applied to the current block, deriving a secondary transform core set applied to the current block from a secondary transform core set predefined based on an intra prediction mode of the current block; determining a secondary transform core applied to the current block in the determined secondary transform core set; generating a secondary inverse transform block of the transform block by performing an inverse secondary transform in units of transform blocks; and generating a residual block of the transform block by performing an inverse primary transform on the secondary inverse transform block.

[0194] The above-mentioned embodiments of the present invention may be implemented by various means. For example, the embodiments of the present invention may be implemented by hardware, firmware, software or a combination thereof.

[0195] For the case of implementation through hardware, the method according to the embodiment of the present invention can be implemented by one or more of an application specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a processor, a controller, a microcontroller, a microprocessor, etc.

[0196] In the case of implementation by firmware or software, the method according to the embodiment of the present invention can be implemented in the form of a module, process or function that performs the above functions or operations. The software code can be stored in a memory and driven by a processor. The memory can be located inside or outside the processor and can exchange data with the processor in various known ways.

[0197] Certain embodiments may also be implemented in the form of a recording medium including computer executable instructions, such as a program module executed by a computer. Computer readable media may be any available media that can be accessed by a computer, and may include all volatile, non-volatile, removable and non-removable media. In addition, computer readable media may include computer storage media and communication media. Computer storage media include all volatile, non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Typically, communication media include computer readable instructions, other data (such as data structures or program modules) or other transmission mechanisms of modulated data signals, and include any information transmission media.

[0198] The above description of the present invention is for illustrative purposes only, and it will be understood that those skilled in the art to which the present invention belongs can change the present invention without changing the technical ideas or basic features of the present invention, and the present invention can be easily modified in other specific forms. Therefore, the above embodiments are illustrative and are not limited in all aspects. For example, each component described as a single entity can be distributed and implemented, and similarly, the components described as distributed can also be implemented in an associated manner.

[0199] The scope of the present invention is defined by the appended claims rather than the detailed description above, and all changes or modifications derived from the meaning and scope of the appended claims and their equivalents should be construed as being included in the scope of the present invention.

[0200] Industrial Applicability

[0201] 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 device for decoding a video signal, the device comprising a processor, in, The processor is configured to: When an intra sub-partitioning (ISP) mode is applied to a current block, the current block is partitioned into a plurality of transform blocks, The multiple transform blocks include a first transform block and a second transform block, obtaining a first prediction block of the first transform block and a second prediction block of the second transform block, reconstructing the current block based on the first prediction block and the second prediction block, wherein the first prediction block and the second prediction block are obtained by applying position-dependent intra-frame prediction sample filtering, Wherein, the position-dependent intra-frame prediction sample filtering is applied by weighted combination of reference samples of each of the plurality of transform blocks.

2. The device according to claim 1, in, A width of each of the plurality of transform blocks is equal to or greater than a preconfigured value, and a height of each of the plurality of transform blocks is equal to or greater than the preconfigured value.

3. The device according to claim 1, in, Obtaining a first residual block of the first transform block and a second residual block of the second transform block by performing a low-frequency non-separable transform on each of the first transform block and the second transform block, The current block is reconstructed based on the first prediction block, the second prediction block, the first residual block, and the second residual block.

4. The device according to claim 3, in, A transform kernel for the low-frequency non-separable transform is determined based on an intra prediction mode of the current block.

5. The device according to claim 1, in, The intra prediction mode of the current block is a DC mode, a planar mode or an angular mode.

6. A device for encoding a video signal, the device comprising a processor, in, The processor is configured to: Obtaining a bitstream to be decoded by a decoder using a decoding method, the decoding method comprising: When an intra sub-partitioning (ISP) mode is applied to a current block, the current block is partitioned into a plurality of transform blocks, The multiple transform blocks include a first transform block and a second transform block, obtaining a first prediction block of the first transform block and a second prediction block of the second transform block, reconstructing the current block based on the first prediction block and the second prediction block, wherein the first prediction block and the second prediction block are obtained by applying position-dependent intra-frame prediction sample filtering, Wherein, the position-dependent intra-frame prediction sample filtering is applied by weighted combination of reference samples of each of the plurality of transform blocks.

7. The device according to claim 6, in, A width of each of the plurality of transform blocks is equal to or greater than a preconfigured value, and a height of each of the plurality of transform blocks is equal to or greater than the preconfigured value.

8. The device according to claim 6, in, Obtaining a first residual block of the first transform block and a second residual block of the second transform block by performing a low-frequency non-separable transform on each of the first transform block and the second transform block, The current block is reconstructed based on the first prediction block, the second prediction block, the first residual block, and the second residual block.

9. The device according to claim 8, in, A transform kernel for the low-frequency non-separable transform is determined based on an intra prediction mode of the current block.

10. The device according to claim 6, in, The intra prediction mode of the current block is a DC mode, a planar mode or an angular mode.

11. A method for obtaining a bit stream, the method comprising: When an intra sub-partitioning (ISP) mode is applied to a current block, the current block is partitioned into a plurality of transform blocks, in, The plurality of transform blocks include a first transform block and a second transform block; Obtaining a first prediction block of the first transform block and a second prediction block of the second transform block; and reconstructing the current block based on the first prediction block and the second prediction block, wherein the first prediction block and the second prediction block are obtained by applying position-dependent intra-frame prediction sample filtering, obtaining a bitstream by encoding information for the plurality of transform blocks, Wherein, the position-dependent intra-frame prediction sample filtering is applied by weighted combination of reference samples of each of the plurality of transform blocks.

12. The method according to claim 11, in, A width of each of the plurality of transform blocks is equal to or greater than a preconfigured value, and a height of each of the plurality of transform blocks is equal to or greater than the preconfigured value.

13. The method according to claim 11, in, Obtaining a first residual block of the first transform block and a second residual block of the second transform block by performing a low-frequency non-separable transform on each of the first transform block and the second transform block, The current block is reconstructed based on the first prediction block, the second prediction block, the first residual block, and the second residual block.

14. The method according to claim 13, in, A transform kernel for the low-frequency non-separable transform is determined based on an intra prediction mode of the current block.

15. The method according to claim 11, in, The intra prediction mode of the current block is a DC mode, a planar mode or an angular mode.

16. A video signal processing method, include: When an intra sub-partitioning (ISP) mode is applied to a current block, the current block is partitioned into a plurality of transform blocks, Wherein, the multiple transform blocks include a first transform block and a second transform block; Obtaining a first prediction block of the first transform block and a second prediction block of the second transform block; reconstructing the current block based on the first prediction block and the second prediction block, wherein the first prediction block and the second prediction block are obtained by applying position-dependent intra-frame prediction sample filtering, Wherein, the position-dependent intra-frame prediction sample filtering is applied by weighted combination of reference samples of each of the plurality of transform blocks.