Video signal processing method and apparatus
The video signal processing method improves coding efficiency by using a set of intra prediction modes, including extended angular modes signaled based on basic modes, addressing inefficiencies in predicting current blocks and reducing signaling overhead.
Patent Information
- Application Number
- JP2024191268
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-03-09
- Filing Date
- 2024-10-31
- Publication Date
- 2025-07-30
- Estimated Expiration
- 2038-10-24
AI Technical Summary
Existing video signal processing methods lack efficiency in coding and signaling, particularly in predicting current blocks using prediction information of surrounding blocks.
A video signal processing method and apparatus that utilizes a set of intra prediction modes including basic and extended angular modes, where the extended modes are signaled based on the basic modes, and the use of these modes is determined by the pattern and size of the current block, minimizing signaling overhead.
Enhances coding efficiency and diversely extends prediction methods while reducing signaling overhead.
Smart Images

Figure 0007715909000004 
Figure 0007715909000005 
Figure 0007715909000006
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 Art
[0002] Compression encoding means a series of signal processing techniques for transmitting digitized information via a communication line or storing it in a form suitable for a storage medium. The targets of compression encoding include audio, video, characters, etc., and in particular, the technique of performing compression encoding on video is called video compression. Compression encoding of a video signal is performed by removing redundant information in consideration of spatial correlation, temporal correlation, probabilistic correlation, etc. However, due to the recent development of various media and data transmission media, a more efficient video signal processing method and apparatus are required.
Summary of the Invention
Problems to be Solved by the Invention
[0003] The present invention has an object to increase the coding efficiency of a video signal.
[0004] Also, the present invention has an object to increase the signaling efficiency when predicting a current block by using prediction information of surrounding blocks.
Means for Solving the Problems
[0005] In order to solve the above problems, the present invention provides a video signal processing apparatus and a video signal processing method as follows.
[0006] First, according to an embodiment of the present invention, in a video signal processing method, a step of receiving intra prediction mode information for a current block, where the intra prediction mode information indicates any one of a plurality of intra prediction modes constituting an intra prediction mode set; and a step of decoding the current block based on the received intra prediction mode information, wherein the intra prediction mode set includes a plurality of angular modes, the plurality of angular modes include a basic angular mode and an extended angular mode, and the extended angular mode is signaled based on the basic angular mode, a video signal processing method is provided.
[0007] Also, according to an embodiment of the present invention, in a video signal processing apparatus including a processor, the processor receives intra prediction mode information for a current block, where the intra prediction mode information indicates any 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, wherein the intra prediction mode set includes a plurality of angular modes, the plurality of angular modes include a basic angular mode and an extended angular mode, and the extended angular mode is signaled based on the basic angular mode, a video signal processing apparatus is provided.
[0008] The basic angular mode is a mode corresponding to an angle within a preset first angle range, and the extended angular mode is determined based on the basic angular mode.
[0009] The extended angular mode is a wide-angle mode deviating from the first angle range.
[0010] The wide-angle mode replaces at least one basic angular mode within the first angle range, and an intra prediction mode index corresponding to the replaced basic angular mode signals the wide-angle mode.
[0011] The extended angular mode is an angular mode between basic angular modes within the first angle range.
[0012] The interval between the extended angle modes of the intra prediction mode set is set based on the interval between the corresponding basic angle modes.
[0013] The angular interval between the extended angle modes is set in the same way as the angular interval between the corresponding basic angle modes.
[0014] Whether the extended angle mode can be used is determined based on at least one of the pattern and size of the current block.
[0015] In the intra prediction mode set, the number of extended angle modes is set to be less than or equal to the number of basic angle modes.
Advantages of the Invention
[0016] According to the embodiments of the present invention, the coding efficiency of video signals is increased.
[0017] Also, according to the embodiments of the present invention, the prediction method for the current block can be diversely extended, and the signaling overhead due to such extension can be minimized.
Brief Description of the Drawings
[0018]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
DETAILED DESCRIPTION OF THE INVENTION
[0019] The terms used in this specification are selected to be as general as currently widely used while considering the functions in the present invention, but this may vary depending on the intentions, conventions of those skilled in the art, the emergence of new technologies, etc. Also, in certain cases, there are terms arbitrarily selected by the applicant, and in this case, the meaning thereof is described in the part of the embodiment for implementing the corresponding invention. Therefore, it is clarified that the terms used in this specification should be interpreted based on the substantial meaning of the terms and the content throughout this specification, rather than just the names of the terms.
[0020] In this specification, some terms are interpreted as follows. Coding may be interpreted as encoding or decoding in some cases. In this specification, a device that encodes (codes) a video signal to generate a bitstream of the video signal is referred to as an encoding device or an encoder, and a device that decodes (decodes) the video signal bitstream to restore the video signal is referred to as a decoding device or a decoder. Also, in this specification, a video signal processing device is used as a term for a concept that includes both an encoder and a decoder. Information is a term that includes any of values, parameters, coefficients, elements, etc., and may be interpreted to have different meanings in some cases, so the present invention is not limited thereto. "Unit" is borrowed in the sense of referring to a basic unit of video processing or a specific position in a picture, and refers to an image area that includes both a luma component and a chroma component. Also, "block" refers to an image area that includes a specific component among the luma component and the chroma components (that is, Cb and Cr). However, depending on the embodiment, terms such as "unit", "block", "partition", and "area" may be used interchangeably. Also, in this specification, a unit is used as a concept that includes any of a coding unit, a prediction unit, and a transform unit. A picture refers to a field or a frame, and depending on the embodiment, the above terms may be used interchangeably.
[0021] FIG. 1 is a schematic block diagram of a video signal encoding device according to an embodiment of the present invention. Referring to FIG. 1, the encoding device 100 of this specification includes a transform unit 110, a quantization unit 115, an inverse quantization unit 120, an inverse transform unit 125, a filtering unit 130, a prediction unit 150, and an entropy coding unit 160.
[0022] The conversion unit 110 converts the residual signal, which is the difference between the input video signal and the prediction signal generated by the prediction unit 150, to obtain conversion 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 the Discrete Sine Transform perform the conversion by dividing the input picture signal into blocks. In the conversion, the coding efficiency may vary depending on the distribution and characteristics within the conversion region. The quantization unit 115 quantizes the values of the conversion coefficients output by the conversion unit 110.
[0023] To improve the coding efficiency, instead of coding the picture signal as it is, a method is used in which the picture is predicted using a region that has been pre-coded via the prediction unit 150, and the residual value between the original picture and the predicted picture is added to the predicted picture to obtain a restored picture. To prevent a mismatch from occurring between the encoder and the decoder, information that can also be used by the decoder should be used when making a prediction in the encoder. For this purpose, in the encoder, a process of further restoring the encoded current block is performed. The inverse quantization unit 120 inverse-quantizes the conversion coefficient values, and the inverse conversion unit 125 restores the residual values using the inverse-quantized conversion coefficient values. On the other hand, the filtering unit 130 performs filtering operations for improving the quality of the restored picture and enhancing the coding efficiency. For example, it includes a deblocking filter, a Sample Adaptive Offset (SAO), and an adaptive loop filter. The picture that has undergone filtering is stored in a Decoded Picture Buffer (DPB) 156 for output or for 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 for predicting the current picture by using the reference buffer stored in the composite picture buffer 156. The intra prediction unit 152 performs intra prediction from the restored samples within the current picture and transmits the intra coding information to the entropy coding unit 160. The intra coding information includes at least one of an intra prediction mode, an MPM (Most Probable Mode) flag, and an MPM index. The inter prediction unit 154 includes a motion estimation unit 154a and a motion compensation unit 154b. The motion estimation unit 154a obtains the motion vector value of the current area by referring to a specific area of the restored reference signal picture. The motion estimation unit 154a transmits the motion information (reference picture index, motion vector information) for the reference area to the entropy coding unit 160. The motion compensation unit 154b performs motion compensation by using the motion vector value transmitted from the motion compensation unit 154a. The inter prediction unit 154 transmits the inter coding information including the motion information for the reference area to the entropy coding unit 160.
[0025] If the above-described picture prediction is performed, the conversion unit 110 converts the residual value between the original picture and the predicted picture to obtain a conversion coefficient value. At this time, the conversion is performed in units of specific blocks within the picture, and the size of the specific block varies within a preset range. The quantization unit 115 quantizes the value of the conversion coefficient generated by the conversion unit 110 and transmits it to the entropy coding unit 160.
[0026] The entropy coding unit 160 entropy-codes the quantized transform coefficients, intra-coding information, inter-coding information, etc. to generate a video signal bitstream. In the entropy coding unit 160, a variable length coding (VLC) method, an arithmetic coding method, etc. are used. The variable length coding (VLC) method converts the input symbols into consecutive codewords, but the length of the codewords is variable. For example, frequently occurring symbols are represented by short codewords, and infrequently occurring symbols are represented by long codewords. As the variable length coding method, a context-based adaptive variable length coding (CAVLC) method is used. Arithmetic coding converts consecutive data symbols into a single prime number, and arithmetic coding obtains the optimal prime number bits required to represent each symbol. As arithmetic coding, a context-based adaptive binary arithmetic coding (CABAC) method is utilized.
[0027] The generated bitstream is encapsulated in NAL (Network Abstraction Layer) units as the basic unit. An NAL unit contains an integer number of coded coding tree units. In order to decode the bitstream in a video decoder, first, the bitstream should be separated into NAL units, and then each separated NAL unit should be decoded. On the other hand, the information required for decoding the video signal bitstream is transmitted via the RBSP (Raw Byte Sequence Payload) of higher-level sets such as the picture parameter set (PPS), sequence parameter set (SPS), video parameter set (VPS), etc.
[0028] On the one hand, the block diagram of FIG. 1 shows an encoding device 100 according to an embodiment of the present invention, and the separately shown blocks logically distinguish the elements of the encoding device 100. Therefore, the elements of the encoding device 100 described above can be mounted on one chip or a plurality of chips according to the design of the device. According to one embodiment, the operation of each element of the encoding device 100 described above is performed by a processor (not shown).
[0029] FIG. 2 is a schematic block diagram of a video signal decoding device 200 according to an embodiment of the present invention. Referring to FIG. 2, the decoding device 200 in this specification 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 decodes the video signal bitstream and extracts conversion coefficients, intra-coding information, inter-coding information, etc. for each region. The inverse quantization unit 220 inverse quantizes the entropy-decoded conversion coefficients, and the inverse transform unit 225 restores the residual value using the inverse-quantized conversion coefficients. The video signal processing device 200 restores the original pixel value by adding the residual value obtained from the inverse transform unit 225 to the predicted value obtained from the prediction unit 250.
[0031] On the other hand, the filtering unit 230 performs filtering on the picture to improve the picture quality. Here, it includes a deblocking filter for reducing the block distortion phenomenon and / or an adaptive loop filter for removing the distortion of the entire picture. The picture after filtering is output or stored in a composite picture buffer (DPB) 256 for use 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 by utilizing the encoding type decoded via the entropy decoding unit 210 described above, the conversion coefficients for each region, the intra / inter encoding information, etc. To restore the current block for which decoding is performed, the decoded regions of the current picture or other pictures including the current block are used. A picture (or tile / slice) that uses only the current picture for restoration, that is, performs only intra prediction, is called an intra picture or I picture (or tile / slice), and a picture (or tile / slice) that performs both intra prediction and inter prediction is called an inter picture (or tile / slice). A picture (or tile / slice) that uses at most one motion vector and a reference picture index to predict the sample values of each block in an inter picture (or tile / slice) is called a predictive picture or P picture (or tile / slice), and a picture (or tile / slice) that uses at most two motion vectors and a reference picture index is called a bi-predictive picture or B picture (or tile / slice). That is, a P picture (or tile / slice) uses at most one set of motion information to predict each block, and a B picture (or tile / slice) uses at most two sets of motion information to predict each block. Here, a set of motion information includes one or more motion vectors and one reference picture index.
[0033] The intra prediction unit 252 generates a prediction block by using the intra-coded information and the restored samples in the current picture. As described above, the intra-coded information includes at least one of an intra prediction mode, an MPM flag, and an MPM index. The intra prediction unit 252 predicts the pixel values of the current block by using the restored pixels located on the left side and / or the upper side of the current block as reference pixels. According to one embodiment, the reference pixels are the pixels adjacent to the left boundary of the current block and / or the pixels adjacent to the upper boundary of the current block. According to another embodiment, the reference pixels are the pixels adjacent within a preset distance from the left boundary of the current block and / or the pixels adjacent within a preset distance from the upper boundary of the current block among the pixels of the surrounding blocks of the current block. At this time, the surrounding blocks of the current block include at least one of the left (L) block adjacent to the current block, the upper (A) block, the below left (BL) block, the above right (AR) block, or the above left (AL) block.
[0034] The inter prediction unit 254 generates a prediction block by using the reference picture and the inter-coded information stored in the composite picture buffer 256. The inter-coded information includes motion information (such as a reference picture index, a motion vector, etc.) of the current block with respect to the reference block. There are L0 prediction, L1 prediction, and bi-prediction for inter prediction. The L0 prediction is a prediction using one reference picture included in the L0 picture list, and the L1 prediction means a prediction using one reference picture included in the L1 picture list. For this purpose, a set of motion information (for example, a motion vector and a reference picture index) is required. In the bi-prediction method, a maximum of two reference areas are used, and these two reference areas may exist in the same reference picture or may exist in different pictures respectively. That is, in the bi-prediction method, a maximum of two sets of motion information (for example, a motion vector and a reference picture index) are used, but the two motion vectors may correspond to the same reference picture index or may correspond to different reference picture indexes. At this time, the reference picture is displayed (or output) either before or after the current picture in time.
[0035] The inter prediction unit 254 obtains the current reference block by using the motion vector and the reference picture index. The reference block exists in the reference picture corresponding to the reference picture index. Also, the pixel value of the block specified by the motion vector or its interpolated value is used as the predictor of the current block. For motion prediction with pixel accuracy in sub-pel units, for example, an 8-tap interpolation filter is used for the luma signal, and a 4-tap interpolation filter is used for the chroma signal. However, the interpolation filter for motion prediction in sub-pel units is not limited to this. In this way, the inter prediction unit 254 performs motion compensation to predict the texture of the current unit from the previously reconstructed picture by using motion information.
[0036] A predicted value output from the intra prediction unit 252 or the inter prediction unit 254 and a residual value output from the inverse conversion unit 225 are added to generate a restored video picture. That is, the video signal decoding apparatus 200 restores the current block by using the prediction block generated from the initial velocity unit 250 and the residual obtained from the inverse conversion unit 225.
[0037] On the other hand, the block diagram of FIG. 2 shows the decoding apparatus 200 according to an embodiment of the present invention, and the separately shown blocks logically distinguish the elements of the decoding apparatus 200. Therefore, the elements of the decoding apparatus 200 described above are mounted on one chip or a plurality of chips according to the design of the device. According to one embodiment, the operations of the respective elements of the decoding apparatus 200 described above are performed by a processor (not shown).
[0038] FIG. 3 shows an example in which a Coding Tree Unit (CTU) is divided into Coding Units (CUs) within a picture. In the coding process of a video signal, a picture is divided into a sequence of coding tree units (CTUs). A coding tree unit consists of an N×N block of luma samples and two blocks of chroma samples corresponding thereto. A coding tree unit is divided into a plurality of coding units. A coding unit refers to a basic unit for processing a picture in the above-described video signal processing process, that is, processes such as intra / inter prediction, transform, quantization, and / or entropy coding. Within one picture, the size and pattern of coding units are not constant. A coding unit has a square or rectangular pattern. A rectangular coding unit (or rectangular block) includes a vertical coding unit (or vertical block) and a horizontal coding unit (or horizontal block). In this specification, a vertical block is a block whose height is greater than its width, and a horizontal block is a block whose width is greater than its height. Also, in this specification, a non-square block refers to a rectangular block, but the present invention is not limited thereto.
[0039] Referring to FIG. 3, a coding tree unit is first divided into a Quad Tree (QT) structure. That is, in a quad tree structure, one node having a size of 2N×2N is divided into four nodes having a size of N×N. In this specification, a quad tree is also referred to as a quaternary tree. Quad tree division is performed recursively, and not all nodes need to be divided to the same depth.
[0040] On one hand, 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 binary or ternary tree structure of horizontal or vertical division. 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 above tree structures, both the width and height of the node have a value that is a power of 2. For example, in a Binary Tree (BT) structure, a node of size 2N×2N is divided into two nodes of N×2N by vertical binary division and into two nodes of 2N×N by horizontal binary division. Also, in a Ternary Tree (TT) structure, a node of size 2N×2N is divided into nodes of (N / 2)×2N, N×2N, and (N / 2)×2N by vertical ternary division and into nodes of 2N×(N / 2), 2N×N, and 2N×(N / 2) by horizontal binary division. Such multi-type tree division is performed recursively.
[0041] The leaf nodes of the multi-type tree can be coding units. If the coding unit is not excessively large compared to the maximum transform length, the corresponding coding unit is used as the unit of prediction and transformation without further splitting. On the other hand, in the above-mentioned quad tree and multi-type tree, at least one of the following parameters is predefined or transmitted via the RBSP of the upper-level set such as PPS, SPS, VPS, etc. 1) Size of CTU: the size of the root node of the quad tree; 2) Minimum QT size (MinQtSize): the size of the smallest allowable QT leaf node; 3) Maximum BT size (MaxBtSize): the size of the largest allowable BT root node; 4) Maximum TT size (MaxTtSize): the size of the largest allowable TT root node; 5) Maximum MTT depth (MaxMttDepth): the maximum allowable depth of MTT splitting from the leaf node of the QT; 6) Maximum BT size (MinBtSize): the size of the largest allowable BT leaf node; 7) Minimum TT size (MinTtSize): the size of the smallest allowable TT leaf node.
[0042] Figure 4 is a diagram showing an example of a method for signaling the splitting of a quad tree and a multi-type tree. To signal the splitting of the above-mentioned quad tree and multi-type tree, a preset flag is used. Referring to Figure 4, at least one of the flag "qt_split_flag" indicating whether a quad tree node can be split, the flag "mtt_split_flag" indicating whether a multi-type tree node can be split, the flag "mtt_split_vertical_flag" indicating the splitting direction of a multi-type tree node, or the flag "mtt_split_binary_flag" indicating the splitting pattern of a multi-type tree node is used.
[0043] According to an embodiment of the present invention, the coding tree unit is the root node of a quad tree and is preferentially divided into a quad tree structure. In the quad tree structure, a "qt_split_flag" is signaled for each node "QT_node". If the value of "qt_split_flag" is 1, the corresponding node is divided into four square nodes. If the value of "qt_split_flag" 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 divided into a multi-type tree structure. In the multi-type tree structure, an "mtt_split_flag" is signaled for each node "MTT_node". If the value of "mtt_split_flag" is 1, the corresponding node is divided into a plurality of rectangular nodes. If the value of "mtt_split_flag" is 0, the corresponding node becomes a leaf node "MTT_leaf_node" of the multi-type tree. If the multi-type tree node "MTT_node" is divided into a plurality of rectangular nodes (that is, if the value of "mtt_split_flag" is 1), an "mtt_split_vertical_flag" and an "mtt_split_binary_flag" for the node "MTT_node" are further signaled. If the value of "mtt_split_vertical_flag" is 1, vertical splitting of the node "MTT_node" is indicated. If the value of "mtt_split_vertical_flag" is 0, horizontal splitting of the node "MTT_node" is indicated. Also, if the value of "mtt_split_binary_flag" is 1, the node "MTT_node" is divided into two rectangular nodes. If the value of "mtt_split_binary_flag" is 0, the node "MTT_node" is divided into three rectangular nodes.
[0045] FIG. 5 and FIG. 6 are diagrams showing in more detail the intra prediction method according to an embodiment of the present invention. As described above, the intra prediction unit uses the restored pixels located on the left side and / or the upper side of the current block as reference pixels to predict the pixel value of the current block.
[0046] First, FIG. 5 shows an embodiment of the reference samples used to predict the current block in the intra prediction mode. According to one embodiment, the reference pixels are the pixels adjacent to the left boundary of the current block and / or the pixels adjacent to the upper boundary. As shown in FIG. 5, if the size of the current block is W×H and the pixels of a single reference line adjacent to the current block are used for intra prediction, the reference pixels are set using at most 2W + 2H + 1 adjacent pixels located on the left side and / or the upper side of the current block. On the other hand, according to a further embodiment of the present invention, the pixels of multiple reference lines are used for the intra prediction of the current block. The multiple reference lines consist of n lines located within a preset range from the current block. According to one embodiment, if the pixels of multiple reference lines are used for intra prediction, separate index information indicating the lines set as reference pixels is signaled. If at least some of the adjacent pixels used as reference pixels have not been restored yet, the intra prediction unit performs a reference sample padding process according to a preset rule to obtain the reference pixels. Also, the intra prediction unit performs a reference sample filtering process to reduce the error of the intra prediction. That is, the reference pixels are obtained by filtering the pixels obtained by the adjacent pixels and / or the reference sample padding process. The intra prediction unit predicts the pixels of the current block using the reference pixels thus obtained.
[0047] Next, FIG. 6 is a diagram showing an example of a prediction mode used for intra prediction. For intra prediction, intra prediction mode information indicating an intra prediction direction is signaled. The intra prediction mode indicates any one of a plurality of intra prediction modes that constitute 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 for intra prediction (for example, 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 (for example, 65) angular modes (that is, direction modes). Each intra prediction mode is indicated via a preset index (that is, an intra prediction mode index). For example, as shown in FIG. 6, the intra prediction mode index 0 indicates the planar mode, and the intra prediction mode index 1 indicates the DC mode. Also, the intra prediction mode indices 2 to 66 respectively indicate different angular modes. The angular modes respectively indicate different angles within a preset angle range. For example, the angular mode indicates an angle within an angle range (that is, a first angle range) between 45 degrees clockwise and -135 degrees. At this time, the angular mode is defined based on the 12 o'clock direction. At this time, the intra prediction mode index 2 indicates the Horizontal Diagonal (HDIA) mode, the intra prediction mode index 18 indicates the Horizontal (HOR) mode, the intra prediction mode index 34 indicates the Diagonal (DIA) mode, the intra prediction mode index 50 indicates the Vertical (VER) mode, and the intra prediction mode index 66 indicates the Vertical Diagonal (VDIA) mode.
[0049] On the one hand, the preset angle ranges are set to be different from each other according to the pattern of the current block. For example, if the current block is a rectangular block, a wide-angle mode that indicates an angle exceeding 45 degrees clockwise or less than -135 degrees is further used. If the current block is a horizontal block, the angle mode indicates an angle within an angle range (i.e., the second angle range) from (45 + offset1) degrees to (-135 + offset1) degrees clockwise. At this time, angle modes 67 to 76 that deviate from the first angle range are further used. Also, if the current block is a vertical block, the angle mode indicates an angle within an angle range (i.e., the third angle range) from (45 - offset2) degrees to (-135 - offset2) degrees clockwise. At this time, angle modes -10 to -1 that deviate from the first angle range are further used. According to an embodiment of the present invention, the values of offset1 and offset2 are determined to be different from each other according to the ratio between the width and height of the rectangular block. Also, offset1 and offset2 are positive numbers.
[0050] According to an additional embodiment of the present invention, the plurality of angle modes constituting the intra prediction mode set include a basic angle mode and an extended angle mode. At this time, the extended angle mode is determined based on the basic angle mode.
[0051] According to one embodiment, the basic angle mode is a mode corresponding to the angle used in the intra prediction of the conventional HEVC (High Efficiency Video Coding) standard, and the extended angle mode is a mode corresponding to the angle newly added in the intra prediction of the next-generation video codec standard. More specifically, the basic angle mode is an angle mode corresponding to any one of the intra prediction modes {2, 4, 6, …, 66}, and the extended angle mode is an angle mode corresponding to any 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 basic angle mode is a mode corresponding to an angle within a preset first angle range, and the extended angle mode is a wide-angle mode deviating from the first angle range. That is, the basic angle mode is an angle mode corresponding to any one of the intra prediction modes {2, 3, 4, …, 66}, and the extended angle mode is an angle mode corresponding to any one of the intra prediction modes {-10, -9, …, -1} and {67, 68, …, 76}. The angle indicated by the extended angle mode is determined to be the angle on the opposite side of the angle indicated by the corresponding basic angle mode. Therefore, the angle indicated by the extended angle mode is determined based on the angle indicated by the basic angle mode. On the other hand, the number of extended angle modes is not limited to this, and a further extended angle is defined according to the size and / or pattern of the current block. For example, the extended angle mode may be defined as an angle mode corresponding to any one of the intra prediction modes {-14, -13, …, -1} and {67, 68, …, 80}. On the other hand, the total number of intra prediction modes included in the intra prediction mode set varies according to the configurations of the basic angle mode and the extended angle mode described above.
[0053] In the above embodiment, the interval between the extended angle modes is set based on the interval between the corresponding basic angle modes. For example, the interval between the extended angle modes {3, 5, 7, …, 65} is determined based on the interval between the corresponding basic angle modes {2, 4, 6, …, 66}. Also, the interval between the extended angle modes {-10, -9, …, -1} is determined based on the interval between the corresponding opposite basic angle modes {56, 57, …, 65}, and the interval between the extended angle modes {67, 68, …, 76} is determined based on the interval between the corresponding opposite basic angle modes {3, 4, …, 12}. The angular interval between the extended angle modes is set in the same way as the angular interval between the corresponding basic angle modes. Also, in the intra prediction mode set, the number of extended angle modes is set to be less than or equal to the number of basic angle modes.
[0054] According to an embodiment of the present invention, the extended angle mode is signaled based on the basic angle mode. For example, the wide-angle mode (i.e., the extended angle mode) replaces at least one angle mode (i.e., the basic angle mode) within the first angle range. The basic angle mode to be replaced is the angle mode corresponding to the opposite side of the wide-angle mode. That is, the basic angle mode to be replaced corresponds to the angle in the opposite direction of the angle indicated by the wide-angle mode, or the angle mode corresponding to the angle with a preset offset index difference from the angle in the opposite direction. According to an embodiment of the present invention, the preset offset index is 1. The intra prediction mode index corresponding to the basic angle mode to be replaced is further mapped to the corresponding wide-angle mode to signal the corresponding wide-angle mode. For example, the wide-angle modes {-10, -9, …, -1} are respectively signaled by the intra prediction mode indices {57, 58, …, 66}, and the wide-angle modes {67, 68, …, 76} are respectively signaled by the intra prediction mode indices {2, 3, …, 11}. By making the intra prediction mode index for the basic angle mode signal the extended angle mode in this way, even if the configurations of the angle modes used for intra prediction of each block are different from each other, the same set of intra prediction mode indices is used for signaling the intra prediction mode. Therefore, the signaling overhead due to the change in the configuration of the intra prediction mode is minimized.
[0055] On the other hand, whether the extended angle mode can be used is determined based on at least one of the pattern and size of the current block. According to one embodiment, if the size of the current block is larger than a preset size, the extended angle mode is used for intra prediction of the current block; otherwise, only the basic angle mode is used for intra prediction of the current block. According to other embodiments, if the current block is a non-square block, the extended angle mode is used for intra prediction of the current block; if the current block is a square block, only the basic angle mode is used for intra prediction of the current block.
[0056] The intra prediction unit determines reference pixels and / or interpolated reference pixels used for intra prediction of the current block based on the intra prediction mode information of the current block. If the intra prediction mode index indicates a specific angle mode, a reference pixel or an interpolated reference pixel corresponding to the specific angle from the current pixel of the current block is used for prediction of the current pixel. Thus, different sets of reference pixels and / or interpolated reference pixels are used for intra prediction according to the intra prediction mode. After the intra prediction of the current block is performed using the reference pixels and the intra prediction mode information, the decoder adds the residual signal of the current block obtained from the inverse transform unit to the intra prediction value of the current block to restore the pixel value of the current block.
[0057] FIG. 7 is a diagram showing an example of a method for signaling the intra prediction mode selected by the encoder to the decoder. Assuming that the total number of intra prediction modes included in the intra prediction mode set is T (for example, 67), the method of simply expressing and signaling the T modes in binary is inefficient because it does not consider the probability that each mode is selected and the context of the corresponding block and neighboring blocks. Therefore, if a list of some modes with a high probability of being used for the current block among all the modes is managed separately, efficient signaling can be performed.
[0058] According to an embodiment of the present invention, for intra prediction of a current block, at least one prediction mode list consisting of some modes among all intra prediction modes is managed. The first prediction mode list for intra prediction is an MPM list. The intra prediction modes included in the MPM list are MPM modes, and the intra prediction modes not included in the MPM list are referred to as non-MPM modes. The encoder signals an MPM flag for distinguishing 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, by using a separate coding method for MPM modes, efficient signaling can be performed with fewer bits. Assuming that the number of MPM modes included in the MPM list is m, the number of non-MPM modes is T - m. If the number m of MPM modes is smaller than the number T - m of non-MPM modes, the MPM modes are coded in truncated unary binary evolution, and the non-MPM modes are coded in truncated binary binary evolution.
[0060] The MPM list is configured by considering various contexts step by step as follows. First, the MPM list consists of the intra prediction modes and the planar / DC modes used in the surrounding blocks of the current block (context M0). If there is a block encoded in the intra prediction mode among the restored surrounding blocks, due to the regional similarity of the picture, the current block may use the same intra prediction mode as that block. Therefore, the MPM list is configured to include the intra prediction modes of the surrounding blocks. According to one embodiment, the surrounding blocks of the current block include at least one of the left (L) block adjacent to the current block, the upper (A) block, the lower left (BL) block, the upper right (AR) block, or the upper left (AL) block. For example, the surrounding 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 lowermost 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. Specific examples of the surrounding blocks for constructing the MPM list will be further described with reference to FIG. 8. The intra prediction modes, planar mode, and DC mode selected in the surrounding blocks of the current block are added to the MPM list in the preset order. For example, the MPM list is configured in the order of {the mode of block L, the mode of block A, planar mode, DC mode, the mode of block BL, the mode of block AR, the mode of block AL}.
[0061] Second, if the number m of MPM modes cannot be filled by the above method, additional context conditions (e.g., context M1, context M2,...) are applied to fill the MPM list. When applying the additional context conditions, the intra prediction modes already included in the MPM mode are not newly added.
[0062] On one hand, among all T intra prediction modes, the remaining T - m non - MPM modes not included in the MPM list are coded using truncated binary coding. If truncated binary coding is used, assuming 2^(k - 1)<T - m<2^(k), the initial 2^(k)-(T - m) indices are signaled using K - 1 bits (or bins), and the remaining indices are signaled using k bits (or bins). Therefore, further context conditions (i.e., context N) can be applied to non - MPM modes, and the modes that are relatively likely to be selected in the corresponding block can be signaled with an index composed of k - 1 bits to minimize the signaling overhead.
[0063] According to a further embodiment of the present invention, a second prediction mode list composed of some of 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 selected mode 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 further classifying the non-MPM mode, the selection mode is coded with a fixed length. At this time, further context conditions (for example, context S) are applied to the selection mode, and the modes that are likely to be selected in the corresponding block are preferentially arranged. At this time, s (where s is a power of 2) selection modes are coded with a fixed length, and the remaining ns non-selection modes are coded with truncated binary evolution. The ns non-selection modes are signaled using any l-1 bits (or bins), or l bits (or bins). At this time, further context conditions (that is, context NS) are applied to the non-selection mode, and the modes that are relatively likely to be selected in the corresponding block are signaled with an index consisting of l-1 bits to minimize the signaling overhead.
[0065] Specific examples of the above context conditions will be described later with reference to the drawings. The context conditions additionally defined in the following examples are applied individually or repeatedly to various configurations to which the context conditions {M0, M1, M2, N, S, NS} are applied. For example, a context condition for signaling the basic angle mode with priority over the extended angle mode may be further used. Also, a context condition for preferentially adding to the prediction mode list an angle mode obtained by adding an arbitrary offset (for example, -1, +1) to the angle mode of the block derived through the first context condition (for example, context M0) of the MPM mode may be used. Such context conditions are applied as context conditions for one or more of the MPM mode, non-MPM mode, selection mode, or non-selection mode.
[0066] According to a further embodiment of the present invention, the above-described intra prediction method is determined based on the number and / or intra prediction mode information of neighboring blocks. For example, the division into the MPM mode, non-MPM mode, selection mode, and non-selection mode, the number of intra prediction modes signaled for each mode (i.e., m, T-m, s, and ns), and the method by which each mode is encoded (i.e., truncated unary coding, truncated binary coding, fixed-length coding), etc. are variably configured according to the number or value of the intra prediction modes of neighboring blocks. At this time, the neighboring blocks are preset blocks referred to for constructing the MPM list.
[0067] First, after considering the intra prediction modes of the neighboring blocks of the current block to construct the MPM list, the variable configuration is applied based on the total number of prediction modes. If the current block is a block in a B frame or a P frame, the method of constructing the MPM list is changed according to the number of blocks for which intra prediction is performed and / or the number of prediction modes among the neighboring blocks. When this is further extended, different methods are used between the I frame and the B / P frame to construct the MPM list. Since all neighboring blocks in the I frame are configured by intra prediction, the following second method or a similar method is applied without applying the above-described first method.
[0068] Second, the variable configuration is applied based on the number of different intra prediction modes used in the peripheral blocks. For example, the method of constructing the MPM list is changed depending on whether all the intra prediction modes used in the peripheral blocks are the same or different from each other. Or, the method of constructing the MPM list is changed depending on the degree of difference between the intra prediction modes used in the peripheral blocks. The degree of difference between the intra prediction modes used in the peripheral blocks is determined based on whether the number of intra prediction modes used in the peripheral blocks is equal to or greater than a preset value. Also, the degree of difference between the intra prediction modes used in the peripheral blocks is determined based on the difference in the mode values of the intra prediction modes used in the peripheral blocks. If the degree of difference between the intra prediction modes used in the peripheral blocks satisfies a preset criterion, the MPM list is constructed based on the first method. However, if the degree of difference between the intra prediction modes used in the peripheral blocks does not satisfy the preset criterion, the MPM list is constructed based on a second method different from the first method. On the other hand, the peripheral blocks of the current block considered for generating the variable MPM list described above basically include blocks at additional positions in addition to the preset positions. Specific embodiments thereof will be described with reference to FIG. 8.
[0069] FIG. 8 is a diagram showing a detailed embodiment of a method for signaling an intra prediction mode. FIGS. 8(a) and 8(b) are diagrams showing embodiments of peripheral blocks referred to for constructing a prediction mode list. FIG. 8(c) is a diagram showing an embodiment of the method for signaling the intra prediction mode described above. Also, FIG. 8(d) is a diagram showing an embodiment of signaling a non-selection mode by truncating binary evolution.
[0070] First, FIG. 8(a) is a diagram showing an example of the relative positions of peripheral blocks referred to for constructing an MPM list. Referring to FIG. 8(a), the peripheral blocks are referred to in the order of the left (L) block adjacent to the current block, the upper (A) block, the lower left (BL) block, the upper right (AR) block, or the upper left (AL). At this time, the intra prediction mode, planar mode, and DC mode selected from the peripheral blocks are added to the MPM list in the preset order. However, in the embodiments of the present invention, the peripheral blocks referred to for constructing the MPM list are not limited to this. For example, the peripheral 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 lowermost 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, FIG. 8(b) is a diagram showing another example of the relative positions of peripheral blocks referred to for constructing an MPM list. The peripheral blocks of the current block are divided into a smaller size than the current block, and there are a plurality of blocks adjacent to the left or upper boundary of the current block. At this time, the intra prediction modes of the plurality of blocks adjacent to the left or upper boundary of the current block are referred to for constructing the MPM list. In the embodiment of FIG. 8(b), the plurality of blocks adjacent to the left boundary of the current block are designated as L0 and L1 from bottom to top, and the plurality of blocks adjacent to the upper boundary of the current block are designated as A0 and A1 from right to left.
[0072] According to the first embodiment, the MPM list is configured in the order of {the L mode of block L0, the mode of block A0, the planar mode, the DC mode, the mode of block BL, the mode of block AR, and the mode of block AL}. According to the second embodiment, the MPM list is configured in the order of {the L mode of block L0, the mode of block L1, the mode of block A0, the mode of block A1, the planar mode, the DC mode, the mode of block BL, the mode of block AR, and the mode of block AL}. At this time, the positions and numbers of the peripheral blocks to be further referred to are variable. Also, additional blocks are referred to at the lower left block (BL), upper right block (AR), and upper left block (AL) adjacent to the current block. According to the third embodiment, the MPM list is configured in the order of {the L mode of block L0, the mode of block A0, the planar mode, the DC mode, the mode of block L1, the mode of block A1, the mode of block BL, the mode of block AR, and the mode of block AL}. That is, by prioritizing the planar mode and the DC mode, which have a high selection probability, over the mode of block L1 and the mode of block A1 in the order in which they are selected in the MPM list, the signaling overhead can be reduced. According to the fourth embodiment, the MPM list is configured in the order of {the L mode of block L0, the mode of block A0, the planar mode, the DC mode, the mode of block BL, the mode of block AR, the mode of block AL, the mode of block L1, and the mode of block A1}. That is, after the order of the MPM list configuration according to the first embodiment described above, block L1 and block A1 are referred to.
[0073] According to a further embodiment of the present invention, the order of constructing the MPM list is determined based on the pattern of the current block. More specifically, if the current block is a block that is not square, the reference order of the surrounding blocks is determined such that it differs depending on whether the current block is a vertical block or a horizontal block. For example, if the current block is a vertical block, the left block is preferentially referenced over the upper block, and if the current block is a horizontal block, the upper block is preferentially referenced over the left block. According to another embodiment, the order of constructing the MPM list is determined by comparing the pattern of the current block with the patterns of the surrounding blocks. For example, if the current block is a vertical block, the intra prediction modes used for vertical blocks among the preset surrounding blocks are preferentially included in the MPM list.
[0074] According to still another embodiment of the present invention, the order of constructing the MPM list is determined in consideration of 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, the angle modes within a preset range from the vertical (VER) mode 50 or between the diagonal (DIA) mode 34 and the vertical diagonal (VDIA) mode 66 among the angle modes used in the preset surrounding blocks are preferentially included in the MPM list. According to a further embodiment, the intra prediction modes included in the MPM list of the surrounding blocks are included in the MPM list of the current block. At this time, if the MPM list of the current block is not filled with the intra prediction modes used for the surrounding blocks, the intra prediction modes included in the MPM list of the surrounding blocks are added to the MPM list of the current block.
[0075] FIG. 8(c) is a diagram showing an example of a method for signaling the intra prediction mode described above. Among the total T intra prediction modes, m modes are classified into the MPM mode and signaled by truncated unary coding. According to one example, T is 67 and m is 6. In truncated unary coding, as the signaling index increases, the number of bits (or bins) used increases. Therefore, a mode that is relatively likely to be selected in the corresponding block is matched with a lower index value to improve the signaling efficiency. For this purpose, the encoder and the decoder construct the MPM list under the same context conditions, and the derived mode values are rearranged and signaled based on the context conditions. For example, the selected modes are classified in the order of non-angle modes such as DC / planar mode, vertical mode, and planar angle mode, and CABAC encoding is performed. Next, s selected modes determined by any context condition are signaled with fixed-length bits, and the remaining ns non-selected modes are signaled by truncated binary coding. According to one example, n is 16 and ns is 45.
[0076] FIG. 8(d) is a diagram showing an example of signaling non-selected modes by truncated binary coding. According to the above example, the number of non-selected modes ns is 45. If truncated binary coding is used, since 2^5 < 45 < 2^6, the initial 2^6 - 45 = 19 indexes are signaled using 5 bits (or bins), and the remaining 26 indexes are signaled using 6 bits (or bins). Therefore, a preset context condition is also applied to the non-selected modes, and a mode that is relatively likely to be selected in the corresponding block is matched with a lower index value that is signaled with 5 bits (or bins). Specific examples of the preset context condition will be described with reference to the following drawings.
[0077] FIG. 9 is an example of context conditions applied to the intra prediction mode, and shows a method of applying an offset preset for the angle mode. According to an embodiment of the present invention, a new priority is given to an angle mode obtained by adding or subtracting the offset preset for the angle mode having a specific priority. For example, the first priority or the second priority is given to an angle mode obtained by adding or subtracting the offset preset for the angle mode having the first priority. According to an embodiment, among the entire intra prediction modes, the mode having the first priority is preferentially selected over the remaining modes. Further, the remaining modes are classified into a mode having the second priority and a mode having the third priority, and the mode having the second priority is preferentially selected over the mode having the third priority. Here, the preferentially selected mode matches a low-value index signaled with fewer bits.
[0078] More specifically, assuming that the intra prediction mode indexes a, b, and c have the first priority, the first priority or the second priority is given to the modes of the intra prediction mode indexes a-offset, a+offset, b-offset, b+offset, c-offset, and c+offset (where offset is a non-zero integer). For example, the first priority is given to the mode selected from the peripheral blocks in the process of constructing the MPM list, and the first priority or the second priority is given to the angle mode obtained by adding -1 or +1 to the angle mode among the modes selected from the peripheral blocks. By giving the same or the next priority to the mode obtained by adding or subtracting the preset offset to the most priority mode, a high priority is given to the mode having similarity to the most priority mode.
[0079] However, referring to FIG. 9, when the angle mode is limited within a preset angle range, the angle mode obtained by adding or subtracting an offset to a specific angle mode may deviate from the preset range. For example, if the angle mode of the intra prediction mode set is limited from intra prediction mode 2 to 66, and the preset offset is 1, then the intra prediction mode 1 obtained by subtracting the offset from intra prediction mode 2, or the intra prediction mode 67 obtained by adding the offset to intra prediction mode 66 will deviate from the preset angle range. That is, the 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 such problems is necessary.
[0080] According to an embodiment of the present invention, if the angle mode obtained by adding or subtracting an offset to a specific angle mode deviates from the set angle range, the angle mode determined cyclically from the angle mode set within the corresponding range is selected. That is, if the angle mode obtained by adding or subtracting an offset to a specific angle mode deviates from the preset angle range, the angle mode located on the opposite side of the specific angle mode among the angle mode sets within the corresponding range is selected. For example, if the angle mode set within the preset angle range consists of modes {a, b, c, d, e, f} in ascending order of the intra prediction mode index, then adding an offset of 1 to mode f selects mode a, and adding an offset of 2 to mode f selects mode b. Similarly, subtracting an offset of 1 from mode a selects mode f, and subtracting an offset of 2 from mode a selects mode e. Referring to FIG. 9, when an offset is added to the vertical diagonal mode VDIA, the horizontal diagonal mode HDIA or an angle mode near it is selected. That is, VDIA+1 is matched with HDIA, and VDIA+2 is matched with HDIA+1. Also, HDIA-1 is matched with VDIA, and HDIA-2 is matched with VDIA-1.
[0081] According to another embodiment of the present invention, if the angular mode obtained by adding or subtracting an offset to the specific angular mode deviates from the set angular range, the angular mode obtained by adding or subtracting the offset is ignored. When adding or subtracting a preset offset to the specific angular mode, an angular mode similar to the specific angular mode is selected. However, if an angular mode determined cyclically as in the previous embodiment is selected, an angular mode located on the opposite side of the specific angular mode may be selected, reducing the similarity between the selected angular modes. Therefore, if the angular mode obtained by adding or subtracting an offset deviates from the preset angular range, the corresponding angle is not selected. For example, if among the modes a-offset, a+offset, b-offset, b+offset, c-offset, and c+offset obtained by adding or subtracting an offset to the preselected modes {a, b, c}, the mode c+offset deviates from the preset angular range, the remaining modes a-offset, a+offset, b-offset, b+offset, and c-offset excluding the mode c+offset are selected.
[0082] According to still another embodiment of the present invention, if the angular mode obtained by adding or subtracting a first offset to the specific angular mode deviates from the set angular range, the angular mode obtained by subtracting or adding a second offset to the specific angular mode is selected. Alternatively, if the angular mode obtained by adding or subtracting a first offset to the specific angular mode deviates from the set angular range, the angular mode obtained by further adding or subtracting the second offset is selected. At this time, the second offset has a value different from that of the first offset. For example, if the mode a+offset1 deviates from the preset angular range, the mode a-offset2 or the mode a+offset1-offset2 is selected. Referring to FIG. 9, the angular mode VDIA+1 obtained by adding a first offset 1 to the preselected vertical diagonal mode VDIA deviates from the preset angular range. At this time, the angular mode VDIA-2 obtained by subtracting a second offset 2 from the angular mode VDIA 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 the method described above.
[0083] According to still 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 set angle range, an angle mode obtained by adding or subtracting a second offset to the specific angle mode is selected. At this time, the absolute value of the second offset is smaller than the absolute value of the first offset. For example, if the mode a+offset1 deviates from the set angle range, the mode a+offset2 is selected. More specifically, if the preselected angle modes are VDIA and HDIA, VDIA+offset1 may deviate from the set angle range. Therefore, if the preselected angle modes are VDIA and HDIA, VDIA+offset2 is selected. Also, referring to FIG. 9, the angle mode VDIA-1+2 obtained by adding the first offset 2 to the preselected vertical diagonal mode VDIA-1 deviates from the set angle range. At this time, the angle mode VDIA-1+1 obtained by adding the second offset 1 to the angle mode VDIA-1 is selected. If the angle mode selected by applying the second offset overlaps with the preselected angle mode, a third offset different from the second offset is used in a manner similar to the method described above.
[0084] FIG. 10 is another embodiment of context conditions applied to the intra prediction mode, and shows a method of constructing a prediction mode list in consideration of the minimum and maximum values of the angles or indexes of the preselected angle modes in the prediction mode list. In an embodiment of the present invention, the prediction mode list includes an MPM list and a selection mode list, but the present invention is not limited thereto.
[0085] In intra prediction, the intra prediction mode of the current block is similar to the intra prediction modes of neighboring blocks. For example, the angular mode of the current block is the same as or similar to one of the angular modes of the neighboring blocks. Therefore, if there is a pre-configured first prediction mode list for the current block, a second prediction mode list is configured considering the elements of the first prediction mode list. According to one embodiment, the second prediction mode list is configured based on the minimum value and / or maximum value of the angles or indices (i.e., intra prediction mode indices) of the angular modes included in the first prediction mode list. The intra prediction modes in the second prediction mode list are given a higher priority than the intra prediction modes other than those in the first and second prediction mode lists.
[0086] More specifically, if the minimum value and maximum value of the angles or indices of the angular modes included in the first prediction mode list are denoted as "min" and "max" respectively, the angular modes included in the second prediction mode list are selected within the range of "min" or more and "max" or less, or within the range exceeding "min" and less than "max". According to one embodiment, the angular modes evenly distributed (i.e., having a constant index difference or a constant angle difference) between the minimum value and maximum value determined based on the first prediction mode list are included in the second prediction mode list. In this way, the angular modes included in the second prediction mode list have a higher priority than the angular modes not included in the first or second prediction mode list.
[0087] According to another embodiment, the angular modes included in the second prediction mode list are selected within the range of "min - offset1" or more and "min + offset2" or less, or within the range exceeding "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 as each other or may have different values from each other. According to one embodiment, offset1 and offset2 are set to the same value. However, if the range set based on the offset deviates from the preset angular range as in the embodiment of FIG. 9, offset1 and offset2 are set to different values from each other. According to another embodiment, based on the distribution of the angular modes included in the first prediction mode list, offset1 and offset2 are set to the same value as each other or different values from each other. For example, if the angular modes included in the first prediction mode list are not uniformly distributed, offset1 and offset2 are set to different values from each other. The angular modes uniformly distributed (i.e., having a certain index difference or a certain angular difference) between the "min - offset1" and "min + offset2" determined based on the first prediction mode list are included in the second prediction mode list. For example, if the number of modes selected in the second prediction mode list is n, then m = floor(((max - offset2)-(min - offset1)) / (n + 1)) is set, and the second prediction mode list includes angular modes corresponding to the indices or angles "min - offset1 + m", "min - offset1 + 2m", …, "min - offset1 + nm". In this way, the angular modes included in the second prediction mode list have a higher priority than the angular modes not included in the first or second prediction mode list.
[0088] Referring to FIG. 10, the first prediction mode list is the MPM list. Also, the minimum value and the maximum value of the index of the angular mode included in the MPM list configured according to a preset rule are referred to as "MPM_min" and "MPM_max", respectively. At this time, as in the above-described embodiment, the second prediction mode list is configured based on the MPM list in consideration of the similarity between the current block and the peripheral blocks. For example, the second prediction mode list is configured based on "MPM_min" and "MPM_max". More specifically, angular modes uniformly distributed between "MPM_min - offset" and "MPM_min + offset" (that is, having a constant index difference or a constant angular difference) are included in the second prediction mode list. Here, offset is a non-negative integer.
[0089] As in the above-described embodiment, if the second prediction mode list is configured based on the first prediction mode list, intra prediction using the first and second prediction mode lists is performed. According to one embodiment, the second prediction mode list is used for the selection 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 selected from among the non-MPM modes signaled using k - 1 or k bits. Also, the first prediction mode list and the second prediction mode list refer to the first set and the second set of the same prediction mode list. That is, in the embodiment of FIG. 10 described above, the first prediction mode list and the second prediction mode list are respectively replaced with the first set of the prediction mode list and the second set of the prediction mode list. Here, the prediction mode list is the MPM list or the selection mode list.
[0090] FIG. 11 is another embodiment of the context condition applied to the intra prediction mode, and shows a method of configuring a prediction mode list in consideration of the basic angular mode. As described above, the plurality of angular modes constituting the intra prediction mode set include the basic angular mode and the extended angular mode.
[0091] According to an embodiment of the present invention, the prediction mode list is configured by preferentially considering the basic angle mode. The angle modes included in the prediction mode list have a higher priority than the angle modes not included in the list. According to an embodiment, the method of configuring the prediction mode list by preferentially considering the basic angle mode is applied under the condition that the surrounding blocks use the basic angle mode. Further, the method of configuring the prediction mode list by preferentially considering the basic angle mode is applied under the condition that the number of surrounding blocks using the basic 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 may impose a burden on complexity. Therefore, in order to reduce the complexity in the intra prediction mode determination step, the encoder first calculates the rate-distortion cost only for a preset angle mode, for example, the basic angle mode, and selects the intra prediction mode. Next, the encoder further calculates the rate-distortion cost for the surrounding angle modes of the selected basic angle mode and selects the intra prediction mode.
[0093] Considering the similarity between the current block and the surrounding blocks and the embodiments of the encoder described above, it is highly likely that the current block uses the basic angle mode. Therefore, a prediction mode list with priorities is configured based on the basic angle mode. First, if the number of elements of the prediction mode list to be configured is less than the total number of basic angle modes, a part of the basic angle modes is selected to configure the prediction mode list. For example, if the number of basic angle modes is 33 and the number of elements of the prediction mode list to be configured is 16, the basic angle modes are selected every other one starting from any one of the basic angle modes of the whole. That is, in the embodiment of FIG. 13, angle modes 4, 8, 12, 16, …, 60, and 64 are selected. According to one embodiment, the prediction mode list consisting of the intra prediction modes thus selected is used for the selection mode list. As another embodiment of the present invention, the number of elements of the prediction mode list to be configured is defined based on the number of basic angle modes. For example, if the number of basic angle modes is 33, the number of elements of the prediction mode list to be configured is defined as 33 or 32 (= 33 - 1), etc.
[0094] As described above, the extended angle mode is signaled based on the basic angle mode. The extended angle mode is signaled using the intra prediction mode index for the basic angle mode. For example, when a prediction mode list based on the basic angle mode is configured, the extended angle is signaled via an offset or an on / off flag with reference to the list. More specifically, if a prediction mode list is configured based on the basic angle modes {a, b, c, d}, the offsets {offset1, offset2, offset3, offset4} corresponding to the respective angle modes are signaled. Based on the signaled offsets, the angle modes {a + offset1, b + offset2, c + offset3, d + offset4} are indicated. According to another embodiment, a flag indicating whether to use the offset corresponding to the basic angle mode is separately transmitted. For example, a flag corresponding to the basic angle mode a is transmitted. If the value of the flag is 1, the angle mode a + offset1 is indicated, and if the value of the flag is 0, the angle mode a is indicated.
[0095] FIG. 12 is a diagram showing an example of referring to peripheral blocks for intra prediction of a current block. In FIG. 12, it is assumed that there are peripheral blocks adjacent to the left or upper boundary of the current block. Hereinafter, a method of configuring a prediction mode list for the current block by referring to the peripheral blocks of the current block will be described. The prediction mode list includes, but is not limited to, the MPM list, the selected mode, and the non-selected mode list itself or a set of a part thereof.
[0096] 1) Method for constructing the MPM list (first method). According to an embodiment of the present invention, the MPM list for the current block is constructed in the following manner. If there are a plurality of peripheral blocks adjacent to the left or upper boundary of the current block, the information on the intra prediction mode used in the corresponding block is comprehensively considered. At this time, the peripheral blocks adjacent to the left or upper boundary of the current block refer to the blocks adjacent to the left side having the height of the height "Cur_block_height" of the current block, or the upper side having the length of the width "Cur_block_width" of the current block.
[0097] For example, as shown in FIG. 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. At this time, the order of referring to the peripheral blocks adjacent to the current block is configured in the following embodiments.
[0098] According to the first embodiment, the MPM list is configured in the order of {the L mode of block L0, the mode of block L1, …, the mode of block A0, the mode of block A1, …, the planar mode, the DC mode, the mode of block BL, the mode of block AR, the mode of block AL}. That is, the MPM list is configured by referring to the blocks adjacent to the left boundary and the upper boundary of the current block in order. According to the second embodiment, the MPM list is configured in the order of {the L mode of block L0, the mode of block A0, the mode of block L1, the mode of block A1, the mode of block L_x, the mode of block A_x, the mode of block L_x+1, the mode of block A_x+1, …, the planar mode, the DC mode, the mode of block BL, the mode of block AR, the 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 referred to first, and then the remaining blocks adjacent to the left boundary and the upper boundary of the current block are alternately referred to in order to configure the MPM list. According to the third embodiment, the MPM list is configured in the order of {the mode of block L0, the mode of block A0, the planar mode, the DC mode, the mode of block BL, the mode of block AR, the mode of block AL, the mode of block L1, …, the mode of block A1, …}. 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 referred to first, and after adding the planar mode and the DC mode, the remaining blocks adjacent to the left boundary and the upper boundary of the current block are alternately referred to in order to configure the MPM list. According to other embodiments, 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 configured using it. On the other hand, in the above-described embodiments, the representative blocks adjacent to the left / upper boundary of the current block are set to blocks at positions other than L0 and A0. For example, the blocks closest to the middle points of the left and upper faces of the current block may be set as the representative blocks, respectively.
[0099] On the one hand, in FIG. 12, an example is shown where the number of peripheral blocks adjacent to the left or upper boundary of the current block is 2 or 3 respectively. However, the above-described embodiments can be extended and applied even if the number of peripheral blocks increases. Also, although the above embodiments have been described based on the peripheral blocks on the left and upper sides of the current block, they are similarly applicable to the peripheral blocks located at the lower left (BL), upper right (AR), and upper left (AL) of the current block. Specific embodiments thereof will be described with reference to FIG. 13. If the MPM list cannot be filled by the above-described method, an offset set in advance for a preselected angular mode is applied to the MPM list to add to the MPM list. That is, an angular mode obtained by adding or subtracting the offset set in advance for a preselected angular mode to the MPM list is added to the MPM list. At this time, the preset offset is a non-zero integer.
[0100]
[0101] According to another embodiment of the present invention, when applying the first method, the lower modes not included in the MPM list among the intra prediction modes of the peripheral blocks are preferentially included in the selection mode list. If the selection mode list cannot be filled in this way, an offset set in advance for a pre-selected angular mode in the selection mode list is applied to add to the selection mode list. According to another embodiment, a selection mode list is configured by applying an offset (i.e., offset1) set in advance to the angular mode of the peripheral block. For example, based on the remaining angular modes excluding the planar mode and the DC mode from any one of the embodiments of the first method, a selection mode list is configured as follows. {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}. At this time, the preset offset is determined in various ways. For example, the offset is a positive integer, and its value is set to start from 1 and increase by 1 each time. Also, the offset may be a positive integer, and its value may be set to start from 1 and increase in multiples of 2. Also, the offset may start from an integer greater than 1 and increase, and the scale of increase may be extended to multiples of 2 or 3, etc. Also, the offset may be set to start from a preset initial value (for example, 10) and gradually decrease.
[0102] 3) Method for constructing the non-selection mode list (third method). When constructing the non-selection mode list, the intra prediction modes used in the neighboring blocks of the current block are also used in a similar manner to the first method described above. For example, if the non-selection mode list consists of 45 intra prediction modes and is signaled by truncated binary coding, the upper 19 modes are signaled with one less bit than the 20th and subsequent modes. That is, the intra prediction modes of the non-selection mode list are divided into a first set signaled by an index consisting of l - 1 bits and a second set signaled by an index consisting of l bits. At this time, the angular mode selected based on the priority order of referring to the neighboring blocks by the first method described above is included in the first set. If the first set cannot be filled in such a way, the angular mode obtained by applying an offset preset to the angular mode preselected for the first set is added to the first set.
[0103] According to another embodiment of the present invention, the lower modes among the intra prediction modes of the neighboring blocks that are not included in the MPM list and / or the selection mode list are preferentially included in the first set. If the first set cannot be filled in such a way, the angular mode obtained by applying an offset preset to the angular mode preselected for the first set is added to the first set. According to still another embodiment, the first set is configured as follows based on the angular modes of the neighboring blocks in a similar manner to the second method. {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}. At this time, the preset offset (i.e., offset2) used to configure the first set is set to a value different from the offset (i.e., offset1) used to configure the MPM list and the offset used to configure the selection mode list.
[0104] FIG. 13 is a diagram showing another example of referring to peripheral blocks for intra prediction of a current block. The example of FIG. 12 that performs intra prediction of a current block by referring to a plurality of peripheral blocks is extended and applied not only to the left side (L) and the upper side (A) of the current block, but also to the peripheral blocks located at the lower left side (BL), the upper right side (AR), and the upper left side (AL) of the current block.
[0105] The definition of the peripheral blocks located on the left side or the upper side of the current block is the same as that of the example of FIG. 12. Further, the peripheral blocks located at the lower left side (BL), the upper right side (AR), and the upper left side (AL) of the current block are defined. First, the peripheral block located at the lower left side (BL) of the current block refers to the block adjacent to the surface extended downward by a length of "BL_block_height" from the left side surface of the current block. Also, the peripheral block located at the upper right side (AR) of the current block refers to the block adjacent to the surface extended rightward by a length of "AR_block_width" from the upper side surface of the current block. Similarly, the peripheral block located at the upper left side (AL) of the current block refers to the block adjacent to the surface extended downward by a length of "AL_block_width" from the upper side surface of the current block. According to one example, the length of "BL_block_height" is set to be the same as the length of "Cur_block_height" or an integer multiple of the length of "Cur_block_height". Also, the lengths of "AR_block_width" and "AL_block_height" are set to be the same as the length of "Cur_block_width" or an integer multiple of the length of "Cur_block_width". At this time, all available blocks among the blocks at the corresponding positions are referred to for intra prediction of the current block. Also, the size of the referable blocks is defined in advance, and only blocks with a size smaller or larger than the corresponding size are referred to for intra prediction of the current block. Also, if the current block is not a square block, the pattern of the peripheral blocks referred to may be different according to the size of the current block.
[0106] For example, as shown in FIG. 13, if the peripheral blocks located at the lower left side (BL) of the current block are BL0, BL1, and BL2, the peripheral blocks located at the upper right side (AR) of the current block are AR0 and AR1, and the peripheral blocks located at the upper left side (AL) of the current block are AL0, AL1, and AL2, the prediction mode list is configured in the following order. {Mode of block L0, mode of block L1, …, mode of block A0, mode of block A1, …, planar mode, DC mode, mode of block BL0, mode of block BL1, mode of block BL2, …, mode of block AL0, mode of block AL1, …, mode of block AR0, mode of block AR1, …}. According to an embodiment of the present invention, the MPM list is configured based on the configuration order of such a prediction mode list. Also, in the prediction mode list, a selection mode list may be configured using only angle modes. If the selection mode list cannot be filled, an offset set in advance for a preselected angle mode is applied to the selection mode list to add a selection mode. Also, in the prediction mode list, a first set of non-selection mode lists may be configured using only angle modes. Similarly, if the first set cannot be filled, an angle mode obtained by applying an offset set in advance for a preselected angle mode to the first set is added to the first set. The embodiment of the prediction mode list configuration considering the peripheral blocks described with reference to FIG. 12 is similarly applicable to the extended peripheral blocks according to FIG. 13.
[0107] FIG. 14 is a diagram showing an example of referring to the MPM list of peripheral blocks for intra prediction of a current block. When configuring the MPM list for the current block, not only the intra prediction mode of the peripheral blocks but also the MPM list of the corresponding blocks is further referred to. More specifically, for intra prediction of the current block, the intra prediction mode of the peripheral blocks, the intra prediction mode included in the MPM list of the peripheral blocks, the intra prediction mode of the peripheral blocks of the peripheral blocks, the intra prediction mode included in the MPM list of the peripheral blocks of the peripheral blocks, etc. are referred to. That is, in the first step (1 stnot limited to the peripheral blocks of the second step (2 nd tier), but also uses the intra prediction information of a wider range of peripheral blocks such as the peripheral blocks of the third step (3 rd tier) to signal the intra prediction mode of the current block. Here, the intra prediction information of a block includes at least one of the intra prediction mode of the block and the MPM list information.
[0108] Referring to FIG. 14, if the left peripheral block of the current block (i.e., Neighbor block1) is coded in the intra prediction mode, the intra prediction mode included in the MPM list of the corresponding peripheral block is preferentially considered for the intra prediction mode signaling of the current block. That is, the following order of modes is referred to in order to signal the intra prediction mode of the current block. {Mode of block L, Mode of block A, Planar mode, DC mode, Mode of block BL, Mode of block AR, NB1_MPM0 mode, NB1_MPM1 mode, NB1_MPM2 mode,..., NB2_MPM0 mode, NB2_MPM1 mode, NB2_MPM2 mode,...}. Here, the NBx_MPMy mode refers to the intra prediction information of the x-th peripheral block of the current block. That is, the NBx_MPMy mode refers to the intra prediction mode information of the x-th peripheral block or the y-th intra prediction mode information of the MPM list of the corresponding block. At this time, if the y-th mode is a non-angle mode such as the planar mode or the DC mode, it may not be considered in the current block.
[0109] According to an embodiment of the present invention, the intra prediction mode information for the surrounding blocks with respect to the surrounding blocks is variously deformed and combined and used for the intra prediction of the current block. For example, the embodiment may be deformed and extended based on the pattern of the current block (i.e., square block, rectangular block) and the pattern of the surrounding blocks, and the order pairs may also be extended to various combinations and applied. An embodiment of utilizing the intra prediction mode included in the MPM list of the surrounding blocks for the intra prediction mode signaling of the current block may be combined with the above-described embodiment. That is, when constituting at least one of the MPM list of the current block, the set of upper modes signaled by an index consisting of k - 1 bits among non-MPM modes, the selection mode list, and the set of upper modes signaled by an index consisting of l - 1 bits among non-selection modes, the mode included in the MPM list of the surrounding blocks is referred to. Also, if the corresponding list or set cannot be filled in each case, an angular mode obtained by applying an offset preset for a preset angular mode to the corresponding list or set is added to the corresponding list or set.
[0110] FIG. 15 is a diagram showing an embodiment that takes into account the pattern and / or size of the current block and the surrounding blocks for the intra prediction of the current block. When constituting the MPM of the current block, the intra prediction information of the block among the surrounding blocks whose pattern and / or size is similar to that of the current block is preferentially referred to. Here, the intra prediction information includes at least one of the intra prediction mode and the MPM list information. Whether the pattern of the current block and the surrounding blocks is 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 vertical blocks or both are horizontal blocks, the ratio between the width and height of each block is further considered. Also, in an embodiment of the present invention, the pattern of the block is not limited to the above-described cases and may be extended to non-uniform rectangular blocks, slanted 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 surrounding blocks is preferentially referred to when constructing the MPM list of the current block. Also, if the size of the current block is 16×32, the intra prediction information used for the blocks of the same size (i.e., NB_l) among the surrounding blocks is preferentially referred to when constructing the MPM list of the current block. Examples of signaling the intra prediction mode of the current block in consideration of the patterns and / or sizes of the current block and the surrounding blocks can be combined with the above-described examples. That is, when constructing at least one of the MPM list of the current block, the set of upper modes signaled by an index consisting of k - 1 bits among the non-MPM modes, the selection mode list, and the set of upper modes signaled by an index consisting of l - 1 bits among the non-selection modes, the intra prediction information of the blocks among the surrounding blocks that are similar in pattern and / or size to the current block is preferentially referred to. Also, if the corresponding list or set cannot be filled in each case, the angular mode obtained by applying an offset preset for a preset angular mode to the corresponding list or set is added to the corresponding list or set.
[0112] FIGS. 16 to 18 are diagrams showing an extended example of obtaining prediction information of a current block by referring to prediction information of surrounding blocks. According to an embodiment of the present invention, the blocks referred to for signaling the prediction information of the current block are extended not only to the surrounding blocks adjacent to the current block but also to the surrounding blocks not adjacent to the current block. With reference to each drawing, an example of obtaining the intra prediction information of the current block by referring to the intra prediction information of the surrounding blocks will be described. According to one embodiment, the MPM list of the current block is configured while referring to the intra prediction information of the surrounding blocks. However, the present invention is not limited thereto, and each embodiment is similarly applied when obtaining the inter prediction information of the current block by referring to the inter prediction information of the surrounding blocks. Here, the inter prediction information includes a motion vector, a reference picture index, and the like.
[0113] First, FIG. 16 is a diagram showing an example of an extended surrounding block referred to for obtaining the prediction information of the current block. As described above, the MPM list of the current block is configured by using the intra prediction mode of the surrounding blocks in order to reflect the regional similarity of the picture. At this time, the surrounding blocks L(1), A(1), BL(1), AR(1), and AL(1) adjacent to the boundary of the current block are defined as the surrounding blocks in the first step (1 st tier), and the surrounding blocks L(2), A(2), BL(2), AR(2), and AL(2) adjacent to the boundary of each surrounding block in the first step are defined as the surrounding blocks in the second step (2 ndDefine the peripheral blocks of the (tier). For example, the lowermost block L(1) adjacent to the left boundary of the current block is a peripheral block of the first step, and the blocks L(2), A(2), BL(2), AR(2), and AL(2) adjacent to the left or upper boundary of the block L(1) are peripheral blocks of the second step. At this time, among the blocks adjacent to the peripheral blocks of the first step, the blocks that overlap with the current block are excluded from the peripheral blocks of the second step. That is, since the upper right block AR(1) of the block L(1) overlaps with the current block, it is not referred to when constructing the MPM list of the current block. Similarly, the block BL(2) adjacent to the block A(1), the block AR(2) adjacent to the block BL(1), and the block BL(2) adjacent to the block AR(1) also overlap with the current block, so they are not referred to when constructing the MPM list.
[0114] In FIG. 16, an example is shown in which it is extended to a maximum of 25 peripheral blocks of the second step for the 5 peripheral blocks of the first step located on the left or upper side of the current block, but the present invention is not limited to this. That is, the embodiment of the present invention is extended to a maximum of N^2 peripheral blocks of the second step for N peripheral blocks of the first step located on the left or upper side of the current block. In this case, the MPM list of the current block is constructed by referring to the intra prediction modes of a maximum of N^2 + N peripheral blocks within a preset range from the current block. Therefore, the regional characteristics of the picture can be further reflected more than when constructing the MPM list by referring only to the intra prediction modes of the N peripheral blocks of the first step. Also, in order to increase the probability that the optimal intra prediction mode of the current block exists in the MPM list, a reduction in the amount of bits required for intra prediction mode coding is expected.
[0115] In order to determine the exact positions of the surrounding blocks in the second step of the current block, at least one piece of position information such as the size of the surrounding blocks in the first step and the vertices of the corresponding block at the upper left, upper right, lower left, and lower right corners is required. If the encoder and decoder do not store the above information, the coordinates of the surrounding blocks in each second step are obtained by adding an offset to the reference coordinates of the surrounding 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 - 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 offset in the x-axis direction and the offset in the y-axis direction are set to the same value or different values from each other. According to 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} respectively, the offset in the x-axis direction and the offset in the y-axis direction are set to {64, 32}, {32, 16}, {16, 8}, {8, 4}, etc., which are obtained by dividing the above width and height by an integer. Since the encoder and decoder use the same offset according to a predefined rule, the encoder and decoder both refer to the inter-prediction mode of the surrounding blocks in the second step at the same position.
[0116] According to another embodiment of the present invention, if the MPM list of the peripheral blocks L(1), A(1), BL(1), AR(1), or AL(1) of the first step of the current block is configured, the encoder and decoder refer to the intra prediction modes included in the MPM list of the peripheral blocks of the first step to configure the MPM list of the current block without searching for the peripheral blocks of the second step. When the MPM list of the peripheral blocks of the first step is configured, in order to refer to the prediction modes of the peripheral blocks of the second step of the current block, the MPM list of the peripheral blocks of the first step includes the prediction modes of the peripheral blocks of the second step. Therefore, without searching for the peripheral blocks of the second step and calculating their positions, the prediction modes of the peripheral blocks of the second step can be referred to by referring to the MPM list of the peripheral blocks of the first step. On the other hand, storing all the MPM list information of the peripheral blocks of the first step may impose a burden on the memory. Therefore, according to the present invention and another embodiment, the encoder and decoder store and refer to only the top M intra prediction modes included in the MPM list of the peripheral blocks of the first step to configure the MPM list of the current block. For example, if the size of the MPM list is 6 and the intra prediction modes of the top 3 MPM indexes (i.e., index = 0, 1, 2) are referred to, the MPM list of the current block refers to the intra prediction modes of the peripheral blocks L(1), A(1), BL(1), AR(1), and AL(1) of the first step and the intra prediction modes indicated by the top 3 MPM indexes of the MPM list of each block. According to one embodiment, the planar mode and the DC mode are excluded from the above-mentioned top M intra prediction modes.
[0117] FIG. 17 is a diagram showing another embodiment of the extended peripheral blocks referred to for obtaining the prediction information of the current block. According to another embodiment of the present invention, a preset search range based on the current block is used to obtain the prediction information of the current block.
[0118] Referring to FIG. 17, a rectangular search range is defined to search for the peripheral blocks L(2), A(2), BL(2), AR(2), and AL(2) of the second step based on the coordinates of the top left, bottom left, and top right vertices of the peripheral block of the first step. At this time, while moving a determined step in the x-axis and / or y-axis direction within the search range, the peripheral blocks of the second step are searched. For example, to search for the peripheral block L(2) of the second step with respect to the peripheral block AL(1) of the first step of the current block, while moving by the size of the determined step in the x-axis direction from the coordinate reference point at the bottom left of the block AL(1), the block L(2) is searched. At this time, the search is performed until a block having prediction information different from the prediction information of the block AL(1) is found within the determined search range. Also, to search for the peripheral block A(2) of the second step with respect to the peripheral block AL(1) of the first step of the current block, while moving by the size of the determined step in the y-axis direction from the coordinate reference point at the top right of the block AL(1), the block A(2) is searched. Similarly, to search for the peripheral blocks AL(2), AR(2), and BL(2) of the second step, while moving by the size of the determined step in the y-axis and / or y-axis direction from the coordinate reference points at the top left, top right, and bottom left of the block AL(1) respectively, the peripheral blocks of the second step are searched.
[0119] According to an embodiment of the present invention, the search range may be set to a fixed size such as 16×16, 32×32, 64×64, etc., 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 128×128, the search range is set to 128×128, 64×64, 32×32, 16×16, 8×8, etc., which is the block size divided by an integer. The size of the step for searching within the search range is set to a value greater than or equal to the minimum size of the block and smaller than the search range. For example, if the minimum size of the block is 4×4 within a search range of 64×64, the size of the step 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 performed until a preset prediction mode list is completely filled. That is, the predicted information searched at the size of the first step within the search range is included in the prediction mode list, and if the prediction mode list is not filled, the predicted information searched at the size of the second step within the search range is added to the prediction mode list. The encoder and the decoder perform the search while increasing the size of the step for searching until the prediction mode list is completely filled. On the other hand, since each search range and step size are natural numbers and are used with the same values predefined in the encoder and the decoder, both the encoder and the decoder can refer to the prediction modes of the surrounding blocks of the same second step for the current block.
[0120] FIG. 18 is a diagram showing another embodiment of the extended surrounding blocks referred to for obtaining the prediction information of the current block. If the encoder and the decoder know the structure of the surrounding blocks of the current block, that is, the coordinates of the upper left side of the block size, they determine the position of the surrounding blocks of the second step for the current block. In the sub-blocks shown in FIG. 18, the numbers on the upper left side indicate the order of encoding or decoding, meaning that the current block is the 15th to be encoded or decoded.
[0121] To determine the positions of the neighboring blocks in the second step of the current block (i.e., the 15th block), at least one coordinate among the four reference points on the upper left, upper right, lower left, and lower right sides of each neighboring block in the first step, and the width and height information of the corresponding block are utilized. For example, the reference positions of the neighboring blocks L(2), A(2), BL(2), AR(2), and AL(2) in the second step with respect to the neighboring block AL(1) in the first step of the current block are calculated as (x0 - 1, y0 + h - 1), (x0 + w - 1, y0 - 1), (x0 - 1, y0 + h + 1), (x0 + w + 1, y0 - 1), and (x0 - 1, y0 - 1), respectively. At this time, (x0, y0) is the coordinate of the upper left side of the 5th block, which is the neighboring block in the first step of the current block, and w and h are the width and height of the block, respectively. For the remaining neighboring blocks L(1), A(1), BL(1), and AR(1) in the first step, the positions of the corresponding neighboring blocks in the second step are also calculated in the same manner, and the MPM list of the current block is configured with reference to the intra prediction mode of the neighboring blocks in the second step.
[0122] According to a further embodiment of the present invention, when acquiring the prediction information of the current block, the occurrence frequency of the prediction mode in the neighboring blocks is considered. That is, the prediction mode with a higher occurrence frequency in the neighboring blocks is referred to with a higher priority for predicting the current block compared to the prediction mode with a lower occurrence frequency in the neighboring blocks. According to one embodiment, the priority order among the prediction modes included in the MPM list of the current block is determined in consideration of the occurrence frequencies of the prediction modes of the neighboring blocks in the first step and the prediction modes of the neighboring blocks in the second step. A specific embodiment thereof will be described with reference to FIG. 19.
[0123] FIG. 19 is a diagram showing an example of setting the priority order of intra prediction modes based on the occurrence frequency of intra prediction modes of peripheral blocks. First, the occurrence frequencies for the prediction modes of the peripheral blocks L(1), A(1), BL(1), AR(1), and AL(1) which are the peripheral blocks of the first step of the current block, and the peripheral blocks L(2), A(2), BL(2), AR(2), and AL(2) which are the peripheral blocks of the second step are calculated. The occurrence frequencies of the prediction modes of the peripheral blocks of the first step and the occurrence frequencies of the prediction modes of the peripheral blocks of the second step are stored in different lists from each other (that is, the first list and the second list), and increase by 1 each time the prediction mode for the peripheral block of the corresponding step is confirmed. For example, if the intra prediction mode of block L(1) is mode 50, the occurrence frequency of mode 50 in the second list increases by 1, and the occurrence frequency of mode 50 in the second list does not increase. When the calculation of the occurrence frequencies of the prediction modes of the peripheral blocks of the first step and the peripheral blocks of the second step is completed, the final occurrence frequency for each prediction mode is calculated through the sum of the weighted values of the occurrence frequencies. More specifically, the final occurrence frequency FM i is calculated as shown in Equation 1 below.
[0124]
Equation
[0125] Here, FM i (1) is the occurrence frequency of mode i in the peripheral blocks of the first step, FM i (2) is the occurrence frequency of mode i in the peripheral blocks of the second step, and W1 and W2 are weighted values.
[0126] For example, referring to FIG. 19, if the occurrence frequencies in the peripheral blocks of the first step and the peripheral blocks of the second step for the intra prediction mode 50 are 2 and 3 respectively, the final occurrence frequency of the intra prediction mode 50 is calculated as w1*3 + w2*3. At this time, in order to compensate for the increase in scale due to the weighting values W1 and W2, bit soft operations are further applied. Also, the weighting values W1 and W2 are set to integers greater than 0 to avoid real multiplication operations and increase the schedule of the total weighting value, while the scale is corrected by bit shift operations.
[0127] According to an embodiment of the present invention, the weighting values W1 and W2 are determined based on various embodiments. According to one embodiment, since the peripheral block in the first step is closer to the current block than the peripheral block in the second step, W1 is set to a value larger than W2. For example, W1 and W2 may be set to 5 and 3, respectively. According to another embodiment, the weighting values W1 and W2 are variably set according to the corresponding prediction mode. That is, W1 and W2 are not set to be the same for all prediction modes in the same list, but are variably set according to the prediction mode, and the occurrence of a specific prediction mode is considered more importantly. For example, larger weighting values are given to {plane mode, DC mode, VER mode, HOR mode, HDIA mode, DIA mode, VDIA mode} with a high occurrence probability. Also, a larger weighting value is given to the basic angle mode compared to the extended angle mode. According to another embodiment, the weighting values W1 and W2 are variably set according to the pattern of the current block to further increase the priority of a specific angle mode. For example, if the current block is a vertical block, larger weighting values are set for the VER mode and the angle modes close to the VER mode, and if the current block is a horizontal block, larger weighting values are set for the HOR mode and the angle modes close to the HOR mode. According to still another embodiment, the weighting values W1 and W2 are variably set according to the corresponding peripheral block position. For example, if the priority among the peripheral blocks is set in the order of {block L, block A, block BL, block AR, block AL}, higher weighting values are given in this order. For example, if the prediction modes of block L(2) and block AL(2) are 34, a larger weighting value is applied to block L(2) and added to the occurrence frequency.
[0128] If the weighting values 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 weighting values W1 and W2 are preset. At this time, since both the encoder and the decoder use the same weighting values W1 and W2, both the encoder and the decoder can calculate the same occurrence frequency count without further signaling. According to another embodiment, information regarding the weighting values W1 and W2 is signaled via an RBSP such as a PPS, VPS, or SPS.
[0129] Based on the final occurrence frequency count calculated according to the above-described embodiment, the MPM list of the current block is configured. An intra prediction mode with a high occurrence frequency count in neighboring blocks has a high probability of being selected in the current block. Therefore, an intra prediction mode with a high final occurrence frequency count calculated in neighboring blocks is included in the MPM list of the current block. For example, if the size of the MPM list is m, the MPM list consists of a planar mode, a DC mode, and the top m - 2 angular modes with high final occurrence frequency counts. Also, since a mode with a lower index in the MPM list can be represented with a smaller number of bits, a prediction mode with a high final occurrence frequency count is matched to a smaller MPM index in the MPM list.
[0130] On the other hand, if there are a plurality of angular modes having the same non-zero final occurrence frequency count, the occurrence frequency count of the corresponding angular mode in the neighboring blocks in the first step is preferentially considered. For example, if the final occurrence frequency counts of intra prediction mode 18 and intra prediction mode 50 are the same at 8, a higher priority is assigned to the intra prediction mode with a higher occurrence frequency count in the neighboring blocks in the first step. According to another embodiment, if there are a plurality of angular modes having the same non-zero final occurrence frequency count, the priority order between the corresponding angular modes is determined according to the pattern of the current block. For example, if the current block is a vertical block, a higher priority is given to the angular modes of block A(1), block AR(1), and block AL(1) among the neighboring blocks in the first step, or a higher priority is given to an angular mode closer to the vertical mode.
[0131] According to an embodiment, the MPM indices of the planar mode and the DC mode in the MPM list are set to be different according to the intra prediction mode of the peripheral blocks in the first step. For example, if the occurrence frequencies of the planar mode and the DC mode among the intra prediction modes of the peripheral blocks in the first step are above a threshold, the planar mode and the DC mode are matched to the MPM indices 0 and 1. Also, if the occurrence frequency of the angular mode among the intra prediction modes of the peripheral blocks in the first step is above a threshold, the MPM index of the angular mode is set to a value smaller than the MPM indices of the planar mode and the DC mode.
[0132] In the above-described embodiment, if the number of angular modes having non-zero final occurrence frequencies is less than m - 2, the MPM list is configured using one or more of {VER mode, HOR mode, HDIA mode, VDIA mode}. Also, in order to minimize the signaling overhead for encoding non-MPM modes, a prediction mode with a high final occurrence frequency is used. For example, a prediction mode with a high final occurrence frequency is included in the selection mode list or is matched to a low-value index signaled with fewer bits among non-selection modes. According to another embodiment, the selection mode list is configured using an angular mode obtained by adding or subtracting a preset offset to / from an angular mode with a high final occurrence frequency included in the MPM list. Also, an angular mode having a non-zero final occurrence frequency not included in the MPM list and an angular mode obtained by adding or subtracting a preset offset to / from the corresponding mode are matched to a low-value index signaled with fewer bits among non-selection modes.
[0133] The operation of an encoder that encodes the intra prediction mode of a current block based on the occurrence frequency of the intra prediction mode of neighboring blocks will be described below. First, in order to encode the intra prediction mode for the current block, the encoder checks whether there are neighboring blocks of the current block and calculates the occurrence frequency of the intra prediction mode of the corresponding neighboring blocks. Next, the encoder constructs at least one of an MPM list, a selection mode list, or a non-selection mode based on the occurrence frequency of the intra prediction mode of the neighboring blocks. At this time, it is configured such that prediction modes with higher occurrence frequencies have higher priorities. Next, the encoder encodes an MPM flag indicating whether the intra prediction mode of the current block exists within the MPM list of the current block. If the intra prediction mode of the current block does not exist within the MPM list of the current block, a selection mode flag indicating whether the intra prediction mode matches any one of the selection modes is encoded. On the other hand, if the intra prediction mode of the current block exists within the MPM list of the current block (i.e., if the value of the MPM flag is 1), the encoder encodes the MPM index corresponding to the intra prediction mode of the current block within the MPM list. Also, if the intra prediction mode of the current block exists within the selection mode list of the current block (i.e., if the value of the MPM flag is 0 and the value of the selection mode flag is 1), the encoder encodes the selection mode index corresponding to the intra prediction mode of the current block within the selection mode list. In other cases, the non-selection mode index corresponding to the intra prediction mode of the current block is encoded.
[0134] Also, the operation of the decoder that decodes the intra prediction mode of the current block based on the occurrence frequency of the intra prediction mode of the surrounding blocks is as follows. First, in the process of parsing the symbols of the current block, the MPM flag of the current block is parsed. If the MPM flag is 0, the selection mode flag is further parsed. Similar to the encoding process, the decoder checks whether there are surrounding blocks of the current block and calculates the occurrence frequency of the intra prediction mode of the corresponding surrounding blocks. Next, the decoder constructs at least one of the MPM list, the selection mode list, or the non-selection mode based on the occurrence frequency of the intra prediction mode of the surrounding blocks. The method of constructing the MPM list, the selection mode list, and the non-selection mode in the decoder is the same as the method in the above-described encoder. If the MPM flag is 1, the decoder decodes the MPM index. If the MPM flag is 0 and the selection mode flag is 1, the decoder decodes the selection mode index. In other cases, the decoder decodes the non-selection mode index to determine the intra prediction mode of the current block. The decoder performs intra prediction using the determined intra prediction mode and generates a prediction block.
[0135] FIGS. 20 and 21 are diagrams showing an embodiment of classifying intra prediction modes 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 for encoding 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 based on the surrounding context of the current block.
[0136] First, FIG. 20 is a diagram showing an embodiment of classifying intra prediction modes into a plurality of subsets. According to the embodiment in FIG. 20, N intra prediction modes of the intra prediction mode set are classified into M subsets (S0, S1,..., S M-1 ) consisting of exclusive intra prediction modes. In FIG. 20, m i、jrefers to the j-th intra prediction mode belonging to the i-th subset. Each subset S i consists of K i exclusive intra prediction modes and satisfies the following Equation 2.
[0137]
Equation
[0138] At this time, the number K of intra prediction modes that make up each intra prediction mode subset i may be different for each subset.
[0139] For example, when the intra prediction mode set includes a total of 67 intra prediction modes, the intra prediction modes are classified into a horizontal mode set {plane 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 classified 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 still another embodiment, the intra prediction modes are classified into a first subset {plane 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 in FIG. 21, the N intra prediction modes of the intra prediction mode set include M subsets (S0, S1, …, S M-1) is classified into. According to one embodiment, the shared intra prediction mode is set to the top L intra prediction modes that are highly likely to be statistically selected in inter prediction. In FIG. 21, cm k refers to the k-th shared intra prediction mode belonging to each subset, and m i、j refers to the j-th exclusive intra prediction mode belonging to the i-th subset. Each subset S i consists of L shared intra prediction modes and L i exclusive intra prediction modes, and satisfies the following Equation 3.
[0141]
Equation
[0142] At this time, the number L i of exclusive intra prediction modes included in each intra prediction mode subset can be different for each subset.
[0143] For example, when the intra prediction mode set includes a total of 67 intra prediction modes, the shared intra prediction mode is set to one or more of {Planar mode, DC mode, HDIA mode, HOR mode, DIA mode, VER mode, VDIA mode}. Utilizing this, the intra prediction mode is divided into a first subset {Planar mode, DC mode, Basic angle mode} and a second subset {Planar mode, DC mode, HDIA mode, HOR mode, DIA mode, VER mode, VDIA mode, Extended angle mode}. According to other embodiments, the intra prediction mode is 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] FIG. 22 is a diagram showing an example of signaling an intra prediction mode of a current block using a subset of classified intra prediction modes. According to an embodiment of the present invention, a subset of intra prediction modes used in neighboring blocks of the current block is utilized to determine a subset of intra prediction modes of the current block.
[0145] If each subset of intra prediction modes consists of exclusive intra prediction modes according to the embodiment of FIG. 20, information on the subset of intra prediction modes that includes the intra prediction mode of the neighboring block is checked, and the subset of intra prediction modes of the current block is determined using the corresponding information. That is, the subset of intra prediction modes most frequently used in the neighboring blocks is assigned to the subset of intra prediction modes of the current block. At this time, the embodiments of FIGS. 16 to 18, which refer to neighboring blocks extended to obtain prediction information of the current block, are further applied.
[0146] Referring to FIG. 22, first, information on subsets of intra prediction modes of neighboring blocks L(1), A(1), BL(1), AR(1), and AL(1) in the first step of the current block is referred to, and then, information on subsets of intra prediction modes of neighboring blocks L(2), A(2), BL(2), AR(2), and AL(2) in the second step of the current block is referred to, and a subset of intra prediction modes of the current block is determined. According to one embodiment, based on the occurrence frequency calculation method described with reference to FIG. 19, weight values w1 and w2 are applied to the occurrence frequency of the subset of intra prediction modes of the neighboring blocks in the first step and the occurrence frequency of the subset of intra prediction modes of the neighboring blocks in the second step, respectively, to calculate the final occurrence frequency of the subset of intra prediction modes. At this time, the subset of intra prediction modes having the largest occurrence frequency is assigned to the subset of intra prediction modes of the current block.
[0147] On one hand, if there are multiple intra prediction mode subsets having the same value with a non-zero final occurrence frequency, the occurrence frequency in the peripheral blocks of the first step is preferentially considered similar to the embodiment described with reference to FIG. 19, 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 FIG. 21, when each intra prediction mode subset includes a shared intra prediction mode, there may be a case where the intra prediction mode subset cannot be identified only by the intra prediction mode information of the peripheral blocks for the shared intra prediction mode. That is, if the intra prediction mode of the peripheral block is one of the shared intra prediction modes, it becomes impossible to derive the intra prediction mode subset of the peripheral block. Therefore, the index of the intra prediction mode subset of the current block should be signaled separately, and the intra prediction mode subset information of the current block should be stored.
[0149] In such a situation, according to one embodiment, it may not be necessary to separately signal the index of the intra prediction mode subset of the current block. As the number of intra prediction mode subsets increases, the number of separate bits required to represent the index information of the intra prediction mode subsets increases. Therefore, the intra prediction mode subset information of the neighboring blocks having a common intra prediction mode is determined according to a preset rule. For example, if a common intra prediction mode is used in a neighboring block, the basic subset is determined as the intra prediction mode subset of the corresponding neighboring block. Alternatively, the intra prediction mode subset is determined according to the type of the common intra prediction mode of the corresponding block. For example, if the common intra prediction mode used in a neighboring block is the vertical mode, a subset including many angle modes near the vertical mode is determined as the intra prediction mode subset of the corresponding neighboring block. Also, if the common intra prediction mode used in a neighboring block is the horizontal mode, a subset including many prediction modes near the horizontal mode is determined as the intra prediction mode subset of the corresponding neighboring block.
[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 configured by preferentially considering within the intra prediction mode subset.
[0151] According to one embodiment, an MPM list is configured based on the positions of peripheral blocks in a preset priority order and / or an intra prediction mode in a preset priority order. The prediction modes of peripheral blocks having the same intra prediction mode subset as the current block are added to the MPM list in the order of the left block, the upper block, the lower left block, the upper right block, and the upper left block. Also, if the planar mode and the DC mode are included in the intra prediction mode subset of the current block, the corresponding intra prediction modes are considered preferentially over the angular modes. However, if the shared intra prediction mode is included in the intra prediction mode subset, and the intra prediction mode of a peripheral block having an intra prediction mode subset different from that of the current block is one of the shared intra prediction modes, the intra prediction mode of the corresponding peripheral block is added to the MPM list of the current block according to a preset priority order. For example, if the shared intra prediction modes are {planar mode, DC mode, HDIA mode, HOR mode, DIA mode, VER mode, VDIA mode}, and even if 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, an MPM list is configured based on the pattern of the current block and the patterns of peripheral blocks. If the current block is a vertical block, a high priority is given to the intra prediction modes of blocks having the same intra prediction mode subset as the current block among the upper block, the upper right block, and the upper left block, and the vertical mode or an angular mode close to the vertical mode within the current intra prediction mode subset is preferentially added to the MPM list. According to still another embodiment, based on the occurrence frequency calculation method described with reference to FIG. 19, at least one of the MPM list, the selection mode list, or the non-selection mode is configured by considering the frequencies of prediction modes included in the intra prediction mode subset of the current block among the prediction modes of the peripheral blocks in the first step and the prediction modes of the peripheral blocks in the second step of the current block.
[0153] In this way, if N prediction modes are divided into M intra prediction mode subsets and the intra prediction mode subset information of neighboring blocks is utilized to determine the intra prediction mode subset of the current block, an optimal prediction mode list with unnecessary intra prediction modes removed from the current block is constructed. Therefore, the probability that the intra prediction mode of the current block matches the intra prediction mode within the MPM list increases, and the amount of bits required for intra prediction mode signaling is reduced.
[0154] FIG. 23 is a diagram showing a detailed example of signaling the intra prediction mode of the current block using a subset of the classified intra prediction modes. In the example of FIG. 23, it is assumed that the intra prediction mode subset is composed of exclusive intra prediction modes. More specifically, 67 intra prediction modes of the intra prediction mode subset are classified into two subsets consisting of exclusive intra prediction modes. The two intra prediction mode subsets each consist of 35 exclusive intra prediction modes and 32 intra prediction modes, respectively. For example, the first subset consists of {Planar mode, DC mode, 33 basic angle modes}, and the second subset consists of {32 extended angle modes}. Alternatively, the intra prediction mode is 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 mode is classified into two subsets, the number of MPM modes, selection modes, and non-selection modes to be signaled is adjusted. That is, 4 MPM modes, 8 selection modes, and 23 (or 20) non-selection modes are used to signal the intra prediction of the current block. FIG. 23(a) shows an example of signaling each flag and index for the intra prediction of the current block, and FIG. 23(b) shows an example of the non-selection mode index signaled in truncated binary evolution.
[0156] If the intra prediction mode of the current block exists in the MPM list, the MPM flag and the MPM index are signaled. At this time, the MPM flag is signaled with 1 bit, and the MPM index is coded in truncated binary and signaled with 1 to 3 bits. The binary-coded MPM index is encoded via CABAC. On the other hand, when the intra prediction mode of the current block does not exist in the MPM list, the MPM flag is set to 0, and the intra prediction mode is encoded by utilizing the selected mode and the non-selected mode. If the intra prediction mode matches one of the 8 selected modes, the MPM flag, the selected mode flag, and the selected mode index are signaled. At this time, the MPM flag and the selected mode flag are signaled with 1 bit, and the selected mode index is signaled with fixed 3 bits.
[0157] In the case of the remaining non-selected modes, the MPM flag, the selected mode flag, and the non-selected mode index are signaled. At this time, the non-selected mode index is coded in truncated binary and signaled. 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 upper 9 modes of the non-selected modes are signaled with 4 bits, and the indexes of the lower 14 modes are signaled with 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 upper 12 modes of the non-selected modes are signaled with 4 bits, and the indexes of the lower 8 modes are signaled with 5 bits.
[0158] FIG. 24 is a diagram showing an example of dynamically signaling an intra prediction mode of a current block based on prediction information of surrounding blocks. More specifically, according to the example of FIG. 24, the configuration of the MPM mode is changed by various conditions. FIG. 24(a) shows a method of changing the MPM configuration according to the type of picture to which the current block belongs. FIGS. 24(b) and 24(c) show methods of variably configuring the MPM mode according to the intra prediction mode used in surrounding blocks.
[0159] First, FIG. 24(a) shows a method of changing the MPM configuration according to the type of picture to which the current block belongs according to an embodiment of the present invention. Configurations such as the conventional MPM mode, non-MPM mode, non-selection mode, etc. are also applied without distinguishing the type of picture (i.e., I picture, P picture, or B picture) to which the corresponding block belongs. However, according to an embodiment of the present invention, as shown in FIG. 24(a), the MPM configuration method in P pictures and B pictures in which surrounding blocks can freely perform inter prediction and intra prediction may be applied differently from the MPM configuration method in I pictures in which surrounding blocks perform only intra prediction. For example, the number of MPM modes in P pictures and B pictures is set to be different from the number of MPM modes in I pictures. That is, the number of MPM modes in P pictures and B pictures is set to a value smaller than the number of MPM modes in I pictures.
[0160] Next, FIG. 24(b) shows an embodiment of the present invention that variably configures the MPM mode according to the intra prediction mode used in the peripheral blocks. If the current tile (or slice) is a P tile (or slice) or a B tile (or slice), the decoder searches for the prediction mode used at the position of the peripheral block. 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 block is designated as m1. Also, the number of different intra prediction modes used for intra prediction at all the search positions of the peripheral block is designated as m2. For example, if all the search positions of the peripheral block 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 block is less than or equal to Th1, the context of the intra prediction mode used at the position of the peripheral block or the mode derived therefrom (for example, applied to an 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 relevance to the peripheral blocks. In this case, it is appropriate for the MPM mode to signal m intra prediction modes extracted from a number of contexts with an equal overhead. Therefore, fixed-length coding is applied to the MPM mode.
[0162] 2) If the value of m1 is greater than Th1 but less than or equal to Th2, the second MPM mode signaling method is applied. If the number of intra prediction blocks at the position of the peripheral block is greater than Th1, the context of the intra prediction mode used at the position of the peripheral block or the mode derived therefrom needs to be differentially considered. That is, since there are peripheral blocks where intra prediction has been performed, the signaling of the intra prediction mode of the current block is configured based on the peripheral intra prediction blocks, but differential signaling considering their positions is necessary. In this case, it is appropriate for the MPM mode to signal m intra prediction modes extracted in a context that sequentially considers the intra prediction modes used in the peripheral blocks and the modes derived therefrom with differential overhead. Therefore, the MPM mode is signaled in truncated unary coding.
[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. Since the number of intra prediction blocks at the position of the peripheral block is greater than Th2 but the diversity of the intra prediction modes used is not large, the context of the intra prediction mode of the peripheral block or the mode derived therefrom needs to be differentially considered. In this case, the signaling method of the MPM mode is the same as the second method.
[0164] 4) If the value of m1 is greater than Th2 and the value of m2 is also greater than Th3, the fourth MPM mode signaling method is applied. If the number of intra prediction blocks at the position of the surrounding blocks is greater than Th2, since the diversity of the intra prediction modes used is large, the context of the intra prediction mode of the surrounding blocks or the modes derived therefrom needs to be evenly considered, and the maximum value thereof needs to be signaled via the MPM mode. That is, although there are many surrounding blocks where intra prediction is performed, since most different intra prediction modes are used in the corresponding blocks, non-discriminatory signaling considering all the surrounding intra prediction blocks is required for the intra prediction of the current block. In this case, it is appropriate for the MPM mode to signal m intra prediction modes extracted in a context considering the intra prediction modes used in the surrounding blocks and the modes derived therefrom with an equal overhead. Therefore, fixed-length coding is applied to the MPM mode.
[0165] In the above method, the number m of modes signaled in the MPM mode is determined based on the derived values of m1 and m2. Also, based on the determined value of m, the number s of selected modes, the number ns of non-selected modes, and their coding methods are determined. According to one embodiment, fixed-length coding is applied to the selected modes, and it is appropriate for them to be responsible for signaling the subsequent s intra prediction modes set based on the number m of the MPM modes.
[0166] FIG. 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 by the surrounding blocks at all search positions is indicated as m2. According to another embodiment of the present invention, the following variable MPM mode signaling method is applied based on the value of m2.
[0167] 5) If the value of m2 is less than or equal to Th1, the fifth MPM mode signaling method is applied. If the number of intra prediction blocks at the position of the peripheral block is less than or equal to Th1, m is set to a small number by appropriately reflecting the context of the intra prediction mode used at the position of the peripheral block or the mode derived therefrom. If the number of different intra prediction modes of the peripheral blocks is small, even if this is extended to fill the number of MPM modes, there is a high possibility that the derived mode is different from the prediction mode of the current block. In this case, a small number of m MPM modes extracted in a single or a small number of contexts are used, but it is appropriate to signal the MPM modes with an equal overhead. Therefore, fixed-length coding is applied to the MPM modes.
[0168] 6) If the value of m2 is greater than Th1 but less than or equal to Th2, the sixth MPM mode signaling method is applied. If the number of intra prediction blocks at the position of the peripheral block is greater than a certain number, the context of the intra prediction mode used at the position of the peripheral block or the mode derived therefrom needs to be considered differentially. A specific example of the sixth MPM mode signaling method is the same as the second MPM mode signaling method described above.
[0169] 7) If the value of m2 is greater than Th2, the seventh MPM mode signaling method is applied. If the number of intra prediction blocks at the position of the peripheral block is greater than Th2, since the diversity of the used intra prediction modes is large, it is necessary to equally consider the context of the intra prediction mode of the peripheral block or the mode derived therefrom and signal the maximum value thereof via the MPM mode. A specific example of the seventh MPM mode signaling method is the same as the fourth MPM mode signaling method described above.
[0170] In the above method, the number m of modes signaled in the MPM mode is determined based on the derived value of m2. Also, based on the determined value of m, the number s of selected modes, the number ns of non-selected modes, and their coding methods are determined. According to one embodiment, fixed-length coding is applied to the selected modes, and it is appropriate to be responsible for signaling the subsequent s intra prediction modes set based on the number m of MPM modes.
[0171] FIG. 25 is a diagram showing an embodiment in which the number of MPM modes is variably adjusted and the intra prediction mode of the current block is signaled based thereon. As described in FIG. 24, a small number of MPM modes are used by the MPM mode signaling method.
[0172] Referring to FIG. 25(a), the number of MPM modes is not fixed and varies based on the intra prediction mode information of surrounding blocks. Among a total of 67 intra prediction modes, 2 modes are set as MPM modes and signaled by fixed-length coding. The fixed-length coding method gives equal priorities among the modes to be signaled. Next, the number s of selected modes is determined to be 16 or 9, and the selected modes are signaled by fixed-length coding. At this time, since a relatively small number of MPM modes are signaled, according to the embodiment of FIG. 25(a), by increasing the number of selected modes (i.e., 16), the probability that the intra prediction modes not signaled in the MPM mode are signaled as selected modes can be increased. However, if signaling is performed in the selected modes, since the signaling overhead is the same as the method using a fixed number of conventional MPM modes, according to the embodiment of FIG. 25(b), the number of selected modes (i.e., 9) can be reduced to reduce the overall overhead.
[0173] However, in the embodiment where the number of selection modes is reduced, if the non-selection mode is signaled, the signaling overhead increases. In the embodiment of FIG. 25(b) where the number of selection modes is 9, 56 non-selection modes, which are more than the 16 selection modes in the embodiment of FIG. 25(a), should be signaled by truncating binary binary evolution. At this time, since 2^5 < 56 < 2^6, the initial 2^6 - 56 = 8 indices of the non-selection mode are signaled using only 5 bits, and the remaining 48 indices are signaled using 6 bits. Therefore, compared to the non-selection mode of FIG. 25(a) that signals 15 indices using 5 bits and 34 indices using 6 bits, it can be seen that the signaling overhead of the non-selection mode of FIG. 25(b) has increased.
[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 FIG. 24. Also, the number s of selection modes is determined based on the determined value of m. Further, the number s of selection modes is determined based on the following additional conditions.
[0175] First, the number of selection modes is determined based on the value of the intra prediction mode determined in the MPM mode and the context. If the intra prediction mode of the neighboring blocks 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, an additional intra prediction mode derived from the MPM mode is obtained, and the additional intra prediction mode is configured and signaled with a relatively small number of selection modes. In this way, the signaling overhead can be reduced by limiting the number of selection modes. However, if the MPM list is configured in a basic angular mode such as the planar mode, DC mode, VER mode, or HOR mode without reflecting the intra prediction mode of the neighboring blocks when determining the MPM mode, a relatively large number of selection modes are configured and signaled. Since the MPM list consists of a context that has no relation to the neighboring blocks, the number of selection modes is maximally increased to raise the possibility that the intra prediction mode of the current block is included in the selection modes. On the other hand, the number ns of non-selection modes is determined by the value obtained by subtracting the number m of MPM modes and the number s of selection modes from the total number T of intra prediction modes.
[0176] The embodiments of the present invention described above are implemented through various means. For example, the embodiments of the present invention are implemented by hardware, firmware, software, or a combination thereof.
[0177] In the case of implementation by hardware, the method according to the embodiments of the present invention is implemented by one or more ASICs (Application Specific Integrated Circuits), DSPs (Digital Signal Processors), DSDPs (Digital Signal Processing Devices), PDLs (Programmable Logic Devices), FPGAs (Field Programmable Gate Arrays), processors, controllers, microcontrollers, microprocessors, etc.
[0178] In the case of implementation by firmware or software, the method according to an embodiment of the present invention is implemented in the form of modules, procedures, functions, etc. that perform the above-described functions or operations. The software code is stored in a memory and implemented by a processor. The memory is located inside or outside the processor and exchanges data with the processor by various means already known.
[0179] The above description of the present invention is for illustrative purposes, and those of ordinary skill in the technical field to which the present invention pertains should be able to understand that it can be easily changed to other specific forms without changing the technical idea and essential features of the present invention. Therefore, it should be understood that the above-described embodiments are illustrative in all respects and not restrictive. For example, each component described as a single type may be implemented in a distributed manner, and similarly, components described as being distributed may also be implemented in a combined form.
[0180] The scope of the present invention is indicated by the claims described below rather than the above detailed description, and it should be interpreted that all changes or modified forms derived from the meaning and scope of the claims and the equivalent concept thereof are included in the scope of the present invention.
Description of Reference Numerals
[0181] 110 Conversion Unit 115 Quantization Unit 120 Inverse Quantization Unit 125 Inverse Conversion Unit 150 Prediction Unit 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 Unit 225 Inverse Conversion Unit 230 Filtering section 250 Prediction section 252 Intra prediction section 254 Inter prediction section
Claims
Claim 1 A method for processing a video signal, comprising: receiving intra prediction mode information of a current block, wherein the intra prediction mode information indicates one of a plurality of intra prediction modes included in an intra prediction mode set, the intra prediction mode set includes a plurality of angular modes, the plurality of angular modes include a basic angular mode and an extended angular mode, and the basic angular mode is a mode corresponding to an angle within a preset first angle range; determining whether to use the extended angular mode based on at least one of the shape and size of the current block; when using the extended angular mode, determining the extended angular mode based on a sum of an index of the basic angular mode determined using the intra prediction mode information and a predetermined offset, wherein the sum of the index of the basic angular mode determined using the intra prediction mode information and the predetermined offset represents the extended angular mode; decoding the current block based on the determined extended angular mode. The extended angular mode indicates a wide-angle direction outside the preset first angle range, and the number of the basic angular modes is 65. A method. Claim 2 A video signal processing apparatus including a processor, wherein the processor is configured to receive intra prediction mode information of a current block, wherein the intra prediction mode information indicates one of a plurality of intra prediction modes constituting an intra prediction mode set, the intra prediction mode set includes a plurality of angular modes, the plurality of angular modes include a basic angular mode and an extended angular mode, and the basic angular mode is a mode corresponding to an angle within a preset first angle range; determine whether to use the extended angular mode based on at least one of the shape and size of the current block; When using the extended angle mode, determining the extended angle mode based on the sum of the index of the basic angle mode determined using the intra prediction mode information and a predetermined offset, wherein the sum of the index of the basic angle mode determined using the intra prediction mode information and the predetermined offset represents the extended angle mode, decoding the current block based on the determined extended angle mode, and being configured to perform the above, the extended angle mode indicates a wide-angle direction outside the preset first angle range, and the number of the basic angle modes is 65, Video signal processing apparatus.
3. A video signal encoding apparatus including a processor, wherein the processor is 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 preset first angle range, and the sum of the index of the basic angle mode corresponding to the extended angle mode and a predetermined offset representing the extended angle mode, and whether to use the extended angle mode being determined based on at least one of the shape and size of the current block, generating a bitstream including the intra prediction mode information, and being configured to perform the above, the extended angle mode indicates a wide-angle direction outside the preset first angle range, and the number of the basic angle modes is 65, Video signal encoding apparatus.
4. A method of transmitting a bitstream generated by the video signal encoding apparatus according to Claim 3.
Citation Information
Patent Citations
Method and apparatus for encoding and decoding video signal according to directional intra-residual prediction
US20070025439A1
Enhanced intra prediction mode signaling
US20110292994A1
Using Multiple Prediction Sets to Encode Extended Unified Directional Intra Mode Numbers for Robustness
US20120230403A1
Intra prediction and intra mode coding
US20160373769A1
Method and apparatus for image intra prediction
WO2009110753A2