Video signal processing method and device
The method improves video signal processing efficiency by using extended angle modes based on base angle modes for intra prediction, addressing inefficiencies in current block prediction and signaling, thereby enhancing coding efficiency and reducing overhead.
Patent Information
- Application Number
- JP2025120181
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2018-03-09
- Filing Date
- 2025-07-17
- Publication Date
- 2025-09-11
- Estimated Expiration
- 2038-10-24
AI Technical Summary
Existing video signal processing methods lack efficiency in coding and signaling when predicting current blocks using prediction information of neighboring blocks.
A video signal processing method and device that includes signaling an extended angle mode based on a base angle mode for intra prediction, where the extended angle mode is determined based on the base angle mode and used depending on the shape and size of the current block, and the angular intervals between extension angular modes match those of the base angular modes, with signaling overhead minimized by managing prediction mode lists.
Enhances coding efficiency and minimizes signaling overhead by allowing for various extensions in prediction methods while optimizing intra prediction mode signaling.
Smart Images

Figure 2025134042000001_ABST
Abstract
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 a communication line or storing it in a form suitable for a storage medium. Compression coding can be used to encode audio, video, text, and other data, but video compression is the technology that specifically encodes video. Video signal compression is performed by removing redundant information by taking into account spatial correlation, temporal correlation, and stochastic correlation. However, with the recent development of various media and data transmission media, more efficient video signal processing methods and devices are needed. Summary of the Invention [Problem to be solved by the invention]
[0003] The present invention has the object to increase the coding efficiency of video signals.
[0004] Another object of the present invention is to improve signaling efficiency when predicting a current block using prediction information of neighboring blocks. [Means for solving the problem]
[0005] In order to solve the above problems, the present invention provides a video signal processing device and a video signal processing method as follows.
[0006] First, according to an embodiment of the present invention, a video signal processing method is provided, comprising the steps of: receiving intra prediction mode information for a 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, wherein the intra prediction mode set includes a plurality of angle modes, the plurality of angle modes including a base angle mode and an extended angle mode, and the extended angle mode is signaled based on the base angle mode.
[0007] Also, according to an embodiment of the present invention, a video signal processing device is provided, which includes a processor, in which the processor receives intra prediction mode information for a current block, the intra prediction mode information indicating one of a plurality of intra prediction modes constituting an intra prediction mode set, and decodes 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 base angle mode and an extended angle mode, and the extended angle mode is signaled based on the base angle mode.
[0008] The basic angle mode is a mode corresponding to an angle 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 an intra prediction mode index corresponding to the replaced basic angle mode signals the wide angle mode.
[0011] The extended angular modes are angular modes between the basic angular modes within the first angular range.
[0012] The spacing between the extension angular modes of the intra-prediction mode set is set based on the spacing between the corresponding base angular modes.
[0013] The angular intervals between the expansion angular modes are set to be the same as the angular intervals between the corresponding basic angular modes.
[0014] Whether the extended angle mode is available is determined based on at least one of the shape and size of the current block.
[0015] In the intra prediction mode set, the number of extension angle modes is set to be equal to or less than the number of basic angle modes. [Effects of the Invention]
[0016] According to an embodiment of the present invention, the coding efficiency of a video signal is increased.
[0017] Furthermore, according to the embodiment of the present invention, the prediction method for the current block can be variously extended, and the signaling overhead due to such extension can be minimized. [Brief explanation of the drawings]
[0018] [Figure 1] 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention; [Figure 2] 1 is a schematic block diagram of a video signal decoding device according to an embodiment of the present invention; [Figure 3] FIG. 1 illustrates an example of how coding tree units are divided into coding units within a picture. [Figure 4] FIG. 1 illustrates an embodiment of a method for signaling the splitting of quadtrees and multi-type trees. [Figure 5] 10A and 10B are diagrams illustrating an example of reference samples used to predict a current block in intra-prediction mode. [Figure 6] FIG. 10 is a diagram illustrating an example of a prediction mode used in intra prediction. [Figure 7] FIG. 1 illustrates an example of a method for signaling an intra-prediction mode selected by an encoder to a decoder. [Figure 8] FIG. 10 illustrates a detailed example of a method for signaling intra-prediction modes. [Figure 9] FIG. 10 illustrates an example of a context condition applied to an intra-prediction mode. [Figure 10] FIG. 10 is a diagram illustrating another example of a context condition applied to an intra-prediction mode. [Figure 11] 10 is a diagram illustrating yet another embodiment of a context condition applied to an intra-prediction mode. [Figure 12] 10A and 10B are diagrams illustrating an example of referencing neighboring blocks for intra-prediction of a current block. [Figure 13] 10A and 10B are diagrams illustrating another example of referring to neighboring blocks for intra prediction of a current block. [Figure 14] FIG. 10 is a diagram illustrating an example of referring to the MPM list of a neighboring block for intra prediction of a current block. [Figure 15] 10 is a diagram illustrating an embodiment in which the patterns and / or sizes of a current block and neighboring blocks are considered for intra prediction of the current block. [Figure 16] 10 illustrates an extended embodiment in which prediction information of a current block is obtained by referring to prediction information of neighboring blocks. [Figure 17] 10 illustrates an extended embodiment in which prediction information of a current block is obtained by referring to prediction information of neighboring blocks. [Figure 18] 10 illustrates an extended embodiment in which prediction information of a current block is obtained by referring to prediction information of neighboring blocks. [Figure 19] FIG. 10 is a diagram illustrating an example of setting the priority of intra prediction modes based on the frequency of occurrence of the intra prediction modes of surrounding blocks. [Figure 20]FIG. 10 illustrates an example of classifying intra-prediction modes into subsets. [Figure 21] FIG. 10 illustrates an example of classifying intra-prediction modes into subsets. [Figure 22] 10 illustrates an example of signaling the intra-prediction mode of a current block using a subset of classified intra-prediction modes. [Figure 23] 10 illustrates a detailed embodiment of signaling the intra-prediction mode of a current block using a subset of classified intra-prediction modes. [Figure 24] 10 illustrates an embodiment of dynamically signaling the intra-prediction mode of a current block based on prediction information of surrounding blocks. [Figure 25] 10 illustrates an embodiment in which the number of MPM modes is variably adjusted and the intra prediction mode of the current block is signaled based on the adjusted number of MPM modes. DETAILED DESCRIPTION OF THE INVENTION
[0019] The terms used in this specification have been selected as widely used and general terms as possible, taking into consideration the functions of the present invention, but these may vary depending on the intentions of engineers in the field, customs, or the emergence of new technologies. In addition, in certain cases, the applicant may have arbitrarily selected terms, and in such cases, the meanings of these terms will be described in the relevant section on the mode for carrying out the invention. Therefore, it is made clear that the terms used in this specification should be interpreted not simply as terms, but based on the substantive meanings of the terms and the overall content of this specification.
[0020] In this specification, some terms may be interpreted as follows: "Coding" may be interpreted as "Encoding" or "Decoding" in some cases. In this specification, an apparatus that encodes a video signal to generate a video signal bitstream is referred to as an encoding apparatus or encoder, and an apparatus that decodes a video signal bitstream to restore a video signal is referred to as a decoding apparatus or decoder. In this specification, "video signal processing apparatus" is used as a conceptual term that includes both an encoder and a decoder. "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 interchangeably to refer to a basic unit of image processing or a specific position in a picture, and refers to an image area including both luma and chroma components. "Block" refers to an image area including specific components of luma and chroma components (i.e., Cb and Cr). However, depending on the embodiment, terms such as "unit," "block," "partition," and "area" may be used interchangeably. In this specification, the term "unit" is used as a concept including a coding unit, a prediction unit, and a transform unit, and the term "picture" refers to a field or a frame, and these terms may be used interchangeably depending on the embodiment.
[0021] 1 is a schematic block diagram of a video signal encoding apparatus according to an embodiment of the present invention. Referring to FIG. 1, the encoding apparatus 100 includes a transform unit 110, a quantization unit 115, an inverse quantization unit 120, an inverse transform unit 125, a filtering unit 130, a prediction unit 150, and an entropy coding unit 160.
[0022] The transform unit 110 transforms a residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit 150, to obtain transform coefficient values. For example, a discrete cosine transform (DCT), a discrete sine transform (DST), or a wavelet transform may be used. The discrete cosine transform and discrete sine transform divide the input picture signal into blocks and then perform the transform. During the transform, coding efficiency may vary depending on the distribution and characteristics within the transform domain. The quantization unit 115 quantizes the transform coefficient values output from the transform unit 110.
[0023] To improve coding efficiency, instead of directly coding the picture signal, the prediction unit 150 predicts a picture using a pre-coded region and adds the residual value between the original picture and the predicted picture to obtain a reconstructed picture. To avoid mismatch between the encoder and decoder, the encoder should use information available to the decoder when making predictions. To achieve this, the encoder performs a process of further reconstructing the coded current block. The inverse quantization unit 120 inversely quantizes the transform coefficient values, and the inverse transform unit 125 reconstructs the residual value using the inversely quantized transform coefficient values. Meanwhile, the filtering unit 130 performs filtering operations to improve the quality of the reconstructed picture and the coding efficiency. Examples of filtering operations include a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter. 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, and 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 reconstructed samples within the current picture and transmits intra coding information to the entropy coding unit 160. The intra coding information includes at least one of an intra prediction mode, a Most Probable Mode (MPM) flag, and an MPM index. The inter prediction unit 154 includes a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains a motion vector value for the current region by referring to a specific region of the reconstructed reference signal picture. The motion estimation unit 154a transmits motion information for the reference region (reference picture index, motion vector information) to the entropy coding unit 160. The motion compensation unit 154b performs motion compensation using the motion vector values received from the motion compensation unit 154a. The inter prediction unit 154 transmits inter coding information including motion information for the reference region to the entropy coding unit 160.
[0025] After the picture prediction is performed, the transform unit 110 converts residual values between the original picture and the predicted picture to obtain transform coefficient values. The transform is performed in units of specific blocks within the picture, and the size of the specific blocks varies within a predetermined range. The quantization unit 115 quantizes the transform coefficient values generated by the transform unit 110 and transmits the quantized values to the entropy coding unit 160.
[0026] The entropy coding unit 160 generates a video signal bitstream by entropy coding the quantized transform coefficients, intra-coded information, and inter-coded information. The entropy coding unit 160 uses a variable length coding (VLC) scheme and an arithmetic coding scheme. The VLC scheme converts input symbols into successive codewords, where the length of the codewords is variable. For example, frequently occurring symbols are represented by short codewords, and infrequently occurring symbols are represented by long codewords. Context-based adaptive variable length coding (CAVLC) is used as the variable length coding scheme. Arithmetic coding converts successive data symbols into a single prime number, and arithmetic coding obtains the optimal prime number bits required to represent each symbol. Context-based adaptive binary arithmetic coding (CABAC) is used as the arithmetic coding scheme.
[0027] The generated bitstream is encapsulated in Network Abstraction Layer (NAL) units as basic units. An NAL unit includes an integer number of coded coding tree units. In order for a video decoder to decode the bitstream, the bitstream must first be separated into NAL units and then each separated NAL unit must be decoded. Meanwhile, information required for decoding the video signal bitstream is transmitted via Raw Byte Sequence Payload (RBSP) of higher level sets such as a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), and a Video Parameter Set (VPS).
[0028] 1 illustrates an encoding device 100 according to one embodiment of the present invention, with separate blocks illustrating logically distinct elements of encoding device 100. Therefore, the elements of encoding device 100 described above may be implemented on a single chip or multiple chips depending on the device design. According to one embodiment, the operation of each element of encoding device 100 described above is performed by a processor (not shown).
[0029] 2 is a schematic block diagram of a video signal decoding apparatus 200 according to an embodiment of the present invention. Referring to FIG. 2, the decoding apparatus 200 of the present invention includes an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 225, a filtering unit 230, and a prediction unit 250.
[0030] The entropy decoding unit 210 entropy codes the video signal bitstream and extracts transform coefficients, intra-coding information, inter-coding information, etc. for each region. The inverse quantization unit 220 inverse quantizes the entropy-decoded transform coefficients, and the inverse transform unit 225 restores residual values using the inverse quantized transform coefficients. The video signal processing device 200 restores original pixel values by combining the residual values obtained from the inverse transform unit 225 with predicted values obtained from the prediction unit 250.
[0031] Meanwhile, the filtering unit 230 performs filtering on the picture to improve image quality. This includes a deblocking filter to reduce block distortion and / or an adaptive loop filter to remove distortion from the entire picture. The filtered picture is output or stored in the 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 predicted picture using the coding type, transform coefficients for each region, intra / inter coding information, etc. decoded by the entropy decoding unit 210. To reconstruct the current block to be decoded, the current picture including the current block or a decoded region of another picture 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). Among inter-pictures (or tiles / slices), a picture (or tile / slice) that uses up to one motion vector and reference picture index to predict sample values of each block is called a predictive picture or P picture (or tile / slice), and a picture (or tile / slice) that uses up to two motion vectors and reference picture indexes is called a bi-predictive picture or B picture (or tile / slice). That is, a P picture (or tile / slice) uses up to one motion information set to predict each block, and a B picture (or tile / slice) uses up to two motion information sets to predict each block. Here, a motion information set includes one or more motion vectors and one reference picture index.
[0033] The intra prediction unit 252 generates a predicted block using intra coding information and reconstructed samples in the current picture. As described above, the intra coding information includes at least one of an intra prediction mode, an MPM flag, and an MPM index. The intra prediction unit 252 predicts pixel values of the current block using reconstructed pixels located to the left and / or above the current block as reference pixels. According to one embodiment, the reference pixels are pixels adjacent to the left boundary and / or the top boundary of the current block. According to another embodiment, the reference pixels are pixels of neighboring blocks of the current block that are adjacent to the left boundary of the current block within a predetermined distance and / or adjacent to the top boundary of the current block within a predetermined distance. In this case, the neighboring blocks of the current block include at least one of a left (L) block, an upper (A) block, a below left (BL) block, an above right (AR) block, or an above left (AL) block adjacent to the current block.
[0034] The inter prediction unit 254 generates a prediction block using the reference picture and inter coding information stored in the composite picture buffer 256. The inter coding information includes motion information (e.g., reference picture index, motion vector) of the current block relative to the reference block. Inter prediction includes L0 prediction, L1 prediction, and bi-prediction. L0 prediction is prediction using one reference picture included in the L0 picture list, and L1 prediction is prediction using one reference picture included in the L1 picture list. This requires one set of motion information (e.g., motion vector and reference picture index). The bi-prediction method uses up to two reference regions, and these two reference regions may exist in the same reference picture or in different pictures. That is, the bi-prediction method uses up to two sets of motion information (e.g., motion vector and reference picture index), and two motion vectors may correspond to the same reference picture index or different reference picture indexes. In this case, the reference picture is displayed (or output) either before or after the current picture in terms of time.
[0035] The inter prediction unit 254 obtains a current reference block using a motion vector and a reference picture index. The reference block exists in a reference picture corresponding to the reference picture index. Furthermore, pixel values of a block identified by the motion vector or their interpolated values are used as a predictor for the current block. For motion prediction with sub-pel pixel accuracy, for example, an 8-tab interpolation filter is used for the luma signal and a 4-tab interpolation filter is used for the chroma signal. However, the interpolation filters for sub-pel motion prediction are not limited thereto. In this way, the inter prediction unit 254 performs motion compensation, which predicts the texture of the current unit from a previously reconstructed picture using motion information.
[0036] A reconstructed 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 transform unit 225. That is, the video signal decoding apparatus 200 reconstructs the current block using the predicted block generated from the prediction unit 250 and the residual obtained from the inverse transform unit 225.
[0037] 2 shows a decoding device 200 according to one embodiment of the present invention, with separate blocks logically separating elements of the decoding device 200. Thus, the elements of the decoding device 200 described above may be implemented on a single chip or multiple chips depending on the device design. According to one embodiment, the operation of each element of the decoding device 200 described above is performed by a processor (not shown).
[0038] FIG. 3 illustrates an embodiment in which a coding tree unit (CTU) is divided into coding units (CUs) within a picture. During video signal coding, a picture is divided into a sequence of coding tree units (CTUs). A coding tree unit consists of an NXN block of luma samples and two blocks of corresponding chroma samples. The coding tree unit is then divided into multiple coding units. A coding unit refers to a basic unit for processing a picture during the above-mentioned video signal processing, i.e., intra / inter prediction, transform, quantization, and / or entropy coding. Within a picture, the size and shape of coding units are not constant. Coding units have a square or rectangular shape. A rectangular coding unit (or rectangular block) includes a vertical coding unit (or vertical block) and a horizontal coding unit (or horizontal block). In this specification, a vertical block is a block whose height is greater than its width, and a horizontal block is a block whose width is greater than its height. Although a non-square block refers to a rectangular block in this specification, the present invention is not limited thereto.
[0039] Referring to Figure 3, a coding tree unit is first divided into a quad tree (QT) structure. That is, in the quad tree structure, one node having a size of 2NX2N is divided into four nodes having a size of NXN. In this specification, a 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] Meanwhile, the leaf node of the above-mentioned quad tree is further divided into a multi-type tree (MTT) structure. According to an embodiment of the present invention, in the multi-type tree structure, one node is divided into a horizontally or vertically divided binary or ternary tree structure. That is, there are four division structures in the multi-type tree structure: vertical binary division, horizontal binary division, vertical ternary division, and horizontal ternary division. According to an embodiment of the present invention, in each of the tree structures, the width and height of the node are both powers of 2. For example, in a binary tree (BT) structure, a node of size 2NX2N is divided into two NX2N nodes by vertical binary division and into two 2NXN nodes by horizontal binary division. In addition, in a Ternary Tree (TT) structure, a node of size 2NX2N is divided into (N / 2)X2N, NX2N, and (N / 2)X2N nodes by vertical ternary division, and into 2NX(N / 2), 2NXN, and 2NX(N / 2) nodes by horizontal binary division. Such multi-type tree division is performed recursively.
[0041] The leaf nodes of a multi-type tree can be coding units. If the coding unit is not excessively large compared to the maximum transform length, it is used as a unit of prediction and transform without further division. Meanwhile, in the above-mentioned quad trees and multi-type trees, at least one of the following parameters is predefined or transmitted via the RBSP of a higher-level set such as a PPS, SPS, or VPS: 1) CTU size: the size of the root node of the quad tree; 2) minimum QT size (MinQtSize): the minimum allowed size of a QT leaf node; 3) maximum BT size (MaxBtSize): the maximum allowed size of a BT root node; 4) maximum TT size (MaxTtSize): the maximum allowed size of a TT root node; 5) maximum MTT depth (MaxMttDepth): the maximum allowed depth of MTT division from a QT leaf node; 6) maximum BT size (MinBtSize): the maximum allowed size of a BT leaf node; 7) minimum TT size (MinTtSize): the minimum allowed size of a TT leaf node.
[0042] 4 illustrates an embodiment of a method for signaling the splitting of a quad tree and a multi-type tree. To signal the splitting of the quad tree and the multi-type tree, preset flags are used. Referring to FIG. 4, at least one of a flag 'qt_split_flag' indicating whether a quad tree node is split, a flag 'mtt_split_flag' indicating whether a multi-type tree node is split, a flag 'mtt_split_vertical_flag' indicating the split direction of a multi-type tree node, and a flag 'mtt_split_binary_flag' indicating the split pattern of a multi-type tree node is used.
[0043] According to an embodiment of the present invention, a coding tree unit is the root node of a quad tree and is preferentially split into a quad tree structure. In the quad tree structure, a 'qt_split_flag' is signaled for each node 'QT_node'. If the 'qt_split_flag' value is 1, the corresponding node is split into four square nodes, and if the 'qt_split_flag' value is 0, the corresponding node becomes a leaf node 'QT_leaf_node' of the quad tree.
[0044] Each quad tree leaf node, QT_leaf_node, is further split into a multi-type tree structure. In the multi-type tree structure, mtt_split_flag is signaled for each node, MTT_node. If mtt_split_flag is set to 1, the node is split into multiple rectangular nodes; if mtt_split_flag is set to 0, the node becomes a leaf node, MTT_leaf_node, of the multi-type tree. If the multi-type tree node, MTT_node, is split into multiple rectangular nodes (i.e., if mtt_split_flag is set to 1), mtt_split_vertical_flag and mtt_split_binary_flag are also signaled for the node, MTT_node. If the value of "mtt_split_vertical_flag" is 1, the node "MTT_node" is split vertically, and if the value of "mtt_split_vertical_flag" is 0, the node "MTT_node" is 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] 5 and 6 are diagrams illustrating in more detail an intra prediction method according to an embodiment of the present invention. As described above, the intra prediction unit predicts pixel values of the current block using reconstructed pixels located to the left and / or above the current block as reference pixels.
[0046] First, FIG. 5 illustrates an example of reference samples used to predict a current block in intra prediction mode. According to one embodiment, the reference pixels are pixels adjacent to the left boundary and / or the top boundary of the current block. As shown in FIG. 5, if the size of the current block is W×H and pixels of a single reference line adjacent to the current block are used for intra prediction, the reference pixels are set using up to 2W+2H+1 adjacent pixels located to the left and / or top of the current block. Meanwhile, according to another embodiment of the present invention, pixels of multiple reference lines are used for intra prediction of the current block. The multiple reference lines consist of n lines located within a predetermined range from the current block. According to one embodiment, if pixels of multiple reference lines are used for intra prediction, separate index information indicating the lines to be set as reference pixels is signaled. If at least some of the neighboring pixels used as reference pixels have not yet been restored, the intra prediction unit performs a reference sample padding process according to a predetermined rule to obtain the reference pixels. In addition, the intra prediction unit performs a reference sample filtering process to reduce intra prediction errors. That is, the reference pixels are obtained by filtering the neighboring pixels and / or the pixels obtained by the reference sample padding process, and the intra prediction unit predicts the pixels of the current block using the reference pixels obtained in this manner.
[0047] Next, Figure 6 illustrates an example of prediction modes used in intra prediction. For intra prediction, intra prediction mode information indicating the intra prediction direction is signaled. The intra prediction mode indicates one of a plurality of intra prediction modes constituting an intra prediction mode set. If the current block is an intra prediction block, the decoder receives the intra prediction mode information of the current block from the bitstream. The intra prediction unit of the decoder performs intra prediction on 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 in intra prediction (e.g., a total of 67 intra prediction modes). More specifically, the intra prediction mode set includes a planar mode, a DC mode, and a plurality of (e.g., 65) angle modes (i.e., directional modes). Each intra prediction mode is indicated by a predetermined index (i.e., intra prediction mode index). For example, as shown in FIG. 6, intra prediction mode index 0 indicates the planar mode, and intra prediction mode index 1 indicates the DC mode. In addition, intra prediction mode indexes 2 to 66 indicate different angle modes. The angle modes indicate different angles within a predetermined angle range. For example, the angle modes indicate angles within an angle range of 45 degrees to -135 degrees clockwise (i.e., a first angle range). Here, the angle modes are defined based on the 12 o'clock direction. In this case, intra prediction mode index 2 indicates horizontal diagonal (HDIA) mode, intra prediction mode index 18 indicates horizontal (HOR) mode, intra prediction mode index 34 indicates diagonal (DIA) mode, intra prediction mode index 50 indicates vertical (VER) mode, and intra prediction mode index 66 indicates vertical diagonal (VDIA) mode.
[0049] Meanwhile, the preset angle ranges are set differently depending on the shape of the current block. For example, if the current block is a rectangular block, a wide-angle mode specifying an angle greater than 45 degrees or less than -135 degrees clockwise is also used. If the current block is a horizontal block, the angle mode specifies an angle within an angle range of (45 + offset1) degrees to (-135 + offset1) degrees clockwise (i.e., a second angle range). In this case, angle modes 67 to 76 outside the first angle range are also used. If the current block is a vertical block, the angle mode specifies an angle within an angle range of (45 - offset2) degrees to (-135 - offset2) degrees clockwise (i.e., a third angle range). In this case, angle modes -10 to -1 outside the first angle range are also used. According to an embodiment of the present invention, the values of offset1 and offset2 are determined differently depending on the ratio between the width and height of the rectangular block. In addition, offset1 and offset2 are positive numbers.
[0050] According to a further embodiment of the present invention, the plurality of angle modes constituting the intra prediction mode set includes a base angle mode and an extension angle mode, where the extension angle mode is determined based on the base angle mode.
[0051] According to one embodiment, the basic angle mode is a mode corresponding to an angle used in intra prediction of the existing High Efficiency Video Coding (HEVC) standard, and the extended angle mode is a mode corresponding to an angle newly added in 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}. That is, 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] According to another embodiment, the base angle mode is a mode corresponding to an angle within a predetermined first angle range, and the extension angle mode is a wide angle mode outside the first angle range. That is, the base angle mode is an angle mode corresponding to one of the intra prediction modes {2, 3, 4, ..., 66}, and the extension 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 extension angle mode is determined to be the angle opposite to the angle indicated by the corresponding base angle mode. Therefore, the angle indicated by the extension angle mode is determined based on the angle indicated by the base angle mode. However, the number of extension angle modes is not limited thereto, and additional extension angles may be defined depending on the size and / or shape of the current block. For example, the extension angle mode may be defined as an angle mode corresponding to one of the intra prediction modes {-14, -13, ..., -1} and {67, 68, ..., 80}. Meanwhile, the total number of intra prediction modes included in the intra prediction mode set varies depending on the configuration of the base angle mode and the extended angle mode.
[0053] In the above embodiment, the spacing between extension angle modes is set based on the spacing between corresponding basic angle modes. For example, the spacing between extension angle modes {3, 5, 7, ..., 65} is determined based on the spacing between corresponding basic angle modes {2, 4, 6, ..., 66}. The spacing between extension angle modes {-10, -9, ..., -1} is determined based on the spacing between corresponding opposite basic angle modes {56, 57, ..., 65}, and the spacing between extension angle modes {67, 68, ..., 76} is determined based on the spacing between corresponding opposite basic angle modes {3, 4, ..., 12}. The angular spacing between extension angle modes is set to be the same as the angular spacing between corresponding basic angle modes. The number of extension angle modes in the intra prediction mode set is set to be less than or equal to the number of basic angle modes.
[0054] According to an embodiment of the present invention, an extension angle mode is signaled based on a base angle mode. For example, a wide angle mode (i.e., an extension angle mode) replaces at least one angle mode (i.e., a base angle mode) within a first angle range. The replaced base angle mode is an angle mode corresponding to the opposite side of the wide angle mode. That is, the replaced base angle mode is an angle mode corresponding to an angle opposite to the angle indicated by the wide angle mode, or an angle that is offset from the opposite angle by a preset offset index. According to an embodiment of the present invention, the preset offset index is 1. An intra-prediction mode index corresponding to the replaced base angle mode is further mapped to a wide angle mode to signal the corresponding wide angle mode. For example, wide angle modes {-10, -9, ..., -1} are signaled by intra-prediction mode indexes {57, 58, ..., 66}, respectively, and wide angle modes {67, 68, ..., 76} are signaled by intra-prediction mode indexes {2, 3, ..., 11}, respectively. In this way, by using the intra prediction mode index for the base angular mode to signal the extension angular mode, even if the configurations of the angular modes used for intra prediction of each block are different, the same set of intra prediction mode indexes is used to signal the intra prediction mode, thereby minimizing signaling overhead due to changes in the intra prediction mode configuration.
[0055] Meanwhile, 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. According to one embodiment, if the size of the current block is larger than a predetermined size, the extended angle mode is used for intra prediction of the current block, and if not, only the basic angle mode is used for intra prediction of the current block. According to another embodiment, if the current block is a non-square block, the extended angle mode is used for intra prediction of the current block, and 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 reference pixels and / or interpolated reference pixels to be used for intra prediction of the current block based on intra prediction mode information of the current block. If the intra prediction mode index indicates a specific angle mode, 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. Thus, 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 restores pixel values of the current block by adding the residual signal of the current block obtained from the inverse transform unit to the intra predicted value of the current block.
[0057] 7 illustrates an embodiment of a method for signaling an intra-prediction mode selected by an encoder to a decoder. If the total number of intra-prediction modes included in an intra-prediction mode set is T (e.g., 67), simply expressing and signaling the T modes in binary notation is inefficient because it does not consider the probability of each mode being selected and the context of the corresponding block and neighboring blocks. Therefore, efficient signaling can be achieved by separately managing a list of some modes that are highly likely to be used for the current block among all modes.
[0058] According to an embodiment of the present invention, at least one prediction mode list consisting of some modes from all intra prediction modes is managed for intra prediction of a current block. 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 that distinguishes whether the intra prediction mode used for the current block is an MPM mode or a non-MPM mode. The decoder identifies whether the intra prediction mode used for the current block is an MPM mode or a non-MPM mode via the received MPM flag.
[0059] According to one embodiment, a separate coding method is used for the MPM modes, thereby enabling efficient signaling with fewer bits. If the number of MPM modes included in the MPM list is m, the number of non-MPM modes is Tm. If the number of MPM modes m is smaller than the number of non-MPM modes Tm, the MPM modes are coded using truncated unary binarization, and the non-MPM modes are coded using truncated binary binarization.
[0060] The MPM list is constructed by taking into consideration various contexts in stages, as follows. First, the MPM list includes the intra prediction modes and planar / DC modes used by the neighboring blocks of the current block (context M0). If there is a block coded in an intra prediction mode among the neighboring blocks for which reconstruction has been completed, the current block may use the same intra prediction mode as the corresponding block due to regional similarity of the picture. Therefore, the MPM list is constructed by including the intra prediction modes of the neighboring blocks. According to one embodiment, the neighboring blocks of the current block include at least one of the left (L) block, the upper (A) block, the lower left (BL) block, the upper right (AR) block, or the upper left (AL) block adjacent to the current block. For example, the neighboring blocks of the current block include the left (L) block and the upper (A) block adjacent to the current block. The left (L) block is the bottommost 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 neighboring blocks for constructing the MPM list will be further described with reference to FIG. 8. The intra prediction modes, planar modes, and DC modes selected for the neighboring blocks of the current block are added to the MPM list in a preset 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] Second, if the number m of MPM modes cannot be filled using the above method, additional context conditions (e.g., context M1, context M2, ...) are applied to fill the MPM list. When applying additional context conditions, intra-prediction modes already included in the MPM modes are not newly added.
[0062] On one hand, among all the T intra prediction modes, the remaining T - m non-MPM modes not included in the MPM list are coded by truncating binary evolution. If truncating binary evolution 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 the non-MPM modes, and the modes that are relatively likely to be selected in the corresponding block are signaled with indexes 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 composed of some modes among the non-MPM modes is managed. More specifically, the non-MPM modes are further classified into selected (s) modes and non-selected (ns) modes, and a second prediction mode list composed 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 classified, selected modes are coded using a fixed length. An additional context condition (e.g., context S) is applied to the selected modes to prioritize modes that are likely to be selected for the corresponding block. S selected modes (where s is a power of 2) are coded using a fixed length, and the remaining ns non-selected modes are coded using truncated binary coding. The ns non-selected modes are signaled using any l-1 bits (or bins) or l bits (or bins). An additional context condition (i.e., context NS) is applied to the non-selected modes, and modes that are relatively likely to be selected for the corresponding block are signaled using an index consisting of l-1 bits, thereby minimizing signaling overhead.
[0065] Specific examples of the context conditions will be described later with reference to the drawings. The additional context conditions defined in the following examples are applied individually or overlappingly to various configurations to which the context conditions {M0, M1, M2, N, S, NS} are applied. For example, a context condition that signals a basic angle mode in preference to an extended angle mode may be further used. Also, a context condition that preferentially adds an angle mode obtained by adding an arbitrary offset (e.g., −1, +1) to the angle mode of a block derived via the first context condition (e.g., context M0) of an MPM mode to a prediction mode list may be used. Such a context condition is applied as a context condition for one or more of an MPM mode, a non-MPM mode, a selected mode, or a non-selected mode.
[0066] According to a further embodiment of the present invention, the above-mentioned intra prediction method is determined based on the number of intra prediction modes of neighboring blocks and / or intra prediction mode information. For example, whether the MPM mode, non-MPM mode, selected mode, and non-selected mode are distinguished, the number of intra prediction modes signaled for each mode (i.e., m, Tm, s, and ns), and the encoding method for each mode (i.e., truncated unary binarization, truncated binarization, fixed length encoding) are variably configured according to the number or value of intra prediction modes of neighboring blocks. In this case, the neighboring blocks are preset blocks referenced to configure the MPM list.
[0067] First, to construct the MPM list, the intra prediction modes of the blocks surrounding the current block are considered, and the variable configuration is applied based on the total number of prediction modes. If the current block is a block of a B frame or a P frame, the method of constructing the MPM list is changed depending on the number of blocks that have been intra predicted among the surrounding blocks and / or the number of prediction modes. Expanding on this, different methods are used to construct the MPM list between I frames and B / P frames. In I frames, since all surrounding blocks are configured using intra prediction, the above-mentioned first method is not applied, and the following second method or a similar method is applied.
[0068] Second, the variable configuration is applied based on the number of different intra prediction modes used in the surrounding blocks. For example, the method for constructing the MPM list varies depending on whether the intra prediction modes used in the surrounding blocks are the same or different. Alternatively, the method for constructing the MPM list varies depending on the degree of difference in the intra prediction modes used in the surrounding blocks. The degree of difference in the intra prediction modes used in the surrounding blocks is determined based on whether the number of intra prediction modes used in the surrounding blocks is equal to or greater than a predetermined value. Furthermore, the degree of difference in the intra prediction modes used in the surrounding blocks is determined based on the difference in mode values of the intra prediction modes used in the surrounding blocks. If the degree of difference in the intra prediction modes used in the surrounding blocks satisfies a predetermined criterion, the MPM list is constructed based on a first method. However, if the degree of difference in the intra prediction modes used in the surrounding blocks does not satisfy the predetermined criterion, the MPM list is constructed based on a second method different from the first method. Meanwhile, the surrounding blocks of the current block considered to generate the above-described variable MPM list basically include blocks at positions other than the predetermined positions. A specific example thereof will be described with reference to FIG. 8.
[0069] Figure 8 shows a detailed example of a method for signaling intra-prediction modes. Figures 8(a) and 8(b) show examples of neighboring blocks referenced to construct a prediction mode list. Figure 8(c) shows an example of a method for signaling the above-mentioned intra-prediction modes. Figure 8(d) shows an example of signaling non-selected modes using truncated binary binarization.
[0070] First, FIG. 8(a) illustrates an example of relative positions of neighboring blocks referenced to construct an MPM list. Referring to FIG. 8(a), neighboring blocks are referenced in the order of the left (L) block, the upper (A) block, the lower left (BL) block, the upper right (AR) block, or the upper left (AL) block adjacent to the current block. In this case, the intra prediction modes, planar modes, and DC modes selected from the neighboring blocks are added to the MPM list in a predetermined order. However, in this embodiment of the present invention, the neighboring blocks referenced to construct the MPM list are not limited thereto. For example, the neighboring 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 bottommost 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) illustrates another embodiment of the relative positions of neighboring blocks referenced to construct the MPM list. The neighboring blocks of the current block are divided into blocks smaller than the current block, and there are 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 construct the MPM list. In the embodiment of Figure 8(b), the multiple blocks adjacent to the left boundary of the current block are denoted as L0 and L1 from bottom to top, and the multiple blocks adjacent to the upper boundary of the current block are denoted as A0 and A1 from right to left.
[0072] According to a first embodiment, the MPM list is configured in the order of {block L0 L mode, block A0 mode, plane mode, DC mode, block BL mode, block AR mode, and block AL mode}. According to a second embodiment, the MPM list is configured in the order of {block L0 L mode, block L1 mode, block A0 mode, block A1 mode, plane mode, DC mode, block BL mode, block AR mode, and block AL mode}. In this case, the positions and number of neighboring blocks to be 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. According to a third embodiment, the MPM list is configured in the order of {block L0 L mode, block A0 mode, plane mode, DC mode, block L1 mode, block A1 mode, block BL mode, block AR mode, and block AL mode}. In other words, by prioritizing the order in which planar mode and DC mode, which have a high probability of being selected, are selected in the MPM list over the mode of block L1 and the mode of block A1, signaling overhead can be reduced. According to the fourth embodiment, the MPM list is constructed 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 in which the MPM list is constructed according to the first embodiment described above, block L1 and block A1 are referenced.
[0073] According to a further embodiment of the present invention, the order in which the MPM list is constructed is determined based on the shape of the current block. More specifically, if the current block is not a square block, the reference order of the neighboring blocks is determined to differ 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 before the upper block, and if the current block is a horizontal block, the upper block is referenced preferentially before the left block. According to another embodiment, the order in which the MPM list is constructed is determined by comparing the shape of the current block with the shape of the neighboring blocks. For example, if the current block is a vertical block, the intra prediction mode used for the vertical block among the predetermined neighboring blocks is preferentially included in the MPM list.
[0074] According to another embodiment of the present invention, the order of constructing the MPM list is determined taking into consideration the correlation 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, among the angle modes used in the predetermined surrounding blocks, angle modes within a predetermined range from vertical (VER) mode 50 or between diagonal (DIA) mode 34 and vertical diagonal (VDIA) mode 66 are preferentially included in the MPM list. According to a further embodiment, the intra prediction modes included in the MPM lists of the surrounding blocks are included in the MPM list of the current block. In this case, if the MPM list of the current block is not filled with the intra prediction modes used in the surrounding blocks, the intra prediction modes included in the MPM lists of the surrounding blocks are added to the MPM list of the current block.
[0075] FIG. 8(c) illustrates an embodiment of a method for signaling the above-described intra-prediction modes. Among the total T intra-prediction modes, m modes are classified as MPM modes and signaled using truncated unary binarization. In one embodiment, T is 67 and m is 6. In truncated unary binarization, the number of bits (or bins) used increases as the signaling index increases. Therefore, modes that are relatively likely to be selected for a given block are matched with lower-value indices to improve signaling efficiency. To this end, the encoder and decoder construct MPM lists under the same context conditions, and the derived mode values are rearranged and signaled based on the context conditions. For example, CABAC-based encoding is performed by classifying selected modes into non-angle modes such as DC / planar modes, vertical modes, and planar angle modes in that order. Next, s selected modes determined by a given context condition are signaled using fixed-length bits, and the remaining ns non-selected modes are signaled using truncated unary binarization. In one embodiment, n is 16 and ns is 45.
[0076] 8(d) illustrates an example of signaling non-selection modes using truncated binary coding. In this example, the number of non-selection modes, ns, is 45. When truncated binary coding 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). Therefore, a preset context condition is also applied to the non-selection modes, and modes that are relatively likely to be selected in the corresponding block are matched to low-value indices signaled using 5 bits (or bins). Specific examples of the preset context condition will be described with reference to the following drawings.
[0077] 9 illustrates a method of applying a preset offset to an angle mode, which is an example of a context condition applied to an intra prediction mode. According to an embodiment of the present invention, a new priority is assigned to an angle mode obtained by adding or subtracting a preset offset from an angle mode having a specific priority. For example, a first or second priority is assigned to an angle mode obtained by adding or subtracting a preset offset from an angle mode having a first priority. According to an embodiment, a mode having a first priority among all intra prediction modes is selected preferentially over the remaining modes. The remaining modes are further divided into modes having a second priority and modes having a third priority, and the modes having a second priority are selected preferentially over the modes having a third priority. Here, the modes selected preferentially are matched to lower-value indexes signaled with fewer bits.
[0078] More specifically, if intra-prediction mode indexes a, b, and c have first priority, modes with intra-prediction mode indexes a-offset, a+offset, b-offset, b+offset, c-offset, and c+offset (where offset is an integer other than 0) are assigned first or second priority. For example, first priority is assigned to a mode selected from neighboring blocks during the MPM list construction process, and first or second priority is assigned to an angle mode obtained by adding -1 or +1 to an angle mode selected from neighboring blocks. By assigning the same or second priority to a mode obtained by adding or subtracting a preset offset from the highest priority mode, a high priority is assigned to a mode having similarity to the highest priority mode.
[0079] 9, when angle modes are limited within a preset angle range, an 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, intra prediction mode 1 obtained by subtracting the offset from intra prediction mode 2, or intra prediction mode 67 obtained by adding the offset to intra prediction mode 66, deviates from the preset angle range. In other words, intra prediction mode k-offset or k+offset derived from intra prediction mode k deviates from the preset angle range. Therefore, a method for solving this problem is needed.
[0080] According to an embodiment of the present invention, if an angle mode obtained by adding or subtracting an offset from a specific angle mode falls outside a set angle range, an angle mode determined cyclically from the angle mode set in the corresponding range is selected. That is, if an angle mode obtained by adding or subtracting an offset from a specific angle mode falls outside a preset angle range, an angle mode located opposite the specific angle mode from the angle mode set in the corresponding range is selected. For example, if the angle mode set in the preset angle range consists of modes {a, b, c, d, e, f} in ascending order of intra prediction mode index, adding an offset 1 to mode f selects mode a, and adding an offset 2 to mode f selects mode b. Similarly, subtracting an offset 1 from mode a selects mode f, and subtracting an offset 2 from mode a selects mode e. Referring to FIG. 9, adding an offset to vertical diagonal mode VDIA selects horizontal diagonal mode HDIA or an angle mode nearby it. That is, VDIA+1 is matched to HDIA, and VDIA+2 is matched to HDIA+1. Also, 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 falls outside a predetermined angle range, the angle mode to which the offset is added or subtracted is ignored. Adding or subtracting a preset offset from a specific angle mode selects an angle mode similar to the specific angle mode. However, if an angle mode determined cyclically as in the previous embodiment is selected, an angle mode located opposite 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 falls outside a predetermined angle range, the corresponding angle is not selected. For example, among modes a-offset, a+offset, b-offset, b+offset, c-offset, and c+offset obtained by adding or subtracting an offset from a preselected mode {a, b, c}, if mode c+offset falls outside the predetermined angle range, the remaining modes a-offset, a+offset, b-offset, b+offset, and c-offset, excluding mode c+offset, are selected.
[0082] According to another embodiment of the present invention, if an angle mode obtained by adding or subtracting a first offset to a specific angle mode falls outside a predetermined angle range, an angle mode obtained by adding or subtracting a second offset from the specific angle mode is selected. Alternatively, if an angle mode obtained by adding or subtracting a first offset from a specific angle mode falls outside a predetermined angle range, an angle mode obtained by further adding or subtracting the second offset is selected. In this case, the second offset has a value different from the first offset. For example, if mode a+offset1 falls outside a predetermined angle range, mode a-offset2 or mode a+offset1-offset2 is selected. Referring to FIG. 9, angle mode VDIA+1 obtained by adding a first offset 1 to a preselected vertical diagonal mode VDIA falls outside the predetermined angle range. In this case, angle mode VDIA-2 obtained by subtracting a second offset 2 from angle mode VDIA is selected. If the angle mode selected by applying the second offset overlaps with a preselected angle mode, a third offset different from the second offset is used in a manner similar to that described above.
[0083] According to another embodiment of the present invention, if an angle mode obtained by adding or subtracting a first offset to a specific angle mode deviates from a predetermined angle range, an angle mode obtained by adding or subtracting a second offset to 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 a predetermined angle range, mode a+offset2 is selected. More specifically, if the preselected angle modes are VDIA and HDIA, VDIA+offset1 may deviate from the predetermined angle range. Therefore, if the preselected angle modes are VDIA and HDIA, VDIA+offset2 is selected. Also, referring to FIG. 9, an angle mode VDIA-1+2 obtained by adding a first offset 2 to a preselected vertical diagonal mode VDIA-1 deviates from the predetermined angle range. In this case, angle mode VDIA-1+1 obtained by adding a second offset 1 to angle mode VDIA-1 is selected. If the angular mode selected by applying the second offset overlaps with the preselected angular mode, a third offset different from the second offset is used in a manner similar to that described above.
[0084] 10 is a diagram illustrating another embodiment of a context condition applied to an intra prediction mode, which is a diagram illustrating a method of configuring a prediction mode list taking into consideration the minimum and maximum values of angles or indexes of angle modes pre-selected in a prediction mode list. In this embodiment of the present invention, the prediction mode list includes an MPM list and a selected mode list, but the present invention is not limited thereto.
[0085] In intra prediction, the intra prediction mode of a current block is similar to the intra prediction mode of a neighboring block. For example, the angle mode of the current block is the same as or similar to one of the angle modes of the neighboring blocks. Therefore, if a first prediction mode list is pre-configured for the current block, a second prediction mode list is configured taking into account the elements of the first prediction mode list. According to one embodiment, the second prediction mode list is configured based on the minimum and / or maximum values of the angles or indexes (i.e., intra prediction mode indexes) of the angle modes included in the first prediction mode list. The intra prediction modes in the second prediction mode list are given higher priority than intra prediction modes other than those in the first and second prediction mode lists.
[0086] More specifically, if the minimum and maximum values of the angles or indexes of the angle modes included in the first prediction mode list are 'min' and 'max', respectively, the angle modes included in the second prediction mode list are selected within a range of 'min' to 'max', or within a range exceeding 'min' and less than 'max'. According to one embodiment, angle modes that are uniformly distributed (i.e., have a certain index difference or a certain angle difference) between the minimum and maximum values determined based on the first prediction mode list are included in the second prediction mode list. In this way, 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] According to another embodiment, angle modes included in the second prediction mode list are selected from a range of greater than or equal to "min-offset1" and less than or equal to "min+offset2," or a range of greater than "min-offset1" and less than "min+offset2." Here, offset1 and offset2 are preset offsets and are non-negative integers. Also, offset1 and offset2 may have the same value or different values. According to one embodiment, offset1 and offset2 are set to the same value, but if the range set based on the offset deviates from the preset angle range, as in the embodiment of FIG. 9, offset1 and offset2 are set to different values. According to another embodiment, offset1 and offset2 are set to the same value or different values based on the distribution of angle modes included in the first prediction mode list. For example, if the angle 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 angle modes that are uniformly distributed (i.e., have a certain index difference or a certain angle difference) between "min-offset1" and "min+offset2" determined based on the first prediction mode list. For example, if the number of modes selected in the second prediction mode list is n, m is set as floor(((max-offset2)-(min-offset1)) / (n+1)), and the second prediction mode list includes angle modes corresponding to the indices or angles "min-offset1+m," "min-offset1+2m," ..., "min-offset1+nm." In this way, angle modes included in the second prediction mode list have higher priority than angle modes not included in the first or second prediction mode list.
[0088] Referring to FIG. 10, the first prediction mode list is an MPM list. The minimum and maximum indexes of the angle modes included in the MPM list configured according to a preset rule are referred to as "MPM_min" and "MPM_max," respectively. As in the above-described embodiment, the second prediction mode list is configured based on the MPM list, taking into account the similarity between the current block and its surrounding blocks. For example, the second prediction mode list is configured based on "MPM_min" and "MPM_max." More specifically, the second prediction mode list includes angle modes that are uniformly distributed (i.e., have a certain index difference or a certain angle difference) between "MPM_min-offset" and "MPM_min+offset." Here, "offset" is a non-negative integer.
[0089] As in the above-described embodiment, once 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. According to one embodiment, the second prediction mode list is used as a selected mode list. According to another embodiment, the second prediction mode list indicates an intra prediction mode signaled by an index consisting of k-1 bits from among non-MPM modes signaled using k-1 or k bits. Furthermore, the first prediction mode list and the second prediction mode list refer to the same first and second sets of prediction mode lists. That is, in the embodiment of FIG. 10 described above, the first prediction mode list and the second prediction mode list are replaced by the first set of prediction mode lists and the second set of prediction mode lists, respectively. Here, the prediction mode list is an MPM list or a selected mode list.
[0090] 11 is a diagram illustrating another example of a context condition applied to an intra prediction mode, which is a diagram illustrating a method of configuring a prediction mode list taking into account a basic angle mode. As described above, the multiple angle modes constituting the intra prediction mode set include a basic angle mode and an extended angle mode.
[0091] According to an embodiment of the present invention, a prediction mode list is configured by giving priority to a base angle mode. An angle mode included in the prediction mode list has a higher priority than an angle mode not included in the list. According to an embodiment, the method of configuring a prediction mode list by giving priority to a base angle mode is applied under a condition in which neighboring blocks use the base angle mode. Furthermore, the method of configuring a prediction mode list by giving priority to a base angle mode is applied under a condition in which the number of neighboring blocks using the base angle mode is equal to or greater than a threshold value.
[0092] In the prediction mode determination step of the encoder, calculating the rate-distortion cost (RD-cost) for all selectable (defined) angle modes can be a burden in complexity. Therefore, to reduce the complexity in the intra prediction mode determination step, the encoder first calculates the rate-distortion cost for only a preset angle mode, for example, a base angle mode, and selects an intra prediction mode. Next, the encoder further calculates the rate-distortion cost for angle modes surrounding the selected base angle mode and selects an intra prediction mode.
[0093] Considering the similarity between the current block and the neighboring blocks and the above-described embodiment of the encoder, it is highly likely that the current block will use the base angle mode. Therefore, a prioritized prediction mode list is constructed based on the base angle modes. First, if the number of elements in the prediction mode list to be constructed is less than the total number of base angle modes, a portion of the base angle modes is selected to construct the prediction mode list. For example, if the number of base angle modes is 33 and the number of elements in the prediction mode list to be constructed is 16, base angle modes are selected every other base angle mode starting from one of the total base angle modes. That is, in the embodiment of FIG. 13, angle modes 4, 8, 12, 16, ..., 60, and 64 are selected. According to one embodiment, a prediction mode list consisting of the intra prediction modes selected in this manner is used as a selected mode list. In another embodiment of the present invention, the number of elements in the prediction mode list to be constructed is determined based on the number of base angle modes. For example, if the number of base angle modes is 33, the number of elements in the prediction mode list to be constructed is determined as 33 or 32 (= 33 - 1), etc.
[0094] As described above, the extension angle mode is signaled based on the base angle mode. The extension angle mode is signaled using an intra-prediction mode index for the base angle mode. For example, when a prediction mode list based on the base angle mode is constructed, the extension angle is signaled via an offset or an on / off flag with reference to the list. More specifically, when a prediction mode list is constructed based on base angle modes {a, b, c, d}, the offset {offset1, offset2, offset3, offset4} corresponding to each angle mode is signaled. The angle mode {a+offset1, b+offset2, c+offset3, d+offset4} is indicated based on the signaled offset. According to another embodiment, a flag indicating whether an offset corresponding to the base angle mode is used is separately transmitted. For example, a flag corresponding to base angle mode a is transmitted. 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] 12 is a diagram illustrating an example of referring to neighboring blocks for intra prediction of a current block. In FIG. 12, it is assumed that a neighboring block exists adjacent to the left or upper boundary of the current block. Hereinafter, a method for constructing a prediction mode list for a current block with reference to the neighboring blocks of the current block will be described. The prediction mode list may include an MPM list, a selected mode, and a non-selected mode list, or a partial set thereof, but the present invention is not limited thereto.
[0096] 1) MPM List Construction Method (First Method) According to an embodiment of the present invention, the MPM list for a current block is constructed as follows: If there are multiple neighboring blocks adjacent to the left or upper boundary of the current block, the information on the intra prediction modes used in the corresponding blocks is comprehensively considered. In this case, the neighboring blocks adjacent to the left or upper boundary of the current block refer to the blocks adjacent to the left side of the current block with a height of 'Cur_block_height' or the blocks adjacent to the top side of the current block with a width of 'Cur_block_width'.
[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 corresponding block. In this case, the order of referring to the neighboring blocks adjacent to the current block is configured as follows.
[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, ..., plane mode, DC mode, mode of block BL, mode of block AR, mode of block AL}. That is, the MPM list is configured by referring to the blocks adjacent to the left boundary and the blocks adjacent to the top 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, ..., plane mode, DC mode, mode of block BL, mode of block AR, mode of block AL}. That is, 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 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 alternately referenced in order to construct the MPM list. According to a third embodiment, the MPM list is constructed in the order of {block L0 mode, block A0 mode, 3D mode, DC mode, block BL mode, block AR mode, block AL mode, block L1 mode, ..., block A1 mode, ...}. That is, 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 the 3D 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 alternately referenced in order to construct the MPM list. According to another embodiment, an average value or a representative value based on the intra prediction mode of the blocks adjacent to the left or upper boundary of the current block is extracted, and the MPM list is constructed using the extracted average value or representative value. Meanwhile, in the above embodiment, the representative blocks adjacent to the left / top boundaries of the current block are set as blocks that are not at positions L0 or A0. For example, the blocks closest to the midpoint of the left side and the midpoint of the top side of the current block may be set as representative blocks.
[0099] While FIG. 12 illustrates an example in which the number of neighboring blocks adjacent to the left and top boundaries of the current block is two and three, respectively, the above-described embodiment can be extended to apply even when the number of neighboring blocks increases. Furthermore, while the above embodiment has been described based on the neighboring blocks on the left and top boundaries of the current block, it can also be applied to neighboring blocks located on the bottom left (BL), top right (AR), and top left (AL) boundaries of the current block. A specific embodiment related to this will be described with reference to FIG. 13. If the MPM list cannot be filled using the above method, an MPM list is added by applying a preset offset to a preselected angle mode in the MPM list. That is, an angle mode obtained by adding or subtracting a preset offset from the preselected angle mode in the MPM list is added to the MPM list. In this case, the preset offset is an integer other than 0.
[0100] 2) Method for Constructing a Selection Mode List (Method 2). The selection mode list is constructed based on the intra prediction modes used in the neighboring blocks of the current block. In addition, the various embodiments of the priority for referring to neighboring blocks described in Method 1 are also applied when constructing the selection mode list. If the selection mode list cannot be filled using the above method, a selection mode list is added by applying a preset offset to a preselected angle mode in the selection mode list. That is, an angle mode obtained by adding or subtracting a preset offset from a preselected angle mode in the selection mode list is added to the selection mode list. In this case, the preset offset is an integer other than 0.
[0101] According to another embodiment of the present invention, when the first method is applied, lower-order intra-prediction modes of neighboring blocks that are not included in the MPM list are preferentially included in the selected mode list. If the selected mode list cannot be filled in this way, a selected mode list is added by applying a preset offset to a preselected angle mode in the selected mode list. According to another embodiment, the selected mode list is constructed by applying a preset offset (i.e., offset1) to the angle modes of neighboring blocks. For example, the following selected mode list is constructed based on the remaining angle modes excluding the planar mode and DC mode in any one of the first methods: {mode of block L0 + / -offset1, mode of block L1 + / -offset1, ..., mode of block A0 + / -offset1, mode of block A1 + / -offset1, ..., mode of block BL + / -offset1, mode of block AR + / -offset1, mode of block AL + / -offset1}. In this case, the preset offset can be determined in various ways. For example, the offset is a positive integer that starts from 1 and increases by 1. Alternatively, the offset may be a positive integer, and may be set to start from 1 and increase in multiples of 2. Alternatively, the offset may start from an integer greater than 1 and increase, and the increase scale may be extended to multiples of 2 or 3. Alternatively, the offset may be set to start from a preset initial value (e.g., 10) and gradually decrease.
[0102] 3) Method for Constructing a Non-Selected Mode List (Method 3). When constructing a non-selected mode list, the intra prediction modes used in the neighboring 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 prediction modes and is signaled using truncated binary coding, the top 19 modes are signaled with one less bit than the modes from the 20th onward. That is, the intra prediction modes of the non-selected mode list are divided into a first set signaled with an index consisting of l-1 bits and a second set signaled with an index consisting of l bits. In this case, the angular modes selected based on the priority of referencing neighboring blocks according to the first method described above are included in the first set. If the first set cannot be filled in this way, an angular mode obtained by applying a preset offset to the angular mode preselected for the first set is added to the first set.
[0103] According to another embodiment of the present invention, among the intra prediction modes of the surrounding blocks, lower modes that are not included in the MPM list and / or the selected mode list are preferentially included in the first set. If the first set cannot be filled in this way, an angular mode obtained by applying a preset offset to the angular mode pre-selected for the first set is added to the first set. According to another embodiment, similar to the second method, the first set is constructed based on the angular modes of the surrounding blocks as follows: {mode of block L0 + / -offset2, mode of block L1 + / -offset2, ..., mode of block A0 + / -offset2, mode of block A1 + / -offset2, ..., mode of block BL + / -offset2, mode of block AR + / -offset2, mode of block AL + / -offset2}. In this case, the preset offset used to construct the first set (i.e., offset2) is set to a value different from the offset used to construct the MPM list and the offset used to construct the selected mode list (i.e., offset1).
[0104] 13 is a diagram illustrating another embodiment in which neighboring blocks are referenced for intra prediction of a current block. The embodiment of FIG. 12 in which intra prediction of a current block is performed by referring to a plurality of neighboring blocks can be extended to neighboring blocks located not only on the left (L) and above (A) sides of the current block but also on the bottom left (BL), top right (AR), and top left (AL) sides of the current block.
[0105] The definition of the neighboring blocks located to the left or above the current block is the same as in the embodiment of FIG. 12. Additionally, neighboring blocks located on the bottom left (BL), top right (AR), and top left (AL) sides of the current block are defined. First, the neighboring block located on the bottom left (BL) side of the current block refers to the block adjacent to the surface extending downward from the left side of the current block by a length "BL_block_height." Additionally, the neighboring block located on the top right (AR) side of the current block refers to the block adjacent to the surface extending right from the top side of the current block by a length "AR_block_width." Similarly, the neighboring block located on the top left (AL) side of the current block refers to the block adjacent to the surface extending downward from the top side of the current block by a length "AL_block_width." According to one embodiment, the length of "BL_block_height" is set equal to the length of "Cur_block_height" or an integer multiple of the length of "Cur_block_height." In addition, 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 be an integer multiple of the length of 'Cur_block_width'. In this case, all available blocks among the blocks at the corresponding position are referenced for intra prediction of the current block. In addition, the size of the referenceable blocks is predefined, and only blocks smaller or larger than the predefined size are referenced for intra prediction of the current block. In addition, if the current block is not a square block, the pattern of the referenced neighboring blocks may vary depending on the size of the current block.
[0106] For example, as shown in FIG. 13 , if the neighboring blocks located on the bottom left (BL) of a current block are BL0, BL1, and BL2, the neighboring blocks located on the top right (AR) of the current block are AR0 and AR1, and the neighboring blocks located on the top left (AL) of the current block are AL0, AL1, and AL2, the prediction mode list is configured in the following order: {Block L0 mode, block L1 mode, ..., block A0 mode, block A1 mode, ..., planar mode, DC mode, block BL0 mode, block BL1 mode, block BL2 mode, ..., block AL0 mode, block AL1 mode, ..., block AR0 mode, block AR1 mode, ...}. According to an embodiment of the present invention, an MPM list is configured based on the configuration order of the prediction mode lists. Furthermore, a selection mode list may be configured using only angle modes in the prediction mode list. If the selection mode list is not filled, a selection mode is added to the selection mode list by applying a preset offset to a pre-selected angle mode. In addition, in the prediction mode list, a first set of non-selected mode lists may be configured using only angular modes, and if the first set cannot be filled, angular modes obtained by applying a preset offset to angular modes pre-selected in the first set are added to the first set. The embodiment of constructing a prediction mode list taking into account surrounding blocks described with reference to FIG. 12 also applies to the extended surrounding blocks shown in FIG.
[0107] FIG. 14 is a diagram illustrating an example of referring to the MPM lists of neighboring blocks for intra prediction of a current block. When constructing the MPM list for a current block, not only the intra prediction modes of the neighboring blocks but also the MPM lists of the corresponding blocks are referenced. More specifically, for intra prediction of the current block, the intra prediction modes of the neighboring blocks, the intra prediction modes included in the MPM lists of the neighboring blocks, the intra prediction modes of the neighboring blocks, and the intra prediction modes included in the MPM lists of the neighboring blocks of the neighboring blocks are referenced. That is, in the first step (1 stNot limited to the surrounding blocks of the second tier, nd tier) surrounding blocks, 3rd step (3 rd The intra prediction mode of the current block is signaled using intra prediction information of a wider range of neighboring blocks, such as neighboring blocks of the same tier. Here, the intra prediction information of a block includes at least one of the intra prediction mode of the block and MPM list information.
[0108] 14, if a neighboring block to the left of the current block (i.e., Neighbor block1) is coded in intra prediction mode, the intra prediction mode included in the MPM list of the neighboring block is given priority in signaling the intra prediction mode of the current block. That is, to signal the intra prediction mode of the current block, the following order of modes is referenced: {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 neighboring block of the current block. That is, NBx_MPMy mode refers to the intra prediction mode information of the x-th neighboring block or the y-th intra prediction mode information in the MPM list of the corresponding block. In this case, if the y-th mode is a non-angle mode such as a planar mode or a DC mode, it may not be considered in the current block.
[0109] According to an embodiment of the present invention, intra-prediction mode information for neighboring blocks of neighboring blocks is modified and combined in various ways and used for intra-prediction of a current block. For example, the embodiment may be modified and extended based on the shape of the current block (i.e., square block, rectangular block) and the shape of the neighboring blocks, and the ordered pairs may also be extended and applied to various combinations. An embodiment in which the intra-prediction mode included in the MPM list of a neighboring block is used to signal the intra-prediction mode of the current block may be combined with the above-described embodiment. That is, when constructing at least one of the MPM list of the current block, the set of higher modes signaled by an index consisting of k-1 bits of non-MPM modes, the selected mode list, and the set of higher modes signaled by an index consisting of l-1 bits of non-selected modes, the modes included in the MPM list of the neighboring blocks are referenced. In addition, in each case, if the corresponding list or set cannot be filled, an angle mode obtained by applying a preset offset to an angle mode preselected in the corresponding list or set is added to the corresponding list or set.
[0110] FIG. 15 illustrates an embodiment in which the patterns and / or sizes of a current block and neighboring blocks are considered for intra prediction of the current block. When constructing an MPM for the current block, intra prediction information of neighboring blocks having a similar pattern and / or size to the current block is preferentially referenced. Here, the intra prediction information includes at least one of an intra prediction mode and MPM list information. Whether the patterns of the current block and neighboring 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 both vertical blocks or both blocks are horizontal blocks, the ratio between the width and height of each block is also considered. Furthermore, in embodiments of the present invention, the block patterns are not limited to the above cases and 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 the vertical blocks (i.e., NB_l, NB_a) among the neighboring blocks is preferentially referenced when constructing the MPM list for the current block. Also, if the size of the current block is 16x32, the intra prediction information used for the neighboring blocks of the same size (i.e., NB_l) is preferentially referenced when constructing the MPM list for the current block. An embodiment in which the intra prediction mode of the current block is signaled taking into account the patterns and / or sizes of the current block and neighboring blocks can be combined with the above-described embodiment. That is, when constructing at least one of the MPM list for the current block, the set of higher modes signaled by an index consisting of k-1 bits among the non-MPM modes, the selected mode list, and the set of higher modes signaled by an index consisting of l-1 bits among the non-selected modes, the intra prediction information of neighboring blocks having a similar pattern and / or size to the current block is preferentially referenced. In addition, in each case, if the corresponding list or set cannot be filled, an angle mode obtained by applying a preset offset to the angle mode preselected in the corresponding list or set is added to the corresponding list or set.
[0112] 16 to 18 are diagrams illustrating an extended embodiment of obtaining prediction information of a current block by referring to prediction information of neighboring blocks. According to an embodiment of the present invention, blocks referenced for signaling prediction information of a current block are extended to include not only neighboring blocks but also neighboring blocks not neighboring the current block. An embodiment of obtaining intra-prediction information of a current block by referring to intra-prediction information of neighboring blocks will be described with reference to the respective drawings. According to one embodiment, an MPM list of a current block is constructed by referring to intra-prediction information of neighboring blocks. However, the present invention is not limited thereto, and each embodiment is similarly applicable to obtaining inter-prediction information of a current block by referring to inter-prediction information of neighboring blocks. Here, the inter-prediction information includes a motion vector, a reference picture index, etc.
[0113] First, Figure 16 illustrates an example of extended neighboring blocks referenced to obtain prediction information for a current block. As described above, the MPM list for the current block is constructed using the intra prediction modes of the neighboring blocks, reflecting the regional similarity of pictures. In this case, neighboring 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 neighboring blocks L(2), A(2), BL(2), AR(2), and AL(2) adjacent to the boundaries of the neighboring blocks in the first step are defined as neighboring blocks in the second step (2 ndThe neighboring blocks are defined as neighboring blocks of the current block (tier). For example, the bottom-most block L(1) adjacent to the left boundary of the current block is a neighboring block in the first step, and blocks L(2), A(2), BL(2), AR(2), and AL(2) adjacent to the left or top boundary of block L(1) are neighboring blocks in the second step. In this case, blocks adjacent to the neighboring blocks in the first step that overlap with the current block are excluded from the neighboring blocks in the second step. In other words, block AR(1) to the upper right of block L(1) overlaps with the current block, so it is not referenced when constructing the MPM list for 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, so they are not referenced when constructing the MPM list.
[0114] Although Figure 16 illustrates an embodiment in which five first-step neighboring blocks located to the left or above of the current block are expanded to a maximum of 25 second-step neighboring blocks, the present invention is not limited thereto. That is, in an embodiment of the present invention, N first-step neighboring blocks located to the left or above of the current block are expanded to a maximum of N^2 second-step neighboring blocks. In this case, the MPM list for the current block is constructed by referring to the intra prediction modes of up to N^2+N neighboring blocks within a predetermined range from the current block. Therefore, regional characteristics of the picture can be more accurately reflected than when the MPM list is constructed by referring only to the intra prediction modes of the N first-step neighboring blocks. Furthermore, by increasing the probability that the optimal intra prediction mode for the current block is present in the MPM list, a reduction in the amount of bits required for intra prediction mode coding is expected.
[0115] To determine the exact positions of the neighboring blocks of the current block in the second step, the size of the neighboring blocks in the first step and at least one of the position information of the upper left, upper right, lower left, and lower right vertices of the corresponding block are required. If the encoder and decoder do not have this information, the coordinates of each neighboring block in the second step are obtained by adding an offset to the reference coordinates of the neighboring blocks in the first step. For example, if the reference coordinates of the lower right corner of block AL(1) are (x0, y0), 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-offset-1, y0-offset-1), (x0-offset-1, y0+1), (x0+1, y0-offset-1), and (x0-offset-1, y0-offset-1), respectively. Here, offset is an integer greater than 0, and the x-axis offset and the y-axis offset are set to the same value or different values. According to another embodiment, offset is determined based on the size of the current block. That is, offset is set to be proportional to the size of the current block. For example, if the width and height of the current block are {64, 32}, the x-axis offset and the y-axis offset are set to {64, 32}, {32, 16}, {16, 8}, {8, 4}, etc., which are obtained by dividing the width and height by an integer. Because the encoder and decoder use the same offset according to a predefined rule, both the encoder and the decoder refer to the inter prediction mode of the neighboring block of the second step at the same position.
[0116] According to another embodiment of the present invention, once the MPM lists of the first-step neighboring blocks L(1), A(1), BL(1), AR(1), or AL(1) of the current block are constructed, the encoder and decoder construct the MPM list of the current block by referring to the intra prediction modes included in the MPM lists of the first-step neighboring blocks without searching for the second-step neighboring blocks. When the MPM lists of the first-step neighboring blocks are constructed, the prediction modes of the second-step neighboring blocks of the current block are referenced, so the MPM lists of the first-step neighboring blocks include the prediction modes of the second-step neighboring blocks. Therefore, the prediction modes of the second-step neighboring blocks can be referenced by referring to the MPM lists of the first-step neighboring blocks without searching for the second-step neighboring blocks and calculating their positions. However, storing all of the MPM list information of the first-step neighboring blocks may place a burden on memory. Therefore, according to another embodiment of the present invention, the encoder and decoder store and reference only the top M intra prediction modes included in the MPM lists of the neighboring blocks in the first step to construct 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 three MPM indices (i.e., index=0, 1, 2) are referenced, the MPM list of the current block is constructed by reference to the intra prediction modes of the neighboring 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 three MPM indices of the MPM lists of each block. According to one embodiment, planar mode and DC mode are excluded from the above-mentioned top M intra prediction modes.
[0117] 17 is a diagram illustrating another embodiment of extended neighboring blocks referenced to obtain prediction information for a current block. According to another embodiment of the present invention, a preset search range based on the current block is used to obtain prediction information for the current block.
[0118] 17, a rectangular search range is defined based on the coordinates of the upper left, lower left, and upper right vertices of the first-step neighboring blocks to search for second-step neighboring blocks L(2), A(2), BL(2), AR(2), and AL(2). The second-step neighboring blocks are searched for by moving a predetermined step in the x-axis and / or y-axis directions within the search range. For example, to search for second-step neighboring block L(2) for AL(1), the first-step neighboring block of the current block, block L(2) is searched for by moving a predetermined step in the x-axis direction from the coordinate reference point of the lower left of block AL(1). The search continues until a block having prediction information different from the prediction information of block AL(1) is found within the defined search range. In addition, to search for a second-step peripheral block A(2) for the first-step peripheral block AL(1) of the current block, block A(2) is searched for by moving a predetermined step size in the y-axis direction from the coordinate reference point on the upper right side of block AL(1). Similarly, to search for the second-step peripheral blocks AL(2), AR(2), and BL(2), the second-step peripheral blocks are searched for by moving a predetermined step size in the y-axis and / or y-axis directions from the coordinate reference points on the upper left, upper right, and lower left sides of block AL(1), respectively.
[0119] According to an embodiment of the present invention, the search range may be set to a fixed size such as 16x16, 32x32, or 64x64, or may be set according to the size of the current block. That is, the search range is set to be proportional to the width and / or height of the current block. For example, if the size of the current block is 128x128, the search range is set to 128x128, 64x64, 32x32, 16x16, 8x8, etc., obtained by dividing the size of the block by an integer. The step size for searching within the search range is set to a value greater than or equal to the minimum block size and smaller than the search range. For example, if the minimum block size is 4x4 in a 64x64 search range, the step size is set to 4, 6, 16, or 32. According to an embodiment of the present invention, the search for prediction information within the search range is continued until the preset prediction mode list is filled. That is, prediction information searched for in the first step size within the search range is included in the prediction mode list, and if the prediction mode list is not filled, prediction information searched for in the second step size within the search range is added to the prediction mode list. The encoder and decoder perform searches while increasing the step size for search until the prediction mode list is filled. Meanwhile, since each search range and step size are natural numbers and are used with the same predefined values in the encoder and decoder, both the encoder and decoder can refer to the prediction modes of the neighboring blocks in the same second step.
[0120] 18 is a diagram showing another embodiment of extended neighboring blocks referenced to obtain prediction information for a current block. If the encoder and decoder know the structure of the neighboring blocks of the current block, i.e., the coordinates of the upper left corner of the block size, they can determine the positions of the neighboring blocks of the second step relative to the current block. In the sub-blocks shown in FIG. 18, the numbers on the upper left indicate the order of encoding or decoding, meaning that the current block is the 15th block to be coded or decoded.
[0121] To determine the positions of the second-step neighboring blocks of the current block (i.e., the 15th block), the coordinates of at least one of the four reference points of the upper left, upper right, lower left, and lower right of each of the first-step neighboring blocks, as well as the width and height information of the corresponding blocks, are used. For example, the reference positions of the second-step neighboring blocks L(2), A(2), BL(2), AR(2), and AL(2) relative to the first-step neighboring block AL(1) 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) are the coordinates of the upper left of the fifth block, which is the first-step neighboring block of the current block, and w and h are the width and height of the block, respectively. For the remaining first-step neighboring blocks L(1), A(1), BL(1), and AR(1), the positions of the second-step neighboring blocks are calculated in the same manner, and the MPM list of the current block is constructed by referring to the intra-prediction modes of the second-step neighboring blocks.
[0122] According to a further embodiment of the present invention, when obtaining prediction information for a current block, the occurrence frequency of prediction modes in neighboring blocks is taken into consideration. That is, prediction modes with a high occurrence frequency in neighboring blocks are referenced for predicting the current block with a higher priority than prediction modes with a low occurrence frequency in neighboring blocks. According to one embodiment, the priority of prediction modes included in the MPM list of the current block is determined taking into consideration the respective occurrence frequencies of prediction modes of neighboring blocks in the first step and prediction modes of neighboring blocks in the second step. A specific embodiment thereof will be described with reference to FIG. 19.
[0123] 19 illustrates an example of prioritizing intra prediction modes based on the occurrence frequency of intra prediction modes of neighboring blocks. First, the occurrence frequency of prediction modes of neighboring blocks L(1), A(1), BL(1), AR(1), and AL(1) in the first step of a current block and the occurrence frequency of prediction modes of neighboring blocks L(2), A(2), BL(2), AR(2), and AL(2) in the second step are calculated. The occurrence frequency of prediction modes of neighboring blocks in the first step and the occurrence frequency of prediction modes of neighboring blocks in the second step are stored in different lists (i.e., a first list and a second list), and are incremented by one when a prediction mode for a neighboring block in 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 is incremented by one, but the occurrence frequency of mode 50 in the second list is not incremented. After the calculation of the occurrence frequency of the prediction modes of the neighboring blocks in the first step and the neighboring blocks in the second step is completed, the final occurrence frequency of each prediction mode is calculated by summing the weighted values of the occurrence frequency. More specifically, the final occurrence frequency FM of a specific mode i is calculated as i is calculated as in the following formula 1.
[0124]
number
[0125] Here, FM i (1) is the frequency of occurrence of mode i in the surrounding blocks in the first step, FM i (2) is the frequency of occurrence of mode i in the surrounding blocks in the second step, and W1 and W2 are weights.
[0126] 19, if the occurrence frequencies of the first-step neighboring blocks and the second-step neighboring blocks for intra prediction mode 50 are 2 and 3, respectively, the final occurrence frequency of intra prediction mode 50 is calculated as w1*3+w2*3. In this case, a bit soft operation is further applied to compensate for the increase in scale by weights W1 and W2. Also, weights W1 and W2 are set to integers greater than 0 to avoid real multiplication operations, increasing the scale of the weighted sum, but the scale is corrected by a bit shift operation.
[0127] According to various embodiments of the present invention, the weights W1 and W2 are determined based on various methods. In one embodiment, because the neighboring blocks of the first step are closer to the current block than the neighboring blocks of the second step, W1 is set to a value greater than W2. For example, W1 and W2 may be set to 5 and 3, respectively. In another embodiment, the weights W1 and W2 are variably set according to the corresponding prediction mode. That is, W1 and W2 are not set to the same value for all prediction modes in the same list, but are variably set according to the prediction mode, so that the occurrence of a particular prediction mode is given more importance. For example, a higher weight is assigned to modes with a higher occurrence probability, such as planar mode, DC mode, VER mode, HOR mode, HDIA mode, DIA mode, and VDIA mode. Furthermore, a higher weight is assigned to a basic angle mode than to an extended angle mode. In another embodiment, the weights W1 and W2 are variably set according to the pattern of the current block, so that a particular angle mode is given a higher priority. For example, if the current block is a vertical block, a higher weight is assigned to VER mode and angle modes close to VER mode, and if the current block is a horizontal block, a higher weight is assigned to HOR mode and angle modes close to HOR mode. In another embodiment, the weights W1 and W2 are variably set according to the position of the corresponding surrounding block. For example, if the priority among the surrounding blocks is set in the order of {block L, block A, block BL, block AR, block AL}, higher weights are assigned in this order. For example, if the prediction mode of block L(2) and block AL(2) is 34, a higher weight is assigned to block L(2) and added to the occurrence frequency count.
[0128] If the weights W1 and W2 are variably set, when a specific prediction mode in each list occurs, the frequency count increases by W1 and W2, respectively. According to one embodiment, the weights W1 and W2 are preset. In this case, since both the encoder and the decoder use the same weights W1 and W2, both the encoder and the decoder can calculate the same occurrence count without further signaling. According to another embodiment, information about the weights W1 and W2 is signaled via an RBSP such as a PPS, VPS, or SPS.
[0129] An MPM list for the current block is constructed based on the final occurrence frequency calculated according to the above-described embodiment. Intra prediction modes with a high occurrence frequency in neighboring blocks are more likely to be selected for the current block. Therefore, intra prediction modes with a high final occurrence frequency calculated for neighboring 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 includes a planar mode, a DC mode, and the top m-2 angular modes with the highest final occurrence frequency. Furthermore, since lower indices in the MPM list can be represented with fewer bits, prediction modes with a high final occurrence frequency are matched to smaller MPM indices in the MPM list.
[0130] Meanwhile, if there are multiple angle modes with the same final occurrence frequency that is not 0, the occurrence frequency of the corresponding angle mode in the neighboring blocks in 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, a higher priority is assigned to the intra prediction mode with a higher occurrence frequency in the neighboring blocks in the first step. In another embodiment, if there are multiple angle modes with the same final occurrence frequency that is not 0, the priority of the corresponding angle modes is determined according to the shape of the current block. For example, if the current block is a vertical block, a higher priority is assigned to the angle modes of blocks A(1), AR(1), and AL(1) among the neighboring blocks in the first step, or a higher priority is assigned to an angle mode closer to the vertical mode.
[0131] According to one embodiment, the MPM indexes of the planar mode and the DC mode in the MPM list are set differently depending on the intra prediction mode of the neighboring blocks in the first step. For example, if the occurrence frequency of the planar mode and the DC mode among the intra prediction modes of the neighboring blocks in the first step is equal to or greater than a threshold value, the planar mode and the DC mode are matched to MPM indexes 0 and 1. Also, if the occurrence frequency of the angular mode among the intra prediction modes of the neighboring blocks in the first step is equal to or greater than a threshold value, the MPM index of the angular mode is set to a value smaller than the MPM indexes of the planar mode and the DC mode.
[0132] In the above embodiment, if the number of angle modes having a non-zero final frequency of occurrence is less than m-2, the MPM list is constructed using one or more of {VER mode, HOR mode, HDIA mode, VDIA mode}. Furthermore, to minimize the signaling overhead required for encoding non-MPM modes, prediction modes with a high final frequency of occurrence are used. For example, prediction modes with a high final frequency of occurrence are included in the selected mode list or matched to a lower-valued index signaled with fewer bits among the non-selected modes. According to another embodiment, the selected mode list is constructed using angle modes obtained by adding or subtracting a preset offset from angle modes with a high final frequency of occurrence included in the MPM list. Furthermore, angle modes with a non-zero final frequency of occurrence that are not included in the MPM list, and angle modes obtained by adding or subtracting a preset offset from the corresponding modes, are matched to a lower-valued index signaled with fewer bits among the non-selected modes.
[0133] The operation of an encoder for encoding an intra prediction mode of a current block based on the occurrence frequency of intra prediction modes of neighboring blocks will now be described. First, to encode the intra prediction mode of the current block, the encoder checks whether neighboring blocks of the current block exist and calculates the occurrence frequency of intra prediction modes of the neighboring blocks. Next, the encoder generates at least one of an MPM list, a selected mode list, or a non-selected mode based on the occurrence frequency of intra prediction modes of the neighboring blocks. Here, a prediction mode with a higher occurrence frequency has a higher priority. Next, the encoder encodes an MPM flag indicating whether the intra prediction mode of the current block exists in the MPM list of the current block. If the intra prediction mode of the current block does not exist in the MPM list of the current block, the encoder encodes a selected mode flag indicating whether the intra prediction mode matches one of the selected modes. On the other hand, if the intra prediction mode of the current block exists in the MPM list of the current block (i.e., if the value of the MPM flag is 1), the encoder encodes an MPM index corresponding to the intra prediction mode of the current block in the MPM list. Also, if the intra prediction mode of the current block is present in the selected mode list of the current block (i.e., if the MPM flag value is 0 and the selected mode flag value is 1), the encoder encodes a selected mode index corresponding to the intra prediction mode of the current block in the selected mode list. Otherwise, the encoder encodes a non-selected mode index corresponding to the intra prediction mode of the current block.
[0134] The decoder's operation for decoding the intra prediction mode of the current block based on the frequency of occurrence of the intra prediction modes of the surrounding blocks is as follows. First, the MPM flag of the current block is parsed during parsing of the symbols of the current block. If the MPM flag is 0, the decoder also parses the selected mode flag. As in the encoding process, the decoder checks whether there are any surrounding blocks of the current block and calculates the frequency of occurrence of the intra prediction modes of the surrounding blocks. Next, the decoder constructs at least one of an MPM list, a selected mode list, or a non-selected mode based on the frequency of occurrence of the intra prediction modes of the surrounding blocks. The construction methods of the MPM list, selected mode list, and non-selected modes in the decoder are the same as those 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 selected mode flag is 1, the decoder decodes the selected mode index. Otherwise, the decoder decodes the non-selected mode index to determine the intra prediction mode of the current block. The decoder performs intra prediction using the determined intra prediction mode to generate a prediction block.
[0135] 20 and 21 are diagrams illustrating an embodiment in which intra prediction modes are classified into a plurality of subsets. As the number of intra prediction modes increases, the probability that the intra prediction mode of the current block is included in the MPM list decreases, thereby increasing the amount of bits required to encode the intra prediction mode. To solve this problem, the intra prediction modes are classified into a plurality of subsets, and intra prediction is performed using a prediction mode set according to the surrounding context of the current block.
[0136] First, FIG. 20 illustrates an example of classifying intra prediction modes into a plurality of subsets. According to the example shown in FIG. 20, the N intra prediction modes of the intra prediction mode set are classified into M subsets (S0, S1, ..., S M-1 ) In Figure 20, m i、jindicates the j-th intra prediction mode belonging to the i-th subset. i is K i The prediction mode consists of exclusive intra prediction modes and satisfies the following Equation 2:
[0137]
number
[0138] In this case, the number K of intra prediction modes constituting each intra prediction mode subset is i may be different for each 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, Fig. 21 is a diagram showing another embodiment of classifying intra prediction modes into a plurality of subsets. According to the embodiment shown in Fig. 21, the N intra prediction modes of the intra prediction mode set are divided into M subsets (S0, S1, ..., S2) including intra prediction modes that overlap (or are shared) with the exclusive intra prediction modes. M-1In one embodiment, the common intra prediction mode is set to the top L intra prediction modes that are statistically most likely to be selected in inter prediction. k denotes the kth shared intra prediction mode belonging to each subset, and m i、j denotes the j-th exclusive intra prediction mode belonging to the i-th subset. i is L common intra prediction modes and L i The eigenvalues are exclusive intra prediction modes, and satisfy the following Equation 3:
[0141]
number
[0142] In this case, the number of exclusive intra prediction modes included in each intra prediction mode subset is L i may be different for each subset.
[0143] For example, if the intra prediction mode set includes a total of 67 intra prediction modes, the common intra prediction mode is set to one or more of {planar mode, DC mode, HDIA mode, HOR mode, DIA mode, VER mode, VDIA mode}. Utilizing this, the intra prediction modes are divided into a first subset {planar mode, DC mode, base 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] 22 is a diagram illustrating an embodiment of signaling the intra prediction mode of a current block using a subset of classified intra prediction modes. According to an embodiment of the present invention, the intra prediction mode subset of the current block is determined using the intra prediction mode subsets used in the neighboring blocks of the current block.
[0145] 20, if each intra prediction mode subset is an exclusive intra prediction mode, intra prediction mode subset information including the intra prediction modes of the neighboring blocks is checked, and the intra prediction mode subset of the current block is determined using the checked information. That is, the intra prediction mode subset most frequently used by the neighboring blocks is assigned to the intra prediction mode subset of the current block. In this case, the embodiments of FIG. 16 to FIG. 18, which refer to the extended neighboring blocks to obtain prediction information of the current block, are also applied.
[0146] 22, the intra prediction mode subset of the current block is determined by first referring to the intra prediction mode subset information of the first-step neighboring blocks L(1), A(1), BL(1), AR(1), and AL(1) of the current block, and then referring to the intra prediction mode subset information of the second-step neighboring blocks L(2), A(2), BL(2), AR(2), and AL(2) of the current block. According to one embodiment, the final frequency of occurrence of intra prediction mode subsets is calculated by applying weights w1 and w2 to the frequency of the intra prediction mode subsets of the first-step neighboring blocks and the frequency of the intra prediction mode subsets of the second-step neighboring blocks, respectively, based on the frequency of occurrence calculation method described with reference to FIG. 19. In this case, the intra prediction mode subset with the highest frequency of occurrence 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 final occurrence frequency value other than 0, similar to the embodiment described with reference to Figure 19, the occurrence frequency in the neighboring blocks 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, according to the embodiment of Figure 21, when each intra prediction mode subset includes a shared intra prediction mode, a case may occur in which the intra prediction mode subset cannot be identified based only on the intra prediction mode information of the surrounding blocks due to the shared intra prediction mode. That is, if the intra prediction mode of the surrounding blocks is one of the shared intra prediction modes, the intra prediction mode subset of the surrounding blocks cannot be derived. Therefore, the index of the intra prediction mode subset of the current block should be separately signaled, and the intra prediction mode subset information of the current block should be stored.
[0149] In this situation, according to an embodiment, it is not necessary to separately signal an index of the intra prediction mode subset of the current block. Since the number of intra prediction mode subsets increases, the number of additional indexes required to represent the intra prediction mode subset index information increases. Therefore, the intra prediction mode subset information of the neighboring blocks having a shared intra prediction mode is determined according to a predetermined rule. For example, if the neighboring blocks use a shared intra prediction mode, a basic subset is determined as the intra prediction mode subset of the corresponding neighboring blocks. Alternatively, the intra prediction mode subset is determined according to the type of the shared intra prediction mode of the corresponding block. For example, if the shared intra prediction mode used by the neighboring blocks is a vertical mode, a subset including many angular modes close to the vertical mode is determined as the intra prediction mode subset of the corresponding neighboring blocks. Furthermore, if the shared intra prediction mode used by the neighboring blocks is a horizontal mode, a subset including many prediction modes close to the horizontal mode is determined as the intra prediction mode subset of the corresponding neighboring blocks.
[0150] Once the intra-prediction mode subset of the current block is determined, the MPM list and non-MPM modes of the current block are constructed by prioritizing the intra-prediction mode subset.
[0151] According to one embodiment, an MPM list is constructed based on the positions of neighboring blocks of a predetermined priority and / or the intra prediction modes of a predetermined priority. Prediction modes of neighboring 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. In addition, if the intra prediction mode subset of the current block includes a planar mode and a DC mode, the corresponding intra prediction mode is considered preferentially over an angular mode. However, if the intra prediction mode subset includes a shared intra prediction mode, and the intra prediction mode of a neighboring block having a different intra prediction mode subset from the current block is one of the shared intra prediction modes, the intra prediction mode of the corresponding neighboring block is added to the MPM list of the current block according to a predetermined priority. For example, if the shared intra prediction mode is {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, if the intra prediction mode of the left block is one of the shared intra prediction modes, the corresponding intra prediction mode is included in the MPM list of the current block.
[0152] According to another embodiment, the MPM list is constructed based on the pattern of the current block and the pattern of the surrounding blocks. If the current block is a vertical block, a high priority is given to the intra prediction modes of the blocks among the upper block, the upper right block, and the upper left block, which have the same intra prediction mode subset as the current block, and a vertical mode or an angular mode close to the vertical mode in the current intra prediction mode subset is preferentially added to the MPM list. According to another embodiment, according to the occurrence frequency calculation method described with reference to FIG. 19, at least one of the MPM list, the selected mode list, and the non-selected mode is constructed based on the frequency of prediction modes included in the intra prediction mode subset of the current block among the prediction modes of the first-step surrounding blocks of the current block and the prediction modes of the second-step surrounding blocks.
[0153] In this way, by dividing N prediction modes into M intra prediction mode subsets and determining the intra prediction mode subset of the current block using intra prediction mode subset information of surrounding blocks, an optimal prediction mode list is constructed from which intra prediction modes unnecessary for the current block are removed. Therefore, the intra prediction mode of the current block is more likely to match the intra prediction mode in the MPM list, and the amount of bits required for intra prediction mode signaling is reduced.
[0154] Figure 23 illustrates a detailed example of signaling the intra prediction mode of a current block using a classified subset of intra prediction modes. In the example of Figure 23, it is assumed that the intra prediction mode subset is composed of exclusive intra prediction modes. More specifically, the 67 intra prediction modes of the intra prediction mode subset are classified into two subsets of exclusive intra prediction modes. The two intra prediction mode subsets each include 35 exclusive intra prediction modes and 32 exclusive intra prediction modes. For example, the first subset includes {planar mode, DC mode, and 33 basic angle modes}, and the second subset includes {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 signaled MPM modes, selected modes, and non-selected modes is adjusted. That is, 4 MPM modes, 8 selected modes, and 23 (or 20) non-selected modes are used to signal intra-prediction of the current block. Figure 23(a) shows an example of signaling each flag and index for intra-prediction of the current block, and Figure 23(b) shows an example of non-selected mode indexes signaled for truncated binary binarization.
[0156] If the intra prediction mode of the current block is 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 coding and signaled with 1 to 3 bits. The binarized MPM index is encoded using CABAC. On the other hand, if the intra prediction mode of the current block is not in the MPM list, the MPM flag is set to 0, and the intra prediction mode is coded 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 binary coding. If a first subset including 35 intra prediction modes is used for the current block, the number of non-selected modes in the corresponding subset is 23. To satisfy 2^4<23<2^5, the indexes of the top 9 non-selected modes are signaled using 4 bits, and the indexes of the bottom 14 non-selected modes are signaled using 5 bits. However, if a second subset including 32 intra prediction modes is used for the current block, the number of non-selected modes in the corresponding subset is 20. To satisfy 2^4<20<2^5, the indexes of the top 12 non-selected modes are signaled using 4 bits, and the indexes of the bottom 8 non-selected modes are signaled using 5 bits.
[0158] Figure 24 illustrates an embodiment of dynamically signaling the intra prediction mode of a current block based on prediction information of neighboring blocks. More specifically, according to the embodiment of Figure 24, the MPM mode configuration is changed according to various conditions. Figure 24(a) illustrates a method of changing the MPM configuration depending on the type of picture to which the current block belongs. Figures 24(b) and 24(c) illustrate methods of variably configuring the MPM mode depending on the intra prediction modes used in neighboring blocks.
[0159] First, Figure 24(a) illustrates a method for changing an MPM configuration depending on the type of picture to which a current block belongs, according to an embodiment of the present invention. Conventional configurations such as MPM mode, non-MPM mode, and non-selection mode are applied regardless of the type of picture to which the corresponding block belongs (i.e., I picture, P picture, or P picture). However, according to an embodiment of the present invention, as shown in Figure 24(a), an MPM configuration method for P pictures and B pictures, in which neighboring blocks can freely perform inter prediction and intra prediction, may be applied differently from an MPM configuration method for I pictures, in which neighboring blocks only perform intra prediction. For example, the number of MPM modes in P pictures and B pictures is set differently from the number of MPM modes in an I picture. 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 an I picture.
[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 the search positions (for example, L, A, BL, AR, and AL) of the peripheral blocks is designated as m1. Also, the number of different intra prediction modes used for intra prediction at all the search positions of the peripheral blocks is designated as m2. For example, if all the 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 the mode derived therefrom (for example, applied to the offset preset for the angular mode) may have no relation to the current block. That is, since it is highly likely that the peripheral blocks are 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, a second MPM mode signaling method is applied. If the number of intra-predicted blocks at the position of the surrounding blocks is greater than Th1, the context of the intra-prediction mode used at the position of the surrounding blocks or modes derived therefrom must be differentially considered. In other words, since there are surrounding blocks where intra-prediction is performed, the signaling of the intra-prediction mode of the current block is configured based on the surrounding intra-predicted blocks, but differential signaling taking their positions into consideration is required. In this case, it is appropriate to signal the m intra-prediction modes extracted in the context of sequentially considering the intra-prediction modes used in the surrounding blocks and modes derived therefrom with differential overhead. Therefore, the MPM mode is signaled using truncated unary binarization.
[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. Because the number of intra-prediction blocks at the position of the surrounding block is greater than Th2 but the diversity of the intra-prediction modes used is not large, the context of the intra-prediction modes of the surrounding blocks or modes derived therefrom must be considered differentially. In this case, the MPM mode signaling method is the same as the second method.
[0164] 4) If the value of m1 is greater than Th2 and the value of m2 is greater than Th3, the fourth MPM mode signaling method is applied. If the number of intra-predicted blocks at the position of the neighboring blocks is greater than Th2, the diversity of the intra-prediction modes used is high. Therefore, the context of the intra-prediction modes of the neighboring blocks or modes derived therefrom must be equally considered, and the maximum value must be signaled via the MPM mode. In other words, since there are many neighboring blocks for which intra-prediction is performed, but most of the corresponding blocks use different intra-prediction modes, the intra-prediction of the current block requires non-differential signaling that takes into account all of the neighboring intra-prediction blocks. In this case, it is appropriate for the MPM mode to signal m intra-prediction modes extracted in the context that considers the intra-prediction modes used in the neighboring blocks and modes derived therefrom with equal overhead. Therefore, fixed-length coding is applied to the MPM mode.
[0165] In the method, the number m of modes signaled in the 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 encoding methods are determined based on the determined value of m. According to one embodiment, fixed-length coding is applied to the selected mode, and it is appropriate for the selected mode to be responsible for signaling the subsequent s intra-prediction modes set based on the number m of MPM modes.
[0166] 24(c) shows another embodiment of the present invention in which the MPM mode is variably configured according to the intra prediction modes used in the surrounding blocks. As described above in the embodiment of FIG. 24(b), the number of different intra prediction modes used for intra prediction in the surrounding blocks at all search positions is indicated as m2. According to this embodiment, 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, a fifth MPM mode signaling method is applied. If the number of intra-prediction blocks at the position of the surrounding block is less than Th1, m is set to a small number appropriately reflecting the context of the intra-prediction mode used at the position of the surrounding block or a mode derived therefrom. This is because if the number of different intra-prediction modes of the surrounding blocks is small, even if the number of MPM modes 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 6th MPM mode signaling method is applied. If the number of intra-predicted blocks at the position of a neighboring block is greater than a certain number, the context of the intra-prediction mode used at the position of the neighboring block or a mode derived therefrom needs to be differentially considered. A specific example of the 6th MPM mode signaling method is the same as the above-mentioned 2nd MPM mode signaling method.
[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 position of a neighboring block is greater than Th2, the diversity of the intra-prediction modes used is high, so the context of the intra-prediction modes of the neighboring blocks or modes derived therefrom needs to be equally considered, and the maximum value needs to be signaled 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 method, the number m of modes signaled in the MPM mode is determined based on the derived value of m2. Also, 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 mode, and it is appropriate for the selected mode to be responsible for signaling the subsequent s intra-prediction modes set based on the number m of MPM modes.
[0171] 25 illustrates an embodiment in which the number of MPM modes is variably adjusted and the intra prediction mode of the current block is signaled based on the adjusted number of MPM modes. As described in FIG. 24, a small number of MPM modes are used according to the MPM mode signaling method.
[0172] Referring to FIG. 25(a), the number of MPM modes is not fixed but varies based on intra prediction mode information of surrounding blocks. Two of the total 67 intra prediction modes are set as MPM modes and signaled using fixed-length coding. The fixed-length coding method assigns equal priority to the signaled modes. Next, the number of selectable modes s is determined to be 16 or 9, and the selectable modes are signaled using fixed-length coding. Since a relatively small number of MPM modes are signaled, the embodiment of FIG. 25(a) increases the number of selectable modes (i.e., 16) to increase the probability that an intra prediction mode not signaled in the MPM mode is signaled as the selectable mode. However, since signaling using the selectable mode results in the same signaling overhead as the conventional method using a fixed number of MPM modes, the embodiment of FIG. 25(b) reduces the number of selectable modes (i.e., 9) to reduce overall overhead.
[0173] However, in an embodiment with a reduced number of selection modes, signaling non-selection modes increases signaling overhead. In the embodiment of FIG. 25(b), which has nine selection modes, 56 non-selection modes, which is more than the embodiment of FIG. 25(a), which has 16 selection modes, must be signaled using truncated binary coding. 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 five bits, and the remaining 48 indices are signaled using six bits. Therefore, it can be seen that the signaling overhead of the non-selection mode of FIG. 25(b) is increased compared to the non-selection mode of FIG. 25(a), in which 15 indices are signaled using five bits and 34 indices are signaled using six bits.
[0174] In the above embodiment, the number m of intra prediction modes signaled in the MPM mode is determined based on the method described above with reference to Figure 24. The number s of selectable modes is also determined based on the determined value of m. The number s of selectable modes is also determined based on the following additional conditions:
[0175] First, the number of selection modes is determined based on the value and context of the intra prediction mode determined by the MPM mode. If the intra prediction mode of a neighboring block is reflected when determining the MPM mode, the intra prediction mode of the current block is likely to be signaled via the MPM mode or a selection mode derived therefrom. Therefore, additional intra prediction modes derived from the MPM mode are obtained, and the additional intra prediction modes are configured and signaled using a relatively small number of selection modes. By limiting the number of selection modes in this way, signaling overhead can be reduced. However, if the intra prediction mode of a neighboring block is not reflected when determining the MPM mode and the MPM list is configured using a basic angle mode such as planar mode, DC mode, VER mode, or HOR mode, a relatively large number of selection modes are configured and signaled. Because the MPM list is formed from a context unrelated to neighboring blocks, the number of selection modes is maximized to increase the likelihood that the intra prediction mode of the current block will be included in the selection modes. Meanwhile, the number ns of non-selected modes is determined as a value obtained by subtracting the number m of MPM modes and the number s of selected modes from the total number T of intra prediction modes.
[0176] The above-described embodiments of the present invention may be implemented in various ways, for example, in hardware, firmware, software, or a combination thereof.
[0177] In the case of a hardware implementation, the method according to an embodiment of the present invention may be implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSDPs (Digital Signal Processing Devices), PDLs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), processors, controllers, microcontrollers, microprocessors, etc.
[0178] In the case of implementation by firmware or software, the methods according to the embodiments of the present invention may be implemented in the form of modules, procedures, or functions that perform the functions or operations described above. The software code is stored in a memory and executed by a processor. The memory may be located inside or outside the processor and exchange data with the processor through various means known in the art.
[0179] The above description of the present invention is for illustrative purposes only, and those skilled in the art will understand that the present invention can be easily modified into other specific forms without changing the technical spirit or essential features of the present invention. Therefore, it should be understood that the above-described embodiments are illustrative in all respects and are not limiting. For example, each component described as a single component may be implemented in a distributed form, and components described as distributed may also be implemented in a combined form.
[0180] The scope of the present invention is indicated by the claims that follow rather than by the above detailed description, and all modifications and variations that fall within the meaning and scope of the claims and their equivalents should be interpreted as being included within the scope of the present invention. [Explanation of symbols]
[0181] 110 Conversion unit 115 Quantization section 120 Inverse quantization section 125 Inverse conversion unit 150 Prediction Department 152 Intra prediction unit 154 Inter Prediction Unit 154a Motion estimation unit 154b Motion Compensation Unit 160 Entropy Coding Unit 210 Entropy Decoding Unit 220 Inverse quantization section 225 Inverse conversion unit 230 Filtering section 250 Prediction Department 252 Intra prediction unit 254 Inter Prediction Unit
Claims
1. 1. A method for processing a video signal, comprising: receiving intra prediction mode information of a current block, the intra prediction mode information indicating one of a plurality of intra prediction modes included in an intra prediction mode set, the intra prediction mode set including a plurality of angle modes, the plurality of angle modes including a base angle mode and an extended angle mode, the base angle mode being a mode corresponding to an angle within a predetermined first angle range; determining whether to use the extended angle mode based on at least one of a shape and a size of the current block; When the extended angle mode is used, determining the extended angle mode based on a sum of an index of a 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 decoding the current block based on the determined extension angle mode; the extended angle mode indicates a wide angle direction outside the first preset angle range, and the current block is non-square in shape; method.
2. 1. A video signal processing apparatus including a processor, The processor: receiving intra prediction mode information of a current block, the intra prediction mode information indicating one of a plurality of intra prediction modes constituting an intra prediction mode set, the intra prediction mode set including a plurality of angle modes, the plurality of angle modes including a base angle mode and an extended angle mode, the base angle mode being a mode corresponding to an angle within a predetermined first angle range; determining whether to use the extended angle mode based on at least one of a shape and a size of the current block; When the extended angle mode is used, determining the extended angle mode based on a sum of an index of a 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 decoding the current block based on the determined extension angle mode; the extended angle mode indicates a wide angle direction outside the first preset angle range, and the current block is non-square in shape; Video signal processing device.
3. 1. A video signal encoding device including a processor, The processor: determining intra prediction mode information of a current block, the intra prediction mode information indicating one of a plurality of intra prediction modes constituting an intra prediction mode set, 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, the basic angle mode being a mode corresponding to an angle within a first angle range that is set in advance, a sum of an index of the basic angle mode corresponding to the extended angle mode and a predetermined offset represents the extended angle mode, and whether to use the extended angle mode is determined based on at least one of a shape and a size of the current block; generating a bitstream including the intra-prediction mode information; the extended angle mode indicates a wide angle direction outside the first preset angle range, and the current block is non-square in shape; Video signal encoding device.
4. A method for transmitting a bitstream generated by a video signal encoding device according to claim 3.
Citation Information
Patent Citations
Method for generating prediction block in short distance intra prediction
KR1020130029695A
Method and Apparatus of Intra Prediction in Image and Video Processing
US20170272745A1
An encoding apparatus for signaling an extension directional intra-prediction mode within a set of directional intra-prediction modes
WO2018117894A1
Video and image coding with wide-angle intra prediction
WO2018127624A1
Improved intra prediction in video coding
WO2019006105A1