WO2017069591A1 - Method and device for filtering image in image coding system - Google Patents

Method and device for filtering image in image coding system Download PDF

Info

Publication number
WO2017069591A1
WO2017069591A1 PCT/KR2016/011949 KR2016011949W WO2017069591A1 WO 2017069591 A1 WO2017069591 A1 WO 2017069591A1 KR 2016011949 W KR2016011949 W KR 2016011949W WO 2017069591 A1 WO2017069591 A1 WO 2017069591A1
Authority
WO
WIPO (PCT)
Prior art keywords
target block
filtering
motion vector
prediction
block
Prior art date
Application number
PCT/KR2016/011949
Other languages
French (fr)
Korean (ko)
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 WO2017069591A1 publication Critical patent/WO2017069591A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/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/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/46Embedding additional information in the video signal during the compression process
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Definitions

  • the present invention relates to image coding technology, and more particularly, to an image filtering method and apparatus in an image coding system.
  • video quality of the terminal device can be supported and the network environment is diversified, in general, video of general quality may be used in one environment, but higher quality video may be used in another environment. .
  • a consumer who purchases video content on a mobile terminal can view the same video content on a larger screen and at a higher resolution through a large display in the home.
  • An object of the present invention is to provide a method and apparatus for improving image coding efficiency.
  • Another object of the present invention is to provide a method and apparatus for improving the subjective / objective picture quality of a reconstructed picture.
  • Another technical problem of the present invention is to provide a filtering method and apparatus using a motion vector of a prediction target block.
  • Another technical problem of the present invention is to provide a filtering method and apparatus through weighted sum of a prediction sample derived based on a motion vector of a prediction target block and a reconstruction sample of a filtering target block.
  • an image decoding method performed by a decoding apparatus.
  • the method may include deriving a motion vector of a prediction target block, deriving a prediction sample for the prediction target block based on the motion vector, and deriving a filtering target block based on neighboring blocks of the prediction target block. Deriving a filtering target region in the filtering target block, and performing filtering on a reconstructed sample in the filtering target region based on a prediction sample of the prediction target block.
  • a decoding apparatus for performing inter prediction.
  • the decoding apparatus derives a motion vector of a prediction target block, a prediction unit for deriving a prediction sample for the prediction target block based on the motion vector, and derives a filtering target block based on neighboring blocks of the prediction target block.
  • a filter unit for deriving a filtering target region in the filtering target block and performing filtering on the reconstructed sample in the filtering target region based on a prediction sample of the prediction target block.
  • a video encoding method performed by an encoding apparatus may include deriving a motion vector of a prediction target block, deriving a prediction sample for the prediction target block based on the motion vector, and deriving a filtering target block based on neighboring blocks of the prediction target block. Determining a filtering target region in the filtering target block, performing filtering on a reconstructed sample in the filtering target region based on a prediction sample of the prediction target block, and information on filtering performed on the reconstructed sample It characterized in that it comprises the step of encoding and outputting.
  • a video encoding apparatus derives a motion vector of the prediction target block, a prediction unit for deriving a prediction sample for the prediction target block based on the motion vector, and derives a filtering target block based on neighboring blocks of the prediction target block.
  • a filter unit configured to determine a filtering target region in the filtering target block, and to perform filtering on the reconstructed sample in the filtering target region based on a prediction sample of the prediction target block, and a filtering performed on the reconstructed sample.
  • an entropy encoding unit for encoding and outputting the information.
  • subjective / objective image quality may be improved by filtering reconstructed samples in the neighboring block of the prediction target block.
  • filtering can be performed by weighted sum of neighboring reconstructed samples at the boundary of the predicted sample and the predicted block derived based on the motion vector of the predicted block, thereby reducing errors between blocks and subjective. Can improve the objective image quality.
  • FIG. 1 is a block diagram schematically illustrating a video encoding apparatus according to an embodiment of the present invention.
  • FIG. 2 is a block diagram schematically illustrating a video decoding apparatus according to an embodiment of the present invention.
  • FIG. 3 illustrates positions of neighboring blocks usable in a prediction target block used in image encoding / decoding.
  • FIG. 4 illustrates an example of filtering a neighboring block using a motion vector of a prediction target block.
  • FIG. 5 illustrates an example of a process of filtering a neighboring block based on a motion vector of a prediction target block.
  • FIG 6 illustrates an example of filtering target block candidates.
  • FIG. 7 illustrates an example of comparing motion vectors to derive the filtering target block.
  • FIG. 8 illustrates an example of weights for performing filtering on reconstructed samples in the filtering region.
  • FIG. 9 schematically illustrates a video encoding method by an encoding device according to the present invention.
  • FIG. 10 schematically illustrates a video decoding method by a decoding apparatus according to the present invention.
  • each of the components in the drawings described in the present invention are shown independently for the convenience of description of the different characteristic functions in the video encoding apparatus / decoding apparatus, each component is a separate hardware or separate software It does not mean that it is implemented.
  • 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 present invention without departing from the spirit of the present invention.
  • FIG. 1 is a block diagram schematically illustrating a video encoding apparatus according to an embodiment of the present invention.
  • the encoding apparatus 100 may include a picture divider 105, a predictor 110, a transformer 115, a quantizer 120, a reordering unit 125, an entropy encoding unit 130, An inverse quantization unit 135, an inverse transform unit 140, a filter unit 145, and a memory 150 are provided.
  • the picture dividing unit 105 may divide the input picture into at least one processing unit block.
  • the block as the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU).
  • a picture may be composed of a plurality of coding tree units (CTUs), and each CTU may be split into CUs in a quad-tree structure.
  • a CU may be divided into quad tree structures with CUs of a lower depth.
  • PU and TU may be obtained from a CU.
  • a PU may be partitioned from a CU into a symmetrical or asymmetrical square structure.
  • the TU may also be divided into quad tree structures from the CU.
  • the predictor 110 includes an inter predictor for performing inter prediction and an intra predictor for performing intra prediction, as described below.
  • the prediction unit 110 performs prediction on the processing unit of the picture in the picture division unit 105 to generate a prediction block including a prediction sample (or a prediction sample array).
  • the processing unit of the picture in the prediction unit 110 may be a CU, a TU, or a PU.
  • the prediction unit 110 may determine whether the prediction performed on the processing unit is inter prediction or intra prediction, and determine specific contents (eg, prediction mode, etc.) of each prediction method.
  • the processing unit in which the prediction is performed and the processing unit in which the details of the prediction method and the prediction method are determined may be different.
  • the method of prediction and the prediction mode may be determined in units of PUs, and the prediction may be performed in units of TUs.
  • a prediction block may be generated by performing prediction based on information of at least one picture of a previous picture and / or a subsequent picture of the current picture.
  • a prediction block may be generated by performing prediction based on pixel information in a current picture.
  • a skip mode, a merge mode, an advanced motion vector prediction (AMVP), and the like can be used.
  • a reference picture may be selected for a PU and a reference block corresponding to the PU may be selected.
  • the reference block may be selected in units of integer pixels (or samples) or fractional pixels (or samples).
  • a predictive block is generated in which a residual signal with the PU is minimized and the size of the motion vector is also minimized.
  • the prediction block may be generated in integer pixel units, or may be generated in sub-pixel units such as 1/2 pixel unit or 1/4 pixel unit.
  • the motion vector may also be expressed in units of integer pixels or less.
  • Information such as an index of a reference picture selected through inter prediction, a motion vector difference (MDV), a motion vector predictor (MVP), a residual signal, and the like may be entropy encoded and transmitted to a decoding apparatus.
  • MDV motion vector difference
  • MVP motion vector predictor
  • the residual may be used as the reconstructed block, and thus the residual may not be generated, transformed, quantized, or transmitted.
  • a prediction mode When performing intra prediction, a prediction mode may be determined in units of PUs, and prediction may be performed in units of PUs. In addition, a prediction mode may be determined in units of PUs, and intra prediction may be performed in units of TUs.
  • 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).
  • a prediction block may be generated after applying a filter to a reference sample.
  • whether to apply the filter to the reference sample may be determined according to the intra prediction mode and / or the size of the current block.
  • the residual value (the residual block or the residual signal) between the generated prediction block and the original block is input to the converter 115.
  • the prediction mode information, the motion vector information, etc. used for the prediction are encoded by the entropy encoding unit 130 together with the residual value and transmitted to the decoding apparatus.
  • the transform unit 115 performs transform on the residual block in units of transform blocks and generates transform coefficients.
  • the transform block is a rectangular block of samples to which the same transform is applied.
  • the transform block can be a transform unit (TU) and can have a quad tree structure.
  • the transformer 115 may perform the transformation according to the prediction mode applied to the residual block and the size of the block.
  • the residual block is transformed using a discrete sine transform (DST), otherwise the residual block is transformed into a DCT (Discrete). Can be transformed using Cosine Transform.
  • DST discrete sine transform
  • DCT Discrete
  • the transform unit 115 may generate a transform block of transform coefficients by the transform.
  • the quantization unit 120 may generate quantized transform coefficients by quantizing the residual values transformed by the transform unit 115, that is, the transform coefficients.
  • the value calculated by the quantization unit 120 is provided to the inverse quantization unit 135 and the reordering unit 125.
  • the reordering unit 125 rearranges the quantized transform coefficients provided from the quantization unit 120. By rearranging the quantized transform coefficients, the encoding efficiency of the entropy encoding unit 130 may be increased.
  • the reordering unit 125 may rearrange the quantized transform coefficients in the form of a 2D block into a 1D vector form through a coefficient scanning method.
  • the entropy encoding unit 130 entropy-codes a symbol according to a probability distribution based on the quantized transform values rearranged by the reordering unit 125 or the encoding parameter value calculated in the coding process, thereby performing a bitstream. You can output The entropy encoding method receives a symbol having various values and expresses it as a decodable column while removing statistical redundancy.
  • the symbol means a syntax element, a coding parameter, a value of a residual signal, etc., to be encoded / decoded.
  • An encoding parameter is a parameter necessary for encoding and decoding, and may include information that may be inferred in the encoding or decoding process as well as information encoded by an encoding device and transmitted to the decoding device, such as a syntax element. It means the information you need when you do.
  • the encoding parameter may be, for example, a value such as an intra / inter prediction mode, a moving / motion vector, a reference image index, a coding block pattern, a residual signal presence, a transform coefficient, a quantized transform coefficient, a quantization parameter, a block size, block partitioning information, or the like. May include statistics.
  • the residual signal may mean a difference between the original signal and the prediction signal, and a signal in which the difference between the original signal and the prediction signal is transformed or a signal in which the difference between the original signal and the prediction signal is converted and quantized It may mean.
  • the residual signal may be referred to as a residual block in the block unit, and the residual sample in the sample unit.
  • Encoding methods such as exponential golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) may be used for entropy encoding.
  • the entropy encoding unit 130 may store a table for performing entropy encoding, such as a variable length coding (VLC) table, and the entropy encoding unit 130 may store the variable length coding. Entropy encoding can be performed using the (VLC) table.
  • the entropy encoding unit 130 derives the binarization method of the target symbol and the probability model of the target symbol / bin, and then uses the derived binarization method or the probability model to entropy. You can also perform encoding.
  • the entropy encoding unit 130 may apply a constant change to a parameter set or syntax to be transmitted.
  • the inverse quantizer 135 inversely quantizes the quantized values (quantized transform coefficients) in the quantizer 120, and the inverse transformer 140 inversely transforms the inverse quantized values in the inverse quantizer 135.
  • the residual value (or the residual sample or the residual sample array) generated by the inverse quantizer 135 and the inverse transform unit 140 and the prediction block predicted by the predictor 110 are added together to reconstruct the sample (or the reconstructed sample array).
  • a reconstructed block including a may be generated.
  • a reconstructed block is generated by adding a residual block and a prediction block through an adder.
  • the adder may be viewed as a separate unit (restore block generation unit) for generating a reconstruction block.
  • the filter unit 145 may apply a deblocking filter, an adaptive loop filter (ALF), and a sample adaptive offset (SAO) to the reconstructed picture.
  • ALF adaptive loop filter
  • SAO sample adaptive offset
  • the deblocking filter may remove distortion generated at the boundary between blocks in the reconstructed picture.
  • the adaptive loop filter may perform filtering based on a value obtained by comparing the reconstructed image with the original image after the block is filtered through the deblocking filter. ALF may be performed only when high efficiency is applied.
  • the SAO restores the offset difference from the original image on a pixel-by-pixel basis for the residual block to which the deblocking filter is applied, and is applied in the form of a band offset and an edge offset.
  • the filter unit 145 may not apply filtering to the reconstructed block used for inter prediction.
  • the memory 150 may store the reconstructed block or the picture calculated by the filter unit 145.
  • the reconstructed block or picture stored in the memory 150 may be provided to the predictor 110 that performs inter prediction.
  • the video decoding apparatus 200 includes an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, and a filter unit 235.
  • Memory 240 may be included.
  • the input bitstream may be decoded according to a procedure in which image information is processed in the video encoding apparatus.
  • the entropy decoding unit 210 may entropy decode the input bitstream according to a probability distribution to generate symbols including symbols in the form of quantized coefficients.
  • the entropy decoding method is a method of generating each symbol by receiving a binary string.
  • the entropy decoding method is similar to the entropy encoding method described above.
  • VLC variable length coding
  • 'VLC' variable length coding
  • CABAC CABAC
  • 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.
  • Information for generating the prediction block among the information decoded by the entropy decoding unit 210 is provided to the predictor 230, and a residual value where entropy decoding is performed by the entropy decoding unit 210, that is, a quantized transform coefficient It may be input to the reordering unit 215.
  • the reordering unit 215 may reorder the information of the bitstream entropy decoded by the entropy decoding unit 210, that is, the quantized transform coefficients, based on the reordering method in the encoding apparatus.
  • the reordering unit 215 may reorder the coefficients expressed in the form of a one-dimensional vector by restoring the coefficients in the form of a two-dimensional block.
  • the reordering unit 215 scans the coefficients based on the prediction mode applied to the current block (transform block) and the size of the transform block to generate an array of coefficients (quantized transform coefficients) in the form of a two-dimensional block. Can be.
  • the inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoding apparatus and the coefficient values of the rearranged block.
  • the inverse transform unit 225 may perform inverse DCT and / or inverse DST on the DCT and the DST performed by the transform unit of the encoding apparatus with respect to the quantization result performed by the video encoding apparatus.
  • the inverse transformation may be performed based on a transmission unit determined by the encoding apparatus or a division unit of an image.
  • the DCT and / or DST in the encoding unit of the encoding apparatus may be selectively performed according to a plurality of pieces of information, such as a prediction method, a size and a prediction direction of the current block, and the inverse transform unit 225 of the decoding apparatus is configured in the transformation unit of the encoding apparatus.
  • Inverse transformation may be performed based on the performed transformation information.
  • the prediction unit 230 may include prediction samples (or prediction sample arrays) based on prediction block generation related information provided by the entropy decoding unit 210 and previously decoded block and / or picture information provided by the memory 240.
  • a prediction block can be generated.
  • intra prediction for generating a prediction block based on pixel information in the current picture may be performed.
  • inter prediction on the current PU may be performed based on information included in at least one of a previous picture or a subsequent picture of the current picture.
  • motion information required for inter prediction of the current PU provided by the video encoding apparatus for example, a motion vector, a reference picture index, and the like, may be derived by checking a skip flag, a merge flag, and the like received from the encoding apparatus.
  • a prediction block may be generated such that a residual signal with a current block is minimized and a motion vector size is also minimized.
  • the motion information derivation scheme may vary depending on the prediction mode of the current block.
  • Prediction modes applied for inter prediction may include an advanced motion vector prediction (AMVP) mode, a merge mode, and the like.
  • AMVP advanced motion vector prediction
  • the encoding apparatus and the decoding apparatus may generate a merge candidate list by using the motion vector of the reconstructed spatial neighboring block and / or the motion vector corresponding to the 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 encoding apparatus may transmit, to the decoding apparatus, a merge index indicating a candidate block having an optimal motion vector selected from candidate blocks included in the merge candidate list. In this case, the decoding apparatus may derive the motion vector of the current block by using the merge index.
  • the encoding device and the decoding device use a motion vector corresponding to a motion vector of a reconstructed spatial neighboring block and / or a Col block, which is a temporal neighboring block, and a motion vector.
  • a predictor candidate list may be generated. That is, the motion vector of the reconstructed spatial neighboring block and / or the Col vector, which is a temporal neighboring block, may be used as a motion vector candidate.
  • the encoding apparatus may transmit the predicted motion vector index indicating the optimal motion vector selected from the motion vector candidates included in the list to the decoding apparatus. In this case, the decoding apparatus may select the predicted motion vector of the current block among the motion vector candidates included in the motion information candidate list using the motion vector index.
  • the encoding apparatus may obtain a motion vector difference MVD between the motion vector MV of the current block and the motion vector predictor MVP, and may encode the same and transmit the encoded motion vector to the decoding device. That is, MVD may be obtained by subtracting MVP from MV of the current block.
  • the decoding apparatus may decode the received motion vector difference and derive the motion vector of the current block through the addition of the decoded motion vector difference and the motion vector predictor.
  • the encoding apparatus may also transmit a reference picture index or the like indicating the reference picture to the decoding apparatus.
  • the decoding apparatus may predict the motion vector of the current block using the motion information of the neighboring block, and may derive the motion vector for the current block using the residual received from the encoding apparatus.
  • the decoding apparatus may generate a prediction block for the current block based on the derived motion vector and the reference picture index information received from the encoding apparatus.
  • the encoding apparatus and the decoding apparatus may generate the merge candidate list using the motion information of the reconstructed neighboring block and / or the motion information of the call block. That is, the encoding apparatus and the decoding apparatus may use this as a merge candidate for the current block when there is motion information of the reconstructed neighboring block and / or the call block.
  • the encoding apparatus may select a merge candidate capable of providing an optimal encoding efficiency among the merge candidates included in the merge candidate list as motion information for the current block.
  • a merge index indicating the selected merge candidate may be included in the bitstream and transmitted to the decoding apparatus.
  • the decoding apparatus may select one of the merge candidates included in the merge candidate list by using the transmitted merge index, and determine the selected merge candidate as motion information of the current block. Therefore, when the merge mode is applied, motion information corresponding to the reconstructed neighboring block and / or the call block may be used as the motion information of the current block.
  • the decoding apparatus may reconstruct the current block by adding the prediction block and the residual transmitted from the encoding apparatus.
  • the motion information of the reconstructed neighboring block and / or the motion information of the call block may be used to derive the motion information of the current block.
  • the encoding apparatus does not transmit syntax information such as residual to the decoding apparatus other than information indicating which block motion information to use as the motion information of the current block.
  • the encoding apparatus and the decoding apparatus may generate the prediction block of the current block by performing motion compensation on the current block based on the derived motion information.
  • the prediction block may mean a motion compensated block generated as a result of performing motion compensation on the current block.
  • the plurality of motion compensated blocks may constitute one motion compensated image.
  • the reconstruction block may be generated using the prediction block generated by the predictor 230 and the residual block provided by the inverse transform unit 225.
  • the reconstructed block is generated by combining the prediction block and the residual block in the adder.
  • the adder may be viewed as a separate unit (restore block generation unit) for generating a reconstruction block.
  • the reconstruction block includes a reconstruction sample (or reconstruction sample array) as described above
  • the prediction block includes a prediction sample (or a prediction sample array)
  • the residual block is a residual sample (or a residual sample). Array).
  • a reconstructed sample (or reconstructed sample array) may be expressed as the sum of the corresponding predictive sample (or predictive sample array) and the residual sample (residual sample array).
  • the residual is not transmitted for the block to which the skip mode is applied, and the prediction block may be a reconstruction block.
  • the reconstructed block and / or picture may be provided to the filter unit 235.
  • the filter unit 235 may apply deblocking filtering, sample adaptive offset (SAO), and / or ALF to the reconstructed block and / or picture.
  • SAO sample adaptive offset
  • the memory 240 may store the reconstructed picture or block to use as a reference picture or reference block and provide the reconstructed picture to the output unit.
  • Components directly related to the decoding of an image for example, an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, and a filter unit ( 235) and the like may be distinguished from other components by a decoder or a decoder.
  • the decoding apparatus 200 may further include a parsing unit (not shown) for parsing information related to the encoded image included in the bitstream.
  • the parsing unit may include the entropy decoding unit 210 or may be included in the entropy decoding unit 210. Such a parser may also be implemented as one component of the decoder.
  • the compression coding process of the image is performed in units of blocks, distortion may occur at boundaries between blocks in the reconstructed picture.
  • the neighboring block of the predicted block that has already been decoded is filtered to the neighboring block. Can improve the quality.
  • image compression may divide an image into specific block units (eg, coding tree units, CTUs), and encode and decode blocks by one block in a sequential order from the upper left of the image.
  • the order may be a raster scan order.
  • the prediction target block in order to remove spatial and temporal redundancy, may be encoded and decoded by referring to information of neighboring blocks that have been encoded and decoded among neighboring blocks of the prediction target block.
  • a usable peripheral block may be a left peripheral block, an upper peripheral block, a left-above peripheral block, or a right-above peripheral block.
  • the information of the prediction target block may also be used to improve visual quality of neighboring blocks that are already decoded.
  • the present invention provides a method for improving the quality of the neighboring block based on the motion information of the prediction target block.
  • samples (or pixels) located at the boundary of the block may have a relatively large quantization error. Blocking degradation may occur.
  • filtering By applying filtering to a sample located at the boundary of the neighboring block based on the motion vector of the prediction target block, an error of the sample located at the boundary of the neighboring block can be reduced.
  • a prediction sample of a sample located at the boundary of the neighboring block may be derived based on the motion vector of the prediction target block, and the value of the sample located at the boundary of the prediction sample and the neighboring block is determined. Filtering may be performed through a weight sum of.
  • a filtering target region may be determined based on a motion vector of the prediction target block, and filtering may be performed on the filtering target region.
  • the filtering subject region may include samples located at a boundary of at least one of the above-described neighboring blocks.
  • FIG. 5 illustrates an example of a process of filtering a neighboring block based on a motion vector of a prediction target block.
  • the encoding apparatus and the decoding apparatus are provided through the filtering target block determining unit 500, the filtering target region determining unit 510, the filter parameter deriving unit 520, and the filtering execution unit 530. Filtering can be performed on neighboring blocks.
  • the filtering target block determiner 500 may derive a filtering target block to perform filtering among neighboring blocks adjacent to the prediction target block.
  • the size of the filtering target block may be the same as or different from the size of the prediction target block.
  • the filtering object block may be derived using a motion vector of the prediction object block.
  • the filtering target region determiner 510 may derive a boundary region adjacent to the prediction target block to be filtered in the filtering target block.
  • the filtering target region may be variably determined according to the size of the filtering target block.
  • the filtering parameter derivation unit 520 may derive whether to perform filtering on the filtering target region and a weight value used for filtering.
  • the filtering performing unit 530 may perform the filtering derived by the filter parameter deriving unit 520 on a region determined by the filtering target region determining unit 510 with respect to the block determined by the filtering target block determining unit 500. Filtering can be applied using the presence and absence of filter parameters.
  • the filtering target block determining unit 500, the filtering target region determining unit 510, the filter parameter deriving unit 520, and the filtering performing unit 530 may be included in a filter unit, and may be implemented by a processor. Can be.
  • the filtering target block determiner 500 may derive a neighboring block to perform filtering among neighboring blocks adjacent to the prediction target block. Conditions derived to the filtering target block may be as follows.
  • the filtering target block may be one of a left neighboring block, an upper neighboring block, and the upper left neighboring block among adjacent neighboring blocks of the prediction object block.
  • the motion information of the filtering target block may be different from the motion information of the prediction target block.
  • the motion information may include a motion vector and a reference picture index associated with the motion vector.
  • FIG. 5 illustrates the filtering target block determining unit 500, the filtering target region determining unit 510, the filter parameter deriving unit 520, and the filtering performing unit 530 separately according to functions.
  • the filtering target block determining unit 500, the filtering target region determining unit 510, the filter parameter deriving unit 520, and the filtering performing unit 530 may be included in a filter unit. . That is, all of the above functions may be performed by one filter unit.
  • the filtering target block candidate may include not only the neighboring block to which the inter prediction mode is applied but also the neighboring block to which the intra prediction mode is applied.
  • the filtering target block candidate may be derived as the filtering target block.
  • the motion vector of the prediction target block may be included in the motion information of the prediction target block.
  • the motion information of the prediction target block may be bi-predicted motion information or may be L0 or L1 predicted motion information.
  • the L0 or L1 predicted motion information may also be referred to as uni-predicted motion information.
  • the bi-predicted motion information may include an L0 motion vector and an L1 motion vector, and the unipredicted motion information may include only one of the L0 motion vector and the L1 motion vector.
  • the L0 motion vector represents a motion vector relating to L0 prediction
  • the L1 motion vector represents a motion vector relating to L1 prediction
  • L0 represents a reference picture list L0 (list 0)
  • L1 represents a reference picture list L1 (list 1).
  • the motion information of the prediction target block is bi-predictive motion information
  • the L0 reference picture index, the L0 motion vector, the L1 reference picture index, and the L1 motion vector may be included.
  • the motion information of the prediction block is unipredicted motion information
  • the L0 reference picture index and the L0 motion vector may be included, or the L1 reference picture index and the L1 motion vector may be included.
  • the filtering target block candidate When the motion information of the prediction target block is mono-predictive motion information, if the filtering target block candidate has the same reference picture index and the motion vector as the reference picture index and the motion vector of the prediction target block, the filtering target block candidate is the It may not be derived to the filtering target block.
  • the filtering target block candidate when the unipredicted motion information of the prediction target block includes an L0 reference picture index and an L0 motion vector, and the same as the L0 reference picture index and the L0 motion vector of the filtering target block candidate, the filtering target block candidate may be used. It may not be derived to the filtering target block.
  • the filtering target block candidate is the It may not be derived to the filtering target block.
  • the filtering target block candidate when the filtering target block candidate has the same reference picture index as the reference picture index of the prediction target block, but the motion vector is different, it may be derived as the filtering target block.
  • the short-predicted motion information of the prediction target block includes an L0 reference picture index and an L0 motion vector, the L0 reference picture index of the filtering target block candidate and the L0 reference picture index of the prediction target block are the same, and
  • the filtering target block candidate may be derived as the filtering target block.
  • the unidirectional motion information of the prediction target block includes an L1 reference picture index and an L1 motion vector
  • the L1 reference picture index of the filtering target block candidate and the L1 reference picture index of the prediction target block are the same
  • the filtering target block candidate may be derived as the filtering target block.
  • the motion information of the filtering target block candidate matches both the L0 prediction motion information of the prediction target block and the L1 prediction motion information of the prediction target block.
  • the filtering target block candidate may not be derived as the filtering target block.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering may be performed based on the L0 motion vector of the prediction target block.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering may be performed based on the L1 motion vector of the prediction target block.
  • the filtering target block candidate does not match both the L0 prediction motion information of the prediction target block and the L1 prediction motion information of the prediction target block, the L0 motion vector and the prediction target block of the prediction target block.
  • the filtering may be performed based on the L1 motion vector.
  • the weight value is different. Can be.
  • FIG. 7 illustrates an example of comparing motion vectors to derive the filtering target block.
  • FIG. 7A illustrates an example of comparing motion vectors when the size of the filtering target block candidate is the same as the size of the prediction target block.
  • FIG. 7B illustrates an example of comparing motion vectors when the size of the filtering target block candidates is smaller than the size of the prediction target block.
  • filtering may be performed on the prediction target block side of the filtering target block.
  • the filtering target block candidate may be derived as a filtering target block, and a boundary where the boundary of the prediction target block and the boundary of the filtering target block overlap with each other may be referred to as a reference boundary.
  • a filtering target region in the reference boundary direction of the filtering target block may be derived, and filtering may be performed on the filtering target region.
  • the filtering target block candidate is a filtering target block.
  • a filtering target region in the reference boundary direction of the filtering target block may be derived, and filtering may be performed on the filtering target region.
  • the filtering target block candidate may not be derived as the filtering target block. Can be.
  • the filtering target block candidate when the motion vector of the filtering target block candidate does not exist, for example, when an intra prediction mode is applied to the filtering target block candidate, the motion vector of the filtering target block candidate is different from the motion vector of the prediction target block.
  • the filtering target block candidate may be derived as the filtering target block, and filtering may be performed.
  • whether to perform filtering that is, whether to derive the filtering target block by comparing the motion vector of each sub-block with the motion vector of the filtering target block located around the prediction target block Can be determined.
  • the filtering target region determiner may derive a filtering target region to which samples are filtered when filtering the boundary of the prediction target block.
  • Conditions for derivation into the filtering target region may be as follows.
  • the filtering target region may be derived based on the size of the prediction target block.
  • the filtering target region may be derived based on a size of a filtering target block including the filtering target region.
  • the filtering target region may be derived based on a difference between the size of the prediction target block and the size of the filtering target block including the filtering target region.
  • the filtering target region may be derived based on whether an intra prediction mode is applied to a filtering target block including the filtering target region.
  • the filtering target region may be derived based on the presence or absence of a quantization coefficient of the filtering target block including the filtering target region.
  • a filtering target region may be derived based on the size of the prediction target block and the size of the filtering target block. Can be.
  • the filtering target region may be as shown in Table 1 below.
  • wxh indicates a case where the size of the block is larger than wxh
  • the decoding apparatus may determine the filtering target region based on a mapping table of a table set in advance, for example, Table 1, above, without performing a separate calculation process.
  • filtering when the value of the difference between the size of the prediction target block and the size of the filtering target block is smaller than a predefined threshold value TH1, filtering may not be performed. If the value of the difference from the size of the block to be filtered is greater than the predefined threshold value TH2, filtering may not be performed.
  • the filtering target region may be derived based on whether an intra prediction mode is applied to the filtering target block.
  • the filtering target region may be fixed to a preset range regardless of the size of the filtering target block.
  • the filtering target block may include a relatively larger error than when the inter prediction mode is applied on the boundary side of the block. Therefore, filtering may be performed to compensate for the error.
  • the quantization coefficient of the filtering target block does not exist, it may be determined that an error of the filtering target block is small and excluded from the filtering target block, that is, the filtering may not be performed.
  • FIG. 8 illustrates an example of weights for performing filtering on reconstructed samples in the filtering region.
  • the weight may be derived based on a distance from the reference boundary to the reconstructed sample.
  • the filtering parameter derivation unit may derive a weight used for the filtering.
  • the filtering subject region determiner may determine how many reconstructed samples are included in the filtered subject region based on the reference boundary.
  • a sample adjacent to the reference boundary may be referred to as a first reconstructed sample, and may be sequentially ordered in a direction away from the reference boundary.
  • different weights may be used for each position of the reconstructed sample.
  • FIG. 8 exemplarily shows a filtering weight for each reconstruction sample for each position.
  • FIG. 8A illustrates an example of weights derived from the reference boundary from the reference boundary to the second reconstruction sample
  • FIG. 8B illustrates the filtering region from the reference boundary to the fourth reconstruction sample.
  • P C may represent prediction samples of a position corresponding to the reconstruction samples of the filtering target region derived based on the motion vector of the prediction target block
  • P N may represent the reconstruction samples of the filtering target region.
  • P N ⁇ A, B ⁇ represents the weight for the reconstructed sample located at A or B
  • P C ⁇ A, B ⁇ represents the weight for the predictive sample located at A or B.
  • the weight of the reconstructed sample of the first position based on the A position that is, the reference boundary may be 1/2
  • the weight of the predicted sample of the first position based on the reference boundary may be 1/2.
  • the weight of the reconstructed sample of the second position based on the reference position B that is, the reference boundary may be 3/4
  • the weight of the predicted sample of the second position based on the reference boundary may be 1/4.
  • the weight of the reconstructed sample of the first position based on the A position that is, the reference boundary may be 1/4
  • the weight of the predicted sample of the first position based on the reference boundary may be 3/4.
  • the weight of the reconstructed sample of the second position based on the reference position B, that is, the reference boundary may be 1/2
  • the weight of the predicted sample of the second position based on the reference boundary may be 1/2.
  • the weight of the reconstructed sample of the third position based on the C position may be 3/4
  • the weight of the predicted sample of the third position based on the reference boundary may be 1/4
  • the weight of the reconstructed sample of the fourth position based on the reference position D that is, the reference boundary may be 7/8
  • the weight of the predicted sample of the fourth position based on the reference boundary may be 1/7.
  • the weight for performing the filtering may be set for each position of the reconstructed sample included in the filtering target region in the encoding / decoding process.
  • the encoding apparatus and the decoding apparatus may have a weight table including weight candidates of the reconstructed samples.
  • the decoding apparatus may receive the weight index through a bitstream, and the weight for the reconstructed sample for each position and the weight for the prediction sample based on the candidate included in the weight table indicated by the weight index. Can be derived.
  • the weight index may be transmitted in a slice unit or a CU unit.
  • the encoding apparatus may generate a flag indicating whether filtering is applied to neighboring blocks based on the motion vector of the prediction target block, and may encode and transmit the flag.
  • the flag may be referred to as a block-boundary filtering (bbf) flag.
  • the weight index and bbf flag may be transmitted through a syntax as shown in Table 2 below.
  • the bbf_flag syntax element may correspond to the bbf flag
  • the weight_idx syntax element may correspond to the weight index.
  • the weight index may be transmitted when the value of the bbf flag is 1.
  • the weight index may indicate a candidate included in the weight table.
  • the weight table may be as shown in Table 3 below.
  • Table 3 shows an example of a weight table applied when the filtering target region includes up to fourth reconstructed samples based on the reference boundary.
  • various weighting candidates may be added to the weighting table.
  • the weights for the first sample, the second sample, the third sample, and the fourth sample may be indicated sequentially from the front of the weighting candidate.
  • the weights shown in Table 3 may be weights for the prediction samples derived based on the motion vector of the prediction target block.
  • weights for the reconstructed samples corresponding to the prediction samples may be obtained in the form of (1- ⁇ ) based on the weights.
  • may represent a weight for the prediction sample.
  • FIG. 9 schematically illustrates a video encoding method by an encoding device according to the present invention.
  • the method disclosed in FIG. 9 may be performed by the encoding apparatus disclosed in FIG. 1.
  • S900 to S910 of FIG. 9 may be performed by the prediction unit of the encoding apparatus
  • S920 to S940 may be performed by the filter unit of the encoding apparatus
  • S950 may be entropy of the encoding apparatus. It may be performed by the encoding unit.
  • the encoding apparatus derives a motion vector of the prediction target block (S900).
  • the motion vector of the prediction target block may be included in the motion information of the prediction target block.
  • the motion information of the prediction target block may be bi-predicted motion information or may be L0 or L1 predicted motion information.
  • the L0 or L1 predicted motion information may also be referred to as uni-predicted motion information.
  • the bi-predicted motion information may include an L0 motion vector and an L1 motion vector, and the unipredicted motion information may include only one of the L0 motion vector and the L1 motion vector.
  • the L0 motion vector represents a motion vector relating to L0 prediction
  • the L1 motion vector represents a motion vector relating to L1 prediction.
  • L0 represents a reference picture list L0 (list 0)
  • L1 represents a reference picture list L1 (list 1).
  • the L0 reference picture index, the L0 motion vector, the L1 reference picture index, and the L1 motion vector may be included.
  • the motion information of the prediction block is unipredicted motion information
  • the L0 reference picture index and the L0 motion vector may be included, or the L1 reference picture index and the L1 motion vector may be included.
  • the encoding apparatus derives a prediction sample for the prediction block based on the motion vector (S910).
  • the encoding apparatus may obtain a predictive sample value on the reference picture indicated by the motion vector, and generate the predictive sample.
  • the encoding apparatus filters the neighboring block that has already been decoded.
  • the motion vector for deriving the prediction sample may be different by comparing the motion vector of the filtering target block candidate with the L0 motion vector and the L1 motion vector of the prediction target block.
  • a prediction sample of the prediction target block is based on the L0 motion vector and the L1 motion vector. Can be derived.
  • the prediction object based on the L1 motion vector.
  • the prediction sample of the block can be derived.
  • the prediction target block based on the L0 motion vector.
  • the prediction sample of can be derived.
  • the encoding apparatus derives a filtering target block based on neighboring blocks of the prediction target block (S920).
  • the filtering target block may be at least one of a left neighboring block, a left upper neighboring block, and an upper neighboring block of the prediction target block.
  • the neighboring block may have the same size as or different from the prediction target block. For example, the neighboring block may be smaller in size than the prediction target block.
  • the encoding apparatus may derive a neighboring block which is already decoded among the neighboring blocks of the prediction target block as a filtering target block candidate, and compare the motion vector of the filtering target block candidate and the motion vector of the prediction target block. have.
  • the filtering target block candidate may be derived as the filtering target block.
  • the motion information of the prediction target block may be uni-prediction motion information, and the uni-prediction motion information may include a L0 motion vector.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate is derived. Can be.
  • the motion information of the prediction target block may be unipredicted motion information, and the unipredicted motion information may include an L1 motion vector.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate has the same reference picture index as the L1 reference picture index of the prediction target block, but the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the filtering target block candidate is derived. Can be.
  • the motion information of the prediction target block may be bi-predictive motion information, and the bi-predictive motion information may include an L0 motion vector and an L1 motion vector.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate may be derived as both the L0 motion vector and the L1 motion vector.
  • the filtering target block candidate when an intra prediction mode is applied to the filtering target block candidate, the filtering target block candidate may be derived as the filtering target block. In this case, it may be assumed that the motion vector of the filtering target block candidate and the motion vector of the prediction target block are not the same.
  • the filtering target block candidate may not be derived as the filtering target block.
  • the prediction target block may not be derived.
  • the value of the difference between the size of and the size of the filtering target block candidate is larger than a predefined threshold value TH2, it may not be derived to the filtering target block.
  • the encoding apparatus determines a filtering target region in the filtering target block (S930).
  • the filtering target region may include reconstructed samples around a reference boundary.
  • the reference boundary may represent a boundary where a boundary of the prediction target block and a boundary of the filtering target block overlap.
  • the filtering target region may be determined based on a difference value between the value of the motion vector of the filtering target block and the value of the motion vector of the prediction target block.
  • the filtering target region may be determined based on the size of the prediction target block, may be determined based on the size of the filtering target block, and based on the size of the prediction target block and the size of the filtering target block. Can be determined.
  • the filtering target region may be as shown in Table 1 above.
  • the filtering target region may be determined based on whether an intra prediction mode is applied to the filtering target block.
  • the filtering target region may be fixed to a preset range regardless of the size of the filtering target block.
  • the filtering target region may be determined based on the presence or absence of a quantization coefficient of the filtering target block.
  • the encoding apparatus performs filtering on the reconstructed samples in the filtering target region based on the prediction samples of the prediction target block (S940).
  • the encoding apparatus may perform filtering based on a weighted sum of the value of the prediction sample and the value of the reconstructed sample.
  • the weight of the prediction sample and the weight of the reconstruction sample may be derived based on a distance from a reference boundary to the reconstruction sample.
  • the reference boundary may represent a boundary where a boundary of the prediction target block and a boundary of the filtering target block overlap.
  • the weight for the prediction sample may increase as the distance from the reference boundary is closer to the reference boundary, and the weight for the reconstructed sample may increase as the distance from the reference boundary increases.
  • the weight of the prediction sample and the weight of the reconstruction sample may be the same as the content shown in FIG. 8.
  • the encoding apparatus may configure a weight table based on the weight candidates for the weighted sum.
  • the weight table may be as shown in Table 3 above.
  • the specific candidate which is one of the candidates of the weight table, may be determined as the weight of the prediction sample and the weight of the reconstruction sample, and an index indicating the specific candidate may be generated.
  • the index may be called a weighted index.
  • the prediction sample is derived based on one of the L0 motion vector and the L1 motion vector of the prediction target block, and the L0 motion vector and the L1.
  • the weight value may be different.
  • the encoding apparatus encodes and outputs information on the filtering performed on the reconstructed sample (S950).
  • the encoding apparatus may entropy-encode the information about the filtering indicating the filtering performed on the reconstructed sample in the filtering target region of the filtering target block based on the motion vector of the prediction target block and output the result in a bitstream form.
  • the encoding apparatus may generate a flag indicating whether to perform the filtering on the reconstructed sample, encode it, and output the flag in the form of the bitstream.
  • the flag may be called a block-boundary filtering (bbf) flag.
  • bbf block-boundary filtering
  • the encoding apparatus may generate an index indicating a candidate in the weight table, encode it, and output the index in the form of the bitstream.
  • the index may be called a weighted index.
  • the bbf flag and the weight index may be transmitted to the decoding apparatus in the form of the bitstream.
  • the bitstream may be transmitted to a decoding apparatus via a network or a storage medium.
  • FIG. 10 schematically illustrates a video decoding method by a decoding apparatus according to the present invention.
  • the method disclosed in FIG. 10 may be performed by the decoding apparatus disclosed in FIG. 2.
  • S1000 to S1010 of FIG. 10 may be performed by the prediction unit of the decoding apparatus
  • S1020 to S1040 may be performed by the filter unit of the decoding apparatus.
  • the decoding apparatus derives a motion vector of the prediction target block (S1000).
  • the motion vector of the prediction target block may be included in the motion information of the prediction target block.
  • the motion information of the prediction target block may be bi-predicted motion information or may be L0 or L1 predicted motion information.
  • the L0 or L1 predicted motion information may also be referred to as uni-predicted motion information.
  • the bi-predicted motion information may include an L0 motion vector and an L1 motion vector, and the unipredicted motion information may include only one of the L0 motion vector and the L1 motion vector.
  • the L0 motion vector represents a motion vector relating to L0 prediction
  • the L1 motion vector represents a motion vector relating to L1 prediction.
  • L0 represents a reference picture list L0 (list 0)
  • L1 represents a reference picture list L1 (list 1).
  • the L0 reference picture index, the L0 motion vector, the L1 reference picture index, and the L1 motion vector may be included.
  • the motion information of the prediction block is unipredicted motion information
  • the L0 reference picture index and the L0 motion vector may be included, or the L1 reference picture index and the L1 motion vector may be included.
  • the decoding apparatus derives a prediction sample for the prediction target block based on the motion vector (S1010).
  • the decoding apparatus may obtain a predictive sample value on the reference picture indicated by the motion vector, and generate the predictive sample.
  • the decoding apparatus filters the neighboring block that has already been decoded.
  • the motion vector for deriving the prediction sample may be different by comparing the motion vector of the filtering target block candidate with the L0 motion vector and the L1 motion vector of the prediction target block.
  • a prediction sample of the prediction target block is based on the L0 motion vector and the L1 motion vector. Can be derived.
  • the prediction object based on the L1 motion vector.
  • the prediction sample of the block can be derived.
  • the prediction target block based on the L0 motion vector.
  • the prediction sample of can be derived.
  • the decoding apparatus derives a filtering target block based on neighboring blocks of the prediction target block (S1020).
  • the filtering target block may be at least one of a left neighboring block, a left upper neighboring block, and an upper neighboring block of the prediction target block.
  • the neighboring block may have the same size as or different from the prediction target block. For example, the neighboring block may be smaller in size than the prediction target block.
  • the decoding apparatus may derive the decoded neighboring block among the neighboring blocks of the prediction target block as a filtering target block candidate, and compare the motion vector of the filtering target block candidate and the motion vector of the prediction target block. have.
  • the filtering target block candidate may be derived as the filtering target block.
  • the motion information of the prediction target block may be uni-prediction motion information, and the uni-prediction motion information may include a L0 motion vector.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate is derived. Can be.
  • the motion information of the prediction target block may be unipredicted motion information, and the unipredicted motion information may include an L1 motion vector.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate has the same reference picture index as the L1 reference picture index of the prediction target block, but the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the filtering target block candidate is derived. Can be.
  • the motion information of the prediction target block may be bi-predictive motion information, and the bi-predictive motion information may include an L0 motion vector and an L1 motion vector.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate may be derived as the filtering target block.
  • the filtering target block candidate may be derived as both the L0 motion vector and the L1 motion vector.
  • the filtering target block candidate when an intra prediction mode is applied to the filtering target block candidate, the filtering target block candidate may be derived as the filtering target block. In this case, it may be assumed that the motion vector of the filtering target block candidate and the motion vector of the prediction target block are not the same.
  • the filtering target block candidate may not be derived as the filtering target block.
  • the prediction target block may not be derived.
  • the value of the difference between the size of and the size of the filtering target block candidate is larger than a predefined threshold value TH2, it may not be derived to the filtering target block.
  • the decoding apparatus derives a filtering target region in the filtering target block (S1030).
  • the filtering target region may include reconstructed samples around a reference boundary.
  • the reference boundary may represent a boundary where a boundary of the prediction target block and a boundary of the filtering target block overlap.
  • the filtering target region may be derived based on a difference value between the value of the motion vector of the filtering target block and the value of the motion vector of the prediction target block.
  • the filtering target region may be derived based on the size of the prediction target block, may be derived based on the size of the filtering target block, and may be derived from the size of the prediction target block and the size of the filtering target block. Can be derived based on this.
  • the filtering target region may be as shown in Table 1 above.
  • the filtering target region may be derived based on whether an intra prediction mode is applied to the filtering target block.
  • the filtering target region may be fixed to a preset range regardless of the size of the filtering target block.
  • the filtering target region may be derived based on the presence or absence of a quantization coefficient of the filtering target block.
  • the decoding apparatus performs filtering on the reconstructed samples in the filtering target region based on the prediction samples of the prediction target block (S1040).
  • the decoding apparatus may perform filtering based on a weighted sum of the value of the prediction sample and the value of the reconstructed sample.
  • the weight of the prediction sample and the weight of the reconstruction sample may be derived based on a distance from a reference boundary to the reconstruction sample.
  • the reference boundary may represent a boundary where a boundary of the prediction target block and a boundary of the filtering target block overlap.
  • the weight for the prediction sample may increase as the distance from the reference boundary is closer to the reference boundary, and the weight for the reconstructed sample may increase as the distance from the reference boundary increases.
  • the weight of the prediction sample and the weight of the reconstruction sample may be the same as the content shown in FIG. 8.
  • the decoding apparatus may configure a weight table based on the weight candidates for the weighted sum.
  • the weight table may be as shown in Table 3 above.
  • the decoding apparatus may obtain index information indicating one of the candidates included in the weight table through the bitstream, and the candidate indicating the weight for the prediction sample and the weight for the reconstruction sample is indicated by the index. Can be derived based on The index may be called a weighted index.
  • the prediction sample is derived based on one of the L0 motion vector and the L1 motion vector of the prediction target block, and the L0 motion vector and the L1.
  • the weight value may be different.
  • the decoding apparatus may obtain flag information indicating whether to perform filtering on the reconstructed sample based on the motion vector of the prediction target block through a bitstream.
  • the flag may be referred to as a block-boundary filtering (bbf) flag.
  • bbf block-boundary filtering
  • the decoding apparatus may perform filtering on the reconstructed sample.
  • the decoding device may not perform filtering on the reconstructed sample.
  • subjective / objective picture quality may be improved by filtering reconstructed samples in neighboring blocks of the prediction target block.
  • filtering can be performed by weighted sum of neighboring reconstructed samples at the boundary of the predicted sample and the predicted block derived based on the motion vector of the predicted block, thereby reducing errors between blocks.
  • subjective / objective image 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 various 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.

Abstract

A filtering method performed by a decoding device, according to the present invention, comprises the steps of: deriving a motion vector of a block to be predicted; deriving a prediction sample for the block to be predicted, on the basis of the motion vector; deriving a block to be filtered, on the basis of neighboring blocks of the block to be predicted; deriving an area to be filtered within the block to be filtered; and filtering a restoration sample within the area to be filtered, on the basis of the prediction sample of the block to be predicted. According to the present invention, filtering can be performed through a weighted sum of a prediction sample, derived on the basis of a motion vector of a block to be predicted, and neighboring restoration samples at the boundary of the block to be predicted, thereby enabling errors between blocks to be reduced and subjective/objective image quality to be improved.

Description

영상 코딩 시스템에서 영상 필터링 방법 및 장치Method and apparatus for image filtering in image coding system
본 발명은 영상 코딩 기술에 관한 것으로서 보다 상세하게는 영상 코딩 시스템에서 영상 필터링 방법 및 장치에 관한 것이다.The present invention relates to image coding technology, and more particularly, to an image filtering method and apparatus in an image coding system.
최근 고해상도, 고품질의 영상에 대한 요구가 다양한 응용 분야에서 증가하고 있다. 영상이 고해상도를 가지고 고품질이 될수록 해당 영상에 관한 정보량도 함께 증가하고 있다. Recently, the demand for high resolution and high quality images is increasing in various applications. As an image has a high resolution and high quality, the amount of information on the image also increases.
정보량의 증가로 인해 다양한 성능의 장치와 다양한 환경의 네트워크가 등장하고 있다. 다양한 성능의 장치와 다양한 환경의 네트워크가 등장함에 따라서, 동일한 컨텐츠를 다양한 품질로 이용할 수 있게 되었다.As information volume increases, devices with various performances and networks with various environments are emerging. As devices with different capabilities and networks with different environments emerge, the same content is available in different qualities.
구체적으로, 단말 장치가 지원할 수 있는 품질의 영상이 다양해지고, 구축된 네트워크 환경이 다양해짐으로써, 어떤 환경에서는 일반적인 품질의 영상을 이용하지만, 또 다른 환경에서는 더 높은 품질의 영상을 이용할 수 있게 된다.In detail, as the video quality of the terminal device can be supported and the network environment is diversified, in general, video of general quality may be used in one environment, but higher quality video may be used in another environment. .
예를 들어, 휴대 단말에서 비디오 컨텐츠를 구매한 소비자가 가정 내 대화면의 디스플레이를 통해 동일한 비디오 컨텐츠를 더 큰 화면과 더 높은 해상도로 감상할 수 있게 되는 것이다.For example, a consumer who purchases video content on a mobile terminal can view the same video content on a larger screen and at a higher resolution through a large display in the home.
최근에는 FHD(Full High Definition) 해상도를 가지는 방송이 서비스되면서 많은 사용자들은 이미 고해상도, 고화질의 영상에 익숙해지고 있고, 서비스 제공자와 사용자들은 FHD와 더불어 UHD(Ultra High Definition) 이상의 서비스에도 관심을 기울이고 있다.In recent years, as broadcasts with full high definition (FHD) resolutions are being serviced, many users are already accustomed to high-definition and high-definition video, and service providers and users are paying attention to more than ultra high definition (UHD) services as well as FHD. .
이에 따라 주관적/객관적 화질을 보다 향상시키기 위한 영상 필터링 방법이 요구되고 있다.Accordingly, there is a demand for an image filtering method for further improving subjective / objective picture quality.
본 발명의 기술적 과제는 영상 코딩 효율을 높이는 방법 및 장치를 제공함에 있다.An object of the present invention is to provide a method and apparatus for improving image coding efficiency.
본 발명의 다른 기술적 과제는 복원 픽처의 주관적/객관적 화질을 향상시키기 위한 방법 및 장치를 제공함에 있다.Another object of the present invention is to provide a method and apparatus for improving the subjective / objective picture quality of a reconstructed picture.
본 발명의 또 다른 기술적 과제는 예측 대상 블록의 움직임 벡터를 사용한 필터링 방법 및 장치를 제공함에 있다.Another technical problem of the present invention is to provide a filtering method and apparatus using a motion vector of a prediction target block.
본 발명의 또 다른 기술적 과제는 예측 대상 블록의 움직임 벡터를 기반으로 도출된 예측 샘플과 필터링 대상 블록의 복원 샘플과의 가중합을 통한 필터링 방법 및 장치를 제공함에 있다.Another technical problem of the present invention is to provide a filtering method and apparatus through weighted sum of a prediction sample derived based on a motion vector of a prediction target block and a reconstruction sample of a filtering target block.
본 발명의 일 실시예에 따르면, 디코딩 장치에 의하여 수행되는 영상 디코딩 방법이 제공된다. 상기 방법은 예측 대상 블록의 움직임 벡터를 도출하는 단계, 상기 움직임 벡터를 기반으로 상기 예측 대상 블록에 대한 예측 샘플을 도출하는 단계, 상기 예측 대상 블록의 주변 블록들을 기반으로 필터링 대상 블록을 도출하는 단계, 상기 필터링 대상 블록 내의 필터링 대상 영역을 도출하는 단계, 및 상기 예측 대상 블록의 예측 샘플을 기반으로 상기 필터링 대상 영역 내 복원 샘플에 대한 필터링을 수행하는 단계를 포함함을 특징으로 한다.According to an embodiment of the present invention, there is provided an image decoding method performed by a decoding apparatus. The method may include deriving a motion vector of a prediction target block, deriving a prediction sample for the prediction target block based on the motion vector, and deriving a filtering target block based on neighboring blocks of the prediction target block. Deriving a filtering target region in the filtering target block, and performing filtering on a reconstructed sample in the filtering target region based on a prediction sample of the prediction target block.
본 발명의 다른 일 실시예에 따르면, 인터 예측을 수행하는 디코딩 장치가 제공된다. 상기 디코딩 장치는 예측 대상 블록의 움직임 벡터를 도출하고, 상기 움직임 벡터를 기반으로 상기 예측 대상 블록에 대한 예측 샘플을 도출하는 예측부, 상기 예측 대상 블록의 주변 블록들을 기반으로 필터링 대상 블록을 도출하고, 상기 필터링 대상 블록 내의 필터링 대상 영역을 도출하고, 및 상기 예측 대상 블록의 예측 샘플을 기반으로 상기 필터링 대상 영역 내 복원 샘플에 대한 필터링을 수행하는 필터부를 포함함을 특징으로 한다.According to another embodiment of the present invention, a decoding apparatus for performing inter prediction is provided. The decoding apparatus derives a motion vector of a prediction target block, a prediction unit for deriving a prediction sample for the prediction target block based on the motion vector, and derives a filtering target block based on neighboring blocks of the prediction target block. And a filter unit for deriving a filtering target region in the filtering target block and performing filtering on the reconstructed sample in the filtering target region based on a prediction sample of the prediction target block.
본 발명의 또 다른 일 실시예에 따르면, 인코딩 장치에 의하여 수행되는 비디오 인코딩 방법을 제공한다. 상기 방법은 예측 대상 블록의 움직임 벡터를 도출하는 단계, 상기 움직임 벡터를 기반으로 상기 예측 대상 블록에 대한 예측 샘플을 도출하는 단계, 상기 예측 대상 블록의 주변 블록들을 기반으로 필터링 대상 블록을 도출하는 단계, 상기 필터링 대상 블록 내의 필터링 대상 영역을 결정하는 단계, 상기 예측 대상 블록의 예측 샘플을 기반으로 상기 필터링 대상 영역 내 복원 샘플에 대한 필터링을 수행하는 단계, 및 상기 복원 샘플에 수행된 필터링에 대한 정보를 인코딩하여 출력하는 단계를 포함함을 특징으로 한다.According to another embodiment of the present invention, a video encoding method performed by an encoding apparatus is provided. The method may include deriving a motion vector of a prediction target block, deriving a prediction sample for the prediction target block based on the motion vector, and deriving a filtering target block based on neighboring blocks of the prediction target block. Determining a filtering target region in the filtering target block, performing filtering on a reconstructed sample in the filtering target region based on a prediction sample of the prediction target block, and information on filtering performed on the reconstructed sample It characterized in that it comprises the step of encoding and outputting.
본 발명의 또 다른 일 실시예에 따르면, 비디오 인코딩 장치를 제공한다. 상기 인코딩 장치는 예측 대상 블록의 움직임 벡터를 도출하고, 상기 움직임 벡터를 기반으로 상기 예측 대상 블록에 대한 예측 샘플을 도출하는 예측부, 상기 예측 대상 블록의 주변 블록들을 기반으로 필터링 대상 블록을 도출하고, 상기 필터링 대상 블록 내의 필터링 대상 영역을 결정하고, 및 상기 예측 대상 블록의 예측 샘플을 기반으로 상기 필터링 대상 영역 내 복원 샘플에 대한 필터링을 수행하는 필터부, 및 상기 복원 샘플에 수행된 필터링에 대한 정보를 인코딩하여 출력하는 엔트로피 인코딩부를 포함함을 특징으로 한다.According to another embodiment of the present invention, a video encoding apparatus is provided. The encoding apparatus derives a motion vector of the prediction target block, a prediction unit for deriving a prediction sample for the prediction target block based on the motion vector, and derives a filtering target block based on neighboring blocks of the prediction target block. A filter unit configured to determine a filtering target region in the filtering target block, and to perform filtering on the reconstructed sample in the filtering target region based on a prediction sample of the prediction target block, and a filtering performed on the reconstructed sample. And an entropy encoding unit for encoding and outputting the information.
본 발명에 따르면 예측 대상 블록의 주변 블록 내 복원 샘플의 필터링을 통하여 주관적/객관적 화질을 향상시킬 수 있다.According to the present invention, subjective / objective image quality may be improved by filtering reconstructed samples in the neighboring block of the prediction target block.
본 발명에 따르면 예측 대상 블록의 움직임 벡터를 기반으로 도출된 예측 샘플과 예측 대상 블록의 경계에 주변 복원 샘플들의 가중합을 통하여 필터링을 수행할 수 있어, 블록들 사이의 에러를 줄일 수 있고, 주관적/객관적 화질을 향상시킬 수 있다. According to the present invention, filtering can be performed by weighted sum of neighboring reconstructed samples at the boundary of the predicted sample and the predicted block derived based on the motion vector of the predicted block, thereby reducing errors between blocks and subjective. Can improve the objective image quality.
도 1은 본 발명의 일 실시예에 따른 비디오 인코딩 장치를 개략적으로 도시한 블록도이다. 1 is a block diagram schematically illustrating a video encoding apparatus according to an embodiment of the present invention.
도 2는 본 발명의 일 실시예에 따른 비디오 디코딩 장치를 개략적으로 도시한 블록도이다.2 is a block diagram schematically illustrating a video decoding apparatus according to an embodiment of the present invention.
도 3은 영상 인코딩/디코딩에서 사용하는 예측 대상 블록에서 사용 가능한 주변 블록의 위치를 나타낸다. 3 illustrates positions of neighboring blocks usable in a prediction target block used in image encoding / decoding.
도 4는 예측 대상 블록의 움직임 벡터를 이용한 주변 블록의 필터링의 일 예를 예시적으로 나타낸다.4 illustrates an example of filtering a neighboring block using a motion vector of a prediction target block.
도 5는 예측 대상 블록의 움직임 벡터를 기반으로 주변 블록에 필터링을 수행하는 과정의 일 예를 예시적으로 나타낸다.5 illustrates an example of a process of filtering a neighboring block based on a motion vector of a prediction target block.
도 6은 필터링 대상 블록 후보들의 일 예를 예시적으로 나타낸다. 6 illustrates an example of filtering target block candidates.
도 7은 상기 필터링 대상 블록을 도출하기 위하여 움직임 벡터를 비교하는 일 예를 예시적으로 나타낸다.7 illustrates an example of comparing motion vectors to derive the filtering target block.
도 8은 상기 필터링 대상 영역 내 복원 샘플들에 필터링을 수행하기 위한 가중치의 일 예를 예시적으로 나타낸다.8 illustrates an example of weights for performing filtering on reconstructed samples in the filtering region.
도 9는 본 발명에 따른 인코딩 장치에 의한 비디오 인코딩 방법을 개략적으로 나타낸다.9 schematically illustrates a video encoding method by an encoding device according to the present invention.
도 10은 본 발명에 따른 디코딩 장치에 의한 비디오 디코딩 방법을 개략적으로 나타낸다.10 schematically illustrates a video decoding method by a decoding apparatus according to the present invention.
본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는 바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니다. 본 명세서에서 사용하는 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명의 기술적 사상을 한정하려는 의도로 사용되는 것은 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성 요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성 요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.As the present invention allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the written description. However, this is not intended to limit the invention to the specific embodiments. The terminology used herein is for the purpose of describing particular example embodiments only and is not intended to be limiting of the spirit of the present invention. Singular expressions include plural expressions unless the context clearly indicates otherwise. In this specification, terms such as "comprise" or "have" are intended to indicate that there is a feature, number, step, action, component, part, or combination thereof described on the specification, and one or more other features. It is to be understood that the present invention does not exclude the possibility of the presence or the addition of numbers, steps, operations, components, components, or a combination thereof.
한편, 본 발명에서 설명되는 도면상의 각 구성들은 비디오 인코딩 장치/디코딩 장치에서 서로 다른 특징적인 기능들에 관한 설명의 편의를 위해 독립적으로 도시된 것으로서, 각 구성들이 서로 별개의 하드웨어나 별개의 소프트웨어로 구현된다는 것을 의미하지는 않는다. 예컨대, 각 구성 중 두 개 이상의 구성이 합쳐져 하나의 구성을 이룰 수도 있고, 하나의 구성이 복수의 구성으로 나뉘어질 수도 있다. 각 구성이 통합 및/또는 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명에 포함된다.On the other hand, each of the components in the drawings described in the present invention are shown independently for the convenience of description of the different characteristic functions in the video encoding apparatus / decoding apparatus, each component is a separate hardware or separate software It does not mean that it is implemented. For example, 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 present invention without departing from the spirit of the present invention.
이하, 첨부한 도면들을 참조하여, 본 발명의 실시예를 보다 상세하게 설명하고자 한다. Hereinafter, with reference to the accompanying drawings, it will be described in detail an embodiment of the present invention.
도 1은 본 발명의 일 실시예에 따른 비디오 인코딩 장치를 개략적으로 도시한 블록도이다. 1 is a block diagram schematically illustrating a video encoding apparatus according to an embodiment of the present invention.
도 1을 참조하면, 인코딩 장치(100)는 픽처 분할부(105), 예측부(110), 변환부(115), 양자화부(120), 재정렬부(125), 엔트로피 인코딩부(130), 역양자화부(135), 역변환부(140), 필터부(145) 및 메모리(150)를 구비한다.Referring to FIG. 1, the encoding apparatus 100 may include a picture divider 105, a predictor 110, a transformer 115, a quantizer 120, a reordering unit 125, an entropy encoding unit 130, An inverse quantization unit 135, an inverse transform unit 140, a filter unit 145, and a memory 150 are provided.
픽처 분할부(105)는 입력된 픽처를 적어도 하나의 처리 단위 블록으로 분할할 수 있다. 이때, 처리 단위로서의 블록은 예측 유닛(Prediction Unit, PU)일 수도 있고, 변환 유닛(Transform Unit, TU)일 수도 있으며, 코딩 유닛(Coding Unit, CU)일 수도 있다. 픽처는 복수의 코딩 트리 유닛(Coding Tree Unit, CTU)들로 구성될 수 있으며, 각각의 CTU는 쿼드 트리(quad-tree) 구조로 CU들로 분할(split)될 수 있다. CU는 보다 하위(deeper) 뎁스의 CU들로 쿼드 트리 구조로 분할될 수도 있다. PU 및 TU는 CU로부터 획득될 수 있다. 예를 들어, PU는 CU로부터 대칭 또는 비대칭 사각형 구조로 파티셔닝(partitioning)될 수 있다. 또한 TU는 CU로부터 쿼드 트리 구조로 분할될 수도 있다. The picture dividing unit 105 may divide the input picture into at least one processing unit block. In this case, the block as the processing unit may be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). A picture may be composed of a plurality of coding tree units (CTUs), and each CTU may be split into CUs in a quad-tree structure. A CU may be divided into quad tree structures with CUs of a lower depth. PU and TU may be obtained from a CU. For example, a PU may be partitioned from a CU into a symmetrical or asymmetrical square structure. The TU may also be divided into quad tree structures from the CU.
예측부(110)는 후술하는 바와 같이, 인터 예측을 수행하는 인터 예측부와 인트라 예측을 수행하는 인트라 예측부를 포함한다. 예측부(110)는, 픽처 분할부(105)에서 픽처의 처리 단위에 대하여 예측을 수행하여 예측 샘플(또는 예측 샘플 어레이)을 포함하는 예측 블록을 생성한다. 예측부(110)에서 픽처의 처리 단위는 CU일 수도 있고, TU일 수도 있고, PU일 수도 있다. 또한, 예측부(110)는 해당 처리 단위에 대하여 실시되는 예측이 인터 예측인지 인트라 예측인지를 결정하고, 각 예측 방법의 구체적인 내용(예컨대, 예측 모드 등)을 정할 수 있다. 이때, 예측이 수행되는 처리 단위와 예측 방법 및 예측 방법의 구체적인 내용이 정해지는 처리 단위는 다를 수 있다. 예컨대, 예측의 방법과 예측 모드 등은 PU 단위로 결정되고, 예측의 수행은 TU 단위로 수행될 수도 있다. The predictor 110 includes an inter predictor for performing inter prediction and an intra predictor for performing intra prediction, as described below. The prediction unit 110 performs prediction on the processing unit of the picture in the picture division unit 105 to generate a prediction block including a prediction sample (or a prediction sample array). The processing unit of the picture in the prediction unit 110 may be a CU, a TU, or a PU. In addition, the prediction unit 110 may determine whether the prediction performed on the processing unit is inter prediction or intra prediction, and determine specific contents (eg, prediction mode, etc.) of each prediction method. In this case, the processing unit in which the prediction is performed and the processing unit in which the details of the prediction method and the prediction method are determined may be different. For example, the method of prediction and the prediction mode may be determined in units of PUs, and the prediction may be performed in units of TUs.
인터 예측을 통해서는 현재 픽처의 이전 픽처 및/또는 이후 픽처 중 적어도 하나의 픽처의 정보를 기초로 예측을 수행하여 예측 블록을 생성할 수 있다. 또한, 인트라 예측을 통해서는 현재 픽처 내의 픽셀 정보를 기초로 예측을 수행하여 예측 블록을 생성할 수 있다. Through inter prediction, a prediction block may be generated by performing prediction based on information of at least one picture of a previous picture and / or a subsequent picture of the current picture. In addition, through intra prediction, a prediction block may be generated by performing prediction based on pixel information in a current picture.
인터 예측의 방법으로서, 스킵(skip) 모드, 머지(merge) 모드, AMVP(Advanced Motion Vector Prediction) 등을 이용할 수 있다. 인터 예측에서는 PU에 대하여, 참조 픽처를 선택하고 PU에 대응하는 참조 블록을 선택할 수 있다. 참조 블록은 정수 픽셀(또는 샘플) 또는 분수 픽셀(또는 샘플) 단위로 선택될 수 있다. 이어서, PU와의 레지듀얼(residual) 신호가 최소화되며 움직임 벡터 크기 역시 최소가 되는 예측 블록이 생성된다.As a method of inter prediction, a skip mode, a merge mode, an advanced motion vector prediction (AMVP), and the like can be used. In inter prediction, a reference picture may be selected for a PU and a reference block corresponding to the PU may be selected. The reference block may be selected in units of integer pixels (or samples) or fractional pixels (or samples). Subsequently, a predictive block is generated in which a residual signal with the PU is minimized and the size of the motion vector is also minimized.
예측 블록은 정수 픽셀 단위로 생성될 수도 있고, 1/2 픽셀 단위 또는 1/4 픽셀 단위와 같이 정수 이하 픽셀 단위로 생성될 수도 있다. 이때, 움직임 벡터 역시 정수 픽셀 이하의 단위로 표현될 수 있다. The prediction block may be generated in integer pixel units, or may be generated in sub-pixel units such as 1/2 pixel unit or 1/4 pixel unit. In this case, the motion vector may also be expressed in units of integer pixels or less.
인터 예측을 통해 선택된 참조 픽처의 인덱스, 움직임 벡터 차분(motion vector difference, MDV), 움직임 벡터 예측자(motion vector predictor, MVP), 레지듀얼 신호 등의 정보는 엔트로피 인코딩되어 디코딩 장치에 전달될 수 있다. 스킵 모드가 적용되는 경우에는 레지듀얼을 예측 블록을 복원 블록으로 할 수 있으므로, 레지듀얼을 생성, 변환, 양자화, 전송하지 않을 수 있다. Information such as an index of a reference picture selected through inter prediction, a motion vector difference (MDV), a motion vector predictor (MVP), a residual signal, and the like may be entropy encoded and transmitted to a decoding apparatus. . When the skip mode is applied, the residual may be used as the reconstructed block, and thus the residual may not be generated, transformed, quantized, or transmitted.
인트라 예측을 수행하는 경우에는, PU 단위로 예측 모드가 정해져서 PU 단위로 예측이 수행될 수 있다. 또한, PU 단위로 예측 모드가 정해지고 TU 단위로 인트라 예측이 수행될 수도 있다. When performing intra prediction, a prediction mode may be determined in units of PUs, and prediction may be performed in units of PUs. In addition, a prediction mode may be determined in units of PUs, and intra prediction may be performed in units of TUs.
인트라 예측에서 예측 모드는 예를 들어 33개의 방향성 예측 모드와 적어도 2개 이상의 비방향성 모드를 가질 수 있다. 비방향성 모드는 DC 예측 모드 및 플래너 모드(Planar 모드)을 포함할 수 있다. 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).
인트라 예측에서는 참조 샘플에 필터를 적용한 후 예측 블록을 생성할 수 있다. 이때, 참조 샘플에 필터를 적용할 것인지는 현재 블록의 인트라 예측 모드 및/또는 사이즈에 따라 결정될 수 있다.In intra prediction, a prediction block may be generated after applying a filter to a reference sample. In this case, whether to apply the filter to the reference sample may be determined according to the intra prediction mode and / or the size of the current block.
생성된 예측 블록과 원본 블록 사이의 레지듀얼 값(레지듀얼 블록 또는 레지듀얼 신호)은 변환부(115)로 입력된다. 또한, 예측을 위해 사용한 예측 모드 정보, 움직임 벡터 정보 등은 레지듀얼 값과 함께 엔트로피 인코딩부(130)에서 인코딩되어 디코딩 장치에 전달된다. The residual value (the residual block or the residual signal) between the generated prediction block and the original block is input to the converter 115. In addition, the prediction mode information, the motion vector information, etc. used for the prediction are encoded by the entropy encoding unit 130 together with the residual value and transmitted to the decoding apparatus.
변환부(115)는 변환 블록 단위로 레지듀얼 블록에 대한 변환을 수행하고 변환 계수를 생성한다. The transform unit 115 performs transform on the residual block in units of transform blocks and generates transform coefficients.
변환 블록은 샘플들의 직사각형 블록으로서 동일한 변환이 적용되는 블록이다. 변환 블록은 변환 유닛(TU)일 수 있으며, 쿼드 트리(quad tree) 구조를 가질 수 있다. The transform block is a rectangular block of samples to which the same transform is applied. The transform block can be a transform unit (TU) and can have a quad tree structure.
변환부(115)는 레지듀얼 블록에 적용된 예측 모드와 블록의 크기에 따라서 변환을 수행할 수 있다. The transformer 115 may perform the transformation according to the prediction mode applied to the residual block and the size of the block.
예컨대, 레지듀얼 블록에 인트라 예측이 적용되었고 블록이 4x4의 레지듀얼 배열(array)이라면, 레지듀얼 블록을 DST(Discrete Sine Transform)를 이용하여 변환하고, 그 외의 경우라면 레지듀얼 블록을 DCT(Discrete Cosine Transform)를 이용하여 변환할 수 있다. For example, if intra prediction is applied to a residual block and the block is a 4x4 residual array, the residual block is transformed using a discrete sine transform (DST), otherwise the residual block is transformed into a DCT (Discrete). Can be transformed using Cosine Transform.
변환부(115)는 변환에 의해 변환 계수들의 변환 블록을 생성할 수 있다. The transform unit 115 may generate a transform block of transform coefficients by the transform.
양자화부(120)는 변환부(115)에서 변환된 레지듀얼 값들, 즉 변환 계수들을 양자화하여 양자화된 변환 계수를 생성할 수 있다. 양자화부(120)에서 산출된 값은 역양자화부(135)와 재정렬부(125)에 제공된다. The quantization unit 120 may generate quantized transform coefficients by quantizing the residual values transformed by the transform unit 115, that is, the transform coefficients. The value calculated by the quantization unit 120 is provided to the inverse quantization unit 135 and the reordering unit 125.
재정렬부(125)는 양자화부(120)로부터 제공된 양자화된 변환 계수를 재정렬한다. 양자화된 변환 계수를 재정렬함으로써 엔트로피 인코딩부(130)에서의 인코딩 효율을 높일 수 있다. The reordering unit 125 rearranges the quantized transform coefficients provided from the quantization unit 120. By rearranging the quantized transform coefficients, the encoding efficiency of the entropy encoding unit 130 may be increased.
재정렬부(125)는 계수 스캐닝(Coefficient Scanning) 방법을 통해 2차원 블록 형태의 양자화된 변환 계수들을 1차원의 벡터 형태로 재정렬할 수 있다. The reordering unit 125 may rearrange the quantized transform coefficients in the form of a 2D block into a 1D vector form through a coefficient scanning method.
엔트로피 인코딩부(130)는 재정렬부(125)에 의해 재정렬된 양자화된 변환 값들 또는 코딩 과정에서 산출된 인코딩 파라미터 값 등을 기초로 심볼(symbol)을 확률 분포에 따라 엔트로피 코딩하여 비트스트림(bitstream)을 출력할 수 있다. 엔트로피 인코딩 방법은 다양한 값을 갖는 심볼을 입력 받아, 통계적 중복성을 제거하면서, 디코딩 가능한 2진수의 열로 표현하는 방법이다.The entropy encoding unit 130 entropy-codes a symbol according to a probability distribution based on the quantized transform values rearranged by the reordering unit 125 or the encoding parameter value calculated in the coding process, thereby performing a bitstream. You can output The entropy encoding method receives a symbol having various values and expresses it as a decodable column while removing statistical redundancy.
여기서, 심볼이란 인코딩/디코딩 대상 구문 요소(syntax element) 및 코딩 파라미터(coding parameter), 레지듀얼 신호(residual signal)의 값 등을 의미한다. 인코딩 파라미터는 인코딩 및 디코딩에 필요한 매개변수로서, 구문 요소와 같이 인코딩 장치에서 인코딩되어 디코딩 장치로 전달되는 정보뿐만 아니라, 인코딩 혹은 디코딩 과정에서 유추될 수 있는 정보를 포함할 수 있으며 영상을 인코딩하거나 디코딩할 때 필요한 정보를 의미한다. 인코딩 파라미터는 예를 들어 인트라/인터 예측모드, 이동/움직임 벡터, 참조 영상 색인, 코딩 블록 패턴, 잔여 신호 유무, 변환 계수, 양자화된 변환 계수, 양자화 파라미터, 블록 크기, 블록 분할 정보 등의 값 또는 통계를 포함할 수 있다. 또한 잔여 신호는 원신호와 예측 신호의 차이를 의미할 수 있고, 또한 원신호와 예측 신호의 차이가 변환(transform)된 형태의 신호 또는 원신호와 예측 신호의 차이가 변환되고 양자화된 형태의 신호를 의미할 수도 있다. 잔여 신호는 블록 단위에서는 잔여 블록이라 할 수 있고, 샘플 단위에서는 잔여 샘플이라고 할 수 있다. Here, the symbol means a syntax element, a coding parameter, a value of a residual signal, etc., to be encoded / decoded. An encoding parameter is a parameter necessary for encoding and decoding, and may include information that may be inferred in the encoding or decoding process as well as information encoded by an encoding device and transmitted to the decoding device, such as a syntax element. It means the information you need when you do. The encoding parameter may be, for example, a value such as an intra / inter prediction mode, a moving / motion vector, a reference image index, a coding block pattern, a residual signal presence, a transform coefficient, a quantized transform coefficient, a quantization parameter, a block size, block partitioning information, or the like. May include statistics. In addition, the residual signal may mean a difference between the original signal and the prediction signal, and a signal in which the difference between the original signal and the prediction signal is transformed or a signal in which the difference between the original signal and the prediction signal is converted and quantized It may mean. The residual signal may be referred to as a residual block in the block unit, and the residual sample in the sample unit.
엔트로피 인코딩이 적용되는 경우, 높은 발생 확률을 갖는 심볼에 적은 수의 비트가 할당되고 낮은 발생 확률을 갖는 심볼에 많은 수의 비트가 할당되어 심볼이 표현됨으로써, 인코딩 대상 심볼들에 대한 비트열의 크기가 감소될 수 있다. 따라서 엔트로피 인코딩을 통해서 영상 인코딩의 압축 성능이 높아질 수 있다.When entropy encoding is applied, a small number of bits are allocated to a symbol having a high probability of occurrence and a large number of bits are allocated to a symbol having a low probability of occurrence, thereby representing the size of the bit string for the symbols to be encoded. Can be reduced. Therefore, the compression performance of video encoding can be increased through entropy encoding.
엔트로피 인코딩을 위해 지수 골룸(exponential golomb), CAVLC(Context-Adaptive Variable Length Coding), CABAC(Context-Adaptive Binary Arithmetic Coding)과 같은 인코딩 방법이 사용될 수 있다. 예를 들어, 엔트로피 인코딩부(130)에는 가변 길이 코딩(VLC: Variable Length Coding/Code) 테이블과 같은 엔트로피 인코딩을 수행하기 위한 테이블이 저장될 수 있고, 엔트로피 인코딩부(130)는 저장된 가변 길이 코딩(VLC) 테이블을 사용하여 엔트로피 인코딩을 수행할 수 있다. 또한 엔트로피 인코딩부(130)는 대상 심볼의 이진화(binarization) 방법 및 대상 심볼/빈(bin)의 확률 모델(probability model)을 도출(derive)한 후, 도출된 이진화 방법 또는 확률 모델을 사용하여 엔트로피 인코딩을 수행할 수도 있다.Encoding methods such as exponential golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC) may be used for entropy encoding. For example, the entropy encoding unit 130 may store a table for performing entropy encoding, such as a variable length coding (VLC) table, and the entropy encoding unit 130 may store the variable length coding. Entropy encoding can be performed using the (VLC) table. In addition, the entropy encoding unit 130 derives the binarization method of the target symbol and the probability model of the target symbol / bin, and then uses the derived binarization method or the probability model to entropy. You can also perform encoding.
또한, 엔트로피 인코딩부(130)는 필요한 경우에, 전송하는 파라미터 셋(parameter set) 또는 신택스에 일정한 변경을 가할 수도 있다. In addition, if necessary, the entropy encoding unit 130 may apply a constant change to a parameter set or syntax to be transmitted.
역양자화부(135)는 양자화부(120)에서 양자화된 값(양자화된 변환 계수)들을 역양자화하고, 역변환부(140)는 역양자화부(135)에서 역양자화된 값들을 역변환한다. The inverse quantizer 135 inversely quantizes the quantized values (quantized transform coefficients) in the quantizer 120, and the inverse transformer 140 inversely transforms the inverse quantized values in the inverse quantizer 135.
역양자화부(135) 및 역변환부(140)에서 생성된 레지듀얼 값(또는 레지듀얼 샘플 또는 레지듀얼 샘플 어레이)과 예측부(110)에서 예측된 예측 블록이 합쳐져 복원 샘플(또는 복원 샘플 어레이)를 포함하는 복원 블록(Reconstructed Block)이 생성될 수 있다. The residual value (or the residual sample or the residual sample array) generated by the inverse quantizer 135 and the inverse transform unit 140 and the prediction block predicted by the predictor 110 are added together to reconstruct the sample (or the reconstructed sample array). A reconstructed block including a may be generated.
도 1에서는 가산기를 통해서, 레지듀얼 블록과 예측 블록이 합쳐져 복원 블록이 생성되는 것으로 설명하고 있다. 이때, 가산기를 복원 블록을 생성하는 별도의 유닛(복원 블록 생성부)로 볼 수도 있다. In FIG. 1, it is described that a reconstructed block is generated by adding a residual block and a prediction block through an adder. In this case, the adder may be viewed as a separate unit (restore block generation unit) for generating a reconstruction block.
필터부(145)는 디블록킹 필터, ALF(Adaptive Loop Filter), SAO(Sample Adaptive Offset)를 복원된 픽처에 적용할 수 있다. The filter unit 145 may apply a deblocking filter, an adaptive loop filter (ALF), and a sample adaptive offset (SAO) to the reconstructed picture.
디블록킹 필터는 복원된 픽처에서 블록 간의 경계에 생긴 왜곡을 제거할 수 있다. ALF(Adaptive Loop Filter)는 디블록킹 필터를 통해 블록이 필터링된 후 복원된 영상과 원래의 영상을 비교한 값을 기초로 필터링을 수행할 수 있다. ALF는 고효율을 적용하는 경우에만 수행될 수도 있다. SAO는 디블록킹 필터가 적용된 레지듀얼 블록에 대하여, 픽셀 단위로 원본 영상과의 오프셋 차이를 복원하며, 밴드 오프셋(Band Offset), 엣지 오프셋(Edge Offset) 등의 형태로 적용된다. The deblocking filter may remove distortion generated at the boundary between blocks in the reconstructed picture. The adaptive loop filter (ALF) may perform filtering based on a value obtained by comparing the reconstructed image with the original image after the block is filtered through the deblocking filter. ALF may be performed only when high efficiency is applied. The SAO restores the offset difference from the original image on a pixel-by-pixel basis for the residual block to which the deblocking filter is applied, and is applied in the form of a band offset and an edge offset.
한편, 인터 예측에 사용되는 복원 블록에 대해서 필터부(145)는 필터링을 적용하지 않을 수도 있다. Meanwhile, the filter unit 145 may not apply filtering to the reconstructed block used for inter prediction.
메모리(150)는 필터부(145)를 통해 산출된 복원 블록 또는 픽처를 저장할 수 있다. 메모리(150)에 저장된 복원 블록 또는 픽처는 인터 예측을 수행하는 예측부(110)에 제공될 수 있다. The memory 150 may store the reconstructed block or the picture calculated by the filter unit 145. The reconstructed block or picture stored in the memory 150 may be provided to the predictor 110 that performs inter prediction.
도 2는 본 발명의 일 실시예에 따른 비디오 디코딩 장치를 개략적으로 나타낸 블록도이다. 도 2를 참조하면, 비디오 디코딩 장치(200)는 엔트로피 디코딩부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230), 필터부(235) 메모리(240)를 포함할 수 있다. 2 is a block diagram schematically illustrating a video decoding apparatus according to an embodiment of the present invention. Referring to FIG. 2, the video decoding apparatus 200 includes an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, and a filter unit 235. Memory 240 may be included.
비디오 인코딩 장치에서 영상 비트스트림이 입력된 경우, 입력된 비트스트림은 비디오 인코딩 장치에서 영상 정보가 처리된 절차에 따라서 디코딩될 수 있다.When an image bitstream is input in the video encoding apparatus, the input bitstream may be decoded according to a procedure in which image information is processed in the video encoding apparatus.
엔트로피 디코딩부(210)는, 입력된 비트스트림을 확률 분포에 따라 엔트로피 디코딩하여, 양자화된 계수(quantized coefficient) 형태의 심볼을 포함한 심볼들을 생성할 수 있다. 엔트로피 디코딩 방법은 2진수의 열을 입력 받아 각 심볼들을 생성하는 방법이다. 엔트로피 디코딩 방법은 상술한 엔트로피 인코딩 방법과 유사하다.The entropy decoding unit 210 may entropy decode the input bitstream according to a probability distribution to generate symbols including symbols in the form of quantized coefficients. The entropy decoding method is a method of generating each symbol by receiving a binary string. The entropy decoding method is similar to the entropy encoding method described above.
예컨대, 비디오 인코딩 장치에서 엔트로피 인코딩을 수행하기 위해 CAVLC 등의 가변 길이 코딩(Variable Length Coding: VLC, 이하 'VLC' 라 함)가 사용된 경우에, 엔트로피 디코딩부(210)도 인코딩 장치에서 사용한 VLC 테이블과 동일한 VLC 테이블로 구현하여 엔트로피 디코딩을 수행할 수 있다. 또한, 비디오 인코딩 장치에서 엔트로피 인코딩을 수행하기 위해 CABAC을 이용한 경우에, 엔트로피 디코딩부(210)는 이에 대응하여 CABAC을 이용한 엔트로피 디코딩을 수행할 수 있다.For example, when variable length coding (VLC, hereinafter called 'VLC') is used to perform entropy encoding in the video encoding apparatus, the entropy decoding unit 210 also uses the VLC. Entropy decoding may be performed by implementing the same VLC table as the table. In addition, when CABAC is used to perform entropy encoding in the video encoding apparatus, the entropy decoding unit 210 may correspondingly perform entropy decoding using CABAC.
보다 상세하게, CABAC 엔트로피 디코딩 방법은, 비트스트림에서 각 구문 요소에 해당하는 빈을 수신하고, 디코딩 대상 구문 요소 정보와 주변 및 디코딩 대상 블록의 디코딩 정보 혹은 이전 단계에서 디코딩된 심볼/빈의 정보를 이용하여 문맥(context) 모델을 결정하고, 결정된 문맥 모델에 따라 빈(bin)의 발생 확률을 예측하여 빈의 산술 디코딩(arithmetic decoding)를 수행하여 각 구문 요소의 값에 해당하는 심볼을 생성할 수 있다. 이때, CABAC 엔트로피 디코딩 방법은 문맥 모델 결정 후 다음 심볼/빈의 문맥 모델을 위해 디코딩된 심볼/빈의 정보를 이용하여 문맥 모델을 업데이트할 수 있다.More specifically, 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. In this case, 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.
엔트로피 디코딩부(210)에서 디코딩된 정보 중 예측 블록을 생성하기 위한 정보는 예측부(230)로 제공되고, 엔트로피 디코딩부(210)에서 엔트로피 디코딩이 수행된 레지듀얼 값, 즉 양자화된 변환 계수는 재정렬부(215)로 입력될 수 있다. Information for generating the prediction block among the information decoded by the entropy decoding unit 210 is provided to the predictor 230, and a residual value where entropy decoding is performed by the entropy decoding unit 210, that is, a quantized transform coefficient It may be input to the reordering unit 215.
재정렬부(215)는 엔트로피 디코딩부(210)에서 엔트로피 디코딩된 비트스트림의 정보, 즉 양자화된 변환 계수를 인코딩 장치에서 재정렬한 방법을 기초로 재정렬할 수 있다. The reordering unit 215 may reorder the information of the bitstream entropy decoded by the entropy decoding unit 210, that is, the quantized transform coefficients, based on the reordering method in the encoding apparatus.
재정렬부(215)는 1차원 벡터 형태로 표현된 계수들을 다시 2차원의 블록 형태의 계수로 복원하여 재정렬할 수 있다. 재정렬부(215)는 현재 블록(변환 블록)에 적용된 예측 모드와 변환 블록의 크기를 기반으로 계수에 대한 스캐닝을 수행하여 2 차원 블록 형태의 계수(양자화된 변환 계수) 배열(array)을 생성할 수 있다. The reordering unit 215 may reorder the coefficients expressed in the form of a one-dimensional vector by restoring the coefficients in the form of a two-dimensional block. The reordering unit 215 scans the coefficients based on the prediction mode applied to the current block (transform block) and the size of the transform block to generate an array of coefficients (quantized transform coefficients) in the form of a two-dimensional block. Can be.
역양자화부(220)는 인코딩 장치에서 제공된 양자화 파라미터와 재정렬된 블록의 계수값을 기초로 역양자화를 수행할 수 있다. The inverse quantization unit 220 may perform inverse quantization based on the quantization parameter provided by the encoding apparatus and the coefficient values of the rearranged block.
역변환부(225)는 비디오 인코딩 장치에서 수행된 양자화 결과에 대해, 인코딩 장치의 변환부가 수행한 DCT 및 DST에 대해 역DCT 및/또는 역DST를 수행할 수 있다. The inverse transform unit 225 may perform inverse DCT and / or inverse DST on the DCT and the DST performed by the transform unit of the encoding apparatus with respect to the quantization result performed by the video encoding apparatus.
역변환은 인코딩 장치에서 결정된 전송 단위 또는 영상의 분할 단위를 기초로 수행될 수 있다. 인코딩 장치의 변환부에서 DCT 및/또는 DST는 예측 방법, 현재 블록의 크기 및 예측 방향 등 복수의 정보에 따라 선택적으로 수행될 수 있고, 디코딩 장치의 역변환부(225)는 인코딩 장치의 변환부에서 수행된 변환 정보를 기초로 역변환을 수행할 수 있다. The inverse transformation may be performed based on a transmission unit determined by the encoding apparatus or a division unit of an image. The DCT and / or DST in the encoding unit of the encoding apparatus may be selectively performed according to a plurality of pieces of information, such as a prediction method, a size and a prediction direction of the current block, and the inverse transform unit 225 of the decoding apparatus is configured in the transformation unit of the encoding apparatus. Inverse transformation may be performed based on the performed transformation information.
예측부(230)는 엔트로피 디코딩부(210)에서 제공된 예측 블록 생성 관련 정보와 메모리(240)에서 제공된 이전에 디코딩된 블록 및/또는 픽처 정보를 기초로 예측 샘플(또는 예측 샘플 어레이)를 포함하는 예측 블록을 생성할 수 있다. The prediction unit 230 may include prediction samples (or prediction sample arrays) based on prediction block generation related information provided by the entropy decoding unit 210 and previously decoded block and / or picture information provided by the memory 240. A prediction block can be generated.
현재 PU에 대한 예측 모드가 인트라 예측(intra prediction) 모드인 경우에, 현재 픽처 내의 픽셀 정보를 기초로 예측 블록을 생성하는 인트라 예측을 수행할 수 있다.When the prediction mode for the current PU is an intra prediction mode, intra prediction for generating a prediction block based on pixel information in the current picture may be performed.
현재 PU에 대한 예측 모드가 인터 예측(inter prediction) 모드인 경우에, 현재 픽처의 이전 픽처 또는 이후 픽처 중 적어도 하나의 픽처에 포함된 정보를 기초로 현재 PU에 대한 인터 예측을 수행할 수 있다. 이때, 비디오 인코딩 장치에서 제공된 현재 PU의 인터 예측에 필요한 움직임 정보, 예컨대 움직임 벡터, 참조 픽처 인덱스 등에 관한 정보는 인코딩 장치로부터 수신한 스킵 플래그, 머지 플래그 등을 확인하고 이에 대응하여 유도될 수 있다. When the prediction mode for the current PU is an inter prediction mode, inter prediction on the current PU may be performed based on information included in at least one of a previous picture or a subsequent picture of the current picture. In this case, motion information required for inter prediction of the current PU provided by the video encoding apparatus, for example, a motion vector, a reference picture index, and the like, may be derived by checking a skip flag, a merge flag, and the like received from the encoding apparatus.
현재 픽처에 대한 인터 예측 시, 현재 블록과의 레지듀얼(residual) 신호가 최소화되며 움직임 벡터 크기 역시 최소가 되도록 예측 블록을 생성할 수 있다.In inter prediction on a current picture, a prediction block may be generated such that a residual signal with a current block is minimized and a motion vector size is also minimized.
한편, 움직임 정보 도출 방식은 현재 블록의 예측 모드에 따라 달라질 수 있다. 인터 예측을 위해 적용되는 예측 모드에는 AMVP(Advanced Motion Vector Prediction) 모드, 머지(merge) 모드 등이 있을 수 있다.Meanwhile, the motion information derivation scheme may vary depending on the prediction mode of the current block. Prediction modes applied for inter prediction may include an advanced motion vector prediction (AMVP) mode, a merge mode, and the like.
일 예로, 머지 모드가 적용되는 경우, 인코딩 장치 및 디코딩 장치는 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터를 이용하여, 머지 후보 리스트를 생성할 수 있다. 머지 모드에서는 머지 후보 리스트에서 선택된 후보 블록의 움직임 벡터가 현재 블록의 움직임 벡터로 사용된다. 인코딩 장치는 상기 머지 후보 리스트에 포함된 후보 블록들 중에서 선택된 최적의 움직임 벡터를 갖는 후보 블록을 지시하는 머지 인덱스를 디코딩 장치로 전송할 수 있다. 이 때, 디코딩 장치는 상기 머지 인덱스를 이용하여, 현재 블록의 움직임 벡터를 도출할 수 있다.For example, when the merge mode is applied, the encoding apparatus and the decoding apparatus may generate a merge candidate list by using the motion vector of the reconstructed spatial neighboring block and / or the motion vector corresponding to the Col block, which is a temporal neighboring block. . In the merge mode, the motion vector of the candidate block selected from the merge candidate list is used as the motion vector of the current block. The encoding apparatus may transmit, to the decoding apparatus, a merge index indicating a candidate block having an optimal motion vector selected from candidate blocks included in the merge candidate list. In this case, the decoding apparatus may derive the motion vector of the current block by using the merge index.
다른 예로, AMVP(Advanced Motion Vector Prediction) 모드가 적용되는 경우, 인코딩 장치 및 디코딩 장치는 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터를 이용하여, 움직임 벡터 예측자 후보 리스트를 생성할 수 있다. 즉, 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터는 움직임 벡터 후보로 사용될 수 있다. 인코딩 장치는 상기 리스트에 포함된 움직임 벡터 후보 중에서 선택된 최적의 움직임 벡터를 지시하는 예측 움직임 벡터 인덱스를 디코딩 장치로 전송할 수 있다. 이 때, 디코딩 장치는 상기 움직임 벡터 인덱스를 이용하여, 움직임 정보 후보 리스트에 포함된 움직임 벡터 후보 중에서, 현재 블록의 예측 움직임 벡터를 선택할 수 있다.As another example, when the Advanced Motion Vector Prediction (AMVP) mode is applied, the encoding device and the decoding device use a motion vector corresponding to a motion vector of a reconstructed spatial neighboring block and / or a Col block, which is a temporal neighboring block, and a motion vector. A predictor candidate list may be generated. That is, the motion vector of the reconstructed spatial neighboring block and / or the Col vector, which is a temporal neighboring block, may be used as a motion vector candidate. The encoding apparatus may transmit the predicted motion vector index indicating the optimal motion vector selected from the motion vector candidates included in the list to the decoding apparatus. In this case, the decoding apparatus may select the predicted motion vector of the current block among the motion vector candidates included in the motion information candidate list using the motion vector index.
인코딩 장치는 현재 블록의 움직임 벡터(MV)와 움직임 벡터 예측자(MVP) 간의 움직임 벡터 차분(MVD)을 구할 수 있고, 이를 인코딩하여 디코딩 장치로 전송할 수 있다. 즉, MVD는 현재 블록의 MV에서 MVP를 뺀 값으로 구해질 수 있다. 이 때, 디코딩 장치는 수신된 움직임 벡터 차분을 디코딩할 수 있고, 디코딩된 움직임 벡터 차분과 움직임 벡터 예측자의 가산을 통해 현재 블록의 움직임 벡터를 도출할 수 있다.The encoding apparatus may obtain a motion vector difference MVD between the motion vector MV of the current block and the motion vector predictor MVP, and may encode the same and transmit the encoded motion vector to the decoding device. That is, MVD may be obtained by subtracting MVP from MV of the current block. In this case, the decoding apparatus may decode the received motion vector difference and derive the motion vector of the current block through the addition of the decoded motion vector difference and the motion vector predictor.
인코딩 장치는 또한 참조 픽처를 지시하는 참조 픽처 인덱스 등을 디코딩 장치에 전송할 수 있다. The encoding apparatus may also transmit a reference picture index or the like indicating the reference picture to the decoding apparatus.
디코딩 장치는 주변 블록의 움직임 정보들을 이용하여 현재 블록의 움직임 벡터를 예측하고, 인코딩 장치로부터 수신한 레지듀얼을 이용하여 현재 블록에 대한 움직임 벡터를 유도할 수 있다. 디코딩 장치는 유도한 움직임 벡터와 인코딩 장치로부터 수신한 참조 픽처 인덱스 정보를 기반으로 현재 블록에 대한 예측 블록을 생성할 수 있다.The decoding apparatus may predict the motion vector of the current block using the motion information of the neighboring block, and may derive the motion vector for the current block using the residual received from the encoding apparatus. The decoding apparatus may generate a prediction block for the current block based on the derived motion vector and the reference picture index information received from the encoding apparatus.
다른 예로, 머지(merge) 모드가 적용되는 경우, 인코딩 장치 및 디코딩 장치는 복원된 주변 블록의 움직임 정보 및/또는 콜 블록의 움직임 정보를 이용하여, 머지 후보 리스트를 생성할 수 있다. 즉, 인코딩 장치 및 디코딩 장치는 복원된 주변 블록 및/또는 콜 블록의 움직임 정보가 존재하는 경우, 이를 현재 블록에 대한 머지 후보로 사용할 수 있다. As another example, when the merge mode is applied, the encoding apparatus and the decoding apparatus may generate the merge candidate list using the motion information of the reconstructed neighboring block and / or the motion information of the call block. That is, the encoding apparatus and the decoding apparatus may use this as a merge candidate for the current block when there is motion information of the reconstructed neighboring block and / or the call block.
인코딩 장치는 머지 후보 리스트에 포함된 머지 후보 중에서 최적의 인코딩 효율을 제공할 수 있는 머지 후보를 현재 블록에 대한 움직임 정보로 선택할 수 있다. 이 때, 상기 선택된 머지 후보를 지시하는 머지 인덱스가 비트스트림에 포함되어 디코딩 장치로 전송될 수 있다. 디코딩 장치는 상기 전송된 머지 인덱스를 이용하여, 머지 후보 리스트에 포함된 머지 후보 중에서 하나를 선택할 수 있으며, 상기 선택된 머지 후보를 현재 블록의 움직임 정보로 결정할 수 있다. 따라서, 머지 모드가 적용되는 경우, 복원된 주변 블록 및/또는 콜 블록에 대응하는 움직임 정보가 현재 블록의 움직임 정보로 그대로 사용될 수 있다. 디코딩 장치는 예측 블록과 인코딩 장치로부터 전송되는 레지듀얼을 더하여 현재 블록을 복원할 수 있다.The encoding apparatus may select a merge candidate capable of providing an optimal encoding efficiency among the merge candidates included in the merge candidate list as motion information for the current block. In this case, a merge index indicating the selected merge candidate may be included in the bitstream and transmitted to the decoding apparatus. The decoding apparatus may select one of the merge candidates included in the merge candidate list by using the transmitted merge index, and determine the selected merge candidate as motion information of the current block. Therefore, when the merge mode is applied, motion information corresponding to the reconstructed neighboring block and / or the call block may be used as the motion information of the current block. The decoding apparatus may reconstruct the current block by adding the prediction block and the residual transmitted from the encoding apparatus.
상술한 AMVP 및 머지 모드에서는, 현재 블록의 움직임 정보를 도출하기 위해, 복원된 주변 블록의 움직임 정보 및/또는 콜 블록의 움직임 정보가 사용될 수 있다.In the above-described AMVP and merge mode, the motion information of the reconstructed neighboring block and / or the motion information of the call block may be used to derive the motion information of the current block.
화면 간 예측에 이용되는 다른 모드 중 하나인 스킵 모드의 경우에, 주변 블록의 정보를 그대로 현재 블록에 이용할 수 있다. 따라서 스킵 모드의 경우에, 인코딩 장치는 현재 블록의 움직임 정보로서 어떤 블록의 움직임 정보를 이용할 것인지를 지시하는 정보 외에 레지듀얼 등과 같은 신택스 정보를 디코딩 장치에 전송하지 않는다. In the case of a skip mode, which is one of other modes used for inter prediction, information of neighboring blocks may be used in the current block as it is. Therefore, in the skip mode, the encoding apparatus does not transmit syntax information such as residual to the decoding apparatus other than information indicating which block motion information to use as the motion information of the current block.
인코딩 장치 및 디코딩 장치는 상기 도출된 움직임 정보에 기반하여 현재 블록에 대한 움직임 보상을 수행함으로써, 현재 블록의 예측 블록을 생성할 수 있다. 여기서, 예측 블록은 현재 블록에 대한 움직임 보상 수행 결과 생성된, 움직임 보상된 블록을 의미할 수 있다. 또한, 복수의 움직임 보상된 블록은 하나의 움직임 보상된 영상을 구성할 수 있다.The encoding apparatus and the decoding apparatus may generate the prediction block of the current block by performing motion compensation on the current block based on the derived motion information. Here, the prediction block may mean a motion compensated block generated as a result of performing motion compensation on the current block. Also, the plurality of motion compensated blocks may constitute one motion compensated image.
복원 블록은 예측부(230)에서 생성된 예측 블록과 역변환부(225)에서 제공된 레지듀얼 블록을 이용해 생성될 수 있다. 도 2에서는 가산기에서 예측 블록과 레지듀얼 블록이 합쳐져 복원 블록이 생성되는 것으로 설명하고 있다. 이때, 가산기를 복원 블록을 생성하는 별도의 유닛(복원 블록 생성부)로 볼 수 있다. 여기서 상기 복원 블록은 상술한 바와 같이 복원 샘플(또는 복원 샘플 어레이)를 포함하고, 상기 예측 블록은 예측 샘플(또는 예측 샘플 어레이)를 포함하고, 상기 레지듀얼 블록은 레지듀얼 샘플(또는 레지듀얼 샘플 어레이)를 포함할 수 있다. 따라서, 복원 샘플(또는 복원 샘플 어레이)은 대응하는 예측 샘플(또는 예측 샘플 어레이)과 레지듀얼 샘플(레지듀얼 샘플 어레이)이 합쳐서 생성된다고 표현될 수도 있다.The reconstruction block may be generated using the prediction block generated by the predictor 230 and the residual block provided by the inverse transform unit 225. In FIG. 2, it is described that the reconstructed block is generated by combining the prediction block and the residual block in the adder. In this case, the adder may be viewed as a separate unit (restore block generation unit) for generating a reconstruction block. Here, the reconstruction block includes a reconstruction sample (or reconstruction sample array) as described above, the prediction block includes a prediction sample (or a prediction sample array), and the residual block is a residual sample (or a residual sample). Array). Thus, a reconstructed sample (or reconstructed sample array) may be expressed as the sum of the corresponding predictive sample (or predictive sample array) and the residual sample (residual sample array).
스킵 모드가 적용되는 블록에 대하여는 레지듀얼이 전송되지 않으며 예측 블록을 복원 블록으로 할 수 있다.The residual is not transmitted for the block to which the skip mode is applied, and the prediction block may be a reconstruction block.
복원된 블록 및/또는 픽처는 필터부(235)로 제공될 수 있다. 필터부(235)는 복원된 블록 및/또는 픽처에 디블록킹 필터링, SAO(Sample Adaptive Offset) 및/또는 ALF 등을 적용할 수 있다. The reconstructed block and / or picture may be provided to the filter unit 235. The filter unit 235 may apply deblocking filtering, sample adaptive offset (SAO), and / or ALF to the reconstructed block and / or picture.
메모리(240)는 복원된 픽처 또는 블록을 저장하여 참조 픽처 또는 참조 블록으로 사용할 수 있도록 할 수 있고 또한 복원된 픽처를 출력부로 제공할 수 있다.The memory 240 may store the reconstructed picture or block to use as a reference picture or reference block and provide the reconstructed picture to the output unit.
디코딩 장치(200)에 포함되어 있는 엔트로피 디코딩부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230), 필터부(235) 및 메모리(240) 중 영상의 디코딩에 직접적으로 관련된 구성요소들, 예컨대, 엔트로피 디코딩부(210), 재정렬부(215), 역양자화부(220), 역변환부(225), 예측부(230), 필터부(235) 등을 다른 구성요소와 구분하여 디코더 또는 디코딩부로 표현할 수 있다. Entropy decoding unit 210, reordering unit 215, inverse quantization unit 220, inverse transform unit 225, predictor 230, filter unit 235, and memory 240 included in the decoding device 200. ) Components directly related to the decoding of an image, for example, an entropy decoding unit 210, a reordering unit 215, an inverse quantization unit 220, an inverse transform unit 225, a prediction unit 230, and a filter unit ( 235) and the like may be distinguished from other components by a decoder or a decoder.
또한, 디코딩 장치(200)는 비트스트림에 포함되어 있는 인코딩된 영상에 관련된 정보를 파싱(parsing)하는 도시되지 않은 파싱부를 더 포함할 수 있다. 파싱부는 엔트로피 디코딩부(210)를 포함할 수도 있고, 엔트로피 디코딩부(210)에 포함될 수도 있다. 이러한 파싱부는 또한 디코딩부의 하나의 구성요소로 구현될 수도 있다.In addition, the decoding apparatus 200 may further include a parsing unit (not shown) for parsing information related to the encoded image included in the bitstream. The parsing unit may include the entropy decoding unit 210 or may be included in the entropy decoding unit 210. Such a parser may also be implemented as one component of the decoder.
상술한 내용과 같이 영상의 압축 코딩 과정은 블록 단위로 이루어 지는바, 복원된 픽처에서 블록 간의 경계에 왜곡이 발생할 수 있다. 인코딩 및 디코딩 시 발생하는 블록 간의 경계 영역에서 증가하는 에러를 줄이기 위하여, 예측 대상 블록의 복원 샘플의 생성이 완료된 이후에 이미 디코딩된 상기 예측 대상 블록의 주변 블록에 대한 필터링을 수행하여 상기 주변 블록에 대한 품질을 향상시킬 수 있다.As described above, since the compression coding process of the image is performed in units of blocks, distortion may occur at boundaries between blocks in the reconstructed picture. In order to reduce an error that increases in the boundary region between blocks generated during encoding and decoding, after the generation of the reconstructed sample of the predicted block is completed, the neighboring block of the predicted block that has already been decoded is filtered to the neighboring block. Can improve the quality.
일반적으로 영상 압축은 영상을 특정한 블록 단위(예를 들어 coding tree unit, CTU)로 분할할 수 있고, 블록을 영상의 좌측 상단에서부터 순차적인 순서로 하나의 블록씩 인코딩 및 디코딩할 수 있다. 상기 순서는 래스터 스캔 오더(raster scan order)일 수 있다. 또한, 영상 압축에서는 공간적 및 시간적 중복성을 제거하기 위하여, 상기 예측 대상 블록의 주변 블록들 중 이미 인코딩 및 디코딩이 끝난 주변 블록의 정보를 참조하여 상기 예측 대상 블록을 인코딩 및 디코딩할 수 있다.In general, image compression may divide an image into specific block units (eg, coding tree units, CTUs), and encode and decode blocks by one block in a sequential order from the upper left of the image. The order may be a raster scan order. In addition, in image compression, in order to remove spatial and temporal redundancy, the prediction target block may be encoded and decoded by referring to information of neighboring blocks that have been encoded and decoded among neighboring blocks of the prediction target block.
도 3은 영상 인코딩/디코딩에서 사용하는 예측 대상 블록에서 사용 가능한 주변 블록의 위치를 나타낸다. 도 3을 참조하면, 사용 가능한 주변 블록의 위치는 좌측(left) 주변 블록, 상측(above) 주변 블록, 좌상측(left-above) 주변 블록 또는 우상측(right-above) 주변 블록일 수 있다. 3 illustrates positions of neighboring blocks usable in a prediction target block used in image encoding / decoding. Referring to FIG. 3, a usable peripheral block may be a left peripheral block, an upper peripheral block, a left-above peripheral block, or a right-above peripheral block.
하지만, 상기 예측 대상 블록의 정보도 이미 디코딩된 주변 블록들의 비주얼 품질 향상에 사용될 수 있다. 본 발명에서는 상기 예측 대상 블록의 움직임 정보를 기반으로 상기 주변 블록의 화질을 향상시키는 방법을 제공한다.However, the information of the prediction target block may also be used to improve visual quality of neighboring blocks that are already decoded. The present invention provides a method for improving the quality of the neighboring block based on the motion information of the prediction target block.
영상을 퀴드 트리(quad-tree) 형태 또는 균등 분할 방식을 기반으로 블록을 분할하여 인코딩 및 디코딩 할 때, 블록의 경계에 위치한 샘플(또는 화소)들은 상대적으로 큰 양자화 오차를 가질 수 있고, 블록간의 블록킹(blocking) 열화가 발생할 수 있다. 상기 예측 대상 블록의 움직임 벡터를 기반으로 상기 주변 블록의 경계에 위치한 샘플에 필터링을 적용하면 상기 주변 블록의 경계에 위치한 샘플의 에러를 줄일 수 있다. 본 발명이 제공하는 발명에 따르면 상기 예측 대상 블록의 움직임 벡터를 기반으로 상기 주변 블록의 경계에 위치한 샘플의 예측 샘플을 도출할 수 있고, 상기 예측 샘플 값과 상기 주변 블록의 경계에 위치한 샘플의 값과의 가중합(weight sum)을 통하여 필터링을 수행할 수 있다.When the image is divided and encoded and decoded on the basis of a quad-tree or an equal division scheme, samples (or pixels) located at the boundary of the block may have a relatively large quantization error. Blocking degradation may occur. By applying filtering to a sample located at the boundary of the neighboring block based on the motion vector of the prediction target block, an error of the sample located at the boundary of the neighboring block can be reduced. According to the present invention, a prediction sample of a sample located at the boundary of the neighboring block may be derived based on the motion vector of the prediction target block, and the value of the sample located at the boundary of the prediction sample and the neighboring block is determined. Filtering may be performed through a weight sum of.
도 4는 예측 대상 블록의 움직임 벡터를 이용한 주변 블록의 필터링의 일 예를 예시적으로 나타낸다. 도 4를 참조하면 상기 예측 대상 블록의 움직임 벡터를 기반으로 필터링 대상 영역을 결정하고, 상기 필터링 대상 영역에 필터링을 수행할 수 있다. 상기 필터링 대상 영역은 상술한 주변 블록들 중 적어도 하나의 경계에 위치한 샘플들을 포함할 수 있다.4 illustrates an example of filtering a neighboring block using a motion vector of a prediction target block. Referring to FIG. 4, a filtering target region may be determined based on a motion vector of the prediction target block, and filtering may be performed on the filtering target region. The filtering subject region may include samples located at a boundary of at least one of the above-described neighboring blocks.
도 5는 예측 대상 블록의 움직임 벡터를 기반으로 주변 블록에 필터링을 수행하는 과정의 일 예를 예시적으로 나타낸다. 5 illustrates an example of a process of filtering a neighboring block based on a motion vector of a prediction target block.
도 5를 참조하면 본 발명에 따른 인코딩 장치 및 디코딩 장치는 필터링 대상 블록 결정부(500), 필터링 대상 영역 결정부(510), 필터 파라미터 도출부(520) 및 필터링 수행부(530)를 통하여 상기 주변 블록에 필터링을 수행할 수 있다. Referring to FIG. 5, the encoding apparatus and the decoding apparatus according to the present invention are provided through the filtering target block determining unit 500, the filtering target region determining unit 510, the filter parameter deriving unit 520, and the filtering execution unit 530. Filtering can be performed on neighboring blocks.
상기 필터링 대상 블록 결정부(500)는 상기 예측 대상 블록에 인접한 주변 블록들 중 필터링을 수행할 필터링 대상 블록을 도출할 수 있다. 상기 필터링 대상 블록의 사이즈는 상기 예측 대상 블록의 사이즈와 동일할 수 있고, 다를 수도 있다. 또한, 상기 필터링 대상 블록은 상기 예측 대상 블록의 움직임 벡터를 이용하여 도출할 수 있다. 상기 필터링 대상 영역 결정부(510)는 상기 필터링 대상 블록 내 필터링 수행될 예측 대상 블록과 인접한 경계 영역을 도출할 수 있다. 상기 필터링 대상 영역은 상기 필터링 대상 블록의 크기에 따라서 가변적으로 결정될 수 있다. 상기 필터링 파라미터 도출부(520)는 상기 필터링 대상 영역의 필터링 수행 여부 및 필터링에 사용되는 가중치(weight) 값을 도출할 수 있다. 상기 필터링 수행부(530)은 상기 필터링 대상 블록 결정부(500)에 의해서 결정된 블록에 대해서 상기 필터링 대상 영역 결정부(510)가 결정한 영역에 대해서 상기 필터 파라미터 도출부(520)에 의해서 도출된 필터링 적용 유무 및 필터 파라미터를 사용하여 필터링을 적용할 수 있다. 상기 필터링 대상 블록 결정부(500), 상기 필터링 대상 영역 결정부(510), 상기 필터 파라미터 도출부(520), 및 상기 필터링 수행부(530)는 필터부에 포함될 수 있으며, 프로세서에 의하여 구현될 수 있다.The filtering target block determiner 500 may derive a filtering target block to perform filtering among neighboring blocks adjacent to the prediction target block. The size of the filtering target block may be the same as or different from the size of the prediction target block. The filtering object block may be derived using a motion vector of the prediction object block. The filtering target region determiner 510 may derive a boundary region adjacent to the prediction target block to be filtered in the filtering target block. The filtering target region may be variably determined according to the size of the filtering target block. The filtering parameter derivation unit 520 may derive whether to perform filtering on the filtering target region and a weight value used for filtering. The filtering performing unit 530 may perform the filtering derived by the filter parameter deriving unit 520 on a region determined by the filtering target region determining unit 510 with respect to the block determined by the filtering target block determining unit 500. Filtering can be applied using the presence and absence of filter parameters. The filtering target block determining unit 500, the filtering target region determining unit 510, the filter parameter deriving unit 520, and the filtering performing unit 530 may be included in a filter unit, and may be implemented by a processor. Can be.
상기 필터링 대상 블록 결정부(500)는 상기 예측 대상 블록에 인접한 주변 블록들 중 필터링을 수행할 주변 블록을 도출할 수 있다. 상기 필터링 대상 블록으로 도출되는 조건은 다음과 같을 수 있다.The filtering target block determiner 500 may derive a neighboring block to perform filtering among neighboring blocks adjacent to the prediction target block. Conditions derived to the filtering target block may be as follows.
상기 필터링 대상 블록은 상기 예측 대상 블록의 인접한 주변 블록들 중 좌측 주변 블록, 상측 주변 블록, 및 상기 좌상측 주변 블록 중 하나일 수 있다. 또한, 상기 필터링 대상 블록의 움직임 정보는 상기 예측 대상 블록의 움직임 정보와 다를 수 있다. 상기 움직임 정보는 움직임 벡터와 상기 움직임 벡터에 관련한 참조 픽처 인덱스를 포함할 수 있다.The filtering target block may be one of a left neighboring block, an upper neighboring block, and the upper left neighboring block among adjacent neighboring blocks of the prediction object block. In addition, the motion information of the filtering target block may be different from the motion information of the prediction target block. The motion information may include a motion vector and a reference picture index associated with the motion vector.
비록 도 5에서 상기 필터링 대상 블록 결정부(500), 상기 필터링 대상 영역 결정부(510), 상기 필터 파라미터 도출부(520) 및 상기 필터링 수행부(530)를 구분하여 도시하고 있으나 이는 기능에 따라 예시적으로 구분된 것이며, 상기 필터링 대상 블록 결정부(500), 상기 필터링 대상 영역 결정부(510), 상기 필터 파라미터 도출부(520) 및 상기 필터링 수행부(530)는 필터부에 포함될 수도 있다. 즉, 하나의 필터부에서 상기 기능들을 모두 수행할 수도 있다.Although FIG. 5 illustrates the filtering target block determining unit 500, the filtering target region determining unit 510, the filter parameter deriving unit 520, and the filtering performing unit 530 separately according to functions. For example, the filtering target block determining unit 500, the filtering target region determining unit 510, the filter parameter deriving unit 520, and the filtering performing unit 530 may be included in a filter unit. . That is, all of the above functions may be performed by one filter unit.
도 6은 상기 필터링 대상 블록 후보들의 일 예를 예시적으로 나타낸다. 상기 도 6을 참조하면 좌측 주변 블록, 상측 주변 블록, 및 좌상측 주변 블록을 상기 필터링 대상 블록 후보들에 포함할 수 있다. 상기 필터링 대상 블록 후보에는 인터 예측 모드가 적용된 주변 블록뿐만 아니라, 인트라 예측 모드가 적용된 주변 블록도 포함될 수 있다. 6 illustrates an example of the filtering target block candidates. Referring to FIG. 6, a left neighboring block, an upper neighboring block, and a left upper neighboring block may be included in the filtering target block candidates. The filtering target block candidate may include not only the neighboring block to which the inter prediction mode is applied but also the neighboring block to which the intra prediction mode is applied.
상기 필터링 대상 블록 후보의 움직임 벡터가 상기 예측 대상 블록의 움직임 벡터와 다를 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 상기 예측 대상 블록의 움직임 벡터는 상기 예측 대상 블록의 움직임 정보에 포함될 수 있다. 상기 예측 대상 블록의 움직임 정보는 쌍예측(bi-predicted) 움직임 정보일 수 있고, 또는 L0 또는 L1 예측 움직임 정보일 수 있다. 상기 L0 또는 L1 예측 움직임 정보는 단예측(uni-predicted) 움직임 정보라고도 할 수 있다. 상기 쌍예측 움직임 정보는 L0 움직임 벡터 및 L1 움직임 벡터를 포함할 수 있고, 상기 단예측 움직임 정보는 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터 중 하나만을 포함할 수 있다. 상기 L0 움직임 벡터는 L0 예측에 관한 움직임 벡터를 나타내고, 상기 L1 움직임 벡터는 L1 예측에 관한 움직임 벡터를 나타낸다. 상기 L0은 참조 픽처 리스트 L0(list 0)를 나타내고, 상기 L1은 참조 픽처 리스트 L1(list 1)을 나타낸다. 구체적으로, 상기 예측 대상 블록의 움직임 정보가 쌍예측 움직임 정보인 경우, L0 참조 픽처 인덱스 및 L0 움직임 벡터, L1 참조 픽처 인덱스 및 L1 움직임 벡터를 포함할 수 있다. 상기 예측 대상 블록의 움직임 정보가 단예측 움직임 정보인 경우, L0 참조 픽처 인덱스 및 L0 움직임 벡터를 포함할 수 있고, 또는 L1 참조 픽처 인덱스 및 L1 움직임 벡터를 포함할 수 있다.When the motion vector of the filtering target block candidate is different from the motion vector of the prediction target block, the filtering target block candidate may be derived as the filtering target block. The motion vector of the prediction target block may be included in the motion information of the prediction target block. The motion information of the prediction target block may be bi-predicted motion information or may be L0 or L1 predicted motion information. The L0 or L1 predicted motion information may also be referred to as uni-predicted motion information. The bi-predicted motion information may include an L0 motion vector and an L1 motion vector, and the unipredicted motion information may include only one of the L0 motion vector and the L1 motion vector. The L0 motion vector represents a motion vector relating to L0 prediction, and the L1 motion vector represents a motion vector relating to L1 prediction. L0 represents a reference picture list L0 (list 0), and L1 represents a reference picture list L1 (list 1). In detail, when the motion information of the prediction target block is bi-predictive motion information, the L0 reference picture index, the L0 motion vector, the L1 reference picture index, and the L1 motion vector may be included. When the motion information of the prediction block is unipredicted motion information, the L0 reference picture index and the L0 motion vector may be included, or the L1 reference picture index and the L1 motion vector may be included.
상기 예측 대상 블록의 움직임 정보가 단예측 움직임 정보인 경우, 상기 필터링 대상 블록 후보가 상기 예측 대상 블록의 참조 픽처 인덱스 및 움직임 벡터와 동일한 참조 픽처 인덱스 및 움직임 벡터를 갖는다면 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출되지 않을 수 있다. 일 예로, 상기 예측 대상 블록의 단예측 움직임 정보가 L0 참조 픽처 인덱스 및 L0 움직임 벡터를 포함하고, 상기 필터링 대상 블록 후보의 L0 참조 픽처 인덱스 및 L0 움직임 벡터와 동일한 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출되지 않을 수 있다.When the motion information of the prediction target block is mono-predictive motion information, if the filtering target block candidate has the same reference picture index and the motion vector as the reference picture index and the motion vector of the prediction target block, the filtering target block candidate is the It may not be derived to the filtering target block. For example, when the unipredicted motion information of the prediction target block includes an L0 reference picture index and an L0 motion vector, and the same as the L0 reference picture index and the L0 motion vector of the filtering target block candidate, the filtering target block candidate may be used. It may not be derived to the filtering target block.
다른 예로, 상기 예측 대상 블록의 단예측 움직임 정보가 L1 참조 픽처 인덱스 및 L1 움직임 벡터를 포함하고, 상기 필터링 대상 블록 후보의 L1 참조 픽처 인덱스 및 L1 움직임 벡터와 동일한 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출되지 않을 수 있다.As another example, when the unipredicted motion information of the prediction target block includes an L1 reference picture index and an L1 motion vector, and the same as the L1 reference picture index and the L1 motion vector of the filtering target block candidate, the filtering target block candidate is the It may not be derived to the filtering target block.
반면, 상기 필터링 대상 블록 후보가 상기 예측 대상 블록의 참조 픽처 인덱스와 동일한 참조 픽처 인덱스를 갖지만, 움직임 벡터가 다른 경우에는 상기 필터링 대상 블록으로 도출될 수 있다. 일 예로, 상기 예측 대상 블록의 단예측 움직임 정보가 L0 참조 픽처 인덱스 및 L0 움직임 벡터를 포함하고, 상기 필터링 대상 블록 후보의 L0 참조 픽처 인덱스와 상기 예측 대상 블록의 L0 참조 픽처 인덱스는 동일하고, 상기 필터링 대상 블록 후보의 L0 움직임 벡터와 상기 예측 대상 블록의 L0 움직임 벡터는 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다.On the other hand, when the filtering target block candidate has the same reference picture index as the reference picture index of the prediction target block, but the motion vector is different, it may be derived as the filtering target block. For example, the short-predicted motion information of the prediction target block includes an L0 reference picture index and an L0 motion vector, the L0 reference picture index of the filtering target block candidate and the L0 reference picture index of the prediction target block are the same, and When the L0 motion vector of the filtering target block candidate and the L0 motion vector of the prediction target block are not the same, the filtering target block candidate may be derived as the filtering target block.
다른 예로, 상기 예측 대상 블록의 단예측 움직임 정보가 L1 참조 픽처 인덱스 및 L1 움직임 벡터를 포함하고, 상기 필터링 대상 블록 후보의 L1 참조 픽처 인덱스와 상기 예측 대상 블록의 L1 참조 픽처 인덱스는 동일하고, 상기 필터링 대상 블록 후보의 L1 움직임 벡터와 상기 예측 대상 블록의 L1 움직임 벡터는 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. As another example, the unidirectional motion information of the prediction target block includes an L1 reference picture index and an L1 motion vector, the L1 reference picture index of the filtering target block candidate and the L1 reference picture index of the prediction target block are the same, When the L1 motion vector of the filtering target block candidate and the L1 motion vector of the prediction target block are not the same, the filtering target block candidate may be derived as the filtering target block.
한편, 상기 예측 대상 블록의 움직임 정보가 쌍예측 움직임 정보인 경우, 상기 필터링 대상 블록 후보의 움직임 정보가 상기 예측 대상 블록의 L0 예측 움직임 정보 및 상기 예측 대상 블록의 L1 예측 움직임 정보와 모두 일치하는 경우에는 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출되지 않을 수 있다. On the other hand, when the motion information of the prediction target block is bi-predictive motion information, the motion information of the filtering target block candidate matches both the L0 prediction motion information of the prediction target block and the L1 prediction motion information of the prediction target block. The filtering target block candidate may not be derived as the filtering target block.
상기 필터링 대상 블록 후보의 움직임 정보가 상기 예측 대상 블록의 L0 예측 움직임 정보 및 상기 예측 대상 블록의 L1 예측 움직임 정보 중 하나와 일치하지 않는 경우에는 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 일 예로, 상기 예측 대상 블록의 L0 움직임 벡터와 상기 필터링 대상 블록 후보의 L0 움직임 벡터가 일치하지 않는 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 이 경우, 상기 예측 대상 블록의 L0 움직임 벡터와 상기 필터링 대상 블록 후보의 L0 움직임 벡터가 일치하지 않는 경우는 상기 필터링 대상 블록 후보의 L0 움직임 벡터가 존재하지 않는 경우를 포함할 수 있다. 또한, 이 경우, 상기 예측 대상 블록의 L0 움직임 벡터를 기반으로 상기 필터링을 수행할 수 있다.If the motion information of the filtering target block candidate does not match one of the L0 prediction motion information of the prediction target block and the L1 prediction motion information of the prediction target block, the filtering target block candidate may be derived as the filtering target block. have. For example, when the L0 motion vector of the prediction target block and the L0 motion vector of the filtering target block candidate do not match, the filtering target block candidate may be derived as the filtering target block. In this case, the case where the L0 motion vector of the prediction target block and the L0 motion vector of the filtering target block candidate do not coincide with each other and may include a case where the L0 motion vector of the filtering target block candidate does not exist. In this case, the filtering may be performed based on the L0 motion vector of the prediction target block.
다른 예로, 상기 예측 대상 블록의 L1 움직임 벡터와 상기 필터링 대상 블록 후보의 L1 움직임 벡터가 일치하지 않는 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 이 경우, 상기 예측 대상 블록의 L1 움직임 벡터와 상기 필터링 대상 블록 후보의 L1 움직임 벡터가 일치하지 않는 경우는 상기 필터링 대상 블록 후보의 L1 움직임 벡터가 존재하지 않는 경우를 포함할 수 있다. 또한, 이 경우, 상기 예측 대상 블록의 L1 움직임 벡터를 기반으로 상기 필터링을 수행할 수 있다. As another example, when the L1 motion vector of the prediction target block and the L1 motion vector of the filtering target block candidate do not match, the filtering target block candidate may be derived as the filtering target block. In this case, the case where the L1 motion vector of the prediction target block and the L1 motion vector of the filtering target block candidate do not coincide with each other and may include a case where the L1 motion vector of the filtering target block candidate does not exist. In this case, the filtering may be performed based on the L1 motion vector of the prediction target block.
상기 필터링 대상 블록 후보의 움직임 정보가 상기 예측 대상 블록의 L0 예측 움직임 정보 및 상기 예측 대상 블록의 L1 예측 움직임 정보, 둘 모두와 일치하지 않는 경우에는 상기 예측 대상 블록의 L0 움직임 벡터 및 상기 예측 대상 블록의 L1 움직임 벡터를 기반으로 상기 필터링을 수행할 수 있다. If the motion information of the filtering target block candidate does not match both the L0 prediction motion information of the prediction target block and the L1 prediction motion information of the prediction target block, the L0 motion vector and the prediction target block of the prediction target block. The filtering may be performed based on the L1 motion vector.
상기 예측 대상 블록의 L0 움직임 벡터 및 L1 움직임 벡터 중 하나를 기반으로 필터링을 수행하는 경우와, 상기 예측 대상 블록의 L0 움직임 벡터 및 L1 움직임 벡터를 기반으로 필터링을 수행하는 경우는 가중치의 값이 다를 수 있다.When filtering is performed based on one of the L0 motion vector and the L1 motion vector of the prediction target block, and when filtering is performed based on the L0 motion vector and the L1 motion vector of the prediction block, the weight value is different. Can be.
도 7은 상기 필터링 대상 블록을 도출하기 위하여 움직임 벡터를 비교하는 일 예를 예시적으로 나타낸다. 도 7의 (a)는 상기 필터링 대상 블록 후보의 사이즈가 상기 예측 대상 블록의 사이즈와 동일한 경우에 움직임 벡터를 비교하는 일 예를 나타낸다. 도 7의 (b)는 상기 필터링 대상 블록 후보들의 사이즈가 상기 예측 대상 블록의 사이즈보다 작은 경우에 움직임 벡터를 비교하는 일 예를 나타낸다.7 illustrates an example of comparing motion vectors to derive the filtering target block. FIG. 7A illustrates an example of comparing motion vectors when the size of the filtering target block candidate is the same as the size of the prediction target block. FIG. 7B illustrates an example of comparing motion vectors when the size of the filtering target block candidates is smaller than the size of the prediction target block.
도 7의 (a)에 도시된 것과 같이, 필터링 대상 블록 후보의 움직임 벡터인 MVL과 예측 대상 블록의 움직임 벡터 MVC가 다른 경우, 상기 필터링 대상 블록의 상기 예측 대상 블록 쪽에서 필터링이 수행될 수 있다. 다시 말하면, 상기 필터링 대상 블록 후보는 필터링 대상 블록으로 도출될 수 있고, 상기 예측 대상 블록의 경계와 필터링 대상 블록의 경계가 중첩되는 경계를 기준 경계라고 할 수 있다. 상기 필터링 대상 블록 내 상기 기준 경계 방향의 필터링 대상 영역을 도출할 수 있고, 상기 필터링 대상 영역에 필터링을 수행할 수 있다.As shown in FIG. 7A, when MV L which is a motion vector of a filtering target block candidate and a motion vector MV C of a prediction target block are different, filtering may be performed on the prediction target block side of the filtering target block. have. In other words, the filtering target block candidate may be derived as a filtering target block, and a boundary where the boundary of the prediction target block and the boundary of the filtering target block overlap with each other may be referred to as a reference boundary. A filtering target region in the reference boundary direction of the filtering target block may be derived, and filtering may be performed on the filtering target region.
도 7의 (b)에 도시된 것과 같이, 필터링 대상 블록 후보들이 상기 예측 대상 블록보다 작은 서브 블록들로 분할된 경우(즉, 상기 필터링 대상 블록 후보들의 사이즈가 상기 예측 대상 블록의 사이즈보다 작은 경우), 각각의 필터링 대상 블록 후보의 움직임 벡터와 상기 예측 대상 블록의 움직임 벡터를 비교할 수 있다.As shown in (b) of FIG. 7, when the filtering target block candidates are divided into sub-blocks smaller than the prediction target block (that is, the size of the filtering target block candidates is smaller than the size of the prediction target block). ), A motion vector of each filtering target block candidate and a motion vector of the prediction target block may be compared.
구체적으로, 예를 들어, 상기 필터링 대상 블록 후보들 중 우상측에 위치한 필터링 대상 블록 후보의 움직임 벡터인 MVL2가 상기 예측 대상 블록의 움직임 벡터 MVC가 다르므로, 상기 필터링 대상 블록 후보는 필터링 대상 블록으로 도출될 수 있다. 상기 필터링 대상 블록 내 상기 기준 경계 방향의 필터링 대상 영역을 도출할 수 있고, 상기 필터링 대상 영역에 필터링을 수행할 수 있다. Specifically, for example, since the motion vector MV C of the prediction target block is different from MV L2 , the motion vector of the filtering target block candidate located on the upper right side of the filtering target block candidates, the filtering target block candidate is a filtering target block. Can be derived. A filtering target region in the reference boundary direction of the filtering target block may be derived, and filtering may be performed on the filtering target region.
반면에, 상기 필터링 대상 블록 후보들 중 우하측에 위치한 필터링 대상 블록 후보의 움직임 벡터인 MVL4가 상기 예측 대상 블록의 움직임 벡터 MVC가 동일하므로, 상기 필터링 대상 블록 후보는 필터링 대상 블록으로 도출되지 않을 수 있다.On the other hand, since the motion vector MV C of the prediction target block is the same as the motion vector MV L4 of the filtering target block candidate located on the lower right side among the filtering target block candidates, the filtering target block candidate may not be derived as the filtering target block. Can be.
한편, 필터링 대상 블록 후보의 움직임 벡터가 존재하지 않는 경우, 예를 들어, 상기 필터링 대상 블록 후보에 인트라 예측 모드가 적용된 경우, 상기 필터링 대상 블록 후보의 움직임 벡터와 상기 예측 대상 블록의 움직임 벡터가 다른 경우로 가정할 수 있고, 상기 필터링 대상 블록 후보를 상기 필터링 대상 블록으로 도출하여 필터링을 수행할 수 있다.Meanwhile, when the motion vector of the filtering target block candidate does not exist, for example, when an intra prediction mode is applied to the filtering target block candidate, the motion vector of the filtering target block candidate is different from the motion vector of the prediction target block. In this case, the filtering target block candidate may be derived as the filtering target block, and filtering may be performed.
한편, 상기 예측 대상 블록이 PU 단위로 분할되는 경우, 상기 각 서브 블록의 움직임 벡터와 상기 예측 대상 블록 주변에 위치하는 필터링 대상 블록의 움직임 벡터를 비교하여 필터링 수행 여부, 즉, 필터링 대상 블록 도출 여부를 판단할 수 있다.On the other hand, when the prediction target block is divided into PU units, whether to perform filtering, that is, whether to derive the filtering target block by comparing the motion vector of each sub-block with the motion vector of the filtering target block located around the prediction target block Can be determined.
상기 필터링 대상 영역 결정부는 상기 예측 대상 블록의 경계에 대한 필터링 수행 시, 어느 샘플들에 필터링을 수행할지, 즉, 필터링 대상 영역을 도출할 수 있다. 필터링 대상 영역으로 도출되기 위한 조건은 다음과 같을 수 있다.The filtering target region determiner may derive a filtering target region to which samples are filtered when filtering the boundary of the prediction target block. Conditions for derivation into the filtering target region may be as follows.
상기 필터링 대상 영역은 상기 예측 대상 블록의 사이즈에 기반하여 도출될 수 있다. 또한, 상기 필터링 대상 영역은 상기 필터링 대상 영역이 포함된 필터링 대상 블록의 사이즈에 기반하여 도출될 수 있다. 또한, 상기 필터링 대상 영역은 상기 예측 대상 블록의 사이즈와 상기 필터링 대상 영역이 포함된 필터링 대상 블록의 사이즈와의 차이에 기반하여 도출될 수 있다. 또한, 상기 필터링 대상 영역은 상기 필터링 대상 영역이 포함된 필터링 대상 블록의 인트라 예측 모드 적용 여부에 기반하여 도출될 수 있다. 또한, 상기 필터링 대상 영역은 상기 필터링 대상 영역이 포함된 필터링 대상 블록의 양자화 계수의 존재 여부에 기반하여 도출될 수 있다. The filtering target region may be derived based on the size of the prediction target block. In addition, the filtering target region may be derived based on a size of a filtering target block including the filtering target region. The filtering target region may be derived based on a difference between the size of the prediction target block and the size of the filtering target block including the filtering target region. The filtering target region may be derived based on whether an intra prediction mode is applied to a filtering target block including the filtering target region. The filtering target region may be derived based on the presence or absence of a quantization coefficient of the filtering target block including the filtering target region.
일 예로, 상기 예측 대상 블록의 사이즈 또는 상기 필터링 대상 블록의 사이즈에 따라서 블록의 특성이 달라질 수 있기 때문에, 상기 상기 예측 대상 블록의 사이즈 및 상기 필터링 대상 블록의 사이즈에 기반하여 필터링 대상 영역을 도출할 수 있다. 상기 필터링 대상 영역은 다음의 표 1과 같을 수 있다.For example, since characteristics of a block may vary according to the size of the prediction target block or the size of the filtering target block, a filtering target region may be derived based on the size of the prediction target block and the size of the filtering target block. Can be. The filtering target region may be as shown in Table 1 below.
Figure PCTKR2016011949-appb-T000001
Figure PCTKR2016011949-appb-T000001
여기서, > wxh 는 블록의 사이즈가 wxh보다 큰 경우를 나타내고, <= wxh 는 블록의 사이즈가 wxh 이하인 경우를 나타낸다. 디코딩 장치는 별도의 계산과정을 거치지 않고 사전에 설정된 표, 예를 들어 상술한 표 1의 매핑관계를 기반으로 상기 필터링 대상 영역을 결정할 수 있다.Here,> wxh indicates a case where the size of the block is larger than wxh, and <= wxh indicates a case where the size of the block is wxh or less. The decoding apparatus may determine the filtering target region based on a mapping table of a table set in advance, for example, Table 1, above, without performing a separate calculation process.
한편, 상기 예측 대상 블록의 사이즈와 상기 필터링 대상 블록의 사이즈와의 차이의 값이 미리 정의된 문턱치(threshold) 값 TH1보다 작은 경우에는 필터링을 수행하지 않을 수 있고, 상기 예측 대상 블록의 사이즈와 상기 필터링 대상 블록의 사이즈와의 차이의 값이 미리 정의된 문턱치 값 TH2보다 큰 경우에는 필터링을 수행하지 않을 수 있다.Meanwhile, when the value of the difference between the size of the prediction target block and the size of the filtering target block is smaller than a predefined threshold value TH1, filtering may not be performed. If the value of the difference from the size of the block to be filtered is greater than the predefined threshold value TH2, filtering may not be performed.
다른 예로, 상기 필터링 대상 영역은 상기 필터링 대상 블록의 인트라 예측 모드 적용 여부를 기반으로 도출될 수 있다. 상기 필터링 대상 블록에 인트라 예측 모드가 적용된 경우, 상기 필터링 대상 영역은 상기 필터링 대상 블록의 사이즈에 관계없이 기 설정된 범위로 고정될 수 있다. 인트라 예측 모드가 적용된 경우, 상기 필터링 대상 블록은 블록의 경계 쪽에서 인터 예측 모드가 적용된 경우에 비하여 상대적으로 큰 에러를 포함하고 있을 수 있다. 따라서, 상기 에러를 보상하기 위하여 필터링을 수행할 수 있다. 하지만, 상기 필터링 대상 블록의 양자화 계수가 존재하지 않는 경우에는 상기 필터링 대상 블록의 에러가 작은 것으로 판단될 수 있고, 필터링 대상 블록에서 제외, 즉 상기 필터링을 수행하지 않을 수 있다.As another example, the filtering target region may be derived based on whether an intra prediction mode is applied to the filtering target block. When the intra prediction mode is applied to the filtering target block, the filtering target region may be fixed to a preset range regardless of the size of the filtering target block. When the intra prediction mode is applied, the filtering target block may include a relatively larger error than when the inter prediction mode is applied on the boundary side of the block. Therefore, filtering may be performed to compensate for the error. However, when the quantization coefficient of the filtering target block does not exist, it may be determined that an error of the filtering target block is small and excluded from the filtering target block, that is, the filtering may not be performed.
도 8은 상기 필터링 대상 영역 내 복원 샘플들에 필터링을 수행하기 위한 가중치의 일 예를 예시적으로 나타낸다. 8 illustrates an example of weights for performing filtering on reconstructed samples in the filtering region.
도 8을 참조하면 상기 가중치는 상기 기준 경계로부터 상기 복원 샘플까지의 거리에 기반하여 도출될 수 있다. 상기 필터링 파라미터 도출부는 상기 필터링에 사용되는 가중치를 도출할 수 있다. 상술한 내용에 따라 상기 필터링 대상 영역 결정부는 상기 기준 경계를 기준으로 몇 번째 복원 샘플까지 필터링 대상 영역에 포함되는 결정할 수 있다. 이 경우, 상기 기준 경계에 인접한 샘플을 첫 번째 복원 샘플이라 나타낼 수 있고, 상기 기준 경계와 거리가 멀어지는 방향으로 순차적으로 순서를 정할 수 있다. 이 경우, 상기 복원 샘플의 위치 별로 다른 가중치가 사용될 수 있다.Referring to FIG. 8, the weight may be derived based on a distance from the reference boundary to the reconstructed sample. The filtering parameter derivation unit may derive a weight used for the filtering. According to the above description, the filtering subject region determiner may determine how many reconstructed samples are included in the filtered subject region based on the reference boundary. In this case, a sample adjacent to the reference boundary may be referred to as a first reconstructed sample, and may be sequentially ordered in a direction away from the reference boundary. In this case, different weights may be used for each position of the reconstructed sample.
도 8은 각 복원 샘플의 위치 별 필터링 가중치를 예시적으로 나타낸다. 도 8의 (a)는 상기 기준 경계로부터 두 번째 복원 샘플까지 필터링 대상 영역으로 도출된 경우의 가중치의 일 예를 나타내고, 도 8의 (b)는 상기 기준 경계로부터 네 번째 복원 샘플까지 필터링 대상 영역으로 도출된 경우의 가중치의 일 예를 나타낸다. 여기서, PC는 상기 예측 대상 블록의 움직임 벡터를 기반으로 도출된 상기 필터링 대상 영역의 상기 복원 샘플들에 대응되는 위치의 예측 샘플들을 나타낼 수 있고, PN은 상기 필터링 대상 영역의 상기 복원 샘플들을 나타낼 수 있다. PN{A, B}는 A 또는 B에 위치하는 상기 복원 샘플에 대한 가중치를 나타내고, PC{A, B}는 A 또는 B에 위치하는 상기 예측 샘플에 대한 가중치를 나타낸다. 예를 들어, 도 8의 (a)의 경우, PN{A, B} = {1/2, 3/4}, PC{A, B} = {1/2, 1/4} 일 수 있다. 구체적으로, A 위치, 즉, 상기 기준 경계를 기준으로 첫 번째 위치의 복원 샘플에 대한 가중치는 1/2, 상기 기준 경계를 기준으로 첫 번째 위치의 예측 샘플에 대한 가중치는 1/2일 수 있다. 또한, B 위치, 즉, 상기 기준 경계를 기준으로 두 번째 위치의 복원 샘플에 대한 가중치는 3/4, 상기 기준 경계를 기준으로 두 번째 위치의 예측 샘플에 대한 가중치는 1/4일 수 있다.8 exemplarily shows a filtering weight for each reconstruction sample for each position. FIG. 8A illustrates an example of weights derived from the reference boundary from the reference boundary to the second reconstruction sample, and FIG. 8B illustrates the filtering region from the reference boundary to the fourth reconstruction sample. An example of weights in case of derivation is shown. Here, P C may represent prediction samples of a position corresponding to the reconstruction samples of the filtering target region derived based on the motion vector of the prediction target block, and P N may represent the reconstruction samples of the filtering target region. Can be represented. P N {A, B} represents the weight for the reconstructed sample located at A or B, and P C {A, B} represents the weight for the predictive sample located at A or B. For example, in FIG. 8A, P N {A, B} = {1/2, 3/4}, P C {A, B} = {1/2, 1/4} days have. In detail, the weight of the reconstructed sample of the first position based on the A position, that is, the reference boundary may be 1/2, and the weight of the predicted sample of the first position based on the reference boundary may be 1/2. . In addition, the weight of the reconstructed sample of the second position based on the reference position B, that is, the reference boundary may be 3/4, and the weight of the predicted sample of the second position based on the reference boundary may be 1/4.
다른 예로, 도 8의 (b)의 경우, PN{A, B, C, D} = {1/4, 1/2, 3/4, 7/8}, PC{A, B, C, D} = {3/4, 1/2, 1/4, 1/8} 일 수 있다. 구체적으로, A 위치, 즉, 상기 기준 경계를 기준으로 첫 번째 위치의 복원 샘플에 대한 가중치는 1/4, 상기 기준 경계를 기준으로 첫 번째 위치의 예측 샘플에 대한 가중치는 3/4일 수 있다. 또한, B 위치, 즉, 상기 기준 경계를 기준으로 두 번째 위치의 복원 샘플에 대한 가중치는 1/2, 상기 기준 경계를 기준으로 두 번째 위치의 예측 샘플에 대한 가중치는 1/2일 수 있다. 또한, C 위치, 즉, 상기 기준 경계를 기준으로 세 번째 위치의 복원 샘플에 대한 가중치는 3/4, 상기 기준 경계를 기준으로 세 번째 위치의 예측 샘플에 대한 가중치는 1/4일 수 있다. 또한, D 위치, 즉, 상기 기준 경계를 기준으로 네 번째 위치의 복원 샘플에 대한 가중치는 7/8, 상기 기준 경계를 기준으로 네 번째 위치의 예측 샘플에 대한 가중치는 1/7일 수 있다.As another example, in the case of FIG. 8B, P N {A, B, C, D} = {1/4, 1/2, 3/4, 7/8}, P C {A, B, C , D} = {3/4, 1/2, 1/4, 1/8}. In detail, the weight of the reconstructed sample of the first position based on the A position, that is, the reference boundary may be 1/4, and the weight of the predicted sample of the first position based on the reference boundary may be 3/4. . In addition, the weight of the reconstructed sample of the second position based on the reference position B, that is, the reference boundary may be 1/2, and the weight of the predicted sample of the second position based on the reference boundary may be 1/2. In addition, the weight of the reconstructed sample of the third position based on the C position, that is, the reference boundary may be 3/4, and the weight of the predicted sample of the third position based on the reference boundary may be 1/4. In addition, the weight of the reconstructed sample of the fourth position based on the reference position D, that is, the reference boundary may be 7/8, and the weight of the predicted sample of the fourth position based on the reference boundary may be 1/7.
상기 기준 경계를 기준으로, 상기 기준 경계와의 거리가 가까운 위치일수록 상기 예측 대상 블록의 움직임 벡터를 기반으로 도출된 예측 샘플에 대한 가중치가 증가할 수 있고, 상기 필터링 대상 블록의 내부로 갈수록, 즉, 상기 기준 경계와의 거리가 멀수록 상기 복원 샘플에 대한 가중치가 증가할 수 있다.Based on the reference boundary, the closer the distance to the reference boundary is, the greater the weight for the prediction sample derived based on the motion vector of the prediction target block is, and as the inside of the filtering target block increases, ie As the distance from the reference boundary increases, the weight for the reconstructed sample may increase.
한편, 상기 필터링을 수행하기 위한 가중치는 인코딩/디코딩 과정에서 상기 필터링 대상 영역에 포함되는 복원 샘플의 위치마다 설정될 수 있다. 인코딩 장치 및 디코딩 장치는 상기 복원 샘플의 가중치 후보들을 포함하는 가중치 테이블을 가질 수 있다. 이 경우, 디코딩 장치는 비트스트림을 통하여 상기 가중치 인덱스를 수신할 수 있고, 상기 가중치 인덱스가 가리키는 상기 가중치 테이블에 포함된 후보를 기반으로 각 위치 별 상기 복원 샘플에 대한 가중치 및 상기 예측 샘플에 대한 가중치를 도출할 수 있다. 상기 가중치 인덱스는 슬라이스(slice) 단위 또는 CU 단위로 전송될 수 있다. Meanwhile, the weight for performing the filtering may be set for each position of the reconstructed sample included in the filtering target region in the encoding / decoding process. The encoding apparatus and the decoding apparatus may have a weight table including weight candidates of the reconstructed samples. In this case, the decoding apparatus may receive the weight index through a bitstream, and the weight for the reconstructed sample for each position and the weight for the prediction sample based on the candidate included in the weight table indicated by the weight index. Can be derived. The weight index may be transmitted in a slice unit or a CU unit.
또한, 인코딩 장치는 상기 예측 대상 블록의 움직임 벡터를 기반으로 주변 블록들에 대한 필터링 적용 여부를 나타내는 플래그를 생성할 수 있고, 인코딩하여 전송할 수 있다. 상기 플래그는 bbf(block-boundary filtering) 플래그라고 불릴 수 있다. 상기 가중치 인덱스 및 bbf 플래그는 다음 표 2와 같은 신텍스(syntax)를 통하여 전송될 수 있다.In addition, the encoding apparatus may generate a flag indicating whether filtering is applied to neighboring blocks based on the motion vector of the prediction target block, and may encode and transmit the flag. The flag may be referred to as a block-boundary filtering (bbf) flag. The weight index and bbf flag may be transmitted through a syntax as shown in Table 2 below.
Figure PCTKR2016011949-appb-T000002
Figure PCTKR2016011949-appb-T000002
표 5를 참조하면, bbf_flag 신텍스 요소는 상기 bbf 플래그에 대응할 수 있고, weight_idx 신텍스 요소는 상기 가중치 인덱스에 대응할 수 있다. 예를 들어, 상기 bbf 플래그의 값이 1인 경우, 상기 예측 대상 블록의 움직임 벡터를 기반으로 주변 블록에 필터링을 수행할 수 있고, 상기 bbf 플래그의 값이 0인 경우, 필터링을 수행하지 않을 수 있다. 또한, 상기 가중치 인덱스는 상기 bbf 플래그의 값이 1인 경우에 전송될 수 있다. 상기 가중치 인덱스는 상기 가중치 테이블에 포함되는 후보를 가리킬 수 있다. 상기 가중치 테이블은 다음 표 3과 같을 수 있다.Referring to Table 5, the bbf_flag syntax element may correspond to the bbf flag, and the weight_idx syntax element may correspond to the weight index. For example, when the value of the bbf flag is 1, filtering may be performed on neighboring blocks based on the motion vector of the prediction target block, and when the value of the bbf flag is 0, filtering may not be performed. have. In addition, the weight index may be transmitted when the value of the bbf flag is 1. The weight index may indicate a candidate included in the weight table. The weight table may be as shown in Table 3 below.
Figure PCTKR2016011949-appb-T000003
Figure PCTKR2016011949-appb-T000003
표 3은 상기 필터링 대상 영역이 상기 기준 경계를 기준으로 네 번째 복원 샘플들까지 포함하는 경우에 적용되는 가중치 테이블의 일 예를 나타낸다. 상기 표 3에는 다양 가중치 후보들이 상기 가중치 테이블에 추가될 수 있다. 가중치 후보의 앞에서부터 순차적으로 첫 번째 샘플, 두 번째 샘플, 세 번째 샘플, 및 네 번째 샘플에 대한 가중치를 나타낼 수 있다. 상기 표 3에 도시된 상기 가중치는 상기 예측 대상 블록의 움직임 벡터를 기반으로 도출된 상기 예측 샘플들에 대한 가중치들일 수 있다. 이 경우, 상기 예측 샘플들에 대응되는 상기 복원 샘플들에 대한 가중치들은 상기 가중치들을 기반으로 (1-α) 형태로 얻을 수 있다. 여기서, 상기 α는 예측 샘플에 대한 가중치를 나타낼 수 있다.Table 3 shows an example of a weight table applied when the filtering target region includes up to fourth reconstructed samples based on the reference boundary. In Table 3, various weighting candidates may be added to the weighting table. The weights for the first sample, the second sample, the third sample, and the fourth sample may be indicated sequentially from the front of the weighting candidate. The weights shown in Table 3 may be weights for the prediction samples derived based on the motion vector of the prediction target block. In this case, weights for the reconstructed samples corresponding to the prediction samples may be obtained in the form of (1-α) based on the weights. Here, α may represent a weight for the prediction sample.
도 9는 본 발명에 따른 인코딩 장치에 의한 비디오 인코딩 방법을 개략적으로 나타낸다. 도 9에서 개시된 방법은 도 1에서 개시된 인코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 9의 S900 내지 S910은 상기 인코딩 장치의 예측부에 의하여 수행될 수 있고, S920 내지 S940은 상기 인코딩 장치의 필터부에 의하여 수행될 수 있고, S950은 상기 인코딩 장치의 엔트로피 인코딩부에 의하여 수행될 수 있다.9 schematically illustrates a video encoding method by an encoding device according to the present invention. The method disclosed in FIG. 9 may be performed by the encoding apparatus disclosed in FIG. 1. Specifically, for example, S900 to S910 of FIG. 9 may be performed by the prediction unit of the encoding apparatus, S920 to S940 may be performed by the filter unit of the encoding apparatus, and S950 may be entropy of the encoding apparatus. It may be performed by the encoding unit.
인코딩 장치는 예측 대상 블록의 움직임 벡터를 도출한다(S900). 상기 예측 대상 블록의 움직임 벡터는 상기 예측 대상 블록의 움직임 정보에 포함될 수 있다. 상기 예측 대상 블록의 움직임 정보는 쌍예측(bi-predicted) 움직임 정보일 수 있고, 또는 L0 또는 L1 예측 움직임 정보일 수 있다. 상기 L0 또는 L1 예측 움직임 정보는 단예측(uni-predicted) 움직임 정보라고도 할 수 있다. 상기 쌍예측 움직임 정보는 L0 움직임 벡터 및 L1 움직임 벡터를 포함할 수 있고, 상기 단예측 움직임 정보는 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터 중 하나만을 포함할 수 있다. 상기 L0 움직임 벡터는 L0 예측에 관한 움직임 벡터를 나타내고, 상기 L1 움직임 벡터는 L1 예측에 관한 움직임 벡터를 나타낸다. 상기 L0은 참조 픽처 리스트 L0(list 0)를 나타내고, 상기 L1은 참조 픽처 리스트 L1(list 1)을 나타낸다. 구체적으로, 상기 예측 대상 블록의 움직임 정보가 쌍예측 움직임 정보인 경우, L0 참조 픽처 인덱스 및 L0 움직임 벡터, L1 참조 픽처 인덱스 및 L1 움직임 벡터를 포함할 수 있다. 상기 예측 대상 블록의 움직임 정보가 단예측 움직임 정보인 경우, L0 참조 픽처 인덱스 및 L0 움직임 벡터를 포함할 수 있고, 또는 L1 참조 픽처 인덱스 및 L1 움직임 벡터를 포함할 수 있다.The encoding apparatus derives a motion vector of the prediction target block (S900). The motion vector of the prediction target block may be included in the motion information of the prediction target block. The motion information of the prediction target block may be bi-predicted motion information or may be L0 or L1 predicted motion information. The L0 or L1 predicted motion information may also be referred to as uni-predicted motion information. The bi-predicted motion information may include an L0 motion vector and an L1 motion vector, and the unipredicted motion information may include only one of the L0 motion vector and the L1 motion vector. The L0 motion vector represents a motion vector relating to L0 prediction, and the L1 motion vector represents a motion vector relating to L1 prediction. L0 represents a reference picture list L0 (list 0), and L1 represents a reference picture list L1 (list 1). In detail, when the motion information of the prediction target block is bi-predictive motion information, the L0 reference picture index, the L0 motion vector, the L1 reference picture index, and the L1 motion vector may be included. When the motion information of the prediction block is unipredicted motion information, the L0 reference picture index and the L0 motion vector may be included, or the L1 reference picture index and the L1 motion vector may be included.
인코딩 장치는 상기 움직임 벡터를 기반으로 상기 예측 대상 블록에 대한 예측 샘플을 도출한다(S910). 인코딩 장치는 상기 움직임 벡터가 가리키는 참조 픽처 상에서 예측 샘플 값을 획득하고, 상기 예측 샘플을 생성할 수 있다. The encoding apparatus derives a prediction sample for the prediction block based on the motion vector (S910). The encoding apparatus may obtain a predictive sample value on the reference picture indicated by the motion vector, and generate the predictive sample.
한편, 상기 예측 대상 블록이 쌍예측(bi-predicted) 움직임 정보를 갖고 상기 예측 대상 블록의 움직임 벡터는 L0 움직임 벡터 및 L1 움직임 벡터를 포함하는 경우, 인코딩 장치는 이미 디코딩된 주변 블록을 필터링 대상 블록 후보로 도출할 수 있고, 상기 필터링 대상 블록 후보의 움직임 벡터를 상기 예측 대상 블록의 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터와 비교하여 상기 예측 샘플의 도출을 위한 움직임 벡터를 다르게 할 수 있다.Meanwhile, when the prediction target block has bi-predicted motion information and the motion vector of the prediction target block includes an L0 motion vector and an L1 motion vector, the encoding apparatus filters the neighboring block that has already been decoded. The motion vector for deriving the prediction sample may be different by comparing the motion vector of the filtering target block candidate with the L0 motion vector and the L1 motion vector of the prediction target block.
일 예로, 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터 둘 다와 동일하지 않은 경우, 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터를 기반으로 상기 예측 대상 블록의 예측 샘플을 도출할 수 있다.For example, when the motion vector of the filtering target block candidate is not the same as both the L0 motion vector and the L1 motion vector, a prediction sample of the prediction target block is based on the L0 motion vector and the L1 motion vector. Can be derived.
다른 예로, 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L0 움직임 벡터와 동일하고 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L1 움직임 벡터와 동일하지 않은 경우, 상기 L1 움직임 벡터를 기반으로 상기 예측 대상 블록의 상기 예측 샘플을 도출할 수 있다.As another example, when the motion vector of the filtering target block candidate is the same as the L0 motion vector and the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the prediction object based on the L1 motion vector. The prediction sample of the block can be derived.
다른 예로, 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L0 움직임 벡터와 동일하지 않고 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L1 움직임 벡터와 동일한 경우, 상기 L0 움직임 벡터를 기반으로 상기 예측 대상 블록의 상기 예측 샘플을 도출할 수 있다.As another example, when the motion vector of the filtering target block candidate is not the same as the L0 motion vector and the motion vector of the filtering target block candidate is the same as the L1 motion vector, the prediction target block based on the L0 motion vector. The prediction sample of can be derived.
인코딩 장치는 상기 예측 대상 블록의 주변 블록들을 기반으로 필터링 대상 블록을 도출한다(S920). 상기 필터링 대상 블록은 상기 예측 대상 블록의 좌측 주변 블록, 좌상측 주변 블록, 및 상측 주변 블록 중 적어도 하나일 수 있다. 또한, 상기 주변 블록은 상기 예측 대상 블록과 사이즈가 동일할 수 있고 다를 수도 있다. 예를 들어, 상기 주변 블록은 예측 대상 블록보다 사이즈가 작을 수 있다.The encoding apparatus derives a filtering target block based on neighboring blocks of the prediction target block (S920). The filtering target block may be at least one of a left neighboring block, a left upper neighboring block, and an upper neighboring block of the prediction target block. In addition, the neighboring block may have the same size as or different from the prediction target block. For example, the neighboring block may be smaller in size than the prediction target block.
또한, 인코딩 장치는 상기 예측 대상 블록의 상기 주변 블록들 중 이미 디코딩된 주변 블록을 필터링 대상 블록 후보로 도출할 수 있고, 상기 필터링 대상 블록 후보의 움직임 벡터 및 상기 예측 대상 블록의 움직임 벡터를 비교할 수 있다. 상기 필터링 대상 블록 후보의 상기 움직임 벡터 및 상기 예측 대상 블록의 상기 움직임 벡터가 동일하지 않은 경우, 상기 필터링 대상 블록 후보를 상기 필터링 대상 블록으로 도출할 수 있다.In addition, the encoding apparatus may derive a neighboring block which is already decoded among the neighboring blocks of the prediction target block as a filtering target block candidate, and compare the motion vector of the filtering target block candidate and the motion vector of the prediction target block. have. When the motion vector of the filtering target block candidate and the motion vector of the prediction target block are not the same, the filtering target block candidate may be derived as the filtering target block.
예를 들어, 상기 예측 대상 블록의 움직임 정보가 단예측 움직임 정보이고, 상기 단예측 움직임 정보는 L0 움직임 벡터를 포함할 수 있다. 이 경우, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L0 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 또한, 상기 필터링 대상 블록 후보가 상기 예측 대상 블록의 L0 참조 픽처 인덱스와 동일한 참조 픽처 인덱스를 갖지만, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L0 움직임 벡터와 동일하지 않은 경우에는 상기 필터링 대상 블록으로 도출될 수 있다.For example, the motion information of the prediction target block may be uni-prediction motion information, and the uni-prediction motion information may include a L0 motion vector. In this case, when the motion vector of the filtering target block candidate is not the same as the L0 motion vector, the filtering target block candidate may be derived as the filtering target block. In addition, when the filtering target block candidate has the same reference picture index as the L0 reference picture index of the prediction target block, but the motion vector of the filtering target block candidate is not the same as the L0 motion vector, the filtering target block candidate is derived. Can be.
다른 예로, 상기 예측 대상 블록의 움직임 정보가 단예측 움직임 정보이고, 상기 단예측 움직임 정보는 L1 움직임 벡터를 포함할 수 있다. 이 경우, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L1 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 또한, 상기 필터링 대상 블록 후보가 상기 예측 대상 블록의 L1 참조 픽처 인덱스와 동일한 참조 픽처 인덱스를 갖지만, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L1 움직임 벡터와 동일하지 않은 경우에는 상기 필터링 대상 블록으로 도출될 수 있다.As another example, the motion information of the prediction target block may be unipredicted motion information, and the unipredicted motion information may include an L1 motion vector. In this case, when the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the filtering target block candidate may be derived as the filtering target block. In addition, when the filtering target block candidate has the same reference picture index as the L1 reference picture index of the prediction target block, but the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the filtering target block candidate is derived. Can be.
다른 예로, 상기 예측 대상 블록의 움직임 정보가 쌍예측 움직임 정보이고, 상기 쌍예측 움직임 정보는 L0 움직임 벡터 및 L1 움직임 벡터를 포함할 수 있다. 이 경우, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 구체적으로, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L0 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 또한, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L1 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 또한, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터 둘 다와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다.As another example, the motion information of the prediction target block may be bi-predictive motion information, and the bi-predictive motion information may include an L0 motion vector and an L1 motion vector. In this case, when the motion vector of the filtering target block candidate is not the same as the L0 motion vector and the L1 motion vector, the filtering target block candidate may be derived as the filtering target block. Specifically, when the motion vector of the filtering target block candidate is not the same as the L0 motion vector, the filtering target block candidate may be derived as the filtering target block. In addition, when the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the filtering target block candidate may be derived as the filtering target block. In addition, when the motion vector of the filtering target block candidate is not the same as both the L0 motion vector and the L1 motion vector, the filtering target block candidate may be derived as the filtering target block.
다른 예로, 상기 필터링 대상 블록 후보에 인트라 예측 모드가 적용된 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 이 경우, 상기 필터링 대상 블록 후보의 움직임 벡터와 상기 예측 대상 블록의 움직임 벡터가 동일하지 않은 것으로 가정할 수 있다.As another example, when an intra prediction mode is applied to the filtering target block candidate, the filtering target block candidate may be derived as the filtering target block. In this case, it may be assumed that the motion vector of the filtering target block candidate and the motion vector of the prediction target block are not the same.
한편, 상기 필터링 대상 블록 후보 중 상기 필터링 대상 블록 후보의 양자화 계수가 존재하지 않는 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출되지 않을 수 있다.Meanwhile, when the quantization coefficient of the filtering target block candidate does not exist among the filtering target block candidates, the filtering target block candidate may not be derived as the filtering target block.
또한, 상기 예측 대상 블록의 사이즈와 상기 필터링 대상 블록 후보의 사이즈와의 차이의 값이 미리 정의된 문턱치(threshold) 값 TH1보다 작은 경우에는 상기 필터링 대상 블록으로 도출되지 않을 수 있고, 상기 예측 대상 블록의 사이즈와 상기 필터링 대상 블록 후보의 사이즈와의 차이의 값이 미리 정의된 문턱치 값 TH2보다 큰 경우에는 상기 필터링 대상 블록으로 도출되지 않을 수 있다.In addition, when the value of the difference between the size of the prediction target block and the size of the filtering target block candidate is smaller than a predefined threshold value TH1, the prediction target block may not be derived. When the value of the difference between the size of and the size of the filtering target block candidate is larger than a predefined threshold value TH2, it may not be derived to the filtering target block.
인코딩 장치는 상기 필터링 대상 블록 내 필터링 대상 영역을 결정한다(S930). 상기 필터링 대상 영역은 기준 경계 주변의 복원 샘플들을 포함할 수 있다. 상기 기준 경계는 상기 예측 대상 블록의 경계와 상기 필터링 대상 블록의 경계가 중첩되는 경계를 나타낼 수 있다. 구체적으로, 일 예로, 상기 필터링 대상 영역은 상기 필터링 대상 블록의 움직임 벡터의 값과 상기 예측 대상 블록의 움직임 벡터의 값과의 차분 값에 기반하여 결정될 수 있다. The encoding apparatus determines a filtering target region in the filtering target block (S930). The filtering target region may include reconstructed samples around a reference boundary. The reference boundary may represent a boundary where a boundary of the prediction target block and a boundary of the filtering target block overlap. In detail, as an example, the filtering target region may be determined based on a difference value between the value of the motion vector of the filtering target block and the value of the motion vector of the prediction target block.
다른 예로, 상기 필터링 대상 영역은 상기 예측 대상 블록의 사이즈에 기반하여 결정될 수 있고, 상기 필터링 대상 블록의 사이즈에 기반하여 결정될 수 있고, 상기 예측 대상 블록의 사이즈 및 상기 필터링 대상 블록의 사이즈에 기반하여 결정될 수 있다. 상기 필터링 대상 영역은 상술한 표 1과 같을 수 있다.As another example, the filtering target region may be determined based on the size of the prediction target block, may be determined based on the size of the filtering target block, and based on the size of the prediction target block and the size of the filtering target block. Can be determined. The filtering target region may be as shown in Table 1 above.
다른 예로, 상기 필터링 대상 영역은 상기 필터링 대상 블록의 인트라 예측 모드 적용 여부를 기반으로 결정될 수 있다. 상기 필터링 대상 블록에 인트라 예측 모드가 적용된 경우, 상기 필터링 대상 영역은 상기 필터링 대상 블록의 사이즈에 관계없이 기 설정된 범위로 고정될 수 있다.As another example, the filtering target region may be determined based on whether an intra prediction mode is applied to the filtering target block. When the intra prediction mode is applied to the filtering target block, the filtering target region may be fixed to a preset range regardless of the size of the filtering target block.
다른 예로, 상기 필터링 대상 영역은 상기 필터링 대상 블록의 양자화 계수의 존재 여부에 기반하여 결정될 수 있다.As another example, the filtering target region may be determined based on the presence or absence of a quantization coefficient of the filtering target block.
인코딩 장치는 상기 예측 대상 블록의 상기 예측 샘플을 기반으로 상기 필터링 대상 영역 내 복원 샘플에 대한 필터링을 수행한다(S940). 인코딩 장치는 상기 예측 샘플의 값과 상기 복원 샘플의 값의 가중합(weighted sum)을 기반으로 필터링을 수행할 수 있다. 이 경우, 상기 예측 샘플의 가중치 및 상기 복원 샘플의 가중치는 기준 경계로부터 상기 복원 샘플까지의 거리에 기반하여 도출될 수 있다. 상기 기준 경계는 상기 예측 대상 블록의 경계와 상기 필터링 대상 블록의 경계가 중첩되는 경계를 나타낼 수 있다. The encoding apparatus performs filtering on the reconstructed samples in the filtering target region based on the prediction samples of the prediction target block (S940). The encoding apparatus may perform filtering based on a weighted sum of the value of the prediction sample and the value of the reconstructed sample. In this case, the weight of the prediction sample and the weight of the reconstruction sample may be derived based on a distance from a reference boundary to the reconstruction sample. The reference boundary may represent a boundary where a boundary of the prediction target block and a boundary of the filtering target block overlap.
일 예로, 상기 기준 경계를 기준으로, 상기 기준 경계와의 거리가 가까운 위치일수록 상기 예측 샘플에 대한 가중치가 증가할 수 있고, 상기 기준 경계와의 거리가 멀수록 상기 복원 샘플에 대한 가중치가 증가할 수 있다. 상기 예측 샘플의 가중치 및 상기 복원 샘플의 가중치는 상술한 도 8의 도시된 내용과 같을 수 있다.For example, the weight for the prediction sample may increase as the distance from the reference boundary is closer to the reference boundary, and the weight for the reconstructed sample may increase as the distance from the reference boundary increases. Can be. The weight of the prediction sample and the weight of the reconstruction sample may be the same as the content shown in FIG. 8.
다른 일 예로, 인코딩 장치는 상기 가중합을 위한 가중치 후보들을 기반으로 가중치 테이블을 구성할 수 있다. 이 경우, 상기 가중치 테이블은 상술한 표 3과 같을 수 있다. 또한, 상기 가중치 테이블의 후보들 중 하나인 특정 후보를 상기 상기 예측 샘플의 가중치 및 상기 복원 샘플의 가중치로 결정할 수 있고, 상기 특정 후보를 가리키는 인덱스를 생성할 수 있다. 상기 인덱스는 가중치 인덱스라고 불릴 수 있다.As another example, the encoding apparatus may configure a weight table based on the weight candidates for the weighted sum. In this case, the weight table may be as shown in Table 3 above. The specific candidate, which is one of the candidates of the weight table, may be determined as the weight of the prediction sample and the weight of the reconstruction sample, and an index indicating the specific candidate may be generated. The index may be called a weighted index.
한편, 상기 예측 대상 블록이 쌍예측 움직임 정보를 갖는 경우에 상기 예측 대상 블록의 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터 중 하나를 기반으로 상기 예측 샘플을 도출하는 경우와, 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터를 기반으로 상기 예측 샘플을 도출하는 경우는 가중치의 값이 다를 수 있다.Meanwhile, when the prediction target block has bipredicted motion information, the prediction sample is derived based on one of the L0 motion vector and the L1 motion vector of the prediction target block, and the L0 motion vector and the L1. When the prediction sample is derived based on the motion vector, the weight value may be different.
인코딩 장치는 상기 복원 샘플에 수행된 필터링에 대한 정보를 인코딩하여 출력한다(S950). 인코딩 장치는 상기 예측 대상 블록의 움직임 벡터를 기반으로 상기 필터링 대상 블록의 필터링 대상 영역 내 복원 샘플에 수행하는 필터링을 나타내는 상기 필터링에 대한 정보를 엔트로피 인코딩하고 비트스트림 형태로 출력할 수 있다. 또한, 인코딩 장치는 상기 복원 샘플에 대한 필터링 수행 여부를 나타내는 플래그를 생성하고, 인코딩하여 상기 비트스트림 형태로 출력할 수 있다. 예를 들어 상기 플래그는 bbf(block-boundary filtering) 플래그라고 불릴 수 있다. 일 예로, 상기 복원 샘플에 대하여 필터링을 수행하는 경우, 상기 bbf 플래그의 값은 1일 수 있고, 상기 복원 샘플에 대하여 필터링을 수행하지 않는 경우, 상기 bbf 플래그의 값은 0일 수 있다.The encoding apparatus encodes and outputs information on the filtering performed on the reconstructed sample (S950). The encoding apparatus may entropy-encode the information about the filtering indicating the filtering performed on the reconstructed sample in the filtering target region of the filtering target block based on the motion vector of the prediction target block and output the result in a bitstream form. In addition, the encoding apparatus may generate a flag indicating whether to perform the filtering on the reconstructed sample, encode it, and output the flag in the form of the bitstream. For example, the flag may be called a block-boundary filtering (bbf) flag. For example, when the filtering on the reconstructed sample is performed, the value of the bbf flag may be 1, and when the filtering on the reconstructed sample is not performed, the value of the bbf flag may be 0. FIG.
또한, 인코딩 장치는 상기 가중치 테이블 내 후보를 가리키는 인덱스를 생성하고, 인코딩하여 상기 비트스트림 형태로 출력할 수 있다. 예를 들어 상기 인덱스는 가중치 인덱스라고 불릴 수 있다.In addition, the encoding apparatus may generate an index indicating a candidate in the weight table, encode it, and output the index in the form of the bitstream. For example, the index may be called a weighted index.
상기 bbf 플래그 및 상기 가중치 인덱스는 상기 비트스트림 형태로 디코딩 장치로 전송될 수 있다. 상기 비트스트림은 네트워크 또는 저장 매체를 통하여 디코딩 장치로 전송될 수 있다. The bbf flag and the weight index may be transmitted to the decoding apparatus in the form of the bitstream. The bitstream may be transmitted to a decoding apparatus via a network or a storage medium.
도 10은 본 발명에 따른 디코딩 장치에 의한 비디오 디코딩 방법을 개략적으로 나타낸다. 도 10에서 개시된 방법은 도 2에서 개시된 디코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 10의 S1000 내지 S1010은 상기 디코딩 장치의 예측부에 의하여 수행될 수 있고, S1020 내지 S1040은 상기 디코딩 장치의 필터부에 의하여 수행될 수 있다.10 schematically illustrates a video decoding method by a decoding apparatus according to the present invention. The method disclosed in FIG. 10 may be performed by the decoding apparatus disclosed in FIG. 2. Specifically, for example, S1000 to S1010 of FIG. 10 may be performed by the prediction unit of the decoding apparatus, and S1020 to S1040 may be performed by the filter unit of the decoding apparatus.
디코딩 장치는 예측 대상 블록의 움직임 벡터를 도출한다(S1000). 상기 예측 대상 블록의 움직임 벡터는 상기 예측 대상 블록의 움직임 정보에 포함될 수 있다. 상기 예측 대상 블록의 움직임 정보는 쌍예측(bi-predicted) 움직임 정보일 수 있고, 또는 L0 또는 L1 예측 움직임 정보일 수 있다. 상기 L0 또는 L1 예측 움직임 정보는 단예측(uni-predicted) 움직임 정보라고도 할 수 있다. 상기 쌍예측 움직임 정보는 L0 움직임 벡터 및 L1 움직임 벡터를 포함할 수 있고, 상기 단예측 움직임 정보는 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터 중 하나만을 포함할 수 있다. 상기 L0 움직임 벡터는 L0 예측에 관한 움직임 벡터를 나타내고, 상기 L1 움직임 벡터는 L1 예측에 관한 움직임 벡터를 나타낸다. 상기 L0은 참조 픽처 리스트 L0(list 0)를 나타내고, 상기 L1은 참조 픽처 리스트 L1(list 1)을 나타낸다. 구체적으로, 상기 예측 대상 블록의 움직임 정보가 쌍예측 움직임 정보인 경우, L0 참조 픽처 인덱스 및 L0 움직임 벡터, L1 참조 픽처 인덱스 및 L1 움직임 벡터를 포함할 수 있다. 상기 예측 대상 블록의 움직임 정보가 단예측 움직임 정보인 경우, L0 참조 픽처 인덱스 및 L0 움직임 벡터를 포함할 수 있고, 또는 L1 참조 픽처 인덱스 및 L1 움직임 벡터를 포함할 수 있다.The decoding apparatus derives a motion vector of the prediction target block (S1000). The motion vector of the prediction target block may be included in the motion information of the prediction target block. The motion information of the prediction target block may be bi-predicted motion information or may be L0 or L1 predicted motion information. The L0 or L1 predicted motion information may also be referred to as uni-predicted motion information. The bi-predicted motion information may include an L0 motion vector and an L1 motion vector, and the unipredicted motion information may include only one of the L0 motion vector and the L1 motion vector. The L0 motion vector represents a motion vector relating to L0 prediction, and the L1 motion vector represents a motion vector relating to L1 prediction. L0 represents a reference picture list L0 (list 0), and L1 represents a reference picture list L1 (list 1). In detail, when the motion information of the prediction target block is bi-predictive motion information, the L0 reference picture index, the L0 motion vector, the L1 reference picture index, and the L1 motion vector may be included. When the motion information of the prediction block is unipredicted motion information, the L0 reference picture index and the L0 motion vector may be included, or the L1 reference picture index and the L1 motion vector may be included.
디코딩 장치는 상기 움직임 벡터를 기반으로 상기 예측 대상 블록에 대한 예측 샘플을 도출한다(S1010). 디코딩 장치는 상기 움직임 벡터가 가리키는 참조 픽처 상에서 예측 샘플 값을 획득하고, 상기 예측 샘플을 생성할 수 있다. The decoding apparatus derives a prediction sample for the prediction target block based on the motion vector (S1010). The decoding apparatus may obtain a predictive sample value on the reference picture indicated by the motion vector, and generate the predictive sample.
한편, 상기 예측 대상 블록이 쌍예측(bi-predicted) 움직임 정보를 갖고 상기 예측 대상 블록의 움직임 벡터는 L0 움직임 벡터 및 L1 움직임 벡터를 포함하는 경우, 디코딩 장치는 이미 디코딩된 주변 블록을 필터링 대상 블록 후보로 도출할 수 있고, 상기 필터링 대상 블록 후보의 움직임 벡터를 상기 예측 대상 블록의 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터와 비교하여 상기 예측 샘플의 도출을 위한 움직임 벡터를 다르게 할 수 있다.On the other hand, when the prediction target block has bi-predicted motion information and the motion vector of the prediction target block includes an L0 motion vector and an L1 motion vector, the decoding apparatus filters the neighboring block that has already been decoded. The motion vector for deriving the prediction sample may be different by comparing the motion vector of the filtering target block candidate with the L0 motion vector and the L1 motion vector of the prediction target block.
일 예로, 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터 둘 다와 동일하지 않은 경우, 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터를 기반으로 상기 예측 대상 블록의 예측 샘플을 도출할 수 있다.For example, when the motion vector of the filtering target block candidate is not the same as both the L0 motion vector and the L1 motion vector, a prediction sample of the prediction target block is based on the L0 motion vector and the L1 motion vector. Can be derived.
다른 예로, 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L0 움직임 벡터와 동일하고 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L1 움직임 벡터와 동일하지 않은 경우, 상기 L1 움직임 벡터를 기반으로 상기 예측 대상 블록의 상기 예측 샘플을 도출할 수 있다.As another example, when the motion vector of the filtering target block candidate is the same as the L0 motion vector and the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the prediction object based on the L1 motion vector. The prediction sample of the block can be derived.
다른 예로, 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L0 움직임 벡터와 동일하지 않고 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L1 움직임 벡터와 동일한 경우, 상기 L0 움직임 벡터를 기반으로 상기 예측 대상 블록의 상기 예측 샘플을 도출할 수 있다.As another example, when the motion vector of the filtering target block candidate is not the same as the L0 motion vector and the motion vector of the filtering target block candidate is the same as the L1 motion vector, the prediction target block based on the L0 motion vector. The prediction sample of can be derived.
디코딩 장치는 상기 예측 대상 블록의 주변 블록들을 기반으로 필터링 대상 블록을 도출한다(S1020). 상기 필터링 대상 블록은 상기 예측 대상 블록의 좌측 주변 블록, 좌상측 주변 블록, 및 상측 주변 블록 중 적어도 하나일 수 있다. 또한, 상기 주변 블록은 상기 예측 대상 블록과 사이즈가 동일할 수 있고 다를 수도 있다. 예를 들어, 상기 주변 블록은 예측 대상 블록보다 사이즈가 작을 수 있다.The decoding apparatus derives a filtering target block based on neighboring blocks of the prediction target block (S1020). The filtering target block may be at least one of a left neighboring block, a left upper neighboring block, and an upper neighboring block of the prediction target block. In addition, the neighboring block may have the same size as or different from the prediction target block. For example, the neighboring block may be smaller in size than the prediction target block.
또한, 디코딩 장치는 상기 예측 대상 블록의 상기 주변 블록들 중 이미 디코딩된 주변 블록을 필터링 대상 블록 후보로 도출할 수 있고, 상기 필터링 대상 블록 후보의 움직임 벡터 및 상기 예측 대상 블록의 움직임 벡터를 비교할 수 있다. 상기 필터링 대상 블록 후보의 상기 움직임 벡터 및 상기 예측 대상 블록의 상기 움직임 벡터가 동일하지 않은 경우, 상기 필터링 대상 블록 후보를 상기 필터링 대상 블록으로 도출할 수 있다.In addition, the decoding apparatus may derive the decoded neighboring block among the neighboring blocks of the prediction target block as a filtering target block candidate, and compare the motion vector of the filtering target block candidate and the motion vector of the prediction target block. have. When the motion vector of the filtering target block candidate and the motion vector of the prediction target block are not the same, the filtering target block candidate may be derived as the filtering target block.
예를 들어, 상기 예측 대상 블록의 움직임 정보가 단예측 움직임 정보이고, 상기 단예측 움직임 정보는 L0 움직임 벡터를 포함할 수 있다. 이 경우, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L0 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 또한, 상기 필터링 대상 블록 후보가 상기 예측 대상 블록의 L0 참조 픽처 인덱스와 동일한 참조 픽처 인덱스를 갖지만, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L0 움직임 벡터와 동일하지 않은 경우에는 상기 필터링 대상 블록으로 도출될 수 있다.For example, the motion information of the prediction target block may be uni-prediction motion information, and the uni-prediction motion information may include a L0 motion vector. In this case, when the motion vector of the filtering target block candidate is not the same as the L0 motion vector, the filtering target block candidate may be derived as the filtering target block. In addition, when the filtering target block candidate has the same reference picture index as the L0 reference picture index of the prediction target block, but the motion vector of the filtering target block candidate is not the same as the L0 motion vector, the filtering target block candidate is derived. Can be.
다른 예로, 상기 예측 대상 블록의 움직임 정보가 단예측 움직임 정보이고, 상기 단예측 움직임 정보는 L1 움직임 벡터를 포함할 수 있다. 이 경우, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L1 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 또한, 상기 필터링 대상 블록 후보가 상기 예측 대상 블록의 L1 참조 픽처 인덱스와 동일한 참조 픽처 인덱스를 갖지만, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L1 움직임 벡터와 동일하지 않은 경우에는 상기 필터링 대상 블록으로 도출될 수 있다.As another example, the motion information of the prediction target block may be unipredicted motion information, and the unipredicted motion information may include an L1 motion vector. In this case, when the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the filtering target block candidate may be derived as the filtering target block. In addition, when the filtering target block candidate has the same reference picture index as the L1 reference picture index of the prediction target block, but the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the filtering target block candidate is derived. Can be.
다른 예로, 상기 예측 대상 블록의 움직임 정보가 쌍예측 움직임 정보이고, 상기 쌍예측 움직임 정보는 L0 움직임 벡터 및 L1 움직임 벡터를 포함할 수 있다. 이 경우, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 구체적으로, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L0 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 또한, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L1 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 또한, 상기 필터링 대상 블록 후보의 움직임 벡터가 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터 둘 다와 동일하지 않은 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다.As another example, the motion information of the prediction target block may be bi-predictive motion information, and the bi-predictive motion information may include an L0 motion vector and an L1 motion vector. In this case, when the motion vector of the filtering target block candidate is not the same as the L0 motion vector and the L1 motion vector, the filtering target block candidate may be derived as the filtering target block. Specifically, when the motion vector of the filtering target block candidate is not the same as the L0 motion vector, the filtering target block candidate may be derived as the filtering target block. In addition, when the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the filtering target block candidate may be derived as the filtering target block. In addition, when the motion vector of the filtering target block candidate is not the same as both the L0 motion vector and the L1 motion vector, the filtering target block candidate may be derived as the filtering target block.
다른 예로, 상기 필터링 대상 블록 후보에 인트라 예측 모드가 적용된 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출될 수 있다. 이 경우, 상기 필터링 대상 블록 후보의 움직임 벡터와 상기 예측 대상 블록의 움직임 벡터가 동일하지 않은 것으로 가정할 수 있다.As another example, when an intra prediction mode is applied to the filtering target block candidate, the filtering target block candidate may be derived as the filtering target block. In this case, it may be assumed that the motion vector of the filtering target block candidate and the motion vector of the prediction target block are not the same.
한편, 상기 필터링 대상 블록 후보 중 상기 필터링 대상 블록 후보의 양자화 계수가 존재하지 않는 경우, 상기 필터링 대상 블록 후보는 상기 필터링 대상 블록으로 도출되지 않을 수 있다.Meanwhile, when the quantization coefficient of the filtering target block candidate does not exist among the filtering target block candidates, the filtering target block candidate may not be derived as the filtering target block.
또한, 상기 예측 대상 블록의 사이즈와 상기 필터링 대상 블록 후보의 사이즈와의 차이의 값이 미리 정의된 문턱치(threshold) 값 TH1보다 작은 경우에는 상기 필터링 대상 블록으로 도출되지 않을 수 있고, 상기 예측 대상 블록의 사이즈와 상기 필터링 대상 블록 후보의 사이즈와의 차이의 값이 미리 정의된 문턱치 값 TH2보다 큰 경우에는 상기 필터링 대상 블록으로 도출되지 않을 수 있다.In addition, when the value of the difference between the size of the prediction target block and the size of the filtering target block candidate is smaller than a predefined threshold value TH1, the prediction target block may not be derived. When the value of the difference between the size of and the size of the filtering target block candidate is larger than a predefined threshold value TH2, it may not be derived to the filtering target block.
디코딩 장치는 상기 필터링 대상 블록 내 필터링 대상 영역을 도출한다(S1030). 상기 필터링 대상 영역은 기준 경계 주변의 복원 샘플들을 포함할 수 있다. 상기 기준 경계는 상기 예측 대상 블록의 경계와 상기 필터링 대상 블록의 경계가 중첩되는 경계를 나타낼 수 있다. 구체적으로, 일 예로, 상기 필터링 대상 영역은 상기 필터링 대상 블록의 움직임 벡터의 값과 상기 예측 대상 블록의 움직임 벡터의 값과의 차분 값에 기반하여 도출될 수 있다. The decoding apparatus derives a filtering target region in the filtering target block (S1030). The filtering target region may include reconstructed samples around a reference boundary. The reference boundary may represent a boundary where a boundary of the prediction target block and a boundary of the filtering target block overlap. In detail, as an example, the filtering target region may be derived based on a difference value between the value of the motion vector of the filtering target block and the value of the motion vector of the prediction target block.
다른 예로, 상기 필터링 대상 영역은 상기 예측 대상 블록의 사이즈에 기반하여 도출될 수 있고, 상기 필터링 대상 블록의 사이즈에 기반하여 도출될 수 있고, 상기 예측 대상 블록의 사이즈 및 상기 필터링 대상 블록의 사이즈에 기반하여 도출될 수 있다. 상기 필터링 대상 영역은 상술한 표 1과 같을 수 있다.As another example, the filtering target region may be derived based on the size of the prediction target block, may be derived based on the size of the filtering target block, and may be derived from the size of the prediction target block and the size of the filtering target block. Can be derived based on this. The filtering target region may be as shown in Table 1 above.
다른 예로, 상기 필터링 대상 영역은 상기 필터링 대상 블록의 인트라 예측 모드 적용 여부를 기반으로 도출될 수 있다. 상기 필터링 대상 블록에 인트라 예측 모드가 적용된 경우, 상기 필터링 대상 영역은 상기 필터링 대상 블록의 사이즈에 관계없이 기 설정된 범위로 고정될 수 있다.As another example, the filtering target region may be derived based on whether an intra prediction mode is applied to the filtering target block. When the intra prediction mode is applied to the filtering target block, the filtering target region may be fixed to a preset range regardless of the size of the filtering target block.
다른 예로, 상기 필터링 대상 영역은 상기 필터링 대상 블록의 양자화 계수의 존재 여부를 기반으로 도출될 수 있다.As another example, the filtering target region may be derived based on the presence or absence of a quantization coefficient of the filtering target block.
디코딩 장치는 상기 예측 대상 블록의 상기 예측 샘플을 기반으로 상기 필터링 대상 영역 내 복원 샘플에 대한 필터링을 수행한다(S1040). 디코딩 장치는 상기 예측 샘플의 값과 상기 복원 샘플의 값의 가중합(weighted sum)을 기반으로 필터링을 수행할 수 있다. 이 경우, 상기 예측 샘플의 가중치 및 상기 복원 샘플의 가중치는 기준 경계로부터 상기 복원 샘플까지의 거리에 기반하여 도출될 수 있다. 상기 기준 경계는 상기 예측 대상 블록의 경계와 상기 필터링 대상 블록의 경계가 중첩되는 경계를 나타낼 수 있다. The decoding apparatus performs filtering on the reconstructed samples in the filtering target region based on the prediction samples of the prediction target block (S1040). The decoding apparatus may perform filtering based on a weighted sum of the value of the prediction sample and the value of the reconstructed sample. In this case, the weight of the prediction sample and the weight of the reconstruction sample may be derived based on a distance from a reference boundary to the reconstruction sample. The reference boundary may represent a boundary where a boundary of the prediction target block and a boundary of the filtering target block overlap.
일 예로, 상기 기준 경계를 기준으로, 상기 기준 경계와의 거리가 가까운 위치일수록 상기 예측 샘플에 대한 가중치가 증가할 수 있고, 상기 기준 경계와의 거리가 멀수록 상기 복원 샘플에 대한 가중치가 증가할 수 있다. 상기 예측 샘플의 가중치 및 상기 복원 샘플의 가중치는 상술한 도 8의 도시된 내용과 같을 수 있다.For example, the weight for the prediction sample may increase as the distance from the reference boundary is closer to the reference boundary, and the weight for the reconstructed sample may increase as the distance from the reference boundary increases. Can be. The weight of the prediction sample and the weight of the reconstruction sample may be the same as the content shown in FIG. 8.
다른 예로, 디코딩 장치는 상기 가중합을 위한 가중치 후보들을 기반으로 가중치 테이블을 구성할 수 있다. 상기 가중치 테이블은 상술한 표 3과 같을 수 있다. 또한, 이 경우, 디코딩 장치는 비트스트림을 통하여 상기 가중치 테이블에 포함되는 후보들 중 하나를 가리키는 인덱스 정보를 획득할 수 있고, 상기 예측 샘플에 대한 가중치 및 상기 복원 샘플에 대한 가중치를 상기 인덱스가 가리키는 후보를 기반으로 도출할 수 있다. 상기 인덱스는 가중치 인덱스라고 불릴 수 있다.As another example, the decoding apparatus may configure a weight table based on the weight candidates for the weighted sum. The weight table may be as shown in Table 3 above. In this case, the decoding apparatus may obtain index information indicating one of the candidates included in the weight table through the bitstream, and the candidate indicating the weight for the prediction sample and the weight for the reconstruction sample is indicated by the index. Can be derived based on The index may be called a weighted index.
한편, 상기 예측 대상 블록이 쌍예측 움직임 정보를 갖는 경우에 상기 예측 대상 블록의 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터 중 하나를 기반으로 상기 예측 샘플을 도출하는 경우와, 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터를 기반으로 상기 예측 샘플을 도출하는 경우는 가중치의 값이 다를 수 있다.Meanwhile, when the prediction target block has bipredicted motion information, the prediction sample is derived based on one of the L0 motion vector and the L1 motion vector of the prediction target block, and the L0 motion vector and the L1. When the prediction sample is derived based on the motion vector, the weight value may be different.
한편, 디코딩 장치는 비트스트림을 통하여 상기 예측 대상 블록의 움직임 벡터를 기반으로 상기 복원 샘플에 대한 필터링 수행 여부를 나타내는 플래그 정보를 획득할 수 있다. 상기 플래그는 bbf(block-boundary filtering) 플래그라고 불릴 수 있다. 예를 들어, 상기 bbf 플래그의 값이 1인 경우, 디코딩 장치는 상기 복원 샘플에 대한 필터링을 수행할 수 있다. 상기 bbf 플래그의 값이 0인 경우, 디코딩 장치는 상기 복원 샘플에 대한 필터링을 수행하지 않을 수 있다.Meanwhile, the decoding apparatus may obtain flag information indicating whether to perform filtering on the reconstructed sample based on the motion vector of the prediction target block through a bitstream. The flag may be referred to as a block-boundary filtering (bbf) flag. For example, when the value of the bbf flag is 1, the decoding apparatus may perform filtering on the reconstructed sample. When the value of the bbf flag is 0, the decoding device may not perform filtering on the reconstructed sample.
상술한 본 발명에 따르면 예측 대상 블록의 주변 블록 내 복원 샘플의 필터링을 통하여 주관적/객관적 화질을 향상시킬 수 있다.According to the present invention described above, subjective / objective picture quality may be improved by filtering reconstructed samples in neighboring blocks of the prediction target block.
또한, 본 발명에 따르면 예측 대상 블록의 움직임 벡터를 기반으로 도출된 예측 샘플과 예측 대상 블록의 경계에 주변 복원 샘플들의 가중합을 통하여 필터링을 수행할 수 있어, 블록들 사이의 에러를 줄일 수 있고, 주관적/객관적 화질을 향상시킬 수 있다.In addition, according to the present invention, filtering can be performed by weighted sum of neighboring reconstructed samples at the boundary of the predicted sample and the predicted block derived based on the motion vector of the predicted block, thereby reducing errors between blocks. As a result, subjective / objective image quality can be improved.
상술한 실시예에서, 방법들은 일련의 단계 또는 블록으로써 순서도를 기초로 설명되고 있지만, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당업자라면 순서도에 나타내어진 단계들이 배타적이지 않고, 다른 단계가 포함되거나 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the above-described embodiment, the methods are described based on a flowchart as a series of steps or blocks, but the present invention is not limited to the order of steps, and any steps may occur in a different order or simultaneously from other steps as described above. have. In addition, those skilled in the art will appreciate that the steps shown in the flowcharts are not exclusive and that other steps may be included or one or more steps in the flowcharts may be deleted without affecting the scope of the present invention.
상술한 본 발명에 따른 방법은 소프트웨어 형태로 구현될 수 있으며, 본 발명에 따른 인코딩 장치 및/또는 디코딩 장치는 예를 들어 TV, 컴퓨터, 스마트폰, 셋톱박스, 디스플레이 장치 등의 영상 처리를 수행하는 장치에 포함될 수 있다.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.
본 발명에서 실시예들이 소프트웨어로 구현될 때, 상술한 방법은 상술한 기능을 수행하는 모듈(과정, 기능 등)로 구현될 수 있다. 모듈은 메모리에 저장되고, 프로세서에 의해 실행될 수 있다. 메모리는 프로세서 내부 또는 외부에 있을 수 있고, 잘 알려진 다양한 수단으로 프로세서와 연결될 수 있다. 프로세서는 ASIC(application-specific integrated circuit), 다른 칩셋, 논리 회로 및/또는 데이터 처리 장치를 포함할 수 있다. 메모리는 ROM(read-only memory), RAM(random access memory), 플래쉬 메모리, 메모리 카드, 저장 매체 및/또는 다른 저장 장치를 포함할 수 있다.When embodiments of the present invention are implemented in software, 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 various 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.

Claims (15)

  1. 디코딩 장치에 의하여 수행되는 필터링 방법에 있어서,In the filtering method performed by the decoding apparatus,
    예측 대상 블록의 움직임 벡터를 도출하는 단계;Deriving a motion vector of the predicted block;
    상기 움직임 벡터를 기반으로 상기 예측 대상 블록에 대한 예측 샘플을 도출하는 단계;Deriving a prediction sample for the prediction target block based on the motion vector;
    상기 예측 대상 블록의 주변 블록들을 기반으로 필터링 대상 블록을 도출하는 단계;Deriving a filtering target block based on neighboring blocks of the prediction target block;
    상기 필터링 대상 블록 내의 필터링 대상 영역을 도출하는 단계; 및Deriving a filtering target region in the filtering target block; And
    상기 예측 대상 블록의 예측 샘플을 기반으로 상기 필터링 대상 영역 내 복원 샘플에 대한 필터링을 수행하는 단계를 포함하는 것을 특징으로 하는 필터링 방법.And filtering the reconstructed sample in the filtering target region based on the predicted sample of the predicted target block.
  2. 제1항에 있어서,The method of claim 1,
    상기 예측 대상 블록 내 예측 샘플을 기반으로 상기 필터링 대상 영역 내 복원 샘플에 대한 필터링을 수행하는 단계는,The filtering of the reconstructed samples in the filtering target region based on the predicted samples in the prediction target block may include:
    상기 예측 샘플의 값과 상기 복원 샘플의 값의 가중합(weighted sum)을 기반으로 필터링을 수행하는 단계를 포함하는 것을 특징으로 하는 필터링 방법.And performing filtering based on a weighted sum of the value of the prediction sample and the value of the reconstructed sample.
  3. 제2항에 있어서,The method of claim 2,
    상기 가중합을 적용함에 있어서, 상기 예측 샘플에 대한 가중치(weight) 및 상기 복원 샘플에 대한 가중치는 기준 경계로부터 상기 복원 샘플까지의 거리에 기반하여 도출되며,In applying the weighted sum, a weight for the prediction sample and a weight for the reconstruction sample are derived based on a distance from a reference boundary to the reconstruction sample,
    상기 기준 경계는 상기 예측 대상 블록의 경계와 상기 필터링 대상 블록의 경계가 중첩되는 경계인 것을 특징으로 하는 필터링 방법.The reference boundary is a filtering method, characterized in that the boundary of the boundary of the prediction target block and the boundary of the filtering target block overlap.
  4. 제2항에 있어서,The method of claim 2,
    상기 가중합을 위한 가중치(weight) 후보들을 구성하는 단계; 및Constructing weight candidates for the weighted sum; And
    비트스트림을 통하여 상기 가중치 후보들 중 하나를 가리키는 인덱스를 획득하는 단계를 더 포함하되,Obtaining an index indicating one of the weighting candidates through a bitstream,
    상기 예측 샘플에 대한 가중치 및 상기 복원 샘플에 대한 가중치는 상기 인덱스가 가리키는 후보를 기반으로 도출되는 것을 특징으로 하는 필터링 방법.And the weight for the prediction sample and the weight for the reconstruction sample are derived based on the candidate indicated by the index.
  5. 제1항에 있어서,The method of claim 1,
    상기 필터링 대상 블록은 상기 예측 대상 블록의 좌측 주변 블록, 좌상측 주변 블록, 및 상측 주변 블록 중 적어도 하나인 것을 특징으로 하는 필터링 방법.The filtering object block may be at least one of a left neighboring block, a left upper neighboring block, and an upper neighboring block of the prediction target block.
  6. 제1항에 있어서,The method of claim 1,
    상기 주변 블록들 중 주변 블록의 양자화 계수가 존재하지 않는 경우, 상기 해당 주변 블록은 상기 필터링 대상 블록으로 도출되지 않는 것을 특징으로 하는 필터링 방법.And if there is no quantization coefficient of a neighboring block among the neighboring blocks, the corresponding neighboring block is not derived as the filtering target block.
  7. 제1항에 있어서,The method of claim 1,
    상기 예측 대상 블록의 상기 주변 블록들을 기반으로 상기 필터링 대상 블록을 도출하는 단계는,Deriving the filtering target block based on the neighboring blocks of the prediction target block,
    상기 예측 대상 블록의 상기 주변 블록들 중 이미 디코딩된 주변 블록을 필터링 대상 블록 후보로 도출하는 단계;Deriving an already decoded neighboring block among the neighboring blocks of the prediction target block as a filtering target block candidate;
    상기 필터링 대상 블록 후보의 움직임 벡터 및 상기 예측 대상 블록의 상기 움직임 벡터를 비교하는 단계; 및Comparing the motion vector of the filtering target block candidate and the motion vector of the prediction target block; And
    상기 필터링 대상 블록 후보의 상기 움직임 벡터 및 상기 예측 대상 블록의 상기 움직임 벡터가 동일하지 않은 경우, 상기 필터링 대상 블록 후보를 상기 필터링 대상 블록으로 도출하는 단계를 포함하는 것을 특징으로 하는 필터링 방법.And when the motion vector of the filtering target block candidate and the motion vector of the prediction target block are not the same, deriving the filtering target block candidate as the filtering target block.
  8. 제1항에 있어서,The method of claim 1,
    비트스트림을 통하여 BBF(block-boundary filtering) 플래그를 수신하는 단계; 및Receiving a block-boundary filtering (BBF) flag via the bitstream; And
    상기 복원 샘플에 대한 필터링 수행 여부를 판단하는 단계를 더 포함하되,The method may further include determining whether to perform filtering on the restored sample.
    상기 BBF 플래그의 값이 1인 경우, 상기 복원 샘플에 대한 필터링이 수행되는 것으로 판단되는 것을 특징으로 하는 필터링 방법.And when the value of the BBF flag is 1, it is determined that filtering is performed on the reconstructed sample.
  9. 제1항에 있어서,The method of claim 1,
    상기 예측 대상 블록이 쌍예측(bi-predicted) 움직임 정보를 갖는 경우, 상기 예측 대상 블록의 움직임 벡터는 L0 움직임 벡터 및 L1 움직임 벡터를 포함하고,When the prediction target block has bi-predicted motion information, the motion vector of the prediction target block includes an L0 motion vector and an L1 motion vector,
    상기 예측 대상 블록의 상기 주변 블록들을 기반으로 상기 필터링 대상 블록을 도출하는 단계는,Deriving the filtering target block based on the neighboring blocks of the prediction target block,
    상기 예측 대상 블록의 상기 주변 블록들 중 이미 디코딩된 주변 블록을 필터링 대상 블록 후보로 도출하는 단계;Deriving an already decoded neighboring block among the neighboring blocks of the prediction target block as a filtering target block candidate;
    상기 필터링 대상 블록 후보의 움직임 벡터를 상기 예측 대상 블록의 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터와 비교하는 단계; 및Comparing the motion vector of the filtering target block candidate with the L0 motion vector and the L1 motion vector of the prediction target block; And
    상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 예측 대상 블록의 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터와 동일하지 않은 경우, 상기 필터링 대상 블록 후보를 상기 필터링 대상 블록으로 도출하는 단계를 더 포함하는 것을 특징으로 하는 필터링 방법.When the motion vector of the filtering target block candidate is not the same as the L0 motion vector and the L1 motion vector of the prediction target block, further comprising deriving the filtering target block candidate as the filtering target block. Filtering method.
  10. 제9항에 있어서,The method of claim 9,
    상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L0 움직임 벡터와 동일하고 상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L1 움직임 벡터와 동일하지 않은 경우, 상기 L1 움직임 벡터를 기반으로 상기 예측 대상 블록의 상기 예측 샘플을 도출하고,If the motion vector of the filtering target block candidate is the same as the L0 motion vector and the motion vector of the filtering target block candidate is not the same as the L1 motion vector, the prediction of the prediction block based on the L1 motion vector. Derive a predictive sample,
    상기 필터링 대상 블록 후보의 상기 움직임 벡터가 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터 둘 다와 동일하지 않은 경우, 상기 L0 움직임 벡터 및 상기 L1 움직임 벡터를 기반으로 상기 예측 대상 블록의 예측 샘플을 도출하는 것을 특징으로 하는 필터링 방법.Deriving a prediction sample of the prediction target block based on the L0 motion vector and the L1 motion vector when the motion vector of the filtering target block candidate is not the same as both the L0 motion vector and the L1 motion vector. Characterized by a filtering method.
  11. 제7항에 있어서,The method of claim 7, wherein
    상기 필터링 대상 블록 후보에 인트라 예측 모드가 적용된 경우, 상기 필터링 대상 블록 후보는 필터링 대상 블록으로 도출되는 것을 특징으로 하는 필터링 방법.And when an intra prediction mode is applied to the filtering target block candidate, the filtering target block candidate is derived as a filtering target block.
  12. 제7항에 있어서,The method of claim 7, wherein
    상기 필터링 대상 영역은 상기 필터링 대상 블록 후보의 상기 움직임 벡터의 값과 상기 예측 대상 블록의 움직임 벡터의 값과의 차분 값에 기반하여 도출되는 것을 특징으로 하는 필터링 방법.And the filtering target region is derived based on a difference value between the value of the motion vector of the filtering target block candidate and the value of the motion vector of the prediction target block.
  13. 제1항에 있어서,The method of claim 1,
    상기 필터링 대상 영역은 상기 예측 대상 블록의 크기 및 상기 필터링 대상 블록의 크기를 기반으로 결정되는 것을 특징으로 하는 필터링 방법.The filtering method region is determined based on the size of the prediction target block and the size of the filtering target block.
  14. 제1항에 있어서,The method of claim 1,
    상기 필터링 대상 영역은 상기 필터링 대상 블록의 인트라 예측 모드 적용 여부를 기반으로 도출되되,The filtering target region is derived based on whether an intra prediction mode is applied to the filtering target block.
    상기 필터링 대상 블록에 상기 인트라 예측 모드가 적용된 경우, 상기 필터링 대상 영역은 기 설정된 범위로 도출되는 것을 특징으로 하는 필터링 방법. And when the intra prediction mode is applied to the filtering target block, the filtering target region is derived to a preset range.
  15. 인코딩 장치에 의하여 수행되는 필터링 방법에 있어서,In the filtering method performed by the encoding device,
    예측 대상 블록의 움직임 벡터를 도출하는 단계;Deriving a motion vector of the predicted block;
    상기 움직임 벡터를 기반으로 상기 예측 대상 블록에 대한 예측 샘플을 도출하는 단계;Deriving a prediction sample for the prediction target block based on the motion vector;
    상기 예측 대상 블록의 주변 블록들을 기반으로 필터링 대상 블록을 도출하는 단계;Deriving a filtering target block based on neighboring blocks of the prediction target block;
    상기 필터링 대상 블록 내의 필터링 대상 영역을 결정하는 단계;Determining a filtering target region in the filtering target block;
    상기 예측 대상 블록의 예측 샘플을 기반으로 상기 필터링 대상 영역 내 복원 샘플에 대한 필터링을 수행하는 단계; 및Performing filtering on reconstructed samples in the filtering target region based on predicted samples of the predicted block; And
    상기 복원 샘플에 수행된 필터링에 대한 정보를 인코딩하여 출력하는 단계를 포함하는 것을 특징으로 하는 필터링 방법.And encoding and outputting information on the filtering performed on the reconstructed sample.
PCT/KR2016/011949 2015-10-23 2016-10-24 Method and device for filtering image in image coding system WO2017069591A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201562245280P 2015-10-23 2015-10-23
US62/245,280 2015-10-23

Publications (1)

Publication Number Publication Date
WO2017069591A1 true WO2017069591A1 (en) 2017-04-27

Family

ID=58557314

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2016/011949 WO2017069591A1 (en) 2015-10-23 2016-10-24 Method and device for filtering image in image coding system

Country Status (1)

Country Link
WO (1) WO2017069591A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20120010177A (en) * 2010-07-20 2012-02-02 에스케이 텔레콤주식회사 Deblocking filtering method and apparatus, method and apparatus for encoding and decoding using deblocking filtering
KR101369224B1 (en) * 2007-03-28 2014-03-05 삼성전자주식회사 Method and apparatus for Video encoding and decoding using motion compensation filtering
KR20140101755A (en) * 2011-11-04 2014-08-20 엘지전자 주식회사 Method and apparatus for encoding/decoding image information
KR20140142199A (en) * 2014-10-29 2014-12-11 삼성전자주식회사 Method and apparatus for video encoding using deblocking filtering, and method and apparatus for video decoding using the same
KR101488497B1 (en) * 2011-06-20 2015-01-30 한국전자통신연구원 Method for image encoding/decoding and apparatus thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101369224B1 (en) * 2007-03-28 2014-03-05 삼성전자주식회사 Method and apparatus for Video encoding and decoding using motion compensation filtering
KR20120010177A (en) * 2010-07-20 2012-02-02 에스케이 텔레콤주식회사 Deblocking filtering method and apparatus, method and apparatus for encoding and decoding using deblocking filtering
KR101488497B1 (en) * 2011-06-20 2015-01-30 한국전자통신연구원 Method for image encoding/decoding and apparatus thereof
KR20140101755A (en) * 2011-11-04 2014-08-20 엘지전자 주식회사 Method and apparatus for encoding/decoding image information
KR20140142199A (en) * 2014-10-29 2014-12-11 삼성전자주식회사 Method and apparatus for video encoding using deblocking filtering, and method and apparatus for video decoding using the same

Similar Documents

Publication Publication Date Title
WO2017052081A1 (en) Inter prediction method and apparatus in image coding system
WO2020071829A1 (en) History-based image coding method, and apparatus thereof
WO2017188652A1 (en) Method and device for encoding/decoding image
WO2017209328A1 (en) Intra-prediction method and apparatus in image coding system
WO2017082443A1 (en) Method and apparatus for adaptively predicting image using threshold value in image coding system
WO2017014412A1 (en) Intra prediction method and device in video coding system
WO2017022973A1 (en) Inter prediction method and device in video coding system
WO2017052009A1 (en) Amvr-based image coding method and apparatus in image coding system
WO2020071830A1 (en) Image coding method using history-based motion information, and device therefor
WO2016204373A1 (en) Image properties-based adaptive filtering method and device in image coding system
WO2017164441A1 (en) Method and apparatus for inter prediction in video coding system
WO2016052977A1 (en) Method and apparatus for processing video signal
WO2017057877A1 (en) Method and apparatus of filtering image in image coding system
WO2016204374A1 (en) Image filtering method and device in image coding system
WO2013154366A1 (en) Transform method based on block information, and apparatus using said method
WO2016114583A1 (en) Method and device for processing video signal
WO2017048008A1 (en) Inter-prediction method and apparatus in video coding system
WO2017159901A1 (en) Method and device for deriving block structure in video coding system
WO2019117639A1 (en) Image coding method on basis of transformation and device therefor
WO2017065509A2 (en) Image decoding method and apparatus in image coding system
WO2017061671A1 (en) Method and device for coding image on basis of adaptive transformation in image coding system
WO2018021585A1 (en) Method and apparatus for intra-prediction in image coding system
WO2016122251A1 (en) Method and apparatus for processing video signals
WO2017052272A1 (en) Method and apparatus for intra prediction in video coding system
WO2018128222A1 (en) Method and apparatus for image decoding in image coding system

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: 16857848

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: 16857848

Country of ref document: EP

Kind code of ref document: A1