Video signal processing method and apparatus

By incorporating extended angle modes and optimizing their signaling based on block patterns and sizes, the method enhances coding efficiency and reduces overhead in video signal processing, addressing inefficiencies in predicting current blocks using surrounding blocks.

JP2026100060APending Publication Date: 2026-06-18SAMSUNG ELECTRONICS CO LTD

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
SAMSUNG ELECTRONICS CO LTD
Filing Date
2026-04-14
Publication Date
2026-06-18

AI Technical Summary

Technical Problem

Existing video signal processing methods lack efficiency in coding and signaling predictive information for video signals, particularly in predicting current blocks using surrounding blocks.

Method used

The method and apparatus introduce a video signal processing device and method that utilize a set of intra-prediction modes including basic and extended angle modes, where the extended angle modes are determined based on the basic angle modes, and their signaling is optimized based on the pattern and size of the current block, minimizing overhead.

Benefits of technology

This approach enhances coding efficiency and extends prediction methods for video signals while reducing signaling overhead, thereby improving overall video signal processing performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026100060000001_ABST
    Figure 2026100060000001_ABST
Patent Text Reader

Abstract

A video signal processing method and apparatus for encoding or decoding a video signal are disclosed. [Solution] More specifically, a video signal processing method is disclosed, comprising the steps of: receiving intra-predictive mode information for a current block; the intra-predictive mode information indicating one of a plurality of intra-predictive modes constituting an intra-predictive mode set; and decoding the current block based on the received intra-predictive mode information, wherein the intra-predictive mode set includes a plurality of angle modes, the plurality of angle modes including a basic angle mode and an extended angle mode, and the extended angle mode is signaled based on the basic angle mode; and a video signal processing device utilizing the same is disclosed.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a video signal processing method and apparatus, and more particularly to a video signal processing method and apparatus for encoding or decoding a video signal. [Background technology]

[0002] Compression coding refers to a series of signal processing techniques for transmitting digitized information over communication lines or storing it in a format suitable for storage media. While compression coding can target various media such as audio, video, and text, the technique specifically for video compression coding is called video compression. Video signal compression coding is performed by removing excess information by considering spatial, temporal, and probabilistic correlations. However, with the recent development of diverse media and data transmission systems, there is a growing demand for more efficient video signal processing methods and devices. [Overview of the Initiative] [Problems that the invention aims to solve]

[0003] The present invention aims to improve the coding efficiency of video signals.

[0004] Furthermore, the present invention aims to improve signaling efficiency when predicting the current block using predictive information of surrounding blocks. [Means for solving the problem]

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

[0006] First, according to an embodiment of the present invention, a video signal processing method is provided, comprising the steps of: receiving intra-predictive mode information for a current block; the intra-predictive mode information indicating one of a plurality of intra-predictive modes constituting an intra-predictive mode set; and decoding the current block based on the received intra-predictive mode information, wherein the intra-predictive mode set includes a plurality of angle modes, the plurality of angle modes including a basic angle mode and an extended angle mode, and the extended angle mode is signaled based on the basic angle mode.

[0007] Furthermore, according to an embodiment of the present invention, a video signal processing device is provided which includes a processor, the processor receiving intra-prediction mode information for the current block, the intra-prediction mode information indicating one of a plurality of intra-prediction modes constituting an intra-prediction mode set, and decoding the current block based on the received intra-prediction mode information, the intra-prediction mode set including a plurality of angle modes, the plurality of angle modes including a basic angle mode and an extended angle mode, and the extended angle mode signaling based on the basic angle mode.

[0008] The basic angle mode is a mode that corresponds to angles within a preset first angle range, and the extended angle mode is determined based on the basic angle mode.

[0009] The extended angle mode is a wide-angle mode that deviates from the first angle range.

[0010] The wide-angle mode replaces at least one basic angle mode within the first angle range, and the intra-predictive mode index corresponding to the replaced basic angle mode signals the wide-angle mode.

[0011] The extended angle mode is an angle mode between the basic angle modes within the first angle range.

[0012] The interval between the extended angle modes of the intra prediction mode set is set based on the interval between the corresponding basic angle modes.

[0013] The angular interval between the extended angle modes is set in the same way as the angular interval between the corresponding basic angle modes.

[0014] Whether the extended angle mode can be used is determined based on at least one of the pattern and size of the current block.

[0015] In the intra prediction mode set, the number of extended angle modes is set to be not more than the number of basic angle modes.

Advantages of the Invention

[0016] According to the embodiments of the present invention, the coding efficiency of video signals is increased.

[0017] Also, according to the embodiments of the present invention, the prediction method for the current block can be extended in various ways, and the signaling overhead due to such an extension can be minimized.

Brief Description of the Drawings

[0018] [Figure 1] It is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention. [Figure 2] It is a schematic block diagram of a video signal decoding apparatus according to an embodiment of the present invention. [Figure 3] It is a diagram showing an embodiment in which a coding tree unit is divided into coding units within a picture. [Figure 4] It is a diagram showing an embodiment of a method for signaling the division of a quad tree and a multi-type tree. [Figure 5] It is a diagram showing an embodiment of reference samples used for predicting a current block in an intra prediction mode. [Figure 6] This figure shows one example of a prediction mode used for intra-prediction. [Figure 7] This figure shows one example of a method for signaling the decoder with an intra-prediction mode selected by an encoder. [Figure 8] This figure shows a detailed example of how to signal intra-predictive mode. [Figure 9] This figure shows one example of a context condition applied to the intra-predictive mode. [Figure 10] This figure shows another example of the context conditions applied to the intra-predictive mode. [Figure 11] This figure shows yet another example of context conditions applied to intra-predictive mode. [Figure 12] This figure shows an example of referencing surrounding blocks for intra-prediction of the current block. [Figure 13] This figure shows another example where surrounding blocks are referenced for intra-prediction of the current block. [Figure 14] This figure shows an example of referencing the MPM list of surrounding blocks for intra-prediction of the current block. [Figure 15] This figure shows one embodiment in which the pattern and / or size of the current block and surrounding blocks are taken into consideration for intra-prediction of the current block. [Figure 16] This figure shows an extended embodiment in which prediction information for the current block is obtained by referring to prediction information for surrounding blocks. [Figure 17] This figure shows an extended embodiment in which prediction information for the current block is obtained by referring to prediction information for surrounding blocks. [Figure 18] This figure shows an extended embodiment in which prediction information for the current block is obtained by referring to prediction information for surrounding blocks. [Figure 19] This figure shows one embodiment of setting the priority of intra prediction modes based on the frequency of occurrence of intra prediction modes in surrounding blocks. [Figure 20]This figure shows an example of classifying intra-prediction modes into multiple subsets. [Figure 21] This figure shows an example of classifying intra-prediction modes into multiple subsets. [Figure 22] This figure shows an example of signaling the intra-prediction mode of the current block using a subset of classified intra-prediction modes. [Figure 23] This figure shows a detailed example of signaling the intra-prediction mode of the current block using a subset of classified intra-prediction modes. [Figure 24] This figure shows an example of dynamically signaling the intra-prediction mode of the current block based on prediction information from surrounding blocks. [Figure 25] This figure shows an example in which the number of MPM modes is variably adjusted and the intra-prediction mode of the current block is signaled based on that. [Modes for carrying out the invention]

[0019] The terminology used herein has been selected as widely used and general terms as possible, taking into account the function of the present invention; however, this may vary depending on the intent of the articulators, conventions, or the emergence of new technologies. In addition, in certain cases, the applicant has arbitrarily selected some terms, in which case their meaning will be described in the section describing the mode of implementation of the invention. Therefore, it is important to clarify that the terminology used herein is not merely a set of names, but should be interpreted based on the substantive meaning of the term and the overall content of this specification.

[0020] In this specification, some terms are interpreted as follows: Coding is sometimes interpreted as encoding or coding. 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, the term video signal processing device is used as a conceptual term that includes both encoders and decoders. Information is a term that includes 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 mean a basic unit of image processing or a specific location in a picture, and refers to an image region that includes both luma and chroma components. "Block" refers to an image region that includes a specific component among the luma and chroma components (i.e., Cb and Cr). However, in some embodiments, terms such as "unit," "block," "partition," and "region" may be used interchangeably. Furthermore, in this specification, the term "unit" is used as a concept that includes coding units, prediction units, and transformation units. "Picture" refers to a field or frame, and in some embodiments, these terms are used interchangeably.

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

[0022] The conversion unit 110 converts the residual signal, which is the difference between the input video signal and the predicted signal generated by the prediction unit 150, to obtain conversion coefficient values. For example, discrete cosine transform (DCT), discrete sine transform (DST), or wavelet transform may be used. Discrete cosine transform and discrete sine transform divide the input picture signal into block form and perform the transformation. In the transformation, the coding efficiency may differ depending on the distribution and characteristics within the transformation domain. The quantization unit 115 quantizes the values ​​of the conversion coefficients output by the conversion unit 110.

[0023] To improve coding efficiency, instead of directly coding the picture signal, a method is used in which the picture is predicted using a pre-coded region via the prediction unit 150, and the restored picture is obtained by adding the residual value between the original picture and the predicted picture to the predicted picture. To prevent mismatches between the encoder and decoder, the encoder should use information that is also available to the decoder when performing predictions. For this purpose, the encoder performs a further process of restoring the currently encoded block. The inverse quantization unit 120 inversely quantizes the conversion coefficient values, and the inverse transformation unit 125 restores the residual value using the inversely quantized conversion coefficient values. Meanwhile, the filtering unit 130 performs filtering operations to improve the quality of the restored picture and enhance coding efficiency. Examples include deblocking filters, sample adaptive offsets (SAO), and adaptive loop filters. The filtered picture is stored in a decoded picture buffer (DPB) 156 for output or use as a reference picture.

[0024] 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, while the inter-prediction unit 154 performs inter-prediction, predicting the current picture using a reference buffer stored in the composite picture buffer 156. The intra-prediction unit 152 performs intra-prediction from the restored samples in the current picture and transmits intra-coded information to the entropy coding unit 160. The intra-coded information includes at least one of the following: intra-prediction mode, MPM (Most Probable Mode) flag, and MPM index. The inter-prediction unit 154 is composed of a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains motion vector values ​​for the current region by referring to a specific region of the restored reference signal picture. The motion estimation unit 154a transmits motion information (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-encoded information, which includes motion information for the reference region, to the entropy coding unit 160.

[0025] Once the picture prediction described above is performed, the conversion unit 110 converts the residual values ​​between the original picture and the predicted picture to obtain conversion coefficient values. In this case, the conversion is performed in units of specific blocks within the picture, but the size of the specific block is variable within a predetermined range. The quantization unit 115 quantizes the values ​​of the conversion coefficients generated by the conversion unit 110 and transmits them to the entropy coding unit 160.

[0026] The entropy coding unit 160 generates a video signal bitstream by entropy coding quantized conversion coefficients, intra-encoded information, and inter-encoded information. The entropy coding unit 160 uses methods such as variable length coding (VLC) and arithmetic coding. Variable length coding (VLC) converts input symbols into a sequence of codewords, but the length of the codewords is variable. For example, frequently occurring symbols are represented by short codewords, and less frequently occurring symbols are represented by long codewords. As a variable length coding method, context-based adaptive variable length coding (CAVLC) is used. Arithmetic coding converts a sequence of data symbols into a single prime number, but arithmetic coding obtains the optimal number of prime bits necessary to represent each symbol. As an arithmetic coding method, context-based adaptive binary arithmetic coding (CABAC) is used.

[0027] The generated bitstream is encapsulated in Network Abstraction Layer (NAL) units as its basic units. Each NAL unit contains an encoded integer number of coding tree units. To decode the bitstream with a video decoder, the bitstream must first be separated into NAL units, and then each separated NAL unit must be decoded. Meanwhile, the information necessary for decoding the video signal bitstream is transmitted via Raw Byte Sequence Payloads (RBSPs) of higher-level sets such as Picture Parameter Set (PPS), Sequence Parameter Set (SPS), and Video Parameter Set (VPS).

[0028] On the other hand, the block diagram in Figure 1 shows an encoding device 100 according to one embodiment of the present invention, and the separated blocks show the elements of the encoding device 100 in a logically distinguishable manner. Therefore, the elements of the encoding device 100 described above can be mounted on one chip or multiple chips depending on the device design. According to one embodiment, the operation of each element of the encoding device 100 described above is performed by a processor (not shown).

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

[0030] The entropy decoding unit 210 entropy codes the video signal bitstream and extracts conversion coefficients, intra-encoded information, inter-encoded information, etc., for each region. The inverse quantization unit 220 inversely quantizes the entropy-decoded conversion coefficients, and the inverse conversion unit 225 uses the inversely quantized conversion coefficients to reconstruct the residual values. The video signal processing device 200 adds the residual values ​​obtained from the inverse conversion unit 225 with the predicted values ​​obtained from the prediction unit 250 to reconstruct the original pixel values.

[0031] Meanwhile, the filtering unit 230 improves image quality by filtering the picture. 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 either output or stored in a composite picture buffer (DPB) 256 to be used as a reference picture for the next picture.

[0032] The prediction unit 250 includes an intra-prediction unit 252 and an inter-prediction unit 254. The prediction unit 250 generates a prediction picture by utilizing the encoding type decoded via the entropy decoding unit 210 described above, the conversion coefficients for each region, intra / inter-encoded information, etc. To reconstruct the current block being decoded, the decoded region of the current picture or another picture containing the current block is used. A picture (or tile / slice) that uses only the current picture for reconstruction, i.e., performs only intra-prediction, is called an intra-picture or I-picture (or tile / slice), and a picture (or tile / slice) that performs both intra-prediction and inter-prediction is called an inter-picture (or tile / slice). A picture (or tile / slice) that uses up to one motion vector and a reference picture index to predict the sample value of each block in an interpicture (or tile / slice) is called a predictive picture or P-picture (or tile / slice), while a picture (or tile / slice) that uses up to two motion vectors and a reference picture index is called a bi-predictive picture or B-picture (or tile / slice). In other words, a P-picture (or tile / slice) uses up to one motion information set to predict each block, and a B-picture (or tile / slice) uses up to two motion information sets to predict each block. Here, a motion information set contains one or more motion vectors and one reference picture index.

[0033] The intra-prediction unit 252 generates a prediction block using intra-encoded information and the restored sample in the current picture. As described above, the intra-encoded information includes at least one of the intra-prediction mode, MPM flag, and MPM index. The intra-prediction unit 252 predicts the pixel value of the current block using the restored pixel located to the left and / or above the current block as a reference pixel. In one embodiment, the reference pixels are pixels adjacent to the left boundary and / or the upper boundary of the current block. In another embodiment, the reference pixels are pixels in the surrounding blocks of the current block that are adjacent to the left boundary and / or the upper boundary of the current block within a predetermined distance. In this case, the surrounding blocks of the current block include at least one of the left (L) block, upper (A) block, below left (BL) block, above right (AR) block, or above left (AL) block adjacent to the current block.

[0034] The interprediction unit 254 generates a prediction block using the reference picture and intercoded information stored in the composite picture buffer 256. The intercoded information includes motion information of the current block relative to the reference block (reference picture index, motion vector, etc.). Interpretation includes L0 prediction, L1 prediction, and bi-prediction. L0 prediction is a prediction that uses one reference picture included in the L0 picture list, and L1 prediction means a prediction that uses one reference picture included in the L1 picture list. For this, one set of motion information (e.g., motion vector and reference picture index) is required. In the bi-prediction method, up to two reference regions are used, but these two reference regions may reside in the same reference picture or in different pictures. In other words, in the bi-prediction method, up to two sets of motion information (e.g., motion vector and reference picture index) are used, but the two motion vectors may correspond to the same reference picture index or to different reference picture indices. In this case, the referenced picture will be displayed (or output) either before or after the current picture in terms of time.

[0035] The interpretation unit 254 obtains the current reference block using the motion vector and the reference picture index. The reference block resides within the reference picture corresponding to the reference picture index. The pixel value of the block identified by the motion vector, or an interpolated value thereof, is used as the predictor of 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 filter for sub-pel motion prediction is not limited to these. In this way, the interpretation unit 254 performs motion compensation by predicting the texture of the current unit from a previously restored picture using motion information.

[0036] A video picture is generated by adding the predicted value output from the intra-prediction unit 252 or the inter-prediction unit 254 and the residual value output from the inverse conversion unit 225. In other words, the video signal decoding device 200 reconstructs the current block using the predicted block generated from the initial velocity unit 250 and the residual obtained from the inverse conversion unit 225.

[0037] On the other hand, the block diagram in Figure 2 shows a decoding device 200 according to one embodiment of the present invention, and the separated blocks show the elements of the decoding device 200 in a logically distinguishable manner. Thus, the elements of the decoding device 200 described above are mounted on one 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).

[0038] Figure 3 shows an embodiment in which a Coding Tree Unit (CTU) is divided into Coding Units (CUs) within a picture. In the video signal coding process, the picture is divided into a sequence of Coding Tree Units (CTUs). A Coding Tree Unit consists of two blocks: an NXN block of chroma samples and its corresponding chroma samples. A Coding Tree Unit is divided into multiple Coding Units. A Coding Unit refers to a basic unit for processing a picture in the video signal processing processes described above, i.e., intra / inter prediction, transformation, quantization, and / or entropy coding. Within a single picture, the size and pattern of the Coding Units are not constant. Coding Units have a square or rectangular pattern. 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. Also in this specification, a non-square block refers to a rectangular block, but the present invention is not limited thereto.

[0039] Referring to Figure 3, the coding tree unit is first divided into a quad tree (QT) structure. That is, in the quad tree structure, one node with a size of 2NX2N is divided into four nodes with a size of NXN. In this specification, the quad tree is also referred to as a quaternary tree. The quad tree division is performed recursively, and it is not necessary for all nodes to be divided to the same depth.

[0040] On the other hand, the leaf nodes of the quad tree described above are further divided into a multi-type tree (MTT) structure. According to embodiments of the present invention, in a multi-type tree structure, one node is divided into a binary or ternary tree structure with horizontal or vertical division. In other words, there are four division structures in a multi-type tree structure: vertical binary division, horizontal binary division, vertical ternary division, and horizontal ternary division. According to embodiments 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 2NX2N is divided into two NX2N nodes by vertical binary division and into two 2NXN nodes by horizontal binary division. Furthermore, 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 partitioning, and into 2NX(N / 2), 2NXN, and 2NX(N / 2) nodes by horizontal binary partitioning. Such multi-type tree partitioning is performed recursively.

[0041] In a multi-type tree, leaf nodes can be coding units. If a coding unit is not excessively large compared to the maximum transformation length, it is used as a unit of prediction and transformation without being further subdivided. On the other hand, in the quad tree and multi-type tree described above, at least one of the following parameters is either predefined or transmitted via RBSPs of higher-level sets such as PPS, SPS, or VPS: 1) CTU size: the size of the root node of the quad tree; 2) MinQtSize: the minimum allowed size of a QT leaf node; 3) MaxBtSize: the maximum allowed size of a BT root node; 4) MaxTtSize: the maximum allowed size of a TT root node; 5) MaxMttDepth: the maximum allowed depth of MTT subdivision from a QT leaf node; 6) MinBtSize: the maximum allowed size of a BT leaf node; 7) MinTtSize: the minimum allowed size of a TT leaf node.

[0042] Figure 4 shows one example of a method for signaling the splitting of quad trees and multi-type trees. Pre-configured flags are used to signal the splitting of quad trees and multi-type trees as described above. Referring to Figure 4, at least one of the following flags is used: "qt_split_flag" which indicates whether a quad tree node can be split, "mtt_split_flag" which indicates whether a multi-type tree node can be split, "mtt_split_vertical_flag" which indicates the splitting direction of a multi-type tree node, or "mtt_split_binary_flag" which indicates the splitting pattern of a multi-type tree node.

[0043] According to an embodiment of the present invention, the coding tree unit is the root node of the quad tree and is preferentially divided into the quad tree structure. In the quad tree structure, each node "QT_node" is signaled with "qt_split_flag". If the value of "qt_split_flag" is 1, the node is divided into four square nodes, and if the value of "qt_split_flag" is 0, the node becomes a leaf node "QT_leaf_node" of the quad tree.

[0044] Each quad tree leaf node, "QT_leaf_node," is further divided into a multi-type tree structure. In the multi-type tree structure, each node, "MTT_node," is signaled with "mtt_split_flag." If the value of "mtt_split_flag" is 1, the node is divided into multiple rectangular nodes; if the value of "mtt_split_flag" is 0, the node becomes a leaf node "MTT_leaf_node" in the multi-type tree. If a multi-type tree node "MTT_node" is divided into multiple rectangular nodes (i.e., if the value of "mtt_split_flag" is 1), "mtt_split_vertical_flag" and "mtt_split_binary_flag" are further signaled for the node "MTT_node." If the value of "mtt_split_vertical_flag" is 1, the node "MTT_node" is instructed to be split vertically; if the value of "mtt_split_vertical_flag" is 0, the node "MTT_node" is instructed to be split horizontally. Also, if the value of "mtt_split_binary_flag" is 1, the node "MTT_node" is split into two rectangular nodes; and if the value of "mtt_split_binary_flag" is 0, the node "MTT_node" is split into three rectangular nodes.

[0045] Figures 5 and 6 illustrate in more detail the intra prediction method according to an embodiment of the present invention. As described above, the intra prediction unit uses the restored pixels located to the left and / or above the current block as reference pixels to predict the pixel values ​​of the current block.

[0046] First, Figure 5 shows an example of a reference sample used to predict the current block in intra-prediction mode. In this example, the reference pixels are pixels adjacent to the left boundary and / or the upper boundary of the current block. As shown in Figure 5, if the size of the current block is WXH and a single reference line (line) adjacent to the current block is used for intra-prediction, the reference pixels are set using up to 2W+2H+1 adjacent pixels located to the left and / or above the current block. On the other hand, in a further embodiment of the present invention, a multi-reference line pixel is used for intra-prediction of the current block. The multi-reference line consists of n lines located within a preset range from the current block. In this example, if a multi-reference line pixel is used for intra-prediction, separate index information indicating the line to be set as the reference pixel is signaled. If at least some of the adjacent pixels to be used as reference pixels have not yet been restored, the intra-prediction unit performs a reference sample padding process according to a preset rule to acquire the reference pixels. The intra-prediction unit also performs a reference sample filtering process to reduce the error of the intra-prediction. In other words, a reference pixel is obtained by filtering the adjacent pixels and / or the pixels acquired through the reference sample padding process. The intra prediction unit uses the reference pixels thus acquired to predict the pixels of the current block.

[0047] Next, Figure 6 shows an example of a prediction mode used for intra-prediction. For intra-prediction, intra-prediction mode information indicating the direction of intra-prediction is signaled. The intra-prediction mode indicates one of several intra-prediction modes that make up the intra-prediction mode set. If the current block is an intra-prediction block, the decoder receives the intra-prediction mode information for the current block from the bitstream. The intra-prediction unit of the decoder performs intra-prediction for the current block based on the extracted intra-prediction mode information.

[0048] According to an embodiment of the present invention, the intra-prediction mode set includes all intra-prediction modes used for 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) angular modes (i.e., direction modes). Each intra-prediction mode is indicated by a preset index (i.e., an intra-prediction mode index). For example, as shown in Figure 6, intra-prediction mode index 0 indicates the planar mode, and intra-prediction mode index 1 indicates the DC mode. Intra-prediction mode indices 2 through 66 each indicate different angular modes. Each angular mode indicates different angles within a preset angular range. For example, an angular mode indicates an angle within an angular range between 45 degrees and -135 degrees clockwise (i.e., a first angular range). In this case, the angular mode is defined relative to 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.

[0049] On the other hand, the pre-set angle ranges are set to be different from each other depending on the pattern of the current block. For example, if the current block is a rectangular block, a wide-angle mode is used to specify an angle greater than 45 degrees clockwise or less than -135 degrees. If the current block is a horizontal block, the angle mode specifies an angle within the angle range between (45 + offset1) degrees and (-135 + offset1) degrees clockwise (i.e., the second angle range). In this case, angle modes 67 to 76, which deviate from the first angle range, are also used. Furthermore, if the current block is a waterline block, the angle mode specifies an angle within the angle range between (45 - offset2) degrees and (-135 - offset2) degrees clockwise (i.e., the third angle range). In this case, angle modes -10 to -1, which deviate from the first angle range, are also used. According to embodiments of the present invention, the values ​​of offset1 and offset2 are determined to be different from each other based on the ratio between the width and height of the rectangular block. Also, offset1 and offset2 are positive numbers.

[0050] According to an additional embodiment of the present invention, the set of intra-predictive modes comprises a base angle mode and an extended angle mode, wherein the extended angle mode is determined based on the base angle mode.

[0051] According to one embodiment, the basic angle mode corresponds to the angle used in the intra-prediction of the conventional HEVC (High Efficiency Video Coding) standard, and the extended angle mode corresponds to the angle newly added in the intra-prediction of the next-generation video codec standard. More specifically, the basic angle mode is an angle mode corresponding to one of the intra-prediction modes {2, 4, 6, ..., 66}, and the extended angle mode is an angle mode corresponding to one of the intra-prediction modes {3, 5, 6, ..., 65}. In other words, the extended angle mode is an angle mode between the basic angle modes within the first angle range. Therefore, the angle indicated by the extended angle mode is determined based on the angle indicated by the basic angle mode.

[0052] In other embodiments, the basic angle mode is a mode corresponding to an angle within a preset first angle range, and the extended angle mode is a wide-angle mode that deviates from the first angle range. That is, the basic angle mode is an angle mode corresponding to one of the intra-prediction modes {2, 3, 4, ..., 66}, and the extended angle mode is an angle mode corresponding to one of the intra-prediction modes {-10, -9, ..., -1} and {67, 68, ..., 76}. The angle indicated by the extended angle mode is determined to be the angle opposite to the angle indicated by the corresponding basic angle mode. Thus, the angle indicated by the extended angle mode is determined based on the angle indicated by the basic angle mode. On the other hand, the number of extended angle modes is not limited to this, and further extended angles are defined by the size and / or pattern of the block. For example, the extended angle mode may be defined to an angle mode corresponding to one of the intra-prediction modes {-14, -13, ..., -1} and {67, 68, ..., 80}. On the other hand, the total number of intra-prediction modes included in the intra-prediction mode set varies depending on the configuration of the basic angle mode and extended angle mode described above.

[0053] In the above embodiment, the intervals between extended angle modes are set based on the intervals between the corresponding basic angle modes. For example, the interval between extended angle modes {3, 5, 7, ..., 65} is determined based on the interval between the corresponding basic angle modes {2, 4, 6, ..., 66}. Also, the interval between extended angle modes {-10, -9, ..., -1} is determined based on the interval between the corresponding opposite basic angle modes {56, 57, ..., 65}, and the interval between extended angle modes {67, 68, ..., 76} is determined based on the interval between the corresponding opposite basic angle modes {3, 4, ..., 12}. The angle intervals between extended angle modes are set in the same way as the angle intervals between the corresponding basic angle modes. Furthermore, in the intra-prediction mode set, the number of extended angle modes is set to be less than or equal to the number of basic angle modes.

[0054] According to embodiments of the present invention, extended angle modes are signaled based on basic angle modes. For example, a wide-angle mode (i.e., an extended angle mode) substitutes at least one angle mode (i.e., a basic angle mode) within a first angle range. The substitute basic angle mode is the angle mode corresponding to the opposite side of the wide-angle mode. That is, the substitute basic angle mode is an angle mode that corresponds to the angle in the opposite direction of the angle indicated by the wide-angle mode, or an angle that differs from the angle in the opposite direction by a preset offset index. According to embodiments of the present invention, the preset offset index is 1. The intra-predictive mode index corresponding to the substitute basic angle mode is further mapped to the wide-angle mode to signal the wide-angle mode. For example, wide-angle modes {-10, -9, ..., -1} are signaled by intra-predictive mode indices {57, 58, ..., 66}, respectively, and wide-angle modes {67, 68, ..., 76} are signaled by intra-predictive mode indices {2, 3, ..., 11}, respectively. By having the intra-prediction mode index for the basic angle mode signal the extended angle mode in this way, the same set of intra-prediction mode indices is used to signal the intra-prediction mode even if the configuration of the angle modes used for intra-prediction in each block differs from one another. Therefore, the signaling overhead due to changes in the configuration of the intra-prediction mode is minimized.

[0055] On the other hand, the availability of the extended angle mode is determined based on at least one of the pattern and size of the current block. According to one embodiment, if the size of the current block is larger than a preset size, the extended angle mode is used for intra-prediction of the current block; otherwise, only the basic angle mode is used for intra-prediction of the current block. According to another embodiment, if the current block is not a square block, the extended angle mode is used for intra-prediction of the current block; if the current block is a square block, only the basic angle mode is used for intra-prediction of the current block.

[0056] The intra-prediction unit determines the reference pixels and / or interpolated reference pixels to be used for intra-prediction of the current block based on the intra-prediction mode information of the current block. If the intra-prediction mode index indicates a specific angle mode, the reference pixels or interpolated reference pixels corresponding to the specific angle from the current pixel of the current block are used for predicting the current pixel. Therefore, different sets of reference pixels and / or interpolated reference pixels are used for intra-prediction depending on the intra-prediction mode. After intra-prediction of the current block is performed using the reference pixels and intra-prediction mode information, the decoder adds the residual signal of the current block obtained from the inverse transform unit to the intra-predicted value of the current block to restore the pixel value of the current block.

[0057] Figure 7 shows one example of a method for signaling the decoder with the intra-prediction mode selected by the encoder. If the total number of intra-prediction modes included in the intra-prediction mode set is T (for example, 67), then simply representing the T modes in binary and signaling them is inefficient because it does not consider the probability of each mode being selected and the context of the block and surrounding blocks. Therefore, efficient signaling can be achieved by separately managing a list of some modes from the total modes that have a high probability of being used in the block currently.

[0058] According to an embodiment of the present invention, for intra-prediction of the current block, at least one prediction mode list consisting of a subset of the overall intra-prediction modes is maintained. The first prediction mode list for intra-prediction is an MPM list. Intra-prediction modes included in the MPM list are called MPM modes, and intra-prediction modes not included in the MPM list are called non-MPM modes. The encoder signals an MPM flag to distinguish whether the intra-prediction mode currently used for the block is an MPM mode or a non-MPM mode. The decoder identifies whether the intra-prediction mode currently used for the block is an MPM mode or a non-MPM mode via the received MPM flag.

[0059] According to one embodiment, efficient signaling can be achieved with fewer bits by using a separate encoding method for MPM modes. If the number of MPM modes in the MPM list is m, then the number of non-MPM modes is Tm. If the number of MPM modes m is less than the number of non-MPM modes Tm, then the MPM modes are coded using truncated unary binary, and the non-MPM modes are coded using truncated binary.

[0060] The MPM list is constructed by considering various contexts in stages, as follows: First, the MPM list consists of the intra-prediction mode and planar / DC mode used in the surrounding blocks of the current block (context M0). If there are blocks encoded in intra-prediction mode among the surrounding blocks whose reconstruction is complete, the current block may be using the same intra-prediction mode as that block due to the regional similarity of the picture. Therefore, the MPM list is constructed to include the intra-prediction mode of the surrounding blocks. According to one embodiment, the surrounding blocks of the current block include at least one of the left (L) block, upper (A) block, lower left (BL) block, upper right (AR) block, or upper left (AL) block adjacent to the current block. For example, the surrounding blocks of the current block include the left (L) block and upper (A) block adjacent to the current block. The left (L) block is the lowest block adjacent to the left boundary of the current block, and the upper (A) block is the rightmost block adjacent to the upper boundary of the current block. A specific example of surrounding blocks for constructing the MPM list will be further explained with reference to Figure 8. The intra-prediction mode, planar mode, and DC mode selected in the surrounding blocks of the current block are added to the MPM list in a pre-configured order. For example, the MPM list is configured in the order of {Block L mode, Block A mode, Planar mode, DC mode, Block BL mode, Block AR mode, Block AL mode}.

[0061] Secondly, if the number of MPM modes m cannot be filled using the method described above, further contextual conditions (e.g., context M1, context M2, ...) are applied to fill the MPM list. When applying further contextual conditions, intra-prediction modes already included in the MPM modes are not added.

[0062] On one hand, among all T intra prediction modes, the remaining T - m non-MPM modes not included in the MPM list are coded by truncated binary coding. If truncated binary coding is used, assuming 2^(k - 1) < T - m < 2^k, the initial 2^k - (T - m) indexes are signaled using K - 1 bits (or bins), and the remaining indexes are signaled using k bits (or bins). Therefore, further context conditions (i.e., context N) are applied to non-MPM modes, and the modes that are relatively likely to be selected in the corresponding block are signaled with an index composed of k - 1 bits to minimize the signaling overhead.

[0063] According to a further embodiment of the present invention, a second prediction mode list consisting of some modes among non-MPM modes is managed. More specifically, non-MPM modes are further classified into selected (s) modes and non-selected (ns) modes, and a second prediction mode list consisting of selected modes (i.e., the selected mode list) is managed. The intra prediction modes included in the selection list are called selected modes, and the intra prediction modes not included in the selection list are called non-selected modes. The encoder signals a selection mode flag that distinguishes whether the intra prediction mode used for the current block is a selected mode or a non-selected mode. The decoder identifies whether the intra prediction mode used for the current block is a selected mode or a non-selected mode via the received selection mode flag.

[0064] As described above, when non-MPM modes are further subdivided, the selected modes are coded with a fixed length. In this case, an additional contextual condition (e.g., context S) is applied to the selected modes to prioritize the placement of modes that are more likely to be selected in the given block. In this case, s (where s is a power of 2) selected modes are coded with a fixed length, and the remaining ns non-selected modes are coded using truncated binomial-to-binary coding. The ns non-selected modes are signaled using any l-1 bits (or bins), or l bits (or bins). In this case, an additional contextual condition (i.e., context NS) is applied to the non-selected modes, and the modes that are relatively more likely to be selected in the given block are signaled with an index consisting of l-1 bits, thereby minimizing signaling overhead.

[0065] Specific embodiments of the aforementioned context conditions will be described later with reference to the drawings. The context conditions additionally defined in the following embodiments will be applied individually or in overlap with the various configurations to which the aforementioned context conditions {M0, M1, M2, N, S, NS} apply. For example, a context condition may be used to signal the basic angle mode in preference to the extended angle mode. Alternatively, a context condition may be used to preferentially add to the prediction mode list an angle mode obtained by adding an arbitrary offset (e.g., -1, +1) to the angle mode of the block derived via the first context condition of the MPM mode (e.g., context M0). Such context conditions will be applied as context conditions for one or more of the MPM mode, non-MPM mode, selected mode, or non-selected mode.

[0066] According to a further embodiment of the present invention, the intra-prediction method described above is determined based on the number of intra-prediction modes and / or intra-prediction mode information of the surrounding block. For example, the distinction between MPM mode, non-MPM mode, selected mode, and non-selected mode, the number of intra-prediction modes signaled for each mode (i.e., m, Tm, s, and ns), and the method by which each mode is encoded (i.e., truncated unary binary, truncated binomial binary, fixed-length encoding), etc., are configured variably according to the number or value of intra-prediction modes of the surrounding block. In this case, the surrounding block is a pre-configured block referenced to constitute the MPM list.

[0067] First, in order to construct the MPM list, the intra-prediction modes of the surrounding blocks of the current block are considered, and then the variable configuration is applied based on the total number of prediction modes. If the current block is a B-frame or P-frame block, the method of constructing the MPM list is changed according to the number of blocks from the surrounding blocks that have undergone intra-prediction and / or the number of prediction modes. To further extend this, different methods are used between I-frames and B / P-frames to construct the MPM list. In I-frames, all surrounding blocks consist of intra-prediction, so the second method or a similar method is applied instead of the first method described above.

[0068] Secondly, the variable configuration is applied based on the number of different intra-prediction modes used in the surrounding blocks. For example, the method of constructing the MPM list is changed depending on whether the intra-prediction modes used in the surrounding blocks are all the same or different from each other. Alternatively, the method of constructing the MPM list is changed depending on the degree to which the intra-prediction modes used in the surrounding blocks are different. The degree to which the intra-prediction modes used in the surrounding blocks are different is determined based on whether the number of intra-prediction modes used in the surrounding blocks is greater than or equal to a preset value. Furthermore, the degree to which the intra-prediction modes used in the surrounding blocks are different is determined based on the difference in the mode values ​​of the intra-prediction modes used in the surrounding blocks. If the degree to which the intra-prediction modes used in the surrounding blocks are different from the preset criteria, the MPM list is constructed based on the first method. However, if the degree to which the intra-prediction modes used in the surrounding blocks are different from the preset criteria, the MPM list is constructed based on the second method, which is different from the first method. On the other hand, the surrounding blocks of the current block considered in order to generate the above-described variable MPM list basically include blocks at positions other than the set position. A specific embodiment relating to this will be explained with reference to Figure 8.

[0069] Figure 8 shows a detailed example of a method for signaling intra-predictive modes. Figures 8(a) and 8(b) show examples of peripheral blocks referenced to construct the predictive mode list. Figure 8(c) shows one example of the intra-predictive mode signaling method described above. Figure 8(d) shows one example of signaling non-selective modes using binomial binary evolution.

[0070] First, Figure 8(a) shows one example of the relative positions of surrounding blocks referenced to constitute the MPM list. Referring to Figure 8(a), the surrounding blocks are referenced in the order of the left (L) block, upper (A) block, lower left (BL) block, upper right (AR) block, or upper left (AL) block adjacent to the current block. In this case, the intra-prediction mode, planar mode, and DC mode selected from the surrounding blocks are added to the MPM list in a predetermined order. However, the surrounding blocks referenced to constitute the MPM list in the embodiment of the present invention are not limited to these. For example, the surrounding blocks of the current block include the left (L) block and the upper (A) block of the current block. The left (L) block is the lowest block adjacent to the left boundary of the current block, and the upper (A) block is the rightmost block adjacent to the upper boundary of the current block.

[0071] Next, Figure 8(b) shows another embodiment of the relative positions of surrounding blocks referenced to constitute the MPM list. The surrounding blocks of the current block are divided into smaller blocks, with multiple blocks adjacent to the left or upper boundary of the current block. In this case, the intra-prediction modes of the multiple blocks adjacent to the left or upper boundary of the current block are referenced to constitute the MPM list. In the embodiment of Figure 8(b), the multiple blocks adjacent to the left boundary of the current block are designated L0 and L1 from bottom to top, and the multiple blocks adjacent to the upper boundary of the current block are designated A0 and A1 from right to left.

[0072] In the first embodiment, the MPM list is configured in the order of {L mode of block L0, mode of block A0, planar mode, DC mode, mode of block BL, mode of block AR, and mode of block AL}. In the second embodiment, the MPM list is configured in the order of {L mode of block L0, mode of block L1, mode of block A0, mode of block A1, planar mode, DC mode, mode of block BL, mode of block AR, and mode of block AL}. In this case, the position and number of surrounding blocks that are further referenced are variable. In addition, additional blocks are referenced in the lower left block (BL), upper right block (AR), and upper left block (AL) adjacent to the current block. In the third embodiment, the MPM list is configured in the order of {L mode of block L0, mode of block A0, planar mode, DC mode, mode of block L1, mode of block A1, mode of block BL, mode of block AR, and mode of block AL}. In other words, by prioritizing the selection order of the planar mode and DC mode, which have a higher probability of being selected, over the modes of block L1 and block A1 in the MPM list, signaling overhead can be reduced. According to the fourth embodiment, the MPM list is configured in the order of {L mode of block L0, mode of block A0, planar mode, DC mode, mode of block BL, mode of block AR, mode of block AL, mode of block L1, and mode of block A1}. In other words, after the order of configuration of the MPM list according to the first embodiment described above, blocks L1 and A1 are referenced.

[0073] According to a further embodiment of the present invention, the order in which the MPM list is composed is determined based on the pattern of the current block. More specifically, if the current block is not a square block, the order in which the surrounding blocks are referenced differs depending on whether the current block is a vertical block or a horizontal block. For example, if the current block is a vertical block, the left block is referenced preferentially over the upper block, and if the current block is a horizontal block, the upper block is referenced preferentially over the left block. According to another embodiment, the order in which the MPM list is composed is determined by comparing the pattern of the current block with the patterns of the surrounding blocks. For example, if the current block is a vertical block, the intra-prediction mode used for the vertical block is preferentially included in the MPM list from among the pre-configured surrounding blocks.

[0074] According to yet another embodiment of the present invention, the order in which the MPM list is composed is determined by considering the relationship between the pattern of the current block and the angle modes used in the surrounding blocks. For example, if the current block is a vertical block, the angle modes used in the surrounding blocks that are within a preset range from the vertical (VER) mode 50 or between the diagonal (DIA) mode 34 and the vertical-diagonal (VDIA) mode 66 are preferentially included in the MPM list. According to a further embodiment, the intra-prediction modes included in the surrounding block's MPM list are included in the current block's MPM list. In this case, if the current block's MPM list is not filled with intra-prediction modes used in the surrounding blocks, the intra-prediction modes included in the surrounding block's MPM list are added to the current block's MPM list.

[0075] Figure 8(c) shows one embodiment of the method for signaling the intra-prediction modes described above. Of the total T intra-prediction modes, m modes are classified as MPM modes and signaled using truncated unary binary. In one embodiment, T is 67 and m is 6. In truncated unary binary, the number of bits (or bins) used increases as the signaling index increases, so signaling efficiency is increased by matching modes that are relatively more likely to be selected in the given block to lower index values. For this purpose, the encoder and decoder construct the MPM list under the same context conditions, and the derived mode values ​​are rearranged and signaled based on the aforementioned context conditions. For example, the selected modes are classified in the order of non-angle modes such as DC / planar modes, vertical modes, and planar angle modes, and the encoding of the CABAC board is performed. Next, s selected modes determined by arbitrary context conditions are signaled with fixed-length bits, and the remaining ns non-selected modes are signaled using truncated binary. In one embodiment, n is 16 and ns is 45.

[0076] Figure 8(d) shows an example of signaling non-selected modes using truncated binomial binary evolution. According to this example, the number of non-selected modes ns is 45. If truncated binomial binary evolution is used, since 2^5 < 45 < 2^6, the initial 2^6 - 45 = 19 indices are signaled using 5 bits (or bins), and the remaining 26 indices are signaled using 6 bits (or bins). Thus, a pre-set context condition is also applied to the non-selected modes, matching modes that are relatively more likely to be selected in the relevant block to lower-value indices that are signaled with 5 bits (or bins). A specific example of the pre-set context condition will be explained with reference to the following diagram.

[0077] Figure 9 shows an embodiment of a context condition applied to an intra-prediction mode, illustrating a method for applying a preset offset to an angle mode. According to one embodiment of the present invention, a new priority is assigned to an angle mode obtained by adding or subtracting a preset offset to an angle mode having a specific priority. For example, an angle mode obtained by adding or subtracting a preset offset to an angle mode having a first priority is assigned a first or second priority. According to one embodiment, among the total intra-prediction modes, the mode having the first priority is selected preferentially over the remaining modes. Furthermore, the remaining modes are divided into modes having the second priority and modes having the third priority, with the mode having the second priority being selected preferentially over the mode having the third priority. Here, the modes selected preferentially are matched to lower index values ​​signaled with fewer bits.

[0078] More specifically, if intra-prediction mode indices a, b, and c have first priority, then modes with intra-prediction mode indices a-offset, a+offset, b-offset, b+offset, c-offset, and c+offset (where offset is a non-zero integer) are given either first or second priority. For example, during the MPM list construction process, modes selected from surrounding blocks are given first priority, and among the modes selected from surrounding blocks, angular modes obtained by adding -1 or +1 to the angular mode are given either first or second priority. Modes that are similar to the highest priority mode are given higher priority by giving the same or next priority to modes obtained by adding or subtracting a predetermined offset to the highest priority mode.

[0079] However, as shown in Figure 9, when the angle mode is limited to a preset angle range, the angle mode obtained by adding or subtracting an offset from a specific angle mode may deviate from the preset range. For example, if the angle modes of the intra-prediction mode set are limited to intra-prediction modes 2 to 66, and the preset offset is 1, then intra-prediction mode 1, which is intra-prediction mode 2 minus the offset, and intra-prediction mode 67, which is intra-prediction mode 66 plus the offset, will deviate from the preset angle range. In other words, intra-prediction mode k-offset or k+offset, derived from intra-prediction mode k, will deviate from the preset angle range. Therefore, a method is needed to solve this problem.

[0080] According to one embodiment of the present invention, if the angle mode obtained by adding or subtracting an offset from a specific angle mode deviates from the set angle range, an angle mode determined cyclically from the angle mode set in that range is selected. In other words, if the angle mode obtained by adding or subtracting an offset from a specific angle mode deviates from the preset angle range, an angle mode located on the opposite side of the specific angle mode is selected from the angle mode set in that range. For example, if the preset angle mode set for an angle range consists of modes {a, b, c, d, e, f} in ascending order of the intra-prediction mode index, then adding offset 1 to mode f selects mode a, and adding offset 2 to mode f selects mode b. Similarly, subtracting offset 1 from mode a selects mode f, and subtracting offset 2 from mode a selects mode e. Referring to Figure 9, adding an offset to the vertical diagonal mode VDIA selects the horizontal diagonal mode HDIA or an angle mode near it. In other words, VDIA+1 is matched to HDIA, and VDIA+2 is matched to HDIA+1. Furthermore, HDIA-1 is matched to VDIA, and HDIA-2 is matched to VDIA-1.

[0081] According to another embodiment of the present invention, if an angle mode obtained by adding or subtracting an offset from a specific angle mode deviates from the set angle range, the angle mode obtained by adding or subtracting the offset is ignored. When a preset offset is added to or subtracted from a specific angle mode, an angle mode similar to the specific angle mode is selected. However, if an angle mode is selected cyclically as in the previous embodiment, an angle mode located on the opposite side of the specific angle mode may be selected, potentially reducing the similarity between the selected angle modes. Therefore, if an angle mode obtained by adding or subtracting an offset deviates from the preset angle range, that angle is not selected. For example, if mode c+offset deviates from the preset angle range among modes a-offset, a+offset, b-offset, b+offset, c-offset, and c+offset obtained by adding or subtracting an offset from the preset modes {a, b, c}, then the remaining modes a-offset, a+offset, b-offset, b+offset, and c-offset are selected, excluding mode c+offset.

[0082] According to yet another embodiment of the present invention, if the angle mode obtained by adding or subtracting a first offset from a specific angle mode deviates from the set angle range, the angle mode obtained by subtracting or adding a second offset from the specific angle mode is selected. Alternatively, if the angle mode obtained by adding or subtracting a first offset from a specific angle mode deviates from the set angle range, the angle mode obtained by further adding or subtracting the second offset is selected. In this case, the second offset has a different value from the first offset. For example, if mode a+offset1 deviates from the preset angle range, mode a-offset2 or mode a+offset1-offset2 is selected. Referring to Figure 9, the angle mode VDIA+1 obtained by adding the first offset 1 to the preset vertical diagonal mode VDIA deviates from the preset angle range. In this case, the angle mode VDIA-2 obtained by subtracting the second offset 2 from angle mode VDIA is selected. If the angle mode selected by applying the second offset overlaps with a preset angle mode, a third offset different from the second offset is used in a manner similar to the method described above.

[0083] According to yet another embodiment of the present invention, if the angle mode obtained by adding or subtracting a first offset from a specific angle mode deviates from the set angle range, the angle mode obtained by adding or subtracting a second offset from the specific angle mode is selected. In this case, the absolute value of the second offset is smaller than the absolute value of the first offset. For example, if mode a+offset1 deviates from the preset angle range, mode a+offset2 is selected. More specifically, if the preset angle modes are VDIA and HDIA, VDIA+offset1 may deviate from the preset angle range. Therefore, if the preset angle modes are VDIA and HDIA, VDIA+offset2 is selected. Also, referring to Figure 9, the angle mode VDIA-1+2 obtained by adding the first offset 2 to the preset vertical diagonal mode VDIA-1 deviates from the preset angle range. In this case, the angle mode VDIA-1+1 obtained by adding the second offset 1 to angle mode VDIA-1 is selected. If the angle mode selected by applying the second offset overlaps with a pre-selected angle mode, a third offset, different from the second offset, is used in a manner similar to that described above.

[0084] Figure 10 shows another embodiment of the context conditions applied to the intra-prediction mode, illustrating a method for configuring the prediction mode list, taking into account the minimum and maximum angles or indices of the angle modes pre-selected in the prediction mode list. In embodiments of the present invention, the prediction mode list includes an MPM list and a selection mode list, but the present invention is not limited thereto.

[0085] In intra-prediction, the intra-prediction mode of the current block is similar to the intra-prediction mode of the surrounding blocks. For example, the angle mode of the current block is the same as or similar to one of the angle modes of the surrounding blocks. Therefore, if there is a pre-configured first prediction mode list for the current block, a second prediction mode list is constructed considering the elements of the first prediction mode list. According to one embodiment, the second prediction mode list is constructed based on the minimum and / or maximum values ​​of the angles or indices (i.e., intra-prediction mode indices) of the angle modes included in the first prediction mode list. The intra-prediction modes in the second prediction mode list are given a higher priority than the intra-prediction modes other than those in the first and second prediction mode lists.

[0086] More specifically, if the minimum and maximum angles or indices of the angle modes included in the first prediction mode list are denoted as "min" and "max," respectively, then the angle modes included in the second prediction mode list are selected within the range of "min" or greater and "max" or less, or within the range of greater than "min" and less than "max." According to one embodiment, the second prediction mode list includes angle modes that are uniformly distributed between the minimum and maximum values ​​determined based on the first prediction mode list (i.e., having a constant index difference or a constant angle difference). In this way, the angle modes included in the second prediction mode list have a higher priority than angle modes not included in the first or second prediction mode list.

[0087] In other embodiments, the angular modes included in the second prediction mode list are selected within the range of "min-offset1" or greater and "min+offset2" or less, or within the range of greater than "min-offset1" and less than "min+offset2". Here, offset1 and offset2 are preset offsets and are non-negative integers. Offset1 and offset2 may have the same value or different values. In one embodiment, offset1 and offset2 are set to the same value, but as in the embodiment of Figure 9, if the range set based on the offset deviates from the preset angular range, offset1 and offset2 are set to different values. In other embodiments, offset1 and offset2 are set to the same value or different values ​​based on the distribution of angular modes included in the first prediction mode list. For example, if the angular modes included in the first prediction mode list are not uniformly distributed, offset1 and offset2 are set to different values. The second prediction mode list includes angular modes that are uniformly distributed between "min-offset1" and "min+offset2" determined based on the first prediction mode list (i.e., having a constant index difference or a constant angular difference). For example, if the number of modes selected for the second prediction mode list is n, then m is set as m = floor(((max-offset2)-(min-offset1)) / (n+1)), and the second prediction mode list includes angular modes corresponding to the index or angle "min-offset1+m", "min-offset1+2m", ..., "min-offset1+nm". Thus, angular modes included in the second prediction mode list have a higher priority than angular modes not included in the first or second prediction mode list.

[0088] Referring to Figure 10, the first prediction mode list is an MPM list. The minimum and maximum index values ​​of the angular modes included in the MPM list, which is configured according to a set rule, are referred to as "MPM_min" and "MPM_max," respectively. In this case, as in the embodiment described above, the second prediction mode list is constructed based on the MPM list, taking into account the similarity between the current block and the surrounding blocks. For example, the second prediction mode list is constructed based on "MPM_min" and "MPM_max." More specifically, the second prediction mode list includes angular modes that are uniformly distributed between "MPM_min-offset" and "MPM_min+offset" (i.e., have a constant index difference or a constant angular difference). Here, offset is a non-negative integer.

[0089] As in the embodiment described above, if the second prediction mode list is constructed based on the first prediction mode list, intra-prediction is performed using the first and second prediction mode lists. In one embodiment, the second prediction mode list is used as a selection mode list. In another embodiment, the second prediction mode list indicates an intra-prediction mode that is signaled by an index consisting of k-1 bits from among the non-MPM modes that are signaled using k-1 bits or k bits. Also, the first prediction mode list and the second prediction mode list refer to the first and second sets of the same prediction mode list. That is, in the embodiment of Figure 10 described above, the first prediction mode list and the second prediction mode list are replaced by the first set and the second set of the prediction mode list, respectively. Here, the prediction mode list is either an MPM list or a selection mode list.

[0090] Figure 11 shows another embodiment of the context conditions applied to the intra-prediction mode, illustrating how to construct a prediction mode list that takes the basic angle mode into consideration. As described above, the multiple angle modes that make up the intra-prediction mode set include the basic angle mode and the extended angle mode.

[0091] According to one embodiment of the present invention, the prediction mode list is configured with priority given to basic angular modes. Angular modes included in the prediction mode list have a higher priority than angular modes not included in the list. According to one embodiment, the method of configuring the prediction mode list with priority given to basic angular modes is applied under the condition that surrounding blocks use basic angular modes. Furthermore, the method of configuring the prediction mode list with priority given to basic angular modes is applied under the condition that the number of surrounding blocks using basic angular modes is greater than or equal to a critical value.

[0092] In the encoder's prediction mode determination step, calculating the rate-distortion cost (RD-cost) for all selectable (defined) angle modes may be burdensome in terms of complexity. Therefore, to reduce complexity in the intra-prediction mode determination step, the encoder first calculates the rate-distortion cost for a pre-set angle mode, for example, only the basic angle mode, and selects the intra-prediction mode. Next, the encoder further calculates the rate-distortion cost for the peripheral angle modes of the selected basic angle mode and selects the intra-prediction mode.

[0093] Considering the similarity between the current block and the surrounding blocks, and the embodiment of the encoder described above, it is highly likely that the current block will use a basic angle mode. Therefore, a prediction mode list with priority is constructed based on the basic angle modes. First, if the number of elements in the prediction mode list to be constructed is less than the total number of basic angle modes, a portion of the basic angle modes are selected to construct the prediction mode list. For example, if the number of basic angle modes is 33 and the number of elements in the prediction mode list to be constructed is 16, then the basic angle modes are selected starting from one of the total basic angle modes, and every other basic angle mode is selected. That is, in the embodiment of Figure 13, angle modes 4, 8, 12, 16, ..., 60, and 64 are selected. According to one embodiment, the prediction mode list consisting of the intra-prediction modes selected in this way is used as a selection mode list. In another embodiment of the present invention, the number of elements in the prediction mode list to be constructed is defined based on the number of basic angle modes. For example, if the number of basic angle modes is 33, then the number of elements in the prediction mode list to be constructed is defined as 33 or 32 (=33-1), etc.

[0094] As described above, extended angle modes are signaled based on the base angle modes. Extended angle modes are signaled using an intra-predictive mode index for the base angle modes. For example, when a predictive mode list is constructed based on the base angle modes, extended angles are signaled via offsets or on / off flags by referring to the list. More specifically, if a predictive mode list is constructed based on the base angle modes {a, b, c, d}, then offsets {offset1, offset2, offset3, offset4} corresponding to each angle mode are signaled. Based on the signaled offsets, angle modes {a+offset1, b+offset2, c+offset3, d+offset4} are indicated. In other embodiments, a flag is transmitted separately to indicate whether the offset corresponding to the base angle mode is available. For example, a flag corresponding to base angle mode a is transmitted, but if the value of the flag is 1, angle mode a+offset1 is indicated, and if the value of the flag is 0, angle mode a is indicated.

[0095] Figure 12 shows an embodiment in which a surrounding block is referenced for intra-prediction of the current block. In Figure 12, it is assumed that a surrounding block exists adjacent to the left or upper boundary of the current block. The following describes how to construct a prediction mode list for the current block by referencing the surrounding block of the current block. The prediction mode list includes, but is not limited to, a set of MPM lists, selected modes, and non-selected mode lists themselves or a part thereof.

[0096] 1) Method for constructing the MPM list (first method). According to an embodiment of the present invention, the MPM list for the current block is constructed in the following manner. If there are multiple surrounding blocks adjacent to the left or upper boundary of the current block, the information of the intra-prediction mode used in the relevant block is comprehensively considered. In this case, surrounding blocks adjacent to the left or upper boundary of the current block refer to blocks adjacent to the left side having a height of "Cur_block_height" or the upper side having a length of "Cur_block_width" of the current block.

[0097] For example, as shown in Figure 12, if blocks L0 and L1 are adjacent to the left boundary of the current block, and blocks A0, A1, and A2 are adjacent to the upper boundary, the MPM list is constructed by referring to the intra-prediction mode used in the relevant block. In this case, the order in which the surrounding blocks adjacent to the current block are referred to is configured as follows in the embodiment.

[0098] According to the first embodiment, the MPM list is configured in the order of {L mode of block L0, mode of block L1, ..., mode of block A0, mode of block A1, ..., planar mode, DC mode, mode of block BL, mode of block AR, mode of block AL}. In other words, the MPM list is configured by referring to the blocks adjacent to the left boundary and the blocks adjacent to the upper boundary of the current block in order. According to the second embodiment, the MPM list is configured in the order of {L mode of block L0, mode of block A0, mode of block L1, mode of block A1, mode of block L_x, mode of block A_x, mode of block L_x+1, mode of block A_x+1, ..., planar mode, DC mode, mode of block BL, mode of block AR, mode of block AL}. In other words, the representative block L0 adjacent to the left boundary of the current block and the representative block A0 adjacent to the upper boundary of the current block are first referenced, and then the remaining blocks adjacent to the left boundary of the current block and the remaining blocks adjacent to the upper boundary of the current block are referenced alternately in order to construct the MPM list. According to the third embodiment, the MPM list is constructed in the order of {mode of block L0, mode of block A0, planar mode, DC mode, mode of block BL, mode of block AR, mode of block AL, mode of block L1, ..., mode of block A1, ...}. In other words, the representative block L0 adjacent to the left boundary of the current block and the representative block A0 adjacent to the upper boundary of the current block are first referenced, the planar mode and DC mode are added, and then the remaining blocks adjacent to the left boundary of the current block and the remaining blocks adjacent to the upper boundary of the current block are referenced alternately in order to construct the MPM list. According to another embodiment, the average or representative value based on the intra-prediction mode of the block adjacent to the left or upper boundary of the current block is extracted, and the MPM list is constructed using this. On the other hand, in the embodiment described above, the representative block adjacent to the left / upper boundary of the current block is set to a block at a position other than L0 and A0. For example, the block closest to the midpoint of the left side and the midpoint of the upper side of the current block may be set as the representative block.

[0099] On the other hand, Figure 12 shows examples where the number of surrounding blocks adjacent to the left and upper boundaries of the current block is 2 and 3, respectively. However, the above-described embodiment can be extended and applied even if the number of surrounding blocks increases. Furthermore, although the above embodiment was described based on the surrounding blocks to the left and above the current block, it can be similarly applied to surrounding blocks located to the lower left (BL), upper right (AR), and upper left (AL) of the current block. A specific embodiment relating to this will be explained with reference to Figure 13. If the MPM list cannot be filled using the above method, the MPM list is added by applying a preset offset to the pre-selected angle mode in the MPM list. In other words, the angle mode obtained by adding or subtracting a preset offset to the pre-selected angle mode in the MPM list is added to the MPM list. In this case, the preset offset is a non-zero integer.

[0100] 2) Method for constructing the selection mode list (second method). The selection mode list is constructed based on the intra-prediction modes used in the surrounding blocks of the current block. Various embodiments of the priority referencing surrounding blocks described in the first method also apply when constructing the selection mode list. If the selection mode list cannot be filled using the methods described above, the selection mode list is expanded by applying a pre-set offset to a pre-selected angle mode. In other words, an angle mode obtained by adding or subtracting a pre-set offset to a pre-selected angle mode is added to the selection mode list. In this case, the pre-set offset is a non-zero integer.

[0101] According to another embodiment of the present invention, when applying the first method, lower-level modes of the surrounding blocks' intra-prediction modes that are not included in the MPM list are preferentially included in the selection mode list. If the selection mode list cannot be filled in this way, the selection mode list is expanded by applying a preset offset to the angle modes that have been pre-selected in the selection mode list. According to yet another embodiment, the selection mode list is constructed by applying a preset offset (i.e., offset1) to the angle modes of the surrounding blocks. For example, based on the remaining angle modes after excluding the planar mode and DC mode from any one embodiment of the first method, the following selection mode list is constructed: {Block L0 mode + / -offset1, Block L1 mode + / -offset1, ..., Block A0 mode + / -offset1, Block A1 mode + / -offset1, ..., Block BL mode + / -offset1, Block AR mode + / -offset1, Block AL mode + / -offset1}. In this case, the preset offset is determined in various ways. For example, the offset is a positive integer, and its value is set to start from 1 and increase by 1 each time. Furthermore, the offset may be a positive integer, and its value may be set to start at 1 and increase in multiples of 2. Alternatively, the offset may start as an integer greater than 1 and increase, and the scale of increase may be extended to multiples of 2 or 3, etc. Also, the offset may start as a preset initial value (e.g., 10) and gradually decrease.

[0102] 3) Method for constructing the non-selected mode list (third method). When constructing the non-selected mode list, the intra-predicted modes used in the surrounding blocks of the current block are used, similar to the first method described above. For example, if the non-selected mode list consists of 45 intra-predicted modes and is signaled using truncated binomial binary-evolution, the top 19 modes will be signaled with one less bit than the modes from the 20th onwards. In other words, the intra-predicted modes of the non-selected mode list are divided into a first set, which is signaled with an index consisting of l-1 bits, and a second set, which is signaled with an index consisting of l bits. In this case, the angular modes selected based on the priority of referencing surrounding blocks according to the first method described above are included in the first set. If the first set cannot be filled in this way, angular modes obtained by applying a pre-set offset to the angular modes pre-selected in the first set are added to the first set.

[0103] According to another embodiment of the present invention, lower-level modes of the peripheral blocks' intra-prediction modes that are not included in the MPM list and / or selection mode list are preferentially included in the first set. If the first set cannot be filled in this manner, angle modes obtained by applying a preset offset to a pre-selected angle mode are added to the first set. According to yet another embodiment, similar to the second method, the first set is configured based on the angle modes of the peripheral blocks as follows: {Block L0 mode + / -offset2, Block L1 mode + / -offset2, ..., Block A0 mode + / -offset2, Block A1 mode + / -offset2, ..., Block BL mode + / -offset2, Block AR mode + / -offset2, Block AL mode + / -offset2}. In this case, the preset offset used to configure the first set (i.e., offset2) is set to a different value from the offset used to configure the MPM list and the offset used to configure the selection mode list (i.e., offset1).

[0104] Figure 13 shows another embodiment that references surrounding blocks for intra-prediction of the current block. The embodiment in Figure 12, which references multiple surrounding blocks to perform intra-prediction of the current block, can be extended to include surrounding blocks located not only to the left (L) and above (A) of the current block, but also to the lower left (BL), upper right (AR), and upper left (AL) of the current block.

[0105] The definition of a peripheral block located to the left or above the current block is the same as in the embodiment shown in Figure 12. Furthermore, peripheral blocks located to the lower left (BL), upper right (AR), and upper left (AL) of the current block are defined. First, the peripheral block located to the lower left (BL) of the current block refers to the block adjacent to the surface that extends downward by a length "BL_block_height" from the left side of the current block. Similarly, the peripheral block located to the upper right (AR) of the current block refers to the block adjacent to the surface that extends to the right by a length "AR_block_width" from the upper side of the current block. Likewise, the peripheral block located to the upper left (AL) of the current block refers to the block adjacent to the surface that extends downward by a length "AL_block_width" from the upper side of the current block. According to one embodiment, the length of "BL_block_height" is set to be the same as the length of "Cur_block_height" or to an integer multiple of the length of "Cur_block_height". Furthermore, the lengths of "AR_block_width" and "AL_block_height" are set to be the same as the length of "Cur_block_width," or to an integer multiple of the length of "Cur_block_width." In this case, all available blocks at the relevant position are referenced for intra-prediction of the current block. Additionally, the size of the referenced blocks is defined in advance, and only blocks smaller or larger than this size are referenced for intra-prediction of the current block. Also, if the current block is not a square, the patterns of the referenced surrounding blocks may differ depending on the size of the current block.

[0106] For example, as shown in Figure 13, if the surrounding blocks currently located to the lower left (BL) of the block are BL0, BL1, and BL2, the surrounding blocks currently located to the upper right (AR) of the block are AR0 and AR1, and the surrounding blocks currently located to the upper left (AL) of the block are AL0, AL1, and AL2, then the predicted mode list is constructed in the following order: {mode of block L0, mode of block L1, ..., mode of block A0, mode of block A1, ..., planar mode, DC mode, mode of block BL0, mode of block BL1, mode of block BL2, ..., mode of block AL0, mode of block AL1, ..., mode of block AR0, mode of block AR1, ...}. According to an embodiment of the present invention, the MPM list is constructed based on the construction order of such a predicted mode list. Furthermore, in the predicted mode list, the selection mode list may be constructed using only angle modes, and if the selection mode list cannot be filled, a selection mode is added to the selection mode list by applying a preset offset to a pre-selected angle mode. Furthermore, in the prediction mode list, the first set of non-selected mode lists may be constructed using only angular modes. If the first set cannot be filled, angular modes obtained by applying a preset offset to the angular modes pre-selected in the first set are added to the first set. The embodiment of the prediction mode list configuration considering the surrounding block described with reference to Figure 12 also applies to the extended surrounding block shown in Figure 13.

[0107] Figure 14 shows an example of referencing the MPM list of surrounding blocks for intra-prediction of the current block. When configuring the MPM list for the current block, not only the intra-prediction modes of surrounding blocks but also the MPM list of the block in question is referenced. More specifically, for intra-prediction of the current block, the intra-prediction modes of surrounding blocks, intra-prediction modes included in the MPM list of surrounding blocks, intra-prediction modes of surrounding blocks, intra-prediction modes included in the MPM list of surrounding blocks, etc. are referenced. In other words, the first step (1) of the current block stNot limited to the surrounding blocks of tier (2 nd tier) surrounding blocks, 3rd step (3 rd The intra-prediction mode of the current block is signaled using intra-prediction information from a wider range of surrounding blocks, such as the surrounding blocks of the tier. Here, the intra-prediction information of the block includes at least one of the intra-prediction mode of the block and MPM list information.

[0108] Referring to Figure 14, if the surrounding block to the left of the current block (i.e., Neighbor block 1) is coded in intra-prediction mode, the intra-prediction mode included in the MPM list of that surrounding block will be given priority in the intra-prediction mode signaling of the current block. In other words, the modes in the following order are referenced to signal the intra-prediction mode of the current block: {mode of block L, mode of block A, planar mode, DC mode, mode of block BL, mode of block AR, NB1_MPM0 mode, NB1_MPM1 mode, NB1_MPM2 mode, ..., NB2_MPM0 mode, NB2_MPM1 mode, NB2_MPM2 mode, ...}. Here, NBx_MPMy mode refers to the intra-prediction information of the x-th surrounding block of the current block. In other words, NBx_MPMy mode refers to the intra-prediction mode information of the x-th surrounding block, or the y-th intra-prediction mode information of the MPM list of that block. In this case, if the y-th mode is a non-angle mode such as a planar mode or a DC mode, it does not need to be considered in the current block.

[0109] According to embodiments of the present invention, intra-predictive mode information of surrounding blocks is modified and combined in various ways for use in intra-prediction for the current block. For example, embodiments may be modified and extended based on the pattern of the current block (i.e., square block, rectangular block) and the pattern of surrounding blocks, and the ordered pairs may also be extended and applied to various combinations. Embodiments that utilize intra-predictive modes included in the MPM list of surrounding blocks for intra-predictive mode signaling of the current block are combined with the embodiments described above. That is, when constructing at least one of the following for the current block: the MPM list, a set of higher modes signaled by an index of k-1 bits from non-MPM modes, a selection mode list, and a set of higher modes signaled by an index of l-1 bits from non-selection modes, modes included in the MPM list of surrounding blocks are referenced. Furthermore, if the corresponding list or set cannot be filled in each case, an angle mode obtained by applying a preset offset to a pre-selected angle mode is added to the corresponding list or set.

[0110] Figure 15 shows an embodiment in which the pattern and / or size of the current block and surrounding blocks are considered for intra-prediction of the current block. When configuring the MPM of the current block, intra-prediction information of surrounding blocks that have a similar pattern and / or size to the current block is preferentially referenced. Here, the intra-prediction information includes at least one of the intra-prediction mode and MPM list information. Whether the patterns of the current block and surrounding blocks are similar is determined based on whether both blocks are square blocks, whether both blocks are vertical blocks, whether both blocks are horizontal blocks, etc. If both blocks are either vertical or horizontal blocks, the ratio between the width and height of each block is further considered. In addition, in embodiments of the present invention, the block patterns are not limited to the above cases, but may be extended to non-uniform rectangular blocks, diagonal blocks, etc.

[0111] More specifically, if the current block is a vertical block, the intra-prediction information used for vertical blocks among the surrounding blocks (i.e., NB_l, NB_a) is preferentially referenced when constructing the current block's MPM list. Also, if the current block is 16x32, the intra-prediction information used for surrounding blocks of the same size (i.e., NB_l) is preferentially referenced when constructing the current block's MPM list. An embodiment that signals the current block's intra-prediction mode considering the pattern and / or size of the current block and surrounding blocks is combined with the embodiment described above. That is, when constructing at least one of the following for the current block's MPM list, a set of higher modes signaled by an index of k-1 bits from non-MPM modes, a selection mode list, and a set of higher modes signaled by an index of l-1 bits from non-selection modes, the intra-prediction information of surrounding blocks with a pattern and / or size similar to the current block is preferentially referenced. Furthermore, if it is not possible to fill the corresponding list or set in each case, the angle mode obtained by applying a pre-set offset to the pre-selected angle mode in the corresponding list or set will be added to the corresponding list or set.

[0112] Figures 16 to 18 show an extended embodiment in which prediction information for the current block is obtained by referencing prediction information for surrounding blocks. According to an embodiment of the present invention, the blocks referenced for signaling the prediction information for the current block are extended not only to surrounding blocks adjacent to the current block, but also to surrounding blocks not adjacent to the current block. An embodiment in which intra-prediction information for the current block is obtained by referencing intra-prediction information for surrounding blocks is described with reference to each drawing. According to one embodiment, the MPM list for the current block is constructed by referencing the intra-prediction information for surrounding blocks. However, the present invention is not limited to this, and each embodiment is similarly applicable when obtaining inter-prediction information for the current block by referencing inter-prediction information for surrounding blocks. Here, the inter-prediction information includes motion vectors, reference picture indices, etc.

[0113] First, Figure 16 shows an example of an extended peripheral block referenced to obtain prediction information for the current block. As described above, the MPM list of the current block is constructed using the intra-prediction mode of the peripheral blocks to reflect the regional similarity of the pictures. In this process, the peripheral blocks L(1), A(1), BL(1), AR(1), and AL(1) adjacent to the boundary of the current block are used in the first step (1 st The surrounding blocks of tier) are defined as follows: The surrounding blocks L(2), A(2), BL(2), AR(2), and AL(2) adjacent to the boundary of each surrounding block in the first step are defined as follows in the second step (2 ndA tier is defined as a surrounding block. For example, the lowest block L(1) adjacent to the left boundary of the current block is a tier of the first step, and blocks L(2), A(2), BL(2), AR(2), and AL(2) adjacent to the left or upper boundary of block L(1) are tier of the second step. In this case, blocks adjacent to the tier of the first step that overlap with the current block are excluded from the tier of the second step. That is, the upper right block AR(1) of block L(1) overlaps with the current block and is therefore not referenced when constructing the MPM list of the current block. Similarly, block BL(2) adjacent to block A(1), block AR(2) adjacent to block BL(1), and block BL(2) adjacent to block AR(1) also overlap with the current block and are therefore not referenced when constructing the MPM list.

[0114] Figure 16 shows an embodiment in which the present invention is expanded from five first-step peripheral blocks located to the left or above the current block to up to 25 second-step peripheral blocks, but the present invention is not limited to this. In other words, an embodiment of the present invention is expanded from N first-step peripheral blocks located to the left or above the current block to up to N^2 second-step peripheral blocks. In this case, the MPM list of the current block is constructed by referring to the intra-prediction modes of up to N^2+N peripheral blocks within a predetermined range from the current block. Therefore, the regional characteristics of the picture can be reflected more accurately than when constructing the MPM list by referring only to the intra-prediction modes of N first-step peripheral blocks. In addition, a reduction in the amount of bits required for intra-prediction mode coding is expected in order to increase the probability that the optimal intra-prediction mode of the current block exists in the MPM list.

[0115] To determine the precise position of the surrounding blocks in the second step of the current block, at least one piece of positional information is needed, such as the size of the surrounding block in the first step and the top-left, top-right, bottom-left, and bottom-right vertices of that block. If the encoder and decoder do not have the aforementioned information stored, the coordinates of each surrounding block in the second step are determined by adding an offset to the reference coordinates of the surrounding block in the first step. For example, if the reference coordinates of the bottom-right side of block AL(1) are (x0, y0), then the reference positions of blocks L(2), A(2), BL(2), AR(2), and AL(2) are determined to be (x0-offset-1, y0-1), (x0-1, y0-offset-1), (x0-offset-1, y0+1), (x0+1, y0-offset-1), and (x0-offset-1, y0-offset-1), respectively. Here, the offset is an integer greater than 0, and the offset in the x-axis direction and the offset in the y-axis direction are set to the same value or different values ​​from each other. According to other embodiments, the offset is determined based on the size of the block. That is, the offset is set to be proportional to the size of the block. For example, if the width and height of the block are {64, 32}, then the offset in the x-axis direction and the offset in the y-axis direction are set to {64, 32}, {32, 16}, {16, 8}, {8, 4}, etc., obtained by dividing the width and height by an integer, respectively. Since the encoder and decoder use the same offset according to a predefined rule, both the encoder and decoder refer to the interprediction mode of the second step surrounding block at the same position.

[0116] According to another embodiment of the present invention, once the MPM lists of the peripheral blocks L(1), A(1), BL(1), AR(1), or AL(1) of the current block in the first step are configured, the encoder and decoder configure the MPM list of the current block by referring to the intra-prediction modes included in the MPM list of the peripheral blocks in the first step, without the process of searching for the peripheral blocks in the second step. Since the prediction modes of the peripheral blocks in the second step are referenced when the MPM list of the peripheral blocks in the first step is configured, the prediction modes of the peripheral blocks in the second step are included in the MPM list of the peripheral blocks in the first step. Therefore, the prediction modes of the peripheral blocks in the second step can be referenced by referencing the MPM list of the peripheral blocks in the first step, without the process of searching for the peripheral blocks in the second step and calculating their positions. On the other hand, storing all the MPM list information of the peripheral blocks in the first step may place a burden on memory. Therefore, according to the present invention and other embodiments, the encoder and decoder store and refer to only the top M intra-prediction modes included in the MPM list of the peripheral block in the first step to constitute the MPM list of the current block. For example, if the size of the MPM list is 6 and the intra-prediction modes of the top 3 MPM indices (i.e., index = 0, 1, 2) are referred to, the MPM list of the current block is constructed by referring to the intra-prediction modes of the peripheral blocks L(1), A(1), BL(1), AR(1), and AL(1) in the first step, and the intra-prediction modes indicated by the top 3 MPM indices of the MPM list of each block. According to one embodiment, the planar mode and DC mode are excluded from the above-mentioned top M intra-prediction modes.

[0117] Figure 17 shows another embodiment of an extended peripheral block referenced to obtain predictive information for the current block. According to another embodiment of the present invention, a preset search range relative to the current block is used to obtain predictive information for the current block.

[0118] Referring to Figure 17, a rectangular search area is defined to find the surrounding blocks L(2), A(2), BL(2), AR(2), and AL(2) of the second step, based on the coordinates of the upper-left, lower-left, and upper-right vertices of the surrounding block of the first step. During this search, the surrounding blocks of the second step are searched by moving a predetermined number of steps in the x and / or y directions within the search area. For example, to search for the surrounding block L(2) of the second step relative to AL(1), which is the surrounding block of the current block in the first step, block L(2) is searched by moving a predetermined number of steps in the x direction from the coordinate reference point on the lower-left side of block AL(1). The search continues until a block with prediction information different from the prediction information of block AL(1) is found within the defined search area. Furthermore, in order to search for the surrounding block A(2) of the second step relative to AL(1), which is the surrounding block of the first step of the current block, block A(2) is searched by moving a predetermined number of steps in the y-axis direction from the coordinate reference point on the upper right side of block AL(1). Similarly, in order to search for the surrounding blocks AL(2), AR(2), and BL(2) of the second step, the surrounding blocks of the second step are searched by moving a predetermined number of steps in the y-axis direction and / or in the y-axis direction from the coordinate reference points on the upper left, upper right, and lower left sides of block AL(1), respectively.

[0119] According to embodiments of the present invention, the search range may be set to a fixed size such as 16×16, 32×32, or 64×64, or it may be set according to the current block size. In other words, the search range is set to be proportional to the current block width and / or height. For example, if the current block size is 128×128, the search range is set to 128×128, 64×64, 32×32, 16×16, 8×8, etc., obtained by dividing the block size by an integer. Within the search range, the step size for the search is set to a value that is greater than or equal to the minimum block size and smaller than the search range. For example, if the minimum block size is 4×4 in a 64×64 search range, the step size is set to 4, 6, 16, or 32. According to embodiments of the present invention, the search for prediction information within the search range is performed until the entire preset prediction mode list is filled. In other words, predicted information searched within the search range with a size of the first step is included in the prediction mode list, and if the prediction mode list is not filled, predicted information searched within the search range with a size of the second step is added to the prediction mode list. The encoder and decoder perform the search by increasing the step size for the search until the prediction mode list is completely filled. On the other hand, since the respective search range and step size are natural numbers and are used with the same predefined values ​​for the encoder and decoder, both the encoder and decoder can refer to the prediction mode of the surrounding block in the same second step.

[0120] Figure 18 shows another embodiment of an extended peripheral block referenced to obtain predictive information for the current block. If the encoder and decoder know the structure of the peripheral block of the current block, i.e., the upper-left coordinate of the block's size, they can determine the position of the peripheral block in the second step relative to the current block. In the subblock shown in Figure 18, the upper-left number indicates the encoding or decoding order, meaning the current block is the 15th to be encoded or decoded.

[0121] To determine the position of the surrounding blocks in the second step of the current block (i.e., the 15th block), the coordinates of at least one of the four reference points on the upper left, upper right, lower left, and lower right sides of each surrounding block in the first step, along with the width and height information of the corresponding block, are used. For example, the reference positions of the surrounding blocks L(2), A(2), BL(2), AR(2), and AL(2) in the second step relative to the surrounding block AL(1) in the first step of the current block are calculated as (x0-1, y0+h-1), (x0+w-1, y0-1), (x0-1, y0+h+1), (x0+w+1, y0-1), and (x0-1, y0-1), respectively. In this case, (x0, y0) is the coordinate of the upper left side of the 5th block, which is the surrounding block in the first step of the current block, and w and h are the width and height of the block, respectively. For the remaining peripheral blocks L(1), A(1), BL(1), and AR(1) of the first step, the position of each peripheral block in the second step is calculated using the same method, and the MPM list of the current block is constructed by referring to the intra-prediction mode of the peripheral block in the second step.

[0122] In a further embodiment of the present invention, when acquiring prediction information for the current block, the frequency of occurrence of prediction modes in surrounding blocks is taken into consideration. That is, prediction modes with a high frequency of occurrence in surrounding blocks are referenced for the prediction of the current block with a higher priority than prediction modes with a low frequency of occurrence in surrounding blocks. In one embodiment, the priority among prediction modes included in the MPM list of the current block is determined by considering the frequency of occurrence of the prediction modes of the surrounding blocks in the first step and the prediction modes of the surrounding blocks in the second step. A specific embodiment relating thereto will be described with reference to Figure 19.

[0123] FIG. 19 is a diagram showing an example of setting the priority order of intra prediction modes based on the occurrence frequency of intra prediction modes of peripheral blocks. First, the occurrence frequencies for the prediction modes of the peripheral blocks L(1), A(1), BL(1), AR(1), and AL(1) which are the peripheral blocks in the first step of the current block, and the peripheral blocks L(2), A(2), BL(2), AR(2), and AL(2) which are the peripheral blocks in the second step are calculated. The occurrence frequencies of the prediction modes of the peripheral blocks in the first step and the occurrence frequencies of the prediction modes of the peripheral blocks in the second step are stored in different lists from each other (that is, the first list and the second list), and increase by 1 each time the prediction mode for the peripheral block of the corresponding step is confirmed. For example, if the intra prediction mode of block L(1) is mode 50, the occurrence frequency of mode 50 in the second list increases by 1, and the occurrence frequency of mode 50 in the first list does not increase. When the calculation of the occurrence frequencies of the prediction modes of the peripheral blocks in the first step and the peripheral blocks in the second step is completed, the final occurrence frequency for each prediction mode is calculated through the sum of the weighted values of the occurrence frequencies. More specifically, the final occurrence frequency FM i is calculated as shown in Equation 1 below.

[0124]

Equation

[0125] Here, FM i (1) is the occurrence frequency of mode i in the peripheral blocks in the first step, FM i (2) is the occurrence frequency of mode i in the peripheral blocks in the second step, and W1 and W2 are weighted values.

[0126] For example, referring to Figure 19, if the occurrence frequencies in the peripheral blocks of the first step and the second step for the intra-prediction mode 50 are 2 and 3, respectively, the final occurrence frequency for the intra-prediction mode 50 is calculated as w1*3 + w2*3. In this case, bit soft operations are further applied to compensate for the increase in scale due to the weighting values ​​W1 and W2. Also, the weighting values ​​W1 and W2 are set to integers greater than 0 to avoid real number multiplication operations and increase the schedule of the sum of the weighting values, but the scale is corrected by bit shift operations.

[0127] According to embodiments of the present invention, the weight values ​​W1 and W2 are determined based on various embodiments. In one embodiment, W1 is set to a larger value than W2 because the surrounding blocks in the first step are closer to the current block than the surrounding blocks in the second step. For example, W1 and W2 may be set to 5 and 3, respectively. In another embodiment, the weight values ​​W1 and W2 are set variably according to the corresponding prediction mode. That is, W1 and W2 are not set the same for all prediction modes in the same list, but are set variably according to the prediction mode, with greater consideration given to the occurrence of a particular prediction mode. For example, a larger weight value is given to {planar mode, DC mode, VER mode, HOR mode, HDIA mode, DIA mode, VDIA mode}, etc., which have a high probability of occurrence. Also, a larger weight value is given to the basic angle mode compared to the extended angle mode. In another embodiment, the weight values ​​W1 and W2 are set variably according to the pattern of the current block, further increasing the priority of a particular angle mode. For example, if the current block is a vertical block, a larger weight is set for the VER mode and angle modes near the VER mode. If the current block is a horizontal block, a larger weight is set for the HOR mode and angle modes near the HOR mode. In other embodiments, the weights W1 and W2 are set variably according to the corresponding surrounding block positions. For example, if the priority order among surrounding blocks is set in the order of {block L, block A, block BL, block AR, block AL}, a higher weight is assigned according to this order. For example, if the prediction mode of block L(2) and block AL(2) is 34, a larger weight is applied to block L(2) and added to the occurrence frequency count.

[0128] If the weight values ​​W1 and W2 are set variably, the frequency count increases by W1 and W2 respectively when a specific prediction mode occurs within each list. In one embodiment, the weight values ​​W1 and W2 are set in advance. In this case, since both the encoder and decoder use the same weight values ​​W1 and W2, both the encoder and decoder can calculate the same occurrence frequency count without further signaling. In another embodiment, information regarding the weight values ​​W1 and W2 is signaled via RBSP such as PPS, VPS, or SPS.

[0129] The MPM list for the current block is constructed based on the final occurrence count calculated by the above-described embodiment. Intra-prediction modes with a high occurrence count in surrounding blocks have a high probability of being selected in the current block. Therefore, intra-prediction modes with a high final occurrence count calculated in surrounding blocks are included in the MPM list for the current block. For example, if the size of the MPM list is m, the MPM list consists of planar modes, DC modes, and the top m-2 angular modes with the highest final occurrence counts. Also, since a lower index in the MPM list can be represented with fewer bits, prediction modes with a high final occurrence count are matched to smaller MPM indices in the MPM list.

[0130] On the other hand, if there are multiple angle modes with the same value for their final occurrence frequency (which is not 0), the occurrence frequency of the relevant angle mode in the surrounding blocks of the first step is given priority. For example, if intra-prediction mode 18 and intra-prediction mode 50 have the same final occurrence frequency of 8, the intra-prediction mode with the higher occurrence frequency in the surrounding blocks of the first step is assigned a higher priority. According to another embodiment, if there are multiple angle modes with the same value for their final occurrence frequency (which is not 0), the priority among the relevant angle modes is determined according to the pattern of the current block. For example, if the current block is a vertical block, the angle modes of blocks A(1), AR(1), and AL(1) in the surrounding blocks of the first step are given a higher priority, or angle modes closer to the vertical mode are given a higher priority.

[0131] In one embodiment, the MPM indices for planar mode and DC mode in the MPM list are set differently depending on the intra-prediction mode of the peripheral block in the first step. For example, if the occurrence frequency of planar mode and DC mode among the intra-prediction modes of the peripheral block in the first step is above a critical value, the planar mode and DC mode are matched to MPM indices 0 and 1. Also, if the occurrence frequency of angular mode among the intra-prediction modes of the peripheral block in the first step is above a critical value, the MPM index for angular mode is set to a value smaller than the MPM indices for planar mode and DC mode.

[0132] In the above-described embodiment, if there are fewer than m-2 angular modes with a non-zero final occurrence count, the MPM list is constructed using one or more of {VER mode, HOR mode, HDIA mode, VDIA mode}. In addition, to minimize the signaling overhead required to encode non-MPM modes, prediction modes with a high final occurrence count are used. For example, prediction modes with a high final occurrence count are included in the selection mode list or matched to lower-value indices among the non-selection modes that are signaled with fewer bits. According to another embodiment, the selection mode list is constructed using angular modes obtained by adding or subtracting a pre-set offset to the angular modes with a high final occurrence count included in the MPM list. In addition, angular modes with a non-zero final occurrence count that are not included in the MPM list, and angular modes obtained by adding or subtracting a pre-set offset to those modes, are matched to lower-value indices among the non-selection modes that are signaled with fewer bits.

[0133] The following describes the operation of the encoder that encodes the intra-prediction mode of the current block based on the occurrence frequency of the intra-prediction mode of the surrounding block. First, in order to encode the intra-prediction mode for the current block, the encoder checks whether there are surrounding blocks of the current block and calculates the occurrence frequency of the intra-prediction mode of the relevant surrounding block. Next, the encoder constructs at least one of the following based on the occurrence frequency of the intra-prediction mode of the surrounding block: an MPM list, a selection mode list, or a non-selection mode. In this case, prediction modes with a higher occurrence frequency are configured to have a higher priority. Next, the encoder encodes an MPM flag indicating whether or not the intra-prediction mode of the current block exists in the current block's MPM list. If the intra-prediction mode of the current block does not exist in the current block's MPM list, it encodes a selection mode flag indicating whether or not the intra-prediction mode matches one of the selection modes. On the other hand, if the intra-prediction mode of the current block exists in the current block's MPM list (i.e., the value of the MPM flag is 1), the encoder encodes the MPM index corresponding to the intra-prediction mode of the current block in the MPM list. Furthermore, if the current block's intra-predictive mode exists in the current block's selection mode list (i.e., the MPM flag is valued at 0 and the selection mode flag is valued at 1), the encoder encodes the selection mode index corresponding to the current block's intra-predictive mode within the selection mode list. Otherwise, it encodes the non-selection mode index corresponding to the current block's intra-predictive mode.

[0134] Furthermore, the decoder's operation to decode the current block's intra-prediction mode based on the frequency of occurrence of the surrounding blocks' intra-prediction modes is as follows: First, during the parsing of the current block's symbols, the current block's MPM flag is parsed, and if the MPM flag is 0, the selection mode flag is parsed. Similar to the encoding process, the decoder checks if there are surrounding blocks to the current block and calculates the frequency of occurrence of the corresponding surrounding blocks' intra-prediction modes. Next, the decoder constructs at least one of the following based on the frequency of occurrence of the surrounding blocks' intra-prediction modes: an MPM list, a selection mode list, or a non-selection mode. The method of constructing the MPM list, selection mode list, and non-selection mode in the decoder is the same as the method in the encoder described above. If the MPM flag is 1, the decoder decodes the MPM index. If the MPM flag is 0 and the selection mode flag is 1, the decoder decodes the selection mode index. In other cases, the decoder decodes the non-selection mode index to determine the current block's intra-prediction mode. The decoder performs intra-prediction using the determined intra-prediction mode and generates a prediction block.

[0135] Figures 20 and 21 illustrate an example of classifying intra-prediction modes into multiple subsets. As the number of intra-prediction modes increases, the probability that the current block's intra-prediction mode is included in the MPM list decreases, thereby increasing the number of bits required to encode the intra-prediction mode. To address this, intra-prediction modes are classified into multiple subsets, and intra-prediction is performed using the prediction mode set based on the surrounding context of the current block.

[0136] First, Figure 20 shows an example of classifying intra-prediction modes into multiple subsets. According to the example in Figure 20, the N intra-prediction modes in the intra-prediction mode set are divided into M subsets (S0, S1, ..., S) consisting of exclusive intra-prediction modes. M-1 It is classified as follows: In Figure 20, m i、jThis refers to the j-th intra-prediction mode belonging to the i-th subset. i is K i It consists of individual exclusive intra-prediction modes and satisfies the following equation 2.

[0137]

number

[0138] In this case, the number of intra-prediction modes that make up each intra-prediction mode subset is K. i This can vary depending on the subset.

[0139] For example, if the intra-prediction mode set includes a total of 67 intra-prediction modes, the intra-prediction modes are divided into a horizontal mode set {planar mode, mode 2, mode 3, ..., mode 34} and a vertical mode set {DC mode, mode 35, mode 36, ..., mode 66}. According to another embodiment, the intra-prediction modes are divided into a horizontal mode set {horizontal mode, mode 10, mode 11, ..., mode 26}, a vertical mode set {DC mode, mode 42, mode 43, ..., mode 58}, a DIA mode set {mode 27, mode 28, ..., mode 41}, an HDIA mode set {mode 2, mode 3, ..., mode 9}, and a VDIA mode set {mode 59, mode 60, ..., mode 66}. According to yet another embodiment, the intra-prediction modes are divided into a first subset {planar mode, DC mode, basic angle mode} and a second subset {extended angle mode}.

[0140] Next, Figure 21 shows another embodiment in which intra-prediction modes are classified into multiple subsets. According to the embodiment in Figure 21, the N intra-prediction modes of the intra-prediction mode set are divided into M subsets (S0, S1, ..., S) which include intra-prediction modes that overlap (or are shared) with exclusive intra-prediction modes. M-1) are classified as follows. According to one embodiment, the shared intra prediction mode is set to the top L intra prediction modes that have a statistically high probability of being selected in the intra prediction. In Figure 21, cm k refers to the k-th shared intra-prediction mode belonging to each subset, m i、j This refers to the j-th exclusive intra-prediction mode belonging to the i-th subset. i L shared intra-prediction modes and L i It consists of individual exclusive intra-prediction modes and satisfies the following equation 3.

[0141]

number

[0142] In this case, L is the number of exclusive intra-prediction modes included in each intra-prediction mode subset. i This can vary depending on the subset.

[0143] For example, if the intra-prediction mode set contains a total of 67 intra-prediction modes, the shared intra-prediction mode is set to one or more of {planar mode, DC mode, HDIA mode, HOR mode, DIA mode, VER mode, VDIA mode}. Using this, the intra-prediction modes are divided into a first subset {planar mode, DC mode, basic angle mode} and a second subset {planar mode, DC mode, HDIA mode, HOR mode, DIA mode, VER mode, VDIA mode, extended angle mode}. According to another embodiment, the intra-prediction modes are divided into a first subset {planar mode, DC mode, HDIA mode, mode 3, mode 4, ..., mode 33, DIA mode, VER mode, VDIA mode} and a second subset {planar mode, DC mode, HDIA mode, HOR mode, DIA mode, mode 35, mode 36, ..., mode 65, VDIA mode}.

[0144] Figure 22 shows an example of signaling the intra-prediction mode of the current block using a subset of classified intra-prediction modes. According to this embodiment of the present invention, the intra-prediction mode subset of the current block is determined by utilizing the intra-prediction mode subset used in the surrounding blocks of the current block.

[0145] As shown in the embodiment of Figure 20, if each intra-prediction mode subset consists of an exclusive intra-prediction mode, the intra-prediction mode subset information containing the intra-prediction modes of the surrounding blocks is checked, and the intra-prediction mode subset of the current block is determined using this information. In other words, the intra-prediction mode subset most frequently used in the surrounding blocks is assigned to the intra-prediction mode subset of the current block. At this time, the embodiments of Figures 16 to 18, which refer to extended surrounding blocks to obtain the prediction information of the current block, are further applied.

[0146] Referring to Figure 22, first, the intra-prediction mode subset information of the surrounding blocks L(1), A(1), BL(1), AR(1), and AL(1) in the first step of the current block is referenced, and then the intra-prediction mode subset information of the surrounding blocks L(2), A(2), BL(2), AR(2), and AL(2) in the second step of the current block is referenced, and the intra-prediction mode subset of the current block is determined. According to one embodiment, based on the frequency calculation method described with reference to Figure 19, the final frequency count of the intra-prediction mode subset is calculated by applying weighted values ​​w1 and w2 to the frequency count of the intra-prediction mode subset of the surrounding blocks in the first step and the frequency count of the intra-prediction mode subset of the surrounding blocks in the second step, respectively. At this time, the intra-prediction mode subset with the largest frequency count is assigned to the intra-prediction mode subset of the current block.

[0147] On the other hand, if there are multiple intra-prediction mode subsets with the same value for the final occurrence count that is not 0, then, similar to the embodiment described with reference to Figure 19, the occurrence count in the surrounding block in the first step is given priority, or one of the intra-prediction mode subsets is selected based on the pattern of the current block.

[0148] Next, in the embodiment shown in Figure 21, if each intra-prediction mode subset includes a shared intra-prediction mode, it becomes impossible to identify the intra-prediction mode subset using only the intra-prediction mode information of the surrounding block due to the shared intra-prediction mode. In other words, if the intra-prediction mode of the surrounding block is one of the shared intra-prediction modes, it becomes impossible to derive the intra-prediction mode subset of the surrounding block. Therefore, an index for the intra-prediction mode subset of the current block should be signaled separately, and the intra-prediction mode subset information of the current block should be stored.

[0149] In the situation described above, according to one embodiment, it is not necessary to separately signal the index of the intra-prediction mode subset of the current block. As the number of intra-prediction mode subsets increases, the number of separate entries required to represent the index information of the intra-prediction mode subsets increases, so the intra-prediction mode subset information of surrounding blocks that have a shared intra-prediction mode is determined according to a pre-set rule. For example, if a shared intra-prediction mode is used in a surrounding block, the basic subset is determined as the intra-prediction mode subset of that surrounding block. Alternatively, the intra-prediction mode subset is determined according to the type of shared intra-prediction mode of the block in question. For example, if the shared intra-prediction mode used in a surrounding block is the vertical mode, a subset containing many angular modes close to the vertical mode is determined as the intra-prediction mode subset of that surrounding block. Also, if the shared intra-prediction mode used in a surrounding block is the horizontal mode, a subset containing many prediction modes close to the horizontal mode is determined as the intra-prediction mode subset of that surrounding block.

[0150] Once the intra-predictive mode subset for the current block is determined, the MPM list and non-MPM modes for the current block are constructed, prioritizing consideration within that intra-predictive mode subset.

[0151] According to one embodiment, the MPM list is configured based on the position of the surrounding blocks with a predetermined priority and / or the intra-prediction mode with a predetermined priority. The prediction modes of surrounding blocks having the same intra-prediction mode subset as the current block are added to the MPM list in the order of left block, upper block, lower left block, upper right block, and upper left block. Furthermore, if the intra-prediction mode subset of the current block includes planar mode and DC mode, these intra-prediction modes are given priority over angular mode. However, if the intra-prediction mode subset includes a shared intra-prediction mode, and the intra-prediction mode of a surrounding block having a different intra-prediction mode subset from the current block is one of the shared intra-prediction modes, then the intra-prediction mode of that surrounding block is added to the current block's MPM list according to the predetermined priority. For example, if the shared intra-prediction modes are {planar mode, DC mode, HDIA mode, HOR mode, DIA mode, VER mode, VDIA mode}, and the intra-prediction mode subset of the left block is different from that of the current block, then if the intra-prediction mode of the left block is one of the shared intra-prediction modes, that intra-prediction mode will be included in the MPM list of the current block.

[0152] In other embodiments, the MPM list is constructed based on the pattern of the current block and the patterns of the surrounding blocks. If the current block is a vertical block, the intra-prediction modes of the upper block, upper right block, and upper left block that have the same intra-prediction mode subset as the current block are given higher priority, and vertical modes or angular modes close to vertical modes within the current intra-prediction mode subset are preferentially added to the MPM list. In yet another embodiment, based on the frequency calculation method described with reference to Figure 19, at least one of the MPM list, selected mode list, or non-selected modes is constructed by considering the frequency count of the prediction modes included in the intra-prediction mode subset of the current block from the prediction modes of the surrounding blocks in the first step and the prediction modes of the surrounding blocks in the second step of the current block.

[0153] In this way, by dividing N prediction modes into M intra-prediction mode subsets and utilizing the intra-prediction mode subset information of surrounding blocks to determine the intra-prediction mode subset of the current block, an optimal prediction mode list is constructed from which unnecessary intra-prediction modes for the current block are removed. Therefore, the probability that the intra-prediction mode of the current block matches an intra-prediction mode in the MPM list increases, and the amount of bits required for intra-prediction mode signaling is reduced.

[0154] Figure 23 shows a detailed example of signaling the intra-prediction mode of the current block using a subset of classified intra-prediction modes. In the example in Figure 23, it is assumed that the intra-prediction mode subset consists of exclusive intra-prediction modes. More specifically, the 67 intra-prediction modes of the intra-prediction mode subset are classified into two subsets consisting of exclusive intra-prediction modes. The two intra-prediction mode subsets each consist of 35 exclusive intra-prediction modes and 32 exclusive intra-prediction modes. For example, the first subset consists of {planar mode, DC mode, 33 basic angle modes}, and the second subset consists of {32 extended angle modes}. Alternatively, the intra-prediction modes are divided into a horizontal mode set {planar mode, DC mode, mode 2, mode 3, ..., mode 34} and a vertical mode set {mode 35, mode 36, ..., mode 66}.

[0155] If the intra-prediction modes are classified into two subsets, the number of MPM modes, selection modes, and non-selection modes to be signaled is adjusted. That is, four MPM modes, eight selection modes, and 23 (or 20) non-selection modes are used to signal intra-prediction for the current block. Figure 23(a) shows an example of signaling each flag and index for intra-prediction for the current block, and Figure 23(b) shows an example of non-selection mode indices signaled to truncated binomial binary evolution.

[0156] If the current block's intra-prediction mode exists in the MPM list, the MPM flag and MPM index are signaled. In this case, the MPM flag is signaled with 1 bit, and the MPM index is coded using truncated binary code and signaled with 1 to 3 bits. The binary-coded MPM index is then encoded via CABAC. On the other hand, if the current block's intra-prediction mode does not exist in the MPM list, the MPM flag is set to 0, and the intra-prediction mode is encoded using the selected mode and non-selected mode. If the intra-prediction mode matches one of the eight selected modes, the MPM flag, selected mode flag, and selected mode index are signaled. In this case, the MPM flag and selected mode flag are signaled with 1 bit, and the selected mode index is signaled with a fixed 3 bits.

[0157] For the remaining non-selected modes, the MPM flag, selected mode flag, and non-selected mode index are signaled. In this case, the non-selected mode index is coded and signaled using truncated binomial-to-binary coding. If the first subset containing 35 intra-predictive modes is used for the current block, there are 23 non-selected modes in that subset. To satisfy 2^4 < 23 < 2^5, the indices of the top 9 non-selected modes are signaled with 4 bits, and the indices of the bottom 14 modes are signaled with 5 bits. However, if the second subset containing 32 intra-predictive modes is used for the current block, there are 20 non-selected modes in that subset. To satisfy 2^4 < 20 < 2^5, the indices of the top 12 non-selected modes are signaled with 4 bits, and the indices of the bottom 8 modes are signaled with 5 bits.

[0158] Figure 24 shows an example of dynamically signaling the intra-prediction mode of the current block based on prediction information from surrounding blocks. More specifically, according to the example in Figure 24, the configuration of the MPM mode is changed under various conditions. Figure 24(a) shows how to change the MPM configuration depending on the type of picture to which the current block belongs. Figures 24(b) and 24(c) show how to variably configure the MPM mode depending on the intra-prediction mode used in surrounding blocks.

[0159] First, Figure 24(a) shows a method for changing the MPM configuration according to the type of picture to which the current block belongs, according to one embodiment of the present invention. Conventional configurations such as MPM mode, non-MPM mode, and non-selection mode are applied equally regardless of the type of picture to which the block belongs (i.e., I-picture, P-picture, or P-picture). However, according to one embodiment of the present invention, as shown in Figure 24(a), the MPM configuration method for P-pictures and B-pictures, to which surrounding blocks can freely perform inter-prediction and intra-prediction, may be applied differently from the MPM configuration method for I-pictures, to which surrounding blocks perform only intra-prediction. For example, the number of MPM modes in P-pictures and B-pictures is set to be different from the number of MPM modes in I-pictures. That is, the number of MPM modes in P-pictures and B-pictures is set to a value smaller than the number of MPM modes in I-pictures.

[0160] Next, FIG. 24(b) shows an embodiment of the present invention that variably configures the MPM mode according to the intra prediction mode used in the peripheral blocks. If the current tile (or slice) is a P tile (or slice) or a B tile (or slice), the decoder searches for the prediction mode used at the position of the peripheral blocks. At this time, the number of positions confirmed as intra prediction blocks among all search positions (e.g., L, A, BL, AR, and AL) of the peripheral blocks is indicated as m1. Also, the number of different intra prediction modes used for intra prediction at all search positions of the peripheral blocks is indicated as m2. For example, if all search positions of the peripheral blocks are confirmed as intra prediction blocks, m1 has a large value, but if the intra prediction modes used at each position are all the same, m2 is set to 1. According to an embodiment of the present invention, the following variable MPM mode signaling method is applied based on the values of m1 and / or m2. In each embodiment, Th1, Th2, and Th3 represent a first threshold value, a second threshold value, and a third threshold value, respectively. At this time, Th1 < Th2 < Th3 is satisfied.

[0161] 1) If the value of m1 is less than or equal to Th1, the first MPM mode signaling method is applied. If the number of intra prediction blocks at the position of the peripheral blocks is less than or equal to Th1, the context of the intra prediction mode used at the position of the peripheral blocks or a mode derived therefrom (e.g., applied to an offset preset for the angular mode) may have no relation with the current block. That is, since the peripheral blocks are likely to be mostly inter prediction blocks, the intra prediction of the current block may have low correlation with the peripheral blocks. In this case, it is appropriate for the MPM mode to signal m intra prediction modes extracted from a number of contexts with an equal overhead. Therefore, fixed-length coding is applied to the MPM mode.

[0162] 2) If the value of m1 is greater than Th1 but less than or equal to Th2, the second MPM mode signaling method is applied. If the number of intra-prediction blocks at the location of the surrounding block is greater than Th1, the context of the intra-prediction mode used at the location of the surrounding block or the mode derived therefrom must be considered differentially. In other words, because there are surrounding blocks where intra-prediction has been performed, the signaling of the current block's intra-prediction mode is constructed based on the surrounding intra-prediction blocks, but differential signaling that takes their locations into account is necessary. In this case, it is appropriate for the MPM mode to signal m intra-prediction modes extracted in a context that sequentially considers the intra-prediction mode used in the surrounding block and the mode derived therefrom, with differential overhead. Therefore, the MPM mode is signaled using truncated unary binary evolution.

[0163] 3) If the value of m1 is greater than Th2 but the value of m2 is less than Th3, the third MPM mode signaling method is applied. This is because the number of intra-prediction blocks at the location of the surrounding block is greater than Th2, but the diversity of the intra-prediction modes used is not large, so the context of the intra-prediction modes of the surrounding block or modes derived therefrom must be considered differentially. In this case, the MPM mode signaling method is the same as the second method described above.

[0164] 4) If the value of m1 is greater than Th2 and the value of m2 is also greater than Th3, the fourth MPM mode signaling method is applied. If the number of intra-prediction blocks at the location of a surrounding block is greater than Th2, it means that there is a large diversity of intra-prediction modes used, and therefore it is necessary to equally consider the context of the intra-prediction modes of the surrounding blocks or modes derived therefrom, and signal the maximum value via the MPM mode. In other words, although there are many surrounding blocks where intra-prediction has been performed, a large number of different intra-prediction modes are used in the block in question, so the intra-prediction of the current block requires non-differentiated signaling that considers all of the surrounding intra-prediction blocks. In this case, it is appropriate for the MPM mode to signal the m intra-prediction modes extracted in the context of considering the intra-prediction modes used in the surrounding blocks and modes derived therefrom, with equal overhead. Therefore, fixed-length coding is applied to the MPM mode.

[0165] In the above method, the number m of modes signaled in MPM mode is determined based on the derived values ​​of m1 and m2. Furthermore, the number s of selected modes, the number ns of non-selected modes, and their coding methods are determined based on the determined value of m. According to one embodiment, fixed-length coding is applied to the selected modes, and it is appropriate that these modes are responsible for signaling the subsequent s intra-prediction modes, which are set based on the number m of MPM modes.

[0166] Figure 24(c) shows another embodiment of the present invention in which the MPM mode is variably configured according to the intra-prediction mode used in the surrounding block. As described above in the embodiment of Figure 24(b), the surrounding block indicates m2 as the number of different intra-prediction modes used for intra-prediction at all search locations. According to another embodiment of the present invention, the following variable MPM mode signaling method is applied based on the value of m2.

[0167] 5) If the value of m2 is less than or equal to Th1, the fifth MPM mode signaling method is applied. If the number of intra-prediction blocks at the location of the surrounding block is less than or equal to Th1, m is set to a small number, appropriately reflecting the context of the intra-prediction mode used at the location of the surrounding block or the mode derived therefrom. If there are few different intra-prediction modes in the surrounding block, even if this is expanded to fill the number of MPM modes, the derived mode is likely to be different from the prediction mode of the current block. In this case, a small number of m MPM modes extracted from a single or small number of contexts are used, and it is appropriate to signal the MPM modes with equal overhead. Therefore, fixed-length coding is applied to the MPM modes.

[0168] 6) If the value of m2 is greater than Th1 but less than or equal to Th2, the sixth MPM mode signaling method is applied. If the number of intra-prediction blocks at the location of the surrounding block is greater than a certain number, the context of the intra-prediction mode used at the location of the surrounding block or the mode derived therefrom must be considered differentially. A specific embodiment of the sixth MPM mode signaling method is the same as that of the second MPM mode signaling method described above.

[0169] 7) If the value of m2 is greater than Th2, the seventh MPM mode signaling method is applied. If the number of intra-prediction blocks at the location of the surrounding block is greater than Th2, it means that there is a large diversity of intra-prediction modes used, and therefore it is necessary to equally consider the context of the intra-prediction modes of the surrounding blocks or modes derived therefrom, and signal the maximum value via the MPM mode. A specific example of the seventh MPM mode signaling method is the same as the fourth MPM mode signaling method described above.

[0170] In the above method, the number m of modes signaled in MPM mode is determined based on the derived value of m2. Furthermore, the number s of selected modes, the number ns of non-selected modes, and their encoding methods are determined based on the determined value of m. According to one embodiment, fixed-length coding is applied to the selected modes, and it is appropriate that these modes are responsible for signaling the subsequent s intra-prediction modes, which are set based on the number m of MPM modes.

[0171] Figure 25 shows an example in which the number of MPM modes is variably adjusted and the intra-predictive mode of the current block is signaled based on this. As described in Figure 24, a small number of MPM modes are used by the MPM mode signaling method.

[0172] Referring to Figure 25(a), the number of MPM modes is not fixed but varies based on the intra-prediction mode information of the surrounding block. Two of the 67 total intra-prediction modes are set as MPM modes and signaled using fixed-length coding. The fixed-length coding scheme gives equal priority to the modes to be signaled. Next, the number of selected modes s is determined to be 16 or 9, and the selected modes are signaled using fixed-length coding. In this case, a relatively small number of MPM modes are signaled, so according to the embodiment in Figure 25(a), the number of selected modes (i.e., 16) is increased to increase the probability that intra-prediction modes not signaled as MPM modes will be signaled as selected modes. However, if signaling is performed using selected modes, the signaling overhead is the same as the conventional method using a fixed number of MPM modes, so according to the embodiment in Figure 25(b), the number of selected modes (i.e., 9) can be reduced to reduce the overall overhead.

[0173] However, in embodiments where the number of selection modes is reduced, signaling non-selection modes increases signaling overhead. In the embodiment of Figure 25(b) with 9 selection modes, 56 non-selection modes, which are more than in the embodiment of Figure 25(a) with 16 selection modes, should be truncated and signaled using binary-based signaling. In this case, since 2^5 < 56 < 2^6, the initial 2^6 - 56 = 8 indices of the non-selection modes are signaled using only 5 bits, and the remaining 48 indices are signaled using 6 bits. Thus, it can be seen that the signaling overhead of the non-selection modes in Figure 25(b) has increased compared to the non-selection modes in Figure 25(a), where 15 indices are signaled using 5 bits and 34 indices are signaled using 6 bits.

[0174] In the above embodiment, the number m of intra-predictive modes signaled in MPM mode is determined based on the method described above, with reference to Figure 24. The number s of selected modes is determined based on the determined value of m. The number s of selected modes is further determined based on the following conditions.

[0175] First, the number of selection modes is determined based on the value and context of the intra-prediction mode determined in the MPM mode. If the intra-prediction modes of surrounding blocks are reflected when determining the MPM mode, there is a high probability that the current block's intra-prediction mode will be signaled via the MPM mode or a selection mode derived from it. Therefore, further intra-prediction modes derived from the MPM mode are obtained, and these further intra-prediction modes are signaled by configuring a relatively small number of selection modes. In this way, signaling overhead can be reduced by limiting the number of selection modes. However, if the MPM list is constructed using basic angle modes such as planar mode, DC mode, VER mode, and HOR mode without reflecting the intra-prediction modes of surrounding blocks when determining the MPM mode, a relatively large number of selection modes will be configured and signaled. Since the MPM list consists of contexts unrelated to surrounding blocks, the number of selection modes is maximized to increase the probability that the current block's intra-prediction mode is included in the selection modes. On the other hand, the number of non-selective modes, ns, is determined by subtracting the number of MPM modes, m, and the number of selected modes, s, from the total number of intra-predictive modes, T.

[0176] The embodiments of the present invention described above can be embodied through a variety of means. For example, embodiments of the present invention can be embodied through hardware, firmware, software, or a combination thereof.

[0177] In the case of hardware implementation, the method according to the embodiment of the present invention is 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.

[0178] In the case of implementation by firmware or software, the method according to the embodiment of the present invention is implemented in the form of a module, procedure, or function that performs the functions or operations described above. The software code is stored in memory and implemented by a processor. The memory is located inside or outside the processor and exchanges data with the processor by various already known means.

[0179] The above description of the present invention is illustrative, and a person with ordinary skill in the art to which the invention pertains should understand that it can be easily modified into other specific forms without altering the technical idea or essential features of the invention. Therefore, the above embodiments should be understood to be illustrative and not limiting in all respects. For example, each component described as a single type may be implemented in a distributed manner, and similarly, components described as distributed may be implemented in a combined manner.

[0180] The scope of the present invention is indicated by the claims described below rather than by the detailed description above, and all modifications or altered forms derived from the meaning and scope of the claims and the concept of equivalents thereto should be interpreted as being included within the scope of the present invention. [Explanation of symbols]

[0181] 110 Conversion Unit 115 Quantization section 120 Inverse quantization section 125 Inverse Transform Section 150 Prediction Section 152 Intra Prediction Unit 154 Interpretation Unit 154a Motion Estimation Unit 154b Motion compensation unit 160 Entropy coding section 210 Entropy Decoding Unit 220 Inverse quantization section 225 Inverse Transform Section 230 Filtering section 250 Prediction Section 252 Intra Prediction Unit 254 Interpretation Unit

Claims

1. A method for processing a video signal, wherein the method is A step of receiving intra-prediction mode information for the current block, wherein the intra-prediction mode information indicates one of a plurality of intra-prediction modes included in an intra-prediction mode set, the intra-prediction mode set includes a plurality of angle modes, the plurality of angle modes include a basic angle mode and an extended angle mode, and the basic angle mode is a mode corresponding to an angle within a preset first angle range, A step of determining whether to use the extended angle mode based on at least one of the current block shape and size, When using the extended angle mode, the step of determining the extended angle mode based on the sum of the index of the basic angle mode determined using the intra-prediction mode information and a predetermined offset, wherein the sum of the index of the basic angle mode determined using the intra-prediction mode information and the predetermined offset represents the extended angle mode, and The step of decoding the current block based on the determined extended angle mode, The extended angle mode indicates a wide-angle direction outside the preset first angle range. The aforementioned current block is one of the blocks that were divided from the parent block. method.

2. A video signal processing device including a processor, The aforementioned processor, The process involves receiving intra-prediction mode information for the current block, wherein the intra-prediction mode information indicates one of a plurality of intra-prediction modes constituting an intra-prediction mode set, the intra-prediction mode set includes a plurality of angle modes, the plurality of angle modes include a basic angle mode and an extended angle mode, and the basic angle mode is a mode corresponding to an angle within a preset first angle range. Based on at least one of the current block shape and size, it is determined whether to use the extended angle mode. When using the extended angle mode, the extended angle mode is determined based on the sum of the index of the basic angle mode determined using the intra-prediction mode information and a predetermined offset, wherein the sum of the index of the basic angle mode determined using the intra-prediction mode information and the predetermined offset represents the extended angle mode. It is configured to decode the current block based on the determined extended angle mode, The extended angle mode indicates a wide-angle direction outside the preset first angle range. The aforementioned current block is one of the blocks that were divided from the parent block. Video signal processing equipment.

3. A video signal encoding device including a processor, The aforementioned processor, The process involves determining intra-prediction mode information for the current block, wherein the intra-prediction mode information indicates one of a plurality of intra-prediction modes constituting an intra-prediction mode set, the intra-prediction mode set includes a plurality of angle modes, the plurality of angle modes include a basic angle mode and an extended angle mode, the basic angle mode is a mode corresponding to an angle within a preset first angle range, the sum of the index of the basic angle mode corresponding to the extended angle mode and a preset offset represents the extended angle mode, and whether or not to use the extended angle mode is determined based on at least one of the shape and size of the current block. It is configured to generate a bitstream containing the aforementioned intra-prediction mode information, The extended angle mode indicates a wide-angle direction outside the preset first angle range. The aforementioned current block is one of the blocks that were divided from the parent block. Video signal encoding equipment.

4. A method for transmitting a bitstream generated by the video signal encoding device described in claim 3.