WO2019203559A1 - 영상 코딩 시스템에서 리그레션 모델 기반 필터링을 사용하는 영상 디코딩 방법 및 장치 - Google Patents

영상 코딩 시스템에서 리그레션 모델 기반 필터링을 사용하는 영상 디코딩 방법 및 장치 Download PDF

Info

Publication number
WO2019203559A1
WO2019203559A1 PCT/KR2019/004621 KR2019004621W WO2019203559A1 WO 2019203559 A1 WO2019203559 A1 WO 2019203559A1 KR 2019004621 W KR2019004621 W KR 2019004621W WO 2019203559 A1 WO2019203559 A1 WO 2019203559A1
Authority
WO
WIPO (PCT)
Prior art keywords
current block
samples
intra prediction
prediction mode
sample
Prior art date
Application number
PCT/KR2019/004621
Other languages
English (en)
French (fr)
Inventor
유선미
허진
Original Assignee
엘지전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 엘지전자 주식회사 filed Critical 엘지전자 주식회사
Publication of WO2019203559A1 publication Critical patent/WO2019203559A1/ko

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/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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • 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 image coding technology, and more particularly, to an image decoding method and apparatus using regression model-based filtering in an image coding system.
  • the demand for high resolution and high quality images such as high definition (HD) images and ultra high definition (UHD) images is increasing in various fields.
  • the higher the resolution and the higher quality of the image data the more information or bit rate is transmitted than the existing image data. Therefore, the image data can be transmitted by using a medium such as a conventional wired / wireless broadband line or by using a conventional storage medium. In the case of storage, the transmission cost and the storage cost are increased.
  • a high efficiency image compression technique is required to effectively transmit, store, and reproduce high resolution, high quality image information.
  • An object of the present invention is to provide a method and apparatus for improving image coding efficiency.
  • Another technical problem of the present invention is to provide an image decoding method and apparatus for deriving a regression model based on prediction samples and neighboring samples of a current block.
  • Another technical problem of the present invention is to provide a video decoding method and apparatus for deriving a regression model based on a prediction sample and a neighboring sample of a current block, and performing filtering on the boundary of the current block based on the derived regression model.
  • Another technical problem of the present invention is to provide an image decoding method and apparatus for adaptively determining whether to apply regression model-based filtering based on a specific condition and an application range.
  • an image decoding method performed by a decoding apparatus.
  • the method includes deriving an intra prediction mode for a current block, deriving peripheral samples including left peripheral samples and upper peripheral samples of the current block, based on the peripheral samples and the intra prediction mode. Deriving a prediction sample for the current block, deriving a regression model based on specific prediction samples and specific surrounding samples, and filtering for the specific prediction samples based on the regression model And deriving the filtered specific prediction samples.
  • a decoding apparatus for performing image decoding.
  • the decoding apparatus derives an intra prediction mode for the current block, derives neighboring samples including left neighboring samples and upper neighboring samples of the current block, and calculates the current based on the neighboring samples and the intra prediction mode.
  • a post filter for deriving filtered specific prediction samples.
  • a video encoding method performed by an encoding apparatus includes determining an intra prediction mode for a current block, deriving peripheral samples including left peripheral samples and upper peripheral samples of the current block, based on the peripheral samples and the intra prediction mode. Deriving a prediction sample for the current block, deriving a regression model based on particular prediction samples and specific surrounding samples, filtering the specific prediction samples based on the regression model And deriving filtered specific prediction samples, and encoding image information including information on prediction of the current block.
  • a video encoding apparatus determines an intra prediction mode for the current block, derives surrounding samples including left neighboring samples and upper neighboring samples of the current block, and calculates the current based on the neighboring samples and the intra prediction mode.
  • a regression model is derived based on a prediction unit that derives prediction samples for a block, specific prediction samples, and specific neighboring samples, and performs filtering on the specific prediction samples based on the regression model.
  • a post filter unit for deriving the filtered specific prediction samples, and an entropy encoding unit for encoding image information including information about the prediction of the current block.
  • boundary filtering may be performed based on a regression model derived based on the prediction sample and the neighboring sample of the current block, thereby reducing the amount of bits for the residual signal for the current block. Occurrence can be prevented and subjective picture quality can be improved.
  • FIG. 1 is a diagram schematically illustrating a configuration of a video encoding apparatus to which the present invention may be applied.
  • FIG. 2 is a diagram schematically illustrating a configuration of a video decoding apparatus to which the present invention may be applied.
  • FIG. 3 is another example schematically illustrating a video encoding apparatus to which the present invention can be applied.
  • FIG. 4 exemplarily illustrates a process of performing intra prediction in an encoding apparatus.
  • FIG. 5 shows another example schematically illustrating a video decoding apparatus to which the present invention can be applied.
  • FIG. 6 exemplarily illustrates a process of performing intra prediction in a decoding apparatus.
  • FIG. 9 illustrates that when a position of a reference sample located in the prediction direction of the directional intra prediction mode is a fractional sample position, a prediction sample of the target sample is derived based on integer samples adjacent to the left and right sides of the reference sample; An example is shown.
  • FIG. 10 illustrates an example of discontinuity generated between prediction samples and neighboring samples derived in the intra prediction mode.
  • 11 exemplarily shows left neighboring samples and prediction samples used to derive a regression model when an intra prediction mode having a vertical positive angle is applied to the current block.
  • FIG. 12 exemplarily illustrates prediction samples to which filtering performed based on a regression model is applied when an intra prediction mode having a vertical positive angle is applied to the current block.
  • FIG. 13 schematically illustrates an image encoding method by an encoding apparatus according to the present invention.
  • FIG. 14 schematically illustrates an encoding apparatus for performing an image encoding method according to the present invention.
  • FIG. 16 schematically shows a decoding apparatus for performing an image decoding method according to the present invention.
  • each configuration in the drawings described in the present invention are shown independently for the convenience of description of the different characteristic functions, it does not mean that each configuration is implemented by separate hardware or separate software.
  • two or more of each configuration may be combined to form one configuration, or one configuration may be divided into a plurality of configurations.
  • Embodiments in which each configuration is integrated and / or separated are also included in the scope of the present invention without departing from the spirit of the present invention.
  • the present invention relates to video / image coding.
  • the method / embodiment disclosed herein may be applied to the method disclosed in the versatile video coding (VVC) standard or the next generation video / image coding standard.
  • VVC versatile video coding
  • a picture generally refers to a unit representing one image of a specific time zone
  • a slice is a unit constituting a part of a picture in coding.
  • One picture may be composed of a plurality of slices, and if necessary, the picture and the slice may be mixed with each other.
  • a pixel or a pel may refer to a minimum unit constituting one picture (or image). Also, 'sample' may be used as a term corresponding to a pixel.
  • a sample may generally represent a pixel or a value of a pixel, and may only represent pixel / pixel values of the luma component, or only pixel / pixel values of the chroma component.
  • a unit represents the basic unit of image processing.
  • the unit may include at least one of a specific region of the picture and information related to the region.
  • the unit may be used interchangeably with terms such as block or area in some cases.
  • an M ⁇ N block may represent a set of samples or transform coefficients composed of M columns and N rows.
  • FIG. 1 is a diagram schematically illustrating a configuration of a video encoding apparatus to which the present invention may be applied.
  • the video encoding apparatus 100 may include a picture splitter 105, a predictor 110, a residual processor 120, an entropy encoder 130, an adder 140, and a filter 150. ) And memory 160.
  • the residual processing unit 120 may include a subtraction unit 121, a conversion unit 122, a quantization unit 123, a reordering unit 124, an inverse quantization unit 125, and an inverse conversion unit 126.
  • the picture divider 105 may divide the input picture into at least one processing unit.
  • the processing unit may be called a coding unit (CU).
  • the coding unit may be recursively divided according to a quad-tree binary-tree (QTBT) structure from a largest coding unit (LCU).
  • QTBT quad-tree binary-tree
  • LCU largest coding unit
  • one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad tree structure and / or a binary tree structure.
  • the quad tree structure may be applied first and the binary tree structure may be applied later.
  • the binary tree structure may be applied first.
  • the coding procedure according to the present invention may be performed based on the final coding unit that is no longer split.
  • the maximum coding unit may be used as the final coding unit immediately based on coding efficiency according to the image characteristic, or if necessary, the coding unit is recursively divided into coding units of lower depths and optimized.
  • a coding unit of size may be used as the final coding unit.
  • the coding procedure may include a procedure of prediction, transform, and reconstruction, which will be described later.
  • the processing unit may include a coding unit (CU) prediction unit (PU) or a transform unit (TU).
  • the coding unit may be split from the largest coding unit (LCU) into coding units of deeper depths along the quad tree structure.
  • LCU largest coding unit
  • the maximum coding unit may be used as the final coding unit immediately based on coding efficiency according to the image characteristic, or if necessary, the coding unit is recursively divided into coding units of lower depths and optimized.
  • a coding unit of size may be used as the final coding unit. If a smallest coding unit (SCU) is set, the coding unit may not be split into smaller coding units than the minimum coding unit.
  • the final coding unit refers to a coding unit that is the basis of partitioning or partitioning into a prediction unit or a transform unit.
  • the prediction unit is a unit partitioning from the coding unit and may be a unit of sample prediction. In this case, the prediction unit may be divided into sub blocks.
  • the transform unit may be divided along the quad tree structure from the coding unit, and may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.
  • a coding unit may be called a coding block (CB)
  • a prediction unit is a prediction block (PB)
  • a transform unit may be called a transform block (TB).
  • a prediction block or prediction unit may mean a specific area in the form of a block within a picture, and may include an array of prediction samples.
  • a transform block or a transform unit may mean a specific area in a block form within a picture, and may include an array of transform coefficients or residual samples.
  • the prediction unit 110 may perform a prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples of the current block.
  • the unit of prediction performed by the prediction unit 110 may be a coding block, a transform block, or a prediction block.
  • the prediction unit 110 may determine whether intra prediction or inter prediction is applied to the current block. As an example, the prediction unit 110 may determine whether intra prediction or inter prediction is applied on a CU basis.
  • the prediction unit 110 may derive a prediction sample for the current block based on reference samples outside the current block in the picture to which the current block belongs (hereinafter, referred to as the current picture). In this case, the prediction unit 110 may (i) derive the prediction sample based on the average or interpolation of neighboring reference samples of the current block, and (ii) the neighbor reference of the current block.
  • the prediction sample may be derived based on a reference sample present in a specific (prediction) direction with respect to the prediction sample among the samples. In case of (i), it may be called non-directional mode or non-angle mode, and in case of (ii), it may be called directional mode or angular mode.
  • the prediction mode may have, for example, 33 directional prediction modes and at least two non-directional modes.
  • the non-directional mode may include a DC prediction mode and a planner mode (Planar mode).
  • the prediction unit 110 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
  • the prediction unit 110 may derive the prediction sample for the current block based on the sample specified by the motion vector on the reference picture.
  • the prediction unit 110 may apply one of a skip mode, a merge mode, and a motion vector prediction (MVP) mode to derive a prediction sample for the current block.
  • the prediction unit 110 may use the motion information of the neighboring block as the motion information of the current block.
  • the skip mode unlike the merge mode, the difference (residual) between the prediction sample and the original sample is not transmitted.
  • the MVP mode the motion vector of the current block may be derived using the motion vector of the neighboring block as a motion vector predictor.
  • the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block present in the reference picture.
  • a reference picture including the temporal neighboring block may be called a collocated picture (colPic).
  • the motion information may include a motion vector and a reference picture index.
  • Information such as prediction mode information and motion information may be encoded (entropy) and output in the form of a bitstream.
  • the highest picture on the reference picture list may be used as the reference picture.
  • Reference pictures included in a reference picture list may be sorted based on a difference in a picture order count (POC) between a current picture and a corresponding reference picture.
  • POC picture order count
  • the subtraction unit 121 generates a residual sample which is a difference between the original sample and the prediction sample.
  • residual samples may not be generated as described above.
  • the transform unit 122 generates transform coefficients by transforming the residual sample in units of transform blocks.
  • the transform unit 122 may perform the transform according to the size of the transform block and the prediction mode applied to the coding block or the prediction block that spatially overlaps the transform block. For example, if intra prediction is applied to the coding block or the prediction block that overlaps the transform block, and the transform block is a 4 ⁇ 4 residual array, the residual sample is configured to perform a discrete sine transform (DST) transform kernel.
  • the residual sample may be transformed using a discrete cosine transform (DCT) transform kernel.
  • DST discrete sine transform
  • DCT discrete cosine transform
  • the quantization unit 123 may quantize the transform coefficients to generate quantized transform coefficients.
  • the reordering unit 124 rearranges the quantized transform coefficients.
  • the reordering unit 124 may reorder the quantized transform coefficients in the form of a block into a one-dimensional vector form through a coefficient scanning method. Although the reordering unit 124 has been described in a separate configuration, the reordering unit 124 may be part of the quantization unit 123.
  • the entropy encoding unit 130 may perform entropy encoding on the quantized transform coefficients.
  • Entropy encoding may include, for example, encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), and the like.
  • the entropy encoding unit 130 may encode information necessary for video reconstruction other than the quantized transform coefficient (for example, a value of a syntax element) together or separately. Entropy encoded information may be transmitted or stored in units of network abstraction layer (NAL) units in the form of bitstreams.
  • NAL network abstraction layer
  • the inverse quantization unit 125 inversely quantizes the quantized values (quantized transform coefficients) in the quantization unit 123, and the inverse transformer 126 inversely transforms the inverse quantized values in the inverse quantization unit 125 to generate a residual sample.
  • the adder 140 reconstructs the picture by combining the residual sample and the predictive sample.
  • the residual sample and the predictive sample may be added in units of blocks to generate a reconstructed block.
  • the adder 140 may be part of the predictor 110.
  • the adder 140 may be called a restoration unit or a restoration block generation unit.
  • the filter unit 150 may apply a deblocking filter and / or a sample adaptive offset to the reconstructed picture. Through deblocking filtering and / or sample adaptive offset, the artifacts of the block boundaries in the reconstructed picture or the distortion in the quantization process can be corrected.
  • the sample adaptive offset may be applied on a sample basis and may be applied after the process of deblocking filtering is completed.
  • the filter unit 150 may apply an adaptive loop filter (ALF) to the reconstructed picture. ALF may be applied to the reconstructed picture after the deblocking filter and / or sample adaptive offset is applied.
  • ALF adaptive loop filter
  • the memory 160 may store reconstructed pictures (decoded pictures) or information necessary for encoding / decoding.
  • the reconstructed picture may be a reconstructed picture after the filtering process is completed by the filter unit 150.
  • the stored reconstructed picture may be used as a reference picture for (inter) prediction of another picture.
  • the memory 160 may store (reference) pictures used for inter prediction.
  • pictures used for inter prediction may be designated by a reference picture set or a reference picture list.
  • FIG. 2 is a diagram schematically illustrating a configuration of a video decoding apparatus to which the present invention may be applied.
  • the video decoding apparatus 200 may include an entropy decoding unit 210, a residual processor 220, a predictor 230, an adder 240, a filter 250, and a memory 260. It may include.
  • the residual processor 220 may include a rearrangement unit 221, an inverse quantization unit 222, and an inverse transform unit 223.
  • the video decoding apparatus 200 may restore video in response to a process in which video information is processed in the video encoding apparatus.
  • the video decoding apparatus 200 may perform video decoding using a processing unit applied in the video encoding apparatus.
  • the processing unit block of video decoding may be, for example, a coding unit, and in another example, a coding unit, a prediction unit, or a transform unit.
  • the coding unit may be split along the quad tree structure and / or binary tree structure from the largest coding unit.
  • the prediction unit and the transform unit may be further used in some cases, in which case the prediction block is a block derived or partitioned from the coding unit and may be a unit of sample prediction. At this point, the prediction unit may be divided into subblocks.
  • the transform unit may be divided along the quad tree structure from the coding unit, and may be a unit for deriving a transform coefficient or a unit for deriving a residual signal from the transform coefficient.
  • the entropy decoding unit 210 may parse the bitstream and output information necessary for video reconstruction or picture reconstruction. For example, the entropy decoding unit 210 decodes information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, quantized values of syntax elements required for video reconstruction, and transform coefficients for residuals. Can be output.
  • a coding method such as exponential Golomb coding, CAVLC, or CABAC, quantized values of syntax elements required for video reconstruction, and transform coefficients for residuals. Can be output.
  • the CABAC entropy decoding method receives a bin corresponding to each syntax element in a bitstream, and decodes syntax element information and decoding information of neighboring and decoding target blocks or information of symbols / bins decoded in a previous step.
  • the context model may be determined using the context model, the probability of occurrence of a bin may be predicted according to the determined context model, and arithmetic decoding of the bin may be performed to generate a symbol corresponding to the value of each syntax element. have.
  • the CABAC entropy decoding method may update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bean after determining the context model.
  • the information related to the prediction among the information decoded by the entropy decoding unit 210 is provided to the prediction unit 230, and the residual value on which the entropy decoding has been performed by the entropy decoding unit 210, that is, the quantized transform coefficient, is used as a reordering unit ( 221 may be input.
  • the reordering unit 221 may rearrange the quantized transform coefficients in a two-dimensional block form.
  • the reordering unit 221 may perform reordering in response to coefficient scanning performed by the encoding apparatus.
  • the rearrangement unit 221 has been described in a separate configuration, but the rearrangement unit 221 may be part of the inverse quantization unit 222.
  • the inverse quantization unit 222 may dequantize the quantized transform coefficients based on the (inverse) quantization parameter and output the transform coefficients.
  • information for deriving a quantization parameter may be signaled from the encoding apparatus.
  • the inverse transform unit 223 may inversely transform transform coefficients to derive residual samples.
  • the prediction unit 230 may perform prediction on the current block and generate a predicted block including prediction samples for the current block.
  • the unit of prediction performed by the prediction unit 230 may be a coding block, a transform block, or a prediction block.
  • the prediction unit 230 may determine whether to apply intra prediction or inter prediction based on the information about the prediction.
  • a unit for determining which of intra prediction and inter prediction is to be applied and a unit for generating a prediction sample may be different.
  • the unit for generating a prediction sample in inter prediction and intra prediction may also be different.
  • whether to apply inter prediction or intra prediction may be determined in units of CUs.
  • a prediction mode may be determined and a prediction sample may be generated in PU units
  • intra prediction a prediction mode may be determined in PU units and a prediction sample may be generated in TU units.
  • the prediction unit 230 may derive the prediction sample for the current block based on the neighbor reference samples in the current picture.
  • the prediction unit 230 may derive the prediction sample for the current block by applying the directional mode or the non-directional mode based on the neighbor reference samples of the current block.
  • the prediction mode to be applied to the current block may be determined using the intra prediction mode of the neighboring block.
  • the prediction unit 230 may derive the prediction sample for the current block based on the sample specified on the reference picture by the motion vector on the reference picture.
  • the prediction unit 230 may apply any one of a skip mode, a merge mode, and an MVP mode to derive a prediction sample for the current block.
  • motion information required for inter prediction of the current block provided by the video encoding apparatus for example, information about a motion vector, a reference picture index, and the like may be obtained or derived based on the prediction information.
  • the motion information of the neighboring block may be used as the motion information of the current block.
  • the neighboring block may include a spatial neighboring block and a temporal neighboring block.
  • the prediction unit 230 may construct a merge candidate list using motion information of available neighboring blocks, and may use information indicated by the merge index on the merge candidate list as a motion vector of the current block.
  • the merge index may be signaled from the encoding device.
  • the motion information may include a motion vector and a reference picture. When the motion information of the temporal neighboring block is used in the skip mode and the merge mode, the highest picture on the reference picture list may be used as the reference picture.
  • the difference (residual) between the prediction sample and the original sample is not transmitted.
  • the motion vector of the current block may be derived using the motion vector of the neighboring block as a motion vector predictor.
  • the neighboring block may include a spatial neighboring block and a temporal neighboring block.
  • a merge candidate list may be generated by using a motion vector of a reconstructed spatial neighboring block and / or a motion vector corresponding to a Col block, which is a temporal neighboring block.
  • the motion vector of the candidate block selected from the merge candidate list is used as the motion vector of the current block.
  • the information about the prediction may include a merge index indicating a candidate block having an optimal motion vector selected from candidate blocks included in the merge candidate list.
  • the prediction unit 230 may derive the motion vector of the current block by using the merge index.
  • a motion vector predictor candidate list may be generated using a motion vector of a reconstructed spatial neighboring block and / or a motion vector corresponding to a Col block, which is a temporal neighboring block.
  • the prediction information may include a prediction motion vector index indicating an optimal motion vector selected from the motion vector candidates included in the list.
  • the prediction unit 230 may select the predicted motion vector of the current block from the motion vector candidates included in the motion vector candidate list using the motion vector index.
  • the prediction unit of the encoding apparatus may obtain a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, and may encode the output vector in a bitstream form. That is, MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block.
  • the prediction unit 230 may obtain a motion vector difference included in the information about the prediction, and derive the motion vector of the current block by adding the motion vector difference and the motion vector predictor.
  • the prediction unit may also obtain or derive a reference picture index or the like indicating a reference picture from the information about the prediction.
  • the adder 240 may reconstruct the current block or the current picture by adding the residual sample and the predictive sample.
  • the adder 240 may reconstruct the current picture by adding the residual sample and the predictive sample in block units. Since the residual is not transmitted when the skip mode is applied, the prediction sample may be a reconstruction sample.
  • the adder 240 has been described in a separate configuration, the adder 240 may be part of the predictor 230. On the other hand, the adder 240 may be called a restoration unit or a restoration block generation unit.
  • the filter unit 250 may apply the deblocking filtering sample adaptive offset, and / or ALF to the reconstructed picture.
  • the sample adaptive offset may be applied in units of samples and may be applied after deblocking filtering.
  • ALF may be applied after deblocking filtering and / or sample adaptive offset.
  • the memory 260 may store reconstructed pictures (decoded pictures) or information necessary for decoding.
  • the reconstructed picture may be a reconstructed picture after the filtering process is completed by the filter unit 250.
  • the memory 260 may store pictures used for inter prediction.
  • pictures used for inter prediction may be designated by a reference picture set or a reference picture list.
  • the reconstructed picture can be used as a reference picture for another picture.
  • the memory 260 may output the reconstructed picture in an output order.
  • intra prediction when intra prediction is applied to the current block, prediction may be performed based on neighboring samples of the current block.
  • prediction since prediction is performed in units of blocks, there may be a problem in that discontinuities between blocks occur. Therefore, after performing intra prediction on the current block, a method of removing the discontinuity between the current block and the neighboring blocks of the current block may be proposed, thereby preventing generation of a residual signal for the current block and improving subjective picture quality. It is possible to obtain an effect.
  • an encoding process / decoding process in which intra prediction is used may be as described below.
  • FIG. 3 is another example schematically illustrating a video encoding apparatus to which the present invention can be applied.
  • the video encoding apparatus may include an intra predictor, a reference smoothing unit 300, a predictor 310, a post-filter unit 320, a transformer 330, and a quantizer 340.
  • the intra prediction unit may include a reference smoothing unit 300, a prediction unit 310, and a post-filter unit 320.
  • the reference smoothing unit 300 may select the left neighboring samples and the upper neighboring samples used for intra prediction of the current block in a picture to which the current block belongs (hereinafter, referred to as the current picture).
  • a smoothing process may be performed based on the size of the block and the sample value. This may prevent visual artifacts with respect to the predicted samples of the current block, which may be generated due to the difference in the sample values of the left peripheral samples and the upper peripheral samples.
  • the prediction unit 310 may derive a prediction sample based on (i) an average or interpolation of the left neighboring samples and the upper neighboring samples of the current block, and (ii) the left neighboring sample. And the prediction sample may be derived based on a surrounding sample present in a specific (prediction) direction with respect to the prediction sample among the upper surrounding samples. In case of (i), it may be called non-directional mode or non-angle mode, and in case of (ii), it may be called directional mode or angular mode. In intra prediction, the prediction mode may have, for example, 33 directional prediction modes and at least two non-directional modes. The non-directional mode may include a DC prediction mode and a planner mode (Planar mode). The prediction unit 310 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
  • the post-filter unit 320 post-processing to alleviate the discontinuity between the current block and neighboring samples. Filtering can be performed. Thereafter, the encoding apparatus may derive the difference between the prediction sample and the original sample as a residual sample, and the transform unit 330 may generate a transform coefficient by converting the residual sample on a block basis.
  • the quantization unit 340 may quantize the transform coefficients to generate quantized transform coefficients.
  • the encoding apparatus may perform intra prediction to generate a prediction sample of the current block (S400).
  • the prediction sample may be referred to as a prediction signal or an intra prediction signal.
  • the encoding apparatus may perform a smoothing process on the left neighboring samples and the upper neighboring samples used for intra prediction of the current block based on the size and the sample value of the current block (S410). Thereafter, the encoding apparatus may generate the prediction sample by performing the prediction according to the intra prediction mode as described above (S420), and post-processing for mitigating discontinuity between the current block and neighboring samples. ) Filtering may be performed (S430).
  • the encoding apparatus may generate a residual sample based on the difference between the prediction sample and the original sample (S440), and may transform transform samples to generate transform coefficients (S450). In addition, the encoding apparatus may quantize the transform coefficients to generate quantized transform coefficients (S460), and may entropy encode and signal the quantized transform coefficients (S470).
  • FIG. 5 shows another example schematically illustrating a video decoding apparatus to which the present invention can be applied.
  • the video encoding apparatus may include an intra predictor, a reference smoothing unit 500, a predictor 510, a post-filter unit 520, an inverse quantizer 530, and an inverse transform unit 540.
  • the intra prediction unit may include a reference smoothing unit 500, a prediction unit 510, and a post-filter unit 520.
  • the intra predictor may derive the prediction sample for the current block by applying the directional mode or the non-directional mode based on the peripheral reference samples of the current block. In this case, the prediction mode to be applied to the current block may be determined using the intra prediction mode of the neighboring block.
  • the reference smoothing unit 500 may include the left neighboring samples and the upper neighboring sample used for intra prediction of the current block in a picture to which the current block belongs (hereinafter, referred to as the current picture).
  • the smoothing process may be performed based on the size and sample value of the current block. This may prevent visual artifacts with respect to the predicted samples of the current block, which may be generated due to the difference in the sample values of the left peripheral samples and the upper peripheral samples.
  • the prediction unit 510 may derive a prediction sample based on (i) an average or interpolation of the left neighboring samples and the upper neighboring samples of the current block, and (ii) the left neighboring sample. And the prediction sample may be derived based on a surrounding sample present in a specific (prediction) direction with respect to the prediction sample among the upper surrounding samples. In case of (i), it may be called non-directional mode or non-angle mode, and in case of (ii), it may be called directional mode or angular mode. In intra prediction, the prediction mode may have, for example, 33 directional prediction modes and at least two non-directional modes. The non-directional mode may include a DC prediction mode and a planner mode (Planar mode). The prediction unit 510 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
  • the post-filter unit 520 post-processing to alleviate the discontinuity between the current block and neighboring samples. Filtering can be performed. Thereafter, the inverse quantization unit 530 may inverse quantize the quantized transform coefficients received from the encoding apparatus, and the inverse transform unit 540 inversely transforms the inverse quantized transform coefficients and residuals in block units. Samples can be generated. The decoding apparatus may reconstruct the current block encoded based on intra prediction based on the residual sample and the prediction sample.
  • the decoding apparatus may entropy decode entropy-encoded information received through the bitstream to obtain quantized transform coefficients (S600). Next, the decoding apparatus may inversely quantize the quantized transform coefficients to obtain transform coefficients (S610), and inversely transform the transform coefficients to generate residual samples in block units (S620). Next, the decoding apparatus may perform intra prediction to generate a prediction sample of the current block (S630). The prediction sample may be referred to as a prediction signal or an intra prediction signal.
  • the decoding apparatus may perform a smoothing process on the left neighboring samples and the upper neighboring samples used for intra prediction of the current block based on the size and the sample value of the current block (S640). Thereafter, the decoding apparatus may generate the prediction sample by performing the prediction according to the intra prediction mode as described above (S650), and post-processing for mitigating discontinuity between the current block and neighboring samples. ) Filtering may be performed (S660). The decoding apparatus may generate a reconstructed sample of the current block by adding the prediction sample and the residual sample (S670).
  • the intra prediction may be performed based on neighboring samples that have already been encoded / decoded at the decoding time of the current block. That is, the predictive sample of the current block may be reconstructed using the left neighboring samples and the upper neighboring samples of the current block that have already been reconstructed.
  • the left peripheral samples and the upper peripheral samples may be represented as shown in FIG. 7.
  • an intra prediction mode for the current block may be derived, and the current block using at least one of the left neighboring samples and the upper neighboring samples according to the intra prediction mode.
  • a prediction sample for may be generated, and a reconstructed sample of the current block may be derived by adding the prediction sample and the residual sample derived based on the residual signal of the signaled current block.
  • the peripheral samples of the current block may include 2W upper peripheral samples, 2H left peripheral samples, and a left upper corner peripheral sample.
  • the left neighboring samples are p [-1] [0. ] To p [-1] [2H-1], the sample around the upper left corner is p [-1] [-1], and the sample around the upper side is p [0] [-1] to p [2W-1] [-1].
  • the left neighboring samples and the upper neighboring samples used for intra prediction of the current block may be smoothed based on the size and sample value of the current block. That is, filtering may be performed to reduce the difference between the sample values of each of the left side samples and the top side samples based on the size and sample value of the current block. This may prevent visual artifacts with respect to the predicted samples of the current block, which may be generated due to the difference in the sample values of the left peripheral samples and the upper peripheral samples.
  • the intra prediction mode may include two non-directional intra prediction modes and 33 directional intra prediction modes.
  • the non-directional intra prediction modes may include a planar intra prediction mode and a DC intra prediction mode, and the directional intra prediction modes may include 2 to 34 intra prediction modes.
  • the planner intra prediction mode may be called a planner mode, and the DC intra prediction mode may be called a DC mode.
  • the intra prediction mode 10 may be a horizontal intra prediction mode or a horizontal mode
  • the intra intra prediction mode 26 may be a vertical intra prediction mode or a vertical mode.
  • the prediction direction of angular intra mode) can be expressed in degrees.
  • the relative angle corresponding to each intra prediction mode may be expressed based on the horizontal reference angle 0 ° corresponding to the intra prediction mode 10, and the vertical reference angle corresponding to the intra prediction mode 26 reference 0 °.
  • the relative angle corresponding to each intra prediction mode can be expressed.
  • the intra prediction mode may include two non-directional intra prediction modes and 65 directional intra prediction modes.
  • the non-directional intra prediction modes may include a planar intra prediction mode and a DC intra prediction mode, and the directional intra prediction modes may include 2 to 66 intra prediction modes.
  • an intra prediction mode having horizontal directionality and an intra prediction mode having vertical directionality may be distinguished from the intra prediction mode 34 having an upper left diagonal prediction direction.
  • H and V in FIG. 8 mean horizontal directionality and vertical directionality, respectively, and a number of -32 to 32 represents a displacement of 1/32 on a sample grid position.
  • Intra prediction modes 2 to 33 have horizontal orientation, and intra prediction modes 34 to 66 have vertical orientation.
  • Intra prediction mode 18 and intra prediction mode 50 respectively indicate a horizontal intra prediction mode and a vertical intra prediction mode, and based on this, an angular intra prediction mode is used.
  • the prediction direction can be expressed in degrees.
  • the relative angle corresponding to each intra prediction mode may be expressed based on the horizontal reference angle 0 ° corresponding to the 18th intra prediction mode, and the vertical reference angle corresponding to the 50th intra prediction mode may be expressed as 0 °.
  • the relative angle corresponding to each intra prediction mode can be expressed.
  • the second intra prediction mode may be referred to as a left downward diagonal intra prediction mode
  • the 34 intra prediction mode may be referred to as a left upward diagonal intra prediction mode
  • the 66 intra prediction mode may be referred to as a right upward diagonal intra prediction mode.
  • the prediction sample of the target sample is based on a reference sample located in the prediction direction of the directional intra prediction mode based on the target sample on which the intra prediction in the current block is performed.
  • Can be derived That is, the reference sample located in the prediction direction may be copied and derived as the prediction sample.
  • the reference sample may represent a neighboring sample located in the prediction direction of the directional intra prediction mode based on the target sample among the upper neighboring samples and the left neighboring samples of the current block.
  • the sample value of the reference sample may be derived through interpolation between integer samples adjacent to the left and right sides of the reference sample, and the prediction of the target sample is based on the reference sample. Samples can be derived. Interpolation between the integer samples may be performed based on a distance ratio between the reference sample and the integer samples.
  • FIG. 9 illustrates that when a position of a reference sample located in the prediction direction of the directional intra prediction mode is a fractional sample position, a prediction sample of the target sample is derived based on integer samples adjacent to the left and right sides of the reference sample; An example is shown.
  • the fractional sample position of a reference sample located in the prediction direction of the directional intra prediction mode based on the target sample may be derived as tan ⁇ * (y + 1).
  • the tan ⁇ value for the angle ⁇ of each directional intra prediction mode for calculating the fractional sample position may be defined by scaling in integer units beforehand to make it easier to perform the calculation.
  • the tan ⁇ value of each scaled directional intra prediction mode may be derived as shown in the following table.
  • predModeIntra may represent each directional intra prediction mode
  • intraPredAngle may represent a prediction angle of each directional intra prediction mode, or may represent a scaled tan ⁇ approximation of each directional intra prediction mode.
  • Table 1 a tan ⁇ approximation value according to the predefined intra prediction mode may be derived.
  • the tan ⁇ 1 ⁇ value of each scaled directional intra prediction mode may be derived as shown in the following table.
  • predModeIntra may represent each directional intra prediction mode
  • intraPredAngle may represent an inverse prediction angle of each directional intra prediction mode, or a scaled tan - 1 ⁇ approximation of each directional intra prediction mode. Can be represented. Based on Table 2, a tan - 1 ⁇ approximation value according to the predefined intra prediction mode may be derived.
  • an anisotropic intra prediction mode may be applied to the current block.
  • the non-directional intra prediction modes may include a planar intra prediction mode and a DC intra prediction mode.
  • the planner intra prediction mode may be called a planner mode
  • the DC intra prediction mode may be called a DC mode.
  • a prediction sample of the current block may be derived based on an average value of neighboring samples of the current block.
  • Intra prediction performed based on the DC mode may be efficiently performed when values of samples of the current block are similar.
  • discontinuity between a predicted block of the current block and neighboring samples may occur.
  • the planner mode is designed to compensate for this problem.
  • the planner mode performs horizontal linear prediction and vertical linear prediction based on reference samples of the target sample, and then averages the derived values to generate a prediction sample of the target sample. Indicates a prediction mode.
  • the integer sample unit is referred to the prediction direction of the directional intra prediction mode of the current block based on the target sample of the current block.
  • the position of the reference sample located in the prediction direction of the directional intra prediction mode with respect to the target sample is a fractional sample position, between integer samples between the left and right of the reference sample.
  • a sample value of the reference sample may be derived through interpolation, and a prediction sample of the target sample may be derived based on the derived reference sample.
  • the integer samples may represent peripheral samples of an integer sample location located around the location of the reference sample.
  • interpolation between the integer samples to the left and right of the reference sample may be derived based on one of various interpolation filters.
  • the interpolation may be performed based on an interpolation filter having a low pass filter effect, or the interpolation may be performed based on a sophisticated interpolation filter.
  • the interpolation filter having the low pass filter effect may represent a linear filter, a Gaussian filter, or the like, and the sophisticated interpolation filter may represent a spline filter.
  • the spline filter may be called a cubic filter.
  • the interpolation filters may be 4-tap interpolation filters.
  • p [x] [y] can represent the predictive sample of the target sample
  • f [0], f [1], f [2] and f [3] can represent the filter coefficients of the interpolation filter
  • ref [n] may represent an nth neighboring sample
  • iIdx may represent an integer index of a fractional sample position located in the prediction direction of the intra prediction mode of the current block based on the target sample.
  • the integer index of the fractional sample position may represent an integer value excluding the remainder of the fractional sample position.
  • the filter coefficients of the cubic filter which is one of the low pass filters
  • the Gaussian filter which is one of the interpolation filters having the low pass filter effect
  • the sub-pel position n / 32 may represent the remaining value of the fractional sample position located in the prediction direction of the intra prediction mode of the current block with respect to the target sample.
  • Filter coefficients of a cubic filter or filter coefficients of a Gaussian filter may be derived based on the fractional sample position of the target sample and Table 3 above.
  • the distance between the target sample and the reference sample of the current block according to the prediction angle of the directional intra prediction mode.
  • the greater the distance the less accurate the prediction.
  • a method of improving prediction accuracy by selecting an appropriate interpolation filter according to the distance between the target sample and the reference sample and performing prediction based on the reference sample derived by applying the selected interpolation filter may be proposed.
  • An appropriate interpolation filter and a method of selecting the appropriate interpolation filter according to the distance between the target sample and the reference sample may be described later.
  • the interpolation filter may be selected based on the size of the current block or the intra prediction mode of the current block.
  • an elaborate interpolation filter e.g., cubic filter
  • Reference samples can be derived.
  • an interpolation filter e.g, a Gaussian filter
  • a reference sample of the block may be derived based on the sophisticated interpolation filter.
  • an interpolation filter may be selected based on the width of the current block, and the intra prediction mode of the current block is intra prediction having a horizontal direction. In the mode, an interpolation filter may be selected based on the height of the current block. For example, when the intra prediction mode of the current block is an intra prediction mode having vertical direction, when the width of the current block is less than or equal to 8, a fine interpolation filter (for example, a cubic filter) may be selected. If the width of the current block is greater than 8, an interpolation filter (eg, a Gaussian filter) having a low pass filter effect may be selected.
  • an interpolation filter eg, a Gaussian filter
  • the intra prediction mode of the current block is an intra prediction mode having horizontal directionality
  • a sophisticated interpolation filter for example, a cubic filter
  • an interpolation filter eg, a Gaussian filter with a low pass filter effect may be selected.
  • filtering may be applied to reduce the boundary between the current block and the neighboring block in order to reduce an error with the already reconstructed sample of the neighboring block of the current block.
  • the boundary between the prediction blocks of the current block may be highlighted as the error between the neighboring blocks increases.
  • an intra prediction mode such as a vertical intra prediction mode, a horizontal intra prediction mode, or a diagonal intra prediction mode is applied to an intra prediction mode that mainly uses one side (upper or left) of the upper peripheral samples and the left peripheral samples, the prediction is not performed. Discontinuity with the surrounding sample may occur.
  • a smoothing filter may be applied between the neighboring sample and the prediction sample of the current block.
  • whether to apply the smoothing filter may be determined according to the intra prediction mode applied to the current block and / or the size of the current block. For example, when the intra prediction mode of the current block is a DC intra prediction mode, a horizontal intra prediction mode, or a vertical intra prediction mode, the smoothing is performed when one side (ie, a width or a height) of the current block is greater than 16. The filter may not be applied.
  • the smoothing filter may be a bi-linear or linear based filter defined for each intra prediction mode.
  • the smoothing filter is mainly applied to all the sides of the current block in contact with the neighboring samples (for example, the intra prediction mode of the current block is the DC intra prediction mode) and the prediction. It may be applied only to the side in contact with the neighboring samples that are not (for example, the left side when the intra prediction mode of the current block is a vertical intra prediction mode).
  • the intra prediction mode of the current block is a diagonal intra prediction mode (eg, intra prediction mode 66 or intra prediction mode 66). ).
  • the smoothing filter may be applied to up to 4 samples within the contact side, and in the case of DC intra prediction mode, vertical intra prediction mode, or horizontal intra prediction mode, the smoothing filter may be applied up to 1 sample within the contact side. Can be.
  • the present invention proposes another boundary filtering method for removing the discontinuity between the predicted block derived by using the neighboring sample and the intra prediction mode of the current block and the already decoded neighboring sample. Through this, the amount of bits for the residual signal for the current block can be reduced or prevented, and subjective picture quality can be improved.
  • the intra prediction mode having a positive angle may include modes having a horizontal positive angle and intra prediction modes having a vertical positive angle, and having a horizontal positive angle.
  • the modes may be intra prediction modes 2-18, and the modes having the vertical positive angle may be intra prediction modes 50-50.
  • a discontinuity between prediction samples generated when the intra prediction mode 66 is applied to the current block and neighboring samples may be exemplarily illustrated.
  • the intra prediction mode has a vertical direction and has a vertical direction. Therefore, left neighboring samples may not be used for prediction of the current block.
  • the left periphery samples are samples present in an object different from the top periphery samples, or one of the left periphery samples and the top periphery samples is a sample for the background, and one side is a specific one.
  • the left peripheral samples and the upper peripheral samples may have completely different characteristics, such as barely the samples for the object.
  • the intra prediction mode 66 may be applied to the current block to generate a discontinuity between a predicted block derived based on only upper neighbor samples and a left neighbor samples. .
  • a sample value of the prediction sample is derived as an average value of the reference samples.
  • the value of the reference samples of the current block is not monotonous and the deviation between the samples is large.
  • a discontinuity between a predicted block of the current block and a neighboring sample may be highlighted.
  • the present invention defines a regression model of the prediction sample and the neighboring sample to remove the discontinuity between the predicted sample and the neighboring sample of the current block, and calculates the calculated regression model.
  • the filtering of the prediction sample of the current block adjacent to a boundary performed based on the regression model is performed as follows. It can be expressed as an expression.
  • pred (i, j) may represent a predicted sample of (i, j) coordinates
  • pred '(i, j) may represent a predicted sample of filtered (i, j) coordinates
  • ⁇ and ⁇ May represent coefficients defined in the regression model.
  • i and j may represent i ⁇ ⁇ 0, ..., N-1 ⁇ and j ⁇ ⁇ 0, ..., Height-1 ⁇ , respectively.
  • the Height may indicate the height of the current block.
  • N may represent the number of lines to which filtering is applied. That is, filtering may be performed based on the regression model on prediction samples included in N lines in an inward direction at the boundary of the current block.
  • the N may be a fixed number or may be adaptively derived based on the size of the current block, the applied intra prediction mode, the variance of the surrounding samples, and the like.
  • the information indicating N may be signaled through a high level syntax (eg, a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header).
  • the N may be derived based on the information indicating the N.
  • coefficients defined in the regression model may be derived based on neighboring samples, neighboring samples of the current block, and prediction samples of the current block.
  • the coefficients ⁇ and ⁇ of the regression model may be derived as in the following equation.
  • pred (i, j) may represent a predictive sample of (i, j) coordinates
  • rec (-1, j) may represent a peripheral sample of (-1, j) coordinates
  • ⁇ and ⁇ are Coefficients defined in the regression model may be represented.
  • height may represent the height of the current block
  • N may represent the number of lines to which filtering is applied.
  • the rec (-1, j) may represent a left peripheral sample of the (-1, j) coordinate.
  • FIG. 11 exemplarily shows left neighboring samples and prediction samples used to derive a regression model when an intra prediction mode having a vertical positive angle is applied to the current block.
  • an intra prediction mode having a vertical positive angle when an intra prediction mode having a vertical positive angle is applied to the current block, one left neighboring samples adjacent to the current block and one inward direction from the left boundary of the current block (ie, N is 1).
  • the regression model may be derived based on prediction samples included in a line of.
  • Left peripheral samples adjacent to the current block may represent left peripheral samples of (-1, 0) coordinates to left peripheral samples of (-1, H) coordinates.
  • the H may represent the height of the current block.
  • FIG. 12 exemplarily illustrates prediction samples to which filtering performed based on a regression model is applied when an intra prediction mode having a vertical positive angle is applied to the current block.
  • the prediction samples included in one line ie, N is 1) in an inward direction from a left boundary of the current block may be included. Filtering may be performed based on the regression model.
  • pred (i, j) may represent a predicted sample of (i, j) coordinates
  • pred '(i, j) may represent a predicted sample of filtered (i, j) coordinates
  • ⁇ and ⁇ May represent coefficients defined in the regression model.
  • i and j may represent i ⁇ ⁇ 0, ..., Width-1 ⁇ and j ⁇ ⁇ 0, ..., N-1 ⁇ , respectively.
  • the Width may indicate the width of the current block.
  • N may represent the number of lines to which filtering is applied. That is, filtering may be performed based on the regression model on prediction samples included in N lines in an inward direction at the boundary of the current block.
  • the N may be a fixed number or may be adaptively derived based on the size of the current block, the applied intra prediction mode, the variance of the surrounding samples, and the like.
  • the information indicating N may be signaled through a high level syntax (eg, a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header).
  • the N may be derived based on the information indicating the N.
  • coefficients defined in the regression model may be derived based on neighboring samples, neighboring samples of the current block, and prediction samples of the current block.
  • the coefficients ⁇ and ⁇ of the regression model may be derived as in the following equation.
  • pred (i, j) can represent a predictive sample of (i, j) coordinates
  • rec (i, -1) can represent a peripheral sample of (i, -1) coordinates
  • ⁇ and ⁇ are Coefficients defined in the regression model may be represented.
  • width may indicate the width of the current block
  • N may indicate the number of lines to which filtering is applied.
  • the rec (i, -1) may represent an upper peripheral sample of the (i, -1) coordinate.
  • filtering is performed on prediction samples of the left boundary based on the regression model derived based on Equations 3 and 4 to remove boundary discontinuity.
  • the filtering may be performed on the prediction samples of the upper boundary based on the regression model derived based on Equations 6 and 7 described above.
  • filtering on a vertical boundary may be applied first and filtering on a horizontal boundary (ie, an upper boundary) may be applied later, or, conversely, on a horizontal boundary (ie, an upper boundary). Filtering may be applied first and filtering of the vertical boundary (ie, left boundary) may be applied later.
  • filtering on lines other than the first line may be performed.
  • the regression model used for filtering on the first line can be reused. That is, filtering may be performed on prediction samples of lines other than the first line based on the regression model used for filtering the first line. Since the predicted block is constructed by copying from the reference sample, the regression model between the lines may be similar. Reusing may reduce the computational complexity of the decoding process and improve coding efficiency.
  • the following embodiments may be proposed as a method of applying the regression model-based filtering.
  • the method of applying the regression model based filtering may be determined by one or a combination of the embodiments described below.
  • whether to apply the regression model based filtering and / or the application range may be determined based on the size and / or type of the current block. For example, when the size of the current block is smaller than a specific size, the regression model based filtering may be performed on one line, and the line to which the regression model based filtering is applied as the size of the block increases. The number of can be increased. Alternatively, when the size of the current block is smaller than a specific size, the regression model based filtering may not be performed, and boundary smoothing filtering may be performed based on an existing defined filter coefficient.
  • the rig when the type of the current block is a horizontally long non-square block (Width> Height), and the intra prediction mode of the current block is an intra prediction mode having a vertical direction or an intra prediction mode having a vertical positive angle, the rig The coverage at the left boundary of the rational model based filtering may be set smaller. That is, N can be derived smaller.
  • the type of the current block is a vertically long non-square block (Width> Height)
  • the intra prediction mode of the current block is an intra prediction mode having a vertical direction or an intra prediction mode having a vertical positive angle
  • the rig The coverage at the left boundary of the rational model based filtering may be set larger. That is, N can be derived larger.
  • whether the regression model based filtering is applied and / or the application range may be determined based on the intra prediction mode of the current block. For example, when the intra prediction mode of the current block is an intra prediction mode having a large angle of the prediction direction (for example, intra prediction mode 2 or intra prediction mode 66), an inward direction from the boundary of the current block is performed.
  • the regression model based filtering may be applied to the prediction samples included in the four lines, and when the intra prediction mode of the current block is an intra prediction mode other than the above-described intra prediction mode, an inward direction at the boundary of the current block. As such, the regression model based filtering may be applied to prediction samples included in two or one line.
  • the intra prediction mode of the current block is one of the above-described intra prediction modes 3 to 18 and the intra prediction modes 50 to 65, two or one inward direction at the boundary of the current block.
  • the regression model based filtering may be applied to the prediction samples included in the four lines.
  • information indicating whether the regression model based filtering is applied may be signaled through a high level syntax.
  • the high level syntax may be a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header.
  • Whether the regression model based filtering is applied to the current block may be derived based on information indicating whether the regression model based filtering is applied.
  • information indicating whether the regression model based filtering is applied may be signaled at the block level. That is, information indicating whether the regression model based filtering is applied on a block basis may be signaled. For example, information indicating whether the regression model-based filtering is applied to the current block may be signaled, and whether the regression model-based filtering is applied to the current block is applied. It can be derived based on information indicating whether or not.
  • FIG. 13 schematically illustrates an image encoding method by an encoding apparatus according to the present invention.
  • the method disclosed in FIG. 13 may be performed by the encoding apparatus disclosed in FIGS. 1 and / or 3.
  • S1300 to S1320 of FIG. 13 may be performed by the prediction unit of the encoding apparatus
  • S1330 to S1340 of FIG. 13 may be performed by the post filter unit of the encoding apparatus
  • S1350 may be described above. It may be performed by the entropy encoding unit of the encoding device.
  • the post filter unit may be included in the prediction unit of the encoding apparatus.
  • a process of deriving a residual sample for the current block based on the original sample and the prediction sample for the current block may be performed by a subtractor of the encoding apparatus,
  • the generating of the information about the residual on the basis of the current block may be performed by a converter of the encoding apparatus.
  • the encoding of the information on the residual and the prediction of the current block may be performed. It may be performed by the entropy encoding unit of the encoding device.
  • the encoding apparatus determines an intra prediction mode for the current block (S1300).
  • the encoding apparatus may perform various intra prediction modes to derive an intra prediction mode having an optimal RD cost as an intra prediction mode for the current block.
  • the intra prediction mode may be one of two non-directional prediction modes and 33 directional prediction modes.
  • the two non-directional prediction modes may include an intra DC mode and an intra planner mode.
  • the intra prediction mode may be one of two non-directional intra prediction modes and 65 directional intra prediction modes.
  • the two non-directional prediction modes may include an intra DC mode and an intra planner mode.
  • the 65 directional intra prediction modes may include vertical directional intra prediction modes and horizontal directional intra prediction modes.
  • the vertical directional intra prediction modes may include intra prediction mode 34 to 66 intra prediction modes
  • the horizontal directional intra prediction modes may include intra prediction mode 2 to intra prediction mode 33.
  • the encoding apparatus derives peripheral samples including left peripheral samples and upper peripheral samples of the current block (S1310).
  • the encoding device may derive neighboring samples of the current block.
  • the peripheral samples may include the left peripheral samples and the upper peripheral samples.
  • the peripheral samples may include a sample near the upper left corner.
  • the left periphery samples, the upper left corner periphery samples, and the upper periphery samples may be derived from periphery blocks already reconstructed at the decoding time of the current block.
  • the 2N upper peripheral samples, the upper left corner peripheral sample, and the 2N left peripheral samples of the current block may be derived.
  • the left peripheral samples are p [-1] [0] to p [-1] [2N-1]
  • the sample around the upper left corner is p [-1] [-1]
  • the sample around the upper side is p [0] [-1] to p [2N-1] [-1 ]
  • M + N upper neighboring samples of the current block, upper left Side corner peripheral samples, and M + N left peripheral samples may be derived.
  • the left peripheral samples are p [-1] [0] To p [-1] [M + N-1]
  • the sample around the upper left corner is p [-1] [-1]
  • the sample above the upper side is p [0] [-1] to p [M + N -1] [-1].
  • the encoding apparatus derives prediction samples for the current block based on the neighboring samples and the intra prediction mode (S1320). For example, the encoding apparatus may derive the position of the reference sample with respect to the target sample based on the position of the target sample of the current block and the prediction angle of the intra prediction mode, and extract the neighboring sample of the derived position from the target sample. Can be derived as a reference sample, and the prediction sample can be derived by copying the reference sample.
  • the target sample may represent a sample in a current block in which intra prediction is performed.
  • the encoding apparatus is configured to include neighboring samples located around the position derived based on the position of the target sample of the current block and the prediction angle of the intra prediction mode.
  • the reference samples of the subject sample can be derived. That is, the encoding apparatus may derive a plurality of neighboring samples as the reference samples of the target sample based on the position of the target sample of the current block and the prediction angle of the intra prediction mode. For example, four peripheral samples can be derived from the reference samples of the subject sample.
  • the prediction angle of the intra prediction mode may be derived based on Table 1 described above, and intraPredAngle may be a variable representing the prediction angle derived from the intra prediction mode.
  • the encoding apparatus may derive the prediction sample by interpolating the reference samples based on the interpolation filter for the current block.
  • the prediction sample may be derived based on Equation 1 described above.
  • the interpolation filter may be derived based on the size of the current block and / or the intra prediction mode of the current block.
  • a cubic filter may be derived to the interpolation filter.
  • a Gaussian filter may be derived to the interpolation filter.
  • the intra prediction mode for the current block is an intra prediction mode having vertical directionality
  • the interpolation filter may be derived based on the width of the current block, and the intra for the current block may be derived.
  • the prediction mode is an intra prediction mode having horizontal directionality
  • an interpolation filter may be derived based on the height of the current block.
  • the cubic filter may be derived to the interpolation filter
  • the Gaussian filter may be derived as the interpolation filter
  • the cubic filter may be derived to the interpolation filter.
  • the Gaussian filter may be derived as the interpolation filter.
  • the encoding apparatus derives a regression model based on the specific prediction samples and the specific surrounding samples (S1330).
  • the specific prediction samples may be prediction samples for which filtering is performed.
  • the specific prediction samples may include prediction samples included in N rows in an inward direction (ie, a right direction) at a left boundary, and the specific periphery samples include (-1, 0) a left peripheral sample located at coordinates to a left peripheral sample located at (-1, H-1) coordinates. That is, the specific peripheral samples may include p [-1] [0] to p [-1] [H-1].
  • H may be the height of the current block.
  • the regression model may be derived based on Equations 3 to 4 described above.
  • N may be preset.
  • N may be derived based on the size of the current block.
  • the N when the size of the current block is smaller than a specific size, the N may be derived as 1, and when the size of the current block is greater than or equal to the specific size, the N is equal to the size of the current block. Can increase accordingly.
  • N may be derived based on the intra prediction mode for the current block. For example, when the intra prediction mode for the current block is the intra prediction mode 2 or the intra prediction mode 66, the N may be derived as 4. Further, for example, when the intra prediction mode for the current block is one of 50 intra prediction mode to 65 intra prediction mode, N may be derived as 1 or 2. Alternatively, N may be derived based on the type of the current block.
  • N when the current block is a horizontally long non-square block, that is, when the current block is a non-square block whose width is greater than the height, N may be set to a small value (eg, 1). have. Further, when the current block is a vertically long non-square block, that is, when the current block is a non-square block whose height is greater than the width, N may be set to a large value (for example, 4). Alternatively, N may be derived based on the variation of the peripheral samples.
  • the intra prediction mode for the current block when the intra prediction mode for the current block is an intra prediction mode having a vertical positive angle, the specific prediction samples may include prediction samples included in N rows in an inward direction from a left boundary.
  • the specific peripheral samples may include left peripheral samples located at (-1,0) coordinates and left peripheral samples located at (-1, H-1) coordinates among the left peripheral samples. .
  • the intra prediction mode having the vertical positive angle may be intra prediction mode 50 to intra prediction mode 66.
  • the specific prediction samples may include prediction samples included in N columns in an inward direction (ie, a downward direction) at an upper boundary
  • the specific peripheral samples may include (0, -1) an upper peripheral sample located at a coordinate to an upper peripheral sample located at a (W-1, -1) coordinate. That is, the specific peripheral samples may include p [0] [-1] to p [W-1] [-1].
  • W may be the width of the current block.
  • the regression model may be derived based on Equations 6 to 7 described above.
  • N may be preset.
  • N may be derived based on the size of the current block.
  • the N when the size of the current block is smaller than a specific size, the N may be derived as 1, and when the size of the current block is greater than or equal to the specific size, the N is equal to the size of the current block. Can increase accordingly.
  • N may be derived based on the intra prediction mode for the current block. For example, when the intra prediction mode for the current block is the intra prediction mode 2 or the intra prediction mode 66, the N may be derived as 4. Also, for example, when the intra prediction mode for the current block is an intra prediction mode of 3 to an intra prediction mode of 18, the N may be derived as 1 or 2.
  • N may be derived based on the type of the current block.
  • N when the current block is a horizontally long non-square block, that is, when the current block is a non-square block whose width is greater than the height, N may be set to a large value (for example, 4). have. Further, when the current block is a vertically long non-square block, that is, when the current block is a non-square block whose height is greater than the width, N may be set to a small value (for example, 1). Alternatively, N may be derived based on the variation of the peripheral samples. On the other hand, as an example, when the intra prediction mode for the current block is an intra prediction mode having a horizontal positive angle, the specific prediction samples are arranged in N columns in an inner direction (ie, a lower direction) at an upper boundary.
  • the intra prediction mode having the horizontal positive angle may be intra prediction mode 2 to intra prediction mode 18.
  • the specific prediction samples may include prediction samples included in N rows in a right direction from a left boundary and prediction samples included in N columns in a downward direction at an upper boundary, and the specific neighboring samples
  • It may include an upper peripheral sample located in the upper peripheral sample located in the (W-1, -1) coordinates. That is, the specific peripheral samples may include p [-1] [0] through p [-1] [H-1] and p [0] [-1] through p [W-1] [-1]. have.
  • H may be the height of the current block
  • W may be the width of the current block.
  • the regression model for the prediction samples included in the N rows from the left boundary to the right direction may be derived based on Equations 3 to 4 described above, and N in the lower direction at the upper boundary.
  • the regression model for the prediction samples included in the four columns may be derived based on Equations 6 to 7 described above.
  • N may be preset.
  • N may be derived based on the size of the current block. For example, when the size of the current block is smaller than a specific size, the N may be derived as 1, and when the size of the current block is greater than or equal to the specific size, the N is equal to the size of the current block. Can increase accordingly.
  • N may be derived based on the intra prediction mode for the current block.
  • N may be derived based on the variation of the peripheral samples.
  • the specific prediction samples are N prediction samples included in the N rows in the right direction from the left boundary and N downward in the upper boundary. May include prediction samples included in a column, wherein the specific peripheral samples are left peripheral samples located at (-1,0) coordinates of the left peripheral samples to left margins located at (-1, H-1) coordinates.
  • the sample may include an upper peripheral sample located at (0, -1) coordinates and an upper peripheral sample located at (W-1, -1) coordinates among the sample and the upper peripheral samples.
  • the encoding apparatus may determine whether to apply the regression model based filtering to the current block. For example, the encoding apparatus may determine whether to apply the regression model based filtering based on the size of the current block. As an example, when the size of the current block is smaller than a specific size, the encoding apparatus may not apply the regression model based filtering to the current block. Alternatively, when the ratio of the width to the height of the current block is greater than or equal to a certain ratio, the encoding apparatus may not apply the regression model based filtering to the current block.
  • the encoding apparatus may generate and encode information indicating whether the regression model based filtering is applied. It may be signaled in units of a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, or a block indicating whether to apply the regression model based filtering.
  • VPS video parameter set
  • SPS sequence parameter set
  • PPS picture parameter set
  • slice header indicating whether to apply the regression model based filtering.
  • the encoding apparatus performs filtering on the specific prediction samples based on the regression model to derive the filtered specific prediction samples (S1340).
  • the encoding apparatus may perform filtering on the specific prediction samples based on the derived regression model.
  • the filtered specific prediction samples may be derived based on Equation 2 or Equation 5 described above.
  • the encoding apparatus encodes image information including information on prediction of the current block (S1350).
  • the encoding apparatus may encode the video information including the information on the prediction and output the encoded video information in the form of a bitstream.
  • the bitstream may be transmitted to a decoding apparatus via a network or a storage medium.
  • the information about the prediction may include information about the intra prediction mode of the current block.
  • the encoding apparatus may generate, encode, and output the information about the intra prediction mode indicating the intra prediction mode in the form of a bitstream.
  • the information about the intra prediction mode may include information indicating an intra prediction mode for the current block directly, or an intra prediction mode candidate list derived based on the intra prediction mode of the left or upper block of the current block. It may also include information indicating any one of the candidates.
  • the intra prediction mode candidate list may represent the MPM list.
  • the encoding apparatus may generate information indicating whether to apply the regression model based filtering.
  • the image information may include information indicating whether the regression model based filtering is applied.
  • the encoding apparatus may output information in a bitstream form by encoding information indicating whether the regression model based filtering is applied.
  • the bitstream may be transmitted to a decoding apparatus via a network or a storage medium.
  • the encoding apparatus may generate information about the residual based on the residual sample.
  • the image information may include information about the residual, and the information about the residual may include transform coefficients related to the residual sample.
  • the encoding device may encode the information about the residual and output the encoded information about the residual.
  • the bitstream may be transmitted to a decoding apparatus via a network or a storage medium.
  • FIG. 14 schematically illustrates an encoding apparatus for performing an image encoding method according to the present invention.
  • the method disclosed in FIG. 13 may be performed by the encoding apparatus disclosed in FIG. 14.
  • the prediction unit of the decoding apparatus of FIG. 14 may perform S1300 to S1320 of FIG. 13
  • the post filter unit of the decoding apparatus of FIG. 14 may perform S1330 to S1340 of FIG. 13, and FIG.
  • the entropy encoding unit of the decoding apparatus of FIG. 14 may perform S1350 of FIG. 13.
  • the post filter unit may be included in the prediction unit of the encoding apparatus.
  • the process of deriving the residual sample for the current block based on the original sample and the prediction sample for the current block may be performed by the subtraction unit of the encoding apparatus of FIG.
  • the generating of the information about the residual of the current block based on the residual sample may be performed by the converter of the encoding apparatus of FIG. 14, and the encoding of the information of the residual may be performed by FIG. 14. May be performed by an entropy encoding unit of the encoding apparatus.
  • FIG. 15 schematically illustrates an image decoding method by a decoding apparatus according to the present invention.
  • the method disclosed in FIG. 15 may be performed by the decoding apparatus disclosed in FIGS. 2 and / or 5.
  • S1500 to S1520 of FIG. 15 may be performed by the prediction unit of the decoding apparatus
  • S1530 to S1540 of FIG. 15 may be performed by the post filter unit of the decoding apparatus.
  • the post filter unit may be included in the prediction unit of the encoding apparatus.
  • a process of acquiring image information including information on prediction of a current block and information on residual through a bitstream may be performed by an entropy decoding unit of the decoding apparatus.
  • the process of deriving the residual sample for the current block based on the dual information may be performed by an inverse transform unit of the decoding apparatus, and the process of generating a reconstructed picture based on the prediction sample and the residual sample may be performed. It may be performed by an adder of the decoding apparatus.
  • the decoding apparatus derives an intra prediction mode for the current block (S1500).
  • the decoding apparatus may obtain information about prediction of the current block through a bitstream.
  • the information on the prediction may include information directly indicating an intra prediction mode for the current block or any one of an intra prediction mode candidate list derived based on the intra prediction mode of the left or upper block of the current block. It may include information indicating one candidate.
  • the intra prediction mode candidate list may be referred to as an MPM candidate list.
  • the decoding apparatus may derive an intra prediction mode for the current block based on the obtained prediction information.
  • the intra prediction mode may be one of two non-directional prediction modes and 33 directional prediction modes. As described above, the two non-directional prediction modes may include an intra DC mode and an intra planner mode. Alternatively, the intra prediction mode may be one of two non-directional intra prediction modes and 65 directional intra prediction modes.
  • the two non-directional prediction modes may include an intra DC mode and an intra planner mode.
  • the 65 directional intra prediction modes may include vertical directional intra prediction modes and horizontal directional intra prediction modes.
  • the vertical directional intra prediction modes may include intra prediction mode 34 to 66 intra prediction modes
  • the horizontal directional intra prediction modes may include intra prediction mode 2 to intra prediction mode 33.
  • the 65 directional intra prediction modes may include intra prediction modes having a vertical positive angle and intra prediction modes having a horizontal positive angle.
  • the modes having the vertical positive angle may be intra prediction mode 50 to 66 intra prediction mode, and the modes having the horizontal positive angle may be intra prediction mode 2 to 18 intra prediction mode.
  • the decoding apparatus derives the peripheral samples including the left peripheral samples and the top peripheral samples of the current block (S1510).
  • the decoding apparatus may derive neighboring samples of the current block.
  • the peripheral samples may include the left peripheral samples and the upper peripheral samples.
  • the peripheral samples may include a sample near the upper left corner.
  • the left periphery samples, the upper left corner periphery samples, and the upper periphery samples may be derived from periphery blocks already reconstructed at the decoding time of the current block.
  • the 2N upper peripheral samples, the upper left corner peripheral sample, and the 2N left peripheral samples of the current block may be derived.
  • the left peripheral samples are p [-1] [0] to p [-1] [2N-1]
  • the sample around the upper left corner is p [-1] [-1]
  • the sample around the upper side is p [0] [-1] to p [2N-1] [-1 ]
  • M + N upper neighboring samples of the current block M + N upper neighboring samples of the current block
  • upper left Samples around the side corners and M + N left peripheral samples can be derived.
  • the left peripheral samples are p [-1] [0] To p [-1] [M + N-1]
  • the sample around the upper left corner is p [-1] [-1]
  • the sample above the upper side is p [0] [-1] to p [M + N -1] [-1].
  • the decoding apparatus derives prediction samples for the current block based on the neighboring samples and the intra prediction mode (S1520). For example, the decoding apparatus may derive the position of the reference sample with respect to the target sample based on the position of the target sample of the current block and the prediction angle of the intra prediction mode, and extract the neighboring sample of the derived position from the target sample. Can be derived as a reference sample, and the prediction sample can be derived by copying the reference sample.
  • the target sample may represent a sample in a current block in which intra prediction is performed.
  • the decoding apparatus may detect neighboring samples located around the position derived based on the position of the target sample of the current block and the prediction angle of the intra prediction mode.
  • the reference samples of the subject sample can be derived. That is, the decoding apparatus may derive a plurality of neighboring samples as the reference samples of the target sample based on the position of the target sample of the current block and the prediction angle of the intra prediction mode. For example, four peripheral samples can be derived from the reference samples of the subject sample.
  • the prediction angle of the intra prediction mode may be derived based on Table 1 described above, and intraPredAngle may be a variable representing the prediction angle derived from the intra prediction mode.
  • the decoding apparatus may derive the prediction sample by interpolating the reference samples based on the interpolation filter for the current block.
  • the prediction sample may be derived based on Equation 1 described above.
  • the interpolation filter may be derived based on the size of the current block and / or the intra prediction mode of the current block.
  • a cubic filter may be derived to the interpolation filter.
  • a Gaussian filter may be derived to the interpolation filter.
  • the intra prediction mode for the current block is an intra prediction mode having vertical directionality
  • the interpolation filter may be derived based on the width of the current block, and the intra for the current block may be derived.
  • the prediction mode is an intra prediction mode having horizontal directionality
  • an interpolation filter may be derived based on the height of the current block.
  • the cubic filter may be derived to the interpolation filter
  • the Gaussian filter may be derived as the interpolation filter
  • the cubic filter may be derived to the interpolation filter.
  • the Gaussian filter may be derived as the interpolation filter.
  • the decoding apparatus derives a regression model based on the specific prediction samples and the specific surrounding samples (S1530).
  • the specific prediction samples may be prediction samples for which filtering is performed.
  • the specific prediction samples may include prediction samples included in N rows in an inward direction (ie, a right direction) at a left boundary, and the specific periphery samples include (-1, 0) a left peripheral sample located at coordinates to a left peripheral sample located at (-1, H-1) coordinates. That is, the specific peripheral samples may include p [-1] [0] to p [-1] [H-1].
  • H may be the height of the current block.
  • the regression model may be derived based on Equations 3 to 4 described above.
  • N may be preset.
  • N may be derived based on the size of the current block.
  • the N when the size of the current block is smaller than a specific size, the N may be derived as 1, and when the size of the current block is greater than or equal to the specific size, the N is equal to the size of the current block. Can increase accordingly.
  • N may be derived based on the intra prediction mode for the current block. For example, when the intra prediction mode for the current block is the intra prediction mode 2 or the intra prediction mode 66, the N may be derived as 4. Further, for example, when the intra prediction mode for the current block is one of 50 intra prediction mode to 65 intra prediction mode, N may be derived as 1 or 2. Alternatively, N may be derived based on the type of the current block.
  • N when the current block is a horizontally long non-square block, that is, when the current block is a non-square block whose width is greater than the height, N may be set to a small value (eg, 1). have. Further, when the current block is a vertically long non-square block, that is, when the current block is a non-square block whose height is greater than the width, N may be set to a large value (for example, 4). Alternatively, N may be derived based on the variation of the peripheral samples.
  • the intra prediction mode for the current block when the intra prediction mode for the current block is an intra prediction mode having a vertical positive angle, the specific prediction samples may include prediction samples included in N rows in an inward direction from a left boundary.
  • the specific peripheral samples may include left peripheral samples located at (-1,0) coordinates and left peripheral samples located at (-1, H-1) coordinates among the left peripheral samples. .
  • the intra prediction mode having the vertical positive angle may be intra prediction mode 50 to intra prediction mode 66.
  • the specific prediction samples may include prediction samples included in N columns in an inward direction (ie, a downward direction) at an upper boundary
  • the specific peripheral samples may include (0, -1) an upper peripheral sample located at a coordinate to an upper peripheral sample located at a (W-1, -1) coordinate. That is, the specific peripheral samples may include p [0] [-1] to p [W-1] [-1].
  • W may be the width of the current block.
  • the regression model may be derived based on Equations 6 to 7 described above.
  • N may be preset.
  • N may be derived based on the size of the current block.
  • the N when the size of the current block is smaller than a specific size, the N may be derived as 1, and when the size of the current block is greater than or equal to the specific size, the N is equal to the size of the current block. Can increase accordingly.
  • N may be derived based on the intra prediction mode for the current block. For example, when the intra prediction mode for the current block is the intra prediction mode 2 or the intra prediction mode 66, the N may be derived as 4. Also, for example, when the intra prediction mode for the current block is an intra prediction mode of 3 to an intra prediction mode of 18, the N may be derived as 1 or 2.
  • N may be derived based on the type of the current block.
  • N when the current block is a horizontally long non-square block, that is, when the current block is a non-square block whose width is greater than the height, N may be set to a large value (for example, 4). have. Further, when the current block is a vertically long non-square block, that is, when the current block is a non-square block whose height is greater than the width, N may be set to a small value (for example, 1). Alternatively, N may be derived based on the variation of the peripheral samples. On the other hand, as an example, when the intra prediction mode for the current block is an intra prediction mode having a horizontal positive angle, the specific prediction samples are arranged in N columns in an inner direction (ie, a lower direction) at an upper boundary.
  • the intra prediction mode having the horizontal positive angle may be intra prediction mode 2 to intra prediction mode 18.
  • the specific prediction samples may include prediction samples included in N rows in a right direction from a left boundary and prediction samples included in N columns in a downward direction at an upper boundary, and the specific neighboring samples
  • It may include an upper peripheral sample located in the upper peripheral sample located in the (W-1, -1) coordinates. That is, the specific peripheral samples may include p [-1] [0] through p [-1] [H-1] and p [0] [-1] through p [W-1] [-1]. have.
  • H may be the height of the current block
  • W may be the width of the current block.
  • the regression model for the prediction samples included in the N rows from the left boundary to the right direction may be derived based on Equations 3 to 4 described above, and N in the lower direction at the upper boundary.
  • the regression model for the prediction samples included in the four columns may be derived based on Equations 6 to 7 described above.
  • N may be preset.
  • N may be derived based on the size of the current block. For example, when the size of the current block is smaller than a specific size, the N may be derived as 1, and when the size of the current block is greater than or equal to the specific size, the N is equal to the size of the current block. Can increase accordingly.
  • N may be derived based on the intra prediction mode for the current block.
  • N may be derived based on the variation of the peripheral samples.
  • the specific prediction samples are N prediction samples included in the N rows in the right direction from the left boundary and N downward in the upper boundary. May include prediction samples included in a column, wherein the specific peripheral samples are left peripheral samples located at (-1,0) coordinates of the left peripheral samples to left margins located at (-1, H-1) coordinates.
  • the sample may include an upper peripheral sample located at (0, -1) coordinates and an upper peripheral sample located at (W-1, -1) coordinates among the sample and the upper peripheral samples.
  • the decoding apparatus may determine whether to apply the regression model based filtering to the current block. For example, the decoding apparatus may determine whether to apply the regression model based filtering based on the size of the current block. As an example, when the size of the current block is smaller than a specific size, the decoding apparatus may not apply the regression model based filtering to the current block. Alternatively, when the ratio of the width to the height of the current block is greater than or equal to a certain ratio, the decoding apparatus may not apply the regression model based filtering to the current block.
  • the decoding apparatus may obtain information indicating whether the regression model based filtering is applied, and apply the regression model based filtering based on the information indicating whether the regression model based filtering is applied. You can decide whether or not. It may be signaled in units of a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), a slice header, or a block indicating whether to apply the regression model based filtering.
  • VPS video parameter set
  • SPS sequence parameter set
  • PPS picture parameter set
  • slice header indicating whether to apply the regression model based filtering.
  • the decoding apparatus performs filtering on the specific prediction samples based on the regression model to derive the filtered specific prediction samples (S1540).
  • the decoding apparatus may perform filtering on the specific prediction samples based on the derived regression model.
  • the filtered specific prediction samples may be derived based on Equation 2 or Equation 5 described above.
  • the decoding apparatus may use the prediction sample and / or the filtered specific prediction sample directly as a reconstruction sample, or according to the prediction mode, or the prediction sample and / or the filtered specific prediction sample.
  • the residual sample may be added to generate a reconstructed sample. If there is a residual sample for the current block, the decoding apparatus may receive information about the residual for the current block, and the information about the residual may be included in the image information.
  • the image information may include information about the residual and information about the prediction. In addition, the image information may include information indicating whether the regression model-based filtering is applied.
  • the information about the residual may include transform coefficients regarding the residual sample.
  • the decoding apparatus may derive the residual sample (or residual sample array) for the current block based on the residual information.
  • the decoding apparatus may generate a reconstructed sample based on the prediction sample and the residual sample, and may derive a reconstructed block or a reconstructed picture based on the reconstructed sample. Thereafter, as described above, the decoding apparatus may apply an in-loop filtering procedure, such as a deblocking filtering and / or SAO procedure, to the reconstructed picture in order to improve subjective / objective picture quality as necessary.
  • an in-loop filtering procedure such as a deblocking filtering and / or SAO procedure
  • FIG. 16 schematically shows a decoding apparatus for performing an image decoding method according to the present invention.
  • the method disclosed in FIG. 15 may be performed by the decoding apparatus disclosed in FIG. 16.
  • the prediction unit of the decoding apparatus of FIG. 16 may perform S1500 to S1520 of FIG. 15, and the post filter unit of the decoding apparatus of FIG. 16 may perform S1530 to S1540 of FIG. 15.
  • the post filter unit may be included in the prediction unit of the encoding apparatus.
  • a process of acquiring image information including information on prediction of a current block and information on residual through a bitstream may be performed by the entropy decoding unit of the decoding apparatus of FIG. 16.
  • Deriving the residual sample for the current block based on the residual information may be performed by an inverse transform unit of the decoding apparatus of FIG. 16, and based on the reconstructed picture based on the prediction sample and the residual sample
  • the process of generating may be performed by the adder of the decoding apparatus of FIG. 16.
  • boundary filtering may be performed based on a regression model derived based on the prediction sample and the neighboring sample of the current block, thereby reducing the amount of bits for the residual signal for the current block. Occurrence can be prevented and subjective picture quality can be improved.
  • the above-described method according to the present invention may be implemented in software, and the encoding device and / or the decoding device according to the present invention may perform image processing of, for example, a TV, a computer, a smartphone, a set-top box, a display device, and the like. It can be included in the device.
  • the above-described method may be implemented as a module (process, function, etc.) for performing the above-described function.
  • the module may be stored in memory and executed by a processor.
  • the memory may be internal or external to the processor and may be coupled to the processor by a variety of well known means.
  • the processor may include application-specific integrated circuits (ASICs), other chipsets, logic circuits, and / or data processing devices.
  • the memory may include read-only memory (ROM), random access memory (RAM), flash memory, memory card, storage medium and / or other storage device. That is, the embodiments described in the present invention may be implemented and performed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in each drawing may be implemented and performed on a computer, processor, microprocessor, controller, or chip.
  • the decoding apparatus and encoding apparatus to which the present invention is applied include a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, a real time communication device such as video communication, and mobile streaming.
  • the OTT video device may include a game console, a Blu-ray player, an internet access TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like.
  • the processing method to which the present invention is applied can be produced in the form of a program executed by a computer, and can be stored in a computer-readable recording medium.
  • Multimedia data having a data structure according to the present invention can also be stored in a computer-readable recording medium.
  • the computer readable recording medium includes all kinds of storage devices and distributed storage devices in which computer readable data is stored.
  • the computer-readable recording medium may be, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical disc. It may include a data storage device.
  • the computer-readable recording medium also includes media embodied in the form of a carrier wave (eg, transmission over the Internet).
  • the bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted through a wired or wireless communication network.
  • an embodiment of the present invention may be implemented as a computer program product by program code, which may be performed on a computer by an embodiment of the present invention.
  • the program code may be stored on a carrier readable by a computer.
  • the content streaming system to which the present invention is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
  • the encoding server compresses content input from multimedia input devices such as a smart phone, a camera, a camcorder, etc. into digital data to generate a bitstream and transmit the bitstream to the streaming server.
  • multimedia input devices such as smart phones, cameras, camcorders, etc. directly generate a bitstream
  • the encoding server may be omitted.
  • the bitstream may be generated by an encoding method or a bitstream generation method to which the present invention is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
  • the streaming server transmits the multimedia data to the user device based on the user's request through the web server, and the web server serves as a medium for informing the user of what service.
  • the web server delivers it to a streaming server, and the streaming server transmits multimedia data to the user.
  • the content streaming system may include a separate control server.
  • the control server plays a role of controlling a command / response between devices in the content streaming system.
  • the streaming server may receive content from a media store and / or an encoding server. For example, when the content is received from the encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a predetermined time.
  • Examples of the user device include a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), navigation, a slate PC, Tablet PCs, ultrabooks, wearable devices, such as smartwatches, glass glasses, head mounted displays, digital TVs, desktops Computer, digital signage, and the like.
  • PDA personal digital assistant
  • PMP portable multimedia player
  • navigation a slate PC
  • Tablet PCs tablet PCs
  • ultrabooks wearable devices, such as smartwatches, glass glasses, head mounted displays, digital TVs, desktops Computer, digital signage, and the like.
  • Each server in the content streaming system may be operated as a distributed server, in which case data received from each server may be distributed.

Abstract

본 발명에 따른 디코딩 장치에 의하여 수행되는 영상 디코딩 방법은 현재 블록에 대한 인트라 예측 모드를 도출하는 단계, 상기 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들을 포함하는 주변 샘플들을 도출하는 단계, 상기 주변 샘플들 및 상기 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 도출하는 단계, 특정 예측 샘플들 및 특정 주변 샘플들을 기반으로 리그레션 모델(regression model)을 도출하는 단계, 및 상기 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행하여 필터링된 특정 예측 샘플들을 도출하는 단계를 포함하는 것을 특징으로 한다.

Description

영상 코딩 시스템에서 리그레션 모델 기반 필터링을 사용하는 영상 디코딩 방법 및 장치
본 발명은 영상 코딩 기술에 관한 것으로서 보다 상세하게는 영상 코딩 시스템에서 리그레션 모델 기반 필터링을 사용하는 영상 디코딩 방법 및 장치에 관한 것이다.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 전송되는 정보량 또는 비트량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 영상 데이터를 저장하는 경우, 전송 비용과 저장 비용이 증가된다.
이에 따라, 고해상도, 고품질 영상의 정보를 효과적으로 전송하거나 저장하고, 재생하기 위해 고효율의 영상 압축 기술이 요구된다.
본 발명의 기술적 과제는 영상 코딩 효율을 높이는 방법 및 장치를 제공함에 있다.
본 발명의 다른 기술적 과제는 현재 블록의 예측 샘플 및 주변 샘플을 기반으로 리그레션 모델을 도출하는 영상 디코딩 방법 및 장치를 제공함에 있다.
본 발명의 다른 기술적 과제는 현재 블록의 예측 샘플 및 주변 샘플을 기반으로 리그레션 모델을 도출하고, 도출된 리그레션 모델을 기반으로 현재 블록의 바운더리에 필터링을 수행하는 영상 디코딩 방법 및 장치를 제공함에 있다.
본 발명의 다른 기술적 과제는 특정 조건을 기반으로 리그레션 모델 기반 필터링의 적용 여부 및 적용 범위를 적응적으로 결정하는 영상 디코딩 방법 및 장치를 제공함에 있다.
본 발명의 일 실시예에 따르면, 디코딩 장치에 의하여 수행되는 영상 디코딩 방법이 제공된다. 상기 방법은 현재 블록에 대한 인트라 예측 모드를 도출하는 단계, 상기 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들을 포함하는 주변 샘플들을 도출하는 단계, 상기 주변 샘플들 및 상기 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 도출하는 단계, 특정 예측 샘플들 및 특정 주변 샘플들을 기반으로 리그레션 모델(regression model)을 도출하는 단계, 및 상기 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행하여 필터링된 특정 예측 샘플들을 도출하는 단계를 포함하는 것을 특징으로 한다.
본 발명의 다른 일 실시예에 따르면, 영상 디코딩을 수행하는 디코딩 장치가 제공된다. 상기 디코딩 장치는 현재 블록에 대한 인트라 예측 모드를 도출하고, 상기 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들을 포함하는 주변 샘플들을 도출하고, 상기 주변 샘플들 및 상기 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 도출하는 예측부, 및 특정 예측 샘플들 및 특정 주변 샘플들을 기반으로 리그레션 모델(regression model)을 도출하고, 상기 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행하여 필터링된 특정 예측 샘플들을 도출하는 포스트 필터부를 포함하는 것을 특징으로 한다.
본 발명의 또 다른 일 실시예에 따르면, 인코딩 장치에 의하여 수행되는 비디오 인코딩 방법을 제공한다. 상기 방법은 현재 블록에 대한 인트라 예측 모드를 결정하는 단계, 상기 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들을 포함하는 주변 샘플들을 도출하는 단계, 상기 주변 샘플들 및 상기 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 도출하는 단계, 특정 예측 샘플들 및 특정 주변 샘플들을 기반으로 리그레션 모델(regression model)을 도출하는 단계, 상기 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행하여 필터링된 특정 예측 샘플들을 도출하는 단계, 및 상기 현재 블록의 예측에 대한 정보를 포함하는 영상 정보를 인코딩하는 단계를 포함하는 것을 특징으로 한다.
본 발명의 또 다른 일 실시예에 따르면, 비디오 인코딩 장치를 제공한다. 상기 인코딩 장치는 현재 블록에 대한 인트라 예측 모드를 결정하고, 상기 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들을 포함하는 주변 샘플들을 도출하고, 상기 주변 샘플들 및 상기 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 도출하는 예측부, 특정 예측 샘플들 및 특정 주변 샘플들을 기반으로 리그레션 모델(regression model)을 도출하고, 상기 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행하여 필터링된 특정 예측 샘플들을 도출하는 포스트 필터부, 및 상기 현재 블록의 예측에 대한 정보를 포함하는 영상 정보를 인코딩하는 엔트로피 인코딩부를 포함하는 것을 특징으로 한다.
상술한 본 발명에 따르면 상기 현재 블록의 예측 샘플과 주변 샘플을 기반으로 도출된 리그레션 모델을 기반으로 바운더리 필터링을 수행할 수 있고, 이를 통하여 현재 블록에 대한 레지듀얼 신호에 대한 비트량을 줄이거나 발생을 방지할 수 있고, 주관적 화질을 향상시킬 수 있다.
또한, 본 발명에 따르면 현재 블록의 특성을 반영하는 특정 조건을 기반으로 리그레션 모델 기반 필터링의 적용 여부를 결정할 수 있고, 이를 통하여 현재 블록의 특성에 따라 필터링 적용을 적응적으로 결정할 수 있고, 전반적인 코딩 효율을 향상시킬 수 있다.
도 1은 본 발명이 적용될 수 있는 비디오 인코딩 장치의 구성을 개략적으로 설명하는 도면이다.
도 2는 본 발명이 적용될 수 있는 비디오 디코딩 장치의 구성을 개략적으로 설명하는 도면이다.
도 3은 본 발명이 적용될 수 있는 비디오 인코딩 장치를 개략적으로 설명하는 다른 일 예를 나타낸다.
도 4는 인코딩 장치에서 인트라 예측이 수행되는 과정을 예시적으로 나타낸다.
도 5는 본 발명이 적용될 수 있는 비디오 디코딩 장치를 개략적으로 설명하는 다른 일 예를 나타낸다.
도 6은 디코딩 장치에서 인트라 예측이 수행되는 과정을 예시적으로 나타낸다.
도 7은 상기 현재 블록의 인트라 예측에 사용되는 상기 좌측 주변 샘플들 및 상측 주변 샘플들을 예시적으로 나타낸다.
도 8은 65개의 예측 방향의 인트라 방향성 모드들을 예시적으로 나타낸다.
도 9는 상기 방향성 인트라 예측 모드의 예측 방향에 위치하는 참조 샘플의 위치가 분수 샘플(fractional sample) 위치인 경우, 상기 참조 샘플의 좌우에 인접한 정수 샘플들을 기반으로 상기 대상 샘플의 예측 샘플이 도출되는 일 예를 나타낸다.
도 10은 인트라 예측 모드로 도출된 예측 샘플들과 주변 샘플들 사이에서 발생된 불연속성의 일 예를 나타낸다.
도 11은 상기 현재 블록에 수직 양수 각도를 갖는 인트라 예측 모드가 적용된 경우에 리그레션 모델을 도출하는데 사용되는 좌측 주변 샘플들 및 예측 샘플들을 예시적으로 나타낸다.
도 12는 상기 현재 블록에 수직 양수 각도를 갖는 인트라 예측 모드가 적용된 경우에 리그레션 모델을 기반으로 수행되는 필터링이 적용되는 예측 샘플들을 예시적으로 나타낸다.
도 13은 본 발명에 따른 인코딩 장치에 의한 영상 인코딩 방법을 개략적으로 나타낸다.
도 14는 본 발명에 따른 영상 인코딩 방법을 수행하는 인코딩 장치를 개략적으로 나타낸다.
도 15는 본 발명에 따른 디코딩 장치에 의한 영상 디코딩 방법을 개략적으로 나타낸다.
도 16은 본 발명에 따른 영상 디코딩 방법을 수행하는 디코딩 장치를 개략적으로 나타낸다.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정 실시예에 한정하려고 하는 것이 아니다. 본 명세서에서 상용하는 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명의 기술적 사상을 한정하려는 의도로 사용되는 것은 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서 "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성 요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성 요소, 부품 도는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.
한편, 본 발명에서 설명되는 도면상의 각 구성들은 서로 다른 특징적인 기능들에 관한 설명의 편의를 위해 독립적으로 도시된 것으로서, 각 구성들이 서로 별개의 하드웨어나 별개의 소프트웨어로 구현된다는 것을 의미하지는 않는다. 예컨대, 각 구성 중 두 개 이상의 구성이 합쳐져 하나의 구성을 이룰 수도 있고, 하나의 구성이 복수의 구성으로 나뉘어질 수도 있다. 각 구성이 통합 및/또는 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.
이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 이하, 도면상의 동일한 구성 요소에 대해서는 동일한 참조 부호를 사용하고 동일한 구성 요소에 대해서 중복된 설명은 생략한다.
한편, 본 발명은 비디오/영상 코딩에 관한 것이다. 예를 들어, 본 발명에서 개시된 방법/실시예는 VVC (versatile video coding) 표준 또는 차세대 비디오/이미지 코딩 표준에 개시된 방법에 적용될 수 있다.
본 명세서에서 픽처(picture)는 일반적으로 특정 시간대의 하나의 영상을 나타내는 단위를 의미하며, 슬라이스(slice)는 코딩에 있어서 픽처의 일부를 구성하는 단위이다. 하나의 픽처는 복수의 슬라이스로 구성될 수 있으며, 필요에 따라서 픽처 및 슬라이스는 서로 혼용되어 사용될 수 있다.
픽셀(pixel) 또는 펠(pel)은 하나의 픽처(또는 영상)을 구성하는 최소의 단위를 의미할 수 있다. 또한, 픽셀에 대응하는 용어로서 '샘플(sample)'이 사용될 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 휘도(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 채도(chroma) 성분의 픽셀/픽셀 값만을 나타낼 수도 있다.
유닛(unit)은 영상 처리의 기본 단위를 나타낸다. 유닛은 픽처의 특정 영역 및 해당 영역에 관련된 정보 중 적어도 하나를 포함할 수 있다. 유닛은 경우에 따라서 블록(block) 또는 영역(area) 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들 또는 변환 계수(transform coefficient)들의 집합을 나타낼 수 있다.
도 1은 본 발명이 적용될 수 있는 비디오 인코딩 장치의 구성을 개략적으로 설명하는 도면이다.
도 1을 참조하면, 비디오 인코딩 장치(100)는 픽처 분할부(105), 예측부(110), 레지듀얼 처리부(120), 엔트로피 인코딩부(130), 가산부(140), 필터부(150) 및 메모리(160)을 포함할 수 있다. 레지듀얼 처리부(120)는 감산부(121), 변환부(122), 양자화부(123), 재정렬부(124), 역양자화부(125) 및 역변환부(126)를 포함할 수 있다.
픽처 분할부(105)는 입력된 픽처를 적어도 하나의 처리 유닛(processing unit)으로 분할할 수 있다.
일 예로, 처리 유닛은 코딩 유닛(coding unit, CU)이라고 불릴 수 있다. 이 경우 코딩 유닛은 최대 코딩 유닛(largest coding unit, LCU)으로부터 QTBT (Quad-tree binary-tree) 구조에 따라 재귀적으로(recursively) 분할될 수 있다. 예를 들어, 하나의 코딩 유닛은 쿼드 트리 구조 및/또는 바이너리 트리 구조를 기반으로 하위(deeper) 뎁스의 복수의 코딩 유닛들로 분할될 수 있다. 이 경우 예를 들어 쿼드 트리 구조가 먼저 적용되고 바이너리 트리 구조가 나중에 적용될 수 있다. 또는 바이너리 트리 구조가 먼저 적용될 수도 있다. 더 이상 분할되지 않는 최종 코딩 유닛을 기반으로 본 발명에 따른 코딩 절차가 수행될 수 있다. 이 경우 영상 특성에 따른 코딩 효율 등을 기반으로, 최대 코딩 유닛이 바로 최종 코딩 유닛으로 사용될 수 있고, 또는 필요에 따라 코딩 유닛은 재귀적으로(recursively) 보다 하위 뎁스의 코딩 유닛들로 분할되어 최적의 사이즈의 코딩 유닛이 최종 코딩 유닛으로 사용될 수 있다. 여기서 코딩 절차라 함은 후술하는 예측, 변환, 및 복원 등의 절차를 포함할 수 있다.
다른 예로, 처리 유닛은 코딩 유닛(coding unit, CU) 예측 유닛(prediction unit, PU) 또는 변환 유닛(transform unit, TU)을 포함할 수도 있다. 코딩 유닛은 최대 코딩 유닛(largest coding unit, LCU)으로부터 쿼드 트리 구조를 따라서 하위(deeper) 뎁스의 코딩 유닛들로 분할(split)될 수 있다. 이 경우 영상 특성에 따른 코딩 효율 등을 기반으로, 최대 코딩 유닛이 바로 최종 코딩 유닛으로 사용될 수 있고, 또는 필요에 따라 코딩 유닛은 재귀적으로(recursively) 보다 하위 뎁스의 코딩 유닛들로 분할되어 최적의 사이즈의 코딩 유닛이 최종 코딩 유닛으로 사용될 수 있다. 최소 코딩 유닛(smallest coding unit, SCU)이 설정된 경우 코딩 유닛은 최소 코딩 유닛보다 더 작은 코딩 유닛으로 분할될 수 없다. 여기서 최종 코딩 유닛이라 함은 예측 유닛 또는 변환 유닛으로 파티셔닝 또는 분할되는 기반이 되는 코딩 유닛을 의미한다. 예측 유닛은 코딩 유닛으로부터 파티셔닝(partitioning)되는 유닛으로서, 샘플 예측의 유닛일 수 있다. 이 때, 예측 유닛은 서브 블록(sub block)으로 나뉠 수도 있다. 변환 유닛은 코딩 유닛으로부터 쿼드 트리 구조를 따라서 분할 될 수 있으며, 변환 계수를 유도하는 유닛 및/또는 변환 계수로부터 레지듀얼 신호(residual signal)를 유도하는 유닛일 수 있다. 이하, 코딩 유닛은 코딩 블록(coding block, CB), 예측 유닛은 예측 블록(prediction block, PB), 변환 유닛은 변환 블록(transform block, TB) 으로 불릴 수 있다. 예측 블록 또는 예측 유닛은 픽처 내에서 블록 형태의 특정 영역을 의미할 수 있고, 예측 샘플의 어레이(array)를 포함할 수 있다. 또한, 변환 블록 또는 변환 유닛은 픽처 내에서 블록 형태의 특정 영역을 의미할 수 있고, 변환 계수 또는 레지듀얼 샘플의 어레이를 포함할 수 있다.
예측부(110)는 처리 대상 블록(이하, 현재 블록이라 함)에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부(110)에서 수행되는 예측의 단위는 코딩 블록일 수 있고, 변환 블록일 수도 있고, 예측 블록일 수도 있다.
예측부(110)는 현재 블록에 인트라 예측이 적용되는지 인터 예측이 적용되는지를 결정할 수 있다. 일 예로, 예측부(110)는 CU 단위로 인트라 예측 또는 인터 예측이 적용되는지를 결정할 수 있다.
인트라 예측의 경우에, 예측부(110)는 현재 블록이 속하는 픽처(이하, 현재 픽처) 내의 현재 블록 외부의 참조 샘플을 기반으로 현재 블록에 대한 예측 샘플을 유도할 수 있다. 이 때, 예측부(110)는 (i) 현재 블록의 주변(neighboring) 참조 샘플들의 평균(average) 혹은 인터폴레이션(interpolation)을 기반으로 예측 샘플을 유도할 수 있고, (ii) 현재 블록의 주변 참조 샘플들 중 예측 샘플에 대하여 특정 (예측) 방향에 존재하는 참조 샘플을 기반으로 상기 예측 샘플을 유도할 수도 있다. (i)의 경우는 비방향성 모드 또는 비각도 모드, (ii)의 경우는 방향성(directional) 모드 또는 각도(angular) 모드라고 불릴 수 있다. 인트라 예측에서 예측 모드는 예를 들어 33개의 방향성 예측 모드와 적어도 2개 이상의 비방향성 모드를 가질 수 있다. 비방향성 모드는 DC 예측 모드 및 플래너 모드(Planar 모드)를 포함할 수 있다. 예측부(110)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.
인터 예측의 경우에, 예측부(110)는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 샘플을 기반으로, 현재 블록에 대한 예측 샘플을 유도할 수 있다. 예측부(110)는 스킵(skip) 모드, 머지(merge) 모드, 및 MVP(motion vector prediction) 모드 중 어느 하나를 적용하여 현재 블록에 대한 예측 샘플을 유도할 수 있다. 스킵 모드와 머지 모드의 경우에, 예측부(110)는 주변 블록의 움직임 정보를 현재 블록의 움직임 정보로 이용할 수 있다. 스킵 모드의 경우, 머지 모드와 달리 예측 샘플과 원본 샘플 사이의 차(레지듀얼)가 전송되지 않는다. MVP 모드의 경우, 주변 블록의 움직임 벡터를 움직임 벡터 예측자(Motion Vector Predictor)로 이용하여 현재 블록의 움직임 벡터 예측자로 이용하여 현재 블록의 움직임 벡터를 유도할 수 있다.
인터 예측의 경우에, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처(reference picture)에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 상기 시간적 주변 블록을 포함하는 참조 픽처는 동일 위치 픽처(collocated picture, colPic)라고 불릴 수도 있다. 움직임 정보(motion information)는 움직임 벡터와 참조 픽처 인덱스를 포함할 수 있다. 예측 모드 정보와 움직임 정보 등의 정보는 (엔트로피) 인코딩되어 비트스트림 형태로 출력될 수 있다.
스킵 모드와 머지 모드에서 시간적 주변 블록의 움직임 정보가 이용되는 경우에, 참조 픽처 리스트(reference picture list) 상의 최상위 픽처가 참조 픽처로서 이용될 수도 있다. 참조 픽처 리스트(Picture Order Count)에 포함되는 참조 픽처들은 현재 픽처와 해당 참조 픽처 간의 POC(Picture order count) 차이 기반으로 정렬될 수 있다. POC는 픽처의 디스플레이 순서에 대응하며, 코딩 순서와 구분될 수 있다.
감산부(121)는 원본 샘플과 예측 샘플 간의 차이인 레지듀얼 샘플을 생성한다. 스킵 모드가 적용되는 경우에는, 상술한 바와 같이 레지듀얼 샘플을 생성하지 않을 수 있다.
변환부(122)는 변환 블록 단위로 레지듀얼 샘플을 변환하여 변환 계수(transform coefficient)를 생성한다. 변환부(122)는 해당 변환 블록의 사이즈와, 해당 변환 블록과 공간적으로 겹치는 코딩 블록 또는 예측 블록에 적용된 예측 모드에 따라서 변환을 수행할 수 있다. 예컨대, 상기 변환 블록과 겹치는 상기 코딩 블록 또는 상기 예측 블록에 인트라 예측이 적용되었고, 상기 변환 블록이 4×4의 레지듀얼 어레이(array)라면, 레지듀얼 샘플은 DST(Discrete Sine Transform) 변환 커널을 이용하여 변환되고, 그 외의 경우라면 레지듀얼 샘플은 DCT(Discrete Cosine Transform) 변환 커널을 이용하여 변환할 수 있다.
양자화부(123)는 변환 계수들을 양자화하여, 양자화된 변환 계수를 생성할 수 있다.
재정렬부(124)는 양자화된 변환 계수를 재정렬한다. 재정렬부(124)는 계수들 스캐닝(scanning) 방법을 통해 블록 형태의 양자화된 변환 계수들을 1차원 벡터 형태로 재정렬할 수 있다. 여기서 재정렬부(124)는 별도의 구성으로 설명하였으나, 재정렬부(124)는 양자화부(123)의 일부일 수 있다.
엔트로피 인코딩부(130)는 양자화된 변환 계수들에 대한 엔트로피 인코딩을 수행할 수 있다. 엔트로피 인코딩은 예를 들어 지수 골롬(exponential Golomb), CAVLC(context-adaptive variable length coding), CABAC(context-adaptive binary arithmetic coding) 등과 같은 인코딩 방법을 포함할 수 있다. 엔트로피 인코딩부(130)는 양자화된 변환 계수 외 비디오 복원에 필요한 정보들(예컨대 신택스 요소(syntax element)의 값 등)을 함께 또는 별도로 인코딩할 수도 있다. 엔트로피 인코딩된 정보들은 비트스트림 형태로 NAL(network abstraction layer) 유닛 단위로 전송 또는 저장될 수 있다.
역양자화부(125)는 양자화부(123)에서 양자화된 값(양자화된 변환 계수)들을 역양자화하고, 역변환부(126)는 역양자화부(125)에서 역양자화된 값들을 역변환하여 레지듀얼 샘플을 생성한다.
가산부(140)는 레지듀얼 샘플과 예측 샘플을 합쳐서 픽처를 복원한다. 레지듀얼 샘플과 예측 샘플은 블록 단위로 더해져서 복원 블록이 생성될 수 있다. 여기서 가산부(140)는 별도의 구성으로 설명하였으나, 가산부(140)는 예측부(110)의 일부일 수 있다. 한편, 가산부(140)는 복원부 또는 복원 블록 생성부로 불릴 수도 있다.
복원된 픽처(reconstructed picture)에 대하여 필터부(150)는 디블록킹 필터 및/또는 샘플 적응적 오프셋(sample adaptive offset)을 적용할 수 있다. 디블록킹 필터링 및/또는 샘플 적응적 오프셋을 통해, 복원 픽처 내 블록 경계의 아티팩트나 양자화 과정에서의 왜곡이 보정될 수 있다. 샘플 적응적 오프셋은 샘플 단위로 적용될 수 있으며, 디블록킹 필터링의 과정이 완료된 후 적용될 수 있다. 필터부(150)는 ALF(Adaptive Loop Filter)를 복원된 픽처에 적용할 수도 있다. ALF는 디블록킹 필터 및/또는 샘플 적응적 오프셋이 적용된 후의 복원된 픽처에 대하여 적용될 수 있다.
메모리(160)는 복원 픽처(디코딩된 픽처) 또는 인코딩/디코딩에 필요한 정보를 저장할 수 있다. 여기서 복원 픽처는 상기 필터부(150)에 의하여 필터링 절차가 완료된 복원 픽처일 수 있다. 상기 저장된 복원 픽처는 다른 픽처의 (인터) 예측을 위한 참조 픽처로 활용될 수 있다. 예컨대, 메모리(160)는 인터 예측에 사용되는 (참조) 픽처들을 저장할 수 있다. 이 때, 인터 예측에 사용되는 픽처들은 참조 픽처 세트(reference picture set) 혹은 참조 픽처 리스트(reference picture list)에 의해 지정될 수 있다.
도 2는 본 발명이 적용될 수 있는 비디오 디코딩 장치의 구성을 개략적으로 설명하는 도면이다.
도 2를 참조하면, 비디오 디코딩 장치(200)는 엔트로피 디코딩부(210), 레지듀얼 처리부(220), 예측부(230), 가산부(240), 필터부(250) 및 메모리(260)을 포함할 수 있다. 여기서 레지듀얼 처리부(220)는 재정렬부(221), 역양자화부(222), 역변환부(223)을 포함할 수 있다.
비디오 정보를 포함하는 비트스트림이 입력되면, 비디오 디코딩 장치(200)는 비디오 인코딩 장치에서 비디오 정보가 처리된 프로세스에 대응하여 비디오를 복원할 수 있다.
예컨대, 비디오 디코딩 장치(200)는 비디오 인코딩 장치에서 적용된 처리 유닛을 이용하여 비디오 디코딩을 수행할 수 있다. 따라서 비디오 디코딩의 처리 유닛 블록은 일 예로 코딩 유닛일 수 있고, 다른 예로 코딩 유닛, 예측 유닛 또는 변환 유닛일 수 있다. 코딩 유닛은 최대 코딩 유닛으로부터 쿼드 트리 구조 및/또는 바이너리 트리 구조를 따라서 분할될 수 있다.
예측 유닛 및 변환 유닛이 경우에 따라 더 사용될 수 있으며, 이 경우 예측 블록은 코딩 유닛으로부터 도출 또는 파티셔닝되는 블록으로서, 샘플 예측의 유닛일 수 있다. 이 때, 예측 유닛은 서브 블록으로 나뉠 수도 있다. 변환 유닛은 코딩 유닛으로부터 쿼드 트리 구조를 따라서 분할 될 수 있으며, 변환 계수를 유도하는 유닛 또는 변환 계수로부터 레지듀얼 신호를 유도하는 유닛일 수 있다.
엔트로피 디코딩부(210)는 비트스트림을 파싱하여 비디오 복원 또는 픽처 복원에 필요한 정보를 출력할 수 있다. 예컨대, 엔트로피 디코딩부(210)는 지수 골롬 부호화, CAVLC 또는 CABAC 등의 코딩 방법을 기초로 비트스트림 내 정보를 디코딩하고, 비디오 복원에 필요한 신택스 엘리먼트의 값, 레지듀얼에 관한 변환 계수의 양자화된 값 들을 출력할 수 있다.
보다 상세하게, CABAC 엔트로피 디코딩 방법은, 비트스트림에서 각 구문 요소에 해당하는 빈을 수신하고, 디코딩 대상 구문 요소 정보와 주변 및 디코딩 대상 블록의 디코딩 정보 혹은 이전 단계에서 디코딩된 심볼/빈의 정보를 이용하여 문맥(context) 모델을 결정하고, 결정된 문맥 모델에 따라 빈(bin)의 발생 확률을 예측하여 빈의 산술 디코딩(arithmetic decoding)를 수행하여 각 구문 요소의 값에 해당하는 심볼을 생성할 수 있다. 이때, CABAC 엔트로피 디코딩 방법은 문맥 모델 결정 후 다음 심볼/빈의 문맥 모델을 위해 디코딩된 심볼/빈의 정보를 이용하여 문맥 모델을 업데이트할 수 있다.
엔트로피 디코딩부(210)에서 디코딩된 정보 중 예측에 관한 정보는 예측부(230)로 제공되고, 엔트로피 디코딩부(210)에서 엔트로피 디코딩이 수행된 레지듀얼 값, 즉 양자화된 변환 계수는 재정렬부(221)로 입력될 수 있다.
재정렬부(221)는 양자화되어 있는 변환 계수들을 2차원의 블록 형태로 재정렬할 수 있다. 재정렬부(221)는 인코딩 장치에서 수행된 계수 스캐닝에 대응하여 재정렬을 수행할 수 있다. 여기서 재정렬부(221)는 별도의 구성으로 설명하였으나, 재정렬부(221)는 역양자화부(222)의 일부일 수 있다.
역양자화부(222)는 양자화되어 있는 변환 계수들을 (역)양자화 파라미터를 기반으로 역양자화하여 변환 계수를 출력할 수 있다. 이 때, 양자화 파라미터를 유도하기 위한 정보는 인코딩 장치로부터 시그널링될 수 있다.
역변환부(223)는 변환 계수들을 역변환하여 레지듀얼 샘플들을 유도할 수 있다.
예측부(230)는 현재 블록에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부(230)에서 수행되는 예측의 단위는 코딩 블록일 수도 있고, 변환 블록일 수도 있고, 예측 블록일 수도 있다.
예측부(230)는 상기 예측에 관한 정보를 기반으로 인트라 예측을 적용할 것인지 인터 예측을 적용할 것인지를 결정할 수 있다. 이 때, 인트라 예측과 인터 예측 중 어느 것을 적용할 것인지를 결정하는 단위와 예측 샘플을 생성하는 단위는 상이할 수 있다. 아울러, 인터 예측과 인트라 예측에 있어서 예측 샘플을 생성하는 단위 또한 상이할 수 있다. 예를 들어, 인터 예측과 인트라 예측 중 어느 것을 적용할 것인지는 CU 단위로 결정할 수 있다. 또한 예를 들어, 인터 예측에 있어서 PU 단위로 예측 모드를 결정하고 예측 샘플을 생성할 수 있고, 인트라 예측에 있어서 PU 단위로 예측 모드를 결정하고 TU 단위로 예측 샘플을 생성할 수도 있다.
인트라 예측의 경우에, 예측부(230)는 현재 픽처 내의 주변 참조 샘플을 기반으로 현재 블록에 대한 예측 샘플을 유도할 수 있다. 예측부(230)는 현재 블록의 주변 참조 샘플을 기반으로 방향성 모드 또는 비방향성 모드를 적용하여 현재 블록에 대한 예측 샘플을 유도할 수 있다. 이 때, 주변 블록의 인트라 예측 모드를 이용하여 현재 블록에 적용할 예측 모드가 결정될 수도 있다.
인터 예측의 경우에, 예측부(230)는 참조 픽처 상에서 움직임 벡터에 의해 참조 픽처 상에서 특정되는 샘플을 기반으로 현재 블록에 대한 예측 샘플을 유도할 수 있다. 예측부(230)는 스킵(skip) 모드, 머지(merge) 모드 및 MVP 모드 중 어느 하나를 적용하여 현재 블록에 대한 예측 샘플을 유도할 수 있다. 이때, 비디오 인코딩 장치에서 제공된 현재 블록의 인터 예측에 필요한 움직임 정보, 예컨대 움직임 벡터, 참조 픽처 인덱스 등에 관한 정보는 상기 예측에 관한 정보를 기반으로 획득 또는 유도될 수 있다
스킵 모드와 머지 모드의 경우에, 주변 블록의 움직임 정보가 현재 블록의 움직임 정보로 이용될 수 있다. 이 때, 주변 블록은 공간적 주변 블록과 시간적 주변 블록을 포함할 수 있다.
예측부(230)는 가용한 주변 블록의 움직임 정보로 머지 후보 리스트를 구성하고, 머지 인덱스가 머지 후보 리스트 상에서 지시하는 정보를 현재 블록의 움직임 벡터로 사용할 수 있다. 머지 인덱스는 인코딩 장치로부터 시그널링될 수 있다. 움직임 정보는 움직임 벡터와 참조 픽처를 포함할 수 있다. 스킵 모드와 머지 모드에서 시간적 주변 블록의 움직임 정보가 이용되는 경우에, 참조 픽처 리스트 상의 최상위 픽처가 참조 픽처로서 이용될 수 있다.
스킵 모드의 경우, 머지 모드와 달리 예측 샘플과 원본 샘플 사이의 차이(레지듀얼)이 전송되지 않는다.
MVP 모드의 경우, 주변 블록의 움직임 벡터를 움직임 벡터 예측자(motion vector predictor)로 이용하여 현재 블록의 움직임 벡터가 유도될 수 있다. 이 때, 주변 블록은 공간적 주변 블록과 시간적 주변 블록을 포함할 수 있다.
일 예로, 머지 모드가 적용되는 경우, 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터를 이용하여, 머지 후보 리스트가 생성될 수 있다. 머지 모드에서는 머지 후보 리스트에서 선택된 후보 블록의 움직임 벡터가 현재 블록의 움직임 벡터로 사용된다. 상기 예측에 관한 정보는 상기 머지 후보 리스트에 포함된 후보 블록들 중에서 선택된 최적의 움직임 벡터를 갖는 후보 블록을 지시하는 머지 인덱스를 포함할 수 있다. 이 때, 예측부(230)는 상기 머지 인덱스를 이용하여, 현재 블록의 움직임 벡터를 도출할 수 있다.
다른 예로, MVP(Motion Vector Prediction) 모드가 적용되는 경우, 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터를 이용하여, 움직임 벡터 예측자 후보 리스트가 생성될 수 있다. 즉, 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터는 움직임 벡터 후보로 사용될 수 있다. 상기 예측에 관한 정보는 상기 리스트에 포함된 움직임 벡터 후보 중에서 선택된 최적의 움직임 벡터를 지시하는 예측 움직임 벡터 인덱스를 포함할 수 있다. 이 때, 예측부(230)는 상기 움직임 벡터 인덱스를 이용하여, 움직임 벡터 후보 리스트에 포함된 움직임 벡터 후보 중에서, 현재 블록의 예측 움직임 벡터를 선택할 수 있다. 인코딩 장치의 예측부는 현재 블록의 움직임 벡터와 움직임 벡터 예측자 간의 움직임 벡터 차분(MVD)을 구할 수 있고, 이를 인코딩하여 비트스트림 형태로 출력할 수 있다. 즉, MVD는 현재 블록의 움직임 벡터에서 상기 움직임 벡터 예측자를 뺀 값으로 구해질 수 있다. 이 때, 예측부(230)는 상기 예측에 관한 정보에 포함된 움직임 벡터 차분을 획득하고, 상기 움직임 벡터 차분과 상기 움직임 벡터 예측자의 가산을 통해 현재 블록의 상기 움직임 벡터를 도출할 수 있다. 예측부는 또한 참조 픽처를 지시하는 참조 픽처 인덱스 등을 상기 예측에 관한 정보로부터 획득 또는 유도할 수 있다.
가산부(240)는 레지듀얼 샘플과 예측 샘플을 더하여 현재 블록 혹은 현재 픽처를 복원할 수 있다. 가산부(240)는 레지듀얼 샘플과 예측 샘플을 블록 단위로 더하여 현재 픽처를 복원할 수도 있다. 스킵 모드가 적용된 경우에는 레지듀얼이 전송되지 않으므로, 예측 샘플이 복원 샘플이 될 수 있다. 여기서는 가산부(240)를 별도의 구성으로 설명하였으나, 가산부(240)는 예측부(230)의 일부일 수도 있다. 한편, 가산부(240)는 복원부 또는 복원 블록 생성부로 불릴 수도 있다.
필터부(250)는 복원된 픽처에 디블록킹 필터링 샘플 적응적 오프셋, 및/또는 ALF 등을 적용할 수 있다. 이 때, 샘플 적응적 오프셋은 샘플 단위로 적용될 수 있으며, 디블록킹 필터링 이후 적용될 수도 있다. ALF는 디블록킹 필터링 및/또는 샘플 적응적 오프셋 이후 적용될 수도 있다.
메모리(260)는 복원 픽처(디코딩된 픽처) 또는 디코딩에 필요한 정보를 저장할 수 있다. 여기서 복원 픽처는 상기 필터부(250)에 의하여 필터링 절차가 완료된 복원 픽처일 수 있다. 예컨대, 메모리(260)는 인터 예측에 사용되는 픽처들을 저장할 수 있다. 이 때, 인터 예측에 사용되는 픽처들은 참조 픽처 세트 혹은 참조 픽처 리스트에 의해 지정될 수도 있다. 복원된 픽처는 다른 픽처에 대한 참조 픽처로서 이용될 수 있다. 또한, 메모리(260)는 복원된 픽처를 출력 순서에 따라서 출력할 수도 있다.
상술한 내용과 같이 현재 블록에 대하여 인트라 예측이 적용되는 경우, 상기 현재 블록의 주변 샘플들을 기반으로 예측이 수행될 수 있다. 하지만, 현재 코딩 시스템에서 예측은 블록 단위로 수행되는바, 블록 사이의 불연속성이 발생하는 문제가 있을 수 있다. 따라서, 현재 블록에 대한 인트라 예측 수행 후에, 현재 블록과 현재 블록의 주변 블록 사이의 불연속성을 제거하는 방안이 제안될 수 있고, 이를 통하여 현재 블록에 대한 레지듀얼 신호의 발생을 방지하고 주관적 화질을 향상시키는 효과를 얻을 수 있다. 예를 들어, 인트라 예측이 사용되는 인코딩 과정/디코딩 과정은 후술하는 내용과 같을 수 있다.
도 3은 본 발명이 적용될 수 있는 비디오 인코딩 장치를 개략적으로 설명하는 다른 일 예를 나타낸다.
도 3을 참조하면, 비디오 인코딩 장치는 인트라 예측부, 레퍼런스 스무딩부(300), 예측부(310), 포스트-필터부(320), 변환부(330), 양자화부(340)을 포함할 수 있다. 여기서, 인트라 예측부는 레퍼런스 스무딩부(300), 예측부(310), 포스트-필터부(320)를 포함할 수 있다.
현재 블록에 인트라 예측이 적용되는 경우, 레퍼런스 스무딩부(300)는 현재 블록이 속하는 픽처(이하, 현재 픽처) 내의 현재 블록의 인트라 예측에 사용되는 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들을 상기 현재 블록의 사이즈 및 샘플값을 기반으로 스무딩 처리(smoothing process) 할 수 있다. 이를 통하여 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들 각각의 샘플값의 차이로 인하여 발생될 수 있는 상기 현재 블록의 예측 샘플들에 대한 비주얼 아티팩트(visual artifact)를 방지할 수 있다.
예측부(310)는 (i) 현재 블록의 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들의 평균(average) 혹은 인터폴레이션(interpolation)을 기반으로 예측 샘플을 유도할 수 있고, (ii) 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들 중 예측 샘플에 대하여 특정 (예측) 방향에 존재하는 주변 샘플을 기반으로 상기 예측 샘플을 유도할 수도 있다. (i)의 경우는 비방향성 모드 또는 비각도 모드, (ii)의 경우는 방향성(directional) 모드 또는 각도(angular) 모드라고 불릴 수 있다. 인트라 예측에서 예측 모드는 예를 들어 33개의 방향성 예측 모드와 적어도 2개 이상의 비방향성 모드를 가질 수 있다. 비방향성 모드는 DC 예측 모드 및 플래너 모드(Planar 모드)를 포함할 수 있다. 예측부(310)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.
상기 현재 블록의 예측 샘플이 수직 모드, 수평 모드 또는 DC 모드를 기반으로 도출된 경우, 포스트-필터부(320)는 현재 블록과 주변 샘플들과의 불연속성을 완화하기 위한 후처리(post-processing) 필터링을 수행할 수 있다. 이 후 인코딩 장치는 상기 예측 샘플과 원본 샘플간의 차분을 레지듀얼 샘플로 도출할 수 있고, 변환부(330)는 블록 단위로 레지듀얼 샘플을 변환하여 변환 계수(transform coefficient)를 생성할 수 있다 또한, 양자화부(340)는 변환 계수들을 양자화하여, 양자화된 변환 계수를 생성할 수 있다.
도 4는 인코딩 장치에서 인트라 예측이 수행되는 과정을 예시적으로 나타낸다. 인코딩 장치는 인트라 예측을 수행하여 현재 블록의 예측 샘플을 생성할 수 있다(S400). 상기 예측 샘플은 예측 신호 또는 인트라 예측 신호라고 나타낼 수도 있다. 구체적으로, 인코딩 장치는 상기 현재 블록의 인트라 예측에 사용되는 좌측 주변 샘플들 및 상측 주변 샘플들을 상기 현재 블록의 사이즈 및 샘플값을 기반으로 스무딩 처리(smoothing process) 할 수 있다(S410). 이 후, 인코딩 장치는 상술한 바와 같이 인트라 예측 모드에 따른 예측을 수행하여 상기 예측 샘플을 생성할 수 있고(S420), 현재 블록과 주변 샘플들과의 불연속성을 완화하기 위한 후처리(post-processing) 필터링을 수행할 수 있다(S430). 인코딩 장치는 상기 예측 샘플과 원본 샘플간의 차분을 레지듀얼 샘플을 생성할 수 있고(S440), 블록 단위로 레지듀얼 샘플을 변환하여 변환 계수(transform coefficient)들을 생성할 수 있다(S450). 또한, 인코딩 장치는 상기 변환 계수들을 양자화하여, 양자화된 변환 계수들을 생성할 수 있고(S460), 상기 양자화된 변환 계수들을 엔트로피 인코딩하여 시그널링할 수 있다(S470).
도 5는 본 발명이 적용될 수 있는 비디오 디코딩 장치를 개략적으로 설명하는 다른 일 예를 나타낸다.
도 5를 참조하면, 비디오 인코딩 장치는 인트라 예측부, 레퍼런스 스무딩부(500), 예측부(510), 포스트-필터부(520), 역양자화부(530), 역변환부(540)을 포함할 수 있다. 여기서, 인트라 예측부는 레퍼런스 스무딩부(500), 예측부(510), 포스트-필터부(520)를 포함할 수 있다. 인트라 예측부는 현재 블록의 주변 참조 샘플을 기반으로 방향성 모드 또는 비방향성 모드를 적용하여 현재 블록에 대한 예측 샘플을 유도할 수 있다. 이 때, 주변 블록의 인트라 예측 모드를 이용하여 현재 블록에 적용할 예측 모드가 결정될 수도 있다.
구체적으로, 현재 블록에 인트라 예측이 적용되는 경우, 레퍼런스 스무딩부(500)는 현재 블록이 속하는 픽처(이하, 현재 픽처) 내의 현재 블록의 인트라 예측에 사용되는 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들을 상기 현재 블록의 사이즈 및 샘플값을 기반으로 스무딩 처리(smoothing process) 할 수 있다. 이를 통하여 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들 각각의 샘플값의 차이로 인하여 발생될 수 있는 상기 현재 블록의 예측 샘플들에 대한 비주얼 아티팩트(visual artifact)를 방지할 수 있다.
예측부(510)는 (i) 현재 블록의 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들의 평균(average) 혹은 인터폴레이션(interpolation)을 기반으로 예측 샘플을 유도할 수 있고, (ii) 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들 중 예측 샘플에 대하여 특정 (예측) 방향에 존재하는 주변 샘플을 기반으로 상기 예측 샘플을 유도할 수도 있다. (i)의 경우는 비방향성 모드 또는 비각도 모드, (ii)의 경우는 방향성(directional) 모드 또는 각도(angular) 모드라고 불릴 수 있다. 인트라 예측에서 예측 모드는 예를 들어 33개의 방향성 예측 모드와 적어도 2개 이상의 비방향성 모드를 가질 수 있다. 비방향성 모드는 DC 예측 모드 및 플래너 모드(Planar 모드)를 포함할 수 있다. 예측부(510)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.
상기 현재 블록의 예측 샘플이 수직 모드, 수평 모드 또는 DC 모드를 기반으로 도출된 경우, 포스트-필터부(520)는 현재 블록과 주변 샘플들과의 불연속성을 완화하기 위한 후처리(post-processing) 필터링을 수행할 수 있다. 이 후, 역양자화부(530)는 인코딩 장치로부터 수신된 양자화된 변환 계수(transform coefficient)들을 역양자화할 수 있고, 역변환부(540)는 상기 역양자화된 변환 계수들을 역변환하여 블록 단위로 레지듀얼 샘플을 생성할 수 있다. 디코딩 장치는 상기 레지듀얼 샘플과 상기 예측 샘플을 기반으로 인트라 예측을 기반으로 인코딩된 상기 현재 블록을 복원할 수 있다.
도 6은 디코딩 장치에서 인트라 예측이 수행되는 과정을 예시적으로 나타낸다. 디코딩 장치는 비트스트림을 통하여 수신된 엔트로피 인코딩된 정보들을 엔트로피 디코딩하여 양자화된 변환 계수들을 획득할 수 있다(S600). 다음으로, 디코딩 장치는 상기 양자화된 변환 계수들을 역양자화하여 변환계수들을 획득할 수 있고(S610), 상기 변환 계수들을 역변환하여 블록 단위로 레지듀얼 샘플을 생성할 수 있다(S620). 다음으로, 디코딩 장치는 인트라 예측을 수행하여 현재 블록의 예측 샘플을 생성할 수 있다(S630). 상기 예측 샘플은 예측 신호 또는 인트라 예측 신호라고 나타낼 수도 있다. 구체적으로, 디코딩 장치는 상기 현재 블록의 인트라 예측에 사용되는 좌측 주변 샘플들 및 상측 주변 샘플들을 상기 현재 블록의 사이즈 및 샘플값을 기반으로 스무딩 처리(smoothing process) 할 수 있다(S640). 이 후, 디코딩 장치는 상술한 바와 같이 인트라 예측 모드에 따른 예측을 수행하여 상기 예측 샘플을 생성할 수 있고(S650), 현재 블록과 주변 샘플들과의 불연속성을 완화하기 위한 후처리(post-processing) 필터링을 수행할 수 있다(S660). 디코딩 장치는 상기 예측 샘플과 상기 레지듀얼 샘플을 더하여 상기 현재 블록의 복원 샘플을 생성할 수 있다(S670).
상술한 내용과 같이 상기 현재 블록의 디코딩 시점에 이미 인코딩/디코딩이 수행된 주변 샘플을 기반으로 상기 인트라 예측이 수행될 수 있다. 즉, 상기 현재 블록의 예측 샘플은 이미 복원된 상기 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들을 사용하여 복원될 수 있다. 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들은 다음 도 7과 같이 나타낼 수 있다.
도 7은 상기 현재 블록의 인트라 예측에 사용되는 상기 좌측 주변 샘플들 및 상측 주변 샘플들을 예시적으로 나타낸다.
상기 현재 블록에 인트라 예측이 수행되는 경우, 상기 현재 블록에 대한 인트라 예측 모드가 도출될 수 있고, 상기 인트라 예측 모드에 따라 상기 좌측 주변 샘플들 및 상측 주변 샘플들 중 적어도 하나를 이용하여 상기 현재 블록에 대한 예측 샘플이 생성될 수 있고, 시그널링된 상기 현재 블록의 레지듀얼 신호를 기반으로 도출된 레지듀얼 샘플과 상기 예측 샘플을 가산하여 상기 현재 블록의 복원 샘플이 도출될 수 있다. 또한, 도 7을 참조하면 상기 현재 블록의 사이즈가 WxH 인 경우, 상기 현재 블록의 상기 주변 샘플들은 2W개의 상측 주변 샘플들, 2H개의 좌측 주변 샘플들 및 좌상측 코너 주변 샘플을 포함할 수 있다. 예를 들어, 상기 현재 블록의 사이즈가 WxH이고, 상기 현재 블록의 좌상단(top-left) 샘플 포지션의 x성분이 0 및 y성분이 0인 경우, 상기 좌측 주변 샘플들은 p[-1][0] 내지 p[-1][2H-1], 상기 좌상측 코너 주변 샘플은 p[-1][-1], 상기 상측 주변 샘플들은 p[0][-1] 내지 p[2W-1][-1]일 수 있다.
또한, 상기 현재 블록의 인트라 예측에 사용되는 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들은 상기 현재 블록의 사이즈 및 샘플값을 기반으로 스무딩 처리(smoothing process) 될 수 있다. 즉, 상기 현재 블록의 사이즈 및 샘플값을 기반으로 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들 각각의 샘플값의 차이를 줄이기 위한 필터링이 수행될 수 있다. 이를 통하여 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들 각각의 샘플값의 차이로 인하여 발생될 수 있는 상기 현재 블록의 예측 샘플들에 대한 비주얼 아티팩트(visual artifact)를 방지할 수 있다.
여기서, 인트라 예측 모드는 2개의 비방향성 인트라 예측 모드들과 33개의 방향성 인트라 예측 모드들을 포함할 수 있다. 상기 비방향성 인트라 예측 모드들은 플래너(planar) 인트라 예측 모드 및 DC 인트라 예측 모드를 포함할 수 있고, 상기 방향성 인트라 예측 모드들은 2번 내지 34번 인트라 예측 모드들을 포함할 수 있다. 상기 플래너 인트라 예측 모드는 플래너 모드라고 불릴 수 있고, 상기 DC 인트라 예측 모드는 DC 모드라고 불릴 수 있다. 또한, 10번 인트라 예측 모드는 수평 인트라 예측 모드(horizontal intra prediction mode) 또는 수평 모드, 26번 인트라 예측 모드는 수직 인트라 예측 모드(vertical intra prediction mode) 또는 수직 모드를 나타내며 이를 기준으로 방향성 인트라 모드(angular intra mode)의 예측 방향을 각도로 표현할 수 있다. 다시 말하자면, 10번 인트라 예측 모드에 대응하는 수평기준각도 0˚를 기준으로 하여 각 인트라 예측 모드에 대응하는 상대적 각도를 표현할 수 있고, 26번 인트라 예측 모드에 대응하는 수직기준각도 0˚를 기준으로 하여 각 인트라 예측 모드에 대응하는 상대적 각도를 표현할 수 있다.
또한, 고화질의 비디오에 대한 수요가 늘어나고 있고, 이에 따른 비디오 코덱의 효율을 높이기 위해 방향성 인트라 예측 방향의 수가 65개로 증가할 수 있다. 즉, 인트라 예측 모드는 2개의 비방향성 인트라 예측 모드들과 65개의 방향성 인트라 예측 모드들을 포함할 수 있다. 상기 비방향성 인트라 예측 모드들은 플래너(planar) 인트라 예측 모드 및 DC 인트라 예측 모드를 포함할 수 있고, 상기 방향성 인트라 예측 모드들은 2번 내지 66번 인트라 예측 모드들을 포함할 수 있다.
도 8은 65개의 예측 방향의 인트라 방향성 모드들을 예시적으로 나타낸다.
도 8을 참조하면, 좌상 대각 예측 방향을 갖는 34번 인트라 예측 모드를 중심으로 수평 방향성(horizontal directionality)을 갖는 인트라 예측 모드와 수직 방향성(vertical directionality)을 갖는 인트라 예측 모드를 구분할 수 있다. 도 8의 H와 V는 각각 수평 방향성과 수직 방향성을 의미하며, -32 ~ 32의 숫자는 샘플 그리드 포지션(sample grid position) 상에서 1/32 단위의 변위를 나타낸다. 2번 내지 33번 인트라 예측 모드는 수평 방향성, 34번 내지 66번 인트라 예측 모드는 수직 방향성을 갖는다. 18번 인트라 예측 모드와 50번 인트라 예측 모드는 각각 수평 인트라 예측 모드(horizontal intra prediction mode), 수직 인트라 예측 모드(vertical intra prediction mode)를 나타내며 이를 기준으로 방향성 인트라 예측 모드(angular intra prediction mode)의 예측 방향을 각도로 표현할 수 있다. 다시 말하자면, 18번 인트라 예측 모드에 대응하는 수평기준각도 0˚를 기준으로 하여 각 인트라 예측 모드에 대응하는 상대적 각도를 표현할 수 있고, 50번 인트라 예측 모드에 대응하는 수직기준각도 0˚를 기준으로 하여 각 인트라 예측 모드에 대응하는 상대적 각도를 표현할 수 있다. 또한, 2번 인트라 예측 모드는 좌하향 대각 인트라 예측 모드, 34번 인트라 예측 모드는 좌상향 대각 인트라 예측 모드, 66번 인트라 예측 모드는 우상향 대각 인트라 예측 모드라고 불릴 수 있다.
상기 현재 블록에 방향성 인트라 예측 모드가 적용되는 경우, 상기 현재 블록 내 인트라 예측이 수행되는 대상 샘플을 기준으로 상기 방향성 인트라 예측 모드의 예측 방향에 위치하는 참조 샘플을 기반으로 상기 대상 샘플의 예측 샘플이 도출될 수 있다. 즉, 상기 예측 방향에 위치하는 상기 참조 샘플이 복사되어 상기 예측 샘플로 도출될 수 있다. 여기서, 상기 참조 샘플은 상기 현재 블록의 상측 주변 샘플들 및 좌측 주변 샘플들 중 상기 대상 샘플을 기준으로 상기 방향성 인트라 예측 모드의 예측 방향에 위치하는 주변 샘플을 나타낼 수 있다. 한편, 상기 대상 샘플을 기준으로 상기 방향성 인트라 예측 모드의 예측 방향에 정수 샘플 단위의 참조 샘플이 존재하지 않는 경우, 즉, 상기 대상 샘플을 기준으로 상기 방향성 인트라 예측 모드의 예측 방향에 위치하는 참조 샘플의 위치가 분수 샘플(fractional sample) 위치인 경우, 상기 참조 샘플의 좌우에 인접한 정수 샘플들간의 보간을 통하여 상기 참조 샘플의 샘플값이 도출될 수 있고, 상기 참조 샘플을 기반으로 상기 대상 샘플의 예측 샘플이 도출될 수 있다. 상기 정수 샘플들간의 보간은 상기 참조 샘플과 상기 정수 샘플들의 거리비를 기반으로 수행될 수 있다.
도 9는 상기 방향성 인트라 예측 모드의 예측 방향에 위치하는 참조 샘플의 위치가 분수 샘플(fractional sample) 위치인 경우, 상기 참조 샘플의 좌우에 인접한 정수 샘플들을 기반으로 상기 대상 샘플의 예측 샘플이 도출되는 일 예를 나타낸다.
도 9를 참조하면 상기 대상 샘플을 기준으로 상기 방향성 인트라 예측 모드의 예측 방향에 위치하는 참조 샘플의 분수 샘플 위치는 tanθ*(y+1) 로 도출될 수 있다. 상기 분수 샘플 위치를 계산하기 위한 각 방향성 인트라 예측 모드의 각도 θ에 대한 tanθ 값은 연산 수행을 보다 쉽게 하기 위하여 미리 정수 단위로 스케일링(scaling)되어 정의될 수 있다. 스케일링된 각 방향성 인트라 예측 모드의 tanθ 값은 다음의 표와 같이 도출될 수 있다.
Figure PCTKR2019004621-appb-T000001
여기서, predModeIntra 는 상기 각 방향성 인트라 예측 모드를 나타낼 수 있고, intraPredAngle 은 상기 각 방향성 인트라 예측 모드의 예측 각도를 나타낼 수 있고, 또는 상기 각 방향성 인트라 예측 모드의 스케일링된 tanθ 근사값을 나타낼 수 있다. 표 1을 기반으로 미리 정의된 상기 인트라 예측 모드에 따른 tanθ 근사값이 도출될 수 있다. 한편, 스케일링된 각 방향성 인트라 예측 모드의 tan- 1θ 값은 다음의 표와 같이 도출될 수 있다.
Figure PCTKR2019004621-appb-T000002
여기서, predModeIntra 는 상기 각 방향성 인트라 예측 모드를 나타낼 수 있고, intraPredAngle 은 상기 각 방향성 인트라 예측 모드의 인버스(inverse) 예측 각도를 나타낼 수 있고, 또는 상기 각 방향성 인트라 예측 모드의 스케일링된 tan- 1θ 근사값을 나타낼 수 있다. 상기 표 2를 기반으로 미리 정의된 상기 인트라 예측 모드에 따른 tan- 1θ 근사값이 도출될 수 있다.
한편, 상기 현재 블록에 비방형성 인트라 예측 모드가 적용될 수도 있다. 상기 비방향성 인트라 예측 모드들은 플래너(planar) 인트라 예측 모드 및 DC 인트라 예측 모드를 포함할 수 있다. 상기 플래너 인트라 예측 모드는 플래너 모드라고 불릴 수 있고, 상기 DC 인트라 예측 모드는 DC 모드라고 불릴 수 있다. 상기 DC 모드는 상기 현재 블록의 주변 샘플들의 평균값을 기반으로 상기 현재 블록의 예측 샘플이 도출될 수 있다. 상기 DC 모드를 기반으로 수행되는 인트라 예측은 상기 현재 블록의 샘플들의 값이 유사한 경우에 효율적으로 수행될 수 있다. 반면, 상기 현재 블록의 샘플들의 값이 다양한 경우에 상기 DC 모드를 기반으로 인트라 예측이 수행되는 경우, 상기 현재 블록의 예측 블록(predicted block)과 주변 샘플들 간의 불연속성이 발생될 수 있다. 유사한 경우에 방향성 인트라 예측 모드를 기반으로 인트라 예측 수행되는 경우에도 의도하지 않은 비스블 컨투어링(visible contouring)이 발생될 수 있다. 상기 플래너 모드는 이러한 문제를 보완하기 위하여 고안되었다. 상기 플래너 모드는 상기 대상 샘플에 대한 참조 샘플들을 기반으로 수평 선형 예측(horizontal linear prediction)과 수직 선형 예측(vertical linear prediction)을 수행한 뒤, 도출된 값들을 평균하여 상기 대상 샘플의 예측 샘플을 생성하는 예측 모드를 나타낸다.
한편, 현재 블록에 대하여 방향성 인트라 예측 모드를 기반으로 예측이 수행되는 경우, 상술한 내용과 같이 상기 현재 블록의 대상 샘플을 기준으로 상기 현재 블록의 방향성 인트라 예측 모드의 예측 방향에 정수 샘플 단위의 참조 샘플이 존재하지 않는 경우, 즉, 상기 대상 샘플을 기준으로 상기 방향성 인트라 예측 모드의 예측 방향에 위치하는 참조 샘플의 위치가 분수 샘플(fractional sample) 위치인 경우, 상기 참조 샘플 좌우의 정수 샘플들간의 보간을 통하여 상기 참조 샘플의 샘플값이 도출될 수 있고, 상기 도출된 참조 샘플을 기반으로 상기 대상 샘플의 예측 샘플이 도출될 수 있다. 상기 정수 샘플들은 상기 참조 샘플의 위치 주변에 위치하는 정수 샘플 위치의 주변 샘플들을 나타낼 수 있다.
이 경우, 상기 참조 샘플 좌우의 상기 정수 샘플들간의 보간은 다양한 보간 필터들 중 하나를 기반으로 도출될 수 있다. 예를 들어, 저역 통과 필터 효과가 있는 보간 필터를 기반으로 상기 보간이 수행될 수 있고, 또는 정교한 보간 필터를 기반으로 상기 보간이 수행될 수도 있다. 상기 저역 통과 필터 효과가 있는 보간 필터는 리니어 필터(linear filter) 또는 가우시안 필터(Gaussian filter) 등을 나타낼 수 있고, 상기 정교한 보간 필터는 스플라인 필터(spline filter)를 나타낼 수 있다. 상기 스플라인 필터는 큐빅 필터(cubic filter)라고 불릴 수도 있다. 상기 보간 필터들은 4-탭(4-tap) 보간 필터들일 수 있다. 상기 4-탭 보간 필터는 4개의 가중치들을 기반으로 4개의 정수 샘플들에 대한 보간이 수행되는 필터를 나타낼 수 있다. 상기 보간 필터를 기반으로 수행되는 상기 정수 샘플들간의 보간은 다음의 수학식과 같이 나타낼 수 있다.
Figure PCTKR2019004621-appb-M000001
여기서, p[x][y] 는 상기 대상 샘플의 예측 샘플을 나타낼 수 있고, f[0], f[1], f[2] 및 f[3]는 보간 필터의 필터 계수들을 나타낼 수 있고, ref[n]는 n번째 주변 샘플을 나타낼 수 있고, iIdx 는 상기 대상 샘플을 기준으로 상기 현재 블록의 인트라 예측 모드의 예측 방향에 위치하는 분수 샘플 위치의 정수 인덱스를 나타낼 수 있다. 상기 분수 샘플 위치의 정수 인덱스는 상기 분수 샘플 위치의 나머지를 제외한 정수값을 나타낼 수 있다.
한편 상기 저역 통과 필터 중 하나인 큐빅 필터의 필터 계수 및 상기 저역 통과 필터 효과가 있는 보간 필터 중 하나인 가우시안 필터의 필터 계수는 다음의 표와 같이 도출될 수 있다.
Figure PCTKR2019004621-appb-T000003
여기서, sub-pel position n/32 는 상기 대상 샘플을 기준으로 상기 현재 블록의 인트라 예측 모드의 예측 방향에 위치하는 분수 샘플 위치의 나머지 값을 나타낼 수 있다. 상기 대상 샘플의 분수 샘플 위치 및 상기 표 3을 기반으로 큐빅 필터의 필터 계수들 또는 가우시안 필터의 필터 계수들이 도출될 수 있다.
한편, 상술한 내용과 같이 방향성 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측이 수행되는 경우, 상기 방향성 인트라 예측 모드의 예측 각도에 따라서 상기 현재 블록의 대상 샘플과 참조 샘플과의 거리가 멀어질 수 있고, 상기 거리가 멀어질수록 예측 정확도가 떨어질 수 있다. 상기 대상 샘플과 상기 참조 샘플과의 거리에 따라 적절한 보간 필터를 선택하고, 상기 선택된 보간 필터를 적용하여 도출된 상기 참조 샘플을 기반으로 예측을 수행하여 예측 정확도를 향상시키는 방법이 제안될 수 있다. 상기 대상 샘플과 상기 참조 샘플과의 거리에 따른 적절한 보간 필터 및 상기 적절한 보간 필터를 선택하는 방법은 후술하는 바와 같을 수 있다.
일 예로, 상기 현재 블록의 사이즈 또는 상기 현재 블록의 인트라 예측 모드를 기반으로 상기 보간 필터가 선택될 수 있다.
예를 들어, 블록의 폭(width) 또는 높이(height)가 8보다 작거나 같은 경우, 정교한 보간 필터(예를 들어, 큐빅 필터)가 선택될 수 있고, 상기 정교한 보간 필터를 기반으로 상기 블록의 참조 샘플이 도출될 수 있다. 또한, 블록의 폭 및 높이가 8보다 큰 경우, 저역 통과 필터 효과가 있는 보간 필터(예를 들어, 가우시안 필터)가 선택될 수 있고, 상기 정교한 보간 필터를 기반으로 상기 블록의 참조 샘플이 도출될 수 있다.
또는, 상기 현재 블록의 인트라 예측 모드가 수직 방향성을 갖는 인트라 예측 모드인 경우, 상기 현재 블록의 폭을 기준으로 보간 필터가 선택될 수 있고, 상기 현재 블록의 인트라 예측 모드가 수평 방향성을 갖는 인트라 예측 모드인 경우, 상기 현재 블록의 높이를 기준으로 보간 필터가 선택될 수 있다. 예를 들어, 상기 현재 블록의 인트라 예측 모드가 수직 방향성을 갖는 인트라 예측 모드인 경우, 상기 현재 블록의 폭이 8보다 작거나 같은 경우, 정교한 보간 필터(예를 들어, 큐빅 필터)가 선택될 수 있고, 상기 현재 블록의 폭이 8보다 큰 경우, 저역 통과 필터 효과가 있는 보간 필터(예를 들어, 가우시안 필터)가 선택될 수 있다. 또한, 예를 들어, 상기 현재 블록의 인트라 예측 모드가 수평 방향성을 갖는 인트라 예측 모드인 경우, 상기 현재 블록의 높이가 8보다 작거나 같은 경우, 정교한 보간 필터(예를 들어, 큐빅 필터)가 선택될 수 있고, 상기 현재 블록의 높이가 8보다 큰 경우, 저역 통과 필터 효과가 있는 보간 필터(예를 들어, 가우시안 필터)가 선택될 수 있다.
한편, 상술한 내용과 같이 현재 블록에 인트라 예측이 수행된 경우, 상기 현재 블록의 주변 블록의 이미 복원된 샘플과의 오차를 줄이기 위하여 상기 현재 블록과 주변 블록간의 경계를 완화하는 필터링이 적용될 수 있다. 예를 들어, DC 모드의 경우, 주변 샘플의 평균값으로 예측 샘플이 도출되기 때문에 주변 블록간 오차가 클수록 상기 현재 블록의 예측 블록의 경계면이 부각될 수 있다. 또한, 수직 인트라 예측 모드, 수평 인트라 예측 모드 또는 대각 인트라 예측 모드와 같이 상측 주변 샘플들 및 좌측 주변 샘플들 중 한 면(상측 또는 좌측)을 주로 사용하는 인트라 예측 모드가 적용된 경우에도 예측시 참조되지 않은 주변 샘플과의 불연속성이 발생할 수 있다. 이러한 불연속성을 제거하기 위하여 주변 샘플과 현재 블록의 예측 샘플 간 스무딩 필터(smoothing filter)가 적용될 수 있다. 또한, 상기 현재 블록에 적용된 인트라 예측 모드 및/또는 상기 현재 블록의 사이즈에 따라 상기 스무딩 필터 적용 여부가 결정될 수 있다. 예를 들어, 상기 현재 블록의 인트라 예측 모드가 DC 인트라 예측 모드, 수평 인트라 예측 모드, 수직 인트라 예측 모드인 경우에는 상기 현재 블록의 한 변(즉, 폭 또는 높이)이 16보다 큰 경우에는 상기 스무딩 필터가 적용되지 않을 수 있다.
한편, 상기 스무딩 필터는 인트라 예측 모드 별로 정의된 바이-리니어(bi-linear) 또는 리니어(linear) 기반의 필터가 사용될 수 있다. 또한, 상기 스무딩 필터가 적용되는 예로 상기 주변 샘플들과 맞닿는 상기 현재 블록의 모든 변에 적용되는 경우(예를 들어, 상기 현재 블록의 인트라 예측 모드가 DC 인트라 예측 모드인 경우)와 예측시 주로 참조되지 않은 주변 샘플들과 맞닿은 변에만 적용되는 경우(예를 들어, 상기 현재 블록의 인트라 예측 모드가 수직 인트라 예측 모드인 경우의 좌측 변)등을 포함할 수 있다. 또한, 한편, 상기 예측시 주로 참조되지 않은 주변 샘플들과 맞닿은 변에만 적용되는 경우에서도 상기 현재 블록의 인트라 예측 모드가 대각 인트라 예측 모드(예를 들어, 2번 인트라 예측 모드 또는 66번 인트라 예측 모드)인 경우에는 상기 맞닿는 변 이내의 4 샘플까지 상기 스무딩 필터가 적용될 수 있고, DC 인트라 예측 모드, 수직 인트라 예측 모드 또는 수평 인트라 예측 모드인 경우에는 상기 맞닿는 변 이내의 1 샘플까지 상기 스무딩 필터가 적용될 수 있다.
한편, 본 발명은 현재 블록의 주변 샘플 및 인트라 예측 모드를 활용하여 도출된 예측 블록(predicted block)과 이미 디코딩된 주변 샘플 간의 불연속성을 제거하기 위한 또 다른 바운더리(boundary) 필터링 방법을 제안한다. 이를 통하여, 현재 블록에 대한 레지듀얼 신호에 대한 비트량을 줄이거나 발생을 방지할 수 있고, 주관적 화질을 향상시킬 수 있다.
도 10은 인트라 예측 모드로 도출된 예측 샘플들과 주변 샘플들 사이에서 발생된 불연속성의 일 예를 나타낸다. 상기 현재 블록에 양수(positive)의 각도를 갖는 인트라 예측 모드가 적용되는 경우, 상기 현재 블록의 참조 가능한 주변 샘플에 상측 주변 샘플들 및 좌측 주변 샘플들이 포함됨에도 불구하고, 예측 방향 특성으로 인하여 한 쪽의 주변 샘플들(상측 주변 샘플들 또는 좌측 주변 샘플들)만이 예측에 참조 샘플로 사용될 수 있다. 여기서, 상기 양수의 각도를 갖는 인트라 예측 모드는 수평 양수 각도(Horizontal positive angle)를 갖는 모드들 및 수직 양수 각도(vertical positive angle)를 갖는 인트라 예측 모드들을 포함할 수 있고, 상기 수평 양수 각도를 갖는 모드들은 2번 내지 18번 인트라 예측 모드들일 수 있고, 상기 수직 양수 각도를 갖는 모드들은 50번 내지 66번 인트라 예측 모드들일 수 있다.
예를 들어, 도 10을 참조하면 상기 현재 블록에 66번 인트라 예측 모드가 적용된 경우에 발생된 예측 샘플들과 주변 샘플들과의 불연속성을 예시적으로 나타낼 수 있다. 상기 66번 인트라 예측 모드의 경우, 수직 방향성을 갖는 예측 방향의 인트라 예측 모드이고, 따라서, 좌측 주변 샘플들은 상기 현재 블록의 예측에 사용되지 않을 수 있다. 한편, 좌측 주변 샘플들이 상측 주변 샘플들과 다른 오브젝트(object) 내에 존재하는 샘플들이거나, 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들 중 어느 한 쪽이 백그라운드에 대한 샘플들이고, 어느 한 쪽은 특정 오브젝트에 대한 샘플들인 겨우 등과 같이 상기 좌측 주변 샘플들과 상기 상측 주변 샘플들이 전혀 다른 특성을 가질 수 있다. 이 경우, 도 10에 도시된 것과 같이 상기 현재 블록에 상기 66번 인트라 예측 모드가 적용되어 상측 주변 샘플들만을 기반으로 도출된 예측 블록(predicted block)과 좌측 주변 샘플들간의 불연속성이 발생될 수 있다.
또 다른 예로, 현재 블록에 DC 인트라 예측 모드가 적용되는 경우, 참조 샘플들의 평균값으로 상기 예측 샘플의 샘플값이 도출되는바, 상기 현재 블록의 상기 참조 샘플들의 값이 단조롭지 않고 각 샘플간의 편차가 클 경우, 상기 현재 블록의 예측 블록(predicted block)과 주변 샘플과의 불연속성이 부각될 수 있다. 따라서, 본 발명은 상기 현재 블록의 예측 샘플(predicted sample)과 주변 샘플 간의 불연속성을 제거하기 위하여 상기 예측 샘플과 상기 주변 샘플과의 리그레션 모델(regression model)을 정의하고, 계산된 리그레션 모델을 예측 샘플에 적용하는 방안을 제안한다.
예를 들어, 상기 현재 블록에 수직 양수 각도(vertical positive angle)를 갖는 인트라 예측 모드가 적용된 경우, 상기 리그레션 모델을 기반으로 수행되는 경계에 인접한 상기 현재 블록의 예측 샘플에 대한 필터링은 다음의 수학식과 같이 나타낼 수 있다.
Figure PCTKR2019004621-appb-M000002
여기서, pred(i,j) 는 (i,j) 좌표의 예측 샘플을 나타낼 수 있고, pred'(i,j) 는 필터링된 (i,j) 좌표의 예측 샘플을 나타낼 수 있고, α 및 β는 상기 리그레션 모델에서 정의된 계수들을 나타낼 수 있다. 한편, 여기서, i와 j는 각각 i∈{0,...,N-1}, j∈{0,...,Height-1}을 나타낼 수 있다. 상기 Height 는 상기 현재 블록의 높이를 나타낼 수 있다. 또한, 상기 N 은 필터링이 적용되는 라인의 개수를 나타낼 수 있다. 즉, 상기 현재 블록의 경계에서 안쪽 방향으로 N 개의 라인에 포함된 예측 샘플들에 상기 리그레션 모델을 기반으로 필터링이 수행될 수 있다. 상기 N 은 고정된 숫자일 수 있고, 또는 현재 블록의 사이즈, 적용된 인트라 예측 모드, 또는 주변 샘플의 베리언스(variance) 등을 기반으로 적응적으로 도출될 수 있다. 또는, 상기 N 을 나타내는 정보가 하이 레벨 신텍스(예를 들어, VPS(Video Parameter Set), SPS(Sequence Parameter Set), PPS(Picture Parameter Set) 또는 슬라이스 헤더(slice header) 등)을 통하여 시그널링될 수 있고, 상기 N 을 나타내는 정보를 기반으로 상기 N 이 도출될 수 있다.
한편, 상기 리그레션 모델에서 정의된 계수들은 주변 샘플들과 상기 현재 블록의 주변 샘플들과 상기 현재 블록의 예측 샘플들을 기반으로 도출될 수 있다.
예를 들어, 상기 리그레션 모델의 계수들 α 및 β 다음의 수학식과 같이 도출될 수 있다.
Figure PCTKR2019004621-appb-M000003
Figure PCTKR2019004621-appb-M000004
여기서, pred(i,j) 는 (i,j) 좌표의 예측 샘플을 나타낼 수 있고, rec(-1,j) 는 (-1,j) 좌표의 주변 샘플을 나타낼 수 있고, α 및 β는 상기 리그레션 모델에서 정의된 계수들을 나타낼 수 있다. 또한, height 는 상기 현재 블록의 높이를 나타낼 수 있고, 상기 N 은 필터링이 적용되는 라인의 개수를 나타낼 수 있다. 상기 rec(-1,j) 는 (-1,j) 좌표의 좌측 주변 샘플을 나타낼 수 있다.
도 11은 상기 현재 블록에 수직 양수 각도를 갖는 인트라 예측 모드가 적용된 경우에 리그레션 모델을 도출하는데 사용되는 좌측 주변 샘플들 및 예측 샘플들을 예시적으로 나타낸다. 도 11을 참조하면 상기 현재 블록에 수직 양수 각도를 갖는 인트라 예측 모드가 적용된 경우, 상기 현재 블록에 인접한 좌측 주변 샘플들 및 상기 현재 블록의 좌측 경계에서 안쪽 방향으로 1 개(즉, N은 1)의 라인에 포함된 예측 샘플들을 기반으로 상기 리그레션 모델이 도출될 수 있다. 상기 현재 블록에 인접한 좌측 주변 샘플들은 (-1, 0) 좌표의 좌측 주변 샘플 내지 (-1, H) 좌표의 좌측 주변 샘플들을 나타낼 수 있다. 상기 H 는 상기 현재 블록의 높이(height)를 나타낼 수 있다.
도 12는 상기 현재 블록에 수직 양수 각도를 갖는 인트라 예측 모드가 적용된 경우에 리그레션 모델을 기반으로 수행되는 필터링이 적용되는 예측 샘플들을 예시적으로 나타낸다. 도 11을 참조하면 상기 현재 블록에 수직 양수 각도를 갖는 인트라 예측 모드가 적용된 경우, 상기 현재 블록의 좌측 경계에서 안쪽 방향으로 1 개(즉, N은 1)의 라인에 포함된 예측 샘플들에 상기 리그레션 모델을 기반으로 필터링이 수행될 수 있다.
또한, 예를 들어, 상기 현재 블록에 수평 양수 각도(horizontal positive angle)를 갖는 인트라 예측 모드가 적용된 경우, 상기 리그레션 모델을 기반으로 수행되는 경계에 인접한 상기 현재 블록의 예측 샘플에 대한 필터링은 다음의 수학식과 같이 나타낼 수 있다.
Figure PCTKR2019004621-appb-M000005
여기서, pred(i,j) 는 (i,j) 좌표의 예측 샘플을 나타낼 수 있고, pred'(i,j) 는 필터링된 (i,j) 좌표의 예측 샘플을 나타낼 수 있고, α 및 β는 상기 리그레션 모델에서 정의된 계수들을 나타낼 수 있다. 한편, 여기서, i와 j는 각각 i∈{0,...,Width-1}, j∈{0,...,N-1}을 나타낼 수 있다. 상기 Width 는 상기 현재 블록의 폭을 나타낼 수 있다. 또한, 상기 N 은 필터링이 적용되는 라인의 개수를 나타낼 수 있다. 즉, 상기 현재 블록의 경계에서 안쪽 방향으로 N 개의 라인에 포함된 예측 샘플들에 상기 리그레션 모델을 기반으로 필터링이 수행될 수 있다. 상기 N 은 고정된 숫자일 수 있고, 또는 현재 블록의 사이즈, 적용된 인트라 예측 모드, 또는 주변 샘플의 베리언스(variance) 등을 기반으로 적응적으로 도출될 수 있다. 또는, 상기 N 을 나타내는 정보가 하이 레벨 신텍스(예를 들어, VPS(Video Parameter Set), SPS(Sequence Parameter Set), PPS(Picture Parameter Set) 또는 슬라이스 헤더(slice header) 등)을 통하여 시그널링될 수 있고, 상기 N 을 나타내는 정보를 기반으로 상기 N 이 도출될 수 있다.
한편, 상기 리그레션 모델에서 정의된 계수들은 주변 샘플들과 상기 현재 블록의 주변 샘플들과 상기 현재 블록의 예측 샘플들을 기반으로 도출될 수 있다.
예를 들어, 상기 리그레션 모델의 계수들 α 및 β 다음의 수학식과 같이 도출될 수 있다.
Figure PCTKR2019004621-appb-M000006
Figure PCTKR2019004621-appb-M000007
여기서, pred(i,j) 는 (i,j) 좌표의 예측 샘플을 나타낼 수 있고, rec(i,-1) 는 (i,-1) 좌표의 주변 샘플을 나타낼 수 있고, α 및 β는 상기 리그레션 모델에서 정의된 계수들을 나타낼 수 있다. 또한, width 는 상기 현재 블록의 폭을 나타낼 수 있고, 상기 N 은 필터링이 적용되는 라인의 개수를 나타낼 수 있다. 상기 rec(i,-1) 는 (i,-1) 좌표의 상측 주변 샘플을 나타낼 수 있다.
또한, 상기 현재 블록에 DC 인트라 예측 모드가 적용된 경우, 경계 불연속성을 제거하기 위하여 상술한 수학식 3 및 수학식 4를 기반으로 도출된 리그레션 모델을 기반으로 좌측 경계의 예측 샘플들에 필터링이 수행될 수 있고, 상술한 수학식 6 및 수학식 7을 기반으로 도출된 리그레션 모델을 기반으로 상측 경계의 예측 샘플들에 필터링이 수행될 수 있다. 이를 통하여 상기 현재 블록의 좌측 경계 및 상측 경계에 발생된 불연속성을 완화시킬 수 있다.
한편, 예를 들어, 수직 경계(즉, 좌측 경계)에 대한 필터링이 먼저 적용되고 수평 경계(즉, 상측 경계)의 필터링이 나중에 적용될 수 있고, 또는, 반대로 수평 경계(즉, 상측 경계)에 대한 필터링이 먼저 적용되고 수직 경계(즉, 좌측 경계)의 필터링이 나중에 적용될 수도 있다.
또한, 상기 리그레션 모델 기반 필터링이 1개의 행/열보다 많은 개수의 행/열에 수행되는 경우, 즉, 상기 N 이 1 보다 큰 경우(N>1), 첫번째 라인 이외의 라인에 대한 필터링에는 상기 첫번째 라인에 대한 필터링에 사용된 리그레션 모델이 재사용될 수 있다. 즉, 상기 첫번째 라인에 대한 필터링에 사용된 리그레션 모델을 기반으로 첫번째 라인 이외의 라인의 예측 샘플들에 대한 필터링이 수행될 수 있다. 예측 블록(predicted block)은 참조 샘플로부터 복사되어 구성되기 때문에 각 라인 간의 리그레션 모델은 유사할 수 있는바, 재사용하는 방안이 디코딩 과정의 계산 복잡도를 줄이고 코딩 효율을 향상시킬 수 있다.
또한, 상기 리그레션 모델 기반 필터링을 적용하는 방안으로 다음과 같은 실시예들이 제안될 수 있다. 하기에 서술하는 실시예들 중 하나 또는 다수의 조합으로 상기 리그레션 모델 기반 필터링의 적용 방법이 결정될 수 있다.
예를 들어, 상기 현재 블록의 사이즈 및/또는 타입을 기반으로 상기 리그레션 모델 기반 필터링의 적용 여부 및/또는 적용 범위가 결정될 수 있다. 예를 들어, 상기 현재 블록의 사이즈가 특정 사이즈보다 작은 경우에는 1개의 라인에 대하여 상기 리그레션 모델 기반 필터링이 수행될 수 있고, 블록의 사이즈가 커짐에 따라 상기 리그레션 모델 기반 필터링이 적용되는 라인의 수가 증가될 수 있다. 또는, 상기 현재 블록의 사이즈가 특정 사이즈보다 작은 경우, 상기 리그레션 모델 기반 필터링이 수행되지 않을 수 있고, 기존의 정의된 필터 계수를 기반으로 바운더리 스무딩 필터링이 수행될 수 있다. 또는, 상기 현재 블록의 타입이 가로로 긴 비정방형 블록(Width > Height)이고, 상기 현재 블록의 인트라 예측 모드가 수직 방향성을 갖는 인트라 예측 모드 또는 수직 양수 각도를 갖는 인트라 예측 모드인 경우, 상기 리그레션 모델 기반 필터링의 좌측 경계에서의 적용 범위가 더 작게 설정될 수 있다. 즉, N 이 더 작게 도출될 수 있다. 또한, 상기 현재 블록의 타입이 세로로 긴 비정방형 블록(Width > Height)이고, 상기 현재 블록의 인트라 예측 모드가 수직 방향성을 갖는 인트라 예측 모드 또는 수직 양수 각도를 갖는 인트라 예측 모드인 경우, 상기 리그레션 모델 기반 필터링의 좌측 경계에서의 적용 범위가 더 크게 설정될 수 있다. 즉, N 이 더 크게 도출될 수 있다.
또는, 예를 들어, 상기 현재 블록의 인트라 예측 모드를 기반으로 상기 리그레션 모델 기반 필터링의 적용 여부 및/또는 적용 범위가 결정될 수 있다. 예를 들어, 상기 현재 블록의 인트라 예측 모드가 예측 방향의 각도가 큰 인트라 예측 모드(예를 들어, 2번 인트라 예측 모드 또는 66번 인트라 예측 모드)인 경우, 상기 현재 블록의 경계에서 안쪽 방향으로 4개의 라인에 포함된 예측 샘플들에 상기 리그레션 모델 기반 필터링이 적용될 수 있고, 상기 현재 블록의 인트라 예측 모드가 상술한 인트라 예측 모드 이외의 인트라 예측 모드인 경우, 상기 현재 블록의 경계에서 안쪽 방향으로 2개 또는 1개의 라인에 포함된 예측 샘플들에 상기 리그레션 모델 기반 필터링이 적용될 수 있다. 예를 들어, 상기 현재 블록의 인트라 예측 모드가 상술한 3번 내지 18번 인트라 예측 모드 및 50번 내지 65번 인트라 예측 모드들 중 하나인 경우, 상기 현재 블록의 경계에서 안쪽 방향으로 2개 또는 1개의 라인에 포함된 예측 샘플들에 상기 리그레션 모델 기반 필터링이 적용될 수 있다.
또는, 예를 들어, 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보가 하이 레벨 신텍스(High level syntax)를 통하여 시그널링될 수 있다. 상기 하이 레벨 신텍스는 VPS(Video Parameter Set), SPS(Sequence Parameter Set), PPS(Picture Parameter Set) 또는 슬라이스 헤더(slice header)일 수 있다. 상기 현재 블록에 대한 상기 리그레션 모델 기반 필터링의 적용 여부는 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보를 기반으로 도출될 수 있다. 또한, 예를 들어, 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보가 블록 레벨에서 시그널링될 수 있다. 즉, 블록 단위로 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보가 시그널링될 수 있다. 예를 들어, 상기 현재 블록에 대한 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보가 시그널링될 수 있고, 상기 현재 블록에 대한 상기 리그레션 모델 기반 필터링의 적용 여부는 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보를 기반으로 도출될 수 있다.
도 13은 본 발명에 따른 인코딩 장치에 의한 영상 인코딩 방법을 개략적으로 나타낸다. 도 13에서 개시된 방법은 도 1 및/또는 도 3에서 개시된 인코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 13의 S1300 내지 S1320은 상기 인코딩 장치의 예측부에 의하여 수행될 수 있고, 도 13의 S1330 내지 S1340은 상기 인코딩 장치의 포스트 필터부에 의하여 수행될 수 있고, S1350은 상기 인코딩 장치의 엔트로피 인코딩부에 의하여 수행될 수 있다. 한편, 상기 포스트 필터부는 상기 인코딩 장치의 예측부에 포함될 수 있다. 또한, 비록 도시되지는 않았으나 현재 블록에 대한 원본 샘플과 예측 샘플을 기반으로 상기 현재 블록에 대한 레지듀얼 샘플을 도출하는 과정은 상기 인코딩 장치의 감산부에 의하여 수행될 수 있고, 상기 레지듀얼 샘플을 기반으로 상기 현재 블록에 대한 레지듀얼에 관한 정보를 생성하는 과정은 상기 인코딩 장치의 변환부에 의하여 수행될 수 있고, 상기 레지듀얼에 관한 정보 및 현재 블록의 예측에 대한 정보를 인코딩하는 과정은 상기 인코딩 장치의 엔트로피 인코딩부에 의하여 수행될 수 있다.
인코딩 장치는 현재 블록에 대한 인트라 예측 모드를 결정한다(S1300). 인코딩 장치는 다양한 인트라 예측 모드들을 수행하여 최적의 RD 코스트를 갖는 인트라 예측 모드를 상기 현재 블록에 대한 인트라 예측 모드로 도출할 수 있다. 상기 인트라 예측 모드는 2개의 비방향성 예측 모드들과 33개의 방향성 예측 모드들 중 하나일 수 있다. 상기 2개의 비방향성 예측 모드들은 인트라 DC 모드 및 인트라 플래너 모드를 포함할 수 있음은 상술한 바와 같다. 또는 상기 인트라 예측 모드는 2개의 비방향성 인트라 예측 모드들과 65개의 방향성 인트라 예측 모드들 중 하나일 수 있다. 상기 2개의 비방향성 예측 모드들은 인트라 DC 모드 및 인트라 플래너 모드를 포함할 수 있음은 상술한 바와 같다. 또한, 상기 65개의 방향성 인트라 예측 모드들은 수직 방향성 인트라 예측 모드들과 수평 방향성 인트라 예측 모드들을 포함할 수 있다. 상기 수직 방향성 인트라 예측 모드들은 34번 인트라 예측 모드 내지 66번 인트라 예측 모드를 포함할 수 있고, 상기 수평 방향성 인트라 예측 모드들은 2번 인트라 예측 모드 내지 33번 인트라 예측 모드를 포함할 수 있다.
인코딩 장치는 상기 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들을 포함하는 주변 샘플들을 도출한다(S1310). 인코딩 장치는 상기 현재 블록의 주변 샘플들을 도출할 수 있다. 상기 주변 샘플들은 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들을 포함할 수 있다. 또한, 상기 주변 샘플들은 좌상측 코너 주변 샘플을 포함할 수 있다. 상기 좌측 주변 샘플들, 상기 좌상측 코너 주변 샘플, 및 상기 상측 주변 샘플들은 상기 현재 블록의 디코딩 시점에 이미 복원된 주변 블록들로부터 도출될 수 있다. 상기 현재 블록의 2N 개의 상기 상측 주변 샘플들, 좌상측 코너 주변 샘플, 및 2N 개의 상기 좌측 주변 샘플들이 도출될 수 있다. 여기서, 상기 현재 블록의 사이즈가 NxN이고, 상기 현재 블록의 좌상단(top-left) 샘플의 x성분이 0 및 y성분이 0인 경우, 상기 좌측 주변 샘플들은 p[-1][0] 내지 p[-1][2N-1], 상기 좌상측 코너 주변 샘플은 p[-1][-1], 상기 상측 주변 샘플들은 p[0][-1] 내지 p[2N-1][-1] 일 수 있다.
또는, 상기 현재 블록의 사이즈가 MxN이고, 상기 현재 블록의 좌상단(top-left) 샘플의 x성분이 0 및 y성분이 0인 경우, 상기 현재 블록의 M+N 개의 상기 상측 주변 샘플들, 좌상측 코너 주변 샘플, 및 M+N 개의 상기 좌측 주변 샘플들이 도출될 수 있다. 상기 현재 블록의 사이즈가 MxN의 비정방형 형태이고, 상기 현재 블록의 좌상단(top-left) 샘플의 x성분이 0 및 y성분이 0인 경우, 상기 좌측 주변 샘플들은 p[-1][0] 내지 p[-1][M+N-1], 상기 좌상측 코너 주변 샘플은 p[-1][-1], 상기 상측 주변 샘플들은 p[0][-1] 내지 p[M+N-1][-1] 일 수 있다.
인코딩 장치는 상기 주변 샘플들 및 상기 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 도출한다(S1320). 예를 들어, 인코딩 장치는 상기 현재 블록의 대상 샘플의 위치 및 인트라 예측 모드의 예측 각도를 기반으로 상기 대상 샘플에 대한 참조 샘플의 위치를 도출할 수 있고, 도출된 위치의 주변 샘플을 상기 대상 샘플의 참조 샘플로 도출할 수 있고, 상기 참조 샘플을 복사하여 예측 샘플을 도출할 수 있다. 여기서, 상기 대상 샘플은 인트라 예측이 수행되는 현재 블록 내 샘플을 나타낼 수 있다.
한편, 상기 참조 샘플의 위치가 분수 샘플(fractional sample) 위치인 경우, 인코딩 장치는 상기 현재 블록의 대상 샘플의 위치 및 인트라 예측 모드의 예측 각도를 기반으로 도출된 위치 주변에 위치하는 주변 샘플들을 상기 대상 샘플의 상기 참조 샘플들로 도출할 수 있다. 즉, 인코딩 장치는 상기 현재 블록의 대상 샘플의 위치 및 인트라 예측 모드의 예측 각도를 기반으로 복수의 주변 샘플들을 상기 대상 샘플의 상기 참조 샘플들로 도출할 수 있다. 예를 들어, 4개의 주변 샘플들이 상기 대상 샘플의 상기 참조 샘플들로 도출될 수 있다. 상기 인트라 예측 모드의 예측 각도는 상술한 표 1을 기반으로 도출될 수 있고, intraPredAngle 은 상기 인트라 예측 모드로부터 도출된 예측 각도를 나타내는 변수일 수 있다.
이후, 인코딩 장치는 현재 블록에 대한 보간 필터를 기반으로 상기 참조 샘플들을 보간(interpolation)하여 상기 예측 샘플을 도출할 수 있다. 상기 예측 샘플은 상술한 수학식 1을 기반으로 도출될 수 있다.
한편, 상기 보간 필터는 상기 현재 블록의 사이즈 및/또는 상기 현재 블록의 인트라 예측 모드를 기반으로 도출될 수 있다.
예를 들어, 상기 현재 블록의 폭(width) 또는 높이(height)가 8보다 작거나 같은 경우, 큐빅 필터(cubic filter)가 상기 보간 필터로 도출될 수 있다. 또한, 상기 현재 블록의 폭 및 높이가 8보다 큰 경우, 가우시안 필터(gaussian filter)가 상기 보간 필터로 도출될 수 있다. 여기서, 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수직 방향성을 갖는 인트라 예측 모드인 경우, 상기 현재 블록의 폭을 기준으로 상기 보간 필터가 도출될 수 있고, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수평 방향성을 갖는 인트라 예측 모드인 경우, 상기 현재 블록의 높이를 기준으로 보간 필터가 도출될 수 있다.
예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수직 방향성을 갖는 인트라 예측 모드이고, 상기 현재 블록의 폭이 8보다 작거나 같은 경우, 상기 큐빅 필터가 상기 보간 필터로 도출될 수 있고, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수직 방향성을 갖는 인트라 예측 모드이고, 상기 현재 블록의 폭이 8보다 큰 경우, 상기 가우시안 필터가 상기 보간 필터로 도출될 수 있다.
또한, 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수평 방향성을 갖는 인트라 예측 모드이고, 상기 현재 블록의 높이가 8보다 작거나 같은 경우, 상기 큐빅 필터가 상기 보간 필터로 도출될 수 있고, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수평 방향성을 갖는 인트라 예측 모드이고, 상기 현재 블록의 높이가 8보다 큰 경우, 상기 가우시안 필터가 상기 보간 필터로 도출될 수 있다.
인코딩 장치는 특정 예측 샘플들 및 특정 주변 샘플들을 기반으로 리그레션 모델(regression model)을 도출한다(S1330). 상기 특정 예측 샘플들은 필터링이 수행되는 예측 샘플들일 수 있다.
예를 들어, 상기 특정 예측 샘플들은 좌측 경계에서 안쪽 방향(즉, 우측 방향)으로 N개의 행에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 좌측 주변 샘플들 중 (-1,0) 좌표에 위치하는 좌측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 좌측 주변 샘플을 포함할 수 있다. 즉, 상기 특정 주변 샘플들은 p[-1][0] 내지 p[-1][H-1] 을 포함할 수 있다. 여기서, H는 상기 현재 블록의 높이(height)일 수 있다. 이 경우, 상기 리그레션 모델은 상술한 수학식 3 내지 수학식 4를 기반으로 도출될 수 있다. 또한, 상기 N 은 기설정될 수 있다. 또는, 상기 N 은 상기 현재 블록의 사이즈를 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록의 사이즈가 특정 사이즈보다 작은 경우, 상기 N은 1로 도출될 수 있고, 상기 현재 블록의 사이즈가 상기 특정 사이즈보다 크거나 동일한 경우, 상기 N은 상기 현재 블록의 사이즈에 따라 증가할 수 있다. 또는, 상기 N 은 상기 현재 블록에 대한 상기 인트라 예측 모드를 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 2번 인트라 예측 모드 또는 66번 인트라 예측 모드인 경우, 상기 N 은 4로 도출될 수 있다. 또한, 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 50번 인트라 예측 모드 내지 65번 인트라 예측 모드 중 하나인 경우, 상기 N 은 1 또는 2로 도출될 수 있다. 또는, 상기 N 은 상기 현재 블록의 타입을 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록이 가로로 긴 비정방형 블록인 경우, 즉, 상기 현재 블록이 폭이 높이보다 큰 비정방형 블록인 경우, 상기 N 은 작은 값(예를 들어, 1)으로 설정될 수 있다. 또한, 상기 현재 블록이 세로로 긴 비정방형 블록인 경우, 즉, 상기 현재 블록이 높이가 폭보다 큰 비정방형 블록인 경우, 상기 N 은 큰 값(예를 들어, 4)으로 설정될 수 있다. 또는, 상기 N 은 상기 주변 샘플들의 베리언스(variance)를 기반으로 도출될 수 있다. 한편, 일 예로, 상기 현재 블록에 대한 인트라 예측 모드가 수직 양수 각도(vertical positive angle)를 갖는 인트라 예측 모드인 경우, 상기 특정 예측 샘플들은 좌측 경계에서 안쪽 방향으로 N개의 행에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 좌측 주변 샘플들 중 (-1,0) 좌표에 위치하는 좌측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 좌측 주변 샘플을 포함할 수 있다. 상기 수직 양수 각도를 갖는 인트라 예측 모드는 50번 인트라 예측 모드 내지 66번 인트라 예측 모드일 수 있다.
또한, 예를 들어, 상기 특정 예측 샘플들은 상측 경계에서 안쪽 방향(즉, 하측 방향)으로 N개의 열에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 상측 주변 샘플들 중 (0,-1) 좌표에 위치하는 상측 주변 샘플 내지 (W-1,-1) 좌표에 위치하는 상측 주변 샘플을 포함할 수 있다. 즉, 상기 특정 주변 샘플들은 p[0][-1] 내지 p[W-1][-1] 을 포함할 수 있다. 여기서, W는 상기 현재 블록의 폭(width)일 수 있다. 이 경우, 상기 리그레션 모델은 상술한 수학식 6 내지 수학식 7을 기반으로 도출될 수 있다. 또한, 상기 N 은 기설정될 수 있다. 또는, 상기 N 은 상기 현재 블록의 사이즈를 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록의 사이즈가 특정 사이즈보다 작은 경우, 상기 N은 1로 도출될 수 있고, 상기 현재 블록의 사이즈가 상기 특정 사이즈보다 크거나 동일한 경우, 상기 N은 상기 현재 블록의 사이즈에 따라 증가할 수 있다. 또는, 상기 N 은 상기 현재 블록에 대한 상기 인트라 예측 모드를 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 2번 인트라 예측 모드 또는 66번 인트라 예측 모드인 경우, 상기 N 은 4로 도출될 수 있다. 또한, 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 3번 인트라 예측 모드 내지 18번 인트라 예측 모드인 경우, 상기 N 은 1 또는 2로 도출될 수 있다. 또는, 상기 N 은 상기 현재 블록의 타입을 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록이 가로로 긴 비정방형 블록인 경우, 즉, 상기 현재 블록이 폭이 높이보다 큰 비정방형 블록인 경우, 상기 N 은 큰 값(예를 들어, 4)으로 설정될 수 있다. 또한, 상기 현재 블록이 세로로 긴 비정방형 블록인 경우, 즉, 상기 현재 블록이 높이가 폭보다 큰 비정방형 블록인 경우, 상기 N 은 작은 값(예를 들어, 1)으로 설정될 수 있다. 또는, 상기 N 은 상기 주변 샘플들의 베리언스(variance)를 기반으로 도출될 수 있다. 한편, 일 예로, 상기 현재 블록에 대한 인트라 예측 모드가 수평 양수 각도(horizontal positive angle)를 갖는 인트라 예측 모드인 경우, 상기 특정 예측 샘플들은 상측 경계에서 안쪽 방향(즉, 하측 방향)으로 N개의 열에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 상측 주변 샘플들 중 (-1,0) 좌표에 위치하는 상측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 상측 주변 샘플을 포함할 수 있다. 상기 수평 양수 각도를 갖는 인트라 예측 모드는 2번 인트라 예측 모드 내지 18번 인트라 예측 모드일 수 있다.
또한, 예를 들어, 상기 특정 예측 샘플들은 좌측 경계에서 우측 방향으로 N개의 행에 포함된 예측 샘플들 및 상측 경계에서 하측 방향으로 N개의 열에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 좌측 주변 샘플들 중 (-1,0) 좌표에 위치하는 좌측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 좌측 주변 샘플과 상기 상측 주변 샘플들 중 (0,-1) 좌표에 위치하는 상측 주변 샘플 내지 (W-1,-1) 좌표에 위치하는 상측 주변 샘플을 포함할 수 있다. 즉, 상기 특정 주변 샘플들은 p[-1][0] 내지 p[-1][H-1] 와 p[0][-1] 내지 p[W-1][-1]을 포함할 수 있다. 여기서, H는 상기 현재 블록의 높이(height)일 수 있고, W는 상기 현재 블록의 폭(width)일 수 있다. 이 경우, 상기 좌측 경계에서 우측 방향으로 N개의 행에 포함된 예측 샘플들에 대한 리그레션 모델은 상술한 수학식 3 내지 수학식 4를 기반으로 도출될 수 있고, 상기 상측 경계에서 하측 방향으로 N개의 열에 포함된 예측 샘플들에 대한 리그레션 모델은 상술한 수학식 6 내지 수학식 7을 기반으로 도출될 수 있다. 또한, 상기 N 은 기설정될 수 있다. 또는, 상기 N 은 상기 현재 블록의 사이즈를 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록의 사이즈가 특정 사이즈보다 작은 경우, 상기 N은 1로 도출될 수 있고, 상기 현재 블록의 사이즈가 상기 특정 사이즈보다 크거나 동일한 경우, 상기 N은 상기 현재 블록의 사이즈에 따라 증가할 수 있다. 또는, 상기 N 은 상기 현재 블록에 대한 상기 인트라 예측 모드를 기반으로 도출될 수 있다. 또는, 상기 N 은 상기 주변 샘플들의 베리언스(variance)를 기반으로 도출될 수 있다. 한편, 일 예로, 상기 현재 블록에 대한 인트라 예측 모드가 DC 인트라 예측 모드인 경우, 상기 특정 예측 샘플들은 좌측 경계에서 우측 방향으로 N개의 행에 포함된 예측 샘플들 및 상측 경계에서 하측 방향으로 N개의 열에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 좌측 주변 샘플들 중 (-1,0) 좌표에 위치하는 좌측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 좌측 주변 샘플과 상기 상측 주변 샘플들 중 (0,-1) 좌표에 위치하는 상측 주변 샘플 내지 (W-1,-1) 좌표에 위치하는 상측 주변 샘플을 포함할 수 있다.
한편, 인코딩 장치는 상기 현재 블록에 대하여 상기 리그레션 모델 기반 필터링의 적용 여부를 결정할 수 있다. 예를 들어, 인코딩 장치는 상기 현재 블록의 사이즈를 기반으로 상기 리그레션 모델 기반 필터링의 적용 여부를 결정할 수 있다. 일 예로, 상기 현재 블록의 사이즈가 특정 사이즈보다 작은 경우, 인코딩 장치는 상기 현재 블록에 대하여 상기 리그레션 모델 기반 필터링을 적용하지 않을 수 있다. 또는, 상기 현재 블록의 폭과 높이와의 비율이 특정 비율 이상인 경우, 인코딩 장치는 상기 현재 블록에 대하여 상기 리그레션 모델 기반 필터링을 적용하지 않을 수 있다.
또한, 예를 들어, 인코딩 장치는 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보를 생성 및 인코딩할 수 있다. 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 VPS(Video Parameter Set), SPS(Sequence Parameter Set), PPS(Picture Parameter Set), 슬라이스 헤더(Slice header) 또는 블록 단위로 시그널링될 수 있다.
인코딩 장치는 상기 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행하여 필터링된 특정 예측 샘플들을 도출한다(S1340). 인코딩 장치는 상기 도출된 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행할 수 있다. 상기 필터링된 특정 예측 샘플들은 상술한 수학식 2 또는 수학식 5를 기반으로 도출될 수 있다.
인코딩 장치는 상기 현재 블록의 예측에 대한 정보를 포함하는 영상 정보를 인코딩한다(S1350). 인코딩 장치는 상기 예측에 대한 정보를 포함하는 상기 영상 정보를 인코딩하여 비트스트림 형태로 출력할 수 있다. 상기 비트스트림은 네트워크 또는 저장매체를 통하여 디코딩 장치로 전송될 수 있다. 상기 예측에 대한 정보는 상기 현재 블록의 상기 인트라 예측 모드에 관한 정보를 포함할 수 있다. 인코딩 장치는 상기 인트라 예측 모드를 나타내는 인트라 예측 모드에 관한 정보를 생성하고, 인코딩하여 비트스트림 형태로 출력할 수 있다. 상기 인트라 예측 모드에 관한 정보는 상기 현재 블록에 대한 인트라 예측 모드를 직접적으로 가리키는 정보를 포함할 수도 있고, 또는 상기 현재 블록의 좌측 또는 상측 블록의 인트라 예측 모드를 기반으로 도출된 인트라 예측 모드 후보 리스트 중에서 어느 하나의 후보를 가리키는 정보를 포함할 수도 있다. 상기 인트라 예측 모드 후보 리스트는 상기 MPM 리스트를 나타낼 수 있다.
또한, 인코딩 장치는 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보를 생성할 수 있다. 상기 영상 정보는 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보를 포함할 수 있다. 인코딩 장치는 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보를 인코딩하여 비트스트림 형태로 출력할 수 있다. 상기 비트스트림은 네트워크 또는 저장매체를 통하여 디코딩 장치로 전송될 수 있다.
또한, 인코딩 장치는 상기 레지듀얼 샘플을 기반으로 상기 레지듀얼에 관한 정보를 생성할 수 있다. 상기 영상 정보는 상기 레지듀얼에 관한 정보를 포함할 수 있고, 상기 레지듀얼에 관한 정보는 상기 레지듀얼 샘플에 관한 변환 계수들을 포함할 수 있다. 인코딩 장치는 상기 레지듀얼에 관한 정보를 인코딩하여 비트스트림 형태로 출력할 수 있다. 상기 비트스트림은 네트워크 또는 저장매체를 통하여 디코딩 장치로 전송될 수 있다.
도 14는 본 발명에 따른 영상 인코딩 방법을 수행하는 인코딩 장치를 개략적으로 나타낸다. 도 13에서 개시된 방법은 도 14에서 개시된 인코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 14의 상기 디코딩 장치의 예측부는 도 13의 S1300 내지 S1320을 수행할 수 있고, 도 14의 상기 디코딩 장치의 포스트 필터부는 도 13의 S1330 내지 S1340을 수행할 수 있고, 도 14의 상기 디코딩 장치의 엔트로피 인코딩부는 도 13의 S1350을 수행할 수 있다. 한편, 도 14에서 도시되지는 않았으나 상기 포스트 필터부는 상기 인코딩 장치의 예측부에 포함될 수 있다. 또한, 비록 도시되지는 않았으나 상기 현재 블록에 대한 원본 샘플과 예측 샘플을 기반으로 상기 현재 블록에 대한 레지듀얼 샘플을 도출하는 과정은 도 14의 상기 인코딩 장치의 감산부에 의하여 수행될 수 있고, 상기 레지듀얼 샘플을 기반으로 상기 현재 블록에 대한 레지듀얼에 관한 정보를 생성하는 과정은 도 14의 상기 인코딩 장치의 변환부에 의하여 수행될 수 있고, 상기 레지듀얼에 관한 정보를 인코딩하는 과정은 도 14의 상기 인코딩 장치의 엔트로피 인코딩부에 의하여 수행될 수 있다.
도 15는 본 발명에 따른 디코딩 장치에 의한 영상 디코딩 방법을 개략적으로 나타낸다. 도 15에서 개시된 방법은 도 2 및/또는 도 5에서 개시된 디코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 15의 S1500 내지 S1520은 상기 디코딩 장치의 예측부에 의하여 수행될 수 있고, 도 15의 S1530 내지 S1540은 상기 디코딩 장치의 포스트 필터부에 의하여 수행될 수 있다. 한편, 상기 포스트 필터부는 상기 인코딩 장치의 예측부에 포함될 수 있다. 또한, 비록 도시되지는 않았으나 비트스트림을 통하여 현재 블록의 예측에 대한 정보 및 레지듀얼에 관한 정보를 포함하는 영상 정보를 획득하는 과정은 상기 디코딩 장치의 엔트로피 디코딩부에 의하여 수행될 수 있고, 상기 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 상기 레지듀얼 샘플을 도출하는 과정은 상기 디코딩 장치의 역변환부에 의하여 수행될 수 있고, 예측 샘플과 상기 레지듀얼 샘플을 기반으로 복원 픽처를 생성하는 과정은 상기 디코딩 장치의 가산부에 의하여 수행될 수 있다.
디코딩 장치는 현재 블록에 대한 인트라 예측 모드를 도출한다(S1500).
예를 들어, 디코딩 장치는 비트스트림을 통하여 상기 현재 블록의 예측에 대한 정보를 획득할 수 있다. 상기 예측에 대한 정보는 상기 현재 블록에 대한 인트라 예측 모드를 직접적으로 가리키는 정보를 포함할 수도 있고, 또는 상기 현재 블록의 좌측 또는 상측 블록의 인트라 예측 모드를 기반으로 도출된 인트라 예측 모드 후보 리스트 중에서 어느 하나의 후보를 가리키는 정보를 포함할 수도 있다. 상기 인트라 예측 모드 후보 리스트는 MPM 후보 리스트라고 나타낼 수 있다. 디코딩 장치는 상기 획득된 예측 정보를 기반으로 상기 현재 블록에 대한 인트라 예측 모드를 도출할 수 있다. 상기 인트라 예측 모드는 2개의 비방향성 예측 모드들과 33개의 방향성 예측 모드들 중 하나일 수 있다. 상기 2개의 비방향성 예측 모드들은 인트라 DC 모드 및 인트라 플래너 모드를 포함할 수 있음은 상술한 바와 같다. 또는 상기 인트라 예측 모드는 2개의 비방향성 인트라 예측 모드들과 65개의 방향성 인트라 예측 모드들 중 하나일 수 있다. 상기 2개의 비방향성 예측 모드들은 인트라 DC 모드 및 인트라 플래너 모드를 포함할 수 있음은 상술한 바와 같다. 또한, 상기 65개의 방향성 인트라 예측 모드들은 수직 방향성 인트라 예측 모드들과 수평 방향성 인트라 예측 모드들을 포함할 수 있다. 상기 수직 방향성 인트라 예측 모드들은 34번 인트라 예측 모드 내지 66번 인트라 예측 모드를 포함할 수 있고, 상기 수평 방향성 인트라 예측 모드들은 2번 인트라 예측 모드 내지 33번 인트라 예측 모드를 포함할 수 있다. 또한, 상기 65개의 방향성 인트라 예측 모드들은 수직 양수 각도(vertical positive angle)를 갖는 인트라 예측 모드들과 수평 양수 각도(horizontal positive angle)를 갖는 인트라 예측 모드들을 포함할 수 있다. 상기 수직 양수 각도를 갖는 모드들은 50번 인트라 예측 모드 내지 66번 인트라 예측 모드일 수 있고, 상기 수평 양수 각도를 갖는 모드들은 2번 인트라 예측 모드 내지 18번 인트라 예측 모드일 수 있다.
디코딩 장치는 상기 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들을 포함하는 주변 샘플들을 도출한다(S1510). 디코딩 장치는 상기 현재 블록의 주변 샘플들을 도출할 수 있다. 상기 주변 샘플들은 상기 좌측 주변 샘플들 및 상기 상측 주변 샘플들을 포함할 수 있다. 또한, 상기 주변 샘플들은 좌상측 코너 주변 샘플을 포함할 수 있다. 상기 좌측 주변 샘플들, 상기 좌상측 코너 주변 샘플, 및 상기 상측 주변 샘플들은 상기 현재 블록의 디코딩 시점에 이미 복원된 주변 블록들로부터 도출될 수 있다. 상기 현재 블록의 2N 개의 상기 상측 주변 샘플들, 좌상측 코너 주변 샘플, 및 2N 개의 상기 좌측 주변 샘플들이 도출될 수 있다. 여기서, 상기 현재 블록의 사이즈가 NxN이고, 상기 현재 블록의 좌상단(top-left) 샘플의 x성분이 0 및 y성분이 0인 경우, 상기 좌측 주변 샘플들은 p[-1][0] 내지 p[-1][2N-1], 상기 좌상측 코너 주변 샘플은 p[-1][-1], 상기 상측 주변 샘플들은 p[0][-1] 내지 p[2N-1][-1] 일 수 있다.
또는, 상기 현재 블록의 사이즈가 MxN이고, 상기 현재 블록의 좌상단(top-left) 샘플의 x성분이 0 및 y성분이 0인 경우, 상기 현재 블록의 M+N 개의 상기 상측 주변 샘플들, 좌상측 코너 주변 샘플, 및 M+N 개의 상기 좌측 주변 샘플들이 도출될 수 있다. 상기 현재 블록의 사이즈가 MxN의 비정방형 형태이고, 상기 현재 블록의 좌상단(top-left) 샘플의 x성분이 0 및 y성분이 0인 경우, 상기 좌측 주변 샘플들은 p[-1][0] 내지 p[-1][M+N-1], 상기 좌상측 코너 주변 샘플은 p[-1][-1], 상기 상측 주변 샘플들은 p[0][-1] 내지 p[M+N-1][-1] 일 수 있다.
디코딩 장치는 상기 주변 샘플들 및 상기 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 도출한다(S1520). 예를 들어, 디코딩 장치는 상기 현재 블록의 대상 샘플의 위치 및 인트라 예측 모드의 예측 각도를 기반으로 상기 대상 샘플에 대한 참조 샘플의 위치를 도출할 수 있고, 도출된 위치의 주변 샘플을 상기 대상 샘플의 참조 샘플로 도출할 수 있고, 상기 참조 샘플을 복사하여 예측 샘플을 도출할 수 있다. 여기서, 상기 대상 샘플은 인트라 예측이 수행되는 현재 블록 내 샘플을 나타낼 수 있다.
한편, 상기 참조 샘플의 위치가 분수 샘플(fractional sample) 위치인 경우, 디코딩 장치는 상기 현재 블록의 대상 샘플의 위치 및 인트라 예측 모드의 예측 각도를 기반으로 도출된 위치 주변에 위치하는 주변 샘플들을 상기 대상 샘플의 상기 참조 샘플들로 도출할 수 있다. 즉, 디코딩 장치는 상기 현재 블록의 대상 샘플의 위치 및 인트라 예측 모드의 예측 각도를 기반으로 복수의 주변 샘플들을 상기 대상 샘플의 상기 참조 샘플들로 도출할 수 있다. 예를 들어, 4개의 주변 샘플들이 상기 대상 샘플의 상기 참조 샘플들로 도출될 수 있다. 상기 인트라 예측 모드의 예측 각도는 상술한 표 1을 기반으로 도출될 수 있고, intraPredAngle 은 상기 인트라 예측 모드로부터 도출된 예측 각도를 나타내는 변수일 수 있다.
이후, 디코딩 장치는 현재 블록에 대한 보간 필터를 기반으로 상기 참조 샘플들을 보간(interpolation)하여 상기 예측 샘플을 도출할 수 있다. 상기 예측 샘플은 상술한 수학식 1을 기반으로 도출될 수 있다.
한편, 상기 보간 필터는 상기 현재 블록의 사이즈 및/또는 상기 현재 블록의 인트라 예측 모드를 기반으로 도출될 수 있다.
예를 들어, 상기 현재 블록의 폭(width) 또는 높이(height)가 8보다 작거나 같은 경우, 큐빅 필터(cubic filter)가 상기 보간 필터로 도출될 수 있다. 또한, 상기 현재 블록의 폭 및 높이가 8보다 큰 경우, 가우시안 필터(gaussian filter)가 상기 보간 필터로 도출될 수 있다. 여기서, 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수직 방향성을 갖는 인트라 예측 모드인 경우, 상기 현재 블록의 폭을 기준으로 상기 보간 필터가 도출될 수 있고, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수평 방향성을 갖는 인트라 예측 모드인 경우, 상기 현재 블록의 높이를 기준으로 보간 필터가 도출될 수 있다.
예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수직 방향성을 갖는 인트라 예측 모드이고, 상기 현재 블록의 폭이 8보다 작거나 같은 경우, 상기 큐빅 필터가 상기 보간 필터로 도출될 수 있고, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수직 방향성을 갖는 인트라 예측 모드이고, 상기 현재 블록의 폭이 8보다 큰 경우, 상기 가우시안 필터가 상기 보간 필터로 도출될 수 있다.
또한, 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수평 방향성을 갖는 인트라 예측 모드이고, 상기 현재 블록의 높이가 8보다 작거나 같은 경우, 상기 큐빅 필터가 상기 보간 필터로 도출될 수 있고, 상기 현재 블록에 대한 상기 인트라 예측 모드가 수평 방향성을 갖는 인트라 예측 모드이고, 상기 현재 블록의 높이가 8보다 큰 경우, 상기 가우시안 필터가 상기 보간 필터로 도출될 수 있다.
디코딩 장치는 특정 예측 샘플들 및 특정 주변 샘플들을 기반으로 리그레션 모델(regression model)을 도출한다(S1530). 상기 특정 예측 샘플들은 필터링이 수행되는 예측 샘플들일 수 있다.
예를 들어, 상기 특정 예측 샘플들은 좌측 경계에서 안쪽 방향(즉, 우측 방향)으로 N개의 행에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 좌측 주변 샘플들 중 (-1,0) 좌표에 위치하는 좌측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 좌측 주변 샘플을 포함할 수 있다. 즉, 상기 특정 주변 샘플들은 p[-1][0] 내지 p[-1][H-1] 을 포함할 수 있다. 여기서, H는 상기 현재 블록의 높이(height)일 수 있다. 이 경우, 상기 리그레션 모델은 상술한 수학식 3 내지 수학식 4를 기반으로 도출될 수 있다. 또한, 상기 N 은 기설정될 수 있다. 또는, 상기 N 은 상기 현재 블록의 사이즈를 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록의 사이즈가 특정 사이즈보다 작은 경우, 상기 N은 1로 도출될 수 있고, 상기 현재 블록의 사이즈가 상기 특정 사이즈보다 크거나 동일한 경우, 상기 N은 상기 현재 블록의 사이즈에 따라 증가할 수 있다. 또는, 상기 N 은 상기 현재 블록에 대한 상기 인트라 예측 모드를 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 2번 인트라 예측 모드 또는 66번 인트라 예측 모드인 경우, 상기 N 은 4로 도출될 수 있다. 또한, 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 50번 인트라 예측 모드 내지 65번 인트라 예측 모드 중 하나인 경우, 상기 N 은 1 또는 2로 도출될 수 있다. 또는, 상기 N 은 상기 현재 블록의 타입을 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록이 가로로 긴 비정방형 블록인 경우, 즉, 상기 현재 블록이 폭이 높이보다 큰 비정방형 블록인 경우, 상기 N 은 작은 값(예를 들어, 1)으로 설정될 수 있다. 또한, 상기 현재 블록이 세로로 긴 비정방형 블록인 경우, 즉, 상기 현재 블록이 높이가 폭보다 큰 비정방형 블록인 경우, 상기 N 은 큰 값(예를 들어, 4)으로 설정될 수 있다. 또는, 상기 N 은 상기 주변 샘플들의 베리언스(variance)를 기반으로 도출될 수 있다. 한편, 일 예로, 상기 현재 블록에 대한 인트라 예측 모드가 수직 양수 각도(vertical positive angle)를 갖는 인트라 예측 모드인 경우, 상기 특정 예측 샘플들은 좌측 경계에서 안쪽 방향으로 N개의 행에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 좌측 주변 샘플들 중 (-1,0) 좌표에 위치하는 좌측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 좌측 주변 샘플을 포함할 수 있다. 상기 수직 양수 각도를 갖는 인트라 예측 모드는 50번 인트라 예측 모드 내지 66번 인트라 예측 모드일 수 있다.
또한, 예를 들어, 상기 특정 예측 샘플들은 상측 경계에서 안쪽 방향(즉, 하측 방향)으로 N개의 열에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 상측 주변 샘플들 중 (0,-1) 좌표에 위치하는 상측 주변 샘플 내지 (W-1,-1) 좌표에 위치하는 상측 주변 샘플을 포함할 수 있다. 즉, 상기 특정 주변 샘플들은 p[0][-1] 내지 p[W-1][-1] 을 포함할 수 있다. 여기서, W는 상기 현재 블록의 폭(width)일 수 있다. 이 경우, 상기 리그레션 모델은 상술한 수학식 6 내지 수학식 7을 기반으로 도출될 수 있다. 또한, 상기 N 은 기설정될 수 있다. 또는, 상기 N 은 상기 현재 블록의 사이즈를 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록의 사이즈가 특정 사이즈보다 작은 경우, 상기 N은 1로 도출될 수 있고, 상기 현재 블록의 사이즈가 상기 특정 사이즈보다 크거나 동일한 경우, 상기 N은 상기 현재 블록의 사이즈에 따라 증가할 수 있다. 또는, 상기 N 은 상기 현재 블록에 대한 상기 인트라 예측 모드를 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 2번 인트라 예측 모드 또는 66번 인트라 예측 모드인 경우, 상기 N 은 4로 도출될 수 있다. 또한, 예를 들어, 상기 현재 블록에 대한 상기 인트라 예측 모드가 3번 인트라 예측 모드 내지 18번 인트라 예측 모드인 경우, 상기 N 은 1 또는 2로 도출될 수 있다. 또는, 상기 N 은 상기 현재 블록의 타입을 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록이 가로로 긴 비정방형 블록인 경우, 즉, 상기 현재 블록이 폭이 높이보다 큰 비정방형 블록인 경우, 상기 N 은 큰 값(예를 들어, 4)으로 설정될 수 있다. 또한, 상기 현재 블록이 세로로 긴 비정방형 블록인 경우, 즉, 상기 현재 블록이 높이가 폭보다 큰 비정방형 블록인 경우, 상기 N 은 작은 값(예를 들어, 1)으로 설정될 수 있다. 또는, 상기 N 은 상기 주변 샘플들의 베리언스(variance)를 기반으로 도출될 수 있다. 한편, 일 예로, 상기 현재 블록에 대한 인트라 예측 모드가 수평 양수 각도(horizontal positive angle)를 갖는 인트라 예측 모드인 경우, 상기 특정 예측 샘플들은 상측 경계에서 안쪽 방향(즉, 하측 방향)으로 N개의 열에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 상측 주변 샘플들 중 (-1,0) 좌표에 위치하는 상측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 상측 주변 샘플을 포함할 수 있다. 상기 수평 양수 각도를 갖는 인트라 예측 모드는 2번 인트라 예측 모드 내지 18번 인트라 예측 모드일 수 있다.
또한, 예를 들어, 상기 특정 예측 샘플들은 좌측 경계에서 우측 방향으로 N개의 행에 포함된 예측 샘플들 및 상측 경계에서 하측 방향으로 N개의 열에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 좌측 주변 샘플들 중 (-1,0) 좌표에 위치하는 좌측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 좌측 주변 샘플과 상기 상측 주변 샘플들 중 (0,-1) 좌표에 위치하는 상측 주변 샘플 내지 (W-1,-1) 좌표에 위치하는 상측 주변 샘플을 포함할 수 있다. 즉, 상기 특정 주변 샘플들은 p[-1][0] 내지 p[-1][H-1] 와 p[0][-1] 내지 p[W-1][-1]을 포함할 수 있다. 여기서, H는 상기 현재 블록의 높이(height)일 수 있고, W는 상기 현재 블록의 폭(width)일 수 있다. 이 경우, 상기 좌측 경계에서 우측 방향으로 N개의 행에 포함된 예측 샘플들에 대한 리그레션 모델은 상술한 수학식 3 내지 수학식 4를 기반으로 도출될 수 있고, 상기 상측 경계에서 하측 방향으로 N개의 열에 포함된 예측 샘플들에 대한 리그레션 모델은 상술한 수학식 6 내지 수학식 7을 기반으로 도출될 수 있다. 또한, 상기 N 은 기설정될 수 있다. 또는, 상기 N 은 상기 현재 블록의 사이즈를 기반으로 도출될 수 있다. 예를 들어, 상기 현재 블록의 사이즈가 특정 사이즈보다 작은 경우, 상기 N은 1로 도출될 수 있고, 상기 현재 블록의 사이즈가 상기 특정 사이즈보다 크거나 동일한 경우, 상기 N은 상기 현재 블록의 사이즈에 따라 증가할 수 있다. 또는, 상기 N 은 상기 현재 블록에 대한 상기 인트라 예측 모드를 기반으로 도출될 수 있다. 또는, 상기 N 은 상기 주변 샘플들의 베리언스(variance)를 기반으로 도출될 수 있다. 한편, 일 예로, 상기 현재 블록에 대한 인트라 예측 모드가 DC 인트라 예측 모드인 경우, 상기 특정 예측 샘플들은 좌측 경계에서 우측 방향으로 N개의 행에 포함된 예측 샘플들 및 상측 경계에서 하측 방향으로 N개의 열에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 좌측 주변 샘플들 중 (-1,0) 좌표에 위치하는 좌측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 좌측 주변 샘플과 상기 상측 주변 샘플들 중 (0,-1) 좌표에 위치하는 상측 주변 샘플 내지 (W-1,-1) 좌표에 위치하는 상측 주변 샘플을 포함할 수 있다.
한편, 디코딩 장치는 상기 현재 블록에 대하여 상기 리그레션 모델 기반 필터링의 적용 여부를 결정할 수 있다. 예를 들어, 디코딩 장치는 상기 현재 블록의 사이즈를 기반으로 상기 리그레션 모델 기반 필터링의 적용 여부를 결정할 수 있다. 일 예로, 상기 현재 블록의 사이즈가 특정 사이즈보다 작은 경우, 디코딩 장치는 상기 현재 블록에 대하여 상기 리그레션 모델 기반 필터링을 적용하지 않을 수 있다. 또는, 상기 현재 블록의 폭과 높이와의 비율이 특정 비율 이상인 경우, 디코딩 장치는 상기 현재 블록에 대하여 상기 리그레션 모델 기반 필터링을 적용하지 않을 수 있다.
또는, 예를 들어, 디코딩 장치는 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보를 획득할 수 있고, 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보를 기반으로 상기 리그레션 모델 기반 필터링의 적용 여부를 결정할 수 있다. 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 VPS(Video Parameter Set), SPS(Sequence Parameter Set), PPS(Picture Parameter Set), 슬라이스 헤더(Slice header) 또는 블록 단위로 시그널링될 수 있다.
디코딩 장치는 상기 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행하여 필터링된 특정 예측 샘플들을 도출한다(S1540). 디코딩 장치는 상기 도출된 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행할 수 있다. 상기 필터링된 특정 예측 샘플들은 상술한 수학식 2 또는 수학식 5를 기반으로 도출될 수 있다.
한편, 비록 도면에서 도시되지는 않았으나 디코딩 장치는 예측 모드에 따라 상기 예측 샘플 및/또는 상기 필터링된 특정 예측 샘플을 바로 복원 샘플로 이용할 수도 있고, 또는 상기 예측 샘플 및/또는 상기 필터링된 특정 예측 샘플에 레지듀얼 샘플을 더하여 복원 샘플을 생성할 수도 있다. 디코딩 장치는 상기 현재 블록에 대한 레지듀얼 샘플이 존재하는 경우, 상기 현재 블록에 대한 레지듀얼에 관한 정보를 수신할 수 있고, 상기 레지듀얼에 관한 정보는 영상 정보에 포함될 수 있다. 상기 영상 정보는 상기 레지듀얼에 관한 정보 및 상기 예측에 대한 정보를 포함할 수 있다. 또한, 상기 영상 정보는 상기 리그레션 모델 기반 필터링의 적용 여부를 나타내는 정보를 포함할 수도 있다. 상기 레지듀얼에 관한 정보는 상기 레지듀얼 샘플에 관한 변환 계수를 포함할 수 있다. 디코딩 장치는 상기 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 상기 레지듀얼 샘플(또는 레지듀얼 샘플 어레이)을 도출할 수 있다. 디코딩 장치는 상기 예측 샘플과 상기 레지듀얼 샘플을 기반으로 복원 샘플을 생성할 수 있고, 상기 복원 샘플을 기반으로 복원 블록 또는 복원 픽처를 도출할 수 있다. 이후 디코딩 장치는 필요에 따라 주관적/객관적 화질을 향상시키기 위하여 디블록킹 필터링 및/또는 SAO 절차와 같은 인루프 필터링 절차를 상기 복원 픽처에 적용할 수 있음은 상술한 바와 같다.
도 16은 본 발명에 따른 영상 디코딩 방법을 수행하는 디코딩 장치를 개략적으로 나타낸다. 도 15에서 개시된 방법은 도 16에서 개시된 디코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 16의 상기 디코딩 장치의 예측부는 도 15의 S1500 내지 S1520을 수행할 수 있고, 도 16의 상기 디코딩 장치의 포스트 필터부는 도 15의 S1530 내지 S1540을 수행할 수 있다. 한편, 도 16에서 도시되지는 않았으나 상기 포스트 필터부는 상기 인코딩 장치의 예측부에 포함될 수 있다. 또한, 비록 도시되지는 않았으나 비트스트림을 통하여 현재 블록의 예측에 대한 정보 및 레지듀얼에 관한 정보를 포함하는 영상 정보를 획득하는 과정은 도 16의 상기 디코딩 장치의 엔트로피 디코딩부에 의하여 수행될 수 있고, 상기 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 상기 레지듀얼 샘플을 도출하는 과정은 도 16의 상기 디코딩 장치의 역변환부에 의하여 수행될 수 있고, 예측 샘플과 상기 레지듀얼 샘플을 기반으로 복원 픽처를 생성하는 과정은 도 16의 상기 디코딩 장치의 가산부에 의하여 수행될 수 있다.
상술한 본 발명에 따르면 상기 현재 블록의 예측 샘플과 주변 샘플을 기반으로 도출된 리그레션 모델을 기반으로 바운더리 필터링을 수행할 수 있고, 이를 통하여 현재 블록에 대한 레지듀얼 신호에 대한 비트량을 줄이거나 발생을 방지할 수 있고, 주관적 화질을 향상시킬 수 있다.
또한, 본 발명에 따르면 현재 블록의 특성을 반영하는 특정 조건을 기반으로 리그레션 모델 기반 필터링의 적용 여부를 결정할 수 있고, 이를 통하여 현재 블록의 특성에 따라 필터링 적용을 적응적으로 결정할 수 있고, 전반적인 코딩 효율을 향상시킬 수 있다.
상술한 실시예에서, 방법들은 일련의 단계 또는 블록으로써 순서도를 기초로 설명되고 있지만, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당업자라면 순서도에 나타내어진 단계들이 배타적이지 않고, 다른 단계가 포함되거나 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.
상술한 본 발명에 따른 방법은 소프트웨어 형태로 구현될 수 있으며, 본 발명에 따른 인코딩 장치 및/또는 디코딩 장치는 예를 들어 TV, 컴퓨터, 스마트폰, 셋톱박스, 디스플레이 장치 등의 영상 처리를 수행하는 장치에 포함될 수 있다.
본 발명에서 실시예들이 소프트웨어로 구현될 때, 상술한 방법은 상술한 기능을 수행하는 모듈(과정, 기능 등)로 구현될 수 있다. 모듈은 메모리에 저장되고, 프로세서에 의해 실행될 수 있다. 메모리는 프로세서 내부 또는 외부에 있을 수 있고, 잘 알려진 다양한 수단으로 프로세서와 연결될 수 있다. 프로세서는 ASIC(application-specific integrated circuit), 다른 칩셋, 논리 회로 및/또는 데이터 처리 장치를 포함할 수 있다. 메모리는 ROM(read-only memory), RAM(random access memory), 플래쉬 메모리, 메모리 카드, 저장 매체 및/또는 다른 저장 장치를 포함할 수 있다. 즉, 본 발명에서 설명한 실시예들은 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다. 예를 들어, 각 도면에서 도시한 기능 유닛들은 컴퓨터, 프로세서, 마이크로 프로세서, 컨트롤러 또는 칩 상에서 구현되어 수행될 수 있다.
또한, 본 발명이 적용되는 디코딩 장치 및 인코딩 장치는 멀티미디어 방송 송수신 장치, 모바일 통신 단말, 홈 시네마 비디오 장치, 디지털 시네마 비디오 장치, 감시용 카메라, 비디오 대화 장치, 비디오 통신과 같은 실시간 통신 장치, 모바일 스트리밍 장치, 저장 매체, 캠코더, 주문형 비디오(VoD) 서비스 제공 장치, OTT 비디오(Over the top video) 장치, 인터넷 스트리밍 서비스 제공 장치, 3차원(3D) 비디오 장치, 화상 전화 비디오 장치, 및 의료용 비디오 장치 등에 포함될 수 있으며, 비디오 신호 또는 데이터 신호를 처리하기 위해 사용될 수 있다. 예를 들어, OTT 비디오(Over the top video) 장치로는 게임 콘솔, 블루레이 플레이어, 인터넷 접속 TV, 홈시어터 시스템, 스마트폰, 태블릿 PC, DVR(Digital Video Recorder) 등을 포함할 수 있다.
또한, 본 발명이 적용되는 처리 방법은 컴퓨터로 실행되는 프로그램의 형태로 생산될 수 있으며, 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 본 발명에 따른 데이터 구조를 가지는 멀티미디어 데이터도 또한 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 상기 컴퓨터가 판독할 수 있는 기록 매체는 컴퓨터로 읽을 수 있는 데이터가 저장되는 모든 종류의 저장 장치 및 분산 저장 장치를 포함한다. 상기 컴퓨터가 판독할 수 있는 기록 매체는, 예를 들어, 블루레이 디스크(BD), 범용 직렬 버스(USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크 및 광학적 데이터 저장 장치를 포함할 수 있다. 또한, 상기 컴퓨터가 판독할 수 있는 기록 매체는 반송파(예를 들어, 인터넷을 통한 전송)의 형태로 구현된 미디어를 포함한다. 또한, 인코딩 방법으로 생성된 비트스트림이 컴퓨터가 판독할 수 있는 기록 매체에 저장되거나 유무선 통신 네트워크를 통해 전송될 수 있다. 또한, 본 발명의 실시예는 프로그램 코드에 의한 컴퓨터 프로그램 제품으로 구현될 수 있고, 상기 프로그램 코드는 본 발명의 실시예에 의해 컴퓨터에서 수행될 수 있다. 상기 프로그램 코드는 컴퓨터에 의해 판독 가능한 캐리어 상에 저장될 수 있다.
또한, 본 발명이 적용되는 컨텐츠 스트리밍 시스템은 크게 인코딩 서버, 스트리밍 서버, 웹 서버, 미디어 저장소, 사용자 장치 및 멀티미디어 입력 장치를 포함할 수 있다.
상기 인코딩 서버는 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들로부터 입력된 컨텐츠를 디지털 데이터로 압축하여 비트스트림을 생성하고 이를 상기 스트리밍 서버로 전송하는 역할을 한다. 다른 예로, 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들이 비트스트림을 직접 생성하는 경우, 상기 인코딩 서버는 생략될 수 있다. 상기 비트스트림은 본 발명이 적용되는 인코딩 방법 또는 비트스트림 생성 방법에 의해 생성될 수 있고, 상기 스트리밍 서버는 상기 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 상기 비트스트림을 저장할 수 있다.
상기 스트리밍 서버는 웹 서버를 통한 사용자 요청에 기초하여 멀티미디어 데이터를 사용자 장치에 전송하고, 상기 웹 서버는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 한다. 사용자가 상기 웹 서버에 원하는 서비스를 요청하면, 상기 웹 서버는 이를 스트리밍 서버에 전달하고, 상기 스트리밍 서버는 사용자에게 멀티미디어 데이터를 전송한다. 이때, 상기 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 상기 제어 서버는 상기 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 한다.
상기 스트리밍 서버는 미디어 저장소 및/또는 인코딩 서버로부터 컨텐츠를 수신할 수 있다. 예를 들어, 상기 인코딩 서버로부터 컨텐츠를 수신하게 되는 경우, 상기 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 상기 스트리밍 서버는 상기 비트스트림을 일정 시간동안 저장할 수 있다.
상기 사용자 장치의 예로는, 휴대폰, 스마트 폰(smart phone), 노트북 컴퓨터(laptop computer), 디지털방송용 단말기, PDA(personal digital assistants), PMP(portable multimedia player), 네비게이션, 슬레이트 PC(slate PC), 태블릿 PC(tablet PC), 울트라북(ultrabook), 웨어러블 디바이스(wearable device, 예를 들어, 워치형 단말기 (smartwatch), 글래스형 단말기 (smart glass), HMD(head mounted display)), 디지털 TV, 데스크탑 컴퓨터, 디지털 사이니지 등이 있을 수 있다. 상기 컨텐츠 스트리밍 시스템 내 각 서버들은 분산 서버로 운영될 수 있으며, 이 경우 각 서버에서 수신하는 데이터는 분산 처리될 수 있다.

Claims (12)

  1. 디코딩 장치에 의하여 수행되는 영상 디코딩 방법에 있어서,
    현재 블록에 대한 인트라 예측 모드를 도출하는 단계;
    상기 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들을 포함하는 주변 샘플들을 도출하는 단계;
    상기 주변 샘플들 및 상기 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 도출하는 단계;
    특정 예측 샘플들 및 특정 주변 샘플들을 기반으로 리그레션 모델(regression model)을 도출하는 단계; 및
    상기 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행하여 필터링된 특정 예측 샘플들을 도출하는 단계를 포함하는 것을 특징으로 하는 영상 디코딩 방법.
  2. 제1항에 있어서,
    상기 현재 블록에 대한 상기 인트라 예측 모드가 수직 양수 각도(vertical positive angle)를 갖는 인트라 예측 모드인 경우, 상기 특정 예측 샘플들은 좌측 경계에서 우측 방향으로 N개의 행에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 좌측 주변 샘플들 중 (-1,0) 좌표에 위치하는 좌측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 좌측 주변 샘플을 포함하는 것을 특징으로 하는 영상 디코딩 방법.
  3. 제2항에 있어서,
    상기 리그레션 모델은 다음의 수학식을 기반으로 도출되고,
    Figure PCTKR2019004621-appb-I000001
    Figure PCTKR2019004621-appb-I000002
    여기서, α 및 β 는 상기 리그레션 모델의 계수들(coefficients)을 나타내고, rec(-1,j)는 (-1,j) 좌표의 특정 주변 샘플을 나타내고, pred(i,j)는 (i,j) 좌표의 특정 예측 샘플을 나타내고, height 는 상기 현재 블록의 높이를 나타내는 것을 특징으로 하는 영상 디코딩 방법.
  4. 제3항에 있어서,
    필터링된 특정 예측 샘플은 다음의 수학식을 기반으로 도출되고,
    Figure PCTKR2019004621-appb-I000003
    여기서, pred'(i,j)는 (i,j) 좌표의 필터링된 특정 예측 샘플을 나타내는 것을 특징으로 하는 영상 디코딩 방법.
  5. 제2항에 있어서,
    상기 N 은 상기 현재 블록의 사이즈를 기반으로 도출되는 것을 특징으로 하는 영상 디코딩 방법.
  6. 제2항에 있어서,
    상기 N 은 상기 현재 블록에 대한 상기 인트라 예측 모드를 기반으로 도출되는 것을 특징으로 하는 영상 디코딩 방법.
  7. 제6항에 있어서,
    상기 현재 블록에 대한 상기 인트라 예측 모드가 66번 인트라 예측 모드인 경우, 상기 N 은 4로 도출되고,
    상기 현재 블록에 대한 상기 인트라 예측 모드가 50번 인트라 예측 모드 내지 65번 인트라 예측 모드 중 하나인 경우, 상기 N 은 1로 도출되는 것을 특징으로 하는 영상 디코딩 방법.
  8. 제1항에 있어서,
    상기 현재 블록에 대한 상기 인트라 예측 모드가 수평 양수 각도(horizontal positive angle)를 갖는 인트라 예측 모드인 경우, 상기 특정 예측 샘플들은 상측 경계에서 하측 방향으로 N개의 열에 포함된 예측 샘플들을 포함할 수 있고, 상기 특정 주변 샘플들은 상기 상측 주변 샘플들 중 (-1,0) 좌표에 위치하는 상측 주변 샘플 내지 (-1,H-1) 좌표에 위치하는 상측 주변 샘플을 포함하는 것을 특징으로 하는 영상 디코딩 방법.
  9. 제8항에 있어서,
    상기 리그레션 모델은 다음의 수학식을 기반으로 도출되고,
    Figure PCTKR2019004621-appb-I000004
    Figure PCTKR2019004621-appb-I000005
    여기서, α 및 β 는 상기 리그레션 모델의 계수들(coefficients)을 나타내고, rec(i,-1)는 (i,-1) 좌표의 특정 주변 샘플을 나타내고, pred(i,j)는 (i,j) 좌표의 특정 예측 샘플을 나타내고, width 는 상기 현재 블록의 폭을 나타내는 것을 특징으로 하는 영상 디코딩 방법.
  10. 제8항에 있어서,
    상기 N 은 상기 현재 블록에 대한 상기 인트라 예측 모드를 기반으로 도출되는 것을 특징으로 하는 영상 디코딩 방법.
  11. 제10항에 있어서,
    상기 현재 블록에 대한 상기 인트라 예측 모드가 2번 인트라 예측 모드인 경우, 상기 N 은 4로 도출되고,
    상기 현재 블록에 대한 상기 인트라 예측 모드가 3번 인트라 예측 모드 내지 18번 인트라 예측 모드 중 하나인 경우, 상기 N 은 1로 도출되는 것을 특징으로 하는 영상 디코딩 방법.
  12. 인코딩 장치에 의하여 수행되는 영상 인코딩 방법에 있어서,
    현재 블록에 대한 인트라 예측 모드를 결정하는 단계;
    상기 현재 블록의 좌측 주변 샘플들 및 상측 주변 샘플들을 포함하는 주변 샘플들을 도출하는 단계;
    상기 주변 샘플들 및 상기 인트라 예측 모드를 기반으로 상기 현재 블록에 대한 예측 샘플들을 도출하는 단계;
    특정 예측 샘플들 및 특정 주변 샘플들을 기반으로 리그레션 모델(regression model)을 도출하는 단계;
    상기 리그레션 모델을 기반으로 상기 특정 예측 샘플들에 대한 필터링을 수행하여 필터링된 특정 예측 샘플들을 도출하는 단계; 및
    상기 현재 블록의 예측에 대한 정보를 포함하는 영상 정보를 인코딩하는 단계를 포함하는 것을 특징으로 하는 영상 인코딩 방법.
PCT/KR2019/004621 2018-04-17 2019-04-17 영상 코딩 시스템에서 리그레션 모델 기반 필터링을 사용하는 영상 디코딩 방법 및 장치 WO2019203559A1 (ko)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201862658609P 2018-04-17 2018-04-17
US62/658,609 2018-04-17

Publications (1)

Publication Number Publication Date
WO2019203559A1 true WO2019203559A1 (ko) 2019-10-24

Family

ID=68240172

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/004621 WO2019203559A1 (ko) 2018-04-17 2019-04-17 영상 코딩 시스템에서 리그레션 모델 기반 필터링을 사용하는 영상 디코딩 방법 및 장치

Country Status (1)

Country Link
WO (1) WO2019203559A1 (ko)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120140181A (ko) * 2011-06-20 2012-12-28 한국전자통신연구원 화면내 예측 블록 경계 필터링을 이용한 부호화/복호화 방법 및 그 장치
KR20130126928A (ko) * 2010-12-08 2013-11-21 엘지전자 주식회사 인트라 예측 방법과 이를 이용한 부호화 장치 및 복호화 장치
KR20140057511A (ko) * 2010-07-31 2014-05-13 엠앤케이홀딩스 주식회사 인트라 예측 복호화 장치
KR101517768B1 (ko) * 2008-07-02 2015-05-06 삼성전자주식회사 영상의 부호화 방법 및 장치, 그 복호화 방법 및 장치
JP2017005508A (ja) * 2015-06-10 2017-01-05 日本電信電話株式会社 イントラ予測処理装置、イントラ予測処理方法、イントラ予測処理プログラム、画像符号化装置及び画像復号装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101517768B1 (ko) * 2008-07-02 2015-05-06 삼성전자주식회사 영상의 부호화 방법 및 장치, 그 복호화 방법 및 장치
KR20140057511A (ko) * 2010-07-31 2014-05-13 엠앤케이홀딩스 주식회사 인트라 예측 복호화 장치
KR20130126928A (ko) * 2010-12-08 2013-11-21 엘지전자 주식회사 인트라 예측 방법과 이를 이용한 부호화 장치 및 복호화 장치
KR20120140181A (ko) * 2011-06-20 2012-12-28 한국전자통신연구원 화면내 예측 블록 경계 필터링을 이용한 부호화/복호화 방법 및 그 장치
JP2017005508A (ja) * 2015-06-10 2017-01-05 日本電信電話株式会社 イントラ予測処理装置、イントラ予測処理方法、イントラ予測処理プログラム、画像符号化装置及び画像復号装置

Similar Documents

Publication Publication Date Title
WO2019194440A1 (ko) 인트라 예측 모드에 대한 룩업 테이블을 이용한 영상 코딩 방법 및 그 장치
WO2020071829A1 (ko) 히스토리 기반 영상 코딩 방법 및 그 장치
WO2019190181A1 (ko) 인트라 예측 기반 영상/비디오 코딩 방법 및 그 장치
WO2020256389A1 (ko) Bdpcm 기반 영상 디코딩 방법 및 그 장치
WO2020091213A1 (ko) 영상 코딩 시스템에서 인트라 예측 방법 및 장치
WO2021137597A1 (ko) Ols에 대한 dpb 파라미터를 사용하는 영상 디코딩 방법 및 그 장치
WO2020197038A1 (ko) 영상 코딩 시스템에서 인트라 서브 파티션 기반의 인트라 예측 방법 및 장치
WO2020149630A1 (ko) 영상 코딩 시스템에서 cclm 예측 기반 영상 디코딩 방법 및 그 장치
WO2020141928A1 (ko) 영상 코딩 시스템에서 mmvd 에 따른 예측에 기반한 영상 디코딩 방법 및 장치
WO2019225933A1 (ko) 영상 코딩 시스템에서 lut를 기반으로 도출된 mvd 를 사용하는 영상 디코딩 방법 및 그 장치
WO2020141886A1 (ko) Sbtmvp 기반 인터 예측 방법 및 장치
WO2020256506A1 (ko) 다중 참조 라인 인트라 예측을 이용한 영상 부호화/복호화 방법, 장치 및 비트스트림을 전송하는 방법
WO2020141932A1 (ko) Cpr 기반 mmvd를 이용하는 인터 예측 방법 및 장치
WO2020145620A1 (ko) Mpm 리스트를 사용하는 인트라 예측 기반 영상 코딩 방법 및 장치
WO2020004879A1 (ko) 영상 코딩 시스템에서 복수의 주변 블록들을 사용하는 인터 예측에 따른 영상 디코딩 방법 및 장치
WO2020197031A1 (ko) 영상 코딩 시스템에서 다중 참조 라인 기반의 인트라 예측 방법 및 장치
WO2019225932A1 (ko) 영상 코딩 시스템에서 dmvr을 사용하는 영상 디코딩 방법 및 그 장치
WO2020013497A1 (ko) 영상 코딩 시스템에서 인트라 예측 정보를 사용하는 영상 디코딩 방법 및 그 장치
WO2019203533A1 (ko) 다중 움직임 모델을 고려한 인터 예측 방법 및 그 장치
WO2020235959A1 (ko) 영상 코딩 시스템에서 bdpcm을 사용하는 영상 디코딩 방법 및 그 장치
WO2020145656A1 (ko) Tmvp 후보의 가용 여부를 시그널링하는 방법 및 장치
WO2020130629A1 (ko) 다중 참조 라인 인트라 예측에 기반한 영상 코딩 방법 및 그 장치
WO2019203513A1 (ko) 영상 코딩 시스템에서 dmvd 를 이용한 인터 예측에 따른 영상 디코딩 방법 및 장치
WO2019212223A1 (ko) 영상 코딩 시스템에서 dmvr을 사용하는 영상 디코딩 방법 및 그 장치
WO2018222020A1 (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: 19787722

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19787722

Country of ref document: EP

Kind code of ref document: A1