METHOD AND DEVICE FOR INTRA PREDICTION-BASED VIDEO ENCODING / DECODING
Patent Information
- Authority / Receiving Office
- MX · MX
- Patent Type
- Patents
- Current Assignee / Owner
- INST OF IMAGE TECH INC
- Filing Date
- 2021-06-24
- Publication Date
- 2026-06-12
AI Technical Summary
Existing video encoding/decoding technologies face challenges in efficiently determining intra-prediction modes and reference regions for high-resolution and high-quality images, leading to suboptimal compression efficiency.
The method involves dividing pre-defined intra prediction modes into MPM candidate groups, using adaptive block division, and replacing unavailable pixels in the reference region with available ones, while considering block size, shape, and component type for improved intra prediction.
This approach enhances the efficiency and accuracy of intra prediction by deriving optimal intra prediction modes and utilizing inter-component references, resulting in improved compression efficiency and accuracy.
Smart Images

Figure MX434951B0
Abstract
Description
INTRA-PREDICTION VIDEO ENCODING / DECODING METHOD AND DEVICE FIELD OF INVENTION
[0001] The present invention relates to a method and apparatus for encoding / decoding video. BACKGROUND OF THE INVENTION
[0002] Recently, the demand for high-resolution and high-quality images such as high-definition (HD) images and ultra-high-definition (UHD) images is increasing in various application fields, and consequently, high-efficiency image compression techniques are being discussed.
[0003] Several technologies exist, such as interprediction technology, which predicts pixel values within a current image based on an image taken before or after it using video compression technology; intraprediction technology, which predicts pixel values within a current image using pixel information from the current image; and entropy coding technology, which assigns a short code to a high-frequency value and a long code to a low-frequency value. Image data can be effectively compressed using such image compression technology and transmitted or stored. SUMMARY OF THE INVENTION TECHNICAL PROBLEM
[0004] An objective of the present invention is to provide an efficient block splitting method and apparatus.
[0005] An objective of the present invention is to provide a method and apparatus for deriving a mode of intraprediction.
[0006] An objective of the present invention is to provide a method and apparatus for determining a reference region for intra-prediction.
[0007] An objective of the present invention is to provide a method and apparatus for intra-prediction in accordance with a type of component. TECHNICAL SOLUTION
[0008] A method and apparatus for encoding / decoding an image of the present invention may determine a reference region for intra-prediction of a current block, derive an intra-prediction mode of the current block, and decode the current block based on the reference region and the intra-prediction mode.
[0009] In the method and apparatus for encoding / decoding the image of the present invention, the 5 pre-defined intra-prediction modes in the encoding / decoding apparatus can be divided into an MPM candidate group and a non-MPM candidate group, and the MPM candidate group can include at least one of a first candidate group or a second candidate group.
[0010] In the method and apparatus for encoding / decoding the image of the present invention, the current block intra-prediction mode can be derived from either the first candidate group or the second candidate group.
[0011] In the method and apparatus for encoding / decoding the image of the present invention, the first candidate group may consist of a pre-defined default mode in the decoding apparatus, and the second candidate group may consist of a plurality of MPM candidates.
[0012] In the method and apparatus for encoding / decoding the image of the present invention, the default mode may be at least one of a flat mode, a DC mode, a vertical mode, a horizontal mode, a vertical mode, or a diagonal mode.
[0013] In the method and apparatus for encoding / decoding the image of the present invention, the plurality of MPM candidates may include at least one of a neighboring block intra-prediction mode, a mode obtained by subtracting the value na from the neighboring block intra-prediction mode, or a mode obtained by adding the value n to the neighboring block intra-prediction mode. Herein, n may mean a natural number of 1, 2, or more.
[0014] In the method and apparatus for encoding / decoding the image of the present invention, the plurality of MPM candidates may include at least one of a DC mode, a vertical mode, a horizontal mode, a mode 15 obtained by subtracting or adding the value m to the vertical mode, or a mode obtained by subtracting or adding the value m to the horizontal mode. Herein, m may be a natural number of 1, 2, 3, 4 or more.
[0015] In the method and apparatus for encoding / decoding the image of the present invention, the encoding apparatus can determine a candidate group to which the current block's intra-prediction mode belongs, encode a flag to identify the candidate group, and the decoding apparatus can select one of the first candidate group or the second candidate group based on a flag signaled from the encoding apparatus.
[0016] In the image encoding / decoding method and apparatus of the present invention, the derived intra-prediction mode can be changed by applying a predetermined compensation to the derived intra-prediction mode.
[0017] In the method and apparatus for encoding / decoding the image of the present invention, the application of compensation can be selectively performed based on at least one of a size, shape, division information, an intra-mode prediction value, or current block component type.
[0018] In the method and apparatus for encoding / decoding the image of the present invention, determining the reference region may include searching for an unavailable pixel belonging to the reference region and replacing the unavailable pixel with an available pixel.
[0019] In the method and apparatus for encoding / decoding the image of the present invention, the available pixel may be determined based on a bit depth value or may be an adjacent pixel on at least one left, right, top, or bottom of the unavailable pixel. ADVANTAGEOUS EFFECTS
[0020] The present invention can improve the encoding / decoding efficiency of intra-prediction through adaptive block splitting.
[0021] In accordance with the present invention, the prediction can be made more accurately and efficiently by deriving an intra-prediction mode based on a candidate group of MPMs.
[0022] In accordance with the present invention, in the case of a chroma block, by defining a 15 prediction mode based on inter-component reference as a separate group, the derivation of the intra-prediction mode of the chroma block can be performed more efficiently.
[0023] In accordance with the present invention, the accuracy and efficiency of intra-prediction can be improved by replacing unavailable pixels in a reference region for intra-prediction with predetermined available pixels.
[0024] According to the present invention, the inter-prediction efficiency can be improved based on inter-component reference. BRIEF DESCRIPTION OF THE FIGURES
[0025] Figure 1 is a block diagram showing an image encoding apparatus according to an embodiment of the present invention.
[0026] Figure 2 is a block diagram showing an image decoding apparatus in accordance with an embodiment of the present invention.
[0027] Figure 3 illustrates a method for dividing an image into a plurality of fragment regions as a modality to which the present invention applies.
[0028] Figure 4 is an exemplary diagram illustrating a predefined intra-prediction mode in an image encoding / decoding apparatus as a modality to which the present invention applies.
[0029] Figure 5 illustrates a method of decoding a current block based on intra-prediction as a modality to which the present invention applies.
[0030] Figure 6 illustrates a method for replacing an unavailable pixel in a reference region as a modality to which the present invention applies.
[0031] Figure 7 illustrates a method for > cu nc N aocc to <x cambiar / corregir un modo de intra predicción como una modalidad a la cual se aplica la presente invención.
[0032] Figure 8 illustrates a prediction method based on inter-component reference as a modality to which the present invention applies.
[0033] Figure 9 illustrates a method for configuring a reference region as a modality to which the present invention applies.
[0034] Figure 10 is an exemplary diagram for configuring an intra-prediction mode established step by step as a modality to which the present invention applies.
[0035] Figures III-11D illustrate a method for classifying intra-prediction modes into a plurality of candidate groups as a modality to which the present invention applies.
[0036] Figure 12 is an exemplary diagram illustrating an actual block and a pixel adjacent to it as a modality to which the present invention applies.
[0037] Figure 13 illustrates a method for performing intra-prediction step by step as a modality to which the present invention applies.
[0038] Figure 14 is an exemplary diagram for an arbitrary pixel for intra-prediction as a modality to which the present invention applies.
[0039] Figure 15 is an exemplary diagram for division into a plurality of sub-regions based on an arbitrary pixel 5 as a modality to which the present invention applies. DETAILED DESCRIPTION OF THE INVENTION BEST WAY FOR AI INVENTION
[0040] A method and apparatus for encoding / decoding an image of the present invention may determine a reference region for intra-prediction of a current block, derive an intra-prediction mode of the current block, and decode the current block based on the reference region and the intra-prediction mode.
[0041] In the method and apparatus for encoding / decoding the image of the present invention, the pre-defined intra-prediction modes in the encoding / decoding apparatus can be divided into a candidate MPM group and a non-MPM candidate group, and the MPM candidate group can include at least one from a first candidate group or a second candidate group.
[0042] In the method and apparatus for encoding / decoding the image of the present invention, the current block intra-prediction mode can be derived from either the first candidate group or the second candidate group.
[0043] In the method and apparatus for encoding / decoding the image of the present invention, the first candidate group may consist of a pre-defined default mode in the decoding apparatus, and the second candidate group may consist of a plurality of ME'M candidates.
[0044] In the method and apparatus for encoding / decoding the image of the present invention, the default mode may be at least one of a flat mode, a DC mode, a vertical mode, a horizontal mode, a vertical 15 mode, or a diagonal mode.
[0045] In the method and apparatus for encoding / decoding the image of the present invention, the plurality of ME'M candidates may include at least one of a neighboring block's intra-prediction mode, a mode 20 obtained by subtracting the value na from the neighboring block's intra-prediction mode, or a mode obtained by adding the value n to the neighboring block's intra-prediction mode. Herein, n may mean a natural number of 1, 2, or more. IVIA / a / ZU¿ J / UU / o» /
[0046] In the method and apparatus for encoding / decoding the image of the present invention, the plurality of MPM candidates may include at least one of a DC mode, a vertical mode, a horizontal mode, a mode 5 obtained by subtracting or adding the value m to the vertical mode, or a mode obtained by subtracting or adding the value m to the horizontal mode. Here, m may be a natural number of 1, 2, 3, 4 or more.
[0047] In the method and apparatus for encoding / decoding the image of the present invention, the encoding apparatus can determine a candidate group to which the intra-prediction mode of the current block belongs, encode a flag to identify the candidate group, and the decoding apparatus can select one of the first candidate group or the second candidate group based on a flag signaled from the encoding apparatus.
[0048] In the method and apparatus for encoding / decoding the image of the present invention, the 20 derived intra-prediction mode can be changed by applying a predetermined compensation to the derived intra-prediction mode.
[0049] In the method and apparatus for encoding / decoding the image of the present invention, the application of the compensation can be selectively performed based on at least one of a size, shape, division information, a value of the intra 5 prediction mode, or current block component type.
[0050] In the method and apparatus for encoding / decoding the image of the present invention, determining the reference region may include searching for an unavailable pixel belonging to the reference region and replacing the unavailable pixel with an available pixel.
[0051] In the method and apparatus for encoding / decoding the image of the present invention, the available pixel can be determined based on a bit depth value of 15 or can be an adjacent pixel on at least one left, right, top, or bottom of the unavailable pixel. METHOD FOR THE INVENTION
[0052] The present invention may be changed and modified in various ways and illustrated with reference to different exemplary embodiments, some of which will be described and shown in the drawings. However, these embodiments are not proposed to limit the invention but are constructed as including all modifications, equivalents, and replacements which belong to the spirit and technical scope of the invention. Similar reference numbers in the drawings refer to elements that are similar in all respects.
[0053] Although the terms first, second, etc., may be used to describe various elements, these elements shall not be limited by these terms. These terms are used only to distinguish one element from another. For example, a first element could be called a second element and a second element could be called a first element in the same way without departing from the teachings of the present invention. The term and / or includes any and all combinations of a plurality of associated listed points.
[0054] When an element is referred to as being connected to or coupled to another element, it shall be understood that the element may be directly connected or coupled to another element or elements of intervention. Conversely, when an element is referred to as being directly connected to, or directly coupled to, another element, no elements of intervention are present.
[0055] The terminology used herein is for the purpose of describing particular modalities only and is not intended to be limiting of the invention. As used herein, the singular forms a, one, and the are proposed to include the plural forms as well, unless the context clearly indicates otherwise. It shall be further understood that the terms include and / or have, when used in this specification, specify the presence of declared features, members, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, members, steps, operations, elements, and / or groups thereof.
[0056] Hereafter, exemplary embodiments of the invention shall be described in detail with reference to the accompanying 15 drawings. Similar reference numbers in the drawings refer to elements that are similar in all respects, and redundant descriptions of similar elements shall be omitted herein.
[0057]
[0058] Figure 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
[0059] With reference to Figure 1, the image coding apparatus 100 includes an image splitting unit 110, prediction units 120 and 125, a transformation unit 130, a quantization unit 135, a rearrangement unit 160, an entropy coding unit 165, an inverse quantization unit 140, an inverse transformation unit 145, a filter unit 150, and a memory 155.
[0060] Each of the elements shown in the Figure 1 is shown separately to represent different characteristic functions in the encoding apparatus, and does not mean that each element is made of separate hardware or software. That is, the elements are arranged independently for convenience of description, where at least two elements can be combined into a single element, or a single element can be divided into a plurality of elements to perform functions. It is indicated that the modalities in which some elements are integrated into a combined element and / or an element is divided into multiple separate elements are included within the scope of the present invention without departing from the essence of the present invention.
[0061] Some elements are not essential to the substantial functions of the invention and may include optional constituents solely to improve performance. The invention may be integrated including only constituents essential to the embodiment of the invention, except for constituents used solely to improve performance. The structure that includes only the essential constituents, except for the optical constituents used solely to improve performance, belongs to the scope of the invention.
[0062] Image Split Unit 110 can split the input image into at least one processing unit. In this case, the processing unit can be a prediction unit (PU), a transformation unit (TU), or an encoding unit (CU). Image Split Unit 110 can split an image into a plurality of combinations of an encoding unit, a prediction unit, and a transformation unit, and select a combination of an encoding unit, a prediction unit, and a transformation unit based on a predetermined criterion (for example, a cost function) to encode the image.
[0063] For example, an image can be divided into a plurality of encoding units. In order to divide an image into encoding units, a recursive tree structure such as a quaternary tree structure can be used. An image, a maximum encoding block (largest encoding unit), or an encoding tree unit (CTU) as a root can be divided into other encoding units, and can be further divided with as many child nodes as the number of encoding units divided. An encoding unit that is no longer divided according to certain restrictions becomes a leaf node. That is, when it is assumed that only square division is possible for an encoding unit, an encoding unit can be divided into up to four different encoding units.
[0064] In the embodiments of the invention, a coding unit can be used to refer not only to a coding unit but also to a decoding unit.
[0065] The prediction unit may be a block divided into a shape such as at least a square or rectangle of the same size within a coding unit, or a prediction unit between the prediction units divided within a coding unit may have a different shape and / or size from among a prediction unit.
[0066] When a prediction unit that performs intra prediction based on a coding unit is not a minimal coding unit, the intra prediction can be performed without splitting into a plurality of NxN prediction units.
[0067] Prediction units 120 and 125 may include an interprediction unit 120 for interprediction and an intraprediction unit 125 for intraprediction. Prediction units 120 and Unit 125 can determine which inter- and intra-predictions are performed in a PU, and can determine specific information (e.g., an intra-prediction mode, a motion vector, and a reference image) of the default prediction method. Here, a processing unit in which the prediction is performed may be different from a processing unit for which a prediction method and specific information within it are determined. For example, a prediction method and a prediction mode may be determined for each PU, while the prediction may be performed for each TU. A residual value (residual block) between a generated predicted block and an original block may be input to transformation unit 130.Furthermore, the prediction mode information, motion vector information, and similar information used for prediction can be encoded together with the residual value by the entropy encoding unit 165 and transmitted to the decoding apparatus. When a specific encoding mode is used, the original block can be encoded and transmitted to the decoding apparatus without generating a prediction block by the prediction units 120 and 125.
[0068] The Interprediction Unit 120 can predict a LU based on information in at least one image between a pre-image of the current image and a subsequent image of the current image. In some cases, the Interprediction Unit 120 can predict a PU based on information from a partially encoded region in the current image. The Interprediction Unit 120 may include a reference image interpolation unit, a motion prediction unit, and a motion compensation unit.
[0069] The reference image interpolation unit can be supplied with reference image information from memory 155 and generate pixel information less than or equal to a whole pixel in a reference image. In the case of luma pixels, an 8-step DCT-based interpolation filter with a variable filter coefficient can be used to generate pixel information less than or equal to a whole pixel in a 1 / 4 pixel unit. In the case of chrominance pixels, a 4-step DCT-based interpolation filter with a variable filter coefficient can be used to generate pixel information less than or equal to a whole pixel in a 1 / 8 pixel unit.
[0070] The motion prediction unit can perform motion prediction based on the reference image interpolated by the reference image interpolation unit. Various methods, such as a full search-based block matching algorithm (FBMA), a three-step search algorithm (TSS), and a new three-step search algorithm (NTS), can be used to calculate a motion vector. A motion vector has a value of 1 / 2 or 1 / 4 of a pixel based on an interpolated pixel. The motion prediction unit can predict a current FU using different motion prediction methods. Various methods, such as jump mode, merge mode, advanced motion vector prediction mode (AMVP), and intra-block copy mode, etc., can be used as the motion prediction method.
[0071] The intra-prediction unit 125 can generate a LU based on the information in a reference pixel neighboring a current block. When a reference pixel is a pixel for which inter-prediction has been performed because a block neighboring the current PU is a block for which inter-prediction has been performed, the information in a reference pixel in the block for which inter-prediction has been performed can be replaced with information in a reference pixel in a block for which intra-prediction has been performed. That is, when an unavailable reference pixel is unavailable, the information in the unavailable reference pixel can be replaced with the information in at least one reference pixel from the available reference pixels.
[0072] An intra-prediction mode includes a directional prediction mode in which reference pixel information is used in accordance with a prediction direction, and a non-directional prediction mode in which information is not used in the direction of prediction. A mode for predicting luma information and a mode for predicting chroma information may be different from each other. Furthermore, the intra-prediction mode information used to predict luma information or predicted luma signal information may be used to predict chroma information.
[0073] When the prediction unit size and the transformation unit size are the same for intra-prediction, intra-prediction for the prediction unit can be performed based on a pixel on the left, a pixel on the top-left, and a pixel on the top of the prediction unit. However, when the prediction unit size and the transformation unit size are different for intra-prediction, intra-prediction can be performed using a specific reference pixel based on the transformation unit. Also, intra-prediction using N x N division can be used for only the minimum encoding unit.
[0074] In the intra-prediction method, a predicted block 20 can be generated by applying an intra-adaptive smoothing (AIS) filter to the reference pixels in accordance with the prediction mode. Different types of AIS filters can be applied to the reference pixels. In the intra-prediction method, the intra-prediction mode of a current PU can be predicted from the intra-prediction mode of a neighboring PU. When predicting the prediction mode of the current PU using information from the mode predicted by a neighboring PU, if the current PU and the neighboring PU have the same intra-prediction mode, the CPAE information indicating that the current and neighboring PUs have the same prediction mode can be transmitted using the default flag information. When the current PU and the neighboring PU have different prediction modes, the prediction mode information of the current block can be encoded using entropy encoding.
[0075] A residual block containing residual information can be generated. Residual information is the difference between a predicted unit generated by prediction units 120 and 125 and an original block from the prediction unit. The generated residual block can be input to transformation unit 130.
[0076] Transformation unit 130 can transform the residual block that includes the residual information between the predicted unit generated by prediction units 120 and 125 and the original block using a transformation type such as DCT (Cosine Transformation) Discrete), DST (Discrete Sine Transform), or KLT. It can be determined whether to apply DCT, DST, or KLT to transform the residual block based on the intra-prediction mode information of the prediction unit used 5 to generate the residual block.
[0077] The quantization unit 135 can quantize transformed values in a frequency domain by the transformation unit 130. A quantization coefficient can be changed depending on a block or 10 importance of an image. The values generated from the quantization unit 135 can be provided to the inverse quantization unit 140 and the recording unit 160.
[0078] The rearrangement unit 160 can perform 15 rearrangement of coefficient values for the quantized residual.
[0079] The rearrangement unit 160 can change coefficients of a two-dimensional (2D) block into coefficients of a one-dimensional (ID) vector using the coefficient sweep method. For example, the rearrangement unit 160 can sweep a DC coefficient to a coefficient in the high-frequency region using the zigzag scan method and change it into a one-dimensional vector form. Depending on the size of the transformation unit and the intra-prediction mode, instead of a zigzag sweep, a vertical sweep that sweeps a coefficient in two-dimensional block form in a column direction and a horizontal sweep that sweeps a coefficient in two-dimensional block form in an arrow direction can be used.That is, according to the size of the transformation unit and the intra-prediction mode, it is possible to determine which of a zigzag sweep, a vertical sweep, and a horizontal sweep is being used.
[0080] The entropy coding unit 165 can perform entropy coding based on the values obtained by the rearrangement unit 160. Several 15 coding methods, such as Golomb exponential coding, context adaptive variable length coding (CAVLC), or context adaptive binary arithmetic coding (CABAC), can be used for entropy coding.
[0081] The entropy coding unit 165 can encode a variety of information, such as residual coefficient information and block type information of an encoding unit, prediction mode information, split unit information, prediction unit information, transfer unit information, movement vector information, reference frame information, block interpolation information, and filtering information from rearrangement unit 160 and prediction units 120 and 125.
[0082] The entropy coding unit 165 can encode by entropy coefficients of an input of 10 CU from the rearrangement unit 160.
[0083] Inverse quantization unit 140 and inverse transformation unit 145 dequantize the values that are quantized by quantization unit 135 and inversely transform the values that are transformed by transformation unit 130. A reconstructed block can be generated by adding the residual values to the predicted PU. The residual values can be generated by inverse quantization unit 140 and inverse transformation unit 145. The predicted PU can be predicted by the motion vector prediction unit, the motion compensation unit, and the intra-prediction unit of prediction units 120 and 125.
[0084] The 150 filter unit may include at least one of an unblocking filter, a compensation unit, and an adaptive loop filter (ALF).
[0085] The unlock filter can remove block distortion caused by boundaries between blocks in a reconstructed image. Whether to apply the unlock filter to a current block can be determined based on the pixels included in various rows or columns of the block. When the unlock filter is applied to a block, a strong or weak filter can be applied depending on the required unlock filter strength. When horizontal and vertical filtering are performed when applying the unlock filter, the horizontal and vertical filtering can be performed in parallel.
[0086] The compensation unit can apply compensation relative to the original image to the unlock filter image, in pixel units. A region to which compensation can be applied can be determined after partitioning pixels of an image into a predetermined number of regions. Compensation can be applied to the determined region taking into account the edge information in each pixel or the method for applying compensation to the determined region.
[0087] The ALE can perform filtering based on a comparison of the filtered reconstructed image and the original image. The pixels included in an image can be partitioned into predetermined groups, a filter to be applied to each group can be determined, and differential filtering can be performed for each group. The information itself applied by the ALE can be transferred to each encoding unit, and the shape and filter coefficients of an ALE applied to each block can vary. Furthermore, an ALE with the same shape (fixed shape) can be applied to a block with respect to the block's characteristics.
[0088] Memory 155 can store a reconstructed block or image generated from filter unit 150, and the stored reconstructed block or image can be supplied to prediction units 120 and 125 when inter-prediction is performed.
[0089]
[0090] Figure 2 is a block diagram illustrating an image decoding apparatus in accordance with an exemplary embodiment of the present invention.
[0091] With reference to Figure 2, the image decoding apparatus 200 may include an entropy decoding unit 210, a rearrangement unit 215, a dequantization unit 220, a reverse transformation unit 225, prediction units 230 and 235, a filter unit 240, and a memory 245.
[0092] When an image bitstream is being input from the image encoding apparatus, the input bitstream can be decoded in a procedure opposite to that of the image encoding apparatus.
[0093] The entropy decoding unit 210 can perform entropy decoding in a procedure opposite to that of performing entropy encoding in an entropy encoding unit of an image coding apparatus. For example, various methods, such as Golomb exponential coding, CAVLC, or CABAC, can be applied that correspond to the method performed by the image coding apparatus.
[0094] The entropy decoding unit 210 20 can decode information associated with intra-prediction and inter-prediction made by the encoding apparatus.
[0095] The reordering unit 215 can perform reordering in the entropy decoding of the bit stream by the entropy decoding unit 210 based on the reordering method of the encoding apparatus. The reordering unit 215 can reconstruct and reorder 5 coefficients of an ID vector into coefficients of a 2D block. The reordering unit 215 can be provided with information on the coefficient sweep performed by the coding apparatus and can perform reordering using a method for inversely sweeping the coefficients, 10 based on the sweep order performed by the coding apparatus.
[0096] The dequantization unit 220 can perform dequantization based on a quantization parameter provided by the encoding apparatus and 15 the rearranged block coefficients.
[0097] The inverse transform unit 225 can perform an inverse transform, i.e., an inverse DCT, an inverse DST, and an inverse KLT, with respect to the transform performed by the transform unit 20, i.e., DCT, DST, and KLT on the quantization result performed by the image encoding apparatus. The inverse transform can be performed based on a transmission unit determined by the image encoding apparatus. The inverse transform unit 225 of the image encoding apparatus can selectively perform a transform technique (e.g., DCT, DST, KLT) in accordance with a plurality of pieces of information such as a prediction method, a current block size, and a prediction direction.
[0098] Prediction units 230 and 235 can generate a prediction block based on the information for generating the prediction block and information in a previously decoded block or image provided. The information for generating the prediction block can be provided from entropy decoding unit 210. The information in a previously decoded block or image can be provided from memory 245.
[0099] As described above, when the size of the prediction unit and the size of the transformation unit are the same when intra prediction is performed in the same way as the operation of the image encoding apparatus, intra prediction for the prediction unit can be performed based on one pixel on the left, one pixel on the top-left, and one pixel on the top of the prediction unit. However, when the prediction unit size and the transformation unit size differ during intra-prediction, intra-prediction for the prediction unit can be performed using a reference pixel determined based on the transformation unit. Furthermore, intra-prediction using N x N division can be used for only the minimum encoding unit.
[00100] Prediction units 230 and 235 may include a prediction unit determination unit, an inter-prediction unit, and an intra-prediction unit. The prediction unit determination unit can receive various information, such as prediction unit information, prediction mode information from an intra-prediction method, and motion prediction information from an inter-prediction method, etc., from the entropy decoding unit 210. It can then determine a prediction unit for a current encoding unit. The prediction unit determination unit can determine which inter-prediction and intra-prediction are performed on the prediction unit.An interprediction unit 230 can perform interprediction within a current prediction unit based on information in at least one image between a previous image and a subsequent image of the current image that includes the current prediction unit. Here, an interprediction unit 230 can use 5 pieces of information necessary for interprediction by the current prediction unit, provided by the image encoding apparatus. The interprediction can be performed based on information from the pre-reconstructed partial region in the current image that includes the current prediction unit.
[00101] In order to perform inter-prediction, it can be determined, in a unit of an encoding unit, whether a motion prediction method for a prediction unit included in the encoding unit is a jump mode, a merge mode, an ALLZP mode, or an intra-block copy mode.
[00102] An intra-prediction unit 235 can generate a prediction block based on pixel information in a current image. When a prediction unit 20 is a prediction unit for which intra-prediction is performed, the intra-prediction can be performed based on the intra-prediction mode information in the prediction unit provided by the Image Encoding Apparatus. The intra-prediction unit 235 can include an AIS (Intra-Adaptive Smooth) filter, a reference pixel interpolation unit, and a DC filter. The AIS filter performs filtering on reference pixels in a current block. The AIS filter can decide whether or not to apply the filter, depending on a prediction mode for the current prediction unit.AIS filtering can be performed on the reference pixels of the current block using prediction mode 10 for the prediction unit and information in the AIS filter provided from the image encoding apparatus. When the prediction mode for the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
[00103] When the prediction mode for the prediction unit indicates a prediction mode to perform intra-prediction based on pixel values obtained by interpolating the reference pixels, the reference pixel interpolation unit can generate reference pixels in a unit of fractional pixel size less than a whole pixel (i.e., a full pixel) by interpolating the reference pixels. When the prediction mode for the current prediction unit indicates a prediction mode to generate a prediction block without interpolating the reference pixels, the reference pixels may not be interpolated. The DC filter can generate a prediction block through filtering when the prediction mode for the current block is DC mode.
[00104] The reconstructed image or block can be supplied to the 240 filter unit. The 240 filter unit includes an unlocking filter, a compensation unit, and an ALE.
[00105] The image encoding apparatus can provide information on which unlock filter is applied to a corresponding block or image, and information on which strong and weak filters are applied when the unlock filter is used. The image decoding apparatus's unlock filter 15 can be provided with information on the unlock filter from the image encoding apparatus and can perform unlock filtering on a corresponding block.
[00106] The compensation unit can apply compensation to the reconstructed image based on the information in a compensation type and compensation value applied to the image in the encoding process.
[00107] The ALE can be applied to a coding unit based on the information itself the ALF is applied and information from the ALF coefficient, etc. provided from the encoding device. ALF information can be included and provided in a specific, set parameter.
[00108] Memory 245 can store the reconstructed image or block for use as a reference image or 10 a reference block and can provide the reconstructed image to an output unit.
[00109] In this specification, a coding unit, a coding block, a current block, and the like may be interpreted as having the same meaning. A modality that will be described later can be performed by a corresponding unit of the image encoding apparatus and / or the image decoding apparatus.
[00110]
[00111] Figure 3 illustrates a method for dividing an image into a plurality of fragment regions as a modality to which the present invention applies.
[00112] An image may be divided into a predetermined fragment region. The fragment region according to the present invention may include at least one of a subimage, a segment, a mosaic, a coding tree unit (CTU), or a coding unit (CU).
[00113] With reference to Figure 3, a 300 image may include one or more sub-images. That is, an image may be composed of one sub-image, or it may be divided into a plurality of sub-images as shown in Figure 3.
[00114] In the case of a sub-image, the splitting information can be configured differently depending on the encoding setting. (1) For example, a sub-image can be obtained by a batch splitting method based on a vertical or horizontal line crossing the image. (2) Alternatively, a sub-image can be obtained by a partial splitting method based on the characteristic information (position, size, shape, etc., as for the shape described below, assuming a right angle) of each sub-image.
[00115] (1) In the above case, the division information of a subimage can be configured based on the vertical or horizontal line that divides the subimage.
[00116] Line-based splitting can use either uniform or non-uniform splitting. When using the uniform method, information on the split number for each line can be generated, and when using the non-uniform method, information on the distance (width or height) between lines can be generated. Either a uniform or non-uniform splitting method can be used depending on the coding setting, or the method selection information can be explicitly generated. The uniform or non-uniform splitting method can be applied collectively to both vertical and horizontal lines. Alternatively, the methods applied to vertical and horizontal lines differ. The information regarding the number of sub-images can be derived based on the division information.
[00117] Line spacing information can be encoded in units such as sample-n units, CTU size, (size of 2+CTU), (size of 4*CTU), and the like. Here, n can be a natural number of 4, 8, 16, 32, 64, 128, 256, or greater. The generated information can be signaled at least at one level of a video set parameter (VPS), a sequence set parameter (SPS), a picture set parameter (PPS), and a picture header (PH).
[00118] (2) In the latter case, the position information of the subimage (e.g., information indicating the top-left, top-right, bottom-left, and bottom-right position of each subimage), the size information (e.g., information indicating width or height), the information on the number of subimages, etc. can be used to configure the subimage splitting information.
[00119] Information specifying the number of sub-images (hereafter referred to as number information) may be encoded by the encoding apparatus, and the decoding apparatus may determine the number of sub-images that make up an image based on the encoded number information. The number information may be indicated at least 15 in a VPS, SPS, PPS, and PH. Alternatively, the number of sub-images may be implicitly derived based on the sub-image division information (position, size information, etc.).
[00120] The information specifying the position of each subimage (hereafter referred to as position information) may include an x-coordinate or y-coordinate of a pre-committed position of the corresponding subimage. The pre-committed position may be determined from the upper-left, upper-right, lower-left, and lower-right of the subimage. The position information may be encoded by the encoding apparatus, and the decoding apparatus may determine a position for each subimage based on the encoded position information. Here, the x-coordinates / y-coordinates can be expressed in units such as sample units-n, CTU size, (size 2+CTU), (size 1^CTU), and the like. Here, n can be a natural number of 1, 2, 4, 8, 16, 32, 64, 128, 256, or 10 greater. For example, if the position information is encoded using the x-coordinates and y-coordinates of the upper-left CTU of the subimage, and the width and height are 2 and 3 respectively in CTU units (CtbSize), the (upper-left) position of subimage 15 can be determined as (2+CtbSize, 3+CtbSize).
[00121] The information specifying the size of each subimage (hereafter referred to as the size information) may include at least one piece of width information and one piece of height information for the corresponding subimage. Herein, the width / height information may be encoded in units such as sample-n units, CTU size, (size 2+CTU), (size 4%TTU), and the like. Herein, n may be a natural number of 4, 8, 16, 32, 64, 128, 256, or greater. iviA / a / zu¿ o / uu ΐύνι For example, in the case where the width information is encoded in CTU size units (CtbSize), if the width information is 6, the subimage width can be determined as (6+CtbSize).
[00122] The position and size information described above may be limited to being encoded / decoded only when the number of sub-images belonging to an image is two or more. That is, if the number of sub-images, according to the number information, is greater than or equal to two, the position and size information are flagged. Otherwise, the sub-image may be set to have the same position / size as the image. However, even when the number of sub-images is two or more, the position information for the first sub-image located in the upper-left of the image may not be flagged and may be flagged from the position information in the second sub-image. Also, at least one piece of position or size information in the last sub-image of the image may not be flagged.
[00123] With reference to Figure 3, a subimage may include one or more segments. That is, a subimage may be composed of a single segment or may be divided into a plurality of segments. The subimage may be composed of a plurality of segments divided in the horizontal direction or may be composed of a plurality of segments divided in the vertical direction.
[00124] Information specifying the number of segments belonging to an image or subimage (hereafter referred to as number information) is encoded by the encoding apparatus, and the decoding apparatus can determine the number of subimages in an image or subimage based on the encoded number information. Number information may be signaled at least at one level of VPS, SPS, PPS, and PH. However, number information may be signaled only in at least one case where a rectangular segment is permitted or a case where a subimage is not composed of a segment.
[00125] Information specifying the size of each segment (hereafter referred to as size information) may include at least one piece of width information and one piece of height information for the corresponding segment. Here, the width / height information may be encoded in segment units or CTUs.
[00126] However, a segment may not be allowed to be divided so as to overlap a plurality of subimages. In other words, a subimage may be divided to completely include one or more segments. Alternatively, a segment constituting a subimage may be restricted to being divided only in either a horizontal or a vertical direction.
[00127] With reference to Figure 3, a subimage or segment 310 may include one or more tiles. That is, a segment may be composed of one tile or may be composed of a plurality of tiles. However, the present invention is not limited to this, and a plurality of segments may be included in a tile. As an example, a segment may be composed of a subset of a plurality of CTU rows belonging to a tile. In this case, the information specifying the number of segments to which a tile belongs (hereinafter, number information) is encoded by the encoding apparatus, and the decoding apparatus can determine the number of segments that constitute a tile based on the encoded number information. The information specifying the size of each segment (hereinafter, size information) may include at least one width and one height information of the corresponding segment.Here, width / height information can be encoded in a CTU size unit. However, when a segment is composed of a subset of multiple CTU rows, only the height information of the corresponding segment can be specified, and the width information may not be specified. The number / size information can be specified at least at one VF, SPS, EPS, or PH level.
[00128] At least one of the pieces of information in the number, position, and size described above is required only when the image is divided into predetermined fragment regions. For example, the information may be flagged only when the image is divided into a plurality of segments or tiles. To this end, a separate flag indicating whether or not the current image is divided into a plurality of segments or tiles may be used. The flag may be flagged at least at one level: VPS, SPS, PPS, and PH.
[00129] With reference to Figure 3, a mosaic may be composed of a plurality of CTUs, and a CTU 320 (hereafter, a first block) may be divided into a plurality of sub-blocks (hereafter, a second block) by at least one vertical or horizontal line. The number of vertical and horizontal lines may be one, two, or more. Hereafter, the first block is not limited to the CTU and may be an encoding block (CU) divided from the CTU, a prediction block (P'J) which is a basic unit of predictive encoding / decoding, or a transformation block (TU) which is a basic unit of transformation encoding / decoding. The first block may be a square block or a non-square block.
[00130] The division of the first block can be done based not only on a quad tree but also on a multiple tree such as a binary tree or a ternary tree.
[00131] Specifically, a quad tree split (QT) is a type of split in which the first block is divided into four second blocks. For example, when the first 2Nx2N block is split by QT, the first block can be divided into four second blocks that are NxN in size. QT can be limited to applying to a square block only, but it is also applicable to a non-square block.
[00132] A binary tree (BT) split is a type of split in which the first block is divided into two second blocks. BT can include a horizontal binary tree (hereafter referred to as Horizontal BT) and a vertical binary tree (hereafter referred to as Vertical BT). Horizontal BT is a type of split in which the first block is divided into two second blocks by a horizontal line. This split can be performed symmetrically or asymmetrically. For example, when the first block of 2Nx2N is split based on Horizontal BT, the first block can be divided into two second blocks with a height ratio of (a:b). Here, a and b can be the same value, or a can be larger or smaller than b. Vertical BT is a type of split in which the first block is divided into two second blocks by a vertical line. This split can be performed symmetrically or asymmetrically.For example, when the first 2Nx2N block is divided based on BT Vertical, the first block can be divided into two second blocks with a width ratio of (a:b). Here, a and b can be the same value, or it can be larger or smaller than b.
[00133] A ternary tree (TT) split is a type of split in which the first block is divided into three second blocks. Similarly, TT can include a horizontal ternary tree (hereafter referred to as Horizontal TT) and a vertical ternary tree (hereafter referred to as Vertical TT). Horizontal TT is a type of split in which the first block is divided into three second blocks by two horizontal lines. For example, when the first 2Nx2N block is split based on Horizontal TT, the first block can be divided into three second blocks with a height ratio of (a:b:c). Here, a, b, and c can be the same value. Alternatively, a and c can be the same, and b can be greater or less than a. For example, ayo can be 2, yb can be 1. TT Vertical is a type of division in which the first block is divided into three second blocks by two vertical lines.For example, when the first 2Nx2N block is divided based on Vertical TT, the first block can be divided into three second blocks with a width ratio of (a:b:c). Here, a, b, and c can be the same value or different values. Alternatively, a and c can be the same while b can be greater or less than a. Alternatively, a and b can be the same while c can be greater or less than a. Alternatively, b and c are the same while a can be larger or smaller than b. For example, a and c can be 2, and b can be 1.
[00134] The division described above can be performed based on the division information indicated from the coding device. The division information may include at least one of the following: division type information, division address information, or division relationship information.
[00135] Split type information may specify any of the split types that are predefined in the encoding / decoding apparatus. The predefined split type may include at least one of QT, BT Horizontal, BT Vertical, TT Horizontal, TT Vertical, or no split (not split). Alternatively, split type information may mean whether or not QT, BT, or TT is applied, and may be encoded in the form of a flag or an index. As an example, split type information may include at least one of two flags: a first flag indicating whether QT is applied or a second flag indicating whether BT or TT is applied. BT or TT can be used selectively in accordance with the second flag. However, the first flag can only be set when the size of the first block is less than or equal to a predetermined threshold size. The threshold size can be a natural number of 64, 128, or more. When the size of the first block is greater than the threshold size, the first block can be forced to be split using only QT. Furthermore, the second flag can only be set when QT is not applied. IVIA / a / ZU¿ J / UU / 03 / 9 in accordance with the first flag.
[00136] In the case of BT or TT, the split direction information may indicate whether it splits horizontally or vertically. In the case of BT or TT, the split ratio information may indicate the ratio of the width and / or height of the second block.
[00137] The block 320 illustrated in Figure 3 is assumed to be a square block (hereafter referred to as a first block) having a size of 8Nx8N and a division depth of 10k. When the division information for the first block indicates QT division, the first block can be divided into four sub-blocks (hereafter referred to as a second block). The second block can have a size of 4Nx4N and can have a division depth of (k + 1).
[00138] The four second blocks can be further divided based on either QT, BT, TT, or no division mode. For example, when the second block division information indicates BT Horizontal, the second block is divided into two sub-blocks (hereafter, a third block). In this case, the third block can have a size of 4Nx2N and can have a split depth of (k + 2).
[00139] The third block can also be split again based on either QT, BT, or TT unsplit mode. For example, when the third block's division information indicates BT Vertical, the third block is divided into two sub-blocks, 321 and 322. In this case, sub-blocks 321 and 322 can have a size of 2Nx2N and a division depth of 5 (k + 3). Alternatively, when the third block's division information indicates BT Horizontal, the third block can be divided into two sub-blocks, 323 and 324. In this case, sub-blocks 323 and 324 can have a size of 4NxN and a division depth of (k + 3).
[00140] The division can be performed independently or in parallel with the neighboring block, or it can be performed sequentially in accordance with a predetermined priority ordczi.
[00141] The division information of the current block 15 can be determined based on at least one of the division information of the upper block of the current block or the division information of the neighboring block. For example, when the second block is divided based on BT Horizontal and the third upper block is divided based on BT Vertical, the third lower block 20 does not need to be divided based on BT Vertical. If the third lower block is divided by BT Vertical, this is the same result as when the second block is divided by QT. Therefore, the encoding for the division information (particularly the division airing information) of the third lower block can be skipped, and the decoding apparatus can be set so that the third lower block is divided 5 in the horizontal direction.
[00142] The top block can mean a block that has a smaller split depth than the split depth of the current block. For example, when the split depth of the current block is (k + 10) 2, the split depth of the top block might be (k + 1). The neighbor block can be a block adjacent to the top or left side of the current block. The neighbor block can also be a block that has the same split depth as the current block.
[00143] The division described above can be performed repeatedly down to the smallest encoding / decoding unit. When divided to the smallest unit, the division information for the block is no longer signaled by the encoding apparatus. The information in the smallest unit can include at least one of the smallest unit's size or shape. The size of the smallest unit can be expressed by the width, the height, the minimum or maximum value of the width and height, the sum of the width and height, the number of pixels, or the division depth. The information in the minimum unit can be specified in at least one of a video sequence, image, segment, or block unit. Alternatively, the information in the minimum unit can be a predefined value in the encoding / decoding device. The information in the minimum unit can be specified for each of the CU, E'U, and TU units. Information in a minimum unit can be applied to CU, E'U, and TU units equally. The blocks in the modes described below can be obtained through the block splitting described above.
[00144] Block splitting according to an embodiment of the present invention can be obtained within a tolerable range, and the information establishing the block splitting for this purpose can be supported. For example, the information establishing the block splitting can include the size m x n with respect to the maximum encoding block (CTU), the minimum encoding block, the maximum transformation block, and the minimum transformation block (for example, m x n are natural numbers such as 2, 4, 8, 16, 32, 64, 128, etc.) and the maximum splitting depth k for each block (for example, encoding / transformation x Intra / Inter x QT / BT / TT, etc. (k is 0, 1, 2 or more). And, at least one level of VPS, SPS, PPS, PH, or a segment header can be specified.
[00145] In the case of some of the fragment regions described above (subimage, segment, tile, etc.), in order to segment / divide each fragment region (e.g., to derive the position and size information of the fragment region), default base information (e.g., information at a base unit or lower of a corresponding fragment region such as a CTU or tile) may be required. In this case, VPS-SPS-PPS can be progressed sequentially, but for simultaneous encoding / decoding, it may be necessary to provide the base information at a level that supports the segmentation / dividing of each fragment region.
[00146] For example, CTU information can be generated (fixedly generated) in SPS, and CTU information can be used (when split) in accordance with 20 if it is split into sub-images (assumed to be processed in SPS). Alternatively, CTU information can be generated (when split, additionally generated) in accordance with whether it is split into segments or tiles (assumed to be processed in PPS), and can be split into segments and tiles based on this.
[00147] In summary, the base information used for segmentation / division of an image fragment can be generated at one level. Alternatively, the base information used for segmentation / division can be generated at two or more levels depending on the image type of the fragment.
[00148] With respect to the image type of fragment 10, the base information (syntax or flag) referenced to the fragment image segment can be generated at one level. Alternatively, the base information referenced to a segment of each fragment image can be generated at a plurality of levels in accordance with the fragment image. In this case, even if the base information can occur and exists at two or more levels, the same effect as occurring and existing at one level can be maintained by setting it to have the same value or information across levels. However, in the case of base information, it may be a default setting to have the same value or information, but it is not limited to this, and it may be possible to change it to have different values or information.
[00149]
[00150] Figure 4 is an exemplary diagram illustrating a predefined intra-prediction mode in an image encoding / decoding apparatus as a modality to which the present invention applies.
[00151] With reference to Figure 4, the pre-defined intra-prediction modes can be defined as a candidate prediction mode group composed of 67 modes, and specifically can include 65 directional modes (Nos. a 66) and two non-directional modes (DC, Planar). In this case, the directional mode can be identified based on tilt (e.g., dy / dx) or angle (degree) information. All or some of the intra-prediction modes described in the previous example can be included in the prediction mode candidate group of the luma component or the chroma component, and other additional modes can be included in the prediction mode candidate group.
[00152] Furthermore, a reconstructed block from another color space that has been encoded / decoded using correlation between color spaces can be used for prediction of the current block, and a prediction mode that supports this can be included. For example, in the case of a chroma component, a prediction block for the current block can be generated using a reconstructed block from a luma component that corresponds to the current block. That is, a prediction block can be generated based on the reconstructed block, to account for correlation between color spaces.
[00153] The prediction mode candidate group can be determined adaptively in accordance with the encoding / decoding setting. The number of candidate groups can be increased to improve prediction accuracy, and the number of 10-candidate groups can be reduced to decrease the number of bits in accordance with the prediction mode.
[00154] For example, one from candidate group A (67, 65 directional modes and 2 non-directional modes), candidate group B (35, 33 directional modes and 2 non-directional modes), or candidate group C (18, 17 directional modes and one non-directional mode) may be selected, and the candidate group may be selected or determined adoptively based on the size and shape of the block.
[00155] Furthermore, it is possible to have several configurations of the prediction mode candidate group according to the encoding / decoding setting. For example, as shown in Figure 4, the prediction mode candidate group can be configured so that a mode interval is uniform, or the prediction mode candidate group can be configured so that the number of modes between modes 18 and 34 in Figure 4 is greater than 5 the number of nodes between modes 2 and 18. The opposite case is also possible. The candidate group can be configured in various ways according to the block shape (i.e., square, non-square with a width greater than a height, non-square with a height greater than a width, etc.).
[00156] For example, when the width of the current block is greater than the height, all or some of the intra-prediction modes belonging to modes 2 to 18 may not be used, and may be replaced with all or some of the intra-prediction modes belonging to modes 67 to 80. On the other hand, when the width of the current block is less than the height, some or all of the intra-prediction modes belonging to modes 50 to 66 may not be used, and may be replaced with all or some of the intra-prediction modes belonging to modes -14 to -1.
[00157] In the present invention, unless otherwise specified, it is assumed that intra prediction is performed with a pre-set prediction mode candidate group (candidate group A) having a uniform mode interval, but the main elements of the present invention may also be applied to adaptive intra prediction settings.
[00158]
[00159] Figure 5 illustrates a method of decoding a current block based on intra-prediction as a modality to which the present invention applies.
[00160] With reference to Figure 5, a reference region for intra-prediction of a current block (S500) can be determined.
[00161] The reference region according to the present invention may be an adjacent region to at least one on the left, top, top-left, bottom-left, or top-right of the current block. In addition, although not shown in Figure 5, the reference region may also include an adjacent region to at least one on the right, bottom-right, or bottom of the current block, and may be used selectively based on an intra-prediction mode of the current block, an encoding / decoding order, a scanning order, etc.
[00162] The encoding / decoding apparatus may define a plurality of pixel lines available for intra-prediction. The plurality of pixel lines may include at least one of a first pixel line adjacent to the current block, a second pixel line adjacent to the first pixel line, a third pixel line adjacent to the second pixel line, or a fourth pixel line adjacent to the third pixel line.
[00163] For example, depending on the encoding / decoding setting, the plurality of pixel lines 10 may include all of the first through fourth pixel lines, or it may include only the remaining pixel lines except for the third pixel line. Alternatively, the plurality of pixel lines may include only the first and fourth pixel lines 15, or it may include only the first through third pixel lines.
[00164] The current block can select one or more of the plurality of pixel lines and use this as a reference region. In this case, the selection can be made based on an index (refldx) pointed from the encoding apparatus. Alternatively, the selection can be made based on default encoding information. Here, the encoding information can include at least the size, shape, and type of division of the current block, whether the intra-prediction mode is non-directional, whether the intra-prediction mode is horizontally directional, an angle of the intra-prediction mode, or a component type.
[00165] For example, when the intra-prediction mode is a planar mode or a DC mode, only the first pixel line can be limited for use. Alternatively, when the current block size is less than or equal to a predetermined threshold value, only the first pixel line can be limited for use. Here, the size can be expressed as either the width or height of the current block (e.g., maximum value, minimum value, etc.), the sum of the width and height, or the number of samples belonging to the current block. Alternatively, when the intra-prediction mode has an angle greater than a predetermined threshold angle (or smaller than a predetermined threshold angle), only the first pixel line can be used. The threshold angle 20 can be an angle from an intra-prediction mode that corresponds to mode 2 or mode 6 in the prediction mode candidate group mentioned above.
[00166] Meanwhile, you can know a case in which iviA / a / zuz o / uu ΐύνι at least one of the pixels in the reference row is unavailable, and in this case, the unavailable pixel can be replaced with a pre-defined default value or an available pixel. This will be described in detail with reference to Figure 6.
[00167] With reference to Figure 5, an intra-prediction mode of a current block can be derived (S510).
[00168] The current block is a concept that includes a luma block and a chroma block, and the intra prediction mode can be determined for each of a luma block and a chroma block. Hereafter, it is assumed that the predefined intra prediction mode in the DC encoding apparatus is composed of non-directional modes (Planar Mode, DC Mode) and directional modes.
[00169] 1. In case of luma block
[00170] The predefined intra-prediction modes described above can be divided into a candidate MPM group and a non-candidate MPM group. The intra-prediction mode of the current block can be selectively derived using either the candidate MPM group or the non-candidate MPM group. To this end, a flag (hereafter referred to as a first flag) can be used to indicate whether the intra-prediction mode of the current block is derived from the candidate MPM group. For example, when the first flag is a first value, the candidate MPM group can be used, and when the first flag is a second value, the non-candidate MPM group can be used.
[00171] Specifically, when the first flag is the first value, the intra-prediction mode of the current block can be determined based on the candidate group of MPM (candModoLista) that includes at least one MPM candidate and an MPM index. The MPM index can be information that specifies any of the MPM candidates belonging to the MPM candidate group. The MPM index can only be specified when a plurality of MPM candidates belongs to the MPM candidate group.
[00172] On the other hand, when the first flag is a second value (i.e., when the same MPM candidate as the current block's intra-prediction mode does not exist in the MPM candidate group), the current block's intra-prediction mode can be determined based on the flagged remaining information mode. The remaining information mode can specify any one of the remaining modes except for the MPM candidate.
[00173] A method for determining the MPM candidate group will be described below.
[00174] (Modality 1) The MPM candidate group may include at least one of a neighbor block intra-prediction mode (modeA), modeA-n, modeA+n, or a default mode. The value of n may be an integer of 1, 2, 3, 4, or more. The neighbor block may mean a block adjacent to the left and / or top of the current block. However, the present invention is not limited to this, and the neighbor block may include at least one upper-left neighbor block, lower-left neighbor block, or upper-right neighbor block. The default mode may be at least one of a flat mode, a DC mode, or a default directional mode. The default directional mode may include at least one of a horizontal mode (modeV), a vertical mode (modeH), modeV-k, modeV+k, modeH-k, or modeH+k. Here, k can be an integer of 1, 2, 3, 4, 5, or more.
[00175] The MPM index can specify the same MPM as the intra-prediction mode of the current block among MPMs of the MPM candidate group. That is, the MPM specified by the MPM index can be set as the intra-prediction mode of the current block.
[00176] (Modalidao. 2) The candidate group of MPM can be divided into candidate groups m. m can be an integer of 2, 3, 4 or more. Hereafter, for convenience of description, it is assumed that the candidate group of MPM is divided into a first candidate group and a second candidate group.
[00177] The encoding / decoding apparatus can select either the first candidate group or the second candidate group. The selection can be made based on a flag (hereafter referred to as a second flag) that specifies whether the intraprediction mode of the current block belongs to the first candidate group or the second candidate group. For example, if the second flag is a first value, the intraprediction mode of the current block can be derived from the first candidate group; otherwise, the intraprediction mode of the current block can be derived from the second candidate group.
[00178] Specifically, when the first candidate group is used in accordance with the second flag, a first MPM index specifying any one of a plurality of default modes belonging to the first candidate group may be flagged. The default mode corresponding to the flagged first MPM index may be set as the intra-prediction mode of the current block. On the other hand, when the first candidate group consists of one default mode, the first MPM index is flagged, and the intra-prediction mode of the current block may be set as the default mode of the first candidate group.
[00179] When the second candidate group is used in accordance with the second flag, a second MPM index specifying any one of a plurality of MPM candidates belonging to the second candidate group may be flagged. The MPM candidate corresponding to the flagged second MPM index may be set as an intra-prediction mode for the current block. On the other hand, when the second candidate group consists of one MPM candidate, the second MPM index is not flagged, and the intra-prediction mode for the current block may be set as the MPM candidate of the second candidate group.
[00180] While singing, the second flag can be signaled only when the first flag described above is a first value (condition 1). Also, the second flag can be signaled only when the reference region of the current block is determined to be the first pixel line. When the current block refers to non-adjacent pixel lines, the MPM candidates of the first candidate group can be restricted so that they are not used. Or, conversely, when the intra-prediction mode of the current block is derived from the first candidate group in accordance with the second flag, the current block can be restricted to refer only to the first pixel line.
[00181] Furthermore, the second flag can only be set when the current block does not perform intra-prediction within sub-block units (condition 2). Conversely, when the current block performs intra-prediction within sub-block units, the flag may not be set and can be set to the second value in the decoding apparatus.
[00182] When either of the above conditions 1 or 2 is satisfied, the second flag may be signaled, or when both conditions 1 and 2 are satisfied, the second flag may be signaled.
[00183] The first candidate group may consist of a predefined fault mode. The fault mode may be at least one of a directional mode or a non-directional mode. For example, the directional mode may include at least one of a vertical mode, a horizontal mode, or a diagonal mode. The non-directional mode may include at least one of a flat mode and one DC mode.
[00184] The first candidate group may consist of either non-directional modes only or directional modes r. r may be an integer of 1, 2, 3, 4, 5 or more. r may be a fixed value pre-committed to the encoding / decoding apparatus, or it may be variably determined based on a predetermined encoding parameter.
[00185] The second candidate group may include a plurality of MPM candidates. However, the second candidate group may be limited to include the default mode belonging to the first candidate group. The number of MPM candidates may be 2, 3, 4, 5, 6, or more. The number of MPM candidates may be a fixed value pre-committed to an encoding / decoding apparatus or may be variably determined based on an encoding parameter. The MPM candidate may be derived based on an intra-prediction mode of a neighboring block adjacent to the current block. The neighboring block may be an adjacent block with at least one left, top, top-left, bottom-left, or top-right position relative to the current block.
[00186] Specifically, the MPM candidate can be determined by considering whether the left block intra-prediction mode (candlntraPredModeA) and the top block intra-prediction mode (candlntraPredModeB) are the same, and whether candlntraPredModeA and candlntraPredModeB are non-directional modes.
[00187] [CASE 1] For example, when candlntraPredModoA and candlntraPredModoB are the same, and candlntraPredModoA is not a non-directional mode, the current block's MPM candidate may include at least one of candlntraPredModoA, (candlntraPredModoA-η), (candlntraPredModoA+n), or a non-directional mode. Here, n may be an integer of 1, 2, or more. The non-directional mode may include at least one of a flat mode or a DC mode. As an example, the current block's MPM candidate can be determined as shown in Table 1 below. The index in Table 1 specifies the MPM candidate's position or priority, but it is not limited to this.
[00188] [Table 1] MPM Candi dat index 0 cand I ntra P re dM c > do A 1 2 + ( ( cand Intra P re dMode A + o 1 ) % 6 4 ) 2 2 + ( ( candintraPredModeA — I ) % 64 ) 3 2 + ( ( candintra P re dMo doA + o0 ) % o 4 ) 4 2 + ( ( ca nd I ntra Pr e dMo do A % 64 )
[00189] [CASE 2] Or, when candlntraPredModoA and candlntraPredModoB are not the same, and both candlntraPredModoA and candlntraPredModoB are not a non-directional mode, the MPM candidates of the current block may include at least one of candlntraPredModoA, candlntraPredModoB, (maxAB-n), (maxAB+n), (minAB-n), (minAB+n), or a non-directional mode. Here, maxAB and minAB signify a maximum and minimum value of candlntraPredModoA and candlntraPredModoB, respectively, and n may be an integer of 1, 2, or more. The non-directional mode may include at least one of a flat mode or a DC mode. As an example, based on the difference value D between candlntraPredModoA and candlntraPredModoB, the candidate mode of the second candidate group can be determined as shown in Table 2 below. The index in Table 2 specifies the MPM candidate's position or priority, but is not limited to this. IVIA / a / ZU¿O / UU ! 03 í
[00190] [Table 2] í index candidate mode ÍD = 1) candidate mode (D = 2) candidate 'mode (D >= 62) candidate mode (Otherwise) 0 candlntraPre candlntraPre candlntraPre ca nd I ntra P re dModeA 'dModeA dido do A dModeA 1 candint raPre ca nd Int ra Pre candint raPre candint ra Pre dModoB «dModoB dModoB dModoB 2 2 + ( ( 2 + ( ( 2 + ( ( 2 + ( ( iri η AB +61 ) mi nAB - 1 ) mi ηAB - 1 ) mirAB +61 ) % 64 ) A o4 ) A o4 ) A 64 ) 3 2 + ( ( 2 + ( ( + ( ( 2 + ( ( maxAB - 1 ) mirAB +61 ) maxAB +61 ) my nAB - 1 ) % 64 ) A 64 ) % 64 ) % 64 ) 4 2 + ( ( 2 + ( ( 2 + í mi nAB 2 + ( ( minAB +60 ) maxAB - 1 ) % o4 ) maxAB +61 ) % o4 ) A o4 ) % 64 )
[00191] In the foregoing Table 2, one of the MPM candidates is derived based on minAB, and another is derived based on maxAB. However, the present invention is not limited to this, and the MPM candidate can be derived based on maxAB with respect to minAB, and conversely, can be derived based on minAB with respect to maxAB.
[00192] [CASE 3] When candlntraE'redModoA and candlntraPredModoB are not the same, and only one of candlntraE'redModoA and candlntraPredModoB is a non-directional mode, the current block's MPM candidate may include at least one of maxAB, (maxAB-n), (maxAB+n), or a non-directional mode. Here, maxAB denotes the maximum value of candlntraE'redModoA and candlntraPredModoB, and n may be an integer of 1, 2, or more. A non-directional mode may include at least one of a flat mode or a DC mode. As an example, the current block's MPM candidate can be determined as shown in Table 3 below. The index in Table 3 specifies the position or priority of the MPM candidate, but is not limited to this.
[00193] [Table 3] MPM Candidate Index 0 maxAB 1 2 + ( ( maxAB - 61 ) % 64 ) 2 2 + ( ( maxAB - 1 ) % 64 ; 3 2 + ( ( maxAB - 60 ) % 64 ) 4 2 + ( maxAB % 64 )
[00194] [CASE 4] When candlntraE'redModoA and candlntraPredModoB are not the same, and both candlntraPredModoA and candlntraPredModoB are non-directional modes, the MPM candidates of the current block can include a non-directional mode, a vertical mode, a horizontal mode, (vertical mode-m), (vertical mode+m), (horizontal mode-m), or (horizontal mode+m). Here, m can be an integer of 1, 2, 3, 4, or more. The non-directional mode can include at least one of a flat mode or a DC mode. As an example, the MPM candidate of the current block can be determined as shown in Table 4 below. The index in Table 4 specifies the position or priority of the MPM candidate, but is not limited to this. For example, index 10 1 can be assigned to horizontal mode, or the largest index can be assigned to it.In addition, the MPM candidate may include at least one of a diagonal mode (e.g., mode 2, mode 34, mode 66), (diagonal-m mode), or (diagonal +m mode).
[00195] [Table 4] MPM Candidate Index 0 INTRA_DC 1 Vertical Mode 2 Horizontal Mode 2 3 (Vertical Mode-4) 4 (Vertical Mode-4)
[00196] The intra-prediction mode (IntraPredMode) decoded through the process described above can be changed / corrected based on a predetermined offset, which will be described in detail with reference to Figure 7. 2. In the case of chroma blocks
[00197] Predefined intra-prediction modes for a chroma block can be divided into a first group and a second group. Here, the first group can be configured with reference to intercomponent-based prediction modes, and the second group can be configured with all or some of the predefined intra-prediction modes described above.
[00198] The intra-prediction mode of the chroma block can be selectively derived using either the first group or the second group. The selection can be made based on a third predetermined flag. The third flag can indicate whether the intra-prediction mode of the chroma block is derived based on the first group or the second group.
[00199] For example, when the third flag is a first value, the intra-prediction mode of chroma block 20 can be determined as one of one or more inter-component-based prediction mode references belonging to the first group. This will be described in detail in Figure 8.
[00200] On the other hand, when the third flag is a second value, the intra-prediction mode of the chroma block can be determined as one of a plurality of intra-prediction modes belonging to the second group. As an example, the second group can be defined as shown in Table 5, and the intra-prediction mode of the chroma block can be derived based on the information (intra-chroma prediction mode) signaled by the encoding apparatus and the intra-prediction mode (IntraPredModeY) of the luma block.
[00201] [Table 5] intr a_c ro ma_ρ re dgrio do [ xCb ][ yCb ] IntraPredModeY[ zCb + cbWidth / 2 ] [ yCb + cbHeight / 2 ] 0 50 18 1 18 18 Ό Ό 18 18 3 1 1 1 Ό Ό 1 4 0 50 18 1
[00202] In accordance with Table 5, the intra-prediction mode of the chroma block can be determined 15 based on the indicated information and the intra-prediction mode of the luma block. Two mode numbers listed in Table 5 correspond to the mode numbers in Figure 4. For example, when the value of the signaled intra chroma prediction mode is 0, the intra prediction mode of the chroma block can be determined as either diagonal mode 66 or flat mode (0) in accordance with the intra prediction mode of the luma block. Alternatively, when the value of the signaled intra chroma prediction mode is 4, the intra prediction mode of the chroma block can be set to be the same as the intra prediction mode of the luma block. Meanwhile, the intra prediction mode (IntraPredModeY) of the luma block can be an intra prediction mode of a sub-block that includes a specific position within the luma block. Here, the specific position within the luma block can correspond to a central position within the chroma block.
[00203] However, there may be a case where a sub-block in the luma block that corresponds to the center position in the chroma block is unavailable. Here, unavailable may be a case where the corresponding sub-block is not encoded in an intra-mode. For example, when a sub-block does not have an intra-prediction mode, such as when a corresponding sub-block is encoded in an inter-mode or current image reference mode, it can be determined that the corresponding sub-block is unavailable. In this case, the intra-prediction mode (IntraPredModeY) of the luma block can be set to a mode pre-committed to the encoding / decoding apparatus. Here, the pre-committed mode can be any of a flat mode, a DC mode, a vertical mode, or a horizontal mode.
[00204] With reference to Figure 5, the current block can be decoded based on the reference region for intra prediction and the intra prediction mode (S520).
[00205] Decoding the current block can be performed in units of sub-blocks of the current block. To this end, the current block can be divided into a plurality of sub-blocks. Here, the current block can correspond to a leaf node. The leaf node can mean an encoding block that is no longer divided into smaller encoding blocks. That is, the leaf node can mean a block that is no longer divided through the tree-based block division described above.
[00206] The division can be performed based on the current block size (Mode 1).
[00207] For example, when the current block size is less than a predetermined threshold size, the current block may be split in two vertically or horizontally. Conversely, when the current block size is greater than or equal to the threshold size, the current block may be split into four vertically or horizontally. The threshold size may be specified by the encoding apparatus or may be a fixed value predefined in the decoding apparatus. For example, the threshold size is expressed as NxM, where N and M may be 4, A, 16 or more. N and M can be the same or can be set differently from each other.
[00208] Alternatively, if the current block size is less than the default threshold size, the current block is not split (no split). Otherwise, the current block may be split into two or four.
[00209] The division can be performed based on the shape of the current block (Mode 2).
[00210] For example, if the shape of the current block is a square, the current block is divided into four, and otherwise, the current block can be divided into two. Conversely, if the shape of the current block is a square, the current block is divided into two, and otherwise, the current block can be divided into four.
[00211] Alternatively, if the current block shape is a square, the current block is divided into two or four, and otherwise, the current block cannot be divided. Conversely, when the current block shape is a square, the current block is not divided, and otherwise, the current block can be divided into two or four.
[00212] The division can be performed by selectively applying either of the above methods 1 or 2, or the division can be performed based on a combination of methods 1 and 2.
[00213] Two divisions means dividing in two in either a vertical or horizontal direction, and four divisions may include dividing in four in either a vertical or horizontal direction or dividing in four in both vertical and horizontal directions.
[00214] In the preceding embodiment, two- or four-divisions are described, but the present invention is not limited to this, and the current block can be divided into three in a vertical or horizontal direction. In this case, the width or height ratio can be (1:1:2), (1:2:1), or (2:1:1).
[00215] The information itself is divided into sub-block units, if it is divided into quads, a division direction, and a division number can be signaled from the encoding apparatus or variably determined by the decoding apparatus based on a predetermined encoding parameter. Here, the encoding parameter can mean a block size / shape, a division type (para-division, two-division, three-division), an intra-prediction mode, a range / position of a neighboring pixel for intra-prediction, a component type (e.g., luma and chroma), a maximum / minimum size of a transformation block, a transformation type (e.g., transform jump, DCT2, DST7, DCTE), and the like.
[00216] The sub-blocks of the current block can be sequentially predicted / rebuilt according to a predetermined priority. In this case, a first sub-block of the current block can be predicted / rebuilt, and a second sub-block can be predicted / rebuilt with reference to the first pre-decoded sub-block. With respect to priority, it is predicted / rebuilt in the order top->bottom, but each upper and lower sub-block can be predicted / rebuilt in the order left-to-right. Alternatively, it is predicted / rebuilt in the order top->bottom, but each upper and lower sub-block can be predicted / rebuilt in the order right-to-left. Alternatively, it is predicted / rebuilt in the order bottom-to-top, but each lower and upper sub-block can be predicted / rebuilt in the order left-to-right.Alternatively, it is predicted / reconstructed in the bottom-to-top order, but each lower and upper sub-block can be predicted / restored in the right-to-top order. Alternatively, it is predicted / reconstructed in the left-to-right order, but each left and right sub-block can be predicted / reconstructed in the top-to-bottom order. Alternatively, it is predicted / reconstructed in the left-to-right order, but each left and right sub-block can be predicted / reconstructed in the bottom-to-top order. Alternatively, it is predicted / reconstructed in the right-to-left order, but each sub-block to the right and left can be predicted / reconstructed in the top-to-bottom order. Alternatively, it is predicted / reconstructed in the right-to-left order, but each sub-block to the right and left can be predicted / reconstructed in the bottom-to-top order.
[00217] The encoding / decoding apparatus may define and use any of the above-described orders. Alternatively, the encoding / decoding apparatus may define at least two or more of the above-described orders and selectively use any of them. To this end, an index or flag specifying any of the predefined orders may be encoded and signaled.
[00218]
[00219] Figure 6 illustrates a method for replacing an unavailable pixel in a reference region as a modality to which the present invention applies.
[00220] As described above, the reference region can be determined as one of the first four pixel lines. However, in the present mode, for descriptive convenience, the reference region is assumed to be the first pixel line. The present mode can be applied in the same or a similar manner to the second through fourth pixel lines.
[00221] When all pixels in the reference region are unavailable, the corresponding pixel 20 can be replaced with one from a range of pixel values expressed by a bit depth or a range of current pixel values in an image. For example, the maximum, minimum, median, average, etc., value of a range of pixel values can correspond to a value to be replaced. When the bit depth is 8, all pixels in the reference region can be filled with 128 when the median value of 5 is replaced.
[00222] However, if this is not the case—that is, if not all pixels in the reference region are unavailable, but at least one pixel in the reference region is unavailable—the replacement process can be performed for at least one of the top, left, right, or bottom reference regions of the current block. For the sake of clarity, this description will focus on the left, top, and right reference regions of the current block.
[00223] (STEP 1) It is determined whether the upper-left TL pixel adjacent to the current block (prediction block) is unavailable. If the upper-left TL pixel is unavailable, the pixel can be replaced with a value of 20, the median bit depth.
[00224] (PAS02) It is possible to sequentially search whether an unavailable pixel exists in the upper reference region. Here, the upper reference region can include an adjacent pixel line in at least one upper or upper-right corner of the current block. The length of the upper reference region can be equal to the width of the current block (nW), (2+nW), or the sum of the width and height (nW+nH).
[00225] Here, the search direction can be performed from left to right. In this case, when pixel p[x] [-1] is determined to be unavailable, pixel ρ[χ] [-1] can be replaced with its neighboring pixel p[xl] [10 1]. Alternatively, the search direction can be performed from right to left. In this case, when pixel p[x] [-1] is determined to be unavailable, pixel ρ[χ] [-1] can be replaced with its neighboring pixel ρ[χ + 1] [1].
[00226] (STEP 3) It is possible to sequentially search whether an unavailable pixel exists in the left reference region. Here, the left reference region can include an adjacent pixel line in at least one of the left or bottom-left corners of the current block. The length of the left reference region can be equal to the height of the current block (nH), (2+nH), or the sum of the width and height (nW+nH).
[00227] Here the search direction can be performed from top to bottom. In this case, when it is determined that pixel p[-1][y] is unavailable, pixel P[-1][y] can be replaced with the neighboring pixel p[-1][y1]. Alternatively, the search direction can be performed from bottom to top. In this case, when it is determined that pixel p[-1][y] is unavailable, pixel ρ[-1][y] can be replaced with the neighboring pixel p[-i][y+i].
[00228] (STEP4) It is possible to sequentially search if an unavailable pixel exists in the right reference region. Here, the right reference region can include a line of pixels adjacent to the right of the current block. The length of the right reference region can be the same as the height of the current block (nH).
[00229] Here, the search direction can be from top to bottom. In this case, when it is determined that pixel p[nW][y] is unavailable, pixel p[nW][y] can be replaced with the neighboring pixel p[nW][y1]. Alternatively, the search direction can be from bottom to top. In this case, when it is determined that pixel p[nW][y] is unavailable, pixel p[nl][y] can be replaced with the neighboring pixel P[nW][y+1].
[00230] Alternatively, a separate search process can be omitted for the right reference region. Preferably, an unavailable pixel in the right reference region can be filled with the median value 5 of the bit depth. Alternatively, an unavailable pixel in the right reference region can be replaced with one from the upper-right TR pixel or the lower-right BR pixel adjacent to the current block, or it can be replaced with a representative value. Here, the representative value can be expressed as an average value, a maximum value, a minimum value, a mode value, a median value, and so forth. Alternatively, the unavailable pixel in the right reference region can be derived by applying a predetermined weight to each of the upper-right TR pixel and the lower-right BR pixel.In this case, the weight can be determined by considering a first distance between an unavailable pixel in the right reference region and an upper-right TR pixel and a second distance between an unavailable pixel in the right reference region and a lower-right BR pixel. The bottom-right BR pixel can be filled with one of an upper-left TL pixel, an upper-right TR pixel, or a bottom-left BL pixel adjacent to the current block, or it can be replaced with a representative value of at least two of an upper-left TL pixel, an upper-right TR pixel, or a bottom-left BL pixel. Here, the representative value is as described above. Alternatively, the lower-right BR pixel can be derived by applying a predetermined weight to at least two of the upper-left TL pixel, the upper-right TR pixel, or the lower-left BL pixel, respectively. Here, the weight can be determined considering a distance from the lower-right BR pixel.
[00231] Meanwhile, the replacement process described above is not limited to being performed in the top -> left -> right priority. For example, the replacement process can be performed in the left -> top -> right priority. Alternatively, the replacement process can be performed in parallel for the top and left reference regions, and then it can be performed for the right reference region. Furthermore, the process in STEP 1 can be omitted when the replacement process is performed in the left -> top -> right priority.
[00232]
[00233] Figure a method to change / correct an intra-prediction mode as a modality to which the present invention applies.
[00234] The decoded intra-prediction mode (IntraPredMode) can be changed based on a predetermined offset. The offset can be applied selectively based on at least one of the following: size, shape, split information, split depth, an intra-prediction mode value, or a component type. Here, the block can mean the current block and / or a neighboring block of the current block.
[00235] Splitting information may include at least two pieces of information: first, indicating whether the current block is split into a plurality of sub-blocks; second, indicating a direction of splitting (e.g., horizontal or vertical); and third, the number of sub-blocks split. Splitting information may be encoded and signaled by an encoding apparatus. Alternatively, some of the splitting information may be variably determined in the decoding apparatus based on the block property described above, or it may be set to a fixed, predefined value in the encoding / decoding apparatus.
[00236] For example, if the first piece of information is a first value, the current block is divided into a plurality of sub-blocks; otherwise, the current block may not be divided into a plurality of sub-blocks (NOT_DIVIDED). When the current block is divided into a plurality of subblocks, the current block can be divided horizontally (HOR DIVIDED) or vertically (VER DIVIDED) based on the second piece of information. In this case, the current block can be divided into k subblocks. Here, k can be an integer of 2, 3, 4, or more. Alternatively, k can be limited to a power of 2, such as 1, 2, 4, etc. Alternatively, in the case of a block in which at least one of the width or height of the current block is 4 (for example, 4x8, 8x4), k is set to 2; otherwise, k is set to 4, 8, or 16. When the current block is undivided (UNDIVIDED), k can be set to 1.
[00237] The current block can be divided into subblocks that have the same width and height, or it can be divided into subblocks that have different widths and heights. The current block can be divided into NxM block units (e.g., 2x2, 2x4, 4x4, 8x4, 8x8, etc.) pre-committed to the encoding / decoding apparatus, with respect to the block property described above.
[00238] Compensation can only be applied when the current block size is less than or equal to a predetermined TI threshold value. Here, the threshold value TI can signify a maximum block size at which compensation is applied. Alternatively, it can be applied only when the current block size is greater than or equal to a predetermined threshold value T2. In this case, the threshold value T2 can signify the minimum block size at which compensation is applied. The threshold value can be signaled via a bitstream. Alternatively, it can be variably determined by the decoding apparatus based on one of the block properties described above, or it can be a fixed value pre-committed to the encoding / decoding apparatus.
[00239] Alternatively, the offset can be applied only when the shape of the current block is not square. For example, when the following 20 conditions are met, a default offset (for example, 65) can be added to the IntraPredMode of the current block.
[00240] - nW is greater than nH
[00241] IntraPredMode is greater than or equal to
[00242] - is intraPredModo less than (whRelación>l) ? (S+ó^whRelación) : 8
[00243] Here, nW and rH denote the width and height of the current block, respectively, and whRelation can be set to Abs(Log2(nW / nH) ) .
[00244] Alternatively, when the following conditions are met, a predetermined offset (for example, 67) can be subtracted from the current IntraE'redModo block.
[00245] - nH is greater than nH
[00246] - IntraE'redMode is less than or equal to 66
[00247] - Is IntraE'redModo greater than (whRelaciónól)? (GO-i^whRclación) : 60
[00248] As described above, the final intra-prediction mode can be determined by adding / subtracting the offset to the intra-prediction mode (IntraE'redMode) of the current block, taking into account the properties of the current block. However, the present invention is not limited to this, and the application of the offset can be carried out in the same manner, taking into account the properties (e.g., size, shape) of the sub-block instead of the current block.
[00249]
[00250] Figure 8 illustrates a prediction method based on intercomponent reference in a modality to which the present description applies.
[00251] The current block can be divided into a luma block and a chroma block according to a component type. The chroma block can be predicted using the pixel of the reconstructed luma block. This is referred to as an inter-component reference. In this mode, the chroma block is assumed to have a size of (nTbW x nTbH), and the luma block corresponding to the chroma block has a size of (2+nTbW x 2+nTbH).
[00252] With reference to Figure 8, an intra-prediction mode of a chroma block (S800) can be determined.
[00253] As described in Figure 5, the intra-prediction mode of the chroma block can be determined as one of one or more inter-component-based prediction mode references belonging to the first group in accordance with the third flag. The first group can consist of only inter-component-based prediction mode references. The encoding / decoding apparatus can define at least one of INTRA_LT_CCLM, INTRA_L_CCLM, or INTRA_T_CCLM as an inter-component-reference-based prediction mode. INTRA_LT_CCLM is a mode that refers to both the left and top regions adjacent to the luma / chroma blocks, INTRA_L_CCLM is a mode that refers to the left region adjacent to the luma / chroma blocks, and INTRA_T_CCLM is a mode that refers to the top region adjacent to the luma / chroma blocks.
[00254] A default index can be used to select any of the references to the 10 intercomponent-based prediction modes. The index can be information specifying either INTRA LT CCLM, INTRA_L_CCLM, or INTRA_T_CCLM. The index can be specified only when the third flag is a first value. The reference to the 15 intercomponent-based prediction modes belonging to the first group and the indices assigned to each prediction mode are shown in Table 6 below.
[00255] [Table 6] Idx reference for inter-component based prediction modes 0 INTRA_LT_CCLM 1 INTRA_L_CCLM 2 INTRA_T_CCLM
[00256] Table 6 is only one example of an index assigned to each prediction mode, but it is not limited to this. That is, as shown in Table 6, the indices can be assigned in the priority order of INTRA_LT_CCLM, INTRA_L_CCLM, INTRA_T_CCLM, or the indices can be assigned in the priority order of INTRA_LT_CCLM, INTRA_T_CCLM, INTRA_L_CCLM. Alternatively, INTRA LT CCLM may have a lower priority order than INTRA T CCLM or INTRA L CCLM. The third flag may be selectively set based on information indicating whether inter-component referencing is permitted. For example, if the information value is 1, the third flag may be set; otherwise, it may not. Here, the information may be determined as 0 or 1 based on a predefined condition described later.
[00257] (Condition 1) When a fourth flag indicating whether intercomponent-based prediction reference is allowed is 0, information 20 can be set to 0. The fourth flag can be signaled in at least one of VPS, SPS, PPS, PH, and segment header.
[00258] (Cerition 2) When at least one of the following sub-conditions is satisfied, the information may be set to 1.
[00259] - qtbtt dual intra-tree flag equals 0
[00260] - one type of segment is not the I-segment
[00261] - a coding tree block size is less than 64x64
[00262] In condition 2, the qtbtt dual intra-tree flag can indicate whether an encoding tree block is implicitly split into a 64x64 encoding block and a coding block 64x64 is divided based on a dual tree. The dual tree can refer to a method in which a luma component and a chroma component are divided with an independent splitting structure. The encoding tree block size (CtbLog2Size) can be a size (e.g., 64x64, 128x128, 256x256) predefined in an encoding / decoding device, or it can be encoded and specified by an encoding device.
[00263] (Cemdiciór. 3) When at least one of the following sub-conditions is satisfied, the information can be set to 1
[00264] - a width and a height of a first top block are 64
[00265] iviA / a / zu¿ j / uu ΐύνι a depth of a first top block is the same as (CtbLog2Size-6), the first top block is divided based on BT Horizontal, and a second top block is 64x32
[00266] - the depth of the first top block is greater than (CtbLog2Size-6)
[00267] - a depth of the first top block is the same as (CtbLog2Size-6), the first top block is divided based on BT Horizontal, and a second top block is divided based on BT Vertical.
[00268] In condition 3, the first top block can be a block that includes the current chroma block as a bottom block. For example, when the depth of the current chroma block is k, the depth of the first top block is (kn), where n can be 1, 2, 3, 4, or more. The depth of the first top block can mean only a depth conforming to splitting based on a quad tree, or it can mean a depth conforming to splitting from at least one of a quad tree, a binary tree, or a ternary tree. The second top block is a bottom block belonging to the first top block, and it can have a depth less than a current chroma block and a depth greater than the first top block. For example, when the depth of the current chroma block is k, the depth of the second top block is (km), where m can be a natural number less than n.
[00269] When none of the conditions described above 1 to 3 are satisfied, the information can be set to 0.
[00270] However, even when at least one of conditions 1 to 3 is satisfied, when at least one of the following sub-conditions is satisfied, the information can be reset to 0.
[00271] - the first top block is 64x64 and the sub-block-based prediction described above is real i rada
[00272] at least one of the width or height of the first top block is less than 64 and the depth of the first top block is equal to (CtoLog2Tarnaño-6)
[00273] With reference to Figure 8, a luma region for inter-component reference of the chroma block may be specified (S810).
[00274] The luma region can include at least one luma block or a neighboring region adjacent to the luma block. Here, the luma block can be defined as a region that includes pixels pY[x][y] (x=0..nTbW+2-l, iviA / a / zuzo / uu ΐύνι y=0. .riTbH*· 2-1). The pixels can signify reconstructed values before the filter within the loop is applied.
[00275] The neighboring region can include at least one of a left neighboring region, an upper neighboring region, or an upper-left neighboring region. The left neighboring region can be set as a region that includes pixels pY[x][y] (x=-1..-3, y=0..2 numSampleL-1). The adjustment can only be made when the value of numSampleL is greater than 0. The upper neighboring region can be set as a region that includes pixels pY[x][y] (x=0..0 numSampleT-1, y=-1..-3). The adjustment can only be made when the value of numSampleT is greater than 0. The upper-left neighboring region can be set as a region that includes pixels pY[x][y] (x=-1, y=-1,-2). The adjustment can only be made when the upper-left region of the luma block is available.
[00276] The numMuestL and numMuestT described above can be determined based on the current block's intra-prediction mode. Here, the current block can denote the chroma block.
[00277] For example, when the intra-prediction mode of the current block is INTRA LT CCLM, it can be derived based on Equation 9. Here, INTRA LT CCLM can mean a mode in which inter-component referencing is done based on neighboring regions to the left and above the current block.
[00278] [Creation 1]
[00279] TSampleNum = T-disp? nTbW: 0
[00280] sampleNumL = dispL? nTbH: 0
[00281] In accordance with Equation 1, numMuestT is derived as nTbW when the upper neighbor region to the current block 10 is available. Otherwise, numMuestT can be derived as 0. Similarly, numMuestL is derived as nTbH when the left neighbor region to the current block is available. Otherwise, numMuestL can be derived as 0.
[00282] Conversely, when the current block's intra prediction mode is not INTRA LT CCLM, it can be derived based on Equation 2 below.
[00283] [Creation 2]
[00284] numMuestT = (dispT && predModoIntra INTRA_T_CCLM) ? (nTbW + numRightTop ) : 0
[00285] LSampleNum = (LDisp && IntraModePred = = INTRA_L_CCLM)? (nTbH + leftnumDown): 0
[00286] In Equation 2, INTRA T CCLM may refer to 9. A mode in which inter-component referencing is performed based on a region above the current block. INTRA L CCLM can mean a mode in which inter-component referencing is performed based on a region to the left of the current block. ntirnSuperiorDerecha can mean the number of all or some pixels that belong to a region above the right of the chroma block. Some pixels can refer to available pixels among pixels that belong to the lowest pixel row of the corresponding region. In an availability determination, whether pixels are available can be determined sequentially in a left-to-right direction. This process can be performed until an unavailable pixel is found. númlizquierdaAbajo can mean the number of all or some pixels that belong to a region below the left of the chroma block.Some pixels may refer to available pixels within the rightmost pixel row (column) of the corresponding region. When determining availability, pixel availability can be determined sequentially from top to bottom. This process can be repeated until an unavailable pixel is encountered. 100
[00287] With reference to Figure 8, downsampling can be performed in the luma region specified in S810 (S820).
[00288] Downward sampling may include at least one of: 1. Downward sampling of the luma block, 2. Downward sampling of the region adjacent to the luma block, or 3. Downward sampling of the region adjacent to the luma block. This will be described in detail below.
[00289] 1. Top-down sampling of the luma blog
[00290] (Mode11age 1)
[00291] The pixel pDsY[x][y] (x=0..nTbW-1, y=0..nTbH-1) of the descending sampled luma block can be derived based on a corresponding pixel pY[2*x][2*y] of the luma block and the neighboring pixel. The neighboring pixel can mean at least one of a left neighbor pixel, a right neighbor pixel, an upper neighbor pixel, or a lower neighbor pixel to the corresponding pixel. For example, the pixel pDsY[x][y] can be derived based on Equation 3 below.
[00292] [EcusciO Π 3]
[00293] p-DsY [ x ] [ y] = (pY [ 2 x ] [ 2+y-1] +PY [ 2 - x-1 ] [ 2 y] + 4 -PY[ 2 x ] [ 2 + y] +PY [ 2 x + 1 ] [ 2+y] + pY[ 2+x ] [ 2+y + 1] + 4 ) >> 3 iviA / a / zuzo / uu ΐύνι 101
[00294] However, there may be a case where the left / upper neighbor region of the current block is not available. When the left neighbor region of the current block is not available, the pixel pDsY[0][y] (y=l..nTbH-1) of the downsampled luma block can be derived based on the corresponding pixel pY[0][2+y] of the luma block and the neighbor pixel of the corresponding pixel. The neighbor pixel can mean at least one of the upper neighbor pixels or the lower neighbor pixels of the corresponding pixel. For example, the pixel pDsY[0][y] (y=l..nTbH-1) can be derived based on Equation 4 below.
[00295] [Equation 4]
[00296] p-DsY [ 0 ] [ y] = (pY [ 0 ] [ 2+y-1 ] + 2+pY [ 0 ][ 2 y] +PY[ 0 ][ 2 y + 1] +2) » 2
[00297] When the upper neighbor region of the current block is not available, the pixel pDsY[x][0] (x=l. .nTbW-1) of the downsampled luma block can be derived based on the corresponding pixel pY[2*x][0] of the luma block and the neighbor pixel of the corresponding pixel. The neighbor pixel can mean at least one of the left neighbor pixel or the right neighbor pixel of the corresponding pixel. For example, the pixel pDsY[x][0] (x=l..nTbW-1) can be derived based on Equation 5 below.
[00298] [Equation 5]
[00299] pDsY[ x ][ 0] = (pY[ 2+x-1 ][ 0] + 2 pY[ 2 x ] [ 0] +PY[ 2 - x + 1 ] [ 0] +2) »2
[00300] The downsampled luma block's pDsY[0][0] pixel can be derived based on the corresponding luma block's pY[0][0] pixel and / or a neighboring pixel of the corresponding pixel. The position of the neighboring pixel may vary depending on whether the left / upper neighboring regions to the current block are available.
[00301] For example, when the left neighbor region is available but the upper neighbor region is not available, pDsY[0][0] can be derived based on Equation 6 below.
[00302] [Equation 6]
[00303] p-DsY [ 0 ] [ 0] = (ρΎ[ -1 ] [ 0] + 2+pY [ 0 ] [ 0] + pY[ 1 ] [ 0] + 2) » 2
[00304] Conversely, when the left neighboring region is not available, but the upper neighboring region is available, pDsY[0][0] can be derived based on Equation 7 below.
[00305] [E0U3 C Ϊ CJ El / ]
[00306] pDsY [ 0 ] [ 0] = (pY[ 0 ] [ -1] + 2+pY [ 0 ] [ 0] +PY[ 0 ][ 1] + 2) » 2 iviA / a / zuzo / uu ΐύνι 103
[00307] In another example, when both left and top neighboring regions are not available, pDsY[ 0 ][ 0] can be set to the corresponding pixel pY[0][0] of the luma block.
[00308] (Mode1 ity 2)
[00309] The pixel pDsY[x][y] (x=0..nTbW-1, y=0..nTbH-1) of the downsampled luma block can be derived based on the corresponding pixel pY[2+x][2*y] of the luma block and the neighbor pixel of the corresponding pixel. The neighbor pixel can mean at least one of a lower neighbor pixel, a left neighbor pixel, a right neighbor pixel, a lower-left neighbor pixel, or a lower-right neighbor pixel to the corresponding pixel. For example, the pixel pDsY[x][y] can be derived based on Equation 8.
[00310] [ECU3ciCΓ1 8 ]
[00311] pDsY[ x ][ y] = (PY[ 2 x-1 ] [ 2 + y] + pY[ 2 - x-1 ][ 2 + y + 1] + 2- pY[ 2 + x ][ 2 + y] + 2^PY[ 2 + x ][+y + 1] +PY[ 2 x + 1 ] [ 2+y] + pY[ 2+x + 1 ] [ 2+y + 1] + 4 ) >> 3
[00312] However, when the left neighboring region to the current block is not available, the pixel pDsY[0][y] (y=0..nTbH-1) of the downsampled luma block can iviA / a / zuz o / uu ΐύνι 104 can be derived based on the corresponding pixel pY[0][2*y] of the luma block and a neighboring pixel below it. For example, the pixel pDsY[0][y] (y=0..nTbH-1) can be derived based on Equation 9 below.
[00313] [Creation 9]
[00314] pDsY[ 0 ] [ y] = (PY[ 0 ] [ 2 - y] +PY[ 0 ][ 2 - and + 1] +1) »1
[00315] Downsampling of the luma block can be performed based on one of Modes 1 and 2 as described above. Here, Mode 1 and Mode 2 can be selected based on a predefined flag. The flag can indicate whether the downsampled luma pixel has the same position as the original luma pixel. For example, when the flag is a first value, the downsampled luma pixel has the same position as the original luma pixel. Conversely, when the flag is a second value, the downsampled luma pixel has the same position as the original luma pixel in the horizontal direction, but is offset by half a pixel in the vertical direction. iviA / a / zu¿ o / uu ΐύνι
[00316]
[00317] 2. Downward sampling of the left neighboring region to the luma block
[00318] (Mode 1)
[00319] The pixel plzquierdaDsY[y] ( y=0 . . niámMuestL-1 ) of the descending sampled left neighbor region can be derived based on the corresponding pixel pY[-2] [2+y] of the left neighbor region and a neighbor pixel of the corresponding pixel. The neighbor pixel can mean at least one of a left neighbor pixel, a right neighbor pixel, an upper neighbor pixel, or a lower neighbor pixel of the corresponding pixel. For example, the pixel plzquierdaDsY[y] can be derived based on Equation 10 below.
[00320] [Equation 10]
[00321] pLeftflsY [ y] = (pY [ -2 ] [ 2 y-1] + p>Y [ -3 ] [ 2+y] + 4 PY[ -2 ] [ 2 y] + PY [ -1 ] [ 2+y] + PY [ -2 ] [ 2 and + 1 ] + 4 ) » 3
[00322] However, when the upper-left neighbor region to the current block is unavailable, the left neighbor pixel pIzquierdaDsY[0] of the sampled left neighbor region can be derived based on the corresponding left neighbor pixel pY[-2][0] and a neighbor pixel of the corresponding pixel. The neighbor pixel can mean at least one of the left neighbor pixels or a pixel 106 right neighbor to the corresponding pixel. For example, the pixel plaquierdaDsY[ 0] can be derived based on the Equation 11 below.
[00323] [Equation 11]
[00324] plrleftDsY[ 0] = (pY[ -3 ][ 0] + 2 pY[ -2 ] [ 0] +PY[ -1 ] [ 0] +2] » 2
[00325] (Mode2 2)
[00326] The left-neighbor pixel DsY[y] (y=0 . . núrnMuesth-1) of the down-sample left neighbor region can be derived based on the corresponding pixel pY[-2][2*y] of the left neighbor region and a neighbor pixel around the corresponding pixel. The neighbor pixel can mean at least one of a lower neighbor pixel, a left neighbor pixel, a right neighbor pixel, a lower-left neighbor pixel, or a lower-right neighbor pixel to the corresponding pixel. For example, the left-neighbor pixel DsY[y] can be derived based on the following Equation 12.
[00327] [Equation 12]
[00328] plrquierdaDsY[ y] = (pY[ -1 ][ 2+y] + pY[ -1 ][ 2 + y + 1] + 2+ pY[ -2 ][ 2 + y] + 2+PY[ -2] [2 - y + 1] +PY[ -3 ] [ 2 y] +PY[ -3 ] [ 2 y + 1] + 4) » 3
[00329] Similarly, downsampling of the left neighboring region can be performed based on one of Modes 1 and 2 as described above. Here, one of Modes 1 and 2 can be selected based on a predetermined flag. The flag indicates whether the downsampled luma pixel has the same position as the original luma pixel. This is the same as described above.
[00330] The descending sample of the left neighboring region iviA / a / zu¿o / uu ΐύνι can only be performed when the value of númM'aestL is greater than 0. When the value of númMuestL is greater than 0, it may mean that the left neighboring region to the current block is available, and the intra prediction mode of the current block is INTRA_LT_CCLM or INTRA_L_CCLM.
[00331]
[00332] 3. Downward sampling of the neighboring region above the luma block
[00333] (Mode 1)
[00334] The pixel pSuperiorDsY[x] (x=0. .numMuestT-1) of the downsampled upper neighbor region can be derived by considering whether the upper neighbor region 20 belongs to a different CTU from a CTU to which the 1urn block belongs.
[00335] When the upper neighbor region belongs to the same CTU as the luma block, the pixel pSuperiorDsY[x] The 108th pixel of the descending mastered upper neighbor region can be derived based on the corresponding pixel pY[2+x][-2] of the upper neighbor region and a neighbor pixel of the corresponding pixel. The neighbor pixel can mean at least one of a left neighbor pixel, a right neighbor pixel, an upper neighbor pixel, or a lower neighbor pixel of the corresponding pixel. For example, the pixel pSuperiorDsY[x] can be derived based on Equation 13 below.
[00336] [Equation 13]
[00337] pUpperDsY[ x] = (pY[ 2 x ][ -3] + pY[ 2 x-1 ] [ -2 ] + 4+pY [ 2+x ] [ -2 ] +PY[ 2 x + 1 ] [ -2] +PY[ 2 x ][ -1] + 4) » 3
[00338] Conversely, when the upper neighbor region belongs to a different CTU of the luma block, the 15 pixel pSuperiorDsY[x] of the downsampled upper neighbor region can be derived based on the corresponding pixel pY[2+x][-1] of the upper neighbor region and a neighbor pixel of the corresponding pixel. The neighbor pixel can mean at least one of the left neighbor pixel or the right neighbor pixel of the corresponding pixel. For example, the pixel pSuperiorDsY[x] can be derived based on Equation 14 below. iviA / a / zuz o / uu ΐύνι 9
[00339] [Emotion 14]
[00340] pUpperDsY[ x] = (pY[ 2 x-1 ] [ -1] + 2+pY[ 2 x ] [ -1] +PY[ 2 + x + 1 ][ -1] +2) »2
[00341] Alternatively, when the upper-left neighbor region 5 to the current block is not available, the neighbor pixel can mean at least one of the upper neighbor pixels or the lower neighbor pixels to the corresponding pixel. For example, the pixel pSuperiorDsY[ 0] can be derived based on Equation 15 below.
[00342] [Equation 15]
[00343] pUpperDsY [ 0] = (pY[ 0 ][ -3] - 2+pY [ 0 ][ -2] +PY[ 0 ][ -1] +2) »2
[00344] Alternatively, when the upper-left neighbor region to the current block is unavailable and the upper neighbor region belongs to a different CTU from the luma block, the pixel pSuperiorDsY[ 0 ] can be set as the pixel pY [ 0 ] [ -1] of the upper neighbor region.
[00345] (Mode1 ity 2)
[00346] The pixel pSuperiorDsY[x] (x=0..numSampleT-1) of the downsampled upper neighbor region can be derived by considering whether the upper neighbor region belongs to a different CTU of the luma block. 110
[00347] When the upper neighbor region belongs to the same CTU as the luma block, the downsampled upper neighbor pixel pSuperiorDsY[x] can be derived based on the corresponding upper neighbor pixel pY[2+x][-2] of the upper neighbor region and a neighbor pixel of the corresponding pixel. The neighbor pixel can mean at least one of a lower neighbor pixel, a left neighbor pixel, a right neighbor pixel, a lower-left neighbor pixel, or a lower-right neighbor pixel to the corresponding pixel. For example, the pixel pSuperiorDsY[x] can be derived based on Equation 16 below.
[00348] [Equation 16]
[00349] pUpperDsY [ x] = (pY [ 2+x-1 ][ -2] + pY [ 2 - x-1 ][ -1] + 2-PY[ 2 x ][ -2] + 2+PY[ 2 * x ][ -1] +PY[ 2+x + 1 ][ -2] + pY[ 2+x + 1 ][ -1] + 4) >> 3
[00350] Conversely, when the upper neighbor region belongs to a different CTU of the luma block, the downsampled upper neighbor pixel pSuperiorDsY[x] can be derived based on the corresponding upper neighbor pixel ρΥίΟ^χ] [-1] of the upper neighbor region and a neighbor pixel of the corresponding pixel. The neighbor pixel can mean at least one of the left neighbor pixels or the right neighbor pixels of the corresponding pixel. For example, iviA / a / ¿u¿ j / uu ΐύνι 111 pixel pSuperiorDsY] x] can be derived based on Equation 17 below.
[00351] [Equation 1 / ]
[00352] pUpperDsY[ x] = (pY[ 2 x-1 ] [ -1] + 2+PY[ 2ψx ][ -1] + pY[ 2 - x + 1 ][ -1] +2) »2
[00353] Alternatively, when the upper-left neighbor region to the current block is not available, the neighbor pixel can mean at least one of the upper neighbor pixel or the lower neighbor pixel to the corresponding pixel. For example, the pixel pSuperiorDsY[ 0] can be derived based on Equation 18 below.
[00354] [Equation 18]
[00355] pUpperDsY [ 0] = (pY[ 0 ][ -2] + pY [ 0 ][ 1] +1) »1
[00356] Alternatively, when the upper-left neighbor region to the current block is unavailable and the upper neighbor region belongs to a different CTU than the luma block, the pixel pSuperiorDsY[ 0] can be set as pixel pY [ 0 ] [ -1] of the upper neighbor region.
[00357] Similarly, downsampling of the upper neighboring region can be performed based on one of Modalities 1 and 2 as described above. Here, one of Modes 1 and 2 can be selected based on a predetermined flag. The flag indicates whether the sampled descending luiría pixel has the same position as the original luma pixel. This is the same as described above.
[00358] Meanwhile, downsampling of the upper neighbor region can only be performed when the value of numSampleT is greater than 0. When the value of numSampleT is greater than 0, it may mean that the upper neighbor region to the current block is available, and the intra prediction mode of the current block is INTRA LT CCLM or INTRA_T_CCLM.
[00359] Downsampling for at least one of the left or top neighboring regions of the luma block 15 (hereafter referred to as the luma reference region) can be performed using only the corresponding pixel pY[2][í^y] at a specified position and the surrounding pixels. Here, the specified position can be determined based on the position of a selected pixel 20 from a plurality of pixels belonging to at least one of the left or top neighboring regions of the chroma block (hereafter referred to as the chroma reference region). 113
[00360] The selected pixel can be an odd-numbered pixel or an even-numbered pixel in the chroma reference region. Alternatively, the selected pixel can be a start pixel and one or more cloned posit pixels: 5 at predetermined intervals starting from the start pixel. Here, the starting pixel can be a pixel positioned in the first, second, or third position in the chroma reference region. The interval can be 1, 2, 3, 4, or more sample intervals. For example, when the interval is a 10-sample interval, the selected pixel can include the nth pixel^(n+2)th pixel, and so on. The number of selected pixels can be 2, 4, 6, 8, or more.
[00361] The number of selected pixels, the starting pixel, and the interval can be variably determined based on at least one of the lengths of a chroma reference region (i.e., numSampleL and / or numM'jestT) or an intra-prediction mode of a chroma block. Alternatively, the number of selected pixels can be a fixed number (e.g., 4) pre-committed to the encoding / decoding apparatus with respect to the length of the chroma reference region and the intra-prediction mode of the chroma block.
[00362] With reference to Figure 8, a parameter 114 for inter-component reference of the chroma block can be derived (S830J .
[00363] The parameter may include at least one weight or offset. The parameter can be determined in consideration of the current block's intra-prediction mode. The parameter can be derived using a selected pixel from the chroma reference region and a pixel obtained through the downsampling of the 1 urn reference region.
[00364] Specifically, n pixels can be classified into two groups to perform size comparisons between n pixels obtained through downsampling of the luma reference region. For example, a first group can be a group of pixels that have a relatively large value among n pixels, and a second group can be a group of pixels distinct from the pixels in the first group among n samples. That is, the second group can be a group of pixels that have a relatively small value. Here, n can be 4, 8, 16, or more. An average value of pixels belonging to the first group can be set as a maximum value MaxL, and an average value of pixels belonging to the second group can be set as a minimum value MinL.
[00365] In accordance with the clustering of n pixels obtained through the downsampling of the luma reference region, the selected pixels from the chroma reference region can be grouped. A first group for the chroma reference region is configured using pixels from the chroma reference region that correspond to the pixels in the first group of the luma reference region. A second group for the chroma reference region can be configured using pixels from the chroma reference region that correspond to the pixels in the second group of the luma reference region. Similarly, the average value of the pixels in the first group can be set as the maximum value MaxC, and the average value of the pixels in the second group can be set as the minimum value MinC.
[00366] Based on the calculated maximum values (MaxL, MaxC) and minimum values (MinL, MaxC), the weight and / or compensation of the parameter can be derived.
[00367] The chroma block can be predicted based on the downsampled luma block and parameter (S840).
[00368] The chroma block can be predicted by applying at least one of a pre-derivative weight or offset 116 to a pixel of the downsampled luma block.
[00369]
[00370] Figure 9 illustrates a method for configuring a reference region as a modality to which the present invention applies.
[00371] The reference region according to the present invention may be a region adjacent to the current block. A method for configuring each reference region as pixels available for classification will then be described, classifying the reference region according to the categories. For the sake of clarity, the description will focus on the left, top, and right reference regions of the current block. Descriptions not mentioned in the modalities that will be described later may be referenced or derived through the modality described with reference to Figure 6.
[00372] With reference to Figure 9, the pixels in the reference region can be classified into a predetermined category (SAOO).
[00373] The reference region can be identified / classified into k categories, where k can be an integer of 1, 2, 3, or more. Alternatively, k can be limited to a smaller integer. The reference region iviA / a / zuzo / uu / o» / can be classified into one of predetermined categories based on an image type (I / P / B), a component type (Y / Cb / Cr, etc.), a block property (size, shape, split information, split depth, etc.), and a reference pixel position. Here, the block can mean a current block and / or a neighboring block of the current block.
[00374] For example, a block can be classified into a predetermined category according to its size. In the case of block size, a support range can be determined by a threshold size. Each threshold size can be expressed as W, H, W x H, and W+H based on the width (W) and height (H). W and H can be natural numbers such as 4, 8, 16, 32, etc. Two or more threshold sizes are supported and can be used to establish a support range, such as a minimum and maximum value that a block can have.
[00375] Alternatively, it can be classified into a predetermined category according to the position of the reference pixel. In this case, the position of the reference pixel can be defined in pixel units, or it can be defined as a direction within a block to which the reference pixel belongs (left, right, 118 upper, lower, upper-left, upper-right, lower-left, lower-right).
[00376] With reference to Figure 6, it can be defined as included between the positions of the upper-left TL pixel, the upper-right TR pixel, the lower-left BL pixel, and the lower-right BR pixel. It can also be defined as included between the positions of the TLO, TL1, TRO, TR1, BLO, BL1, BRO, and BR1 pixels located based on the block's current width (2+nW), height (2ψηH), or the sum of width and height (nW+πH). Furthermore, with reference to Figure 12, it can be defined as included between the positions of the TO, T3, BO, B3, LO, L3, RO, and R3 pixels, which are located at both ends of the upper, lower, left, and right blocks. Alternatively, it can be defined as if it is included between pixels (TI, L2, B2, Rl, etc.) located in the middle of each block.
[00377] A reference region (reference pixel) can be classified into each category based on the various classification elements.
[00378] With reference to Figure 9, an unavailable pixel belonging to the reference region can be searched for (SA10).
[00379] It is possible to search sequentially if they exist 119 pixels are unavailable in the reference region. With reference to Figure 6, the search start position can be determined between TL, TR, BL, and BR, but is not limited to these. In this case, when the search is performed sequentially, the search start position number can be set to one, but for parallel processing, it can be set to two or more.
[00380] The search region of unavailable pixel 10 can be determined based on the search starting position. If a search position is designated (assuming TL), the top reference region or the left reference region can be searched before the right reference region, but this cannot be the case in encoding adjustment (parallel processing).
[00381] Here, the search direction can be determined to be either clockwise or counterclockwise. In this case, either a clockwise or counterclockwise direction can be selected for the entire reference region. Alternatively, a variable can be selected according to the position of the reference region. That is, a clockwise or counterclockwise search direction can be supported for each of the top / bottom / left / right reference regions. Here, it should be understood that the position of the reference region is not limited only to the width (nW) and height (nH) of the current block (i.e., it includes the reference region included in 2+nW, 2ψηH, nW+nH, etc.).
[00382] Here, in the case of a clockwise direction, it can mean a lower-to-upper direction in a left reference region, a left-to-right direction in a top reference region, a top-to-lower direction in a right reference region, and a right-to-left direction in a lower reference region. The counterclockwise direction can be derived from the opposite of the clockwise direction.
[00383] For example, when the search starts from the top-left TL pixel adjacent to the current block, the top reference region and the right reference region can be searched in a clockwise direction (left-to-right, top-to-bottom). Additionally, the left reference region and the bottom reference region can be searched in a counterclockwise direction (top-to-bottom, left-to-right). However, the above description is only a partial example, and various modifications are possible.
[00384] With reference to Figure 9, it can be replaced with an available pixel using a method established for each category (SA20).
[00385] An unavailable pixel can be replaced with a default default value (e.g., the median of a pixel value range). Alternatively, it can be replaced based on a default available pixel, and an unavailable pixel can be replaced with a value obtained through copying, linear extrapolation, interpolation, or similar methods from one or more adjacent available pixels. First, a process 20 precedes this to classify a category based on the position of each pixel. The following is an example of how each method is applied according to a plurality of categories, and the unavailable pixel is referred to as a target pixel.
[00386] As an example <1> When an available pixel exists in the reference region, the target pixel can be replaced using a pixel value obtained based on the available pixel, and when there is no available pixel in the reference region, it can be replaced with a default value.
[00387] As an example <2> When an available pixel exists before the target pixel and at the search starting position, the target pixel can be replaced using a pixel value obtained based on the available pixel, and when there is no available pixel before the target pixel, it can be replaced with a default value.
[00388] As an example <3> , the objective pixel, can be replaced with the default value.
[00389] In the case of <1> A method is described to replace an available pixel based on whether or not an available pixel exists in the reference region. In the case of <2> A method is described to replace with a 20 available pixel, depending on whether or not an available pixel exists during the previous search process. In the case of <3> A method is described for replacing with an available pixel.
[00390] If a category is supported, a method of <1> to <3> can be used. If more than one category is supported, a reference pixel belonging to any category can select and use one of them. <1> to <3> and a 5-pixel reference that belongs to another category can select and use one of <1> to <3> .
[00391] With reference to Figure 9, the reference region can be set as an available pixel (SA30). In addition, intra-prediction (SAI 0) can be performed.
[00392] A method for replacing unavailable pixels in the reference region with an available pixel according to categories described above. Furthermore, not only the unavailable pixel but also the available pixel can be replaced with a default value, another available pixel, or a value obtained based on another available pixel.
[00393]
[00394] Figure 10 is an exemplary diagram for 20 configuring an intra-prediction mode established step by step as a modality to which the present invention applies.
[00395] With reference to (Step 1) of Figure 10, the configuration of several prediction mode candidate groups can be supported, and one of them can be implicitly or explicitly selected. The prediction mode candidate group can be identified by the number of modes, directional mode tilt information (dy / dx), a directional mode support range, and similar factors. In this case, even if the number of modes is k (a directional, b non-directional), there can be prediction mode candidates with different a or b values.
[00396] The prediction mode candidate group selection information can be explicitly generated and can be specified at least one level among VPS, SPS, PPS, PH, and segment header. Alternatively, a prediction mode candidate group can be implicitly selected according to the encoding setting. In this case, the encoding setting can be defined based on an image type (I / P / B), a component type, and a block property (size, shape, split information, split depth, etc.). Here, the block can mean a current block and / or a neighboring block of the current block, and in the present modality, the same description can be applied.
[00397] When a prediction mode candidate group is fully selected (Step 1) (B is selected in this example), prediction mode coding or intra-prediction can be performed based on this. Alternatively, a process for configuring the 5 efficient candidate group can be performed, and this will be fully described (Step 2).
[00398] With reference to (Step 2) of Figure 10, the configuration of some prediction modes can be configured in various ways, and one of them can be implicitly or explicitly selected. (B0) to (B2) can be candidate configurations assuming that the prediction modes (dotted lines in the drawing) in some directions are not well used.
[00399] The prediction mode candidate group selection information can be explicitly generated and can be specified in a CTU, encoding block, prediction block, transformation block, and the like. Alternatively, a prediction mode candidate group can be implicitly selected in accordance with the encoding setting, and the encoding setting can be defined as several previous encoding elements.
[00400] Here, the block shape can be subdivided according to the block's width-to-height (W:H) ratio, and the prediction mode candidate group can be configured differently according to all possible W:H ratios, or according to only a certain W:H ratio.
[00401] When a prediction mode candidate group is fully selected (Step 2) (B1 is selected in this example), prediction mode or intra-prediction coding can be performed based on this. Alternatively, a process for efficient candidate group configuration can be implemented, and this will be fully described (Step 3).
[00402] With reference to (Step 3) of Figure 10, it may be candidate configurations assuming that some 15 prediction modes (dotted lines in the drawing) will not be used because the number of candidate prediction mode groups is too large.
[00403] The candidate prediction mode group selection information can be explicitly generated and can be specified in a CTU, an encoding block, a prediction block, a transformation block, and the like. Alternatively, a candidate prediction mode group can be implicitly selected in accordance with the encoding setting, and the encoding setting can be defined as several previous encoding elements. In addition, a prediction mode, a block position, etc., can be additional elements considered to define the encoding setting.
[00404] In this case, the prediction mode and block position may contain information about a neighboring block adjacent to the current block. That is, based on the property information of the current block and the neighboring block, a prediction mode that is estimated to be poorly used may be derived, and the corresponding mode may be excluded from the candidate prediction mode group.
[00405] For example, when a neighboring block includes the positions TE, TO, TRO, LO, and BLO in Figure 12, it is assumed that the prediction mode of the corresponding block has some directionality (from top-left to bottom-right). In this case, the prediction mode of the current block can be expected to have some directionality with a high probability, and the following processing possibility may exist.
[00406] For example, intra-prediction can be performed in all modes within the prediction mode candidate group. Furthermore, prediction mode coding can be performed based on the prediction mode candidate group.
[00407] Alternatively, intra-prediction can be performed within a candidate prediction mode group from which some modes have been removed. Furthermore, prediction mode coding can be performed based on the candidate prediction mode group from which some modes have been removed.
[00408] Comparing the previous examples, one can distinguish whether a prediction mode that is thought to have a low probability of occurrence is included in the current coding and prediction process (which may be included as a non-MPM, etc.) or is removed.
[00409] In the case of (B21) in which the prediction mode that has a different functionality from the neighboring block's prediction mode can be partially removed, it may be an example in which some sparsely arranged 20 modes are removed for the case where the corresponding directional mode currently occurs.
[00410]
[00411] Figures 11A-11D illustrate a method for classifying intra-prediction modes into a plurality of candidate groups as a modality to which the present invention applies.
[00412] A case of classification into one or more candidate groups for intra-prediction mode decoding will be described below, and may be the same as or similar to the MPM group candidate and non-MPM candidate group mentioned above. Therefore, parts not mentioned in the present modality may be derived identically or similarly through the previous modality. In the case of the present modality, a method for expanding the number of candidate groups and configuring the candidate group will be described later.
[00413] The intra-prediction mode of the current block can be selectively derived using any of a plurality of candidate groups. For this purpose, a selection flag can be used as much as (the number of candidate groups-1) or less.
[00414] For example, when the prediction mode is classified into three candidate groups (A, B, C), a flag (first flag) indicating whether the current block's intra-prediction mode is derived from candidate group A can be used. 130
[00415] In this case, when the first flag is a first value, candidate group A is used, and when the first flag is a second value, a flag (second flag) indicating whether the current block's intra-prediction mode is derived from candidate group B may be used.
[00416] In this case, when the second flag is a first value, candidate group B is used, and when the second flag is a second value, candidate group C can be used. In the example above, three candidate groups are supported, and for this, a first flag and a second flag, i.e., a total of two selection flags, can be used.
[00417] When the candidate group year is selected, the current block's intra-prediction mode can be determined based on the candidate group and a candidate group index. The candidate group index can be information that specifies any of the candidates belonging to the candidate group. The candidate group index can only be specified when a plurality of candidates belongs to the candidate group.
[00418] The selection flag setting when three candidate groups are supported has iviA / a / zu¿ j / uu ΐύνι 131 described through the previous example. As in the previous configuration, the flags indicating whether the prediction mode of the current block is derived from a candidate group with a high priority can be supported sequentially (e.g., in the order of a first flag -> a second flag). That is, when a selection flag for the default candidate group is generated and a corresponding candidate group is not selected, the selection flag for candidate group 10, which has the next highest priority, can be generated.
[00419] Alternatively, it can be a configuration that has a different meaning than the selection flag (EE). For example, a flag (first flag) that indicates whether the intra-prediction mode of the current block is derived from candidate group A or B can be used.
[00420] In this case, when the first flag is a first value, candidate group C is used, and when the first flag is a second value, a flag (second flag) indicating whether the current block's intra-prediction mode is derived from candidate group A may be used.
[00421] In this case, when the second flag is a first value, candidate group A can be used, and when the second flag is a second value, candidate group B can be used.
[00422] Each of the candidate groups A, B, and C can have m, n, and ρ candidates, and m can be an integer from 1, 2, 3, 4, 5, 6 or more. n can be an integer from 1, 2, 3, 4, 5, 6 or more. Alternatively, n can be an integer between 10 and 40. p can be (the total number of prediction modes - mn). Here, m can be less than or equal to an, and n can be less than or equal to p.
[00423] As another example, when the prediction mode is classified into four candidate groups (A, B, C, D), flags indicating whether the current block's intra-prediction mode is derived from candidate group A, B, C (first flag, second flag, third flag) can be used.
[00424] In this case, the second flag can be generated when the first flag is the second value, and the third flag can be generated when the second flag is the second value. That is, when the first flag is the first value, candidate group A can be usaco, and when the second flag is the first value, candidate group B can be usaco. Furthermore, when the third flag is the first value, candidate group C can be usaco, and when the third flag is the second value, candidate group D can be used. In this example, the opposite configuration is also possible, as in some examples (EE) of the three-group candidate configuration.
[00425] Alternatively, the second flag can be generated when the first flag is the first value, and the third flag can be generated when the first flag is the second value. When the second flag is the first value, candidate group A can be used, and when the second flag is the second value, candidate group B can be used. When the third flag is the first value, candidate group C can be used, and when the second flag is the second value, candidate group D can be used.
[00426] Each of the candidate groups A, B, C, and D can have m, n, p, and g candidates, where m can be an integer from 1, 2, 3, 4, 5, 6, or higher. n can be an integer from 1, 2, 3, 4, 5, 6, or higher. Alternatively, n can be an integer between 8 and 24. p can be an integer such as 6, 7, 8, 9, 10, 11, 12, and so on. Alternatively, ρ can be an integer between 10 and 32. q can be (the total number of prediction modes-mnp). Here, m can be less than or equal to η, n can be less than or equal to ap, and p can be less than or 134 equals q.
[00427] Next, when multiple candidate groups are supported, a method for configuring each candidate group will be described. The reason for supporting a plurality of 5 candidate groups is for the purpose of efficient intra-prediction mode decoding. That is, a prediction mode that is expected to be the same as the intra-prediction mode of the current block is configured as a candidate group with a high priority, and a prediction mode that is not expected to be the same as the intra-prediction mode of the current block is configured as a candidate group with a low priority.
[00428] For example, in Figures 11A-11D, when category 2(a), category 3(b and c), and category 4(d) are the 15 lowest priority candidate groups, respectively, the candidate groups can be configured using a prediction mode that is not included in any of the previous priority candidates. In this mode, since the candidate group is composed of the remaining 20 prediction modes that are not included in the preceding candidate group, it is assumed to be the priority-irrelevant candidate group among the prediction modes that configure each candidate group that will be described later (i.e., the remaining prediction modes that are not included in the previous candidate group without regard to priority). And, it is assumed that the priority among candidate groups is in ascending order (category 1 -> category 2 -> category 3 -> category 4) as shown in the Figures 11A-11D, and the priority in the examples described below is a term used in the listed modes to configure each candidate group.
[00429] As with the ME'M group candidate mentioned above, a candidate group can be configured with a neighbor block prediction mode, a default mode, a default directional mode, or similar. For the purpose of allocating a smaller number of bits to the prediction mode with the highest probability of occurrence, a candidate group can be configured by determining a default priority for configuring a candidate group.
[00430] With reference to Figure 11A, a priority for a first candidate group (Category 1) can be supported. When the first candidate group is configured based on the number of the first candidate group in accordance with the priority, the remaining prediction modes (b, j, etc.) can be configured as a second candidate group (Category 2). 136
[00431] With reference to Figure 11B, common priority for the first candidate group and the second candidate group can be supported. In accordance with the priority, the first candidate group is configured based on the number of the first candidate group. The second candidate group is configured based on the number of the second candidate group in accordance with the priority (after c) after the prediction mode (e) finally included in the first candidate group. In addition, the remaining prediction modes (b, j, etc.) can be configured as a third candidate group (Category 3).
[00432] With reference to Figure 11C, the individual properties (first priority, second priority) for the first candidate group and the second candidate group can be supported. The first candidate group is configured based on the first candidate group number according to a first priority. Then, the second candidate group is configured based on the second candidate group number according to a second priority. In addition, the remaining prediction modes (b, w, x, etc.) can be configured as the third candidate group. iviA / a / zu¿ j / uu ΐύνι
[00433] Here the second priority can be set based on a neighbor block prediction mode <1> , a default mode <2> , a default directional mode <3> and similar, such as the existing priority (first priority). However, the priority can be set based on a different importance than the first priority (for example, if the first priority is set in the order 1-2-3, the second priority is set in the order 3-2-1, etc.). Furthermore, the second priority can be configured variably according to the mode included in the previous candidate group, and can be affected by the mode of the block neighboring the current block. The second priority can be configured differently from the first priority, but it can be understood that the configuration of the second priority can be partially affected by the configuration of the first candidate group.In this paragraph, it should be understood that the first priority (previous ranking), the first candidate group (previous candidate group), and the second priority (current ranking) and the second candidate group (current candidate group of 20) are not described in a fixed ranking such as a number.
[00434] With reference to Figure 11D, a common priority (first priority) for the first candidate group and the second candidate group can be supported, and an individual priority (second priority) for the third candidate group can be supported. The first candidate group is configured based on the number of the first candidate group according to the first priority. The second candidate group is configured based on the number of the second candidate group according to the priority (after e) following the prediction mode (d) finally included in the first candidate group. Then, according to the second priority, the third candidate group is configured based on the number of the third candidate group. In addition, the remaining prediction modes (u, f, etc.) can be configured as the fourth candidate group.
[00435] According to one embodiment of the present invention, in the case of the current block's intra-prediction mode, the prediction blocks can be configured with one or more candidate groups, and a prediction decoding mode can be implemented based on this. In this case, one or more priorities used to configure the candidate group can be supported. The priority can be used in the process to configure one or more candidate groups.
[00436] In the previous example, when two or more Nine priorities are supported; a separate priority (second priority) from the priority (first priority) used in the preceding candidate group (first candidate group) is used for another candidate group (the second candidate group). This may correspond to the case where all candidates in a candidate group are configured according to a single priority.
[00437] Furthermore, the first priority used for the first candidate group can be used to configure some candidates of the second candidate group. That is, some candidates (cand A) of the second candidate group can be determined based on the first priority (initiating a mode not included in the first candidate group), and some candidates (or remaining candidates, cand B) of the second candidate group can be determined based on the second priority. In this case, cand A can be an integer of 0, 1, 2, 3, 4, 5, or more. That is, when the first candidate group is configured, a prediction mode that is not included in the first candidate group can be included in the second candidate group.
[00438] For example, three candidate groups are supported, and the first candidate group consists of two candidates, and the first priority can be determined between 0 a prediction mode of an adjacent block (e.g., left, top), a default directional mode (e.g., Ver, Hor, etc.), a default non-directional mode (e.g., DC, E'lanar, etc.) (e.g., 5 E'mode L-Pmode U-DC-Planar-Ver-Hor, etc.). The candidate group is configured based on the number of the first candidate group according to the first priority (e.g., Pmode L, E'mode U).
[00439] In this case, the second candidate group is configured with 6 candidates, and the second priority can be determined between a directional mode that has a predetermined interval (1, 2, 3, 4 or more integers) from the prediction mode of the adjacent block and a directional mode that has a predetermined slope (dy / dx, 1:1, 1:2, 2:1, 4:1, 1:4, etc.) (for example, Diagonal down Left Diagonal down right Diagonal up right dP mode L + 2 >,<Pmodo U + 2> , etc.).
[00440] The second candidate group can be configured based on the second candidate group number 20 in accordance with a second priority. Alternatively, two candidates from the second candidate group can be configured (DC, E'lanar) based on a first priority, and the remaining four candidates can be configured (DDL, iviA / a / zu¿ j / uu ΐύνι 141 DDK, DUR) based on a second priority.
[00441] For the convenience of explanation, the same terms as the previous description are used, such as the first candidate group, the second candidate group, and the first priority, but it should be noted that the priority among the candidate groups among the plurality of candidate groups is not fixed to the first and second.
[00442] In summary, when classifying into a plurality of candidate groups for prediction mode 10 decoding and one or more priorities are supported, a default candidate group can be configured based on one or more priorities.
[00443]
[00444] Figure 12 is an exemplary diagram illustrating an actual block and an adjacent pixel as a modality to which the present invention applies.
[00445] With reference to Figure 12, the pixels (a through p) belonging to a current block and the pixels adjacent to it are shown. Specifically, it represents 20 pixels (Ref T, Ref L, Ref TL, Ref TR, and Ref BL) that are adjacent to the current block and referenceable, and the pixels (BO to B3, RO to R3, BR) that are adjacent to the current block but not referenceable. This diagram assumes that some encoding order, scan order, etc., are fixed (the left, top, top-left, top-right, and bottom-left blocks of the current block can be referenced), and it is possible to change to a different configuration according to a change in the encoding setting.
[00446]
[00447] Figure 13 illustrates a method for performing intra-prediction step by step as a modality to which the present invention applies.
[00448] The current block can perform intra-prediction using pixels located in the left, right, top, and bottom directions. In this case, as shown in Figure 12, there are not only 15 pixels that can be referenced but also pixels that cannot be referenced. Encoding efficiency can be improved by estimating pixel values not only for referenceable pixels but also for non-referenceable pixels and using them.
[00449] With reference to Figure 13, an arbitrary pixel value (SBOO) can be obtained.
[00450] Here, the arbitrary pixel can be a pixel that cannot be referenced around the current block or 143 a pixel within the current block. An arbitrary pixel position will be described with reference to subsequent drawings.
[00451] Figure 14 is an exemplary diagram for an arbitrary 5 pixel for intra-prediction as a modality to which the present invention applies.
[00452] With reference to Figure 14, not only can a pixel (c) located outside the current block not be referenced, but a pixel (a, b) located within the current block can also be the arbitrary pixel. The following assumes that the size of the current block is Width x Height and an upper-left coordinate is (0, 0).
[00453] In Figure 14, a and b can be located at (0, 0) to (Width-1, Height-1).
[00454] For example, it can be located on the boundary line (left, right, top, bottom) of the current block. For example, it can be located in the right column of the current block, (Width-1, 0) to (Width-1, Height-1) or the bottom row of the current block, (0, Height-1) to 20 (Width-1, Height-1).
[00455] For example, it can be located in the odd or even column and row of the current block. For example, it can be located in an even row of the current block. 144 can be located in an odd column of the current block. Alternatively, it can be located in an even row and an odd column of the current block, or it can be located in an odd row and an odd column of the current block. Here, 5, in addition to being an odd or even number, can be located in a column or row that corresponds to a multiple of k₀ an exponent (2k), and k can be an integer of 1, 2, 3, 4, 5 or more.
[00456] In Figure 14, c can be located outside of 10 referenceable pixels and the current block.
[00457] As an example, you can locate on the boundary line of the current block (in this example, right, bottom). For example, you can locate on the right boundary of the current block, (Width, 0) to (Width, Height), 15 or the bottom boundary of the current block, (0, Height) to (Width, Height).
[00458] For example, it can be located in the odd or even column and row of the current block. For example, it can be located in an even row beyond the right boundary of the current block, or it can be located in an odd column beyond the lower boundary of the current block. Here, in addition to the odd or even number, it can be located in a column or row that corresponds to a multiple of k₀ an exponent (2k), and k can be an integer of 1, 2, 3, 4, 5 or higher.
[00459] The number of arbitrary pixels used / referenced for intra-prediction of the current block can be m, and m can be 1, 2, 3, 4 or more. Alternatively, the number of arbitrary pixels can be set based on the size (width or height) of the current block. For example, the number of arbitrary pixels used for intra-prediction can be Width / w factor, Height / h factor, or (Width+Height) / wh factor. Here, w factor and h factor can be predetermined values used as splitting values based on the width and height of each block, and can be integers such as 1, 2, 4, and 8. Here, wh factor can be a predetermined value used as a splitting value based on the block size, and can be an integer such as 2, 4, 8, 16, and so on.
[00460] Also, the number of arbitrary pixels can be determined based on all or some of the encoding elements such as an image type, a component type, a block property, and an intra-20 prediction mode.
[00461] An arbitrary pixel obtained through the previous process can be obtained from a region which can refer to a corresponding pixel value. By 146 For example, a pixel value can be obtained based on a referenceable pixel located in a horizontal or vertical direction of an arbitrary pixel.
[00462] In this case, a pixel value of an arbitrary pixel 5 can be obtained as a value obtained through a copy or average weight using one or more pixels (k. k is an integer of 1, 2, 3, 4, 5, 6, etc.) located at ( <1> horizontal direction / <2> vertical direction). In the ( <1> horizontal direction / <2> vertical direction), a referenceable pixel 10 that has the same or similarity (component and / or <2> The x-component between the coordinates of an arbitrary pixel can be used / referenced to obtain a pixel value. However, in a broad sense, a referenceable pixel located in the ( <1> left direction / <2> 15 upper address) of the current block can be used to get a pixel value from an arbitrary pixel.
[00463] A pixel value can be obtained based on either the horizontal or vertical direction, or it can be obtained based on both directions. In this case, a pixel value acquisition setting can be determined based on several encoding elements (described in the previous example, such as an image type and a block property). iviA / a / zuzo / uu ΐύνι
[00464] For example, when the current block has a rectangular shape that is wider than it is tall, a pixel value of an arbitrary pixel can be obtained based on a referenceable pixel located in the vertical direction. Alternatively, when the primary pixel values are obtained based on each of the referenceable pixels located in the vertical and horizontal directions, a secondary pixel value (i.e., a pixel value of an arbitrary pixel) can be obtained by further applying a weight to the primary pixel value obtained in the vertical direction instead of the primary pixel value obtained in the horizontal direction.
[00465] Alternatively, when the current block has a rectangular shape with a height greater than 15 and a width greater than 15, a pixel value of an arbitrary pixel can be obtained based on a referenceable pixel located in the horizontal direction. Alternatively, when the primary pixel values are obtained based on each of the referenceable pixels located in the vertical and horizontal directions, a secondary pixel value (i.e., a pixel value of an arbitrary pixel) can be obtained by further applying a weight to the primary pixel value obtained in the horizontal direction instead of the primary pixel value obtained in the vertical direction. Of course, this is not limited to the above example, and the opposite configuration may also be possible.
[00466] Additionally, a default candidate list can be configured, and a pixel value (xzalor) of an arbitrary pixel can be obtained by selecting at least one of them. This can be specified in one of the units, such as a CTU, an encoding block, a prediction block, or a transformation block. In this case, candidate list 10 can be configured with a default value or can be configured based on the referenceable pixel described above adjacent to the current block. In this case, the number of candidate lists can be an integer of 2, 3, 4, 5, or more. Alternatively, it can be an integer between 10 and 20, an integer between 20 and 40, or an integer between 10 and 40.
[00467] Here, in the candidate list, a pixel value can be set as a candidate, or an equation to induce the pixel value, a feature value, and the like can be set as a candidate. In the latter case, several pixel values can be derived into an arbitrary pixel unit based on an equation to obtain a position (x- or y-coordinates) of an arbitrary pixel and a pixel value or feature value. 9
[00468] As described above, one or more arbitrary pixels can be obtained, and intra-prediction can be made based on them. In what follows, for the sake of clarity, it is assumed that the number of arbitrary pixels is 1. However, it is clear that the example described below can be extended to the same or a similar case even when two or more arbitrary pixels are obtained.
[00469] With reference to Figure 13, it can be divided into a plurality of sub-regions based on an arbitrary pixel (SB10).
[00470] Here, subregions can be partitioned based on a horizontal or vertical line that includes the arbitrary pixel, and the number of subregions can be an integer of 2, 3, 4, or more. The subregion configuration will be described with reference to the following drawing.
[00471] Figure 15 is an exemplary diagram of division into a plurality of sub-regions based on an arbitrary pixel as a modality to which the present invention applies.
[00472] With reference to Figure 15, a predetermined sub-region (b, c), which is a vertical or horizontal line of an arbitrary pixel d, can be obtained, and a 150 default sub-region (a) can be obtained based on vertical and horizontal lines.
[00473] In this case, a subregion (b) can be obtained between an arbitrary pixel and a pixel T that can be referenced in a vertical direction, and a subregion (c) can be obtained between an arbitrary pixel and a pixel L that can be referenced in a horizontal direction. In this case, the subregions b and c may not always occur in a fixed manner, and only one of the two may occur according to a setting related to the arbitrary pixel of the current block (e.g., b and c is also an arbitrary pixel, etc.). If only one of the subregions b and c occurs, the subregion a may not be occurring.
[00474] As shown in Figure 15, T or L can refer to a referenceable pixel adjacent to the current block. Alternatively, T or L can refer to any pixel (e, f) other than d located in the vertical or horizontal direction of the arbitrary pixel (d). This means that any pixel d can also be a T or L of any other pixel.
[00475] As in the previous example, the size of the sub-region can be determined based on the number and ordering of arbitrary pixels in the current block. 151
[00476] For example, when there are two or more arbitrary pixels located at slot intervals, each of the subregions a, b, and c can be sized 1x1. Alternatively, when there is one arbitrary pixel located at c in Figure 14, the subregions a, b, and c can be sized (Width x Height), (1 x Height), and (Width x 1), respectively.
[00477] With reference to Figure 13, intra-prediction can be performed in accordance with a predetermined order 10 (SB20).
[00478] Here, in accordance with an arbitrary pixel position, some sub-regions can be used as a prediction value for intra prediction or can be used as a temporal reference value for intra prediction.
[00479] For example, when an arbitrary pixel (or sub-region d) is located at c in Figure 14, sub-regions b and c are located outside the current block, and only sub-region a can be an intra-prediction target. Alternatively, when an arbitrary pixel is located above c in Figure 14, sub-region b is located outside the current block, and sub-regions a and c can be intra-prediction targets. Alternatively, when an arbitrary pixel is located to the left of c in Figure 14, sub-region c is located outside the current block, and sub-regions a and b can be intra-prediction targets. Alternatively, when an arbitrary pixel is located within the current block, sub-regions a, b, and c can be intra-prediction targets.
[00480] As in the previous example, in accordance with the position of an arbitrary pixel, it can be the intra-prediction target 10 or it can be used as a temporal reference value.
[00481] The following description assumes a case in which an arbitrary pixel is located within the current block, but even if a change to position occurs, the following example can be applied and understood in the same or similar way.
[00482] Since a position and pixel value of the arbitrary pixel are obtained through the previous steps, each sub-region acquisition process can be performed according to a predetermined priority among sub-regions a, b, and c. For example, a pixel value from each sub-region can be obtained in the order of b -> b, and a pixel value of subregion a can be obtained.
[00483] In the case of sub-region b, a pixel value can be obtained based on an arbitrary pixel of T. In the case of sub-region c, a pixel value can be obtained based on an arbitrary pixel of L.
[00484] Although not shown in the drawing, the top-left pixel is assumed to be TL (i.e., the intersection of the horizontal line of T and the vertical line of L). When TL and T are located above the current block 10, a pixel between TL and T can be referenced. Also, when TL and L are located on the left side of the current block, a pixel between TL and L can be referenced. This is because the rccfrcnciablc pixel belongs to a block adjacent to the current block.
[00485] On the other hand, when at least one TL or T is located within the current block, a pixel between TL and T can be referenced. Furthermore, when at least one TL or L is located within the current block, a pixel between TL and L can be referenced. This is because the referenceable pixel 20 can be a subregion obtained based on another arbitrary pixel.
[00486] Therefore, in the case of sub-region a, a pixel value can be obtained based on the sub-regions 154 byc, the referential region between TL and T, and the referential region between TL and L. Of course, TL, T, L, and d can be used to obtain pixel values from subregion a. Here, it means that any pixel can also be referred.
[00487] Through the above process, the intra prediction of the current block can be made based on the arbitrary pixel.
[00488] Perform intra prediction based on arbitrary pixel 10 can be configured as one of the intra prediction modes or can be included as a replacement for an existing mode.
[00489] Alternatively, it can be classified as a candidate prediction method and 15 selection information for this. For example, a method for performing intra-prediction based on a directional or non-directional mode can be considered an additional prediction method. The selection information can be specified in a CTU, an encoding block, a prediction block, a transformation block, or similar.
[00490]
[00491] Lc< The following will be described on the assumption that the position of the arbitrary pixel is c from Figure 14. However, the present invention is not limited to this, and the contents described below can be applied in the same or similar manner even when arranged in different positions. The following will be described with reference to Figure 12.
[00492] Although the current block and the right and lower blocks of the current block have not been coded, they can be estimated based on data from a referenceable region.
[00493] For example, data can be copied or derived from Ref TR, Ref BL, etc., which are regions adjacent to the right and lower limits of the current block, and then the right or lower limit of the current block can be filled with the data. As an example, the right limit can be filled by copying one of the pixels such as T3, TRO, and TR1 as is, or with a value obtained by applying filtering to T3, TRO, and TR1.
[00494] Alternatively, the data can be copied or derived from Ref TL, Ref T, Ref L, Ref TR, Ref BL, etc., which are regions adjacent to the current block, and the lower-right boundary of the current block can be filled with the data. For example, a lower-right boundary of the current block can be filled with a value obtained based on one or more pixels in the adjacent region. 156
[00495] Here, the right boundary of the current block can be (d ~ p) or (RO ~ R3). The lower boundary of the current block can be (ni - p) or (BO ~ B3). The lower right boundary of the current block can be one - of p, BR, R3, and B3.
[00496] In the following example, it is assumed that the right limit is RO ~ R3, the lower limit is BO ~ B3, and the lower-right limit is BR.
[00497] (processing for right limit and lower limit)
[00498] For example, the right boundary can be filled by copying one of T3, TRO, and TR1 adjacent to the vertical direction, and the lower boundary can be filled by copying one of L3, BLO, and BL1 adjacent to the horizontal direction.
[00499] Alternatively, the right boundary can be filled with an average value in weight of T3, TRO, and TR1 adjacent to the vertical direction, and the lower boundary can be filled with an average value in weight of L3, BLO, and BL1 adjacent to the horizontal direction.
[00500] After obtaining right limit and lower limit values, the intra-prediction of the current block can be performed based on the values
[00501] (processing for lower-right limit)
[00502] For example, the bottom-right margin can be filled by copying one from T3, TRO, TR1, L3, BLO, and BL1. Alternatively, it can be filled with an average value in 5 weight from one from T3, TRO, and TR1 and one from L3, BLO, and BL1. Alternatively, it can be filled with an average weight value of T3, TRO, and TR1 and an average weight value of L3, BLO, and BL1. Alternatively, it can be filled with a second average weight value of a first average weight value of T3, TRO, and TR1 and a first average weight of L3, BLO, and BL1.
[00503] After obtaining the lower-right limit value, a right limit or lower limit value can be obtained based on the value, and the current block prediction can be made based on the right limit or lower limit.
[00504] The following continues the description of the lower-right boundary processing.
[00505] Assume a configuration that considers the positions of TL, TRO, BLO, and BR. Here, BR can mean a pixel at the lower-right boundary, TRO can be a referenceable pixel located in the vertical direction of BR, BLO can be a referenceable pixel located in the horizontal direction of BR, and TL can be a referenceable pixel located at the upper-left boundary of the current block or an intersection between the horizontal direction of TRO and the vertical direction of BLO.
[00506] Based on the pixel position, the directionality of the current block and characteristic information (e.g., edge, etc.) can be estimated.
[00507] As an example <1> The pixel value can gradually increase or decrease when moving diagonally 10 units from TL to BR. In this case, if TL is greater than or equal to TRO and BLO, BR can be less than or equal to TRO and BLO. Alternatively, the opposite configuration is possible.
[00508] As an example <2> The pixel value can gradually increase or decrease when moving diagonally 15 from BLO to TRO. In this case, if BLO is greater than or equal to TL and BR, TRO can be less than or equal to TL and BR. Alternatively, the opposite configuration is possible.
[00509] As an example <3> The pixel value can gradually increase or decrease when moving horizontally from left (TL, BLO) to right (TRO, BR). In this case, if TL is greater than or equal to TRO, BLO can be greater than or equal to BR. Alternatively, the opposite configuration can occur.
[00510] As an example <4> The pixel value can gradually increase or decrease as it moves vertically from the top (TL, TRO) to the bottom (BLO, BR). In this case, if TL is greater than or equal to BLO, then TRO can be greater than or equal to BR. Alternatively, the opposite configuration can occur.
[00511] If the image feature as in the previous example exists in the current block, the lower-right boundary can be predicted using it. In this case, a pixel located in the vertical or horizontal direction of the target pixel for estimation and a pixel that is an intersection point in the vertical or horizontal direction of each pixel may be required, and the target pixel for estimation can be predicted based on the comparison of the pixel values of the same.
[00512] <1> Example: When TL <= TRO and TL <= BLO, the BR value can be derived (predicted) based on the difference between pixels, estimating that there is a tendency to increase from TL to BR.
[00513] For example, a BR pixel value can be derived by adding a (BLO-TL) value to TRO or by adding a (TRO-TL) value to BLO. Alternatively, a BR pixel value can be derived by averaging or weighting such values. 160 two heats.
[00514] <2> Example: When TL >= BLO and TL <= TRO, a BR value can be derived based on the difference between pixels, estimating that there is a tendency to increase from BLO to TRO by 5.
[00515] For example, a BR pixel value can be derived by subtracting the (TL-BLO) value from TRO or adding the (TRO-TL) value to BLO. Alternatively, a BR pixel value can be derived by averaging or weighting such two values.
[00516] In the previous example, a case was described in which an arbitrary pixel BR is predicted by estimating a feature of a block based on a predetermined pixel adjacent to the current block. However, it can be difficult to accurately dimension the features of a block due to the limited pixel size. For example, when a momentum component is present in some of the pixels referenced to induce the BR, it can be difficult to precisely measure the features.
[00517] To this end, characteristic information (e.g., variance, standard deviation, etc.) of the upper and left regions of the current block can be calculated. As an example, it is determined that the iviA / a / zu¿ j / uu ΐύνι 161 Characteristic information of the pixels between TL and TRO or characteristic information of the pixels between TL and BLO reflects the increase or decrease of the block; also, a method can be used to derive a value of an arbitrary pixel such as BR based on the default pixel of the current block such as TL, TRO, BLO, etc.
[00518]
[00519] The various modes of description are not limited to being all inclusive and are proposed to illustrate representative aspects of description, and the features described in the various modes can be applied independently or in a combination of two or more.
[00520] In addition, various modalities of the present description may be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, the hardware may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), a general-purpose processor, a controller, a microcontroller, a microprocessor, and the like.
[00521] The scope of this description includes machine-executable software or instructions (e.g., operating system, applications, firmware, program, etc.) which perform operations in accordance with the methods of the various modalities to be carried out on the apparatus or computer and a non-transient, computer-readable medium on which such software or instructions are stored, executable on the apparatus or computer. INDUSTRIAL APPLICABILITY
[00522] The present invention can be used to encode / decode a video signal.
Claims
1. A method for decoding an image based on an intra-prediction with a decoding apparatus, comprising: 5 determining a reference pixel line for the intra-prediction of a current block in the image; determining an intra-prediction mode of the current block; and predicting the current block based on the reference pixel line 10 and the intra-prediction mode, wherein the current block includes a luma block and a chroma block, and the intra-prediction mode of the current block is determined for the luma block and the chroma block, respectively, and 15 wherein determining an intra-prediction mode of the chroma block comprises: selecting one from a first group of modes and a second group of modes based on a first flag signaled from the encoding apparatus, the first group of modes 20 including only reference-based prediction modes of inter-component,The second group of modes includes 67 predefined intra-prediction modes in the decoder, iviA / a / zu¿ j / uu Aōni, the 67 intra-prediction modes being composed of 164 non-directional modes and 65 directional modes, and specifying the first flag whether the chroma block's intra-prediction mode belongs to the first group of modes or the second group of modes; and deriving the chroma block's intra-prediction mode IVIA / a / ZU¿O / UU ! 03 í from the selected one.
2. The method of claim 1, wherein, in response to selecting that the intra-prediction mode of the chroma block is derived from the second group of modes, the intra-prediction mode 10 of the chroma block is determined based on an intra-prediction mode of the chroma block.
3. The method of claim 2, wherein when the intra prediction mode of the luma block is not available, the intra prediction mode of the luma block is equated to a predefined intra prediction mode in the decoding apparatus.
4. The method of claim 1, wherein a reference pixel line for the luma block is determined based on index information signaled from the encoding apparatus and a plurality of reference pixel line candidates, wherein the index information specifies one of the plurality of reference pixel line candidates, and wherein the plurality of reference pixel line candidates includes at least a first pixel line adjacent to the luma block, a second pixel line adjacent to the first pixel line, and a third pixel line adjacent to the second pixel line.
5. The method of claim 4, wherein determining a luma block intra-prediction mode comprises: selecting one from a first group of MPM candidates 10 and a second group of MPM candidates based on a second flag signaled from an encoding apparatus, the first group of MPM candidates including only at least one non-directional mode, the second group of candidates including only a plurality of MPM candidates of dissectional modes, 15 and the second flag specifying whether the luma block intra-prediction mode belongs to the first group of MPM candidates or to the second group of MPM candidates; and deriving the luma block intra-prediction mode from the selected one. 20 6. The method of claim 5, wherein when the intra-prediction mode of the luma block is derived from the first group of MPM candidates, the luma block is predicted using only the first pixel line adjacent to the luma block.
7. A method for encoding an image based on an intra-prediction with an encoding apparatus, comprising: determining a reference pixel line for the intra-prediction of a current block in the image; determining an intra-prediction mode of the current block; obtaining a residual block of the current block based on an original block of the current block and a prediction block of the current block, the prediction block being obtained based on the reference pixel line and the intra-prediction mode;and encoding the residual block to generate a bitstream of the encoded image, 15 wherein the current block includes a luma block and a chroma block, and the intra-prediction mode of the current block is determined for the luma block and the chroma block, respectively, wherein an intra-prediction mode of the chroma block belongs to one of a first group of modes and a second group of modes, the first group of modes includes only inter-component reference-based prediction modes, the second group of modes includes 67 intra-prediction modes predefined in the encoding apparatus, the 67 intra-prediction modes consist of 2 non-directional modes and 65 directional modes, and wherein a flag is encoded to specify whether the chroma block's intra-prediction mode belongs to the first group of modes or the second group of modes and is included in the bitstream.
8. A non-transient, computer-readable storage medium that stores a bit stream that is encoded by an image encoding method, the method comprising: determining a reference pixel line for the intra-prediction of a current block in the image; determining an intra-prediction mode of the current block; obtaining a residual block of the current block based on an original block of the current block and a prediction block of the current block, the prediction block being obtained based on the reference pixel line and the intra-prediction mode;and encoding the residual block to generate a bitstream of the encoded image, wherein the current block includes a luma block and a chroma block, and the intra-prediction mode of the current block is determined for the luma block and the chroma block, respectively, wherein an intra-prediction mode of the chroma block belongs to one of a first group of modes and a second group of modes, the first group of modes includes only reference-based prediction modes of Intercomponents, the second group of modes includes 67 predefined intra-prediction modes in the encoding apparatus, the 67 intra-prediction modes consist of 2 non-directional modes and 65 directional modes, and wherein a flag is encoded to specify whether the intra-prediction mode of the chroma block belongs to the first group of modes or the second group of modes and is included in the bitstream.