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

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

Info

Publication number
WO2019050292A1
WO2019050292A1 PCT/KR2018/010414 KR2018010414W WO2019050292A1 WO 2019050292 A1 WO2019050292 A1 WO 2019050292A1 KR 2018010414 W KR2018010414 W KR 2018010414W WO 2019050292 A1 WO2019050292 A1 WO 2019050292A1
Authority
WO
WIPO (PCT)
Prior art keywords
current block
block
reference sample
reference samples
sample
Prior art date
Application number
PCT/KR2018/010414
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
Priority to AU2018327924A priority Critical patent/AU2018327924B2/en
Priority to CN201880035866.2A priority patent/CN110710215A/zh
Priority to CN202311057914.7A priority patent/CN116916012A/zh
Priority to CA3065922A priority patent/CA3065922A1/en
Priority to CN202311057807.4A priority patent/CN116916010A/zh
Priority to CN202311057752.7A priority patent/CN116916009A/zh
Application filed by 주식회사 케이티 filed Critical 주식회사 케이티
Priority to CN202311057838.XA priority patent/CN117014606A/zh
Priority to US16/619,327 priority patent/US11184606B2/en
Priority to CN202311057870.8A priority patent/CN116916011A/zh
Publication of WO2019050292A1 publication Critical patent/WO2019050292A1/ko
Priority to US17/507,760 priority patent/US11700366B2/en
Priority to US18/201,393 priority patent/US20230300324A1/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/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/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
    • 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/107Selection of coding mode or of prediction mode between spatial and temporal predictive coding, e.g. picture refresh
    • 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/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/117Filters, e.g. for pre-processing or post-processing
    • 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/119Adaptive subdivision aspects, e.g. subdivision of a picture into rectangular or non-rectangular coding blocks
    • 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/12Selection from among a plurality of transforms or standards, e.g. selection between discrete cosine transform [DCT] and sub-band transform or selection between H.263 and H.264
    • H04N19/122Selection of transform size, e.g. 8x8 or 2x4x8 DCT; Selection of sub-band transforms of varying structure or type
    • 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/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/172Methods 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 picture, frame or field
    • 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/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/182Methods 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 a pixel
    • 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/186Methods 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 a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/20Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video object coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • 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/597Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding specially adapted for multi-view video sequence encoding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Definitions

  • the present invention relates to a video signal processing method and apparatus.
  • HD image and UHD image are increasing in various applications.
  • HD image and UHD image are increasing in various applications.
  • the image data has high resolution and high quality, the amount of data increases relative to the existing image data. Therefore, when the image data is transmitted using a medium such as a wired / wireless broadband line or stored using an existing storage medium, The storage cost is increased.
  • High-efficiency image compression techniques can be utilized to solve such problems as image data becomes high-resolution and high-quality.
  • An inter picture prediction technique for predicting a pixel value included in a current picture from a previous or a subsequent picture of a current picture by an image compression technique an intra picture prediction technique for predicting a pixel value included in a current picture using pixel information in the current picture
  • an entropy encoding technique in which a short code is assigned to a value having a high appearance frequency and a long code is assigned to a value having a low appearance frequency.
  • Image data can be effectively compressed and transmitted or stored using such an image compression technique.
  • An object of the present invention is to provide a method and apparatus for efficiently performing intra prediction on a block to be encoded / decoded in coding / decoding a video signal.
  • An object of the present invention is to provide a method and apparatus for performing intra prediction using a plurality of reference samples that are not neighboring each other in coding / 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 coding / decoding a video signal.
  • An object of the present invention is to provide a method and apparatus for adaptively determining a range of a reference sample used for DC value calculation in encoding / decoding a video signal.
  • a method and apparatus for decoding a video signal includes the steps of: determining an intra prediction mode of a current block; if the intra prediction mode of the current block is a DC mode, A DC value may be determined based on one and a predicted sample of the current block may be derived based on the DC value. At this time, the weight applied to the left reference samples or the upper reference samples to determine the range of the reference samples or the DC value used to determine the DC value may be determined based on the size, shape, Based on at least one of < / RTI >
  • a method and apparatus for encoding a video signal according to the present invention includes the steps of: determining an intra prediction mode of a current block; if the intra prediction mode of the current block is a DC mode, A DC value may be determined based on one and a predicted sample of the current block may be derived based on the DC value. At this time, the weight applied to the left reference samples or the upper reference samples to determine the range of the reference samples or the DC value used to determine the DC value may be determined based on the size, shape, Based on at least one of < / RTI >
  • the DC value when the current block is a non-turbulent block, the DC value may be determined using only the left reference samples or the upper reference samples have.
  • the DC value when the current block is a non-block type block having a width greater than the height, the DC value may be determined as an average value of the upper reference samples.
  • the DC value when the current block is a non-block type block having a height greater than the width, the DC value may be determined as an average value of the left reference samples.
  • the DC value may be determined by a weighted sum operation of the upper reference samples and the left reference samples.
  • the weight applied to the upper reference samples is larger than the weight of the left reference samples Value. ≪ / RTI >
  • the weight applied to the left reference samples is larger Value. ≪ / RTI >
  • the weights applied between the left reference samples having a y coordinate larger than the lowermost row of the current block and the residual left reference samples may be different.
  • the weights applied between the upper reference samples having x coordinates larger than the rightmost column of the current block and the upper left reference samples may be different.
  • intraprediction can be efficiently performed on a block to be encoded / decoded.
  • intra prediction is performed using a plurality of reference samples that are not adjacent to each other, thereby improving the efficiency of intra prediction.
  • the range of the reference sample used for calculating the DC value is adaptively determined to increase the efficiency of intra prediction.
  • the present invention is advantageous in that the efficiency of intraprediction can be improved by encoding a DCT value by assigning different weights to reference samples when coding / decoding a video signal.
  • 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 illustrates an example in which a coding block is hierarchically divided based on a tree structure according to an embodiment to which the present invention is applied.
  • FIG. 4 is a diagram illustrating a partition type in which binary tree-based partitioning is permitted according to an embodiment of the present invention.
  • FIG. 5 is a diagram illustrating an example in which only a specific type of binary tree-based partitioning is permitted according to an embodiment of the present invention.
  • FIG. 6 is a diagram for explaining an example in which information related to the allowable number of binary tree division is encoded / decoded according to an embodiment to which the present invention is applied.
  • FIG. 7 is a diagram illustrating a partition mode that can be applied to a coding block according to an embodiment of the present invention.
  • FIG. 8 illustrates an intra prediction mode defined in an image encoder / decoder according to an embodiment of the present invention.
  • FIG. 9 illustrates an example of an extended intra prediction mode according to an embodiment of the present invention. Referring to FIG.
  • FIG. 10 is a flowchart schematically illustrating an intra prediction method according to an embodiment of the present invention.
  • FIG. 11 illustrates a method of correcting a prediction sample of a current block based on difference information of neighboring samples, according to an embodiment of the present invention.
  • FIGS. 12 and 13 show a one-dimensional reference sample group in which reference samples are rearranged in a line.
  • FIG. 14 is a diagram showing an example of deriving a right reference sample or a lower reference sample using a plurality of reference samples.
  • FIGS. 15 and 16 are diagrams for explaining determination of a right reference sample and a bottom reference sample with respect to a non-square block, according to an embodiment of the present invention.
  • 17 is a diagram for explaining an example of deriving a second reference sample using a first reference sample.
  • 18 is a diagram illustrating reference samples constituting a one-dimensional reference sample group.
  • FIG. 19 shows an example of a region to which bi-directional intra prediction is applied.
  • FIG. 20 shows an example in which a directional prediction mode in which bi-directional intra prediction is allowed is identified and displayed.
  • 21 is a flowchart illustrating a method of intra prediction of a current block based on a bi-directional intra prediction mode according to the present invention.
  • 22 is a diagram showing an example in which different weights are applied according to the positions of reference samples.
  • first, second, etc. 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 a second component, and similarly, the second component may also be referred to as a first component.
  • / or < / RTI &gt includes any combination of a plurality of related listed items or any of a plurality of related listed items.
  • FIG. 1 is a block diagram illustrating an image encoding apparatus according to an embodiment of the present invention.
  • the image encoding apparatus 100 includes a picture division unit 110, prediction units 120 and 125, a transform unit 130, a quantization unit 135, a reordering unit 160, an entropy encoding unit An inverse quantization unit 140, an inverse transform unit 145, a filter unit 150, and a memory 155.
  • each of the components shown in FIG. 1 is shown independently to represent different characteristic functions in the image encoding apparatus, and does not mean that each component is composed of separate hardware or one software configuration unit. That is, each constituent unit is included in each constituent unit for convenience of explanation, and at least two constituent units of the constituent units may be combined to form one constituent unit, or one constituent unit may be divided into a plurality of constituent units to perform a function.
  • the integrated embodiments and separate embodiments of the components are also included within the scope of the present invention, unless they depart from the essence of the present invention.
  • the components are not essential components to perform essential functions in the present invention, but may be optional components only to improve performance.
  • the present invention can be implemented only with components essential for realizing the essence of the present invention, except for the components used for the performance improvement, and can be implemented by only including the essential components except the optional components used for performance improvement Are also included in the scope of the present invention.
  • the picture division 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 division unit 110 divides one picture into a plurality of coding units, a prediction unit, and a combination of conversion units, and generates a coding unit, a prediction unit, and a conversion unit combination So that the picture can be encoded.
  • one picture may be divided into a plurality of coding units.
  • a recursive tree structure such as a quad tree structure can be used.
  • a unit can be divided with as many child nodes as the number of divided coding units. Under certain constraints, an encoding unit that is no longer segmented becomes a leaf node. That is, when it is assumed that only one square division is possible for one coding unit, one coding unit can be divided into a maximum of four different coding units.
  • a coding unit may be used as a unit for performing coding, or may be used as a unit for performing decoding.
  • the prediction unit may be one divided into at least one square or rectangular shape having the same size in one coding unit, and one of the prediction units in one coding unit may be divided into another prediction Or may have a shape and / or size different from the unit.
  • intraprediction can be performed without dividing the prediction unit into a plurality of prediction units NxN.
  • the prediction units 120 and 125 may include an inter prediction unit 120 for performing inter prediction and an intra prediction unit 125 for performing intra prediction. It is possible to determine whether to use inter prediction or intra prediction for a prediction unit and to determine concrete information (e.g., intra prediction mode, motion vector, reference picture, etc.) according to each prediction method.
  • the processing unit in which the prediction is performed may be different from the processing unit in which the prediction method and the concrete contents are determined. For example, the method of prediction, the prediction mode and the like are determined as a prediction unit, and the execution of the prediction may be performed in a conversion unit.
  • the residual value (residual block) between the generated prediction block and the original block can be input to the conversion unit 130.
  • the prediction mode information, motion vector information, and the like used for prediction can be encoded by the entropy encoding unit 165 together with the residual value and transmitted to the decoder.
  • the entropy encoding unit 165 When a particular encoding mode is used, it is also possible to directly encode the original block and transmit it to the decoding unit without generating a prediction block through the prediction units 120 and 125.
  • the inter-prediction unit 120 may predict a prediction unit based on information of at least one of a previous picture or a following picture of the current picture, and may predict a prediction unit based on information of a partially- Unit may be predicted.
  • the inter prediction unit 120 may include a reference picture interpolation unit, a motion prediction unit, and a motion compensation unit.
  • the reference picture information is supplied from the memory 155 and pixel information of an integer pixel or less can be generated in the reference picture.
  • a DCT-based interpolation filter having a different filter coefficient may be used to generate pixel information of an integer number of pixels or less in units of quarter pixels.
  • a DCT-based 4-tap interpolation filter having a different filter coefficient may be used to generate pixel information of an integer number of pixels or less in units of 1/8 pixel.
  • the motion prediction unit may perform motion prediction based on the reference picture interpolated by the reference picture interpolating unit.
  • Various methods such as Full Search-based Block Matching Algorithm (FBMA), Three Step Search (TSS), and New Three-Step Search Algorithm (NTS) can be used as methods for calculating motion vectors.
  • the motion vector may have a motion vector value of 1/2 or 1/4 pixel unit based on the interpolated pixel.
  • the motion prediction unit can predict the current prediction unit by making the motion prediction method different.
  • Various methods such as a skip method, a merge method, an AMVP (Advanced Motion Vector Prediction) method, and an Intra Block Copy method can be used as the motion prediction method.
  • AMVP Advanced Motion Vector Prediction
  • the intra prediction unit 125 can generate a prediction unit based on reference pixel information around the current block which is pixel information in the current picture.
  • the reference pixel included in the block in which the inter prediction is performed is referred to as the reference pixel Information. That is, when the reference pixel is not available, the reference pixel information that is not available may be replaced by at least one reference pixel among the available reference pixels.
  • the prediction mode may have a directional prediction mode in which reference pixel information is used according to a prediction direction, and a non-directional mode in which direction information is not used in prediction.
  • the mode for predicting the luminance information may be different from the mode for predicting the chrominance information and the intra prediction mode information or predicted luminance signal information used for predicting the luminance information may be utilized to predict the chrominance information.
  • intraprediction when the size of the prediction unit is the same as the size of the conversion unit, intra prediction is performed on the prediction unit based on pixels existing on the left side of the prediction unit, pixels existing on the upper left side, Can be performed.
  • intra prediction when the size of the prediction unit differs from the size of the conversion unit, intraprediction can be performed using the reference pixel based on the conversion unit. It is also possible to use intraprediction using NxN partitioning only for the minimum encoding unit.
  • the intra prediction method can generate a prediction block after applying an AIS (Adaptive Intra Smoothing) filter to the reference pixel according to the prediction mode.
  • the type of the AIS filter applied to the reference pixel may be different.
  • the intra prediction mode of the current prediction unit can 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 using the mode information predicted from the peripheral prediction unit, if the intra prediction mode of the current prediction unit is the same as the intra prediction mode of the current prediction unit,
  • the prediction mode information of the current block can be encoded by performing entropy encoding if the prediction mode of the current prediction unit is different from the prediction mode of the neighbor prediction unit.
  • a residual block including a prediction unit that has been predicted based on the prediction unit generated by the prediction units 120 and 125 and a residual value that is a difference value from the original block of the prediction unit may be generated.
  • the generated residual block may be input to the transform unit 130.
  • the transform unit 130 transforms the residual block including the residual information of the prediction unit generated through the original block and the predictors 120 and 125 into a DCT (Discrete Cosine Transform), a DST (Discrete Sine Transform), a KLT You can convert using the same conversion method.
  • the decision to apply the DCT, DST, or KLT to transform the residual block may be based on the intra prediction mode information of the prediction unit used to generate the residual block.
  • the quantization unit 135 may quantize the values converted into the frequency domain by the conversion unit 130. [ The quantization factor may vary depending on the block or the importance of the image. The values calculated by the quantization unit 135 may be provided to the inverse quantization unit 140 and the reorder unit 160.
  • the reordering unit 160 can reorder the coefficient values with respect to the quantized residual values.
  • the reordering unit 160 may change the two-dimensional block type coefficient to a one-dimensional vector form through a coefficient scanning method.
  • the rearranging unit 160 may scan a DC coefficient to a coefficient in a high frequency region using a Zig-Zag scan method, and change the DC coefficient to a one-dimensional vector form.
  • a vertical scan may be used to scan two-dimensional block type coefficients in a column direction, and a horizontal scan to scan a two-dimensional block type coefficient in a row direction depending on the size of the conversion unit and the intra prediction mode. That is, it is possible to determine whether any scanning method among the jig-jag scan, the vertical direction scan and the horizontal direction scan is used according to the size of the conversion unit and the intra prediction mode.
  • the entropy encoding unit 165 may perform entropy encoding based on the values calculated by the reordering unit 160.
  • various encoding methods such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), and Context-Adaptive Binary Arithmetic Coding (CABAC) may be used.
  • the entropy encoding unit 165 receives the residual value count information of the encoding unit, the block type information, the prediction mode information, the division unit information, the prediction unit information and the transmission unit information, and the motion information of the motion unit from the reordering unit 160 and the prediction units 120 and 125 Vector information, reference frame information, interpolation information of a block, filtering information, and the like.
  • the entropy encoding unit 165 can entropy-encode the coefficient value of the encoding unit input by the reordering unit 160.
  • the inverse quantization unit 140 and the inverse transformation unit 145 inverse quantize the quantized values in the quantization unit 135 and inversely transform the converted values in the conversion unit 130.
  • the residual value generated by the inverse quantization unit 140 and the inverse transform unit 145 is combined with the prediction unit predicted through the motion estimation unit, the motion compensation unit and the intra prediction unit included in the prediction units 120 and 125, A block (Reconstructed Block) can be generated.
  • 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 can remove block distortion caused by the boundary between the blocks in the reconstructed picture. It may be determined whether to apply a deblocking filter to the current block based on pixels included in a few columns or rows included in the block to determine whether to perform deblocking. When a deblocking filter is applied to a block, a strong filter or a weak filter may be applied according to the deblocking filtering strength required. In applying the deblocking filter, horizontal filtering and vertical filtering may be performed concurrently in performing vertical filtering and horizontal filtering.
  • the offset correction unit may correct the offset of the deblocked image with respect to the original image in units of pixels.
  • pixels included in an image are divided into a predetermined number of areas, and then an area to be offset is determined and an offset is applied to the area.
  • Adaptive Loop Filtering can be performed based on a comparison between the filtered reconstructed image and 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 different filtering may be performed for each group.
  • the information related to whether to apply the ALF may be transmitted for each coding unit (CU), and the shape and the filter coefficient of the ALF filter to be applied may be changed according to each block. Also, an ALF filter of the same type (fixed form) may be applied irrespective of the characteristics of the application target block.
  • the memory 155 may store the reconstructed block or picture calculated through the filter unit 150 and the reconstructed block or picture stored therein may be provided to the predictor 120 or 125 when the inter prediction is performed.
  • 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 decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, prediction units 230 and 235, 240, and a memory 245 may be included.
  • the input bitstream may be decoded in a procedure opposite to that of the image encoder.
  • the entropy decoding unit 210 can perform entropy decoding in a procedure opposite to that in which entropy encoding is performed in the entropy encoding unit 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 in accordance with 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 in accordance with the method performed by the image encoder.
  • CAVLC Context-Adaptive Variable Length Coding
  • CABAC Context-Adaptive Binary Arithmetic Coding
  • the entropy decoding unit 210 may decode information related to intra prediction and inter prediction performed in the encoder.
  • the reordering unit 215 can perform reordering based on a method in which the entropy decoding unit 210 rearranges the entropy-decoded bitstreams in the encoding unit.
  • the coefficients represented by the one-dimensional vector form can be rearranged by restoring the coefficients of the two-dimensional block form again.
  • the reordering unit 215 can perform reordering by receiving information related to the coefficient scanning performed by the encoding unit and performing a reverse scanning based on the scanning order performed by the encoding unit.
  • the inverse quantization unit 220 can perform inverse quantization based on the quantization parameters provided by the encoder and the coefficient values of the re-arranged blocks.
  • the inverse transform unit 225 may perform an inverse DCT, an inverse DST, and an inverse KLT on the DCT, DST, and KLT transformations performed by the transform unit on the quantization result performed by the image encoder.
  • the inverse transform can be performed based on the transmission unit determined by the image encoder.
  • a transform technique e.g., DCT, DST, KLT
  • the prediction units 230 and 235 can generate a prediction block based on the prediction block generation related information provided by the entropy decoding unit 210 and the previously decoded block or picture information provided in the memory 245.
  • intraprediction is performed using a reference pixel based on the conversion unit . It is also possible to use intra prediction using NxN division only for the minimum coding unit.
  • the prediction units 230 and 235 may include a prediction unit determination unit, an inter prediction unit, and an intra prediction unit.
  • the prediction unit determination unit receives various information such as prediction unit information input from the entropy decoding unit 210, prediction mode information of the intra prediction method, motion prediction related information of the inter prediction method, and identifies prediction units in the current coding unit. It is possible to determine whether the unit performs inter prediction or intra prediction.
  • the inter prediction unit 230 predicts the current prediction based on the information included in at least one of the previous picture of the current picture or the following picture including the current prediction unit by using information necessary for inter prediction of the current prediction unit provided by the image encoder, Unit can be performed. Alternatively, the inter prediction may be performed on the basis of the information of the partial region previously reconstructed in the current picture including the current prediction unit.
  • a motion prediction method of a prediction unit included in a corresponding encoding unit on the basis of an encoding unit includes a skip mode, a merge mode, an AMVP mode, and an intra block copy mode It is possible to judge whether or not it is any method.
  • the intra prediction unit 235 can generate a prediction block based on the pixel information in the current picture. If the prediction unit is a prediction unit that performs intra prediction, the intra prediction can be performed based on the intra prediction mode information of the prediction unit provided by the image encoder.
  • the intraprediction unit 235 may include an AIS (Adaptive Intra Smoothing) filter, a reference pixel interpolator, and a DC filter.
  • the AIS filter performs filtering on the reference pixels of the current block and can determine whether to apply the filter according to the prediction mode of the current prediction unit.
  • the AIS filtering can be performed on the reference pixel of the current block using the prediction mode of the prediction unit provided in the image encoder and the AIS filter information. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.
  • the reference pixel interpolator may interpolate the reference pixels to generate reference pixels in units of pixels less than or equal to an integer value when the prediction mode of the prediction unit is a prediction unit that performs intra prediction based on pixel values obtained by interpolating reference pixels.
  • the reference pixel may not be interpolated in the prediction mode in which the prediction mode of the current prediction unit generates the prediction block without interpolating the reference pixel.
  • the DC filter can generate a prediction block through filtering when the prediction mode of the current block is the DC mode.
  • the restored 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.
  • the deblocking filter of the video decoder When information on whether a deblocking filter is applied to a corresponding block or picture from the image encoder or a deblocking filter is applied, information on whether a strong filter or a weak filter is applied can be provided.
  • the deblocking filter of the video decoder the deblocking filter related information provided by the video encoder is provided, and the video decoder can perform deblocking filtering for the corresponding block.
  • the offset correction unit may perform offset correction on the reconstructed image based on the type of offset correction applied to the image and the offset value information during encoding.
  • the ALF can be applied to an encoding unit on the basis of ALF application information and ALF coefficient information provided from an encoder.
  • ALF information may be provided in a specific parameter set.
  • the memory 245 may store the reconstructed picture or block to be used as a reference picture or a reference block, and may also provide the reconstructed picture to the output unit.
  • a coding unit (coding unit) is used as a coding unit for convenience of explanation, but it may be a unit for performing not only coding but also decoding.
  • the current block indicates a block to be coded / decoded.
  • the current block includes a coding tree block (or coding tree unit), a coding block (or coding unit), a transform block (Or prediction unit), and the like.
  • the basic block may be referred to as a coding tree unit.
  • the coding tree unit may be defined as a coding unit of the largest size allowed by a sequence or a slice. Information regarding whether the coding tree unit is square or non-square or about the size of the coding tree unit can be signaled through a sequence parameter set, a picture parameter set, or a slice header.
  • the coding tree unit can be divided into smaller size partitions. In this case, if the partition generated by dividing the coding tree unit is depth 1, the partition created by dividing the partition having depth 1 can be defined as depth 2. That is, the partition created by dividing the partition having the depth k in the coding tree unit can be defined as having the depth k + 1.
  • a partition of arbitrary size generated as the coding tree unit is divided can be defined as a coding unit.
  • the coding unit may be recursively divided or divided into basic units for performing prediction, quantization, transformation, or in-loop filtering, and the like.
  • a partition of arbitrary size generated as a coding unit is divided may be defined as a coding unit, or may be defined as a conversion unit or a prediction unit, which is a basic unit for performing prediction, quantization, conversion or in-loop filtering and the like.
  • the partitioning of the coding tree unit or the coding unit may be performed based on at least one of a vertical line and a horizontal line. Further, the number of vertical lines or horizontal lines partitioning the coding tree unit or the coding unit may be at least one or more. As an example, one vertical line or one horizontal line may be used to divide a coding tree unit or coding unit into two partitions, or two vertical lines or two horizontal lines to divide a coding tree unit or a coding unit into three partitions Can be divided. Alternatively, one vertical line and one horizontal line may be used to divide the coding tree unit or the coding unit into four partitions having a length and a width of 1/2.
  • the partitions When dividing the coding tree unit or the coding unit into a plurality of partitions using at least one vertical line or at least one horizontal line, the partitions may have a uniform size or may have different sizes. Alternatively, any one partition may have a size different from the remaining partitions.
  • a coding tree unit or a coding unit is divided into a quad tree, a triple tree, or a binary tree structure.
  • a coding tree unit or a coding unit using a larger number of vertical lines or a larger number of horizontal lines.
  • FIG. 3 illustrates an example in which a coding block is hierarchically divided based on a tree structure according to an embodiment to which the present invention is applied.
  • the input video signal is decoded in a predetermined block unit, and a basic unit for decoding the input video signal is called a coding block.
  • the coding block may be a unit for performing intra / inter prediction, conversion, and quantization. Further, a prediction mode (for example, an intra-picture prediction mode or an inter-picture prediction mode) is determined for each coding block, and the prediction blocks included in the coding block can share the determined prediction mode.
  • the coding block may be a square or non-square block having any size falling within the range of 8x8 to 64x64, and may be a square or non-square block having a size of 128x128, 256x256 or more.
  • the coding block may be hierarchically partitioned based on at least one of a quad tree, a triple tree, and a binary tree.
  • quad tree-based partitioning is a method in which a 2Nx2N coding block is divided into 4 NxN coding blocks
  • a triple tree-based partitioning is a method in which one coding block is divided into 3 coding blocks, Each of which means that one coding block is divided into two coding blocks. Even if a triple tree division or a binary tree division is performed, a square coding block may exist in a lower depth.
  • the triple tree partitioning or the binary tree based partitioning it is possible to restrict the generation of the square coding blocks in the lower depths.
  • Binary tree based partitioning may be performed symmetrically or asymmetrically.
  • the coding block divided based on the binary tree may be a square block or a non-square block such as a rectangle.
  • the partition type in which binary tree-based partitioning is allowed is a symmetric 2NxN (horizontal direction non-puncturing unit) or Nx2N (vertical direction non-puncturing coding unit) as in the example shown in FIG. 4, And may include at least one of nLx2N, nRx2N, 2NxnU, and 2NxnD, which are asymmetric.
  • Binary tree-based partitioning may be limited to either a symmetric or an asymmetric partition.
  • configuring the coding tree unit as a square block corresponds to quad tree CU partitioning
  • configuring the coding tree unit as a symmetric non-square block may correspond to binary tree partitioning.
  • Constructing the coding tree unit as a square block and a symmetric non-square block may correspond to quad and binary tree CU partitioning.
  • Binary tree-based partitioning can be performed on a coded block where quadtree-based partitioning is no longer performed.
  • quadtree-based partitioning For a coding block based on a binary tree, at least one of quad tree based partitioning, triple tree based partitioning, or binary tree based partitioning may be set to be no longer performed.
  • a triple-tree-based partition or a binary-tree-based partition may be allowed for the coding block based on the binary tree, but only one of the horizontal or vertical partition may be limitedly allowed.
  • the additional partitioning or additional partitioning direction may be restricted with respect to the coding block divided on the basis of the binary tree.
  • an index of a coding block preceding a coding order is 0 (hereinafter referred to as a coding block index 0), an index of a coding block following the coding order is 1 (hereinafter, referred to as a coding block index)
  • the binary tree-based partitioning is applied to both the coding block index 0 or the coding block index 1 coding block, the binary tree-based partitioning direction of the coding block having the coding block index " 1 " Can be determined according to the binary tree-based division direction of the coding block with the coding block index of 0.
  • a binary tree of a coding block index 1 May be limited to have a different direction than the binary tree based partitioning of the coding block with a coding block index of 1. That is, it can be restricted that the coding blocks index 0 and the coding blocks index 1 are all divided into square partitions. In this case, encoding / decoding of information indicating the binary tree division direction of a coding block with a coding block index of 1 can be omitted.
  • the triple tree-based partitioning means that the coding block is divided into three partitions in the horizontal or vertical direction. All three partitions created due to triple tree based partitioning can have different sizes. Alternatively, two of the partitions created due to the triple tree-based partition may have the same size and the remaining one may have a different size.
  • the width ratio or the height ratio of the generated partitions may be set to 1: n: 1, 1: 1: n, n: 1: 1 or m: n: 1 depending on the division direction as the coding block is divided have.
  • m and n may be integers equal to 1 or greater than 1, for example, 2.
  • Triple tree-based partitioning can be performed on a coded block where quadtree-based partitioning is no longer performed.
  • quadtree-based partitioning For a triple tree-based partitioned coding block, at least one of a quadtree based partition, a triple tree based partition, or a binary tree based partition may be set to no longer be performed.
  • a triple tree-based partition or a binary tree-based partition may be allowed for a coding block divided based on a triple tree, but only one of horizontal or vertical partitioning may be limitedly permitted.
  • the horizontal direction partitioning or the vertical direction partitioning may be restricted for the partition having the largest size among the coding blocks generated due to the triple tree-based partitioning.
  • a partition having the largest size among the coding blocks generated due to the triple tree-based partition may not be divided into a binary tree partition in the same direction as the triple tree partition direction of the upper depth partition or a triple tree partition direction in the same direction have.
  • encoding / decoding of the information indicating the binary tree division direction or the triple tree division direction may be omitted for the largest partition among the coding blocks divided based on the triple tree.
  • partitioning based on a binary tree or triple tree may be limited.
  • the size of the current block is determined based on at least one of the width, height, width / height of the current block, the minimum / maximum value of the current block, the sum of the width and height, the product of the width and height, Can be expressed.
  • the predefined value may be an integer such as 16, 32, 64, or 128.
  • a binary tree or triple tree based partition may not be allowed if the width and height ratio of the current block is greater than the predefined value or less than the predefined value. If the predefined value is 1, partitioning based on a binary tree or triple tree can be allowed only if the current block is a square block with the same width and height.
  • the division of the lower depth may be determined depending on the division type of the upper depth. For example, if binary tree-based partitioning is allowed in two or more depths, only binary tree-based partitioning of the same type as the binary tree partitioning of the upper depths may be allowed in the lower depths. For example, if the binary tree-based partitioning is performed in the 2NxN type in the upper depth, 2NxN type binary tree-based partitioning can be performed even in the lower depth. Alternatively, if the binary tree-based partitioning is performed in the Nx2N type in the upper depth, the binary tree-based partitioning in the Nx2N type may be allowed in the lower depths.
  • a sequence, slice, coding tree unit or coding unit it may be limited to use only a specific type of binary tree based partitioning or a specific type of triple tree based partitioning.
  • a specific type of binary tree based partitioning or a specific type of triple tree based partitioning As an example, only binary tree-based partitioning in the form of 2NxN or Nx2N for the coding tree unit is allowed to be allowed.
  • the allowed partition type may be predefined in an encoder or a decoder, or may be signaled through a bitstream by encoding information on an acceptable partition type or an unacceptable partition type.
  • FIG. 5 is a diagram showing an example in which only a specific type of binary tree-based partition is allowed.
  • FIG. 5A shows an example in which only binary tree-based partitioning in the form of Nx2N is allowed
  • FIG. 5B shows an example in which only binary tree-based partitioning in the form of 2NxN is allowed to be allowed.
  • information indicating quad tree-based partitioning In order to implement the adaptive partitioning based on the quadtree or the binary tree, information indicating quad tree-based partitioning, information on the size / depth of the quadtree based partitioning allowable coding block, Information about the size / depth of a coding block in which binary tree-based partitioning is allowed, information on the size / depth of a coding block in which binary tree-based partitioning is not allowed, or whether the binary tree- Information regarding the horizontal direction, and the like can be used.
  • the number of times the binary tree partitioning / triple tree partitioning is permitted, the depth at which the binary tree partitioning / triple tree partitioning is allowed, or the number of the depths at which the binary tree partitioning / Etc. can be obtained.
  • the information may be encoded in units of a coding tree unit or a coding unit, and may be transmitted to a decoder through a bitstream.
  • a syntax 'max_binary_depth_idx_minus1' indicating the maximum depth at which binary tree segmentation is allowed may be encoded / decoded through a bitstream, via a bitstream.
  • max_binary_depth_idx_minus1 + 1 may indicate the maximum depth at which the binary tree division is allowed.
  • a binary tree division is performed for a depth 2 coding unit and a depth 3 coding unit. Accordingly, the information indicating the number of times (2) the binary tree segmentation in the coding tree unit has been performed, the information indicating the maximum depth (depth 3) allowed to divide the binary tree in the coding tree unit, or the binary tree segmentation in the coding tree unit At least one of information indicating the number of allowed depths (2, depth 2 and depth 3) can be encoded / decoded through a bitstream.
  • the information may be encoded in a sequence, picture, or slice unit and transmitted through a bitstream.
  • there may be a predefined depth that permits binary tree / triple tree partitioning for each sequence, picture, or slice, or the number of depths allowed for binary tree / triple tree partitioning.
  • At least one of the number of binary tree / triple tree divisions of the first slice and the second slice, the maximum depth allowed to divide the binary tree / triple tree, or the number of depths allowed to divide the binary tree / triple tree are different .
  • binary tree segmentation in the first slice binary tree segmentation is allowed in only one depth
  • binary tree segmentation in two depths is allowed.
  • the number of times the binary tree / triple tree partition is allowed, the depth at which the binary tree / triple tree partition is allowed, or the depth at which the binary tree / triple tree partition is allowed, according to the time level identifier (TemporalID) At least one of the numbers may be set differently.
  • the temporal level identifier (TemporalID) is used to identify each of a plurality of layers of an image having a scalability of at least one of view, spatial, temporal or picture quality will be.
  • the first coding block 300 having a split depth k may be divided into a plurality of second coding blocks based on a quad tree.
  • the second coding blocks 310 to 340 may be square blocks having half the width and height of the first coding block, and the division 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 a division depth k + 2.
  • the division of the second coding block 310 may be performed using a quadtree or a binary tree selectively according to the division method.
  • the partitioning scheme may be determined based on at least one of information indicating partitioning based on a quadtree or information indicating partitioning based on a binary tree.
  • the second coding block 310 When the second coding block 310 is divided based on quadtrees, the second coding block 310 is divided into four third coding blocks 310a having half the width and height of the second coding block, and the third coding block 310a The split depth can be increased to k + 2.
  • the second coding block 310 when the second coding block 310 is divided based on the binary tree, the second coding block 310 may be divided into two third coding blocks. At this time, each of the two third coding blocks is a non-square block in which one of the width and height of the second coding block is half, and the dividing depth can 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 dividing direction, and the dividing direction may be determined based on information on whether the dividing based on the binary tree is the vertical direction or the horizontal direction.
  • the second coding block 310 may be determined as a last coding block that is not further divided based on a quadtree or a binary tree.
  • the coding block may be used as a prediction block or a transform block.
  • the third coding block 310a may be determined as a terminal coding block as well as the division of the second coding block 310, or may be further divided based on a quadtree or a binary tree.
  • the third coding block 310b divided on the basis of the binary tree may be further divided into a vertical coding block 310b-2 or a horizontal coding block 310b-3 on the basis of a binary tree, The division depth of the block can be increased to k + 3.
  • the third coding block 310b may be determined as a last coding block 310b-1 that is not further divided based on the binary tree, and the corresponding coding block 310b-1 may be used as a prediction block or a transform block .
  • the above-described partitioning process may include information on the size / depth of a coding block in which quadtree-based partitioning is allowed, information on the size / depth of a coding block in which binary tree-based partitioning is allowed or binary tree- / RTI > information about the size / depth of the coding block that is not coded.
  • the size that the coding block can have is limited to a predetermined number, or the size of the coding block in a predetermined unit may have a fixed value.
  • the size of a coding block in a sequence or the size of a coding block in a picture may be limited to 256x256, 128x128, or 32x32.
  • Information indicating the size of a sequence or an intra-picture coding block may be signaled through a sequence header or a picture header.
  • the division result based on quad tree, binary tree and triple tree, the coding unit may be square or any size rectangle.
  • the coding block may be encoded / decoded using at least one of a skip mode, an intra prediction, an inter prediction, or a skipping method.
  • intra prediction or inter prediction can be performed in the same size as the coding block or in units smaller than the coding block through the division of the coding block.
  • a prediction block can be determined through predictive division of the coding block.
  • Predictive partitioning of the coded block can be performed by a partition mode (Part_mode) indicating the partition type of the coded block.
  • Part_mode partition mode
  • the size or shape of the prediction block may be determined according to the partition mode of the coding block. For example, the size of the prediction block determined according to the partition mode may be equal to or smaller than the size of the coding block.
  • FIG. 7 is a diagram illustrating a partition mode that can be applied to a coding block when a coding block is coded by inter-picture prediction.
  • the coding block is coded as an inter-picture prediction, one of eight partitioning modes may be applied to the coding block, as in the example shown in Fig.
  • the coding mode can be applied to the partition mode PART_2Nx2N or PART_NxN.
  • PART_NxN may be applied when the coding block has a minimum size.
  • the minimum size of the coding block may be one previously defined in the encoder and the decoder.
  • information regarding the minimum size of the coding block may be signaled via the bitstream.
  • the minimum size of the coding block is signaled through the slice header, so that the minimum size of the coding block per slice can be defined.
  • the size of the prediction block may have a size from 64x64 to 4x4.
  • the coding block is coded by inter-picture prediction, it is possible to prevent the prediction block from having a 4x4 size in order to reduce the memory bandwidth when performing motion compensation.
  • FIG. 8 illustrates an intra prediction mode defined in an image encoder / decoder according to an embodiment of the present invention.
  • the image encoder / decoder may perform intra prediction using any one of the pre-defined intra prediction modes.
  • a predefined intra prediction mode for intra prediction may be configured with a non-directional prediction mode (e.g., Planar mode, DC mode) and 33 directional prediction modes.
  • a larger number of directional prediction modes than the 33 directional prediction modes can be used to increase the accuracy of intra prediction. That is, it is also possible to further define M extended directional prediction modes (M > 33) by further subdividing the angle of the directional prediction mode and use at least one of the 33 predefined directional prediction modes, A directional prediction mode having a directional prediction mode can be derived and used.
  • a larger number of intra prediction modes than the 35 intra prediction modes shown in FIG. 8 may be used.
  • the use of a larger number of intra prediction modes than the 35 intra prediction modes shown in FIG. 8 can be referred to as an extended intra prediction mode.
  • the extended intra-prediction mode may be composed of two non-directional prediction modes and 65 extended directional prediction modes.
  • the extended intra prediction mode may be used for the luminance component and chrominance component in the same manner, or may be a different number of intra prediction modes for each component. For example, 67 extended intra-prediction modes may be used for the luminance component, and 35 intra-prediction modes may be used for the chrominance components.
  • intra prediction may be performed using a different number of intra prediction modes according to a color difference format.
  • intraprediction can be performed using 67 intra prediction modes in the luminance component and 35 intra prediction modes can be used in the chrominance component.
  • 4: 4: 4 format It is possible to use intra prediction using 67 intra prediction modes in both the luminance component and the chrominance component.
  • the intra prediction may be performed using a different number of intra prediction modes depending on the size and / or shape of the block. That is, intra prediction can be performed using 35 intra prediction modes or 67 intra prediction modes depending on the size and / or type of the PU or CU. For example, if the size of a CU or PU is less than 64x64 or an asymmetric partition, intraprediction can be performed using 35 intra-prediction modes. If the size of the CU or PU is equal to or larger than 64x64 , Intra prediction can be performed using 67 intra prediction modes. Intra_2Nx2N may allow 65 directional intra prediction modes, and Intra_NxN may allow only 35 directional intra prediction modes.
  • a size of a block to which an extended intra prediction mode is applied may be set differently for each sequence, picture or slice. For example, in the first slice, an intra prediction mode extended to a block (for example, CU or PU) larger than 64x64 is set to be applied, and in the second slice, an intra prediction mode extended to a block larger than 32x32 is set to be applied .
  • Information indicating the size of a block to which the extended intra prediction mode is applied can be signaled by a sequence, a picture, or a slice unit.
  • the information indicating the size of the block to which the extended intra prediction mode is applied may be defined as 'log2_extended_intra_mode_size_minus4' obtained by taking a logarithm of the block size and then subtracting the integer 4.
  • the number of intra prediction modes can be determined in consideration of at least one of a color difference component, a color difference format, a block size, and a shape.
  • the number of intra prediction mode candidates (for example, the number of MPMs) used for determining the intra prediction mode of the current block to be coded / decoded is not limited to at least one of the color difference component, the color difference format, . It is also possible to use a larger number of intra prediction modes than those shown in Fig. For example, it is also possible to further divide the directional prediction mode shown in FIG. 8 and use 129 directional prediction modes and two non-directional prediction modes. Whether or not to use a larger number of intra prediction modes than those shown in FIG. 8 can be determined in consideration of at least one of a chrominance component, a chrominance component, a size or a shape of a block, as in the above example.
  • FIG. 10 is a flowchart schematically illustrating an intra prediction method according to an embodiment of the present invention.
  • the intra prediction mode of the current block can be determined (S1000).
  • the intra prediction mode of the current block can be derived based on the candidate list and the index.
  • the candidate list includes a plurality of candidates, and a plurality of candidates can be determined based on an intra prediction mode of a neighboring block adjacent to the current block.
  • the neighboring block may include at least one of the blocks located at the top, bottom, left, right, or corner of the current block.
  • the index may specify any one of a plurality of candidates belonging to the candidate list.
  • the candidate specified by the index may be set to the intra prediction mode of the current block.
  • the intra prediction mode used for the intra prediction by the neighboring block may be set as a candidate. For example, candidates can be derived based on the intra-prediction modes of the left block, the upper block, the lower left corner adjacent block, the upper right corner adjacent block, and the upper left corner adjacent block of the current block. If the neighboring block is coded by inter prediction, the candidate of the current block can be derived using the intra prediction mode of the collocated block of the neighboring block.
  • an intra prediction mode having a similar direction to the intra prediction mode of the neighboring block may be set as a candidate.
  • the intra-prediction mode having a similar directionality may be determined by adding or subtracting a predetermined constant value to the intra-prediction mode of the neighboring block.
  • the predetermined constant value may be an integer of 1, 2, or more, and the predetermined constant value may be adaptively determined according to the number of available intra prediction modes. For example, if the number of available intra prediction modes is 35, the predetermined constant value is set to 1, and if the number of available intra prediction modes is 67, the predetermined constant value may be set to 2. Further, when the number of available intra prediction modes is 131, a predetermined constant value may be set to 4. [
  • the candidate list may further include a default mode.
  • the default mode may include at least one of planner mode, DC mode, vertical mode, horizontal mode, upper right diagonal mode, and upper left diagonal mode.
  • the default mode can be adaptively added considering the maximum number of candidates that can be included in the candidate list of the current block.
  • the maximum number of candidates that may be included in the candidate list may be three, four, five, six, seven, or more.
  • the maximum number of candidates that can be included in the candidate list may be a fixed value preset in the image encoder / decoder and may be variably determined based on the attribute of the current block.
  • the attributes may refer to the location / size / type of the block, the number / type of intra prediction modes available for the block, the color difference property, the color difference format, and the like.
  • information indicating the maximum number of candidates that can be included in the candidate list may be signaled separately, and the maximum number of candidates that can be included in the candidate list may be variably determined using the information.
  • the information indicating the maximum number of candidates may be signaled in at least one of a sequence level, a picture level, a slice level, or a block level.
  • the candidates included in the candidate list can be sorted in the predefined order.
  • the candidates may be arranged in the candidate list in the order of the left block, the upper block, the lower left block, the upper right block, and the upper left block.
  • the arrangement order of the candidates may be variably determined according to the size or shape of the current block. For example, if the current block is a non-square block whose height is greater than the width, the intra prediction mode of the upper block may be arranged with a higher priority than the intra prediction mode of the left block.
  • an intra prediction mode of a neighboring block is converted into an index corresponding to the extended intra prediction mode, or 35 intra prediction modes
  • the index can be converted into an index to induce candidates.
  • a pre-defined table may be used for the transformation of the index, or a scaling operation based on a predetermined value may be used.
  • the pre-defined table may be one that defines a mapping relationship between different intra prediction mode groups (e.g., an extended intra prediction mode and 35 intra prediction modes).
  • the left neighboring block uses 35 intra prediction modes and the intra prediction mode of the left neighboring block is 10 (horizontal mode), it is converted into the index 16 corresponding to the horizontal mode in the extended intra prediction mode .
  • the intra-prediction mode in which the upper neighboring block is extended is used and the intra-prediction mode index of the upper neighboring block is 50 (vertical mode), it can be converted into index 26 corresponding to the vertical mode in 35 intra- have.
  • the intraprediction mode may be derived independently of each of the luminance component and the chrominance component based on the intra prediction mode determination method described above and the chrominance component may be derived as a dependency on the intra prediction mode of the luminance component.
  • the intraprediction mode of the chrominance component can be determined based on the intraprediction mode of the luminance component as shown in Table 1 below.
  • intra_chroma_pred_mode denotes information to be signaled to specify an intra prediction mode of a chrominance component
  • IntraPredModeY denotes an intra prediction mode of a luminance component
  • the candidate list it is possible to decode information indicating whether or not a candidate identical to the intra prediction mode of the current block is included in the candidate list.
  • the information indicates that the candidate having the same intra prediction mode as the current block is included in the candidate list, it may decode index information (e.g., MPM_index) indicating one of the candidates.
  • the intra prediction mode of the current block may be set to be the same as the intra prediction mode of the candidate indicated by the index information.
  • the residual intra prediction mode information (e.g., rem_intra_mode) specifying any one of the residual intra prediction modes excluding the candidates, Can be decoded.
  • the intra prediction mode of the current block may be determined based on the intra prediction mode indicated by the residual intra prediction mode information. As an example, the current intra prediction mode may be determined by comparing the candidate with the intra prediction mode indicated by the residual intra prediction mode. For example, if the candidate intra prediction mode is smaller than the intra prediction mode indicated by the residual intra prediction mode, 1 can be added to the residual intra prediction mode to derive the intra prediction mode of the current block.
  • a reference sample for intra prediction of a current block may be derived (S1010).
  • a reference sample for intra prediction can be derived based on the surrounding samples of the current block.
  • the surrounding sample may refer to a reconstructed sample of the above-described neighboring block, which may be a reconstructed sample before the in-loop filter is applied or a reconstructed sample after the in-loop filter is applied.
  • a neighboring sample reconstructed before the current block may be used as a reference sample, and a neighboring sample filtered based on a predetermined intra-filter may be used as a reference sample.
  • Filtering surrounding samples using an intra filter may also be referred to as reference sample smoothing.
  • the intra-filter may include at least one of a first intra-filter applied to a plurality of surrounding samples located on the same horizontal line or a second intra-filter applied to a plurality of surrounding samples located on the same vertical line. Either one of the first intra-filter or the second intra-filter may be selectively applied, or two intra-filters may be applied redundantly depending on the position of the neighboring sample.
  • 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 performed adaptively based on at least one of the intra prediction mode of the current block or the size of the transform block with respect to the current block. For example, if the intra prediction mode of the current block is a DC mode, a vertical mode, or a horizontal mode, filtering may not be performed. If the size of the transform block is NxM, filtering may not be performed. Where N and M may be the same or different values, and may be any of 4, 8, 16, or more. In one example, if the size of the transform block is 4x4, filtering may not be performed. Alternatively, filtering may be selectively performed based on the difference between the intraprediction mode of the current block and the vertical mode (or horizontal mode) and the comparison result between the pre-defined thresholds. For example, the filtering can be performed only when the difference between the intra-prediction mode and the vertical mode of the current block is larger than the threshold value.
  • the threshold value may be defined according to the size of the transform block as shown in Table 2.
  • the intra-filter may be determined as any one of a plurality of intra-filter candidates predefined in the image encoder / decoder. For this purpose, a separate index that specifies the 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, information on the strength of the filter, or variation of neighboring samples.
  • Intra prediction of the current block may be performed using a plurality of reference sample lines. As an example, it may be performed using two or more reference sample lines.
  • Whether intraprediction is performed using a plurality of reference sample lines can be adaptively determined according to the size, type, or intra prediction mode of the current block.
  • the intra prediction mode of the current block is a non-directional intra prediction mode or an intra prediction mode in a specific direction
  • performing intra prediction using a plurality of reference sample lines may be restricted.
  • the specific direction may include a vertical direction, a horizontal direction, or a diagonal direction.
  • intraprediction can be performed using an intra prediction mode of a current block and reference samples (S1020).
  • the prediction sample of the current block can be obtained using the intra prediction mode determined in S1000 and the reference sample derived in S1010.
  • a prediction sample may be obtained based on a weighted sum of reference samples belonging to different reference sample lines.
  • a prediction sample may be derived based on a weighted sum of a first reference sample belonging to a first reference sample line and a second reference sample belonging to a second reference sample line.
  • the weights applied to the first reference sample and the second reference sample may have the same value or different values depending on the distance from the sample to be predicted. For example, a higher weight may be given to the first reference sample and the second reference sample that are closer to the predicted sample.
  • the correction process to be described later is not limited to be applied only to intra prediction samples, and can also be applied to inter prediction samples or restoration samples.
  • FIG. 11 illustrates a method of correcting a prediction sample of a current block based on difference information of neighboring samples, according to an embodiment of the present invention.
  • the prediction samples of the current block can be corrected based on the difference information of the plurality of neighboring samples with respect to the current block.
  • the correction may be performed for all prediction samples belonging to the current block or only for prediction samples belonging to a certain partial area.
  • Some areas may be one row / column or a plurality of rows / columns, which may be pre-set areas for correction in the image encoder / decoder.
  • correction may be performed on a plurality of rows / columns from one row / column or boundary of the current block located at the boundary of the current block.
  • some areas may be variably determined based on at least one of the size / shape of the current block or the intra prediction mode.
  • the surrounding samples may belong to at least one of the top, left, and surrounding blocks located in the upper left corner of the current block.
  • the number of surrounding samples used for correction may be 2, 3, 4, or more.
  • the positions of the neighboring samples may be variably determined according to the positions of the prediction samples to be corrected in the current block. Alternatively, some of the surrounding samples may have a fixed position irrespective of the position of the prediction sample to be corrected, and the remaining may have a variable position according to the position of the prediction sample to be corrected.
  • the difference information of neighboring samples may mean a difference sample between neighboring samples or a value obtained by scaling the difference sample by a predetermined constant value (e.g., 1, 2, 3, etc.).
  • a predetermined constant value e.g. 1, 2, 3, etc.
  • the predetermined constant value may be determined in consideration of the position of the predicted sample to be corrected, the position of the column or row to which the predicted sample to be corrected belongs, the position of the predicted sample in the column or row, and the like.
  • the intra prediction mode of the current block is the vertical mode
  • a difference sample between the neighboring sample p (-1, y) adjacent to the left boundary of the current block and the upper left neighbor sample p (-1, -1) The final prediction sample can be obtained as shown in the following Equation (1).
  • the intra prediction mode of the current block is the horizontal mode
  • the difference sample between the neighboring sample p (x, -1) adjacent to the upper boundary of the current block and the upper left surround sample p (-1, -1) The final prediction sample can be obtained as shown in Equation (2).
  • the intra prediction mode of the current block is the vertical mode
  • a difference sample between the neighboring sample p (-1, y) adjacent to the left boundary of the current block and the upper left neighbor sample p (-1, -1) The final prediction sample can be obtained.
  • the differential sample may be added to the predicted sample, the differential sample may be scaled to a predetermined constant value, and then added to the predicted sample.
  • the predetermined constant value used for scaling may be determined differently depending on the column and / or row.
  • the prediction samples can be corrected as shown in the following equations (3) and (4).
  • the intra prediction mode of the current block is the horizontal mode
  • the difference sample between the neighboring sample p (x, -1) adjacent to the upper boundary of the current block and the upper left surround sample p (-1, -1) A final prediction sample can be obtained, which is as described above in the vertical mode.
  • the prediction samples can be corrected as shown in the following equations (5) and (6).
  • the intra prediction of the current block can be performed based on the directionality of the directional prediction mode.
  • Table 3 shows intraframe direction parameters (intraPredAng) from Mode 2 to Mode 34, which are the directional intra prediction modes shown in FIG.
  • 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 a current block can be determined based on a lookup table defining a mapping relationship between a directional intra prediction mode and an intra direction parameter. Alternatively, based on the information signaled via the bitstream, an intra direction parameter for the current block may be determined.
  • Intra prediction of a 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 upper reference sample includes reference samples (e.g., (-1, -1) to (2W-1, -) having y-axis coordinates smaller than the predicted sample (x, 0) included in the uppermost row in the current block. 1)), and the left reference sample indicates reference samples having an x-axis coordinate smaller than the predicted sample (0, y) contained in the leftmost column in the current block (for example, -1, 2H-1)).
  • the reference samples of the current block may be arranged in one dimension according to the directionality of the intra prediction mode. Specifically, when both the upper reference sample and the left reference sample are to be used in the intra prediction of the current block, it is possible to select reference samples of the respective prediction target samples, assuming that they are arranged in a line in the vertical or horizontal direction .
  • a reference sample group P_ref_1D can be constructed.
  • FIGS. 12 and 13 show a one-dimensional reference sample group in which reference samples are rearranged in a line.
  • Whether the reference samples are rearranged in the vertical direction or in the horizontal direction can be determined according to the direction of the intra prediction mode. For example, when the intra prediction mode index is between 11 and 18, the top reference samples of the current block are rotated counterclockwise, as in the example shown in FIG. 12, so that the left reference samples and the top reference samples are rotated in the vertical direction To generate a one-dimensional reference sample group.
  • the left reference samples of the current block are rotated clockwise to the left reference samples so that the left reference samples and the upper reference samples A one-dimensional reference sample group arranged in the horizontal direction can be generated.
  • intra prediction for the current block may be performed using only left reference samples or top reference samples.
  • one-dimensional reference sample groups can be generated by using left reference samples or top reference samples only for intra prediction modes in which the intra direction parameter is not negative.
  • a reference sample decision index iIdx may be derived for specifying at least one reference sample used to predict the prediction sample.
  • a weight-related parameter i fact which is used to determine weights applied to each reference sample, can be derived based on the intra directional parameters.
  • equations (7) and (8) show an example of deriving a reference sample decision 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 can be specified for each sample to be predicted.
  • the position of the reference sample in the one-dimensional reference sample group for predicting the current in-block prediction target sample can be specified.
  • a prediction image i.e., prediction sample
  • a prediction image for the prediction target sample is generated based on the reference sample specified by the intra prediction mode of the current block .
  • Equation (8) reproduces the reference sample P_ref_1D (x + iIdx + 1) in the one-dimensional reference sample group specified by the intra-prediction mode of the current block, As shown in FIG.
  • prediction of the prediction target sample may be performed using a plurality of reference samples.
  • linear interpolation or tap filter-based interpolation of neighboring reference samples neighboring the reference sample at a predetermined position and the reference sample at a predetermined position is performed, Can be performed.
  • the number of taps of the interpolation filter may be a natural number of 2 or more.
  • the tap number of the tap filter may be an integer of 2, 3, 4, 5, 6, or more.
  • the angular line of the intra-prediction mode angle or the slope of the intra-prediction mode does not exceed the integer pel in the one-dimensional reference sample group (i.e., the reference sample of the integer position)
  • a reference sample placed on the angle line and a reference sample adjacent to the left / right or upper / lower side of the reference sample are interpolated to generate a prediction image for the prediction target sample.
  • the following equation (9) shows an example of interpolating two or more reference samples to generate a prediction sample P (x, y) for a sample to be predicted.
  • the coefficients of the interpolation filter may be determined based on the weighting related parameter i fact . In one example, the coefficients of the interpolation filter may be determined based on the distance between the fractional pel located on the angular line and the integer pel (i.e., the integer position of each reference sample).
  • Equation (10) illustrates a case where the tap number of the tap filter is four.
  • a sample at a position that does not correspond to the left reference sample or the top reference sample may be replaced with the nearest reference sample at that location.
  • the sample may be replaced with the reference sample at the position of P_ref_1D (x + idx).
  • the sample at the P_ref_1D (x + iIdx + 2) position does not correspond to the upper reference sample, the sample may be replaced with a reference sample at the P_ref_1D (x + iIdx + 1) position.
  • the multi-tap filter can be applied to a plurality of reference samples arranged in a line along the horizontal or vertical direction.
  • the multi-tap filter may be applied to a predetermined polygonal shape such as a rectangle.
  • the type to which the multi-tap filter is applied can be variably determined according to the size, type, or intra prediction mode of the current block.
  • interpolation of a reference sample using directionality of intra prediction to generate a prediction sample can be referred to as an intra prediction sample interpolation technique.
  • a tap filter having a large number of taps does not always guarantee improvement in prediction accuracy.
  • the size of the current block is asymmetric coding unit which is significantly larger than the other one with a height or width such as 2x16, or a block as small as 4x4
  • using a tap filter of four or more taps may over- Results.
  • the type of the tap filter can be adaptively determined according to the size, type, or intra prediction mode of the current block.
  • the type of the tap filter can be divided by at least one of the number of taps, the filter coefficient, the filter strength (strong / weak), and the filtering direction.
  • the number of filter taps or the filter coefficient may be variably determined depending on the filter strength.
  • the application direction of the tap filter such as the horizontal direction interpolation, the vertical direction interpolation, or the horizontal and vertical direction interpolation can be determined.
  • the application direction of the tap filter can be variably set in units of lines (rows or columns) or samples in the current block.
  • the type of the tap filter to be used can be determined based on the width or the height of the current block. For example, if at least one of the width or height of the current block is smaller than the predefined value, the intra prediction sample interpolation technique may be performed using a 2-tap filter instead of the 4-tap filter. On the other hand, if both the width and the height of the current block are equal to or greater than the predefined values, the intra prediction sample interpolation technique can be performed using a 4-tap filter.
  • the predefined value may represent a value such as 4, 8, or 16.
  • the type of the tap filter to be used can be determined according to whether the width and height of the current block are the same value. For example, if the width and height of the current block are different values, an intra prediction sample interpolation technique may be performed using a 2-tap filter instead of a 4-tap filter. On the other hand, if the width and height of the current block have the same value, the intra prediction sample interpolation technique can be performed using a 4-tap filter.
  • the type of the tap filter to be used can be determined according to the ratio of the width and 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, A sample interpolation technique can be performed. On the other hand, if the ratio of the width to the height of the current block is equal to or greater than the predefined threshold value, the intra prediction sample interpolation technique can be performed using a 4-tap filter.
  • the type of the tap filter may be determined according to the intra prediction mode, shape, or size of the current block. For example, if the current block is a 2x16 type coding unit and the intra prediction mode of the current block is in the intra prediction mode, the intra prediction sample interpolation technique can be performed using a tap filter with a tap number n . On the other hand, when the current block is a 2x16 type coding unit and the intra prediction mode of the current block is in the intra prediction mode, the intra prediction sample interpolation technique can be performed using a tap filter with the number of taps.
  • the intra prediction sample interpolation technique can be performed using a tap filter having a tap number n.
  • the intra prediction sample interpolation technique can be performed using a tap filter with the number of taps.
  • the horizontal direction range may represent a predetermined range including the intra-prediction mode in the horizontal direction
  • the vertical direction range may represent a predetermined range including the intra-prediction mode in the vertical direction. For example, based on the 35 intra prediction modes, the horizontal direction range indicates the intra prediction mode from mode 11 to mode 18, and the vertical direction range indicates the intra prediction mode from mode 19 to mode 27.
  • n and m are constants greater than 0, and n and m may have different values.
  • the planar prediction can be performed by weighted prediction of the first predicted image and the second predicted image after generating the first predicted image in the horizontal direction and the second predicted image in the vertical direction using the reference samples.
  • the first predicted image may be generated based on the reference samples adjacent to the current block lying in the horizontal direction of the predicted sample.
  • the first predicted image may be generated based on the weighted sum of the reference samples lying in the horizontal direction of the predicted sample.
  • the weight applied to each reference sample may be determined in consideration of the distance to the predicted sample or the size of the current block.
  • the samples located in the horizontal direction are the left reference sample (i.e., the left reference sample having the same y coordinate as the prediction target sample) and the right reference sample (i.e., the same y coordinate as the prediction target sample) Lt; / RTI > right reference sample).
  • the right reference sample can be derived from the top reference sample of the current block.
  • the right reference sample may be derived by copying the values of the top reference samples lying on the same vertical line, or 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 (i.e., upper reference sample having 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 determined differently, depending on the type, size, or position of the current sample in the current block.
  • the second predicted image may be generated based on the reference samples adjacent to the current block lying in the vertical direction of the predicted sample.
  • the second predicted image may be generated based on the weighted sum of the reference samples lying in the vertical direction of the predicted sample.
  • the weight applied to each reference sample may be determined in consideration of the distance to the predicted sample or the size of the current block.
  • the samples located in the vertical direction are the same as the upper reference sample (that is, the upper reference sample having the same x coordinate as the prediction target sample) and the lower reference sample (i.e., the same x coordinate as the prediction target sample) Bottom reference sample).
  • the lower reference sample can be derived from the left reference sample of the current block.
  • the lower reference sample may be derived by copying the value of the left reference sample lying on the same horizontal line, or may be derived by a weighted sum or average value of a plurality of left reference samples.
  • the left reference sample placed on the same horizontal line as the lower reference sample may include a reference sample adjacent to the lower left corner of the current block (i.e., a left reference sample having the same y coordinate as the lower reference sample).
  • the position of the top reference sample used to derive the bottom reference sample may be determined differently, depending on the size, shape, or position of the current sample in the current block
  • At least one of the right reference sample or the bottom reference sample may be derived using both the left reference sample and the upper 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 the value of at least one 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 lower-right reference sample and the lower- You may.
  • the lower right reference sample may be derived based on the weighted sum or average of the upper right reference sample and the left reference sample of the current block.
  • 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 coefficients of the interpolation filter can 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 at a fixed position may be used, or a reference sample adaptively selected according to the position of the sample to be predicted.
  • the right reference sample may be derived using the upper right reference sample regardless of the position of the sample to be predicted, or a left reference sample (e.g., having the same y-axis coordinate as the prediction sample) Reference sample) or an upper reference sample (e.g., a reference sample having the same x-axis coordinate as the predicted sample).
  • the lower reference sample may be derived using the lower left reference sample regardless of the position of the sample to be predicted, or a left reference sample (e.g., a reference having the same y-axis coordinate as the prediction sample) Sample) or a top reference sample (e.g., a reference sample having the same x-axis coordinate as the predicted sample).
  • a left reference sample e.g., a reference having the same y-axis coordinate as the prediction sample
  • Sample e.g., a reference sample having the same x-axis coordinate as the predicted sample
  • FIG. 14 is a diagram showing an example of deriving a right reference sample or a lower reference sample using a plurality of reference samples. It is assumed that the current block is a block having a size of WxH.
  • the weights applied to the upper right reference sample and the left reference sample may be set the same or may be determined based on the width (W) and height (H) of the current block. For example, if 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 + have.
  • a right reference sample P (W, y) for the target prediction sample (x, y) is generated based on the lower right reference sample P (W, H) and the upper right reference sample P .
  • the right prediction sample P (W, y) can be calculated as a weighted sum or an average value of the lower right reference sample P (W, H) and the upper right reference sample P (W, -1).
  • the lower reference sample P (x, H) can be calculated as a weighted sum or mean value of the lower right reference sample P (W, H) and the left reference sample P (-1, H).
  • the generated reference sample is used to calculate the first predicted sample P h (x, y) for the predicted sample and the second predicted sample P h It may generate a prediction sample P v (x, y).
  • the first prediction sample P h (x, y) is generated based on the weighted sum of the left reference samples P (-1, y) and the right side reference sample P (W, y)
  • the second prediction sample P v ( x, y) may be generated based on the weighted sum of the upper reference sample P (x, -1) and the lower reference sample P (x, H).
  • FIGS. 15 and 16 are diagrams for explaining determination of a right reference sample and a bottom reference sample with respect to a non-square block, according to an embodiment of the present invention.
  • the right reference sample is derived based on the upper right reference sample P (N / 2, -1) , And the lower left reference sample P (-1, N).
  • the right-side reference sample and the right-side reference sample can be interpolated to derive the right-side reference sample.
  • a lower reference sample may be derived based on the weighted sum or average of P (N / 2, -1) and P (-1, N) (N / 2, N), the lower right reference sample and the lower left reference sample can be interpolated to derive the lower reference sample.
  • the right reference sample is derived based on the upper right reference sample P (N, , And the lower left reference sample P (-1, N / 2).
  • a right reference sample may be derived based on a weighted sum or average of P (N, -1) and P (-1, N / 2) (N, N / 2) on the basis of the right lower reference sample P (N, N / 2) and interpolating the lower right reference sample and the upper right reference sample.
  • a lower reference sample may be derived based on the weighted sum or average of P (N, -1) and P (-1, N / 2) (N, N / 2) on the basis of the lower right reference sample P (N, N / 2) and interpolating the lower right reference sample and the lower left reference sample.
  • the lower reference sample is the lower left reference sample of the current block lying on the same horizontal line as the lower reference sample or the lower right reference sample of 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 generated based on 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
  • a right reference sample may be derived or a left reference sample may be derived based on at least one of a top interrupted reference sample or a left interrupted reference sample.
  • the lower interrupted sample and the lower left reference sample may be used to derive the lower interrupted sample, and then the lower samples may be generated by interpolation or extrapolation of the lower interrupted sample and the lower left sample.
  • the left interrupted sample and the upper right sample can be used to derive the right interrupted sample, and then the right interrupted sample and the right upper sample can be interpolated or extrapolated to generate the lower samples.
  • the positions of the reference samples used to generate the first predicted image and the second predicted image may be determined differently depending on the size or shape of the current block. For example, depending on the size or shape of the current block, the position of the upper reference sample or the left reference sample used to derive the right reference sample or the lower 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 derived from the lower left reference sample P (-1 , ≪ / RTI > N).
  • the current block is a square block of NxN size
  • the right reference sample and the bottom reference sample may be derived based on the basis.
  • the current block is an Nx2 / N size non-square block, based on the upper stop reference sample P (N / 2, -1) and the lower left reference sample P (-1, N / 2) It is possible to derive a reference sample P (N / 2, N / 2) and derive lower reference samples based on the derived lower reference interrupted sample.
  • lower reference samples may be derived by interpolation or extrapolation of the lower interrupted reference sample and the lower left reference sample.
  • the reference samples P (N / 2, N / 2) may be derived and the right reference samples derived based on the derived right interrupted reference samples.
  • the right reference samples can be derived by interpolating or extrapolating the right interrupted reference sample and the right top reference sample.
  • the first predicted image may be calculated based on a weighted prediction of reference samples lying on the same horizontal line as the predicted sample. Also, the second predicted image can be calculated based on the weighted prediction of the reference samples lying on the same vertical line as the predicted sample.
  • the first predicted image or the second predicted image may be generated using an average value, a minimum value, a maximum value, or the like 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 according to whether or not a prediction target sample is included in a predetermined area in a current block Can be set differently. Specifically, depending on the position of the sample to be predicted, the number of reference samples used for using the right or bottom reference sample or the position of the reference sample may be determined differently, or the position of the reference sample used to derive the first predicted image or the second predicted image may be different The weights, the number of reference samples, and the like can be set differently.
  • the right reference sample used when generating the first prediction image of the prediction target samples included in the predetermined region is derived using only the upper reference sample, and the first prediction image of the prediction target samples included outside the predetermined region Can be derived based on the weighted sum or average of the upper reference sample and the left reference sample.
  • the right reference sample of the prediction target sample at the (x, y) position included in the predetermined area in the current block is P (N / 2, -1).
  • the right reference sample of the prediction target sample included in the predetermined area may be generated by copying the value of the reference sample P (N / 2, -1).
  • the right reference sample of the predicted sample at the position (x ', y') included in the current block outside the predetermined region is a weighted sum or mean value of P (N / 2, -1) .
  • the lower reference sample of the prediction target sample at the (x, y) position included in the predetermined area in the current block is P (-1, N / 2).
  • the lower reference sample of the prediction target sample included in the predetermined area may be generated by copying the value of the P (-1, N / 2) reference sample.
  • the lower reference sample of the predicted sample at the (x ', y') position included outside the predetermined area in the current block is a weighted sum or mean value of P (N, -1) and P .
  • a lower object reference sample of a prediction object included outside a predetermined region is a lower right reference sample P (N, N / 2) that is derived based on P (N, -1) and P ) And the lower left reference sample P (-1, N / 2).
  • the prediction target samples included in the predetermined region may generate the first prediction image or the second prediction image based on the weighted sum of the reference samples, and the prediction target samples outside the predetermined region may be the average value of the reference samples,
  • the first predictive image or the second predictive image may be generated with a maximum value, or a first predictive image or a second predictive image may be generated using only one of the predefined positions of the reference samples.
  • the predicted sample at the (x, y) position included in the predetermined area in the current block is P (N (N / 2, y) or the left reference sample at the position P (-1, y) from the right reference sample P (N / 2, -1).
  • the predicted sample at the (x, y) position included in the predetermined area in the current block is P (-1 (X, N / 2) or P (x, -1) derived from the lower reference sample P (x, N / 2).
  • the predetermined region may be at least one of the sample lines adjacent to the boundary of the current block or the remaining region excluding the sample lines.
  • 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 position of the boundaries used to define the predetermined area may be set differently depending on the type of the current block.
  • the predetermined area may be in the form of a block in contact with one corner of the current block. At this time, 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 predicted image may be derived based on the weighted sum, average, minimum value, or maximum value of the first predicted image and the second predicted image.
  • equation (11) shows an example of generating a final predicted image P based on the weighted sum of the first predicted image P h and the second predicted image P v .
  • the prediction weight w may be different according to the shape, size, or position of a prediction object sample, and the like.
  • the prediction weight w can be derived in consideration of the width of the current block, the height of the current block, or the width-height ratio. If the current block is a non-square block having a width greater than the height, w may be set so that more weight is given to the first prediction image. On the other hand, if the current block is a non-square block whose height is greater than the width, w may be set so that more weight is given to the second predicted image.
  • the prediction weight w may have a value of 1/2.
  • the prediction weight w is set to 1/4, and the current block is a non- , Nx (N / 2)), the prediction weight w can be set to 3/4.
  • Intra prediction can also be performed using reference samples other than the left reference sample and the upper reference sample in the non-planar mode as well as the DC mode or the directional intra prediction mode.
  • the left reference sample and the upper reference sample are referred to as a first reference sample
  • the reference samples excluding the left reference sample and the upper reference sample are 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 sample means reference samples having y-axis coordinates larger than the prediction target sample of the lowermost row in the current block
  • the right reference sample has x-axis coordinates larger than the prediction target sample in the rightmost column in the current block Reference samples. ≪ / RTI >
  • Whether intraprediction is to be performed using the second reference sample can be determined based on at least one of the size of the current block, the type, the position of the intra prediction mode, or the sample to be predicted. In one example, it may be determined whether intra prediction using the second reference sample is to be performed based on whether the intra prediction mode of the current block is a vertical mode, a horizontal mode, or a diagonal mode. Alternatively, intraprediction is performed using a second reference sample for a prediction target sample included in a predetermined area in a current block, while for a prediction target sample not included in a predetermined area in the current block, a first reference sample is used May be set to perform intra prediction.
  • information indicating whether or not the second reference sample is used may be signaled through the bit stream.
  • the information may be a flag of 1 bit, an index used to determine the intra prediction mode of the current block, or the like.
  • the second reference sample may be generated based on the first reference sample.
  • the order of the first reference samples may be altered to construct second reference samples, or a second reference sample may be derived using a first reference sample at a particular location.
  • 17 is a diagram for explaining an example of deriving a second reference sample using a 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 can be derived.
  • the lower right reference sample can be derived through a weighted sum or average operation of the upper right reference sample and the lower left reference sample.
  • equation (12) shows an example of deriving the lower right reference sample.
  • the lower right reference sample can be calculated based on the weighted sum between the upper right reference sample and the lower left reference sample.
  • the weights applied to the upper right reference sample and the lower left reference sample can be determined according to the width and height of the current block. For example, if the current block is square, the same weight is applied to the upper right reference sample and the lower left reference sample, 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 current block size, type, intra prediction mode, availability of reference samples, availability of neighboring blocks, whether neighboring blocks are coded in intra prediction mode, A weight may be determined based on the weight.
  • the right reference sample can be derived based on the right top reference sample and the bottom right reference sample.
  • the right reference sample can be obtained by interpolating the right top reference sample and the bottom right reference sample.
  • the following equation (13) shows an example of deriving the right reference sample.
  • the right reference sample r (W, y) (where y is an integer between 0 and the CU height (cu_height)) is the upper right reference sample r Can be obtained by weighted prediction of the reference samples P (W, H).
  • the weights applied to the upper right reference sample and the lower right reference sample may be determined based on at least one of the width, height, or position of the right reference sample of the current block.
  • the weight of (H-1-y) / H is applied to the upper right reference sample while the weight of (y + 1) / H is applied to the lower right reference sample .
  • 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 current block size, type, intra prediction mode, availability of reference samples, availability of neighboring blocks, whether neighboring blocks are coded in intra prediction mode, A weight may be determined based on the weight.
  • the lower reference sample can be derived based on the lower left reference sample and the lower right reference sample.
  • the lower reference sample can be obtained by interpolating the lower left reference sample and the lower right reference sample. Equation (14) below shows an example of deriving the lower reference sample.
  • Equation 14 As it is shown in Equation 14, and the lower reference sample P b (x, H) (wherein, x is an integer between 0 and CU width (cu_width)), see lower-left sample r (-1, H) and lower-right Can be obtained by weighted prediction of the reference samples P (W, H).
  • the weights applied to the lower left reference sample and the lower right reference sample may be determined based on at least one of the width, height, or position of the lower reference sample of the current block. For example, as in the example shown in Equation 14, the weight of (W-1-x) / W is applied to the lower left reference sample while the weight of (x + 1) / H is applied to the lower right reference sample .
  • 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 of the current block, the type, the intra prediction mode, the availability of the reference sample, the availability of neighboring blocks, whether the neighboring blocks are coded in the intra prediction mode, A weight may be determined based on the weight.
  • the right reference sample and the bottom reference sample may be derived based on the example described above with reference to Figs. 15 and 16. Fig.
  • the first reference samples in a fixed position can be used to derive a second reference sample, such as a right reference sample and a bottom reference sample.
  • a second reference sample may be derived using a first reference sample at a different location from the top right reference sample and / or the bottom left reference sample.
  • a right reference sample and a bottom reference sample may be derived using a first reference sample, such as a top interrupted reference sample of the current block or a left interrupted sample of the current block.
  • a first reference sample may be determined that is used to derive the second reference sample.
  • 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 direction of the current block.
  • a plurality of left reference samples and / or a plurality of top reference samples may be used to determine the second reference sample.
  • at least one of the right reference sample, the bottom reference sample, or the bottom right reference sample is generated based on a weighted sum, a mean value, a maximum value, or a minimum value of a plurality of left reference samples or a weighted sum of a plurality of upper reference samples, , A maximum value, or a minimum value.
  • the first reference sample may be copied to generate a second reference sample.
  • the first reference sample used to generate the second reference sample may have a fixed position and may be adaptively determined according to the size, type, 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 uppermost right reference sample r (2W-1, -1), or the right reference sample up to the same horizontal line as the lower left reference sample r (-1, 2H- Lt; / RTI >
  • the lower reference sample having x coordinate larger than W is generated by extrapolating the lower left reference sample and the lower right reference sample, or the right lower reference sample P (W, H) and the lower right lower reference sample P (2W- H) < / RTI >
  • the rightmost bottom reference sample may be generated by copying the right top reference sample r (2W-1, -1) or may be generated by a weighted sum operation between the right top reference sample and the bottom left reference sample.
  • the right reference sample having a y coordinate larger than H is generated by extrapolating the upper right reference sample and the lower right reference sample or the lower right reference sample P (W, H) and the lower right reference sample P (W, 2H-1) Can be generated by interpolation.
  • the lowermost right reference sample may be generated by copying the lowermost left reference sample r (-1, 2H-1) or may be generated through a weighted sum operation between the lowermost left reference sample and the upper left reference sample.
  • the first reference samples may be arranged in one dimension to generate a first one-dimensional reference sample group, and the second reference samples may be arranged in a one-dimensional manner to generate a second one-dimensional reference sample group.
  • 18 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 includes the right reference samples and the bottom reference samples of the current block as well as some left reference samples and some top reference samples . ≪ / RTI >
  • left-side reference samples having the y-axis coordinate larger than the left-side reference sample r (-1, H) and the lower-left reference sample among the left reference samples can be both included in the first one-dimensional reference sample group and the second one- have.
  • the upper right reference sample r (W, -1) among the upper reference samples and the upper reference samples having larger x axis coordinates than the upper right reference sample can be both included in the first one-dimensional reference sample group and the second one-dimensional reference sample group have.
  • the first one-dimensional reference sample group may include only the first first reference samples, or only the second one- .
  • the arrangement order of the reference samples constituting the one-dimensional reference sample group as well as the configuration of the one-dimensional reference sample group can be variably determined based on at least one of the size, type, or intra-prediction mode of the current block.
  • a reference sample group including a left reference sample and a top reference sample of a current block is referred to as a first reference sample group (e.g., a first one-dimensional reference sample group)
  • the reference sample group including the right reference sample and the bottom reference sample of the current block will be referred to as a second reference sample group (e.g., 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 lower reference sample are included.
  • a reference sample selected from a first reference sample group is referred to as a first basic reference sample
  • a reference sample selected from a second reference sample group is referred to as a second fundamental reference sample
  • Intra prediction of the current block can be performed using at least one of the first reference sample group or the second reference sample group.
  • the predictive value of the current in-block predicted sample may be obtained based on at least one of a first baseline reference sample selected in the first reference sample group or a second baseline reference sample selected in the second reference sample group.
  • the first basic reference sample and / or the second basic reference sample may be determined based on at least one of the type, size, or intra prediction mode of the current block.
  • the intra prediction mode of the current block is determined, the first basic reference sample for the prediction object sample is specified according to the determined intra prediction mode direction, and the first basic reference sample for the predicted sample is specified according to the determined reverse direction of the intra prediction mode. 2 Basic reference sample can be specified.
  • the position of the second baseline reference sample may be determined based on the position of the first baseline reference sample, or the position of the first baseline reference sample may be determined based on the position of the second baseline reference sample.
  • the offset may have a fixed value and may be determined adaptively according to the size, type, or intra prediction mode of the current block.
  • the position of the first baseline reference sample and / or the second baseline reference sample may be determined based on the position of the predicted sample. For example, a first basic reference sample and / or a second basic reference sample having the same x-coordinate or the same y-coordinate as the prediction target sample and / or a second basic reference sample having a value obtained by adding an offset to the x- 1 < / RTI > baseline reference sample and / or a second baseline reference sample.
  • the offset may have a fixed value and may be determined adaptively according to the size, type, or intra prediction mode of the current block.
  • the predictive value of the predictive sample may be generated based on at least one of a first predictive image based on the first baseline reference sample or a second predictive image based on the second baseline reference sample.
  • the first predicted image can be generated based on the equations (8) to (10) described above.
  • the second predicted image may be generated by interpolating or copying a second baseline reference sample specified according to the slope of the intra prediction mode of the current block.
  • Equation (15) is an example of deriving a second predicted image by copying a second baseline reference sample.
  • Equation (15) P 2 (x, y) denotes a second predicted image, and P_2nd_1D (x + iIdx + 1 + f) denotes a second baseline reference sample.
  • a plurality of second basic reference samples may be interpolated to generate a second prediction image.
  • a second reference and the second predicted image can be obtained by interpolating the samples.
  • equation (16) shows an example of obtaining a second predicted image by interpolating second reference samples.
  • the coefficients of the interpolation filter may be determined based on the weighting related parameter i fact . In one example, the coefficients of the interpolation filter may be determined based on the distance between the fractional pel located on the angular line and the integer pel (i.e., the integer position of each reference sample).
  • an interpolation filter having a tap number of 2 is illustrated in the expression (16), an interpolation filter having a number of taps greater than 2 may be used.
  • the final predicted image of the predicted sample may be obtained based on at least one of the first predicted image and the second predicted image.
  • the first predicted image may be determined as the final predicted image of the predicted sample or the second predicted image may be determined as the final predicted image of the predicted sample.
  • the final predicted image of the predicted sample may be determined based on the weighted sum or average operation of the first predicted image and the second predicted image. Equation (17) shows an example of obtaining the final predicted sample based on the weighted operation of the first predicted image and the second predicted image.
  • Equation 17 P 1 (x, y) represents a first predicted image and P 2 (x, y) represents a second predicted image.
  • w (x, y) represents a weight given to the first predicted image.
  • the weights assigned to the first predicted image and the second predicted image may be determined based on at least one of a position of a predictive sample, a size of a current block, a shape, or an intra prediction mode.
  • Equation (18) shows an example in which a weight is determined according to the size of a current block and the position of a sample to be predicted.
  • W and H denote the width and height of the current block, respectively, and (x, y) denotes the coordinates of the predicted sample.
  • the weight to be assigned to the first predictive image is set to be larger as the predictive sample is closer to the upper left corner of the current block, and as the predictive sample is closer to the lower right corner of the current block
  • the weight value assigned to the second predicted image can be set large.
  • weights may be derived from neighboring blocks of the current block.
  • the neighboring block of the current block may include at least one of a top neighboring block, a left neighboring block, or a neighboring block adjacent to a corner (e.g., a left upper neighbor block, a right upper neighbor block, or a lower left neighbor block) have.
  • information for determining a weight may be signaled via a bitstream.
  • the information may represent a weight value applied to the first predicted image or the second predicted image, or may represent a weight difference value between the current block and the neighboring block.
  • acquiring the final predicted image through weighted sum calculation between the first predicted image and the second predicted image can be referred to as bi-directional intra prediction.
  • Bidirectional intra prediction can be applied only to a partial area within the current block.
  • the area to which the bidirectional intra prediction is applied may be predefined in the encoder and the decoder.
  • bidirectional intra prediction can be applied to a predetermined size (e.g., 4x4) block adjacent to the lower right corner in the current block.
  • an area to which bidirectional intra prediction is adaptively applied may be determined according to the size, type, or intra prediction mode of the current block.
  • information for determining a region to which bidirectional intra prediction is applied may be signaled through a bitstream.
  • FIG. 19 shows an example of a region to which bi-directional intra prediction is applied.
  • the first predicted image and the second predicted image are weighted predicted to obtain the final predicted sample.
  • the first prediction image or the second prediction image can be determined as the final prediction sample.
  • bi-directional intra prediction is performed using the first basic reference sample selected in the first sample group and the second basic reference sample selected in the second sample group. Unlike the described example, it is also possible to perform a bidirectional intra prediction by selecting a plurality of reference samples in the first sample group, or to perform a bidirectional intra prediction by selecting a plurality of reference samples in the second sample group. For example, when the intra prediction mode of the current block is the right upper diagonal direction or the lower left diagonal direction, a bidirectional intra prediction can be performed by selecting the upper reference sample and the left reference sample among the first sample group. That is, the first reference image obtained based on the upper reference sample and the second reference image acquired based on the lower reference sample may be weighted predicted to obtain the final predicted sample of the current block.
  • a right reference sample and a lower reference sample among the second sample groups may be selected to perform bi-directional intra prediction.
  • Bidirectional intra prediction can be defined as an independent intra prediction mode.
  • a total of 2N + 2 intra prediction modes can be defined by defining N bidirectional intra prediction modes corresponding to N directional prediction modes and N directional prediction modes.
  • a bidirectional intra-prediction mode is added to the intra-prediction mode shown in Fig. 8, so that a total of 68 intra-prediction modes (i.e., two non-directional intra-prediction modes, 33 directional intra- ) 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, if the intra prediction mode of the current block is determined, information on whether to use the determined intra prediction mode in the bidirectional intra prediction mode can be decoded.
  • the information may be a 1-bit flag (e.g., 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 bi-directional intra prediction is performed. That is, when the value of bi_intra_flag is 0, the first predicted image is determined as the final predicted sample of the current block.
  • bi_intra_flag is 1, the weighted predictions of the first predicted image and the second predicted image, Lt; / RTI >
  • the candidate i.e., MPM candidate
  • bi-directional intra prediction may be set to allow only 32x32 or more blocks. Accordingly, when the current block size is smaller than 32x32, bidirectional intra prediction is not applied, whereas when the current block size is 32x32 or more, bidirectional intra prediction can be applied.
  • bi-directional intra prediction may be allowed only for square blocks, or bi-directional intra prediction may be allowed for non-regular blocks only.
  • bi-directional intra prediction may be applied only in a certain directional intra prediction mode.
  • FIG. 20 shows an example in which a directional prediction mode in which bi-directional intra prediction is allowed is identified and displayed.
  • bidirectional intra prediction can be set so that only a partial intra prediction mode between the horizontal direction and the vertical direction is allowed.
  • bidirectional intra prediction may be performed by default.
  • the intra prediction mode within the range is selected, information to be parsed through the bitstream, Directional intra prediction mode based on at least one of the intra prediction modes.
  • the intra prediction mode in which bi-directional intra prediction is allowed is not limited to the example shown in Fig.
  • the intra prediction mode in which bi-directional intra prediction is allowed may be predefined in the encoder and decoder, and may be adaptively determined according to the size and / or type of the current block. Alternatively, information for determining an intra prediction mode in which bi-directional intra prediction is allowed may be signaled through the bit stream.
  • 21 is a flowchart illustrating a method of intra prediction of a current block based on a bi-directional intra prediction mode according to the present invention.
  • bi-directional intra prediction is applied to the current block (S2110). Whether bi-directional intra prediction is applied to the current block can be determined based on information to be parsed from the bit stream, the type, size, or intra prediction mode of the current block.
  • the bi-directional intra prediction is applied to the current block based on the size, shape, or information parsed from the bit stream (for example, bi_pred_flag) Can be determined.
  • a reference sample of the current block can be derived (S2120).
  • first reference samples adjacent to the left and top of the current block are derived, and if bi-directional intra prediction is applied to the current block, second reference samples adjacent to the right and bottom can be additionally derived (S2130).
  • a first predicted image may be generated based on at least one basic reference sample among the first reference samples according to the intra prediction mode of the current block (S2140 ). In this case, the first predicted image may be determined as the final predicted sample of the current block.
  • a second predicted image may be generated based on at least one of the second reference samples in addition to the first predicted image (S2150).
  • the first baseline reference sample and the second baseline reference sample may be determined based on the direction of the intra-prediction mode and may be determined based on the size, shape, or position of another basic reference sample of the current block.
  • the first predicted image and the second predicted image may be weighted predicted to obtain a final predicted sample of the current block.
  • a DC value may be derived from the reference samples and the derived DC value may be determined as the value of the current intra-block prediction samples.
  • the intra prediction mode of the current block is the DC mode
  • the average value of the upper reference samples and the left reference samples of the current block may be determined as a DC value
  • the DC value may be determined as a prediction sample value of the current block.
  • the upper left reference sample r (-1, -1) may be excluded in calculating the DC value.
  • the DC value can be calculated by setting different ranges of the reference samples used for DC value calculation according to the size or type of the current block, or by applying different weights according to the positions of the reference samples.
  • the upper reference samples having the same x coordinate or smaller x coordinate as the rightmost column of the current block than the upper reference samples having the x coordinate larger than the rightmost column of the current block may be given a larger weight
  • the left reference samples having the same y coordinate or a smaller y coordinate value as the lowermost row of the current block than the left reference samples having the y coordinate value larger than the lowermost row of the current block can be given a larger weight.
  • 22 is a diagram showing an example in which different weights are applied according to the positions of reference samples.
  • a weight of 1 is applied to the upper reference samples having the x coordinate larger than the rightmost column of the current block and the left reference samples having the y coordinate larger than the lowermost row of the current block, and the upper reference samples And the left reference samples are given weighting of 3.
  • the DC value can be calculated based on the following equation (19).
  • the weights given to the reference samples are changed based on the x-coordinate of the rightmost column and the y-coordinate of the lowermost row of the current block. However, May be adjusted.
  • the weights for the reference samples may be determined based on the size and / or shape of the current block. For example, if the current block is a non-deterministic block with a width greater than the height, the weight applied to at least some of the top reference samples may be set to be greater than the weight applied to at least some of the left reference samples . On the other hand, when the current block is a non-block type block whose height is greater than the width, it is possible to set the weight applied to at least a part of the left reference samples to be larger than a weight applied to at least a part of the upper reference samples.
  • a weight of 1 is applied to the left reference samples having y coordinate larger than the lowermost row of the current block and the upper reference samples, while a weight of 1 is applied to the left reference samples having the y coordinate that is the same as or lower than the lowermost row of the current block.
  • Reference samples are illustrated as having a weight of three. 23, if the current block is of the non-punctiform type whose height is larger than the width, the weight given to the left reference samples of the current block is set to be larger than the weight given to the upper reference samples . Accordingly, the DC value can be obtained as shown in the following Equation (20).
  • the weight of 1 is applied to the upper reference samples having the x-coordinate larger than the left-side reference samples and the right-most column of the current block, while the x-coordinate is the same as or smaller than the rightmost column of the current block
  • the upper reference samples are illustrated as having a weight of 3. That is, when the current block is of the non-punctiform form having a width larger than the height, as in the example shown in FIG. 24, the weight given to the upper reference samples of the current block is set to be larger than the weight given to the left reference samples . Accordingly, the DC value can be obtained as shown in the following equation (21).
  • the upper reference samples having the x coordinate larger than the rightmost column of the current block and the upper reference samples having the same x coordinate as the rightmost column or the x coordinate smaller than the rightmost column of the current block are all given a weight However, it is also possible to set different weights to be given to each of them.
  • the left reference samples having the y coordinate larger than the lowermost row of the current block and the weight given to the left reference samples having the y coordinate equal to or smaller than the lowermost row of the current block are set differently .
  • the weights applied to the reference samples may have fixed values in the encoder and decoder.
  • the weight may be adaptively determined based on the type or size of the current block.
  • the weight can be adaptively determined according to the height, width, or aspect ratio of the current block.
  • information indicating a weight applied to each reference sample may be signaled through the bitstream. Based on the information, a weight applied to each reference sample can be determined.
  • a weight applied to a current block may be determined based on a weight applied to neighboring blocks adjacent to the current block.
  • a weight applied to a neighboring block may be determined as a weight of a current block, or a weight of a current block may be derived by adding a difference to a weight applied to a neighboring block.
  • the difference value may be determined based on information signaled through the bitstream.
  • the left reference samples or the top reference samples is divided into two groups to which different weights are applied.
  • the left reference samples or top reference samples may be divided into a larger number of groups, and then different weights may be applied to each group.
  • DC values can be calculated by assigning different weights to reference samples or assigning different weights to the reference samples.
  • the unit group can be divided based on the predefined number. That is, each unit group may contain the same number of reference samples. Alternatively, based on the size or type of the current block, the number of reference samples included in each unit group may be determined differently.
  • a uniform weight may be applied to each of the left reference samples and / or the top reference samples, but the weights applied to the left reference samples and the top reference samples may be differently determined. For example, if the current block is of non-rectangular shape with a width greater than the height, the upper reference samples are given a larger weight than the left reference samples to obtain a DC value, while the current block has a non- , The left reference samples may be given a larger weight than the upper reference samples to obtain the DC value.
  • the DC value may be calculated using only some of the top reference samples or the left reference samples.
  • the DC value can be calculated using only the top reference samples. That is, when the current block is of the non-periodic shape having a width larger than the height, the average value of the upper reference samples may be determined as a DC value, or the weighted sum between upper reference samples may be determined as a DC value.
  • the DC value can be calculated using only left reference samples. That is, when the current block is in the non-punctiform form having a height larger than the width, the average value of the left reference samples may be determined as the DC value, or the weighted sum between the left reference samples may be determined as the DC value.
  • the upper reference samples having an x coordinate value larger than the rightmost row of the current block, or the left reference samples having a y coordinate value larger than the lowermost row of the current block can be calculated.
  • generating a DC value by assigning different weights to the upper reference samples and the left reference samples may be referred to as a " DC weighted prediction ".
  • DC weighted prediction may be allowed only for blocks having a magnitude greater than a predetermined threshold.
  • the threshold value may indicate a block size such as 16x16, 32x32, or 64x64, or may represent a reference value for either the width or the height of the block. If the current block size is smaller than the threshold value, the DC weighting prediction may not be applied even if the intra prediction mode of the current block is the DC mode. If the DC weighted prediction is not applied, the DC value can be determined by applying the same weight to the upper reference samples and the left reference samples. Alternatively, the DC weighted prediction can be allowed only when the current block is non-square.
  • information indicating whether to apply DC weighted prediction may be signaled through the bitstream.
  • a DC weighting prediction may be applied by default if the intra prediction mode of the current block is the DC mode.
  • each of the components (for example, units, modules, etc.) constituting the block diagram may be implemented by a hardware device or software, and a plurality of components may be combined into one hardware device or software .
  • the above-described embodiments may be implemented in the form of program instructions that may be executed through various computer components and recorded in a computer-readable recording medium.
  • the computer-readable recording medium may include program commands, data files, data structures, and the like, 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 and DVDs, 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 for performing the processing according to the present invention, and vice versa.
  • the present invention can be applied to an electronic device capable of encoding / decoding an image.

Abstract

본 발명에 따른 영상 복호화 방법은, 현재 블록의 인트라 예측 모드를 결정하는 단계, 상기 현재 블록의 인트라 예측 모드가 DC 모드인 경우, 상기 현재 블록의 좌측 참조 샘플들 또는 상단 참조 샘플들 중 적어도 하나를 기초로 DC값을 결정하는 단계, 및 상기 DC값을 기초로 상기 현재 블록의 예측 샘플을 유도하는 단계를 포함할 수 있다.

Description

비디오 신호 처리 방법 및 장치
본 발명은 비디오 신호 처리 방법 및 장치에 관한 것이다.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 응용 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 데이터량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 저장하는 경우, 전송 비용과 저장 비용이 증가하게 된다. 영상 데이터가 고해상도, 고품질화 됨에 따라 발생하는 이러한 문제들을 해결하기 위해서는 고효율의 영상 압축 기술들이 활용될 수 있다.
영상 압축 기술로 현재 픽쳐의 이전 또는 이후 픽쳐로부터 현재 픽쳐에 포함된 화소값을 예측하는 화면 간 예측 기술, 현재 픽쳐 내의 화소 정보를 이용하여 현재 픽쳐에 포함된 화소값을 예측하는 화면 내 예측 기술, 출현 빈도가 높은 값에 짧은 부호를 할당하고 출현 빈도가 낮은 값에 긴 부호를 할당하는 엔트로피 부호화 기술 등 다양한 기술이 존재하고 이러한 영상 압축 기술을 이용해 영상 데이터를 효과적으로 압축하여 전송 또는 저장할 수 있다.
한편, 고해상도 영상에 대한 수요가 증가함과 함께, 새로운 영상 서비스로서 입체 영상 컨텐츠에 대한 수요도 함께 증가하고 있다. 고해상도 및 초고해상도의 입체 영상 콘텐츠를 효과적으로 제공하기 위한 비디오 압축 기술에 대하여 논의가 진행되고 있다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 부호화/복호화 대상 블록에 대해 효율적으로 인트라 예측을 수행할 수 있는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 서로 이웃하지 않는 복수의 참조 샘플을 이용하여 인트라 예측을 수행하는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 우측 및 하단 참조 샘플을 이용하여 인트라 예측을 수행하는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, DC값 계산에 이용되는 참조 샘플의 범위를 적응적으로 결정하는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 참조 샘플간 상이한 가중치를 부여하여 DC값을 계산하는 방법 및 장치를 제공하는 것을 목적으로 한다.
본 발명에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제들로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
본 발명에 따른 비디오 신호 복호화 방법 및 장치는, 현재 블록의 인트라 예측 모드를 결정하고, 상기 현재 블록의 인트라 예측 모드가 DC 모드인 경우, 상기 현재 블록의 좌측 참조 샘플들 또는 상단 참조 샘플들 중 적어도 하나를 기초로 DC값을 결정하고, 상기 DC값을 기초로 상기 현재 블록의 예측 샘플을 유도할 수 있다. 이때, 상기 DC값을 결정하는데 이용되는 참조 샘플들의 범위 또는 상기 DC값을 결정하기 위해 상기 좌측 참조 샘플들 또는 상기 상단 참조 샘플들에 적용되는 가중치는 상기 현재 블록의 크기, 형태 또는 참조 샘플의 위치 중 적어도 하나에 기초하여 결정될 수 있다.
본 발명에 따른 비디오 신호 부호화 방법 및 장치는, 현재 블록의 인트라 예측 모드를 결정하고, 상기 현재 블록의 인트라 예측 모드가 DC 모드인 경우, 상기 현재 블록의 좌측 참조 샘플들 또는 상단 참조 샘플들 중 적어도 하나를 기초로 DC값을 결정하고, 상기 DC값을 기초로 상기 현재 블록의 예측 샘플을 유도할 수 있다. 이때, 상기 DC값을 결정하는데 이용되는 참조 샘플들의 범위 또는 상기 DC값을 결정하기 위해 상기 좌측 참조 샘플들 또는 상기 상단 참조 샘플들에 적용되는 가중치는 상기 현재 블록의 크기, 형태 또는 참조 샘플의 위치 중 적어도 하나에 기초하여 결정될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록이 비정방 형태의 블록인 경우, 상기 좌측 참조 샘플들 또는 상기 상단 참조 샘플들 중 어느 하나만을 이용하여 상기 DC값이 결정될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록이 너비가 높이보다 큰 비정방 형태의 블록인 경우, 상기 DC값은 상기 상단 참조 샘플들의 평균값으로 결정될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록이 높이가 너비보다 큰 비정방 형태의 블록인 경우, 상기 DC값은 상기 좌측 참조 샘플들의 평균값으로 결정될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 DC값은 상기 상단 참조 샘플들 및 상기 좌측 참조 샘플들의 가중합 연산에 의해 결정될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록이 너비가 높이보다 큰 비정방 형태의 블록인 경우, 상기 상단 참조 샘플들에 적용되는 가중치가 상기 좌측 참조 샘플들에 비해 큰 값을 갖도록 설정될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록이 높이가 너비보다 큰 비정방 형태의 블록인 경우, 상기 좌측 참조 샘플들에 적용되는 가중치가 상기 상단 참조 샘플들에 비해 큰 값을 갖도록 설정될 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 최하단 행보다 큰 y 좌표를 갖는 좌측 참조 샘플들과 잔여 좌측 참조 샘플들 사이에 적용되는 가중치는 상이할 수 있다.
본 발명에 따른 비디오 신호 부호화/복호화 방법 및 장치에 있어서, 상기 현재 블록의 최우측 열보다 큰 x 좌표를 갖는 상단 참조 샘플들과 잔여 상단 참조 샘플들 사이에 적용되는 가중치는 상이할 수 있다.
본 발명에 대하여 위에서 간략하게 요약된 특징들은 후술하는 본 발명의 상세한 설명의 예시적인 양상일 뿐이며, 본 발명의 범위를 제한하는 것은 아니다.
본 발명에 의하면, 부호화/복호화 대상 블록에 대해 효율적으로 인트라 예측을 수행할 수 있다.
본 발명에 의하면, 서로 이웃하지 않는 복수의 참조 샘플을 이용하여 인트라 예측을 수행함으로써, 인트라 예측의 효율을 높일 수 있는 이점이 있다.
본 발명에 의하면, 우측 및 하단 참조 샘플을 이용함으로써, 인트라 예측의 효율을 높일 수 있는 이점이 있다.
본 발명에 의하면, DC값 계산에 이용되는 참조 샘플의 범위를 적응적으로 결정하여 인트라 예측의 효율을 높일 수 있는 이점이 있다.
본 발명은 비디오 신호를 부호화/복호화함에 있어서, 참조 샘플간 상이한 가중치를 부여하여 DC값을 계산함으로써, 인트라 예측의 효율을 높일 수 있는 이점이 있다.
본 발명에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.
도 1은 본 발명의 일실시예에 따른 영상 부호화 장치를 나타낸 블록도이다.
도 2는 본 발명의 일실시예에 따른 영상 복호화 장치를 나타낸 블록도이다.
도 3은 본 발명이 적용되는 일실시예로서, 트리 구조(tree structure)에 기반하여 코딩 블록을 계층적으로 분할하는 일예를 도시한 것이다.
도 4는 본 발명이 적용되는 일실시예로서, 바이너리 트리 기반의 분할이 허용되는 파티션 형태를 나타낸 도면이다.
도 5는 본 발명이 적용되는 일실시예로서, 특정 형태의 바이너리 트리 기반의 분할만이 허용된 예를 나타낸 도면이다.
도 6은 본 발명이 적용되는 일실시예로서, 바이너리 트리 분할 허용 횟수와 관련된 정보가 부호화/복호화되는 예를 설명하기 위한 도면이다.
도 7은 본 발명이 적용되는 일실시예로서, 코딩 블록에 적용될 수 있는 파티션 모드를 예시한 도면이다.
도 8은 본 발명이 적용되는 일실시예로서, 영상 부호화기/복호화기에 기-정의된 인트라 예측 모드의 종류를 도시한 것이다.
도 9는 본 발명이 적용되는 일실시예로서, 확장된 인트라 예측 모드의 종류를 도시한 것이다.
도 10은 본 발명이 적용되는 일실시예로서, 인트라 예측 방법을 개략적으로 도시한 순서도이다.
도 11은 본 발명이 적용되는 일실시예로서, 주변 샘플들의 차분 정보에 기반하여 현재 블록의 예측 샘플을 보정하는 방법을 도시한 것이다.
도 12 및 도 13은 참조 샘플들이 일렬로 재배열된 일차원 레퍼런스 샘플 그룹을 나타낸 도면이다.
도 14는 복수 참조 샘플을 이용하여, 우측 참조 샘플 또는 하단 참조 샘플을 유도하는 예를 나타낸 도면이다.
도 15 및 도 16은 본 발명의 일 실시예에 따른, 비정방형 블록에 대해 우측 참조 샘플 및 하단 참조 샘플을 결정하는 것을 설명하기 위한 도면이다.
도 17은 제1 참조 샘플을 이용하여 제2 참조 샘플을 유도하는 예를 설명하기 위한 도면이다.
도 18은 일차원 레퍼런스 샘플 그룹을 구성하는 참조 샘플들을 예시한 도면이다.
도 19는 양방향 인트라 예측이 적용되는 영역을 나타낸 예이다.
도 20은 양방향 인트라 예측이 허용되는 방향성 예측 모드를 식별 표시한 예이다.
도 21은 본 발명에 따른 양방향 인트라 예측 모드에 기초한 현재 블록의 인트라 예측 방법을 나타낸 흐름도이다.
도 22는 참조 샘플의 위치에 따라 상이한 가중치가 적용되는 예를 나타낸 도면이다.
도 23 및 도 24는 현재 블록이 비정방 형태인 경우, 참조 샘플들에 적용되는 가중치를 나타낸 것이다.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세한 설명에 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.
제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을 갖는 것으로 정의될 수 있다.
코딩 트리 유닛이 분할됨에 따라 생성된 임의 크기의 파티션을 코딩 유닛이라 정의할 수 있다. 코딩 유닛은 재귀적으로 분할되거나, 예측, 양자화, 변환 또는 인루프 필터링 등을 수행하기 위한 기본 단위로 분할될 수 있다. 일 예로, 코딩 유닛이 분할됨에 따라 생성된 임의 크기의 파티션은 코딩 유닛으로 정의되거나, 예측, 양자화, 변환 또는 인루프 필터링 등을 수행하기 위한 기본 단위인 변환 유닛 또는 예측 유닛으로 정의될 수 있다.
코딩 트리 유닛 또는 코딩 유닛의 파티셔닝은, 수직선(Vertical Line) 또는 수평선(Horizontal Line) 중 적어도 하나에 기초하여 수행될 수 있다. 또한, 코딩 트리 유닛 또는 코딩 유닛을 파티셔닝하는 수직선 또는 수평선의 개수는 적어도 하나 이상일 수 있다. 일 예로, 하나의 수직선 또는 하나의 수평선을 이용하여, 코딩 트리 유닛 또는 코딩 유닛을 2개의 파티션으로 분할하거나, 두개의 수직선 또는 두개의 수평선을 이용하여, 코딩 트리 유닛 또는 코딩 유닛을 3개의 파티션으로 분할할 수 있다. 또는, 하나의 수직선 및 하나의 수평선을 이용하여, 코딩 트리 유닛 또는 코딩 유닛을 길이 및 너비가 1/2 인 4개의 파티션으로 분할할 수 있다.
코딩 트리 유닛 또는 코딩 유닛을 적어도 하나의 수직선 또는 적어도 하나의 수평선을 이용하여 복수의 파티션으로 분할하는 경우, 파티션들은 균일한 크기를 갖거나, 서로 다른 크기를 가질 수 있다. 또는, 어느 하나의 파티션이 나머지 파티션과 다른 크기를 가질 수도 있다.
후술되는 실시예들에서는, 코딩 트리 유닛 또는 코딩 유닛이 쿼드 트리, 트리플 트리 또는 바이너리 트리 구조로 분할되는 것으로 가정한다. 그러나, 더 많은 수의 수직선 또는 더 많은 수의 수평선을 이용한 코딩 트리 유닛 또는 코딩 유닛의 분할도 가능하다.
도 3은 본 발명이 적용되는 일실시예로서, 트리 구조(tree structure)에 기반하여 코딩 블록을 계층적으로 분할하는 일예를 도시한 것이다.
입력 영상 신호는 소정의 블록 단위로 복호화되며, 이와 같이 입력 영상 신호를 복호화하기 위한 기본 단위를 코딩 블록이라 한다. 코딩 블록은 인트라/인터 예측, 변환, 양자화를 수행하는 단위가 될 수 있다. 또한, 코딩 블록 단위로 예측 모드(예컨대, 화면 내 예측 모드 또는 화면 간 예측 모드)가 결정되고, 코딩 블록에 포함된 예측 블록들은, 결정된 예측 모드를 공유할 수 있다. 코딩 블록은 8x8 내지 64x64 범위에 속하는 임의의 크기를 가진 정방형 또는 비정방형 블록일 수 있고, 128x128, 256x256 또는 그 이상의 크기를 가진 정방형 또는 비정방형 블록일 수 있다.
구체적으로, 코딩 블록은 쿼드 트리(quad tree), 트리플 트리(triple tree) 및 바이너리 트리(binary tree) 중 적어도 하나에 기초하여 계층적으로 분할될 수 있다. 여기서, 쿼드 트리 기반의 분할은 2Nx2N 코딩 블록이 4개의 NxN 코딩 블록으로 분할되는 방식을, 트리플 트리 기반의 분할은 하나의 코딩 블록이 3개의 코딩 블록으로 분할되는 방식을, 바이너리 트리 기반의 분할은 하나의 코딩 블록이 2개의 코딩 블록으로 분할되는 방식을 각각 의미할 수 있다. 트리플 트리 분할 또는 바이너리 트리 기반의 분할이 수행되었다 하더라도, 하위 뎁스에서는 정방형인 코딩 블록이 존재할 수 있다. 또는, 트리플 트리 분할 또는 바이너리 트리 기반의 분할이 수행된 이후, 하위 뎁스에서는 정방형 코딩 블록이 생성되는 것을 제한할 수도 있다.
바이너리 트리 기반의 분할은 대칭적으로 수행될 수도 있고, 비대칭적으로 수행될 수도 있다. 바이너리 트리 기반으로 분할된 코딩 블록은 정방형 블록일 수도 있고, 직사각형과 같은 비정방형 블록일 수도 있다. 일 예로, 바이너리 트리 기반의 분할이 허용되는 파티션 형태는 도 4에 도시된 예에서와 같이, 대칭형(symmetric)인 2NxN (수평 방향 비 정방 코딩 유닛) 또는 Nx2N (수직 방향 비정방 코딩 유닛), 비대칭형(asymmetric)인 nLx2N, nRx2N, 2NxnU 또는 2NxnD 중 적어도 하나를 포함할 수 있다.
바이너리 트리 기반의 분할은, 대칭형 또는 비대칭 형태의 파티션 중 어느 하나만 제한적으로 허용될 수도 있다. 이 경우, 코딩 트리 유닛을, 정방형 블록으로 구성하는 것은 쿼드 트리 CU 파티셔닝에 해당하고, 코딩 트리 유닛을, 대칭형인 비정방형 블록으로 구성하는 것은 이진 트리 파티셔닝에 해당할 수 있다. 코딩 트리 유닛을 정방형 블록과 대칭형 비정방형 블록으로 구성하는 것은 쿼드 및 바이너리 트리 CU 파티셔닝에 해당할 수 있다.
바이너리 트리 기반의 분할은 쿼드 트리 기반의 분할이 더 이상 수행되지 않는 코딩 블록에 대해서 수행될 수 있다. 바이너리 트리 기반으로 분할된 코딩 블록에 대해서는 쿼드 트리 기반의 분할, 트리플 트리 기반의 분할 또는 바이너리 트리 기반의 분할 중 적어도 하나가 더 이상 수행되지 않도록 설정될 수 있다.
또는, 바이너리 트리 기반으로 분할된 코딩 블록에 대해 트리플 트리 기반의 분할 또는 바이너리 트리 기반의 분할을 허용하되, 수평 방향 또는 수직 방향의 분할 중 어느 하나만을 제한적으로 허용할 수도 있다.
예컨대, 바이너리 트리 기반으로 분할된 코딩 블록의 위치, 인덱스, 형태, 이웃 파티션의 추가 분할 형태 등에 따라, 바이너리 트리 기반으로 분할된 코딩 블록에 대해 추가 분할 또는 추가 분할 방향을 제한할 수도 있다. 일 예로, 바이너리 트리 기반의 분할로 인해 생성된 두 코딩 블록 중 코딩 순서가 앞에 있는 코딩 블록의 인덱스를 0(이하, 코딩 블록 인덱스 0), 코딩 순서가 뒤에 있는 코딩 블록의 인덱스를 1(이하, 코딩 블록 인덱스 1) 이라 할 때, 코딩 블록 인덱스 0 또는 코딩 블록 인덱스 1인 코딩 블록에 모두 바이너리 트리 기반의 분할이 적용되는 경우, 코딩 블록 인덱스가 1인 코딩 블록의 바이너리 트리 기반의 분할 방향은, 코딩 블록 인덱스가 0인 코딩 블록의 바이너리 트리 기반의 분할 방향에 따라 결정될 수 있다. 구체적으로, 코딩 블록 인덱스가 0인 코딩 블록의 바이너리 트리 기반의 분할 방향이 코딩 블록 인덱스가 0인 코딩 블록을 정방형 파티션들로 분할하는 것인 경우, 코딩 블록 인덱스가 1인 코딩 블록의 바이너리 트리 기반의 분할은 코딩 블록 인덱스가 1인 코딩 블록의 바이너리 트리 기반의 분할과 상이한 방향을 갖도록 제한될 수 있다. 즉, 코딩 블록 인덱스 0 및 코딩 블록 인덱스 1인 코딩 블록들이 모두 정방형 파티션들로 분할되는 것이 제한될 수 있다. 이 경우, 코딩 블록 인덱스가 1인 코딩 블록의 바이너리 트리 분할 방향을 나타내는 정보의 부호화/복호화가 생략될 수 있다. 이는, 코딩 블록 인덱스 0 및 코딩 블록 인덱스 1인 코딩 블록들이 모두 정방형 파티션들로 분할되는 것은, 상위 뎁스 블록을 쿼드 트리 기반으로 분할하는 것과 동일한 효과를 나타내는바, 코딩 블록 인덱스 0 및 코딩 블록 인덱스 1을 모두 정방형 파티션들로 분할하는 것을 허용하는 것은 부호화 효율 측면에서 바람직하지 않기 때문이다.
트리플 트리 기반의 분할은, 수평 또는 수직 방향으로 코딩 블록을 3개의 파티션으로 분할하는 것을 의미한다. 트리플 트리 기반의 분할로 인해 생성된 3개의 파티션들 모두는 상이한 크기를 가질 수 있다. 또는, 트리플 트리 기반의 분할로 인해 생성된 파티션들 중 2개는 동일한 크기를 갖고, 나머지 하나가 상이한 크기를 가질수도 있다. 일 예로, 코딩 블록이 분할됨에 따라 생성된 파티션들의 너비비 또는 높이비는 분할 방향에 따라 1:n:1, 1:1:n ,n:1:1 또는 m:n:1 로 설정될 수 있다. 여기서, m과 n은 1 또는 1보다 큰 실수로 예컨대, 2와 같은 정수일 수 있다.
트리플 트리 기반의 분할은 쿼드 트리 기반의 분할이 더 이상 수행되지 않는 코딩 블록에 대해서 수행될 수 있다. 트리플 트리 기반으로 분할된 코딩 블록에 대해서는, 쿼드 트리 기반의 분할, 트리플 트리 기반의 분할 또는 바이너리 트리 기반의 분할 중 적어도 하나가 더 이상 수행되지 않도록 설정될 수 있다.
또는, 트리플 트리 기반으로 분할된 코딩 블록에 대해 트리플 트리 기반의 분할 또는 바이너리 트리 기반의 분할을 허용하되, 수평 방향 또는 수직 방향의 분할 중 어느 하나만을 제한적으로 허용할 수도 있다.
예컨대, 트리플 트리 기반으로 분할된 코딩 블록의 위치, 인덱스, 형태, 크기, 이웃 파티션의 추가 분할 형태 등에 따라, 트리플 트리 기반으로 분할된 코딩 블록에 대한 추가 분할 또는 추가 분할 방향을 제한할 수도 있다. 일 예로, 트리플 트리 기반의 분할로 인해 생성된 코딩 블록들 중 크기가 가장 큰 파티션에 대해서는 수평 방향 분할 또는 수직 방향 분할 중 어느 하나가 제한될 수 있다. 구체적으로, 트리플 트리 기반의 분할로 인해 생성된 코딩 블록들 중 크기가 가장 큰 파티션은 상위 뎁스 파티션의 트리플 트리 분할 방향과 동일한 방향의 바이너리 트리 분할 또는 동일한 방향의 트리플 트리 분할 방향이 허용되지 않을 수 있다. 이 경우, 트리플 트리 기반으로 분할된 코딩 블록 중 가장 큰 파티션에 대해서는 바이너리 트리 분할 방향 또는 트리플 트리 분할 방향을 나타내는 정보의 부호화/복호화가 생략될 수 있다.
현재 블록의 크기 또는 형태에 따라 바이너리 트리 또는 트리플 트리 기반의 분할이 제한될 수 있다. 여기서, 현재 블록의 크기는, 현재 블록의 너비, 높이, 너비/높이 중 최소값/최대값, 너비와 높이의 합, 너비와 높이의 곱 또는 현재 블록에 포함된 샘플의 수 중 적어도 하나를 기초로 표현될 수 있다. 일 예로, 현재 블록의 너비 또는 높이 중 적어도 하나가 기 정의된 값보다 큰 경우, 바이너리 트리 또는 트리플 트리 기반의 분할이 허용되지 않을 수 있다. 여기서, 기 정의된 값은, 16, 32, 64 또는 128 등의 정수일 수 있다. 다른 예로, 현재 블록의 너비와 높이 비율이 기 정의된 값보다 큰 경우 또는 기 정의된 값보다 작은 경우 바이너리 트리 또는 트리플 트리 기반의 분할이 허용되지 않을 수 있다. 기 정의된 값이 1인 경우, 현재 블록이 너비와 높이가 동일한 정방형 블록인 경우에 한하여 바이너리 트리 또는 트리플 트리 기반의 분할이 허용될 수 있다.
하위 뎁스의 분할은 상위 뎁스의 분할 형태에 종속적으로 결정될 수도 있다. 일 예로, 2개 이상의 뎁스에서 바이너리 트리 기반의 분할이 허용된 경우, 하위 뎁스에서는 상위 뎁스의 바이너리 트리 분할 형태와 동일한 형태의 바이너리 트리 기반의 분할만이 허용될 수 있다. 예컨대, 상위 뎁스에서 2NxN 형태로 바이너리 트리 기반의 분할이 수행된 경우, 하위 뎁스에서도 2NxN 형태의 바이너리 트리 기반의 분할이 수행될 수 있다. 또는, 상위 뎁스에서 Nx2N 형태로 바이너리 트리 기반의 분할이 수행된 경우, 하위 뎁스에서도 Nx2N 형태의 바이너리 트리 기반의 분할이 허용될 수 있다.
반대로, 하위 뎁스에서, 상위 뎁스의 바이너리 트리 분할 형태와 상이한 형태의 바이너리 트리 기반의 분할만을 허용하는 것도 가능하다.
시퀀스, 슬라이스, 코딩 트리 유닛 또는 코딩 유닛에 대해, 특정 형태의 바이너리 트리 기반의 분할 또는 특정 형태의 트리플 트리 기반의 분할만이 사용되도록 제한할 수도 있다. 일 예로, 코딩 트리 유닛에 대해 2NxN 또는 Nx2N 형태의 바이너리 트리 기반의 분할만이 허용되도록 제한할 수 있다. 허용되는 파티션 형태는 부호화기 또는 복호화기에 기 정의되어 있을 수도 있고, 허용되는 파티션 형태 또는 허용되지 않는 파티션 형태에 관한 정보를 부호화하여 비트스트림을 통해 시그널링할 수도 있다.
도 5는 특정 형태의 바이너리 트리 기반의 분할만이 허용된 예를 나타낸 도면이다. 도 5의 (a)는 Nx2N 형태의 바이너리 트리 기반의 분할만이 허용되도록 제한된 예를 나타내고, 도 5의 (b)는 2NxN 형태의 바이너리 트리 기반의 분할만이 허용되도록 제한된 예를 나타낸다. 상기 쿼드 트리 또는 바이너리 트리 기반의 적응적 분할을 구현하기 위해 쿼드 트리 기반의 분할을 지시하는 정보, 쿼드 트리 기반의 분할이 허용되는 코딩 블록의 크기/깊이에 관한 정보, 바이너리 트리 기반의 분할을 지시하는 정보, 바이너리 트리 기반의 분할이 허용되는 코딩 블록의 크기/깊이에 대한 정보, 바이너리 트리 기반의 분할이 허용되지 않는 코딩 블록의 크기/깊이에 대한 정보 또는 바이너리 트리 기반의 분할이 세로 방향인지 또는 가로 방향인지에 관한 정보 등이 이용될 수 있다.
또한, 코딩 트리 유닛 또는 소정의 코딩 유닛에 대해, 바이너리 트리 분할/트리플 트리 분할이 허용되는 횟수, 바이너리 트리 분할/트리플 트리 분할이 허용되는 깊이 또는 바이너리 트리 분할/트리플 트리 분할이 허용된 뎁스의 개수 등이 획득될 수 있다. 상기 정보는 코딩 트리 유닛 또는 코딩 유닛 단위로 부호화되어, 비트스트림을 통해 복호화기로 전송될 수 있다.
일 예로, 비트스트림을 통해, 바이너리 트리 분할이 허용되는 최대 뎁스를 나타내는 신택스 'max_binary_depth_idx_minus1'가 비트스트림을 통해 부호화/복호화될 수 있다. 이 경우, max_binary_depth_idx_minus1+1이 바이너리 트리 분할이 허용되는 최대 뎁스를 가리킬 수 있다.
도 6에 도시된 예를 살펴보면, 도 6에서는, 뎁스 2인 코딩 유닛 및 뎁스 3인 코딩 유닛에 대해 바이너리 트리 분할이 수행된 것으로 도시되었다. 이에 따라, 코딩 트리 유닛 내 바이너리 트리 분할이 수행된 횟수(2회)를 나타내는 정보, 코딩 트리 유닛 내 바이너리 트리 분할이 허용된 최대 뎁스(뎁스 3)를 나타내는 정보 또는 코딩 트리 유닛 내 바이너리 트리 분할이 허용된 뎁스의 개수(2개, 뎁스 2 및 뎁스 3)를 나타내는 정보 중 적어도 하나가 비트스트림을 통해 부호화/복호화될 수 있다.
다른 예로, 바이너리 트리 분할/트리플 트리 분할이 허용되는 횟수, 바이너리 트리 분할/트리플 트리 분할이 허용되는 깊이 또는 바이너리 트리 분할/트리플 트리 분할이 허용된 뎁스의 개수 중 적어도 하나는 시퀀스, 픽처 또는 슬라이스별로 획득될 수 있다. 일 예로, 상기 정보는, 시퀀스, 픽처 또는 슬라이스 단위로 부호화되어 비트스트림을 통해 전송될 수 있다. 또는, 시퀀스, 픽처 또는 슬라이스 별로 바이너리 트리 분할/트리플 트리 분할 이 허용되는 깊이 또는 바이너리 트리 분할/트리플 트리 분할 이 허용된 뎁스의 개수가 기 정의되어 있을 수도 있다. 이에 따라, 제1 슬라이스 및 제2 슬라이스의, 바이너리 트리/트리플 트리 분할 횟수, 바이너리 트리/트리플 트리 분할이 허용되는 최대 뎁스 또는 바이너리 트리/트리플 트리 분할이 허용되는 뎁스의 개수 중 적어도 하나가 상이할 수 있다. 일 예로, 제1 슬라이스에서는, 하나의 뎁스에서만 바이너리 트리 분할이 허용되는 반면, 제2 슬라이스에서는, 두개의 뎁스에서 바이너리 트리 분할이 허용될 수 있다.
또 다른 일 예로, 슬라이스 또는 픽쳐의 시간레벨 식별자(TemporalID)에 따라 바이너리 트리/트리플 트리 분할이 허용되는 횟수, 바이너리 트리/트리플 트리 분할이 허용되는 깊이 또는 바이너리 트리/트리플 트리 분할이 허용되는 뎁스의 개수 중 적어도 하나를 상이하게 설정할 수도 있다. 여기서, 시간레벨 식별자(TemporalID)는, 시점(view), 공간(spatial), 시간(temporal) 또는 화질(quality) 중 적어도 하나 이상의 스케일러빌리티(Scalability)를 갖는 영상의 복수개의 레이어 각각을 식별하기 위한 것이다.
도 3에 도시된 바와 같이, 분할 깊이(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로 제한될 수 있다. 시퀀스 또는 픽처 내 코딩 블록의 크기를 나타내는 정보가 시퀀스 헤더 또는 픽처 헤더를 통해 시그널링 될 수 있다.
쿼드 트리, 바이너리 트리 및 트리플 트리에 기반한 분할 결과, 코딩 유닛은, 정방형 또는 임의 크기의 직사각형을 띨 수 있다.
코딩 블록은, 스킵 모드, 화면 내 예측, 화면 간 예측 또는 스킵 방법 중 적어도 하나를 이용하여 부호화/복호화될 수 있다.
다른 예로, 코딩 블록의 분할을 통해 코딩 블록과 동일한 크기 또는 코딩 블록보다 작은 단위로 인트라 예측 또는 인터 예측을 수행할 수 있다. 이를 위해, 코딩 블록이 결정되면, 코딩 블록의 예측 분할을 통해 예측 블록(Prediction Block)을 결정할 수 있다. 코딩 블록의 예측 분할은 코딩 블록의 분할 형태를 나타내는 파티션 모드(Part_mode)에 의해 수행될 수 있다. 예측 블록의 크기 또는 형태는 코딩 블록의 파티션 모드에 따라 결정될 수 있다. 일 예로, 파티션 모드에 따라 결정되는 예측 블록의 크기는 코딩 블록의 크기와 동일하거나 작은 값을 가질 수 있다.
도 7은 코딩 블록이 화면 간 예측으로 부호화되었을 때, 코딩 블록에 적용될 수 있는 파티션 모드를 예시한 도면이다.
코딩 블록이 화면 간 예측으로 부호화된 경우, 코딩 블록에는 도 7에 도시된 예에서와 같이, 8개의 파티션 모드 중 어느 하나가 적용될 수 있다.
코딩 블록이 화면 내 예측으로 부호화된 경우, 코딩 블록에는 파티션 모드 PART_2Nx2N 또는 PART_NxN 이 적용될 수 있다.
PART_NxN은 코딩 블록이 최소 크기를 갖는 경우 적용될 수 있다. 여기서, 코딩 블록의 최소 크기는 부호화기 및 복호화기에서 기 정의된 것일 수 있다. 또는, 코딩 블록의 최소 크기에 관한 정보는 비트스트림을 통해 시그널링될 수도 있다. 일 예로, 코딩 블록의 최소 크기는 슬라이스 헤더를 통해 시그널링되고, 이에 따라, 슬라이스별로 코딩 블록의 최소 크기가 정의될 수 있다.
일반적으로, 예측 블록의 크기는 64x64 부터 4x4의 크기를 가질 수 있다. 단, 코딩 블록이 화면 간 예측으로 부호화된 경우, 움직임 보상을 수행할 때, 메모리 대역폭(memory bandwidth)을 줄이기 위해, 예측 블록이 4x4 크기를 갖지 않도록 할 수 있다.
도 8은 본 발명이 적용되는 일실시예로서, 영상 부호화기/복호화기에 기-정의된 인트라 예측 모드의 종류를 도시한 것이다.
영상 부호화기/복호화기는 기-정의된 인트라 예측 모드 중 어느 하나를 이용하여 인트라 예측을 수행할 수 있다. 인트라 예측을 위한 기-정의된 인트라 예측 모드는 비방향성 예측 모드(예를 들어, Planar mode, DC mode) 및 33개의 방향성 예측 모드(directional prediction mode)로 구성될 수 있다.
또는, 인트라 예측의 정확도를 높이기 위해 33개의 방향성 예측 모드보다 더 많은 개수의 방향성 예측 모드가 이용될 수 있다. 즉, 방향성 예측 모드의 각도(angle)를 더 세분화하여 M개의 확장된 방향성 예측 모드를 정의할 수도 있고(M>33), 기-정의된 33개의 방향성 예측 모드 중 적어도 하나를 이용하여 소정의 각도를 가진 방향성 예측 모드를 유도하여 사용할 수도 있다.
구체적으로, 도 8에 도시된 35개의 인트라 예측 모드 보다 더 많은 수의 인트라 예측 모드를 이용할 수도 있다. 도 8에 도시된 35개의 인트라 예측 모드 보다 더 많은 수의 인트라 예측 모드를 이용하는 것을, 확장된 인트라 예측 모드라 호칭할 수 있다.
도 9는 확장된 인트라 예측 모드의 일예이며, 확장된 인트라 예측 모드는 2개의 비방향성 예측 모드와 65개의 확장된 방향성 예측 모드로 구성될 수 있다. 확장된 인트라 예측 모드는 휘도 성분과 색차 성분에 대해서 동일하게 사용할 수도 있고, 성분 별로 서로 상이한 개수의 인트라 예측 모드를 사용할 수도 있다. 예를 들어, 휘도 성분에서는 67개의 확장된 인트라 예측 모드를 사용하고, 색차 성분에서는 35개의 인트라 예측 모드를 사용할 수도 있다.
또는, 색차 포맷(format)에 따라 서로 다른 개수의 인트라 예측 모드를 사용하여 인트라 예측을 수행할 수도 있다. 예를 들어, 4:2:0 format인 경우에는 휘도 성분에서는 67개의 인트라 예측 모드를 이용하여 인트라 예측을 수행하고 색차 성분에서는 35개의 인트라 예측 모드를 사용할 수 있고, 4:4:4 format인 경우에는 휘도 성분과 색차 성분 모두에서 67개의 인트라 예측 모드를 이용하여 인트라 예측을 사용할 수도 있다.
또는, 블록의 크기 및/또는 형태에 따라 서로 다른 개수의 인트라 예측 모드를 사용하여 인트라 예측을 수행할 수도 있다. 즉, PU 또는 CU의 크기 및/또는 형태에 따라 35개의 인트라 예측 모드 또는 67개의 인트라 예측 모드를 이용하여 인트라 예측을 수행할 수도 있다. 예를 들어, CU 또는 PU의 크기가 64x64보다 작거나 비대칭 파티션(asymmetric partition)인 경우에는 35개의 인트라 예측 모드를 이용하여 인트라 예측을 수행할 수 있고, CU 또는 PU의 크기가 64x64보다 같거나 큰 경우에는 67개의 인트라 예측 모드를 이용하여 인트라 예측을 수행할 수도 있다. Intra_2Nx2N에서는 65개의 방향성 인트라 예측 모드를 허용할 수도 있으며, Intra_NxN에서는 35개의 방향성 인트라 예측 모드만 허용할 수도 있다.
시퀀스, 픽처 또는 슬라이스 별로, 확장된 인트라 예측 모드를 적용하는 블록의 크기를 상이하게 설정할 수도 있다. 일 예로, 제1 슬라이스에서는, 64x64 보다 큰 블록(예컨대, CU 또는 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의 개수)도, 색차 성분, 색차 포맷, 블록의 크기 또는 형태 중 적어도 하나에 따라 결정될 수도 있다. 또한, 도 8에 도시된 것 보다 더 많은 수의 인트라 예측 모드를 이용하는 것도 가능하다. 예컨대, 도 8에 도시된 방향성 예측 모드를 더욱 세분화하여, 129개의 방향성 예측 모드와 2개의 비방향성 예측 모드를 사용하는 것도 가능하다. 도 8에 도시된 것보다 더 많은 수의 인트라 예측 모드를 사용할 것인지 여부는 상술한 예에서와 같이, 색차 성분, 색차 성분, 블록의 크기 또는 형태 중 적어도 하나를 고려하여 결정될 수 있다.
후술되는 도면을 참조하여, 부호화/복호화 대상 블록의 인트라 예측 모드를 결정하는 방법 및 결정된 인트라 예측 모드를 이용하여, 인트라 예측을 수행하는 방법에 대해 살펴보기로 한다.
도 10은 본 발명이 적용되는 일실시예로서, 인트라 예측 방법을 개략적으로 도시한 순서도이다.
도 10을 참조하면, 현재 블록의 인트라 예측 모드를 결정할 수 있다(S1000).
구체적으로, 현재 블록의 인트라 예측 모드는 후보 리스트와 인덱스를 기반으로 유도될 수 있다. 여기서, 후보 리스트는 복수의 후보자를 포함하며, 복수의 후보자는 현재 블록에 인접한 주변 블록의 인트라 예측 모드에 기반하여 결정될 수 있다. 주변 블록은 현재 블록의 상단, 하단, 좌측, 우측 또는 코너에 위치한 블록 중 적어도 하나를 포함할 수 있다. 상기 인덱스는 후보 리스트에 속한 복수의 후보자 중 어느 하나를 특정할 수 있다. 상기 인덱스에 의해 특정된 후보자는 현재 블록의 인트라 예측 모드로 설정될 수 있다.
주변 블록이 인트라 예측에 사용한 인트라 예측 모드가 후보자로 설정될 수 있다. 일 예로, 현재 블록의 좌측 블록, 상단 블록, 좌측 하단 코너 인접 블록, 우측 상단 코너 인접 블록 및 좌측 상단 코너 인접 블록의 인트라 예측 모드에 기초하여 후보자를 유도할 수 있다. 만약, 주변 블록이 인터 예측으로 부호화되었다면, 주변 블록의 콜로케이티드 블록(Collocated block)의 인트라 예측 모드를 이용하여 현재 블록의 후보자를 유도할 수 있다.
또한, 주변 블록의 인트라 예측 모드와 유사한 방향성을 가진 인트라 예측 모드가 후보자로 설정될 수도 있다. 여기서, 유사한 방향성을 가진 인트라 예측 모드는 주변 블록의 인트라 예측 모드에 소정의 상수값을 더하거나 뺀 값으로 결정될 수 있다. 소정의 상수값은 1, 2 또는 그 이상의 정수일 수 있고, 소정의 상수값은 사용 가능한 인트라 예측 모드의 개수에 따라 적응적으로 결정될 수 있다. 일 예로, 사용 가능한 인트라 예측 모드의 개수가 35개인 경우, 소정의 상수값은 1로 설정되고, 사용 가능한 인트라 예측 모드의 개수가 67개인 경우 소정의 상수값은 2로 설정될 수 있다. 나아가, 사용 가능한 인트라 예측 모드의 개수가 131개인 경우, 소정의 상수값은 4로 설정될 수 있다.
상기 후보 리스트는 디폴트 모드를 더 포함할 수도 있다. 디폴트 모드는 플래너 모드, DC 모드, 수직 모드, 수평 모드, 우상단 대각 방향 모드, 좌상단 대각 방향 모드 중 적어도 하나를 포함할 수 있다. 디폴트 모드는 현재 블록의 후보 리스트에 포함 가능한 후보자의 최대 개수를 고려하여 적응적으로 추가될 수 있다.
후보 리스트에 포함 가능한 후보자의 최대 개수는 3개, 4개, 5개, 6개, 7개 또는 그 이상일 수 있다. 후보 리스트에 포함 가능한 후보자의 최대 개수는 영상 부호화기/복호화기에 기-설정된 고정된 값일 수 있고, 현재 블록의 속성에 기초하여 가변적으로 결정될 수도 있다. 속성은 블록의 위치/크기/형태, 블록이 사용 가능한 인트라 예측 모드의 개수/종류, 색차 속성, 색차 포맷 등을 의미할 수 있다. 또는, 후보 리스트에 포함 가능한 후보자의 최대 개수를 나타내는 정보가 별도로 시그날링될 수도 있으며, 이를 이용하여 후보 리스트에 포함 가능한 후보자의 최대 개수가 가변적으로 결정될 수도 있다. 상기 후보자의 최대 개수를 나타내는 정보는 시퀀스 레벨, 픽쳐 레벨, 슬라이스 레벨 또는 블록 레벨 중 적어도 하나에서 시그날링될 수 있다.
후보 리스트에 포함되는 후보자는 기 정의된 순서로 정렬될 수 있다. 일 예로, 좌측 블록, 상단 블록, 좌측 하단 블록, 우측 상단 블록, 좌측 상단 블록의 순서로 후보자가 후보 리스트에 배열될 수 있다. 또는, 현재 블록의 크기 또는 형태 등에 따라, 후보자의 배열 순서가 가변적으로 결정될 수도 있다. 일 예로, 현재 블록이 높이가 너비보다 큰 비 정방형 블록인 경우, 상단 블록의 인트라 예측 모드가 좌측 블록의 인트라 예측 모드보다 더 높은 우선순위를 갖고 배열될 수 있다.
확장된 인트라 예측 모드와 기-정의된 35개의 인트라 예측 모드가 선택적으로 사용되는 경우, 주변 블록의 인트라 예측 모드를 확장된 인트라 예측 모드에 대응하는 인덱스로 변환하거나, 또는 35개의 인트라 예측 모드에 대응하는 인덱스로 변환하여 후보자를 유도할 수 있다. 인덱스의 변환을 위해 기-정의된 테이블이 이용될 수도 있고, 소정의 값에 기반한 스케일링 연산이 이용될 수도 있다. 여기서, 기-정의된 테이블은 서로 상이한 인트라 예측 모드 그룹 (예를 들어, 확장된 인트라 예측 모드와 35개의 인트라 예측 모드) 간의 매핑 관계를 정의한 것일 수 있다.
예를 들어, 좌측 주변 블록이 35개의 인트라 예측 모드를 사용하고, 좌측 주변 블록의 인트라 예측 모드가 10(horizontal mode)인 경우, 이를 확장된 인트라 예측 모드에서 horizontal mode에 대응하는 인덱스 16으로 변환할 수 있다.
또는, 상단 주변 블록이 확장된 인트라 예측 모드를 사용하고, 상단 주변 블록의 인트라 예측 모드 인덱스가 50(vertical mode)인 경우, 이를 35개의 인트라 예측 모드에서 vertical mode에 대응하는 인덱스 26으로 변환할 수 있다.
상술한 인트라 예측 모드 결정 방법에 기반하여 휘도 성분과 색차 성분 각각에 대해서 상호 독립적으로 인트라 예측 모드가 유도될 수도 있고, 색차 성분은 휘도 성분의 인트라 예측 모드에 종속성으로 유도될 수도 있다.
구체적으로, 색차 성분의 인트라 예측 모드는 다음 표 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는 휘도 성분의 인트라 예측 모드를 나타낸다.
후보 리스트가 결정되면, 현재 블록의 인트라 예측 모드와 동일한 후보자가 후보 리스트에 포함되어 있는지 여부를 나타내는 정보를 복호화할 수 있다. 상기 정보가 현재 블록의 인트라 예측 모드와 동일한 후보자가 후보 리스트에 포함되어 있음을 나타내는 경우, 후보자 중 어느 하나를 나타내는 인덱스 정보(예컨대, MPM_index)를 복호화할 수 있다. 현재 블록의 인트라 예측 모드는 상기 인덱스 정보가 가리키는 후보자의 인트라 예측 모드와 동일하게 설정될 수 있다.
반면, 상기 정보가 현재 블록의 인트라 예측 모드와 동일한 후보자가 후보 리스트에 포함되어 있지 않음을 나타내는 경우, 후보자를 제외한 잔여 인트라 예측 모드들 중 어느 하나를 특정하는 잔여 인트라 예측 모드 정보(예컨대, rem_intra_mode)가 복호화될 수 있다. 현재 블록의 인트라 예측 모드는 상기 잔여 인트라 예측 모드 정보가 가리키는 인트라 예측 모드에 기초하여 결정될 수 있다. 일 예로, 현재 인트라 예측 모드는 상기 잔여 인트라 예측 모드가 지시하는 인트라 예측 모드와 후보자를 비교하여 결정될 수 있다. 예컨대, 후보자의 인트라 예측 모드가 잔여 인트라 에측 모드가 지시하는 인트라 예측 모드보다 작은 경우, 잔여 인트라 예측 모드에 1을 더하여 현재 블록의 인트라 예측 모드를 유도할 수 있다.
도 10을 참조하면, 현재 블록의 인트라 예측을 위한 참조 샘플을 유도할 수 있다(S1010).
구체적으로, 현재 블록의 주변 샘플에 기반하여 인트라 예측을 위한 참조 샘플을 유도할 수 있다. 주변 샘플은 상술한 주변 블록의 복원 샘플을 의미할 수 있고, 이는 인루프 필터가 적용되기 이전의 복원 샘플 또는 인루프 필터가 적용된 이후의 복원 샘플일 수 있다.
현재 블록 이전에 복원된 주변 샘플이 참조 샘플로 이용될 수도 있고, 소정의 인트라 필터를 기반으로 필터링된 주변 샘플이 참조 샘플로 이용될 수도 있다. 인트라 필터를 이용하여 주변 샘플을 필터링하는 것을 참조 샘플 스무딩(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) 중 적어도 하나에 기초하여 인트라 필터가 결정될 수도 있다.
현재 블록의 인트라 예측은 복수 참조 샘플 라인을 이용하여 수행될 수도 있다. 일 예로, 2개 이상의 참조 샘플 라인을 이용하여 수행될 수 있다.
복수의 참조 샘플 라인을 이용하여 인트라 예측을 수행할 것인지 여부는 현재 블록의 크기, 형태 또는 인트라 예측 모드 등에 따라 적응적으로 결정될 수 있다. 일 예로, 현재 블록의 인트라 예측 모드가 비 방향성 인트라 예측 모드 또는 특정 방향의 인트라 예측 모드인 경우, 복수 참조 샘플 라인을 이용하여 인트라 예측을 수행하는 것이 제한될 수 있다. 여기서, 특정 방향은 수직 방향, 수평 방향 또는 대각 방향 등을 포함할 수 있다.
도 10을 참조하면, 현재 블록의 인트라 예측 모드와 참조 샘플을 이용하여 인트라 예측을 수행할 수 있다(S1020).
즉, S1000에서 결정된 인트라 예측 모드와 S1010에서 유도된 참조 샘플을 이용하여 현재 블록의 예측 샘플을 획득할 수 있다. 복수 참조 샘플 라인을 이용하여 인트라 예측이 수행되는 경우, 상이한 참조 샘플 라인에 속한 참조 샘플들의 가중합을 기초로 예측 샘플을 획득할 수 있다. 일 예로, 제1 참조 샘플 라인에 속하는 제1 참조 샘플과 제2 참조 샘플 라인에 속하는 제2 참조 샘플의 가중합을 기초로 예측 샘플을 유도할 수 있다. 이때, 제1 참조 샘플과 제2 참조 샘플에 적용되는 가중치는 동일한 값을 가질 수도 있고 예측 대상 샘플과의 거리에 따라 상이한 값을 가질 수도 있다. 일 예로, 제1 참조 샘플 및 제2 참조 샘플 중 예측 대상 샘플과의 거리가 가까운 것에 더 높은 가중치가 부여될 수 있다.
다만, 인트라 예측의 경우 주변 블록의 경계 샘플을 이용하기 때문에 예측 영상의 화질이 떨어지는 문제가 발생할 수 있다. 따라서, 상술한 예측 과정을 통해 생성된 예측 샘플에 대한 보정 과정을 더 수반할 수 있으며, 이하 도 11을 참조하여 자세히 살펴 보기로 한다. 다만, 후술할 보정 과정은 인트라 예측 샘플에 대해서만 적용되는 것으로 한정되는 것은 아니며, 인터 예측 샘플 또는 복원 샘플에도 적용될 수 있음은 물론이다.
도 11은 본 발명이 적용되는 일실시예로서, 주변 샘플들의 차분 정보에 기반하여 현재 블록의 예측 샘플을 보정하는 방법을 도시한 것이다.
현재 블록에 대한 복수의 주변 샘플들의 차분 정보에 기반하여 현재 블록의 예측 샘플을 보정할 수 있다. 상기 보정은 현재 블록에 속한 모든 예측 샘플에 대해서 수행될 수도 있고, 소정의 일부 영역에 속한 예측 샘플에 대해서만 수행될 수도 있다. 일부 영역은 하나의 행/열 또는 복수의 행/열일 수 있고, 이는 영상 부호화기/복호화기에서 보정을 위해 기-설정된 영역일 수도 있다. 일 예로, 현재 블록의 경계에 위치한 하나의 행/열 또는 현재 블록의 경계로부터 복수의 행/열에 보정이 수행될 수 있다. 또는, 일부 영역은 현재 블록의 크기/형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여 가변적으로 결정될 수도 있다.
주변 샘플들은 현재 블록의 상단, 좌측, 좌상단 코너에 위치한 주변 블록 중 적어도 하나에 속할 수 있다. 보정을 위해 이용되는 주변 샘플들의 개수는 2개, 3개, 4개 또는 그 이상일 수 있다. 주변 샘플들의 위치는 현재 블록 내 보정 대상인 예측 샘플의 위치에 따라 가변적으로 결정될 수 있다. 또는, 주변 샘플들 중 일부는 보정 대상인 예측 샘플의 위치와 관계없이 고정된 위치를 가지고, 나머지는 보정 대상인 예측 샘플의 위치에 따른 가변적인 위치를 가질 수도 있다.
주변 샘플들의 차분 정보는 주변 샘플들 간의 차분 샘플을 의미할 수도 있고, 상기 차분 샘플을 소정의 상수값(예를 들어, 1, 2, 3 등)으로 스케일링한 값을 의미할 수도 있다. 여기서, 소정의 상수값은 보정 대상인 예측 샘플의 위치, 보정 대상인 예측 샘플이 속한 열 또는 행의 위치, 열 또는 행 내에서 예측 샘플의 위치 등을 고려하여 결정될 수 있다.
예를 들어, 현재 블록의 인트라 예측 모드가 수직 모드인 경우, 현재 블록의 좌측 경계에 인접한 주변 샘플 p(-1,y)과 좌상단 주변 샘플 p(-1,-1) 간의 차분 샘플을 이용하여 다음 수학식 1과 같이 최종 예측 샘플을 획득할 수 있다.
Figure PCTKR2018010414-appb-M000001
예를 들어, 현재 블록의 인트라 예측 모드가 수평 모드인 경우, 현재 블록의 상단 경계에 인접한 주변 샘플 p(x,-1)과 좌상단 주변 샘플 p(-1,-1) 간의 차분 샘플을 이용하여 다음 수학식 2와 같이 최종 예측 샘플을 획득할 수 있다.
Figure PCTKR2018010414-appb-M000002
예를 들어, 현재 블록의 인트라 예측 모드가 수직 모드인 경우, 현재 블록의 좌측 경계에 인접한 주변 샘플 p(-1,y)과 좌상단 주변 샘플 p(-1,-1) 간의 차분 샘플을 이용하여 최종 예측 샘플을 획득할 수 있다. 이때, 상기 차분 샘플을 예측 샘플에 가산할 수도 있고, 상기 차분 샘플을 소정의 상수값으로 스케일링한 후, 이를 예측 샘플에 가산할 수도 있다. 스케일링에 이용되는 소정의 상수값은 열 및/또는 행에 따라 상이하게 결정될 수 있다. 일예로, 다음 수학식 3과 수학식 4와 같이 예측 샘플을 보정할 수 있다.
Figure PCTKR2018010414-appb-M000003
Figure PCTKR2018010414-appb-M000004
예를 들어, 현재 블록의 인트라 예측 모드가 수평 모드인 경우, 현재 블록의 상단 경계에 인접한 주변 샘플 p(x,-1)과 좌상단 주변 샘플 p(-1,-1) 간의 차분 샘플을 이용하여 최종 예측 샘플을 획득할 수 있으며, 이는 수직 모드에서 상술한 바와 같다. 일예로, 다음 수학식 5와 수학식 6과 같이 예측 샘플을 보정할 수 있다.
Figure PCTKR2018010414-appb-M000005
Figure PCTKR2018010414-appb-M000006
현재 블록의 인트라 예측 모드가 방향성 예측 모드인 경우, 현재 블록의 인트라 예측은, 방향성 예측 모드의 방향성에 기초하여 수행될 수 있다. 일 예로, 표 3은, 도 8에 도시된 방향성 인트라 예측 모드인 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)을 구성할 수 있다.
도 12 및 도 13은 참조 샘플들이 일렬로 재배열된 일차원 레퍼런스 샘플 그룹을 나타낸 도면이다.
참조 샘플들을 수직 방향으로 재배열할 것인지 또는 수평 방향으로 재배열할 것인지는, 인트라 예측 모드의 방향성에 따라 결정될 수 있다. 일 예로, 인트라 예측 모드 인덱스가 11 내지 18 사이인 경우, 도 12에 도시된 예에서와 같이, 현재 블록의 상단 참조 샘플들을 반시계 방향으로 회전시켜, 좌측 참조 샘플들 및 상단 참조 샘플들이 수직 방향으로 배열된 일차원 레퍼런스 샘플 그룹을 생성할 수 있다.
반면, 인트라 예측 모드 인덱스가 19내지 25 사이인 경우, 도 13에 도시된 예에서와 같이, 현재 블록의 좌측 참조 샘플들을 좌측 참조 샘플들을 시계 방향으로 회전시켜, 좌측 참조 샘플들 및 상단 참조 샘플들이 수평 방향으로 배열된 일차원 레퍼런스 샘플 그룹을 생성할 수 있다.
현재 블록의 인트라 방향 파라미터가 음수가 아닌 경우, 현재 블록에 대한 인트라 예측은 좌측 참조 샘플들 또는 상단 참조 샘플들만을 이용하여 수행될 수 있다. 이에 따라, 인트라 방향 파라미터가 음수가 아닌 인트라 예측 모드들에 대해서는 좌측 참조 샘플 또는 상단 참조 샘플들만을 이용하여, 일차원 레퍼런스 샘플 그룹을 생성할 수 있다.
인트라 방향 파라미터에 기초하여, 예측 대상 샘플을 예측하는데 이용되는 적어도 하나의 참조 샘플을 특정하기 위한 참조 샘플 결정 인덱스 iIdx를 유도할 수 있다. 또한, 인트라 방향 파라미터를 기초로 각 참조 샘플에 적용되는 가중치를 결정하는데 이용되는 가중치 관련 파라미터 ifact를 유도할 수 있다. 일 예로, 하기 수학식 7 및 8은 참조 샘플 결정 인덱스 및 가중치 관련 파라미터를 유도하는 예를 나타낸 것이다.
Figure PCTKR2018010414-appb-M000007
Figure PCTKR2018010414-appb-I000001
수학식 7에 나타난 바와 같이, iIdx와 ifact는 방향성 인트라 예측 모드의 기울기에 따라 가변적으로 결정된다. 이때, iIdx에 의해 특정되는 참조 샘플은 정수 펠(integer pel)에 해당할 수 있다.
참조 샘플 결정 인덱스에 기초하여, 예측 대상 샘플 별로 적어도 하나 이상의 참조 샘플을 특정할 수 있다. 일 예로, 참조 샘플 결정 인덱스에 기초하여, 현재 블록 내 예측 대상 샘플을 예측하기 위한 일차원 레퍼런스 샘플 그룹 내 참조 샘플의 위치를 특정할 수 있다. 특정된 위치의 참조 샘플을 기초로, 예측 대상 샘플에 대한 예측 영상(즉, 예측 샘플)을 생성할 수 있다.
현재 블록의 인트라 예측 모드를 고려하였을 때, 예측 대상 샘플이 하나의 참조 샘플만으로 예측이 가능한 경우, 현재 블록의 인트라 예측 모드에 의해 특정되는 참조 샘플에 기초하여 예측 대상 샘플에 대한 예측 영상을 생성할 수 있다.
일 예로, 인트라 예측 모드의 각도 또는 인트라 예측 모드의 기울기에 따른 가상의 각도 선(angular line)이 일차원 레퍼런스 샘플 그룹 내 정수 펠(integer pel)(즉, 정수 위치의 참조 샘플)을 지나는 경우, 정수 펠 위치의 참조 샘플을 복사하거나, 정수 펠 위치의 참조 샘플과 예측 대상 샘플 사이의 위치를 고려하여, 예측 대상 샘플에 대한 예측 영상을 생성할 수 있다. 일 예로, 하기 수학식 8은 현재 블록의 인트라 예측 모드에 의해 특정되는 일차원 레퍼런스 샘플 그룹 내 참조 샘플 P_ref_1D(x+iIdx+1)을 복사하여, 예측 대상 샘플에 대한 예측 영상 P(x, y)를 생성하는 예를 나타낸 것이다.
Figure PCTKR2018010414-appb-M000008
현재 블록의 인트라 예측 모드를 고려하였을 때, 예측 대상 샘플이 하나의 참조 샘플만으로 예측되지 않는 것으로 판단되는 경우, 복수의 참조 샘플들을 이용하여, 예측 대상 샘플에 대한 예측을 수행할 수 있다. 구체적으로, 현재 블록의 인트라 예측 모드에 따라, 소정 위치의 참조 샘플 및 소정 위치의 참조 샘플에 이웃하는 이웃 참조 샘플들을 선형 보간하거나 탭 필터(Tap filter) 기반의 보간을 수행하여, 예측 대상 샘플에 대한 예측을 수행할 수 있다. 보간 필터의 탭수는 2 이상의 자연수일 수 있다. 구체적으로, 보간 대상이 되는 참조 샘플의 개수에 따라, 탭 필터(Tap filter)의 탭수가 2, 3, 4, 5, 6 또는 그 이상의 정수일 수도 있다.
일 예로, 인트라 예측 모드의 각도 또는 인트라 예측 모드의 기울기에 따른 가상의 각도 선(angular line)이 일차원 레퍼펀스 샘플 그룹 내 정수 펠(integer pel)(즉, 정수 위치의 참조 샘플)를 지나지 않는 경우, 해당 각도 선상에 놓인 참조 샘플 및 상기 참조 샘플의 좌/우 또는 상/하에 인접한 참조 샘플을 보간하여, 예측 대상 샘플에 대한 예측 영상을 생성할 수 있다. 일 예로, 하기 수학식 9는 둘 이상의 참조 샘플을 보간하여, 예측 대상 샘플에 대한 예측 샘플 P(x, y)를 생성하는 예를 나타낸 것이다.
Figure PCTKR2018010414-appb-M000009
보간 필터의 계수는, 가중치 관련 파라미터 ifact에 기초하여 결정될 수 있다. 일 예로, 보간 필터의 계수는, 각도 선(angular line) 상에 위치한 소수 펠(fractional pel)과 정수 펠(즉, 각 참조 샘플들의 정수 위치) 사이의 거리에 기초하여 결정될 수 있다.
하기 수학식 10은 탭 필터의 탭수가 4인 경우를 예시한 것이다.
Figure PCTKR2018010414-appb-M000010
멀티 탭 필터를 사용할 때, 좌측 참조 샘플 또는 상단 참조 샘플에 해당하지 않는 위치의 샘플은, 해당 위치에서 가장 인접한 참조 샘플로 대체될 수 있다. 일 예로, 상기 수학식 9에서, P_ref_1D(x+iIdx-1) 위치의 샘플이 상단 참조 샘플에 해당하지 않는 경우, 해당 샘플은 P_ref_1D(x+idx) 위치의 참조 샘플로 대체될 수 있다. 또는, P_ref_1D(x+iIdx+2) 위치의 샘플이 상단 참조 샘플에 해당하지 않는 경우, 해당 샘플은 P_ref_1D(x+iIdx+1) 위치의 참조 샘플로 대체될 수 있다.
멀티 탭 필터는 수평 또는 수직 방향을 따라 일렬로 놓인 복수의 참조 샘플에 적용될 수 있다. 또는, 멀티 탭 필터는 사각형 등 소정의 다각 형태에 적용될 수도 있다. 멀티 탭 필터가 적용되는 형태는 현재 블록의 크기, 형태 또는 인트라 예측 모드에 따라 가변적으로 결정될 수 있다.
수학식 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 예측 영상 및 제2 예측 영상을 가중 예측함으로써 수행될 수 있다.
여기서, 제1 예측 영상은, 예측 대상 샘플의 수평 방향에 놓인 현재 블록에 인접한 참조 샘플들에 기초하여 생성될 수 있다. 일 예로, 제1 예측 영상은 예측 대상 샘플의 수평 방향에 놓인 참조 샘플들의 가중합을 기초로 생성될 수 있다. 이때, 각 참조 샘플들에 적용되는 가중치는 예측 대상 샘플과의 거리 또는 현재 블록의 크기 등을 고려하여 결정될 수 있다. 수평 방향에 위치한 샘플들은, 예측 대상 샘플과 동일한 수평선상에 놓인 좌측 참조 샘플(즉, 예측 대상 샘플과 동일한 y 좌표를 갖는 좌측 참조 샘플) 및 우측 참조 샘플(즉, 예측 대상 샘플과 동일한 y 좌표를 갖는 우측 참조 샘플)을 포함할 수 있다. 이때, 우측 참조 샘플은, 현재 블록의 상단 참조 샘플로부터 유도될 수 있다. 일 예로, 우측 참조 샘플은 동일한 수직선상에 놓인 상단 참조 샘플의 값을 복사하여 유도되거나, 복수 상단 참조 샘플들의 가중합 또는 평균값 등으로 유도될 수 있다. 여기서, 우측 참조 샘플과 동일한 수직선상에 놓인 상단 참조 샘플은, 현재 블록의 우측 상단 코너에 인접한 참조 샘플(즉, 우측 참조 샘플과 동일한 x 좌표를 갖는 상단 참조 샘플)을 포함할 수 있다. 또는, 현재 블록의 형태, 크기 또는 예측 대상 샘플의 위치에 따라, 우측 참조 샘플을 유도하는데 이용되는 상단 참조 샘플의 위치가 상이하게 결정될 수도 있다.
제2 예측 영상은, 예측 대상 샘플의 수직 방향에 놓인 현재 블록에 인접한 참조 샘플들에 기초하여 생성될 수 있다. 일 예로, 제2 예측 영상은 예측 대상 샘플의 수직 방향에 놓인 참조 샘플들의 가중합을 기초로 생성될 수 있다. 이때, 각 참조 샘플들에 적용되는 가중치는 예측 대상 샘플과의 거리 또는 현재 블록의 크기 등을 고려하여 결정될 수 있다. 수직 방향에 위치한 샘플들은, 예측 대상 샘플과 동일한 수직선상에 놓인 상단 참조 샘플(즉, 예측 대상 샘플과 동일한 x 좌표를 갖는 상단 참조 샘플) 및 하단 참조 샘플(즉, 예측 대상 샘플과 동일한 x 좌표를 갖는 하단 참조 샘플)을 포함할 수 있다. 이때, 하단 참조 샘플은, 현재 블록의 좌측 참조 샘플로부터 유도될 수 있다. 일 예로, 하단 참조 샘플은 동일한 수평 선상에 놓인 좌측 참조 샘플의 값을 복사하여 유도되거나, 복수 좌측 참조 샘플들의 가중합 또는 평균값 등으로 유도될 수 있다. 여기서, 하단 참조 샘플과 동일한 수평선상에 놓인 좌측 참조 샘플은, 현재 블록의 좌측 하단 코너에 인접한 참조 샘플(즉, 하단 참조 샘플과 동일한 y 좌표를 갖는 좌측 참조 샘플)을 포함할 수 있다. 또는, 현재 블록의 크기, 형태 또는 예측 대상 샘플의 위치에 따라, 하단 참조 샘플을 유도하는데 이용되는 상단 참조 샘플의 위치가 상이하게 결정될 수도 있다
또는, 좌측 참조 샘플 및 상단 참조 샘플 모두를 이용하여 우측 참조 샘플 또는 하단 참조 샘플 중 적어도 하나를 유도할 수도 있다.
일 예로, 현재 블록의 상단 참조 샘플 및 좌측 참조 샘플의 가중합 또는 평균을 우측 참조 샘플 또는 하단 참조 샘플 중 적어도 하나의 값으로 결정할 수 있다.
또는, 좌측 하단 참조 샘플 및 우측 상단 참조 샘플을 이용하여 현재 블록의 우측 하단 코너에 인접하는 우측 하단 참조 샘플을 유도한 뒤, 유도된 우측 하단 참조 샘플을 이용하여 우측 참조 샘플 및 하단 참조 샘플을 유도할 수도 있다. 우측 하단 참조 샘플은, 현재 블록의 우측 상단 참조 샘플 및 좌측 참조 샘플의 가중합 또는 평균을 기초로 유도될 수 있다. 이때, 우측 상단 참조 샘플 및 좌측 참조 샘플에 적용되는 가중치는 동일한 값을 가질 수도 있고, 현재 블록의 너비/높이에 기초하여 결정될 수도 있다.
우측 하단 참조 샘플이 결정되면, 우측 하단 참조 샘플과 우측 상단 참조 샘플을 보간(interpolation)하여, 우측 참조 샘플을 유도하고, 우측 하단 참조 샘플과 좌측 하단 참조 샘플을 보간하여, 하단 참조 샘플을 유도할 수 있다. 이때, 보간 필터의 계수는, 현재 블록의 크기, 현재 블록의 형태, 우측 하단 참조 샘플 까지의 거리, 우측 상단 참조 샘플 까지의 거리 또는 좌측 하단 참조 샘플 까지의 거리 등에 기초하여 결정될 수 있다.
우측 참조 샘플 또는 좌측 참조 샘플을 유도하기 위해, 고정 위치의 참조 샘플을 이용하거나, 예측 대상 샘플의 위치에 따라 적응적으로 선택되는 참조 샘플을 이용할 수 있다. 예컨대, 우측 참조 샘플은, 예측 대상 샘플의 위치와 무관하게 우측 상단 참조 샘플을 이용하여 유도되거나, 예측 대상 샘플의 위치에 따라 선택되는 좌측 참조 샘플(예컨대, 예측 대상 샘플과 동일한 y 축 좌표를 갖는 참조 샘플) 또는 상단 참조 샘플(예컨대, 예측 대상 샘플과 동일한 x 축 좌표를 갖는 참조 샘플)을 이용하여 유도될 수 있다. 또는, 하단 참조 샘플은 예측 대상 샘플의 위치와 무관하게 좌측 하단 참조 샘플을 이용하여 유도되거나, 예측 대상 샘플의 위치에 따라 선택되는 좌측 참조 샘플(예컨대, 예측 대상 샘플과 동일한 y 축 좌표를 갖는 참조 샘플) 또는 상단 참조 샘플(예컨대, 예측 대상 샘플과 동일한 x 축 좌표를 갖는 참조 샘플)을 이용하여 유도될 수 있다.
도 14는 복수 참조 샘플을 이용하여, 우측 참조 샘플 또는 하단 참조 샘플을 유도하는 예를 나타낸 도면이다. 현재 블록은 WxH의 크기를 갖는 블록이라 가정한다.
도 14의 (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)의 가중합 또는 평균값으로 계산될 수 있다.
도 14의 (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)의 가중합을 기초로 생성될 수 있다.
도 15 및 도 16은 본 발명의 일 실시예에 따른, 비정방형 블록에 대해 우측 참조 샘플 및 하단 참조 샘플을 결정하는 것을 설명하기 위한 도면이다.
도 15에 도시된 예에서와 같이, 현재 블록이 (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)을 유도한 뒤, 우측 하단 참조 샘플과 좌측 하단 참조 샘플을 보간하여 하단 참조 샘플을 유도할 수 있다.
반면, 도 16에 도시된 예에서와 같이, 현재 블록이 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)을 유도한 뒤, 우측 하단 참조 샘플과 좌측 하단 참조 샘플을 보간하여 하단 참조 샘플을 유도할 수 있다.
도 14 내지 도 16을 통해 설명한 예에서는, 하단 참조 샘플은, 하단 참조 샘플과 동일한 수평선상에 놓인 현재 블록의 좌측 하단 참조 샘플 또는 우측 참조 샘플과 동일한 수직선상에 놓인 현재 블록의 우측 상단 참조 샘플 중 적어도 하나를 기초로 유도되고, 우측 참조 샘플은, 우측 참조 샘플과 동일한 수직선상에 놓인 현재 블록의 우측 상단 참조 샘플 또는 하단 참조 샘플과 동일한 수평선상에 놓인 현재 블록의 좌측 하단 참조 샘플 중 적어도 하나를 기초로 유도되는 것으로 설명하였다. 설명한 예와 달리, 상측 중단 참조 샘플 또는 좌측 중단 참조 샘플 중 적어도 하나를 기초로 우측 참조 샘플을 유도하거나, 좌측 참조 샘플을 유도할 수도 있다. 일 예로, 상측 중단 샘플과 좌측 하단 참조 샘플을 이용하여 하측 중단 샘플을 유도한 뒤, 하측 중단 샘플과 좌측 하단 샘플의 보간(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 예측 영상을 생성할 때 이용되는 우측 참조 샘플은, 상단 참조 샘플 및 좌측 참조 샘플의 가중합 또는 평균에 기초하여 유도할 수 있다.
예컨대, 도 15에 도시된 예에서와 같이, 현재 블록이 높이가 너비보다 긴 비정방형 블록인 경우, 현재 블록 내 소정 영역에 포함된 (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)의 보간을 통해 생성될 수 있다.
또는, 도 16에 도시된 예에서와 같이, 현재 블록이 너비가 높이보다 긴 비정방형 블록인 경우, 현재 블록 내 소정 영역에 포함된 (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 예측 영상을 생성할 수 있다. 일 예로, 도 15에 도시된 예에서와 같이, 현재 블록이 높이가 너비보다 긴 비정방형 블록인 경우, 현재 블록 내 소정 영역에 포함된 (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 예측 영상을 생성할 수 있다.
또는, 도 16에 도시된 예에서와 같이, 현재 블록이 너비가 높이보다 긴 비정방형 블록인 경우, 현재 블록 내 소정 영역에 포함된 (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 PCTKR2018010414-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 참조 샘플을 유도할 수도 있다.
도 17은 제1 참조 샘플을 이용하여 제2 참조 샘플을 유도하는 예를 설명하기 위한 도면이다.
먼저, 현재 블록의 우측 상단 참조 샘플 r(W, -1) 및 좌측 하단 참조 샘플 r(-1, H)를 기초로 유도되는 우측 하단 참조 샘플 P(W, H)를 유도할 수 있다. 구체적으로, 우측 하단 참조 샘플은 우측 상단 참조 샘플 및 좌측 하단 참조 샘플의 가중합 또는 평균 연산을 통해 유도될 수 있다. 하기 수학식 12는 우측 하단 참조 샘플을 유도하는 일 예를 나타낸 것이다.
Figure PCTKR2018010414-appb-M000012
상기 수학식 12에 나타난 바와 같이, 우측 하단 참조 샘플은 우측 상단 참조 샘플 및 좌측 하단 참조 샘플 사이의 가중합을 기초로 계산될 수 있다. 이때, 우측 상단 참조 샘플 및 좌측 하단 참조 샘플에 적용되는 가중치는 현재 블록의 너비 및 높이이 따라 결정될 수 있다. 일 예로, 현재 블록이 정방형인 경우 우측 상단 참조 샘플 및 좌측 하단 참조 샘플에 동일한 가중치가 적용되는 반면, 현재 블록이 비정방형인 경우 우측 상단 참조 샘플 및 좌측 하단 참조 샘플에 상이한 가중치가 적용될 수 있다. 단, 수학식 12에 나타난 가중치 설정 방법은 본 발명의 일 예를 나타낸 것일 뿐, 본 발명이 이에 한정되는 것은 아니다. 수학식 12에 나타난 예 이외에도, 현재 블록의 크기, 형태, 인트라 예측 모드, 참조 샘플의 가용성, 주변 블록의 가용성, 주변 블록이 인트라 예측 모드로 부호화되었는지 여부 또는 주변 블록의 인트라 예측 모드 중 적어도 하나에 기초하여 가중치가 결정될 수도 있다.
우측 참조 샘플은 우측 상단 참조 샘플과 우측 하단 참조 샘플을 기초로 유도될 수 있다. 일 예로, 우측 참조 샘플은 우측 상단 참조 샘플과 우측 하단 참조 샘플을 보간함으로써 획득될 수 있다. 하기 수학식 13은 우측 참조 샘플을 유도하는 일 예를 나타낸 것이다.
Figure PCTKR2018010414-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 PCTKR2018010414-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에 나타난 예 이외에도, 현재 블록의 크기, 형태, 인트라 예측 모드, 참조 샘플의 가용성, 주변 블록의 가용성, 주변 블록이 인트라 예측 모드로 부호화되었는지 여부 또는 주변 블록의 인트라 예측 모드 중 적어도 하나에 기초하여 가중치가 결정될 수도 있다.
현재 블록이 비정방형인 경우, 앞서 도 15 및 도 16을 통해 설명한 예에 기초하여 우측 참조 샘플 및 하단 참조 샘플이 유도될 수도 있다.
상술한 예에서와 같이, 우측 상단 참조 샘플 및 좌측 하단 참조 샘플 등 고정된 위치의 제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 참조 샘플들을 일차원으로 배열하여 제1 일차원 레퍼런스 샘플 그룹을 생성하고, 제2 참조 샘플들을 일차원으로 배열하여 제2 일차원 레퍼런스 샘플 그룹을 생성할 수 있다. 이때, 제1 일차원 레퍼런스 샘플 그룹은 제1 참조 샘플들 뿐만 아니라, 제2 참조 샘플들 중 적어도 하나 이상을 포함하도록 구성될 수도 있고, 제2 일차원 레퍼런스 샘플 그룹은 제2 참조 샘플들 뿐만 아니라, 제1 참조 샘플들 중 적어도 하나 이상을 포함하도록 구성될 수도 있다.
도 18은 일차원 레퍼런스 샘플 그룹을 구성하는 참조 샘플들을 예시한 도면이다.
도 18의 (a)에 도시된 예에서와 같이, 제1 일차원 레퍼런스 샘플 그룹은 현재 블록의 좌측 참조 샘플들 및 상단 참조 샘플들로 구성될 수 있다.
반면, 도 18의 (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 기초 참조 샘플의 위치를 결정하거나, 제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 PCTKR2018010414-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 PCTKR2018010414-appb-M000016
보간 필터의 계수는, 가중치 관련 파라미터 ifact에 기초하여 결정될 수 있다. 일 예로, 보간 필터의 계수는, 각도 선(angular line) 상에 위치한 소수 펠(fractional pel)과 정수 펠(즉, 각 참조 샘플들의 정수 위치) 사이의 거리에 기초하여 결정될 수 있다.
수학식 16에서는 탭수가 2인 보간 필터를 예시하였으나, 탭수가 2보다 큰 보간 필터를 이용할 수도 있다.
제1 예측 영상 또는 제2 예측 영상 중 적어도 하나에 기초하여 예측 대상 샘플의 최종 예측 영상을 획득할 수 있다. 일 예로, 제1 예측 영상을 예측 대상 샘플의 최종 예측 영상으로 결정하거나, 제2 예측 영상을 예측 대상 샘플의 최종 예측 영상으로 결정할 수 있다. 또는, 제1 예측 영상과 제2 예측 영상의 가중합 또는 평균 연산에 기초하여 예측 대상 샘플의 최종 예측 영상을 결정할 수도 있다. 수학식 17은 제1 예측 영상 및 제2 예측 영상의 가중 연산에 기초하여 최종 예측 샘플을 획득하는 예를 나타낸 것이다.
Figure PCTKR2018010414-appb-M000017
상기 수학식 17에서 P1(x, y)는 제1 예측 영상을, P2(x, y)는 제2 예측 영상을 나타낸다. 아울러, w(x, y)는 제1 예측 영상에 부여되는 가중치를 나타낸다.
제1 예측 영상 및 제2 예측 영상에 부여되는 가중치는, 예측 대상 샘플의 위치, 현재 블록의 크기, 형태 또는 인트라 예측 모드 중 적어도 하나에 기초하여 결정될 수 있다. 일 예로, 수학식 18은 현재 블록의 크기 및 예측 대상 샘플의 위치에 따라 가중치가 결정되는 예를 나타낸 것이다.
Figure PCTKR2018010414-appb-M000018
상기 수학식 18에서, W 및 H는 각각 현재 블록의 너비 및 높이를 나타내고, (x, y)는 예측 대상 샘플의 좌표를 나타낸다.
상기 수학식 18에 나타난 예에서와 같이, 예측 대상 샘플이 현재 블록의 좌측 상단 코너에 인접할수록 제1 예측 영상에 부여되는 가중치를 크게 설정하고, 예측 대상 샘플이 현재 블록의 우측 하단 코너에 인접할수록 제2 예측 영상에 부여되는 가중치를 크게 설정할 수 있다.
또는, 현재 블록의 이웃 블록으로부터 가중치를 유도할 수도 있다. 여기서, 현재 블록의 이웃 블록은, 현재 블록의 상단 이웃 블록, 좌측 이웃 블록 또는 코너에 인접한 이웃 블록(예컨대, 좌측 상단 이웃 블록, 우측 상단 이웃 블록 또는 좌측 하단 이웃 블록) 중 적어도 하나를 포함할 수 있다.
또는, 가중치를 결정하기 위한 정보가 비트스트림을 통해 시그널링될 수 있다. 상기 정보는 제1 예측 영상 또는 제2 예측 영상에 적용되는 가중치 값을 나타낼 수도 있고, 현재 블록과 이웃 블록 사이의 가중치 차분값을 나타낼 수도 있다.
상술한 예에서와 같이, 제1 예측 영상 및 제2 예측 영상 사이의 가중합 연산을 통해 최종 예측 영상을 획득하는 것을 양방향 인트라 예측(Bi-intra Prediction)이라 호칭할 수 있다.
양방향 인트라 예측은 현재 블록 내 일부 영역에 대해서만 적용될 수 있다. 이때, 양방향 인트라 예측이 적용되는 영역은 부호화기 및 복호화기에서 기 정의된 것일 수도 있다. 일 예로, 현재 블록 내 우측 하단 코너에 인접하는 소정 크기(예컨대, 4x4) 블록에 양방향 인트라 예측을 적용할 수 있다. 또는, 현재 블록의 크기, 형태 또는 인트라 예측 모드에 따라 적응적으로 양방향 인트라 예측이 적용되는 영역을 결정할 수도 있다. 또는, 양방향 인트라 예측이 적용되는 영역을 결정하기 위한 정보(예컨대, 영역의 크기 또는 위치를 나타내는 정보)가 비트스트림을 통해 시그널링될 수도 있다.
도 19는 양방향 인트라 예측이 적용되는 영역을 나타낸 예이다.
양방향 인트라 예측이 적용되는 영역 내에서는 제1 예측 영상과 제2 예측 영상을 가중 예측하여 최종 예측 샘플이 획득될 수 있다. 반면, 양방향 인트라 예측이 적용되지 않는 영역 내에서는 제1 예측 영상 또는 제2 예측 영상을 최종 예측 샘플로 결정할 수 있다.
상술한 예에서는, 제1 샘플 그룹에서 선택된 제1 기초 참조 샘플 및 제2 샘플 그룹에서 선택된 제2 기초 참조 샘플을 이용하여 양방향 인트라 예측이 수행되는 것으로 설명하였다. 설명한 예와 달리, 제1 샘플 그룹에서 복수의 참조 샘플을 선택하여 양방향 인트라 예측을 수행하거나, 제2 샘플 그룹에서 복수의 참조 샘플을 선택하여 양방향 인트라 예측을 수행하는 것도 가능하다. 일 예로, 현재 블록의 인트라 예측 모드가 우측 상단 대각 방향 또는 좌측 하단 대각 방향인 경우, 제1 샘플 그룹 중 상단 참조 샘플 및 좌측 참조 샘플을 선택하여 양방향 인트라 예측을 수행할 수 있다. 즉, 상단 참조 샘플을 기초로 획득되는 제1 참조 영상과 하단 참조 샘플을 기초로 획득되는 제2 참조 영상을 가중 예측하여, 현재 블록의 최종 예측 샘플을 획득할 수 있다.
또는, 인트라 예측 모드에 따라, 제2 샘플 그룹 중 우측 참조 샘플 및 하단 참조 샘플을 선택하여 양방향 인트라 예측을 수행할 수도 있다.
양방향 인트라 예측은 독립적인 인트라 예측 모드로 정의될 수 있다. 일 예로, N개의 방향성 예측 모드와 N개의 방향성 예측 모드에 대응하는 N개의 양방향 인트라 예측 모드를 정의하여, 총 2N+2개의 인트라 예측 모드를 정의할 수 있다. 일 예로, 도 8에 도시된 인트라 예측 모드에 양방향 인트라 예측 모드를 추가하여, 총 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 이상인 경우, 양방향 인트라 예측이 적용될 수 있다.
다른 예로, 정방형 블록에 대해서만 양방향 인트라 예측을 허용하거나, 비정방 형태의 블록에 대해서만 양방향 인트라 예측을 허용할 수도 있다.
또는, 일부 방향성 인트라 예측 모드에 한하여, 양방향 인트라 예측을 적용할 수도 있다. 일 예로, 도 20은 양방향 인트라 예측이 허용되는 방향성 예측 모드를 식별 표시한 예이다. 도 20에 도시된 예에서와 같이, 수평 방향과 수직 방향 사이의 일부 인트라 예측 모드에 한하여 양방향 인트라 예측이 허용되도록 설정할 수 있다. 이때, 상기 범위 내 인트라 예측 모드가 선택되는 경우, 디폴트로 양방향 인트라 예측을 수행할 수도 있고, 상기 범위 내 인트라 예측 모드가 선택되는 경우, 비트스트림을 통해 파싱되는 정보, 현재 블록의 크기 또는 형태 중 적어도 하나에 기초하여 양방향 인트라 예측 모드의 수행 여부를 결정할 수도 있다.
양방향 인트라 예측이 허용되는 인트라 예측 모드는 도 20에 도시된 예에 한정되지 않는다. 양방향 인트라 예측이 허용되는 인트라 예측 모드는 부호화기 및 복호화기에서 기 정의되어 있을 수도 있고, 현재 블록의 크기 및/또는 형태에 따라 적응적으로 결정될 수 있다. 또는, 양방향 인트라 예측이 허용되는 인트라 예측 모드를 결정하기 위한 정보가 비트스트림을 통해 시그널링될 수도 있다.
도 21은 본 발명에 따른 양방향 인트라 예측 모드에 기초한 현재 블록의 인트라 예측 방법을 나타낸 흐름도이다.
먼저, 현재 블록에 양방향 인트라 예측이 적용되는지 여부를 결정할 수 있다(S2110). 현재 블록에 양방향 인트라 예측이 적용되는지 여부는, 비트스트림으로부터 파싱되는 정보, 현재 블록의 형태, 크기 또는 인트라 예측 모드에 기초하여 결정할 수 있다.
일 예로, 후보 리스트와 인덱스를 기반으로 현재 블록의 인트라 예측 모드를 결정한 뒤, 현재 블록의 크기, 형태 또는 비트스트림으로부터 파싱되는 정보(예컨대, bi_pred_flag)에 기초하여 현재 블록에 양방향 인트라 예측이 적용되는지 여부를 결정할 수 있다. 또는, 현재 블록의 인트라 예측 모드가 양방향 인트라 예측이 적용되는 방향성 예측 모드인지 여부에 기초하여 현재 블록에 양방향 인트라 예측이 적용되는지 여부를 결정할 수도 있다.
이후, 현재 블록의 참조 샘플을 유도할 수 있다(S2120). 먼저, 현재 블록의 좌측 및 상단에 인접하는 제1 참조 샘플들을 유도하고, 현재 블록에 양방향 인트라 예측이 적용되는 경우, 우측 및 하단에 인접하는 제2 참조 샘플들을 추가 유도할 수 있다(S2130).
다음으로, 현재 블록에 양방향 인트라 예측이 적용되지 않는 경우, 현재 블록의 인트라 예측 모드에 따라, 제1 참조 샘플들 중 적어도 하나의 기초 참조 샘플을 기초로 제1 예측 영상을 생성할 수 있다(S2140). 이 경우, 제1 예측 영상이 현재 블록의 최종 예측 샘플로 결정될 수 있다.
반면, 현재 블록에 양방향 인트라 예측이 적용되는 경우, 제1 예측 영상에 더하여, 제2 참조 샘플들 중 적어도 하나의 기초 참조 샘플을 기초로 제2 예측 영상을 생성할 수 있다(S2150). 제1 기초 참조 샘플 및 제2 기초 참조 샘플은 인트라 예측 모드의 방향성을 기초로 결정될 수도 있고, 현재 블록의 크기, 형태 또는 타 기초 참조 샘플의 위치를 기초로 결정될 수도 있다. 제1 예측 영상 및 제2 예측 영상이 획득되면, 제1 예측 영상 및 제2 예측 영상을 가중 예측하여, 현재 블록의 최종 예측 샘플을 획득할 수 있다.
현재 블록의 인트라 예측 모드가 DC 모드인 경우, 참조 샘플들로부터 DC값을 유도하고, 유도된 DC값을 현재 블록 내 예측 샘플들의 값으로 결정할 수 있다. 일 예로, 현재 블록의 인트라 예측 모드가 DC 모드인 경우, 현재 블록의 상단 참조 샘플들 및 좌측 참조 샘플들의 평균값을 DC값으로 결정하고, DC값을 현재 블록의 예측 샘플 값으로 결정할 수 있다. 이때, 좌측 상단 참조 샘플 r(-1,-1)은 DC값 계산시 제외될 수 있다.
현재 블록의 크기가 크거나, 현재 블록이 정방형이 아닌 경우, 현재 블록과 일부 참조 샘플들 사이의 상관성이 떨어져 예측 효율이 저하되는 문제점이 발생할 수 있다. 이에, 현재 블록의 크기 또는 형태에 따라 DC값 계산에 이용되는 참조 샘플의 범위를 상이하게 설정하거나, 참조 샘플의 위치에 따라 상이한 가중치를 적용하여 DC값을 계산할 수 있다.
일 예로, 현재 블록의 최우측 열보다 큰 x 좌표를 갖는 상단 참조 샘플들보다 현재 블록의 최우측 열과 동일한 x 좌표 또는 더 작은 x 좌표를 갖는 상단 참조 샘플들에 더 큰 가중치를 부여하거나, 현재 블록의 최하단 행보다 큰 y 좌표 값을 갖는 좌측 참조 샘플들보다 현재 블록의 최하단 행과 동일한 y 좌표 또는 더 작은 y 좌표 값을 갖는 좌측 참조 샘플들에 더 큰 가중치를 부여할 수 있다.
도 22는 참조 샘플의 위치에 따라 상이한 가중치가 적용되는 예를 나타낸 도면이다.
도 22에서는, 현재 블록의 최우측 열보다 큰 x 좌표를 갖는 상단 참조 샘플들 및 현재 블록의 최하단 행보다 큰 y 좌표를 갖는 좌측 참조 샘플들에는 1의 가중치가 적용되고, 그 이외의 상단 참조 샘플들 및 좌측 참조 샘플들에는 3의 가중치가 부여되는 것으로 예시되었다. 상기 도 22에 부여된 예에 따라, DC값은 다음 수학식 19에 기초하여 계산될 수 있다.
Figure PCTKR2018010414-appb-M000019
도 22에 도시된 예에서는, 현재 블록의 최우측 열의 x 좌표 및 최하단 행의 y 좌표를 기준으로 참조 샘플들에 부여되는 가중치가 변경되는 것으로 도시되었으나, 도시된 것과 다른 위치를 기준으로 참조 샘플들에 부여되는 가중치를 조절할 수도 있다.
현재 블록의 크기 및/또는 형태에 기초하여 참조 샘플별 가중치를 결정할 수도 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방 형태의 블록인 경우, 상단 참조 샘플들 중 적어도 일부에 적용되는 가중치가 좌측 참조 샘플들 중 적어도 일부에 적용되는 가중치보다 큰 값을 갖도록 설정할 수 있다. 반면, 현재 블록이 높이가 너비보다 큰 비정방 형태의 블록인 경우, 좌측 참조 샘플들 중 적어도 일부에 적용되는 가중치가 상단 참조 샘플들 중 적어도 일부에 적용되는 가중치보다 큰 값을 갖도록 설정할 수 있다.
도 23 및 도 24는 현재 블록이 비정방 형태인 경우, 참조 샘플들에 적용되는 가중치를 나타낸 것이다.
도 23에서는, 상단 참조 샘플들 및 현재 블록의 최하단 행보다 큰 y 좌표를 갖는 좌측 참조 샘플들에는 1의 가중치가 적용되는 반면, 현재 블록의 최하단 행과 동일한 y 좌표 또는 그보다 작은 y 좌표를 갖는 좌측 참조 샘플들에는 3의 가중치가 부여되는 것으로 예시되었다. 즉, 도 23에 도시된 예에서와 같이, 현재 블록이 높이가 너비보다 큰 비정방 형태인 경우, 현재 블록의 좌측 참조 샘플들에 부여되는 가중치가 상단 참조 샘플들에 부여되는 가중치보다 크게 설정될 수 있다. 이에 따라, DC값은 다음의 수학식 20과 같이 획득될 수 있다.
Figure PCTKR2018010414-appb-M000020
도 24에서는, 좌측 참조 샘플들 및 현재 블록의 최우측 열보다 큰 x 좌표를 갖는 상단 참조 샘플들에는 1의 가중치가 적용되는 반면, 현재 블록의 최우측 열과 동일한 x 좌표 또는 그보다 작은 x 좌표를 갖는 상단 참조 샘플들에는 3의 가중치가 부여되는 것으로 예시되었다. 즉, 도 24에 도시된 예에서와 같이, 현재 블록이 너비가 높이보다 큰 비정방 형태인 경우, 현재 블록의 상단 참조 샘플들에 부여되는 가중치가 좌측 참조 샘플들에 부여되는 가중치보다 크게 설정될 수 있다. 이에 따라, DC값은 다음의 수학식 21과 같이 획득될 수 있다.
Figure PCTKR2018010414-appb-M000021
도 23에서는 현재 블록의 최우측 열보다 큰 x 좌표를 갖는 상단 참조 샘플들 및 현재 블록의 최우측 열과 동일한 x 좌표 또는 그보다 더 작은 x 좌표를 갖는 상단 참조 샘플들에 모두 1의 가중치가 부여되는 것으로 예시되었으나, 각각에 부여되는 가중치를 상이하게 설정하는 것도 가능하다. 마찬가지로, 도 24에서 현재 블록의 최하단 행보다 큰 y 좌표를 갖는 좌측 참조 샘플들 및 현재 블록의 최하단 행과 동일한 y 좌표 또는 그보다 더 작은 y 좌표를 갖는 좌측 참조 샘플들에 부여되는 가중치를 상이하게 설정할 수 있다.
참조 샘플들에 적용되는 가중치는 부호화기 및 복호화기에서 고정된 값을 가질 수 있다. 또는, 현재 블록의 형태 또는 크기에 기초하여 적응적으로 가중치가 결정될 수 있다. 일 예로, 현재 블록의 높이, 너비 또는 종횡비 등에 따라 적응적으로 가중치가 결정될 수 있다.
또는, 각 참조 샘플에 적용되는 가중치를 나타내는 정보가 비트스트림을 통해 시그널링될 수도 있다. 상기 정보를 기초로 각 참조 샘플에 적용되는 가중치를 결정할 수 있다.
또는, 현재 블록에 이웃하는 주변 블록에 적용된 가중치를 기초로 현재 블록에 적용되는 가중치를 결정할 수도 있다. 일 예로, 주변 블록에 적용된 가중치를 현재 블록의 가중치로 결정하거나, 주변 블록에 적용된 가중치에 차분값을 더하여 현재 블록의 가중치를 유도할 수 있다. 여기서, 차분값은 비트스트림을 통해 시그널링되는 정보를 기초로 결정될 수 있다.
도 22 내지 도 24에서는, 좌측 참조 샘플들 또는 상단 참조 샘플들 중 적어도 하나가 상이한 가중치가 적용되는 2개의 그룹으로 분할되는 것으로 도시되었다. 도시된 예에서와 달리, 좌측 참조 샘플들 또는 상단 참조 샘플들을 이보다 더 많은 수의 그룹으로 분할한 뒤, 각 그룹에 상이한 가중치를 적용할 수도 있다. 일 예로, 참조 샘플별로 상이한 가중치를 부여하거나, 단위 그룹별로 상이한 가중치를 부여하여 DC값을 계산할 수 있다. 이때, 단위 그룹은 기 정의된 개수에 기초하여 분할될 수 있다. 즉, 각 단위 그룹은 동일한 개수의 참조 샘플들을 포함할 수 있다. 또는, 현재 블록의 크기 또는 형태에 기초하여, 각 단위 그룹이 포함하는 참조 샘플들의 개수를 상이하게 결정할 수도 있다.
다른 예로, 좌측 참조 샘플들 및/또는 상단 참조 샘플들 각각에 균일한 가중치를 적용하되, 좌측 참조 샘플들과 상단 참조 샘플들에 적용되는 가중치를 상이하게 결정할 수도 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방 형태인 경우, 상단 참조 샘플들에 좌측 참조 샘플들보다 큰 가중치를 부여하여 DC값을 획득하는 반면, 현재 블록이 높이가 너비보다 큰 비정방 형태인 경우, 좌측 참조 샘플들에 상단 참조 샘플들보다 큰 가중치를 부여하여 DC값을 획득할 수도 있다.
현재 블록의 크기 또는 형태에 따라, 상단 참조 샘플들 또는 좌측 참조 샘플들 중 일부만을 이용하여 DC 값을 계산할 수도 있다. 일 예로, 현재 블록이 너비가 높이보다 큰 비정방 형태인 경우, 상단 참조 샘플들만을 이용하여 DC값을 계산할 수 있다. 즉, 현재 블록이 너비가 높이보다 큰 비정방 형태인 경우, 상단 참조 샘플들의 평균값을 DC값으로 결정하거나, 상단 참조 샘플들 사이의 가중합을 DC값으로 결정할 수 있다. 또는, 현재 블록이 높이가 너비보다 큰 비정방 형태인 경우, 좌측 참조 샘플들만을 이용하여 DC값을 계산할 수 있다. 즉, 현재 블록이 높이가 너비보다 큰 비정방 형태인 경우, 좌측 참조 샘플들의 평균값을 DC값으로 결정하거나, 좌측 참조 샘플들 사이의 가중합을 DC값으로 결정할 수 있다.
또는, 현재 블록의 형태에 따라, 현재 블록의 최우측 행보다 큰 x 좌표 값을 갖는 상단 참조 샘플들 또는 현재 블록의 최하단 행보다 큰 y 좌표 값을 갖는 좌측 참조 샘플들 중 적어도 하나를 제외하고 DC값을 계산할 수 있다.
상술한 예에서와 같이, 상단 참조 샘플들과 좌측 참조 샘플들에 상이한 가중치를 부여하여 DC값을 생성하는 것을 'DC 가중 예측'이라 호칭할 수 있다.
현재 블록에 DC 가중 예측을 적용할 것인지 여부는, 현재 블록의 크기 또는 형태에 기초하여 결정될 수 있다. 일 예로, DC 가중 예측은 소정의 문턱값 이상의 크기를 갖는 블록에 대해서만 허용될 수 있다. 여기서, 문턱값은 16x16, 32x32 또는 64x64 등 블록 크기를 나타낼 수도 있고, 블록의 너비 또는 높이 중 어느 하나에 대한 기준값을 나타낼 수도 있다. 현재 블록의 크기가 문턱값 보다 작은 경우에는 현재 블록의 인트라 예측 모드가 DC 모드라 하더라도, DC 가중 예측이 적용되지 않을 수 있다. DC 가중 예측이 적용되지 않는 경우에는 상단 참조 샘플들과 좌측 참조 샘플들에 동일한 가중치를 적용하여 DC값을 결정할 수 있다. 또는, 현재 블록이 비정방형인 경우에 한하여, DC 가중 예측을 허용할 수 있다.
다른 예로, DC 가중 예측을 적용할 것인지 여부를 나타내는 정보가 비트스트림을 통해 시그널링될 수도 있다.
또는, 현재 블록에 이웃한 주변 블록에서 DC 가중 에측을 이용하는지 여부에 따라, 현재 블록에 DC 가중 예측을 적용할 것인지 여부를 결정할 수도 있다. 일 예로, 현재 블록의 인트라 예측 모드가 주변 블록의 인트라 예측 모드를 기초로 유도된 후보자(즉, MPM 후보)와 동일한 경우, 현재 블록에 DC 가중 예측을 적용할 것인지 여부를 상기 주변 블록에 DC 가중 예측이 적용되었는지 여부와 동일하게 결정할 수 있다.
또는, 현재 블록의 인트라 예측 모드가 DC 모드인 경우 디폴트로 DC 가중 예측이 적용될 수도 있다.
상술한 실시예는 일련의 단계 또는 순서도를 기초로 설명되고 있으나, 이는 발명의 시계열적 순서를 한정한 것은 아니며, 필요에 따라 동시에 수행되거나 다른 순서로 수행될 수 있다. 또한, 상술한 실시예에서 블록도를 구성하는 구성요소(예를 들어, 유닛, 모듈 등) 각각은 하드웨어 장치 또는 소프트웨어로 구현될 수도 있고, 복수의 구성요소가 결합하여 하나의 하드웨어 장치 또는 소프트웨어로 구현될 수도 있다. 상술한 실시예는 다양한 컴퓨터 구성요소를 통하여 수행될 수 있는 프로그램 명령어의 형태로 구현되어 컴퓨터 판독 가능한 기록 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능한 기록 매체는 프로그램 명령어, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 컴퓨터 판독 가능한 기록 매체의 예에는, 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM, DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 ROM, RAM, 플래시 메모리 등과 같은 프로그램 명령어를 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 상기 하드웨어 장치는 본 발명에 따른 처리를 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.
본 발명은 영상을 부호화/복호화할 수 있는 전자 장치에 적용될 수 있다.

Claims (15)

  1. 현재 블록의 인트라 예측 모드를 결정하는 단계;
    상기 현재 블록의 인트라 예측 모드가 DC 모드인 경우, 상기 현재 블록의 좌측 참조 샘플들 또는 상단 참조 샘플들 중 적어도 하나를 기초로 DC값을 결정하는 단계; 및
    상기 DC값을 기초로 상기 현재 블록의 예측 샘플을 유도하는 단계를 포함하되,
    상기 DC값을 결정하는데 이용되는 참조 샘플들의 범위 또는 상기 DC값을 결정하기 위해 상기 좌측 참조 샘플들 또는 상기 상단 참조 샘플들에 적용되는 가중치는 상기 현재 블록의 크기, 형태 또는 참조 샘플의 위치 중 적어도 하나에 기초하여 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  2. 제1 항에 있어서,
    상기 현재 블록이 비정방 형태의 블록인 경우, 상기 좌측 참조 샘플들 또는 상기 상단 참조 샘플들 중 어느 하나만을 이용하여 상기 DC값이 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  3. 제2 항에 있어서,
    상기 현재 블록이 너비가 높이보다 큰 비정방 형태의 블록인 경우, 상기 DC값은 상기 상단 참조 샘플들의 평균값으로 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  4. 제2 항에 있어서,
    상기 현재 블록이 높이가 너비보다 큰 비정방 형태의 블록인 경우, 상기 DC값은 상기 좌측 참조 샘플들의 평균값으로 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  5. 제1 항에 있어서,
    상기 DC값은 상기 상단 참조 샘플들 및 상기 좌측 참조 샘플들의 가중합 연산에 의해 결정되는 것을 특징으로 하는, 영상 복호화 방법.
  6. 제5 항에 있어서,
    상기 현재 블록이 너비가 높이보다 큰 비정방 형태의 블록인 경우, 상기 상단 참조 샘플들에 적용되는 가중치가 상기 좌측 참조 샘플들에 비해 큰 값을 갖도록 설정되는 것을 특징으로 하는, 영상 복호화 방법.
  7. 제5 항에 있어서,
    상기 현재 블록이 높이가 너비보다 큰 비정방 형태의 블록인 경우, 상기 좌측 참조 샘플들에 적용되는 가중치가 상기 상단 참조 샘플들에 비해 큰 값을 갖도록 설정되는 것을 특징으로 하는, 영상 복호화 방법.
  8. 제5 항에 있어서,
    상기 현재 블록의 최하단 행보다 큰 y 좌표를 갖는 좌측 참조 샘플들과 잔여 좌측 참조 샘플들 사이에 적용되는 가중치는 상이한 것을 특징으로 하는, 영상 복호화 방법.
  9. 제5 항에 있어서,
    상기 현재 블록의 최우측 열보다 큰 x 좌표를 갖는 상단 참조 샘플들과 잔여 상단 참조 샘플들 사이에 적용되는 가중치는 상이한 것을 특징으로 하는, 영상 복호화 방법.
  10. 현재 블록의 인트라 예측 모드를 결정하는 단계;
    상기 현재 블록의 인트라 예측 모드가 DC 모드인 경우, 상기 현재 블록의 좌측 참조 샘플들 또는 상단 참조 샘플들 중 적어도 하나를 기초로 DC값을 결정하는 단계; 및
    상기 DC 값을 기초로 상기 현재 블록의 예측 샘플을 유도하는 단계를 포함하되,
    상기 DC값을 결정하는데 이용되는 참조 샘플들의 범위 또는 상기 DC값을 결정하기 위해 상기 좌측 참조 샘플들 또는 상기 상단 참조 샘플들에 적용되는 가중치는 상기 현재 블록의 크기, 형태 또는 참조 샘플의 위치 중 적어도 하나에 기초하여 결정되는 것을 특징으로 하는, 영상 부호화 방법.
  11. 제10 항에 있어서,
    상기 현재 블록이 비정방 형태의 블록인 경우, 상기 좌측 참조 샘플들 또는 상기 상단 참조 샘플들 중 어느 하나만을 이용하여 상기 DC값이 결정되는 것을 특징으로 하는, 영상 부호화 방법.
  12. 제11 항에 있어서,
    상기 현재 블록이 너비가 높이보다 큰 비정방 형태의 블록인 경우, 상기 DC값은 상기 상단 참조 샘플들의 평균값으로 결정되는 것을 특징으로 하는, 영상 부호화 방법.
  13. 제11 항에 있어서,
    상기 현재 블록이 높이가 너비보다 큰 비정방 형태의 블록인 경우, 상기 DC값은 상기 좌측 참조 샘플들의 평균값으로 결정되는 것을 특징으로 하는, 영상 부호화 방법.
  14. 현재 블록의 인트라 예측 모드를 결정하고, 상기 현재 블록의 인트라 예측 모드가 DC 모드인 경우, 상기 현재 블록의 좌측 참조 샘플들 또는 상단 참조 샘플들 중 적어도 하나를 기초로 DC값을 결정하고, 상기 DC 값을 기초로 상기 현재 블록의 예측 샘플을 유도하는 인트라 예측부를 포함하되,
    상기 DC값을 결정하는데 이용되는 참조 샘플들의 범위 또는 상기 DC값을 결정하기 위해 상기 좌측 참조 샘플들 또는 상기 상단 참조 샘플들에 적용되는 가중치는 상기 현재 블록의 크기, 형태 또는 참조 샘플의 위치 중 적어도 하나에 기초하여 결정되는 것을 특징으로 하는, 영상 복호화 장치.
  15. 현재 블록의 인트라 예측 모드를 결정하고, 상기 현재 블록의 인트라 예측 모드가 DC 모드인 경우, 상기 현재 블록의 좌측 참조 샘플들 또는 상단 참조 샘플들 중 적어도 하나를 기초로 DC값을 결정하고, 상기 DC 값을 기초로 상기 현재 블록의 예측 샘플을 유도하는 인트라 예측부를 포함하되,
    상기 DC값을 결정하는데 이용되는 참조 샘플들의 범위 또는 상기 DC값을 결정하기 위해 상기 좌측 참조 샘플들 또는 상기 상단 참조 샘플들에 적용되는 가중치는 상기 현재 블록의 크기, 형태 또는 참조 샘플의 위치 중 적어도 하나에 기초하여 결정되는 것을 특징으로 하는, 영상 부호화 장치.
PCT/KR2018/010414 2017-09-08 2018-09-06 비디오 신호 처리 방법 및 장치 WO2019050292A1 (ko)

Priority Applications (11)

Application Number Priority Date Filing Date Title
CN201880035866.2A CN110710215A (zh) 2017-09-08 2018-09-06 视频信号处理方法及装置
CN202311057914.7A CN116916012A (zh) 2017-09-08 2018-09-06 视频信号处理方法及装置
CA3065922A CA3065922A1 (en) 2017-09-08 2018-09-06 Method and device for processing video signal
CN202311057807.4A CN116916010A (zh) 2017-09-08 2018-09-06 视频信号处理方法及装置
CN202311057752.7A CN116916009A (zh) 2017-09-08 2018-09-06 视频信号处理方法及装置
AU2018327924A AU2018327924B2 (en) 2017-09-08 2018-09-06 Method and device for processing video signal
CN202311057838.XA CN117014606A (zh) 2017-09-08 2018-09-06 视频信号处理方法及装置
US16/619,327 US11184606B2 (en) 2017-09-08 2018-09-06 Method and device for processing video signal
CN202311057870.8A CN116916011A (zh) 2017-09-08 2018-09-06 视频信号处理方法及装置
US17/507,760 US11700366B2 (en) 2017-09-08 2021-10-21 Method and device for processing video signal
US18/201,393 US20230300324A1 (en) 2017-09-08 2023-05-24 Method and device for processing video signal

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2017-0115268 2017-09-08
KR20170115268 2017-09-08

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US16/619,327 A-371-Of-International US11184606B2 (en) 2017-09-08 2018-09-06 Method and device for processing video signal
US17/507,760 Division US11700366B2 (en) 2017-09-08 2021-10-21 Method and device for processing video signal

Publications (1)

Publication Number Publication Date
WO2019050292A1 true WO2019050292A1 (ko) 2019-03-14

Family

ID=65635066

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2018/010414 WO2019050292A1 (ko) 2017-09-08 2018-09-06 비디오 신호 처리 방법 및 장치

Country Status (6)

Country Link
US (3) US11184606B2 (ko)
KR (1) KR20190028325A (ko)
CN (6) CN116916011A (ko)
AU (1) AU2018327924B2 (ko)
CA (1) CA3065922A1 (ko)
WO (1) WO2019050292A1 (ko)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3804331A4 (en) * 2018-06-15 2021-08-11 Huawei Technologies Co., Ltd. INTRA PREDICTION PROCESS AND APPARATUS
CN113826393A (zh) * 2019-05-03 2021-12-21 韩国电子通信研究院 图像编码/解码方法和装置以及存储比特流的记录介质

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112335243A (zh) * 2018-06-18 2021-02-05 世宗大学校产学协力团 影像编码/解码方法及装置
KR20200028856A (ko) * 2018-09-07 2020-03-17 김기백 인트라 예측을 이용한 영상 부호화/복호화 방법 및 장치
US11438583B2 (en) * 2018-11-27 2022-09-06 Tencent America LLC Reference sample filter selection in intra prediction
CN113395516B (zh) * 2019-01-02 2023-05-23 Oppo广东移动通信有限公司 帧内预测方法及装置、计算机可读存储介质
CN110401838B (zh) * 2019-03-12 2021-08-31 浙江大华技术股份有限公司 帧内预测方法、编码器及存储装置
WO2020197031A1 (ko) * 2019-03-22 2020-10-01 엘지전자 주식회사 영상 코딩 시스템에서 다중 참조 라인 기반의 인트라 예측 방법 및 장치
WO2020256507A1 (ko) * 2019-06-20 2020-12-24 엘지전자 주식회사 다중 참조 라인 인트라 예측을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2021204137A1 (en) 2020-04-07 2021-10-14 Beijing Bytedance Network Technology Co., Ltd. Clipping operation for reference picture wrap around
US11523112B2 (en) * 2020-04-09 2022-12-06 Tencent America LLC Intra coding with L-type partitioning tree
WO2021204233A1 (en) * 2020-04-09 2021-10-14 Beijing Bytedance Network Technology Co., Ltd. Constraints on adaptation parameter set based on color format
WO2021204251A1 (en) 2020-04-10 2021-10-14 Beijing Bytedance Network Technology Co., Ltd. Use of header syntax elements and adaptation parameter set
WO2021209061A1 (en) 2020-04-17 2021-10-21 Beijing Bytedance Network Technology Co., Ltd. Presence of adaptation parameter set units
EP4128775A4 (en) 2020-04-26 2024-03-27 Bytedance Inc CONDITIONAL SIGNALING OF SYNTAX ELEMENTS OF A VIDEO CODING
US11689715B2 (en) 2020-09-28 2023-06-27 Tencent America LLC Non-directional intra prediction for L-shape partitions

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130020562A (ko) * 2011-08-17 2013-02-27 주식회사 케이티 단거리 화면 내 예측 모드에서 화면 내 예측 방법 및 이러한 방법을 사용하는 장치
WO2014010943A1 (ko) * 2012-07-10 2014-01-16 한국전자통신연구원 영상 부호화/복호화 방법 및 장치
WO2017069419A1 (ko) * 2015-10-22 2017-04-27 엘지전자 주식회사 비디오 코딩 시스템에서 인트라 예측 방법 및 장치

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2908007A1 (fr) 2006-10-31 2008-05-02 Thomson Licensing Sas Procede de codage d'une sequence d'images
KR101361005B1 (ko) * 2008-06-24 2014-02-13 에스케이 텔레콤주식회사 인트라 예측 방법 및 장치와 그를 이용한 영상부호화/복호화 방법 및 장치
WO2015057947A1 (en) * 2013-10-17 2015-04-23 Huawei Technologies Co., Ltd. Improved reference pixel selection and filtering for intra coding of depth map
WO2015178796A1 (en) 2014-05-23 2015-11-26 Huawei Technologies Co., Ltd. Method and apparatus for pre-prediction filtering for use in block-prediction techniques
CN104023241B (zh) * 2014-05-29 2017-08-04 华为技术有限公司 帧内预测编码的视频编码方法及视频编码装置
WO2016200235A1 (ko) * 2015-06-11 2016-12-15 엘지전자(주) 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
US10531084B2 (en) 2015-06-15 2020-01-07 Lg Electronics Inc. Intra prediction mode based image processing method, and apparatus therefor
US10200719B2 (en) 2015-11-25 2019-02-05 Qualcomm Incorporated Modification of transform coefficients for non-square transform units in video coding
KR20180129863A (ko) * 2016-04-25 2018-12-05 엘지전자 주식회사 영상 코딩 시스템에서 영상 디코딩 방법 및 장치
CN109937571B (zh) * 2016-09-05 2022-01-18 Lg电子株式会社 图像编码/解码方法及其装置
KR20190029737A (ko) * 2016-09-22 2019-03-20 엘지전자 주식회사 영상 코딩 시스템에서 조도 보상 기반 인터 예측 방법 및 장치
WO2018066849A1 (ko) * 2016-10-04 2018-04-12 한국전자통신연구원 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
US10681354B2 (en) * 2016-12-05 2020-06-09 Lg Electronics Inc. Image encoding/decoding method and apparatus therefor

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130020562A (ko) * 2011-08-17 2013-02-27 주식회사 케이티 단거리 화면 내 예측 모드에서 화면 내 예측 방법 및 이러한 방법을 사용하는 장치
WO2014010943A1 (ko) * 2012-07-10 2014-01-16 한국전자통신연구원 영상 부호화/복호화 방법 및 장치
WO2017069419A1 (ko) * 2015-10-22 2017-04-27 엘지전자 주식회사 비디오 코딩 시스템에서 인트라 예측 방법 및 장치

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CHEN, JIANLE ET AL.: "Algorithm Description of Joint Exploration Test Model 7 (JEM 7)", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3 AND ISO/IEC JTC 1/SC 29/WG 11, JVET-G1001, 21 July 2017 (2017-07-21), Torino, IT, XP055576095 *
ROSEWARNE, CHRIS ET AL.: "High Efficiency Video Coding (HEVC) Test Model 16 (HM 16) Improved Encoder Description Update 9", JOINT COLLABORATIVE TEAM ON VIDEO CODING (JCT-VC) OF ITU-T SG 16 WP3 AND ISO/IEC JTC1/SC29/WG11, JCTVC-AB1002, 28TH MEETING, 21 July 2017 (2017-07-21), Torino, IT, XP030118276 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3804331A4 (en) * 2018-06-15 2021-08-11 Huawei Technologies Co., Ltd. INTRA PREDICTION PROCESS AND APPARATUS
US11546631B2 (en) 2018-06-15 2023-01-03 Huawei Technologies Co., Ltd. Method and apparatus for DC intra prediction of rectangular blocks using an aspect ratio
AU2019286133B2 (en) * 2018-06-15 2023-02-16 Huawei Technologies Co., Ltd. Method and apparatus for intra prediction
CN113826393A (zh) * 2019-05-03 2021-12-21 韩国电子通信研究院 图像编码/解码方法和装置以及存储比特流的记录介质

Also Published As

Publication number Publication date
AU2018327924A1 (en) 2020-01-02
US20220046235A1 (en) 2022-02-10
AU2018327924B2 (en) 2023-06-08
US20200099925A1 (en) 2020-03-26
CN116916012A (zh) 2023-10-20
CN117014606A (zh) 2023-11-07
KR20190028325A (ko) 2019-03-18
US11700366B2 (en) 2023-07-11
CN116916010A (zh) 2023-10-20
CN116916009A (zh) 2023-10-20
CN110710215A (zh) 2020-01-17
CN116916011A (zh) 2023-10-20
CA3065922A1 (en) 2019-03-14
US20230300324A1 (en) 2023-09-21
US11184606B2 (en) 2021-11-23

Similar Documents

Publication Publication Date Title
WO2018026219A1 (ko) 비디오 신호 처리 방법 및 장치
WO2019050292A1 (ko) 비디오 신호 처리 방법 및 장치
WO2017222326A1 (ko) 비디오 신호 처리 방법 및 장치
WO2017171370A1 (ko) 비디오 신호 처리 방법 및 장치
WO2017176030A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018155986A2 (ko) 비디오 신호 처리 방법 및 장치
WO2017204532A1 (ko) 영상 부호화/복호화 방법 및 이를 위한 기록 매체
WO2018106047A1 (ko) 비디오 신호 처리 방법 및 장치
WO2019050291A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018097626A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020111785A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019182292A1 (ko) 비디오 신호 처리 방법 및 장치
WO2017018664A1 (ko) 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2018124843A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019190201A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018212579A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018047995A1 (ko) 인트라 예측 모드 기반 영상 처리 방법 및 이를 위한 장치
WO2019039806A1 (ko) 영상 부호화/복호화 방법, 장치 및 비트스트림을 저장한 기록 매체
WO2019225993A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018056701A1 (ko) 비디오 신호 처리 방법 및 장치
WO2018066958A1 (ko) 비디오 신호 처리 방법 및 장치
WO2020050685A1 (ko) 인트라 예측을 이용한 영상 부호화/복호화 방법 및 장치
WO2020096428A1 (ko) 영상 신호 부호화/복호화 방법 및 이를 위한 장치
WO2019182295A1 (ko) 비디오 신호 처리 방법 및 장치
WO2019059681A1 (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: 18854044

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3065922

Country of ref document: CA

ENP Entry into the national phase

Ref document number: 2018327924

Country of ref document: AU

Date of ref document: 20180906

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18854044

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 26.01.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18854044

Country of ref document: EP

Kind code of ref document: A1