Intra-prediction based video signal processing method and device
By deriving chroma intra prediction modes from luma intra prediction modes and reconstructing chroma blocks efficiently, the method addresses inefficiencies in existing video signal processing, enhancing coding efficiency.
Patent Information
- Application Number
- JP2025138360
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2019-04-03
- Filing Date
- 2025-08-21
- Publication Date
- 2025-11-18
AI Technical Summary
Existing video signal processing methods lack efficiency in coding, particularly in handling chroma intra prediction modes based on luma intra prediction modes.
The method involves determining the tree type of a current chroma block, deriving the chroma intra prediction mode from the luma intra prediction mode, and reconstructing the chroma block by adding a residual block, with specific syntax elements and modes being inferred or set based on the luma prediction mode, especially for dual tree types and MPM candidate lists.
This approach enhances the coding efficiency of video signals by optimizing chroma intra prediction, improving overall video signal processing performance.
Smart Images

Figure 2025170340000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a method and apparatus for processing a video signal, and more particularly to a method and apparatus for processing a video signal that encodes or decodes a video signal based on intra prediction. [Background technology]
[0002] Compression coding refers to a series of signal processing techniques for transmitting digitized information over a communication line or storing it in a form suitable for a storage medium. Compression coding can be used to encode audio, video, text, and other data, but video compression is the technology that specifically targets video. Video signal compression is performed by removing redundant information by taking into account spatial correlation, temporal correlation, and stochastic 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 [Problem to be solved by the invention]
[0003] An object of the present invention is to increase the coding efficiency of video signals. [Means for solving the problem]
[0004] In order to solve the above problems, the present invention provides the following video signal processing device and video signal processing method.
[0005] According to one embodiment of the present invention, there is provided a video signal processing method, comprising: determining a tree type of a current chroma block; deriving a chroma intra prediction mode of the current chroma block based on a luma intra prediction mode of a previously set position; generating a prediction block of the current chroma block based on the chroma intra prediction mode; and reconstructing the current chroma block by adding a residual block of the current chroma block to the prediction block, wherein if the luma prediction mode of the previously set position is an intra block copy mode, the luma intra prediction mode is set to the previously set mode.
[0006] In one embodiment, deriving the chroma intra prediction mode may include obtaining a first syntax element indicating the current chroma intra prediction mode from a mapping table in which a mode index is already set according to the luma intra prediction mode.
[0007] As an example, the pre-set position may be the luma position of the bottom right center sample position of the current chroma block.
[0008] As an example, the pre-set mode may be an intra DC mode.
[0009] As an example, if the tree type of the current chroma block is a dual tree, the second syntax element indicating whether or not the intra block copy mode is applied to the current chroma block may not be parsed and may be inferred as a previously set value.
[0010] As an example, the preset 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.
[0011] According to an embodiment of the present invention, there is provided a video signal processing apparatus, including a processor, wherein the processor checks 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 prediction mode of the current chroma block based on a luma intra prediction mode of a previously set position; generates a prediction block of the current chroma block based on the chroma intra prediction mode; and reconstructs the current chroma block by adding a residual block of the current chroma block to the prediction block; and if the luma prediction mode of the previously set position is an intra block copy mode, sets the luma intra prediction mode to the previously set mode.
[0012] In one embodiment, the processor may obtain the first syntax element indicating the current chroma intra prediction mode from a mapping table in which a mode index is already set according to the luma intra prediction mode.
[0013] As an example, the pre-set position may be the luma position of the bottom right center sample position of the current chroma block.
[0014] As an example, the pre-set mode may be an intra DC mode.
[0015] As an example, if the tree type of the current chroma block is a dual tree, the second syntax element indicating whether or not the intra block copy mode is applied to the current chroma block may not be parsed and may be inferred as a previously set value.
[0016] As an example, the preset 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.
[0017] According to one embodiment of the present invention, there is provided a video signal processing method, comprising: determining a tree type of a current chroma block; determining a chroma intra prediction mode of the current chroma block based on a luma intra prediction mode of a previously set position; generating a prediction block of the current chroma block based on the chroma intra prediction mode; and deriving a residual block of the current chroma block by subtracting the prediction block from an original block, wherein if the luma prediction mode of the previously set position is an intra block copy mode, the luma intra prediction mode is set to the previously set mode.
[0018] According to an embodiment of the present invention, there is provided a non-transitory computer-readable medium having stored thereon a computer-executable component configured to be executed by one or more processors of a computing device, the computer-executable component determining a tree type of a current chroma block, deriving a chroma intra prediction mode of the current chroma block based on a luma intra prediction mode of a previously set position, generating a prediction block of the current chroma block based on the chroma intra prediction mode, and reconstructing the current chroma block by adding a residual block of the current chroma block to the prediction block, and if the luma prediction mode of the previously set position is an intra block copy mode, setting the luma intra prediction mode to the previously set mode.
[0019] According to one embodiment of the present invention, there is provided a video signal processing method, comprising: a step of obtaining a first syntax element indicating whether a current block is coded using an MPM (most probable mode), where the MPM indicates a mode in which the intra prediction mode of the current block is derived from intra predicted blocks surrounding the current block; a step of obtaining a second syntax element for indicating the intra prediction mode of the current block from remaining intra prediction modes other than MPM candidates if the current block is not coded using the MPM; a step of constructing an MPM candidate list based on intra prediction modes of neighboring blocks to the left and above the current block; a step of deriving the intra prediction mode of the current block based on the second syntax element; and a step of generating a predicted 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.
[0020] As an example, the MPM candidate list may include five MPM candidates, and the MPM candidate list may not include a planar mode.
[0021] As an example, deriving the intra prediction mode may include rearranging the MPM candidate list by performing a swap operation on MPM candidates in the MPM candidate list.
[0022] As an example, the step of deriving the intra prediction mode may include a step of comparing an MPM candidate in the reordered MPM candidate list with a value of the second syntax element incremented by 1.
[0023] As an example, the step of deriving the intra prediction mode may include the step of adding 1 to the value of the second syntax element added with 1 if the value of the second syntax element added with 1 is greater than or equal to that of an MPM candidate in the reordered MPM candidate list.
[0024] As an example, if the current block is encoded using the MPM, the method may include obtaining a third syntax element indicating whether the intra prediction mode of the current block is a planar mode.
[0025] According to one embodiment of the present invention, there is provided a video signal processing device, the video signal processing device including a processor, wherein the processor obtains a first syntax element indicating whether a current block is coded using an MPM (most probable mode), wherein the MPM represents a mode derived from intra-predicted blocks surrounding the current block, and if the current block is not coded using the MPM, the processor obtains a second syntax element for indicating an intra-prediction mode of the current block from remaining intra-prediction modes other than MPM candidates, constructs an MPM candidate list based on intra-prediction modes of neighboring blocks to the left and above the current block, derives the intra-prediction mode of the current block based on the second syntax element, and generates a predicted 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.
[0026] As an example, the MPM candidate list may include five MPM candidates, and the MPM candidate list may not include a planar mode.
[0027] As an example, the processor may reorder the MPM candidate list by performing a swap operation on the MPM candidates in the MPM candidate list.
[0028] As an example, the processor may compare the MPM candidates in the reordered MPM candidate list with the value of the second syntax element incremented by one.
[0029] As an example, the processor may add 1 to the value of the second syntax element added with 1 if the value of the second syntax element added with 1 is greater than or equal to that of an MPM candidate in the reordered MPM candidate list.
[0030] As an example, the processor may obtain a third syntax element indicating whether the intra prediction mode of the current block is planar mode when the current block is encoded using the MPM.
[0031] According to one embodiment of the present invention, there is provided a video signal processing method, comprising: encoding a first syntax element indicating whether a current block has been coded using an MPM (most probable mode), where the MPM indicates a mode in which the intra prediction mode of the current block is derived from intra predicted blocks surrounding the current block; encoding a second syntax element for indicating the intra prediction mode of the current block from remaining intra prediction modes other than MPM candidates if the current block is not coded using the MPM; constructing an MPM candidate list based on intra prediction modes of neighboring blocks to the left and above the current block; determining the intra prediction mode of the current block based on the second syntax element; and generating a predicted 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.
[0032] According to one embodiment of the present invention, a non-transitory computer-readable medium having stored thereon computer-executable components configured to execute on one or more processors of a computing device, the computer-executable components being ... a first syntax element indicating whether the current block is encoded using an MPM candidate mode, wherein the MPM indicates an intra prediction mode of the current block derived from intra predicted blocks surrounding the current block; if the current block is not encoded using the MPM, a second syntax element for indicating the intra prediction mode of the current block from remaining intra prediction modes other than MPM candidates is obtained; an MPM candidate list is constructed based on intra prediction modes of neighboring blocks to the left and above the current block; the intra prediction mode of the current block is derived based on the second syntax element; and a predicted block of the current block is generated 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 MPM candidates included in the MPM candidate list. [Effects of the Invention]
[0033] According to an embodiment of the present invention, the coding efficiency of a video signal can be improved. [Brief explanation of the drawings]
[0034] [Figure 1] 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention; [Figure 2] 1 is a schematic block diagram of a video signal decoding device according to an embodiment of the present invention; [Figure 3] FIG. 1 illustrates an example of how coding tree units are divided into coding units within a picture. [Figure 4] FIG. 1 illustrates an embodiment of a method for signaling the splitting of quadtrees and multi-type trees. [Figure 5] 2 is a diagram illustrating in more detail an intra-prediction method according to an embodiment of the present invention; [Figure 6] 2 is a diagram illustrating in more detail an intra-prediction method according to an embodiment of the present invention; [Figure 7] 1 illustrates an inter-prediction method according to one embodiment of the present invention. [Figure 8] FIG. 2 illustrates how the encoder converts the residual signal. [Figure 9] FIG. 2 illustrates how the encoder and decoder inverse transform the transform coefficients to obtain a residual signal. [Figure 10] 1 is a diagram illustrating a current picture referencing method according to an embodiment of the present invention; [Figure 11] FIG. 1 illustrates a method for constructing a merge candidate list according to an embodiment of the present invention. [Figure 12] FIG. 2 is a diagram illustrating a coding unit syntax structure according to an embodiment of the present invention. [Figure 13] FIG. 1 illustrates a coding unit syntax structure according to one embodiment of the present invention. [Figure 14] FIG. 1 illustrates a coding unit syntax structure according to one embodiment of the present invention. [Figure 15] 10 is a diagram illustrating a method for deriving an intra-prediction mode for a chroma component according to an embodiment of the present invention; [Figure 16] 10 is a diagram illustrating a method for deriving an intra prediction mode of a chroma component according to an embodiment of the present invention; [Figure 17] 1 is a diagram illustrating an intra-prediction mode deriving method according to an embodiment of the present invention; [Figure 18]FIG. 2 is a diagram illustrating a method for configuring an MPM list according to an embodiment of the present invention. [Figure 19] 10 is a diagram illustrating intra-prediction mode guidance according to an embodiment of the present invention. [Figure 20] FIG. 1 illustrates a method for configuring an MPM list according to an embodiment of the present invention. [Figure 21] 3 is a flowchart illustrating a video signal processing method according to an embodiment of the present invention. [Figure 22] 1 is a diagram illustrating an intra-prediction mode deriving method according to an embodiment of the present invention; [Figure 23] 3 is a flowchart illustrating a video signal processing method according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0035] The terms used in this specification are generally used as widely as possible while taking into consideration the functions of the present invention, but these may vary depending on the intentions of engineers in the field, customs, or the emergence of new technologies. In addition, in certain cases, the applicant may have arbitrarily selected terms, and in such cases, the meanings of these terms will be described in the relevant mode for carrying out the invention. Therefore, it is made clear that the terms used in this specification should be interpreted not simply as terms, but based on the substantive meanings of the terms and the overall content of this specification.
[0036] In this specification, some terms may be interpreted as follows. "Coding" may be interpreted as "encoding" or "decoding" in some cases. In this specification, a device that encodes a video signal to generate a video signal bitstream is referred to as an encoding device or encoder, and a device that decodes a video signal bitstream to restore a video signal is referred to as a decoding device or decoder. In this specification, "video signal processing device" is used as a conceptual term that encompasses both an encoder and a decoder. "Information" is a term that encompasses values, parameters, coefficients, elements, etc., and may be interpreted differently in some cases, so the present invention is not limited thereto. "Unit" is used to represent a basic unit of image processing or a specific location in a picture, and refers to an image region including at least one of a luma component and a chroma component. "Block" refers to an image region including a specific component of a luminance component and a chrominance component (i.e., Cb and Cr). However, depending on the embodiment, the terms "unit," "block," "partition," and "region" may be used interchangeably. In this specification, the term "unit" is used as a concept including a coding unit, a prediction unit, and a transform unit, and the term "picture" refers to a field or a frame, and these terms may be used interchangeably depending on the embodiment.
[0037] 1 is a schematic block diagram of a video signal encoding apparatus 100 according to an embodiment of the present invention. Referring to FIG. 1, the encoding apparatus 100 of the present specification 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.
[0038] The transform unit 110 transforms a residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit 150, to obtain a transform coefficient value. For example, a discrete cosine transform (DCT), a discrete sine transform (DST), or a wavelet transform may be used. The discrete cosine transform and the discrete sine transform divide the input picture signal into blocks and then transform the block. During the transform, coding efficiency may vary depending on the distribution and characteristics of values within the transform domain. The quantization unit 115 quantizes the transform coefficient values output from the transform unit 110.
[0039] To improve coding efficiency, instead of directly coding the picture signal, the prediction unit 150 predicts a picture using a pre-coded region and adds the residual value between the original picture and the predicted picture to obtain a reconstructed picture. To avoid mismatch between the encoder and decoder, the encoder should use information available to the decoder when making predictions. To achieve this, the encoder performs a process of further reconstructing the coded current block. The inverse quantization unit 120 inversely quantizes the transform coefficient values, and the inverse transform unit 125 reconstructs the residual values using the inversely quantized transform coefficient values. Meanwhile, the filtering unit 130 performs filtering operations to improve the quality of the reconstructed picture and the coding efficiency. For example, the filtering unit 130 may include a deblocking filter, a sample adaptive offset (SAO), an adaptive loop filter, etc. The filtered picture is stored in the decoded picture buffer (DPB) 156 for output or use as a reference picture.
[0040] To improve coding efficiency, instead of directly coding a picture signal, the prediction unit 150 predicts a picture using an already coded region and adds a residual value between the original picture and the predicted picture to the predicted picture to obtain a reconstructed picture. The intra prediction unit 152 performs intra prediction within the current picture, and the inter prediction unit 154 predicts the current picture using a reference picture stored in the decoded picture buffer 156. The intra prediction unit 152 performs intra prediction from a reconstructed region within the current picture and transmits the intra coding information to the entropy coding unit 160. The inter prediction unit 154 may further include a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains a motion vector value for the current region by referring to a specific reconstructed region. The motion estimation unit 154a transmits position information of the reference region (e.g., reference frame, motion vector) to the entropy coding unit 160 so that it can be included in the bitstream. Using the motion vector values transmitted from the motion estimation unit 154a, the motion compensation unit 154b performs inter-frame motion compensation.
[0041] 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 using a reference buffer stored in the decoded picture buffer 156. The intra prediction unit 152 performs intra prediction from reconstructed samples within the current picture and transmits intra coding information to the entropy coding unit 160. The intra coding information includes at least one of an intra prediction mode, an MPM (Most Probable Mode) flag, and an MPM index. The intra coding information may include information about reference samples. The inter prediction unit 154 includes a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains a motion vector value for the current region by referring to a specific region of the reconstructed reference signal picture. The motion estimation unit 154a transmits a motion information set (reference picture index, motion vector information) for the reference region to the entropy coding unit 160. The motion compensation unit 154b performs motion compensation using the motion vector values transmitted from the motion compensation unit 154a. The inter prediction unit 154 transmits inter coding information including the motion information for the reference region to the entropy coding unit 160.
[0042] According to a further embodiment, the prediction unit 150 includes an intra block copy (BC) prediction unit (not shown). The intra BC prediction unit performs intra BC prediction from reconstructed samples in the current picture and transmits intra BC coding information to the entropy coding unit 160. The intra BC prediction unit obtains block vector values indicating a reference region to be used for predicting the current region by referring to a specific region in the current picture. The intra BC prediction unit performs intra BC prediction using the obtained block vector values. The intra BC prediction unit transmits the intra BC coding information to the entropy coding unit 160. The intra BC prediction unit includes the block vector information.
[0043] After the picture prediction is performed, the transform unit 110 converts residual values between the original picture and the predicted picture to obtain transform coefficient values. The transform is performed in units of specific blocks within the picture, and the size of the specific blocks varies within a predetermined range. The quantization unit 115 quantizes the transform coefficient values generated by the transform unit 110 and transmits the quantized values to the entropy coding unit 160.
[0044] The entropy coding unit 160 generates a video signal bitstream by entropy coding information indicating quantized transform coefficients, intra-coding information, and inter-coding information. The entropy coding unit 160 uses a variable length coding (VLC) scheme and an arithmetic coding scheme. The variable length coding (VLC) scheme converts input symbols into consecutive codewords, but the length of the codewords is variable. For example, frequently occurring symbols are represented by short codewords, and infrequently occurring symbols are represented by long codewords. The variable length coding scheme used is a context-based adaptive variable length coding (CAVLC). Arithmetic coding converts consecutive data symbols into a single prime number, and arithmetic coding obtains the optimal prime number bits required to represent each symbol. The arithmetic coding scheme used is a context-based adaptive binary arithmetic coding (CABAC). For example, the entropy coding unit 160 may binarize information indicating quantized transform coefficients and may arithmetically code the binarized information to generate a bitstream.
[0045] The generated bitstream is encapsulated in Network Abstraction Layer (NAL) units as basic units. An NAL unit includes an integer number of coded coding tree units. In order for a video decoder to decode the bitstream, the bitstream must first be separated into NAL units and then each separated NAL unit must be decoded. Meanwhile, information required for decoding the video signal bitstream is transmitted via Raw Byte Sequence Payload (RBSP) of higher level sets such as a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), and a Video Parameter Set (VPS).
[0046] 1 illustrates an encoding device 100 according to one embodiment of the present invention, with separate blocks illustrating logically distinct elements of encoding device 100. Therefore, the elements of encoding device 100 described above may be implemented on a single chip or multiple chips depending on the device design. According to one embodiment, the operation of each element of encoding device 100 described above is performed by a processor (not shown).
[0047] 2 is a schematic block diagram of a video signal decoding apparatus 200 according to an embodiment of the present invention. Referring to FIG. 2, the decoding apparatus 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.
[0048] The entropy decoding unit 210 entropy decodes the video signal bitstream to extract transform coefficient information, intra-coding information, inter-coding information, etc. for each region. For example, the entropy decoding unit 210 may obtain a binary code for transform coefficient information of a specific region from the video signal bitstream. The entropy decoding unit 210 also de-binarizes the binary code to obtain quantized transform coefficients. The inverse quantization unit 220 de-quantizes the quantized transform coefficients, and the inverse transform unit 225 restores residual values using the de-quantized transform coefficients. The video signal processing device 200 restores original pixel values by combining the residual values obtained from the inverse transform unit 225 with predicted values obtained from the prediction unit 250.
[0049] Meanwhile, the filtering unit 230 performs filtering on the picture to improve image quality. This includes a deblocking filter to reduce block distortion and / or an adaptive loop filter to remove distortion from the entire picture. The filtered picture is output or stored in the decoded picture buffer (DPB) 256 to be used as a reference picture for the next picture.
[0050] The prediction unit 250 includes an intra prediction unit 252 and an inter prediction unit 254. The prediction unit 250 generates a predicted picture using the coding type, transform coefficients for each region, intra / inter coding information, etc. decoded by the entropy decoding unit 210. To reconstruct the current block to be decoded, the current picture including the current block or a decoded region of another picture can be used. A picture (or tile / slice) that uses only the current picture for reconstruction, i.e., performs intra prediction or intra BC prediction, is called an intra picture or I picture (or tile / slice), and a picture (or tile / slice) that can perform all of intra prediction, inter prediction, and intra BC prediction is called an inter picture (or tile / slice). Among interpictures (or tiles / slices), a picture (or tile / slice) that uses at most one motion vector and reference picture index to predict sample values for each block is called a predictive picture or P picture (or tile / slice), and a picture (or tile / slice) that uses at most two motion vectors and reference picture indexes is called a bi-predictive picture or B picture (or tile / slice). In other words, a P picture (or tile / slice) uses at most one motion information set to predict each block, and a B picture (or tile / slice) uses at most two motion information sets to predict each block. Here, a motion information set includes one or more motion vectors and one reference picture index.
[0051] The intra prediction unit 252 generates a prediction block using intra coding information and reconstructed samples in the current picture. As described above, the intra coding information includes at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, and an MPM index. The intra prediction unit 252 predicts sample values of the current block using reconstructed samples located to the left and / or above the current block as reference samples. In the present disclosure, the reconstructed samples, reference samples, and samples of the current block refer to pixels. Furthermore, sample values refer to pixel values.
[0052] In one embodiment, the reference samples are samples included in neighboring blocks of the current block. For example, the reference samples are samples adjacent to the left boundary and / or the top boundary of the current block. Furthermore, the reference samples are samples located on a line within a predetermined distance from the left boundary of the current block and / or samples located on a line within a predetermined distance from the top boundary of the current block, among samples in neighboring blocks of the current block. In this case, the neighboring blocks of the current block include at least one of the left (L) block, the top (A) block, the below left (BL) block, the above right (AR) block, and the above left (AL) block adjacent to the current block.
[0053] The inter prediction unit 254 generates a prediction block using reference pictures and inter coding information stored in the decoded picture buffer 256. The inter coding information includes a motion information set (e.g., reference picture index, motion vector, etc.) of the current block relative to the reference block. Inter prediction includes L0 prediction, L1 prediction, and bi-prediction. L0 prediction is prediction using one reference picture included in the L0 picture list, and L1 prediction is prediction using one reference picture included in the L1 picture list. This requires one set of motion information (e.g., motion vector and reference picture index). The bi-prediction method uses up to two reference regions, and these two reference regions may exist in the same reference picture or in different pictures. That is, the bi-prediction method uses up to two sets of motion information (e.g., motion vector and reference picture index), and two motion vectors may correspond to the same reference picture index or different reference picture indexes. In this case, the reference picture may be displayed (or output) either temporally before or after the current picture. According to one embodiment, in a bi-predictive scheme, the two reference regions used may be regions selected from the L0 picture list and the L1 picture list, respectively.
[0054] The inter prediction unit 254 obtains a current reference block using a motion vector and a reference picture index. The reference block exists in a reference picture corresponding to the reference picture index. Furthermore, sample values of a block identified by the motion vector or their interpolated values are used as a predictor for the current block. For motion prediction with sub-pel pixel accuracy, for example, an 8-tab interpolation filter is used for the luma signal and a 4-tab interpolation filter is used for the chroma signal. However, the interpolation filters for sub-pel motion prediction are not limited thereto. In this way, the inter prediction unit 254 performs motion compensation, which predicts the texture of the current unit from a previously reconstructed picture. In this case, the inter prediction unit uses a motion information set.
[0055] According to a further embodiment, the predictor 250 may include an intra BC predictor (not shown). The intra BC predictor may reconstruct the current region by referring to a specific region including reconstructed samples in the current picture. The intra BC predictor obtains intra BC coding information for the current region from the entropy decoding unit 210. The intra BC predictor obtains block vector values of the current region indicating the specific region in the current picture. The intra BC predictor may perform intra BC prediction using the obtained block vector values. The intra BC coding information may include block vector information.
[0056] A reconstructed video picture is generated by adding together the predicted value output from the intra prediction unit 252 or the inter prediction unit 254 and the residual value output from the inverse transform unit 225. That is, the video signal decoding apparatus 200 reconstructs a current block using the predicted block generated by the prediction unit 250 and the residual value obtained from the inverse transform unit 225.
[0057] 2 illustrates a decoding device 200 according to one embodiment of the present invention, with separate blocks logically separating elements of the decoding device 200. Thus, the elements of the decoding device 200 described above may be implemented on a single chip or multiple chips depending on the device design. According to one embodiment, the operation of each element of the decoding device 200 described above is performed by a processor (not shown).
[0058] FIG. 3 illustrates an example in which a coding tree unit (CTU) is divided into coding units (CUs) within a picture. During video signal coding, a picture is divided into a sequence of coding tree units (CTUs). A coding tree unit consists of an NXN block of luma samples and two blocks of corresponding chroma samples. A coding tree unit is divided into multiple coding units. A coding tree unit may be a leaf node without being divided. 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 during the above-mentioned video signal processing, i.e., intra / inter prediction, transform, quantization, and / or entropy coding. Within a picture, the size and shape of coding units are not constant. Coding units 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 its width, and a horizontal block is a block whose width is greater than its height. In addition, in this specification, non-square blocks refer to rectangular blocks, but the present invention is not limited to this.
[0059] Referring to Figure 3, a coding tree unit is first divided into a quad tree (QT) structure. That is, in the quad tree structure, one node having a size of 2N x 2N is divided into four nodes having a size of N x N. In this specification, a quad tree is also referred to as a quaternary tree. The quad tree division is performed recursively, and all nodes do not need to be divided to the same depth.
[0060] Meanwhile, the leaf node of the above-mentioned quad tree is further divided into a multi-type tree (MTT) structure. According to an embodiment of the present invention, in the multi-type tree structure, one node is divided into a horizontally or vertically divided binary or ternary tree structure. That is, there are four division structures in the multi-type tree structure: vertical binary division, horizontal binary division, vertical ternary division, and horizontal ternary division. According to an embodiment of the present invention, in each of the tree structures, the width and height of the node are both powers of 2. For example, in a binary tree (BT) structure, a node of size 2N×2N is divided into two N×2N nodes by vertical binary division and into two 2N×N nodes by horizontal binary division. In addition, in a ternary tree (TT) structure, a node of size 2Nx2N is divided into (N / 2)x2N, Nx2N, and (N / 2)x2N nodes by vertical ternary division, and into 2Nx(N / 2), 2NxN, and 2Nx(N / 2) nodes by horizontal ternary division. Such multi-type tree division is performed recursively.
[0061] The leaf nodes of a multi-type tree can be coding units. If no division for a coding unit is specified or the coding unit is not larger than the maximum transform length, the coding unit is used as the unit of prediction and transformation without further division. Meanwhile, in the above-mentioned quad trees and multi-type trees, at least one of the following parameters is predefined or transmitted via the RBSP of a higher-level set such as a PPS, SPS, or VPS: 1) CTU size: the size of the root node of the quad tree; 2) minimum QT size (MinQtSize): the size of the minimum QT leaf node allowed; 3) maximum BT size (MaxBtSize): the size of the maximum BT root node allowed; 4) maximum TT size (MaxTtSize): the size of the maximum TT root node allowed; 5) maximum MTT depth (MaxMttDepth): the maximum allowed depth of MTT division from the QT leaf node; 6) minimum BT size (MinBtSize): the size of the minimum BT leaf node allowed; 7) minimum TT size: the size of the minimum TT leaf node allowed.
[0062] 4 illustrates an embodiment of a method for signaling the splitting of a quadtree and a multi-type tree. Pre-set flags can be used to signal the splitting of the quadtree and multi-type tree. Referring to FIG. 4, at least one of a flag 'qt_split_flag' indicating whether to split a quadtree node, a flag 'mtt_split_flag' indicating whether to split a multi-type tree node, a flag 'mtt_split_vertical_flag' indicating the split direction of a multi-type tree node, and a flag 'mtt_split_binary_flag' indicating the split type of a multi-type tree node can be used.
[0063] According to an embodiment of the present invention, a coding tree unit is the root node of a quad tree and can be split into a quad tree structure first. In the quad tree structure, a 'qt_split_flag' is signaled for each node 'QT_node'. If the value of 'qt_split_flag' is 1, the corresponding node is split into four regular rectangular nodes, and if the value of 'qt_split_flag' is 0, the corresponding node becomes a leaf node 'QT_leaf_node' of the quad tree.
[0064] Each quadtree leaf node 'QT_leaf_node' can be further split into a multi-type tree structure. In a multi-type tree structure, 'mtt_split_flag' is signaled for each node 'MTT_node'. If 'mtt_split_flag' is set to 1, the node is split into multiple rectangular nodes, and if 'mtt_split_flag' is set to 0, the node becomes a leaf node 'MTT_leaf_node' of the multi-type tree. If a multi-type tree node 'MTT_node' is split into multiple rectangular nodes (i.e., if 'mtt_split_flag' is set to 1), 'mtt_split_vertical_flag' and 'mtt_split_binary_flag' can be additionally signaled for the node 'MTT_node'. If the value of 'mtt_split_vertical_flag' is 1, vertical split of node 'MTT_node' is indicated, and if the value of 'mtt_split_vertical_flag' is 0, horizontal split of node 'MTT_node' is indicated. Also, if the value of 'mtt_split_binary_flag' is 1, node 'MTT_node' is split into two rectangular nodes, and if the value of 'mtt_split_binary_flag' is 0, node 'MTT_node' is split into three rectangular nodes.
[0065] Picture prediction (motion compensation) for coding is performed on coding units that cannot be further divided (i.e., leaf nodes of the coding unit tree). Such a basic unit for prediction is hereinafter referred to as a prediction unit or a prediction block.
[0066] Hereinafter, the term "unit" used in this specification is used as an alternative term to the prediction unit, which is a basic unit for performing prediction, but the present invention is not limited thereto and can be understood as a concept including the coding unit in a broader sense.
[0067] 5 and 6 are diagrams illustrating in more detail an intra prediction method according to an embodiment of the present invention. As described above, the intra prediction unit predicts sample values of the current block using reconstructed samples located to the left and / or above the current block as reference samples.
[0068] First, Figure 5 shows an example of reference samples used to predict a current block in intra prediction mode. According to one example, the reference samples are samples adjacent to the left boundary and / or the top boundary of the current block. As shown in Figure 5, if the size of the current block is W x H and samples of a single reference line adjacent to the current block are used for intra prediction, the reference samples are set using up to 2W + 2H + 1 neighboring samples located to the left and / or above the current block.
[0069] Furthermore, if at least some samples used as reference samples have not yet been restored, the intra prediction unit performs a reference sample padding process to obtain reference samples. The intra prediction unit also performs a reference sample filtering process to reduce intra prediction errors. That is, the intra prediction unit performs filtering on neighboring samples and / or the reference samples obtained by the reference sample padding process to obtain filtered reference samples. The intra prediction unit predicts samples of the current block using the reference samples obtained in this manner. The intra prediction unit predicts samples of the current block using unfiltered reference samples or filtered reference samples. In the present disclosure, neighboring samples may include samples on at least one reference line. For example, neighboring samples may include neighboring samples on a line adjacent to a boundary of the current block.
[0070] Next, Figure 6 illustrates an embodiment of prediction modes used in intra prediction. For intra prediction, intra prediction mode information indicating the intra prediction direction can be signaled. The intra prediction mode information indicates one of a plurality of intra prediction modes constituting an intra prediction mode set. If the current block is an intra predicted block, the decoder receives the intra prediction mode information of the current block from the bitstream. An intra prediction unit of the decoder performs intra prediction on the current block based on the extracted intra prediction mode information.
[0071] According to an embodiment of the present invention, the intra prediction mode set includes all intra prediction modes used in intra prediction (e.g., a total of 67 intra prediction modes). More specifically, the intra prediction mode set includes a planar mode, a DC mode, and a plurality of (e.g., 65) angle modes (i.e., directional modes). Each intra prediction mode is indicated by a predetermined index (i.e., intra prediction mode index). For example, as shown in FIG. 6, intra prediction mode index 0 indicates a planar mode, and intra prediction mode index 1 indicates a DC mode. In addition, intra prediction mode indexes 2 to 66 indicate different angle modes. Each angle mode indicates a different angle within a predetermined angle range. For example, the angle mode may indicate an angle within an angle range of 45° to −135° clockwise (i.e., a first angle range). The angle modes may be defined based on the 12 o'clock direction. In this case, intra prediction mode index 2 indicates horizontal diagonal (HDIA) mode, intra prediction mode index 18 indicates horizontal (HOR) mode, intra prediction mode index 34 indicates diagonal (DIA) mode, intra prediction mode index 50 indicates vertical (VER) mode, and intra prediction mode index 66 indicates vertical diagonal (VDIA) mode.
[0072] In a further embodiment of the present invention, angle modes outside the first angle range may be further used. For example, the angle modes outside the first angle range may be angle modes -14 to -1 or angle modes 67 to 80 in FIG. 6. As described above, the number of extended angle modes may vary depending on the size and / or shape of the current block, and may be extended up to angle mode 80 or angle mode -14 in FIG. 6. For example, the number of extended angles or the index of the extended mode may be determined based on a value based on the ratio of the width and height of the current block. In one 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 PU.
[0073] Hereinafter, an inter prediction method according to an embodiment of the present invention will be described with reference to Figure 7. In the present invention, the inter prediction method may include a general inter prediction method optimized for translation motion and an affine model-based inter prediction method. In addition, the motion vector may generally include at least one of a general motion vector for motion compensation based on the inter prediction method and a control point motion vector for affine motion compensation.
[0074] FIG. 7 illustrates an inter-prediction method according to an embodiment of the present invention. As described above, a decoder can predict a current block by referring to reconstructed samples of other decoded pictures. Referring to FIG. 7, the decoder obtains a reference block 702 in a reference picture 720 based on a motion information set of a current block 701. The motion information set may include a reference picture index and a motion vector 703. The reference picture index indicates a reference picture 720 in a reference picture list that includes a reference block for inter-prediction of the current block. According to an embodiment, the reference picture list may include at least one of the L0 picture list and the L1 picture list. The motion vector indicates an offset between the coordinate values of the current block 701 in the current picture 710 and the coordinate values of the reference block 702 in the reference picture 720. The decoder obtains a predictor for the current block 701 based on sample values of the reference block 702 and reconstructs the current block 701 using the predictor.
[0075] Specifically, the encoder can obtain the reference block by searching for a block similar to the current block in an earlier picture in the reconstruction order. For example, the encoder can search for a reference block that minimizes the sum of differences between the current block and sample values within a preset search area. At this time, at least one of SAD (Sum of Absolute Difference) or SATD (Sum of Hadamard Transformed Difference) can be used to measure the similarity between the current block and the reference block samples. Here, SAD may be the sum of all absolute values of differences between sample values included in two blocks. SATD may be the sum of all absolute values of Hadamard transform coefficients obtained by Hadamard transforming the differences between sample values included in two blocks.
[0076] Meanwhile, the current block may be predicted using one or more reference regions. As described above, the current block may be inter-predicted using a bi-prediction scheme using two or more reference regions. According to one embodiment, a decoder may obtain two reference blocks based on two motion information sets of the current block. The decoder may also obtain a first predictor and a second predictor for the current block based on sample values of each of the obtained two reference blocks. The decoder may also reconstruct the current block using the first predictor and the second predictor. For example, the decoder may reconstruct the current block based on a sample-by-sample average of the first predictor and the second predictor.
[0077] As described above, one or more motion information sets can be signaled for motion compensation of the current block. In this case, similarity between the motion information sets for motion compensation of each of the multiple blocks can be utilized. For example, the motion information set used for predicting the current block can be derived from the motion information set used for predicting any one of the other previously reconstructed samples. This allows the encoder and decoder to reduce signaling overhead. Various embodiments in which the motion information set of the current block is signaled will be described below.
[0078] For example, there may be multiple candidate blocks that could be predicted based on a motion information set that is the same as or similar to the motion information set of the current block. The decoder may generate a merge candidate list based on the multiple candidate blocks. Here, the merge candidate list may include candidates corresponding to samples that could be predicted based on a motion information set related to the motion information set of the current block, among samples reconstructed before the current block. The encoder and decoder may configure the merge candidate list for the current block based on a predefined rule. In this case, the merge candidate lists configured by the encoder and decoder may be identical to each other. For example, the encoder and decoder may configure the merge candidate list for the current block based on the position of the current block within the current picture. In this disclosure, the position of a specific block refers to the relative position of the top-left sample of the specific block within a picture including the specific block.
[0079] Meanwhile, in order to improve coding efficiency, a method may be used in which, instead of coding the residual signal as is, the transform unit transforms the residual signal to obtain transform coefficient values, quantizes the obtained transform coefficients, and codes the quantized transform coefficients. As described above, the transform unit may transform the residual signal to obtain transform coefficient values. In this case, the residual signal of a specific block may be distributed throughout the entire region of the current block. Thus, energy may be concentrated in the low-frequency region using a frequency domain transform on the residual signal, thereby improving coding efficiency. Hereinafter, a method for transforming or inversely transforming the residual signal will be described in detail.
[0080] FIG. 8 is a diagram specifically illustrating a method in which an encoder transforms a residual signal. As described above, a spatial-domain residual signal may be transformed into a frequency domain. The encoder may transform the obtained residual signal to obtain transform coefficients. First, the encoder may obtain at least one residual block including a residual signal for a current block. The residual block may be either the current block or a block divided from the current block. In this disclosure, the residual block may be referred to as a residual array or a residual matrix including residual samples of the current block. In this disclosure, the residual block refers to a block having the same size as a transform unit or a transform block.
[0081] Next, the encoder may transform the residual block using a transform kernel. The transform kernel used to transform the residual block may be a transform kernel having separable vertical and horizontal transform characteristics. In this case, the transform of the residual block may be performed separately as a vertical transform and a horizontal transform. For example, the encoder may perform a vertical transform by applying a transform kernel to the vertical direction of the residual block. Also, the encoder may perform a horizontal transform by applying a transform kernel to the horizontal direction of the residual block. In this disclosure, the transform kernel may be a term that refers to a set of parameters used to transform the residual signal, such as a transform matrix, a transform array, a transform function, or a transform. According to an embodiment, the transform kernel may be any one of a plurality of available kernels. Furthermore, transform kernels based on different transform types may be used for the vertical transform and the horizontal transform.
[0082] The encoder may transmit a transform block transformed from the residual block to a quantizer for quantization. At this time, the transform block may include a plurality of transform coefficients. Specifically, the transform block may be composed of a plurality of transform coefficients arranged in a two-dimensional array. The size of the transform block may be the same as that of the current block or one of the blocks divided from the current block, similar to the size of the residual block. The transform coefficients transmitted to the quantizer may be represented by quantized values.
[0083] The encoder may also perform an additional transform before quantizing the transform coefficients. As shown in FIG. 8, the above-described transform method may be referred to as a primary transform, and the additional transform may be referred to as a secondary transform. The secondary transform may be selectively performed for each residual block. According to an embodiment, the encoder may improve coding efficiency by performing a secondary transform on a region where it is difficult to concentrate energy in the low-frequency region using only the primary transform. For example, a secondary transform may be added to a block whose residual values appear significantly in a direction other than the horizontal or vertical direction of the residual block. The residual values of an intra-predicted block may be more likely to change in a direction other than the horizontal or vertical direction than the residual values of an inter-predicted block. Accordingly, the encoder may further perform a secondary transform on the residual signal of the intra-predicted block. Alternatively, the encoder may omit the secondary transform on the residual signal of the inter-predicted block.
[0084] As another example, whether to perform a secondary transform may be determined depending on the size of the current block or the residual block. Also, different sizes of transform kernels may be used depending on the size of the current block or the residual block. For example, an 8x8 secondary transform may be applied to a block whose shorter side, either width or height, is greater than or equal to a first preset length. Also, a 4x4 secondary transform may be applied to a block whose shorter side, either width or height, is greater than or equal to a second preset length but smaller than the first preset length. In this case, the first preset length may be greater than the second preset length, but the present disclosure is not limited thereto. Also, unlike the primary transform, the secondary transform does not need to be separated into a vertical transform and a horizontal transform. Such a secondary transform may be called a low frequency non-separable transform (LFNST).
[0085] Furthermore, in the case of a video signal of a specific region, high-frequency band energy may not be reduced even after frequency transformation due to a sudden change in brightness. This may result in a decrease in compression performance due to quantization. Furthermore, when a transformation is performed on a region where residual values rarely exist, encoding and decoding times may unnecessarily increase. For this reason, the transformation of the residual signal of the specific region may be omitted. Whether or not to transform the residual signal of the specific region may be determined by a syntax element related to the transformation of the specific region. 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 for a residual block indicates a transform skip, the transformation of the corresponding residual block is not performed. In this case, the encoder may immediately quantize the residual signal of the corresponding region that is not transformed. The operation of the encoder described with reference to FIG. 8 can be performed by the transform unit of FIG. 1.
[0086] The aforementioned transform-related syntax elements may be information parsed from a video signal bitstream. A decoder may entropy decode the video signal bitstream to obtain the transform-related syntax elements. An encoder may entropy code the transform-related syntax elements to generate a video signal bitstream.
[0087] FIG. 9 is a diagram specifically illustrating a method in which an encoder and a decoder inversely transform transform coefficients to obtain a residual signal. Hereinafter, for convenience of explanation, it will be assumed that an inverse transform operation is performed in each inverse transform unit of the encoder and the decoder. The inverse transform unit may inversely transform dequantized transform coefficients to obtain a residual signal. First, the inverse transform unit may detect whether an inverse transform for a specific region is to be performed based on a transform-related syntax element for the specific region. According to an embodiment, if a transform-related syntax element for a specific transform block indicates a transform skip, the transform for the specific transform block may be skipped. In this case, the first inverse transform and the second inverse transform described above may both be skipped for the transform block. Furthermore, the dequantized transform coefficients may be used as a residual signal. For example, a decoder may reconstruct a current block using the dequantized transform coefficients as a residual signal.
[0088] In another embodiment, a transform-related syntax element for a specific transform block may not indicate a transform skip. In this case, the inverse transform unit may determine whether to perform a secondary inverse transform on the secondary transform. For example, if the transform block is a transform block of an intra-predicted block, a secondary inverse transform may be performed on the transform block. Furthermore, a secondary transform kernel to be used for the transform block may be determined based on an intra-prediction mode corresponding to the transform block. As another example, whether to perform a secondary inverse transform may be determined based on the size of the transform block. The secondary inverse transform may be performed after the inverse quantization process and before the primary inverse transform is performed.
[0089] The inverse transform unit may perform a primary inverse transform on the dequantized transform coefficients or the secondary inverse transformed transform coefficients. In the case of a primary inverse transform, a vertical transform and a horizontal transform may be separately performed, similar to the primary transform. For example, the inverse transform unit may perform a vertical inverse transform and a horizontal inverse transform on the transform block to obtain a residual block. The inverse transform unit may inverse transform the transform block based on a transform kernel used to transform the transform block. For example, the encoder may explicitly or implicitly signal information indicating a transform kernel applied to a current transform block from among multiple available transform kernels. The decoder may select a transform kernel to be used for the inverse transform of the transform block from among the multiple available transform kernels using the signaled information indicating the transform kernel. The inverse transform unit may reconstruct the current block using a residual signal obtained by inverse transforming the transform coefficients.
[0090] FIG. 10 is a diagram illustrating a current picture referencing method according to an embodiment of the present invention. As described above, an encoder / decoder may refer to a block in a reference picture (i.e., a reference block in a reference picture) when performing prediction on a current block. According to an embodiment of the present invention, the reference picture may be a picture including the current block, i.e., the current picture. That is, an encoder / decoder may refer to a block in the current picture when performing prediction on the current block. In the present invention, such a method of performing prediction with reference to a block in the current picture may be referred to as current picture referencing (CPR) or intra block copy (IBC). In one 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 can infer the reference picture without signaling / parsing.
[0091] Furthermore, according to an embodiment, when IBC is applied, a motion vector indicating a reference block referenced by a current block may exist. According to an embodiment, when IBC is applied, the position of the reference block may be restricted. For example, the position of the reference block may be restricted to an area within a certain range based on the position of the current block. For example, the position of the reference block may be restricted to an area within a coding tree unit (CTU) including the current block (i.e., the current CTU). Alternatively, the position of the reference block may be restricted to a position including at least a portion of the CTU including the current block. According to an embodiment of the present invention, by restricting the position of the reference block, memory burden can be reduced and compression efficiency can be improved.
[0092] According to an embodiment of the present invention, there may be signaling (or a syntax element) indicating whether a current block uses IBC (or whether IBC is applied to the current block). As an example, such signaling may be signaling at 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 example, IBC may be used if a reference picture referred to by the current block is the current picture. Alternatively, if the current picture is the only reference picture, the encoder / decoder may use IBC. Furthermore, IBC may be used if the current block is a block that does not use intra prediction. That is, for example, if the reference picture corresponding to the current block is the current picture, IBC may be used if intra prediction is not used. As an example, a variable indicating whether the current picture is the only reference picture may be defined. For example, the variable indicating that the current picture is the only reference picture may be expressed as CurrPicIsOnlyRef. Alternatively, using IBC can indicate that the reference picture is the current picture, or alternatively, using IBC can indicate that the reference picture is the current picture and that intra prediction is not used.
[0093] Furthermore, according to one embodiment of the present invention, when IBC is used (or applied), the encoder / decoder may indicate (or signal) motion information using the merge mode, AMVP mode, etc. Also, when IBC is used, the current slice or tile may be set (or defined) to a P slice or a P tile. Also, when IBC is used, a flag (or syntax element, variable) indicating the use of a dual tree may be set to a value indicating the use of a dual tree. In the present invention, a dual tree may refer to a tree structure in which a tree corresponding to a luma component and a tree corresponding to a chroma component may be different.
[0094] Referring to FIG. 10, a current block represented by a solid line exists in the current picture, and a reference block represented by a dotted line exists in the current picture. In this case, motion information indicating the position of the reference block may exist. Referring to FIG. 10, the displayed arrow may be motion information indicating the position of the reference block. Furthermore, according to an embodiment of the present invention, when IBC is used, the candidate list configuration may be different. For example, when IBC is used, temporal candidates may not be included in the candidate list. Furthermore, in an embodiment, when IBC is used, it is not necessary to scale motion information referenced from the surroundings.
[0095] FIG. 11 is a diagram illustrating a method for constructing a merge candidate list according to an embodiment of the present invention. According to an embodiment of the present invention, when IBC is used, the method for constructing a merge candidate list may be different from when IBC is not used. For example, some candidates that would be added to the merge candidate list when IBC is not used may not be added to the merge candidate list when IBC is used. As an embodiment, when IBC is used, zero motion vectors (MVs) may not be used because a reference block indicated by a zero MV in the current picture can become the current block. As an embodiment, when IBC is used, temporal MVs (i.e., collocated MVs) may not be used because pictures other than the current picture cannot be referenced when IBC is used.
[0096] Also, 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. Also, as an embodiment, when IBC is used, sub-block merging mode may not be used. When IBC is used, a decoder can infer whether sub-block merging mode is applied without parsing a flag indicating whether sub-block merging mode is applied.
[0097] 12 is a diagram illustrating a coding unit syntax structure according to an embodiment of the present invention. According to an embodiment of the present invention, 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 MODE_IBC, which is different from MODE_INTRA and MODE_INTER, may be defined. Also, as shown in the previous drawings, MODE_INTRA, MODE_INTER, and MODE_IBC may be represented by a CuPredMode value. Here, CuPredMode is a variable indicating the current prediction mode.
[0098] Referring to FIG. 12, a tile group may be a processing unit at a higher level than CU, CTU, PU, etc. The tile group according to an embodiment of the present invention may be a unit capable of parallel processing. In the present invention, the tile group may be replaced with a slice or another unit capable of parallel processing. A B (bi-predictive) tile group may use intra prediction, inter prediction, IBC, etc. Also, a B tile group may use up to two motion vectors and two reference indexes per block. Alternatively, a B tile group may use one or more motion vectors and one or more reference indexes per block.
[0099] In one embodiment, intra prediction may include IBC prediction. Intra prediction may be a prediction method that references only the current picture. Inter prediction may be a prediction method that references a picture other than the current picture as a reference picture. A P (predictive) tile group may use intra prediction, inter prediction, IBC prediction, etc. A P tile group may use up to one motion vector and one reference index per block. A B tile group may not use more than two motion vectors and two reference indexes per block.
[0100] An I (intra) tile group represents a tile group (slice) that can use intra prediction and IBC prediction. An I tile group does not need to refer to pictures other than the current picture as reference pictures.
[0101] According to one embodiment of the present invention, in step 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 any of cu_skip_flag, pred_mode_flag, and pred_mode_ibc_flag. Here, sps_ibc_enabled_flag may be higher-level signaling (or a syntax element) indicating (or indicating) whether IBC is available. If sps_ibc_enabled_flag is set to 0, IBC is not used, and if set to 1, IBC can be used. And, cu_skip_flag represents a syntax element indicating whether skip mode is used. If cu_skip_flag is 1, skip mode may be used. Also, a 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. Or, a CuPredMode value may be determined based on pred_mode_flag or pred_mode_ibc_flag.
[0102] Furthermore, tile_group_type may indicate the type of tile group. As described above, the types of tile groups may include an I tile group, a P tile group, and a B tile group. Furthermore, when the tile_group_type value is I, P, or B, it may indicate an I tile group, a P tile group, or a B tile group, respectively. As described above, in the present invention, the tile group may be called a slice or other unit that can be processed in parallel.
[0103] According to one embodiment of the present invention, in step S1203, if (cu_skip_flag[x0][y0]==0 && tile_group_type !=I)), the decoder can parse pred_mode_flag. Also, if cu_skip_flag is 1, the decoder may not parse pred_mode_flag. Also, if tile_group_type is I, the decoder may not parse pred_mode_flag.
[0104] According to one embodiment of the present invention, in step 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 can parse pred_mode_ibc_flag. For example, if (tile_group_type==I && cu_skip_flag[x0][y0]==0), the decoder can parse pred_mode_ibc_flag. Or, if (tile_group_type !=I && (cu_skip_flag[x0][y0]| |CuPredMode[x0][y0] !=MODE_INTRA)), the decoder can parse pred_mode_ibc_flag. Or, 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 does not have to parse pred_mode_ibc_flag. Also, if sps_ibc_enabled_flag is 1, the decoder can parse pred_mode_ibc_flag, but if sps_ibc_enabled_flag is 0, the decoder does not have to parse pred_mode_ibc_flag. Also, a condition based on a block size for parsing pred_mode_ibc_flag may be predefined. Referring to FIG. 12, for example, the block size condition may be defined (or set) as a case where cbWidth and cbHeight are both smaller than 32. Here, cbWidth is a variable indicating the width of a current block (i.e., a coding unit, a coding block), and cbHeight is a variable indicating the height of the current block.
[0105] Also, as an example, in step 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 need to 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 decoder may parse syntax elements related to IBC. The IBC-related syntax elements may include syntax elements related to motion vectors. That is, if CuPredMode is MODE_IBC, the decoder may parse IBC-related syntax elements. The IBC-related syntax elements may include syntax elements related to merge mode and AMVP-related syntax elements. In addition, IBC may have more limited prediction modes than MODE_INTER, and the number of syntax elements to be parsed may be smaller. For example, when MODE_IBC is specified, the decoder may parse only the syntax elements for reference list L0. As another example, when MODE_IBC is specified, the decoder may not parse some of the flags indicating whether the mode is used in the merge_data syntax structure. Furthermore, when CuPredMode is not MODE_INTRA, the decoder may parse either inter-prediction-related syntax elements or IBC-related syntax elements. When parsing IBC-related syntax elements, the decoder may not parse syntax elements for chroma components. Alternatively, when CuPredMode is not MODE_INTRA, the decoder may parse inter-prediction-related syntax elements and parse IBC-related syntax elements only when treeType is not DUAL_TREE_CHROMA. DUAL_TREE_CHROMA indicates that the tree type is a dual tree for chroma components.
[0106] Here, treeType is a variable indicating the tree type of the current block (i.e., coding unit, coding block). In other words, treeType is a variable indicating which tree type the current block, which is the current coding tree node, is divided into. 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 for luma components or a dual tree for chroma components.
[0107] As an embodiment of the present invention, an encoder / decoder can determine (or decide) which component (e.g., luma component (block) or chroma component (block)) to parse syntax for or process based on the treeType. If the treeType is SINGLE_TREE, the luma component and the chroma component can share syntax element values. If the treeType is SINGLE_TREE, the luma block and the chroma block may be partitioned in the same manner (or with the same structure). If the treeType is DUAL_TREE, the luma block and the chroma block may be partitioned in different manners. If the treeType is DUAL_TREE, the treeType can include DUAL_TREE_LUMA and DUAL_TREE_CHROMA. Depending on whether the treeType is DUAL_TREE_LUMA or DUAL_TREE_CHROMA, the decoder can determine (or decide) whether to process the luma component or the chroma component.
[0108] According to an embodiment of the present invention, the prediction mode of the current coding unit may be determined based on pred_mode_flag. Furthermore, CuPredMode may be determined based on pred_mode_flag. Furthermore, inter prediction or intra prediction may be indicated based on pred_mode_flag. According to an embodiment of the present invention, if pred_mode_flag is 0, CuPredMode may be set to MODE_INTER. Furthermore, if pred_mode_flag is 1, CuPredMode may be set to MODE_INTRA. According to an embodiment, pred_mode_flag may indicate whether the current CU is in inter prediction mode or intra prediction mode.
[0109] If pred_mode_flag is not present, the decoder can infer pred_mode_flag or CuPredMode. If pred_mode_flag is not present, the decoder can infer pred_mode_flag or CuPredMode based on the tile group (or slice). For example, if it is an I tile group, the decoder can infer CuPredMode as MODE_INTRA. Also, if it is a P tile group or a B tile group, the decoder can infer CuPredMode as MODE_INTER.
[0110] According to an embodiment of the present invention, the prediction mode of the current coding unit may be determined based on pred_mode_ibc_flag. Also, CuPredMode may be determined based on pred_mode_ibc_flag. Also, the encoder / decoder may indicate whether the current coding unit is in IBC mode based on pred_mode_ibc_flag.
[0111] In one embodiment, CuPredMode may be set to MODE_INTER if pred_mode_ibc_flag is 0. Alternatively, CuPredMode may be set to MODE_IBC if pred_mode_ibc_flag is 1. Alternatively, CuPredMode may be set to a value other than MODE_IBC if pred_mode_ibc_flag is 0.
[0112] If pred_mode_ibc_flag is not present, the decoder can infer pred_mode_ibc_flag or CuPredMode. If pred_mode_ibc_flag is not present, the decoder can infer pred_mode_ibc_flag or CuPredMode based on the tile group (or slice). For example, if it is an I tile group, CuPredMode can be inferred as MODE_INTRA. Also, if it is a P tile group or a B tile group, CuPredMode can be inferred as MODE_INTER.
[0113] According to one embodiment of the present invention, when IBC is used, the encoder / decoder can use skip mode. For example, when IBC is used for an I-tile group (or slice), the encoder / decoder can use skip mode. For example, for an I-tile group, the encoder / decoder can use skip mode for a CU that uses IBC. For example, in an I-tile group, it is possible to assume that the CU is in IBC mode and in skip mode. In this case, sps_ibc_enabled_flag may be 1. The decoder can parse cu_skip_flag. In this case, the value of cu_skip_flag may be 1 (a value indicating that skip mode is used). In addition, when cu_skip_flag is 1 or the CU is an I-tile group, the decoder does not need to parse pred_mode_flag. In this case, the decoder can infer that CuPredMode is MODE_INTRA for an I-tile group. In addition, when the CU is an I-tile group and cu_skip_flag is 1, the decoder does not need to parse pred_mode_ibc_flag. In this case, the decoder can infer that CuPredMode is MODE_INTRA for the I-tile group. Therefore, a situation may arise where CuPredMode is not expressed as MODE_IBC even though IBC is used.
[0114] 13 is a diagram illustrating a coding unit syntax structure according to an embodiment of the present invention. According to an embodiment of the present invention, an encoder / decoder may not use the IBC mode for a chroma component. Specifically, if the tree type is DUAL_TREE_CHROMA, the encoder / decoder may not use the IBC mode. Referring to FIG. 13, in step S1301, if the treeType is not DUAL_TREE_CHROMA, the decoder may parse pred_mode_ibc_flag. Also, if the treeType is DUAL_TREE_CHROMA, the decoder may not parse pred_mode_ibc_flag. According to an embodiment, if the treeType is DUAL_TREE_CHROMA, the decoder may infer CuPredMode to be MODE_INTRA.
[0115] 14 is a diagram illustrating a coding unit syntax structure according to an embodiment of the present invention. The coding unit syntax illustrated in FIG. 14 illustrates syntax related to intra prediction. According to an embodiment of the present invention, 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 will be described later, intra_chroma_pred_mode may be an index indicating a specific prediction mode combination in an intra prediction mode table according to the intra prediction mode of a luma component. In the present invention, intra_chroma_pred_mode may be referred to as a chroma intra prediction mode index.
[0116] 14, in step S1401, if treeType is SINGLE_TREE or DUAL_TREE_CHROMA, the decoder can parse intra_chroma_pred_mode, and if treeType is DUAL_TREE_LUMA, the decoder does not need to parse intra_chroma_pred_mode.
[0117] FIG. 15 is a diagram illustrating a method for deriving an intra prediction mode for a chroma component according to an embodiment of the present invention. Referring to FIG. 15, the intra prediction mode deriving process for a chroma component according to an embodiment of the present invention may use the top-left sample position of a current chroma coding block and the width and height of the current chroma coding block as inputs, and a chroma intra prediction mode may be derived in this process. In FIG. 15, IntraPredModeC represents the intra prediction mode for the chroma component. Also, xCb and yCb may represent the top-left sample of the chroma coding block relative to the luma position. Also, IntraPredModeY may represent the intra prediction mode for the luma component.
[0118] According to an embodiment of the present invention, IntraPredModeC may be determined based on IntraPredModeY. Alternatively, IntraPredModeC may be determined based on IntraPredModeY and intra_chroma_pred_mode. In this case, IntraPredModeY may be the intra prediction mode of a luma block corresponding to (or corresponding to) a current chroma block. According to an embodiment, the use position of IntraPredModeY corresponding to IntraPredModeC at a specific position may be pre-set. According to an embodiment, the pre-set position may be the luma block position corresponding to (or corresponding to) the center position of the current chroma block. For example, when deriving IntraPredModeC at a position (xCb, yCb), the encoder / decoder may refer to IntraPredModeY at a position (xCb+cbWidth / 2, yCb+cbHeight / 2). Alternatively, when deriving IntraPredModeC at the (xCb, yCb) position, the already set position may be a position set based on the (xCb, yCb) luma position.
[0119] According to an embodiment of the present invention, the IntraPredModeC value according to IntraPredModeY may be determined with reference to Table 1 or Table 2 below. Table 1 shows a method for determining a chrominance intra prediction mode when a cross-component linear model (CCLM) cannot be used (i.e., when sps_cclm_enalbed_flag is 0), and Table 2 shows a method for determining a chrominance intra prediction mode when a CCLM can be used (i.e., when sps_cclm_enalbed_flag is 1). The CCLM prediction mode may be a prediction method in which a prediction sample is obtained based on values of other color components (e.g., restored values of other color components). Alternatively, the CCLM prediction mode may be a prediction method in which a prediction sample is obtained based on a linear model between color components.
[0120] [Table 1]
[0121] [Table 2]
[0122] Referring to Tables 1 and 2, the encoder / decoder may refer to a column according to the IntraPredModeY value at a previously set position (e.g., the luma position at the bottom right center of a chroma coding block), and the value corresponding to intra_chroma_pred_mode in that column may become IntraPredModeC. For example, if IntraPredModeY is 1 and intra_chroma_pred_mode is 1, IntraPredModeC may be 50.
[0123] According to one embodiment, sps_cclm_enalbed_flag may be a higher level signaling (or syntax element) that indicates whether CCLM can be applied. For example, if sps_cclm_enalbed_flag is 1, CCLM can be applied. If sps_cclm_enalbed_flag is 0, CCLM cannot be applied.
[0124] In addition, in Table 2, an IntraPredModeC value of 81, 82, or 83 may indicate that the CCLM mode is applied. In addition, when sps_cclm_enabled_flag in Table 1 is 0, an IntraPredModeC value of 4 may indicate that the prediction mode of the current chroma component corresponds to the DM mode. In addition, when sps_cclm_enabled_flag in Table 2 is 1, an IntraPredModeC value of 7 may indicate that the prediction mode of the current chroma component corresponds to the DM mode.
[0125] Also, a bin string for signaling intra_chroma_pred_mode may be predefined. For example, the encoder / decoder can indicate DM mode using the intra_chroma_pred_mode with the fewest number of bits. For example, the encoder / decoder can indicate DM mode using a 1-bit intra_chroma_pred_mode.
[0126] Also, according to one embodiment, when sps_cclm_enalbed_flag is 0, the encoder / decoder can set (or assign) increasing numbers of bits representing intra_chroma_pred_mode values 4, 0, 1, 2, and 3, or set them to the same value. According to one embodiment, when sps_cclm_enalbed_flag is 0, the bin strings representing intra_chroma_pred_mode values 4, 0, 1, 2, and 3 may be set (or assigned) to 0, 100, 101, 110, and 111, respectively.
[0127] Also, according to one embodiment, when sps_cclm_enalbed_flag is 1, the encoder / decoder can set (or assign) increasing numbers of bits representing intra_chroma_pred_mode values 7, 4, 5, 6, 0, 1, 2, and 3, or set them to the same value. According to one embodiment, when sps_cclm_enalbed_flag is 1, the bin strings representing intra_chroma_pred_mode values 7, 4, 5, 6, 0, 1, 2, and 3 may be set (or assigned) to 0, 10, 1110, 1111, 11000, 11001, 11010, and 11011, respectively.
[0128] According to the above embodiment, it may not be easy to perform intra prediction for a chroma block. In particular, it may not be easy to derive an intra prediction mode for a chroma block. As described above, if a chroma block is intra predicted, the intra prediction mode for the corresponding luma block may need to be referenced to determine the intra prediction mode. However, if a corresponding luma position does not perform intra prediction, i.e., the MODE_INTRA mode may not be selected. For example, if a corresponding luma position is in MODE_IBC, a corresponding intra prediction mode may not exist. According to one embodiment, in the case of SINGLE_TREE, the corresponding luma block and chroma block may use the same prediction mode. In the case of DUAL_TREE, the corresponding luma block and chroma block may use different prediction modes. In addition, 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, it may happen that DUAL_TREE_LUMA uses MODE_IBC and DUAL_TREE_CHROMA uses MODE_INTRA at the same position (or at corresponding positions).
[0129] FIG. 16 is a diagram illustrating a method for deriving an intra prediction mode of a chroma component according to an embodiment of the present invention. The embodiment of FIG. 16 may provide a method for solving the problem described above in FIG. 15. According to an embodiment of the present invention, if IntraPredModeY does not exist, IntraPredModeY may be set to a previously set mode (or value). In other words, if an intra prediction mode for a luma component at a corresponding position of a chroma component does not exist, the luma intra prediction mode for deriving the intra prediction mode of the chroma component may be set to a previously set mode (or value). Therefore, even if a luma position corresponding to (or corresponding to) a chroma block does not use intra prediction or uses IBC mode, IntraPredModeC may be derived based on a previously set value.
[0130] More specifically, if IntraPredModeY is not present, IntraPredModeY may be set to planar mode (i.e., value 0 or mode number 0). In such a case, the encoder can signal planar mode to the decoder using fewer bits in the signaling methods described in Tables 1 and 2 above.
[0131] Alternatively, if IntraPredModeY is not present, IntraPredModeY may be set to DC mode (i.e., value 1 or mode number 1). In such a case, in the signaling method described in Tables 1 and 2 above, the encoder can signal DC mode to the decoder using fewer bits.
[0132] Alternatively, if IntraPredModeY is not present, IntraPredModeY may be set to vertical mode (i.e., value 50 or mode number 50). In such a case, the signaling method described above in Tables 1 and 2 allows the encoder to signal vertical mode to the decoder using fewer bits.
[0133] Alternatively, if IntraPredModeY is not present, IntraPredModeY may be set to horizontal mode (i.e., value 18 or mode number 18). In such a case, the encoder can signal horizontal mode using fewer bits in the signaling methods described in Tables 1 and 2 above.
[0134] As another example, if IntraPredModeY is not present, the IntraPredModeC value corresponding to the intra_chroma_pred_mode value may be set to a value not shown in Tables 1 and 2 above. That is, Tables 1 and 2 above may have a separate column for cases where the IntraPredModeY value is not present. For example, IntraPredModeC corresponding to intra_chroma_pred_mode4, 0, 1, 2, and 3 may be 0, 1, 50, and 18, respectively. Or, IntraPredModeC corresponding to intra_chroma_pred_mode4, 0, 1, 2, and 3 may be 0, 50, 18, and 1, respectively. This is applicable to both cases where sps_cclm_enabled_flag is 0 and 1.
[0135] In another embodiment, if IntraPredModeY is not present, IntraPredModeC can be set to a previously set value. For example, if IntraPredModeY is not present, IntraPredModeC can be set to a previously set value regardless of intra_chroma_pred_mode. Also, if IntraPredModeY is not present, the intra_chroma_pred_mode value can always be signaled as 0. For example, if IntraPredModeY is not present, IntraPredModeC can be set to planar mode. Or, if IntraPredModeY is not present, IntraPredModeC can be set to CCLM. Or, if IntraPredModeY is not present, IntraPredModeC can be set to DM mode. Also, if IntraPredModeY is not present, the decoder does not need to parse intra_chroma_pred_mode as described above in FIG. 14.
[0136] As another example, if IntraPredModeY is not present, the encoder / decoder can change the location where IntraPredModeY is referenced.
[0137] As described above, in the above embodiment, the absence of IntraPredModeY may indicate that the corresponding luma position referenced when deriving a chrominance intra prediction mode is not MODE_INTRA. That is, when deriving a chrominance intra prediction mode at the (xCb, yCb) position, CuPredMode[xCb+cbWidth / 2][yCb+cbHeight / 2] corresponding to the luma component is not MODE_INTRA or is MODE_IBC.
[0138] 16, when deriving IntraPredModeC[xCb][yCb], if IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] does not exist (when MODE_INTRA is not set or when MODE_IBC is set), the encoder / decoder can set IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] to a previously set value. Then, the encoder / decoder can derive IntraPredModeC by referring to the set IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] and Table 1 or Table 2.
[0139] In addition, when deriving IntraPredModeC[xCb][yCb], if IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] exists, the encoder / decoder can derive IntraPredModeC by referring to IntraPredModeY[xCb+cbWidth / 2][yCb+cbHeight / 2] and the above-mentioned Table 1 or Table 2.
[0140] According to another embodiment of the present invention, when predicting a chroma block, if a corresponding luma block uses IBC mode, the prediction mode may be restricted. More specifically, when intra-predicting a chroma block, if the corresponding luma block uses IBC mode, the intra-prediction mode may be restricted. For example, in this case, DM mode may not be used. This is because if the corresponding luma block and chroma block use different modes, the similarity between them may decrease.
[0141] According to an embodiment of the present invention, a prediction angle of an intra-prediction mode may be defined by a prediction mode index of the intra-prediction mode. In one embodiment, a mapping table between prediction mode indexes and angles may be defined as shown in Table 3 below. In this specification, an intra-prediction mode index may also be referred to as a mode index, a prediction mode number, a mode number, etc.
[0142] [Table 3]
[0143] In Table 3, predModeIntra is a parameter (or variable) indicating an intra prediction mode (or a prediction mode index, a prediction mode number). In this specification, predModeIntra may be referred to as an intra prediction mode. And intraPredAngle is a parameter (or variable) indicating an angle (or a prediction angle) of the intra prediction mode. In this specification, intraPredAngle may be referred to as a prediction angle. In one embodiment, the prediction angle may be determined according to the intra prediction mode. Furthermore, the encoder / decoder may determine, based on the prediction angle, at which position or angle a reference sample relative to a current sample should be used for prediction.
[0144] According to one embodiment of the present invention, Table 3 may indicate a mapping between prediction mode indexes and angle parameters associated with the prediction angles of the prediction modes described above in FIG. 6. According to one embodiment, the intra prediction modes in Table 3 may indicate prediction mode indexes used for actual prediction, converted from the signaled index. For example, if the current block is a non-square block with respect to the signaled mode index, conversion may be applied via the following process. In other words, in one embodiment, for non-square blocks whose width and height are not the same, the intra prediction mode may be modified via the following process.
[0145] A. If all of the following conditions are met, the intra prediction mode (predModeIntra) may be set to (predModeIntra (ie, signaled mode index) + 65).
[0146] - a. When nTbW is greater than nTbH
[0147] - b. If the intra prediction mode is equal to or greater than 2
[0148] - c. Intra prediction mode (whRatio>1)? If it is smaller than 12:8
[0149] - B. Otherwise, if all of the following conditions are met, the intra prediction mode may be set to (predModeIntra-67):
[0150] - a.nTbH is greater than nTbW
[0151] - b. If the intra prediction mode is less than or equal to 66
[0152] - c. Intra prediction mode (whRatio>1)?56:60
[0153] In the above process, nTbW represents the width of the currently processed block (coding block or transform block), and nTbH represents the height of the currently processed block. whRatio is a variable indicating the ratio between the width and the height. As an example, whRatio may be set to Min(Abs(Log2(nTbW / nTbH),2). A?B:C represents an operation to derive the value of B if A is true, and the value of C if A is false.
[0154] According to an embodiment of the present invention, a prediction angle of an intra prediction mode may be defined according to a prediction mode index of the intra prediction mode. In an embodiment, a mapping table between prediction mode indexes and angles may be defined as shown in Table 4 below.
[0155] [Table 4]
[0156] In Table 4, predModeIntra is a parameter (or variable) indicating an intra prediction mode (or a prediction mode index, a prediction mode number). In this specification, predModeIntra may be referred to as an intra prediction mode. And intraPredAngle is a parameter (or variable) indicating an angle (or a prediction angle) of the intra prediction mode. In this specification, intraPredAngle may be referred to as a prediction angle. In one embodiment, the prediction angle may be determined according to the intra prediction mode. Furthermore, the encoder / decoder may determine, based on the prediction angle, which reference sample at which position or angle relative to the current sample to use for prediction.
[0157] According to one embodiment of the present invention, Table 4 may show a mapping between prediction mode indexes and angle parameters associated with the prediction angles of the prediction modes described in FIG. 6. According to one embodiment, the intra prediction modes in Table 2 may indicate prediction mode indexes used for actual prediction, converted from the signaled index. For example, if the current block is a non-square block with respect to the signaled mode index, conversion may be applied through the following process. In other words, in one embodiment, for non-square blocks whose width and height are not the same, the intra prediction mode may be modified through the following process.
[0158] - A. If all of the following conditions are met, wideAngle may be set to 1 and the intra prediction mode (predModeIntra) may be set to (predModeIntra (ie, signaled mode index) + 65).
[0159] - a. When nTbW is greater than nTbH
[0160] - b. If the intra prediction mode is equal to or greater than 2
[0161] - c. If the intra prediction mode is (whRatio>1)?(8+2*whRatio):8
[0162] - B. Otherwise, if all of the following conditions are met, wideAngle may be set to 1 and the intra prediction mode may be set to (predModeIntra-67):
[0163] - a.nTbH is greater than nTbW
[0164] - b. If the intra prediction mode is less than or equal to 66
[0165] - c. Intra prediction mode is (whRatio>1)?(60-2*whRatio):If it is greater than 60
[0166] In the above process, nTbW represents the width of the currently processed block (coding block or transform block), and nTbH represents the height of the currently processed block. whRatio is a variable (or parameter) indicating the ratio between width and height. As an example, whRatio may be set to Min(Abs(Log2(nTbW / nTbH),2). A?B:C represents an operation to derive the value of B if A is true, and the value of C if A is false. wideAngle is a variable (or parameter) indicating whether a wide angle is applied to the currently processed block.
[0167] According to an embodiment of the present invention, the intra-prediction angles described in Tables 3 and 4 may be used (or applied) in the following manner. For example, an inverse angle parameter, invAngle, may be derived based on the prediction angle. More specifically, invAngle may be derived by 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. Variables iIdx and iFact values for specifying the positions of reference samples (or prediction samples) may be derived based on the intra-prediction angle. The prediction sample may be derived based on iIdx and iFact. The prediction sample may be derived based on ref, iIdx, and iFact.
[0168] In one embodiment, the encoder / decoder can generate a prediction sample based on an intra prediction angle by applying the method described below. 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 the following Equation 1.
[0169]
Equation
[0170] In Equation 1, refIdx may be an index indicating which reference sample line to use for intra prediction. Also, the prediction sample may be derived as in the following Equation 2.
[0171]
Equation
[0172] In one embodiment, the derivation of the prediction sample by Equation 2 may be performed when cIdx is 0 (i.e., when the current component is a luma component). In Equation 2, fT may be interpolation filter coefficients. Also, summation{i is from x to y}(eq(i)) represents the operation of adding while changing i from x to y for the value of eq(i). Also, the Clip1Y operation may have the meaning as in the following Equation 3.
[0173]
Equation
[0174] Clip3(x, y, z) may be x when z < x, y when z > y, and z otherwise.
[0175] Also, the prediction sample may be derived by the following process.
[0176] If iFact is not 0, predSamples[x][y] indicating the predicted sample values may be derived by the following Equation 4:
[0177]
number
[0178] Otherwise, predSamples[x][y], which indicates the predicted sample values, may be derived by the following Equation 5:
[0179]
number
[0180] In one embodiment, the derivation according to Equations 4 and 5 may be performed when cIdx is not 0 (i.e., when the current component is a chroma component). If the intra prediction mode is less than 34, the index variable iIdx and the multiplication factor iFact may be derived according to Equation 6 below.
[0181]
number
[0182] In Equation 6, refIdx may be an index indicating which reference sample line to use for intra prediction. Furthermore, the predicted sample may be derived as shown in Equation 7 below.
[0183]
number
[0184] In one embodiment, the predicted sample derivation according to Equation 7 may be performed when cIdx is 0 (i.e., when the current component is a luma component). In Equation 2, fT may be an interpolation filter coefficient. Furthermore, summation{i is from x to y}(eq(i)) represents an operation of adding the value of eq(i) while changing i from x to y.
[0185] The predicted samples may also be derived by the following process.
[0186] If iFact is not 0, predSamples[x][y] indicating the predicted sample values may be derived by the following Equation 8:
[0187]
number
[0188] Otherwise, predSamples[x][y], which indicates the predicted sample values, may be derived by the following Equation 9:
[0189]
number
[0190] In one embodiment, the derivation according to Equations 8 and 9 may be performed when cIdx is not 0 (ie, when the current component is a chroma component).
[0191] Comparing Table 3 and Table 4, intra prediction modes of -14 to -11 and 77 to 80 are added in Table 4 compared to Table 3. Also, in Tables 3 and 4, intra prediction angles may be determined differently for the same intra prediction mode. For example, referring to Tables 3 and 4, intra prediction angle values may be defined (or set) separately for intra prediction modes of -10 to -4, 6 to 14, 22 to 30, 38 to 46, 54 to 62, and 70 to 76.
[0192] Table 5 below illustrates the predicted sample derivation process, more specifically illustrating the above example.
[0193] [Table 5] [Table 5]
[0194] [Table 6]
[0195] In Table 5, p[x][y] may represent neighboring reference samples. Also, the top-left coordinate of the current block may be defined as (0,0). Referring to Table 5, the encoder / decoder may derive predicted samples of the current block through the process shown in Table 5. The encoder / decoder may apply a separate deriving method depending on the intra prediction mode of the current block. Specifically, the encoder / decoder may derive a reference sample array (also referred to as main reference samples) based on the prediction mode of the current block, and derive predicted samples of the current block based on the derive reference samples. In this case, the methods described in Equations 1 to 9 above may be applied.
[0196] FIG. 17 is a diagram illustrating an intra-prediction mode deriving method according to an embodiment of the present invention. Referring to 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 invention, a method may be used to derive IntraPredModeY from a mode list. In yet another embodiment, a method may be used to derive IntraPredModeY from a mode not included in the mode list. In the present invention, the mode list may be referred to as an MPM list, a candidate list, or a candidate mode list. For example, the mode list may be a variable candModeList indicating the candidate mode list of FIG. 17. According to an embodiment, there may be one or more mode lists. Furthermore, the number of modes included in the mode list may be one or more.
[0197] According to an embodiment of the present invention, a method for deriving an intra prediction mode may be individually set (or defined) based on an MPM (most probable mode) flag. Here, the MPM (most probable mode) indicates a mode in which the intra prediction mode of a current block is derived from intra predicted blocks surrounding the current block. The MPM (most probable mode) flag indicates a flag (or a syntax element) indicating whether the intra prediction mode of the current block is coded using the MPM. In the present invention, the MPM flag may be expressed 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.
[0198] In one embodiment, if the MPM flag is 1, IntraPredModeY may be set based on the signaled index. For example, if the MPM flag is 1, IntraPredModeY may be set based on the signaled index and mode list. More specifically, referring to FIG. 17, if the MPM flag is 1, IntraPredModeY may be set to candModeList[intra_luma_mpm_idx].
[0199] In the present invention and drawings, parameter (or variable) values and syntax element values may be based on coordinates or positions, but if they correspond to the current block, the notation may be omitted. For example, in Figure 17, [xCb][yCb] can indicate the position of the current block, but in the present invention, this may be omitted.
[0200] In one embodiment, when the MPM flag is 0, the candidate mode list reordering and IntraPredModeY setting process may be performed. The candidate mode list before reordering may be an MPM list. Also, the reordering may be a reordering of the candidate mode list values. For example, when the candidate mode list before reordering is candModeList[0]=a_0, candModeList[1]=a_1, candModeList[2]=a_2, ..., candModeList[N-1]=a_{N-1}, a_0, a_1, a_2, ..., a_{N-1} can be sorted and assigned to candModeList[0], candModeList[1], candModeList[2], ..., candModeList[N-1]. Here, the sorting may be in ascending or descending order. For example, if a_0, a_1, a_2, ..., a_{N-1} are sorted in ascending order, b_0, b_1, b_2, ..., b_{N-1} may be set, and candModeList[0] = b_0, candModeList[1] = b_1, candModeList[2] = b_2, ..., candModeList[N-1] = b_{N-1} may be set. The part marked (1.) in FIG. 17 may represent the candidate mode list reordering process. For example, candModeList[i] may be defined from i = 0 to N-1. In this case, i may range from 0 to (N-2), and j may range from (i+1) to (N-1) for each i. 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).
[0201] Therefore, (candModeList[i], candModeList[j]) = Swap(candModeList[i], candModeList[j]) may be an operation in which, if candModeList[i] and candModeList[j] are a and b, respectively, before this operation, then candModeList[i] and candModeList[j] become b and a, respectively. Referring to FIG. 17, N may be 6. Also, i in candModeList[i] may be set to a value between 0 and 5.
[0202] Furthermore, the IntraPredModeY setting process may be based on the intra_luma_mpm_remainder value. Referring to FIG. 17, IntraPredModeY may be set to intra_luma_mpm_remainder. Then, a process of modifying IntraPredModeY based on a candidate mode list may follow. For example, if IntraPredModeY is greater than or equal to candModeList[i] for i from 0 to N-1, a process of adding 1 to IntraPredModeY may be performed. The resulting value based on IntraPredModeY may be used as the intra prediction mode. For example, after deriving IntraPredModeY as described in the present invention, a wide-angle determination and mode modification process may be performed.
[0203] Referring to Figure 17, this process may occur in the part marked (2). When candModeList[i] may be set from 0 to 5, if IntraPredModeY is greater than or equal to candModeList[i] for i from 0 to 5, a process of adding 1 to IntraPredModeY may be performed. The process of modifying IntraPredModeY described above may be necessary when the MPM flag is 0 because any mode other than those included in the mode list is signaled as intra_luma_mpm_remainder. For example, when candModeList[0]=0, candModeList[1]=3, candModeList[2]=1, candModeList[3]=5, candModeList[4]=33, candModeList[5]=65, the MPM flag may be 1 when signaling a value in the candidate mode list, and when the MPM flag is 0, the possible values for IntraPredModeY may be 2, 4, 6, ..., 32, 34, ..., 64, 66, etc. In this case, when intra_luma_mpm_remainder is signaled as 0, this may indicate IntraPredModeY2.
[0204] FIG. 18 illustrates a method for constructing an MPM list according to an embodiment of the present invention. The MPM list may be a candidate mode list. According to an embodiment of the present invention, the MPM list may be constructed based on candIntraPredModeX. For example, candIntraPredModeX may be multiple. For example, candIntraPredModeX may be candIntraPredModeA and candIntraPredModeB. For example, candIntraPredModeX may be IntraPredModeY corresponding to the current block peripheral position. Alternatively, candIntraPredModeX may indicate a previously set mode. For example, it may be INTRA_PLANAR. INTRA_PLANAR may be a value corresponding to mode index (or mode number) 0. Furthermore, INTRA_DC may be a value corresponding to mode index (or mode number) 1. Referring to FIG. 18, INTRA_PLANAR and INTRA_DC are denoted as planar and DC, respectively.
[0205] According to one embodiment of the present invention, the candidate mode list may always include a specific value. Furthermore, the position of the specific value within the candidate mode list may be fixed. For example, the candidate mode list may always include INTRA_PLANAR. Furthermore, INTRA_PLANAR may always be located at the front of the candidate mode list. As another example, the candidate mode list may always include INTRA_DC.
[0206] FIG. 18 shows a simplified method for constructing an MPM list. According to one embodiment, candIntraPredModeA and candIntraPredModeB may be IntraPredModeY corresponding to the left and top sides of 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 top-left corner of the current block. Also, cbWidth and cbHeight may be the width and height of the current block, respectively. Also, as described above, candIntraPredModeA and candIntraPredModeB may be set to previously set values.
[0207] According to one embodiment, the MPM list construction method may vary depending on whether candIntraPredModeA and candIntraPredModeB are the same or different. The MPM list construction method may also vary depending on whether candIntraPredModeA and candIntraPredModeB are directional modes. The directional modes do not have to include INTRA_PLANAR and INTRA_DC. The directional modes may be any value other than INTRA_PLANAR and INTRA_DC. The values corresponding to the directional modes may be greater than the INTRA_PLANAR and INTRA_DC values. INTRA_PLANAR and INTRA_DC may also be referred to as non-angular modes.
[0208] If candIntraPredModeA and candIntraPredModeB are the same and candIntraPredModeA is a directional mode, the candidate mode list may be determined as follows.
[0209] - candModeList[0]=INTRA_PLANAR
[0210] - candModeList[1]=candIntraPredModeA
[0211] - candModeList[2]=2+((candIntraPredModeA+61)%64)
[0212] - candModeList[3]=2+((candIntraPredModeA-1)%64)
[0213] - candModeList[4]=INTRA_DC
[0214] - candModeList[5]=2+((candIntraPredModeA+60)%64)
[0215] Here, % may represent a modular operation.
[0216] If candIntraPredModeA and candIntraPredModeB are not identical and candIntraPredModeA or candIntraPredModeB is a directional mode, the candidate mode list may be determined as follows.
[0217] - minAB=Min(candIntraPredModeA,candIntraPredModeB)
[0218] - maxAB=Max(candIntraPredModeA,candIntraPredModeB)
[0219] If candIntraPredModeA and candIntraPredModeB are both directional modes, the candidate mode list may be determined as follows: Combined with the previous condition, if candIntraPredModeA and candIntraPredModeB are not identical, and if candIntraPredModeA and candIntraPredModeB are both directional modes.
[0220] - candModeList[0]=INTRA_PLANAR
[0221] - candModeList[1]=candIntraPredModeA
[0222] - candModeList[2]=candIntraPredModeB
[0223] - candModeList[3]=INTRA_DC
[0224] If maxAB-minAB is not in the range 2 to 62 (inclusive):
[0225] - candModeList[4]=2+((maxAB+61)%64)
[0226] - candModeList[5]=2+((maxAB-1)%64)
[0227] If maxAB-minAB is not in the range 2 to 62 (inclusive):
[0228] - candModeList[4]=2+((maxAB+60)%64)
[0229] - candModeList[5]=2+((maxAB)%64)
[0230] If candIntraPredModeA and candIntraPredModeB are not identical and candIntraPredModeA or candIntraPredModeB is a directional mode, the candidate mode list may be determined as follows.
[0231] - minAB=Min(candIntraPredModeA,candIntraPredModeB)
[0232] - maxAB=Max(candIntraPredModeA,candIntraPredModeB)
[0233] If only one of candIntraPredModeA and candIntraPredModeB is a directional mode, the candidate mode list may be determined as follows: Combined with the previous condition, if candIntraPredModeA and candIntraPredModeB are not identical and only one of candIntraPredModeA and candIntraPredModeB is a directional mode.
[0234] - candModeList[0]=INTRA_PLANAR
[0235] - candModeList[1]=maxAB
[0236] - candModeList[2]=INTRA_DC
[0237] - candModeList[3]=2+((maxAB+61)%64)
[0238] - candModeList[4]=2+((maxAB-1)%64)
[0239] - candModeList[5]=2+((maxAB+60)%64)
[0240] Otherwise, the candidate mode list may be determined as follows: 1) candIntraPredModeA and candIntraPredModeB are the same and candIntraPredModeA is a non-directional mode, or 2) candIntraPredModeA and candIntraPredModeB are not the same and both candIntraPredModeA and candIntraPredModeB are non-directional modes, then the candidate mode list may be determined as follows:
[0241] - candModeList[0]=INTRA_PLANAR
[0242] - candModeList[1]=INTRA_DC
[0243] - candModeList[2]=INTRA_ANGULAR50
[0244] - candModeList[3]=INTRA_ANGULAR18
[0245] - candModeList[4]=INTRA_ANGULAR46
[0246] - candModeList[5]=INTRA_ANGULAR54
[0247] Here, INTRA_ANGULARxx may be a value corresponding to the mode index (or mode number) xx.
[0248] 19 is a diagram illustrating intra-prediction mode guidance according to an embodiment of the present invention. The mode guidance method described in FIG. 17 may include redundant operations. For example, when using the MPM list construction method described in FIG. 18, the mode guidance method described in FIG. 17 may include redundant operations. When describing an embodiment of the present invention, descriptions that overlap with those in FIG. 17 will be omitted.
[0249] In one embodiment, if the MPM flag is 0, the candidate mode list reordering and IntraPredModeY setting process may occur. The candidate mode list before reordering may be the MPM list. Also, the reordering may be a reordering of the candidate mode list values. When reordering the candidate mode list, if candModeList[i] is greater than candModeList[j], the candModeList[i] and candModeList[j] values 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, (candModeList[i], candModeList[j]) = Swap(candModeList[i], candModeList[j]) may be an operation in which, if candModeList[i] and candModeList[j] are a and b, respectively, before this is performed, then after this is performed, candModeList[i] and candModeList[j] will become b and a, respectively.
[0250] According to one embodiment of the present invention, a reordering operation may be performed only on some candidate mode lists, rather than on the entire candidate mode list. That is, when candModeList[i] is defined for i = 0 to N-1, a reordering operation may be performed only on fewer than N candidate mode lists, rather than on the entire candidate mode list. Candidate mode lists for which a reordering operation is not performed may be already set. For example, candidate mode lists for which a reordering operation is not performed may be associated with mode indexes that would exist in the same position in a configuration method that varies from time to time in MPM list configuration. For example, a reordering operation may be performed only on candidate mode lists other than candModeList[0]. For example, when candModeList[i] is defined for i = 0 to N-1, where i = 1 to (N-2) and j = (i+1) to (N-1) for each i, if candModeList[i] is greater than candModeList[j], the values of candModeList[i] and candModeList[j] may be swapped.
[0251] This is because the same result is obtained whether or not a reordering operation is performed on candModeList[0]. For example, as explained in Figure 18, candModeList[0] can always be INTRA_PLANAR, and in such a case, candModeList[0] can always be the minimum value.
[0252] Referring to FIG. 19, a candidate mode list reordering process may occur in the part marked (1). For example, N may be 6. Also, candModeList[i] may be defined with i ranging from 0 to 5. That is, the candidate mode list may have a total of 6 elements. In this case, i ranges from 1 to 4, and j ranges from (i+1) to 5 for each i. 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]).
[0253] Also, the IntraPredModeY setting process may be based on the intra_luma_mpm_remainder value. Referring to Figure 19, IntraPredModeY may be set to intra_luma_mpm_remainder. Then, a process of modifying IntraPredModeY may follow. This may include a process of modifying IntraPredModeY without based on the candidate mode list and a process of modifying IntraPredModeY based on the candidate mode list.
[0254] According to one embodiment, intra_luma_mpm_remainder may be a syntax element. Also, intra_luma_mpm_remainder may be a value that is signaled when indicating a mode not included in the MPM list. For example, intra_luma_mpm_remainder may be a value that is signaled when the MPM flag is 0. Also, the maximum value of intra_luma_mpm_remainder may be a value that is smaller than the total number of intra modes. For example, the maximum value of intra_luma_mpm_remainder may be ((total number of intra modes in the signaling range) - (number of MPM list elements) - 1). For example, (total number of intra modes in the signaling range) may be 67. For example, (number of MPM list elements) may be 6. For example, the maximum value of intra_luma_mpm_remainder may be 60.
[0255] According to one embodiment of the present invention, the process of modifying IntraPredModeY may include a process of modifying a previously set value without being based on the candidate mode list. For example, the process of modifying IntraPredModeY may include a process of adding a previously set value to IntraPredModeY. Referring to the portion marked (ii) in FIG. 19, a value obtained by adding 2 to the IntraPredModeY value may be set to IntraPredModeY.
[0256] According to an embodiment of the present invention, the process of modifying IntraPredModeY may include a process of modifying IntraPredModeY based on a candidate mode list. For example, if IntraPredModeY is compared with candModeList[i] and a condition is satisfied, the process of modifying IntraPredModeY may be performed. According to an embodiment of the present invention, when modifying IntraPredModeY by comparing with candModeList[i], comparison and modification may be performed only for some candidate mode lists rather than the entire candidate mode list. That is, when candModeList[i] is defined as i from 0 to N-1, comparison and modification may be performed only for a number of candidate mode lists less than N rather than the entire candidate mode list. Also, the candidate mode list on which no operation is performed may be pre-defined. For example, the candidate mode list on which no operation is performed may be associated with a mode index that is included in multiple cases in a case-dependent configuration method of MPM list configuration. For example, the operation of comparing IntraPredModeY with IntraPredModeY and modifying IntraPredModeY may be performed only for candidate mode lists other than candModeList[0] or candModeList[1].
[0257] For example, when candModeList[i] is defined from i=0 to N-1, an operation to modify IntraPredModeY can be performed for i greater than 0 to (N-1) compared with IntraPredModeY. For example, when candModeList[i] is defined from i=0 to N-1, an operation to modify IntraPredModeY can be performed for i greater than 0 to (N-1) compared with IntraPredModeY.
[0258] For example, the comparison and modification operation may be as follows: For example, if IntraPredModeY is greater than or equal to candModeList[i], a process of modifying IntraPredModeY may be performed. For example, if IntraPredModeY is greater than or equal to candModeList[i], the IntraPredModeY value may be increased by 1.
[0259] Referring to the portion marked (iii.) in FIG. 19, if IntraPredModeY is greater than or equal to candModeList[i] for i from 2 to 5, IntraPredModeY can be incremented by 1. This is because the candidate mode list may always include any mode index. This also means that a fixed mode index may exist at any position in the reordered candidate mode list. For example, in the reordered candidate mode list, candModeList[0] may always be INTRA_PLANAR and candModeList[1] may always be INTRA_DC.
[0260] According to one embodiment of the present invention, in the process of modifying IntraPredModeY, a value already set in the process of modifying the previously set mode lists without based on a candidate mode list may be related to the number of candidate mode lists excluded from comparison in the process of modifying IntraPredModeY based on a candidate mode list. For example, if M candidate mode lists out of the total number of candidate mode lists are excluded from comparison in the process of modifying IntraPredModeY based on a candidate mode list, the value already set in the process of modifying the previously set mode lists without based on a candidate mode list may be M or more. More specifically, for example, if M candidate mode lists out of the total number of candidate mode lists are excluded from comparison in the process of modifying IntraPredModeY based on a candidate mode list, the value already set in the process of modifying the previously set mode lists without based on a candidate mode list may be M. For example, M may be 2.
[0261] Therefore, referring to Figure 19, the process of modifying IntraPredModeY may be as follows: The IntraPredModeY value may be set to the intra_luma_mpm_remainder value. The IntraPredModeY value may also be incremented by 2. Also, for i from 2 to 5 (inclusive), if IntraPredModeY is greater than or equal to candModeList[i], IntraPredModeY may be incremented by 1.
[0262] 19, the process of rearranging the candidate mode list and modifying IntraPredModeY is performed when the MPM flag is 0, or when a planar flag is present, or when signals are divided into already set modes, modes included in the candidate mode list, and other modes, as will be described later with reference to FIGS. 20 to 22, the method described in the embodiment of FIG. 19 can be used to induce other modes. The planar flag represents a flag (or syntax element) indicating whether the intra prediction mode is a planar mode, and may be referred to as planar_flag in the present invention.
[0263] FIG. 20 is a diagram illustrating a method for configuring an MPM list according to an embodiment of the present invention. According to an embodiment of the present invention, INTRA_PLANAR may be indicated by a planar flag. Furthermore, the planar flag may be a signaling (or syntax element) different from the above-described MPM flag. According to an embodiment of the present invention, a previously configured mode may not always be included in the MPM list, i.e., the candidate mode list. For example, according to an embodiment of the present invention, INTRA_PLANAR may not always be included in the MPM list, i.e., the candidate mode list.
[0264] The MPM list may be a candidate mode list. According to an embodiment of the present invention, the MPM list may be configured based on candIntraPredModeX. For example, candIntraPredModeX may be multiple. For example, candIntraPredModeX may be candIntraPredModeA and candIntraPredModeB. For example, candIntraPredModeX may be IntraPredModeY corresponding to the current block peripheral position. Alternatively, candIntraPredModeX may indicate a previously set mode. For example, it may be INTRA_PLANAR. INTRA_PLANAR may be a value corresponding to mode index 0. Furthermore, INTRA_DC may be a value corresponding to mode index 1. Referring to FIG. 20, INTRA_PLANAR and INTRA_DC may be expressed as planar and DC, respectively.
[0265] According to one embodiment of the present invention, the candidate mode list may always include a specific value, and the position of the specific value within the candidate mode list may be fixed. For example, the candidate mode list may always include INTRA_DC.
[0266] 20 illustrates a simplified method for constructing an MPM list. According to one embodiment, candIntraPredModeA and candIntraPredModeB may be IntraPredModeY corresponding to the left and top edges of 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 top left corner of the current block. Furthermore, cbWidth and cbHeight may be the width and height of the current block, respectively. Also, as described above, candIntraPredModeA and candIntraPredModeB may be set to previously set values.
[0267] According to one embodiment, the MPM list construction method may vary depending on whether candIntraPredModeA and candIntraPredModeB are the same. The MPM list construction method may also vary depending on whether candIntraPredModeA and candIntraPredModeB are directional modes. The directional modes do not have to include INTRA_PLANAR and INTRA_DC. The directional modes may be all values other than INTRA_PLANAR and INTRA_DC. Furthermore, values corresponding to directional modes may be greater than the INTRA_PLANAR and INTRA_DC values. Furthermore, INTRA_PLANAR and INTRA_DC may be referred to as non-directional modes.
[0268] If candIntraPredModeA and candIntraPredModeB are the same and candIntraPredModeA is a directional mode, the candidate mode list may be determined as follows.
[0269] - candModeList[0]=candIntraPredModeA
[0270] - candModeList[1]=2+((candIntraPredModeA+61)%64)
[0271] - candModeList[2]=2+((candIntraPredModeA-1)%64)
[0272] - candModeList[3]=INTRA_DC
[0273] - candModeList[4]=2+((candIntraPredModeA+60)%64)
[0274] Here, % may represent modular arithmetic.
[0275] If candIntraPredModeA and candIntraPredModeB are not identical and candIntraPredModeA or candIntraPredModeB is a directional mode, the candidate mode list may be determined as follows.
[0276] - minAB=Min(candIntraPredModeA,candIntraPredModeB)
[0277] - maxAB=Max(candIntraPredModeA,candIntraPredModeB)
[0278] If candIntraPredModeA and candIntraPredModeB are both directional modes, the candidate mode list may be determined as follows: Combined with the previous condition, candIntraPredModeA and candIntraPredModeB are not identical, and candIntraPredModeA and candIntraPredModeB are both directional modes.
[0279] - candModeList[0]=candIntraPredModeA
[0280] - candModeList[1]=candIntraPredModeB
[0281] - candModeList[2]=INTRA_DC
[0282] If maxAB-minAB is in the range 2 to 62 (inclusive):
[0283] - candModeList[3]=2+((maxAB+61)%64)
[0284] - candModeList[4]=2+((maxAB-1)%64)
[0285] If maxAB-minAB is not in the range 2 to 62 (inclusive):
[0286] - candModeList[3]=2+((maxAB+60)%64)
[0287] - candModeList[4]=2+((maxAB)%64)
[0288] If candIntraPredModeA and candIntraPredModeB are not identical and candIntraPredModeA or candIntraPredModeB is a directional mode, the candidate mode list may be determined as follows.
[0289] - minAB=Min(candIntraPredModeA,candIntraPredModeB)
[0290] - maxAB=Max(candIntraPredModeA,candIntraPredModeB)
[0291] If only one of candIntraPredModeA and candIntraPredModeB is a directional mode, the candidate mode list may be determined as follows: Combined with the previous condition, if candIntraPredModeA and candIntraPredModeB are not identical and only one of candIntraPredModeA and candIntraPredModeB is a directional mode.
[0292] - candModeList[0]=maxAB
[0293] - candModeList[1]=INTRA_DC
[0294] - candModeList[2]=2+((maxAB+61)%64)
[0295] - candModeList[3]=2+((maxAB-1)%64)
[0296] - candModeList[4]=2+((maxAB+60)%64)
[0297] Otherwise, the candidate mode list may be determined as follows: 1) candIntraPredModeA and candIntraPredModeB are the same and candIntraPredModeA is a non-directional mode, or 2) candIntraPredModeA and candIntraPredModeB are not the same and both candIntraPredModeA and candIntraPredModeB are non-directional modes, then the candidate mode list may be determined as follows:
[0298] - candModeList[0]=INTRA_DC
[0299] - candModeList[1]=INTRA_ANGULAR50
[0300] - candModeList[2]=INTRA_ANGULAR18
[0301] - candModeList[3]=INTRA_ANGULAR46
[0302] - candModeList[4]=INTRA_ANGULAR54
[0303] Here, INTRA_ANGULARxx may be a value corresponding to the mode index (or mode number) xx.
[0304] FIG. 21 is a diagram illustrating a method for deriving an intra prediction mode according to an embodiment of the present invention.
[0305] As described in Figure 20, there may be a pre-set mode indicated by the planar flag, a mode included in the candidate mode list, and other modes. According to one embodiment of the present invention, if the planar flag is 1, IntraPredModeY may be set to the pre-set mode. Referring to Figure 21, if the planar flag is 1, IntraPredModeY may be set to INTRA_PLANAR.
[0306] Furthermore, according to one embodiment of the present invention, the MPM flag may be referenced to indicate the modes included in the candidate mode list. If the MPM flag is 1, IntraPredModeY may be set to candModeList[intra_luma_mpm_idx]. Referring to Figure 21, if the planar flag is 0 and the MPM flag is 1, IntraPredModeY may be set to candModeList[intra_luma_mpm_idx].
[0307] According to one embodiment of the present invention, it is possible to determine whether IntraPredModeY is an already set mode, a mode included in the candidate mode list, or another mode using a combination of the planar flag and the MPM flag. For example, if the planar flag is 1, IntraPredModeY may be an already set mode. Alternatively, if the planar flag is 0 and the MPM flag is 1, IntraPredModeY may be a mode included in the candidate mode list. Alternatively, if the planar flag is 0 and the MPM flag is 0, IntraPredModeY may be another mode.
[0308] According to yet another embodiment of the present invention, it is possible to determine whether IntraPredModeY is an already set mode, a mode included in the candidate mode list, or another mode using a combination of the planar flag and the MPM flag. For example, when the planar flag is 1 and the MPM flag is 1, IntraPredModeY may be an already set mode. When the planar flag is 0 and the MPM flag is 1, IntraPredModeY may be a mode included in the candidate mode list. When the MPM flag is 0, IntraPredModeY may be another mode.
[0309] Also, as described below, the intra prediction mode can be induced in the case of other modes.
[0310] As explained in Fig. 20, the number of elements in the candidate mode list may be five. Also, the candidate mode list does not always have to include INTRA_PLANAR. Also, the candidate mode list can always include INTRA_DC. In this embodiment, explanations that overlap with those in Figs. 17 to 20 may be omitted.
[0311] In one embodiment, when another mode is indicated, the candidate mode list may be reordered and an IntraPredModeY setting process may occur. The candidate mode list before reordering may be an MPM list. Also, the reordering may be a reordering of the candidate mode list values. For example, if the candidate mode list before reordering is candModeList[0]=a_0, candModeList[1]=a_1, candModeList[2]=a_2, ..., candModeList[N-1]=a_{N-1}, a_0, a_1, a_2, ..., a_{N-1} can be sorted into candModeList[0], candModeList[1], candModeList[2], ..., candModeList[N-1]. Here, the sorting may be in ascending or descending order. For example, if a_0, a_1, a_2, ..., a_{N-1} are sorted in ascending order, b_0, b_1, b_2, ..., b_{N-1} can be set, and candModeList[0]=b_0, candModeList[1]=b_1, candModeList[2]=b_2, ..., candModeList[N-1]=b_{N-1}.
[0312] The part marked (1.) in Figure 21 may represent the candidate mode list rearrangement process. For example, candModeList[i] may be defined from i = 0 to N-1. In this case, for i = 0 to (N-2) and j = (i+1) to (N-1) for each i, 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, (candModeList[i], candModeList[j]) = Swap(candModeList[i], candModeList[j]) may be an operation in which, if candModeList[i] and candModeList[j] are a and b, respectively, before this operation, then candModeList[i] and candModeList[j] become b and a, respectively. Referring to FIG. 21, N may be 5. Also, in candModeList[i], i may be set to a value between 0 and 4.
[0313] Referring to FIG. 21, a candidate mode list reordering process may occur in the part marked (1). For example, candModeList[i] may be defined such that i ranges from 0 to 4. That is, the candidate mode list may have a total of five elements. In this case, for i ranging from 0 to 3 and j ranging from (i+1) to 4 for each i, 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]).
[0314] Also, the IntraPredModeY setting process may be based on the intra_luma_mpm_remainder value. Referring to FIG. 21, IntraPredModeY may be set to intra_luma_mpm_remainder. Then, a process of modifying IntraPredModeY may follow. This may include a process of modifying IntraPredModeY without based on the candidate mode list and a process of modifying IntraPredModeY based on the candidate mode list.
[0315] According to one embodiment, intra_luma_mpm_remainder may be a syntax element. Also, intra_luma_mpm_remainder may be a value signaled when indicating the other mode. 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 planar flag and the MPM flag are 0. Also, intra_luma_mpm_remainder may have a maximum value that is smaller than the total number of intra modes. For example, intra_luma_mpm_remainder may have a maximum value of ((total number of intra modes in the signaling range) - (number of already set modes) - (number of MPM list elements) - 1). For example, (total number of intra modes in the signaling range) may be 67. For example, (number of already set 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.
[0316] Furthermore, according to one embodiment of the present invention, the process of modifying IntraPredModeY may include a process of modifying a previously set value without being based on the candidate mode list. For example, the process of modifying IntraPredModeY may include a process of adding a previously set value to IntraPredModeY. Referring to the portion marked (ii) in FIG. 21, a value obtained by adding 1 to the IntraPredModeY value may be set to IntraPredModeY. This is because a previously set mode may be signaled separately from modes belonging to the candidate mode list.
[0317] According to an embodiment of the present invention, the process of modifying IntraPredModeY may include a process of modifying IntraPredModeY based on a candidate mode list. For example, if IntraPredModeY is greater than or equal to candModeList[i] for i from 0 to N-1, a process of adding 1 to IntraPredModeY may be performed. The value based on IntraPredModeY obtained in this manner may be used as the intra prediction mode. For example, a wide-angle determination and mode modification process may be performed after deriving IntraPredModeY as described in the present invention. Referring to FIG. 21 , this process may occur in the part marked (iii). For example, N may be 5. For candModeList[i], if i is set from 0 to 4, a process of adding 1 to IntraPredModeY may be performed if IntraPredModeY is greater than or equal to candModeList[i] for i from 0 to 4. The above-mentioned IntraPredModeY modification process may be necessary because a mode other than those included in the mode list is signaled as intra_luma_mpm_remainder when the MPM flag is 0. For example, when candModeList[0] = 64, candModeList[1] = 3, candModeList[2] = 1, candModeList[3] = 5, and candModeList[4] = 33, the MPM flag or planar flag may be 1 when signaling a value included in the candidate mode list, and the possible values for IntraPredModeY when signaling a mode other than the already set modes and modes belonging to the candidate mode list may be 2, 4, 6, ..., 32, 34, ..., 63, 65, 66, etc. In this case, when intra_luma_mpm_remainder is signaled as 0, this may indicate IntraPredModeY2.
[0318] 22 is a diagram illustrating an intra-prediction mode deriving method according to an embodiment of the present invention. As illustrated in FIG. 22, there may be a pre-set mode indicated by the planar flag, a mode included in the candidate mode list, and other modes. According to an embodiment of the present invention, if the planar flag is 1, IntraPredModeY may be set to the pre-set mode. Referring to FIG. 22, if the planar flag is 1, IntraPredModeY may be set to INTRA_PLANAR.
[0319] Furthermore, according to one embodiment of the present invention, the MPM flag may be referenced to indicate the modes included in the candidate mode list. If the MPM flag is 1, IntraPredModeY may be set to candModeList[intra_luma_mpm_idx]. Referring to Figure 15, if the planar flag is 0 and the MPM flag is 1, IntraPredModeY may be set to candModeList[intra_luma_mpm_idx].
[0320] According to an embodiment of the present invention, it is possible to determine whether IntraPredModeY is an already set mode, a mode included in the candidate mode list, or another mode using a combination of the planar flag and the MPM flag. For example, if the planar flag is 1, IntraPredModeY may be an already set mode. Alternatively, if the planar flag is 0 and the MPM flag is 1, IntraPredModeY may be a mode included in the candidate mode list. Alternatively, if the planar flag is 0 and the MPM flag is 0, IntraPredModeY may be another mode.
[0321] According to yet another embodiment of the present invention, it is possible to determine whether IntraPredModeY is an already set mode, a mode included in the candidate mode list, or another mode using a combination of the planar flag and the MPM flag. For example, when the planar flag is 1 and the MPM flag is 1, IntraPredModeY may be an already set mode. When the planar flag is 0 and the MPM flag is 1, IntraPredModeY may be a mode included in the candidate mode list. When the MPM flag is 0, IntraPredModeY may be another mode.
[0322] Also, as described below, the intra prediction mode can be induced in the case of other modes.
[0323] As explained in Figure 22, the number of elements in the candidate mode list may be 5. Also, the candidate mode list does not always have to include INTRA_PLANAR. Also, the candidate mode list can always include INTRA_DC.
[0324] In this embodiment, the description overlapping with that of FIGS. 17 to 21 may be omitted.
[0325] In one embodiment, when another mode is indicated, a candidate mode list reordering and IntraPredModeY setting process may occur. In this embodiment, the reordering process may be described with reference to FIG.
[0326] Referring to FIG. 21, a candidate mode list reordering process may occur in the part marked (1). For example, candModeList[i] may be defined with i ranging from 0 to 4. That is, the candidate mode list may have a total of five elements. In this case, for i ranging from 0 to 3 and j ranging from (i+1) to 4 for each i, 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]).
[0327] The mode guidance method described in Figure 21 may include overlapping operations. For example, when using the MPM list construction method described in Figure 18 or Figure 22, the mode guidance method described in Figure 21 may include overlapping operations.
[0328] Furthermore, the IntraPredModeY setting process may be based on the intra_luma_mpm_remainder value. Referring to FIG. 21, IntraPredModeY may be set to intra_luma_mpm_remainder. A process of modifying IntraPredModeY may follow. This may include a process of modifying IntraPredModeY without based on the candidate mode list and a process of modifying IntraPredModeY based on the candidate mode list. According to one embodiment, intra_luma_mpm_remainder may be a syntax element, and a description thereof may refer to FIG. 21.
[0329] According to one embodiment of the present invention, the process of modifying IntraPredModeY may include a process of modifying a previously set value without being based on the candidate mode list. For example, the process of modifying IntraPredModeY may include a process of adding a previously set value to IntraPredModeY. Referring to the portion marked (ii) in FIG. 22, a value obtained by adding 2 to the IntraPredModeY value may be set to IntraPredModeY.
[0330] According to an embodiment of the present invention, the process of modifying IntraPredModeY may include a process of modifying IntraPredModeY based on a candidate mode list. For example, if IntraPredModeY is compared with candModeList[i] and a condition is satisfied, the process of modifying IntraPredModeY may be performed. According to an embodiment of the present invention, when modifying IntraPredModeY by comparing with candModeList[i], comparison and modification may be performed only for some candidate mode lists rather than the entire candidate mode list. That is, when candModeList[i] is defined as i from 0 to N-1, comparison and modification may be performed only for a number of candidate mode lists less than N rather than the entire candidate mode list. Also, here, the candidate mode list on which no operation is performed may be pre-defined. For example, the candidate mode list on which no operation is performed may be associated with a mode index that is included in multiple cases in a case-dependent configuration method of MPM list configuration. For example, the operation of comparing IntraPredModeY with IntraPredModeY and modifying IntraPredModeY may be performed only for candidate mode lists other than candModeList[0].
[0331] For example, when candModeList[i] is defined from i=0 to N-1, an operation to modify IntraPredModeY can be performed for i greater than 0 to (N-1) compared with IntraPredModeY. For example, when candModeList[i] is defined from i=0 to N-1, an operation to modify IntraPredModeY can be performed for i greater than 0 to (N-1) compared with IntraPredModeY.
[0332] For example, the comparison and modification operation may be as follows: For example, if IntraPredModeY is greater than or equal to candModeList[i], a process of modifying IntraPredModeY may be performed. For example, if IntraPredModeY is greater than or equal to candModeList[i], the IntraPredModeY value may be increased by 1.
[0333] Referring to the portion labeled (iii.) in FIG. 22, if IntraPredModeY is greater than or equal to candModeList[i] for i from 1 to 4, IntraPredModeY can be incremented by 1. This is because the candidate mode list can always include any mode index. This also means that a fixed mode index may exist at any position in the reordered candidate mode list. For example, in the reordered candidate mode list, candModeList[0] is always INTRA_DC.
[0334] According to an embodiment of the present invention, in the process of modifying IntraPredModeY, a value already set in the process of modifying the IntraPredModeY based on the candidate mode list may be related to the number of candidate mode lists excluded from comparison in the process of modifying IntraPredModeY based on the candidate mode list. For example, if M candidate mode lists out of the total number of candidate mode lists are excluded from comparison in the process of modifying IntraPredModeY based on the candidate mode list, the value already set in the process of modifying the IntraPredModeY based on the candidate mode list may be greater than M. More specifically, for example, if M candidate mode lists out of the total number of candidate mode lists are excluded from comparison in the process of modifying IntraPredModeY based on the candidate mode list, the value already set in the process of modifying the IntraPredModeY based on the candidate mode list may be greater than M. For example, M may be 1.
[0335] In addition, in the process of modifying IntraPredModeY, the value already set in the process of modifying the already set modes without based on the candidate mode list may be related to the number of already set modes. For example, if the number of already set modes is L, the value already set in the process of modifying the already set modes without based on the candidate mode list may be greater than L. More specifically, for example, if the number of already set modes is L, the value already set in the process of modifying the already set modes without based on the candidate mode list may be greater than L. For example, L may be 1.
[0336] Therefore, referring to Figure 22, the process of modifying IntraPredModeY may be as follows: The IntraPredModeY value may be set to the intra_luma_mpm_remainder value. The IntraPredModeY value may also be incremented by 2. Also, if IntraPredModeY is greater than or equal to candModeList[i], where i is from 1 to 4 (inclusive), IntraPredModeY may be incremented by 1.
[0337] 23 is a flowchart showing a video signal processing method according to an embodiment of the present invention. For convenience of explanation, the description will be focused on a decoder, but the present invention is not limited thereto, and the video signal processing method according to this embodiment can be applied to an encoder in substantially the same manner.
[0338] The decoder checks the tree type of the current chroma block (S2301).
[0339] The decoder derives the chroma intra prediction mode of the current chroma block based on the luma intra prediction mode of the previously set position (S2302).
[0340] The decoder generates a prediction block of the current chroma block based on the chroma intra prediction mode (S2303).
[0341] The decoder reconstructs the current chroma block by adding the residual block of the current chroma block to the predicted block (S2304).
[0342] There is provided a video signal processing method including the above steps, characterized in that if the luma prediction mode of the already set position is an intra block copy mode, the luma intra prediction mode is set to the already set mode.
[0343] As described above, the step of deriving the chroma intra prediction mode may include the step of obtaining a first syntax element indicating the current chroma intra prediction mode from a mapping table in which a mode index has already been set according to the luma intra prediction mode.
[0344] As described above, the pre-set position may be the luma position of the bottom right center sample position of the current chroma block.
[0345] As mentioned above, the pre-set mode may be an intra DC mode.
[0346] As mentioned above, if 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 is not parsed and may be inferred as a previously set value.
[0347] As described above, the preset 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.
[0348] The above-described embodiments of the present invention may be implemented in various ways, for example, in hardware, firmware, software, or a combination thereof.
[0349] In the case of a hardware implementation, the method according to an embodiment of the present invention may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSDPs (Digital Signal Processing Devices), PDLs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), processors, controllers, microcontrollers, microprocessors, etc.
[0350] In the case of implementation by firmware or software, the methods according to the embodiments of the present invention may be implemented in the form of modules, procedures, or functions that perform the functions or operations described above. The software code is stored in a memory and executed by a processor. The memory may be located inside or outside the processor and exchange data with the processor through various means known in the art.
[0351] Some embodiments may also be embodied in the form of a recording medium containing computer-executable instructions, such as program modules, executed by a computer. Computer-readable media are any available media that can be accessed by a computer, including both volatile and non-volatile media, and both detachable and non-detachable media. Computer-readable media also include both storage media and communication media. Computer storage media include both volatile and non-volatile media, and both detachable and non-detachable media embodied in any method or technology for storage of information, such as computer-readable instructions, data structures, program modules, or other data. Communication media typically include computer-readable instructions, data structures, or other data in a modulated data signal, such as a program module, or other transmission mechanism, and include any information delivery media.
[0352] The above description of the present invention is for illustrative purposes only, and those skilled in the art will understand that the present invention can be easily modified into other specific forms without changing the technical spirit or essential features of the present invention. Therefore, it should be understood that the above-described embodiments are illustrative in all respects and are not limiting. For example, each component described as a single component may be implemented in a distributed form, and components described as distributed may also be implemented in a combined form.
[0353] The scope of the present invention is indicated by the claims that follow rather than by the above detailed description, and all modifications and variations that fall within the meaning and scope of the claims and their equivalents should be interpreted as being included within the scope of the present invention. [Industrial Applicability]
[0354] The above-described preferred embodiments of the present invention have been disclosed for illustrative purposes, and those skilled in the art will be able to improve, modify, substitute or add to various other embodiments within the technical spirit and scope of the present invention as disclosed in the appended claims. [Explanation of symbols]
[0355] 100 Encoding Device 110 Conversion unit 115 Quantization section 120 Inverse quantization section 125 Inverse conversion unit 130 Filtering section 150 Prediction Department 152 Intra prediction unit 154 Inter Prediction Unit 156 Decoded Picture Buffer 160 Entropy Coding Unit 200 Video signal processing device 200 Video signal decoding device 200 Decoding Device 210 Entropy Decoding Unit 220 Inverse quantization section 225 Inverse conversion unit 230 Filtering section 250 Prediction Department 252 Intra prediction unit 254 Inter Prediction Unit
Claims
1. 1. A method for processing a video signal, comprising: Checking the tree type of the current chroma block; deriving a chroma intra prediction mode of the current chroma block based on a luma intra prediction mode of a previously set position; generating a prediction block of the current chroma block based on the chroma intra prediction mode; and reconstructing the current chroma block by adding a residual block of the current chroma block to the predicted block; When the luma prediction mode of the previously set position is an intra block copy mode, the luma intra prediction mode is set to the previously set mode.
2. The step of deriving a chrominance intra-prediction mode includes: The method of claim 1 , further comprising obtaining a first syntax element indicating the current chroma intra prediction mode from a mapping table in which a mode index is already set according to the luma intra prediction mode.
3. 2. The video signal processing method of claim 1, wherein the preset position is a luma position at a center sample position in the lower right corner of the current chroma block.
4. 2. The video signal processing method of claim 1, wherein the preset mode is an intra DC mode.
5. 2. The video signal processing method of claim 1, wherein, if the tree type of the current chroma block is a dual tree, a second syntax element indicating whether or not an intra block copy mode is applied to the current chroma block is not parsed and is inferred as a previously set value.
6. The previously set value is 0, 6. The video signal processing method of claim 5, wherein an intra block copy mode is not applied to the current chroma block whose tree type is a dual tree.
7. 1. A video signal processing device, comprising: a processor; The processor: a tree type of a current chroma block is checked, and if the tree type of the current chroma block is a dual tree, a chroma intra prediction mode of the current chroma block is derived based on a luma intra prediction mode of a previously set position; generating a prediction block of the current chroma block based on the chroma intra prediction mode; reconstructing the current chroma block by adding a residual block of the current chroma block to the predicted block; 10. The video signal processing device according to claim 9, wherein, when a luma prediction mode at the previously set position is an intra block copy mode, the luma intra prediction mode is set to the previously set mode.
8. The processor: The video signal processing method of claim 7 , further comprising obtaining a first syntax element indicating the current chroma intra prediction mode from a mapping table in which a mode index is already set according to the luma intra prediction mode.
9. 8. The video signal processing method of claim 7, wherein the preset position is a luma position at a center sample position in the lower right corner of the current chroma block.
10. 8. The video signal processing method according to claim 7, wherein the preset mode is an intra DC mode.
11. 10. The video signal processing method of claim 7, wherein, if the tree type of the current chroma block is a dual tree, a second syntax element indicating whether or not an intra block copy mode is applied to the current chroma block is not parsed and is inferred as a previously set value.
12. The previously set value is 0, The video signal processing apparatus of claim 11, wherein an intra block copy mode is not applied to the current chroma block whose tree type is a dual tree.
13. 1. A method for processing a video signal, comprising: determining a tree type of a current chroma block; determining a chroma intra prediction mode of the current chroma block based on a luma intra prediction mode of a previously set position; generating a prediction block of the current chroma block based on the chroma intra prediction mode; and deriving a residual block of the current chroma block by subtracting the predicted block from an original block; When the luma prediction mode of the previously set position is an intra block copy mode, the luma intra prediction mode is set to the previously set mode.
14. A non-transitory computer-readable medium having stored thereon computer-executable components configured to execute on one or more processors of a computing device, the computer-executable components comprising: Check the tree type of the current chroma block, deriving a chroma intra prediction mode of the current chroma block based on a luma intra prediction mode of a previously set position; generating a prediction block of the current chroma block based on the chroma intra prediction mode; reconstructing the current chroma block by adding a residual block of the current chroma block to the predicted block; If the luma prediction mode at the previously set position is an intra block copy mode, the luma intra prediction mode is set to the previously set mode.
Citation Information
Patent Citations
Color difference intra prediction candidate generation device, image coding device, image decoding device, and program
JP2020028066A
Intra-prediction-based video signal processing method and apparatus
JP7733196B2
Image processing device and image processing method
WO2018051811A1
Intra prediction image generating device, image decoding device, and image coding device
WO2018116925A1
Method and apparatus for video coding
WO2019217189A1