Video signal processing method and apparatus based on intra prediction

By identifying the chroma block tree type in the video signal and deriving the prediction mode, the problem of low coding efficiency in video signal processing is solved and more efficient video signal processing is achieved.

CN118870033APending Publication Date: 2024-10-29VIDACIO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411023939.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-04-03
Filing Date
2020-02-19
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

The existing technology has insufficient coding efficiency in video signal processing and is difficult to meet the latest media and data transmission needs.

Method used

By identifying the tree type of the current chroma block, derive the chroma intra prediction mode based on the pre-configured position, generate the prediction block, and add the residual block and the prediction block to reconstruct the chroma block, especially when the luma prediction mode is frame In intra-block copy mode, the preconfigured intra-DC mode is used.

Benefits of technology

It improves the coding efficiency of video signals and adapts to new media and data transmission requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118870033A_ABST
    Figure CN118870033A_ABST
Patent Text Reader

Abstract

Disclosed are a video signal processing method and apparatus based on intra prediction. The video signal processing method comprises the steps of: identifying a tree type of a current chroma block; if the tree type of the current chrominance block is a dual-tree type, deriving a chrominance intra-frame prediction mode of the current chrominance block according to a luminance intra-frame prediction mode at a preset position; generating a prediction block of the current chroma block according to the chroma intra prediction mode; and restoring the current chroma block by adding the residual block of the current chroma block to the prediction block, where the luma intra prediction mode may be set to a preset mode if the luma prediction mode at the preset position is an intra block copy mode.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of a patent application with application number 202080015505.9 (PCT / KR2020 / 095004), which was submitted to the China Patent Office on August 19, 2021, with an international application date of February 19, 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] The present disclosure is to improve the coding efficiency of video signals.

[0006] Technical Solution

[0007] To solve the above problems, the present invention provides the following video signal processing device and video signal processing method.

[0008] According to one embodiment of the present disclosure, a video signal processing method is provided, including: identifying a tree type of a current chroma block; deriving a chroma intra-frame prediction mode of the current chroma block based on a luma intra-frame prediction mode of a preconfigured position; generating a prediction block of the current chroma block based on the chroma intra-frame prediction mode; and reconstructing the current chroma block by adding a residual block of the current chroma block to the prediction block, wherein, when the luma prediction mode of the preconfigured position is an intra-frame block copy mode, the luma intra-frame prediction mode is configured as a preconfigured mode.

[0009] As an embodiment, deriving the chroma intra prediction mode may include, according to the luma intra prediction mode, obtaining a first syntax element in which a mode index indicates a current chroma intra prediction mode in a pre-configured mapping table.

[0010] As an embodiment, the preconfigured position may be the luma position of the lower right center sample position of the current chroma block.

[0011] As an embodiment, the preconfigured mode may be an intra-frame DC mode.

[0012] As an embodiment, when the tree type of the current chroma block is a dual tree, the second syntax element indicating whether the intra block copy mode is applied to the current chroma block may be inferred as a preconfigured value without being parsed.

[0013] As an embodiment, the preconfigured value may be 0, wherein the intra block copy mode may not be applied to the current chroma block whose tree type is a dual tree. .

[0014] According to an embodiment of the present disclosure, a video signal processing device including a processor is provided, wherein the processor: identifies a tree type of a current chroma block; if the tree type of the current chroma block is a dual tree, derives a chroma intra-frame prediction mode of the current chroma block based on a luma intra-frame prediction mode of a preconfigured position; generates a prediction block of the current chroma block based on the chroma intra-frame prediction mode; and reconstructs the current chroma block by adding a residual block of the current chroma block to the prediction block, wherein, when the luma prediction mode of the preconfigured position is an intra-frame block copy mode, the luma intra-frame prediction mode is configured as a preconfigured mode.

[0015] As an embodiment, the processor may obtain, according to the luma intra prediction mode, a first syntax element in which a mode index indicates a current chroma intra prediction mode in a preconfigured mapping table.

[0016] As an embodiment, the preconfigured position may be the luma position of the lower right center sample position of the current chroma block.

[0017] As an embodiment, the preconfigured mode may be an intra-frame DC mode.

[0018] As an embodiment, when the tree type of the current chroma block is a dual tree, the second syntax element indicating whether the intra block copy mode is applied to the current chroma block may be inferred as a preconfigured value without being parsed.

[0019] As an embodiment, the preconfigured value may be 0, and the intra block copy mode may not be applied to the current chroma block whose tree type is a dual tree.

[0020] According to one embodiment of the present disclosure, a video signal processing method is provided, including: determining a tree type of a current chroma block; determining a chroma intra-frame prediction mode of the current chroma block based on a luma intra-frame prediction mode of a preconfigured position; generating a prediction block of the current chroma block based on the chroma intra-frame prediction mode; and deriving a residual block of the current chroma block by subtracting the prediction block from the original block, wherein, when the luma prediction mode of the preconfigured position is an intra-frame block copy mode, the luma intra-frame prediction mode is configured as a preconfigured mode.

[0021] According to an embodiment of the present disclosure, a non-transitory computer-readable medium (computer-executable component) is provided, in which a computer-executable component configured to be executed by one or more processors of a computing device is stored, and the computer-executable component is configured to: identify the tree type of a current chroma block; derive a chroma intra-frame prediction mode of the current chroma block based on a luma intra-frame prediction mode of a preconfigured position; generate a prediction block of the current chroma block based on the chroma intra-frame prediction mode; and reconstruct the current chroma block by adding a residual block of the current chroma block to the prediction block, wherein, when the luma prediction mode of the preconfigured position is an intra-frame block copy mode, the luma intra-frame prediction mode is configured as a preconfigured mode.

[0022] According to an embodiment of the present disclosure, a video signal processing method includes: obtaining a first syntax element indicating whether a most probable mode (MPM) is used to encode a current block, wherein the MPM indicates a mode in which an intra-prediction mode of the current block is derived from intra-prediction blocks around the current block; when the current block is not encoded using the MPM, obtaining a second syntax element configured to indicate an intra-prediction mode of the current block among intra-prediction modes other than MPM candidates; configuring an MPM candidate list based on intra-prediction modes of left and upper neighboring blocks of the current block; deriving the intra-prediction mode of the current block based on the second syntax element; and generating a prediction block of the current block based on the intra-prediction mode, wherein the intra-prediction mode of the current block is derived using a value obtained by adding 1 to the second syntax element, regardless of the MPM candidates included in the MPM candidate list.

[0023] As an embodiment, the MPM candidate list may include five MPM candidates, and the MPM candidate list may not include a planar mode.

[0024] As an embodiment, deriving the intra prediction mode may include rearranging the MPM candidate list by swapping MPM candidates in the MPM candidate list.

[0025] As an embodiment, deriving the intra prediction mode may include comparing the MPM candidate in the rearranged MPM candidate list with a value obtained by adding 1 to the second syntax element.

[0026] As an embodiment, deriving the intra prediction mode may include adding 1 to a value obtained by adding 1 to the second syntax element when the value obtained by adding 1 to the second syntax element is greater than or equal to the MPM candidate in the rearranged MPM candidate list.

[0027] As an embodiment, the method may include, when encoding the current block using the MPM, obtaining a third syntax element indicating whether the intra prediction mode of the current block is a planar mode.

[0028] According to an embodiment of the present disclosure, a video signal processing device including a processor is provided, wherein the processor obtains a first syntax element indicating whether a most probable mode (MPM) is used to encode a current block, wherein the MPM indicates a mode in which an intra-prediction mode of the current block is derived from intra-prediction blocks around the current block; when the current block is not encoded using the MPM, obtains a second syntax element configured to indicate an intra-prediction mode of the current block among intra-prediction modes other than MPM candidates; configures an MPM candidate list based on intra-prediction modes of left and upper neighboring blocks of the current block; derives the intra-prediction mode of the current block based on the second syntax element; and generates a prediction block of the current block based on the intra-prediction mode, wherein the intra-prediction mode of the current block is derived using a value obtained by adding 1 to the second syntax element, regardless of the MPM candidates included in the MPM candidate list.

[0029] As an embodiment, the MPM candidate list may include five MPM candidates, and the MPM candidate list may not include a planar mode.

[0030] As an embodiment, the processor may rearrange the MPM candidate list by exchanging MPM candidates in the MPM candidate list.

[0031] As an embodiment, the processor may compare the MPM candidates in the rearranged MPM candidate list with a value obtained by adding 1 to the second syntax element.

[0032] As an embodiment, when the value obtained by adding 1 to the second syntax element is greater than or equal to the MPM candidate in the rearranged MPM candidate list, the processor may add 1 to the value obtained by adding 1 to the second syntax element.

[0033] As an embodiment, in the video signal processing apparatus, when the current block is encoded using the MPM, the processor may acquire a third syntax element indicating whether the intra prediction mode of the current block is the planar mode.

[0034] According to an embodiment of the present disclosure, a video signal processing method is provided, comprising: encoding a first syntax element indicating whether a most probable mode (MPM) is used to encode a current block, wherein the MPM indicates a mode in which an intra-prediction mode of the current block is derived from intra-prediction blocks around the current block; when the current block is not encoded using the MPM, encoding a second syntax element configured to indicate an intra-prediction mode of the current block among intra-prediction modes other than MPM candidates; configuring an MPM candidate list based on intra-prediction modes of left and upper neighboring blocks of the current block; determining an intra-prediction mode of the current block based on the second syntax element; and generating a prediction block of the current block based on the intra-prediction mode, wherein the intra-prediction mode of the current block is derived using a value obtained by adding 1 to the second syntax element, regardless of the MPM candidates included in the MPM candidate list.

[0035] According to an embodiment of the present disclosure, a non-transitory computer-readable medium (computer-executable component) is provided, in which a computer-executable component configured to be executed by one or more processors of a computing device is stored, and the computer-executable component is configured to: obtain a first syntax element indicating whether to use a most probable mode (MPM) to encode a current block, wherein the MPM indicates a mode in which the intra-prediction mode of the current block is derived from intra-prediction blocks around the current block; when the current block is not encoded using the MPM, obtain a second syntax element configured to indicate the intra-prediction mode of the current block among intra-prediction modes other than MPM candidates; configure an MPM candidate list based on the intra-prediction modes of left and upper neighboring blocks of the current block; derive the intra-prediction mode of the current block based on the second syntax element; and generate a prediction block for the current block based on the intra-prediction mode, wherein the intra-prediction mode of the current block is derived using a value obtained by adding 1 to the second syntax element, regardless of the MPM candidates included in the MPM candidate list.

[0036] Beneficial Effects

[0037] According to the embodiments of the present disclosure, the coding efficiency of a video signal can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

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

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

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

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

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

[0045] 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.

[0046] Fig.10 is a diagram for describing a current picture reference method according to an embodiment of the present disclosure.

[0047] Fig.11 is a diagram illustrating a method of configuring a merge candidate list according to an embodiment of the present disclosure.

[0048] Fig.12 is a diagram illustrating a compilation unit syntax structure according to an embodiment of the present disclosure.

[0049] Fig.13 is a diagram illustrating a compilation unit syntax structure according to an embodiment of the present disclosure.

[0050] Fig.14 is a diagram illustrating a compilation unit syntax structure according to an embodiment of the present disclosure.

[0051] Fig.15 is a diagram illustrating a method of deriving an intra prediction mode of a chroma component according to an embodiment of the present disclosure.

[0052] Fig.16 is a diagram illustrating a method of deriving an intra prediction mode of a chroma component according to an embodiment of the present disclosure.

[0053] Fig.17 is a diagram illustrating an intra prediction mode derivation method according to an embodiment of the present disclosure.

[0054] Fig.18 is a diagram illustrating an MPM list configuration method according to an embodiment of the present disclosure.

[0055] Fig.19 is a diagram illustrating derived intra prediction modes according to an embodiment of the present disclosure.

[0056] Fig. 20is a diagram illustrating an MPM list configuration method according to an embodiment of the present disclosure.

[0057] Fig.21 is a flowchart illustrating a video signal processing method according to an embodiment of the present disclosure.

[0058] Fig. 22 is a diagram illustrating an intra prediction mode derivation method according to an embodiment of the present disclosure; and

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

[0060] 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.

[0061] 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.

[0062] Figure 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention. Figure 1The 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.

[0063] 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.

[0064] 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.

[0065] 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.

[0066] 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 .

[0067] 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.

[0068] 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.

[0069] 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.

[0070] 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.

[0071] at the same time, Figure 1The 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).

[0072] 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.

[0073] 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.

[0074] 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.

[0075] 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.

[0076] 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.

[0077] 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.

[0078] 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.

[0079] 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.

[0080] 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.

[0081] 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.

[0082] 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).

[0083] Figure 3 An 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.

[0084] 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.

[0085] 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.

[0086] 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.

[0087] 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.

[0088] 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.

[0089] 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.

[0090] 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".

[0091] 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.

[0092] 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.

[0093] 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 5 As 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.

[0094] 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.

[0095] 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.

[0096] 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.

[0097] In additional embodiments of the present disclosure, an angle mode outside the first angle range may be additionally used. As an embodiment, the angle mode outside the first angle range may be Figure 6 The number of extended angle modes can be varied depending on the size and / or shape of the current block and can be extended to Figure 6 The angle mode of 80 or -14 of the current block may be selected. For example, the number of extension angles or the index of the extension mode may be determined according to a value based on the ratio of the width and height of the current block. In an embodiment, the value based on the ratio of the width and height of the current block may be Abs(Log2(width / height)). The current block may be a transform block. Alternatively, the current block may be a CU or a PU.

[0098] 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.

[0099] 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.

[0100] 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.

[0101] 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.

[0102] 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.

[0103] 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 can generate a merge candidate list based on 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 can 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 can configure the merge candidate list of the current block based on the position of the current block in the current picture. In the present disclosure, the position of a specific block indicates the relative position of the upper left sample of the specific block in the picture including the specific block.

[0104] 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.

[0105] Figure 8 is a diagram specifically illustrating 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.

[0106] Next, the encoder can transform the residual block by using a transform kernel. The transform kernel used to transform the residual block can be a transform kernel having separable characteristics of vertical transform and horizontal transform. In this case, the transform for the residual block can be performed as a vertical transform and a horizontal transform respectively. For example, the encoder can perform a vertical transform by applying a transform kernel in the vertical direction of the residual block. The encoder can perform a horizontal transform by applying a transform kernel in the horizontal direction of the residual block. In the present disclosure, a transform kernel can be used as a term referring to a parameter set 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 can be any one of a plurality of available kernels. Transform kernels based on different transform types can be used for each of a vertical transform and a horizontal transform.

[0107] 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.

[0108] The encoder may perform additional transforms before quantizing the transform coefficients. Figure 8 As 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.

[0109] 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).

[0110] 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.

[0111] 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.

[0112] Fig. 9It 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.

[0113] 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.

[0114] 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.

[0115] Fig.10It is a diagram for describing a current picture reference method according to an embodiment of the present disclosure. As described above, when prediction is performed on a current block, the encoder / decoder may refer to a block within a reference picture (i.e., a reference block within a reference picture). According to an embodiment of the present disclosure, the reference picture may be a picture including the current block, i.e., the current picture. That is, when prediction is performed on the current block, the encoder / decoder may refer to a block within the current picture. In the present disclosure, this method of performing prediction by referring to a block within the current picture may be referred to as current picture reference (CPR) or intra-block copy (IBC). In an embodiment, when IBC is used, i.e., when CPR is applied to the current block, the current picture may be the only reference picture for IBC prediction. In this case, the encoder / decoder may perform inference without performing signaling / parsing for indicating a reference picture.

[0116] According to an embodiment, when IBC is applied, there may be a motion vector indicating a reference block referenced by the current block. According to an embodiment, when IBC is applied, the position of the reference block may be limited. For example, the position of the reference block may be limited to an area within a certain range based on the current block position. For example, the position of the reference block may be limited to an area within a coding tree unit (CTU) (i.e., current CTU) including the current block. Alternatively, the position of the reference block may be limited to a position including at least a portion of the CTU containing the current block. According to an embodiment of the present disclosure, by limiting the position of the reference block, the memory burden may be reduced and the compression efficiency may be improved.

[0117] According to an embodiment of the present disclosure, there may be signaling (or syntax elements) indicating whether the current block uses IBC (or whether IBC is applied to the current block). As an embodiment, the signaling may be signaling in a larger unit (or higher level) including the current block. For example, a syntax element indicating whether the current block uses IBC may be signaled at a slice or tile level. As an embodiment, IBC may be used when the reference picture referenced by the current block is the current picture. Alternatively, if the current picture is the only reference picture, the encoder / decoder may use IBC. In addition, if the current block is a block that does not use intra prediction, IBC may be used. That is, for example, when the reference picture corresponding to the current block is the current picture, if intra prediction is not used, IBC may be used. As an embodiment, a variable indicating whether the current picture is the only reference picture may be defined, and, for example, a variable indicating that the current picture is the only reference picture may be represented as CurrPicIsOnlyRef. Alternatively, using IBC may indicate that the reference picture is the current picture. Alternatively, using IBC may indicate that the reference picture is the current picture and does not use intra prediction.

[0118] According to an embodiment of the present disclosure, when IBC is used (or applied), the encoder / decoder may indicate (or signal) motion information by using the aforementioned merge mode, AMVP mode, etc. When IBC is used, the current slice or tile may be configured (or defined) as a P slice or P tile. When IBC is used, a flag (or syntax element or variable) indicating the use of a dual tree may be configured to indicate a value for the use of a dual tree. In the present disclosure, a dual tree may refer to a tree corresponding to a luminance component and a tree corresponding to a chrominance component that may be different tree structures.

[0119] refer to Fig.10 , there may be a current block represented by a solid line of the current picture, and a reference block represented by a dotted line may exist in the current picture. In this case, there may be motion information indicating the location of the reference block. Fig.10 , the arrow may represent motion information indicating the reference block position. According to an embodiment of the present disclosure, when IBC is used, the candidate list configuration may be different. For example, when IBC is used, a temporal candidate may not be included in the candidate list. In an embodiment, when IBC is used, motion information referenced nearby may not be scaled.

[0120] Fig.11 It is a diagram illustrating a method for configuring a merge candidate list according to an embodiment of the present disclosure. According to an embodiment, the merge candidate list configuration method when using IBC may be different from the merge candidate list configuration method when not using IBC. For example, a part of the candidates that can be added to the merge candidate list when not using IBC may not be added to the merge candidate list when using IBC. As an embodiment, when using IBC, zero motion vector (MV) may not be used. This is because the reference block indicated by zero MV in the current picture may be the current block. As an embodiment, when using IBC, temporal motion vectors (i.e., juxtaposed MVs) may not be used. This is because when using IBC, pictures other than the current picture may not be referenced.

[0121] As an embodiment, when IBC is used, HMVP candidates or pairwise average candidates may not be used. As an embodiment, when IBC is used, candidates based on HMVP candidates or pairwise average candidates may be used. As an embodiment, when IBC is used, sub-block merge mode may not be used. When IBC is used, the decoder may perform inference without parsing a flag indicating whether sub-block merge mode is applied.

[0122] Fig.12is a diagram illustrating a syntax structure of a coding unit according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, IBC may exist (or be defined) as an independent prediction mode. That is, the above-mentioned intra prediction and inter prediction may be represented as MODE_INTRA and MODE_INTER, respectively, and a MODE_IBC different from MODE_INTRA and MODE_INTER may be defined. As shown in the previous figure, MODE_INTRA, MODE_INTER, and MODE_IBC may be represented by a CuPredMode value. Here, CuPredMode is a variable indicating the current prediction mode.

[0123] Reference Fig.12 , a tile group may be a processing unit at a higher level than a CU, CTU or PU. A tile group according to an embodiment of the present disclosure may be a unit capable of parallel processing. In the present disclosure, a tile group may be replaced by a slice or a different unit capable of parallel processing. A bidirectionally predicted (B) tile group may use intra prediction, inter prediction, IBC, etc. A B tile group may use up to two motion vectors and up to two reference indexes in a block. A B tile group may use one or more motion vectors and one or more reference indexes in a block.

[0124] In an embodiment, intra prediction may include IBC prediction. Intra prediction may be a prediction method that refers only to the current picture. Inter prediction may be a prediction method that refers to a picture other than the current picture as a reference picture. Prediction (P) tile groups may use intra prediction, inter prediction, IBC prediction, etc. A P tile group may use up to one motion vector and up to one reference index in a block. A B tile group may not use two or more motion vectors and two or more reference indexes in a block.

[0125] An intra (I) tile group indicates a tile group (slice) that can use intra prediction and IBC prediction. An I tile group may not refer to a picture other than a current picture as a reference picture.

[0126] According to an embodiment of the present disclosure, in S1201, if (tile_group_type!=I||sps_ibc_enabled_flag), there may be a possibility of parsing cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag. That is, if (tile_group_type!=I||sps_ibc_enabled_flag) is not satisfied, the decoder may not parse all cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag. Here, sps_ibc_enabled_flag may be a higher level signaling (or syntax element) indicating whether IBC can be used. If sps_ibc_enabled_flag is configured to 0, IBC may not be used, and if sps_ibc_enabled_flag is configured to 1, IBC may be used. In addition, cu_skip_flag represents a syntax element indicating whether skip mode is used. If cu_skip_flag is 1, skip mode may be used. The prediction mode may be determined based on pred_mode_flag or pred_mode_ibc_flag. That is, whether the current mode is MODE_INTRA, MODE_INTER, or MODE_IBC may be determined based on pred_mode_flag or pred_mode_ibc_flag. Alternatively, the CuPredMode value may be determined based on pred_mode_flag or pred_mode_ibc_flag.

[0127] In addition, tile_group_type may indicate a tile group type. As described above, a tile group type may include an I tile group, a P tile group, and a B tile group. In addition, tile_group_type values ​​of I, P, and B may indicate an I tile group, a P tile group, and a B tile group, respectively. As described above, in the present disclosure, a tile group may be referred to as a slice or a different unit that can be processed in parallel.

[0128] According to an embodiment of the present disclosure, in S1203, if (cu_skip_flag[x0][y0]==0&&tile_group_type!=1), the decoder may parse pred_mode_flag. If cu_skip_flag is 1, the decoder may not parse pred_mode_flag. If tile_group_type is 1, the decoder may not parse pred_mode_flag.

[0129] According to an embodiment of the present disclosure, in S1204, if ((tile_group_type==I&&cu_skip_flag[x0][y0]==0)||(tile_group_type!=I&&(cu_skip_flag[x0][y0]||CuPredMode[x0][y0]!=MODE_INTRA))&&sps_ibc_enabled_flag&&blockSizeCondition), the decoder may parse pred_mode_ibc_flag. For example, if (tile_group_type==I&&cu_skip_flag[x0][y0]==0), the decoder may parse pred_mode_ibc_flag. Alternatively, if (tile_group_type!=I&&(cu_skip_flag[x0][y0]||CuPredMode[x0][y0]!=MODE_INTRA)), the decoder may parse pred_mode_ibc_flag. Alternatively, if neither (tile_group_type==I&&cu_skip_flag[x0][y0]==0) nor (tile_group_type!=I&&(cu_skip_flag[x0][y0]||CuPredMode[x0][y0]!=MODE_INTRA)), the decoder may not parse pred_mode_ibc_flag. If sps_ibc_enabled_flag is 1, the decoder may parse pred_mode_ibc_flag, and if sps_ibc_enabled_flag is 0, the decoder may not parse pred_mode_ibc_flag. Conditions based on block size that can parse pred_mode_ibc_flag can be predefined. Fig.12 As an example, the block size condition may be defined (or configured) as a case where both values ​​of cbWidth and cbHeight are less than 32. Here, cbWidth is a variable indicating the width of the current block (ie, coding unit or coding block), and cbHeight is a variable indicating the height of the current block.

[0130] As an embodiment, in S1205, if CuPredMode is MODE_INTRA, the decoder may parse syntax elements related to intra prediction. If CuPredMode is MODE_INTRA, the decoder may not parse syntax elements related to motion vectors. If CuPredMode is not MODE_INTRA, the decoder may parse syntax elements related to inter prediction. If CuPredMode is not MODE_INTRA, the syntax elements related to IBC may be parsed. IBC-related syntax elements may include motion vector-related syntax elements. That is, if CuPredMode is MODE_IBC, IBC-related syntax elements may be parsed. IBC-related syntax elements may include merge mode-related syntax elements and AMVP-related syntax elements. In IBC, the prediction mode may be stricter than in the case of MODE_INTER, and the number of syntax elements to be parsed may be less than in the case of MODE_INTER. For example, in the case of MODE_IBC, the decoder may only parse the syntax elements of the reference list L0. As another example, in the case of MODE_IBC, the decoder may not parse a portion of the flag indicating whether the mode is used in the merge_data syntax structure. If CuPredMode is not MODE_INTRA, the decoder may parse inter-prediction related syntax elements or may parse IBC related syntax elements. If IBC related syntax elements are parsed, the decoder may not parse syntax elements of chrominance components. Alternatively, if CuPredMode is not MODE_INTRA, the decoder may parse inter-prediction related syntax elements, and the parsing of IBC related syntax elements may be the case where treeType is not DUAL_TREE_CHROMA. DUAL_TREE_CHROMA indicates that the tree type is a dual tree of chrominance components.

[0131] Here, treeType is a variable indicating the tree type of the current block (i.e., coding unit or coding block). That is, treeType is a variable indicating the tree type used when splitting the current block as the current coding tree node. The tree type may include a dual tree or a single tree. In the case of a dual tree, treeType may indicate a dual tree of a luma component or a dual tree of a chroma component.

[0132] As an embodiment of the present disclosure, the encoder / decoder can determine (decide) the component to be parsed (e.g., the luminance component (block) or the chrominance component (block)) or the component to be processed based on treeType. If treeType is SINGLE_TREE, the luminance component and the chrominance component can share syntax element values. If treeType is SINGLE_TREE, the luminance block and the chrominance block can be segmented in the same way (or in the same structure). If treeType is DUAL_TREE, the luminance block and the chrominance block can be segmented in different ways. Further, the treeType of DUAL_TREE can include DUAL_TREE_LUMA and DUAL_TREE_CHROMA. Depending on whether treeType is DUAL_TREE_LUMA or DUAL_TREE_CHROMA, the decoder can determine (or decide) whether to process the luminance component or the chrominance component.

[0133] According to an embodiment of the present disclosure, the prediction mode of the current coding unit may be determined based on pred_mode_flag. CuPredMode may be determined based on pred_mode_flag. It may be indicated based on pred_mode_flag whether the prediction mode corresponds to inter prediction or intra prediction. According to an embodiment of the present disclosure, if pred_mode_flag is 0, CuPredMode may be configured as MODE_INTER. If pred_mode_flag is 1, CuPredMode may be configured as MODE_INTRA. According to an embodiment, pred_mode_flag may indicate whether the current CU is in inter prediction mode or intra prediction mode.

[0134] If pred_mode_flag does not exist, the decoder can infer pred_mode_flag or CuPredMode. If pred_mode_flag does not exist, pred_mode_flag or CuPredMode can be inferred based on the type of tile group (or slice). For example, in the case of an I tile group, the decoder can infer CuPredMode to be MODE_INTRA. In the case of a P tile group or a B tile group, the decoder can infer CuPredMode to be MODE_INTER.

[0135] According to an embodiment of the present disclosure, the prediction mode of the current coding unit may be determined based on pred_mode_ibc_flag. CuPredMode may be determined based on pred_mode_ibc_flag. The encoder / decoder may indicate whether the prediction mode is the IBC mode based on pred_mode_ibc_flag.

[0136] In an embodiment, if pred_mode_ibc_flag is 0, CuPredMode may be configured as MODE_INTER. If pred_mode_ibc_flag is 1, CuPredMode may be configured as MODE_IBC. If pred_mode_ibc_flag is 0, CuPredMode may be configured as a value other than MODE_IBC.

[0137] If pred_mode_ibc_flag does not exist, the decoder can infer pred_mode_ibc_flag or CuPredMode. If pred_mode_ibc_flag does not exist, the decoder can infer pred_mode_flag or CuPredMode based on the type of tile group (or slice). For example, in the case of an I tile group, CuPredMode can be inferred to be MODE_INTRA. In the case of a P tile group or a B tile group, CuPredMode can be inferred to be MODE_INTER.

[0138] According to an embodiment of the present disclosure, when IBC is used, the encoder / decoder may use skip mode. For example, when IBC is used for an I tile group (or slice), the encoder / decoder may use skip mode. For example, for an I tile group, the encoder / decoder may use skip mode for a CU using IBC. For example, it may be assumed that the IBC mode and skip mode are in an I tile group. In this case, sps_ibc_enabled_flag may be 1. The decoder may parse cu_skip_flag. Here, the value of cu_skip_flag may be 1 (indicating the use of a skip mode value). If cu_skip_flag is 1, or in the case of an I tile group, the decoder may not parse pred_mode_flag. In this case, with respect to an I tile group, the decoder may infer CuPredMode to MODE_INTRA. In the case of an I tile group, and if cu_skip_flag is 1, pred_mode_ibc_flag may not be parsed. In this case, for an I tile group, the decoder may infer CuPredMode to MODE_INTRA. Therefore, it may happen that although IBC is used, CuPredMode may not be represented as MODE_IBC.

[0139] Fig.13 is a diagram illustrating a syntax structure of a coding unit according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, the encoder / decoder may not use the IBC mode for the chrominance component. Specifically, if the tree type is DUAL_TREE_CHROMA, the encoder / decoder may not use the IBC mode. Fig.13 In S1301, if treeType is not DUAL_TREE_CHROMA, the decoder may parse pred_mode_ibc_flag. If treeType is DUAL_TREE_CHROMA, the decoder may not parse pred_mode_ibc_flag. According to an embodiment, if treeType is DUAL_TREE_CHROMA, the decoder may infer CuPredMode as MODE_INTRA.

[0140] Fig.14 is a diagram illustrating a compilation unit syntax structure according to an embodiment of the present disclosure. Fig.14The coding unit syntax shown illustrates the syntax related to intra prediction. According to an embodiment of the present disclosure, intra_chroma_pred_mode signaling may be present. Here, intra_chroma_pred_mode represents a syntax element indicating an intra prediction mode of a chroma component. As described below, intra_chroma_pred_mode may be an index indicating a specific prediction mode combination within an intra prediction mode table according to an intra prediction mode of a luma component, and in the present disclosure, intra_chroma_pred_mode may be referred to as a chroma intra prediction mode index.

[0141] refer to Fig.14 In S1401, if treeType is SINGLE_TREE or DUAL_TREE_CHROMA, the decoder may parse intra_chroma_pred_mode. If treeType is DUAL_TREE_LUMA, the decoder may not parse intra_chroma_pred_mode.

[0142] Fig.15 2 is a diagram illustrating a method of deriving an intra-frame prediction mode of a chroma component according to an embodiment of the present disclosure. Fig.15 In the process of deriving the intra prediction mode for the chroma component according to an embodiment of the present disclosure, the upper left sample position of the current chroma coding block and the width and height of the current chroma coding block may be input, and the chroma intra prediction mode may be derived in the process. Fig.15 IntraPredModeC indicates the intra prediction mode for the chroma component. xCb and yCb may represent the top left sample of the chroma coding block based on the luma position. IntraPredModeY may be the intra prediction mode for the luma component.

[0143] According to an embodiment of the present disclosure, IntraPredModeC may be determined based on IntraPredModeY. IntraPredModeC may be determined based on IntraPredModeY and intra_chroma_pred_mode. IntraPredModeY may be an intra prediction mode of a luminance block corresponding to a current chroma block. According to an embodiment, the use position of IntraPredModeY corresponding to an IntraPredModeC at a specific position may be preconfigured. According to an embodiment, the preconfigured position may be a luminance block position corresponding to a center position of the current chroma block. For example, when deriving IntraPredModeC at position (xCb, yCb), the encoder / decoder may refer to IntraPredModeY at position (xCb+cbWidth / 2, yCb+cbHeight / 2). Alternatively, when deriving IntraPredModeC at position (xCb, yCb), the preconfigured position may be a position configured based on the luminance position (xCb, yCb).

[0144] According to an embodiment of the present disclosure, the IntraPredModeC value according to IntraPredModeY may be determined with reference to the following Table 1 or Table 2. Table 1 shows a method for determining a chroma intra prediction mode when a cross-component linear model (CCLM) may not be used (i.e., if sps_cclm_enalbed_flag is 0), and Table 2 shows a method for determining a chroma intra prediction mode when CCLM may be used (i.e., if sps_cclm_enalbed_flag is 1). The CCLM prediction mode may be a prediction method for obtaining a prediction sample based on a value of another color component (e.g., a restored value of another color component). Alternatively, the CCLM prediction mode may be a prediction method for obtaining a prediction sample based on a linear model between color components.

[0145] [Table 1]

[0146]

[0147] [Table 2]

[0148]

[0149] Referring to Table 1 and Table 2, the encoder / decoder may refer to a column of IntraPredModeY values ​​according to a preconfigured position (e.g., the lower right center luma position of a chroma coding block), and the value corresponding to intra_chroma_pred_mode in the column may be IntraPredModeC. For example, if IntraPredModeY is 1 and intra_chroma_pred_mode is 1, IntraPredModeC may be 50.

[0150] According to an embodiment, sps_cclm_enalbed_flag may be a higher level signaling (or syntax element) indicating whether CCLM is applicable. For example, if sps_cclm_enalbed_flag is 1, CCLM may be applicable. If sps_cclm_enalbed_flag is 0, CCLM may not be applicable.

[0151] In Table 2, an IntraPredModeC value of 81, 82, or 83 may indicate that the CCLM mode is applied. An IntraPredModeC value of 4 when sps_cclm_enabled_flag of Table 1 is 0 may indicate that the prediction mode of the current chrominance component corresponds to the DM mode. An IntraPredModeC value of 7 when sps_cclm_enabled_flag of Table 2 is 1 may indicate that the prediction mode of the current chrominance component corresponds to the DM mode.

[0152] The bin string that signals intra_chroma_pred_mode may be predefined. For example, the encoder / decoder may indicate the DM mode by using intra_chroma_pred_mode with the least bits. For example, the encoder / decoder may indicate the DM mode by using intra_chroma_pred_mode of 1 bit.

[0153] According to an embodiment, if sps_cclm_enalbed_flag is 0, the encoder / decoder may configure (or assign) the number of bits indicating intra_chroma_pred_mode values ​​4, 0, 1, 2, and 3 to gradually increase or may configure them to the same value. According to an embodiment, if sps_cclm_enalbed_flag is 0, the empty strings indicating intra_chroma_pred_mode values ​​4, 0, 1, 2, and 3 may be configured (or assigned) to 0, 100, 101, 110, and 111, respectively.

[0154] According to an embodiment, if sps_cclm_enalbed_flag is 1, the encoder / decoder may configure (or assign) the number of bits representing intra_chroma_pred_mode values ​​7, 4, 5, 6, 0, 1, 2, and 3 to gradually increase or may configure them to the same value. According to an embodiment, if sps_cclm_enalbed_flag is 1, the empty strings representing intra_chroma_pred_mode values ​​7, 4, 5, 6, 0, 1, 2, and 3 may be configured (or assigned) to 0, 10, 1110, 1111, 11000, 11001, 11010, and 11011, respectively.

[0155] According to the aforementioned embodiment, there may be a situation where intra prediction of a chroma block is not easy. In particular, there may be a situation where it is not easy to derive an intra prediction mode for a chroma block. As described above, if a chroma block corresponds to an intra prediction, in order to determine an intra prediction mode, it may be necessary to refer to an intra prediction mode for a corresponding luminance block. However, it may happen that the corresponding luminance position does not use intra prediction, in other words, it may happen that it is not MODE_INTRA. For example, if the luminance position is MODE_IBC, there may not be a corresponding intra prediction mode. According to an embodiment, in the case of SINGLE_TREE, the corresponding luminance block and chroma block may use the same prediction mode. In the case of DUAL_TREE, the corresponding luminance block and chroma block may use different prediction modes. In the case of an I tile group, DUAL_TREE may be used. In the case of an I tile group, MODE_INTRA or MODE_IBC may be used. Therefore, in the same position (or corresponding position), there may be a situation where DUAL_TREE_LUMA uses MODE_IBC and DUAL_TREE_CHROMA uses MODE_INTRA.

[0156] Fig.16 is a diagram illustrating a method of deriving an intra prediction mode of a chroma component according to an embodiment of the present disclosure. Fig.16 Embodiments may involve methods for solving Fig.15 According to an embodiment of the present disclosure, if IntraPredModeY does not exist, IntraPredModeY can be configured as a preconfigured mode (or value). In other words, if the intra-frame prediction mode of the luma component at the corresponding position of the chroma component does not exist, the luma intra-frame prediction mode for deriving the intra-frame prediction mode of the chroma component can be configured as a preconfigured mode (or value). Therefore, even if the luma position corresponding to the chroma block does not use intra-frame prediction or uses the IBC mode, IntraPredModeC can be derived based on the preconfigured value.

[0157] More specifically, if IntraPredModeY does not exist, IntraPredModeY can be configured as a plane mode (ie, value 0 or mode number 0). In this case, according to the signaling method described in Tables 1 and 2 above, the encoder can signal the plane mode to the decoder by using a small number of bits.

[0158] Alternatively, if IntraPredModeY does not exist, IntraPredModeY can be configured as DC mode (ie, value 1 or mode number 1). In this case, according to the signaling method described in Table 1 and Table 2 above, the encoder can signal the DC mode to the decoder by using a small number of bits.

[0159] Alternatively, if IntraPredModeY does not exist, IntraPredModeY can be configured as vertical mode (ie, value 50 or mode number 50). In this case, according to the signaling method described in Table 1 and Table 2 above, the encoder can signal the vertical mode to the decoder by using a small number of bits.

[0160] Alternatively, if IntraPredModeY does not exist, IntraPredModeY can be configured as horizontal mode (ie, value 18 or mode number 18). In this case, according to the signaling method described in Table 1 and Table 2 above, the encoder can signal the horizontal mode to the decoder by using a small number of bits.

[0161] As another embodiment, if IntraPredModeY does not exist, the IntraPredModeC value corresponding to the intra_chroma_pred_mode value may be determined as a value not shown in Tables 1 and 2 above. That is, a column in which the IntraPredModeY value does not exist may exist alone. For example, the IntraPredModeC corresponding to intra_chroma_pred_mode 4, 0, 1, 2, and 3 may be 0, 1, 50, and 18, respectively. Alternatively, the IntraPredModeC corresponding to intra_chroma_pred_mode 4, 0, 1, 2, and 3 may be 0, 50, 18, and 1, respectively. This applies to both the case where sps_cclm_enabled_flag is 0 and the case where sps_cclm_enabled_flag is 1.

[0162] As another embodiment, if IntraPredModeY does not exist, IntraPredModeC can be configured to a preconfigured value. For example, if IntraPredModeY does not exist, IntraPredModeC can be configured to a preconfigured value regardless of intra_chroma_pred_mode. If IntraPredModeY does not exist, 0 can always be used to signal the intra_chroma_pred_mode value. For example, if IntraPredModeY does not exist, IntraPredModeC can be configured to planar mode. Alternatively, if IntraPredModeY does not exist, IntraPredModeC can be configured to CCLM. Alternatively, if IntraPredModeY does not exist, IntraPredModeC can be configured to DM mode. If IntraPredModeY does not exist, the decoder may not parse the above Fig.14 intra_chroma_pred_mode described in .

[0163] As another example, if IntraPredModeY does not exist, the encoder / decoder may change the location of the reference IntraPredModeY.

[0164] As described above, in the above embodiment, the absence of IntraPredModeY may indicate that the corresponding luma position referenced when deriving the chroma intra prediction mode is not MODE_INTRA. That is, the absence of IntraPredModeY may indicate that when deriving the chroma intra prediction mode of the position (xCb, yCb), CuPredMode[xCb+cbWidth / 2][yCb+cbHeight / 2] corresponding to the luma component is not MODE_INTRA, or is MODE_IBC.

[0165] refer to Fig.16, when deriving IntraPredModeC[xCb][yCb], if IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] does not exist (if it is not MODE_INTRA, or if it is MODE_IBC), the encoder / decoder can configure IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] to a pre-configured value. IntraPredModeC can be derived with reference to the configured IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] and Table 1 or Table 2 above.

[0166] When deriving IntraPredModeC[xCb][yCb], if IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] exists, the encoder / decoder can refer to IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] and Table 1 or Table 2 above to derive IntraPredModeC.

[0167] According to another embodiment of the present disclosure, when predicting a chrominance block, if the corresponding luminance block uses the IBC mode, the prediction mode may be restricted. More specifically, when intra-predicting a chrominance block, if the corresponding luminance block uses the IBC mode, the intra-prediction mode may be restricted. For example, in this case, the DM mode may not be used. This is because if the corresponding luminance block and the chrominance block use different modes, the similarity between the two may be reduced.

[0168] According to an embodiment of the present disclosure, the prediction angle of the intra prediction mode can be defined according to the prediction mode index of the intra prediction mode. In an embodiment, a mapping table between the prediction mode index and the angle can be defined as shown in Table 3 below. In this specification, the intra prediction mode index can be referred to as a mode index, a prediction mode number, a mode number, etc.

[0169] [Table 3]

[0170] predModeIntra -10 -9 -8 -7 -6 -5 -4 -3 -1 -1 2 3 4 5 6 7 8 intraPredAngle 114 93 79 68 60 54 49 45 39 35 32 29 26 23 21 19 17 predModeIntra 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 intraPredAngle 15 13 11 9 7 5 3 2 1 0 -1 -2 -3 -5 -7 -9 -11 predModeIntra 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 intraPredAngle -13 -15 -17 -19 -21 -23 -26 -29 -32 -29 -26 -23 -21 -19 -17 -15 -13 predModeIntra 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 intraPredAngle -11 -9 -7 -5 -3 -2 -1 0 1 2 3 5 7 9 11 13 15 predModeIntra 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 intraPredAngle 17 19 21 23 26 29 32 35 39 45 49 54 60 68 79 93 114

[0171] In Table 3, predModeIntra is a parameter (or variable) indicating an intra prediction mode (or a prediction mode index or a prediction mode number). In the specification, predModeIntra may be referred to as an intra prediction mode. In addition, intraPredAngle is a parameter (or variable) indicating the angle (or prediction angle) of the intra prediction mode. In the specification, intraPredAngle may be referred to as a prediction angle. In an embodiment, the prediction angle may be determined according to the intra prediction mode. The encoder / decoder may determine which position or angle relative to the current sample will be used for the predicted reference sample based on the prediction angle.

[0172] According to an embodiment of the present disclosure, Table 3 may indicate Figure 6 The mapping between the prediction mode index and the angle parameter associated with the prediction mode described in Table 3. According to an embodiment, the intra-frame prediction mode of Table 3 may indicate the index of the prediction mode to be used for actual prediction, which is transformed from the signaled index. For example, if the current block is a non-square block relative to the signaled mode index, the transformation may be applied via the following process. In other words, in an embodiment, the intra-frame prediction mode may be modified to the following process relative to a non-square block whose width and height are different.

[0173] -A. If all of the following conditions are met, the intra prediction mode (predModeIntra) can be configured as (predModeIntra (ie, the signaled mode index) + 65).

[0174] -a. When nTbW is greater than nTbH

[0175] -b. Intra-frame prediction mode is greater than or equal to 2

[0176] -c. Intra prediction mode is less than (whRatio>1)? 12:8

[0177] -B. Otherwise, if all of the following conditions are met, the intra prediction mode can be configured as (predModeIntra-67).

[0178] -a. When nTbH is greater than nTbW

[0179] -b. Intra prediction mode equal to or less than 66

[0180] -c. Intra-frame prediction mode greater than (whRatio>1)? 56:60

[0181] In the above process, nTbW represents the width of the current processing block (coding block or transform block), and nTbH represents the height of the current processing block. whRatio is a variable representing the aspect ratio. For example, whRatio can be configured as Min(Abs(Log2(nTbW / nTbH),2). A?B:C represents an operation in which if A is true, the value of B is derived, and if A is false, the value of C is derived.

[0182] According to an embodiment of the present disclosure, the prediction angle of the intra prediction mode may be defined according to the prediction mode index of the intra prediction mode. In an embodiment, as shown in Table 4 below, a mapping table between the prediction mode index and the angle may be defined.

[0183] [Table 4]

[0184] predModeIntra -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 2 3 4 intraPredAngle 512 341 256 171 128 102 86 73 64 57 51 45 39 35 32 29 26 predModeIntra 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 intraPredAngle 23 20 18 16 14 12 10 8 6 4 3 2 1 0 -1 -2 -3 predModeIntra 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 intraPredAngle -4 -6 -8 -10 -12 -14 -16 -18 -20 -23 -26 -29 -32 -29 -26 -23 -20 predModeIntra 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 intraPredAngle -18 -16 -14 -12 -10 -8 -6 -4 -3 -2 -1 0 1 2 3 4 6 predModeIntra 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 intraPredAngle 8 10 12 14 16 18 20 23 26 29 32 35 39 45 51 57 64 predModeIntra 73 74 75 76 77 78 79 80 intraPredAngle 73 86 102 128 171 256 341 512

[0185] In Table 4, predModeIntra is a parameter (or variable) indicating an intra prediction mode (or a prediction mode index or a prediction mode number). In the specification, predModeIntra may be referred to as an intra prediction mode. In addition, intraPredAngle is a parameter (or variable) indicating the angle (or prediction angle) of the intra prediction mode. In the specification, intraPredAngle may be referred to as a prediction angle. In an embodiment, the prediction angle may be determined according to the intra prediction mode. The encoder / decoder may determine which position or angle relative to the current sample will be used for the predicted reference sample based on the prediction angle.

[0186] According to an embodiment of the present disclosure, Table 4 may indicate Figure 6 The mapping between the prediction mode index and the angle parameter associated with the prediction mode described in Table 2. According to an embodiment, the intra-frame prediction mode of Table 2 may indicate the index of the prediction mode to be used for actual prediction, which is transformed from the signaled index. For example, if the current block is a non-square block relative to the signaled mode index, the transformation may be applied via the following process. In other words, in an embodiment, the intra-frame prediction mode may be modified to the following process relative to a non-square block whose width and height are different.

[0187] -A. If all of the following conditions are met, wideAngles may be configured to 1, and the intra prediction mode (predModeIntra) may be configured to (predModeIntra (ie, the signaled mode index) + 65).

[0188] -a. When nTbW is greater than nTbH

[0189] -b. Intra-frame prediction mode is greater than or equal to 2

[0190] -c. Intra prediction mode is less than (whRatio>1)? (8+2*whRatio):8

[0191] -B. Otherwise, if all of the following conditions are met, wideAngles may be configured to 1 and the intra prediction mode may be configured to (predModeIntra-67).

[0192] -a. When nTbH is greater than nTbW

[0193] -b. Intra-frame prediction mode is less than or equal to 66

[0194] -c. Intra prediction mode greater than (whRatio>1)? (60-2*whRatio): 60

[0195] In the above process, nTbW represents the width of the current processing block (coding block or transform block), and nTbH represents the height of the current processing block. whRatio is a variable (or parameter) representing the aspect ratio. For example, whRatio can be configured as Min(Abs(Log2(nTbW / nTbH),2). A?B:C represents an operation in which if A is true, the value of B is derived, and if A is false, the value of C is derived. WideAngle is a variable (or parameter) indicating whether a wide angle is applied to the current block.

[0196] According to an embodiment of the present disclosure, the intra prediction angles described in Tables 3 and 4 may be used (or applied) in the following manner. For example, invAngle as an inverse angle parameter may be derived based on the prediction angle. More specifically, invAngle may be derived as Round(256*32 / intraPredAngle). The encoder / decoder may generate a reference sample array based on invAngle. The encoder / decoder may perform position-dependent intra prediction sample filtering based on invAngle. The values ​​of variables iIdx and iFact for specifying the position of a reference sample (or prediction sample) may be derived based on the intra prediction angle. Prediction samples may be derived based on iIdx and iFact. Prediction samples may be derived based on ref, iIdx, and iFact.

[0197] In an embodiment, the encoder / decoder may generate prediction samples based on the intra prediction angle by applying the following method: If the intra prediction mode is greater than or equal to 34, the index variable iIdx and the multiplication factor iFact may be derived based on Equation 1 below.

[0198] [Formula 1]

[0199] iIdx = ((y + 1 + refIdx) * intraPredAngle) >> 5 + refIdx

[0200] iFact = ((y + 1 + refIdx) * intraPredAngle) & 31

[0201] In Equation 1, refIdx may be an index indicating a reference sample line for intra prediction. The predicted samples may be derived as in the following Equation 2.

[0202] [Equation 2]

[0203] predSamples[x][y] = Clip1Y(((sum{i from 0 to 3}(fT[i] * ref[x + iIdx + i])) + 32) >> 6)

[0204] In an embodiment, if cIdx is 0 (i.e., if the current component is a luminance component), the derivation of the predicted samples according to Equation 2 may be performed. In Equation 2, fT may be an interpolation filter coefficient. Further, sum{i from x to y}(eq(i)) represents an operation of adding the values of eq(i) when i changes from x to y. The operation Clip1Y may have the same meaning as the following Equation 3.

[0205] [Equation 3]

[0206] Clip1Y(x) = Clip3(0, (1 << BitDepthY) - 1, x)

[0207] Clip1C(x) = Clip3(0, (1 << BitDepthC) - 1, x)

[0208] Clip3(x, y, z) may be x when z < x, may be y when z > y, and otherwise may be z.

[0209] The predicted samples may be derived according to the following process.

[0210] - If iFact is not 0, predSamples[x][y] indicating the predicted sample value may be derived according to the following Equation 4.

[0211] [Equation 4]

[0212] predSamples[x][y] = ((32 - iFact) * ref[x + iIdx + 1] + iFact * ref[x + iIdx + 2] + 16) >> 5

[0213] Otherwise, predSamples[x][y] indicating the predicted sample value may be derived according to Equation 5 below.

[0214] [Formula 5]

[0215] predSamples[x][y]=ref[x+iIdx+1]

[0216] In an embodiment, if cIdx is not 0 (ie, if the current component is a chroma component), derivation through equations 4 and 5 may be performed. If the intra prediction mode is less than 34, the index variable iIdx and the multiplication factor iFact may be derived based on equation 6 below.

[0217] [Formula 6]

[0218] iIdx=((x+1+refIdx)*intraPredAngle)>>5

[0219] iFact((x+1+refIdx)*intraPredAngle)&31

[0220] In Equation 6, refIdx may be an index indicating a reference sample line for intra prediction. The prediction sample may be derived as in Equation 7 below.

[0221] [Formula 7]

[0222] predSamples[x][y]=Clip1Y((sum {i is from 0 to 3}(fT[i]*ref[y+iIdx+i]))+32)>>6)

[0223] In an embodiment, if cIdx is 0 (ie, if the current component is a luma component), prediction sample derivation according to Equation 7 may be performed. In Equation 2, fT may be an interpolation filter coefficient. In addition, summing {i is from x to y} (eq(i)) represents an operation of adding the value of eq(i) when i changes from x to y.

[0224] The prediction samples can be derived according to the following process.

[0225] If iFact is not 0, predSamples[x][y] indicating the predicted sample value may be derived according to Equation 8 below.

[0226] [Formula 8]

[0227] predSamples[x][y]=((32-iFact)*ref[yiIdx+1]+iFact*ref[y+iIdx+2]+16)>>5

[0228] Otherwise, predSamples[x][y] indicating the predicted sample value may be derived according to Equation 9 below.

[0229] [Formula 9]

[0230] predSamples[x][y]=ref[y+iIdx+1]

[0231] In an embodiment, if cIdx is not 0 (ie, if the current component is a chroma component), the derivation through equations 8 and 9 may be performed.

[0232] Comparing Table 3 and Table 4 above, compared with Table 3, Table 4 adds intra prediction modes of -14 to -11 and 77 to 80. In Tables 3 and 4, different intra prediction angle values ​​may be determined for the same intra prediction mode. For example, referring to Tables 3 and 4, intra prediction angle values ​​may be differently defined (or configured) in intra prediction modes of -10 to -4, 6 to 14, 22 to 30, 38 to 46, 54 to 62, and 70 to 76.

[0233] Table 5 below illustrates a prediction sample derivation process that more specifically represents the above-mentioned embodiment.

[0234] [Table 5]

[0235]

[0236]

[0237] In Table 5, p[x][y] may indicate an adjacent reference sample. The upper left coordinate of the current block may be defined as (0,0). Referring to Table 5, the encoder / decoder may derive the prediction sample of the current block according to the process shown in Table 5. The encoder / decoder may apply different derivation methods according to the intra prediction mode of the current block. Specifically, the encoder / decoder may derive a reference sample array (which may be referred to as a primary reference sample) based on the prediction mode of the current block, and may derive the prediction sample of the current block based on the derived reference sample. In this case, the methods described in equations 1 to 9 above may be applied.

[0238] Fig.17 is a diagram illustrating an intra-frame prediction mode derivation method according to an embodiment of the present disclosure. Fig.17, IntraPredModeY may be a value indicating an intra prediction mode. For example, IntraPredModeY may be a value indicating a luma intra prediction mode. According to an embodiment of the present disclosure, there may be a method for deriving IntraPredModeY from a mode list. In another embodiment, there may be a method for deriving IntraPredModeY from a mode not included in the mode list. In the present disclosure, a mode list may be referred to as an MPM list, a candidate list, and a candidate mode list. For example, a mode list may be a value indicating Fig.17 The variable candModeList of the candidate mode list. According to the embodiment, there may be one or more mode lists. The number of modes included in the mode list may be one or more.

[0239] According to an embodiment of the present disclosure, a method for deriving an intra-frame prediction mode may be configured (or defined) differently based on a most probable mode (MPM) flag. Here, the most probable mode (MPM) indicates a mode in which the intra-frame prediction mode of the current block is derived from an intra-frame prediction block adjacent to the current block. The most probable mode (MPM) flag indicates a flag (or syntax element) indicating whether the intra-frame prediction mode of the current block is encoded using MPM. In the present disclosure, the MPM flag may be represented as intra_luma_mpm_flag. For example, if the MPM flag is 1, IntraPredModeY may be derived from the mode list, as described above. Alternatively, if the MPM flag is 0, IntraPredModeY may be derived from a mode not included in the mode list, as described above.

[0240] In an embodiment, if the MPM flag is 1, IntraPredModeY may be configured based on the signaled index. For example, if the MPM flag is 1, IntraPredModeY may be configured based on the signaled index and mode list. More specifically, refer to Fig.17 , if the MPM flag is 1, IntraPredModeY can be configured as candModeList[intra_luma_mpm_idx].

[0241] In the present disclosure and drawings, parameter (or variable) values ​​or syntax element values ​​may be based on coordinates or positions, wherein if the parameter or syntax element value corresponds to the current block, its sign may be omitted. For example, [xCb][yCb] may indicate Fig.17 The position of the current block in , but can be omitted when a description is provided in the present invention.

[0242] As an embodiment, if the MPM flag is 0, candidate mode list rearrangement and IntraPredModeY configuration can be performed. The candidate mode list before rearrangement can be an MPM list. The rearrangement can be a rearrangement of the candidate mode list values. For example, when the candidate mode list before rearrangement is candModeList[0]=a_0, candModeList[1]=a_1, candModeList[2]=a_2... and candModeList[N-1]=a_{N-1}, a_0, a_1, a_2,... and a_{N-1} can be arranged and assigned to candModeList[0], candModeList[1], candModeList[2],... and candModeList[N-1]. Here, the arrangement can be performed in ascending or descending order. For example, when a_0, a_1, a_2, ..., and a_{N-1} are arranged in ascending order, the arrangement may result in b_0, b_1, b_2, ..., and b_{N-1}, and the configuration may be performed as candModeList[0] = b_0, candModeList[1] = b_1, candModeList[2] = b_2, ..., and candModeList[N-1] = b_{N-1}. Fig.17 The portion indicated by (1.) may correspond to a rearrangement of the candidate mode list. For example, candModeList[i] may be defined from i=0 to N-1. In this case, with respect to i from 0 to (N-2) and j for each i from (i+1) to (N-1), if candModeList[i] is greater than candModeList[j], the values ​​of candModeList[i] and candModeList[j] may be swapped. The swap operation may be expressed as (candModeList[i], candModeList[j])=Swap(candModeList[i], candModeList[j]). The result of Swap(x,y) may be (y,x).

[0243] Therefore, the operation (candModeList[i], candModeList[j]) = Swap(candModeList[i], candModeList[j]) may cause candModeList[i] and candModeList[j], which were a and b respectively before the operation, to become candModeList[i] and candModeList[j], which were b and a respectively after the operation. Fig.17, N can be 6. In candModeList[i], i can be configured from 0 to 5.

[0244] The configuration of IntraPredModeY can be based on the value of intra_luma_mpm_remainder. Fig.17 , IntraPredModeY can be configured based on intra_luma_mpm_remainder. A modification of IntraPredModeY based on the candidate mode list may follow. For example, with respect to i from 0 to N-1, if IntraPredModeY is greater than or equal to candModeList[i], IntraPredModeY may be incremented by 1. The value based on IntraPredModeY generated as a result of the addition may be used for the intra prediction mode. For example, the wide angle determination and mode modification process may be performed after the IntraPredModeY derivation described in the present disclosure.

[0245] Reference Fig.17 , the process can be carried out by Fig.17 The process performed in the portion indicated by (2.) of . In the case where i can be configured from 0 to 5, if IntraPredModeY is greater than or equal to candModeList[i] relative to i from 0 to 5, candModeList[i] can increase IntraPredModeY by 1. The above modification to IntraPredModeY may be required because if the MPM flag is 0, signaling is performed using intra_luma_mpm_remainder in a mode other than the mode included in the mode list. For example, this is because, in the case where candModeList[0]=0, candModeList[1]=3, candModeList[2]=1, candModeList[3]=5, candModeList[4]=33, and candModeList[5]=65, when the value included in the candidate mode list is signaled, the MPM flag may be 1, and when the MPM flag is 0, the possible values ​​of IntraPredModeY may be 2, 4, 6, ..., 32, 34, ..., 64, 66, etc. In this case, when intra_luma_mpm_remainder is signaled with 0, this may indicate IntraPredModeY 2.

[0246] Fig.18is a diagram illustrating an MPM list configuration method according to an embodiment of the present disclosure. The MPM list may be a candidate mode list. According to an embodiment of the present disclosure, the MPM list may be configured based on candIntraPredModeX. For example, there may be multiple candIntraPredModeX. For example, candIntraPredModeX may be candIntraPredModeA and candIntraPredModeB. For example, candIntraPredModeX may be IntraPredModeY corresponding to a position around the current block. Alternatively, candIntraPredModeX indicates a preconfigured mode. For example, candIntraPredModeX may be INTRA_PLANAR. INTRA_PLANAR may be a value corresponding to a mode index (or mode number) 0. INTRA_DC may be a value corresponding to a mode index (or mode number) 1. Reference Fig.18 , INTRA_PLANAR and INTRA_DC are indicated as plane and DC, respectively.

[0247] According to an embodiment of the present disclosure, the candidate mode list may always include a specific value. The position of the specific value in the candidate mode list may be fixed. For example, the candidate mode list may always include INTRA_PLANAR. INTRA_PLANAR may always be at the front of the candidate mode list. As another example, the candidate mode list may always include INTRA_DC.

[0248] Fig.18 A simplified MPM list configuration method is shown. According to an embodiment, candIntraPredModeA and candIntraPredModeB may be IntraPredModeY corresponding to the left and upper sides around the current block, respectively. For example, candIntraPredModeA may be IntraPredModeY[xCb-1][yCb+cbHeight-1]. For example, candIntraPredModeB may be IntraPredModeY[xCb+cbWidth-1][yCb-1]. [xCb][yCb] may be coordinates corresponding to the current block. More specifically, [xCb][yCb] may be coordinates corresponding to the upper left of the current block. Further, cbWidth and cbHeight may be the width and height of the current block, respectively. As described above, candIntraPredModeA and candIntraPredModeB may be configured as pre-configured values.

[0249] According to an embodiment, the MPM list configuration method may change based on whether candIntraPredModeA and candIntraPredModeB are the same or different. The MPM list configuration method may change according to whether candIntraPredModeA and candIntraPredModeB are angle modes. The angle mode may not include INTRA_PLANAR and INTRA_DC. The angle mode may be any value other than INTRA_PLANAR and INTRA_DC. The value corresponding to the angle mode may be greater than the INTRA_PLANAR and INTRA_DC values. INTRA_PLANAR and INTRA_DC may be referred to as non-angle modes.

[0250] If candIntraPredModeA and candIntraPredModeB are the same, and candIntraPredModeA is an angle mode, the candidate mode list may be determined as follows.

[0251] -candModeList[0]=INTRA_PLANAR

[0252] -candModeList[1]=candIntraPredModeA

[0253] -candModeList[2]=2+((candIntraPredModeA+61)%64)

[0254] -candModeList[3]=2+((candIntraPredModeA-1)%64)

[0255] -candModeList[4]=INTRA_DC

[0256] -candModeList[5]=2+((candIntraPredModeA+60)%64)

[0257] Here, % can represent the modulo operation.

[0258] If candIntraPredModeA and candIntraPredModeB are not the same, and candIntraPredModeA or candIntraPredModeB is an angle mode, the candidate mode list may be determined as follows.

[0259] -minAB=Min(candIntraPredModeA,candIntraPredModeB)

[0260] -maxAB=Max(candIntraPredModeA,candIntraPredModeB)

[0261] If both candIntraPredModeA and candIntraPredModeB are angle modes, the candidate mode list may be determined as follows: That is, when the above conditions are combined, candIntraPredModeA and candIntraPredModeB are not the same, and candIntraPredModeA and candIntraPredModeB are both angle modes.

[0262] -candModeList[0]=INTRA_PLANAR

[0263] -candModeList[1]=candIntraPredModeA

[0264] -candModeList[2]=candIntraPredModeB

[0265] -candModeList[3]=INTRA_DC

[0266] If maxAB-minAB is in the range of 2 to 62 (inclusive):

[0267] -candModeList[4]=2+((maxAB+61)%64)

[0268] -candModeList[5]=2+((maxAB-1)%64)

[0269] If maxAB-minAB is not in the range of 2 to 62 (inclusive):

[0270] -candModeList[4]=2+((maxAB+60)%64)

[0271] -candModeList[5]=2+((maxAB)%64)

[0272] If candIntraPredModeA and candIntraPredModeB are not the same, and candIntraPredModeA or candIntraPredModeB is an angle mode, the candidate mode list may be determined as follows.

[0273] -minAB=Min(candIntraPredModeA,candIntraPredModeB)

[0274] -maxAB=Max(candIntraPredModeA,candIntraPredModeB)

[0275] If only one of candIntraPredModeA and candIntraPredModeB is an angle mode, the candidate mode list may be determined as follows: That is, when the above conditions are combined, candIntraPredModeA and candIntraPredModeB are not the same, and only one of candIntraPredModeA and candIntraPredModeB is an angle mode.

[0276] -candModeList[0]=INTRA_PLANAR

[0277] -candModeList[1]=maxAB

[0278] -candModeList[2]=INTRA_DC

[0279] -candModeList[3]=2+((maxAB+61)%64)

[0280] -candModeList[4]=2+((maxAB-1)%64)

[0281] -candModeList[5]=2+((maxAB+60)%64)

[0282] In other cases, the candidate mode list may be determined as follows. That is, 1) if candIntraPredModeA and candIntraPredModeB are the same and candIntraPredModeA is a non-angle mode, or 2) if candIntraPredModeA and candIntraPredModeB are not the same and both candIntraPredModeA and candIntraPredModeB are non-angle, the candidate mode list may be determined as follows.

[0283] -candModeList[0]=INTRA_PLANAR

[0284] -candModeList[1]=INTRA_DC

[0285] -candModeList[2]=INTRA_ANGULAR50

[0286] -candModeList[3]=INTRA_ANGULAR18

[0287] -candModeList[4]=INTRA_ANGULAR46

[0288] -candModeList[5]=INTRA_ANGULAR54

[0289] Here, INTRA_ANGULARxx may be a value corresponding to a mode index (or mode number) xx.

[0290] Fig.19 is a diagram illustrating derivation of an intra prediction mode according to an embodiment of the present disclosure. Fig.17 The schema derivation method described in may include redundant operations. For example, when using Fig.18 When configuring the MPM list described in Fig.17 The mode derivation method described in the embodiment of the present disclosure may include redundant operations. Fig.17 Duplicate description.

[0291] As an embodiment, if the MPM flag is 0, candidate mode list rearrangement and IntraPredModeY configuration can be performed. The candidate mode list before rearrangement can be an MPM list. The rearrangement can be a rearrangement of the candidate mode list values. When performing candidate mode list rearrangement, if candModeList[i] is greater than candModeList[j], the values ​​of candModeList[i] and candModeList[j] can be swapped. The swap operation can be expressed as (candModeList[i], candModeList[j]) = Swap(candModeList[i], candModeList[j]). The result of Swap(x, y) can be (y, x). Therefore, the operation of (candModeList[i], candModeList[j]) = Swap(candModeList[i], candModeList[j]) may cause candModeList[i] and candModeList[j], which are a and b respectively before the operation, to become candModeList[i] and candModeList[j], which are b and a respectively after the operation.

[0292] According to an embodiment of the present disclosure, rearrangement may be performed only on some of the candidate mode lists, rather than on all candidate mode lists. That is, when candModeList[i] is defined for i from 0 to N-1, rearrangement may be performed only on candidate mode lists less than N, rather than on all candidate mode lists. Candidate mode lists on which rearrangement is not performed may be preconfigured. For example, the candidate mode lists on which rearrangement is not performed may be related to mode indexes existing at the same position in a configuration method that changes depending on the situation in the MPM list configuration. For example, rearrangement may be performed only on the candidate mode lists remaining after candModeList[0] is excluded. For example, when candModeList[i] is defined for i=0 to N-1, if candModeList[i] is greater than candModeList[j] relative to i from 0 to (N-2) and j for each i from (i+1) to (N-1), the values ​​of candModeList[i] and candModeList[j] may be exchanged.

[0293] This is probably because the same result is obtained regardless of whether or not a reordering is performed on candModeList[0]. Fig.18 As described above, candModeList[0] may always be INTRA_PLANAR, in which case candModeList[0] may always have the minimum value.

[0294] refer to Fig.19 ,exist Fig.19 In the part shown in (1.), the candidate mode list is rearranged. For example, N can be 6. In candModeList[i], i can be defined as 0 to 5. That is, the candidate mode list can have a total of 6 elements. In this case, with respect to i from 1 to 4 and j from (i+1) to 5 for each i, if candModeList[i] is greater than candModeList[j], the values ​​of candModeList[i] and candModeList[j] can be swapped. The swap operation can be expressed as (candModeList[i], candModeList[j]) = Swap(candModeList[i], candModeList[j]).

[0295] IntraPredModeY configuration can be based on the intra_luma_mpm_remainder value. Fig.19, IntraPredModeY may be configured based on intra_luma_mpm_remainder. IntraPredModeY may be subsequently modified. In this case, modifications to IntraPredModeY not based on the candidate mode list and modifications to IntraPredModeY based on the candidate mode list may be included.

[0296] According to an embodiment, intra_luma_mpm_remainder may be a syntax element. In addition, intra_luma_mpm_remainder may be a value signaled when indicating a mode not included in the MPM list. For example, intra_luma_mpm_remainder may be a value signaled when the MPM flag is 0. In intra_luma_mpm_remainder, a value less than the total number of intra modes may be a maximum value. For example, in intra_luma_mpm_remainder, ((the total number of intra modes within the signaling range)-(the number of elements in the MPM list)-1) may have a maximum value. For example, (the total number of intra modes within the signaling range) may be 67. For example, (the number of elements in the MPM list) may be 6. For example, the maximum value of intra_luma_mpm_remainder may be 60.

[0297] According to an embodiment of the present disclosure, the modification of IntraPredModeY may include performing a pre-configured modification without being based on the candidate mode list. For example, the modification of IntraPredModeY may include adding a pre-configured value to IntraPredModeY. Fig.19 In the portion indicated by (ii.), a value obtained by adding 2 to IntraPredModeY can be configured as IntraPredModeY.

[0298] According to an embodiment of the present disclosure, modifying IntraPredModeY may include modifying IntraPredModeY based on a candidate mode list. For example, IntraPredModeY is compared with candModeList[i], and if a condition is met, the modification of IntraPredModeY may be performed. According to an embodiment of the present disclosure, when a comparison with candModeList[i] is performed and IntraPredModeY is modified, the comparison and modification may be performed only on some candidate mode lists instead of all candidate mode lists. That is, when candModeList[i] is defined for i from 0 to N-1, the comparison and modification may be performed only on candidate mode lists less than N instead of all candidate mode lists. Candidate mode lists on which comparison and modification are not performed may be pre-configured. For example, the candidate mode list on which comparison and modification may not be performed may be related to a mode index that will be included in several cases in a configuration method that changes depending on the situation in the MPM list configuration. For example, comparison with IntraPredModeY and modification of IntraPredModeY may be performed only on the candidate mode lists remaining after excluding candModeList[0] or candModeList[1].

[0299] For example, when candModeList[i] is defined from i=0 to N-1, the comparison with IntraPredModeY and the modification of IntraPredModeY can be performed with respect to i having a value greater than 0 to a value of (N-1). For example, when candModeList[i] is defined from i=0 to N-1, the comparison with IntraPredModeY and the modification of IntraPredModeY can be performed with respect to i from 2 to (N-1).

[0300] For example, the comparison and modification may be as follows. For example, if IntraPredModeY is greater than or equal to candModeList[i], then a modification of IntraPredModeY may be performed. For example, if IntraPredModeY is greater than or equal to candModeList[i], then the value of IntraPredModeY may be increased by 1.

[0301] References Fig.19The portion indicated by (iii.) indicates that if IntraPredModeY is greater than or equal to candModeList[i] for i between 2 and 5, IntraPredModeY may be increased by 1. This is because the candidate mode list may always include certain mode indices. This is also because there may be a fixed mode index at a certain position in the rearranged candidate mode list. For example, in the rearranged candidate mode list, candModeList[0] may always be INTRA_PLANAR, and candModeList[1] may always be INTRA_DC.

[0302] According to an embodiment of the present disclosure, in the modification of IntraPredModeY, the preconfigured value during the preconfigured modification not performed based on the candidate mode list may be associated with the number of candidate mode lists excluded from the comparison target during the modification of IntraPredModeY performed based on the candidate mode list. For example, if M of all candidate mode lists are excluded from the comparison target during the modification of IntraPredModeY performed based on the candidate mode list, the preconfigured value during the preconfigured modification not performed based on the candidate mode list may be M or greater. More specifically, for example, if M of all candidate mode lists are excluded from the comparison target during the modification of IntraPredModeY performed based on the candidate mode list, the preconfigured value during the preconfigured modification not performed based on the candidate mode list may be M. For example, M may be 2.

[0303] Therefore, refer to Fig.19 , the modification of IntraPredModeY may be as follows. The IntraPredModeY value may be configured as the intra_luma_mpm_remainder value. The IntraPredModeY value may be increased by 2. For i ranging from 2 to 5 (inclusive), when IntraPredModeY is greater than or equal to candModeList[i], IntraPredModeY may be increased by 1.

[0304] Fig.19 It is shown that when the MPM flag is 0, the candidate mode list is rearranged and the IntraPredModeY is modified. However, as will be described later Figure 20 to Figure 22 If there is a flat flag, or in the case where signaling is performed by dividing the pre-configured mode, the mode included in the candidate mode list and other modes, it can be used when deriving other modes Fig.19The method described in the embodiment of the planar flag indicates a flag (or syntax element) indicating whether the intra prediction mode is a planar mode, and may be represented as planar_flag in the present disclosure.

[0305] Fig. 20 It is a diagram illustrating an MPM list configuration method according to an embodiment of the present disclosure. According to an embodiment of the present disclosure, INTRA_PLANAR may be indicated by a plane flag. The plane flag may be a signaling (or syntax element) different from the above-mentioned MPM flag. According to an embodiment of the present disclosure, a pre-configured mode may not always be included in the MPM list, that is, the candidate mode list. According to an embodiment of the present disclosure, INTRA_PLANAR may not always be included in the MPM list, that is, the candidate mode list.

[0306] The MPM list may be a candidate mode list. According to an embodiment of the present disclosure, the MPM list may be configured based on candIntraPredModeX. For example, there may be multiple candIntraPredModeX. For example, candIntraPredModeX may be candIntraPredModeA and candIntraPredModeB. For example, candIntraPredModeX may be IntraPredModeY corresponding to the position around the current block. Alternatively, candIntraPredModeX may indicate a preconfigured mode. For example, candIntraPredModeX may be INTRA_PLANAR. INTRA_PLANAR may be a value corresponding to mode index 0. INTRA_DC may be a value corresponding to mode index 1. Reference Fig. 20 , INTRA_PLANAR and INTRA_DC can be expressed as plane and DC respectively.

[0307] According to an embodiment of the present disclosure, the candidate mode list may always include a specific value. The position of the specific value in the candidate mode list may be fixed. For example, the candidate mode list may always include INTRA_DC.

[0308] Fig. 20A simplified MPM list configuration method is shown. According to an embodiment, candIntraPredModeA and candIntraPredModeB may be IntraPredModeY corresponding to the left and top sides around the current block, respectively. For example, candIntraPredModeA may be IntraPredModeY[xCb-1][yCb+cbHeight-1]. For example, candIntraPredModeB may be IntraPredModeY[xCb+cbWidth-1][yCb-1]. [xCb][yCb] may be coordinates corresponding to the current block. More specifically, [xCb][yCb] may be coordinates corresponding to the upper left of the current block. Further, cbWidth and cbHeight may be the width and height of the current block, respectively. As described above, candIntraPredModeA and candIntraPredModeB may be configured as pre-configured values.

[0309] According to an embodiment, the MPM list configuration method may change based on whether candIntraPredModeA and candIntraPredModeB are the same or different. The MPM list configuration method may change according to whether candIntraPredModeA and candIntraPredModeB are angle modes. The angle mode may not include INTRA_PLANAR and INTRA_DC. The angle mode may be any value other than INTRA_PLANAR and INTRA_DC. The value corresponding to the angle mode may be greater than the INTRA_PLANAR and INTRA_DC values. INTRA_PLANAR and INTRA_DC may be referred to as non-angle modes.

[0310] If candIntraPredModeA and candIntraPredModeB are the same, and candIntraPredModeA is an angle mode, the candidate mode list may be determined as follows.

[0311] -candModeList[0]=candIntraPredModeA

[0312] -candModeList[1]=2+((candIntraPredModeA+61)%64)

[0313] -candModeList[2]=2+((candIntraPredModeA-1)%64)

[0314] -candModeList[3]=INTRA_DC

[0315] -candModeList[4]=2+((candIntraPredModeA+60)%64)

[0316] Here, % can represent the modulo operation.

[0317] If candIntraPredModeA and candIntraPredModeB are not the same, and candIntraPredModeA or candIntraPredModeB is an angle mode, the candidate mode list may be determined as follows.

[0318] -minAB=Min(candIntraPredModeA,candIntraPredModeB)

[0319] -maxAB=Max(candIntraPredModeA,candIntraPredModeB)

[0320] If both candIntraPredModeA and candIntraPredModeB are angle modes, the candidate mode list may be determined as follows: That is, when the above conditions are combined, candIntraPredModeA and candIntraPredModeB are not the same, and candIntraPredModeA and candIntraPredModeB are both angle modes.

[0321] -candModeList[0]=candIntraPredModeA

[0322] -candModeList[1]=candIntraPredModeB

[0323] -candModeList[2]=INTRA_DC

[0324] If maxAB-minAB is in the range of 2 to 62 (inclusive)

[0325] -candModeList[3]=2+((maxAB+61)%64)

[0326] -candModeList[4]=2+((maxAB-1)%64)

[0327] If maxAB-minAB is not in the range of 2 to 62 (inclusive):

[0328] -candModeList[3]=2+((maxAB+60)%64)

[0329] -candModeList[4]=2+((maxAB)%64)

[0330] If candIntraPredModeA and candIntraPredModeB are not the same, and candIntraPredModeA or candIntraPredModeB is an angle mode, the candidate mode list may be determined as follows.

[0331] -minAB=Min(candIntraPredModeA,candIntraPredModeB)

[0332] -maxAB=Max(candIntraPredModeA,candIntraPredModeB)

[0333] If only one of candIntraPredModeA and candIntraPredModeB is an angle mode, the candidate mode list may be determined as follows: That is, when the above conditions are combined, candIntraPredModeA and candIntraPredModeB are not the same, and only one of candIntraPredModeA and candIntraPredModeB is an angle mode.

[0334] -candModeList[0]=maxAB

[0335] -candModeList[1]=INTRA_DC

[0336] -candModeList[2]=2+((maxAB+61)%64)

[0337] -candModeList[3]=2+((maxAB-1)%64)

[0338] -candModeList[4]=2+((maxAB+60)%64)

[0339] In other cases, the candidate mode list may be determined as follows. That is, 1) if candIntraPredModeA and candIntraPredModeB are the same and candIntraPredModeA is a non-angle mode, or 2) if candIntraPredModeA and candIntraPredModeB are not the same and both candIntraPredModeA and candIntraPredModeB are non-angle, the candidate mode list may be determined as follows.

[0340] -candModeList[0]=INTRA_DC

[0341] -candModeList[1]=INTRA_ANGULAR50

[0342] -candModeList[2]=INTRA_ANGULAR18

[0343] -candModeList[3]=INTRA_ANGULAR46

[0344] -candModeList[4]=INTRA_ANGULAR54

[0345] Here, INTRA_ANGULARxx may be a value corresponding to a mode index (or mode number) xx.

[0346] Fig.21 is a diagram illustrating an intra prediction mode derivation method according to an embodiment of the present disclosure.

[0347] like Fig. 20 As shown, there may be a pre-configured mode indicated by a flat flag, there may be a mode included in a candidate mode list, and there may be other modes. According to an embodiment of the present disclosure, if the flat flag is 1, IntraPredModeY may be configured as a pre-configured mode. Fig.21 , if the planar flag is 1, IntraPredModeY can be configured as INTRA_PLANAR.

[0348] According to an embodiment of the present disclosure, in order to indicate a mode included in the candidate mode list, the MPM flag may be referred to. If the MPM flag is 1, IntraPredModeY may be configured as candModeList[intra_luma_mpm_idx]. Fig.21, if the plane flag is 0 and the MPM flag is 1, IntraPredModeY can be configured as candModeList[intra_luma_mpm_idx].

[0349] According to an embodiment of the present disclosure, a combination of a plane flag and an MPM flag may be used to determine whether IntraPredModeY is a preconfigured mode, a mode included in a candidate mode list, or another mode. For example, if the plane flag is 1, IntraPredModeY may be a preconfigured mode. If the plane flag is 0 and the MPM flag is 1, IntraPredModeY may be a mode included in a candidate mode list. If the plane flag is 0 and the MPM flag is 0, IntraPredModeY may be another mode.

[0350] According to another embodiment of the present disclosure, a combination of a plane flag and an MPM flag may be used to determine whether IntraPredModeY is a preconfigured mode, a mode included in a candidate mode list, or another mode. For example, if the plane flag is 1 and the MPM flag is 1, IntraPredModeY may be a preconfigured mode. If the plane flag is 0 and the MPM flag is 1, IntraPredModeY may be a mode included in a candidate mode list. If the MPM flag is 0, IntraPredModeY may be another mode.

[0351] As described below, the intra prediction mode in the case of other modes may be derived.

[0352] like Fig. 20 As shown, the number of elements in the candidate mode list may be five. The candidate mode list may not always include INTRA_PLANAR. The candidate mode list may always include INTRA_DC. In this embodiment, the Figures 17 to 20 Duplicate description.

[0353] As an embodiment, if other modes are indicated, candidate mode list rearrangement and IntraPredModeY configuration may be performed. The candidate mode list before rearrangement may be an MPM list. The rearrangement may be a rearrangement of candidate mode list values. For example, when the candidate mode list before rearrangement is candModeList[0]=a_0, candModeList[1]=a_1, candModeList[2]=a_2, ... and candModeList[N-1]=a_{N-1}, a_0, a_1, a_2, ... and a_{N-1} may be arranged and input to candModeList[0], candModeList[1], candModeList[2]... and candModeList[N-1]. Here, the arrangement may be performed in ascending or descending order. For example, when a_0, a_1, a_2, ... and a_{N-1} are arranged in ascending order, the arrangement may result in b_0, b_1, b_2, ... and b_{N-1}, and the configuration can be performed as candModeList[0] = b_0, candModeList[1] = b_1, candModeList[2] = b_2 ... and candModeList[N-1] = b_{N-1}.

[0354] Depend on Fig.21 The portion indicated by (1.) may correspond to a rearrangement of the candidate mode list. For example, candModeList[i] may be defined from i=0 to N-1. In this case, with respect to i from 0 to (N-2) and j for each i from (i+1) to (N-1), if candModeList[i] is greater than candModeList[j], the values ​​of candModeList[i] and candModeList[j] may be swapped. The swap operation may be expressed as (candModeList[i], candModeList[j])=Swap(candModeList[i], candModeList[j]). The result of Swap(x,y) may be (y,x). Therefore, the operation (candModeList[i], candModeList[j]) = Swap(candModeList[i], candModeList[j]) may cause candModeList[i] and candModeList[j], which were a and b before the operation, to become candModeList[i] and candModeList[j], which were b and a after the operation. Fig.21, N can be 5. In candModeList[i], i can be configured to be 0 to 4.

[0355] refer to Fig.21 ,exist Fig.21 In the portion indicated by (1.), the candidate mode list rearrangement can be performed. For example, in candModeList[i], i can be defined as 0 to 4. That is, the candidate mode list can have a total of 5 elements. In this case, with respect to i from 0 to 3 and j from (i+1) to 4 for each i, if candModeList[i] is greater than candModeList[j], the values ​​of candModeList[i] and candModeList[j] can be swapped. The swap operation can be expressed as (candModeList[i], candModeList[j]) = Swap(candModeList[i], candModeList[j]).

[0356] IntraPredModeY configuration can be based on the intra_luma_mpm_remainder value. Fig.21 , IntraPredModeY may be configured based on intra_luma_mpm_remainder. IntraPredModeY may be subsequently modified. In this case, modifications to IntraPredModeY not based on the candidate mode list and modifications to IntraPredModeY based on the candidate mode list may be included.

[0357] According to an embodiment, intra_luma_mpm_remainder may be a syntax element. In addition, intra_luma_mpm_remainder may be a value signaled when other modes are indicated. For example, intra_luma_mpm_remainder may be a value signaled when the MPM flag is 0. Alternatively, intra_luma_mpm_remainder may be a value signaled when both the plane flag and the MPM flag are 0. In intra_luma_mpm_remainder, a value less than the total number of intra modes may be a maximum value. For example, in intra_luma_mpm_remainder, ((the total number of intra modes within the signaling range) - (the number of pre-configured modes) - (the number of MPM list elements) - 1) may have a maximum value. For example, (the total number of intra modes within the signaling range) may be 67. For example, (the number of pre-configured modes) may be 1. For example, (the number of MPM list elements) may be 5. For example, the maximum value of intra_luma_mpm_remainder may be 60.

[0358] According to an embodiment of the present disclosure, the modification of IntraPredModeY may include performing a pre-configured modification without being based on the candidate mode list. For example, the modification of IntraPredModeY may include adding a pre-configured value to IntraPredModeY. Fig.21 In the portion indicated by (ii.), a value obtained by adding 1 to IntraPredModeY may be configured as IntraPredModeY. This may be because the preconfigured mode is signaled separately from the modes belonging to the candidate mode list.

[0359] According to an embodiment of the present disclosure, modifying IntraPredModeY may include modifying IntraPredModeY based on a candidate mode list. For example, with respect to i from 0 to N-1, if IntraPredModeY is greater than or equal to candModeList[i], IntraPredModeY may be incremented by 1. The value based on IntraPredModeY generated as a result of the addition may be used for the intra prediction mode. For example, the wide angle determination and mode modification process may be performed after the IntraPredModeY derivation described in the present disclosure. Referring to Fig.21 , the process can be carried out by Fig.21The process performed in the portion indicated by (iii.) of . For example, N may be 5. In the case where i may be configured to be 0 to 4, if IntraPredModeY is greater than or equal to candModeList[i] relative to i of 0 to 4, candModeList[i] may increase IntraPredModeY by 1. The above modification to IntraPredModeY may be required because if the MPM flag is 0, signaling is performed using intra_luma_mpm_remainder in a mode other than the mode included in the mode list. For example, this is because, in the case of candModeList[0]=64, candModeList[1]=3, candModeList[2]=1, candModeList[3]=5, candModeList[4]=33, when the value included in the candidate mode list is signaled, the MPM flag or the plane flag may be 1, and when a mode other than the preconfigured mode and the mode belonging to the candidate mode list is signaled, the possible values ​​of IntraPredModeY are 2, 4, 6, ..., 32, 34, ..., 63, 65, 66, etc. In this case, when intra_luma_mpm_remainder is signaled with 0, this may indicate IntraPredModeY 2.

[0360] Fig. 22 is a diagram illustrating a method for deriving an intra-frame prediction mode according to an embodiment of the present disclosure. Fig. 22 As shown, there may be a pre-configured mode indicated by a flat flag, there may be a mode included in a candidate mode list, and there may be other modes. According to an embodiment of the present disclosure, if the flat flag is 1, IntraPredModeY may be configured as a pre-configured mode. Fig. 22 , if the planar flag is 1, IntraPredModeY can be configured as INTRA_PLANAR.

[0361] According to an embodiment of the present disclosure, in order to indicate a mode included in the candidate mode list, the MPM flag may be referred to. If the MPM flag is 1, IntraPredModeY may be configured as candModeList[intra_luma_mpm_idx]. Fig.15 , if the plane flag is 0 and the MPM flag is 1, IntraPredModeY can be configured as candModeList[intra_luma_mpm_idx].

[0362] According to an embodiment of the present disclosure, a combination of a plane flag and an MPM flag may be used to determine whether IntraPredModeY is a preconfigured mode, a mode included in a candidate mode list, or another mode. For example, if the plane flag is 1, IntraPredModeY may be a preconfigured mode. If the plane flag is 0 and the MPM flag is 1, IntraPredModeY may be a mode included in a candidate mode list. If the plane flag is 0 and the MPM flag is 0, IntraPredModeY may be another mode.

[0363] According to another embodiment of the present disclosure, a combination of a plane flag and an MPM flag may be used to determine whether IntraPredModeY is a preconfigured mode, a mode included in a candidate mode list, or another mode. For example, if the plane flag is 1 and the MPM flag is 1, IntraPredModeY may be a preconfigured mode. If the plane flag is 0 and the MPM flag is 1, IntraPredModeY may be a mode included in a candidate mode list. If the MPM flag is 0, IntraPredModeY may be another mode.

[0364] As described below, the intra prediction mode in the case of other modes may be derived.

[0365] like Fig. 22 As described above, the number of elements in the candidate mode list may be five. The candidate mode list may not always include INTRA_PLANAR. The candidate mode list may always include INTRA_DC.

[0366] In this embodiment, the Figures 17 to 21 Duplicate description.

[0367] As an example, if other modes are indicated, candidate mode list rearrangement and IntraPredModeY configuration may be performed. In this example, the description of rearrangement may refer to Fig.21 .

[0368] refer to Fig.21 ,exist Fig.21In the portion indicated by (1.), the candidate mode list rearrangement can be performed. For example, in candModeList[i], i can be defined as 0 to 4, that is, the candidate mode list can have a total of 5 elements. In this case, with respect to i from 0 to 3 and j from (i+1) to 4 for each i, if candModeList[i] is greater than candModeList[j], the values ​​of candModeList[i] and candModeList[j] can be swapped. The swap operation can be expressed as (candModeList[i], candModeList[j]) = Swap(candModeList[i], candModeList[j]).

[0369] Fig.21 The schema derivation method described in may include redundant operations. For example, when using Fig.18 or Fig. 22 When configuring the MPM list described in Fig.21 The schema derivation method described in may include redundant operations.

[0370] IntraPredModeY configuration can be based on the intra_luma_mpm_remainder value. Fig.21 , IntraPredModeY may be configured based on intra_luma_mpm_remainder. IntraPredModeY may be subsequently modified. In this case, modifications of IntraPredModeY not based on the candidate mode list and modifications of IntraPredModeY based on the candidate mode list may be included. According to an embodiment, intra_luma_mpm_remainder may be a syntax element, and a description thereof may refer to Fig.21 .

[0371] According to an embodiment of the present disclosure, the modification of IntraPredModeY may include performing a pre-configured modification without being based on the candidate mode list. For example, the modification of IntraPredModeY may include increasing IntraPredModeY by a pre-configured value. Fig. 22 In the portion indicated by (ii.), a value obtained by adding 2 to the IntraPredModeY value may be configured as IntraPredModeY.

[0372] According to an embodiment of the present disclosure, modifying IntraPredModeY may include modifying IntraPredModeY based on a candidate mode list. For example, IntraPredModeY is compared with candModeList[i], and if a condition is met, the modification of IntraPredModeY may be performed. According to an embodiment of the present disclosure, when a comparison with candModeList[i] is performed and IntraPredModeY is modified, the comparison and modification may be performed only on some candidate mode lists instead of all candidate mode lists. That is, when candModeList[i] is defined for i from 0 to N-1, the comparison and modification may be performed only on candidate mode lists less than N instead of all candidate mode lists. Candidate mode lists on which comparison and modification are not performed may be preconfigured. For example, a candidate mode list on which comparison and modification may not be performed may be related to a mode index that will be included in several situations in a configuration method that changes depending on the situation in the MPM list configuration. For example, a comparison with IntraPredModeY and a modification of IntraPredModeY may be performed only on the candidate mode lists remaining after excluding candModeList[0].

[0373] For example, when candModeList[i] is defined from i=0 to N-1, the comparison with IntraPredModeY and the modification of IntraPredModeY can be performed relative to i having a value greater than 0 to a value of (N-1). For example, when candModeList[i] is defined from i=0 to N-1, the comparison with IntraPredModeY and the modification of IntraPredModeY can be performed relative to i from 1 to (N-1).

[0374] For example, the comparison and modification may be as follows. For example, if IntraPredModeY is greater than or equal to candModeList[i], then a modification of IntraPredModeY may be performed. For example, if IntraPredModeY is greater than or equal to candModeList[i], then the value of IntraPredModeY may be increased by 1.

[0375] References Fig. 22The portion indicated by (iii.) indicates that if IntraPredModeY is greater than or equal to candModeList[i] for i that is 1 to 4, then IntraPredModeY may be increased by 1. This is because the candidate mode list may always include certain mode indices. This is also because there may be a fixed mode index at a certain position in the rearranged candidate mode list. For example, this is because in the rearranged candidate mode list, candModeList[0] may always be INTRA_DC.

[0376] According to an embodiment of the present disclosure, in the modification of IntraPredModeY, the preconfigured value during the preconfigured modification not performed based on the candidate mode list may be associated with the number of candidate mode lists excluded from the comparison target during the modification of IntraPredModeY performed based on the candidate mode list. For example, if during the modification of IntraPredModeY performed based on the candidate mode list, M of all candidate mode lists are excluded from the comparison target, the preconfigured value during the preconfigured modification not performed based on the candidate mode list may be M or greater. More specifically, for example, if during the modification of IntraPredModeY performed based on the candidate mode list, M of all candidate mode lists are excluded from the comparison target, the preconfigured value during the preconfigured modification not performed based on the candidate mode list may be greater than M. For example, M may be 1.

[0377] In the modification of IntraPredModeY, in the preconfigured modification performed without being based on the candidate mode list, the preconfigured value and the number of preconfigured modes may be associated. For example, if the number of preconfigured modes is L, then in the preconfigured modification performed without being based on the candidate mode list, the preconfigured value may be L or greater. More specifically, for example, if the number of preconfigured modes is L, then in the preconfigured modification performed without being based on the candidate mode list, the preconfigured value may be greater than L. For example, L may be 1.

[0378] Therefore, refer to Fig. 22 , the modification of IntraPredModeY may be as follows. The IntraPredModeY value may be configured as the intra_luma_mpm_remainder value. The IntraPredModeY value may be increased by 2. For i ranging from 1 to 4 (inclusive), when IntraPredModeY is greater than or equal to candModeList[i], IntraPredModeY may be increased by 1.

[0379] Fig.23is a flowchart illustrating a video signal processing method according to an embodiment of the present disclosure. Fig.23 For the convenience of explanation, the description is mainly provided based on the decoder, but the present disclosure is not limited thereto. In addition, the video signal processing method according to the embodiment of the present disclosure can be applied to the encoder in substantially the same manner.

[0380] The decoder checks the tree type of the current chroma block (S2301).

[0381] The decoder derives a chroma intra prediction mode of a current chroma block based on a luma intra prediction mode of a pre-configured position ( S2302 ).

[0382] The decoder generates a prediction block of the current chroma block based on the chroma intra prediction mode (S2303).

[0383] The decoder reconstructs the current chroma block by adding the residual block of the current chroma block to the prediction block (S2304).

[0384] A video signal processing method is provided, wherein when a luma prediction mode at a preconfigured position is an intra block copy mode, the luma intra prediction mode is configured as the preconfigured mode.

[0385] As described above, the derivation of the chroma intra prediction mode may include, according to the luma intra prediction mode, obtaining a first syntax element in which a mode index indicates a current chroma intra prediction mode within a pre-configured mapping table.

[0386] As described above, the preconfigured position may be the luma position of the lower right center sample position of the current chroma block.

[0387] As mentioned above, the preconfigured mode may be an intra DC mode.

[0388] As described above, when the tree type of the current chroma block is a dual tree, the second syntax element indicating whether the intra block copy mode is applied to the current chroma block may be inferred as a preconfigured value without being parsed.

[0389] As described above, when the preconfigured value may be 0 and its tree type is a dual tree, the intra block copy mode may not be applied to the current chroma block.

[0390] 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.

[0391] 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.

[0392] 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.

[0393] 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.

[0394] 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.

[0395] 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.

[0396] Industrial Applicability

[0397] 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 within the technical spirit and technical scope of the present disclosure provided in the claims appended hereto.

Claims

1. A device for decoding a video signal, the device comprising a processor, in, The processor is configured to: Based on the luma intra prediction mode corresponding to the current block, deriving the chroma intra prediction mode corresponding to the current block, The luma intra prediction mode is derived based on the prediction mode of the first position of the current block, reconstructing the current block based on the chroma intra prediction mode, Wherein, when the prediction mode of the first position is the intra block copy mode, the luma intra prediction mode is configured as the intra DC mode, Wherein, whether the prediction mode of the first position of the current block is the intra block copy mode is indicated by a first syntax element, and Whether the first syntax element is parsed is determined based on whether the tree type of the current block is DUAL_TREE_CHROMA.

2. The device according to claim 1, in, The position of the first position is (xCb+cbWidth / 2, yCb+cbHeight / 2), Among them, (xCb, yCb) is the upper left coordinate of the current block, the cbHeight is the height of the current block and the cbWidth is the width of the current block.

3. The device according to claim 1, in, The processor is configured to obtain a second syntax element indicating the chroma intra prediction mode within a preconfigured mapping table according to the luma intra prediction mode.

4. The device according to claim 1, When the tree type is not DUAL_TREE_CHROMA, the first syntax element is parsed.

5. The device according to claim 1, in, When the first syntax element is not parsed, the value of the first syntax element is inferred to be a value indicating that the prediction mode of the first position is not the intra block copy mode.

6. The device according to claim 5, When the tree type is DUAL_TREE_CHROMA, the first syntax element is not parsed.

7. A device for encoding a video signal, the device comprising a processor, in, The processor is configured to Obtaining a bit stream decoded by a decoder using a decoding method, the decoding method comprising: Based on the luma intra prediction mode corresponding to the current block, deriving the chroma intra prediction mode corresponding to the current block, The luma intra prediction mode is derived based on the prediction mode of the first position of the current block, reconstructing the current block based on the chroma intra prediction mode, Wherein, when the prediction mode of the first position is the intra block copy mode, the luma intra prediction mode is configured as the intra DC mode, Wherein, whether the prediction mode of the first position is the intra block copy mode is indicated by a first syntax element, Whether the first syntax element is parsed is determined based on whether the tree type of the current block is DUAL_TREE_CHROMA.

8. The device according to claim 7, in, The position of the first position is (xCb+cbWidth / 2, yCb+cbHeight / 2), Among them, (xCb, yCb) is the upper left coordinate of the current block, the cbHeight is the height of the current block and the cbWidth is the width of the current block.

9. The device according to claim 7, in, The processor is configured to obtain a second syntax element indicating the chroma intra prediction mode within a preconfigured mapping table according to the luma intra prediction mode.

10. The device according to claim 7, When the tree type is not DUAL_TREE_CHROMA, the first syntax element is parsed.

11. The device according to claim 7, in, When the first syntax element is not parsed, the value of the first syntax element is inferred to be a value indicating that the prediction mode of the first position is not an intra block copy mode.

12. The device according to claim 11, When the tree type is DUAL_TREE_CHROMA, the first syntax element is not parsed.

13. A method for obtaining a bit stream, the method comprising: Based on the luma intra prediction mode corresponding to the current block, deriving the chroma intra prediction mode corresponding to the current block, wherein the luma intra prediction mode is derived based on the prediction mode of the first position of the current block; reconstructing the current block based on the chroma intra prediction mode; and The bit stream is obtained by encoding information of the chroma intra prediction mode, Wherein, when the prediction mode of the first position is the intra block copy mode, the luma intra prediction mode is configured as the intra DC mode, Wherein, whether the prediction mode of the first position is the intra block copy mode is indicated by a first syntax element, Whether the first syntax element is included in the bitstream is determined based on whether the tree type of the current block is DUAL_TREE_CHROMA.

14. The method according to claim 13, in, The position of the first position is (xCb+cbWidth / 2, yCb+cbHeight / 2), Among them, (xCb, yCb) is the upper left coordinate of the current block, the cbHeight is the height of the current block and the cbWidth is the width of the current block.

15. The method according to claim 13, in, A second syntax element indicating the chroma intra prediction mode within a preconfigured mapping table according to the luma intra prediction mode is included in the bitstream.

16. The method according to claim 13, When the tree type is not DUAL_TREE_CHROMA, the first syntax element is included in the bitstream.

17. The method according to claim 13, in, When the first syntax element is not included in the bitstream, the prediction mode of the first position is not an intra block copy mode.

18. The method according to claim 17, When the tree type is DUAL_TREE_CHROMA, the first syntax element is not included in the bitstream.

19. A method for video signal processing, the method comprising: Based on the luma intra prediction mode corresponding to the current block, deriving the chroma intra prediction mode corresponding to the current block, wherein the luma intra prediction mode is derived based on a prediction mode of a first position of the current block; and reconstructing the current block based on the chroma intra prediction mode, Wherein, when the prediction mode of the first position is the intra block copy mode, the luma intra prediction mode is configured as the intra DC mode, Wherein, whether the prediction mode of the first position is the intra block copy mode is indicated by a first syntax element, Whether the first syntax element is parsed is determined based on whether the tree type of the current block is DUAL_TREE_CHROMA.

20. The method according to claim 19, in, The position of the first position is (xCb+cbWidth / 2, yCb+cbHeight / 2), Among them, (xCb, yCb) is the upper left coordinate of the current block, the cbHeight is the height of the current block and the cbWidth is the width of the current block.