WO2019245342A1 - 비디오 신호 처리 방법 및 장치 - Google Patents

비디오 신호 처리 방법 및 장치 Download PDF

Info

Publication number
WO2019245342A1
WO2019245342A1 PCT/KR2019/007548 KR2019007548W WO2019245342A1 WO 2019245342 A1 WO2019245342 A1 WO 2019245342A1 KR 2019007548 W KR2019007548 W KR 2019007548W WO 2019245342 A1 WO2019245342 A1 WO 2019245342A1
Authority
WO
WIPO (PCT)
Prior art keywords
sample
reference sample
intra prediction
current block
prediction
Prior art date
Application number
PCT/KR2019/007548
Other languages
English (en)
French (fr)
Inventor
이배근
Original Assignee
주식회사 케이티
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 케이티 filed Critical 주식회사 케이티
Priority to US17/057,068 priority Critical patent/US20210144402A1/en
Priority to CN201980035904.9A priority patent/CN112204965A/zh
Publication of WO2019245342A1 publication Critical patent/WO2019245342A1/ko
Priority to US17/104,571 priority patent/US20210160488A1/en
Priority to US17/670,381 priority patent/US20220167012A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/189Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding
    • H04N19/192Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive
    • H04N19/194Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the adaptation method, adaptation tool or adaptation type used for the adaptive coding the adaptation method, adaptation tool or adaptation type being iterative or recursive involving only two passes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • H04N19/159Prediction type, e.g. intra-frame, inter-frame or bidirectional frame prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/11Selection of coding mode or of prediction mode among a plurality of spatial predictive coding modes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/167Position within a video image, e.g. region of interest [ROI]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques

Definitions

  • the present invention relates to a video signal processing method and apparatus.
  • High efficiency image compression techniques can be used to solve these problems caused by high resolution and high quality image data.
  • An inter-screen prediction technique for predicting pixel values included in the current picture from a picture before or after the current picture using an image compression technique an intra prediction technique for predicting pixel values included in a current picture using pixel information in the current picture
  • An object of the present invention is to provide a method and apparatus for efficiently performing intra prediction on an encoding / decoding target block in encoding / decoding a video signal.
  • An object of the present invention is to provide a method and apparatus for performing intra prediction using right and bottom reference samples in encoding / decoding a video signal.
  • An object of the present invention is to provide a method and apparatus for performing intra prediction that considers both forward and reverse directions of an intra prediction mode in encoding / decoding a video signal.
  • the video signal decoding method and apparatus derive first reference samples located at the top and left of the current block, derive second reference samples located at the right and bottom of the current block, and first reference. Based on the sample and the second reference sample, a prediction sample for the current block may be obtained.
  • the second reference samples may be derived based on the temporary prediction samples generated by performing the temporary intra prediction on the current block based on the first reference samples and the temporary intra prediction mode.
  • the video signal encoding method and apparatus derive first reference samples located at the top and left side of the current block, derive second reference samples located at the right and bottom sides of the current block, and first reference. Based on the sample and the second reference sample, a prediction sample for the current block may be obtained.
  • the second reference samples may be derived based on the temporary prediction samples generated by performing the temporary intra prediction on the current block based on the first reference samples and the temporary intra prediction mode.
  • the second reference sample may be derived by copying a temporary prediction sample located at a boundary of the current block.
  • the second reference sample may be derived based on a temporary prediction sample located at a boundary of the current block and a neighboring temporary prediction sample neighboring the temporary prediction sample. Can be.
  • the prediction sample is obtained based on a weighted sum operation of the first reference sample and the second reference sample, and the weight used in the weighted sum operation is
  • the position of the prediction sample may be determined based on the position of the first reference sample and the position of the second reference sample.
  • the first reference sample and the second reference sample may be in a direction indicated by the intra prediction mode of the current block in the prediction target sample.
  • any one of the first reference sample and the second reference sample is placed in a direction indicated by the intra prediction mode of the current block in a sample to be predicted, One may be in a direction opposite to the direction indicated by the intra prediction mode.
  • the temporary intra prediction mode may be a planner or a DC mode.
  • intra prediction can be efficiently performed on an encoding / decoding target block.
  • FIG. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
  • FIG. 3 is a diagram illustrating a partition mode candidate that can be applied to a coding block when the coding block is encoded by inter-screen prediction.
  • FIG. 4 illustrates an example in which coding blocks are hierarchically divided based on a tree structure according to an embodiment to which the present invention is applied.
  • FIG. 5 is a diagram illustrating a partition form in which binary tree based partitioning is allowed as an embodiment to which the present invention is applied.
  • FIG. 7 illustrates an example in which only a specific type of binary tree based partitioning is allowed.
  • FIG. 8 is a diagram for describing an example in which information related to a binary tree split permission count is encoded / decoded according to an embodiment to which the present invention is applied.
  • FIG. 9 illustrates a type of intra prediction mode that is pre-defined in an image encoder / decoder as an embodiment to which the present invention is applied.
  • FIG. 10 illustrates intra prediction modes available under an extended intra mode.
  • FIG. 11 is a flowchart schematically illustrating an intra prediction method according to an embodiment to which the present invention is applied.
  • 12 is a diagram illustrating reference sample line candidates.
  • FIG. 13 illustrates a method of correcting a prediction sample of a current block based on difference information of neighboring samples, according to an embodiment to which the present invention is applied.
  • FIG. 14 and 15 illustrate a one-dimensional reference sample group in which reference samples are rearranged in a line.
  • 16 is a diagram illustrating an example of deriving a right reference sample or a bottom reference sample using a plurality of reference samples.
  • 17 and 18 are diagrams for explaining determining a right reference sample and a bottom reference sample for a non-square block according to an embodiment of the present invention.
  • 19 is a diagram for explaining an example of deriving a second reference sample using the first reference sample.
  • 20 is a diagram illustrating an example of deriving a right reference sample and a bottom reference sample using a temporary prediction sample obtained based on a planner mode.
  • 21 is a diagram illustrating reference samples constituting a one-dimensional reference sample group.
  • 22 and 23 illustrate positions of a first reference object sample and a second reference object sample.
  • FIG. 24 illustrates an example of obtaining a prediction sample based on a weighted sum operation of a first reference object sample and a second reference object sample.
  • 25 is a diagram illustrating a region to which bidirectional intra prediction is applied.
  • FIG. 26 identifies and indicates a directional prediction mode in which bidirectional intra prediction is allowed.
  • FIG. 27 is a flowchart illustrating a process of determining whether to apply a bidirectional intra prediction mode according to the present invention.
  • first and second may be used to describe various components, but the components should not be limited by the terms. The terms are used only for the purpose of distinguishing one component from another.
  • the first component may be referred to as the second component, and similarly, the second component may also be referred to as the first component.
  • FIG. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
  • the image encoding apparatus 100 may include a picture splitter 110, a predictor 120 and 125, a transformer 130, a quantizer 135, a realigner 160, and an entropy encoder. 165, an inverse quantizer 140, an inverse transformer 145, a filter 150, and a memory 155.
  • each of the components shown in FIG. 1 is independently illustrated to represent different characteristic functions in the image encoding apparatus, and does not mean that each of the components is made of separate hardware or one software component unit.
  • each component is included in each component for convenience of description, and at least two of the components may be combined into one component, or one component may be divided into a plurality of components to perform a function.
  • Integrated and separate embodiments of the components are also included within the scope of the present invention without departing from the spirit of the invention.
  • the components may not be essential components for performing essential functions in the present invention, but may be optional components for improving performance.
  • the present invention can be implemented including only the components essential for implementing the essentials of the present invention except for the components used for improving performance, and the structure including only the essential components except for the optional components used for improving performance. Also included in the scope of the present invention.
  • the picture dividing unit 110 may divide the input picture into at least one processing unit.
  • the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU).
  • the picture dividing unit 110 divides one picture into a combination of a plurality of coding units, prediction units, and transformation units, and combines one coding unit, prediction unit, and transformation unit on a predetermined basis (eg, a cost function). You can select to encode the picture.
  • one picture may be divided into a plurality of coding units.
  • a recursive tree structure such as a quad tree structure may be used, and coding is divided into other coding units by using one image or a largest coding unit as a root.
  • the unit may be split with as many child nodes as the number of split coding units. Coding units that are no longer split according to certain restrictions become leaf nodes. That is, when it is assumed that only square division is possible for one coding unit, one coding unit may be split into at most four other coding units.
  • a coding unit may be used as a unit for encoding or may be used as a unit for decoding.
  • the prediction unit may be split in the form of at least one square or rectangle having the same size in one coding unit, or the prediction unit of any one of the prediction units split in one coding unit is different from one another. It may be divided to have a different shape and / or size than the unit.
  • the intra prediction may be performed without splitting into a plurality of prediction units NxN.
  • the predictors 120 and 125 may include an inter predictor 120 that performs inter prediction and an intra predictor 125 that performs intra prediction. Whether to use inter prediction or intra prediction on the prediction unit may be determined, and specific information (eg, an intra prediction mode, a motion vector, a reference picture, etc.) according to each prediction method may be determined. In this case, the processing unit in which the prediction is performed may differ from the processing unit in which the prediction method and the details are determined. For example, the method of prediction and the prediction mode may be determined in the prediction unit, and the prediction may be performed in the transform unit. The residual value (residual block) between the generated prediction block and the original block may be input to the transformer 130.
  • specific information eg, an intra prediction mode, a motion vector, a reference picture, etc.
  • prediction mode information and motion vector information used for prediction may be encoded by the entropy encoder 165 together with the residual value and transmitted to the decoder.
  • the original block may be encoded as it is and transmitted to the decoder without generating the prediction block through the prediction units 120 and 125.
  • the inter prediction unit 120 may predict the prediction unit based on the information of at least one of the previous picture or the next picture of the current picture. In some cases, the inter prediction unit 120 may predict the prediction unit based on the information of the partial region in which the encoding is completed in the current picture. You can also predict units.
  • the inter predictor 120 may include a reference picture interpolator, a motion predictor, and a motion compensator.
  • the reference picture interpolator may receive reference picture information from the memory 155 and generate pixel information of an integer pixel or less in the reference picture.
  • a DCT based 8-tap interpolation filter having different filter coefficients may be used to generate pixel information of integer pixels or less in units of 1/4 pixels.
  • a DCT-based interpolation filter having different filter coefficients may be used to generate pixel information of an integer pixel or less in units of 1/8 pixels.
  • the motion predictor may perform motion prediction based on the reference picture interpolated by the reference picture interpolator.
  • various methods such as full search-based block matching algorithm (FBMA), three step search (TSS), and new three-step search algorithm (NTS) may be used.
  • FBMA full search-based block matching algorithm
  • TSS three step search
  • NTS new three-step search algorithm
  • the motion vector may have a motion vector value of 1/2 or 1/4 pixel units based on the interpolated pixels.
  • the motion prediction unit may predict the current prediction unit by using a different motion prediction method.
  • various methods such as a skip method, a merge method, an advanced motion vector prediction (AMVP) method, an intra block copy method, and the like may be used.
  • AMVP advanced motion vector prediction
  • the intra predictor 125 may generate a prediction unit based on reference pixel information around the current block, which is pixel information in the current picture. If the neighboring block of the current prediction unit is a block that has performed inter prediction, and the reference pixel is a pixel that has performed inter prediction, the reference pixel of the block that has performed intra prediction around the reference pixel included in the block where the inter prediction has been performed Can be used as a substitute for information. That is, when the reference pixel is not available, the unavailable reference pixel information may be replaced with at least one reference pixel among the available reference pixels.
  • a prediction mode may have a directional prediction mode using reference pixel information according to a prediction direction, and a non-directional mode using no directional information when performing prediction.
  • the mode for predicting the luminance information and the mode for predicting the color difference information may be different, and the intra prediction mode information or the predicted luminance signal information used for predicting the luminance information may be utilized to predict the color difference information.
  • intra prediction When performing intra prediction, if the size of the prediction unit and the size of the transform unit are the same, the intra prediction on the prediction unit is performed based on the pixels on the left of the prediction unit, the pixels on the upper left, and the pixels on the top. Can be performed. However, when performing intra prediction, if the size of the prediction unit is different from that of the transform unit, intra prediction may be performed using a reference pixel based on the transform unit. In addition, intra prediction using NxN division may be used only for a minimum coding unit.
  • the intra prediction method may generate a prediction block after applying an adaptive intra smoothing (AIS) filter to a reference pixel according to a prediction mode.
  • AIS adaptive intra smoothing
  • the type of AIS filter applied to the reference pixel may be different.
  • the intra prediction mode of the current prediction unit may be predicted from the intra prediction mode of the prediction unit existing around the current prediction unit.
  • the prediction mode of the current prediction unit is predicted by using the mode information predicted from the neighboring prediction unit, if the intra prediction mode of the current prediction unit and the neighboring prediction unit is the same, the current prediction unit and the neighboring prediction unit using the predetermined flag information If the prediction modes of the current prediction unit and the neighboring prediction unit are different, entropy encoding may be performed to encode the prediction mode information of the current block.
  • a residual block may include a prediction unit performing prediction based on the prediction units generated by the prediction units 120 and 125 and residual information including residual information that is a difference from an original block of the prediction unit.
  • the generated residual block may be input to the transformer 130.
  • the transform unit 130 converts the residual block including residual information of the original block and the prediction unit generated by the prediction units 120 and 125 into a discrete cosine transform (DCT), a discrete sine transform (DST), and a KLT. You can convert using the same conversion method. Whether to apply DCT, DST, or KLT to transform the residual block may be determined based on intra prediction mode information of the prediction unit used to generate the residual block.
  • DCT discrete cosine transform
  • DST discrete sine transform
  • KLT KLT
  • the quantization unit 135 may quantize the values converted by the transformer 130 into the frequency domain.
  • the quantization coefficient may change depending on the block or the importance of the image.
  • the value calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the reordering unit 160.
  • the reordering unit 160 may reorder coefficient values with respect to the quantized residual value.
  • the reordering unit 160 may change the two-dimensional block shape coefficients into a one-dimensional vector form through a coefficient scanning method. For example, the reordering unit 160 may scan from DC coefficients to coefficients in the high frequency region by using a Zig-Zag scan method and change them into one-dimensional vectors.
  • a vertical scan that scans two-dimensional block shape coefficients in a column direction instead of a zig-zag scan may be used, and a horizontal scan that scans two-dimensional block shape coefficients in a row direction. That is, according to the size of the transform unit and the intra prediction mode, it is possible to determine which scan method among the zig-zag scan, the vertical scan and the horizontal scan is used.
  • the entropy encoder 165 may perform entropy encoding based on the values calculated by the reordering unit 160.
  • Entropy coding may use various coding methods such as, for example, Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC).
  • Exponential Golomb Context-Adaptive Variable Length Coding
  • CABAC Context-Adaptive Binary Arithmetic Coding
  • the entropy encoder 165 receives residual value coefficient information, block type information, prediction mode information, partition unit information, prediction unit information, transmission unit information, and motion of the coding unit from the reordering unit 160 and the prediction units 120 and 125.
  • Various information such as vector information, reference frame information, interpolation information of a block, and filtering information can be encoded.
  • the entropy encoder 165 may entropy encode a coefficient value of a coding unit input from the reordering unit 160.
  • the inverse quantizer 140 and the inverse transformer 145 inverse quantize the quantized values in the quantizer 135 and inversely transform the transformed values in the transformer 130.
  • the residual value generated by the inverse quantizer 140 and the inverse transformer 145 is reconstructed by combining the prediction units predicted by the motion estimator, the motion compensator, and the intra predictor included in the predictors 120 and 125. You can create a Reconstructed Block.
  • the filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • a deblocking filter may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
  • ALF adaptive loop filter
  • the deblocking filter may remove block distortion caused by boundaries between blocks in the reconstructed picture.
  • it may be determined whether to apply a deblocking filter to the current block based on the pixels included in several columns or rows included in the block.
  • a strong filter or a weak filter may be applied according to the required deblocking filtering strength.
  • horizontal filtering and vertical filtering may be performed in parallel when vertical filtering and horizontal filtering are performed.
  • the offset correction unit may correct the offset with respect to the original image on a pixel-by-pixel basis for the deblocking image.
  • the pixels included in the image are divided into a predetermined number of areas, and then, an area to be offset is determined, an offset is applied to the corresponding area, or offset considering the edge information of each pixel. You can use this method.
  • Adaptive Loop Filtering may be performed based on a value obtained by comparing the filtered reconstructed image with the original image. After dividing the pixels included in the image into a predetermined group, one filter to be applied to the group may be determined and filtering may be performed for each group. For information related to whether to apply ALF, a luminance signal may be transmitted for each coding unit (CU), and the shape and filter coefficient of an ALF filter to be applied may vary according to each block. In addition, regardless of the characteristics of the block to be applied, the same type (fixed form) of the ALF filter may be applied.
  • ALF Adaptive Loop Filtering
  • the memory 155 may store the reconstructed block or picture calculated by the filter unit 150, and the stored reconstructed block or picture may be provided to the predictors 120 and 125 when performing inter prediction.
  • FIG. 2 is a block diagram illustrating an image decoding apparatus according to an embodiment of the present invention.
  • the image decoder 200 includes an entropy decoder 210, a reordering unit 215, an inverse quantizer 220, an inverse transformer 225, a predictor 230, 235, and a filter unit ( 240, a memory 245 may be included.
  • the input bitstream may be decoded by a procedure opposite to that of the image encoder.
  • the entropy decoder 210 may perform entropy decoding in a procedure opposite to that of the entropy encoding performed by the entropy encoder of the image encoder. For example, various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied to the method performed by the image encoder.
  • various methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be applied to the method performed by the image encoder.
  • the entropy decoder 210 may decode information related to intra prediction and inter prediction performed by the encoder.
  • the reordering unit 215 may reorder the entropy decoded bitstream by the entropy decoding unit 210 based on a method of rearranging the bitstream. Coefficients expressed in the form of a one-dimensional vector may be reconstructed by reconstructing the coefficients in a two-dimensional block form.
  • the reordering unit 215 may be realigned by receiving information related to coefficient scanning performed by the encoder and performing reverse scanning based on the scanning order performed by the corresponding encoder.
  • the inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoder and the coefficient values of the rearranged block.
  • the inverse transform unit 225 may perform an inverse transform, i.e., an inverse DCT, an inverse DST, and an inverse KLT, for a quantization result performed by the image encoder, that is, a DCT, DST, and KLT. Inverse transformation may be performed based on a transmission unit determined by the image encoder.
  • the inverse transform unit 225 of the image decoder may selectively perform a transform scheme (eg, DCT, DST, KLT) according to a plurality of pieces of information such as a prediction method, a size of a current block, and a prediction direction.
  • a transform scheme eg, DCT, DST, KLT
  • the prediction units 230 and 235 may generate the prediction block based on the prediction block generation related information provided by the entropy decoder 210 and previously decoded blocks or picture information provided by the memory 245.
  • Intra prediction is performed on a prediction unit based on a pixel, but when intra prediction is performed, when the size of the prediction unit and the size of the transformation unit are different, intra prediction may be performed using a reference pixel based on the transformation unit. Can be. In addition, intra prediction using NxN division may be used only for a minimum coding unit.
  • the predictors 230 and 235 may include a prediction unit determiner, an inter predictor, and an intra predictor.
  • the prediction unit determiner receives various information such as prediction unit information input from the entropy decoder 210, prediction mode information of the intra prediction method, and motion prediction related information of the inter prediction method, and distinguishes the prediction unit from the current coding unit, and predicts It may be determined whether the unit performs inter prediction or intra prediction.
  • the inter prediction unit 230 predicts the current prediction based on information included in at least one of a previous picture or a subsequent picture of the current picture including the current prediction unit by using information required for inter prediction of the current prediction unit provided by the image encoder. Inter prediction may be performed on a unit. Alternatively, inter prediction may be performed based on information of some regions pre-restored in the current picture including the current prediction unit.
  • a motion prediction method of a prediction unit included in a coding unit based on a coding unit includes a skip mode, a merge mode, an AMVP mode, and an intra block copy mode. It can be determined whether or not it is a method.
  • the intra predictor 235 may generate a prediction block based on pixel information in the current picture.
  • intra prediction may be performed based on intra prediction mode information of the prediction unit provided by the image encoder.
  • the intra predictor 235 may include an adaptive intra smoothing (AIS) filter, a reference pixel interpolator, and a DC filter.
  • the AIS filter is a part of filtering the reference pixel of the current block and determines whether to apply the filter according to the prediction mode of the current prediction unit.
  • AIS filtering may be performed on the reference pixel of the current block by using the prediction mode and the AIS filter information of the prediction unit provided by the image encoder. If the prediction mode of the current block is a mode that does not perform AIS filtering, the AIS filter may not be applied.
  • the reference pixel interpolator may generate a reference pixel having an integer value or less by interpolating the reference pixel. If the prediction mode of the current prediction unit is a prediction mode for generating a prediction block without interpolating the reference pixel, the reference pixel may not be interpolated.
  • the DC filter may generate the prediction block through filtering when the prediction mode of the current block is the DC mode.
  • the reconstructed block or picture may be provided to the filter unit 240.
  • the filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
  • Information about whether a deblocking filter is applied to a corresponding block or picture, and when the deblocking filter is applied to the corresponding block or picture, may be provided with information about whether a strong filter or a weak filter is applied.
  • the deblocking filter related information provided by the image encoder may be provided and the deblocking filtering of the corresponding block may be performed in the image decoder.
  • the offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction and offset value information applied to the image during encoding.
  • the ALF may be applied to a coding unit based on ALF application information, ALF coefficient information, and the like provided from the encoder. Such ALF information may be provided included in a specific parameter set.
  • the memory 245 may store the reconstructed picture or block to use as a reference picture or reference block, and may provide the reconstructed picture to the output unit.
  • a coding unit is used as a coding unit for convenience of description, but may also be a unit for performing decoding as well as encoding.
  • the current block represents a block to be encoded / decoded, and according to the encoding / decoding step, a coding tree block (or a coding tree unit), an encoding block (or a coding unit), a transform block (or a transform unit), or a prediction block. (Or prediction unit) or the like.
  • 'unit' may indicate a basic unit for performing a specific encoding / decoding process
  • 'block' may indicate a sample array having a predetermined size.
  • 'block' and 'unit' may be used interchangeably.
  • the coding block (coding block) and the coding unit (coding unit) may be understood to have the same meaning.
  • One picture may be divided into square or non-square basic blocks and encoded / decoded.
  • the basic block may be referred to as a coding tree unit.
  • a coding tree unit may be defined as a coding unit of the largest size allowed in a sequence or slice.
  • Information indicating whether the coding tree unit is square or non-square or information related to the size of the coding tree unit may be signaled through a sequence parameter set, a picture parameter set or a slice header.
  • the coding tree unit may be divided into smaller sized partitions.
  • the partition generated by dividing the coding tree unit is called depth 1
  • the partition generated by dividing the partition having depth 1 may be defined as depth 2. That is, a partition generated by dividing a partition that is a depth k in a coding tree unit may be defined as having a depth k + 1.
  • a partition of any size generated as the coding tree unit is split may be defined as a coding unit.
  • the coding unit may be split recursively or split into basic units for performing prediction, quantization, transform, or in-loop filtering.
  • an arbitrary size partition generated as a coding unit is divided may be defined as a coding unit or a transform unit or a prediction unit that is a basic unit for performing prediction, quantization, transform, or in-loop filtering.
  • a prediction block having the same size as that of the coding block or a size smaller than the coding block may be determined through prediction division of the coding block.
  • Part_mode partition mode
  • Information for determining a partition index indicating any one of the partition mode candidates may be signaled through the bitstream.
  • the partition index of the coding block may be determined based on at least one of the size, shape, or coding mode of the coding block. The size or shape of the predictive block may be determined based on the partition mode specified by the partition index.
  • Partition mode candidates may include asymmetric partition types (eg, nLx2N, nRx2N, 2NxnU, 2NxnD).
  • the number or type of asymmetric partition mode candidates that a coding block may use may be determined based on at least one of the size, shape, or coding mode of the coding block.
  • FIG. 3 is a diagram illustrating a partition mode candidate that can be applied to a coding block when the coding block is encoded by inter-screen prediction.
  • any one of eight partition mode candidates illustrated in FIG. 3 may be applied to the coding block.
  • a coding block when a coding block is encoded by intra prediction, only square partition division may be applied to the coding block. That is, when the coding block is encoded by intra prediction, partition mode PART_2Nx2N or PART_NxN may be applied to the coding block.
  • PART_NxN may be applied when the coding block has a minimum size.
  • the minimum size of the coding block may be predefined in the encoder and the decoder.
  • information about the minimum size of the coding block may be signaled through the bitstream.
  • the minimum size of the coding block may be signaled through the slice header. Accordingly, the minimum size of the coding block for each slice may be determined differently.
  • the partition mode candidates available to the coding block may be determined differently according to at least one of the size or shape of the coding block.
  • the number or type of partition mode candidates that a coding block may use may be differently determined according to at least one of the size or shape of the coding block.
  • the type or number of asymmetric partition mode candidates that the coding block may use may be determined based on the size or shape of the coding block.
  • the number or type of asymmetric partition mode candidates that a coding block may use may be determined differently according to at least one of the size or shape of the coding block. For example, when a coding block has a non-square shape whose width is larger than a height, at least one of PART_2NxN, PART_2NxnU, or PART_2NxnD may not be used as a partition mode candidate of the coding block.
  • PART_Nx2N When the coding block has a non-square shape whose height is greater than the width, at least one of PART_Nx2N, PART_nLx2N, and PART_nRx2N may not be used as a partition mode candidate of the coding block.
  • the size of the prediction block may have a size of 64x64 to 4x4.
  • the prediction block may not have a 4x4 size in order to reduce the memory bandwidth.
  • the partition mode it is also possible to recursively split the coding blocks. That is, based on the partition mode determined by the partition index, the coding block may be divided, and each partition generated as a result of the division of the coding block may be defined as the coding block.
  • a coding unit may mean a coding tree unit or a coding unit included in a coding tree unit.
  • 'partition' generated as the coding block is divided may mean 'coding block'.
  • the division method described below may be applied to dividing a coding block into a plurality of prediction blocks or a plurality of transform blocks.
  • the coding unit may be divided by at least one line.
  • the angle of the line dividing the coding unit may be a value within a range of 0 degrees to 360 degrees.
  • the angle of the horizontal line may be 0 degrees
  • the angle of the vertical line may be 90 degrees
  • the angle of the diagonal line in the upper right direction may be 45 degrees
  • the angle of the upper left diagonal line may be 135 degrees.
  • the plurality of lines may all have the same angle. Alternatively, at least one of the plurality of lines may have a different angle than the other lines. Alternatively, the coding tree unit or the plurality of lines dividing the coding unit may have a predefined angle difference (eg, 90 degrees).
  • Information about a line dividing the coding unit may be determined by the partition mode. Alternatively, information about at least one of the number, direction, angle, or position of a line in a block may be encoded.
  • a coding unit is divided into a plurality of coding units using at least one of a vertical line or a horizontal line.
  • the number of vertical or horizontal lines partitioning the coding unit may be at least one.
  • a coding unit may be divided into two partitions by using one vertical line or one horizontal line.
  • the coding unit may be divided into three partitions by using two vertical lines or two horizontal lines.
  • one vertical line and one horizontal line may be used to divide the coding unit into four partitions that are 1/2 smaller in width and height than the coding unit.
  • the partitions may have a uniform size.
  • either partition may have a different size than the remaining partitions, or each partition may have a different size.
  • the coding unit may be divided into three partitions.
  • the width ratio or height ratio of the three partitions may be n: 2n: n, 2n: n: n, or n: n: 2n.
  • the division of the coding unit into four partitions will be referred to as quad-tree based partitioning.
  • the division of the coding unit into two partitions will be referred to as binary tree based partitioning.
  • the division of the coding unit into three partitions will be referred to as triple tree-based partitioning.
  • one vertical line and / or one horizontal line will be shown to be used to divide the coding unit, but with more vertical lines and / or more horizontal lines than shown, It would also be within the scope of the present invention to divide the coding unit into more partitions than shown or fewer partitions than shown.
  • FIG. 4 illustrates an example of hierarchically dividing a coding block based on a tree structure according to an embodiment to which the present invention is applied.
  • the input video signal is decoded in predetermined block units, and the basic unit for decoding the input video signal in this way is called a coding block.
  • the coding block may be a unit for performing intra / inter prediction, transformation, and quantization.
  • a prediction mode eg, an intra prediction mode or an inter prediction mode
  • the coding block can be a square or non-square block with any size in the range 8x8 to 64x64, and can be a square or non-square block with a size of 128x128, 256x256 or more.
  • the coding block may be hierarchically divided based on at least one of a quad tree splitting method, a binary tree splitting method, or a triple tree splitting method.
  • Quad tree-based partitioning may refer to a method in which a 2N ⁇ 2N coding block is divided into four N ⁇ N coding blocks.
  • Binary tree based partitioning may refer to a method in which one coding block is divided into two coding blocks.
  • Triple tree based splitting may refer to a method in which one coding block is divided into three coding blocks. Even if a binary tree or triple tree based splitting is performed, there may be a square coding block at a lower depth.
  • Partitions created due to binary tree based partitioning may be symmetrical or asymmetrical.
  • the coding block divided based on the binary tree may be a square block or a non-square block (eg, a rectangle).
  • the partition form of a coding block based on binary tree partitioning is a large symmetric type such as 2NxN (horizontal non-square coding unit) or Nx2N (vertical non-square coding unit) or asymmetric such as nLx2N, nRx2N, 2NxnU or 2NxnD. It may include an (asymmetric) type. Only one of the symmetric type or the asymmetric type may be allowed in the split form of the coding block.
  • the triple tree splitting form may include at least one of splitting a coding block into two vertical lines or splitting the coding block into two horizontal lines. Three non-square partitions can be created by triple tree partitioning.
  • Triple tree splitting may include splitting a coding block into two horizontal lines or splitting a coding block into two vertical lines.
  • the width ratio or height ratio of the partitions resulting from the splitting of the coding block may be n: 2n: n, 2n: n: n or n: n: 2n.
  • the location of the partition having the largest width or height among the three partitions may be predefined in the encoder and the decoder. Alternatively, information indicating a partition having the largest width or height among the three partitions may be signaled through the bitstream.
  • dividing the coding unit into square partitions may constitute quad-tree CU partitioning, and dividing the coding unit into symmetric non-square partitions may correspond to binary tree partitioning. have. Dividing the coding tree unit into square partitions and symmetric non-square partitions may correspond to quad and binary tree CU partitioning (QTBT).
  • QTBT quad and binary tree CU partitioning
  • Binary tree or triple tree based splitting may be performed on coding blocks in which quadtree based splitting is no longer performed.
  • the coding block generated as a result of the binary tree or triple tree based splitting may be split into smaller coding blocks.
  • at least one of quad tree division, triple tree division, or binary tree division may not be applied to the coding block.
  • binary tree splitting in a predetermined direction or triple tree splitting in a predetermined direction may not be allowed in the coding block.
  • quad-tree splitting and triple-tree splitting may not be allowed in a coding block generated as a result of binary tree or triple tree based splitting. Only binary tree splitting may be allowed in the coding block.
  • only the coding block having the largest size among the three coding blocks generated as a result of the triple tree based splitting may be divided into smaller coding blocks.
  • binary tree based splitting or triple tree based splitting may be allowed only to a coding block having the largest size among three coding blocks generated as a result of triple tree based splitting.
  • the divided form of the lower depth partition may be determined depending on the divided form of the upper depth partition. For example, when the upper partition and the lower partition are partitioned based on the binary tree, only the partition based on the binary tree of the same type as the binary tree partition of the upper depth partition may be allowed in the lower depth partition. For example, when the binary tree splitting shape of the upper depth partition is 2NxN type, the binary tree splitting shape of the lower depth partition may also be set to 2NxN shape. Alternatively, when the binary tree partition type of the upper depth partition is Nx2N type, the partition shape of the lower depth partition may also be set to Nx2N type.
  • a binary tree partition identical to the partition direction of the upper depth partition or a triple tree partition identical to the partition direction of the upper depth partition may not be allowed in the partition having the largest size among partitions generated as a result of the triple tree based partitioning. have.
  • the split type of the lower depth partition may be determined in consideration of the split type of the upper depth partition and the split type of the neighboring lower depth partition. Specifically, when the upper depth partition is partitioned based on the binary tree, the partition type of the lower depth partition may be determined so that the same result as that of partitioning the upper depth partition based on the quad tree does not occur. For example, when the partition type of the upper depth partition is 2NxN and the partition type of the neighboring lower depth partition is Nx2N, the partition type of the current lower depth partition cannot be set to Nx2N. This is because, when the partition type of the current lower depth partition has Nx2N, the same result as that of the quadtree partition of the upper depth partition of the NxN type is caused.
  • the partition type of the upper depth partition is Nx2N and the partition shape of the neighboring lower depth partition is 2NxN
  • the partition type of the current lower depth partition cannot be set to 2NxN. That is, when the binary tree splitting shape of the upper depth partition and the binary tree splitting shape of the neighboring lower depth partition are different, the binary tree splitting shape of the current lower depth partition may be set to be the same as the binary tree splitting shape of the upper depth partition.
  • the binary tree split type of the lower depth partition may be set differently from the binary tree split type of the upper depth partition.
  • the allowed binary tree splitting forms may be determined.
  • the binary tree splitting type allowed for a coding tree unit may be limited to 2NxN or Nx2N type.
  • the allowed partition type may be predefined in the encoder or the decoder.
  • information about an allowed split type or a not allowed split type may be encoded and signaled through a bitstream.
  • FIG. 7 illustrates an example in which only a specific type of binary tree based partitioning is allowed.
  • FIG. 7A illustrates an example in which only Nx2N type binary tree based partitioning is allowed
  • FIG. 7B illustrates an example in which only 2NxN type binary tree based partitioning is allowed.
  • information about quad tree splitting, information about binary tree splitting, or information about triple tree splitting may be used.
  • the information about quad tree splitting may include at least one of information indicating whether quadtree-based splitting is performed or information on the size / depth of a coding block allowing quadtree-based splitting.
  • the information about the binary tree splitting includes information indicating whether a binary tree-based split is performed, information indicating whether the binary tree-based split is vertical or horizontal, and a coding block allowing binary-tree based split. It may include at least one of information about the size / depth of the information or the size / depth of the coding block that is not allowed to be divided based on the binary tree.
  • the information on triple tree splitting includes information indicating whether tripletree-based splitting is performed, information indicating whether tripletree-based splitting is vertical or horizontal, coding blocks that allow tripletree-based splitting. It may include at least one of information about the size / depth of the information or the size / depth of the coding block that is not allowed to split based on the triple tree.
  • the information about the size of the coding block may indicate a minimum or maximum value of at least one of the width, the height, the product of the width and the height, or the width and the height ratio of the coding block.
  • the binary tree-based Partitioning may not be allowed.
  • Partitioning may not be allowed when the width or height of the coding block is less than or equal to the minimum size allowed for triple tree splitting, or when the split depth of the coding block is larger than the maximum depth allowed for triple tree splitting.
  • Information about a binary tree or triple tree based splitting permission condition may be signaled through a bitstream.
  • the information may be encoded in a sequence, picture or fragment image unit.
  • the fragment image may mean at least one of a slice, a tile group, a tile, a brick, a coding block, a prediction block, or a transform block.
  • a syntax 'max_mtt_depth_idx_minus1' indicating a maximum depth that allows binary tree / triple tree splitting may be encoded / decoded through the bitstream.
  • max_mtt_depth_idx_minus1 + 1 may indicate the maximum depth allowed for binary tree / triple tree splitting.
  • At least one of the number of times binary tree / triple tree splitting is allowed, the maximum depth allowed for binary tree / triple tree splitting, or the number of depths allowed for binary tree / triple tree splitting, may be signaled at the sequence or slice level.
  • at least one of the number of binary tree / triple tree splits, the maximum depth allowed for binary tree / triple tree splits, or the number of depths allowed for binary tree / triple tree splits of the first and second slices may be different.
  • binary tree / triple tree splitting is allowed only at one depth
  • binary tree / triple tree splitting may be allowed at two depths.
  • binary tree splitting is performed on a coding unit having a depth of 2 and a coding unit having a depth of 3. Accordingly, information indicating the number of times binary tree splitting has been performed in the coding tree unit (2 times), information indicating the maximum depth (depth 3) of the partition generated by the binary tree splitting in the coding tree unit, or the binary tree in the coding tree unit. At least one of information indicating the number of partition depths (2, depth 2, and depth 3) to which division is applied may be encoded / decoded through a bitstream.
  • the number of times that binary tree / triple tree splitting is allowed, the depth of which binary tree / triple tree splitting is allowed or the number of depths that allow binary tree / triple tree splitting may be predefined in the encoder and the decoder. Or, based on at least one of the index or the size / type of the coding unit or the index of the sequence or slice, the number of times binary tree / triple tree splitting is allowed, or the depth or binary tree / triple tree splitting allowed The number of depths allowed can be determined. For example, in the first slice, binary tree / triple tree splitting may be allowed at one depth, and in the second slice, binary tree / triple tree splitting may be allowed at two depths.
  • the temporal level identifier TemporalID may be used to identify each of a plurality of layers of an image having at least one scalability among a view, a spatial, a temporal, or a quality. will be.
  • the first coding block 300 having a split depth of k may be divided into a plurality of second coding blocks based on a quad tree.
  • the second coding blocks 310 to 340 are square blocks having half the width and the height of the first coding block, and the split depth of the second coding block may be increased to k + 1.
  • the second coding block 310 having the division depth k + 1 may be divided into a plurality of third coding blocks having the division depth k + 2. Partitioning of the second coding block 310 may be selectively performed using either a quart tree or a binary tree according to a partitioning scheme.
  • the splitting scheme may be determined based on at least one of information indicating splitting based on the quad tree or information indicating splitting based on the binary tree.
  • the second coding block 310 When the second coding block 310 is divided on the basis of the quart tree, the second coding block 310 is divided into four third coding blocks 310a having half the width and the height of the second coding block, The split depth can be increased to k + 2.
  • the second coding block 310 when the second coding block 310 is divided on a binary tree basis, the second coding block 310 may be split into two third coding blocks. In this case, each of the two third coding blocks is a non-square block having one half of the width and the height of the second coding block, and the split depth may be increased to k + 2.
  • the second coding block may be determined as a non-square block in the horizontal direction or the vertical direction according to the division direction, and the division direction may be determined based on information about whether the binary tree-based division is the vertical direction or the horizontal direction.
  • the second coding block 310 may be determined as an end coding block that is no longer split based on the quad tree or the binary tree, and in this case, the corresponding coding block may be used as a prediction block or a transform block.
  • the third coding block 310a may be determined as an end coding block or may be further divided based on a quad tree or a binary tree.
  • the third coding block 310b split based on the binary tree may be further divided into a vertical coding block 310b-2 or a horizontal coding block 310b-3 based on the binary tree, and corresponding coding
  • the partition depth of the block can be increased to k + 3.
  • the third coding block 310b may be determined as an end coding block 310b-1 that is no longer split based on the binary tree, in which case the coding block 310b-1 may be used as a prediction block or a transform block. Can be.
  • the above-described partitioning process allows information about the size / depth of a coding block that allows quad-tree based partitioning, information about the size / depth of the coding block that allows binary tree-based partitioning, or binary-tree based partitioning. It may be limitedly performed based on at least one of the information about the size / depth of the coding block that is not.
  • a size candidate that a coding block may have is limited to a predetermined number, or the size of a coding block in a predetermined unit may have a fixed value.
  • the size of the coding block in the sequence or the size of the coding block in the picture may be limited to have any one of 256x256, 128x128, or 32x32.
  • Information representing the size of a coding block in a sequence or picture may be signaled through a sequence header or picture header.
  • the coding unit may take a square or a rectangle of any size.
  • the first coding block 300 having a split depth of k may be divided into a plurality of second coding blocks based on a quad tree.
  • the second coding blocks 310 to 340 are square blocks having half the width and the height of the first coding block, and the split depth of the second coding block may be increased to k + 1.
  • the second coding block 310 having the division depth k + 1 may be divided into a plurality of third coding blocks having the division depth k + 2. Partitioning of the second coding block 310 may be selectively performed using either a quart tree or a binary tree according to a partitioning scheme.
  • the splitting scheme may be determined based on at least one of information indicating splitting based on the quad tree or information indicating splitting based on the binary tree.
  • the second coding block 310 When the second coding block 310 is divided on the basis of the quart tree, the second coding block 310 is divided into four third coding blocks 310a having half the width and the height of the second coding block, The split depth can be increased to k + 2.
  • the second coding block 310 when the second coding block 310 is divided on a binary tree basis, the second coding block 310 may be split into two third coding blocks. In this case, each of the two third coding blocks is a non-square block having one half of the width and the height of the second coding block, and the split depth may be increased to k + 2.
  • the second coding block may be determined as a non-square block in the horizontal direction or the vertical direction according to the division direction, and the division direction may be determined based on information about whether the binary tree-based division is the vertical direction or the horizontal direction.
  • the second coding block 310 may be determined as an end coding block that is no longer split based on the quad tree or the binary tree, and in this case, the corresponding coding block may be used as a prediction block or a transform block.
  • the third coding block 310a may be determined as an end coding block or may be further divided based on a quad tree or a binary tree.
  • the third coding block 310b split based on the binary tree may be further divided into a vertical coding block 310b-2 or a horizontal coding block 310b-3 based on the binary tree, and corresponding coding
  • the partition depth of the block can be increased to k + 3.
  • the third coding block 310b may be determined as an end coding block 310b-1 that is no longer split based on the binary tree, in which case the coding block 310b-1 may be used as a prediction block or a transform block. Can be.
  • the above-described partitioning process allows information about the size / depth of a coding block that allows quad-tree based partitioning, information about the size / depth of the coding block that allows binary tree-based partitioning, or binary-tree based partitioning. It may be limitedly performed based on at least one of the information about the size / depth of the coding block that is not.
  • a size candidate that a coding block may have is limited to a predetermined number, or the size of a coding block in a predetermined unit may have a fixed value.
  • the size of the coding block in the sequence or the size of the coding block in the picture may be limited to have any one of 256x256, 128x128, or 32x32.
  • Information representing the size of a coding block in a sequence or picture may be signaled through a sequence header or picture header.
  • the coding unit may take a square or a rectangle of any size.
  • Transform skip may be set not to be used for a coding unit generated as a result of binary tree based splitting or triple tree based splitting.
  • the transform skip may be set to be applied to the non-square coding unit only in at least one of the vertical direction and the horizontal direction. For example, when the transform skip is applied in the horizontal direction, only scaling is performed without transform / inverse transform in the horizontal direction, and transform / inverse transform using DCT or DST is performed in the vertical direction. When transform skip is applied in the vertical direction, only scaling is performed without transform / inverse transform in the vertical direction, and transform / inverse transform using DCT or DST is performed in the horizontal direction.
  • Information on whether to skip the inverse transform in the horizontal direction or information indicating whether to skip the inverse transform in the vertical direction may be signaled through the bitstream.
  • information indicating whether to skip the inverse transform in the horizontal direction is a 1-bit flag, 'hor_transform_skip_flag'
  • information indicating whether to skip the inverse transform in the vertical direction is a 1-bit flag and 'ver_transform_skip_flag'.
  • the encoder may determine whether to encode 'hor_transform_skip_flag' or 'ver_transform_skip_flag' according to the size and / or shape of the current block. As an example, when the current block is Nx2N type, hor_transform_skip_flag may be encoded, and encoding of ver_transform_skip_flag may be omitted. If the current block has a 2N ⁇ N form, ver_transform_skip_flag may be encoded and hor_transform_skip_flag may be omitted.
  • the transform skip may be applied to the horizontal direction and the transform / inverse transform may be performed on the vertical direction.
  • transform skip may be applied in the vertical direction and transform / inverse transform may be performed in the horizontal direction.
  • the transform / inverse transform may be performed based on at least one of DCT or DST.
  • coding blocks that are no longer divided may be used as prediction blocks or transform blocks. That is, it can be used as a coding block, prediction block, or transform block generated as a result of quad tree partitioning or binary tree partitioning.
  • a prediction image may be generated in units of coding blocks, and a residual signal that is a difference between the original image and the prediction image may be converted in units of coding blocks.
  • motion information may be determined based on a coding block, or an intra prediction mode may be determined based on a coding block.
  • the coding block may be encoded using at least one of a skip mode, an intra prediction or an inter prediction.
  • the plurality of coding blocks generated by dividing the coding blocks may be configured to share at least one of motion information, merge candidates, reference samples, reference sample lines, or intra prediction modes.
  • partitions generated by dividing the coding block may include at least one of motion information, merge candidate, reference sample, reference sample line, or intra prediction mode according to the size or shape of the coding block.
  • Can share Alternatively, only some of the plurality of coding blocks may share the information, and the remaining coding blocks may be configured not to share the information.
  • FIG. 9 illustrates a type of intra prediction mode that is pre-defined in an image encoder / decoder as an embodiment to which the present invention is applied.
  • the image encoder / decoder may perform intra prediction using any one of pre-defined intra prediction modes.
  • the pre-defined intra prediction mode for intra prediction may consist of a non-directional prediction mode (eg, planar mode, DC mode) and 33 directional prediction modes.
  • M extended directional prediction modes may be defined by further subdividing an angle of the directional prediction mode (M> 33).
  • the directional prediction mode different from the existing 33 directional prediction modes may be derived based on at least one of the existing 33 directional prediction modes.
  • a larger number of intra prediction modes may be defined than the 35 intra prediction modes shown in FIG. 9.
  • the number of available intra prediction modes more than 35 shown in FIG. 9 may be referred to as extended intra mode.
  • the 10 illustrates intra prediction modes available under an extended intra mode.
  • the available intra prediction modes may consist of two non-directional prediction modes and 65 extended directional prediction modes.
  • the number of available intra prediction modes may be set equally for the luminance component and the chrominance component. Alternatively, the number of intra prediction modes available for each color component may be different. For example, one of 67 intra prediction modes may be selected and used in the luminance component, and one of 35 intra prediction modes may be selected and used in the chrominance component.
  • the number of available intra prediction modes may differ depending on the color difference format. For example, under 4: 2: 0 format, 67 intra prediction modes may be set for a luminance component and 35 intra prediction modes may be set for a chrominance component. Under 4: 4: 4 format, 67 intra prediction modes can be set to be available for both the luminance component and the chrominance component.
  • the number of available intra prediction modes may differ depending on the size and / or shape of the block. Specifically, the number of available intra prediction modes may be determined to be 35 or 67 according to the size and / or shape of the PU, TU or CU. For example, when the size of a CU, TU or PU is smaller than 64x64, or when the CU, TU or PU is an asymmetric partition, the number of available intra prediction modes may be 35. On the other hand, when the size of the CU, TU or PU is 64x64 or more, or when the CU, TU or PU is a symmetric partition, the number of available intra prediction modes may be set to 67.
  • the number of available directional intra prediction modes may be set to 65 for the Intra_2Nx2N partition.
  • the number of available directional intra prediction modes may be set to 33.
  • Whether extended intra mode is applied may be determined based on at least one of the size, shape or color component of the block.
  • information indicating the size or shape of the block to which the extended intra mode is applied may be signaled through the bitstream.
  • the information may be signaled at the sequence, picture or slice level.
  • the size of a block to which the extended intra mode is applied may be different for each sequence, picture, or slice. For example, in the first slice, the extended intra mode is set to be applied to a block larger than 64x64 (eg, CU, TU, or PU), and in the second slice, the extended intra mode is set to be applied to a block larger than 32x32. Can be.
  • the information indicating the size of the block to which the extended intra mode is applied may be a value obtained by subtracting a predetermined value after taking a log value to the size of the reference block.
  • 'log2_extended_intra_mode_size_minus4' which is obtained by subtracting the integer 4 from the log value taken from the size of the reference block, may be encoded.
  • a value of log2_extended_intra_mode_size_minus4 indicates that an extended intra mode is applied to a block having a size greater than 16x16 or a block larger than 16x16
  • a value of log2_extended_intra_mode_size_minus4 equal to 1 indicates that a block having a size of 32x32 or more or It may indicate that extended intra mode is applied to a block having a size larger than 32 ⁇ 32.
  • the number of available intra prediction modes may be determined based on at least one of the color difference component, the color difference format, the size or the shape of the block.
  • Intra prediction for the current block may be performed based on at least one of the available intra prediction modes.
  • the intra prediction mode candidates (for example, the number of MPMs) used to determine the intra prediction mode of the block to be encoded / decoded are not limited to the examples described above. It may be determined accordingly. It is also possible to use a larger number of intra prediction modes than shown in FIG. 9. For example, it is also possible to further refine the directional prediction mode shown in FIG. 9 to use 129 directional prediction modes and two non-directional prediction modes. Whether to use a larger number of intra prediction modes than shown in FIG. 9 may be determined in consideration of at least one of a color difference component, a color difference component, a size or a shape of a block, as in the above-described example.
  • FIG. 11 is a flowchart schematically illustrating an intra prediction method according to an embodiment to which the present invention is applied.
  • the reference sample line index of the current block may be determined (S1110).
  • the reference sample line index may be used to determine the reference sample line used to perform intra prediction of the current block.
  • At least one reference sample line indicated in the reference sample line index among the plurality of reference sample lines may be used to perform intra prediction of the current block.
  • 12 is a diagram illustrating reference sample line candidates.
  • the N th reference sample line may include a top reference sample whose y coordinate is smaller by N than the top row of the current block and a left reference sample whose x coordinate is smaller by N than the leftmost column of the current block.
  • the Nth reference sample line represents a reference sample line having an index of N-1 in the example shown in FIG. 12.
  • the Nth reference sample line is the top reference samples from P (-N, -N) to P (2W + N-1, -N) and P (-N, -N) to P (-N, 2H + Left reference samples up to N-1).
  • reference sample line 1 shows upper reference samples from P (-2, _2) to P (2W + 1, -2) and P (-2, -2) to P (-2, 2H + 1). Up to left reference samples.
  • reference sample line candidates may be one, two, three, four, or more.
  • reference sample line 0, reference sample line 1, and reference sample line 3 may be used as reference sample line candidates.
  • the number of reference sample lines or the position of the reference sample lines that may be used as the reference sample line candidates may be determined based on at least one of the size, shape, intra prediction mode, or position of the current block. For example, when the current block is located adjacent to the boundary of the CTU or the boundary of the tile, the number of reference sample line candidates may be one (eg, reference sample line 0). If the current block is not located adjacent to the boundary of the CTU or the boundary of the tile, the number of reference sample line candidates may be three (eg, reference sample line 0, reference sample line 1, reference sample line 3). For example, when the intra prediction mode of the current block belongs to the first range, reference sample line 0, reference sample line 1, and reference sample line 3 may be used as reference sample line candidates. When the intra prediction mode of the current block belongs to the second range, reference sample line 0, reference sample line 2, and reference sample line 2 may be used as reference sample line candidates.
  • Information specifying at least one of the reference sample line candidates may be signaled through the bitstream.
  • the number of available reference sample line candidates is one, encoding of the index information may be omitted.
  • the reference sample line 0 adjacent to the current block may be considered to be selected.
  • At least one of the reference sample line candidates may be selected based on at least one of the size, shape, position, or intra prediction mode of the current block. For example, if at least one of the width, height, and size of the current block is smaller than a predefined value, the reference sample line 0 may be selected. For example, if the current block is in contact with the upper boundary of the CTU or tile, the reference sample line 0 may be selected.
  • the reference sample line may be selected based on whether the current block is divided into sub blocks. For example, when the current block is divided into sub blocks, reference sample line 0 may be selected.
  • a reference sample line may be determined for each sub block.
  • all sub blocks may be defined to have the same reference sample line index.
  • intra prediction may be performed in units of sub blocks.
  • Multiple reference sample lines may be selected for the current block. Whether to perform intra prediction using a plurality of reference sample lines may be adaptively determined according to the size, shape or intra prediction mode of the current block. For example, when the intra prediction mode of the current block is the non-directional prediction mode or the predefined directional intra prediction mode, the plurality of reference sample lines may not be used.
  • the predefined directional intra prediction mode may include at least one of a vertical intra prediction mode, a horizontal intra prediction mode, or a diagonal intra prediction mode.
  • the plurality of reference sample lines may include a reference sample line selected by index information and a reference sample line obtained by adding or subtracting a predefined value to an index of the reference sample line.
  • the predefined value may be 1 or 2.
  • a plurality of index information may be signaled through the bisstream.
  • Each of the plurality of index information points to different reference sample lines.
  • the prediction sample may be obtained based on at least one of a weighted sum operation, an average operation, a minimum value operation, or a maximum value operation of the plurality of reference samples.
  • the index of the reference sample line including at least one of the plurality of reference samples may be different from the index of the reference sample line including the remainder.
  • an intra prediction mode of the current block may be determined (S1220).
  • a Most Probable Mode (MPM) candidate may be derived based on the intra prediction mode of a neighboring block neighboring the current block.
  • the neighboring block may include at least one of blocks adjacent to the top, bottom, left, right, or corner of the current block.
  • an MPM candidate may be derived based on the intra prediction mode of the upper neighboring block and the intra prediction mode of the left neighboring block.
  • the upper neighboring block may include the upper neighboring sample at the predefined position where the value of the y coordinate is smaller than the top row of the current block. The predefined position may be (0, -1), (W / 2, -1), (W-1, -1) or (W, -1).
  • the left neighboring block may include a left neighboring sample at a predefined position where the value of the x-coordinate is smaller than the leftmost column of the current block.
  • the predefined position may be (-1, 0), (-1, H / 2), (-1, H-1) or (-1, H).
  • H represents the height of the current block. If the neighboring block is encoded by inter prediction, the MPM candidate may be included using the intra prediction mode of the collocated block of the neighboring block or the current block.
  • the number of Most Probable Mode (MPM) candidates included in the candidate list may be three, four, five, six, or more.
  • the maximum number of MPM candidates may be a fixed value preset in the image encoder / decoder. Alternatively, the maximum number of MPM candidates may be determined based on the attributes of the current block. The attributes include the location / size / type of the current block, the number / type of intra prediction modes available for the current block, the color type (luma / chroma) of the current block, the color difference format of the current block, and the current block in a plurality of subblocks It may include at least one of whether or not divided into. Alternatively, information indicating the maximum number of MPM candidates may be signaled through the bitstream. Information representing the maximum number may be signaled at least one of a sequence level, a picture level, a slice level, or a block level.
  • the intra prediction mode of the neighboring block, the directional intra prediction mode similar to the neighboring block, or the default mode may be set as the MPM candidate.
  • the directional intra prediction mode similar to the neighboring block may be derived by adding or subtracting a value predefined in the intra prediction mode of the neighboring block.
  • the predefined value may be an integer of 1, 2 or more.
  • the predefined value may be adaptively determined according to the number of available intra prediction modes. For example, when the number of available intra prediction modes is 35, the predefined value may be set to 1, and when the number of available intra prediction modes is 67, the predefined value may be set to 2. Furthermore, when the number of available intra prediction modes is 131, the predefined value may be set to four.
  • both the intra prediction mode of the first neighboring block and the intra prediction mode of the second neighboring block are both directional prediction modes, based on the maximum value of the intra prediction mode of the first neighboring block and the intra prediction mode of the second neighboring block, a similar value is obtained.
  • Directional intra prediction mode can be derived.
  • the default mode may include at least one of a DC mode, a planner mode, a horizontal prediction mode, a vertical prediction mode, a right upper diagonal mode, a lower left diagonal mode, or a left upper diagonal mode.
  • a default mode different from the MPM candidate previously inserted into the MPM candidate list may be inserted into the MPM candidate list.
  • the number, types, or priorities of the default modes may be different depending on at least one of a reference sample line index of the current block, whether or not an intra prediction technique in units of sub blocks is applied to the current block, or a partition type of the current block.
  • the MPM candidate index may be determined according to a predefined order. For example, when the intra prediction mode of the left neighboring block and the intra prediction mode of the upper neighboring block are different, the intra prediction mode of the left neighboring block may have an index value smaller than that of the upper neighboring block.
  • the MPM candidate index may be determined. For example, when the current block is a non-square having a height greater than the width, the intra prediction mode of the upper neighboring block may have an index value smaller than the intra prediction mode of the left neighboring block. When the current block is non-square having a width greater than the height, the intra prediction mode of the left neighboring block may have an index value smaller than the intra prediction mode of the top neighboring block.
  • N predefined intra prediction modes may be used as the MPM candidate. If the intra prediction mode of the neighboring block is different from the N predefined intra prediction modes, convert the intra prediction mode of the neighboring block to one of the N predefined intra prediction modes, and convert the transformed intra prediction mode into the MPM candidate. Can be set.
  • a pre-defined table may be used for the transformation of the intra prediction mode, and a scaling operation based on a predetermined value may be used.
  • the pre-defined table may define a mapping relationship between intra prediction modes.
  • the neighboring blocks are encoded in non-extended intra mode (i.e. 35 available intra prediction modes) and the current block is encoded in extended intra mode (i.e. 67 available intra prediction modes).
  • the intra prediction mode index of the neighboring block may be converted into the intra prediction mode index under the extended intra mode. For example, when the intra prediction mode of the left neighboring block is 10 (horizontal mode), it may be converted into an index 18 corresponding to the horizontal mode under the extended intra mode.
  • the intra prediction mode index of the neighboring block may be converted into the intra prediction mode index under the non-extended intra mode.
  • the intra prediction mode index of the upper neighboring block is 50 (vertical mode)
  • it may be converted into the index 26 corresponding to the vertical mode under the non-expanded intra mode.
  • the candidate list may be set not to include the DC mode and / or the planner mode.
  • the predefined value may be an integer of 1 or more.
  • the current candidate list may be set not to include the DC mode and / or the planner mode.
  • the candidate list may include a default mode. In this case, the number or type of default modes may be different according to the division type of the current block.
  • Information indicating whether the same MPM candidate as the intra prediction mode of the current block is included in the candidate list may be signaled through the bitstream.
  • the MPM flag may be signaled through the bitstream.
  • a value of 0 for the MPM flag indicates that the same MPM candidate as the intra prediction mode of the current block is not included in the candidate list.
  • a value of 1 for the MPM flag indicates that the same MPM candidate as the intra prediction mode of the current block is included in the candidate list.
  • index information specifying one of the MPM candidates included in the candidate list may be signaled through the bitstream.
  • the MPM candidate specified by the index information may be set to the intra prediction mode of the current block.
  • residual mode information may be signaled through the bitstream.
  • the residual mode information is used to specify any one of the residual intra prediction modes except for the MPM candidates included in the candidate list.
  • the intra prediction mode of the current block may be determined using the residual mode information. If the MPM flag indicates that the same MPM candidate as the intra prediction mode of the current block does not exist, the MPM candidates may be rearranged in ascending order. Thereafter, the mode value indicated by the residual mode information may be sequentially compared with the rearranged MPM candidates to derive the intra prediction mode of the current block.
  • the updated mode value may be determined as the intra prediction mode of the current block.
  • the intra prediction mode of the current block may be set to the MPM candidate indicated by the index information.
  • the candidate list may be set not to include the DC mode and / or the planner mode. Accordingly, if the reference sample line index is greater than or equal to a predefined value, the DC mode and / or planner mode may not be available for the current block.
  • the default mode may include at least one of DC, planner, horizontal mode, vertical mode, or diagonal mode.
  • a default mode flag indicating whether the intra prediction mode of the current block is the same as the default mode may be signaled through the bitstream.
  • the default mode flag is a flag indicating whether the intra prediction mode of the current block is a planner mode, a flag indicating whether the intra prediction mode of the current block is a DC mode, or indicating whether the intra prediction mode of the current block is a vertical direction mode.
  • a flag, a flag indicating whether the intra prediction mode of the current block is the horizontal direction mode, or a flag indicating whether the intra prediction mode of the current block is the diagonal direction mode may be included.
  • is_planar_not_flag may be signaled through the bitstream.
  • a value of 0 indicates that the intra prediction mode of the current block is a planner mode.
  • a value of 1 for the flag indicates that the intra prediction mode of the current block is not the planner mode.
  • the default mode flag may be signaled when the MPM flag indicates that the same MPM candidate as the intra prediction mode of the current block exists.
  • the MPM candidate specified by the index information may be set as the intra prediction mode of the current block.
  • the plurality of sub blocks may share an intra prediction mode of the current block.
  • the intra prediction mode may be determined for each subblock.
  • the information and / or residual mode may be encoded / decoded for each sub block.
  • information indicating whether the intra prediction mode of the subblock is the same as the subblock in which the previous encoding / decoding is completed may be signaled through the bitstream.
  • the intra prediction mode of the current subblock may be derived by adding / subtracting an offset to an intra prediction mode of a subblock in which previous encoding / decoding is completed.
  • the intra prediction mode of the current block may be set to an MPM candidate indicated by index information.
  • the plurality of sub blocks may share the intra prediction mode of the current block.
  • Intra prediction modes of each of the luminance component and the chrominance component may be independently determined.
  • the intra prediction mode of the color difference component may be determined depending on the intra prediction mode of the luminance component.
  • the intra prediction mode of the chrominance component may be determined based on the intra prediction mode of the luminance component, as shown in Table 1 below.
  • intra_chroma_pred_mode means information signaled to specify an intra prediction mode of a chrominance component
  • IntraPredModeY represents an intra prediction mode of a luminance component
  • a reference sample for the current block may be derived (S1130). For example, when the N th reference sample line is selected through step S1110, the upper reference sample and P (-N, -N) from P (-N, -N) to P (2W + N-1, -N) Can be derived from P (-N, 2H + N-1).
  • the reference sample may be derived from a reconstructed sample in which encoding / decoding is completed before the current block.
  • the reconstructed sample may mean a state before the in-loop filter or a state after the in-loop filter is applied.
  • any intra filter can be applied to the reference samples. Filtering reference samples using an intra filter may be referred to as reference sample smoothing.
  • the intra filter may include at least one of a first intra filter applied in a horizontal direction or a second intra filter applied in a vertical direction. Depending on the position of the reference sample, either the first intra filter or the second intra filter may be selectively applied. Alternatively, two intra filters may be applied to one reference sample in duplicate. At least one filter coefficient of the first intra filter or the second intra filter may be (1, 2, 1), but is not limited thereto.
  • the filtering may be adaptively performed based on at least one of the intra prediction mode of the current block or the size of the transform block for the current block. For example, filtering may not be performed when the intra prediction mode of the current block is a DC mode, a vertical mode, or a horizontal mode.
  • the size of the transform block is NxM, filtering may not be performed.
  • N and M may be the same or different values, and may be any one of 4, 8, 16, or more values.
  • filtering may not be performed.
  • whether to perform filtering may be determined based on a comparison result between a difference between the intra prediction mode and the vertical mode (or the horizontal mode) of the current block and a pre-defined threshold. For example, filtering may be performed only when the difference between the intra prediction mode and the vertical mode of the current block is larger than the threshold.
  • the threshold may be defined for each transform block size as shown in Table 2.
  • the intra filter may be determined as one of a plurality of intra filter candidates pre-defined in the image encoder / decoder. To this end, a separate index for specifying an intra filter of the current block among the plurality of intra filter candidates may be signaled. Alternatively, the intra filter may be determined based on at least one of the size / shape of the current block, the size / shape of the transform block, the information about the filter strength, or the variation of surrounding samples.
  • intra prediction may be performed using an intra prediction mode and a reference sample of the current block (S1140).
  • the prediction sample may be obtained using the intra prediction mode and the reference sample of the current block.
  • a prediction sample may be obtained based on a weighted sum operation or an average operation of reference samples belonging to different reference sample lines.
  • the prediction sample may be derived based on a weighted sum operation of the first reference sample belonging to the first reference sample line and the second reference sample belonging to the second reference sample line.
  • the weights applied to the first reference sample and the second reference sample may have the same value.
  • the weight applied to each reference sample may be determined based on the distance between the predicted sample reference samples. For example, a weight applied to a reference sample having a close distance to a prediction target sample among the first reference sample and the second reference sample may have a value greater than a weight applied to another reference sample.
  • the process may further include a correction process for the prediction sample generated through the above-described prediction process, which will be described below in detail with reference to FIG. 13.
  • the correction process to be described later is not limited to being applied only to the intra prediction sample, but may also be applied to the inter prediction sample or the reconstruction sample.
  • FIG. 13 illustrates a method of correcting a prediction sample of a current block based on difference information of neighboring samples, according to an embodiment to which the present invention is applied.
  • the prediction sample of the current block may be corrected based on difference information of a plurality of neighboring samples for the current block.
  • the correction may be performed on all prediction samples belonging to the current block, or may be performed only on prediction samples belonging to a predetermined partial region.
  • Some areas may be one row / column or a plurality of rows / columns, which may be pre-configured areas for correction in the image encoder / decoder. For example, correction may be performed on one row / column positioned at the boundary of the current block or a plurality of rows / columns from the boundary of the current block.
  • some regions may be variably determined based on at least one of the size / shape of the current block or the intra prediction mode.
  • the neighboring samples may belong to at least one of the neighboring blocks located at the top, left, and top left corners of the current block.
  • the number of peripheral samples used for the calibration may be two, three, four or more.
  • the position of the neighboring samples may be variably determined according to the position of the prediction sample to be corrected in the current block. Alternatively, some of the surrounding samples may have a fixed position regardless of the position of the prediction sample to be corrected, and others may have a variable position according to the position of the prediction sample to be corrected.
  • the difference information of the neighboring samples may mean a difference sample between the neighboring samples, or may mean a value obtained by scaling the difference sample to a predetermined constant value (for example, 1, 2, 3, etc.).
  • a predetermined constant value for example, 1, 2, 3, etc.
  • the predetermined constant value may be determined in consideration of the position of the prediction sample to be corrected, the position of the column or row to which the prediction sample to be corrected belongs, and the position of the prediction sample within the column or row.
  • the intra prediction mode of the current block is the vertical mode
  • the difference sample between the peripheral sample p (-1, y) adjacent to the left boundary of the current block and the upper left peripheral sample p (-1, -1) is used.
  • Equation 1 a final prediction sample may be obtained.
  • the intra prediction mode of the current block is the horizontal mode
  • the difference sample between the neighboring sample p (x, -1) and the upper left neighboring sample p (-1, -1) adjacent to the upper boundary of the current block is used.
  • Equation 2 a final prediction sample may be obtained.
  • the difference sample between the peripheral sample p (-1, y) adjacent to the left boundary of the current block and the upper left peripheral sample p (-1, -1) is used.
  • the final prediction sample can be obtained.
  • the difference sample may be added to the prediction sample, and the difference sample may be scaled to a predetermined constant value and then added to the prediction sample.
  • the predetermined constant value used for scaling may be determined differently depending on the column and / or the row.
  • the prediction sample may be corrected as in Equations 3 and 4 below.
  • the intra prediction mode of the current block is the horizontal mode
  • the difference sample between the neighboring sample p (x, -1) and the upper left neighboring sample p (-1, -1) adjacent to the upper boundary of the current block is used.
  • the final prediction sample can be obtained, as described above in the vertical mode.
  • the prediction sample may be corrected as in Equations 5 and 6 below.
  • intra prediction of the current block may be performed based on the directionality of the directional prediction mode.
  • Table 3 shows an intra direction parameter intraPredAng from Mode 2 to Mode 34, which is the directional intra prediction mode illustrated in FIG. 9.
  • predModeIntra One 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 intraPredAng - 32 26 21 17 13 9 5 2 0 -2 -5 -9 -13 -17 -21 predModeIntra 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 intraPredAng -32 -26 -21 -17 -13 -9 -5 -2 0 2 5 9 13 17 21 26
  • An intra direction parameter for the current block may be determined based on a lookup table that defines a mapping relationship between the directional intra prediction mode and the intra direction parameter.
  • an intra direction parameter for the current block may be determined based on the information signaled through the bitstream.
  • Intra prediction of the current block may be performed using at least one of a left reference sample or a top reference sample, depending on the directionality of the directional intra prediction mode.
  • the top reference sample is a reference sample (eg, (-1, -1) to (2W-1,-) having y-axis coordinates smaller than the predicted sample (x, 0) included in the top row in the current block. 1)
  • the left reference sample includes reference samples (for example, (-1, -1) to (x, -1) with x-axis coordinates smaller than the predicted sample (0, y) included in the leftmost column in the current block. -1, 2H-1)).
  • reference samples of the current block may be arranged in one dimension. Specifically, when both the top reference sample and the left reference sample should be used for intra prediction of the current block, it is assumed that they are arranged in a line along the vertical or horizontal direction, and reference samples of each prediction target sample may be selected. .
  • the upper reference samples and the left reference samples may be rearranged along the horizontal or vertical direction to be one-dimensional.
  • the reference sample group P_ref_1D may be configured.
  • FIG. 14 and 15 illustrate a one-dimensional reference sample group in which reference samples are rearranged in a line.
  • Whether to rearrange the reference samples in the vertical direction or in the horizontal direction may be determined according to the directionality of the intra prediction mode. As an example, if the intra prediction mode is towards the left (eg, the index of the intra prediction mode is between 11 and 18 of the example shown in FIG. 9), as in the example shown in FIG. 14, the top reference samples of the current block are halved.
  • the clockwise rotation may generate a one-dimensional reference sample group in which the left reference samples and the top reference samples are arranged in the vertical direction.
  • the left reference samples of the current block are left referenced.
  • the samples can be rotated clockwise to create a one-dimensional reference sample group in which the left reference samples and the top reference samples are arranged in the horizontal direction.
  • intra prediction for the current block may be performed using only left reference samples or top reference samples. Accordingly, for the intra prediction modes in which the intra direction parameter is not negative, the one-dimensional reference sample group may be configured using only the left reference sample or the top reference samples.
  • a reference sample determination index iIdx for specifying at least one reference sample used to predict the sample to be predicted may be derived.
  • a weight related parameter i fact used to determine a weight applied to each reference sample based on the intra direction parameter may be derived.
  • Equation 7 shows an example of deriving a reference sample determination index and a weight related parameter.
  • iIdx and i fact are variably determined according to the slope of the directional intra prediction mode.
  • the reference sample specified by iIdx may correspond to an integer pel.
  • At least one reference sample may be specified for each prediction sample.
  • the position of the reference sample in the one-dimensional reference sample group for predicting the sample to be predicted in the current block may be specified based on the reference sample determination index.
  • a prediction image ie, a prediction sample for the prediction target sample may be generated.
  • a prediction image for the prediction target sample may be generated based on one or a plurality of reference samples.
  • the reference sample of the integer pel position By copying or scaling the reference sample in consideration of the position between the reference sample and the predicted sample of the integer pel position, it is possible to generate a prediction image for the predicted sample.
  • the imaginary angle line may mean a unidirectional / bidirectional extended line along the angle of the intra prediction mode or the slope of the intra prediction mode of the current block.
  • Equation 8 below copies the reference sample P_ref_1D (x + iIdx + 1) specified by the intra prediction mode of the current block, and predicts an image P (x, An example of generating y) is shown.
  • the predicted image of the predicted sample may be obtained using the plurality of reference samples.
  • a prediction image for the prediction target sample may be generated by linear interpolation between a reference sample adjacent to a position at which the virtual angle line passes and at least one neighboring reference sample adjacent to the reference sample.
  • the prediction image for the prediction target sample may be obtained by performing tap filter based interpolation on the reference sample and the at least one neighboring reference sample.
  • the number of taps of the interpolation filter may be two or more natural numbers. Specifically, the number of taps of the tap filter may be an integer of 2, 3, 4, 5, 6, or more, depending on the number of reference samples to be interpolated.
  • a prediction image for the prediction target sample may be generated using at least one neighbor reference sample.
  • the neighbor reference sample may include at least one of reference samples adjacent to the left / right or up / down of the reference sample.
  • Equation 9 illustrates an example of generating a prediction sample P (x, y) for a sample to be predicted by interpolating two or more reference samples.
  • the coefficient of the interpolation filter may be determined based on the weight related parameter i fact .
  • the coefficient of the interpolation filter may be determined based on the distance between the fractional pel and the integer pel (ie, the integer position of each reference sample) located on the angular line.
  • Equation 10 illustrates a case where the tap number of the tap filter is four.
  • the value of the corresponding reference sample may be replaced with a predefined value or the value of a neighboring reference sample.
  • the value of the reference sample at the position is defined as a predefined value or the value of the adjacent reference sample (eg, P_ref_1D (x +). iIdx)).
  • the value of the reference sample at the position may be defined as a predefined value, a value of a previously calculated or adjacent reference sample (eg, P_ref). (x + iIdx + 1)).
  • the predefined value may be an integer including 0.
  • the calculated value may be a value determined by bit depth.
  • a predefined value may be calculated based on an average value, minimum value, or maximum value of at least one or more reference samples.
  • the multi tap filter may be straight.
  • a straight multi-tap filter using a plurality of reference samples consecutive in the horizontal or vertical direction may be applied.
  • the multi-tap filter may have a polygonal shape such as square or cross shape.
  • a cross-shaped multi-tap filter using a reference sample and reference samples adjacent to all sides of the reference sample may be used.
  • the shape of the multi-tap filter may be variably determined based on the size, shape, or intra prediction mode of the current block.
  • generating a prediction sample by interpolating a reference sample using the directionality of intra prediction may be referred to as an intra prediction sample interpolation technique.
  • the type of tap filter may be adaptively determined according to the size, shape, or intra prediction mode of the current block.
  • the type of tap filter may be defined by at least one of the number of taps, filter coefficients, filter strength (strong / weak), filtering direction, and filter type.
  • the number of filter taps or the filter coefficient may be variably determined according to the filter strength.
  • an application direction of the tap filter such as horizontal interpolation, vertical interpolation, or horizontal and vertical interpolation, may be determined.
  • the application direction of the tap filter may be variably set in units of lines (rows or columns) or samples in the current block.
  • the type of tap filter to be used may be determined based on the width or height of the current block.
  • an intra prediction sample interpolation technique may be performed using a 2-tap filter instead of a 4-tap filter.
  • the intra prediction sample interpolation technique may be performed using the 4-tap filter.
  • the predefined value may represent a value such as 4, 8, or 16.
  • the type of tap filter to be used may be determined according to whether the width and height of the current block are the same. For example, when the width and height of the current block are different values, the intra prediction sample interpolation technique may be performed using the 2-tap filter instead of the 4-tap filter. On the other hand, when the width and height of the current block have the same value, the intra prediction sample interpolation technique may be performed using the 4-tap filter.
  • the type of tap filter to be used may be determined according to the ratio of the width and the height of the current block. For example, if the ratio of the width (w) to the height (h) of the current block (ie, w / h or h / w) is less than the predefined threshold, use 2-tap filter instead of 4-tap filter to predict intra Sample interpolation techniques can be performed. On the other hand, if the ratio of the width and height of the current block is greater than or equal to a predefined threshold value, the intra prediction sample interpolation technique may be performed using a 4-tap filter.
  • the type of tap filter may be determined according to the intra prediction mode, the shape, or the size of the current block. For example, when the current block is a 2x16 type coding unit and the intra prediction mode of the current block is an intra prediction mode belonging to a horizontal range, the intra prediction sample interpolation technique may be performed using a tap filter having n taps. . On the other hand, when the current block is a 2x16 type coding unit and the intra prediction mode of the current block is an intra prediction mode belonging to a vertical direction range, the intra prediction sample interpolation technique may be performed using a tap filter having a tap number m.
  • the intra prediction sample interpolation technique may be performed using a tap filter having n taps.
  • the intra prediction sample interpolation technique may be performed using a tap filter having a tap number m.
  • the horizontal range may indicate a predetermined range including the intra prediction mode in the horizontal direction
  • the vertical range may indicate a predetermined range including the intra prediction mode in the vertical direction.
  • the horizontal direction range may indicate an intra prediction mode between modes 11 and 18, and the vertical direction range may indicate an intra prediction mode between modes 19 and 27.
  • n and m are constants greater than zero, and n and m may have different values.
  • n and m may be set to have the same value, but at least one of filter coefficients or filter intensities of the n tap filter and the m tap filter may be set differently.
  • the prediction image may be obtained by weighted prediction of the first prediction image in the horizontal direction and the second prediction image in the vertical direction.
  • the first prediction image may be generated based on reference samples placed in a horizontal direction with the prediction target sample.
  • the first prediction image may be generated based on a weighted sum of reference samples placed in a horizontal direction of a sample to be predicted.
  • a weight applied to each reference sample may be determined based on at least one of a distance from the prediction target sample or a size of the current block.
  • the reference samples positioned in the horizontal direction of the predicted sample may include a left reference sample having the same y coordinate as the predicted sample and a right reference sample having the same y coordinate as the predicted sample.
  • the right reference sample may be derived from the top reference sample of the current block.
  • the right reference sample may be derived by copying a value of the top reference sample that lies on the same vertical line as the right reference sample.
  • the right reference sample may be derived as a weighted sum or average value of the plurality of top reference samples.
  • the upper reference sample lying on the same vertical line as the right reference sample may include a reference sample adjacent to the upper right corner of the current block.
  • the reference sample adjacent to the upper right corner may have the same x coordinate as the right reference sample.
  • the position of the upper reference sample used to derive the right reference sample may be variably determined according to the shape, size of the current block, or the position of the sample to be predicted.
  • the second prediction image may be generated based on reference samples placed in a vertical direction of the sample to be predicted.
  • the second prediction image may be generated based on a weighted sum of reference samples placed in a vertical direction of the sample to be predicted.
  • the weight applied to each reference sample may be determined in consideration of the distance to the prediction target sample or the size of the current block.
  • Reference samples placed in the vertical direction of the predicted sample may include an upper reference sample having the same x coordinate as the predicted sample and a lower reference sample having the same x coordinate as the predicted sample.
  • the bottom reference sample may be derived from the left reference sample of the current block.
  • the lower reference sample may be derived by copying a value of the left reference sample that is placed on the same horizontal line as the lower reference sample.
  • the bottom reference sample may be derived as a weighted sum or average value of the plurality of left reference samples.
  • the left reference sample lying on the same horizontal line as the bottom reference sample may include a reference sample adjacent to the lower left corner of the current block.
  • the reference sample adjacent to the lower left corner may have the same y coordinate as the lower reference sample.
  • the position of the upper reference sample used to derive the lower reference sample may be variably determined according to the size, shape of the current block, or the position of the sample to be predicted.
  • At least one of the right reference sample or the bottom reference sample may be derived using both the left reference sample and the top reference sample.
  • the weighted sum or average of the upper reference sample and the left reference sample of the current block may be determined as at least one value of the right reference sample or the lower reference sample.
  • the lower left reference sample and the upper right reference sample are used to derive the lower right reference sample adjacent to the lower right corner of the current block, and then the right and lower reference samples are derived using the derived lower right reference sample.
  • the lower right reference sample may be derived based on a weighted sum or average of the upper right and left reference samples of the current block. In this case, the weights applied to the upper right reference sample and the left reference sample may have the same value or may be determined based on the width / height of the current block.
  • the coefficient of the interpolation filter may be determined based on the size of the current block, the shape of the current block, the distance to the lower right reference sample, the distance to the upper right reference sample, or the distance to the lower left reference sample.
  • a reference sample of a fixed position may be used, or a reference sample that is adaptively selected according to the position of the predicted sample may be used.
  • the right reference sample may be derived using the upper right reference sample irrespective of the position of the predicted sample, or may have a left reference sample (eg, the same y-axis coordinate as the predicted sample) selected according to the position of the predicted sample.
  • Reference sample or a top reference sample (eg, a reference sample having the same x-axis coordinates as the sample to be predicted).
  • the lower reference sample may be derived using the lower left reference sample regardless of the position of the predicted sample, or the left reference sample (eg, a reference having the same y axis coordinates as the predicted sample) may be selected according to the position of the predicted sample. Sample) or a top reference sample (eg, a reference sample having the same x axis coordinates as the sample to be predicted).
  • 16 is a diagram illustrating an example of deriving a right reference sample or a bottom reference sample using a plurality of reference samples. Assume that the current block is a block having a size of WxH.
  • the lower right reference sample is based on a weighted sum or average value of the upper right reference sample P (W, -1) and the lower left sample P (-1, H) of the current block.
  • P (W, H) can be generated.
  • weights applied to the upper right reference sample and the left reference sample may be equally set or determined based on the width W and the height H of the current block. For example, when the current block is non-square, the weight applied to the upper right reference sample may be determined as W / (W + H), and the weight applied to the lower left reference sample may be determined as H / (W + H). have.
  • a right reference sample P (W, y) for the target prediction sample (x, y) is generated.
  • the right prediction sample P (W, y) may be calculated as a weighted sum or average value of the lower right reference sample P (W, H) and the upper right reference sample P (W, -1).
  • a lower reference sample P (x, H) for the target prediction sample (x, y) may be generated based on the lower right reference sample P (W, H) and the lower left reference sample P (-1, H). have.
  • the lower reference sample P (x, H) may be calculated as a weighted sum or average value of the lower right reference sample P (W, H) and the left reference sample P (-1, H).
  • the first prediction sample P h (x, y) and the second prediction sample for the prediction target sample are generated using the generated reference sample.
  • the prediction sample P v (x, y) may be generated.
  • the first prediction sample P h (x, y) is generated based on the weighted sum of the left reference sample P (-1, y) and the right reference sample P (W, y)
  • the second prediction sample P v ( x, y) may be generated based on the weighted sum of the top reference sample P (x, -1) and the bottom reference sample P (x, H).
  • 17 and 18 are diagrams for explaining determining a right reference sample and a bottom reference sample for a non-square block according to an embodiment of the present invention.
  • a right reference sample is derived based on the upper right reference sample P (N / 2, -1).
  • the lower reference sample may be derived based on the lower left reference sample P (-1, N).
  • the right reference sample or the bottom reference sample based on at least one of the weighted sum, the average, the minimum value, or the maximum value of the upper right reference sample P (N / 2, -1) and the lower left reference sample P (-1, N).
  • the right reference sample based on the weighted sum or mean of P (N / 2, -1) and P (-1, N), or P (N / 2, -1) and P (-1, N).
  • the lower right reference sample P (N / 2, N) may be derived based on the following, and then the right reference sample may be derived by interpolating the lower right reference sample and the upper right reference sample.
  • the lower right reference sample P (N / 2, N) may be derived based on the following reference, and then the lower reference sample may be derived by interpolating the lower right reference sample and the lower left reference sample.
  • the right reference sample is derived based on the upper right reference sample P (N, -1). Based on the lower left reference sample P (-1, N / 2), the lower reference sample may be derived.
  • the right reference sample or the bottom reference sample based on at least one of the weighted sum, the average, the minimum value, or the maximum value of the upper left reference sample P (N, -1) and the lower left reference sample P (-1, N / 2).
  • the right reference sample may be derived based on D), and then the right reference sample may be derived by interpolating the lower right reference sample and the upper right reference sample.
  • the lower right reference sample P (N, N / 2) may be derived based on the following, and then the lower reference sample may be derived by interpolating the lower right reference sample and the lower left reference sample.
  • the lower reference sample is one of the lower left reference sample of the current block lying on the same horizontal line as the lower reference sample or the upper right reference sample of the current block lying on the same vertical line as the right reference sample.
  • the right reference sample is derived based on at least one, and the right reference sample includes at least one of the upper right reference sample of the current block lying on the same vertical line as the right reference sample or the lower left reference sample of the current block lying on the same horizontal line as the lower reference sample. It was described as being derived from the base.
  • a right reference sample may be derived or a left reference sample may be derived based on at least one of an upper middle reference sample or a left middle reference sample.
  • the lower middle sample may be derived using the upper middle sample and the lower left reference sample, and then the lower samples may be generated through interpolation or extrapolation of the lower middle sample and the lower left sample.
  • the left middle sample and the right upper sample may be used to derive the right middle sample, and lower samples may be generated by interpolation or extrapolation of the right middle sample and the upper right sample.
  • the locations of the reference samples used to generate the first prediction image and the second prediction image may be differently determined according to the size or shape of the current block. For example, depending on the size or shape of the current block, the position of the top reference sample or the left reference sample used to derive the right reference sample or the bottom reference sample may be determined differently.
  • the right reference sample is derived based on the upper right reference sample P (N, -1), while the lower reference sample is the lower left reference sample P (-1). , N).
  • the current block is a square block of size NxN
  • at least one of the weighted sum, the average, the minimum value, or the maximum value of the upper right reference sample P (N, -1) and the lower left reference sample P (-1, N) is obtained.
  • the right reference sample and the bottom reference sample may be derived on the basis.
  • the current block is an Nx2 / N sized non-square block, it is based on the upper abort reference sample P (N / 2, -1) and the lower left reference sample P (-1, N / 2), and the lower abort
  • the reference sample P (N / 2, N / 2) can be derived and the bottom reference samples can be derived based on the derived lower interrupted reference sample.
  • the lower reference samples may be derived through interpolation or extrapolation of the lower middle reference sample and the lower left reference sample.
  • the right stop The reference sample P (N / 2, N / 2) can be derived and the right reference samples can be derived based on the derived right stop reference sample.
  • the right reference samples may be derived through interpolation or extrapolation of the right middle reference sample and the upper right reference sample.
  • the first prediction image may be calculated based on weighted prediction of reference samples placed on the same horizontal line as the prediction target sample. Also, the second prediction image may be calculated based on weighted prediction of reference samples placed on the same vertical line as the sample to be predicted.
  • the first prediction image or the second prediction image may be generated using an average value, a minimum value, or a maximum value of the reference samples.
  • a method of deriving a reference sample differently or a method of deriving a first predicted image or a second predicted image Can be set differently.
  • the number of reference samples or the position of the reference sample used to use the right or lower reference sample is differently determined, or used to derive the first prediction image or the second prediction image.
  • the weight or the number of reference samples may be set differently.
  • the right reference sample used when generating the first predictive image of the predicted samples included in the predetermined region is derived using only the upper reference sample, and the first predicted image of the predicted samples included outside the predetermined region.
  • the right reference sample used when generating the P may be derived based on a weighted sum or average of the top reference sample and the left reference sample.
  • the right reference sample of the predicted sample at the position (x, y) included in a predetermined area within the current block is P.
  • the right reference sample of the predicted sample included in the predetermined region may be generated by copying a value of the P (N / 2, -1) reference sample.
  • the right reference sample of the predicted sample at the (x ', y') position included outside a predetermined area in the current block has a weighted sum or average value of P (N / 2, -1) and P (-1, N).
  • the right reference sample of the predicted sample included outside the predetermined region is the lower right reference sample P (N / 2, N) derived based on P (N / 2, -1) and P (-1, N). And interpolation of the upper right reference sample P (N / 2, -1).
  • the lower reference sample of the predicted sample at the position (x, y) included in the predetermined area of the current block is P.
  • P can be derived from (-1, N / 2).
  • the lower reference sample of the predicted sample included in the predetermined region may be generated by copying a value of the P (-1, N / 2) reference sample.
  • the lower reference sample of the predicted sample of the (x ', y') position included outside the predetermined area in the current block has a weighted sum or average value of P (N, -1) and P (-1, N / 2).
  • the lower target reference sample of the predicted sample included outside the predetermined region is the lower right reference sample P (N, N / 2) derived based on P (N, -1) and P (-1, N / 2). ) And the lower left reference sample P (-1, N / 2).
  • the predicted samples included in the predetermined region generate the first predicted image or the second predicted image based on the weighted sum of the reference samples, and the predicted samples outside the predetermined region are the average value and the minimum value of the reference samples.
  • the first prediction image or the second prediction image may be generated as the maximum value, or the first prediction image or the second prediction image may be generated using only one of the predefined positions among the reference samples. For example, as in the example illustrated in FIG. 17, when the current block is a non-square block whose height is greater than the width, the predicted sample at the position (x, y) included in a predetermined area in the current block is P (N).
  • the first prediction image may be generated using only one of a right reference sample P (N / 2, y) or a left reference sample at a P (-1, y) position derived from / 2, -1).
  • the sample to be predicted at the position (x ', y') not included in the predetermined region includes the right reference samples P (N / 2, y ') and P (derived from P (N / 2, -1).
  • the first prediction image may be generated based on a weighted sum or an average of the reference samples at the position of ⁇ 1, y ′).
  • the sample to be predicted at the position (x, y) included in the predetermined area in the current block is P (-1).
  • N / 2) may generate a second predictive image using only one of a lower reference sample P (x, N / 2) or an upper reference sample at a P (x, -1) position.
  • the predicted sample at the position (x ', y') that is not included in the predetermined region includes the lower reference samples P (x ', N / 2) and P (derived from P (-1, N / 2).
  • the second prediction image may be generated based on a weighted sum or an average of the reference samples at the position of ⁇ 1, y ′).
  • the predetermined region may be at least one sample line adjacent to the boundary of the current block or one of the remaining regions except for these.
  • the boundary of the current block may include at least one of a left boundary, a right boundary, an upper boundary, or a lower boundary.
  • the number or location of the boundaries used to define the predetermined area may be set differently according to the shape of the current block.
  • the predetermined area may be in the form of a block contacting one corner of the current block. In this case, the size and shape of the predetermined area may be determined based on at least one of the size or shape of the current block.
  • the final prediction image under the planner mode may be derived based on a weighted sum, an average, a minimum value, or a maximum value of the first prediction image and the second prediction image.
  • Equation 11 illustrates an example of generating a final predicted image P based on a weighted sum of the first predicted image P h and the second predicted image P v .
  • the prediction weight w may vary according to the shape, size of the current block, or the position of the sample to be predicted.
  • the prediction weight w may be derived in consideration of the width of the current block, the height of the current block, or the width-height ratio.
  • w may be set to give more weight to the first prediction image.
  • w may be set to give more weight to the second prediction image.
  • the prediction weight w when the current block is square, the prediction weight w may have a value of 1/2.
  • the prediction weight w if the current block is a non-square block whose height is greater than the width (e.g. (N / 2) xN), the prediction weight w is set to 1/4, and the current block is a non-square block whose width is greater than the height (e.g. , Nx (N / 2)), the prediction weight w may be set to 3/4.
  • intra prediction may be performed using reference samples other than the left reference sample and the top reference sample in the DC mode or the directional intra prediction mode.
  • the left reference sample and / or the top reference sample will be referred to as a first reference sample
  • the reference samples except for the left reference sample and the top reference sample will be referred to as a second reference sample.
  • the second reference sample may include a right reference sample and / or a bottom reference sample of the current block.
  • the lower reference samples mean reference samples having y-axis coordinates larger than the predicted sample of the lowermost row in the current block
  • the right reference sample has x-axis coordinates larger than the predicted sample of the rightmost column in the current block. Reference samples may be referred to.
  • Whether to perform intra prediction using the second reference sample may be determined based on at least one of a size, a shape, an intra prediction mode, or a position of a prediction target sample of the current block. For example, it may be determined whether to perform intra prediction using the second reference sample based on whether the intra prediction mode of the current block is the vertical mode, the horizontal mode, or the diagonal mode.
  • intra prediction may be performed on a prediction target sample included in a predetermined region of the current block by using a second reference sample, and a first reference sample may be used on a prediction target sample which is not included in a predetermined region of the current block. It may be set to perform intra prediction.
  • information indicating whether the second reference sample is used may be signaled through the bitstream.
  • the information may be a 1-bit flag or an index used to determine the intra prediction mode of the current block.
  • whether to use the second reference sample may be determined based on whether the second reference sample is used in the neighboring block of the current block.
  • the second reference sample may be generated based on the first reference sample. For example, the order of the first reference samples may be changed to configure the second reference samples, or the second reference sample may be derived using the first reference sample at a specific position.
  • 19 is a diagram for explaining an example of deriving a second reference sample using the first reference sample.
  • the lower right reference sample P (W, H) derived based on the upper right reference sample r (W, -1) and the lower left reference sample r (-1, H) of the current block may be derived.
  • the lower right reference sample may be derived through a weighted sum or average calculation of the upper right reference sample and the lower left reference sample. Equation 12 shows an example of deriving a lower right reference sample.
  • the lower right reference sample may be calculated based on a weighted sum between the upper right reference sample and the lower left reference sample.
  • a weight applied to the upper right reference sample and the lower left reference sample may be determined according to the width and height of the current block. For example, the same weight is applied to the upper right reference sample and the lower left reference sample when the current block is square, whereas different weights may be applied to the upper right reference sample and the lower left reference sample when the current block is non-square.
  • the weight setting method shown in Equation 12 is merely an example of the present invention, and the present invention is not limited thereto.
  • At least one of the size, shape, intra prediction mode of the current block, availability of the reference sample, availability of the neighboring block, whether the neighboring block is encoded in the intra prediction mode, or the intra prediction mode of the neighboring block may be determined based on this.
  • the right reference sample may be derived based on the upper right and lower right reference samples.
  • the right reference sample may be obtained by interpolating the upper right reference sample and the lower right reference sample. Equation 13 below shows an example of deriving a right reference sample.
  • the right reference sample P r (W, y) (where y is an integer between 0 and CU height (cu_height)) is the upper right reference sample r (W, -1) and the lower right corner. It can be obtained by weighted prediction of the reference sample P (W, H).
  • a weight applied to the upper right reference sample and the lower right reference sample may be determined based on at least one of the width, the height of the current block, or the position of the right reference sample. For example, as in the example shown in Equation 13, a weight of (H-1-y) / H is applied to the upper right reference sample, while a weight of (y + 1) / H is applied to the lower right reference sample. Can be.
  • the weight setting method shown in Equation 13 is only an example of the present invention, and the present invention is not limited thereto.
  • at least one of the size, shape, intra prediction mode of the current block, availability of the reference sample, availability of the neighboring block, whether the neighboring block is encoded in the intra prediction mode, or the intra prediction mode of the neighboring block The weight may be determined based on this.
  • the bottom reference sample may be derived based on the bottom left reference sample and the bottom right reference sample.
  • the lower reference sample may be obtained by interpolating a lower left reference sample and a lower right reference sample. Equation 14 shows an example of deriving a lower reference sample.
  • the lower reference sample P b (x, H) (where x is an integer between 0 and CU width) and the lower left reference sample r (-1, H) and the lower right It can be obtained by weighted prediction of the reference sample P (W, H).
  • a weight applied to the lower left reference sample and the lower right reference sample may be determined based on at least one of the width, the height of the current block, or the position of the lower reference sample. For example, as in the example shown in Equation 14, a weight of (W-1-x) / W is applied to the lower left reference sample, while a weight of (x + 1) / H is applied to the lower right reference sample. Can be.
  • the weight setting method shown in Equation 14 is merely an example of the present invention, and the present invention is not limited thereto.
  • at least one of the size, shape, intra prediction mode of the current block, availability of the reference sample, availability of the neighboring block, whether the neighboring block is encoded in the intra prediction mode, or the intra prediction mode of the neighboring block The weight may be determined based on this.
  • the right reference sample and the bottom reference sample may be derived based on the example described above with reference to FIGS. 17 and 18.
  • the second reference sample such as the right reference sample and the lower reference sample may be derived using the first reference samples of the fixed position such as the upper right reference sample and the lower left reference sample.
  • the second reference sample may be derived using the first reference sample at a position different from the upper right reference sample and / or the lower left reference sample.
  • a right reference sample and a bottom reference sample may be derived using a first reference sample, such as an upper middle reference sample of the current block or a left middle sample of the current block.
  • the first reference sample used to derive the second reference sample may be determined according to the intra prediction mode of the current block.
  • the right reference sample and / or the bottom reference sample may be derived based on the left reference sample and / or the top reference sample specified by the intra prediction mode directionality of the current block.
  • the second reference sample may be determined using the plurality of left reference samples and / or the plurality of top reference samples. For example, at least one of the right reference sample, the bottom reference sample, or the right bottom reference sample is generated based on the weighted sum, the average value, the maximum value, or the minimum value of the plurality of left reference samples, or the weighted sum, average value of the plurality of top reference samples. It may be generated based on the maximum value or the minimum value.
  • the second reference sample may be generated by copying the first reference sample.
  • the first reference sample used to generate the second reference sample may have a fixed position or may be adaptively determined according to the size, shape, intra prediction mode, or position of the second reference sample of the current block.
  • the lower reference sample may be derived up to the same vertical line as the rightmost top reference sample r (2W-1, -1), or the right reference sample up to the same horizontal line as the lowest left reference sample r (-1, 2H-1). Can be derived.
  • the lower reference sample having an x coordinate greater than W is generated by extrapolating the lower left reference sample and the lower right reference sample, or the lower right reference sample P (W, H) and the rightmost lower reference sample P (2W-1, Can be generated by interpolating H).
  • the rightmost bottom reference sample may be generated by copying the rightmost top reference sample r (2W-1, -1) or by a weighted sum operation between the rightmost top reference sample and the bottom left reference sample.
  • Right reference samples with y coordinates greater than H are generated by extrapolating the upper right and lower right reference samples, or the lower right reference samples P (W, H) and the lower right right reference samples P (W, 2H-1). Can be generated by interpolation.
  • the lowest right reference sample may be generated by copying the lowest left reference sample r (-1, 2H-1) or may be generated by a weighted sum operation between the lowest left reference sample and the upper left reference sample.
  • intra prediction may be performed on the current block, and second reference samples may be derived based on the prediction samples generated by the intra prediction.
  • the second reference samples may be derived based on a prediction sample based on a result of performing the intra prediction or a reconstruction sample based on the prediction sample.
  • the restored value may be a value before the in-loop filter is applied or a value after the in-loop filter is applied.
  • the prediction sample is used only for deriving second reference samples and may not be used as the actual prediction sample of the current block. That is, even if intra prediction is performed based on the predetermined intra prediction mode to derive second reference samples, the same prediction that is different from or different from the predetermined intra prediction mode is applied again, thereby actually predicting the current block. Samples can be obtained.
  • a final prediction sample of the current block may be obtained. It may be.
  • the final prediction sample may be obtained based on a weighted sum operation or an average operation between the prediction sample and the further prediction sample.
  • prediction samples used to derive second reference samples will be referred to as temporary prediction samples.
  • the predetermined intra prediction mode for obtaining the temporary prediction sample may include at least one of a planner mode, a DC mode, a horizontal direction mode, a vertical direction mode, or a diagonal direction mode.
  • 20 is a diagram illustrating an example of deriving a right reference sample and a bottom reference sample using a temporary prediction sample obtained based on a planner mode.
  • the temporary prediction sample for the prediction target sample may be generated using the first prediction sample and the second prediction sample for the prediction target sample.
  • the first prediction sample may be obtained using a reference sample located in the horizontal direction of the sample to be predicted.
  • the first prediction sample may be generated based on a weighted sum operation of a left reference sample having the same y-coordinate as the sample to be predicted and a reference sample adjacent to the upper right corner.
  • the second prediction sample may be obtained using a reference sample located in the vertical direction of the sample to be predicted.
  • the second prediction sample may be generated based on a weighted sum operation of the upper reference sample having the same x coordinate as the predicted sample and the reference sample adjacent to the lower left corner.
  • the second reference sample may be generated by copying a temporary prediction sample adjacent to the second reference sample.
  • the right reference sample may be generated by copying the temporary prediction sample located at the right boundary of the current block
  • the lower reference sample may be generated by copying the temporary prediction sample located at the bottom boundary of the current block.
  • the second reference sample may be derived by adding an offset to the temporary prediction sample adjacent to the second reference sample.
  • the right reference sample may be derived by adding an offset to a temporary prediction sample located at the right boundary of the current block
  • the bottom reference sample may be derived by adding an offset to the temporary prediction sample located at the bottom boundary of the current block.
  • the offset may be a difference value between the temporary prediction sample and a neighboring temporary prediction sample neighboring the temporary prediction sample.
  • the second reference sample may be generated based on interpolation of the plurality of temporary prediction samples, or based on a weighted sum operation or an average operation of the plurality of temporary prediction samples.
  • a right reference sample may be generated based on interpolation of a temporary prediction sample located at a right boundary of a current block and a neighboring temporary prediction sample neighboring the temporary prediction sample, or based on a weighted operation or an average operation of the temporary prediction samples.
  • the lower reference sample may be generated based on interpolation of the temporary prediction sample located at the bottom boundary of the current block and the neighboring temporary prediction sample neighboring the temporary prediction sample, or based on a weighted sum operation or an average operation of the temporary prediction samples.
  • the second reference sample may be derived based on a weighted sum operation or an average operation of the surrounding reference samples.
  • the right reference sample adjacent to the right boundary of the current block copies and derives the temporary reference sample located at the right boundary of the current block, and the bottom boundary sample adjacent to the bottom boundary of the current block is located at the bottom boundary of the current block.
  • the temporary reference sample located can be copied and derived.
  • a reference sample (eg, P (W, H)) adjacent to the lower right corner of the current block includes a neighboring right reference sample (eg, P (W, H-1)) and a neighboring bottom reference sample (eg, It can be derived based on the weighted sum operation or the average operation of P (W-1, H)).
  • the predetermined intra prediction mode for obtaining the temporary prediction sample may be predefined in the encoder and the decoder. Alternatively, information for determining a predetermined intra prediction mode may be signaled through the bitstream. Alternatively, the predetermined intra prediction mode may be determined based on the intra prediction mode used to obtain the actual prediction sample.
  • the first reference samples may be arranged in one dimension to generate a first one-dimensional reference sample group
  • the second reference samples may be arranged in one dimension to generate a second one-dimensional reference sample group.
  • the first one-dimensional reference sample group may consist of only the first reference samples
  • the second one-dimensional reference sample group may consist of only the second reference samples.
  • the first one-dimensional reference sample group is configured to include at least one or more of the second reference samples as well as the first reference samples
  • the second one-dimensional reference sample group is not only the second reference samples but also the first reference. It may be configured to include at least one of the samples.
  • 21 is a diagram illustrating reference samples constituting a one-dimensional reference sample group.
  • the first one-dimensional reference sample group may be composed of left reference samples and top reference samples of the current block.
  • the second one-dimensional reference sample group further includes some left reference samples and some top reference samples, as well as the right reference samples and the bottom reference samples of the current block. It can be configured to include.
  • the lower left reference sample r (-1, H) and the left reference samples having a larger y-axis coordinate than the lower left reference sample may be included in both the first one-dimensional reference sample group and the second one-dimensional reference sample group.
  • the upper reference samples r (W, -1) and the upper reference samples having larger x-axis coordinates than the upper right reference samples among the upper reference samples may be included in both the first one-dimensional reference sample group and the second one-dimensional reference sample group. have.
  • the partial first reference samples may be included in only the first one-dimensional reference sample group only, or the first partial reference sample group may be included only in the first one-dimensional reference sample group based on at least one of the size, shape, or intra prediction mode of the current block. You can also include them.
  • the arrangement order of the reference samples constituting the one-dimensional reference sample group may also be variably determined based on at least one of the size, shape, or intra prediction mode of the current block.
  • a reference sample group including a left reference sample and a top reference sample of the current block will be referred to as a first reference sample group (eg, a first one-dimensional reference sample group)
  • a reference sample group including a right reference sample and a bottom reference sample of the current block will be referred to as a second reference sample group (eg, a second one-dimensional reference sample group).
  • the first reference sample group and the second reference sample group may be classified according to whether the right reference sample and the bottom reference sample are included.
  • a reference sample selected from the first reference sample group is called a first reference sample
  • a reference sample selected from the second reference sample group is called a second reference sample. It will be called.
  • Intra prediction of the current block may be performed using at least one of the first reference sample group or the second reference sample group.
  • the prediction value of the prediction target sample in the current block may be obtained based on at least one of the first reference sample selected from the first reference sample group or the second reference sample selected from the second reference sample group.
  • the first reference object sample and / or the second reference object sample may be determined based on at least one of the shape, size, or intra prediction mode of the current block.
  • the intra prediction mode of the current block is determined, the first reference target sample for the prediction target sample is specified according to the determined intra prediction mode direction, and according to the reverse direction of the determined intra prediction mode, 2
  • the sample to be referred to can be specified.
  • the first reference sample and the second reference sample may be specified according to the direction of the determined intra prediction mode.
  • 22 and 23 illustrate positions of a first reference object sample and a second reference object sample.
  • FIG. 22 illustrates an example in which a reference sample placed in a direction indicated by the intra prediction mode of the current block is determined as a first reference object sample, and a reference sample placed in a direction opposite to the direction is determined as a second reference object sample.
  • a reference sample placed in the upper right diagonal direction from the prediction target sample among the reference samples included in the first reference sample group may be determined as the first reference target sample.
  • the reference sample placed in a direction opposite to the upper right diagonal direction (that is, the lower left diagonal direction) among the reference samples included in the second reference sample group may be determined as the second reference object sample.
  • FIG. 23 illustrates an example in which reference samples placed in a direction indicated by an intra prediction sample of a current block are determined as a first reference sample and a second reference sample, respectively.
  • the reference sample placed in the upper right direction of the predicted sample among the reference samples included in the first reference sample group is determined as the first reference sample group
  • the second reference sample group Among the reference samples included in the reference sample the reference sample placed in the upper right direction of the prediction target sample may be determined as the second reference target sample.
  • the upper reference sample is selected as the first reference sample
  • the right reference sample is selected as the second reference sample.
  • the reference sample placed in the lower left direction of the predicted sample among the reference samples included in the first reference sample group is determined as the first reference sample
  • the second reference Among the reference samples included in the sample group the reference sample placed in the lower left direction of the prediction target sample may be determined as the second reference sample.
  • the left reference sample is selected as the first reference sample
  • the lower reference sample is selected as the second reference sample.
  • the position of the second reference object sample may be determined based on the position of the first reference object sample, or the position of the first reference object sample may be determined based on the position of the second reference object sample.
  • the second reference object sample having the same x coordinate or the same y coordinate as the first reference object sample or the second reference object sample having an offset value added to the x coordinate or y coordinate of the first reference object sample You can also select.
  • the offset may have a fixed value or may be adaptively determined according to the size, shape, or intra prediction mode of the current block.
  • the position of the first reference object sample and / or the second reference object sample may be determined based on the position of the prediction target sample. For example, a first reference object sample and / or a second reference object sample having the same x coordinate or the same y coordinate as the predicted sample may be selected, or an agent having a value obtained by adding an offset to the x coordinate or the y coordinate of the predicted sample. One reference object sample and / or a second reference object sample may be selected.
  • the offset may have a fixed value or may be adaptively determined according to the size, shape, or intra prediction mode of the current block.
  • the prediction value of the prediction target sample may be generated based on at least one of the first prediction image based on the first reference sample or the second prediction image based on the second reference sample.
  • the first predictive image may be generated based on the above description through Equation 8 to Equation 10 described above.
  • the second prediction image may be generated by interpolating or copying the second reference sample specified according to the slope of the intra prediction mode of the current block.
  • Equation 15 is a diagram illustrating an example of inducing a second prediction image by copying a second reference sample.
  • Equation 15 P 2 (x, y) represents a second prediction image, and P_2nd_1D (x + iIdx + 1 + f) represents a second reference sample.
  • the second prediction image may be generated by interpolating the plurality of second reference objects.
  • the imaginary angle line according to the slope and / or angle of the intra prediction mode does not pass the integer pel (ie, the reference sample of the integer position)
  • the second reference adjacent to the left and right or up and down of the angle line The second predictive image may be obtained by interpolating the samples.
  • Equation 16 illustrates an example of obtaining a second prediction image by interpolating second reference samples.
  • the coefficient of the interpolation filter may be determined based on the weight related parameter i fact .
  • the coefficient of the interpolation filter may be determined based on the distance between the fractional pel and the integer pel (ie, the integer position of each reference sample) located on the angular line.
  • Equation 16 an interpolation filter having a tap number of 2 is illustrated, but an interpolation filter having a tap number greater than 2 may be used.
  • the final predicted image of the sample to be predicted may be acquired based on at least one of the first predicted image and the second predicted image.
  • the first prediction image may be determined as the final prediction image of the prediction target sample, or the second prediction image may be determined as the final prediction image of the prediction target sample.
  • the final predicted image of the sample to be predicted may be determined based on a weighted sum or averaging of the first predicted image and the second predicted image.
  • FIG. 24 illustrates an example of obtaining a prediction sample based on a weighted sum operation of a first reference object sample and a second reference object sample.
  • the prediction value of the prediction target sample may be obtained based on a weighted sum operation of the first prediction image and the second prediction image. In other words, the prediction value may be obtained based on a weighted sum operation of the first reference sample and the second reference sample.
  • Equation 17 shows an example of obtaining a final prediction sample based on a weighting operation of the first prediction image and the second prediction image.
  • Equation 17 P 1 (x, y) represents the first prediction image or the first reference object sample, and P 2 (x, y) represents the second prediction image or the second reference object sample.
  • w (x, y) represents a weight given to the first prediction image.
  • the weight applied to each of the predicted samples may be determined based on the position of the predicted samples. For example, Equation 18 below shows an example of determining the weight w.
  • Equation 18 x denotes the x-axis coordinate of the sample to be predicted, and y denotes the y-axis coordinate of the sample to be predicted.
  • N represents an L1 norm between the first reference sample and the second reference sample. For example, if the coordinate of the first reference sample is (x0, y0) and the coordinate of the second reference sample is (x1, y1), N is
  • the weights assigned to the first prediction image and the second prediction image may be determined based on at least one of a location of a prediction target sample, a size of a current block, a shape, or an intra prediction mode.
  • Equation 19 shows an example in which weights are determined according to the size of the current block and the position of the sample to be predicted.
  • Equation 19 W and H represent the width and height of the current block, respectively, and (x, y) represents the coordinates of the sample to be predicted.
  • the weight given to the first predictive image is set to be larger, and the sample to be closer to the lower right corner of the current block is greater
  • the weight given to the second prediction image may be set to be large.
  • the weight may be derived from a neighboring block of the current block.
  • the neighboring block of the current block may include at least one of an upper neighboring block, a left neighboring block, or a neighboring block adjacent to a corner (eg, an upper left neighboring block, an upper right neighboring block, or a lower left neighboring block) of the current block. have.
  • information for determining the weight may be signaled through the bitstream.
  • the information may indicate a weight value applied to the first prediction image or the second prediction image, or may indicate a weight difference value between the current block and the neighboring block.
  • the first prediction image may be set as the final prediction image in the first region of the current block
  • the second prediction image may be set as the final prediction in the second region of the current block.
  • the first area and the second area may be generated by dividing the current block based on a vertical line, a horizontal line, or a diagonal line.
  • the first region and the second region may be rectangular or triangular partitions generated by dividing the current block.
  • the prediction value of the position adjacent to the boundary between the first region and the second region may be obtained by weighted prediction of the first prediction image and the second prediction image.
  • the weights assigned to the first prediction image and the second prediction image may be determined based on at least one of the location of the prediction target sample, the size of the current block, the shape, or the intra prediction mode.
  • acquiring the final predicted image based on the plurality of predicted images may be referred to as bi-intra prediction.
  • Bidirectional intra prediction may be applied only to some regions in the current block.
  • an area to which bidirectional intra prediction is applied may be previously defined by an encoder and a decoder.
  • bidirectional intra prediction may be applied to a predetermined size (eg, 4 ⁇ 4) block adjacent to the lower right corner of the current block.
  • a predetermined size eg, 4 ⁇ 4
  • an area to which bidirectional intra prediction is applied may be determined adaptively according to the size, shape, or intra prediction mode of the current block.
  • information for determining an area to which bidirectional intra prediction is applied may be signaled through the bitstream.
  • 25 is a diagram illustrating a region to which bidirectional intra prediction is applied.
  • the final prediction sample may be obtained by weighted prediction of the first prediction image and the second prediction image.
  • the first prediction image or the second prediction image may be determined as the final prediction sample in the region where the bidirectional intra prediction is not applied.
  • the application area of the bidirectional intra prediction may have a rectangular shape or a triangular shape.
  • bidirectional intra prediction is performed using the first reference object sample selected from the first sample group and the second reference object sample selected from the second sample group.
  • the bidirectional intra prediction may be performed by selecting the upper reference sample and the left reference sample from the first sample group. That is, the final prediction sample of the current block may be obtained by weighted prediction of the first reference image acquired based on the upper reference sample and the second reference image acquired based on the lower reference sample.
  • bidirectional intra prediction may be performed by selecting a right reference sample and a bottom reference sample from the second sample group.
  • Bidirectional intra prediction may be defined as an independent intra prediction mode.
  • a total of 2N + 2 intra prediction modes may be defined by defining N directional prediction modes and N bidirectional intra prediction modes corresponding to N directional prediction modes.
  • N directional prediction modes For example, by adding a bidirectional intra prediction mode to the intra prediction mode illustrated in FIG. 9, a total of 68 intra prediction modes (that is, two non-directional intra prediction modes, 33 directional intra prediction modes, and 33 bidirectional intra prediction modes) ) Can be defined.
  • the intra prediction mode of the current block it may be determined whether to use the determined intra prediction mode to switch to the bidirectional prediction mode. For example, when the intra prediction mode of the current block is determined, information about whether to use the determined intra prediction mode as a bidirectional intra prediction mode may be decoded.
  • the information may be a 1-bit flag (eg, bi_intra_flag), but is not limited thereto.
  • a value of bi_intra_flag of 0 indicates that directional intra prediction is performed, and a value of bi_intra_flag of 1 indicates that bidirectional intra prediction is performed.
  • the first prediction image is determined as the final prediction sample of the current block
  • the weighted prediction of the first prediction image and the second prediction image is the current block. May be determined as the final predicted sample of.
  • bidirectional intra prediction may be set to be allowed. Accordingly, bidirectional intra prediction may not be applied when the size of the current block is smaller than 32x32, whereas bidirectional intra prediction may be applied when the size of the current block is 32x32.
  • bidirectional intra prediction may be allowed only for square blocks, or bidirectional intra prediction may be allowed only for non-square blocks.
  • bidirectional intra prediction may be applied only to some directional intra prediction modes.
  • FIG. 26 identifies and indicates a directional prediction mode in which bidirectional intra prediction is allowed. As shown in the example illustrated in FIG. 26, only some intra prediction modes between the horizontal direction and the vertical direction may be set to allow bidirectional intra prediction. In this case, when the intra prediction mode is selected in the range, bidirectional intra prediction may be performed by default. When the intra prediction mode is selected in the range, information parsed through a bitstream, among the size or shape of the current block, are selected. It may be determined whether to perform the bidirectional intra prediction mode based on at least one.
  • the intra prediction mode in which bidirectional intra prediction is allowed is not limited to the example shown in FIG. 26.
  • the intra prediction mode in which bidirectional intra prediction is allowed may be predefined in the encoder and the decoder, and may be adaptively determined according to the size and / or shape of the current block. Alternatively, information for determining an intra prediction mode in which bidirectional intra prediction is allowed may be signaled through the bitstream.
  • FIG. 27 is a flowchart illustrating a process of determining whether to apply a bidirectional intra prediction mode according to the present invention.
  • the non-directional mode may include at least one of a planner or a DC.
  • Information indicating whether the intra prediction mode of the current block is the non-directional mode may be signaled through the bitstream. For example, at least one of a flag indicating whether the intra prediction board of the current block is in a non-directional mode, a flag indicating whether the intra prediction mode of the current block is a planner mode, or a flag indicating whether the intra prediction mode of the current block is the DC mode.
  • a flag indicating whether the intra prediction board of the current block is in a non-directional mode a flag indicating whether the intra prediction mode of the current block is a planner mode
  • a flag indicating whether the intra prediction mode of the current block is the DC mode One can be signaled through the bitstream.
  • the intra prediction mode of the current block may be determined based on the MPM candidate or residual mode information.
  • the intra prediction mode of the current block is not the non-directional mode, it may be determined whether bidirectional intra prediction is applied to the current block (S2730). Whether bidirectional intra prediction is applied to the current block may be determined based on information parsed from the bitstream, the shape, size, or intra prediction mode of the current block.
  • bidirectional intra prediction it may be determined whether bidirectional intra prediction is applied to the current block based on a flag parsed from the bitstream (eg, bi_pred_flag).
  • a bi_pred_flag value of 0 indicates that bidirectional intra prediction is not applied to the current block
  • a bi_pred_flag value of 1 indicates that bidirectional intra prediction is applied to the current block.
  • a reference sample of the current block can be derived.
  • the reference samples may include first reference samples adjacent to the left and top of the current block and second reference samples adjacent to the right and bottom. Only when the bidirectional intra prediction is applied to the current block, second reference samples may be derived.
  • unidirectional intra prediction may be performed according to the intra prediction mode of the current block (S2740).
  • the prediction sample may be obtained based on at least one of the first reference samples.
  • bidirectional intra prediction may be performed according to the intra prediction mode of the current block (S2750).
  • a prediction sample may be obtained based on a first prediction image obtained based on at least one of the first reference samples and a second prediction image obtained based on at least one of the second reference samples. have.
  • the first reference sample and the second reference sample may be determined based on the directionality of the intra prediction mode, or may be determined based on the size, shape, or position of another reference target sample of the current block.
  • the prediction sample may be obtained by weighted prediction of the first prediction image and the second prediction image.
  • intra prediction may be performed on each of the divided regions.
  • intra prediction using reference samples included in the first reference sample group may be performed on the first region included in the current block.
  • reference samples derived based on the predicted or reconstructed value of the first region, reference samples included in the first reference sample group, or included in the second reference sample group Intra prediction using reference samples may be performed.
  • the first intra prediction mode applied to the first region and the second intra prediction mode applied to the second region may be the same as or different from each other.
  • one of the first intra prediction mode and the second intra prediction mode may be predefined in the encoder and the decoder.
  • one of the first intra prediction mode and the second intra prediction mode may be a planner mode, a DC mode, a horizontal direction mode, a vertical direction mode, or a diagonal direction mode.
  • one of the first intra prediction mode and the second intra prediction mode may be variably determined based on at least one of the size, shape, or partition type of the current block. For example, when the width of the current block is greater than the height, one of the first intra prediction mode and the second intra prediction mode may be determined as the vertical mode.
  • one of the first intra prediction mode and the second intra prediction mode may be determined as the horizontal mode.
  • one of the first intra prediction mode and the second intra prediction mode may be determined as a planner mode or a DC mode.
  • the other one of the first intra prediction mode and the second intra prediction mode may be determined using a derivation method based on the MPM candidate.
  • Each of the first region and the second region may include at least one sample included in a current block.
  • the first region may include at least one of the left (or right) n columns of the current block or the top m (or bottom) m rows of the current block.
  • N and m may be an integer of 1, 2 or more.
  • n and m may be determined based on at least one of the size, shape, or intra prediction mode of the current block.
  • the second area may be a remaining area except the first area or a part of the remaining area.
  • each component for example, a unit, a module, etc.
  • each component constituting the block diagram may be implemented as a hardware device or software, and a plurality of components are combined into one hardware device or software. It may be implemented.
  • the above-described embodiments can be implemented in the form of program instructions that can be executed by various computer components, and recorded in a computer-readable recording medium.
  • the computer-readable recording medium may include program instructions, data files, data structures, etc. alone or in combination.
  • Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks and magnetic tape, optical recording media such as CD-ROMs, DVDs, and magneto-optical media such as floptical disks. media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like.
  • the hardware device may be configured to operate as one or more software modules to perform the process according to the invention, and vice versa.
  • the present invention can be applied to an electronic device capable of encoding / decoding an image.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

본 발명에 따른 영상 복호화 방법은, 현재 블록의 상단 및 좌측에 위치하는 제1 참조 샘플들을 유도하는 단계, 상기 현재 블록의 우측 및 하단에 위치하는 제2 참조 샘플들을 유도하는 단계, 및 제1 참조 샘플 및 제2 참조 샘플을 기초로, 상기 현재 블록에 대한 예측 샘플을 획득하는 단계를 포함할 수 있다. 이때, 상기 제2 참조 샘플들은, 상기 제1 참조 샘플들 및 임시 인트라 예측 모드를 기초로 상기 현재 블록에 대한 임시 인트라 예측을 수행함으로써 생성되는 임시 예측 샘플들을 기초로 유도될 수 있다.

Description

비디오 신호 처리 방법 및 장치
본 발명은 비디오 신호 처리 방법 및 장치에 관한 것이다.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 고효율의 영상 압축 기술들이 활용될 수 있다.
영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 화면 간 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 화면 내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.
한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 컨텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 부호화/복호화 대상 블록에 대해 효율적으로 인트라 예측을 수행할 수 있는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 우측 및 하단 참조 샘플을 이용하여 인트라 예측을 수행하는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 인트라 예측 모드의 순방향 및 역방향을 모두 고려하는 인트라 예측 수행 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
본 발명에 따른 비디오 신호 복호화 방법 및 장치는, 현재 블록의 상단 및 좌측에 위치하는 제1 참조 샘플들을 유도하고, 상기 현재 블록의 우측 및 하단에 위치하는 제2 참조 샘플들을 유도하고, 제1 참조 샘플 및 제2 참조 샘플을 기초로, 상기 현재 블록에 대한 예측 샘플을 획득할 수 있다. 이때, 상기 제2 참조 샘플들은, 상기 제1 참조 샘플들 및 임시 인트라 예측 모드를 기초로 상기 현재 블록에 대한 임시 인트라 예측을 수행함으로써 생성되는 임시 예측 샘플들을 기초로 유도될 수 있다.
본 발명에 따른 비디오 신호 부호화 방법 및 장치는, 현재 블록의 상단 및 좌측에 위치하는 제1 참조 샘플들을 유도하고, 상기 현재 블록의 우측 및 하단에 위치하는 제2 참조 샘플들을 유도하고, 제1 참조 샘플 및 제2 참조 샘플을 기초로, 상기 현재 블록에 대한 예측 샘플을 획득할 수 있다. 이때, 상기 제2 참조 샘플들은, 상기 제1 참조 샘플들 및 임시 인트라 예측 모드를 기초로 상기 현재 블록에 대한 임시 인트라 예측을 수행함으로써 생성되는 임시 예측 샘플들을 기초로 유도될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 제2 참조 샘플은, 상기 현재 블록의 경계에 위치하는 임시 예측 샘플을 복사하여 유도될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 제2 참조 샘플은, 상기 현재 블록의 경계에 위치하는 임시 예측 샘플 및 상기 임시 예측 샘플에 이웃하는 이웃 임시 예측 샘플을 기초로 유도될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 예측 샘플은, 상기 제1 참조 샘플 및 상기 제2 참조 샘플의 가중합 연산을 기초로 획득되고, 상기 가중합 연산시 이용되는 가중치는, 상기 예측 샘플의 위치, 상기 제1 참조 샘플의 위치 및 상기 제2 참조 샘플의 위치를 기초로 결정될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 제1 참조 샘플 및 상기 제2 참조 샘플은 예측 대상 샘플에서 상기 현재 블록의 인트라 예측 모드가 지시하는 방향에 놓인 것일 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 제1 참조 샘플 및 상기 제2 참조 샘플 중 어느 하나는 예측 대상 샘플에서 상기 현재 블록의 인트라 예측 모드가 지시하는 방향에 놓이고, 다른 하나는 상기 인트라 예측 모드가 지시하는 방향의 반대 방향에 놓인 것일 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 임시 인트라 예측 모드는 플래너 또는 DC 모드일 수 있다.
본 발명에 대하여 위에서 간략하게 요약된 특징들은 후술하는 본 발명의 상세한 설명의 예시적인 양상일 뿐이며, 본 발명의 범위를 제한하는 것은 아니다.
본 발명에 의하면, 부호화/복호화 대상 블록에 대해 효율적으로 인트라 예측을 수행할 수 있다.
본 발명에 의하면, 우측 및 하단 참조 샘플을 이용함으로써, 인트라 예측의 효율을 높일 수 있는 이점이 있다.
본 발명에 의하면, 인트라 예측 모드의 순방향 및 역방향을 모두 고려함으로써, 인트라 예측의 효율을 높일 수 있는 이점이 있다.
본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 본 발명의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 3은 코딩 블록이 화면 간 예측으로 부호화되었을 때, 코딩 블록에 적용될 수 있는 파티션 모드 후보를 예시한 도면이다.
도 4는 발명이 적용되는 일실시예로서, 트리 구조(tree structure)에 기반하여 코딩 블록을 계층적으로 분할하는 일예를 도시한 것이다.
도 5는 본 발명이 적용되는 일실시예로서, 바이너리 트리 기반의 분할이 허용되는 파티션 형태를 나타낸 도면이다.
도 6은 트리플 트리 분할 형태를 나타낸 것이다.
도 7은 특정 형태의 바이너리 트리 기반의 분할만이 허용되는 예를 나타낸 도면이다.
도 8은 본 발명이 적용되는 일실시예로서, 바이너리 트리 분할 허용 횟수와 관련된 정보가 부호화/복호화되는 예를 설명하기 위한 도면이다.
도 9는 본 발명이 적용되는 일실시예로서, 영상 부호화기/복호화기에 기-정의된 인트라 예측 모드의 종류를 도시한 것이다.
도 10은 확장된 인트라 모드 하에서 이용 가능한 인트라 예측 모드들을 나타낸 도면이다.
도 11은 본 발명이 적용되는 일실시예로서, 인트라 예측 방법을 개략적으로 도시한 순서도이다.
도 12는 참조 샘플 라인 후보들 예시한 도면이다.
도 13은 본 발명이 적용되는 일실시예로서, 주변 샘플들의 차분 정보에 기반하여 현재 블록의 예측 샘플을 보정하는 방법을 도시한 것이다.
도 14 및 도 15는 참조 샘플들이 일렬로 재배열된 일차원 레퍼런스 샘플 그룹을 나타낸 도면이다.
도 16은 복수 참조 샘플을 이용하여, 우측 참조 샘플 또는 하단 참조 샘플을 유도하는 예를 나타낸 도면이다.
도 17 및 도 18은 본 발명의 일 실시예에 따른, 비정방형 블록에 대해 우측 참조 샘플 및 하단 참조 샘플을 결정하는 것을 설명하기 위한 도면이다.
도 19는 제1 참조 샘플을 이용하여 제2 참조 샘플을 유도하는 예를 설명하기 위한 도면이다.
도 20은 플래너 모드를 기초로 획득된 임시 예측 샘플을 이용하여 우측 참조 샘플 및 하단 참조 샘플을 유도하는 예를 나타낸 도면이다.
도 21은 일차원 레퍼런스 샘플 그룹을 구성하는 참조 샘플들을 예시한 도면이다.
도 22 및 도 23은 제1 참조 대상 샘플 및 제2 참조 대상 샘플의 위치를 나타낸 도면이다.
도 24는 제1 참조 대상 샘플과 제2 참조 참조 대상 샘플의 가중합 연산을 기초로 예측 샘플을 획득하는 예를 나타낸 도면이다.
도 25는 양방향 인트라 예측이 적용되는 영역을 나타낸 도면이다.
도 26은 양방향 인트라 예측이 허용되는 방향성 예측 모드를 식별 표시한 것이다.
도 27은 본 발명에 따른 양방향 인트라 예측 모드의 적용 여부를 결정하는 과정을 나타낸 흐름도이다.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.
제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다거나 "직접 접속되어"있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.
본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.
이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.
도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 1을 참조하면, 영상 부호화 장치(100)는 픽쳐 분할부(110), 예측부(120, 125), 변환부(130), 양자화부(135), 재정렬부(160), 엔트로피 부호화부(165), 역양자화부(140), 역변환부(145), 필터부(150) 및 메모리(155)를 포함할 수 있다.
도 1에 나타난 각 구성부들은 영상 부호화 장치에서 서로 다른 특징적인 기능들을 나타내기 위해 독립적으로 도시한 것으로, 각 구성부들이 분리된 하드웨어나 하나의 소프트웨어 구성단위로 이루어짐을 의미하지 않는다. 즉, 각 구성부는 설명의 편의상 각각의 구성부로 나열하여 포함한 것으로 각 구성부 중 적어도 두 개의 구성부가 합쳐져 하나의 구성부로 이루어지거나, 하나의 구성부가 복수개의 구성부로 나뉘어져 기능을 수행할 수 있고 이러한 각 구성부의 통합된 실시예 및 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.
또한, 일부의 구성 요소는 본 발명에서 본질적인 기능을 수행하는 필수적인 구성 요소는 아니고 단지 성능을 향상시키기 위한 선택적 구성 요소일 수 있다. 본 발명은 단지 성능 향상을 위해 사용되는 구성 요소를 제외한 본 발명의 본질을 구현하는데 필수적인 구성부만을 포함하여 구현될 수 있고, 단지 성능 향상을 위해 사용되는 선택적 구성 요소를 제외한 필수 구성 요소만을 포함한 구조도 본 발명의 권리범위에 포함된다.
픽쳐 분할부(110)는 입력된 픽쳐를 적어도 하나의 처리 단위로 분할할 수 있다. 이때, 처리 단위는 예측 단위(Prediction Unit: PU)일 수도 있고, 변환 단위(Transform Unit: TU)일 수도 있으며, 부호화 단위(Coding Unit: CU)일 수도 있다. 픽쳐 분할부(110)에서는 하나의 픽쳐에 대해 복수의 부호화 단위, 예측 단위 및 변환 단위의 조합으로 분할하고 소정의 기준(예를 들어, 비용 함수)으로 하나의 부호화 단위, 예측 단위 및 변환 단위 조합을 선택하여 픽쳐를 부호화 할 수 있다.
예를 들어, 하나의 픽쳐는 복수개의 부호화 단위로 분할될 수 있다. 픽쳐에서 부호화 단위를 분할하기 위해서는 쿼드 트리 구조(Quad Tree Structure)와 같은 재귀적인 트리 구조를 사용할 수 있는데 하나의 영상 또는 최대 크기 부호화 단위(largest coding unit)를 루트로 하여 다른 부호화 단위로 분할되는 부호화 유닛은 분할된 부호화 단위의 개수만큼의 자식 노드를 가지고 분할될 수 있다. 일정한 제한에 따라 더 이상 분할되지 않는 부호화 단위는 리프 노드가 된다. 즉, 하나의 코딩 유닛에 대하여 정방형 분할만이 가능하다고 가정하는 경우, 하나의 부호화 단위는 최대 4개의 다른 부호화 단위로 분할될 수 있다.
이하, 본 발명의 실시예에서는 부호화 단위는 부호화를 수행하는 단위의 의미로 사용할 수도 있고, 복호화를 수행하는 단위의 의미로 사용할 수도 있다.
예측 단위는 하나의 부호화 단위 내에서 동일한 크기의 적어도 하나의 정사각형 또는 직사각형 등의 형태를 가지고 분할된 것일 수도 있고, 하나의 부호화 단위 내에서 분할된 예측 단위 중 어느 하나의 예측 단위가 다른 하나의 예측 단위와 상이한 형태 및/또는 크기를 가지도록 분할된 것일 수도 있다.
부호화 단위를 기초로 인트라 예측을 수행하는 예측 단위를 생성시 최소 부호화 단위가 아닌 경우, 복수의 예측 단위 NxN 으로 분할하지 않고 인트라 예측을 수행할 수 있다.
예측부(120, 125)는 인터 예측을 수행하는 인터 예측부(120)와 인트라 예측을 수행하는 인트라 예측부(125)를 포함할 수 있다. 예측 단위에 대해 인터 예측을 사용할 것인지 또는 인트라 예측을 수행할 것인지를 결정하고, 각 예측 방법에 따른 구체적인 정보(예컨대, 인트라 예측 모드, 모션 벡터, 참조 픽쳐 등)를 결정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 예측 단위로 결정되고, 예측의 수행은 변환 단위로 수행될 수도 있다. 생성된 예측 블록과 원본 블록 사이의 잔차값(잔차 블록)은 변환부(130)로 입력될 수 있다. 또한, 예측을 위해 사용한 예측 모드 정보, 모션 벡터 정보 등은 잔차값과 함께 엔트로피 부호화부(165)에서 부호화되어 복호화기에 전달될 수 있다. 특정한 부호화 모드를 사용할 경우, 예측부(120, 125)를 통해 예측 블록을 생성하지 않고, 원본 블록을 그대로 부호화하여 복호화부에 전송하는 것도 가능하다.
인터 예측부(120)는 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐의 정보를 기초로 예측 단위를 예측할 수도 있고, 경우에 따라서는 현재 픽쳐 내의 부호화가 완료된 일부 영역의 정보를 기초로 예측 단위를 예측할 수도 있다. 인터 예측부(120)는 참조 픽쳐 보간부, 모션 예측부, 움직임 보상부를 포함할 수 있다.
참조 픽쳐 보간부에서는 메모리(155)로부터 참조 픽쳐 정보를 제공받고 참조 픽쳐에서 정수 화소 이하의 화소 정보를 생성할 수 있다. 휘도 화소의 경우, 1/4 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 8탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다. 색차 신호의 경우 1/8 화소 단위로 정수 화소 이하의 화소 정보를 생성하기 위해 필터 계수를 달리하는 DCT 기반의 4탭 보간 필터(DCT-based Interpolation Filter)가 사용될 수 있다.
모션 예측부는 참조 픽쳐 보간부에 의해 보간된 참조 픽쳐를 기초로 모션 예측을 수행할 수 있다. 모션 벡터를 산출하기 위한 방법으로 FBMA(Full search-based Block Matching Algorithm), TSS(Three Step Search), NTS(New Three-Step Search Algorithm) 등 다양한 방법이 사용될 수 있다. 모션 벡터는 보간된 화소를 기초로 1/2 또는 1/4 화소 단위의 모션 벡터값을 가질 수 있다. 모션 예측부에서는 모션 예측 방법을 다르게 하여 현재 예측 단위를 예측할 수 있다. 모션 예측 방법으로 스킵(Skip) 방법, 머지(Merge) 방법, AMVP(Advanced Motion Vector Prediction) 방법, 인트라 블록 카피(Intra Block Copy) 방법 등 다양한 방법이 사용될 수 있다.
인트라 예측부(125)는 현재 픽쳐 내의 화소 정보인 현재 블록 주변의 참조 픽셀 정보를 기초로 예측 단위를 생성할 수 있다. 현재 예측 단위의 주변 블록이 인터 예측을 수행한 블록이어서, 참조 픽셀이 인터 예측을 수행한 픽셀일 경우, 인터 예측을 수행한 블록에 포함되는 참조 픽셀을 주변의 인트라 예측을 수행한 블록의 참조 픽셀 정보로 대체하여 사용할 수 있다. 즉, 참조 픽셀이 가용하지 않는 경우, 가용하지 않은 참조 픽셀 정보를 가용한 참조 픽셀 중 적어도 하나의 참조 픽셀로 대체하여 사용할 수 있다.
인트라 예측에서 예측 모드는 참조 픽셀 정보를 예측 방향에 따라 사용하는 방향성 예측 모드와 예측을 수행시 방향성 정보를 사용하지 않는 비방향성 모드를 가질 수 있다. 휘도 정보를 예측하기 위한 모드와 색차 정보를 예측하기 위한 모드가 상이할 수 있고, 색차 정보를 예측하기 위해 휘도 정보를 예측하기 위해 사용된 인트라 예측 모드 정보 또는 예측된 휘도 신호 정보를 활용할 수 있다.
인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행할 수 있다. 그러나 인트라 예측을 수행할 때 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수 있다.
인트라 예측 방법은 예측 모드에 따라 참조 화소에 AIS(Adaptive Intra Smoothing) 필터를 적용한 후 예측 블록을 생성할 수 있다. 참조 화소에 적용되는 AIS 필터의 종류는 상이할 수 있다. 인트라 예측 방법을 수행하기 위해 현재 예측 단위의 인트라 예측 모드는 현재 예측 단위의 주변에 존재하는 예측 단위의 인트라 예측 모드로부터 예측할 수 있다. 주변 예측 단위로부터 예측된 모드 정보를 이용하여 현재 예측 단위의 예측 모드를 예측하는 경우, 현재 예측 단위와 주변 예측 단위의 인트라 예측 모드가 동일하면 소정의 플래그 정보를 이용하여 현재 예측 단위와 주변 예측 단위의 예측 모드가 동일하다는 정보를 전송할 수 있고, 만약 현재 예측 단위와 주변 예측 단위의 예측 모드가 상이하면 엔트로피 부호화를 수행하여 현재 블록의 예측 모드 정보를 부호화할 수 있다.
또한, 예측부(120, 125)에서 생성된 예측 단위를 기초로 예측을 수행한 예측 단위와 예측 단위의 원본 블록과 차이값인 잔차값(Residual) 정보를 포함하는 잔차 블록이 생성될 수 있다. 생성된 잔차 블록은 변환부(130)로 입력될 수 있다.
변환부(130)에서는 원본 블록과 예측부(120, 125)를 통해 생성된 예측 단위의 잔차값(residual)정보를 포함한 잔차 블록을 DCT(Discrete Cosine Transform), DST(Discrete Sine Transform), KLT와 같은 변환 방법을 사용하여 변환시킬 수 있다. 잔차 블록을 변환하기 위해 DCT를 적용할지, DST를 적용할지 또는 KLT를 적용할지는 잔차 블록을 생성하기 위해 사용된 예측 단위의 인트라 예측 모드 정보를 기초로 결정할 수 있다.
양자화부(135)는 변환부(130)에서 주파수 영역으로 변환된 값들을 양자화할 수 있다. 블록에 따라 또는 영상의 중요도에 따라 양자화 계수는 변할 수 있다. 양자화부(135)에서 산출된 값은 역양자화부(140)와 재정렬부(160)에 제공될 수 있다.
재정렬부(160)는 양자화된 잔차값에 대해 계수값의 재정렬을 수행할 수 있다.
재정렬부(160)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원의 블록 형태 계수를 1차원의 벡터 형태로 변경할 수 있다. 예를 들어, 재정렬부(160)에서는 지그-재그 스캔(Zig-Zag Scan)방법을 이용하여 DC 계수부터 고주파수 영역의 계수까지 스캔하여 1차원 벡터 형태로 변경시킬 수 있다. 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔 대신 2차원의 블록 형태 계수를 열 방향으로 스캔하는 수직 스캔, 2차원의 블록 형태 계수를 행 방향으로 스캔하는 수평 스캔이 사용될 수도 있다. 즉, 변환 단위의 크기 및 인트라 예측 모드에 따라 지그-재그 스캔, 수직 방향 스캔 및 수평 방향 스캔 중 어떠한 스캔 방법이 사용될지 여부를 결정할 수 있다.
엔트로피 부호화부(165)는 재정렬부(160)에 의해 산출된 값들을 기초로 엔트로피 부호화를 수행할 수 있다. 엔트로피 부호화는 예를 들어, 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 부호화 방법을 사용할 수 있다.
엔트로피 부호화부(165)는 재정렬부(160) 및 예측부(120, 125)로부터 부호화 단위의 잔차값 계수 정보 및 블록 타입 정보, 예측 모드 정보, 분할 단위 정보, 예측 단위 정보 및 전송 단위 정보, 모션 벡터 정보, 참조 프레임 정보, 블록의 보간 정보, 필터링 정보 등 다양한 정보를 부호화할 수 있다.
엔트로피 부호화부(165)에서는 재정렬부(160)에서 입력된 부호화 단위의 계수값을 엔트로피 부호화할 수 있다.
역양자화부(140) 및 역변환부(145)에서는 양자화부(135)에서 양자화된 값들을 역양자화하고 변환부(130)에서 변환된 값들을 역변환한다. 역양자화부(140) 및 역변환부(145)에서 생성된 잔차값(Residual)은 예측부(120, 125)에 포함된 움직임 추정부, 움직임 보상부 및 인트라 예측부를 통해서 예측된 예측 단위와 합쳐져 복원 블록(Reconstructed Block)을 생성할 수 있다.
필터부(150)는 디블록킹 필터, 오프셋 보정부, ALF(Adaptive Loop Filter)중 적어도 하나를 포함할 수 있다.
디블록킹 필터는 복원된 픽쳐에서 블록간의 경계로 인해 생긴 블록 왜곡을 제거할 수 있다. 디블록킹을 수행할지 여부를 판단하기 위해 블록에 포함된 몇 개의 열 또는 행에 포함된 픽셀을 기초로 현재 블록에 디블록킹 필터 적용할지 여부를 판단할 수 있다. 블록에 디블록킹 필터를 적용하는 경우 필요한 디블록킹 필터링 강도에 따라 강한 필터(Strong Filter) 또는 약한 필터(Weak Filter)를 적용할 수 있다. 또한 디블록킹 필터를 적용함에 있어 수직 필터링 및 수평 필터링 수행시 수평 방향 필터링 및 수직 방향 필터링이 병행 처리되도록 할 수 있다.
오프셋 보정부는 디블록킹을 수행한 영상에 대해 픽셀 단위로 원본 영상과의 오프셋을 보정할 수 있다. 특정 픽쳐에 대한 오프셋 보정을 수행하기 위해 영상에 포함된 픽셀을 일정한 수의 영역으로 구분한 후 오프셋을 수행할 영역을 결정하고 해당 영역에 오프셋을 적용하는 방법 또는 각 픽셀의 에지 정보를 고려하여 오프셋을 적용하는 방법을 사용할 수 있다.
ALF(Adaptive Loop Filtering)는 필터링한 복원 영상과 원래의 영상을 비교한 값을 기초로 수행될 수 있다. 영상에 포함된 픽셀을 소정의 그룹으로 나눈 후 해당 그룹에 적용될 하나의 필터를 결정하여 그룹마다 차별적으로 필터링을 수행할 수 있다. ALF를 적용할지 여부에 관련된 정보는 휘도 신호는 부호화 단위(Coding Unit, CU) 별로 전송될 수 있고, 각각의 블록에 따라 적용될 ALF 필터의 모양 및 필터 계수는 달라질 수 있다. 또한, 적용 대상 블록의 특성에 상관없이 동일한 형태(고정된 형태)의 ALF 필터가 적용될 수도 있다.
메모리(155)는 필터부(150)를 통해 산출된 복원 블록 또는 픽쳐를 저장할 수 있고, 저장된 복원 블록 또는 픽쳐는 인터 예측을 수행 시 예측부(120, 125)에 제공될 수 있다.
도 2는 본 발명의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 2를 참조하면, 영상 복호화기(200)는 엔트로피 복호화부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230, 235), 필터부(240), 메모리(245)가 포함될 수 있다.
영상 부호화기에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 영상 부호화기와 반대의 절차로 복호화될 수 있다.
엔트로피 복호화부(210)는 영상 부호화기의 엔트로피 부호화부에서 엔트로피 부호화를 수행한 것과 반대의 절차로 엔트로피 복호화를 수행할 수 있다. 예를 들어, 영상 부호화기에서 수행된 방법에 대응하여 지수 골롬(Exponential Golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 다양한 방법이 적용될 수 있다.
엔트로피 복호화부(210)에서는 부호화기에서 수행된 인트라 예측 및 인터 예측에 관련된 정보를 복호화할 수 있다.
재정렬부(215)는 엔트로피 복호화부(210)에서 엔트로피 복호화된 비트스트림을 부호화부에서 재정렬한 방법을 기초로 재정렬을 수행할 수 있다. 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)에서는 부호화부에서 수행된 계수 스캐닝에 관련된 정보를 제공받고 해당 부호화부에서 수행된 스캐닝 순서에 기초하여 역으로 스캐닝하는 방법을 통해 재정렬을 수행할 수 있다.
역양자화부(220)는 부호화기에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다.
역변환부(225)는 영상 부호화기에서 수행한 양자화 결과에 대해 변환부에서 수행한 변환 즉, DCT, DST, 및 KLT에 대해 역변환 즉, 역 DCT, 역 DST 및 역 KLT를 수행할 수 있다. 역변환은 영상 부호화기에서 결정된 전송 단위를 기초로 수행될 수 있다. 영상 복호화기의 역변환부(225)에서는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 변환 기법(예를 들어, DCT, DST, KLT)이 선택적으로 수행될 수 있다.
예측부(230, 235)는 엔트로피 복호화부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(245)에서 제공된 이전에 복호화된 블록 또는 픽쳐 정보를 기초로 예측 블록을 생성할 수 있다.
전술한 바와 같이 영상 부호화기에서의 동작과 동일하게 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 동일할 경우, 예측 단위의 좌측에 존재하는 픽셀, 좌측 상단에 존재하는 픽셀, 상단에 존재하는 픽셀을 기초로 예측 단위에 대한 인트라 예측을 수행하지만, 인트라 예측을 수행시 예측 단위의 크기와 변환 단위의 크기가 상이할 경우, 변환 단위를 기초로 한 참조 픽셀을 이용하여 인트라 예측을 수행할 수 있다. 또한, 최소 부호화 단위에 대해서만 NxN 분할을 사용하는 인트라 예측을 사용할 수도 있다.
예측부(230, 235)는 예측 단위 판별부, 인터 예측부 및 인트라 예측부를 포함할 수 있다. 예측 단위 판별부는 엔트로피 복호화부(210)에서 입력되는 예측 단위 정보, 인트라 예측 방법의 예측 모드 정보, 인터 예측 방법의 모션 예측 관련 정보 등 다양한 정보를 입력 받고 현재 부호화 단위에서 예측 단위를 구분하고, 예측 단위가 인터 예측을 수행하는지 아니면 인트라 예측을 수행하는지 여부를 판별할 수 있다. 인터 예측부(230)는 영상 부호화기에서 제공된 현재 예측 단위의 인터 예측에 필요한 정보를 이용해 현재 예측 단위가 포함된 현재 픽쳐의 이전 픽쳐 또는 이후 픽쳐 중 적어도 하나의 픽쳐에 포함된 정보를 기초로 현재 예측 단위에 대한 인터 예측을 수행할 수 있다. 또는, 현재 예측 단위가 포함된 현재 픽쳐 내에서 기-복원된 일부 영역의 정보를 기초로 인터 예측을 수행할 수도 있다.
인터 예측을 수행하기 위해 부호화 단위를 기준으로 해당 부호화 단위에 포함된 예측 단위의 모션 예측 방법이 스킵 모드(Skip Mode), 머지 모드(Merge 모드), AMVP 모드(AMVP Mode), 인트라 블록 카피 모드 중 어떠한 방법인지 여부를 판단할 수 있다.
인트라 예측부(235)는 현재 픽쳐 내의 화소 정보를 기초로 예측 블록을 생성할 수 있다. 예측 단위가 인트라 예측을 수행한 예측 단위인 경우, 영상 부호화기에서 제공된 예측 단위의 인트라 예측 모드 정보를 기초로 인트라 예측을 수행할 수 있다. 인트라 예측부(235)에는 AIS(Adaptive Intra Smoothing) 필터, 참조 화소 보간부, DC 필터를 포함할 수 있다. AIS 필터는 현재 블록의 참조 화소에 필터링을 수행하는 부분으로써 현재 예측 단위의 예측 모드에 따라 필터의 적용 여부를 결정하여 적용할 수 있다. 영상 부호화기에서 제공된 예측 단위의 예측 모드 및 AIS 필터 정보를 이용하여 현재 블록의 참조 화소에 AIS 필터링을 수행할 수 있다. 현재 블록의 예측 모드가 AIS 필터링을 수행하지 않는 모드일 경우, AIS 필터는 적용되지 않을 수 있다.
참조 화소 보간부는 예측 단위의 예측 모드가 참조 화소를 보간한 화소값을 기초로 인트라 예측을 수행하는 예측 단위일 경우, 참조 화소를 보간하여 정수값 이하의 화소 단위의 참조 화소를 생성할 수 있다. 현재 예측 단위의 예측 모드가 참조 화소를 보간하지 않고 예측 블록을 생성하는 예측 모드일 경우 참조 화소는 보간되지 않을 수 있다. DC 필터는 현재 블록의 예측 모드가 DC 모드일 경우 필터링을 통해서 예측 블록을 생성할 수 있다.
복원된 블록 또는 픽쳐는 필터부(240)로 제공될 수 있다. 필터부(240)는 디블록킹 필터, 오프셋 보정부, ALF를 포함할 수 있다.
영상 부호화기로부터 해당 블록 또는 픽쳐에 디블록킹 필터를 적용하였는지 여부에 대한 정보 및 디블록킹 필터를 적용하였을 경우, 강한 필터를 적용하였는지 또는 약한 필터를 적용하였는지에 대한 정보를 제공받을 수 있다. 영상 복호화기의 디블록킹 필터에서는 영상 부호화기에서 제공된 디블록킹 필터 관련 정보를 제공받고 영상 복호화기에서 해당 블록에 대한 디블록킹 필터링을 수행할 수 있다.
오프셋 보정부는 부호화시 영상에 적용된 오프셋 보정의 종류 및 오프셋 값 정보 등을 기초로 복원된 영상에 오프셋 보정을 수행할 수 있다.
ALF는 부호화기로부터 제공된 ALF 적용 여부 정보, ALF 계수 정보 등을 기초로 부호화 단위에 적용될 수 있다. 이러한 ALF 정보는 특정한 파라메터 셋에 포함되어 제공될 수 있다.
메모리(245)는 복원된 픽쳐 또는 블록을 저장하여 참조 픽쳐 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽쳐를 출력부로 제공할 수 있다.
전술한 바와 같이 이하, 본 발명의 실시예에서는 설명의 편의상 코딩 유닛(Coding Unit)을 부호화 단위라는 용어로 사용하지만, 부호화뿐만 아니라 복호화를 수행하는 단위가 될 수도 있다.
또한, 현재 블록은, 부호화/복호화 대상 블록을 나타내는 것으로, 부호화/복호화 단계에 따라, 코딩 트리 블록(또는 코딩 트리 유닛), 부호화 블록(또는 부호화 유닛), 변환 블록(또는 변환 유닛) 또는 예측 블록(또는 예측 유닛) 등을 나타내는 것일 수 있다. 본 명세서에서, '유닛'은 특정 부호화/복호화 프로세스를 수행하기 위한 기본 단위를 나타내고, '블록'은 소정 크기의 샘플 어레이를 나타낼 수 있다. 별도의 구분이 없는 한, '블록'과 '유닛'은 동등한 의미로 사용될 수 있다. 예컨대, 후술되는 실시예에서, 부호화 블록(코딩 블록) 및 부호화 유닛(코딩 유닛)은 상호 동등한 의미인 것으로 이해될 수 있다.
하나의 픽쳐는 정방형 또는 비정방형의 기본 블록으로 분할되어 부호화/복호화될 수 있다. 이때, 기본 블록은, 코딩 트리 유닛(Coding Tree Unit)이라 호칭될 수 있다. 코딩 트리 유닛은, 시퀀스 또는 슬라이스에서 허용하는 가장 큰 크기의 코딩 유닛으로 정의될 수 있다. 코딩 트리 유닛이 정방형 또는 비정방형인지 여부를 나타내는 정보 또는 코딩 트리 유닛의 크기와 관련한 정보가 시퀀스 파라미터 셋트, 픽처 파라미터 셋트 또는 슬라이스 헤더 등을 통해 시그널링될 수 있다. 코딩 트리 유닛은 더 작은 크기의 파티션으로 분할될 수 있다. 이때, 코딩 트리 유닛을 분할함으로써 생성된 파티션을 뎁스 1이라 할 경우, 뎁스 1인 파티션을 분할함으로써 생성된 파티션은 뎁스 2로 정의될 수 있다. 즉, 코딩 트리 유닛 내 뎁스 k인 파티션을 분할함으로써 생성된 파티션은 뎁스 k+1을 갖는 것으로 정의될 수 있다.
코딩 트리 유닛이 분할됨에 따라 생성된 임의 크기의 파티션을 코딩 유닛이라 정의할 수 있다. 코딩 유닛은 재귀적으로 분할되거나, 예측, 양자화, 변환 또는 인루프 필터링 등을 수행하기 위한 기본 단위로 분할될 수 있다. 일 예로, 코딩 유닛이 분할됨에 따라 생성된 임의 크기의 파티션은 코딩 유닛으로 정의되거나, 예측, 양자화, 변환 또는 인루프 필터링 등을 수행하기 위한 기본 단위인 변환 유닛 또는 예측 유닛으로 정의될 수 있다.
또는, 코딩 블록의 예측 분할을 통해 코딩 블록과 동일한 크기 또는 코딩 블록보다 작은 크기를 갖는 예측 블록(Prediction Block)을 결정할 수 있다. 코딩 블록의 예측 분할을 위해, 코딩 블록의 분할 형태를 나타내는 파티션 모드(Part_mode) 후보들 중 어느 하나를 특정할 수 있다. 파티션 모드 후보들 중 어느 하나를 가리키는 파티션 인덱스를 결정하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다. 또는, 코딩 블록의 크기, 형태 또는 부호화 모드 중 적어도 하나에 기초하여, 코딩 블록의 파티션 인덱스를 결정할 수 있다. 예측 블록의 크기 또는 형태는 파티션 인덱스에 의해 특정되는 파티션 모드에 기초하여 결정될 수 있다. 파티션 모드 후보는 비대칭 파티션 형태(예컨대, nLx2N, nRx2N, 2NxnU, 2NxnD)를 포함할 수 있다. 코딩 블록이 이용할 수 있는 비대칭 파티션 모드 후보의 개수 또는 종류는, 코딩 블록의 크기, 형태 또는 부호화 모드 중 적어도 하나에 기초하여 결정될 수 있다.
도 3은 코딩 블록이 화면 간 예측으로 부호화되었을 때, 코딩 블록에 적용될 수 있는 파티션 모드 후보를 예시한 도면이다.
코딩 블록이 화면 간 예측으로 부호화된 경우, 도 3에 도시된 8개의 파티션 모드 후보 중 어느 하나가 코딩 블록에 적용될 수 있다.
반면, 코딩 블록이 화면 내 예측으로 부호화된 경우, 정방형 파티션 분할만이 코딩 블록에 적용될 수 있다. 즉, 코딩 블록이 화면 내 예측으로 부호화된 경우, 파티션 모드 PART_2Nx2N 또는 PART_NxN 이 코딩 블록에 적용될 수 있다.
PART_NxN은 코딩 블록이 최소 크기를 갖는 경우 적용될 수 있다. 여기서, 코딩 블록의 최소 크기는 부호화기 및 복호화기에서 기 정의된 것일 수 있다. 또는, 코딩 블록의 최소 크기에 관한 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 코딩 블록의 최소 크기는 슬라이스 헤더를 통해 시그날링될 수 있다. 이에 따라, 슬라이스별로 코딩 블록의 최소 크기가 상이하게 결정될 수 있다.
다른 예로, 코딩 블록이 이용할 수 있는 파티션 모드 후보는 코딩 블록의 크기 또는 형태 중 적어도 하나에 따라 상이하게 결정될 수 있다. 일 예로, 코딩 블록이 이용할 수 있는 파티션 모드 후보의 개수 또는 종류는 코딩 블록의 크기 또는 형태 중 적어도 하나에 따라 상이하게 결정될 수 있다.
또는, 코딩 블록의 크기 또는 형태에 기초하여, 코딩 블록이 이용할 수 있는 비대칭 파티션 모드 후보들의 종류 또는 개수가 결정될 수 있다. 코딩 블록이 이용할 수 있는 비대칭 파티션 모드 후보들의 개수 또는 종류는 코딩 블록의 크기 또는 형태 중 적어도 하나에 따라 상이하게 결정될 수 있다. 일 예로, 코딩 블록이 너비가 높이보다 큰 비정방 형태를 가질 경우, PART_2NxN, PART_2NxnU 또는 PART_2NxnD 중 적어도 하나가 코딩 블록의 파티션 모드 후보로 사용되지 않을 수 있다. 코딩 블록이 높이가 너비보다 큰 비정방 형태를 가질 경우, PART_Nx2N, PART_nLx2N, PART_nRx2N 중 적어도 하나가 코딩 블록의 파티션 모드 후보로 사용되지 않을 수 있다.
일반적으로, 예측 블록의 크기는 64x64 부터 4x4의 크기를 가질 수 있다. 단, 코딩 블록이 화면 간 예측으로 부호화된 경우, 움직임 보상을 수행할 때, 메모리 대역폭(memory bandwidth)을 줄이기 위해, 예측 블록이 4x4 크기를 갖지 않도록 할 수 있다.
파티션 모드를 기초로, 코딩 블록을 재귀적으로 분할하는 것도 가능하다. 즉, 파티션 인덱스에 의해 결정된 파티션 모드에 기초하여, 코딩 블록을 분할하고, 코딩 블록의 분할 결과로 생성된 각 파티션을 코딩 블록으로 정의할 수 있다.
이하, 코딩 유닛의 분할 방법에 대해 보다 상세히 설명하기로 한다. 후술되는 실시예에서, 코딩 유닛은, 코딩 트리 유닛 또는 코딩 트리 유닛에 포함되는 코딩 유닛을 의미할 수 있다. 또한, 코딩 블록이 분할됨에 따라 생성되는 '파티션'은 '코딩 블록'을 의미할 수 있다. 후술되는 분할 방법은, 코딩 블록을 복수의 예측 블록들 또는 복수의 변환 블록들로 분할하는 것에 적용될 수도 있다.
코딩 유닛은 적어도 하나의 라인에 의해 분할될 수 있다. 이때, 코딩 유닛을 분할하는 라인의 각도는 0도 내지 360도 범위 내의 값일 수 있다. 예컨대, 수평선의 각도는 0도, 수직선의 각도는 90도, 우상단 방향의 대각선의 각도는 45도, 좌상단 대각선의 각도는 135도일 수 있다.
코딩 유닛이 복수의 라인에 의해 분할되는 경우, 복수의 라인은 모두 동일한 각도를 가질 수 있다. 또는, 복수의 라인 중 적어도 하나는 다른 라인과 상이한 각도를 가질 수 있다. 또는, 코딩 트리 유닛 또는 코딩 유닛을 분할하는 복수의 라인은 기 정의된 각도 차(예컨대, 90도)를 가질 수 있다.
코딩 유닛을 분할하는 라인에 관한 정보는, 파티션 모드에 의해 결정될 수 있다. 또는, 라인의 개수, 방향, 각도 또는 블록 내 라인의 위치 중 적어도 하나에 대한 정보가 부호화될 수도 있다.
설명의 편의를 위해, 후술되는 실시예에서는, 수직선 또는 수평선 중 적어도 하나를 이용하여, 코딩 유닛이 복수의 코딩 유닛으로 분할되는 것으로 가정한다.
코딩 유닛을 파티셔닝하는 수직선 또는 수평선의 개수는 적어도 하나 이상일 수 있다. 일 예로, 하나의 수직선 또는 하나의 수평선을 이용하여, 코딩 유닛을 2개의 파티션으로 분할할 수 있다. 또는, 두개의 수직선 또는 두개의 수평선을 이용하여, 코딩 유닛을 3개의 파티션으로 분할할 수 있다. 또는, 하나의 수직선 및 하나의 수평선을 이용하여, 코딩 유닛을 코딩 유닛 보다 너비 및 높이가 1/2 작은 4개의 파티션으로 분할할 수 있다.
코딩 유닛을 적어도 하나의 수직선 또는 적어도 하나의 수평선을 이용하여 복수의 파티션으로 분할하는 경우, 파티션들은 균일한 크기를 가질 수 있다. 또는, 어느 하나의 파티션이 나머지 파티션과 다른 크기를 갖거나, 각 파티션이 상이한 크기를 가질 수도 있다. 일 예로, 두개의 수평선 또는 두개의 수직선으로 코딩 유닛을 분할하는 경우, 코딩 유닛은 3개의 파티션들로 분할될 수 있다. 이때, 3개 파티션들의 너비비 또는 높이비는 n:2n:n, 2n:n:n, 또는 n:n:2n일 수 있다.
후술되는 실시예들에서는, 코딩 유닛이 4개의 파티션으로 분할되는 것을, 쿼드 트리 기반의 분할이라 호칭하기로 한다. 그리고, 코딩 유닛이 2개의 파티션으로 분할되는 것을 바이너리 트리 기반의 분할이라 호칭하기로 한다. 또한, 코딩 유닛이 3개의 파티션으로 분할되는 것을 트리플 트리 기반의 분할이라 호칭하기로 한다.
후술되는 도면에서는, 코딩 유닛을 분할하기 위해, 하나의 수직선 및/또는 하나의 수평선이 이용되는 것으로 도시할 것이나, 도시된 것보다 더 많은 수의 수직선 및/또는 더 많은 수의 수평선을 이용하여, 코딩 유닛을 도시된 것보다 더 많은 수의 파티션 또는 도시된 것보다 더 적은 수의 파티션으로 분할하는 것 역시 본 발명의 범주에 포함된다고 할 것이다.
도 4는 본 발명이 적용되는 일실시예로서, 트리 구조(tree structure)에 기반하여 코딩 블록을 계층적으로 분할하는 일예를 도시한 것이다.
입력 영상 신호는 소정의 블록 단위로 복호화되며, 이와 같이 입력 영상 신호를 복호화하기 위한 기본 단위를 코딩 블록이라 한다. 코딩 블록은 인트라/인터 예측, 변환, 양자화를 수행하는 단위가 될 수 있다. 또한, 코딩 블록 단위로 예측 모드(예컨대, 화면 내 예측 모드 또는 화면 간 예측 모드)가 결정되고, 코딩 블록에 포함된 예측 블록들은, 결정된 예측 모드를 공유할 수 있다. 코딩 블록은 8x8 내지 64x64 범위에 속하는 임의의 크기를 가진 정방형 또는 비정방형 블록일 수 있고, 128x128, 256x256 또는 그 이상의 크기를 가진 정방형 또는 비정방형 블록일 수 있다.
구체적으로, 코딩 블록은 쿼드 트리(quad tree) 분할 방법, 바이너리 트리(binary tree) 분할 방법 또는 트리플 트리(triple tree) 분할 방법 중 적어도 하나에 기초하여 계층적으로 분할될 수 있다. 쿼드 트리 기반의 분할은 2Nx2N 코딩 블록이 4개의 NxN 코딩 블록으로 분할되는 방식을 의미할 수 있다. 바이너리 트리 기반의 분할은 하나의 코딩 블록이 2개의 코딩 블록으로 분할되는 방식을 의미할 수 있다. 트리플 트리 기반의 분할은 하나의 코딩 블록이 3개의 코딩 블록으로 분할되는 방식을 의미할 수 있다. 바이너리 트리 또는 트리플 트리 기반의 분할이 수행되었다 하더라도, 하위 뎁스에서는 정방형인 코딩 블록이 존재할 수 있다.
바이너리 트리 기반의 분할로 인해 생성된 파티션들은 대칭 형태 또는 비대칭형태일 수 있다. 또한, 바이너리 트리 기반으로 분할된 코딩 블록은 정방형 블록 또는 비정방형 블록(예컨대, 직사각형)일 수 있다.
도 5는 바이너리 트리 분할에 기반한 코딩 블록의 분할 형태를 나타낸 도면이다. 바이너리 트리 분할에 기반한 코딩 블록의 파티션 형태는 2NxN (수평 방향 비 정방 코딩 유닛) 또는 Nx2N (수직 방향 비정방 코딩 유닛) 등의 대 대칭형(symmetric) 타입 또는 nLx2N, nRx2N, 2NxnU 또는 2NxnD 등의 비대칭형(asymmetric) 타입을 포함할 수 있다. 대칭 타입 또는 비대칭 타입 중 어느 하나만 코딩 블록의 분할 형태로 허용할 수도 있다.
트리플 트리 분할 형태는 코딩 블록을 2개의 수직선으로 분할하는 형태 또는 코딩 블록을 2개의 수평선으로 분할하는 형태 중 적어도 하나를 포함할 수 있다. 트리플 트리 분할에 의해 3개의 비정방형 파티션들이 생성될 수 있다.
도 6은 트리플 트리 분할 형태를 나타낸 것이다.
트리플 트리 분할 형태는 코딩 블록을 2개의 수평선으로 분할하는 형태 또는 코딩 블록을 2개의 수직선으로 분할하는 형태를 포함할 수 있다. 코딩 블록의 분할 결과로 생성되는 파티션들의 너비비 또는 높이비는, n:2n:n, 2n:n:n 또는 n:n:2n일 수 있다.
3개의 파티션들 중 너비 또는 높이가 가장 큰 파티션의 위치가 부호화기 및 복호화기에 기 정의될 수 있다. 또는, 3개의 파티션들 중 너비 또는 높이가 가장 큰 파티션을 가리키는 정보가 비트스트림을 통해 시그날링될 수 있다.
코딩 유닛에 대해 정방 형태 또는 비정방 대칭 형태의 분할만을 허용할 수 있다. 이 경우, 코딩 유닛을 정방 형태의 파티션들로 분할하는 것은 블록으로 구성하는 것은 쿼드 트리 CU 파티셔닝에 해당하고, 코딩 유닛을, 대칭 형태의 비정방형 파티션들로 분할하는 것은 바이너리 트리 파티셔닝에 해당할 수 있다. 코딩 트리 유닛을 정방형 파티션들과 대칭 형태의 비정방형의 파티션들로 분할하는 것은 쿼드 및 바이너리 트리 CU 파티셔닝(Quad Tree and Binary Tree CU Partitioning, QTBT)에 해당할 수 있다.
바이너리 트리 또는 트리플 트리 기반의 분할은 쿼드 트리 기반의 분할이 더 이상 수행되지 않는 코딩 블록에 대해서 수행될 수 있다. 바이너리 트리 또는 트리플 트리 기반의 분할 결과로 생성된 코딩 블록은 더 작은 코딩 블록들로 분할될 수 있다. 이때, 상기 코딩 블록에는 코딩 블록에는 쿼드 트리 분할, 트리플 트리 분할 또는 바이너리 트리 분할 중 적어도 하나가 적용되지 않도록 설정될 수 있다. 또는, 상기 코딩 블록에는 소정 방향의 바이너리 트리 분할 또는 소정 방향의 트리플 트리 분할이 허용되지 않을 수 있다. 일 예로, 바이너리 트리 또는 트리플 트리 기반의 분할 결과로 생성된 코딩 블록에는 쿼드 트리 분할 및 트리플 트리 분할이 허용되지 않도록 설정될 수 있다. 상기 코딩 블록에는 바이너리 트리 분할만이 허용될 수 있다.
또는, 트리플 트리 기반의 분할 결과로 생성된 3개의 코딩 블록들 중 크기가 가장 큰 코딩 블록만이 더 작은 크기의 코딩 블록들로 분할될 수 있다. 또는 트리플 트리 기반의 분할 결과로 생성된 3개의 코딩 블록들 중 크기가 가장 큰 코딩 블록에만 바이너리 트리 기반의 분할 또는 트리플 트리 기반의 분할이 허용될 수 있다.
하위 뎁스 파티션의 분할 형태는 상위 뎁스 파티션의 분할 형태에 종속적으로 결정될 수 있다. 일 예로, 상위 파티션 및 하위 파티션이 바이너리 트리에 기반하여 분할되는 경우, 하위 뎁스 파티션에서는 상위 뎁스 파티션의 바이너리 트리 분할 형태와 동일한 형태의 바이너리 트리 기반의 분할만이 허용될 수 있다. 예컨대, 상위 뎁스 파티션의 바이너리 트리 분할 형태가 2NxN 형태인 경우, 하위 뎁스 파티션의 바이너리 트리 분할 형태도 2NxN 형태로 설정될 수 있다. 또는, 상위 뎁스 파티션의 바이너리 트리 분할 형태가 Nx2N 형태인 경우, 하위 뎁스 파티션의 분할 형태도 Nx2N 형태로 설정될 수 있다.
또는, 트리플 트리 기반의 분할 결과로 생성된 파티션들 중 크기가 가장 큰 파티션에는 상위 뎁스 파티션의 분할 방향과 동일한 바이너리 트리 분할 또는 상위 뎁스 파티션의 분할 방향과 동일한 트리플 트리 분할이 허용되지 않도록 설정될 수 있다.
또는, 상위 뎁스 파티션의 분할 형태와 이웃 하위 뎁스 파티션의 분할 형태를 고려하여, 하위 뎁스 파티션의 분할 형태가 결정될 수 있다. 구체적으로, 상위 뎁스 파티션이 바이너리 트리에 기반하여 분할되었다면, 상위 뎁스 파티션을 쿼드 트리에 기반하여 분할한 것과 동일한 결과가 발생하지 않도록, 하위 뎁스 파티션의 분할 형태를 결정할 수 있다. 일 예로, 상위 뎁스 파티션의 분할 형태가 2NxN이고, 이웃 하위 뎁스 파티션의 분할 형태가 Nx2N인 경우, 현재 하위 뎁스 파티션의 분할 형태는 Nx2N으로 설정될 수 없다. 이는, 현재 하위 뎁스 파티션의 분할 형태가 Nx2N를 가질 경우, 상위 뎁스 파티션을 NxN 형태의 쿼드 트리 분할한 것과 동일한 결과가 야기되기 때문이다. 상위 뎁스 파티션의 분할 형태가 Nx2N이고, 이웃 하위 뎁스 파티션의 분할 형태가 2NxN인 경우, 현재 하위 뎁스 파티션의 분할 형태는 2NxN으로 설정될 수 없다. 즉, 상위 뎁스 파티션의 바이너리 트리 분할 형태와 이웃 하위 뎁스 파티션의 바이너리 트리 분할 형태가 상이한 경우, 현재 하위 뎁스 파티션의 바이너리 트리 분할 형태는 상위 뎁스 파티션의 바이너리 트리 분할 형태와 동일하게 설정될 수 있다.
또는, 하위 뎁스 파티션의 바이너리 트리 분할 형태를 상위 뎁스 파티션의 바이너리 트리 분할 형태와 상이하게 설정할 수 있다.
시퀀스, 슬라이스, 또는 코딩 유닛 단위로, 허용되는 바이너리 트리 분할 형태를 결정할 수 있다. 일 예로, 코딩 트리 유닛에 대해 허용되는 바이너리 트리 분할 형태를 2NxN 또는 Nx2N 형태로 제한할 수 있다. 허용되는 분할 형태는 부호화기 또는 복호화기에 기 정의되어 있을 수도 있다. 또는, 허용되는 분할 형태 또는 허용되지 않는 분할 형태에 관한 정보를 부호화하여 비트스트림을 통해 시그날링할 수 있다.
도 7은 특정 형태의 바이너리 트리 기반의 분할만이 허용되는 예를 나타낸 도면이다.
도 7의 (a)는 Nx2N 형태의 바이너리 트리 기반의 분할만이 허용된 예를 나타내고, 도 7의 (b)는 2NxN 형태의 바이너리 트리 기반의 분할만이 허용된 예를 나타낸다.
다양한 분할 형태를 나타내기 위해, 쿼드 트리 분할에 관한 정보, 바이너리 트리 분할에 관한 정보 또는 트리플 트리 분할에 관한 정보가 이용될 수 있다. 쿼드 트리 분할에 관한 정보는, 쿼드 트리 기반의 분할이 수행되는지 여부를 지시하는 정보 또는 쿼드 트리 기반의 분할이 허용되는 코딩 블록의 크기/깊이에 관한 정보 중 적어도 하나를 포함할 수 있다. 바이너리 트리 분할에 관한 정보는, 바이너리 트리 기반의 분할이 수행되는지 여부를 지시하는 정보, 바이너리 트리 기반의 분할이 세로 방향인지 또는 가로 방향인지 여부를 나타내는 정보, 바이너리 트리 기반의 분할이 허용되는 코딩 블록의 크기/깊이에 대한 정보 또는 바이너리 트리 기반의 분할이 허용되지 않는 코딩 블록의 크기/깊이에 대한 정보 중 적어도 하나를 포함할 수 있다. 트리플 트리 분할에 관한 정보는, 트리플 트리 기반의 분할이 수행되는지 여부를 지시하는 정보, 트리플 트리 기반의 분할이 세로 방향인지 또는 가로 방향인지 여부를 나타내는 정보, 트리플 트리 기반의 분할이 허용되는 코딩 블록의 크기/깊이에 대한 정보 또는 트리플 트리 기반의 분할이 허용되지 않는 코딩 블록의 크기/깊이에 대한 정보 중 적어도 하나를 포함할 수 있다. 코딩 블록의 크기에 대한 정보는, 코딩 블록의 너비, 높이, 너비와 높이의 곱 또는 너비와 높이비 중 적어도 하나의 최소값 또는 최대값을 나타낼 수 있다.
일 예로, 코딩 블록의 너비 또는 높이가 바이너리 트리 분할이 허용되는 최소 크기 이하인 경우, 또는, 코딩 블록의 분할 깊이가 바이너리 트리 분할이 허용되는 최대 깊이보다 큰 경우, 상기 코딩 블록에 대해 바이너리 트리 기반의 분할이 허용되지 않을 수 있다.
일 예로, 코딩 블록의 너비 또는 높이가 트리플 트리 분할이 허용되는 최소 크기 이하인 경우, 또는, 코딩 블록의 분할 깊이가 트리플 트리 분할이 허용되는 최대 깊이보다 큰 경우, 상기 코딩 블록에 대해 트리플 트리 기반의 분할이 허용되지 않을 수 있다.
바이너리 트리 또는 트리플 트리 기반의 분할 허용 조건에 관한 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 시퀀스, 픽처 또는 조각 영상 단위로 부호화될 수 있다. 상기 조각 영상은, 슬라이스, 타일 그룹, 타일, 브릭, 코딩 블록, 예측 블록 또는 변환 블록 중 적어도 하나를 의미할 수 있다.
일 예로, 비트스트림을 통해, 바이너리 트리/트리플 트리 분할이 허용되는 최대 뎁스를 나타내는 신택스 'max_mtt_depth_idx_minus1'가 비트스트림을 통해 부호화/복호화될 수 있다. 이 경우, max_mtt_depth_idx_minus1+1이 바이너리 트리/트리플 트리 분할이 허용되는 최대 뎁스를 가리킬 수 있다.
일 예로, 바이너리 트리/트리플 트리 분할이 허용되는 횟수, 바이너리 트리/트리플 트리 분할이 허용되는 최대 깊이 또는 바이너리 트리/트리플 트리 분할이 허용된 뎁스의 개수 중 적어도 하나는 시퀀스 또는 슬라이스 레벨에서 시그날링될 수 있다. 이에 따라, 제1 슬라이스 및 제2 슬라이스의, 바이너리 트리/트리플 트리 분할 횟수, 바이너리 트리/트리플 트리 분할이 허용되는 최대 뎁스 또는 바이너리 트리/트리플 트리 분할이 허용되는 뎁스의 개수 중 적어도 하나가 상이할 수 있다. 일 예로, 제1 슬라이스에서는, 하나의 뎁스에서만 바이너리 트리/트리플 트리 분할이 허용되는 반면, 제2 슬라이스에서는, 두개의 뎁스에서 바이너리 트리/트리플 트리 분할이 허용될 수 있다.
도 8에 도시된 예를 살펴보면, 도 8에서는, 뎁스 2인 코딩 유닛 및 뎁스 3인 코딩 유닛에 대해 바이너리 트리 분할이 수행된 것으로 도시되었다. 이에 따라, 코딩 트리 유닛 내 바이너리 트리 분할이 수행된 횟수(2회)를 나타내는 정보, 코딩 트리 유닛 내 바이너리 트리 분할로 생성된 파티션의 최대 뎁스(뎁스 3)를 나타내는 정보 또는 코딩 트리 유닛 내 바이너리 트리 분할이 적용된 파티션 뎁스의 개수(2개, 뎁스 2 및 뎁스 3)를 나타내는 정보 중 적어도 하나가 비트스트림을 통해 부호화/복호화될 수 있다.
또는, 부호화기 및 복호화기에서 바이너리 트리/트리플 트리 분할이 허용되는 횟수, 바이너리 트리/트리플 트리 분할이 허용되는 깊이 또는 바이너리 트리/트리플 트리 분할이 허용되는 뎁스의 개수가 기 정의되어 있을 수 있다. 또는, 시퀀스 또는 슬라이스의 인덱스 또는 코딩 유닛의 크기/형태 중 적어도 하나에 기초하여, 바이너리 트리/트리플 트리 분할이 허용되는 횟수, 바이너리 트리/트리플 트리 분할이 허용되는 깊이 또는 바이너리 트리/트리플 트리 분할이 허용되는 뎁스의 개수가 결정될 수 있다. 일 예로, 제1 슬라이스에서는, 하나의 뎁스에서 바이너리 트리/트리플 트리 분할이 허용되고, 제2 슬라이스에서는 두개의 뎁스에서 바이너리 트리/트리플 트리 분할이 허용될 수 있다.
다른 예로, 슬라이스 또는 픽쳐의 시간레벨 식별자(TemporalID)에 따라 바이너리 트리 분할이 허용되는 횟수, 바이너리 트리 분할이 허용되는 깊이 또는 바이너리 트리 분할이 허용되는 뎁스의 개수 중 적어도 하나를 상이하게 설정할 수도 있다. 여기서, 시간레벨 식별자(TemporalID)는, 시점(view), 공간(spatial), 시간(temporal) 또는 화질(quality) 중 적어도 하나 이상의 스케일러빌리티(Scalability)를 갖는 영상의 복수개의 레이어 각각을 식별하기 위한 것이다.
도 4에 도시된 바와 같이, 분할 깊이(split depth)가 k인 제1 코딩 블록 300은 쿼드 트리(quad tree)에 기반하여 복수의 제2 코딩 블록으로 분할될 수 있다. 예를 들어, 제2 코딩 블록 310 내지 340은 제1 코딩 블록의 너비와 높이의 절반 크기를 가진 정방형 블록이며, 제2 코딩 블록의 분할 깊이는 k+1로 증가될 수 있다.
분할 깊이가 k+1인 제2 코딩 블록 310은 분할 깊이가 k+2인 복수의 제3 코딩 블록으로 분할될 수 있다. 제2 코딩 블록 310의 분할은 분할 방식에 따라 쿼트 트리 또는 바이너리 트리 중 어느 하나를 선택적으로 이용하여 수행될 수 있다. 여기서, 분할 방식은 쿼드 트리 기반으로의 분할을 지시하는 정보 또는 바이너리 트리 기반의 분할을 지시하는 정보 중 적어도 하나에 기초하여 결정될 수 있다.
제2 코딩 블록 310이 쿼트 트리 기반으로 분할되는 경우, 제2 코딩 블록 310은 제2 코딩 블록의 너비와 높이의 절반 크기를 가진 4개의 제3 코딩 블록 310a으로 분할되며, 제3 코딩 블록 310a의 분할 깊이는 k+2로 증가될 수 있다. 반면, 제2 코딩 블록 310이 바이너리 트리 기반으로 분할되는 경우, 제2 코딩 블록 310은 2개의 제3 코딩 블록으로 분할될 수 있다. 이때, 2개의 제3 코딩 블록 각각은 제2 코딩 블록의 너비와 높이 중 어느 하나가 절반 크기인 비정방형 블록이며, 분할 깊이는 k+2로 증가될 수 있다. 제2 코딩 블록은 분할 방향에 따라 가로 방향 또는 세로 방향의 비정방형 블록으로 결정될 수 있고, 분할 방향은 바이너리 트리 기반의 분할이 세로 방향인지 또는 가로 방향인지에 관한 정보에 기초하여 결정될 수 있다.
한편, 제2 코딩 블록 310은 쿼드 트리 또는 바이너리 트리에 기반하여 더 이상 분할되지 않는 말단 코딩 블록으로 결정될 수도 있고, 이 경우 해당 코딩 블록은 예측 블록 또는 변환 블록으로 이용될 수 있다.
제3 코딩 블록 310a은 제2 코딩 블록 310의 분할과 마찬가지로 말단 코딩 블록으로 결정되거나, 쿼드 트리 또는 바이너리 트리에 기반하여 추가적으로 분할될 수 있다.
한편, 바이너리 트리 기반으로 분할된 제3 코딩 블록 310b은 추가적으로 바이너리 트리에 기반하여 세로 방향의 코딩 블록(310b-2) 또는 가로 방향의 코딩 블록(310b-3)으로 더 분할될 수도 있고, 해당 코딩 블록의 분할 깊이는 k+3으로 증가될 수 있다. 또는, 제3 코딩 블록 310b는 바이너리 트리에 기반하여 더 이상 분할되지 않는 말단 코딩 블록(310b-1)으로 결정될 수 있고, 이 경우 해당 코딩 블록(310b-1)은 예측 블록 또는 변환 블록으로 이용될 수 있다. 다만, 상술한 분할 과정은 쿼드 트리 기반의 분할이 허용되는 코딩 블록의 크기/깊이에 관한 정보, 바이너리 트리 기반의 분할이 허용되는 코딩 블록의 크기/깊이에 대한 정보 또는 바이너리 트리 기반의 분할이 허용되지 않는 코딩 블록의 크기/깊이에 대한 정보 중 적어도 하나에 기초하여 제한적으로 수행될 수 있다.
코딩 블록이 가질 수 있는 크기 후보는 소정 개수로 제한되거나, 소정 단위 내 코딩 블록의 크기는 고정된 값을 가질 수도 있다. 일 예로, 시퀀스 내 코딩 블록의 크기 또는 픽처 내 코딩 블록의 크기가, 256x256, 128x128 또는 32x32 중 어느 하나를 갖도록 제한할 수 있다. 시퀀스 또는 픽처 내 코딩 블록의 크기를 나타내는 정보가 시퀀스 헤더 또는 픽처 헤더를 통해 시그널링 될 수 있다.
쿼드 트리 및 바이너리 트리에 기반한 분할 결과, 코딩 유닛은, 정방형 또는 임의 크기의 직사각형을 띨 수 있다.
도 4에 도시된 바와 같이, 분할 깊이(split depth)가 k인 제1 코딩 블록 300은 쿼드 트리(quad tree)에 기반하여 복수의 제2 코딩 블록으로 분할될 수 있다. 예를 들어, 제2 코딩 블록 310 내지 340은 제1 코딩 블록의 너비와 높이의 절반 크기를 가진 정방형 블록이며, 제2 코딩 블록의 분할 깊이는 k+1로 증가될 수 있다.
분할 깊이가 k+1인 제2 코딩 블록 310은 분할 깊이가 k+2인 복수의 제3 코딩 블록으로 분할될 수 있다. 제2 코딩 블록 310의 분할은 분할 방식에 따라 쿼트 트리 또는 바이너리 트리 중 어느 하나를 선택적으로 이용하여 수행될 수 있다. 여기서, 분할 방식은 쿼드 트리 기반으로의 분할을 지시하는 정보 또는 바이너리 트리 기반의 분할을 지시하는 정보 중 적어도 하나에 기초하여 결정될 수 있다.
제2 코딩 블록 310이 쿼트 트리 기반으로 분할되는 경우, 제2 코딩 블록 310은 제2 코딩 블록의 너비와 높이의 절반 크기를 가진 4개의 제3 코딩 블록 310a으로 분할되며, 제3 코딩 블록 310a의 분할 깊이는 k+2로 증가될 수 있다. 반면, 제2 코딩 블록 310이 바이너리 트리 기반으로 분할되는 경우, 제2 코딩 블록 310은 2개의 제3 코딩 블록으로 분할될 수 있다. 이때, 2개의 제3 코딩 블록 각각은 제2 코딩 블록의 너비와 높이 중 어느 하나가 절반 크기인 비정방형 블록이며, 분할 깊이는 k+2로 증가될 수 있다. 제2 코딩 블록은 분할 방향에 따라 가로 방향 또는 세로 방향의 비정방형 블록으로 결정될 수 있고, 분할 방향은 바이너리 트리 기반의 분할이 세로 방향인지 또는 가로 방향인지에 관한 정보에 기초하여 결정될 수 있다.
한편, 제2 코딩 블록 310은 쿼드 트리 또는 바이너리 트리에 기반하여 더 이상 분할되지 않는 말단 코딩 블록으로 결정될 수도 있고, 이 경우 해당 코딩 블록은 예측 블록 또는 변환 블록으로 이용될 수 있다.
제3 코딩 블록 310a은 제2 코딩 블록 310의 분할과 마찬가지로 말단 코딩 블록으로 결정되거나, 쿼드 트리 또는 바이너리 트리에 기반하여 추가적으로 분할될 수 있다.
한편, 바이너리 트리 기반으로 분할된 제3 코딩 블록 310b은 추가적으로 바이너리 트리에 기반하여 세로 방향의 코딩 블록(310b-2) 또는 가로 방향의 코딩 블록(310b-3)으로 더 분할될 수도 있고, 해당 코딩 블록의 분할 깊이는 k+3으로 증가될 수 있다. 또는, 제3 코딩 블록 310b는 바이너리 트리에 기반하여 더 이상 분할되지 않는 말단 코딩 블록(310b-1)으로 결정될 수 있고, 이 경우 해당 코딩 블록(310b-1)은 예측 블록 또는 변환 블록으로 이용될 수 있다. 다만, 상술한 분할 과정은 쿼드 트리 기반의 분할이 허용되는 코딩 블록의 크기/깊이에 관한 정보, 바이너리 트리 기반의 분할이 허용되는 코딩 블록의 크기/깊이에 대한 정보 또는 바이너리 트리 기반의 분할이 허용되지 않는 코딩 블록의 크기/깊이에 대한 정보 중 적어도 하나에 기초하여 제한적으로 수행될 수 있다.
코딩 블록이 가질 수 있는 크기 후보는 소정 개수로 제한되거나, 소정 단위 내 코딩 블록의 크기는 고정된 값을 가질 수도 있다. 일 예로, 시퀀스 내 코딩 블록의 크기 또는 픽처 내 코딩 블록의 크기가, 256x256, 128x128 또는 32x32 중 어느 하나를 갖도록 제한할 수 있다. 시퀀스 또는 픽처 내 코딩 블록의 크기를 나타내는 정보가 시퀀스 헤더 또는 픽처 헤더를 통해 시그널링 될 수 있다.
쿼드 트리 및 바이너리 트리에 기반한 분할 결과, 코딩 유닛은, 정방형 또는 임의 크기의 직사각형을 띨 수 있다.
바이너리 트리 기반의 분할 또는 트리플 트리 기반의 분할 결과로 생성된 코딩 유닛에는 변환 스킵(Transform skip)이 사용되지 않도록 설정될 수 있다. 또는, 비정방형 코딩 유닛에는 수직 방향 또는 수평 방향 중 적어도 하나에서만 변환 스킵이 적용 가능하도록 설정될 수 있다. 일 예로, 수평 방향에 변환 스킵이 적용되는 경우, 수평 방향으로는 변환/역변환 없이 스케일링만이 수행되고, 수직 방향으로는 DCT 또는 DST를 이용한 변환/역변환이 수행되는 것을 나타낸다. 수직 방향에 변환 스킵이 적용되는 경우, 수직 방향으로는 변환/역변환 없이 스케일링만이 수행되고, 수평 방향으로는 DCT 또는 DST를 이용한 변환/역변환이 수행되는 것을 나타낸다.
수평 방향에 대한 역변환을 스킵할 것인지 여부에 대한 정보 또는 수직 방향에 대한 역변환을 스킵할 것인지 여부를 나타내는 정보는 비트스트림을 통해 시그널링될 수 있다. 일 예로, 수평 방향에 대한 역변환을 스킵할 것인지 여부를 나타내는 정보는 1비트의 플래그로, 'hor_transform_skip_flag'이고, 수직 방향에 대한 역변환을 스킵할 것인지 여부를 나타내는 정보는 1비트의 플래그로, 'ver_transform_skip_flag'일 수 있다.
부호화기는, 현재 블록의 크기 및/또는 형태에 따라, 'hor_transform_skip_flag' 또는 'ver_transform_skip_flag' 의 부호화 여부를 결정할 수 있다. 일 예로, 현재 블록이 Nx2N 형태인 경우, hor_transform_skip_flag를 부호화하고, ver_transform_skip_flag의 부호화를 생략할 수 있다. 현재 블록이 2NxN 형태인 경우, ver_transform_skip_flag를 부호화하고, hor_transform_skip_flag를 생략할 수 있다.
또는, 현재 블록의 크기 및/또는 형태에 기초하여, 수평 방향에 대한 변환 스킵 여부 또는 수직 방향에 대한 변환 스킵 여부를 결정할 수 있다. 일 예로, 현재 블록이 Nx2N 형태인 경우, 수평 방향에 대해 변환 스킵을 적용하고 수직 방향에 대해 변환/역변환을 수행할 수 있다. 현재 블록이 2NxN 형태인 경우, 수직 방향에 대해 변환 스킵을 적용하고, 수평 방향에 대해 변환/역변환을 수행할 수 있다. 변환/역변환은, DCT 또는 DST 중 적어도 하나를 기초로 수행될 수 있다.
쿼드 트리, 바이너리 트리 또는 트리플 트리에 기반한 분할 결과, 더 이상 분할되지 않는 코딩 블록은 예측 블록 또는 변환 블록으로 이용될 수 있다. 즉, 쿼드 트리 파티셔닝 또는 바이너리 트리 파티셔닝의 결과로 생성된 코딩 블록, 예측 블록 또는 변환 블록으로 사용할 수 있다. 일 예로, 코딩 블록 단위로 예측 영상을 생성하고, 코딩 블록 단위로 원본 영상과 예측 영상간의 차분인 잔차 신호가 변환될 수 있다. 코딩 블록 단위로 예측 영상을 생성하기 위해, 코딩 블록을 기준으로 모션 정보가 결정되거나, 코딩 블록을 기준으로 인트라 예측 모드가 결정될 수 있다. 이에 따라, 코딩 블록은, 스킵 모드, 화면 내 예측 또는 화면 간 예측 중 적어도 하나를 이용하여 부호화될 수 있다.
또는, 코딩 블록을 분할함에 따라 생성된 복수의 코딩 블록들이 움직임 정보, 머지 후보, 참조 샘플, 참조 샘플 라인 또는 인트라 예측 모드 중 적어도 하나를 공유하도록 설정할 수 있다. 일 예로, 코딩 블록이 트리플 트리 분할된 경우, 상기 코딩 블록을 분할함으로써 생성된 파티션들은 코딩 블록의 크기 또는 형태에 따라 움직임 정보, 머지 후보, 참조 샘플, 참조 샘플 라인 또는 인트라 예측 모드 중 적어도 하나를 공유할 수 있다. 또는, 복수의 코딩 블록들 중 일부만이 상기 정보를 공유하고, 잔여 코딩 블록은 상기 정보를 공유하지 않도록 설정될 수 있다.
다른 예로, 코딩 블록을 분할하여, 코딩 블록보다 작은 크기를 갖는 예측 블록 또는 변환 블록을 이용하는 것도 가능하다.
이하, 코딩 블록 또는 코딩 블록을 분할함으로써 생성된 예측 블록 또는 변환 블록에 대한 인트라 예측 수행 방법에 대해 상세히 설명하기로 한다.
도 9는 본 발명이 적용되는 일실시예로서, 영상 부호화기/복호화기에 기-정의된 인트라 예측 모드의 종류를 도시한 것이다.
영상 부호화기/복호화기는 기-정의된 인트라 예측 모드 중 어느 하나를 이용하여 인트라 예측을 수행할 수 있다. 인트라 예측을 위한 기-정의된 인트라 예측 모드는 비방향성 예측 모드(예를 들어, Planar mode, DC mode) 및 33개의 방향성 예측 모드(directional prediction mode)로 구성될 수 있다.
또는, 인트라 예측의 정확도를 높이기 위해 33개 보다 더 많은 개수의 방향성 예측 모드를 정의할 수 있다. 즉, 방향성 예측 모드의 각도(angle)를 더 세분화하여 M개의 확장된 방향성 예측 모드를 정의할 수도 있다(M>33). 기존 33개의 방향성 예측 모드와는 상이한 방향성 예측 모드는 기존 33개의 방향성 예측 모드 중 적어도 하나를 기초로 유도될 수 있다.
이에 따라, 도 9에 도시된 35개의 인트라 예측 모드 보다 더 많은 수의 인트라 예측 모드가 정의될 수 있다. 이용 가능한 인트라 예측 모드의 개수가 도 9에 도시된 35개 보다 더 많은 것을 확장된 인트라 모드라 호칭할 수 있다.
도 10은 확장된 인트라 모드 하에서 이용 가능한 인트라 예측 모드들을 나타낸 도면이다. 확장된 인트라 모드 하에서, 이용 가능한 인트라 예측 모드는 2개의 비방향성 예측 모드와 65개의 확장된 방향성 예측 모드로 구성될 수 있다.
이용 가능한 인트라 예측 모드의 개수는 휘도 성분과 색차 성분에 대해 동일하게 설정될 수 있다. 또는, 컬러 성분 별로 이용 가능한 인트라 예측 모드의 개수가 상이할 수 있다. 예를 들어, 휘도 성분에서는 67개의 인트라 예측 모드 중 어느 하나를 선택하여 사용하고, 색차 성분에서는 35개의 인트라 예측 모드 중 어느 하나를 선택하여 사용할 수 있다.
또는, 색차 포맷(format)에 따라 이용 가능한 인트라 예측 모드의 개수가 상이할 수 있다. 예를 들어, 4:2:0 format 하에서, 휘도 성분에 대해서는 67개의 인트라 예측 모드가 이용 가능하도록 설정되고, 색차 성분에 대해서는 35개의 인트라 예측 모드가 이용 가능하도록 설정될 수 있다. 4:4:4 format 하에서, 휘도 성분 및 색차 성분 모두에 대해, 67개의 인트라 예측 모드가 이용 가능하도록 설정될 수 있다.
또는, 블록의 크기 및/또는 형태에 따라 이용 가능한 인트라 예측 모드의 개수가 상이할 수 있다. 구체적으로, PU, TU 또는 CU의 크기 및/또는 형태에 따라 이용 가능한 인트라 예측 모드의 개수가 35개 또는 67개로 결정될 수 있다. 예를 들어, CU, TU 또는 PU의 크기가 64x64보다 작은 경우, 또는 CU, TU 또는 PU가 비대칭 파티션(asymmetric partition)인 경우, 이용 가능한 인트라 예측 모드의 개수는 35개일 수 있다. 반면, CU, TU 또는 PU의 크기가 64x64 이상인 경우 또는 CU, TU 또는 PU가 대칭형 파티션(symmetric partition)인 경우, 이용 가능한 인트라 예측 모드의 개수는 67개로 설정될 수 있다.
또는, Intra_2Nx2N 파티션에 대해서는 이용 가능한 방향성 인트라 예측 모드의 개수가 65개로 설정될 수 있다. 반면, Intra_NxN 파티션에 대해서는 이용 가능한 방향성 인트라 예측 모드의 개수가 33개로 설정될 수 있다.
확장된 인트라 모드가 적용되는지 여부는 블록의 크기, 형태 또는 컬러 성분 중 적어도 하나를 기초로 결정될 수 있다. 이때, 확장된 인트라 모드가 적용되는 블록의 크기 또는 형태를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 정보는 시퀀스, 픽처 또는 슬라이스 레벨에서 시그날링될 수 있다. 이에 따라, 시퀀스, 픽처 또는 슬라이스 마다, 확장된 인트라 모드가 적용되는 블록의 크기가 상이할 수 있다. 일 예로, 제1 슬라이스에서는, 64x64 보다 큰 블록(예컨대, CU, TU 또는 PU)에 확장된 인트라 모드가 적용되도록 설정되고, 제2 슬라이스에서는, 32x32 보다 큰 블록에 확장된 인트라 모드가 적용되도록 설정될 수 있다.
확장된 인트라 모드가 적용되는 블록의 크기를 나타내는 정보는, 기준 블록의 크기에 로그값을 취한 뒤 소정의 값을 차감한 것일 수 있다. 일 예로, 기준 블록의 크기에 로그값을 취한 값에 정수 4를 차감한 'log2_extended_intra_mode_size_minus4'이 부호화될 수 있다. 일 예로, log2_extended_intra_mode_size_minus4 의 값이 0인 것은, 16x16 이상의 크기를 갖는 블록 또는 16x16 보다 큰 크기를 갖는 블록에 확장된 인트라 모드가 적용됨을 나타내고, log2_extended_intra_mode_size_minus4 의 값이 1인 것은, 32x32 이상의 크기를 갖는 블록 또는 32x32 보다 큰 크기를 갖는 블록에 확장된 인트라 모드가 적용됨을 나타낼 수 있다.
상술한 바와 같이, 색차 성분, 색차 포맷, 블록의 크기 또는 형태 중 적어도 하나에 기초하여, 이용 가능한 인트라 예측 모드의 개수가 결정될 수 있다. 현재 블록에 대한 인트라 예측은 이용 가능한 인트라 예측 모드들 중 적어도 하나에 기초하여 수행될 수 있다.
설명한 예에 그치지 않고, 부호화/복호화 대상 블록의 인트라 예측 모드를 결정하기 위해 이용되는, 인트라 예측 모드 후보자(예컨대, MPM의 개수)도, 색차 성분, 색차 포맷, 블록의 크기 또는 형태 중 적어도 하나에 따라 결정될 수도 있다. 또한, 도 9에 도시된 것 보다 더 많은 수의 인트라 예측 모드를 이용하는 것도 가능하다. 예컨대, 도 9에 도시된 방향성 예측 모드를 더욱 세분화하여, 129개의 방향성 예측 모드와 2개의 비방향성 예측 모드를 사용하는 것도 가능하다. 도 9에 도시된 것보다 더 많은 수의 인트라 예측 모드를 사용할 것인지 여부는 상술한 예에서와 같이, 색차 성분, 색차 성분, 블록의 크기 또는 형태 중 적어도 하나를 고려하여 결정될 수 있다.
후술되는 도면을 참조하여, 부호화/복호화 대상 블록의 인트라 예측 모드를 결정하는 방법 및 결정된 인트라 예측 모드를 이용하여, 인트라 예측을 수행하는 방법에 대해 살펴보기로 한다.
후술되는 도면을 참조하여, 부호화/복호화 대상 블록의 인트라 예측 모드를 결정하는 방법 및 결정된 인트라 예측 모드를 이용하여, 인트라 예측을 수행하는 방법에 대해 살펴보기로 한다.
도 11은 본 발명이 적용되는 일실시예로서, 인트라 예측 방법을 개략적으로 도시한 순서도이다.
먼저, 현재 블록의 참조 샘플 라인 인덱스를 결정할 수 있다(S1110). 참조 샘플 라인 인덱스는, 현재 블록의 인트라 예측을 수행하는데 이용되는 참조 샘플 라인을 결정하는데 이용될 수 있다. 복수의 참조 샘플 라인 중 참조 샘플 라인 인덱스에 지시되는 적어도 하나의 참조 샘플 라인이 현재 블록의 인트라 예측을 수행하는데 이용될 수 있다.
도 12는 참조 샘플 라인 후보들 예시한 도면이다.
N번째 참조 샘플 라인은, 현재 블록의 최상단 행보다 y좌표가 N만큼 작은 상단 참조 샘플 및 현재 블록의 최좌측 열보다 x좌표가 N만큼 작은 좌측 참조 샘플을 포함할 수 있다. 여기서, N번째 참조 샘플 라인은 도 12에 도시된 예에서 인덱스가 N-1인 참조 샘플 라인을 나타낸다. N번째 참조 샘플 라인은, P(-N, -N)부터 P(2W+N-1, -N)까지의 상단 참조 샘플들 및 P(-N, -N)부터 P(-N, 2H+N-1)까지의 좌측 참조 샘플들을 포함할 수 있다. 일 예로, 참조 샘플 라인 1은 P(-2, _2)부터 P(2W+1, -2) 까지의 상단 참조 샘플들 및 P(-2, -2)부터 P(-2, 2H+1)까지의 좌측 참조 샘플들을 포함할 수 있다.
참조 샘플 라인 후보로 이용될 수 있는 참조 샘플 라인의 개수는 1개, 2개, 3개, 4개 혹은 그 이상일 수 있다. 일 예로, 도 12에 도시된 예에서, 참조 샘플 라인 0, 참조 샘플 라인 1 및 참조 샘플 라인 3이 참조 샘플 라인 후보로 이용될 수 있다.
참조 샘플 라인 후보로 이용될 수 있는 참조 샘플 라인의 개수 또는 참조 샘플 라인의 위치는 현재 블록의 크기, 형태, 인트라 예측 모드 또는 위치 중 적어도 하나에 기초하여 결정될 수 있다. 일 예로, 현재 블록이 CTU의 경계 또는 타일의 경계에 인접 위치하는 경우, 참조 샘플 라인 후보의 개수는 1개(예컨대, 참조 샘플 라인 0)일 수 있다. 현재 블록이 CTU의 경계 또는 타일의 경계에 인접 위치하지 않는 경우, 참조 샘플 라인 후보의 개수는 3개(예컨대, 참조 샘플 라인 0, 참조 샘플 라인 1, 참조 샘플 라인 3)일 수 있다. 일 예로, 현재 블록의 인트라 예측 모드가 제1 범위에 속하는 경우, 참조 샘플 라인 0, 참조 샘플 라인 1 및 참조 샘플 라인 3이 참조 샘플 라인 후보로서 이용될 수 있다. 현재 블록의 인트라 예측 모드가 제2 범위에 속하는 경우, 참조 샘플 라인 0, 참조 샘플 라인 2 및 참조 샘플 라인 2가 참조 샘플 라인 후보로서 이용될 수 있다.
참조 샘플 라인 후보들 중 적어도 하나를 특정하는 정보가 비트스트림을 통해 시그날링될 수 있다. 이용 가능한 참조 샘플 라인 후보의 개수가 1개인 경우, 상기 인덱스 정보의 부호화가 생략될 수 있다. 상기 인덱스 정보가 부호화되지 않은 경우, 현재 블록에 인접하는 참조 샘플 라인 0이 선택된 것으로 간주될 수 있다.
또는, 현재 블록의 크기, 형태, 위치 또는 인트라 예측 모드 중 적어도 하나에 기초하여, 참조 샘플 라인 후보들 중 적어도 하나를 선택할 수 있다. 일 예로, 현재 블록의 너비, 높이, 크기 중 적어도 하나가 기 정의된 값보다 작은 경우, 참조 샘플 라인 0이 선택될 수 있다. 일 예로, 현재 블록이 CTU 또는 타일의 상단 경계와 접하는 경우, 참조 샘플 라인 0가 선택될 수 있다.
또는, 현재 블록이 서브 블록으로 분할되었는지 여부를 기초로, 참조 샘플 라인을 선택할 수 있다. 일 예로, 현재 블록이 서브 블록으로 분할된 경우, 참조 샘플 라인 0이 선택될 수 있다.
또는, 현재 블록이 복수의 서브 블록들로 분할된 경우, 서브 블록별로 참조 샘플 라인을 결정할 수 있다. 또는, 모든 서브 블록들이 동일한 참조 샘플 라인 인덱스를 갖도록 정의할 수 있다.
현재 블록이 복수의 서브 블록들로 분할된 경우, 서브 블록 단위로 인트라 예측이 수행될 수 있다.
현재 블록에 대해 복수 참조 샘플 라인이 선택될 수 있다. 복수의 참조 샘플 라인을 이용하여 인트라 예측을 수행할 것인지 여부는 현재 블록의 크기, 형태 또는 인트라 예측 모드 등에 따라 적응적으로 결정될 수 있다. 일 예로, 현재 블록의 인트라 예측 모드가 비 방향성 예측 모드인 경우 또는 기 정의된 방향성 인트라 예측 모드인 경우, 복수 참조 샘플 라인을 이용하지 못할 수 있다. 기 정의된 방향성 인트라 예측 모드는, 수직 방향 인트라 예측 모드, 수평 방향 인트라 예측 모드 또는 대각 방향 인트라 예측 모드 중 적어도 하나를 포함할 수 있다.
복수 참조 샘플 라인은, 인덱스 정보에 의해 선택된 참조 샘플 라인 및 상기 참조 샘플 라인의 인덱스에 기 정의된 값을 가산 또는 감산한 참조 샘플 라인을 포함할 수 있다. 여기서, 기 정의된 값은, 1 또는 2일 수 있다.
또는, 복수의 인덱스 정보가 비스스트림을 통해 시그날링될 수 있다. 복수 인덱스 정보 각각은 서로 다른 참조 샘플 라인을 가리킨다.
예측 샘플은 복수 참조 샘플들의 가중합 연산, 평균 연산, 최소값 연산 또는 최대값 연산 중 적어도 하나를 기초로 획득될 수 있다. 여기서, 복수 참조 샘플들 중 적어도 하나를 포함하는 참조 샘플 라인의 인덱스는 나머지를 포함하는 참조 샘플 라인의 인덱스와 상이할 수 있다.
다음으로, 현재 블록의 인트라 예측 모드를 결정할 수 있다(S1220).
현재 블록의 인트라 예측 모드를 결정하기 위해, 현재 블록에 이웃하는 이웃 블록의 인트라 예측 모드를 기초로 MPM(Most Probable Mode) 후보를 유도할 수 있다. 여기서, 이웃 블록은 현재 블록의 상단, 하단, 좌측, 우측 또는 코너에 인접하는 블록 중 적어도 하나를 포함할 수 있다. 일 예로, 상단 이웃 블록의 인트라 예측 모드 및 좌측 이웃 블록의 인트라 예측 모드를 기초로, MPM 후보가 유도될 수 있다. 상단 이웃 블록은 현재 블록의 최상단 행보다 y좌표의 값이 작은 기 정의된 위치의 상단 이웃 샘플을 포함할 수 있다. 기 정의된 위치는 (0, -1), (W/2, -1), (W-1, -1) 또는 (W, -1)일 수 있다. (0, 0)은 현재 블록이 포함하는 좌측 상단 샘플의 위치를 나타내고, W는 현재 블록의 너비를 나타낸다. 좌측 이웃 블록의 현재 블록의 최좌측 열보다 x좌표의 값이 작은 기 정의된 위치의 좌측 이웃 샘플을 포함할 수 있다. 기 정의된 위치는 (-1, 0), (-1, H/2), (-1, H-1) 또는 (-1, H)일 수 있다. H는 현재 블록의 높이를 나타낸다. 만약, 이웃 블록이 인터 예측으로 부호화되었다면, 이웃 블록 또는 현재 블록의 콜로케이티드 블록(Collocated block)의 인트라 예측 모드를 이용하여 MPM 후보를 포함할 수 있다.
후보 리스트가 포함하는 MPM (Most Probable Mode) 후보의 개수는 3개, 4개, 5개, 6개 혹은 그 이상일 수 있다. MPM 후보의 최대 개수는 영상 부호화기/복호화기에 기-설정된 고정된 값일 수 있다. 또는, MPM 후보의 최대 개수는 현재 블록의 속성에 기초하여 결정될 수 있다. 상기 속성은 현재 블록의 위치/크기/형태, 현재 블록이 이용할 수 있는 인트라 예측 모드의 개수/종류, 현재 블록의 컬러 타입(루마/크로마), 현재 블록의 색차 포맷, 현재 블록이 복수의 서브 블록들로 분할되었는지 여부 중 적어도 하나를 포함할 수 있다. 또는, MPM 후보의 최대 개수를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 최대 개수를 나타내는 정보는 시퀀스 레벨, 픽쳐 레벨, 슬라이스 레벨 또는 블록 레벨 중 적어도 하나에서 시그날링될 수 있다.
이웃 블록의 인트라 예측 모드, 이웃 블록과 유사한 방향성 인트라 예측 모드 또는 디폴트 모드 등이 MPM 후보로 설정될 수 있다. 이웃 블록과 유사한 방향성 인트라 예측 모드는, 이웃 블록의 인트라 예측 모드에 기 정의된 값을 가산 또는 감산하여 유도될 수 있다. 기 정의된 값은, 1, 2 또는 그 이상의 정수일 수 있다. 기 정의된 값은 사용 가능한 인트라 예측 모드의 개수에 따라 적응적으로 결정될 수 있다. 일 예로, 사용 가능한 인트라 예측 모드의 개수가 35개인 경우, 기 정의된 값은 1로 설정되고, 사용 가능한 인트라 예측 모드의 개수가 67개인 경우 기 정의된 값은 2로 설정될 수 있다. 나아가, 사용 가능한 인트라 예측 모드의 개수가 131개인 경우, 기 정의된 값은 4로 설정될 수 있다. 제1 이웃 블록의 인트라 예측 모드 및 제2 이웃 블록의 인트라 예측 모드가 모두 방향성 예측 모드인 경우, 제1 이웃 블록의 인트라 예측 모드 및 제2 이웃 블록의 인트라 예측 모드 중 최대값을 기초로, 유사한 방향성 인트라 예측 모드를 유도할 수 있다. 디폴트 모드는, DC 모드, 플래너 모드, 수평 방향 예측 모드, 수직 방향 예측 모드, 우상단 대각방향 모드, 좌하단 대각방향 모드 또는 좌상단 대각방향 모드 중 적어도 하나를 포함할 수 있다. MPM 후보 리스트에 포함된 MPM 후보의 개수가 최대 개수보다 작은 경우, MPM 후보 리스트에 기 삽입된 MPM 후보와 상이한 디폴트 모드를 MPM 후보 리스트에 삽입할 수 있다. 디폴트 모드의 개수, 종류 또는 우선순위는 현재 블록의 참조 샘플 라인 인덱스, 현재 블록에 서브 블록 단위의 인트라 예측 기법이 적용되는지 여부 또는 현재 블록의 분할 타입 중 적어도 하나에 따라 상이할 수 있다.
기 정의된 순서에 따라 MPM 후보 인덱스가 결정될 수 있다. 일 예로, 좌측 이웃 블록의 인트라 예측 모드 및 상단 이웃 블록의 인트라 예측 모드가 상이한 경우, 좌측 이웃 블록의 인트라 예측 모드가 상단 이웃 블록의 인트라 예측 모드보다 작은 인덱스 값을 가질 수 있다.
또는, 현재 블록의 크기/형태에 따라, MPM 후보 인덱스가 결정될 수 있다. 일 예로, 현재 블록이 높이가 너비보다 큰 비정방형인 경우, 상단 이웃 블록의 인트라 예측 모드가 좌측 이웃 블록의 인트라 예측 모드보다 작은 인덱스 값을 가질 수 있다. 현재 블록이 너비가 높이보다 큰 비정방형인 경우, 좌측 이웃 블록의 인트라 예측 모드가 상단 이웃 블록의 인트라 예측 모드보다 작은 인덱스 값을 가질 수 있다.
또는, 기 정의된 N개의 인트라 예측 모드들만을 MPM 후보로 이용할 수 있다. 주변 블록의 인트라 예측 모드가 기 정의된 N개의 인트라 예측 모드들과 상이한 경우, 주변 블록의 인트라 예측 모드를 기 정의된 N개의 인트라 예측 모드들 중 하나로 변환하고, 변환된 인트라 예측 모드를 MPM 후보로 설정할 수 있다. 인트라 예측 모드의 변환을 위해 기-정의된 테이블이 이용될 수도 있고, 소정의 값에 기반한 스케일링 연산이 이용될 수도 있다. 여기서, 기-정의된 테이블은 인트라 예측 모드들 간의 매핑 관계를 정의한 것일 수 있다.
일 예로, 주변 블록이 비-확장된 인트라 모드(즉, 이용 가능한 인트라 예측 모드가 35개)로 부호화되고, 현재 블록은 확장된 인트라 모드(즉, 이용 가능한 인트라 예측 모드가 67개)로 부호화된 경우, 주변 블록의 인트라 예측 모드 인덱스를 확장된 인트라 모드 하에서의 인트라 예측 모드 인덱스로 변환할 수 있다. 일 예로, 좌측 주변 블록의 인트라 예측 모드가 10(horizontal mode)인 경우, 이를 확장된 인트라 모드 하에서 horizontal mode에 대응하는 인덱스 18로 변환할 수 있다.
또는, 주변 블록이 확장된 인트라 모드로 부호화되고, 현재 블록은 비-확장된 인트라 모드로 부호화된 경우, 주변 블록의 인트라 예측 모드 인덱스를 비-확장된 인트라 모드 하에서의 인트라 예측 모드 인덱스로 변환할 수 있다. 일 예로, 상단 주변 블록의 인트라 예측 모드 인덱스가 50(vertical mode)인 경우, 이를 비-확장된 인트라 모드 하에서 vertical mode에 대응하는 인덱스 26으로 변환할 수 있다.
S1110 단계를 통해 선택된 참조 샘플 라인의 인덱스가 기 정의된 값 이상인 경우, 후보 리스트가 DC 모드 및/또는 플래너 모드를 포함하지 않도록 설정할 수 있다. 기 정의된 값은 1 이상의 정수일 수 있다.
현재 블록이 복수의 서브 블록들로 분할되는 경우, 현재 후보 리스트가 DC 모드 및/또는 플래너 모드를 포함하지 않도록 설정할 수 있다. 또한, 후보 리스트에는 디폴트 모드가 포함될 수 있다. 이때, 현재 블록의 분할 형태에 따라, 디폴트 모드의 개수 또는 종류가 상이할 수 있다.
현재 블록의 인트라 예측 모드와 동일한 MPM 후보가 후보 리스트에 포함되어 있는지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, MPM 플래그가 비트스트림을 통해 시그날링될 수 있다. 상기 MPM 플래그의 값이 0인 것은, 현재 블록의 인트라 예측 모드와 동일한 MPM 후보가 후보 리스트에 포함되어 있지 않음을 나타낸다. 상기 MPM 플래그의 값이 1인 것은, 현재 블록의 인트라 예측 모드와 동일한 MPM 후보가 후보 리스트에 포함되어 있음을 나타낸다.
상기 MPM 플래그가 현재 블록의 인트라 예측 모드와 동일한 MPM 후보가 존재함을 지시하는 경우, 후보 리스트에 포함된 MPM 후보 중 어느 하나를 특정하는 인덱스 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 인덱스 정보에 의해 특정된 MPM 후보가 현재 블록의 인트라 예측 모드로 설정될 수 있다. 상기 MPM 플래그의 부호화/시그날링이 생략된 경우, 상기 현재 블록의 인트라 예측 모드와 동일한 MPM 후보가 후보 리스트에 포함되어 있는 것으로 결정될 수 있다.
반면, 상기 MPM 플래그가 현재 블록의 인트라 예측 모드와 동일한 MPM 후보가 존재하지 않음을 나타내는 경우, 잔여 모드 정보가 비트스트림을 통해 시그날링될 수 있다. 잔여 모드 정보는 후보 리스트에 포함된 MPM 후보들을 제외한 잔여 인트라 예측 모드들 중 어느 하나를 특정하는데 이용된다. 상기 잔여 모드 정보를 이용하여, 현재 블록의 인트라 예측 모드를 결정할 수 있다. 상기 MPM 플래그가 현재 블록의 인트라 예측 모드와 동일한 MPM 후보가 존재하지 않음을 나타내는 경우, MPM 후보들을 오름차순으로 재정렬할 수 있다. 이후, 잔여 모드 정보에 의해 지시되는 모드값을 재배열된 MPM 후보들과 순차적으로 비교하여 현재 블록의 인트라 예측 모드를 유도할 수 있다. 일 예로, 잔여 모드 정보에 의해 지시되는 모드값이 재배열된 MPM 후보 이하인 경우, 상기 모드값에 1을 추가할 수 있다. 갱신된 모드값 이하인 MPM 후보가 존재하지 않는 경우, 상기 갱신된 모드값을 현재 블록의 인트라 예측 모드로 결정할 수 있다.
S1110 단계를 통해 선택된 참조 샘플 라인의 인덱스가 기 정의된 값 이상인 경우, 상기 MPM 플래그의 부호화가 생략될 수 있다. 이에 따라, 참조 샘플 라인의 인덱스가 기 정의된 값 이상인 경우, 현재 블록의 인트라 예측 모드는 인덱스 정보에 의해 지시되는 MPM 후보로 설정될 수 있다.
앞서 살펴본 바와 같이, 참조 샘플 라인의 인덱스가 기 정의된 값 이상인 경우, 후보 리스트가 DC 모드 및/또는 플래너 모드를 포함하지 않도록 설정할 수 있다. 이에 따라, 참조 샘플 라인 인덱스가 기 정의된 값 이상인 경우, DC 모드 및/또는 플래너 모드는 현재 블록에 대해 이용 불가할 수 있다.
현재 블록의 인트라 예측 모드가 디폴트 모드인지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 상기 디폴트 모드는 DC, 플래너, 수평 방향 모드, 수직 방향 모드 또는 대각 방향 모드 중 적어도 하나를 포함할 수 있다. 일 예로, 현재 블록의 인트라 예측 모드가 디폴트 모드와 동일한지 여부를 나타내는 디폴트 모드 플래그가 비트스트림을 통해 시그날링될 수 있다. 상기 디폴트 모드 플래그는, 현재 블록의 인트라 예측 모드가 플래너 모드인지 여부를 나타내는 플래그, 현재 블록의 인트라 예측 모드가 DC 모드인지 여부를 나타내는 플래그, 현재 블록의 인트라 예측 모드가 수직 방향 모드인지 여부를 나타내는 플래그, 현재 블록의 인트라 예측 모드가 수평 방향 모드인지 여부를 나타내는 플래그 또는 현재 블록의 인트라 예측 모드가 대각 방향 모드인지 여부를 나타내는 플래그 중 적어도 하나를 포함할 수 있다.
일 예로, 비트스트림을 통해 is_planar_not_flag가 시그날링될 수 있다. 상기 플래그의 값이 0인 것은, 현재 블록의 인트라 예측 모드가 플래너 모드임을 나타낸다. 상기 플래그의 값이 1인 것은, 현재 블록의 인트라 예측 모드가 플래너 모드가 아님을 나타낸다.
디폴트 모드 플래그는, MPM 플래그가 현재 블록의 인트라 예측 모드와 동일한 MPM 후보가 존재함을 지시하는 경우 시그날링될 수 있다. 상기 디폴트 모드 플래그가 현재 블록의 인트라 예측 모드가 디폴트 모드가 아님을 지시하는 경우, 인덱스 정보에 의해 특정되는 MPM 후보를 현재 블록의 인트라 예측 모드로 설정할 수 있다.
현재 블록이 복수의 서브 블록들로 분할된 경우, 복수의 서브 블록들은 현재 블록의 인트라 예측 모드를 공유할 수 있다. 또는, 서브 블록별로 인트라 예측 모드를 결정할 수 있다. 예컨대, 서브 블록별로 상기 정보 및/또는 잔여 모드를 부/복호화할 수 있다. 또는, 서브 블록의 인트라 예측 모드가 이전 부호화/복호화가 완료된 서브 블록과 동일한지 여부를 나타내는 정보를 비트스트림을 통해 시그날링할 수 있다. 또는, 이전 부호화/복호화가 완료된 서브 블록의 인트라 예측 모드에 오프셋을 가산/감산하여 현재 서브 블록의 인트라 예측 모드를 유도할 수 있다.
현재 블록이 복수의 서브 블록들로 분할된 경우, MPM 플래그의 부호화가 생략될 수 있다. 이에 따라, 현재 블록들이 복수의 서브 블록들로 분할된 경우, 현재 블록의 인트라 예측 모드는 인덱스 정보에 의해 지시되는 MPM 후보로 설정될 수 있다.
복수의 서브 블록들은 현재 블록의 인트라 예측 모드를 공유할 수 있다.
휘도 성분과 색차 성분 각각의 인트라 예측 모드가 상호 독립적으로 결정될 수 있다. 또는, 휘도 성분의 인트라 예측 모드에 종속하여 색차 성분의 인트라 예측 모드를 결정할 수 있다.
구체적으로, 색차 성분의 인트라 예측 모드는 다음 표 1과 같이 휘도 성분의 인트라 예측 모드에 기반하여 결정될 수 있다.
Intra_chroma_pred_mode[xCb][yCb] IntraPredModeY[xCb][yCb]
0 26 10 1 X(0<=X<=34)
0 34 0 0 0 0
1 26 34 26 26 26
2 10 10 34 10 10
3 1 1 1 34 1
4 0 26 10 1 X
표 1에서 intra_chroma_pred_mode는 색차 성분의 인트라 예측 모드를 특정하기 위해 시그날링되는 정보를 의미하며, IntraPredModeY는 휘도 성분의 인트라 예측 모드를 나타낸다.
다음으로, 현재 블록에 대한 참조 샘플을 유도할 수 있다(S1130). 일 예로, S1110 단계를 통해 N번째 참조 샘플 라인이 선택된 경우, P(-N, -N)부터 P(2W+N-1, -N)까지의 상단 참조 샘플 및 P(-N, -N)부터 P(-N, 2H+N-1)까지의 좌측 참조 샘플을 유도할 수 있다.
참조 샘플은, 현재 블록보다 먼저 부호화/복호화가 완료된 복원 샘플로부터 유도될 수 있다. 상기 복원 샘플은 인루프 필터가 적용되기 전 상태 또는 인루프 필터가 적용된 이후의 상태의 것을 의미할 수 있다.
참조 샘플들에 소정의 인트라 필터를 적용할 수 있다. 인트라 필터를 이용하여 참조 샘플들을 필터링하는 것을 참조 샘플 스무딩(smoothing)이라 호칭할 수 있다. 상기 인트라 필터는 수평 방향으로 적용되는 제1 인트라 필터 또는 수직 방향으로 적용되는 제2 인트라 필터 중 적어도 하나를 포함할 수 있다. 참조 샘플의 위치에 따라 제1 인트라 필터 또는 제2 인트라 필터 중 어느 하나가 선택적으로 적용될 수 있다. 또는, 하나의 참조 샘플에 2개의 인트라 필터가 중복 적용될 수 있다. 제1 인트라 필터 또는 제2 인트라 필터 중 적어도 하나의 필터 계수는 (1,2,1)일 수 있으나, 이에 한정되지는 않는다.
상기 필터링은 현재 블록의 인트라 예측 모드 또는 현재 블록에 관한 변환 블록의 크기 중 적어도 하나에 기초하여 적응적으로 수행될 수 있다. 예를 들어, 현재 블록의 인트라 예측 모드가 DC 모드, 수직 모드 또는 수평 모드인 경우 필터링은 수행되지 않을 수 있다. 상기 변환 블록의 크기가 NxM인 경우, 필터링은 수행되지 않을 수 있다. 여기서, N과 M은 동일하거나 서로 상이한 값일 수 있고, 4, 8, 16 또는 그 이상의 값 중 어느 하나일 수 있다. 일 예로, 변환 블록의 크기가 4x4인 경우, 필터링은 수행되지 않을 수 있다. 또는, 현재 블록의 인트라 예측 모드와 수직 모드(또는 수평 모드)의 차이와 기-정의된 임계치(threshold) 간의 비교 결과에 기초하여 필터링을 수행 여부를 결정할 수 있다. 예를 들어, 현재 블록의 인트라 예측 모드와 수직 모드의 차이가 임계치보다 큰 경우에 한하여 필터링을 수행할 수 있다. 상기 임계치는 표 2와 같이 변환 블록의 크기 별로 정의될 수 있다.
8x8 transform 16x16 transform 32x32 transform
Threshold 7 1 0
상기 인트라 필터는 영상 부호화기/복호화기에 기-정의된 복수의 인트라 필터 후보 중 어느 하나로 결정될 수 있다. 이를 위해 복수의 인트라 필터 후보 중 현재 블록의 인트라 필터를 특정하는 별도의 인덱스가 시그날링될 수 있다. 또는, 현재 블록의 크기/형태, 변환 블록의 크기/형태, 필터 강도(strength)에 관한 정보, 또는 주변 샘플들의 변화량(variation) 중 적어도 하나에 기초하여 인트라 필터가 결정될 수도 있다.
다음으로, 현재 블록의 인트라 예측 모드와 참조 샘플을 이용하여 인트라 예측을 수행할 수 있다(S1140).
현재 블록의 인트라 예측 모드와 참조 샘플을 이용하여 예측 샘플을 획득할 수 있다. 복수 참조 샘플 라인이 선택된 경우, 상이한 참조 샘플 라인에 속한 참조 샘플들의 가중합 연산 또는 평균 연산을 기초로 예측 샘플을 획득할 수 있다. 일 예로, 제1 참조 샘플 라인에 속하는 제1 참조 샘플과 제2 참조 샘플 라인에 속하는 제2 참조 샘플의 가중합 연산을 기초로 예측 샘플을 유도할 수 있다. 이때, 제1 참조 샘플과 제2 참조 샘플에 적용되는 가중치는 동일한 값을 가질 수 있다. 또는, 예측 대상 샘플 참조 샘플 사이의 거리에 기초하여 각 참조 샘플에 적용되는 가중치를 결정할 수 있다. 일 예로, 제1 참조 샘플 및 제2 참조 샘플 중 예측 대상 샘플과의 거리가 가까운 참조 샘플에 적용되는 가중치가 다른 참조 샘플에 적용되는 가중치보다 큰 값을 가질 수 있다.
다만, 인트라 예측의 경우 주변 블록의 경계 샘플을 이용하기 때문에 예측 영상의 화질이 떨어지는 문제가 발생할 수 있다. 따라서, 상술한 예측 과정을 통해 생성된 예측 샘플에 대한 보정 과정을 더 수반할 수 있으며, 이하 도 13을 참조하여 자세히 살펴보기로 한다. 다만, 후술할 보정 과정은 인트라 예측 샘플에 대해서만 적용되는 것으로 한정되는 것은 아니며, 인터 예측 샘플 또는 복원 샘플에도 적용될 수 있음은 물론이다.
도 13은 본 발명이 적용되는 일실시예로서, 주변 샘플들의 차분 정보에 기반하여 현재 블록의 예측 샘플을 보정하는 방법을 도시한 것이다.
현재 블록에 대한 복수의 주변 샘플들의 차분 정보에 기반하여 현재 블록의 예측 샘플을 보정할 수 있다. 상기 보정은 현재 블록에 속한 모든 예측 샘플에 대해서 수행될 수도 있고, 소정의 일부 영역에 속한 예측 샘플에 대해서만 수행될 수도 있다. 일부 영역은 하나의 행/열 또는 복수의 행/열일 수 있고, 이는 영상 부호화기/복호화기에서 보정을 위해 기-설정된 영역일 수도 있다. 일 예로, 현재 블록의 경계에 위치한 하나의 행/열 또는 현재 블록의 경계로부터 복수의 행/열에 보정이 수행될 수 있다. 또는, 일부 영역은 현재 블록의 크기/형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여 가변적으로 결정될 수도 있다.
주변 샘플들은 현재 블록의 상단, 좌측, 좌상단 코너에 위치한 주변 블록 중 적어도 하나에 속할 수 있다. 보정을 위해 이용되는 주변 샘플들의 개수는 2개, 3개, 4개 또는 그 이상일 수 있다. 주변 샘플들의 위치는 현재 블록 내 보정 대상인 예측 샘플의 위치에 따라 가변적으로 결정될 수 있다. 또는, 주변 샘플들 중 일부는 보정 대상인 예측 샘플의 위치와 관계없이 고정된 위치를 가지고, 나머지는 보정 대상인 예측 샘플의 위치에 따른 가변적인 위치를 가질 수도 있다.
주변 샘플들의 차분 정보는 주변 샘플들 간의 차분 샘플을 의미할 수도 있고, 상기 차분 샘플을 소정의 상수값(예를 들어, 1, 2, 3 등)으로 스케일링한 값을 의미할 수도 있다. 여기서, 소정의 상수값은 보정 대상인 예측 샘플의 위치, 보정 대상인 예측 샘플이 속한 열 또는 행의 위치, 열 또는 행 내에서 예측 샘플의 위치 등을 고려하여 결정될 수 있다.
예를 들어, 현재 블록의 인트라 예측 모드가 수직 모드인 경우, 현재 블록의 좌측 경계에 인접한 주변 샘플 p(-1,y)과 좌상단 주변 샘플 p(-1,-1) 간의 차분 샘플을 이용하여 다음 수학식 1과 같이 최종 예측 샘플을 획득할 수 있다.
Figure PCTKR2019007548-appb-M000001
예를 들어, 현재 블록의 인트라 예측 모드가 수평 모드인 경우, 현재 블록의 상단 경계에 인접한 주변 샘플 p(x,-1)과 좌상단 주변 샘플 p(-1,-1) 간의 차분 샘플을 이용하여 다음 수학식 2와 같이 최종 예측 샘플을 획득할 수 있다.
Figure PCTKR2019007548-appb-M000002
예를 들어, 현재 블록의 인트라 예측 모드가 수직 모드인 경우, 현재 블록의 좌측 경계에 인접한 주변 샘플 p(-1,y)과 좌상단 주변 샘플 p(-1,-1) 간의 차분 샘플을 이용하여 최종 예측 샘플을 획득할 수 있다. 이때, 상기 차분 샘플을 예측 샘플에 가산할 수도 있고, 상기 차분 샘플을 소정의 상수값으로 스케일링한 후, 이를 예측 샘플에 가산할 수도 있다. 스케일링에 이용되는 소정의 상수값은 열 및/또는 행에 따라 상이하게 결정될 수 있다. 일예로, 다음 수학식 3과 수학식 4와 같이 예측 샘플을 보정할 수 있다.
Figure PCTKR2019007548-appb-M000003
Figure PCTKR2019007548-appb-M000004
예를 들어, 현재 블록의 인트라 예측 모드가 수평 모드인 경우, 현재 블록의 상단 경계에 인접한 주변 샘플 p(x,-1)과 좌상단 주변 샘플 p(-1,-1) 간의 차분 샘플을 이용하여 최종 예측 샘플을 획득할 수 있으며, 이는 수직 모드에서 상술한 바와 같다. 일예로, 다음 수학식 5와 수학식 6과 같이 예측 샘플을 보정할 수 있다.
Figure PCTKR2019007548-appb-M000005
Figure PCTKR2019007548-appb-M000006
현재 블록의 인트라 예측 모드가 방향성 예측 모드인 경우, 현재 블록의 인트라 예측은, 방향성 예측 모드의 방향성에 기초하여 수행될 수 있다. 일 예로, 표 3은, 도 9에 도시된 방향성 인트라 예측 모드인 Mode 2부터 Mode 34까지의 인트라 방향 파라미터(intraPredAng)를 나타낸 것이다.
predModeIntra 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
intraPredAng - 32 26 21 17 13 9 5 2 0 -2 -5 -9 -13 -17 -21
predModeIntra 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
intraPredAng -32 -26 -21 -17 -13 -9 -5 -2 0 2 5 9 13 17 21 26
표 3에서는, 33개의 방향성 인트라 예측 모드를 예시하여 설명하였으나, 이보다 더 많은 수 혹은 이보다 더 적은 수의 방향성 인트라 예측 모드가 정의되는 것도 가능하다. 방향성 인트라 예측 모드와 인트라 방향 파라미터의 매핑 관계를 정의한 룩업 테이블에 기초하여, 현재 블록에 대한 인트라 방향 파라미터를 결정할 수 있다. 또는, 비트스트림을 통해 시그널링되는 정보에 기초하여, 현재 블록에 대한 인트라 방향 파라미터를 결정할 수도 있다.
현재 블록의 인트라 예측은, 방향성 인트라 예측 모드의 방향성에 따라, 좌측 참조 샘플 또는 상단 참조 샘플 중 적어도 하나를 이용하여 수행될 수 있다. 여기서, 상단 참조 샘플은, 현재 블록 내 최상단 행에 포함된 예측 대상 샘플 (x, 0)보다 작은 y축 좌표를 갖는 참조 샘플들(예컨대, (-1, -1) 부터 (2W-1, -1))을 의미하고, 좌측 참조 샘플은, 현재 블록 내 최좌측 열에 포함된 예측 대상 샘플 (0, y)보다 작은 x축 좌표를 갖는 참조 샘플들(예컨대, (-1, -1)부터 (-1, 2H-1))을 의미할 수 있다.
인트라 예측 모드의 방향성에 따라, 현재 블록의 참조 샘플들을 일차원으로 배열할 수도 있다. 구체적으로, 현재 블록의 인트라 예측 시 상단 참조 샘플 및 좌측 참조 샘플을 모두 이용해야 하는 경우, 이들이 수직 또는 수평 방향을 따라 일렬로 배열된 것으로 가정하고, 각 예측 대상 샘플의 참조 샘플을 선정할 수 있다.
일 예로, 인트라 방향 파라미터가 음수인 경우(예컨대, 표 3에서 Mode 11 부터 Mode 25에 해당하는 인트라 예측 모드의 경우), 상단 참조 샘플들 및 좌측 참조 샘플들을 수평 또는 수직 방향을 따라 재배열하여 일차원 레퍼런스 샘플 그룹(P_ref_1D)을 구성할 수 있다.
도 14 및 도 15는 참조 샘플들이 일렬로 재배열된 일차원 레퍼런스 샘플 그룹을 나타낸 도면이다.
참조 샘플들을 수직 방향으로 재배열할 것인지 또는 수평 방향으로 재배열할 것인지는, 인트라 예측 모드의 방향성에 따라 결정될 수 있다. 일 예로, 인트라 예측 모드가 좌측을 향하는 경우(예컨대, 인트라 예측 모드의 인덱스가 도 9에 도시된 예의 11 내지 18 사이), 도 14에 도시된 예에서와 같이, 현재 블록의 상단 참조 샘플들을 반시계 방향으로 회전시켜, 좌측 참조 샘플들 및 상단 참조 샘플들이 수직 방향으로 배열된 일차원 레퍼런스 샘플 그룹을 생성할 수 있다.
반면, 인트라 예측 모드가 상단을 향하는 경우(예컨대, 인트라 예측 모드의 인덱스가 도 9에 도시된 예의 19 내지 25 사이), 도 15에 도시된 예에서와 같이, 현재 블록의 좌측 참조 샘플들을 좌측 참조 샘플들을 시계 방향으로 회전시켜, 좌측 참조 샘플들 및 상단 참조 샘플들이 수평 방향으로 배열된 일차원 레퍼런스 샘플 그룹을 생성할 수 있다.
현재 블록의 인트라 방향 파라미터가 음수가 아닌 경우, 현재 블록에 대한 인트라 예측은 좌측 참조 샘플들 또는 상단 참조 샘플들만을 이용하여 수행될 수 있다. 이에 따라, 인트라 방향 파라미터가 음수가 아닌 인트라 예측 모드들에 대해서는 좌측 참조 샘플 또는 상단 참조 샘플들만을 이용하여, 일차원 레퍼런스 샘플 그룹을 구성할 수도 있다.
인트라 방향 파라미터에 기초하여, 예측 대상 샘플을 예측하는데 이용되는 적어도 하나의 참조 샘플을 특정하기 위한 참조 샘플 결정 인덱스 iIdx를 유도할 수 있다. 또한, 인트라 방향 파라미터를 기초로 각 참조 샘플에 적용되는 가중치를 결정하는데 이용되는 가중치 관련 파라미터 ifact를 유도할 수 있다. 일 예로, 하기 수학식 7은 참조 샘플 결정 인덱스 및 가중치 관련 파라미터를 유도하는 예를 나타낸 것이다.
Figure PCTKR2019007548-appb-M000007
Figure PCTKR2019007548-appb-I000001
수학식 7에 나타난 바와 같이, iIdx와 ifact는 방향성 인트라 예측 모드의 기울기에 따라 가변적으로 결정된다. 이때, iIdx에 의해 특정되는 참조 샘플은 정수 펠(integer pel)에 해당할 수 있다.
참조 샘플 결정 인덱스에 기초하여, 예측 대상 샘플 별로 적어도 하나 이상의 참조 샘플을 특정할 수 있다. 일 예로, 참조 샘플 결정 인덱스에 기초하여, 현재 블록 내 예측 대상 샘플을 예측하기 위한 일차원 레퍼런스 샘플 그룹 내 참조 샘플의 위치를 특정할 수 있다. 특정된 위치의 참조 샘플을 기초로, 예측 대상 샘플에 대한 예측 영상(즉, 예측 샘플)을 생성할 수 있다.
현재 블록의 인트라 예측 모드에 따라, 하나 또는 복수의 참조 샘플들을 기초로 예측 대상 샘플에 대한 예측 영상을 생성할 수 있다.
일 예로, 예측 대상 샘플로부터 확장되는, 가상의 각도 선(angular line)이 일차원 레퍼런스 샘플 그룹 내 정수 펠(integer pel) 위치(즉, 정수 위치의 참조 샘플)를 지나는 경우, 정수 펠 위치의 참조 샘플을 복사하거나, 정수 펠 위치의 참조 샘플과 예측 대상 샘플 사이의 위치를 고려하여 참조 샘플을 스케일링함으로써, 예측 대상 샘플에 대한 예측 영상을 생성할 수 있다. 가상의 각도 선은 현재 블록의 인트라 예측 모드의 각도 또는 인트라 예측 모드의 기울기를 따라 단방향/양방향 확장된 선을 의미할 수 있다. 일 예로, 하기 수학식 8은 현재 블록의 인트라 예측 모드에 의해 특정되는 참조 샘플 P_ref_1D(x+iIdx+1)을 복사하여, (x, y) 위치의 예측 대상 샘플에 대한 예측 영상 P(x, y)를 생성하는 예를 나타낸 것이다.
Figure PCTKR2019007548-appb-M000008
반면, 예측 대상 샘플로부터 확장되는 가상의 각도 선이 정수 펠 위치를 지나지 않는 경우, 복수 참조 샘플들을 이용하여, 예측 대상 샘플에 대한 예측 영상을 획득할 수 있다. 예측 대상 샘플에 대한 예측 영상은 상기 가상의 각도 선이 지나는 위치에 인접하는 참조 샘플 및 상기 참조 샘플에 인접하는 적어도 하나의 이웃 참조 샘플을 선형 보간함으로써 생성될 수 있다. 또는, 예측 대상 샘플에 대한 예측 영상은 상기 참조 샘플 및 상기 적어도 하나의 이웃 참조 샘플에 탭 필터(Tap filter) 기반의 보간을 수행함으로써 획득될 수 있다. 보간 필터의 탭수는 2 이상의 자연수일 수 있다. 구체적으로, 보간 대상이 되는 참조 샘플의 개수에 따라, 탭 필터(Tap filter)의 탭수가 2, 3, 4, 5, 6 또는 그 이상의 정수일 수도 있다.
일 예로, 예측 대상 샘플로부터 확장되는 가상의 각도 선이 두 정수 펠 위치 사이를 지나는 경우, 상기 가상의 각도 선이 지나는 위치 양쪽의 참조 샘플들 또는 상기 두 정수 펠 위치의 참조 샘플들 중 적어도 하나와 적어도 하나의 이웃 참조 샘플들을 이용하여 예측 대상 샘플에 대한 예측 영상을 생성할 수 있다. 여기서, 이웃 참조 샘플은, 참조 샘플의 좌/우 또는 상/하에 인접하는 참조 샘플 중 적어도 하나를 포함할 수 있다. 일 예로, 하기 수학식 9는 둘 이상의 참조 샘플을 보간하여, 예측 대상 샘플에 대한 예측 샘플 P(x, y)를 생성하는 예를 나타낸 것이다.
Figure PCTKR2019007548-appb-M000009
보간 필터의 계수는, 가중치 관련 파라미터 ifact에 기초하여 결정될 수 있다. 일 예로, 보간 필터의 계수는, 각도 선(angular line) 상에 위치한 소수 펠(fractional pel)과 정수 펠(즉, 각 참조 샘플들의 정수 위치) 사이의 거리에 기초하여 결정될 수 있다.
하기 수학식 10은 탭 필터의 탭수가 4인 경우를 예시한 것이다.
Figure PCTKR2019007548-appb-M000010
상기 수학식 10에 나타난 예와 같이, 연속하는 복수의 참조 샘플들을 보간함으로써, 예측 대상 샘플에 대한 예측 영상을 획득할 수 있다. 이때, 연속하는 N개의 참조 샘플들 중 적어도 하나 이상이 일차원 레퍼런스 샘플 그룹에 포함되어 있지 않는 경우, 해당 참조 샘플의 값을 기 정의된 값 또는 이웃하는 참조 샘플의 값으로 대체할 수 있다. 일 예로, (x+iIdx-1) 위치의 샘플이 일차원 레퍼런스 샘플 그룹에 포함되지 않는 경우, 상기 위치의 참조 샘플의 값을 기 정의된 값 또는 인접하는 참조 샘플의 값(예컨대, P_ref_1D(x+iIdx))으로 대체할 수 있다. 또는, (x+iIdx+2) 위치의 샘플이 일차원 레퍼런스 샘플 그룹에 포함되지 않는 경우, 상기 위치의 참조 샘플의 값을 기 정의된 값, 기 산출된 또는 인접하는 참조 샘플의 값(예컨대, P_ref(x+iIdx+1))으로 대체할 수 있다. 여기서, 기 정의된 값은, 0을 포함하는 정수일 수 있다. 기 산출된 값은 비트 뎁스(Bit depth)에 의해 결정되는 값일 수 있다. 또는, 적어도 하나 이상의 참조 샘플들의 평균값, 최소값 또는 최대값을 기초로 기 정의된 값을 산출할 수 있다.
멀티 탭 필터는 직선 형태일 수 있다. 일 예로, 수평 또는 수직 방향으로 연속하는 복수의 참조 샘플들을 이용하는 직선 형태의 멀티 탭 필터가 적용될 수 있다. 또는, 멀티 탭 필터는 사각형 또는 십자 형태 등 다각형 형태일 수도 있다. 일 예로, 참조 샘플과, 상기 참조 샘플의 사방에 인접하는 참조 샘플들을 이용하는 십자 형태의 멀티 탭 필터가 이용될 수 있다. 멀티 탭 필터의 형태는 현재 블록의 크기, 형태 또는 인트라 예측 모드에 기초하여 가변적으로 결정될 수 있다.
수학식 8 내지 10에 나타난 것과 같이, 인트라 예측의 방향성을 이용하여 참조 샘플을 보간하여 예측 샘플을 생성하는 것을, 인트라 예측 샘플 보간 기법이라 호칭할 수 있다.
인트라 예측 샘플 보간 기법을 이용함에 있어서, 탭 필터의 탭 수가 큰 것이 반드시 예측 정확도 향상을 보장하지는 않는다. 예컨대, 현재 블록의 크기가 2x16과 같이 높이 또는 너비가 다른 하나에 비해 현저히 큰 비대칭 코딩 유닛이거나, 4x4와 같이 작은 크기의 블록이라면, 4 탭 이상의 탭 필터를 사용하는 것은 오히려 예측 영상을 과하게 스무딩하는 결과를 초래할 수 있다. 이에, 현재 블록의 크기, 형태 또는 인트라 예측 모드에 따라, 탭 필터의 종류를 적응적으로 결정할 수 있다. 여기서, 탭 필터의 종류는, 탭 수, 필터 계수, 필터 강도(강/약), 필터링 방향, 필터 형태 중 적어도 하나에 의해 정의될 수 있다. 필터 탭 수 또는 필터 계수 등이 필터 강도에 따라 가변적으로 결정될 수도 있다. 또한, 탭 필터의 종류에 따라, 가로 방향 보간, 세로 방향 보간 또는 가로 및 세로 방향 보간 등 탭 필터의 적용 방향이 결정될 수 있다. 현재 블록 내 라인 단위(행 또는 열) 또는 샘플 단위로 탭 필터의 적용 방향을 가변적으로 설정할 수도 있다.
구체적으로, 현재 블록의 너비 또는 높이에 기초하여 사용하고자 하는 탭 필터의 종류를 결정할 수 있다. 일 예로, 현재 블록의 너비 또는 높이 중 적어도 하나의 값이 기 정의된 값보다 작은 경우, 4탭 필터 대신 2탭 필터를 사용하여 인트라 예측 샘플 보간 기법을 수행할 수 있다. 반면, 현재 블록의 너비 및 높이 모두 기 정의된 값 이상인 경우, 4탭 필터를 사용하여 인트라 예측 샘플 보간 기법을 수행할 수 있다. 여기서, 기 정의된 값은, 4, 8 또는 16 등의 값을 나타낼 수 있다.
또는, 현재 블록의 너비 및 높이가 동일한 값인지 여부에 따라 사용하고자 하는 탭 필터의 종류를 결정할 수 있다. 일 예로, 현재 블록의 너비 및 높이가 상이한 값인 경우, 4탭 필터 대신 2탭 필터를 사용하여 인트라 예측 샘플 보간 기법을 수행할 수 있다. 반면, 현재 블록의 너비 및 높이가 동일한 값을 가질 경우, 4탭 필터를 사용하여 인트라 예측 샘플 보간 기법을 수행할 수 있다.
또는, 현재 블록의 너비와 높이의 비율에 따라 사용하고자 하는 탭 필터의 종류를 결정할 수 있다. 일 예로, 현재 블록의 너비(w)와 높이(h)의 비율(즉, w/h 또는 h/w)이 기 정의된 임계값보다 작은 경우에는 4탭 필터 대신 2탭 필터를 사용하여 인트라 예측 샘플 보간 기법을 수행할 수 있다. 반면, 현재 블록의 너비와 높이의 비율이 기 정의된 임계값 이상인 경우, 4탭 필터를 사용하여 인트라 예측 샘플 보간 기법을 수행할 수 있다.
또는, 현재 블록의 인트라 예측 모드, 형태 또는 크기에 따라 탭 필터의 종류를 결정할 수도 있다. 일 예로, 현재 블록이 2x16 형태의 코딩 유닛이고, 현재 블록의 인트라 예측 모드가 수평 방향 범위에 속하는 인트라 예측 모드일 경우, 탭 수가 n인 탭 필터를 이용하여 인트라 예측 샘플 보간 기법을 수행할 수 있다. 반면, 현재 블록이 2x16 형태의 코딩 유닛이고, 현재 블록의 인트라 예측 모드가 수직 방향 범위에 속하는 인트라 예측 모드일 경우, 탭 수가 m인 탭 필터를 이용하여 인트라 예측 샘플 보간 기법을 수행할 수 있다.
반면, 현재 블록이 16x2 형태의 코딩 유닛이고, 현재 블록의 인트라 예측 모드가 수평 방향 범위에 속하는 인트라 예측 모드일 경우 탭 수가 n인 탭 필터를 이용하여 인트라 예측 샘플 보간 기법을 수행할 수 있다. 반면, 현재 블록이 16x2 형태의 코딩 유닛이고, 현재 블록의 인트라 예측 모드가 수직 방향 범위에 속하는 인트라 예측 모드일 경우, 탭 수가 m인 탭 필터를 이용하여 인트라 예측 샘플 보간 기법을 수행할 수 있다.
여기서, 수평 방향 범위는 수평 방향의 인트라 예측 모드를 포함하는 소정의 범위를 나타낼 수 있고, 수직 방향 범위는 수직 방향의 인트라 예측 모드를 포함하는 소정의 범위를 나타낼 수 있다. 일 예로, 35개의 인트라 예측 모드를 기반으로 하였을 때, 수평 방향 범위는 모드 11부터 모드 18 사이의 인트라 예측 모드를 나타내고, 수직 방향 범위는 모드 19부터 모드 27 사이의 인트라 예측 모드를 나타낼 수 있다.
또한, n과 m은 0보다 큰 상수로, n과 m은 상이한 값을 가질 수 있다. 또는, n과 m이 동일한 값을 갖도록 설정하되, n 탭 필터와 m 탭 필터의 필터 계수 또는 필터 강도 중 적어도 하나를 상이하게 설정할 수도 있다.
방향성 예측 모드 또는 DC 모드에 기초하여 인트라 예측이 수행되는 경우, 블록 경계에서 화질 열화가 발생할 염려가 있다. 반면 플래너 모드에 기초하여 인트라 예측을 수행하는 경우, 상기 예측 모드들에 비해 블록 경계에서의 화질 열화가 상대적으로 적은 장점이 있다.
플래너 모드에 기초한 인트라 예측시, 예측 영상은, 수평 방향의 제1 예측 영상 및 수직 방향의 제2 예측 영상을 가중 예측함으로써 획득될 수 있다.
여기서, 제1 예측 영상은, 예측 대상 샘플과 수평 방향에 놓인 참조 샘플들에 기초하여 생성될 수 있다. 일 예로, 제1 예측 영상은 예측 대상 샘플의 수평 방향에 놓인 참조 샘플들의 가중합을 기초로 생성될 수 있다. 이때, 각 참조 샘플들에 적용되는 가중치는 예측 대상 샘플과의 거리 또는 현재 블록의 크기 중 적어도 하나에 기초하여 결정될 수 있다. 예측 대상 샘플의 수평 방향에 위치하는 참조 샘플들은, 예측 대상 샘플과 동일한 y 좌표를 갖는 좌측 참조 샘플 및 예측 대상 샘플과 동일한 y 좌표를 갖는 우측 참조 샘플을 포함할 수 있다. 우측 참조 샘플은, 현재 블록의 상단 참조 샘플로부터 유도될 수 있다. 일 예로, 우측 참조 샘플은 우측 참조 샘플과 동일한 수직선상에 놓인 상단 참조 샘플의 값을 복사하여 유도될 수 있다. 또는, 우측 참조 샘플은 복수 상단 참조 샘플들의 가중합 또는 평균값으로 유도될 수 있다. 여기서, 우측 참조 샘플과 동일한 수직선상에 놓인 상단 참조 샘플은, 현재 블록의 우측 상단 코너에 인접한 참조 샘플을 포함할 수 있다. 상기 우측 상단 코너에 인접한 참조 샘플은 우측 참조 샘플과 동일한 x좌표를 가질 수 있다. 또는, 현재 블록의 형태, 크기 또는 예측 대상 샘플의 위치에 따라, 우측 참조 샘플을 유도하는데 이용되는 상단 참조 샘플의 위치를 가변적으로 결정할 수도 있다.
제2 예측 영상은, 예측 대상 샘플의 수직 방향에 놓인 참조 샘플들에 기초하여 생성될 수 있다. 일 예로, 제2 예측 영상은 예측 대상 샘플의 수직 방향에 놓인 참조 샘플들의 가중합을 기초로 생성될 수 있다. 이때, 각 참조 샘플들에 적용되는 가중치는 예측 대상 샘플과의 거리 또는 현재 블록의 크기 등을 고려하여 결정될 수 있다. 예측 대상 샘플의 수직 방향에 놓인 참조 샘플들은, 예측 대상 샘플과 동일한 x 좌표를 갖는 상단 참조 샘플 및 예측 대상 샘플과 동일한 x 좌표를 갖는 하단 참조 샘플을 포함할 수 있다. 하단 참조 샘플은, 현재 블록의 좌측 참조 샘플로부터 유도될 수 있다. 일 예로, 하단 참조 샘플은 하단 참조 샘플과 동일한 수평 선상에 놓인 좌측 참조 샘플의 값을 복사하여 유도될 수 있다. 또는, 하단 참조 샘플은 복수 좌측 참조 샘플들의 가중합 또는 평균값으로 유도될 수 있다. 여기서, 하단 참조 샘플과 동일한 수평선상에 놓인 좌측 참조 샘플은, 현재 블록의 좌측 하단 코너에 인접한 참조 샘플을 포함할 수 있다. 상기 좌측 하단 코너에 인접한 참조 샘플은 하단 참조 샘플과 동일한 y좌표를 가질 수 있다. 또는, 현재 블록의 크기, 형태 또는 예측 대상 샘플의 위치에 따라, 하단 참조 샘플을 유도하는데 이용되는 상단 참조 샘플의 위치를 가변적으로 결정할 수도 있다.
또는, 우측 참조 샘플 또는 하단 참조 샘플 중 적어도 하나는 좌측 참조 샘플 및 상단 참조 샘플 모두를 이용하여 유도될 수 있다.
일 예로, 현재 블록의 상단 참조 샘플 및 좌측 참조 샘플의 가중합 또는 평균을 우측 참조 샘플 또는 하단 참조 샘플 중 적어도 하나의 값으로 결정할 수 있다.
또는, 좌측 하단 참조 샘플 및 우측 상단 참조 샘플을 이용하여 현재 블록의 우측 하단 코너에 인접하는 우측 하단 참조 샘플을 유도한 뒤, 유도된 우측 하단 참조 샘플을 이용하여 우측 참조 샘플 및 하단 참조 샘플을 유도할 수도 있다. 우측 하단 참조 샘플은, 현재 블록의 우측 상단 참조 샘플 및 좌측 참조 샘플의 가중합 또는 평균을 기초로 유도될 수 있다. 이때, 우측 상단 참조 샘플 및 좌측 참조 샘플에 적용되는 가중치는 동일한 값을 가질 수도 있고, 현재 블록의 너비/높이에 기초하여 결정될 수도 있다.
우측 하단 참조 샘플이 결정되면, 우측 하단 참조 샘플과 우측 상단 참조 샘플을 보간(interpolation)하여, 우측 참조 샘플을 유도하고, 우측 하단 참조 샘플과 좌측 하단 참조 샘플을 보간하여, 하단 참조 샘플을 유도할 수 있다. 이때, 보간 필터의 계수는, 현재 블록의 크기, 현재 블록의 형태, 우측 하단 참조 샘플 까지의 거리, 우측 상단 참조 샘플 까지의 거리 또는 좌측 하단 참조 샘플 까지의 거리 등에 기초하여 결정될 수 있다.
우측 참조 샘플 또는 좌측 참조 샘플을 유도하기 위해, 고정 위치의 참조 샘플을 이용하거나, 예측 대상 샘플의 위치에 따라 적응적으로 선택되는 참조 샘플을 이용할 수 있다. 예컨대, 우측 참조 샘플은, 예측 대상 샘플의 위치와 무관하게 우측 상단 참조 샘플을 이용하여 유도되거나, 예측 대상 샘플의 위치에 따라 선택되는 좌측 참조 샘플(예컨대, 예측 대상 샘플과 동일한 y 축 좌표를 갖는 참조 샘플) 또는 상단 참조 샘플(예컨대, 예측 대상 샘플과 동일한 x 축 좌표를 갖는 참조 샘플)을 이용하여 유도될 수 있다. 또는, 하단 참조 샘플은 예측 대상 샘플의 위치와 무관하게 좌측 하단 참조 샘플을 이용하여 유도되거나, 예측 대상 샘플의 위치에 따라 선택되는 좌측 참조 샘플(예컨대, 예측 대상 샘플과 동일한 y 축 좌표를 갖는 참조 샘플) 또는 상단 참조 샘플(예컨대, 예측 대상 샘플과 동일한 x 축 좌표를 갖는 참조 샘플)을 이용하여 유도될 수 있다.
도 16은 복수 참조 샘플을 이용하여, 우측 참조 샘플 또는 하단 참조 샘플을 유도하는 예를 나타낸 도면이다. 현재 블록은 WxH의 크기를 갖는 블록이라 가정한다.
도 16의 (a)를 참조하면, 먼저, 현재 블록의 우측 상단 참조 샘플 P(W, -1) 및 좌측 하단 샘플 P(-1, H)의 가중합 또는 평균값에 기초하여, 우측 하단 참조 샘플 P(W, H)을 생성할 수 있다. 이때, 우측 상단 참조 샘플 및 좌측 참조 샘플에 적용되는 가중치는 동일하게 설정되거나, 현재 블록의 너비(W) 및 높이(H)에 기초하여 결정될 수 있다. 일 예로, 현재 블록이 비정방형인 경우, 우측 상단 참조 샘플에 적용되는 가중치는 W/(W+H)로 결정되고, 좌측 하단 참조 샘플에 적용되는 가중치는 H/(W+H)로 결정될 수 있다.
그리고, 우측 하단 참조 샘플 P(W, H) 및 우측 상단 참조 샘플 P(W, -1)을 기초로, 대상 예측 샘플 (x, y)에 대한 우측 참조 샘플 P(W, y)를 생성할 수 있다. 일 예로, 우측 예측 샘플 P(W, y)은 우측 하단 참조 샘플 P(W, H) 및 우측 상단 참조 샘플 P(W, -1)의 가중합 또는 평균값으로 계산될 수 있다. 또한, 우측 하단 참조 샘플 P(W, H) 및 좌측 하단 참조 샘플 P(-1, H)를 기초로 대상 예측 샘플 (x, y)에 대한 하단 참조 샘플 P(x, H)를 생성할 수 있다. 일 예로, 하단 참조 샘플 P(x, H)는 우측 하단 참조 샘플 P(W, H) 및 좌측 참조 샘플 P(-1, H)의 가중합 또는 평균값으로 계산될 수 있다.
도 16의 (b)에 도시된 바와 같이, 우측 참조 샘플 및 하단 참조 샘플이 생성되면, 생성된 참조 샘플을 이용하여, 예측 대상 샘플에 대한 제1 예측 샘플 Ph(x, y) 및 제2 예측 샘플 Pv(x, y)를 생성할 수 있다. 이때, 제1 예측 샘플 Ph(x, y)는 좌측 참조 샘플 P(-1, y) 및 우측 참조 샘플 P(W, y)의 가중합을 기초로 생성되고, 제2 예측 샘플 Pv(x, y)는 상단 참조 샘플 P(x, -1) 및 하단 참조 샘플 P(x, H)의 가중합을 기초로 생성될 수 있다.
도 17 및 도 18은 본 발명의 일 실시예에 따른, 비정방형 블록에 대해 우측 참조 샘플 및 하단 참조 샘플을 결정하는 것을 설명하기 위한 도면이다.
도 17에 도시된 예에서와 같이, 현재 블록이 (N/2)xN 크기의 비정방형 블록인 경우, 우측 상단 참조 샘플 P(N/2, -1)을 기초로, 우측 참조 샘플을 유도하고, 좌측 하단 참조 샘플 P(-1, N)을 기초로 하단 참조 샘플을 유도할 수 있다.
또는, 우측 상단 참조 샘플 P(N/2, -1) 및 좌측 하단 참조 샘플 P(-1, N)의 가중합, 평균, 최소값 또는 최대값 중 적어도 하나를 기초로 우측 참조 샘플 또는 하단 참조 샘플을 유도할 수도 있다. 예컨대, P(N/2, -1) 및 P(-1, N)의 가중합 또는 평균을 기초로 우측 참조 샘플을 유도하거나, P(N/2, -1) 및 P(-1, N)을 기초로 우측 하단 참조 샘플 P(N/2, N)을 유도한 뒤, 우측 하단 참조 샘플과 우측 상단 참조 샘플을 보간하여 우측 참조 샘플을 유도할 수 있다. 또는, P(N/2, -1) 및 P(-1, N)의 가중합 또는 평균을 기초로 하단 참조 샘플을 유도하거나, P(N/2, -1) 및 P(-1, N)을 기초로 우측 하단 참조 샘플 P(N/2, N)을 유도한 뒤, 우측 하단 참조 샘플과 좌측 하단 참조 샘플을 보간하여 하단 참조 샘플을 유도할 수 있다.
반면, 도 18에 도시된 예에서와 같이, 현재 블록이 Nx(N/2) 크기의 비정방형 블록인 경우, 우측 상단 참조 샘플 P(N, -1)을 기초로, 우측 참조 샘플을 유도하고, 좌측 하단 참조 샘플 P(-1, N/2)를 기초로, 하단 참조 샘플을 유도할 수 있다.
또는, 좌측 상단 참조 샘플 P(N, -1) 및 좌측 하단 참조 샘플 P(-1, N/2)의 가중합, 평균, 최소값 또는 최대값 중 적어도 하나를 기초로 우측 참조 샘플 또는 하단 참조 샘플을 유도할 수도 있다. 예컨대, P(N, -1) 및 P(-1, N/2)의 가중합 또는 평균을 기초로 우측 참조 샘플을 유도하거나, P(N, -1) 및 P(-1, N/2)을 기초로 우측 하단 참조 샘플 P(N, N/2)을 유도한 뒤, 우측 하단 참조 샘플과 우측 상단 참조 샘플을 보간하여 우측 참조 샘플을 유도할 수 있다. 또는, P(N, -1) 및 P(-1, N/2)의 가중합 또는 평균을 기초로 하단 참조 샘플을 유도하거나, P(N, -1) 및 P(-1, N/2)을 기초로 우측 하단 참조 샘플 P(N, N/2)을 유도한 뒤, 우측 하단 참조 샘플과 좌측 하단 참조 샘플을 보간하여 하단 참조 샘플을 유도할 수 있다.
도 16 내지 도 18을 통해 설명한 예에서는, 하단 참조 샘플은, 하단 참조 샘플과 동일한 수평선상에 놓인 현재 블록의 좌측 하단 참조 샘플 또는 우측 참조 샘플과 동일한 수직선상에 놓인 현재 블록의 우측 상단 참조 샘플 중 적어도 하나를 기초로 유도되고, 우측 참조 샘플은, 우측 참조 샘플과 동일한 수직선상에 놓인 현재 블록의 우측 상단 참조 샘플 또는 하단 참조 샘플과 동일한 수평선상에 놓인 현재 블록의 좌측 하단 참조 샘플 중 적어도 하나를 기초로 유도되는 것으로 설명하였다. 설명한 예와 달리, 상측 중단 참조 샘플 또는 좌측 중단 참조 샘플 중 적어도 하나를 기초로 우측 참조 샘플을 유도하거나, 좌측 참조 샘플을 유도할 수도 있다. 일 예로, 상측 중단 샘플과 좌측 하단 참조 샘플을 이용하여 하측 중단 샘플을 유도한 뒤, 하측 중단 샘플과 좌측 하단 샘플의 보간(interpolation) 또는 외삽(extrapolation)을 통해 하측 샘플들을 생성할 수 있다. 또한, 좌측 중단 샘플과 우측 상단 샘플을 이용하여 우측 중단 샘플을 유도한 뒤, 우측 중단 샘플과 우측 상단 샘플의 보간 또는 외삽을 통해 하측 샘플들을 생성할 수 있다.
현재 블록의 크기 또는 형태에 따라 제1 예측 영상 및 제2 예측 영상을 생성하는데 사용되는 참조 샘플들의 위치를 상이하게 결정할 수도 있다. 예컨대, 현재 블록의 크기 또는 형태에 따라, 우측 참조 샘플 또는 하단 참조 샘플을 유도하는데 이용되는 상단 참조 샘플 또는 좌측 참조 샘플의 위치를 상이하게 결정할 수 있다.
일 예로, 현재 블록이 NxN 크기의 정방형 블록인 경우, 우측 참조 샘플은, 우측 상단 참조 샘플 P(N, -1)을 기초로 유도되는 한편, 하단 참조 샘플은, 좌측 하단 참조 샘플 P(-1, N)을 기초로 유도될 수 있다. 또는, 현재 블록이 NxN 크기의 정방형 블록인 경우, 우측 상단 참조 샘플 P(N, -1) 및 좌측 하단 참조 샘플 P(-1, N)의 가중합, 평균, 최소값 또는 최대값 중 적어도 하나를 기초로 우측 참조 샘플 및 하단 참조 샘플을 유도할 수도 있다.
반면, 현재 블록이 Nx2/N 크기의 비정방형 블록인 경우, 상측 중단 참조 샘플 P(N/2, -1) 및 좌측 하단 참조 샘플 P(-1, N/2)를 기초로 하고, 하측 중단 참조 샘플 P(N/2, N/2)를 유도하고, 유도된 하측 중단 참조 샘플에 기초하여 하단 참조 샘플들을 유도할 수 있다. 일 예로, 하측 중단 참조 샘플과 좌측 하단 참조 샘플의 보간(interpolation) 또는 외삽(extrapolation)을 통해 하단 참조 샘플들을 유도할 수 있다. 또는, 현재 블록이 N/2xN 크기의 비정방형 블록인 경우, 우측 상단 참조 샘플 P(N/2, -1) 및 좌측 중단 참조 샘플 P(-1, N/2)를 기초로 하고, 우측 중단 참조 샘플 P(N/2, N/2)를 유도하고, 유도된 우측 중단 참조 샘플에 기초하여 우측 참조 샘플들을 유도할 수 있다. 일 예로, 우측 중단 참조 샘플과 우측 상단 참조 샘플의 보간 또는 외삽을 통해 우측 참조 샘플들을 유도할 수 있다.
제1 예측 영상은 예측 대상 샘플과 동일한 수평선상에 놓인 참조 샘플들의 가중 예측에 기초하여 계산될 수 있다. 또한, 제2 예측 영상은 예측 대상 샘플과 동일한 수직선상에 놓인 참조 샘플들의 가중 예측에 기초하여 계산될 수 있다.
상술한 예에 그치지 않고, 참조 샘플들의 평균값, 최소값 또는 최대값 등으로 제1 예측 영상 또는 제2 예측 영상을 생성할 수도 있다.
예측 대상 샘플이 현재 블록 내 소정 영역에 포함되어 있는지 여부, 현재 블록의 크기 또는 형태 등에 따라, 참조 샘플을 유도하는 방법을 상이하게 설정하거나, 제1 예측 영상 또는 제2 예측 영상을 유도하는 방법을 상이하게 설정할 수 있다. 구체적으로, 예측 대상 샘플의 위치에 따라, 우측 또는 하단 참조 샘플을 이용하는데 이용되는 참조 샘플의 개수 또는 참조 샘플의 위치를 상이하게 결정하거나, 제1 예측 영상 또는 제2 예측 영상을 유도하는데 이용되는 가중치 또는 참조 샘플의 수 등을 상이하게 설정할 수 있다.
일 예로, 소정 영역에 포함된 예측 대상 샘플들의 제1 예측 영상을 생성할 때 이용되는 우측 참조 샘플은, 상단 참조 샘플만을 이용하여 유도하고, 소정 영역 바깥에 포함된 예측 대상 샘플들의 제1 예측 영상을 생성할 때 이용되는 우측 참조 샘플은, 상단 참조 샘플 및 좌측 참조 샘플의 가중합 또는 평균에 기초하여 유도할 수 있다.
예컨대, 도 17에 도시된 예에서와 같이, 현재 블록이 높이가 너비보다 긴 비정방형 블록인 경우, 현재 블록 내 소정 영역에 포함된 (x, y) 위치의 예측 대상 샘플의 우측 참조 샘플은 P(N/2, -1)로부터 유도할 수 있다. 예컨대, 소정 영역에 포함된 예측 대상 샘플의 우측 참조 샘플은 P(N/2, -1) 참조 샘플의 값을 복사하여 생성될 수 있다. 반면, 현재 블록 내 소정 영역 바깥에 포함된 (x', y')위치의 예측 대상 샘플의 우측 참조 샘플은 P(N/2, -1) 및 P(-1, N)의 가중합 또는 평균값을 기초로 유도할 수 있다. 예컨대, 소정 영역 바깥에 포함된 예측 대상 샘플의 우측 참조 샘플은 P(N/2, -1) 및 P(-1, N)을 기초로 유도되는 우측 하단 참조 샘플 P(N/2, N)과 우측 상단 참조 샘플 P(N/2, -1)의 보간을 통해 생성될 수 있다.
또는, 도 18에 도시된 예에서와 같이, 현재 블록이 너비가 높이보다 긴 비정방형 블록인 경우, 현재 블록 내 소정 영역에 포함된 (x, y) 위치의 예측 대상 샘플의 하단 참조 샘플은 P(-1, N/2)로부터 유도할 수 있다. 예컨대, 소정 영역에 포함된 예측 대상 샘플의 하단 참조 샘플은 P(-1, N/2) 참조 샘플의 값을 복사하여 생성될 수 있다. 반면, 현재 블록 내 소정 영역 바깥에 포함된 (x', y')위치의 예측 대상 샘플의 하단 참조 샘플은 P(N, -1) 및 P(-1, N/2)의 가중합 또는 평균값을 기초로 유도할 수 있다. 예컨대, 소정 영역 바깥에 포함된 예측 대상 샘플의 하측 대상 참조 샘플은 P(N, -1) 및 P(-1, N/2)를 기초로 유도되는 우측 하단 참조 샘플 P(N, N/2)과 좌측 하단 참조 샘플 P(-1, N/2)의 보간을 통해 생성될 수 있다.
다른 예로, 소정 영역에 포함된 예측 대상 샘플들은, 참조 샘플들의 가중합에 기초하여, 제1 예측 영상 또는 제2 예측 영상을 생성하고, 소정 영역 바깥의 예측 대상 샘플들은, 참조 샘플들의 평균값, 최소값 또는 최대값으로 제1 예측 영상 또는 제2 예측 영상을 생성하거나, 참조 샘플들 중 기 정의된 위치의 어느 하나만을 이용하여 제1 예측 영상 또는 제2 예측 영상을 생성할 수 있다. 일 예로, 도 17에 도시된 예에서와 같이, 현재 블록이 높이가 너비보다 긴 비정방형 블록인 경우, 현재 블록 내 소정 영역에 포함된 (x, y) 위치의 예측 대상 샘플은, P(N/2, -1)로부터 유도된 우측 참조 샘플 P(N/2, y) 또는 P(-1, y) 위치의 좌측 참조 샘플 중 어느 하나만을 이용하여 제1 예측 영상을 생성할 수 있다. 반면, 상기 소정 영역에 포함되지 않는 (x', y') 위치의 예측 대상 샘플은, P(N/2, -1)로부터 유도된 우측 참조 샘플 P(N/2, y') 및 P(-1, y')위치의 참조 샘플들의 가중합 또는 평균에 기초하여 제1 예측 영상을 생성할 수 있다.
또는, 도 18에 도시된 예에서와 같이, 현재 블록이 너비가 높이보다 긴 비정방형 블록인 경우, 현재 블록 내 소정 영역에 포함된 (x, y) 위치의 예측 대상 샘플은, P(-1, N/2)로부터 유도된 하단 참조 샘플 P(x, N/2) 또는 P(x, -1) 위치의 상단 참조 샘플 중 어느 하나만을 이용하여 제2 예측 영상을 생성할 수 있다. 반면, 상기 소정 영역에 포함되지 않는 (x', y') 위치의 예측 대상 샘플은, P(-1, N/2)로부터 유도된 하단 참조 샘플 P(x', N/2) 및 P(-1, y')위치의 참조 샘플들의 가중합 또는 평균에 기초하여 제2 예측 영상을 생성할 수 있다.
상술한 실시예에서, 소정 영역은, 현재 블록의 경계에 인접한 적어도 하나의 샘플 라인 또는 이들을 제외한 잔여 영역 중 하나일 수 있다. 여기서, 현재 블록의 경계는, 좌측 경계, 우측 경계, 상단 경계 또는 하측 경계 중 적어도 하나를 포함할 수 있다. 또한, 소정 영역을 정의하는데 이용되는 경계의 수 또는 위치는, 현재 블록의 형태에 따라 상이하게 설정될 수 있다. 또는, 소정 영역은 현재 블록의 일측 코너와 접하는 블록 형태일 수도 있다. 이때, 소정 영역의 크기 및 형태는 현재 블록의 크기 또는 형태 중 적어도 하나를 기초로 결정될 수 있다.
플래너 모드 하에서 최종 예측 영상은, 제1 예측 영상 및 제2 예측 영상의 가중합, 평균, 최소값 또는 최대값을 기초로 유도될 수 있다.
일 예로, 하기 수학식 11은, 제1 예측 영상 Ph 및 제2 예측 영상 Pv의 가중합을 기초로, 최종 예측 영상 P를 생성하는 예를 나타낸 것이다.
Figure PCTKR2019007548-appb-M000011
상기 수학식 11에서, 예측 가중치 w는 현재 블록의 형태, 크기 또는 예측 대상 샘플의 위치 등에 따라 상이할 수 있다.
일 예로, 현재 블록의 너비, 현재 블록의 높이 또는 너비-높이비 등을 고려하여, 예측 가중치 w를 유도할 수 있다. 현재 블록이 너비가 높이보다 큰 비정방형 블록인 경우, 제1 예측 영상에 더 많은 가중치가 부여되도록 w가 설정될 수 있다. 반면, 현재 블록이 높이가 너비보다 큰 비정방형 블록인 경우, 제2 예측 영상에 더 많은 가중치가 부여되도록 w가 설정될 수 있다.
일 예로, 현재 블록이 정방형인 경우, 예측 가중치 w는 1/2의 값을 가질 수 있다. 반면, 현재 블록이 높이가 너비보다 큰 비정방형 블록(예컨대, (N/2)xN)인 경우, 예측 가중치 w는 1/4로 설정되고, 현재 블록이 너비가 높이보다 큰 비정방형 블록(예컨대, Nx(N/2))인 경우, 예측 가중치 w는 3/4로 설정될 수 있다.
비단 플래너 모드 뿐만 아니라, DC 모드 또는 방향성 인트라 예측 모드에서도 좌측 참조 샘플 및 상단 참조 샘플 이외의 참조 샘플들을 이용하여 인트라 예측을 수행할 수도 있다. 이하의 실시예에서는, 좌측 참조 샘플 및/또는 상단 참조 샘플을 제1 참조 샘플이라 호칭하고, 좌측 참조 샘플 및 상단 참조 샘플을 제외한 참조 샘플들을 제2 참조 샘플이라 호칭하기로 한다. 일 예로, 제2 참조 샘플은 현재 블록의 우측 참조 샘플 및/또는 하단 참조 샘플을 포함할 수 있다. 여기서, 하단 참조 샘플은, 현재 블록 내 최하단 행의 예측 대상 샘플 보다 큰 y축 좌표를 갖는 참조 샘플들을 의미하고, 우측 참조 샘플은, 현재 블록 내 최우측 열의 예측 대상 샘플보다 큰 x축 좌표를 갖는 참조 샘플들을 의미할 수 있다.
제2 참조 샘플을 이용하여 인트라 예측을 수행할 것인지 여부는, 현재 블록의 크기, 형태, 인트라 예측 모드 또는 예측 대상 샘플의 위치 중 적어도 하나를 기초로 결정될 수 있다. 일 예로, 현재 블록의 인트라 예측 모드가 수직 모드, 수평 모드 또는 대각 방향 모드인지 여부 등에 기초하여 제2 참조 샘플을 이용한 인트라 예측을 수행할 것인지 여부가 결정될 수 있다. 또는, 현재 블록 내 소정 영역에 포함된 예측 대상 샘플에 대해서는 제2 참조 샘플을 이용하여 인트라 예측을 수행하는 한편, 현재 블록 내 소정 영역에 포함되지 않는 예측 대상 샘플에 대해서는 제1 참조 샘플을 이용하여 인트라 예측을 수행하도록 설정될 수 있다.
또는, 제2 참조 샘플의 이용 여부를 나타내는 정보가 비트스트림을 통해 시그널링될 수도 있다. 상기 정보는 1비트의 플래그이거나, 현재 블록의 인트라 예측 모드를 결정하는데 이용되는 인덱스 등일 수 있다.
또는, 현재 블록의 주변 블록에서 제2 참조 샘플을 이용하였는지 여부에 기초하여 제2 참조 샘플 이용 여부를 결정할 수도 있다.
제2 참조 샘플은 제1 참조 샘플을 기초로 생성될 수 있다. 일 예로, 제1 참조 샘플들의 순서를 변경하여 제2 참조 샘플들을 구성하거나, 특정 위치의 제1 참조 샘플을 이용하여 제2 참조 샘플을 유도할 수도 있다.
도 19는 제1 참조 샘플을 이용하여 제2 참조 샘플을 유도하는 예를 설명하기 위한 도면이다.
먼저, 현재 블록의 우측 상단 참조 샘플 r(W, -1) 및 좌측 하단 참조 샘플 r(-1, H)를 기초로 유도되는 우측 하단 참조 샘플 P(W, H)를 유도할 수 있다. 구체적으로, 우측 하단 참조 샘플은 우측 상단 참조 샘플 및 좌측 하단 참조 샘플의 가중합 또는 평균 연산을 통해 유도될 수 있다. 하기 수학식 12는 우측 하단 참조 샘플을 유도하는 일 예를 나타낸 것이다.
Figure PCTKR2019007548-appb-M000012
상기 수학식 12에 나타난 바와 같이, 우측 하단 참조 샘플은 우측 상단 참조 샘플 및 좌측 하단 참조 샘플 사이의 가중합을 기초로 계산될 수 있다. 이때, 우측 상단 참조 샘플 및 좌측 하단 참조 샘플에 적용되는 가중치는 현재 블록의 너비 및 높이이 따라 결정될 수 있다. 일 예로, 현재 블록이 정방형인 경우 우측 상단 참조 샘플 및 좌측 하단 참조 샘플에 동일한 가중치가 적용되는 반면, 현재 블록이 비정방형인 경우 우측 상단 참조 샘플 및 좌측 하단 참조 샘플에 상이한 가중치가 적용될 수 있다. 단, 수학식 12에 나타난 가중치 설정 방법은 본 발명의 일 예를 나타낸 것일 뿐, 본 발명이 이에 한정되는 것은 아니다. 수학식 12에 나타난 예 이외에도, 현재 블록의 크기, 형태, 인트라 예측 모드, 참조 샘플의 가용성, 주변 블록의 가용성, 주변 블록이 인트라 예측 모드로 부호화되었는지 여부 또는 주변 블록의 인트라 예측 모드 중 적어도 하나에 기초하여 가중치가 결정될 수도 있다.
우측 참조 샘플은 우측 상단 참조 샘플과 우측 하단 참조 샘플을 기초로 유도될 수 있다. 일 예로, 우측 참조 샘플은 우측 상단 참조 샘플과 우측 하단 참조 샘플을 보간함으로써 획득될 수 있다. 하기 수학식 13은 우측 참조 샘플을 유도하는 일 예를 나타낸 것이다.
Figure PCTKR2019007548-appb-M000013
상기 수학식 13에 나타난 바와 같이, 우측 참조 샘플 Pr(W, y)(이때, y는 0과 CU 높이(cu_height) 사이의 정수)는 우측 상단 참조 샘플 r(W, -1)과 우측 하단 참조 샘플 P(W, H)를 가중 예측하여 획득될 수 있다. 이때, 우측 상단 참조 샘플 및 우측 하단 참조 샘플에 적용되는 가중치는 현재 블록의 너비, 높이 또는 우측 참조 샘플의 위치 중 적어도 하나에 기초하여 결정될 수 있다. 일 예로, 수학식 13에 나타난 예에서와 같이, 우측 상단 참조 샘플에는 (H-1-y)/H의 가중치가 적용되는 한편, 우측 하단 참조 샘플에는 (y+1)/H의 가중치가 적용될 수 있다. 단, 수학식 13에 나타난 가중치 설정 방법은 본 발명의 일 예를 나타낸 것일 뿐, 본 발명이 이에 한정되는 것은 아니다. 수학식 13에 나타난 예 이외에도, 현재 블록의 크기, 형태, 인트라 예측 모드, 참조 샘플의 가용성, 주변 블록의 가용성, 주변 블록이 인트라 예측 모드로 부호화되었는지 여부 또는 주변 블록의 인트라 예측 모드 중 적어도 하나에 기초하여 가중치가 결정될 수도 있다.
하단 참조 샘플은 좌측 하단 참조 샘플과 우측 하단 참조 샘플을 기초로 유도될 수 있다. 일 예로, 하단 참조 샘플은 좌측 하단 참조 샘플과 우측 하단 참조 샘플을 보간함으로써 획득될 수 있다. 하기 수학식 14는 하단 참조 샘플을 유도하는 일 예를 나타낸 것이다.
Figure PCTKR2019007548-appb-M000014
상기 수학식 14에 나타난 바와 같이, 하단 참조 샘플 Pb(x, H)(이때, x는 0과 CU 너비(cu_width) 사이의 정수)는 좌측 하단 참조 샘플 r(-1, H)와 우측 하단 참조 샘플 P(W, H)를 가중 예측하여 획득될 수 있다. 이때, 좌측 하단 참조 샘플 및 우측 하단 참조 샘플에 적용되는 가중치는 현재 블록의 너비, 높이 또는 하단 참조 샘플의 위치 중 적어도 하나에 기초하여 결정될 수 있다. 일 예로, 수학식 14에 나타난 예에서와 같이, 좌측 하단 참조 샘플에는 (W-1-x)/W의 가중치가 적용되는 한편, 우측 하단 참조 샘플에는 (x+1)/H의 가중치가 적용될 수 있다. 단, 수학식 14에 나타난 가중치 설정 방법은 본 발명의 일 예를 나타낸 것일 뿐, 본 발명이 이에 한정되는 것은 아니다. 수학식 14에 나타난 예 이외에도, 현재 블록의 크기, 형태, 인트라 예측 모드, 참조 샘플의 가용성, 주변 블록의 가용성, 주변 블록이 인트라 예측 모드로 부호화되었는지 여부 또는 주변 블록의 인트라 예측 모드 중 적어도 하나에 기초하여 가중치가 결정될 수도 있다.
현재 블록이 비정방형인 경우, 앞서 도 17 및 도 18을 통해 설명한 예에 기초하여 우측 참조 샘플 및 하단 참조 샘플이 유도될 수도 있다.
상술한 예에서와 같이, 우측 상단 참조 샘플 및 좌측 하단 참조 샘플 등 고정된 위치의 제1 참조 샘플들을 이용하여 우측 참조 샘플 및 하단 참조 샘플 등 제2 참조 샘플을 유도할 수 있다. 상술한 예와 달리, 우측 상단 참조 샘플 및/또는 좌측 하단 참조 샘플과 상이한 위치의 제1 참조 샘플을 이용하여 제2 참조 샘플을 유도할 수도 있다. 일 예로, 현재 블록의 상단 중단 참조 샘플 또는 현재 블록의 좌측 중단 샘플 등 제1 참조 샘플을 이용하여 우측 참조 샘플 및 하단 참조 샘플을 유도할 수 있다.
또는, 현재 블록의 인트라 예측 모드에 따라, 제2 참조 샘플을 유도하는데 이용되는 제1 참조 샘플을 결정할 수도 있다. 일 예로, 우측 참조 샘플 및/또는 하단 참조 샘플은 현재 블록의 인트라 예측 모드 방향성에 의해 특정되는 좌측 참조 샘플 및/또는 상단 참조 샘플을 기초로 유도될 수 있다.
또는, 복수의 좌측 참조 샘플 및/또는 복수의 상단 참조 샘플을 이용하여 제2 참조 샘플을 결정할 수도 있다. 일 예로, 우측 참조 샘플, 하단 참조 샘플 또는 우측 하단 참조 샘플 중 적어도 하나는 복수의 좌측 참조 샘플의 가중합, 평균값, 최대값 또는 최소값을 기초로 생성되거나, 복수의 상단 참조 샘플의 가중합, 평균값, 최대값 또는 최소값을 기초로 생성될 수 있다.
또는, 제1 참조 샘플을 복사하여 제2 참조 샘플을 생성할 수도 있다. 이때, 제2 참조 샘플을 생성하는데 이용되는 제1 참조 샘플은 고정된 위치를 가질 수도 있고, 현재 블록의 크기, 형태, 인트라 예측 모드 또는 제2 참조 샘플의 위치에 따라 적응적으로 결정될 수도 있다.
상술한 예에서는, 하단 참조 샘플이 W개이고, 우측 참조 샘플이 H개인 것으로 예시하였으나, 이보다 더 많은 수의 하단 참조 샘플 및/또는 우측 참조 샘플을 유도할 수도 있다. 일 예로, 최우측 상단 참조 샘플 r(2W-1, -1)과 동일한 수직선상까지 하단 참조 샘플을 유도하거나, 최하단 좌측 참조 샘플 r(-1, 2H-1)과 동일한 수평선상까지 우측 참조 샘플을 유도할 수 있다.
이때, W보다 큰 x 좌표를 갖는 하단 참조 샘플은 좌측 하단 참조 샘플과 우측 하단 참조 샘플을 외삽하여 생성되거나, 우측 하단 참조 샘플 P(W, H)와 최우측 하단 참조 샘플 P(2W-1, H)를 보간하여 생성될 수 있다. 최우측 하단 참조 샘플은 최우측 상단 참조 샘플 r(2W-1, -1)를 복사하여 생성되거나, 최우측 상단 참조 샘플과 좌측 하단 참조 샘플 사이의 가중합 연산을 통해 생성될 수 있다. H보다 큰 y 좌표를 갖는 우측 참조 샘플은 우측 상단 참조 샘플과 우측 하단 참조 샘플을 외삽하여 생성되거나, 우측 하단 참조 샘플 P(W, H)와 최하단 우측 참조 샘플 P(W, 2H-1)를 보간하여 생성될 수 있다. 이때, 최하단 우측 참조 샘플은 최하단 좌측 참조 샘플 r(-1, 2H-1)를 복사하여 생성되거나, 최하단 좌측 참조 샘플과 좌측 상단 참조 샘플 사이의 가중합 연산을 통해 생성될 수 있다.
제1 참조 샘플들 및 소정의 인트라 예측 모드를 기초로, 현재 블록에 인트라 예측을 수행하고, 상기 인트라 예측에 의해 생성된 예측 샘플들에 기초하여, 제2 참조 샘플들을 유도할 수 있다. 여기서, 상기 제2 참조 샘플들은 상기 인트라 예측의 수행 결과에 따른 예측 샘플 또는 상기 예측 샘플에 기초한 복원 샘플을 기초로 유도될 수 있다. 복원값은 인루프 필터가 적용되기 전의 값 또는 인루프 필터가 적용된 이후의 값일 수 있다.
상기 예측 샘플은 제2 참조 샘플들을 유도하는 것에만 이용되고, 현재 블록의 실제 예측 샘플로 이용되지 않을 수 있다. 즉, 제2 참조 샘플들을 유도하기 위해 상기 소정의 인트라 예측 모드를 기초로 인트라 예측을 수행하였다 하더라도, 상기 소정의 인트라 예측 모드와 동일 또는 상이한 인트라 예측 모드를 다시 적용하여, 상기 현재 블록의 실제 예측 샘플을 획득할 수 있다.
또는, 상기 소정의 인트라 예측 모드에 기초하여 획득된 상기 예측 샘플과, 상기 소정의 인트라 예측 모드와 상이한 예측 모드에 기초하여 획득된 추가 예측 샘플을 기초로, 상기 현재 블록의 최종 예측 샘플을 획득할 수도 있다. 상기 최종 예측 샘플은 상기 예측 샘플과 상기 추가 예측 샘플 사이의 가중합 연산 또는 평균 연산에 기초하여 획득될 수 있다.
후술되는 실시예에서는 제2 참조 샘플들을 유도하는데 이용되는 예측 샘플들을 임시 예측 샘플들이라 호칭하기로 한다.
임시 예측 샘플을 획득하기 위한 소정의 인트라 예측 모드는 플래너 모드, DC 모드, 수평 방향 모드, 수직 방향 모드 또는 대각 방향 모드 중 적어도 하나를 포함할 수 있다.
도 20은 플래너 모드를 기초로 획득된 임시 예측 샘플을 이용하여 우측 참조 샘플 및 하단 참조 샘플을 유도하는 예를 나타낸 도면이다.
플래너 모드에 기초하여, 현재 블록에 대한 임시 예측 샘플을 획득할 수 있다. 구체적으로, 예측 대상 샘플에 대한 제1 예측 샘플 및 제2 예측 샘플을 이용하여, 상기 예측 대상 샘플에 대한 임시 예측 샘플을 생성할 수 있다. 제1 예측 샘플은 예측 대상 샘플의 수평 방향에 위치하는 참조 샘플을 이용하여 획득될 수 있다. 일 예로, 제1 예측 샘플은 예측 대상 샘플과 동일한 y좌표를 갖는 좌측 참조 샘플 및 우측 상단 코너에 인접하는 참조 샘플의 가중합 연산을 기초로 생성될 수 있다. 제2 예측 샘플은 예측 대상 샘플의 수직 방향에 위치하는 참조 샘플을 이용하여 획득될 수 있다. 일 예로, 제2 예측 샘플은 예측 대상 샘플과 동일한 x좌표를 갖는 상단 참조 샘플 및 좌측 하단 코너에 인접하는 참조 샘플의 가중합 연산을 기초로 생성될 수 있다.
제2 참조 샘플은 제2 참조 샘플과 인접하는 임시 예측 샘플을 복사하여 생성될 수 있다. 일 예로, 우측 참조 샘플은 현재 블록의 우측 경계에 위치하는 임시 예측 샘플을 복사하여 생성되고, 하단 참조 샘플은 현재 블록의 하단 경계에 위치하는 임시 예측 샘플을 복사하여 생성될 수 있다.
또는, 제2 참조 샘플과 인접하는 임시 예측 샘플에 오프셋을 더하여 제2 참조 샘플을 유도할 수 있다. 일 예로, 우측 참조 샘플은 현재 블록의 우측 경계에 위치하는 임시 예측 샘플에 오프셋을 더하여 유도되고, 하단 참조 샘플은 현재 블록의 하단 경계에 위치하는 임시 예측 샘플에 오프셋을 더하여 유도될 수 있다. 오프셋은 상기 임시 예측 샘플과 상기 임시 예측 샘플에 이웃하는 이웃 임시 예측 샘플 사이의 차분값일 수 있다.
또는, 제2 참조 샘플은 복수 임시 예측 샘플들을 보간하거나, 복수 임시 예측 샘플들의 가중합 연산 또는 평균 연산을 기초로 생성될 수 있다. 일 예로, 우측 참조 샘플은 현재 블록의 우측 경계에 위치하는 임시 예측 샘플과 상기 임시 예측 샘플에 이웃하는 이웃 임시 예측 샘플을 보간하거나, 상기 임시 예측 샘플들의 가중합 연산 또는 평균 연산에 기초하여 생성될 수 있다. 하단 참조 샘플은 현재 블록의 하단 경계에 위치하는 임시 예측 샘플과 상기 임시 예측 샘플에 이웃하는 이웃 임시 예측 샘플을 보간하거나, 상기 임시 예측 샘플들의 가중합 연산 또는 평균 연산에 기초하여 생성될 수 있다.
또는, 주변 참조 샘플들의 가중합 연산 또는 평균 연산을 기초로 제2 참조 샘플을 유도할 수 있다. 일 예로, 현재 블록의 우측 경계에 인접하는 우측 참조 샘플은 현재 블록의 우측 경계에 위치하는 임시 참조 샘플을 복사하여 유도하고, 현재 블록의 하단 경계에 인접하는 하단 경계 샘플은 현재 블록의 하단 경계에 위치하는 임시 참조 샘플을 복사하여 유도할 수 있다. 이때, 현재 블록의 우측 하단 코너에 인접하는 참조 샘플(예컨대, P(W, H))은 이웃하는 우측 참조 샘플(예컨대, P(W, H-1)) 및 이웃하는 하단 참조 샘플(예컨대, P(W-1, H))의 가중합 연산 또는 평균 연산을 기초로 유도될 수 있다.
임시 예측 샘플을 획득하기 위한 소정의 인트라 예측 모드는 부호화기 및 복호화기에서 기 정의되어 있을 수 있다. 또는, 소정의 인트라 예측 모드를 결정하기 위한 정보가 비트스트림을 통해 시그날링될 수 있다. 또는, 실제 예측 샘플을 획득하는데 이용되는 인트라 예측 모드를 기초로 소정의 인트라 예측 모드를 결정할 수 있다.
제1 참조 샘플들을 일차원으로 배열하여 제1 일차원 레퍼런스 샘플 그룹을 생성하고, 제2 참조 샘플들을 일차원으로 배열하여 제2 일차원 레퍼런스 샘플 그룹을 생성할 수 있다. 제1 일차원 레퍼런스 샘플 그룸은 제1 참조 샘플들로만 구성되고, 제2 일차원 레퍼러스 샘플 그룹은 제2 참조 샘플들로만 구성될 수 있다. 또는, 제1 일차원 레퍼런스 샘플 그룹은 제1 참조 샘플들 뿐만 아니라, 제2 참조 샘플들 중 적어도 하나 이상을 포함하도록 구성되고, 제2 일차원 레퍼런스 샘플 그룹은 제2 참조 샘플들 뿐만 아니라, 제1 참조 샘플들 중 적어도 하나 이상을 포함하도록 구성될 수 있다.
도 21은 일차원 레퍼런스 샘플 그룹을 구성하는 참조 샘플들을 예시한 도면이다.
도 21의 (a)에 도시된 예에서와 같이, 제1 일차원 레퍼런스 샘플 그룹은 현재 블록의 좌측 참조 샘플들 및 상단 참조 샘플들로 구성될 수 있다.
반면, 도 21의 (b)에 도시된 예에서와 같이, 제2 일차원 레퍼런스 샘플 그룹은 현재 블록의 우측 참조 샘플들 및 하단 참조 샘플들 뿐만 아니라, 일부 좌측 참조 샘플들 및 일부 상단 참조 샘플들을 더 포함하도록 구성될 수 있다.
즉, 좌측 참조 샘플들 중 좌측 하단 참조 샘플 r(-1, H)와 좌측 하단 참조 샘플보다 y축 좌표가 큰 좌측 참조 샘플들은 제1 일차원 레퍼런스 샘플 그룹 및 제2 일차원 레퍼런스 샘플 그룹에 모두 포함될 수 있다. 또한, 상단 참조 샘플들 중 우측 상단 참조 샘플 r(W, -1)과 우측 상단 참조 샘플보다 x축 좌표가 큰 상단 참조 샘플들은 제1 일차원 레퍼런스 샘플 그룹 및 제2 일차원 레퍼런스 샘플 그룹에 모두 포함될 수 있다.
또는, 현재 블록의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여, 제1 일차원 레퍼런스 샘플 그룹에만 상기 일부 제1 참조 샘플들을 포함시키거나, 제2 일차원 레퍼런스 샘플 그룹에만 상기 일부 제1 참조 샘플들을 포함시킬 수도 있다. 일차원 레퍼런스 샘플 그룹의 구성 뿐만 아니라, 일차원 레퍼런스 샘플 그룹을 구성하는 참조 샘플들의 배열 순서도 현재 블록의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여 가변적으로 결정될 수 있다.
설명의 편의를 위해, 후술되는 실시예에서, 현재 블록의 좌측 참조 샘플 및 상단 참조 샘플을 포함하는 참조 샘플 그룹을 제1 참조 샘플 그룹(예컨대, 제1 일차원 레퍼런스 샘플 그룹)이라 호칭하기로 하고, 현재 블록의 우측 참조 샘플 및 하단 참조 샘플을 포함하는 참조 샘플 그룹을 제2 참조 샘플 그룹(예컨대, 제2 일차원 레퍼런스 샘플 그룹)이라 호칭하기로 한다. 일 예로, 제1 참조 샘플 그룹 및 제2 참조 샘플 그룹은 우측 참조 샘플 및 하단 참조 샘플의 포함 여부에 따라 구분될 수 있다. 아울러, 예측 대상 샘플의 인트라 예측을 수행하기 위해, 제1 참조 샘플 그룹으로부터 선택되는 참조 샘플을 제1 참조 대상 샘플이라 호칭하고, 제2 참조 샘플 그룹으로부터 선택되는 참조 샘플을 제2 참조 대상 샘플이라 호칭하기로 한다.
제1 참조 샘플 그룹 또는 제2 참조 샘플 그룹 중 적어도 하나를 이용하여, 현재 블록의 인트라 예측이 수행될 수 있다. 일 예로, 현재 블록 내 예측 대상 샘플의 예측값은 제1 참조 샘플 그룹에서 선택된 제1 참조 대상 샘플 또는 제2 참조 샘플 그룹에서 선택된 제2 참조 대상 샘플 중 적어도 하나에 기초하여 획득될 수 있다. 이때, 제1 참조 대상 샘플 및/또는 제2 참조 대상 샘플은 현재 블록의 형태, 크기 또는 인트라 예측 모드 중 적어도 하나에 기초하여 결정될 수 있다. 일 예로, 현재 블록의 인트라 예측 모드가 결정되면, 결정된 인트라 예측 모드 방향에 따라, 예측 대상 샘플에 대한 제1 참조 대상 샘플을 특정하고, 결정된 인트라 예측 모드의 역방향에 따라, 예측 대상 샘플에 대한 제2 참조 대상 샘플을 특정할 수 있다. 또는, 결정된 인트라 예측 모드의 방향에 따라 제1 참조 대상 샘플 및 제2 참조 대상 샘플을 특정할 수 있다.
도 22 및 도 23은 제1 참조 대상 샘플 및 제2 참조 대상 샘플의 위치를 나타낸 도면이다.
도 22는 현재 블록의 인트라 예측 모드가 지시하는 방향에 놓인 참조 샘플이 제1 참조 대상 샘플로 결정되고, 상기 방향과 반대 방향에 놓인 참조 샘플이 제2 참조 대상 샘플로 결정되는 예를 나타낸 것이다.
현재 블록의 인트라 예측 모드가 우상단 대각 방향인 경우, 제1 참조 샘플 그룹에 포함된 참조 샘플들 중 예측 대상 샘플로부터 우상단 대각 방향에 놓인 참조 샘플을 제1 참조 대상 샘플로 결정할 수 있다. 그리고, 제2 참조 샘플 그룹에 포함된 참조 샘플들 중 우상단 대각 방향과 반대 방향(즉, 좌하단 대각 방향)에 놓인 참조 샘플을 제2 참조 대상 샘플로 결정할 수 있다.
도 23은 현재 블록의 인트라 예측 샘플이 지시하는 방향에 놓인 참조 샘플들이 각각 제1 참조 대상 샘플 및 제2 참조 대상 샘플로 결정되는 예를 나타낸 것이다.
현재 블록의 인트라 예측 모드가 우상단 방향을 가리킬 경우, 제1 참조 샘플 그룹에 포함된 참조 샘플들 중 예측 대상 샘플의 우상단 방향에 놓인 참조 샘플이 제1 참조 대상 샘플로 결정되고, 제2 참조 샘플 그룹에 포함된 참조 샘플들 중 예측 대상 샘플의 우상단 방향에 놓인 참조 샘플이 제2 참조 대상 샘플로 결정될 수 있다. 도 23의 (a)에서는 상단 참조 샘플이 제1 참조 대상 샘플로 선택되고, 우측 참조 샘플이 제2 참조 대상 샘플로 선택된 것으로 도시되었다.
현재 블록의 인트라 예측 모드가 좌하단 방향을 가리킬 경우, 제1 참조 샘플 그룹에 포함된 참조 샘플들 중 예측 대상 샘플의 좌하단 방향에 놓인 참조 샘플이 제1 참조 대상 샘플로 결정되고, 제2 참조 샘플 그룹에 포함된 참조 샘플들 중 예측 대상 샘플의 좌하단 방향에 놓인 참조 샘플이 제2 참조 대상 샘플로 결정될 수 있다. 도 23의 (b)에서는 좌측 참조 샘플이 제1 참조 대상 샘플로 선택되고, 하단 참조 샘플이 제2 참조 대상 샘플로 선택된 것으로 도시되었다.
또는, 제1 참조 대상 샘플의 위치에 기초하여 제2 참조 대상 샘플의 위치를 결정하거나, 제2 참조 대상 샘플의 위치에 기초하여 제1 참조 대상 샘플의 위치를 결정할 수도 있다. 일 예로, 제1 참조 대상 샘플과 동일한 x 좌표 또는 동일한 y 좌표를 갖는 제2 참조 대상 샘플을 선택하거나, 제1 참조 대상 샘플의 x 좌표 또는 y 좌표에 오프셋을 더한 값을 갖는 제2 참조 대상 샘플을 선택할 수도 있다. 여기서, 오프셋은 고정된 값을 가질 수도 있고, 현재 블록의 크기, 형태 또는 인트라 예측 모드에 따라 적응적으로 결정될 수도 있다.
또는, 예측 대상 샘플의 위치에 기초하여 제1 참조 대상 샘플 및/또는 제2 참조 대상 샘플의 위치를 결정할 수도 있다. 일 예로, 예측 대상 샘플과 동일한 x 좌표 또는 동일한 y 좌표를 갖는 제1 참조 대상 샘플 및/또는 제2 참조 대상 샘플을 선택하거나, 예측 대상 샘플의 x 좌표 또는 y 좌표에 오프셋을 더한 값을 갖는 제1 참조 대상 샘플 및/또는 제2 참조 대상 샘플을 선택할 수도 있다. 여기서, 오프셋은 고정된 값을 가질 수도 있고, 현재 블록의 크기, 형태 또는 인트라 예측 모드에 따라 적응적으로 결정될 수도 있다.
예측 대상 샘플의 예측값은 제1 참조 대상 샘플에 기초한 제1 예측 영상 또는 제2 참조 대상 샘플에 기초한 제2 예측 영상 중 적어도 하나에 기초하여 생성될 수 있다. 이때, 제1 예측 영상은 앞서 설명한 수학식 8 내지 수학식 10을 통해 설명한 바에 기초하여 생성될 수 있다.
제2 예측 영상은 현재 블록의 인트라 예측 모드의 기울기에 따라 특정되는 제2 참조 대상 샘플을 보간 또는 복사하여 생성될 수 있다. 일 예로, 수학식 15는 제2 참조 대상 샘플을 복사하여 제2 예측 영상을 유도하는 예를 나타낸 도면이다.
Figure PCTKR2019007548-appb-M000015
상기 수학식 15에서 P2(x, y)는 제2 예측 영상을 나타내고, P_2nd_1D(x+iIdx+1+f)는 제2 참조 대상 샘플을 나타낸다.
하나의 제2 참조 대상 샘플만으로는 현재 블록의 인트라 예측 모드의 기울기를 표현할 수 없을 때에는, 복수의 제2 참조 대상 샘플들을 보간하여 제2 예측 영상을 생성할 수 있다. 구체적으로, 인트라 예측 모드의 기울기 및/또는 각도에 따른 가상의 각도선이 정수 펠(integer pel)(즉, 정수 위치의 참조 샘플)을 지나지 않는 경우, 해당 각도 선의 좌우 또는 상하에 인접한 제2 참조 샘플들을 보간하여 제2 예측 영상을 획득할 수 있다. 일 예로, 수학식 16은 제2 참조 샘플들을 보간함으로써 제2 예측 영상을 획득하는 예를 나타낸 것이다.
Figure PCTKR2019007548-appb-M000016
보간 필터의 계수는, 가중치 관련 파라미터 ifact에 기초하여 결정될 수 있다. 일 예로, 보간 필터의 계수는, 각도 선(angular line) 상에 위치한 소수 펠(fractional pel)과 정수 펠(즉, 각 참조 샘플들의 정수 위치) 사이의 거리에 기초하여 결정될 수 있다.
수학식 16에서는 탭수가 2인 보간 필터를 예시하였으나, 탭수가 2보다 큰 보간 필터를 이용할 수도 있다.
제1 예측 영상 또는 제2 예측 영상 중 적어도 하나에 기초하여 예측 대상 샘플의 최종 예측 영상을 획득할 수 있다. 일 예로, 제1 예측 영상을 예측 대상 샘플의 최종 예측 영상으로 결정하거나, 제2 예측 영상을 예측 대상 샘플의 최종 예측 영상으로 결정할 수 있다. 또는, 제1 예측 영상과 제2 예측 영상의 가중합 또는 평균 연산에 기초하여 예측 대상 샘플의 최종 예측 영상을 결정할 수도 있다.
도 24는 제1 참조 대상 샘플과 제2 참조 참조 대상 샘플의 가중합 연산을 기초로 예측 샘플을 획득하는 예를 나타낸 도면이다.
예측 대상 샘플의 예측값은, 제1 예측 영상과 제2 예측 영상의 가중합 연산을 기초로 획득될 수 있다. 바꾸어 발하면, 상기 예측값은 제1 참조 대상 샘플과 제2 참조 대상 샘플의 가중합 연산을 기초로 획득될 수 있다.
수학식 17은 제1 예측 영상 및 제2 예측 영상의 가중 연산에 기초하여 최종 예측 샘플을 획득하는 예를 나타낸 것이다.
Figure PCTKR2019007548-appb-M000017
상기 수학식 17에서 P1(x, y)는 제1 예측 영상 또는 제1 참조 대상 샘플을, P2(x, y)는 제2 예측 영상 또는 제2 참조 대상 샘플을 나타낸다. 아울러, w(x, y)는 제1 예측 영상에 부여되는 가중치를 나타낸다.
각 예측 대상 샘플에 적용되는 가중치는 예측 대상 샘플의 위치에 기초하여 결정될 수 있다. 일 예로, 하기 수학식 18은 가중치 w를 결정하는 예를 나타낸다.
Figure PCTKR2019007548-appb-M000018
상기 수학식 18에서, x는 예측 대상 샘플의 x축 좌표를 나타내고, y는 예측 대상 샘플의 y축 좌표를 나타낸다. N은 제1 참조 대상 샘플과 제2 참조 대상 샘플 사이의 L1 놈(Norm)을 나타낸다. 일 예로, 제1 참조 대상 샘플의 좌표가 (x0, y0)이고, 제2 참조 대상 샘플의 좌표가 (x1, y1)이면, 상기 N은 |x0-x1|+|y0-y1| 으로 정의될 수 있다.
또는, 제1 예측 영상 및 제2 예측 영상에 부여되는 가중치는, 예측 대상 샘플의 위치, 현재 블록의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여 결정될 수 있다. 일 예로, 수학식 19는 현재 블록의 크기 및 예측 대상 샘플의 위치에 따라 가중치가 결정되는 예를 나타낸 것이다.
Figure PCTKR2019007548-appb-M000019
상기 수학식 19에서, W 및 H는 각각 현재 블록의 너비 및 높이를 나타내고, (x, y)는 예측 대상 샘플의 좌표를 나타낸다.
상기 수학식 19에 나타난 예에서와 같이, 예측 대상 샘플이 현재 블록의 좌측 상단 코너에 인접할수록 제1 예측 영상에 부여되는 가중치를 크게 설정하고, 예측 대상 샘플이 현재 블록의 우측 하단 코너에 인접할수록 제2 예측 영상에 부여되는 가중치를 크게 설정할 수 있다.
또는, 현재 블록의 이웃 블록으로부터 가중치를 유도할 수도 있다. 여기서, 현재 블록의 이웃 블록은, 현재 블록의 상단 이웃 블록, 좌측 이웃 블록 또는 코너에 인접한 이웃 블록(예컨대, 좌측 상단 이웃 블록, 우측 상단 이웃 블록 또는 좌측 하단 이웃 블록) 중 적어도 하나를 포함할 수 있다.
또는, 가중치를 결정하기 위한 정보가 비트스트림을 통해 시그널링될 수 있다. 상기 정보는 제1 예측 영상 또는 제2 예측 영상에 적용되는 가중치 값을 나타낼 수도 있고, 현재 블록과 이웃 블록 사이의 가중치 차분값을 나타낼 수도 있다.
또는, 현재 블록의 제1 영역에서는 제1 예측 영상을 최종 예측 영상으로 설정하고, 현재 블록의 제2 영역에서는 제2 예측 영상을 최종 예측으로 설정할 수 있다. 제1 영역과 제2 영역은, 수직선, 수평선 또는 대각선을 기초로 현재 블록을 이분할하여 생성된 것일 수 있다. 일 예로, 제1 영역 및 제2 영역은 현재 블록을 이분할하여 생성된 직사각형 또는 삼각형 파티션들일 수 있다. 제1 영역 및 제2 영역 사이의 경계에 인접하는 위치의 예측값은 제1 예측 영상 및 제2 예측 영상을 가중 예측하여 획득될 수 있다. 이때, 제1 예측 영상 및 제2 예측 영상에 부여되는 가중치는 예측 대상 샘플의 위치, 현재 블록의 크기, 형태 또는 인트라 에측 모드 중 적어도 하나를 기초로 결정될 수 있다.
상술한 예에서와 같이, 복수 예측 영상을 기초로 최종 예측 영상을 획득하는 것을 양방향 인트라 예측(Bi-intra Prediction)이라 호칭할 수 있다.
양방향 인트라 예측은 현재 블록 내 일부 영역에 대해서만 적용될 수 있다. 이때, 양방향 인트라 예측이 적용되는 영역은 부호화기 및 복호화기에서 기 정의된 것일 수도 있다. 일 예로, 현재 블록 내 우측 하단 코너에 인접하는 소정 크기(예컨대, 4x4) 블록에 양방향 인트라 예측을 적용할 수 있다. 또는, 현재 블록의 크기, 형태 또는 인트라 예측 모드에 따라 적응적으로 양방향 인트라 예측이 적용되는 영역을 결정할 수도 있다. 또는, 양방향 인트라 예측이 적용되는 영역을 결정하기 위한 정보(예컨대, 영역의 크기 또는 위치를 나타내는 정보)가 비트스트림을 통해 시그널링될 수도 있다.
도 25는 양방향 인트라 예측이 적용되는 영역을 나타낸 도면이다.
양방향 인트라 예측이 적용되는 영역 내에서는 제1 예측 영상과 제2 예측 영상을 가중 예측하여 최종 예측 샘플이 획득될 수 있다. 반면, 양방향 인트라 예측이 적용되지 않는 영역 내에서는 제1 예측 영상 또는 제2 예측 영상을 최종 예측 샘플로 결정할 수 있다.
양방향 인트라 예측의 적용 영역은 사각 형태를 띨 수도 있고, 삼각 형태를 띨 수도 있다.
상술한 예에서는, 제1 샘플 그룹에서 선택된 제1 참조 대상 샘플 및 제2 샘플 그룹에서 선택된 제2 참조 대상 샘플을 이용하여 양방향 인트라 예측이 수행되는 것으로 설명하였다. 설명한 예와 달리, 제1 샘플 그룹에서 복수의 참조 샘플을 선택하여 양방향 인트라 예측을 수행하거나, 제2 샘플 그룹에서 복수의 참조 샘플을 선택하여 양방향 인트라 예측을 수행하는 것도 가능하다. 일 예로, 현재 블록의 인트라 예측 모드가 우측 상단 대각 방향 또는 좌측 하단 대각 방향인 경우, 제1 샘플 그룹 중 상단 참조 샘플 및 좌측 참조 샘플을 선택하여 양방향 인트라 예측을 수행할 수 있다. 즉, 상단 참조 샘플을 기초로 획득되는 제1 참조 영상과 하단 참조 샘플을 기초로 획득되는 제2 참조 영상을 가중 예측하여, 현재 블록의 최종 예측 샘플을 획득할 수 있다.
또는, 인트라 예측 모드에 따라, 제2 샘플 그룹 중 우측 참조 샘플 및 하단 참조 샘플을 선택하여 양방향 인트라 예측을 수행할 수도 있다.
양방향 인트라 예측은 독립적인 인트라 예측 모드로 정의될 수 있다. 일 예로, N개의 방향성 예측 모드와 N개의 방향성 예측 모드에 대응하는 N개의 양방향 인트라 예측 모드를 정의하여, 총 2N+2개의 인트라 예측 모드를 정의할 수 있다. 일 예로, 도 9에 도시된 인트라 예측 모드에 양방향 인트라 예측 모드를 추가하여, 총 68개의 인트라 예측 모드(즉, 2개의 비방향성 인트라 예측 모드, 33개의 방향성 인트라 예측 모드 및 33개의 양방향 인트라 예측 모드)를 정의할 수 있다. 물론, 33개보다 더 많은 수 혹은 더 적은 수의 방향성 인트라 예측 모드 또는 양방향 인트라 예측 모드를 사용하는 것도 가능하다.
또는, 현재 블록의 인트라 예측 모드를 결정한 뒤, 결정된 인트라 예측 모드를 양방향 예측 모드로 전환 이용할 것인지 여부를 결정할 수도 있다. 일 예로, 현재 블록의 인트라 예측 모드가 결정되면, 결정된 인트라 예측 모드를 양방향 인트라 예측 모드로 이용할 것인지 여부에 대한 정보를 복호화할 수 있다. 상기 정보는 1비트의 플래그(예컨대, bi_intra_flag)일 수 있으나, 이에 한정되지 않는다. bi_intra_flag의 값이 0인 것은, 방향성 인트라 예측이 수행됨을 나타내고, bi_intra_flag의 값이 1인 것은, 양방향 인트라 예측이 수행됨을 나타낸다. 즉, bi_intra_flag의 값이 0인 경우, 제1 예측 영상이 현재 블록의 최종 예측 샘플로 결정되는 반면, bi_intra_flag의 값이 1인 경우, 제1 예측 영상 및 제2 예측 영상을 가중 예측한 것이 현재 블록의 최종 예측 샘플로 결정될 수 있다.
또는, 현재 블록에 이웃하는 주변 블록이 양방향 인트라 예측 모드를 이용했는지 여부에 따라, 현재 블록이 양방향 인트라 예측 모드를 사용하는지 여부를 결정할 수 있다. 일 예로, 현재 블록의 인트라 예측 모드가 주변 블록의 인트라 예측 모드를 기초로 유도된 후보자(즉, MPM 후보)와 동일한 경우, 현재 블록이 양방향 인트라 예측 모드를 사용하는지 여부를 상기 주변 블록이 양방향 인트라 예측 모드를 사용하였는지 여부와 동일하게 결정할 수 있다.
또는, 현재 블록의 크기 및/또는 형태에 기초하여 양방향 인트라 예측 수행 여부를 결정할 수도 있다. 일 예로, 32x32 이상의 블록에서만, 양방향 인트라 예측이 허용되도록 설정될 수 있다. 이에 따라, 현재 블록의 크기가 32x32 보다 작은 경우에는 양방향 인트라 예측이 적용되지 않는 반면, 현재 블록의 크기가 32x32 이상인 경우, 양방향 인트라 예측이 적용될 수 있다.
다른 예로, 정방형 블록에 대해서만 양방향 인트라 예측을 허용하거나, 비정방 형태의 블록에 대해서만 양방향 인트라 예측을 허용할 수도 있다.
또는, 일부 방향성 인트라 예측 모드에 한하여, 양방향 인트라 예측을 적용할 수도 있다. 일 예로, 도 26은 양방향 인트라 예측이 허용되는 방향성 예측 모드를 식별 표시한 것이다. 도 26에 도시된 예에서와 같이, 수평 방향과 수직 방향 사이의 일부 인트라 예측 모드에 한하여 양방향 인트라 예측이 허용되도록 설정할 수 있다. 이때, 상기 범위 내 인트라 예측 모드가 선택되는 경우, 디폴트로 양방향 인트라 예측을 수행할 수도 있고, 상기 범위 내 인트라 예측 모드가 선택되는 경우, 비트스트림을 통해 파싱되는 정보, 현재 블록의 크기 또는 형태 중 적어도 하나에 기초하여 양방향 인트라 예측 모드의 수행 여부를 결정할 수도 있다.
양방향 인트라 예측이 허용되는 인트라 예측 모드는 도 26에 도시된 예에 한정되지 않는다. 양방향 인트라 예측이 허용되는 인트라 예측 모드는 부호화기 및 복호화기에서 기 정의되어 있을 수도 있고, 현재 블록의 크기 및/또는 형태에 따라 적응적으로 결정될 수 있다. 또는, 양방향 인트라 예측이 허용되는 인트라 예측 모드를 결정하기 위한 정보가 비트스트림을 통해 시그널링될 수도 있다.
도 27은 본 발명에 따른 양방향 인트라 예측 모드의 적용 여부를 결정하는 과정을 나타낸 흐름도이다.
먼저, 현재 블록의 인트라 예측 모드가 비방향성 모드인지 여부를 결정할 수 있다(S2710). 상기 비방향성 모드는 플래너 또는 DC 중 적어도 하나를 포함할 수 있다.
현재 블록의 인트라 예측 모드가 비방향성 모드인지 여부를 나타내는 정보가 비트스트림을 통해 시그날링될 수 있다. 일 예로, 현재 블록의 인트라 예측 보드가 비방향성 모드인지 여부를 나타내는 플래그, 현재 블록의 인트라 예측 모드가 플래너 모드인지 여부를 나타내는 플래그 또는 현재 블록의 인트라 예측 모드가 DC 모드인지 여부를 나타내는 플래그 중 적어도 하나가 비트스트림을 통해 시그날링될 수 있다.
또는, MPM 후보 또는 잔여 모드 정보를 기초로, 현재 블록의 인트라 예측 모드를 결정할 수 있다.
현재 블록의 인트라 예측 모드가 비방향성 모드인 경우, 현재 블록에 양방향 인트라 예측이 적용되지 않는다(S2720).
현재 블록의 인트라 예측 모드가 비방향성 모드가 아닌 경우, 현재 블록에 양방향 인트라 예측이 적용되는지 여부를 결정할 수 있다(S2730). 현재 블록에 양방향 인트라 예측이 적용되는지 여부는, 비트스트림으로부터 파싱되는 정보, 현재 블록의 형태, 크기 또는 인트라 예측 모드에 기초하여 결정할 수 있다.
일 예로, 비트스트림으로부터 파싱되는 플래그(예컨대, bi_pred_flag)에 기초하여 현재 블록에 양방향 인트라 예측이 적용되는지 여부를 결정할 수 있다. bi_pred_flag의 값이 0인 것은 현재 블록에 양방향 인트라 예측이 적용되지 않음을 나타내고, bi_pred_flag의 값이 1인 것은 현재 블록에 양방향 인트라 예측이 적용됨을 나타낸다. 또는, 현재 블록의 인트라 예측 모드가 양방향 인트라 예측이 적용되는 방향성 예측 모드인지 여부에 기초하여 현재 블록에 양방향 인트라 예측이 적용되는지 여부를 결정할 수 있다.
단방향 혹은 양방향 인트라 예측을 수행하기 위해, 현재 블록의 참조 샘플을 유도할 수 있다. 참조 샘플들은, 현재 블록의 좌측 및 상단에 인접하는 제1 참조 샘플들 및 우측 및 하단에 인접하는 제2 참조 샘플들을 포함할 수 있다. 현재 블록에 양방향 인트라 에측이 적용되는 경우에 한하여, 제2 참조 샘플들을 유도할 수 있다.
현재 블록에 양방향 인트라 예측이 적용되지 않는 경우, 현재 블록의 인트라 예측 모드에 따라, 단방향 인트라 예측을 수행할 수 있다(S2740). 단방향 인트라 예측시, 예측 샘플은 제1 참조 샘플들 중 적어도 하나를 기초로 획득될 수 있다.
현재 블록에 양방향 인트라 예측이 적용되는 경우, 현재 블록의 인트라 예측 모드에 따라, 양방향 인트라 예측을 수행할 수 있다(S2750). 양방향 인트라 예측 시, 예측 샘플은 제1 참조 대상 샘플들 중 적어도 하나를 기초로 획득되는 제1 예측 영상 및 제2 참조 샘플들 중 적어도 하나를 기초로 획득되는 제2 예측 영상을 기초로 획득될 수 있다. 제1 참조 대상 샘플 및 제2 참조 대상 샘플은 인트라 예측 모드의 방향성을 기초로 결정될 수도 있고, 현재 블록의 크기, 형태 또는 타 참조 대상 샘플의 위치를 기초로 결정될 수도 있다. 제1 예측 영상 및 제2 예측 영상이 획득되면, 제1 예측 영상 및 제2 예측 영상을 가중 예측하여, 상기 예측 샘플을 획득할 수 있다.
다른 예로, 현재 블록을 복수의 영역으로 분할한 뒤, 분할된 복수의 영역 각각에 대해 인트라 예측을 수행할 수 있다. 일 예로, 현재 블록에 포함된 제1 영역에 대해서는, 제1 참조 샘플 그룹에 포함된 참조 샘플들을 이용한 인트라 예측이 수행될 수 있다. 반면, 현재 블록에 포함된 제2 영역에 대해서는 상기 제1 영역의 예측값 또는 복원값을 기초로 유도된 참조 샘플들, 제1 참조 샘플 그룹에 포함된 참조 샘플들 또는 제2 참조 샘플 그룹에 포함된 참조 샘플들을 이용한 인트라 예측이 수행될 수 있다.
이때, 상기 제1 영역에 적용되는 제1 인트라 예측 모드 및 상기 제2 영역에 적용되는 제2 인트라 예측 모드는 서로 동일할 수도 있고 서로 상이할 수도 있다. 일 예로, 제1 인트라 예측 모드 및 제2 인트라 예측 모드 중 어느 하나는 부호화기 및 복호화기에서 기 정의된 것일 수 있다. 일 예로, 제1 인트라 예측 모드 및 제2 인트라 예측 모드 중 어느 하나는 플래너 모드, DC 모드, 수평 방향 모드, 수직 방향 모드 또는 대각 방향 모드일 수 있다. 또는, 제1 인트라 예측 모드 및 제2 인트라 예측 모드 중 어느 하나는 현재 블록의 크기, 형태 또는 분할 타입 중 적어도 하나에 기초하여 가변적으로 결정될 수 있다. 일 예로, 현재 블록의 너비가 높이보다 큰 경우, 제1 인트라 예측 모드 및 제2 인트라 예측 모드 중 어느 하나는 수직 모드로 결정될 수 있다. 반면, 현재 블록의 높이가 너비보다 큰 경우, 제1 인트라 예측 모드 및 제2 인트라 예측 모드 중 어느 하나는 수평 모드로 결정될 수 있다. 현재 블록의 너비와 높이가 같은 경우, 제1 인트라 예측 모드 및 제2 인트라 예측 모드 중 어느 하나는 플래너 모드 또는 DC 모드로 결정될 수 있다.
제1 인트라 예측 모드 및 제2 인트라 예측 모드 중 다른 하나는 MPM 후보에 기반한 유도 방법을 이용하여 결정될 수 있다.
상기 제1 영역 및 상기 제2 영역은 각각 현재 블록에 포함된 적어도 하나의 샘플을 포함할 수 있다. 일 예로, 제1 영역은 현재 블록의 좌측(또는 우측) n개의 열 또는 현재 블록의 상단(또는 하단) m개의 행 중 적어도 하나를 포함할 수 있다. 상기 n 및 m은 1, 2 또는 그 이상의 정수일 수 있다. 또는, 현재 블록의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여 n 및 m을 결정할 수 있다. 제2 영역은 제1 영역을 제외한 잔여 영역 또는 상기 잔여 영역 중 일부 영역일 수 있다.
복호화 과정 또는 부호화 과정을 중심으로 설명된 실시예들을, 부호화 과정 또는 복호화 과정에 적용하는 것은, 본 발명의 범주에 포함되는 것이다. 소정의 순서로 설명된 실시예들을, 설명된 것과 상이한 순서로 변경하는 것 역시, 본 발명의 범주에 포함되는 것이다.
상술한 실시예는 일련의 단계 또는 순서도를 기초로 설명되고 있으나, 이는 발명의 시계열적 순서를 한정한 것은 아니며, 필요에 따라 동시에 수행되거나 다른 순서로 수행될 수 있다. 또한, 상술한 실시예에서 블록도를 구성하는 구성요소(예를 들어, 유닛, 모듈 등) 각각은 하드웨어 장치 또는 소프트웨어로 구현될 수도 있고, 복수의 구성요소가 결합하여 하나의 하드웨어 장치 또는 소프트웨어로 구현될 수도 있다. 상술한 실시예는 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
본 발명은 영상을 부호화/복호화할 수 있는 전자 장치에 적용될 수 있다.

Claims (15)

  1. 현재 블록의 상단 및 좌측에 위치하는 제1 참조 샘플들을 유도하는 단계;
    상기 현재 블록의 우측 및 하단에 위치하는 제2 참조 샘플들을 유도하는 단계; 및
    제1 참조 샘플 및 제2 참조 샘플을 기초로, 상기 현재 블록에 대한 예측 샘플을 획득하는 단계를 포함하되,
    상기 제2 참조 샘플들은, 상기 제1 참조 샘플들 및 임시 인트라 예측 모드를 기초로 상기 현재 블록에 대한 임시 인트라 예측을 수행함으로써 생성되는 임시 예측 샘플들을 기초로 유도되는 것을 특징으로 하는, 영상 복호화 방법.
  2. 제1 항에 있어서,
    상기 제2 참조 샘플은, 상기 현재 블록의 경계에 위치하는 임시 예측 샘플을 복사하여 유도되는 것을 특징으로 하는, 영상 복호화 방법.
  3. 제1 항에 있어서,
    상기 제2 참조 샘플은, 상기 현재 블록의 경계에 위치하는 임시 예측 샘플 및 상기 임시 예측 샘플에 이웃하는 이웃 임시 예측 샘플을 기초로 유도되는 것을 특징으로 하는, 영상 복호화 방법.
  4. 제1 항에 있어서,
    상기 예측 샘플은, 상기 제1 참조 샘플 및 상기 제2 참조 샘플의 가중합 연산을 기초로 획득되고,
    상기 가중합 연산시 이용되는 가중치는, 상기 예측 샘플의 위치, 상기 제1 참조 샘플의 위치 및 상기 제2 참조 샘플의 위치를 기초로 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  5. 제1 항에 있어서,
    상기 제1 참조 샘플 및 상기 제2 참조 샘플은 예측 대상 샘플에서 상기 현재 블록의 인트라 예측 모드가 지시하는 방향에 놓인 것을 특징으로 하는, 영상 복호화 방법.
  6. 제1 항에 있어서,
    상기 제1 참조 샘플 및 상기 제2 참조 샘플 중 어느 하나는 예측 대상 샘플에서 상기 현재 블록의 인트라 예측 모드가 지시하는 방향에 놓이고, 다른 하나는 상기 인트라 예측 모드가 지시하는 방향의 반대 방향에 놓인 것을 특징으로 하는, 영상 복호화 방법.
  7. 제1 항에 있어서,
    상기 임시 인트라 예측 모드는 플래너 또는 DC 모드인 것을 특징으로 하는, 영상 복호화 방법.
  8. 현재 블록의 상단 및 좌측에 위치하는 제1 참조 샘플들을 유도하는 단계;
    상기 현재 블록의 우측 및 하단에 위치하는 제2 참조 샘플들을 유도하는 단계; 및
    제1 참조 샘플 및 제2 참조 샘플을 기초로, 상기 현재 블록에 대한 예측 샘플을 획득하는 단계를 포함하되,
    상기 제2 참조 샘플들은, 상기 제1 참조 샘플들 및 임시 인트라 예측 모드를 기초로 상기 현재 블록에 대한 임시 인트라 예측을 수행함으로써 생성되는 임시 예측 샘플들을 기초로 유도되는 것을 특징으로 하는, 영상 부호화 방법.
  9. 제8 항에 있어서,
    상기 제2 참조 샘플은, 상기 현재 블록의 경계에 위치하는 임시 예측 샘플을 복사하여 유도되는 것을 특징으로 하는, 영상 부호화 방법.
  10. 제8 항에 있어서,
    상기 제2 참조 샘플은, 상기 현재 블록의 경계에 위치하는 임시 예측 샘플 및 상기 임시 예측 샘플에 이웃하는 이웃 임시 예측 샘플을 기초로 유도되는 것을 특징으로 하는, 영상 부호화 방법.
  11. 제8 항에 있어서,
    상기 예측 샘플은, 상기 제1 참조 샘플 및 상기 제2 참조 샘플의 가중합 연산을 기초로 획득되고,
    상기 가중합 연산시 이용되는 가중치는, 상기 예측 샘플의 위치, 상기 제1 참조 샘플의 위치 및 상기 제2 참조 샘플의 위치를 기초로 결정되는 것을 특징으로 하는, 영상 부호화 방법.
  12. 제8 항에 있어서,
    상기 제1 참조 샘플 및 상기 제2 참조 샘플은 예측 대상 샘플에서 상기 현재 블록의 인트라 예측 모드가 지시하는 방향에 놓인 것을 특징으로 하는, 영상 부호화 방법.
  13. 제8 항에 있어서,
    상기 제1 참조 샘플 및 상기 제2 참조 샘플 중 어느 하나는 예측 대상 샘플에서 상기 현재 블록의 인트라 예측 모드가 지시하는 방향에 놓이고, 다른 하나는 상기 인트라 예측 모드가 지시하는 방향의 반대 방향에 놓인 것을 특징으로 하는, 영상 부호화 방법.
  14. 제8 항에 있어서,
    상기 임시 인트라 예측 모드는 플래너 또는 DC 모드인 것을 특징으로 하는, 영상 복호화 방법.
  15. 현재 블록의 상단 및 좌측에 위치하는 제1 참조 샘플들을 유도하고, 상기 현재 블록의 우측 및 하단에 위치하는 제2 참조 샘플들을 유도하고, 제1 참조 샘플 및 제2 참조 샘플을 기초로, 상기 현재 블록에 대한 예측 샘플을 획득하는 인트라 예측부를 포함하되,
    상기 제2 참조 샘플들은, 상기 제1 참조 샘플들 및 임시 인트라 예측 모드를 기초로 상기 현재 블록에 대한 임시 인트라 예측을 수행함으로써 생성되는 임시 예측 샘플들을 기초로 유도되는 것을 특징으로 하는, 영상 복호화 장치.
PCT/KR2019/007548 2018-06-21 2019-06-21 비디오 신호 처리 방법 및 장치 WO2019245342A1 (ko)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US17/057,068 US20210144402A1 (en) 2018-06-21 2019-06-21 Video signal processing method and device
CN201980035904.9A CN112204965A (zh) 2018-06-21 2019-06-21 用于处理视频信号的方法和设备
US17/104,571 US20210160488A1 (en) 2018-06-21 2020-11-25 Video signal processing method and device
US17/670,381 US20220167012A1 (en) 2018-06-21 2022-02-11 Video signal processing method and device involving modification of intra predicted sample

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20180071540 2018-06-21
KR10-2018-0071540 2018-06-21

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US17/057,068 A-371-Of-International US20210144402A1 (en) 2018-06-21 2019-06-21 Video signal processing method and device
US17/104,571 Division US20210160488A1 (en) 2018-06-21 2020-11-25 Video signal processing method and device

Publications (1)

Publication Number Publication Date
WO2019245342A1 true WO2019245342A1 (ko) 2019-12-26

Family

ID=68983788

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/007548 WO2019245342A1 (ko) 2018-06-21 2019-06-21 비디오 신호 처리 방법 및 장치

Country Status (4)

Country Link
US (3) US20210144402A1 (ko)
CN (2) CN112204965A (ko)
MX (1) MX2020013261A (ko)
WO (1) WO2019245342A1 (ko)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116800958A (zh) * 2019-01-02 2023-09-22 Oppo广东移动通信有限公司 帧内预测方法及装置、计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101444667B1 (ko) * 2011-01-15 2014-09-30 에스케이 텔레콤주식회사 양방향 인트라 예측을 이용한 영상 부호화/복호화 방법 및 장치
US20150124879A1 (en) * 2012-06-28 2015-05-07 Foundation Of Soongsil University-Industry Cooperation Intra prediction device for image
KR20150140848A (ko) * 2010-12-22 2015-12-16 엘지전자 주식회사 화면 내 예측 방법 및 이러한 방법을 사용하는 장치
KR20170108367A (ko) * 2016-03-17 2017-09-27 세종대학교산학협력단 인트라 예측 기반의 비디오 신호 처리 방법 및 장치
KR20180025285A (ko) * 2016-08-31 2018-03-08 주식회사 케이티 비디오 신호 처리 방법 및 장치

Family Cites Families (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100978465B1 (ko) * 2010-03-19 2010-08-26 성균관대학교산학협력단 양-예측 부호화 방법 및 장치, 양-예측 복호화 방법 및 장치 및 기록매체
CN105245878B (zh) * 2010-05-25 2018-10-16 Lg电子株式会社 新的平面预测模式
CN107181950B (zh) * 2010-12-08 2020-11-06 Lg 电子株式会社 一种执行内预测的编码装置和解码装置
CN107277540B (zh) * 2011-02-09 2020-05-08 Lg 电子株式会社 编码和解码图像的方法及使用该方法的设备
CN106851270B (zh) * 2011-04-25 2020-08-28 Lg电子株式会社 执行帧内预测的编码设备和解码设备
KR20120140181A (ko) * 2011-06-20 2012-12-28 한국전자통신연구원 화면내 예측 블록 경계 필터링을 이용한 부호화/복호화 방법 및 그 장치
KR101947657B1 (ko) * 2011-10-24 2019-02-14 (주)대가람 인트라 예측 정보 부호화 방법 및 장치
JP6210375B2 (ja) * 2012-12-28 2017-10-11 サン パテント トラスト 画像符号化方法、画像復号方法、画像符号化装置、画像復号装置及び画像符号化復号装置
EP3367680B1 (en) * 2015-10-22 2020-07-01 LG Electronics Inc. Intra-prediction method and apparatus in video coding system
US10547854B2 (en) * 2016-05-13 2020-01-28 Qualcomm Incorporated Neighbor based signaling of intra prediction modes
US20190110052A1 (en) * 2017-10-06 2019-04-11 Futurewei Technologies, Inc. Bidirectional intra prediction
EP3487177A1 (en) * 2017-11-21 2019-05-22 Thomson Licensing Method and apparatus for low-complexity bi-directional intra prediction in video encoding and decoding
WO2019107927A1 (ko) * 2017-11-28 2019-06-06 한국전자통신연구원 양방향 인트라 예측 방법 및 장치
CN117499676A (zh) * 2018-02-23 2024-02-02 英迪股份有限公司 对图像进行解码或编码的方法和传输图像的数据的方法
WO2019190181A1 (ko) * 2018-03-30 2019-10-03 엘지전자 주식회사 인트라 예측 기반 영상/비디오 코딩 방법 및 그 장치
US10284860B1 (en) * 2018-07-02 2019-05-07 Tencent America LLC Method and apparatus for video coding
US10771778B2 (en) * 2018-09-14 2020-09-08 Tencent America LLC Method and device for MPM list generation for multi-line intra prediction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20150140848A (ko) * 2010-12-22 2015-12-16 엘지전자 주식회사 화면 내 예측 방법 및 이러한 방법을 사용하는 장치
KR101444667B1 (ko) * 2011-01-15 2014-09-30 에스케이 텔레콤주식회사 양방향 인트라 예측을 이용한 영상 부호화/복호화 방법 및 장치
US20150124879A1 (en) * 2012-06-28 2015-05-07 Foundation Of Soongsil University-Industry Cooperation Intra prediction device for image
KR20170108367A (ko) * 2016-03-17 2017-09-27 세종대학교산학협력단 인트라 예측 기반의 비디오 신호 처리 방법 및 장치
KR20180025285A (ko) * 2016-08-31 2018-03-08 주식회사 케이티 비디오 신호 처리 방법 및 장치

Also Published As

Publication number Publication date
CN112204965A (zh) 2021-01-08
US20210160488A1 (en) 2021-05-27
MX2020013261A (es) 2021-04-12
US20210144402A1 (en) 2021-05-13
US20220167012A1 (en) 2022-05-26
CN112954349A (zh) 2021-06-11

Similar Documents

Publication Publication Date Title
WO2018026219A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020159198A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2017176030A1 (ko) 비디오 신호 처리 방법 및 장치
WO2017222326A1 (ko) 비디오 신호 처리 방법 및 장치
WO2017171370A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020111785A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2018155986A2 (ko) 비디오 신호 처리 방법 및 장치
WO2018030773A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2020096389A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019182292A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020076116A1 (ko) 영상 부호화/복호화 방법 및 장치
WO2020076125A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019083334A1 (ko) 비대칭 서브 블록 기반 영상 부호화/복호화 방법 및 장치
WO2018097626A1 (ko) 비디오 신호 처리 방법 및 장치
WO2019050292A1 (ko) 비디오 신호 처리 방법 및 장치
WO2019190201A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018047995A1 (ko) 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2018212579A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020004978A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018056701A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018066958A1 (ko) 비디오 신호 처리 방법 및 장치
WO2019050291A1 (ko) 비디오 신호 처리 방법 및 장치
WO2019225994A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020213963A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2020060327A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19823675

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19823675

Country of ref document: EP

Kind code of ref document: A1