WO2019199106A1 - Method and device for decoding image according to inter-prediction in image coding system - Google Patents

Method and device for decoding image according to inter-prediction in image coding system Download PDF

Info

Publication number
WO2019199106A1
WO2019199106A1 PCT/KR2019/004424 KR2019004424W WO2019199106A1 WO 2019199106 A1 WO2019199106 A1 WO 2019199106A1 KR 2019004424 W KR2019004424 W KR 2019004424W WO 2019199106 A1 WO2019199106 A1 WO 2019199106A1
Authority
WO
WIPO (PCT)
Prior art keywords
current block
motion vector
prediction
block
motion
Prior art date
Application number
PCT/KR2019/004424
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 WO2019199106A1 publication Critical patent/WO2019199106A1/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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • H04N19/137Motion inside a coding unit, e.g. average field, frame or block difference
    • H04N19/139Analysis of motion vectors, e.g. their magnitude, direction, variance or reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods 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 bits, e.g. of the compressed video stream
    • 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
    • H04N19/513Processing of motion vectors
    • 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
    • H04N19/53Multi-resolution motion estimation; Hierarchical motion estimation

Definitions

  • the present invention relates to an image coding technique, and more particularly, to an image decoding method and apparatus according to inter prediction in an image coding system.
  • the demand for high resolution and high quality images such as high definition (HD) images and ultra high definition (UHD) images is increasing in various fields.
  • the higher the resolution and the higher quality of the image data the more information or bit rate is transmitted than the existing image data. Therefore, the image data can be transmitted by using a medium such as a conventional wired / wireless broadband line or by using a conventional storage medium. In the case of storage, the transmission cost and the storage cost are increased.
  • a high efficiency image compression technique is required to effectively transmit, store, and reproduce high resolution, high quality image information.
  • An object of the present invention is to provide a method and apparatus for improving image coding efficiency.
  • Another technical problem of the present invention is to derive a motion vector for the center position of the current block based on CPMVs of neighboring blocks to which affine prediction is applied, and to perform the prediction for the current block based on the derived motion vector.
  • the present invention provides a decoding method and apparatus.
  • Another technical problem of the present invention is to derive a motion vector for the center position of the current block based on CPMVs of neighboring blocks to which affine prediction is applied, and use the derived motion vector as a motion candidate for the current block.
  • the present invention provides an image decoding method and apparatus for performing inter prediction.
  • an image decoding method performed by a decoding apparatus.
  • the method includes deriving motion vectors of control points (CPs) of neighboring blocks with respect to a current block, and deriving a motion vector with respect to a center position of the current block based on the motion vectors of the CPs. And performing prediction on the current block based on the motion vector.
  • CPs control points
  • a decoding apparatus for performing image decoding.
  • the decoding apparatus derives motion vectors of control points (CPs) of neighboring blocks with respect to the current block, and derives a motion vector with respect to the center position of the current block based on the motion vectors of the CPs.
  • a predictor configured to predict the current block based on the motion vector.
  • a video encoding method performed by an encoding apparatus includes deriving motion vectors of control points (CPs) of neighboring blocks with respect to a current block, and deriving a motion vector with respect to a center position of the current block based on the motion vectors of the CPs. And performing prediction on the current block based on the motion vector, and encoding information on inter prediction of the current block.
  • CPs control points
  • a video encoding apparatus derives motion vectors of control points (CPs) of neighboring blocks with respect to the current block, and derives a motion vector with respect to the center position of the current block based on the motion vectors of the CPs. And an estimator for performing prediction on the current block based on the motion vector, and an entropy encoding unit for encoding information on inter prediction of the current block.
  • CPs control points
  • the motion vector of the current block can be derived by utilizing the characteristics of the neighboring block to which the affine prediction is applied, and thus, the memory access speed is simply saved while saving the memory access speed compared to the case of performing the affine motion model. It is possible to improve the prediction accuracy rather than to perform the motion prediction using the motion vector.
  • the motion vector of the current block is derived by utilizing the characteristics of the neighboring block to which the affine prediction is applied, but the complexity of the decoding process is prevented by dividing the motion vector by dividing it into a sample or subblock unit of the current block. And a problem of increasing memory access speed.
  • FIG. 1 is a diagram schematically illustrating a configuration of a video encoding apparatus to which the present invention may be applied.
  • FIG. 2 is a diagram schematically illustrating a configuration of a video decoding apparatus to which the present invention may be applied.
  • 3 exemplarily illustrates a motion expressed through the affine motion model.
  • 5 exemplarily illustrates the affine motion model in which motion vectors for two control points are used.
  • FIG. 6 exemplarily illustrates a method of deriving a motion vector on a sub-block basis based on the affine motion model.
  • FIG. 7 illustrates an example of deriving a motion vector with respect to the center position of the current block based on the CPMV of the neighboring block.
  • FIG. 8 illustrates an example of using a motion vector of a center position of a current block derived based on the CPMV of a neighboring block as the MVP of the current block.
  • FIG. 9 schematically illustrates an image encoding method by an encoding apparatus according to the present invention.
  • FIG. 10 schematically illustrates an encoding apparatus for performing an image encoding method according to the present invention.
  • FIG. 11 schematically illustrates an image decoding method by a decoding apparatus according to the present invention.
  • FIG. 12 schematically illustrates a decoding apparatus for performing an image decoding method according to the present invention.
  • each configuration in the drawings described in the present invention are shown independently for the convenience of description of the different characteristic functions, it does not mean that each configuration is implemented by separate hardware or separate software.
  • two or more of each configuration may be combined to form one configuration, or one configuration may be divided into a plurality of configurations.
  • Embodiments in which each configuration is integrated and / or separated are also included in the scope of the present invention without departing from the spirit of the present invention.
  • the present invention relates to video / image coding.
  • the method / embodiment disclosed herein may be applied to the method disclosed in the versatile video coding (VVC) standard or the next generation video / image coding standard.
  • VVC versatile video coding
  • a picture generally refers to a unit representing one image of a specific time zone
  • a slice is a unit constituting a part of a picture in coding.
  • One picture may be composed of a plurality of slices, and if necessary, the picture and the slice may be mixed with each other.
  • a pixel or a pel may refer to a minimum unit constituting one picture (or image). Also, 'sample' may be used as a term corresponding to a pixel.
  • a sample may generally represent a pixel or a value of a pixel, and may only represent pixel / pixel values of the luma component, or only pixel / pixel values of the chroma component.
  • a unit represents the basic unit of image processing.
  • the unit may include at least one of a specific region of the picture and information related to the region.
  • the unit may be used interchangeably with terms such as block or area in some cases.
  • an M ⁇ N block may represent a set of samples or transform coefficients composed of M columns and N rows.
  • FIG. 1 is a diagram schematically illustrating a configuration of a video encoding apparatus to which the present invention may be applied.
  • the video encoding apparatus 100 may include a picture splitter 105, a predictor 110, a residual processor 120, an entropy encoder 130, an adder 140, and a filter 150. ) And memory 160.
  • the residual processing unit 120 may include a subtraction unit 121, a conversion unit 122, a quantization unit 123, a reordering unit 124, an inverse quantization unit 125, and an inverse conversion unit 126.
  • the picture divider 105 may divide the input picture into at least one processing unit.
  • the processing unit may be called a coding unit (CU).
  • the coding unit may be recursively split from the largest coding unit (LCU) according to a quad-tree binary-tree (QTBT) structure.
  • LCU largest coding unit
  • QTBT quad-tree binary-tree
  • one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad tree structure and / or a binary tree structure.
  • the quad tree structure may be applied first and the binary tree structure may be applied later.
  • the binary tree structure may be applied first.
  • the coding procedure according to the present invention may be performed based on the final coding unit that is no longer split.
  • the maximum coding unit may be used as the final coding unit immediately based on coding efficiency according to the image characteristic, or if necessary, the coding unit is recursively divided into coding units of lower depths and optimized.
  • a coding unit of size may be used as the final coding unit.
  • the coding procedure may include a procedure of prediction, transform, and reconstruction, which will be described later.
  • the processing unit may include a coding unit (CU) prediction unit (PU) or a transform unit (TU).
  • the coding unit may be split from the largest coding unit (LCU) into coding units of deeper depths along the quad tree structure.
  • LCU largest coding unit
  • the maximum coding unit may be used as the final coding unit immediately based on coding efficiency according to the image characteristic, or if necessary, the coding unit is recursively divided into coding units of lower depths and optimized.
  • a coding unit of size may be used as the final coding unit. If a smallest coding unit (SCU) is set, the coding unit may not be split into smaller coding units than the minimum coding unit.
  • the final coding unit refers to a coding unit that is the basis of partitioning or partitioning into a prediction unit or a transform unit.
  • the prediction unit is a unit partitioning from the coding unit and may be a unit of sample prediction. In this case, the prediction unit may be divided into sub blocks.
  • the transform unit may be divided along the quad tree structure from the coding unit, and may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.
  • a coding unit may be called a coding block (CB)
  • a prediction unit is a prediction block (PB)
  • a transform unit may be called a transform block (TB).
  • a prediction block or prediction unit may mean a specific area in the form of a block within a picture, and may include an array of prediction samples.
  • a transform block or a transform unit may mean a specific area in a block form within a picture, and may include an array of transform coefficients or residual samples.
  • the prediction unit 110 may perform a prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples of the current block.
  • the unit of prediction performed by the prediction unit 110 may be a coding block, a transform block, or a prediction block.
  • the prediction unit 110 may determine whether intra prediction or inter prediction is applied to the current block. As an example, the prediction unit 110 may determine whether intra prediction or inter prediction is applied on a CU basis.
  • the prediction unit 110 may derive a prediction sample for the current block based on reference samples outside the current block in the picture to which the current block belongs (hereinafter, referred to as the current picture). In this case, the prediction unit 110 may (i) derive the prediction sample based on the average or interpolation of neighboring reference samples of the current block, and (ii) the neighbor reference of the current block.
  • the prediction sample may be derived based on a reference sample present in a specific (prediction) direction with respect to the prediction sample among the samples. In case of (i), it may be called non-directional mode or non-angle mode, and in case of (ii), it may be called directional mode or angular mode.
  • the prediction mode may have, for example, 33 directional prediction modes and at least two non-directional modes.
  • the non-directional mode may include a DC prediction mode and a planner mode (Planar mode).
  • the prediction unit 110 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
  • the prediction unit 110 may derive the prediction sample for the current block based on the sample specified by the motion vector on the reference picture.
  • the prediction unit 110 may apply one of a skip mode, a merge mode, and a motion vector prediction (MVP) mode to derive a prediction sample for the current block.
  • the prediction unit 110 may use the motion information of the neighboring block as the motion information of the current block.
  • the skip mode unlike the merge mode, the difference (residual) between the prediction sample and the original sample is not transmitted.
  • the MVP mode the motion vector of the current block may be derived using the motion vector of the neighboring block as a motion vector predictor.
  • the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block present in the reference picture.
  • a reference picture including the temporal neighboring block may be called a collocated picture (colPic).
  • the motion information may include a motion vector and a reference picture index.
  • Information such as prediction mode information and motion information may be encoded (entropy) and output in the form of a bitstream.
  • the highest picture on the reference picture list may be used as the reference picture.
  • Reference pictures included in a reference picture list may be sorted based on a difference in a picture order count (POC) between a current picture and a corresponding reference picture.
  • POC picture order count
  • the subtraction unit 121 generates a residual sample which is a difference between the original sample and the prediction sample.
  • residual samples may not be generated as described above.
  • the transform unit 122 generates transform coefficients by transforming the residual sample in units of transform blocks.
  • the transform unit 122 may perform the transform according to the size of the transform block and the prediction mode applied to the coding block or the prediction block that spatially overlaps the transform block. For example, if intra prediction is applied to the coding block or the prediction block that overlaps the transform block, and the transform block is a 4 ⁇ 4 residual array, the residual sample is configured to perform a discrete sine transform (DST) transform kernel.
  • the residual sample may be transformed using a discrete cosine transform (DCT) transform kernel.
  • DST discrete sine transform
  • DCT discrete cosine transform
  • the quantization unit 123 may quantize the transform coefficients to generate quantized transform coefficients.
  • the reordering unit 124 rearranges the quantized transform coefficients.
  • the reordering unit 124 may reorder the quantized transform coefficients in the form of a block into a one-dimensional vector form through a coefficient scanning method. Although the reordering unit 124 has been described in a separate configuration, the reordering unit 124 may be part of the quantization unit 123.
  • the entropy encoding unit 130 may perform entropy encoding on the quantized transform coefficients.
  • Entropy encoding may include, for example, encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), and the like.
  • the entropy encoding unit 130 may encode information necessary for video reconstruction other than the quantized transform coefficient (for example, a value of a syntax element) together or separately. Entropy encoded information may be transmitted or stored in units of network abstraction layer (NAL) units in the form of bitstreams.
  • NAL network abstraction layer
  • the inverse quantization unit 125 inverse quantizes the quantized values (quantized transform coefficients) in the quantization unit 123, and the inverse transformer 126 inverse transforms the inverse quantized values in the inverse quantization unit 125 to obtain a residual sample.
  • the adder 140 reconstructs the picture by combining the residual sample and the predictive sample.
  • the residual sample and the predictive sample may be added in units of blocks to generate a reconstructed block.
  • the adder 140 may be part of the predictor 110.
  • the adder 140 may be called a restoration unit or a restoration block generation unit.
  • the filter unit 150 may apply a deblocking filter and / or a sample adaptive offset to the reconstructed picture. Through deblocking filtering and / or sample adaptive offset, the artifacts of the block boundaries in the reconstructed picture or the distortion in the quantization process can be corrected.
  • the sample adaptive offset may be applied on a sample basis and may be applied after the process of deblocking filtering is completed.
  • the filter unit 150 may apply an adaptive loop filter (ALF) to the reconstructed picture. ALF may be applied to the reconstructed picture after the deblocking filter and / or sample adaptive offset is applied.
  • ALF adaptive loop filter
  • the memory 160 may store reconstructed pictures (decoded pictures) or information necessary for encoding / decoding.
  • the reconstructed picture may be a reconstructed picture after the filtering process is completed by the filter unit 150.
  • the stored reconstructed picture may be used as a reference picture for (inter) prediction of another picture.
  • the memory 160 may store (reference) pictures used for inter prediction.
  • pictures used for inter prediction may be designated by a reference picture set or a reference picture list.
  • FIG. 2 is a diagram schematically illustrating a configuration of a video decoding apparatus to which the present invention may be applied.
  • the video decoding apparatus 200 may include an entropy decoding unit 210, a residual processor 220, a predictor 230, an adder 240, a filter 250, and a memory 260. It may include.
  • the residual processor 220 may include a rearrangement unit 221, an inverse quantization unit 222, and an inverse transform unit 223.
  • the video decoding apparatus 200 may restore video in response to a process in which video information is processed in the video encoding apparatus.
  • the video decoding apparatus 200 may perform video decoding using a processing unit applied in the video encoding apparatus.
  • the processing unit block of video decoding may be, for example, a coding unit, and in another example, a coding unit, a prediction unit, or a transform unit.
  • the coding unit may be split along the quad tree structure and / or binary tree structure from the largest coding unit.
  • the prediction unit and the transform unit may be further used in some cases, in which case the prediction block is a block derived or partitioned from the coding unit and may be a unit of sample prediction. At this point, the prediction unit may be divided into subblocks.
  • the transform unit may be divided along the quad tree structure from the coding unit, and may be a unit for deriving a transform coefficient or a unit for deriving a residual signal from the transform coefficient.
  • the entropy decoding unit 210 may parse the bitstream and output information necessary for video reconstruction or picture reconstruction. For example, the entropy decoding unit 210 decodes information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, quantized values of syntax elements necessary for video reconstruction, and residual coefficients. Can be output.
  • a coding method such as exponential Golomb coding, CAVLC, or CABAC, quantized values of syntax elements necessary for video reconstruction, and residual coefficients. Can be output.
  • the CABAC entropy decoding method receives a bin corresponding to each syntax element in a bitstream, and decodes syntax element information and decoding information of neighboring and decoding target blocks or information of symbols / bins decoded in a previous step.
  • the context model may be determined using the context model, the probability of occurrence of a bin may be predicted according to the determined context model, and arithmetic decoding of the bin may be performed to generate a symbol corresponding to the value of each syntax element. have.
  • the CABAC entropy decoding method may update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bean after determining the context model.
  • the information related to the prediction among the information decoded by the entropy decoding unit 210 is provided to the prediction unit 230, and the residual value on which the entropy decoding has been performed by the entropy decoding unit 210, that is, the quantized transform coefficient, is used as a reordering unit ( 221 may be input.
  • the reordering unit 221 may rearrange the quantized transform coefficients in a two-dimensional block form.
  • the reordering unit 221 may perform reordering in response to coefficient scanning performed by the encoding apparatus.
  • the rearrangement unit 221 has been described in a separate configuration, but the rearrangement unit 221 may be part of the inverse quantization unit 222.
  • the inverse quantization unit 222 may dequantize the quantized transform coefficients based on the (inverse) quantization parameter and output the transform coefficients.
  • information for deriving a quantization parameter may be signaled from the encoding apparatus.
  • the inverse transform unit 223 may inversely transform transform coefficients to derive residual samples.
  • the prediction unit 230 may perform prediction on the current block and generate a predicted block including prediction samples for the current block.
  • the unit of prediction performed by the prediction unit 230 may be a coding block, a transform block, or a prediction block.
  • the prediction unit 230 may determine whether to apply intra prediction or inter prediction based on the information about the prediction.
  • a unit for determining which of intra prediction and inter prediction is to be applied and a unit for generating a prediction sample may be different.
  • the unit for generating a prediction sample in inter prediction and intra prediction may also be different.
  • whether to apply inter prediction or intra prediction may be determined in units of CUs.
  • a prediction mode may be determined and a prediction sample may be generated in PU units
  • intra prediction a prediction mode may be determined in PU units and a prediction sample may be generated in TU units.
  • the prediction unit 230 may derive the prediction sample for the current block based on the neighbor reference samples in the current picture.
  • the prediction unit 230 may derive the prediction sample for the current block by applying the directional mode or the non-directional mode based on the neighbor reference samples of the current block.
  • the prediction mode to be applied to the current block may be determined using the intra prediction mode of the neighboring block.
  • the prediction unit 230 may derive the prediction sample for the current block based on the sample specified on the reference picture by the motion vector on the reference picture.
  • the prediction unit 230 may apply any one of a skip mode, a merge mode, and an MVP mode to derive a prediction sample for the current block.
  • motion information required for inter prediction of the current block provided by the video encoding apparatus for example, information about a motion vector, a reference picture index, and the like may be obtained or derived based on the prediction information.
  • the motion information of the neighboring block may be used as the motion information of the current block.
  • the neighboring block may include a spatial neighboring block and a temporal neighboring block.
  • the prediction unit 230 may construct a merge candidate list using motion information of available neighboring blocks, and may use information indicated by the merge index on the merge candidate list as a motion vector of the current block.
  • the merge index may be signaled from the encoding device.
  • the motion information may include a motion vector and a reference picture. When the motion information of the temporal neighboring block is used in the skip mode and the merge mode, the highest picture on the reference picture list may be used as the reference picture.
  • the difference (residual) between the prediction sample and the original sample is not transmitted.
  • the motion vector of the current block may be derived using the motion vector of the neighboring block as a motion vector predictor.
  • the neighboring block may include a spatial neighboring block and a temporal neighboring block.
  • a merge candidate list may be generated by using a motion vector of a reconstructed spatial neighboring block and / or a motion vector corresponding to a Col block, which is a temporal neighboring block.
  • the motion vector of the candidate block selected from the merge candidate list is used as the motion vector of the current block.
  • the information about the prediction may include a merge index indicating a candidate block having an optimal motion vector selected from candidate blocks included in the merge candidate list.
  • the prediction unit 230 may derive the motion vector of the current block by using the merge index.
  • a motion vector predictor candidate list may be generated using a motion vector of a reconstructed spatial neighboring block and / or a motion vector corresponding to a Col block which is a temporal neighboring block.
  • the prediction information may include a prediction motion vector index indicating an optimal motion vector selected from the motion vector candidates included in the list.
  • the prediction unit 230 may select the predicted motion vector of the current block from the motion vector candidates included in the motion vector candidate list using the motion vector index.
  • the prediction unit of the encoding apparatus may obtain a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, and may encode the output vector in a bitstream form. That is, MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block.
  • the prediction unit 230 may obtain a motion vector difference included in the information about the prediction, and derive the motion vector of the current block by adding the motion vector difference and the motion vector predictor.
  • the prediction unit may also obtain or derive a reference picture index or the like indicating a reference picture from the information about the prediction.
  • the adder 240 may reconstruct the current block or the current picture by adding the residual sample and the predictive sample.
  • the adder 240 may reconstruct the current picture by adding the residual sample and the predictive sample in block units. Since the residual is not transmitted when the skip mode is applied, the prediction sample may be a reconstruction sample.
  • the adder 240 has been described in a separate configuration, the adder 240 may be part of the predictor 230. On the other hand, the adder 240 may be called a restoration unit or a restoration block generation unit.
  • the filter unit 250 may apply the deblocking filtering sample adaptive offset, and / or ALF to the reconstructed picture.
  • the sample adaptive offset may be applied in units of samples and may be applied after deblocking filtering.
  • ALF may be applied after deblocking filtering and / or sample adaptive offset.
  • the memory 260 may store reconstructed pictures (decoded pictures) or information necessary for decoding.
  • the reconstructed picture may be a reconstructed picture after the filtering process is completed by the filter unit 250.
  • the memory 260 may store pictures used for inter prediction.
  • pictures used for inter prediction may be designated by a reference picture set or a reference picture list.
  • the reconstructed picture can be used as a reference picture for another picture.
  • the memory 260 may output the reconstructed picture in an output order.
  • an inter prediction method considering the distortion of an image has been proposed.
  • an affine motion model has been proposed to efficiently derive a motion vector for sub-blocks or sample points of a current block, and to increase the accuracy of inter prediction despite deformation of image rotation, zoom-in or zoom-out.
  • an affine motion model is proposed which derives a motion vector for sub-blocks or sample points of a current block. Prediction using the affine motion model may be called affine inter prediction or affine motion prediction.
  • the affine inter prediction using the affine motion model can efficiently express four motions, that is, four deformations as described later, as described below.
  • a motion that can be represented through the affine motion model may include a translation motion, a scale motion, a rotate motion, and a shear motion. That is, in addition to the translational movement in which an image (part of) is planarly moved in accordance with the flow of time illustrated in FIG. 3, the scale movement in which the image (part) is scaled over time, and the time It is possible to efficiently represent a rotational motion in which a part of the image rotates and a shear motion in which the part of the image is equilateral with a quadrilateral deformation as time passes through the affine inter prediction.
  • the encoding device / decoding device may predict the distortion shape of the image based on the motion vectors at the control points (CPs) of the current block through the affine inter prediction, thereby increasing the accuracy of the prediction. It can improve the compression performance of the image.
  • the motion vector for at least one control point of the current block may be derived using the motion vector of the neighboring block of the current block, the data amount burden on additional information to be added is reduced, and inter prediction efficiency is improved. It can be improved considerably.
  • motion information at three control points that is, three reference points may be required.
  • Sample positions can be defined as the control points.
  • the control point of the (0,0) sample position may be CP0
  • the control point of the (w, 0) sample position may be CP1
  • the control point of the (0, h) sample position may be CP2.
  • Equation for the affine motion model may be derived using the above-described control point and the motion vector of the corresponding control point. Equation for the affine motion model can be expressed as follows.
  • w represents the width of the current block 400
  • h represents the height of the current block 400
  • v 0x , v 0y are the x component, y of the motion vector of CP0, respectively.
  • the component represents v 1x and v 1y each represent x component and y component of the motion vector of CP1
  • the v 2x and v 2y represent x component and y component of the motion vector of CP2, respectively.
  • x represents the x component of the position of the target sample in the current block 400
  • y represents the y component of the position of the target sample in the current block 400
  • v x is the current block 400
  • the x component, v y of the motion vector of the target sample in) denotes the y component of the motion vector of the target sample in the current block 400.
  • a motion vector according to the sample position in the current block can be derived based on Equation (1). That is, according to the affine motion model, the motion vectors v0 (v 0x , v 0y ) at the control points, based on a distance ratio between the coordinates (x, y) of the target sample and the three control points, v1 (v 1x , v 1y ) and v2 (v 2x , v 2y ) may be scaled to derive a motion vector of the target sample according to the target sample position.
  • a motion vector of each sample in the current block may be derived based on the motion vectors of the control points.
  • the set of motion vectors of samples in the current block derived according to the affine motion model may be referred to as an affine motion vector field (MVF).
  • Equation 1 six parameters of Equation 1 may be represented by a, b, c, d, e, and f as shown in the following equation, and the equation for the affine motion model represented by the six parameters is as follows. May be the same as
  • w represents the width of the current block 400
  • h represents the height of the current block 400
  • v 0x , v 0y are the x component, y of the motion vector of CP0, respectively.
  • the component represents v 1x and v 1y each represent x component and y component of the motion vector of CP1
  • the v 2x and v 2y represent x component and y component of the motion vector of CP2, respectively.
  • x represents the x component of the position of the target sample in the current block 400
  • y represents the y component of the position of the target sample in the current block 400
  • v x is the current block 400
  • the x component, v y of the motion vector of the target sample in) denotes the y component of the motion vector of the target sample in the current block 400.
  • the affine motion model or the affine inter prediction using the six parameters may be referred to as a six parameter affine motion model or AF6.
  • motion information from two control points that is, two reference points may be required.
  • the affine motion model using two control points can represent three motions including translational motion, scale motion, and rotational motion.
  • the affine motion model representing three motions may be referred to as a simplicity affine motion model or a simplified affine motion model.
  • control points can be set.
  • the control point of the (0,0) sample position may be CP0
  • the control point of the (w, 0) sample position may be CP1.
  • Equation for the affine motion model may be derived using the above-described control point and the motion vector of the corresponding control point. Equation for the affine motion model can be expressed as follows.
  • w represents the width of the current block 500
  • v 0x , v 0y represents the x component and y component of the motion vector of CP0, respectively
  • v 1x , v 1y represents the motion vector of CP1, respectively.
  • the x component and the y component are shown.
  • x represents the x component of the position of the target sample in the current block 500
  • y represents the y component of the position of the target sample in the current block 500
  • v x is the current block 500
  • the x component, v y of the motion vector of the target sample in) denotes the y component of the motion vector of the target sample in the current block 500.
  • Equation 3 the four parameters for Equation 3 may be represented by a, b, c, and d as in the following Equation, and the equation for the affine motion model represented by the four parameters may be as follows. .
  • w represents the width of the current block 500
  • v 0x , v 0y represents the x component and y component of the motion vector of CP0, respectively
  • v 1x , v 1y represents the motion vector of CP1, respectively.
  • the x component and the y component are shown.
  • x represents the x component of the position of the target sample in the current block 500
  • y represents the y component of the position of the target sample in the current block 500
  • v x is the current block 500
  • the x component, v y of the motion vector of the target sample in) denotes the y component of the motion vector of the target sample in the current block 500.
  • the affine motion model using the two control points may be represented by four parameters a, b, c, and d as shown in Equation 4.
  • the affine motion model using the four parameters may be referred to as a four parameter affine motion model or AF4. That is, according to the affine motion model, a motion vector of each sample in the current block may be derived based on the motion vectors of the control points. Meanwhile, the set of motion vectors of samples in the current block derived according to the affine motion model may be referred to as an affine motion vector field (MVF).
  • MVF affine motion vector field
  • a motion vector of a sample unit may be derived through the affine motion model, and through this, the accuracy of inter prediction may be significantly improved. In this case, however, the complexity in the motion compensation process may be greatly increased.
  • a motion vector of a sub block unit of the current block may be derived.
  • 6 exemplarily illustrates a method of deriving a motion vector on a sub-block basis based on the affine motion model.
  • 6 exemplarily illustrates a case in which the size of the current block is 16 ⁇ 16 and a motion vector is derived in units of 4 ⁇ 4 subblocks.
  • the sub block may be set to various sizes. For example, when the sub block is set to n ⁇ n size (n is a positive integer, ex, n is 4), the current block is based on the affine motion model.
  • a motion vector may be derived in units of n ⁇ n subblocks, and various methods for deriving a motion vector representing each subblock may be applied.
  • a motion vector of each subblock may be derived using the center or lower right side sample position of each subblock as a representative coordinate.
  • the lower right position of the center may indicate a sample position located on the lower right side among four samples located at the center of the sub block.
  • n is an odd number
  • one sample may be located at the center of the sub block, and in this case, the center sample position may be used for deriving the motion vector of the sub block.
  • n is an even number
  • four samples may be adjacent to the center of the subblock, and in this case, the lower right sample position may be used to derive the motion vector.
  • representative coordinates of each subblock may be derived as (2, 2), (6, 2), (10, 2), ..., (14, 14), and encoding.
  • the device / decoding device may derive a motion vector of each subblock by substituting each of the representative coordinates of the subblocks into Equation 1 or 3 described above.
  • the motion vectors of the subblocks in the current block derived through the affine motion model may be referred to as affine MVF.
  • the size of the sub block in the current block may be derived based on the following equation.
  • M represents the width of the sub block
  • N represents the height of the sub block.
  • v 0x, v 0y denotes an x component, y component of CPMV0 of the current block, respectively
  • v 0x, v 0y are each the current represents the CPMV1 x component
  • y component of the block w is in the current block Width
  • h represents the height of the current block
  • MvPre represents the motion vector fraction accuracy.
  • the motion vector fraction accuracy may be set to 1/16.
  • affine motion prediction there may be an affine merge mode (AF_MRG) mode and an affine motion vector prediction (AF_MVP) mode.
  • AF_MRG affine merge mode
  • AF_MVP affine motion vector prediction
  • the merge merge mode is similar to the existing merge mode in that MVD is not transmitted for the motion vector of the control points. That is, the affine merge mode is similar to the conventional skip / merge mode, and each of two or three control points from neighboring blocks of the current block without coding for motion vector difference (MVD).
  • MVD motion vector difference
  • MVs for CP0 and CP1 may be derived from the neighboring block to which the affine mode is applied among the neighboring blocks of the current block. That is, CPMV0 and CPMV1 of the neighboring block to which the affine mode is applied may be derived as a merge candidate, and the merge candidate may be derived as CPMV0 and CPMV1 for the current block.
  • the AF_MVP mode derives a motion vector predictor (MVP) for a motion vector of the control points, derives a motion vector of the control points based on the received motion vector difference (MVD) and the MVP,
  • MVP motion vector predictor
  • MVD received motion vector difference
  • An inter-prediction that derives an MVF of the current block based on a motion vector and performs prediction based on the affine MVF may be represented.
  • the motion vector of the control point may be represented as a control point motion vector (CPMV)
  • the MVP of the control point is a control point motion vector predictor (CPMVP)
  • the MVD of the control point may be represented as a control point motion vector difference (CPMVD).
  • the encoding apparatus may derive a control point point motion vector predictor (CPMVP) and a control point point motion vector (CPMVP) for each of CP0 and CP1 (or CP0, CP1 and CP2), and the CPMVP CPMVD, the difference between CPMV and CPMV, can be transmitted or stored.
  • CPMVP control point point motion vector predictor
  • CPMVP control point point motion vector predictor
  • the encoding device / decoding device is also in the affine prediction mode for the current block. You can decide whether to perform
  • the encoding device / decoding device may derive the CPMV of the current block based on the neighboring block of the current block. For example, when an affine motion model using four parameters is applied, the encoding device / decoding device substitutes the coordinates of the CP of the neighboring block and the coordinates of the current block into Equation 3 described above.
  • the CPMV for the block can be derived.
  • the affine prediction mode when the affine prediction mode is applied to the current block, a CPMV for the current block is derived, and the motion vector of each sample or subblock is divided by dividing the current block into units of samples or subblocks based on the derived CPMV.
  • the calculation process is required at the same time.
  • the affine prediction mode can represent not only translation but also various movements such as rotation and scaling, it requires a large amount of computation since calculation for each sample or subblock is required at the same time.
  • the present invention maximizes the characteristics of the neighboring block encoded / decoded by the affine prediction method in the prediction of the current block, but prevents the motion compensation by dividing the data into samples or sub-blocks, thereby increasing the memory access speed.
  • This paper proposes a method to improve the prediction accuracy rather than saving the motion by simply using the motion vectors of neighboring blocks.
  • the present invention derives a motion vector for a center position of a current block by using a control point motion vector (CPMV) of a neighboring block, and uses the derived motion vector as an MVP for the current block. Suggest how to.
  • CPMV control point motion vector
  • FIG. 7 illustrates an example of deriving a motion vector with respect to the center position of the current block based on the CPMV of the neighboring block.
  • a left neighboring block of the current block may be a block predicted in an affine prediction mode.
  • the motion vector 700 of the center position with respect to the current block may be derived based on the CPMV of the left neighboring block.
  • the motion vector for the center position of the current block may be derived based on the following equation.
  • MV c (v x , v y ) represents a motion vector with respect to the center position of the current block.
  • v x represents the x component of the motion vector with respect to the center position of the current block, and
  • v y represents the y component of the motion vector with respect to the center position of the current block.
  • v 0x denotes the x component of the CPMV0 of the peripheral block
  • v 0y denotes a y component of the CPMV0 of the peripheral block
  • v 1x represents the x component of the CPMV1 of the peripheral block
  • v 1y is the peripheral block
  • h denotes the height of the current block
  • w denotes the width of the current block.
  • the CPMV0 of the neighboring block may represent a motion vector of CP0 (Control Point 0) of the neighboring block
  • the CPMV1 of the neighboring block may represent a motion vector of CP1 (Control Point 1) of the neighboring block.
  • the CP0 may indicate a top left position of the neighboring block
  • the CP1 may indicate a top right position of the neighboring block.
  • the control point of the (a, b) sample position is the control point of CP0, (a + w n , b) sample position.
  • the derived motion vector is a spatial MVP for the current block as a motion vector of a neighboring block from which CP is derived (for example, a left neighboring block in FIG. 7). Can be used as a candidate. That is, the motion vector for the center position may be derived as the MVP candidate for the current block.
  • a method of deriving a motion vector for the center position of the current block based on the 4-parameter affine motion model is illustrated as an example.
  • a motion model eg, a 6 parameter affine motion model
  • a motion vector for the center position of the current block may be derived based on the affine motion model other than the 4 parameter affine motion model, and the derived motion vector may be applied as an MVP for the current block.
  • FIG. 8 illustrates an example of using a motion vector of a center position of a current block derived based on the CPMV of a neighboring block as the MVP of the current block.
  • the motion vector for the center position of the current block derived based on the CPMV of the neighboring block may be used as the MVP of the current block, and the motion vector 800 of the current block is based on the MVP.
  • Can be derived For example, a motion vector difference (MVD) for the current block may be obtained, and the motion vector of the current block may be derived based on the MVP and the MVD.
  • MVD motion vector difference
  • a prediction block for the current block may be derived based on the reference block 810 indicated by the motion vector 800.
  • the following embodiments may be proposed as a method of utilizing a motion vector for the center position of the current block derived based on the CPMV of the neighboring block.
  • the motion vector may be used as a spatial merge candidate in merge mode. For example, if a merge mode is applied to the current block and the value of the affine prediction flag for the current block is 0 (that is, if the affine prediction is not applied to the current block), the affine of the current block is A motion vector for a center position may be derived from the current block based on the CPMV of the neighboring block to which the prediction is applied, and the motion vector may be derived as a merge candidate as the motion vector of the spatial neighboring block of the current block.
  • the above embodiment can always be performed in the decoding apparatus.
  • information indicating whether the embodiment is applied may be signaled through high level syntax such as a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header.
  • the embodiment may be used variably based on the information.
  • whether the embodiment is applied or not may be adaptively determined by using the size of the current block, the number of samples, or mode information of a neighboring block as a condition. That is, it may be determined whether the embodiment is applied based on the size of the current block or the number of samples or mode information of the neighboring block.
  • the motion vector may be used as a spatial MVP candidate in AMVP mode. For example, if the AMVP mode is applied to the current block, and the value of the affine prediction flag for the current block is 0 (ie, if the affine prediction is not applied to the current block), the current Based on the CPMV of the neighboring block to which the affine prediction of the block is applied, a motion vector for a center position may be derived from the current block, and the motion vector may be derived as an AMVP candidate as a motion vector of a spatial neighboring block of the current block. Can be.
  • information indicating whether the embodiment is applied may be signaled through high level syntax such as a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header.
  • the embodiment may be used variably based on the information.
  • whether the embodiment is applied or not may be adaptively determined by using the size of the current block, the number of samples, or mode information of a neighboring block as a condition. That is, it may be determined whether the embodiment is applied based on the size of the current block or the number of samples or mode information of the neighboring block.
  • FIG. 9 schematically illustrates an image encoding method by an encoding apparatus according to the present invention.
  • the method disclosed in FIG. 9 may be performed by the encoding apparatus disclosed in FIG. 1.
  • S900 to S920 of FIG. 9 may be performed by the prediction unit of the encoding apparatus
  • S930 may be performed by the entropy encoding unit of the encoding apparatus.
  • a process of deriving a residual sample for the current block based on the original sample and the prediction sample for the current block may be performed by a subtractor of the encoding apparatus
  • the generating of the information about the residual on the basis of the current block may be performed by a converter of the encoding apparatus, and the encoding of the information about the residual may be performed by an entropy encoding unit of the encoding apparatus. Can be performed.
  • the encoding apparatus derives motion vectors of control points (CPs) of neighboring blocks with respect to the current block (S900).
  • the encoding device may derive the motion vectors of the control points of the neighboring block for the current block. Two CPs may be used or three CPs may be used.
  • the neighboring block may be a neighboring block to which affine prediction is applied. That is, the neighboring block may be a block encoded / decoded based on the affine prediction.
  • the neighboring block may be one of neighboring blocks with respect to the current block.
  • the neighboring blocks may include spatial neighboring blocks and / or temporal neighboring blocks.
  • the spatial peripheral block may include a left peripheral block, an upper peripheral block, an upper left corner peripheral block, a lower left corner peripheral block, and a right upper corner peripheral block of the current block. For example, when the size of the current block is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the left neighboring block is (-1, H-1).
  • a block containing a sample of coordinates wherein the upper peripheral block is a block containing a sample of (W-1, -1) coordinates, and the right upper corner peripheral block includes a sample of (W, -1) coordinates Block
  • the lower left corner peripheral block may be a block including samples of (-1, H) coordinates
  • the upper left corner peripheral block may be a block including samples of (-1, -1) coordinates.
  • the temporal neighboring block may include the same position block including a position within a reference picture corresponding to an upper left position, a lower right position, a center upper right position, and / or a center lower left position of the current block.
  • the number of CPs for the neighboring block may be two.
  • the coordinate of CP0 among the CPs is (a , b)
  • the coordinate of CP1 may be (a + w n , b).
  • the number of CPs for the neighboring block may be three.
  • the coordinate of the upper left sample position of the neighboring block is (a, b)
  • the height of the neighboring block is h n
  • the width is w n
  • the coordinate of CP0 among the CPs is (a, b)
  • the coordinate of CP1 may be (a + w n , b)
  • the coordinate of CP2 may be (a, b + h n ).
  • the encoding apparatus derives a motion vector with respect to the center position of the current block based on the motion vectors of the CPs (S910).
  • the encoding apparatus applies the motion vectors of the control points of the neighboring block and the center position of the current block to an affine motion model such as Equation 1 or Equation 3 above, so that the encoding of the center position of the current block is performed.
  • a motion vector can be derived.
  • the motion vector for the center position may be derived based on Equation 6 described above.
  • the encoding apparatus may determine whether intra prediction or inter prediction is applied to the current block.
  • the encoding apparatus may derive motion information about the current block by applying a skip mode, a merge mode, or an AMVP mode.
  • the motion information may include a motion vector and a reference picture index.
  • the encoding apparatus may configure a merge candidate list using motion information of available neighboring blocks, and select one of the merge candidates included in the merge candidate list.
  • the selected merge candidate may be derived as motion information for the current block.
  • the encoding apparatus may encode a merge index indicating the selected merge candidate among merge candidates of the merge candidate list.
  • the merge index may be included in the prediction information for the current block.
  • the encoding apparatus uses the motion vector corresponding to the motion vector of the spatial neighboring block of the current block and / or the Col block, which is a temporal neighboring block, to the motion vector predictor candidate list Can be generated. That is, a motion vector of a reconstructed spatial neighboring block and / or a motion vector corresponding to a Col block, which is a temporal neighboring block, may be used as a motion vector predictor candidate.
  • the encoding apparatus may select one motion vector predictor candidate from among motion vector predictor candidates included in the list as the prediction information of the current block, and use the selected motion vector predictor candidate as a motion vector predictor. We can derive the motion vector for.
  • the encoding apparatus may obtain a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, and may encode the same and output the encoded bitstream in the form of a bitstream. That is, MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block.
  • the encoding apparatus may encode a motion vector predictor index indicating the selected motion vector predictor candidate among the motion vector predictor candidates included in the list. The motion vector predictor index may be included in prediction information about the current block.
  • the encoding apparatus may derive a reference picture for the current block and may encode a reference picture index indicating the reference picture. The reference picture index may be included in the prediction information.
  • the encoding apparatus may encode information on inter prediction of the current block.
  • the information on the inter prediction may include information indicating whether intra prediction or inter prediction is applied to the current block.
  • the information on the inter prediction may include information (eg, a skip flag) indicating whether a skip mode is applied to the current block.
  • the information on the inter prediction may include information (eg, a merge flag) indicating whether a merge mode or an AMVP mode is applied to the current block.
  • the encoding apparatus may determine whether affine prediction is applied to the current block, and generate and encode an affine prediction flag indicating whether the affine prediction is applied to the current block.
  • the affine prediction flag When the value of the affine prediction flag is 1, the affine prediction flag may indicate that the affine prediction is applied to the current block. When the value of the affine prediction flag is 0, the affine prediction flag is 0. May indicate that the affine prediction is not applied to the current block.
  • the information on the inter prediction may include the affine prediction flag.
  • a merge mode or MVP mode is applied to the current block and affine prediction is not applied to the current block, based on the motion vectors of control points of a neighboring block to which the affine prediction is applied.
  • a motion vector for the center position of the current block may be derived, and the motion vector may be derived as a merge candidate or MVP candidate of the current block.
  • the encoding apparatus performs prediction on the current block based on the motion vector (S920).
  • the encoding apparatus may derive a motion vector for the current block based on the motion vector.
  • the encoding apparatus may derive a motion vector for a center position of the current block as a merge candidate of the current block.
  • the merge candidate may include a motion vector for the center position and a reference picture index of the neighboring block.
  • the encoding apparatus may derive the merge candidate as motion information of the current block, derive a reference picture based on the reference picture index, derive a reference block indicated by the motion vector on the reference picture, and
  • the reconstruction sample in the reference block may be used as a prediction sample for the current block.
  • the encoding apparatus may encode a merge index indicating the selected merge candidate among merge candidates included in the merge candidate list.
  • the encoding apparatus may derive a motion vector for the center position of the current block as the MVP candidate of the current block.
  • the encoding apparatus may derive the MVP candidate as a motion vector predictor (MVP) of the current block, and derive the motion vector for the current block through the addition of the MVP and the MVD for the current block.
  • the encoding apparatus may derive the reference block indicated by the motion vector on the reference picture for the current block, and use the reconstructed sample in the reference block as a prediction sample for the current block.
  • the encoding apparatus may generate and encode a reference picture index indicating the reference picture for the current block.
  • the encoding apparatus may obtain a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, and may encode the same and output the encoded bitstream in the form of a bitstream. That is, MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block.
  • the encoding apparatus may encode the MVP index indicating the selected MVP candidate among the motion vector predictor candidates included in the MVP candidate list.
  • the encoding device encodes information about inter prediction of the current block (S930).
  • the encoding apparatus may encode and output the information about the inter prediction of the current block in the form of a bitstream.
  • the information on the inter prediction may include information indicating whether intra prediction or inter prediction is applied to the current block.
  • the information on the inter prediction may include information (eg, a skip flag) indicating whether a skip mode is applied to the current block.
  • the information on the inter prediction may include information (eg, a merge flag) indicating whether a merge mode or an AMVP mode is applied to the current block.
  • the information on the inter prediction may include a merge index indicating the selected merge candidate.
  • the information on the inter prediction includes an MVP index indicating the selected MVP candidate, an MVD for the current block, and a reference picture index indicating a reference picture for the current block. can do.
  • the encoding apparatus may generate information about the residual based on the residual sample.
  • the information about the residual may include transform coefficients related to the residual sample.
  • the encoding device may encode the information about the residual and output the encoded information about the residual.
  • the bitstream may be transmitted to a decoding apparatus via a network or a storage medium.
  • FIG. 10 schematically illustrates an encoding apparatus for performing an image encoding method according to the present invention.
  • the method disclosed in FIG. 9 may be performed by the encoding apparatus disclosed in FIG. 10.
  • the prediction unit of the decoding apparatus of FIG. 10 may perform S900 to S920 of FIG. 9, and the entropy encoding unit of the decoding apparatus of FIG. 10 may perform S930 of FIG. 9.
  • a process of deriving a residual sample for the current block based on the original sample and the prediction sample for the current block may be performed by the subtraction unit of the encoding apparatus of FIG. 10.
  • the generating of the information about the residual for the current block based on the residual sample may be performed by the converter of the encoding apparatus of FIG. 10, and the encoding of the residual information may be performed in FIG. 10. May be performed by an entropy encoding unit of the encoding apparatus.
  • FIG. 11 schematically illustrates an image decoding method by a decoding apparatus according to the present invention.
  • the method disclosed in FIG. 11 may be performed by the decoding apparatus disclosed in FIG. 2.
  • S1600 to S1640 of FIG. 11 may be performed by the prediction unit of the decoding apparatus.
  • the process of acquiring the information about the inter prediction and the residual information of the current block through the bitstream may be performed by an entropy decoding unit of the decoding apparatus, based on the residual information.
  • Deriving the residual sample for the current block may be performed by an inverse transform unit of the decoding apparatus, and generating a reconstructed picture based on the prediction sample and the residual sample may be added by the decoding apparatus.
  • the decoding apparatus derives motion vectors of control points (CPs) of the neighboring block with respect to the current block (S1100).
  • the decoding apparatus may derive the motion vectors of the control points of the neighboring block for the current block. Two CPs may be used or three CPs may be used.
  • the neighboring block may be a neighboring block to which affine prediction is applied. That is, the neighboring block may be a block decoded based on the affine prediction.
  • the neighboring block may be one of neighboring blocks with respect to the current block.
  • the neighboring blocks may include spatial neighboring blocks and / or temporal neighboring blocks.
  • the spatial peripheral block may include a left peripheral block, an upper peripheral block, an upper left corner peripheral block, a lower left corner peripheral block, and a right upper corner peripheral block of the current block. For example, when the size of the current block is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the left neighboring block is (-1, H-1).
  • a block containing a sample of coordinates wherein the upper peripheral block is a block containing a sample of (W-1, -1) coordinates, and the right upper corner peripheral block includes a sample of (W, -1) coordinates Block
  • the lower left corner peripheral block may be a block including samples of (-1, H) coordinates
  • the upper left corner peripheral block may be a block including samples of (-1, -1) coordinates.
  • the temporal neighboring block may include the same position block including a position within a reference picture corresponding to an upper left position, a lower right position, a center upper right position, and / or a center lower left position of the current block.
  • the number of CPs for the neighboring block may be two.
  • the coordinates of the top-left sample position of the neighboring block are (a, b) and the width of the neighboring block is w n
  • the coordinate of CP0 among the CPs is (a , b)
  • the coordinate of CP1 may be (a + w n , b).
  • the number of CPs for the neighboring block may be three.
  • the coordinate of the upper left sample position of the neighboring block is (a, b)
  • the height of the neighboring block is h n
  • the width is w n
  • the coordinate of CP0 among the CPs is (a, b)
  • the coordinate of CP1 may be (a + w n , b)
  • the coordinate of CP2 may be (a, b + h n ).
  • the decoding apparatus derives a motion vector with respect to the center position of the current block based on the motion vectors of the CPs (S1110).
  • the decoding apparatus applies the motion vectors of the control points of the neighboring block and the center position of the current block to an affine motion model such as Equation 1 or Equation 3 above, so that the decoding of the center position of the current block is performed.
  • a motion vector can be derived.
  • the motion vector for the center position may be derived based on Equation 6 described above.
  • the decoding apparatus may obtain information on inter prediction of the current block through a bitstream, and determine a prediction mode of the current block based on the information on the inter prediction.
  • the decoding apparatus may apply any one of a skip mode, a merge mode, and an MVP mode.
  • the decoding apparatus may determine whether a skip mode is applied to the current block based on a skip flag for the current block.
  • the skip flag may indicate whether the skip mode is applied to the current block.
  • the decoding apparatus may determine whether a merge mode is applied to the current block based on a merge flag for the current block.
  • the merge flag may indicate whether a merge mode is applied to the current block, and the information on the inter prediction may include the merge flag.
  • the merge flag has a value of 1
  • the merge flag may indicate that the merge mode is applied to the current block.
  • the merge flag has a value of 0
  • the merge flag may have the merge mode in the current block. May not apply.
  • the MVP mode may be applied to the current block.
  • the information on the inter prediction may include an affine prediction flag.
  • the affine prediction flag may indicate whether affine prediction is applied to the current block. When the value of the affine prediction flag is 1, the affine prediction flag may indicate that the affine prediction is applied to the current block. When the value of the affine prediction flag is 0, the affine prediction flag is 0. May indicate that the affine prediction is not applied to the current block. Meanwhile, when merge mode or MVP mode is applied to the current block, and the value of the affine prediction flag for the current block is 0 (that is, when affine prediction is not applied to the current block), the affine prediction is performed.
  • the motion vector for the center position of the current block may be derived based on the motion vectors of the control points of the applied neighboring block, and the motion vector may be derived as a merge candidate or MVP candidate of the current block. have.
  • the decoding apparatus performs prediction on the current block based on the motion vector (S1120).
  • the decoding apparatus may derive a motion vector for the current block based on the motion vector.
  • the decoding apparatus may derive a motion vector for a center position of the current block as a merge candidate of the current block.
  • the merge candidate may include a motion vector for the center position and a reference picture index of the neighboring block.
  • the decoding apparatus may derive the merge candidate as motion information of the current block, derive a reference picture based on the reference picture index, derive a reference block indicated by the motion vector on the reference picture,
  • the reconstruction sample in the reference block may be used as a prediction sample for the current block.
  • the decoding apparatus may obtain a merge index of the current block and derive a merge candidate indicated by the merge index as motion information of the current block.
  • the merge index may indicate the merge candidate including a motion vector for the center position.
  • the decoding apparatus may derive a motion vector for the center position of the current block as the MVP candidate of the current block.
  • the decoding apparatus may derive the MVP candidate as a motion vector predictor (MVP) of the current block, obtain a motion vector difference (MVD) included in the information about the inter prediction, and the MVP And the motion vector for the current block can be derived through the addition of the MVD.
  • the decoding apparatus may derive a reference picture based on a reference picture index for the current block, derive a reference block indicated by the motion vector on the reference picture, and assign a reconstructed sample in the reference block to the current block. It can be used as a predictive sample.
  • the decoding apparatus may obtain the reference picture index through the bitstream.
  • the information on the inter prediction may include the reference picture index.
  • the decoding apparatus may obtain an MVP index of the current block and derive an MVP candidate indicated by the MVP index as the MVP of the current block.
  • the MVP index may indicate the MVP candidate representing a motion vector with respect to the center position.
  • the decoding apparatus may derive a predicted sample for the current block based on a reconstructed sample of the reference block indicated by the motion vector for the current block.
  • the decoding apparatus may directly use the prediction sample as a reconstruction sample according to a prediction mode, or generate a reconstruction sample by adding a residual sample to the prediction sample. If there is a residual sample for the current block, the decoding apparatus may receive information about the residual for the current block, and the information about the residual may be included in the information about the face. The information about the residual may include transform coefficients regarding the residual sample. The decoding apparatus may derive the residual sample (or residual sample array) for the current block based on the residual information. The decoding apparatus may generate a reconstructed sample based on the prediction sample and the residual sample, and may derive a reconstructed block or a reconstructed picture based on the reconstructed sample. Thereafter, as described above, the decoding apparatus may apply an in-loop filtering procedure, such as a deblocking filtering and / or SAO procedure, to the reconstructed picture in order to improve subjective / objective picture quality as necessary.
  • an in-loop filtering procedure such as a deblocking filtering and / or
  • FIG. 12 schematically illustrates a decoding apparatus for performing an image decoding method according to the present invention.
  • the method disclosed in FIG. 11 may be performed by the decoding apparatus disclosed in FIG. 12.
  • the prediction unit of the decoding apparatus of FIG. 12 may perform S1100 to S1120 of FIG. 11.
  • the process of acquiring information on the inter prediction of the current block through the bitstream and the process of acquiring information on the residual of the current block through the bitstream may be performed.
  • the derivation of the residual sample for the current block based on the residual information may be performed by an inverse transform unit of the decoding apparatus of FIG. 12.
  • a process of generating a reconstructed picture based on a sample and the residual sample may be performed by an adder of the decoding apparatus of FIG. 12.
  • the motion vector of the current block can be derived by utilizing the characteristics of the neighboring block to which the affine prediction is applied, thereby saving the memory access speed rather than simply performing the affine motion model. It is possible to improve prediction accuracy than when performing motion prediction using the motion vector of the block.
  • the motion vector of the current block is derived by utilizing the characteristics of the neighboring block to which the affine prediction is applied, but the motion compensation is prevented by dividing by the sample or sub-block unit of the current block. This avoids the problem of increased computational complexity and memory access speed.
  • 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. That is, the embodiments described in the present invention may be implemented and performed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in each drawing may be implemented and performed on a computer, processor, microprocessor, controller, or chip.
  • the decoding apparatus and encoding apparatus to which the present invention is applied include a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, a real time communication device such as video communication, and mobile streaming.
  • the OTT video device may include a game console, a Blu-ray player, an internet access TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like.
  • the processing method to which the present invention is applied can be produced in the form of a program executed by a computer, and stored in a computer-readable recording medium.
  • Multimedia data having a data structure according to the present invention can also be stored in a computer-readable recording medium.
  • the computer readable recording medium includes all kinds of storage devices and distributed storage devices in which computer readable data is stored.
  • the computer-readable recording medium may be, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical disc. It may include a data storage device.
  • the computer-readable recording medium also includes media embodied in the form of a carrier wave (eg, transmission over the Internet).
  • the bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted through a wired or wireless communication network.
  • an embodiment of the present invention may be implemented as a computer program product by program code, which may be performed on a computer by an embodiment of the present invention.
  • the program code may be stored on a carrier readable by a computer.
  • the content streaming system to which the present invention is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
  • the encoding server compresses content input from multimedia input devices such as a smart phone, a camera, a camcorder, etc. into digital data to generate a bitstream and transmit the bitstream to the streaming server.
  • multimedia input devices such as smart phones, cameras, camcorders, etc. directly generate a bitstream
  • the encoding server may be omitted.
  • the bitstream may be generated by an encoding method or a bitstream generation method to which the present invention is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
  • the streaming server transmits the multimedia data to the user device based on the user's request through the web server, and the web server serves as a medium for informing the user of what service.
  • the web server delivers it to a streaming server, and the streaming server transmits multimedia data to the user.
  • the content streaming system may include a separate control server.
  • the control server plays a role of controlling a command / response between devices in the content streaming system.
  • the streaming server may receive content from a media store and / or an encoding server. For example, when the content is received from the encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a predetermined time.
  • Examples of the user device include a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), navigation, a slate PC, Tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, glass glasses, head mounted displays), digital TVs, desktops Computer, digital signage, and the like.
  • PDA personal digital assistant
  • PMP portable multimedia player

Abstract

A method for decoding an image carried out by a decoding device, according to the present invention, comprises the steps of: deriving motion vectors of control points (CPs) of a neighboring block for a current block; deriving a motion vector for the center position of the current block on the basis of the motion vectors of the CPs; and carrying out prediction for the current block on the basis of the motion vector.

Description

영상 코딩 시스템에서 인터 예측에 따른 영상 디코딩 방법 및 장치Method and apparatus for image decoding according to inter prediction in image coding system
본 발명은 영상 코딩 기술에 관한 것으로서 보다 상세하게는 영상 코딩 시스템에서 인터 예측에 따른 영상 디코딩 방법 및 장치에 관한 것이다.The present invention relates to an image coding technique, and more particularly, to an image decoding method and apparatus according to inter prediction in an image coding system.
최근 HD(High Definition) 영상 및 UHD(Ultra High Definition) 영상과 같은 고해상도, 고품질의 영상에 대한 수요가 다양한 분야에서 증가하고 있다. 영상 데이터가 고해상도, 고품질이 될수록 기존의 영상 데이터에 비해 상대적으로 전송되는 정보량 또는 비트량이 증가하기 때문에 기존의 유무선 광대역 회선과 같은 매체를 이용하여 영상 데이터를 전송하거나 기존의 저장 매체를 이용해 영상 데이터를 저장하는 경우, 전송 비용과 저장 비용이 증가된다. Recently, the demand for high resolution and high quality images such as high definition (HD) images and ultra high definition (UHD) images is increasing in various fields. The higher the resolution and the higher quality of the image data, the more information or bit rate is transmitted than the existing image data. Therefore, the image data can be transmitted by using a medium such as a conventional wired / wireless broadband line or by using a conventional storage medium. In the case of storage, the transmission cost and the storage cost are increased.
이에 따라, 고해상도, 고품질 영상의 정보를 효과적으로 전송하거나 저장하고, 재생하기 위해 고효율의 영상 압축 기술이 요구된다.Accordingly, a high efficiency image compression technique is required to effectively transmit, store, and reproduce high resolution, high quality image information.
본 발명의 기술적 과제는 영상 코딩 효율을 높이는 방법 및 장치를 제공함에 있다.An object of the present invention is to provide a method and apparatus for improving image coding efficiency.
본 발명의 다른 기술적 과제는 어파인 예측이 적용된 주변 블록의 CPMV들을 기반으로 상기 현재 블록의 센터 포지션에 대한 움직임 벡터를 도출하고, 도출된 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행하는 영상 디코딩 방법 및 장치를 제공함에 있다.Another technical problem of the present invention is to derive a motion vector for the center position of the current block based on CPMVs of neighboring blocks to which affine prediction is applied, and to perform the prediction for the current block based on the derived motion vector. The present invention provides a decoding method and apparatus.
본 발명의 다른 기술적 과제는 어파인 예측이 적용된 주변 블록의 CPMV들을 기반으로 상기 현재 블록의 센터 포지션에 대한 움직임 벡터를 도출하고, 도출된 움직임 벡터를 상기 현재 블록에 대한 움직임 후보로 사용하여 현재 블록의 인터 예측을 수행하는 영상 디코딩 방법 및 장치를 제공함에 있다.Another technical problem of the present invention is to derive a motion vector for the center position of the current block based on CPMVs of neighboring blocks to which affine prediction is applied, and use the derived motion vector as a motion candidate for the current block. The present invention provides an image decoding method and apparatus for performing inter prediction.
본 발명의 일 실시예에 따르면, 디코딩 장치에 의하여 수행되는 영상 디코딩 방법이 제공된다. 상기 방법은 현재 블록에 대한 주변 블록의 컨트롤 포인트(Control Point, CP)들의 움직임 벡터들을 도출하는 단계, 상기 CP들의 움직임 벡터들을 기반으로 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출하는 단계, 및 상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행하는 단계를 포함하는 것을 특징으로 한다.According to an embodiment of the present invention, there is provided an image decoding method performed by a decoding apparatus. The method includes deriving motion vectors of control points (CPs) of neighboring blocks with respect to a current block, and deriving a motion vector with respect to a center position of the current block based on the motion vectors of the CPs. And performing prediction on the current block based on the motion vector.
본 발명의 다른 일 실시예에 따르면, 영상 디코딩을 수행하는 디코딩 장치가 제공된다. 상기 디코딩 장치는 현재 블록에 대한 주변 블록의 컨트롤 포인트(Control Point, CP)들의 움직임 벡터들을 도출하고, 상기 CP들의 움직임 벡터들을 기반으로 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출하고, 상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행하는 예측부를 포함하는 것을 특징으로 한다.According to another embodiment of the present invention, a decoding apparatus for performing image decoding is provided. The decoding apparatus derives motion vectors of control points (CPs) of neighboring blocks with respect to the current block, and derives a motion vector with respect to the center position of the current block based on the motion vectors of the CPs. And a predictor configured to predict the current block based on the motion vector.
본 발명의 또 다른 일 실시예에 따르면, 인코딩 장치에 의하여 수행되는 비디오 인코딩 방법을 제공한다. 상기 방법은 현재 블록에 대한 주변 블록의 컨트롤 포인트(Control Point, CP)들의 움직임 벡터들을 도출하는 단계, 상기 CP들의 움직임 벡터들을 기반으로 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출하는 단계, 상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행하는 단계, 및 상기 현재 블록의 인터 예측에 대한 정보를 인코딩하는 단계를 포함하는 것을 특징으로 한다.According to another embodiment of the present invention, a video encoding method performed by an encoding apparatus is provided. The method includes deriving motion vectors of control points (CPs) of neighboring blocks with respect to a current block, and deriving a motion vector with respect to a center position of the current block based on the motion vectors of the CPs. And performing prediction on the current block based on the motion vector, and encoding information on inter prediction of the current block.
본 발명의 또 다른 일 실시예에 따르면, 비디오 인코딩 장치를 제공한다. 상기 인코딩 장치는 현재 블록에 대한 주변 블록의 컨트롤 포인트(Control Point, CP)들의 움직임 벡터들을 도출하고, 상기 CP들의 움직임 벡터들을 기반으로 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출하고, 상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행하는 예측부, 및 상기 현재 블록의 인터 예측에 대한 정보를 인코딩하는 엔트로피 인코딩부를 포함하는 것을 특징으로 한다.According to another embodiment of the present invention, a video encoding apparatus is provided. The encoding apparatus derives motion vectors of control points (CPs) of neighboring blocks with respect to the current block, and derives a motion vector with respect to the center position of the current block based on the motion vectors of the CPs. And an estimator for performing prediction on the current block based on the motion vector, and an entropy encoding unit for encoding information on inter prediction of the current block.
본 발명에 따르면 어파인 예측이 적용된 주변 블록의 특성을 최대한 활용하여 상기 현재 블록의 움직임 벡터를 도출할 수 있고, 이를 통하여 어파인 움직임 모델을 수행하는 경우보다 메모리 접근 속도를 절약하면서 단순히 주변 블록의 움직임 벡터를 사용하여 움직임 예측을 수행하는 경우보다는 예측 정확도를 향상시킬 수 있다. According to the present invention, the motion vector of the current block can be derived by utilizing the characteristics of the neighboring block to which the affine prediction is applied, and thus, the memory access speed is simply saved while saving the memory access speed compared to the case of performing the affine motion model. It is possible to improve the prediction accuracy rather than to perform the motion prediction using the motion vector.
본 발명에 따르면 어파인 예측이 적용된 주변 블록의 특성을 최대한 활용하여 상기 현재 블록의 움직임 벡터를 도출하되, 현재 블록의 샘플 또는 서브 블록 단위로 나뉘어서 움직임 보상이 수행되는 것을 방지하여 디코딩 과정의 연산 복잡도 및 메모리 접근 속도가 증가하는 문제를 방지할 수 있다.According to the present invention, the motion vector of the current block is derived by utilizing the characteristics of the neighboring block to which the affine prediction is applied, but the complexity of the decoding process is prevented by dividing the motion vector by dividing it into a sample or subblock unit of the current block. And a problem of increasing memory access speed.
도 1은 본 발명이 적용될 수 있는 비디오 인코딩 장치의 구성을 개략적으로 설명하는 도면이다. 1 is a diagram schematically illustrating a configuration of a video encoding apparatus to which the present invention may be applied.
도 2는 본 발명이 적용될 수 있는 비디오 디코딩 장치의 구성을 개략적으로 설명하는 도면이다. 2 is a diagram schematically illustrating a configuration of a video decoding apparatus to which the present invention may be applied.
도 3은 상기 어파인 움직임 모델을 통하여 표현되는 움직임을 예시적으로 나타낸다.3 exemplarily illustrates a motion expressed through the affine motion model.
도 4는 3개의 컨트롤 포인트들에 대한 움직임 벡터들이 사용되는 상기 어파인 움직임 모델을 예시적으로 나타낸다.4 exemplarily illustrates the affine motion model in which motion vectors for three control points are used.
도 5는 2개의 컨트롤 포인트들에 대한 움직임 벡터들이 사용되는 상기 어파인 움직임 모델을 예시적으로 나타낸다.5 exemplarily illustrates the affine motion model in which motion vectors for two control points are used.
도 6은 상기 어파인 움직임 모델을 기반으로 서브 블록 단위로 움직임 벡터를 유도하는 방법을 예시적으로 나타낸다.6 exemplarily illustrates a method of deriving a motion vector on a sub-block basis based on the affine motion model.
도 7은 주변 블록의 CPMV 를 기반으로 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출하는 일 예를 나타낸다.FIG. 7 illustrates an example of deriving a motion vector with respect to the center position of the current block based on the CPMV of the neighboring block.
도 8은 주변 블록의 CPMV 를 기반으로 도출된 현재 블록의 센터 포지션에 대한 움직임 벡터를 상기 현재 블록의 MVP 로 사용하는 일 예를 나타낸다.FIG. 8 illustrates an example of using a motion vector of a center position of a current block derived based on the CPMV of a neighboring block as the MVP of the current block.
도 9는 본 발명에 따른 인코딩 장치에 의한 영상 인코딩 방법을 개략적으로 나타낸다. 9 schematically illustrates an image encoding method by an encoding apparatus according to the present invention.
도 10은 본 발명에 따른 영상 인코딩 방법을 수행하는 인코딩 장치를 개략적으로 나타낸다. 10 schematically illustrates an encoding apparatus for performing an image encoding method according to the present invention.
도 11은 본 발명에 따른 디코딩 장치에 의한 영상 디코딩 방법을 개략적으로 나타낸다.11 schematically illustrates an image decoding method by a decoding apparatus according to the present invention.
도 12는 본 발명에 따른 영상 디코딩 방법을 수행하는 디코딩 장치를 개략적으로 나타낸다.12 schematically illustrates a decoding apparatus for performing an image decoding method 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. The terms "comprise" or "having" in this specification are intended to indicate that there is a feature, number, step, operation, component, part, or combination thereof described in the specification, and one or more other features It is to be understood that the numbers, steps, operations, components, parts or figures do not exclude in advance the presence or possibility of adding them.
한편, 본 발명에서 설명되는 도면상의 각 구성들은 서로 다른 특징적인 기능들에 관한 설명의 편의를 위해 독립적으로 도시된 것으로서, 각 구성들이 서로 별개의 하드웨어나 별개의 소프트웨어로 구현된다는 것을 의미하지는 않는다. 예컨대, 각 구성 중 두 개 이상의 구성이 합쳐져 하나의 구성을 이룰 수도 있고, 하나의 구성이 복수의 구성으로 나뉘어질 수도 있다. 각 구성이 통합 및/또는 분리된 실시예도 본 발명의 본질에서 벗어나지 않는 한 본 발명의 권리범위에 포함된다.On the other hand, each configuration in the drawings described in the present invention are shown independently for the convenience of description of the different characteristic functions, it does not mean that each configuration is implemented by separate hardware or separate software. 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 scope of 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 a preferred embodiment of the present invention. Hereinafter, the same reference numerals are used for the same components in the drawings, and redundant description of the same components is omitted.
한편, 본 발명은 비디오/영상 코딩에 관한 것이다. 예를 들어, 본 발명에서 개시된 방법/실시예는 VVC (versatile video coding) 표준 또는 차세대 비디오/이미지 코딩 표준에 개시된 방법에 적용될 수 있다.On the other hand, the present invention relates to video / image coding. For example, the method / embodiment disclosed herein may be applied to the method disclosed in the versatile video coding (VVC) standard or the next generation video / image coding standard.
본 명세서에서 픽처(picture)는 일반적으로 특정 시간대의 하나의 영상을 나타내는 단위를 의미하며, 슬라이스(slice)는 코딩에 있어서 픽처의 일부를 구성하는 단위이다. 하나의 픽처는 복수의 슬라이스로 구성될 수 있으며, 필요에 따라서 픽처 및 슬라이스는 서로 혼용되어 사용될 수 있다.In the present specification, a picture generally refers to a unit representing one image of a specific time zone, and a slice is a unit constituting a part of a picture in coding. One picture may be composed of a plurality of slices, and if necessary, the picture and the slice may be mixed with each other.
픽셀(pixel) 또는 펠(pel)은 하나의 픽처(또는 영상)을 구성하는 최소의 단위를 의미할 수 있다. 또한, 픽셀에 대응하는 용어로서 '샘플(sample)'이 사용될 수 있다. 샘플은 일반적으로 픽셀 또는 픽셀의 값을 나타낼 수 있으며, 휘도(luma) 성분의 픽셀/픽셀값만을 나타낼 수도 있고, 채도(chroma) 성분의 픽셀/픽셀 값만을 나타낼 수도 있다. A pixel or a pel may refer to a minimum unit constituting one picture (or image). Also, 'sample' may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a value of a pixel, and may only represent pixel / pixel values of the luma component, or only pixel / pixel values of the chroma component.
유닛(unit)은 영상 처리의 기본 단위를 나타낸다. 유닛은 픽처의 특정 영역 및 해당 영역에 관련된 정보 중 적어도 하나를 포함할 수 있다. 유닛은 경우에 따라서 블록(block) 또는 영역(area) 등의 용어와 혼용하여 사용될 수 있다. 일반적인 경우, MxN 블록은 M개의 열과 N개의 행으로 이루어진 샘플들 또는 변환 계수(transform coefficient)들의 집합을 나타낼 수 있다.A unit represents the basic unit of image processing. The unit may include at least one of a specific region of the picture and information related to the region. The unit may be used interchangeably with terms such as block or area in some cases. In a general case, an M × N block may represent a set of samples or transform coefficients composed of M columns and N rows.
도 1은 본 발명이 적용될 수 있는 비디오 인코딩 장치의 구성을 개략적으로 설명하는 도면이다. 1 is a diagram schematically illustrating a configuration of a video encoding apparatus to which the present invention may be applied.
도 1을 참조하면, 비디오 인코딩 장치(100)는 픽처 분할부(105), 예측부(110), 레지듀얼 처리부(120), 엔트로피 인코딩부(130), 가산부(140), 필터부(150) 및 메모리(160)을 포함할 수 있다. 레지듀얼 처리부(120)는 감산부(121), 변환부(122), 양자화부(123), 재정렬부(124), 역양자화부(125) 및 역변환부(126)를 포함할 수 있다. Referring to FIG. 1, the video encoding apparatus 100 may include a picture splitter 105, a predictor 110, a residual processor 120, an entropy encoder 130, an adder 140, and a filter 150. ) And memory 160. The residual processing unit 120 may include a subtraction unit 121, a conversion unit 122, a quantization unit 123, a reordering unit 124, an inverse quantization unit 125, and an inverse conversion unit 126.
픽처 분할부(105)는 입력된 픽처를 적어도 하나의 처리 유닛(processing unit)으로 분할할 수 있다. The picture divider 105 may divide the input picture into at least one processing unit.
일 예로, 처리 유닛은 코딩 유닛(coding unit, CU)이라고 불릴 수 있다. 이 경우 코딩 유닛은 최대 코딩 유닛(largest coding unit, LCU)으로부터 QTBT (Quad-tree binary-tree) 구조에 따라 재귀적으로(recursively) 분할될 수 있다. 예를 들어, 하나의 코딩 유닛은 쿼드 트리 구조 및/또는 바이너리 트리 구조를 기반으로 하위(deeper) 뎁스의 복수의 코딩 유닛들로 분할될 수 있다. 이 경우 예를 들어 쿼드 트리 구조가 먼저 적용되고 바이너리 트리 구조가 나중에 적용될 수 있다. 또는 바이너리 트리 구조가 먼저 적용될 수도 있다. 더 이상 분할되지 않는 최종 코딩 유닛을 기반으로 본 발명에 따른 코딩 절차가 수행될 수 있다. 이 경우 영상 특성에 따른 코딩 효율 등을 기반으로, 최대 코딩 유닛이 바로 최종 코딩 유닛으로 사용될 수 있고, 또는 필요에 따라 코딩 유닛은 재귀적으로(recursively) 보다 하위 뎁스의 코딩 유닛들로 분할되어 최적의 사이즈의 코딩 유닛이 최종 코딩 유닛으로 사용될 수 있다. 여기서 코딩 절차라 함은 후술하는 예측, 변환, 및 복원 등의 절차를 포함할 수 있다. As an example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively split from the largest coding unit (LCU) according to a quad-tree binary-tree (QTBT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad tree structure and / or a binary tree structure. In this case, for example, the quad tree structure may be applied first and the binary tree structure may be applied later. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present invention may be performed based on the final coding unit that is no longer split. In this case, the maximum coding unit may be used as the final coding unit immediately based on coding efficiency according to the image characteristic, or if necessary, the coding unit is recursively divided into coding units of lower depths and optimized. A coding unit of size may be used as the final coding unit. Here, the coding procedure may include a procedure of prediction, transform, and reconstruction, which will be described later.
다른 예로, 처리 유닛은 코딩 유닛(coding unit, CU) 예측 유닛(prediction unit, PU) 또는 변환 유닛(transform unit, TU)을 포함할 수도 있다. 코딩 유닛은 최대 코딩 유닛(largest coding unit, LCU)으로부터 쿼드 트리 구조를 따라서 하위(deeper) 뎁스의 코딩 유닛들로 분할(split)될 수 있다. 이 경우 영상 특성에 따른 코딩 효율 등을 기반으로, 최대 코딩 유닛이 바로 최종 코딩 유닛으로 사용될 수 있고, 또는 필요에 따라 코딩 유닛은 재귀적으로(recursively) 보다 하위 뎁스의 코딩 유닛들로 분할되어 최적의 사이즈의 코딩 유닛이 최종 코딩 유닛으로 사용될 수 있다. 최소 코딩 유닛(smallest coding unit, SCU)이 설정된 경우 코딩 유닛은 최소 코딩 유닛보다 더 작은 코딩 유닛으로 분할될 수 없다. 여기서 최종 코딩 유닛이라 함은 예측 유닛 또는 변환 유닛으로 파티셔닝 또는 분할되는 기반이 되는 코딩 유닛을 의미한다. 예측 유닛은 코딩 유닛으로부터 파티셔닝(partitioning)되는 유닛으로서, 샘플 예측의 유닛일 수 있다. 이 때, 예측 유닛은 서브 블록(sub block)으로 나뉠 수도 있다. 변환 유닛은 코딩 유닛으로부터 쿼드 트리 구조를 따라서 분할 될 수 있으며, 변환 계수를 유도하는 유닛 및/또는 변환 계수로부터 레지듀얼 신호(residual signal)를 유도하는 유닛일 수 있다. 이하, 코딩 유닛은 코딩 블록(coding block, CB), 예측 유닛은 예측 블록(prediction block, PB), 변환 유닛은 변환 블록(transform block, TB) 으로 불릴 수 있다. 예측 블록 또는 예측 유닛은 픽처 내에서 블록 형태의 특정 영역을 의미할 수 있고, 예측 샘플의 어레이(array)를 포함할 수 있다. 또한, 변환 블록 또는 변환 유닛은 픽처 내에서 블록 형태의 특정 영역을 의미할 수 있고, 변환 계수 또는 레지듀얼 샘플의 어레이를 포함할 수 있다.As another example, the processing unit may include a coding unit (CU) prediction unit (PU) or a transform unit (TU). The coding unit may be split from the largest coding unit (LCU) into coding units of deeper depths along the quad tree structure. In this case, the maximum coding unit may be used as the final coding unit immediately based on coding efficiency according to the image characteristic, or if necessary, the coding unit is recursively divided into coding units of lower depths and optimized. A coding unit of size may be used as the final coding unit. If a smallest coding unit (SCU) is set, the coding unit may not be split into smaller coding units than the minimum coding unit. Here, the final coding unit refers to a coding unit that is the basis of partitioning or partitioning into a prediction unit or a transform unit. The prediction unit is a unit partitioning from the coding unit and may be a unit of sample prediction. In this case, the prediction unit may be divided into sub blocks. The transform unit may be divided along the quad tree structure from the coding unit, and may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient. Hereinafter, a coding unit may be called a coding block (CB), a prediction unit is a prediction block (PB), and a transform unit may be called a transform block (TB). A prediction block or prediction unit may mean a specific area in the form of a block within a picture, and may include an array of prediction samples. In addition, a transform block or a transform unit may mean a specific area in a block form within a picture, and may include an array of transform coefficients or residual samples.
예측부(110)는 처리 대상 블록(이하, 현재 블록이라 함)에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부(110)에서 수행되는 예측의 단위는 코딩 블록일 수 있고, 변환 블록일 수도 있고, 예측 블록일 수도 있다.The prediction unit 110 may perform a prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples of the current block. The unit of prediction performed by the prediction unit 110 may be a coding block, a transform block, or a prediction block.
예측부(110)는 현재 블록에 인트라 예측이 적용되는지 인터 예측이 적용되는지를 결정할 수 있다. 일 예로, 예측부(110)는 CU 단위로 인트라 예측 또는 인터 예측이 적용되는지를 결정할 수 있다.The prediction unit 110 may determine whether intra prediction or inter prediction is applied to the current block. As an example, the prediction unit 110 may determine whether intra prediction or inter prediction is applied on a CU basis.
인트라 예측의 경우에, 예측부(110)는 현재 블록이 속하는 픽처(이하, 현재 픽처) 내의 현재 블록 외부의 참조 샘플을 기반으로 현재 블록에 대한 예측 샘플을 유도할 수 있다. 이 때, 예측부(110)는 (i) 현재 블록의 주변(neighboring) 참조 샘플들의 평균(average) 혹은 인터폴레이션(interpolation)을 기반으로 예측 샘플을 유도할 수 있고, (ii) 현재 블록의 주변 참조 샘플들 중 예측 샘플에 대하여 특정 (예측) 방향에 존재하는 참조 샘플을 기반으로 상기 예측 샘플을 유도할 수도 있다. (i)의 경우는 비방향성 모드 또는 비각도 모드, (ii)의 경우는 방향성(directional) 모드 또는 각도(angular) 모드라고 불릴 수 있다. 인트라 예측에서 예측 모드는 예를 들어 33개의 방향성 예측 모드와 적어도 2개 이상의 비방향성 모드를 가질 수 있다. 비방향성 모드는 DC 예측 모드 및 플래너 모드(Planar 모드)를 포함할 수 있다. 예측부(110)는 주변 블록에 적용된 예측 모드를 이용하여, 현재 블록에 적용되는 예측 모드를 결정할 수도 있다.In the case of intra prediction, the prediction unit 110 may derive a prediction sample for the current block based on reference samples outside the current block in the picture to which the current block belongs (hereinafter, referred to as the current picture). In this case, the prediction unit 110 may (i) derive the prediction sample based on the average or interpolation of neighboring reference samples of the current block, and (ii) the neighbor reference of the current block. The prediction sample may be derived based on a reference sample present in a specific (prediction) direction with respect to the prediction sample among the samples. In case of (i), it may be called non-directional mode or non-angle mode, and in case of (ii), it may be called directional mode or angular mode. In intra prediction, the prediction mode may have, for example, 33 directional prediction modes and at least two non-directional modes. The non-directional mode may include a DC prediction mode and a planner mode (Planar mode). The prediction unit 110 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.
인터 예측의 경우에, 예측부(110)는 참조 픽처 상에서 움직임 벡터에 의해 특정되는 샘플을 기반으로, 현재 블록에 대한 예측 샘플을 유도할 수 있다. 예측부(110)는 스킵(skip) 모드, 머지(merge) 모드, 및 MVP(motion vector prediction) 모드 중 어느 하나를 적용하여 현재 블록에 대한 예측 샘플을 유도할 수 있다. 스킵 모드와 머지 모드의 경우에, 예측부(110)는 주변 블록의 움직임 정보를 현재 블록의 움직임 정보로 이용할 수 있다. 스킵 모드의 경우, 머지 모드와 달리 예측 샘플과 원본 샘플 사이의 차(레지듀얼)가 전송되지 않는다. MVP 모드의 경우, 주변 블록의 움직임 벡터를 움직임 벡터 예측자(Motion Vector Predictor)로 이용하여 현재 블록의 움직임 벡터 예측자로 이용하여 현재 블록의 움직임 벡터를 유도할 수 있다.In the case of inter prediction, the prediction unit 110 may derive the prediction sample for the current block based on the sample specified by the motion vector on the reference picture. The prediction unit 110 may apply one of a skip mode, a merge mode, and a motion vector prediction (MVP) mode to derive a prediction sample for the current block. In the skip mode and the merge mode, the prediction unit 110 may use the motion information of the neighboring block as the motion information of the current block. In the skip mode, unlike the merge mode, the difference (residual) between the prediction sample and the original sample is not transmitted. In the MVP mode, the motion vector of the current block may be derived using the motion vector of the neighboring block as a motion vector predictor.
인터 예측의 경우에, 주변 블록은 현재 픽처 내에 존재하는 공간적 주변 블록(spatial neighboring block)과 참조 픽처(reference picture)에 존재하는 시간적 주변 블록(temporal neighboring block)을 포함할 수 있다. 상기 시간적 주변 블록을 포함하는 참조 픽처는 동일 위치 픽처(collocated picture, colPic)라고 불릴 수도 있다. 움직임 정보(motion information)는 움직임 벡터와 참조 픽처 인덱스를 포함할 수 있다. 예측 모드 정보와 움직임 정보 등의 정보는 (엔트로피) 인코딩되어 비트스트림 형태로 출력될 수 있다.In the case of inter prediction, the neighboring block may include a spatial neighboring block existing in the current picture and a temporal neighboring block present in the reference picture. A reference picture including the temporal neighboring block may be called a collocated picture (colPic). The motion information may include a motion vector and a reference picture index. Information such as prediction mode information and motion information may be encoded (entropy) and output in the form of a bitstream.
스킵 모드와 머지 모드에서 시간적 주변 블록의 움직임 정보가 이용되는 경우에, 참조 픽처 리스트(reference picture list) 상의 최상위 픽처가 참조 픽처로서 이용될 수도 있다. 참조 픽처 리스트(Picture Order Count)에 포함되는 참조 픽처들은 현재 픽처와 해당 참조 픽처 간의 POC(Picture order count) 차이 기반으로 정렬될 수 있다. POC는 픽처의 디스플레이 순서에 대응하며, 코딩 순서와 구분될 수 있다.When the motion information of the temporal neighboring block is used in the skip mode and the merge mode, the highest picture on the reference picture list may be used as the reference picture. Reference pictures included in a reference picture list may be sorted based on a difference in a picture order count (POC) between a current picture and a corresponding reference picture. The POC corresponds to the display order of the pictures and may be distinguished from the coding order.
감산부(121)는 원본 샘플과 예측 샘플 간의 차이인 레지듀얼 샘플을 생성한다. 스킵 모드가 적용되는 경우에는, 상술한 바와 같이 레지듀얼 샘플을 생성하지 않을 수 있다.The subtraction unit 121 generates a residual sample which is a difference between the original sample and the prediction sample. When the skip mode is applied, residual samples may not be generated as described above.
변환부(122)는 변환 블록 단위로 레지듀얼 샘플을 변환하여 변환 계수(transform coefficient)를 생성한다. 변환부(122)는 해당 변환 블록의 사이즈와, 해당 변환 블록과 공간적으로 겹치는 코딩 블록 또는 예측 블록에 적용된 예측 모드에 따라서 변환을 수행할 수 있다. 예컨대, 상기 변환 블록과 겹치는 상기 코딩 블록 또는 상기 예측 블록에 인트라 예측이 적용되었고, 상기 변환 블록이 4×4의 레지듀얼 어레이(array)라면, 레지듀얼 샘플은 DST(Discrete Sine Transform) 변환 커널을 이용하여 변환되고, 그 외의 경우라면 레지듀얼 샘플은 DCT(Discrete Cosine Transform) 변환 커널을 이용하여 변환할 수 있다.The transform unit 122 generates transform coefficients by transforming the residual sample in units of transform blocks. The transform unit 122 may perform the transform according to the size of the transform block and the prediction mode applied to the coding block or the prediction block that spatially overlaps the transform block. For example, if intra prediction is applied to the coding block or the prediction block that overlaps the transform block, and the transform block is a 4 × 4 residual array, the residual sample is configured to perform a discrete sine transform (DST) transform kernel. The residual sample may be transformed using a discrete cosine transform (DCT) transform kernel.
양자화부(123)는 변환 계수들을 양자화하여, 양자화된 변환 계수를 생성할 수 있다.The quantization unit 123 may quantize the transform coefficients to generate quantized transform coefficients.
재정렬부(124)는 양자화된 변환 계수를 재정렬한다. 재정렬부(124)는 계수들 스캐닝(scanning) 방법을 통해 블록 형태의 양자화된 변환 계수들을 1차원 벡터 형태로 재정렬할 수 있다. 여기서 재정렬부(124)는 별도의 구성으로 설명하였으나, 재정렬부(124)는 양자화부(123)의 일부일 수 있다.The reordering unit 124 rearranges the quantized transform coefficients. The reordering unit 124 may reorder the quantized transform coefficients in the form of a block into a one-dimensional vector form through a coefficient scanning method. Although the reordering unit 124 has been described in a separate configuration, the reordering unit 124 may be part of the quantization unit 123.
엔트로피 인코딩부(130)는 양자화된 변환 계수들에 대한 엔트로피 인코딩을 수행할 수 있다. 엔트로피 인코딩은 예를 들어 지수 골롬(exponential Golomb), CAVLC(context-adaptive variable length coding), CABAC(context-adaptive binary arithmetic coding) 등과 같은 인코딩 방법을 포함할 수 있다. 엔트로피 인코딩부(130)는 양자화된 변환 계수 외 비디오 복원에 필요한 정보들(예컨대 신택스 요소(syntax element)의 값 등)을 함께 또는 별도로 인코딩할 수도 있다. 엔트로피 인코딩된 정보들은 비트스트림 형태로 NAL(network abstraction layer) 유닛 단위로 전송 또는 저장될 수 있다.The entropy encoding unit 130 may perform entropy encoding on the quantized transform coefficients. Entropy encoding may include, for example, encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), and the like. The entropy encoding unit 130 may encode information necessary for video reconstruction other than the quantized transform coefficient (for example, a value of a syntax element) together or separately. Entropy encoded information may be transmitted or stored in units of network abstraction layer (NAL) units in the form of bitstreams.
역양자화부(125)는 양자화부(123)에서 양자화된 값(양자화된 변환 계수)들을 역양자화하고, 역변환부(126)는 역양자화부(125)에서 역양자화된 값들을 역변환하여 레지듀얼 샘플을 생성한다.The inverse quantization unit 125 inverse quantizes the quantized values (quantized transform coefficients) in the quantization unit 123, and the inverse transformer 126 inverse transforms the inverse quantized values in the inverse quantization unit 125 to obtain a residual sample. Create
가산부(140)는 레지듀얼 샘플과 예측 샘플을 합쳐서 픽처를 복원한다. 레지듀얼 샘플과 예측 샘플은 블록 단위로 더해져서 복원 블록이 생성될 수 있다. 여기서 가산부(140)는 별도의 구성으로 설명하였으나, 가산부(140)는 예측부(110)의 일부일 수 있다. 한편, 가산부(140)는 복원부 또는 복원 블록 생성부로 불릴 수도 있다.The adder 140 reconstructs the picture by combining the residual sample and the predictive sample. The residual sample and the predictive sample may be added in units of blocks to generate a reconstructed block. Although the adder 140 has been described in a separate configuration, the adder 140 may be part of the predictor 110. On the other hand, the adder 140 may be called a restoration unit or a restoration block generation unit.
복원된 픽처(reconstructed picture)에 대하여 필터부(150)는 디블록킹 필터 및/또는 샘플 적응적 오프셋(sample adaptive offset)을 적용할 수 있다. 디블록킹 필터링 및/또는 샘플 적응적 오프셋을 통해, 복원 픽처 내 블록 경계의 아티팩트나 양자화 과정에서의 왜곡이 보정될 수 있다. 샘플 적응적 오프셋은 샘플 단위로 적용될 수 있으며, 디블록킹 필터링의 과정이 완료된 후 적용될 수 있다. 필터부(150)는 ALF(Adaptive Loop Filter)를 복원된 픽처에 적용할 수도 있다. ALF는 디블록킹 필터 및/또는 샘플 적응적 오프셋이 적용된 후의 복원된 픽처에 대하여 적용될 수 있다.The filter unit 150 may apply a deblocking filter and / or a sample adaptive offset to the reconstructed picture. Through deblocking filtering and / or sample adaptive offset, the artifacts of the block boundaries in the reconstructed picture or the distortion in the quantization process can be corrected. The sample adaptive offset may be applied on a sample basis and may be applied after the process of deblocking filtering is completed. The filter unit 150 may apply an adaptive loop filter (ALF) to the reconstructed picture. ALF may be applied to the reconstructed picture after the deblocking filter and / or sample adaptive offset is applied.
메모리(160)는 복원 픽처(디코딩된 픽처) 또는 인코딩/디코딩에 필요한 정보를 저장할 수 있다. 여기서 복원 픽처는 상기 필터부(150)에 의하여 필터링 절차가 완료된 복원 픽처일 수 있다. 상기 저장된 복원 픽처는 다른 픽처의 (인터) 예측을 위한 참조 픽처로 활용될 수 있다. 예컨대, 메모리(160)는 인터 예측에 사용되는 (참조) 픽처들을 저장할 수 있다. 이 때, 인터 예측에 사용되는 픽처들은 참조 픽처 세트(reference picture set) 혹은 참조 픽처 리스트(reference picture list)에 의해 지정될 수 있다.The memory 160 may store reconstructed pictures (decoded pictures) or information necessary for encoding / decoding. Here, the reconstructed picture may be a reconstructed picture after the filtering process is completed by the filter unit 150. The stored reconstructed picture may be used as a reference picture for (inter) prediction of another picture. For example, the memory 160 may store (reference) pictures used for inter prediction. In this case, pictures used for inter prediction may be designated by a reference picture set or a reference picture list.
도 2는 본 발명이 적용될 수 있는 비디오 디코딩 장치의 구성을 개략적으로 설명하는 도면이다.2 is a diagram schematically illustrating a configuration of a video decoding apparatus to which the present invention may be applied.
도 2를 참조하면, 비디오 디코딩 장치(200)는 엔트로피 디코딩부(210), 레지듀얼 처리부(220), 예측부(230), 가산부(240), 필터부(250) 및 메모리(260)을 포함할 수 있다. 여기서 레지듀얼 처리부(220)는 재정렬부(221), 역양자화부(222), 역변환부(223)을 포함할 수 있다. Referring to FIG. 2, the video decoding apparatus 200 may include an entropy decoding unit 210, a residual processor 220, a predictor 230, an adder 240, a filter 250, and a memory 260. It may include. Here, the residual processor 220 may include a rearrangement unit 221, an inverse quantization unit 222, and an inverse transform unit 223.
비디오 정보를 포함하는 비트스트림이 입력되면, 비디오 디코딩 장치(200)는 비디오 인코딩 장치에서 비디오 정보가 처리된 프로세스에 대응하여 비디오를 복원할 수 있다.When a bitstream including video information is input, the video decoding apparatus 200 may restore video in response to a process in which video information is processed in the video encoding apparatus.
예컨대, 비디오 디코딩 장치(200)는 비디오 인코딩 장치에서 적용된 처리 유닛을 이용하여 비디오 디코딩을 수행할 수 있다. 따라서 비디오 디코딩의 처리 유닛 블록은 일 예로 코딩 유닛일 수 있고, 다른 예로 코딩 유닛, 예측 유닛 또는 변환 유닛일 수 있다. 코딩 유닛은 최대 코딩 유닛으로부터 쿼드 트리 구조 및/또는 바이너리 트리 구조를 따라서 분할될 수 있다. For example, the video decoding apparatus 200 may perform video decoding using a processing unit applied in the video encoding apparatus. Thus, the processing unit block of video decoding may be, for example, a coding unit, and in another example, a coding unit, a prediction unit, or a transform unit. The coding unit may be split along the quad tree structure and / or binary tree structure from the largest coding unit.
예측 유닛 및 변환 유닛이 경우에 따라 더 사용될 수 있으며, 이 경우 예측 블록은 코딩 유닛으로부터 도출 또는 파티셔닝되는 블록으로서, 샘플 예측의 유닛일 수 있다. 이 때, 예측 유닛은 서브 블록으로 나뉠 수도 있다. 변환 유닛은 코딩 유닛으로부터 쿼드 트리 구조를 따라서 분할 될 수 있으며, 변환 계수를 유도하는 유닛 또는 변환 계수로부터 레지듀얼 신호를 유도하는 유닛일 수 있다. The prediction unit and the transform unit may be further used in some cases, in which case the prediction block is a block derived or partitioned from the coding unit and may be a unit of sample prediction. At this point, the prediction unit may be divided into subblocks. The transform unit may be divided along the quad tree structure from the coding unit, and may be a unit for deriving a transform coefficient or a unit for deriving a residual signal from the transform coefficient.
엔트로피 디코딩부(210)는 비트스트림을 파싱하여 비디오 복원 또는 픽처 복원에 필요한 정보를 출력할 수 있다. 예컨대, 엔트로피 디코딩부(210)는 지수 골롬 부호화, CAVLC 또는 CABAC 등의 코딩 방법을 기초로 비트스트림 내 정보를 디코딩하고, 비디오 복원에 필요한 신택스 엘리먼트의 값, 레지듀얼에 관한 변환 계수의 양자화된 값 들을 출력할 수 있다. The entropy decoding unit 210 may parse the bitstream and output information necessary for video reconstruction or picture reconstruction. For example, the entropy decoding unit 210 decodes information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, quantized values of syntax elements necessary for video reconstruction, and residual coefficients. Can be output.
보다 상세하게, 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)에서 엔트로피 디코딩이 수행된 레지듀얼 값, 즉 양자화된 변환 계수는 재정렬부(221)로 입력될 수 있다.The information related to the prediction among the information decoded by the entropy decoding unit 210 is provided to the prediction unit 230, and the residual value on which the entropy decoding has been performed by the entropy decoding unit 210, that is, the quantized transform coefficient, is used as a reordering unit ( 221 may be input.
재정렬부(221)는 양자화되어 있는 변환 계수들을 2차원의 블록 형태로 재정렬할 수 있다. 재정렬부(221)는 인코딩 장치에서 수행된 계수 스캐닝에 대응하여 재정렬을 수행할 수 있다. 여기서 재정렬부(221)는 별도의 구성으로 설명하였으나, 재정렬부(221)는 역양자화부(222)의 일부일 수 있다.The reordering unit 221 may rearrange the quantized transform coefficients in a two-dimensional block form. The reordering unit 221 may perform reordering in response to coefficient scanning performed by the encoding apparatus. Here, the rearrangement unit 221 has been described in a separate configuration, but the rearrangement unit 221 may be part of the inverse quantization unit 222.
역양자화부(222)는 양자화되어 있는 변환 계수들을 (역)양자화 파라미터를 기반으로 역양자화하여 변환 계수를 출력할 수 있다. 이 때, 양자화 파라미터를 유도하기 위한 정보는 인코딩 장치로부터 시그널링될 수 있다.The inverse quantization unit 222 may dequantize the quantized transform coefficients based on the (inverse) quantization parameter and output the transform coefficients. In this case, information for deriving a quantization parameter may be signaled from the encoding apparatus.
역변환부(223)는 변환 계수들을 역변환하여 레지듀얼 샘플들을 유도할 수 있다. The inverse transform unit 223 may inversely transform transform coefficients to derive residual samples.
예측부(230)는 현재 블록에 대한 예측을 수행하고, 상기 현재 블록에 대한 예측 샘플들을 포함하는 예측된 블록(predicted block)을 생성할 수 있다. 예측부(230)에서 수행되는 예측의 단위는 코딩 블록일 수도 있고, 변환 블록일 수도 있고, 예측 블록일 수도 있다. The prediction unit 230 may perform prediction on the current block and generate a predicted block including prediction samples for the current block. The unit of prediction performed by the prediction unit 230 may be a coding block, a transform block, or a prediction block.
예측부(230)는 상기 예측에 관한 정보를 기반으로 인트라 예측을 적용할 것인지 인터 예측을 적용할 것인지를 결정할 수 있다. 이 때, 인트라 예측과 인터 예측 중 어느 것을 적용할 것인지를 결정하는 단위와 예측 샘플을 생성하는 단위는 상이할 수 있다. 아울러, 인터 예측과 인트라 예측에 있어서 예측 샘플을 생성하는 단위 또한 상이할 수 있다. 예를 들어, 인터 예측과 인트라 예측 중 어느 것을 적용할 것인지는 CU 단위로 결정할 수 있다. 또한 예를 들어, 인터 예측에 있어서 PU 단위로 예측 모드를 결정하고 예측 샘플을 생성할 수 있고, 인트라 예측에 있어서 PU 단위로 예측 모드를 결정하고 TU 단위로 예측 샘플을 생성할 수도 있다. The prediction unit 230 may determine whether to apply intra prediction or inter prediction based on the information about the prediction. In this case, a unit for determining which of intra prediction and inter prediction is to be applied and a unit for generating a prediction sample may be different. In addition, the unit for generating a prediction sample in inter prediction and intra prediction may also be different. For example, whether to apply inter prediction or intra prediction may be determined in units of CUs. In addition, for example, in inter prediction, a prediction mode may be determined and a prediction sample may be generated in PU units, and in intra prediction, a prediction mode may be determined in PU units and a prediction sample may be generated in TU units.
인트라 예측의 경우에, 예측부(230)는 현재 픽처 내의 주변 참조 샘플을 기반으로 현재 블록에 대한 예측 샘플을 유도할 수 있다. 예측부(230)는 현재 블록의 주변 참조 샘플을 기반으로 방향성 모드 또는 비방향성 모드를 적용하여 현재 블록에 대한 예측 샘플을 유도할 수 있다. 이 때, 주변 블록의 인트라 예측 모드를 이용하여 현재 블록에 적용할 예측 모드가 결정될 수도 있다. In the case of intra prediction, the prediction unit 230 may derive the prediction sample for the current block based on the neighbor reference samples in the current picture. The prediction unit 230 may derive the prediction sample for the current block by applying the directional mode or the non-directional mode based on the neighbor reference samples of the current block. In this case, the prediction mode to be applied to the current block may be determined using the intra prediction mode of the neighboring block.
인터 예측의 경우에, 예측부(230)는 참조 픽처 상에서 움직임 벡터에 의해 참조 픽처 상에서 특정되는 샘플을 기반으로 현재 블록에 대한 예측 샘플을 유도할 수 있다. 예측부(230)는 스킵(skip) 모드, 머지(merge) 모드 및 MVP 모드 중 어느 하나를 적용하여 현재 블록에 대한 예측 샘플을 유도할 수 있다. 이때, 비디오 인코딩 장치에서 제공된 현재 블록의 인터 예측에 필요한 움직임 정보, 예컨대 움직임 벡터, 참조 픽처 인덱스 등에 관한 정보는 상기 예측에 관한 정보를 기반으로 획득 또는 유도될 수 있다In the case of inter prediction, the prediction unit 230 may derive the prediction sample for the current block based on the sample specified on the reference picture by the motion vector on the reference picture. The prediction unit 230 may apply any one of a skip mode, a merge mode, and an MVP mode to derive a prediction sample for the current block. In this case, motion information required for inter prediction of the current block provided by the video encoding apparatus, for example, information about a motion vector, a reference picture index, and the like may be obtained or derived based on the prediction information.
스킵 모드와 머지 모드의 경우에, 주변 블록의 움직임 정보가 현재 블록의 움직임 정보로 이용될 수 있다. 이 때, 주변 블록은 공간적 주변 블록과 시간적 주변 블록을 포함할 수 있다.In the skip mode and the merge mode, the motion information of the neighboring block may be used as the motion information of the current block. In this case, the neighboring block may include a spatial neighboring block and a temporal neighboring block.
예측부(230)는 가용한 주변 블록의 움직임 정보로 머지 후보 리스트를 구성하고, 머지 인덱스가 머지 후보 리스트 상에서 지시하는 정보를 현재 블록의 움직임 벡터로 사용할 수 있다. 머지 인덱스는 인코딩 장치로부터 시그널링될 수 있다. 움직임 정보는 움직임 벡터와 참조 픽처를 포함할 수 있다. 스킵 모드와 머지 모드에서 시간적 주변 블록의 움직임 정보가 이용되는 경우에, 참조 픽처 리스트 상의 최상위 픽처가 참조 픽처로서 이용될 수 있다.The prediction unit 230 may construct a merge candidate list using motion information of available neighboring blocks, and may use information indicated by the merge index on the merge candidate list as a motion vector of the current block. The merge index may be signaled from the encoding device. The motion information may include a motion vector and a reference picture. When the motion information of the temporal neighboring block is used in the skip mode and the merge mode, the highest picture on the reference picture list may be used as the reference picture.
스킵 모드의 경우, 머지 모드와 달리 예측 샘플과 원본 샘플 사이의 차이(레지듀얼)이 전송되지 않는다.In the skip mode, unlike the merge mode, the difference (residual) between the prediction sample and the original sample is not transmitted.
MVP 모드의 경우, 주변 블록의 움직임 벡터를 움직임 벡터 예측자(motion vector predictor)로 이용하여 현재 블록의 움직임 벡터가 유도될 수 있다. 이 때, 주변 블록은 공간적 주변 블록과 시간적 주변 블록을 포함할 수 있다.In the MVP mode, the motion vector of the current block may be derived using the motion vector of the neighboring block as a motion vector predictor. In this case, the neighboring block may include a spatial neighboring block and a temporal neighboring block.
일 예로, 머지 모드가 적용되는 경우, 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터를 이용하여, 머지 후보 리스트가 생성될 수 있다. 머지 모드에서는 머지 후보 리스트에서 선택된 후보 블록의 움직임 벡터가 현재 블록의 움직임 벡터로 사용된다. 상기 예측에 관한 정보는 상기 머지 후보 리스트에 포함된 후보 블록들 중에서 선택된 최적의 움직임 벡터를 갖는 후보 블록을 지시하는 머지 인덱스를 포함할 수 있다. 이 때, 예측부(230)는 상기 머지 인덱스를 이용하여, 현재 블록의 움직임 벡터를 도출할 수 있다.For example, when the merge mode is applied, a merge candidate list may be generated by using a motion vector of a reconstructed spatial neighboring block and / or a motion vector corresponding to a Col block, which is a temporal neighboring block. 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 information about the prediction may include a merge index indicating a candidate block having an optimal motion vector selected from candidate blocks included in the merge candidate list. In this case, the prediction unit 230 may derive the motion vector of the current block by using the merge index.
다른 예로, MVP(Motion Vector Prediction) 모드가 적용되는 경우, 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터를 이용하여, 움직임 벡터 예측자 후보 리스트가 생성될 수 있다. 즉, 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터는 움직임 벡터 후보로 사용될 수 있다. 상기 예측에 관한 정보는 상기 리스트에 포함된 움직임 벡터 후보 중에서 선택된 최적의 움직임 벡터를 지시하는 예측 움직임 벡터 인덱스를 포함할 수 있다. 이 때, 예측부(230)는 상기 움직임 벡터 인덱스를 이용하여, 움직임 벡터 후보 리스트에 포함된 움직임 벡터 후보 중에서, 현재 블록의 예측 움직임 벡터를 선택할 수 있다. 인코딩 장치의 예측부는 현재 블록의 움직임 벡터와 움직임 벡터 예측자 간의 움직임 벡터 차분(MVD)을 구할 수 있고, 이를 인코딩하여 비트스트림 형태로 출력할 수 있다. 즉, MVD는 현재 블록의 움직임 벡터에서 상기 움직임 벡터 예측자를 뺀 값으로 구해질 수 있다. 이 때, 예측부(230)는 상기 예측에 관한 정보에 포함된 움직임 벡터 차분을 획득하고, 상기 움직임 벡터 차분과 상기 움직임 벡터 예측자의 가산을 통해 현재 블록의 상기 움직임 벡터를 도출할 수 있다. 예측부는 또한 참조 픽처를 지시하는 참조 픽처 인덱스 등을 상기 예측에 관한 정보로부터 획득 또는 유도할 수 있다. As another example, when the Motion Vector Prediction (MVP) mode is applied, a motion vector predictor candidate list may be generated using a motion vector of a reconstructed spatial neighboring block and / or a motion vector corresponding to a Col block which is a temporal neighboring block. Can be. 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 prediction information may include a prediction motion vector index indicating an optimal motion vector selected from the motion vector candidates included in the list. In this case, the prediction unit 230 may select the predicted motion vector of the current block from the motion vector candidates included in the motion vector candidate list using the motion vector index. The prediction unit of the encoding apparatus may obtain a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, and may encode the output vector in a bitstream form. That is, MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block. In this case, the prediction unit 230 may obtain a motion vector difference included in the information about the prediction, and derive the motion vector of the current block by adding the motion vector difference and the motion vector predictor. The prediction unit may also obtain or derive a reference picture index or the like indicating a reference picture from the information about the prediction.
가산부(240)는 레지듀얼 샘플과 예측 샘플을 더하여 현재 블록 혹은 현재 픽처를 복원할 수 있다. 가산부(240)는 레지듀얼 샘플과 예측 샘플을 블록 단위로 더하여 현재 픽처를 복원할 수도 있다. 스킵 모드가 적용된 경우에는 레지듀얼이 전송되지 않으므로, 예측 샘플이 복원 샘플이 될 수 있다. 여기서는 가산부(240)를 별도의 구성으로 설명하였으나, 가산부(240)는 예측부(230)의 일부일 수도 있다. 한편, 가산부(240)는 복원부 또는 복원 블록 생성부로 불릴 수도 있다. The adder 240 may reconstruct the current block or the current picture by adding the residual sample and the predictive sample. The adder 240 may reconstruct the current picture by adding the residual sample and the predictive sample in block units. Since the residual is not transmitted when the skip mode is applied, the prediction sample may be a reconstruction sample. Although the adder 240 has been described in a separate configuration, the adder 240 may be part of the predictor 230. On the other hand, the adder 240 may be called a restoration unit or a restoration block generation unit.
필터부(250)는 복원된 픽처에 디블록킹 필터링 샘플 적응적 오프셋, 및/또는 ALF 등을 적용할 수 있다. 이 때, 샘플 적응적 오프셋은 샘플 단위로 적용될 수 있으며, 디블록킹 필터링 이후 적용될 수도 있다. ALF는 디블록킹 필터링 및/또는 샘플 적응적 오프셋 이후 적용될 수도 있다.The filter unit 250 may apply the deblocking filtering sample adaptive offset, and / or ALF to the reconstructed picture. In this case, the sample adaptive offset may be applied in units of samples and may be applied after deblocking filtering. ALF may be applied after deblocking filtering and / or sample adaptive offset.
메모리(260)는 복원 픽처(디코딩된 픽처) 또는 디코딩에 필요한 정보를 저장할 수 있다. 여기서 복원 픽처는 상기 필터부(250)에 의하여 필터링 절차가 완료된 복원 픽처일 수 있다. 예컨대, 메모리(260)는 인터 예측에 사용되는 픽처들을 저장할 수 있다. 이 때, 인터 예측에 사용되는 픽처들은 참조 픽처 세트 혹은 참조 픽처 리스트에 의해 지정될 수도 있다. 복원된 픽처는 다른 픽처에 대한 참조 픽처로서 이용될 수 있다. 또한, 메모리(260)는 복원된 픽처를 출력 순서에 따라서 출력할 수도 있다.The memory 260 may store reconstructed pictures (decoded pictures) or information necessary for decoding. Here, the reconstructed picture may be a reconstructed picture after the filtering process is completed by the filter unit 250. For example, the memory 260 may store pictures used for inter prediction. In this case, pictures used for inter prediction may be designated by a reference picture set or a reference picture list. The reconstructed picture can be used as a reference picture for another picture. In addition, the memory 260 may output the reconstructed picture in an output order.
한편, 인터 예측의 경우, 영상의 왜곡을 고려한 인터 예측 방법이 제안되고 있다. 구체적으로, 현재 블록의 서브 블록들 또는 샘플 포인트들에 대한 움직임 벡터를 효율적으로 도출하고, 영상의 회전, 줌인 또는 줌아웃 등의 변형에도 불구하고 인터 예측의 정확도를 높이는 어파인 움직임 모델이 제안되고 있다. 즉, 현재 블록의 서브 블록들 또는 샘플 포인트들에 대한 움직임 벡터를 도출하는 어파인 움직임 모델이 제안되고 있다. 상기 어파인 움직임 모델을 사용하는 예측은 어파인 인터 예측(affine inter prediction) 또는 어파인 모션 예측(affine motion prediction)이라고 불릴 수 있다.Meanwhile, in the case of inter prediction, an inter prediction method considering the distortion of an image has been proposed. Specifically, an affine motion model has been proposed to efficiently derive a motion vector for sub-blocks or sample points of a current block, and to increase the accuracy of inter prediction despite deformation of image rotation, zoom-in or zoom-out. . That is, an affine motion model is proposed which derives a motion vector for sub-blocks or sample points of a current block. Prediction using the affine motion model may be called affine inter prediction or affine motion prediction.
예를 들어, 상기 어파인 움직임 모델을 사용하는 상기 어파인 인터 예측은 후술하는 내용과 같이 4가지 움직임, 즉, 후술하는 내용과 같은 4가지 변형을 효율적으로 표현할 수 있다.For example, the affine inter prediction using the affine motion model can efficiently express four motions, that is, four deformations as described later, as described below.
도 3은 상기 어파인 움직임 모델을 통하여 표현되는 움직임을 예시적으로 나타낸다. 도 3을 참조하면 상기 어파인 움직임 모델을 통하여 표현될 수 있는 움직임은 병진(translate) 움직임, 스케일(scale) 움직임, 회전(rotate) 움직임 및 전단(shear) 움직임을 포함할 수 있다. 즉, 도 3에 도시된 시간의 흐름에 따라 영상(의 일부)이 평면 이동하는 병진 움직임뿐만 아니라, 시간의 흐름에 따라 영상(의 일부)이 스케일(scale)되는 스케일 움직임, 시간의 흐름에 따라 영상(의 일부)이 회전하는 회전 움직임, 시간의 흐름에 따라 영상(의 일부)이 평형 사변형 변형되는 전단 움직임을 상기 어파인 인터 예측을 통하여 효율적으로 표현할 수 있다.3 exemplarily illustrates a motion expressed through the affine motion model. Referring to FIG. 3, a motion that can be represented through the affine motion model may include a translation motion, a scale motion, a rotate motion, and a shear motion. That is, in addition to the translational movement in which an image (part of) is planarly moved in accordance with the flow of time illustrated in FIG. 3, the scale movement in which the image (part) is scaled over time, and the time It is possible to efficiently represent a rotational motion in which a part of the image rotates and a shear motion in which the part of the image is equilateral with a quadrilateral deformation as time passes through the affine inter prediction.
인코딩 장치/디코딩 장치는 상기 어파인 인터 예측을 통하여 현재 블록의 컨트롤 포인트(control point, CP)들에서의 움직임 벡터들을 기반으로 상기 영상의 왜곡 형태를 예측할 수 있고, 이를 통하여 예측의 정확도를 높임으로서 영상의 압축 성능을 향상시킬 수 있다. 또한, 상기 현재 블록의 주변 블록의 움직임 벡터를 이용하여 상기 현재 블록의 적어도 하나의 컨트롤 포인트에 대한 움직임 벡터가 유도될 수 있는바, 추가되는 부가 정보에 대한 데이터량 부담을 줄이고, 인터 예측 효율을 상당히 향상시킬 수 있다.The encoding device / decoding device may predict the distortion shape of the image based on the motion vectors at the control points (CPs) of the current block through the affine inter prediction, thereby increasing the accuracy of the prediction. It can improve the compression performance of the image. In addition, since the motion vector for at least one control point of the current block may be derived using the motion vector of the neighboring block of the current block, the data amount burden on additional information to be added is reduced, and inter prediction efficiency is improved. It can be improved considerably.
상기 어파인 인터 예측의 일 예로, 3개의 컨트롤 포인트, 즉 3개의 기준점에서의 움직임 정보를 필요로 할 수 있다. As an example of the affine inter prediction, motion information at three control points, that is, three reference points may be required.
도 4는 3개의 컨트롤 포인트들에 대한 움직임 벡터들이 사용되는 상기 어파인 움직임 모델을 예시적으로 나타낸다. 4 exemplarily illustrates the affine motion model in which motion vectors for three control points are used.
현재 블록(400) 내의 좌상단(top-left) 샘플 위치(position)를 (0,0)이라고 할 경우, 상기 도 4에 도시된 것과 같이 (0,0), (w, 0), (0, h) 샘플 포지션들을 상기 컨트롤 포인트들로 정할 수 있다. 이하 (0,0) 샘플 포지션의 컨트롤 포인트는 CP0, (w, 0) 샘플 포지션의 컨트롤 포인트는 CP1, (0, h) 샘플 포지션의 컨트롤 포인트는 CP2라고 나타낼 수 있다. When the top-left sample position in the current block 400 is (0,0), as shown in FIG. 4, (0,0), (w, 0), (0, h) Sample positions can be defined as the control points. Hereinafter, the control point of the (0,0) sample position may be CP0, and the control point of the (w, 0) sample position may be CP1, and the control point of the (0, h) sample position may be CP2.
상술한 각 컨트롤 포인트와 해당 컨트롤 포인트에 대한 움직임 벡터를 이용하여 상기 어파인 움직임 모델에 대한 수학식이 도출될 수 있다. 상기 어파인 움직임 모델에 대한 수학식은 다음과 같이 나타낼 수 있다. The equation for the affine motion model may be derived using the above-described control point and the motion vector of the corresponding control point. Equation for the affine motion model can be expressed as follows.
Figure PCTKR2019004424-appb-M000001
Figure PCTKR2019004424-appb-M000001
여기서, w는 상기 현재 블록(400)의 폭(width)을 나타내고, h는 상기 현재 블록(400)의 높이(height)를 나타내고, v0x, v0y는 각각 CP0의 움직임 벡터의 x성분, y성분을 나타내고, v1x, v1y은 각각 CP1의 움직임 벡터의 x성분, y성분을 나타내고, v2x, v2y는 각각 CP2의 움직임 벡터의 x성분, y성분을 나타낸다. 또한, x는 상기 현재 블록(400) 내 대상 샘플의 위치의 x 성분을 나타내고, y는 상기 현재 블록(400) 내 상기 대상 샘플의 상기 위치의 y 성분을 나타내고, vx는 상기 현재 블록(400) 내 상기 대상 샘플의 움직임 벡터의 x성분, vy는 현재 블록(400) 내 상기 대상 샘플의 상기 움직임 벡터의 y성분을 나타낸다.Here, w represents the width of the current block 400, h represents the height of the current block 400, v 0x , v 0y are the x component, y of the motion vector of CP0, respectively. The component represents v 1x and v 1y each represent x component and y component of the motion vector of CP1, and the v 2x and v 2y represent x component and y component of the motion vector of CP2, respectively. In addition, x represents the x component of the position of the target sample in the current block 400, y represents the y component of the position of the target sample in the current block 400, v x is the current block 400 The x component, v y of the motion vector of the target sample in) denotes the y component of the motion vector of the target sample in the current block 400.
상기 CP0의 움직임 벡터, 상기 CP1의 움직임 벡터 및 상기 CP2의 움직임 벡터는 알고 있으므로, 상기 수학식 1을 기반으로 현재 블록 내 샘플 위치에 따른 움직임 벡터가 유도될 수 있다. 즉, 상기 어파인 움직임 모델에 따르면 대상 샘플의 좌표 (x, y)와 3개의 컨트롤 포인트들과의 거리비를 기반으로, 상기 컨트롤 포인트들에서의 움직임 벡터들 v0(v0x, v0y), v1(v1x, v1y), v2(v2x, v2y)가 스케일링 되어 상기 대상 샘플 위치에 따른 상기 대상 샘플의 움직임 벡터가 도출될 수 있다. 즉, 상기 어파인 움직임 모델에 따르면 상기 컨트롤 포인트들의 움직임 벡터들을 기반으로 상기 현재 블록 내 각 샘플의 움직임 벡터가 도출될 수 있다. 한편, 상기 어파인 움직임 모델에 따라서 도출된 상기 현재 블록 내 샘플들의 움직임 벡터들의 집합은 어파인 움직임 벡터 필드(affine Motion Vector Field, MVF)라고 나타낼 수 있다.Since the motion vector of the CP0, the motion vector of the CP1, and the motion vector of the CP2 are known, a motion vector according to the sample position in the current block can be derived based on Equation (1). That is, according to the affine motion model, the motion vectors v0 (v 0x , v 0y ) at the control points, based on a distance ratio between the coordinates (x, y) of the target sample and the three control points, v1 (v 1x , v 1y ) and v2 (v 2x , v 2y ) may be scaled to derive a motion vector of the target sample according to the target sample position. That is, according to the affine motion model, a motion vector of each sample in the current block may be derived based on the motion vectors of the control points. Meanwhile, the set of motion vectors of samples in the current block derived according to the affine motion model may be referred to as an affine motion vector field (MVF).
한편, 상기 수학식 1에 대한 6개의 파라미터들은 다음의 수학식과 같이 a, b, c, d, e, f 로 나타낼 수 있고, 상기 6개의 파라미터들로 나타낸 상기 어파인 움직임 모델에 대한 수학식은 다음과 같을 수 있다. Meanwhile, six parameters of Equation 1 may be represented by a, b, c, d, e, and f as shown in the following equation, and the equation for the affine motion model represented by the six parameters is as follows. May be the same as
Figure PCTKR2019004424-appb-M000002
Figure PCTKR2019004424-appb-M000002
여기서, w는 상기 현재 블록(400)의 폭(width)을 나타내고, h는 상기 현재 블록(400)의 높이(height)를 나타내고, v0x, v0y는 각각 CP0의 움직임 벡터의 x성분, y성분을 나타내고, v1x, v1y은 각각 CP1의 움직임 벡터의 x성분, y성분을 나타내고, v2x, v2y는 각각 CP2의 움직임 벡터의 x성분, y성분을 나타낸다. 또한, x는 상기 현재 블록(400) 내 대상 샘플의 위치의 x 성분을 나타내고, y는 상기 현재 블록(400) 내 상기 대상 샘플의 상기 위치의 y 성분을 나타내고, vx는 상기 현재 블록(400) 내 상기 대상 샘플의 움직임 벡터의 x성분, vy는 현재 블록(400) 내 상기 대상 샘플의 상기 움직임 벡터의 y성분을 나타낸다.Here, w represents the width of the current block 400, h represents the height of the current block 400, v 0x , v 0y are the x component, y of the motion vector of CP0, respectively. The component represents v 1x and v 1y each represent x component and y component of the motion vector of CP1, and the v 2x and v 2y represent x component and y component of the motion vector of CP2, respectively. In addition, x represents the x component of the position of the target sample in the current block 400, y represents the y component of the position of the target sample in the current block 400, v x is the current block 400 The x component, v y of the motion vector of the target sample in) denotes the y component of the motion vector of the target sample in the current block 400.
상기 6개의 파라미터들을 사용하는 상기 어파인 움직임 모델 또는 상기 어파인 인터 예측은 6 파라미터 어파인 움직임 모델 또는 AF6 라고 나타낼 수 있다. The affine motion model or the affine inter prediction using the six parameters may be referred to as a six parameter affine motion model or AF6.
또한, 상기 어파인 인터 예측의 일 예로, 2개의 컨트롤 포인트, 즉 2개의 기준점에서의 움직임 정보를 필요로 할 수 있다. In addition, as an example of the affine inter prediction, motion information from two control points, that is, two reference points may be required.
도 5는 2개의 컨트롤 포인트들에 대한 움직임 벡터들이 사용되는 상기 어파인 움직임 모델을 예시적으로 나타낸다. 2개의 컨트롤 포인트를 사용하는 상기 어파인 움직임 모델은 병진 움직임, 스케일 움직임, 회전 움직임을 포함하는 3가지 움직임을 표현할 수 있다. 3가지 움직임을 표현하는 상기 어파인 움직임 모델은 시밀러리티 어파인 움직임 모델(similarity affine motion model) 또는 심플리파이드 어파인 움직임 모델(simplified affine motion model)이라고 나타낼 수도 있다.5 exemplarily illustrates the affine motion model in which motion vectors for two control points are used. The affine motion model using two control points can represent three motions including translational motion, scale motion, and rotational motion. The affine motion model representing three motions may be referred to as a simplicity affine motion model or a simplified affine motion model.
현재 블록(500) 내의 좌상단(top-left) 샘플 위치(position)를 (0,0)이라고 할 경우, 상기 도 5에 도시된 것과 같이 (0,0), (w, 0) 샘플 포지션들을 상기 컨트롤 포인트들로 정할 수 있다. 이하 (0,0) 샘플 포지션의 컨트롤 포인트는 CP0, (w, 0) 샘플 포지션의 컨트롤 포인트는 CP1 라고 나타낼 수 있다. When the top-left sample position in the current block 500 is (0,0), the (0,0), (w, 0) sample positions are recalled as shown in FIG. Control points can be set. Hereinafter, the control point of the (0,0) sample position may be CP0, and the control point of the (w, 0) sample position may be CP1.
상술한 각 컨트롤 포인트와 해당 컨트롤 포인트에 대한 움직임 벡터를 이용하여 상기 어파인 움직임 모델에 대한 수학식이 도출될 수 있다. 상기 어파인 움직임 모델에 대한 수학식은 다음과 같이 나타낼 수 있다. The equation for the affine motion model may be derived using the above-described control point and the motion vector of the corresponding control point. Equation for the affine motion model can be expressed as follows.
Figure PCTKR2019004424-appb-M000003
Figure PCTKR2019004424-appb-M000003
여기서, w는 상기 현재 블록(500)의 폭(width)을 나타내고, v0x, v0y는 각각 CP0의 움직임 벡터의 x성분, y성분을 나타내고, v1x, v1y은 각각 CP1의 움직임 벡터의 x성분, y성분을 나타낸다. 또한, x는 상기 현재 블록(500) 내 대상 샘플의 위치의 x 성분을 나타내고, y는 상기 현재 블록(500) 내 상기 대상 샘플의 상기 위치의 y 성분을 나타내고, vx는 상기 현재 블록(500) 내 상기 대상 샘플의 움직임 벡터의 x성분, vy는 현재 블록(500) 내 상기 대상 샘플의 상기 움직임 벡터의 y성분을 나타낸다.Here, w represents the width of the current block 500, v 0x , v 0y represents the x component and y component of the motion vector of CP0, respectively, v 1x , v 1y represents the motion vector of CP1, respectively. The x component and the y component are shown. Also, x represents the x component of the position of the target sample in the current block 500, y represents the y component of the position of the target sample in the current block 500, v x is the current block 500 The x component, v y of the motion vector of the target sample in) denotes the y component of the motion vector of the target sample in the current block 500.
한편, 상기 수학식 3에 대한 4개의 파라미터들은 다음의 수학식과 같이 a, b, c, d 로 나타낼 수 있고, 상기 4개의 파라미터들로 나타낸 상기 어파인 움직임 모델에 대한 수학식은 다음과 같을 수 있다. Meanwhile, the four parameters for Equation 3 may be represented by a, b, c, and d as in the following Equation, and the equation for the affine motion model represented by the four parameters may be as follows. .
Figure PCTKR2019004424-appb-M000004
Figure PCTKR2019004424-appb-M000004
여기서, w는 상기 현재 블록(500)의 폭(width)을 나타내고, v0x, v0y는 각각 CP0의 움직임 벡터의 x성분, y성분을 나타내고, v1x, v1y은 각각 CP1의 움직임 벡터의 x성분, y성분을 나타낸다. 또한, x는 상기 현재 블록(500) 내 대상 샘플의 위치의 x 성분을 나타내고, y는 상기 현재 블록(500) 내 상기 대상 샘플의 상기 위치의 y 성분을 나타내고, vx는 상기 현재 블록(500) 내 상기 대상 샘플의 움직임 벡터의 x성분, vy는 현재 블록(500) 내 상기 대상 샘플의 상기 움직임 벡터의 y성분을 나타낸다. 상기 2개의 컨트롤 포인트를 사용하는 상기 어파인 움직임 모델은 상기 수학식 4와 같이 4개의 파라미터들 a, b, c, d 로 표현될 수 있는바, 상기 4개의 파라미터들을 사용하는 상기 어파인 움직임 모델 또는 상기 어파인 인터 예측은 4 파라미터 어파인 움직임 모델 또는 AF4 라고 나타낼 수 있다. 즉, 상기 어파인 움직임 모델에 따르면 상기 컨트롤 포인트들의 움직임 벡터들을 기반으로 상기 현재 블록 내 각 샘플의 움직임 벡터가 도출될 수 있다. 한편, 상기 어파인 움직임 모델에 따라서 도출된 상기 현재 블록 내 샘플들의 움직임 벡터들의 집합은 어파인 움직임 벡터 필드(Motion Vector Field, MVF)라고 나타낼 수 있다.Here, w represents the width of the current block 500, v 0x , v 0y represents the x component and y component of the motion vector of CP0, respectively, v 1x , v 1y represents the motion vector of CP1, respectively. The x component and the y component are shown. Also, x represents the x component of the position of the target sample in the current block 500, y represents the y component of the position of the target sample in the current block 500, v x is the current block 500 The x component, v y of the motion vector of the target sample in) denotes the y component of the motion vector of the target sample in the current block 500. The affine motion model using the two control points may be represented by four parameters a, b, c, and d as shown in Equation 4. The affine motion model using the four parameters Alternatively, the affine inter prediction may be referred to as a four parameter affine motion model or AF4. That is, according to the affine motion model, a motion vector of each sample in the current block may be derived based on the motion vectors of the control points. Meanwhile, the set of motion vectors of samples in the current block derived according to the affine motion model may be referred to as an affine motion vector field (MVF).
한편, 상술한 내용과 같이 상기 어파인 움직임 모델을 통하여 샘플 단위의 움직임 벡터가 도출될 수 있으며, 이를 통하여 인터 예측의 정확도가 상당히 향상될 수 있다. 다만, 이 경우, 움직임 보상(motion compensation) 과정에서의 복잡도가 크게 증가될 수도 있다. Meanwhile, as described above, a motion vector of a sample unit may be derived through the affine motion model, and through this, the accuracy of inter prediction may be significantly improved. In this case, however, the complexity in the motion compensation process may be greatly increased.
이에, 샘플 단위의 움직임 벡터가 도출되는 대신 상기 현재 블록 내 서브 블록 단위의 움직임 벡터가 도출되도록 제한할 수 있다. Thus, instead of deriving a motion vector of a sample unit, a motion vector of a sub block unit of the current block may be derived.
도 6은 상기 어파인 움직임 모델을 기반으로 서브 블록 단위로 움직임 벡터를 유도하는 방법을 예시적으로 나타낸다. 도 6은 상기 현재 블록의 사이즈가 16×16이고, 4×4 서브 블록 단위로 움직임 벡터가 유도되는 경우를 예시적으로 나타낸다. 상기 서브 블록은 다양한 사이즈로 설정될 수 있으며, 예를 들어, 서브 블록이 n×n 사이즈(n은 양의 정수, ex, n은 4)로 설정된 경우, 상기 어파인 움직임 모델을 기반으로 현재 블록 내 n×n 서브 블록 단위로 움직임 벡터가 도출될 수 있으며, 각 서브 블록을 대표하는 움직임 벡터를 유도하기 위한 다양한 방법이 적용될 수 있다.6 exemplarily illustrates a method of deriving a motion vector on a sub-block basis based on the affine motion model. 6 exemplarily illustrates a case in which the size of the current block is 16 × 16 and a motion vector is derived in units of 4 × 4 subblocks. The sub block may be set to various sizes. For example, when the sub block is set to n × n size (n is a positive integer, ex, n is 4), the current block is based on the affine motion model. A motion vector may be derived in units of n × n subblocks, and various methods for deriving a motion vector representing each subblock may be applied.
예를 들어, 도 6을 참조하면 각 서브 블록의 센터 또는 센터 우하측(lower right side) 샘플 포지션을 대표 좌표로 하여 각 서브 블록의 움직임 벡터가 도출될 수 있다. 여기서 센터 우하측 포지션이라 함은 서브 블록의 센터에 위치하는 4개의 샘플들 중 우하측에 위치하는 샘플 포지션을 나타낼 수 있다. 예를 들어, n이 홀수인 경우, 서브 블록의 정중앙에는 하나의 샘플이 위치할 수 있고, 이 경우 센터 샘플 포지션이 상기 서브 블록의 움직임 벡터의 도출을 위하여 사용될 수 있다. 그러나, n이 짝수인 경우 서브 블록의 중앙에는 4개의 샘플들이 인접하게 위치할 수 있고, 이 경우 우하측 샘플 포지션이 상기 움직임 벡터의 도출을 위하여 사용될 수 있다. 예를 들어, 도 6을 참조하면 각 서브 블록별 대표 좌표는 (2, 2), (6, 2), (10, 2),..., (14, 14)로 도출될 수 있고, 인코딩 장치/디코딩 장치는 상기 서브 블록들의 대표 좌표들 각각을 상술한 수학식 1 또는 3에 대입하여, 각 서브 블록의 움직임 벡터를 도출할 수 있다. 상기 어파인 움직임 모델을 통하여 도출된 현재 블록 내 서브 블록들의 움직임 벡터들은 어파인 MVF 라고 나타낼 수 있다.For example, referring to FIG. 6, a motion vector of each subblock may be derived using the center or lower right side sample position of each subblock as a representative coordinate. Herein, the lower right position of the center may indicate a sample position located on the lower right side among four samples located at the center of the sub block. For example, when n is an odd number, one sample may be located at the center of the sub block, and in this case, the center sample position may be used for deriving the motion vector of the sub block. However, when n is an even number, four samples may be adjacent to the center of the subblock, and in this case, the lower right sample position may be used to derive the motion vector. For example, referring to FIG. 6, representative coordinates of each subblock may be derived as (2, 2), (6, 2), (10, 2), ..., (14, 14), and encoding. The device / decoding device may derive a motion vector of each subblock by substituting each of the representative coordinates of the subblocks into Equation 1 or 3 described above. The motion vectors of the subblocks in the current block derived through the affine motion model may be referred to as affine MVF.
한편, 일 예로, 상기 현재 블록 내 서브 블록의 사이즈는 다음과 같은 수학식을 기반으로 도출될 수도 있다. Meanwhile, as an example, the size of the sub block in the current block may be derived based on the following equation.
Figure PCTKR2019004424-appb-M000005
Figure PCTKR2019004424-appb-M000005
여기서, M 은 서브 블록의 폭(width)을 나타내고, N 은 서브 블록의 높이(height)를 나타낸다. 또한, v0x, v0y 는 각각 상기 현재 블록의 CPMV0 의 x 성분, y 성분을 나타내고, v0x, v0y 는 각각 상기 현재 블록의 CPMV1 의 x 성분, y 성분을 나타내고, w 는 상기 현재 블록의 폭을 나타내고, h 는 상기 현재 블록의 높이를 나타내고, MvPre 는 움직임 벡터 분수 정확도(motion vector fraction accuracy)를 나타낸다. 예를 들어, 상기 움직임 벡터 분수 정확도는 1/16 으로 설정될 수 있다.Here, M represents the width of the sub block, and N represents the height of the sub block. In addition, v 0x, v 0y denotes an x component, y component of CPMV0 of the current block, respectively, v 0x, v 0y are each the current represents the CPMV1 x component, y component of the block, w is in the current block Width, h represents the height of the current block, and MvPre represents the motion vector fraction accuracy. For example, the motion vector fraction accuracy may be set to 1/16.
한편, 상술한 어파인 움직임 모델을 사용한 인터 예측, 즉, 어파인 움직임 예측은 어파인 머지(affine merge mode, AF_MRG) 모드와 어파인 MVP(affine motion vector prediction, AF_MVP) 모드가 존재할 수 있다.Meanwhile, in the inter prediction using the above-described affine motion model, that is, the affine motion prediction, there may be an affine merge mode (AF_MRG) mode and an affine motion vector prediction (AF_MVP) mode.
상기 어파인 머지 모드에서는 상기 컨트롤 포인트들의 움직임 벡터에 대한 MVD를 전송하지 않는다는 측면에서 기존의 머지 모드와 유사하다. 즉, 상기 어파인 머지 모드는 기존의 스킵(skip)/머지(merge) 모드와 유사하게 MVD(motion vector difference)에 대한 코딩없이 상기 현재 블록의 주변 블록으로부터 2개 또는 3개의 컨트롤 포인트 각각에 대한 CPMV를 유도하여 예측을 수행하는 인코딩/디코딩 방법을 나타낼 수 있다.The merge merge mode is similar to the existing merge mode in that MVD is not transmitted for the motion vector of the control points. That is, the affine merge mode is similar to the conventional skip / merge mode, and each of two or three control points from neighboring blocks of the current block without coding for motion vector difference (MVD). An encoding / decoding method of inducing CPMV to perform prediction may be described.
예를 들어, 상기 현재 블록에 상기 AF_MRG 모드가 적용되는 경우, 현재 블록의 주변 블록 중 어파인 모드가 적용된 주변 블록으로부터 CP0 및 CP1에 대한 MV(즉, CPMV0 및 CPMV1)을 도출될 수 있다. 즉, 상기 어파인 모드가 적용된 상기 주변 블록의 CPMV0 및 CPMV1가 머지 후보로 도출될 수 있고, 상기 머지 후보가 상기 현재 블록에 대한 CPMV0 및 CPMV1로 도출될 수 있다.For example, when the AF_MRG mode is applied to the current block, MVs for CP0 and CP1 (that is, CPMV0 and CPMV1) may be derived from the neighboring block to which the affine mode is applied among the neighboring blocks of the current block. That is, CPMV0 and CPMV1 of the neighboring block to which the affine mode is applied may be derived as a merge candidate, and the merge candidate may be derived as CPMV0 and CPMV1 for the current block.
상기 AF_MVP 모드는 상기 컨트롤 포인트들의 움직임 벡터에 대한 MVP(motion vector predictor)를 도출하고, 수신된 MVD(motion vector difference) 및 상기 MVP 를 기반으로 상기 컨트롤 포인트들의 움직임 벡터를 도출하고, 상기 컨트롤 포인트들의 움직임 벡터를 기반으로 상기 현재 블록의 어파인 MVF 를 도출하여 어파인 MVF 를 기반으로 예측을 수행하는 인터 예측을 나타낼 수 있다. 여기서, 상기 컨트롤 포인트의 움직임 벡터는 CPMV(Control Point Motion Vector), 상기 컨트롤 포인트의 MVP는 CPMVP(Control Point Motion Vector Predictor), 상기 컨트롤 포인트의 MVD는 CPMVD(Control Point Motion Vector Difference) 라고 나타낼 수 있다. 구체적으로, 예를 들어, 인코딩 장치는 CP0 및 CP1 (또는 CP0, CP1 및 CP2) 각각에 대한 CPMVP(control point point motion vector predictor)와 CPMV(control point point motion vector)를 도출할 수 있고, 상기 CPMVP 와 CPMV 의 차이값인 CPMVD 를 전송 또는 저장할 수 있다.The AF_MVP mode derives a motion vector predictor (MVP) for a motion vector of the control points, derives a motion vector of the control points based on the received motion vector difference (MVD) and the MVP, An inter-prediction that derives an MVF of the current block based on a motion vector and performs prediction based on the affine MVF may be represented. Here, the motion vector of the control point may be represented as a control point motion vector (CPMV), the MVP of the control point is a control point motion vector predictor (CPMVP), and the MVD of the control point may be represented as a control point motion vector difference (CPMVD). . Specifically, for example, the encoding apparatus may derive a control point point motion vector predictor (CPMVP) and a control point point motion vector (CPMVP) for each of CP0 and CP1 (or CP0, CP1 and CP2), and the CPMVP CPMVD, the difference between CPMV and CPMV, can be transmitted or stored.
한편, 상술한 내용과 같이 현재 블록에 대한 어파인 움직임 모델을 적용하는 경우, 영상의 왜곡 형태를 예측할 수 있고, 이를 통하여 예측의 정확도를 높임으로서 영상의 압축 성능을 향상시킬 수 있으나, 현재 블록의 샘플 또는 서브 블록 단위로 나뉘어서 움직임 보상이 수행되므로 디코딩 과정의 연산 복잡도 및 메모리 접근 속도가 증가하는 단점이 발생될 수 있다. On the other hand, when applying the affine motion model for the current block as described above, it is possible to predict the distortion form of the image, thereby improving the compression performance of the image by increasing the accuracy of the prediction, Since motion compensation is performed in units of samples or sub-blocks, computational complexity and memory access speed of the decoding process may increase.
예를 들어, 현재 블록에 대하여 머지 모드가 적용되는 경우, 상기 현재 블록의 주변 블록 중 어파인 예측 모드가 적용된 주변 블록이 존재하는 경우, 인코딩 장치/디코딩 장치는 상기 현재 블록에 대해서도 어파인 예측 모드를 수행할 지를 결정할 수 있다. For example, when the merge mode is applied to the current block, when there is a neighboring block to which the affine prediction mode is applied among the neighboring blocks of the current block, the encoding device / decoding device is also in the affine prediction mode for the current block. You can decide whether to perform
상기 현재 블록에 어파인 예측 모드가 적용되는 경우, 인코딩 장치/디코딩 장치는 상기 현재 블록의 주변 블록을 기반으로 상기 현재 블록의 CPMV 가 도출될 수 있다. 예를 들어, 4개의 파라미터가 사용되는 어파인 움직임 모델이 적용되는 경우, 인코딩 장치/디코딩 장치는 상기 주변 블록의 CP에 대한 좌표와 상기 현재 블록의 좌표를 상술한 수학식 3에 대입함으로써 상기 현재 블록에 대한 CPMV를 도출할 수 있다. When the affine prediction mode is applied to the current block, the encoding device / decoding device may derive the CPMV of the current block based on the neighboring block of the current block. For example, when an affine motion model using four parameters is applied, the encoding device / decoding device substitutes the coordinates of the CP of the neighboring block and the coordinates of the current block into Equation 3 described above. The CPMV for the block can be derived.
그러나 상기 현재 블록에 어파인 예측 모드가 적용되는 경우, 상기 현재 블록에 대한 CPMV를 도출하고, 상기 도출된 CPMV를 기반으로 현재 블록을 샘플 또는 서브 블록 단위로 나누어 각 샘플 또는 서브 블록의 움직임 벡터를 계산하는 과정이 동시에 필요하다. 비록 어파인 예측 모드가 병진 움직임뿐만 아니라 회전(rotation), 스케일링(scaling) 등 다양한 움직임을 표현할 수 있으나 각 샘플 또는 서브 블록에 대한 계산이 동시에 필요하기 때문에 많은 계산량을 필요로 한다.However, when the affine prediction mode is applied to the current block, a CPMV for the current block is derived, and the motion vector of each sample or subblock is divided by dividing the current block into units of samples or subblocks based on the derived CPMV. The calculation process is required at the same time. Although the affine prediction mode can represent not only translation but also various movements such as rotation and scaling, it requires a large amount of computation since calculation for each sample or subblock is required at the same time.
이에, 본 발명은 현재 블록에 대한 예측에 있어서, 어파인 예측 방법으로 인코딩/디코딩된 주변 블록의 특성을 최대한 활용하되, 샘플 또는 서브 블록 단위로 나뉘어서 움직임 보상이 되는 것을 방지함으로써, 메모리 접근 속도를 절약하면서 단순히 주변 블록의 움직임 벡터를 활용하여 움직임 예측을 하는 경우보다는 예측 정확도를 향상시키는 방안을 제안한다. Accordingly, the present invention maximizes the characteristics of the neighboring block encoded / decoded by the affine prediction method in the prediction of the current block, but prevents the motion compensation by dividing the data into samples or sub-blocks, thereby increasing the memory access speed. This paper proposes a method to improve the prediction accuracy rather than saving the motion by simply using the motion vectors of neighboring blocks.
예를 들어, 본 발명은 주변 블록의 CPMV(Control Point Motion Vector)를 활용하여 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출하고, 도출된 움직임 벡터를 상기 현재 블록에 대한 MVP로 활용하는 방법을 제안한다.For example, the present invention derives a motion vector for a center position of a current block by using a control point motion vector (CPMV) of a neighboring block, and uses the derived motion vector as an MVP for the current block. Suggest how to.
도 7은 주변 블록의 CPMV 를 기반으로 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출하는 일 예를 나타낸다. 도 5를 참조하면 상기 현재 블록의 좌측 주변 블록이 어파인 예측 모드로 예측된 블록일 수 있다. 이 경우, 상기 좌측 주변 블록의 CPMV 를 기반으로 상기 현재 블록에 대한 센터 포지션의 움직임 벡터(700)가 도출될 수 있다. FIG. 7 illustrates an example of deriving a motion vector with respect to the center position of the current block based on the CPMV of the neighboring block. Referring to FIG. 5, a left neighboring block of the current block may be a block predicted in an affine prediction mode. In this case, the motion vector 700 of the center position with respect to the current block may be derived based on the CPMV of the left neighboring block.
예를 들어, 상기 현재 블록의 센터 포지션에 대한 움직임 벡터는 다음과 같은 수학식을 기반으로 도출될 수 있다.For example, the motion vector for the center position of the current block may be derived based on the following equation.
Figure PCTKR2019004424-appb-M000006
Figure PCTKR2019004424-appb-M000006
여기서, MVc(vx,vy) 는 상기 현재 블록의 센터 포지션에 대한 움직임 벡터를 나타낸다. vx 는 상기 현재 블록의 센터 포지션에 대한 움직임 벡터의 x 성분을 나타내고, vy 는 상기 현재 블록의 센터 포지션에 대한 움직임 벡터의 y 성분을 나타낸다. 또한, v0x 는 상기 주변 블록의 CPMV0 의 x 성분을 나타내고, v0y 는 상기 주변 블록의 CPMV0 의 y 성분을 나타내고, v1x 는 상기 주변 블록의 CPMV1 의 x 성분을 나타내고, v1y 는 상기 주변 블록의 CPMV1 의 y 성분을 나타내고, h 는 상기 현재 블록의 높이(height)를 나타내고, w 는 상기 현재 블록의 폭(width)를 나타낸다. 상기 주변 블록의 CPMV0 는 상기 주변 블록의 CP0(Control Point 0) 의 움직임 벡터를 나타낼 수 있고, 상기 주변 블록의 CPMV1 는 상기 주변 블록의 CP1(Control Point 1)의 움직임 벡터를 나타낼 수 있다. 상기 CP0 은 상기 주변 블록의 좌상단 위치를 나타낼 수 있고, 상기 CP1 은 상기 주변 블록의 우상단 위치를 나타낼 수 있다. 상기 주변 블록 내의 좌상단(top-left) 샘플 위치(position)가 (a,b)인 경우, (a,b) 샘플 포지션의 컨트롤 포인트는 CP0, (a+wn, b) 샘플 포지션의 컨트롤 포인트는 CP1 라고 나타낼 수 있다. 즉, 상기 주변 블록의 좌상단(top-left) 샘플 포지션의 좌표가 (a, b)이고, 상기 주변 블록의 폭(width)은 wn인 경우, 상기 CP들 중 CP0의 좌표는 (a, b)이고, CP1의 좌표는 (a+wn, b)일 수 있다.Here, MV c (v x , v y ) represents a motion vector with respect to the center position of the current block. v x represents the x component of the motion vector with respect to the center position of the current block, and v y represents the y component of the motion vector with respect to the center position of the current block. In addition, v 0x denotes the x component of the CPMV0 of the peripheral block, v 0y denotes a y component of the CPMV0 of the peripheral block, v 1x represents the x component of the CPMV1 of the peripheral block, v 1y is the peripheral block Denotes the y component of CPMV1, h denotes the height of the current block, and w denotes the width of the current block. The CPMV0 of the neighboring block may represent a motion vector of CP0 (Control Point 0) of the neighboring block, and the CPMV1 of the neighboring block may represent a motion vector of CP1 (Control Point 1) of the neighboring block. The CP0 may indicate a top left position of the neighboring block, and the CP1 may indicate a top right position of the neighboring block. When the top-left sample position in the neighboring block is (a, b), the control point of the (a, b) sample position is the control point of CP0, (a + w n , b) sample position. May be represented as CP1. That is, when the top-left sample position of the neighboring block is (a, b) and the width of the neighboring block is w n , the coordinate of CP0 among the CPs is (a, b ), And the coordinate of CP1 may be (a + w n , b).
상기 현재 블록의 센터 포지션에 대한 움직임 벡터가 도출된 경우, 상기 도출된 움직임 벡터는 CP 가 도출된 주변 블록(예를 들어, 도 7의 좌측 주변 블록) 의 움직임 벡터로써 상기 현재 블록에 대한 공간적 MVP 후보로 사용될 수 있다. 즉, 상기 센터 포지션에 대한 움직임 벡터는 상기 현재 블록에 대한 MVP 후보로 도출될 수 있다.When a motion vector for the center position of the current block is derived, the derived motion vector is a spatial MVP for the current block as a motion vector of a neighboring block from which CP is derived (for example, a left neighboring block in FIG. 7). Can be used as a candidate. That is, the motion vector for the center position may be derived as the MVP candidate for the current block.
본 발명에서 제안된 실시예는 온전한 어파인 움직임 모델을 나타낼 수는 없으나, 어파인 예측보다 간단한 방법으로 병진 움직임을 적용하여 본래 어파인 예측에서 다룰 수 있는 많은 영역을 활용한 움직임 보상이 가능할 수 있다. 또한, 상술한 실시예에서는 4 파라미터 어파인 움직임 모델을 기반으로 현재 블록의 센터 포지션에 대한 움직임 벡터를 도출하는 방안을 예시로 나타내었으나, 상술한 실시예에 4 파라미터 어파인 움직임 모델 이외의 어파인 움직임 모델(예를 들어, 6 파라미터 어파인 움직임 모델)이 적용될 수도 있다. 이를 통하여, 상기 4 파라미터 어파인 움직임 모델 이외의 어파인 움직임 모델을 기반으로 현재 블록의 센터 포지션에 대한 움직임 벡터가 도출될 수 있고, 도출된 움직임 벡터를 상기 현재 블록에 대한 MVP 로 적용될 수 있다.Although the embodiment proposed in the present invention cannot represent an intact affine motion model, motion compensation using many regions that can be handled in the original affine prediction may be possible by applying a translational motion in a simpler manner than the affine prediction. . In addition, in the above-described embodiment, a method of deriving a motion vector for the center position of the current block based on the 4-parameter affine motion model is illustrated as an example. A motion model (eg, a 6 parameter affine motion model) may be applied. Through this, a motion vector for the center position of the current block may be derived based on the affine motion model other than the 4 parameter affine motion model, and the derived motion vector may be applied as an MVP for the current block.
도 8은 주변 블록의 CPMV 를 기반으로 도출된 현재 블록의 센터 포지션에 대한 움직임 벡터를 상기 현재 블록의 MVP 로 사용하는 일 예를 나타낸다.FIG. 8 illustrates an example of using a motion vector of a center position of a current block derived based on the CPMV of a neighboring block as the MVP of the current block.
도 8을 참조하면 상기 주변 블록의 CPMV 를 기반으로 도출된 현재 블록의 센터 포지션에 대한 움직임 벡터가 상기 현재 블록의 MVP 로 사용될 수 있고, 상기 MVP 를 기반으로 상기 현재 블록의 움직임 벡터(800)가 도출될 수 있다. 예를 들어, 상기 현재 블록에 대한 움직임 벡터 차분(Motion Vector Difference, MVD)이 획득될 수 있고, 상기 MVP 및 상기 MVD 를 기반으로 상기 현재 블록의 상기 움직임 벡터가 도출될 수 있다. 이 경우, 상기 움직임 벡터(800)가 가리키는 참조 블록(810)을 기반으로 상기 현재 블록에 대한 예측 블록이 도출될 수 있다. Referring to FIG. 8, the motion vector for the center position of the current block derived based on the CPMV of the neighboring block may be used as the MVP of the current block, and the motion vector 800 of the current block is based on the MVP. Can be derived. For example, a motion vector difference (MVD) for the current block may be obtained, and the motion vector of the current block may be derived based on the MVP and the MVD. In this case, a prediction block for the current block may be derived based on the reference block 810 indicated by the motion vector 800.
한편, 상기 주변 블록의 CPMV 를 기반으로 도출된 현재 블록의 센터 포지션에 대한 움직임 벡터를 활용하는 방안으로 다음과 같은 실시예들이 제안될 수 있다. Meanwhile, the following embodiments may be proposed as a method of utilizing a motion vector for the center position of the current block derived based on the CPMV of the neighboring block.
일 예로, 머지 모드에서 상기 움직임 벡터가 공간적 머지 후보로 사용될 수 있다. 예를 들어, 현재 블록에 머지 모드가 적용되고, 상기 현재 블록에 대한 어파인 예측 플래그의 값이 0인 경우(즉, 현재 블록에 어파인 예측이 적용되지 않는 경우), 상기 현재 블록의 어파인 예측이 적용된 주변 블록의 CPMV 를 기반으로 상기 현재 블록에 센터 포지션에 대한 움직임 벡터가 도출될 수 있고, 상기 움직임 벡터는 상기 현재 블록의 공간적 주변 블록의 움직임 벡터로써 머지 후보로 도출될 수 있다.For example, the motion vector may be used as a spatial merge candidate in merge mode. For example, if a merge mode is applied to the current block and the value of the affine prediction flag for the current block is 0 (that is, if the affine prediction is not applied to the current block), the affine of the current block is A motion vector for a center position may be derived from the current block based on the CPMV of the neighboring block to which the prediction is applied, and the motion vector may be derived as a merge candidate as the motion vector of the spatial neighboring block of the current block.
한편, 상술한 실시예는 디코딩 장치에서 항상 수행될 수 있다. 또는, VPS(video parameter set), SPS(sequence parameter set), PPS(picture parameter set) 또는 슬라이스 헤더 등의 하이 레벨 신텍스(High level syntax)를 통하여 상기 실시예의 적용 여부를 나타내는 정보가 시그널링될 수 있고, 상기 실시예는 상기 정보를 기반으로 가변적으로 사용될 수 있다. 또는, 상기 현재 블록의 사이즈 또는 샘플 개수 또는 주변 블록의 모드 정보 등을 조건으로 활용하여 상기 실시예의 적용 여부가 적응적으로 판단될 수 있다. 즉, 상기 현재 블록의 사이즈 또는 샘플 개수 또는 주변 블록의 모드 정보 등을 기반으로 상기 실시예의 적용 여부가 판단될 수 있다.On the other hand, the above embodiment can always be performed in the decoding apparatus. Alternatively, information indicating whether the embodiment is applied may be signaled through high level syntax such as a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header. The embodiment may be used variably based on the information. Alternatively, whether the embodiment is applied or not may be adaptively determined by using the size of the current block, the number of samples, or mode information of a neighboring block as a condition. That is, it may be determined whether the embodiment is applied based on the size of the current block or the number of samples or mode information of the neighboring block.
또한, 일 예로, AMVP 모드에서 상기 움직임 벡터가 공간적 MVP 후보로 사용될 수 있다. 예를 들어, 예를 들어, 현재 블록에 AMVP 모드가 적용되고, 상기 현재 블록에 대한 어파인 예측 플래그의 값이 0인 경우(즉, 현재 블록에 어파인 예측이 적용되지 않는 경우), 상기 현재 블록의 어파인 예측이 적용된 주변 블록의 CPMV 를 기반으로 상기 현재 블록에 센터 포지션에 대한 움직임 벡터가 도출될 수 있고, 상기 움직임 벡터는 상기 현재 블록의 공간적 주변 블록의 움직임 벡터로써 AMVP 후보로 도출될 수 있다.Also, as an example, the motion vector may be used as a spatial MVP candidate in AMVP mode. For example, if the AMVP mode is applied to the current block, and the value of the affine prediction flag for the current block is 0 (ie, if the affine prediction is not applied to the current block), the current Based on the CPMV of the neighboring block to which the affine prediction of the block is applied, a motion vector for a center position may be derived from the current block, and the motion vector may be derived as an AMVP candidate as a motion vector of a spatial neighboring block of the current block. Can be.
한편, 상술한 실시예는 디코딩 장치에서 항상 수행될 수 있다. 또는, VPS(video parameter set), SPS(sequence parameter set), PPS(picture parameter set) 또는 슬라이스 헤더 등의 하이 레벨 신텍스(High level syntax)를 통하여 상기 실시예의 적용 여부를 나타내는 정보가 시그널링될 수 있고, 상기 실시예는 상기 정보를 기반으로 가변적으로 사용될 수 있다. 또는, 상기 현재 블록의 사이즈 또는 샘플 개수 또는 주변 블록의 모드 정보 등을 조건으로 활용하여 상기 실시예의 적용 여부가 적응적으로 판단될 수 있다. 즉, 상기 현재 블록의 사이즈 또는 샘플 개수 또는 주변 블록의 모드 정보 등을 기반으로 상기 실시예의 적용 여부가 판단될 수 있다.On the other hand, the above-described embodiment can always be performed in the decoding apparatus. Alternatively, information indicating whether the embodiment is applied may be signaled through high level syntax such as a video parameter set (VPS), a sequence parameter set (SPS), a picture parameter set (PPS), or a slice header. The embodiment may be used variably based on the information. Alternatively, whether the embodiment is applied or not may be adaptively determined by using the size of the current block, the number of samples, or mode information of a neighboring block as a condition. That is, it may be determined whether the embodiment is applied based on the size of the current block or the number of samples or mode information of the neighboring block.
도 9는 본 발명에 따른 인코딩 장치에 의한 영상 인코딩 방법을 개략적으로 나타낸다. 도 9에서 개시된 방법은 도 1에서 개시된 인코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 9의 S900 내지 S920은 상기 인코딩 장치의 예측부에 의하여 수행될 수 있고, S930은 상기 인코딩 장치의 엔트로피 인코딩부에 의하여 수행될 수 있다. 또한, 비록 도시되지는 않았으나 현재 블록에 대한 원본 샘플과 예측 샘플을 기반으로 상기 현재 블록에 대한 레지듀얼 샘플을 도출하는 과정은 상기 인코딩 장치의 감산부에 의하여 수행될 수 있고, 상기 레지듀얼 샘플을 기반으로 상기 현재 블록에 대한 레지듀얼에 관한 정보를 생성하는 과정은 상기 인코딩 장치의 변환부에 의하여 수행될 수 있고, 상기 레지듀얼에 관한 정보를 인코딩하는 과정은 상기 인코딩 장치의 엔트로피 인코딩부에 의하여 수행될 수 있다.9 schematically illustrates an image encoding method by an encoding apparatus 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 S920 of FIG. 9 may be performed by the prediction unit of the encoding apparatus, and S930 may be performed by the entropy encoding unit of the encoding apparatus. In addition, although not shown, a process of deriving a residual sample for the current block based on the original sample and the prediction sample for the current block may be performed by a subtractor of the encoding apparatus, The generating of the information about the residual on the basis of the current block may be performed by a converter of the encoding apparatus, and the encoding of the information about the residual may be performed by an entropy encoding unit of the encoding apparatus. Can be performed.
인코딩 장치는 현재 블록에 대한 주변 블록의 컨트롤 포인트(Control Point, CP)들의 움직임 벡터들을 도출한다(S900). The encoding apparatus derives motion vectors of control points (CPs) of neighboring blocks with respect to the current block (S900).
인코딩 장치는 현재 블록에 대한 주변 블록의 컨트롤 포인트들의 움직임 벡터들을 도출할 수 있다. 상기 CP들을 2개가 사용될 수 있고 또는 3개가 사용될 수 있다. 여기서, 상기 주변 블록은 어파인 예측(affine prediction)이 적용된 주변 블록일 수 있다. 즉, 상기 주변 블록은 상기 어파인 예측을 기반으로 인코딩/디코딩된 블록일 수 있다. The encoding device may derive the motion vectors of the control points of the neighboring block for the current block. Two CPs may be used or three CPs may be used. Here, the neighboring block may be a neighboring block to which affine prediction is applied. That is, the neighboring block may be a block encoded / decoded based on the affine prediction.
또한, 상기 주변 블록은 상기 현재 블록에 대한 주변 블록들 중 하나일 수 있다. 상기 주변 블록들은 공간적 주변 블록 및/또는 시간적 주변 블록을 포함할 수 있다. 상기 공간적 주변 블록은 상기 현재 블록의 좌측 주변 블록, 상측 주변 블록, 좌상측 코너 주변 블록, 좌하측 코너 주변 블록, 우상측 코너 주변 블록을 포함할 수 있다. 예를 들어, 상기 현재 블록의 사이즈가 WxH 이고, 현재 블록의 좌상단(top-left) 샘플 포지션의 x성분이 0 및 y성분이 0인 경우, 상기 좌측 주변 블록은 (-1, H-1) 좌표의 샘플을 포함하는 블록이고, 상기 상측 주변 블록은 (W-1, -1) 좌표의 샘플을 포함하는 블록이고, 상기 우상측 코너 주변 블록은 (W, -1) 좌표의 샘플을 포함하는 블록이고, 상기 좌하측 코너 주변 블록은 (-1, H) 좌표의 샘플을 포함하는 블록이고, 상기 좌상측 코너 주변 블록은 (-1, -1) 좌표의 샘플을 포함하는 블록일 수 있다. 또한, 상기 시간적 주변 블록은 상기 현재 블록의 좌상단 위치, 우하단 위치, 센터 우상단 위치 및/또는 센터 좌하단 위치에 대응하는 참조 픽처 내 위치를 포함하는 동일 위치 블록을 포함할 수 있다.The neighboring block may be one of neighboring blocks with respect to the current block. The neighboring blocks may include spatial neighboring blocks and / or temporal neighboring blocks. The spatial peripheral block may include a left peripheral block, an upper peripheral block, an upper left corner peripheral block, a lower left corner peripheral block, and a right upper corner peripheral block of the current block. For example, when the size of the current block is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the left neighboring block is (-1, H-1). A block containing a sample of coordinates, wherein the upper peripheral block is a block containing a sample of (W-1, -1) coordinates, and the right upper corner peripheral block includes a sample of (W, -1) coordinates Block, the lower left corner peripheral block may be a block including samples of (-1, H) coordinates, and the upper left corner peripheral block may be a block including samples of (-1, -1) coordinates. In addition, the temporal neighboring block may include the same position block including a position within a reference picture corresponding to an upper left position, a lower right position, a center upper right position, and / or a center lower left position of the current block.
일 예로, 상기 주변 블록에 대한 상기 CP들의 개수는 2개일 수 있다. 예를 들어, 상기 주변 블록의 좌상단(top-left) 샘플 포지션의 좌표가 (a, b)이고, 상기 주변 블록의 폭(width)은 wn인 경우, 상기 CP들 중 CP0의 좌표는 (a, b)이고, CP1의 좌표는 (a+wn, b)일 수 있다. For example, the number of CPs for the neighboring block may be two. For example, when the top-left sample position of the neighboring block is (a, b) and the width of the neighboring block is w n , the coordinate of CP0 among the CPs is (a , b), and the coordinate of CP1 may be (a + w n , b).
또는, 다른 예로, 상기 주변 블록에 대한 상기 CP들의 개수는 3개일 수 있다. 예를 들어, 상기 주변 블록의 좌상단 샘플 포지션의 좌표가 (a, b)이고, 상기 주변 블록의 높이는 hn, 폭은 wn인 경우, 상기 CP들 중 CP0의 좌표는 (a, b)이고, CP1의 좌표는 (a+wn, b)이고, CP2의 좌표는 (a, b+hn)일 수 있다.Alternatively, as another example, the number of CPs for the neighboring block may be three. For example, when the coordinate of the upper left sample position of the neighboring block is (a, b), the height of the neighboring block is h n , and the width is w n , the coordinate of CP0 among the CPs is (a, b) , The coordinate of CP1 may be (a + w n , b), and the coordinate of CP2 may be (a, b + h n ).
인코딩 장치는 상기 CP들의 움직임 벡터들을 기반으로 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출한다(S910). The encoding apparatus derives a motion vector with respect to the center position of the current block based on the motion vectors of the CPs (S910).
인코딩 장치는 상술한 수학식 1 또는 수학식 3과 같은 어파인 움직임 모델에 상기 주변 블록의 컨트롤 포인트들의 움직임 벡터들과 상기 현재 블록의 센터 포지션을 적용하여, 상기 현재 블록의 상기 센터 포지션에 대한 상기 움직임 벡터를 도출할 수 있다. 예를 들어, 상기 센터 포지션에 대한 상기 움직임 벡터는 상술한 수학식 6을 기반으로 도출될 수 있다. The encoding apparatus applies the motion vectors of the control points of the neighboring block and the center position of the current block to an affine motion model such as Equation 1 or Equation 3 above, so that the encoding of the center position of the current block is performed. A motion vector can be derived. For example, the motion vector for the center position may be derived based on Equation 6 described above.
한편, 예를 들어, 인코딩 장치는 상기 현재 블록에 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 결정할 수 있다. 상기 현재 블록에 인터 예측이 적용되는 경우, 인코딩 장치는 스킵(skip) 모드, 머지(merge) 모드 또는 AMVP 모드 등을 적용하여 현재 블록에 대한 움직임 정보를 도출할 수 있다. 여기서, 상기 움직임 정보는 움직임 벡터, 참조 픽처 인덱스를 포함할 수 있다.Meanwhile, for example, the encoding apparatus may determine whether intra prediction or inter prediction is applied to the current block. When inter prediction is applied to the current block, the encoding apparatus may derive motion information about the current block by applying a skip mode, a merge mode, or an AMVP mode. Here, the motion information may include a motion vector and a reference picture index.
일 예로, 상기 현재 블록에 상기 스킵 모드 또는 머지 모드가 적용되는 경우, 인코딩 장치는 가용한 주변 블록의 움직임 정보로 머지 후보 리스트를 구성할 수 있고, 상기 머지 후보 리스트에 포함된 머지 후보들 중 하나를 선택할 수 있고, 상기 선택된 머지 후보를 상기 현재 블록에 대한 움직임 정보로 도출할 수 있다. 이 경우, 인코딩 장치는 상기 머지 후보 리스트의 머지 후보들 중 상기 선택된 머지 후보를 가리키는 머지 인덱스를 인코딩할 수 있다. 상기 머지 인덱스는 상기 현재 블록에 대한 예측 정보에 포함될 수 있다. For example, when the skip mode or the merge mode is applied to the current block, the encoding apparatus may configure a merge candidate list using motion information of available neighboring blocks, and select one of the merge candidates included in the merge candidate list. The selected merge candidate may be derived as motion information for the current block. In this case, the encoding apparatus may encode a merge index indicating the selected merge candidate among merge candidates of the merge candidate list. The merge index may be included in the prediction information for the current block.
또한, 상기 현재 블록에 AMVP 모드가 적용되는 경우, 인코딩 장치는 상기 현재 블록의 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터를 이용하여, 움직임 벡터 예측자 후보 리스트를 생성할 수 있다. 즉, 복원된 공간적 주변 블록의 움직임 벡터 및/또는 시간적 주변 블록인 Col 블록에 대응하는 움직임 벡터는 움직임 벡터 예측자 후보로 사용될 수 있다. 인코딩 장치는 상기 현재 블록의 예측 정보는 상기 리스트에 포함된 움직임 벡터 예측자 후보 중에서 하나의 움직임 벡터 예측자 후보를 선택할 수 있고, 상기 선택된 움직임 벡터 예측자 후보를 움직임 벡터 예측자로 사용하여 상기 현재 블록에 대한 움직임 벡터를 도출할 수 있다. 또한, 인코딩 장치는 현재 블록의 움직임 벡터와 움직임 벡터 예측자 간의 움직임 벡터 차분(MVD)을 구할 수 있고, 이를 인코딩하여 비트스트림 형태로 출력할 수 있다. 즉, MVD는 현재 블록의 움직임 벡터에서 상기 움직임 벡터 예측자를 뺀 값으로 구해질 수 있다. 또한, 인코딩 장치는 상기 리스트에 포함된 움직임 벡터 예측자 후보들 중 상기 선택된 움직임 벡터 예측자 후보를 지시하는 움직임 벡터 예측자 인덱스를 인코딩할 수 있다. 상기 움직임 벡터 예측자 인덱스는 상기 현재 블록에 대한 예측 정보에 포함될 수 있다. 또한, 인코딩 장치는 상기 현재 블록에 대한 참조 픽처를 도출할 수 있고, 상기 참조 픽처를 지시하는 참조 픽처 인덱스를 인코딩할 수 있다. 상기 참조 픽처 인덱스는 상기 예측 정보에 포함될 수 있다. In addition, when an AMVP mode is applied to the current block, the encoding apparatus uses the motion vector corresponding to the motion vector of the spatial neighboring block of the current block and / or the Col block, which is a temporal neighboring block, to the motion vector predictor candidate list Can be generated. That is, a motion vector of a reconstructed spatial neighboring block and / or a motion vector corresponding to a Col block, which is a temporal neighboring block, may be used as a motion vector predictor candidate. The encoding apparatus may select one motion vector predictor candidate from among motion vector predictor candidates included in the list as the prediction information of the current block, and use the selected motion vector predictor candidate as a motion vector predictor. We can derive the motion vector for. In addition, the encoding apparatus may obtain a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, and may encode the same and output the encoded bitstream in the form of a bitstream. That is, MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block. In addition, the encoding apparatus may encode a motion vector predictor index indicating the selected motion vector predictor candidate among the motion vector predictor candidates included in the list. The motion vector predictor index may be included in prediction information about the current block. In addition, the encoding apparatus may derive a reference picture for the current block and may encode a reference picture index indicating the reference picture. The reference picture index may be included in the prediction information.
한편, 인코딩 장치는 상기 현재 블록의 인터 예측에 대한 정보를 인코딩할 수 있다. 상기 인터 예측에 대한 정보는 상기 현재 블록에 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 여부를 나타내는 정보를 포함할 수 있다. 또한, 상기 인터 예측에 대한 정보는 상기 현재 블록에 스킵 모드가 적용되는지 여부를 나타내는 정보(예를 들어, 스킵 플래그)를 포함할 수 있다. 또한, 상기 인터 예측에 대한 정보는 상기 현재 블록에 머지 모드가 적용되는지 또는 AMVP 모드가 적용되는지 여부를 나타내는 정보(예를 들어, 머지 플래그)를 포함할 수 있다. Meanwhile, the encoding apparatus may encode information on inter prediction of the current block. The information on the inter prediction may include information indicating whether intra prediction or inter prediction is applied to the current block. The information on the inter prediction may include information (eg, a skip flag) indicating whether a skip mode is applied to the current block. The information on the inter prediction may include information (eg, a merge flag) indicating whether a merge mode or an AMVP mode is applied to the current block.
또한, 인코딩 장치는 상기 현재 블록에 어파인 예측이 적용되는지 여부를 결정할 수 있고, 상기 현재 블록에 상기 어파인 예측이 적용되는지 여부를 나타내는 어파인 예측 플래그를 생성 및 인코딩할 수 있다. 상기 어파인 예측 플래그의 값이 1인 경우, 상기 어파인 예측 플래그는 상기 현재 블록에 상기 어파인 예측이 적용됨을 나타낼 수 있고, 상기 어파인 예측 플래그의 값이 0인 경우, 상기 어파인 예측 플래그는 상기 현재 블록에 상기 어파인 예측이 적용되지 않음을 나타낼 수 있다. 상기 인터 예측에 대한 정보는 상기 어파인 예측 플래그를 포함할 수 있다. 한편, 예를 들어, 상기 현재 블록에 머지 모드 또는 MVP 모드가 적용되고, 상기 현재 블록에 어파인 예측이 적용되지 않는 경우, 상기 어파인 예측이 적용된 주변 블록의 컨트롤 포인트들의 움직임 벡터들을 기반으로 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터가 도출될 수 있고, 상기 움직임 벡터는 상기 현재 블록의 머지 후보 또는 MVP 후보로 도출될 수 있다.In addition, the encoding apparatus may determine whether affine prediction is applied to the current block, and generate and encode an affine prediction flag indicating whether the affine prediction is applied to the current block. When the value of the affine prediction flag is 1, the affine prediction flag may indicate that the affine prediction is applied to the current block. When the value of the affine prediction flag is 0, the affine prediction flag is 0. May indicate that the affine prediction is not applied to the current block. The information on the inter prediction may include the affine prediction flag. On the other hand, for example, when a merge mode or MVP mode is applied to the current block and affine prediction is not applied to the current block, based on the motion vectors of control points of a neighboring block to which the affine prediction is applied. A motion vector for the center position of the current block may be derived, and the motion vector may be derived as a merge candidate or MVP candidate of the current block.
인코딩 장치는 상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행한다(S920). 인코딩 장치는 상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 움직임 벡터를 도출할 수 있다. The encoding apparatus performs prediction on the current block based on the motion vector (S920). The encoding apparatus may derive a motion vector for the current block based on the motion vector.
예를 들어, 상기 현재 블록에 머지 모드가 적용된 경우, 인코딩 장치는 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 상기 현재 블록의 머지 후보로 도출할 수 있다. 상기 머지 후보는 상기 센터 포지션에 대한 움직임 벡터 및 상기 주변 블록의 참조 픽처 인덱스를 포함할 수 있다. 인코딩 장치는 상기 머지 후보를 상기 현재 블록의 움직임 정보로 도출할 수 있고, 상기 참조 픽처 인덱스를 기반으로 참조 픽처를 도출할 수 있고, 상기 참조 픽처 상에서 상기 움직임 벡터가 가리키는 참조 블록을 도출할 수 있고, 상기 참조 블록 내의 복원 샘플을 상기 현재 블록에 대한 예측 샘플로 이용할 수 있다. 여기서, 예를 들어, 인코딩 장치는 머지 후보 리스트에 포함된 머지 후보들 중 상기 선택된 머지 후보를 지시하는 머지 인덱스를 인코딩할 수 있다.For example, when a merge mode is applied to the current block, the encoding apparatus may derive a motion vector for a center position of the current block as a merge candidate of the current block. The merge candidate may include a motion vector for the center position and a reference picture index of the neighboring block. The encoding apparatus may derive the merge candidate as motion information of the current block, derive a reference picture based on the reference picture index, derive a reference block indicated by the motion vector on the reference picture, and The reconstruction sample in the reference block may be used as a prediction sample for the current block. Here, for example, the encoding apparatus may encode a merge index indicating the selected merge candidate among merge candidates included in the merge candidate list.
또한, 예를 들어, 상기 현재 블록에 MVP 모드가 적용된 경우, 인코딩 장치는 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 상기 현재 블록의 MVP 후보로 도출할 수 있다. 인코딩 장치는 상기 MVP 후보를 상기 현재 블록의 MVP(motion vector predictor)로 도출할 수 있고, 상기 MVP 와 상기 현재 블록에 대한 MVD의 가산을 통해 상기 현재 블록에 대한 상기 움직임 벡터를 도출할 수 있다. 인코딩 장치는 상기 현재 블록에 대한 참조 픽처 상에서 상기 움직임 벡터가 가리키는 참조 블록을 도출할 수 있고, 상기 참조 블록 내의 복원 샘플을 상기 현재 블록에 대한 예측 샘플로 이용할 수 있다. 여기서, 인코딩 장치는 상기 현재 블록에 대한 상기 참조 픽처를 가리키는 참조 픽처 인덱스를 생성 및 인코딩할 수 있다. 또한, 인코딩 장치는 현재 블록의 움직임 벡터와 움직임 벡터 예측자 간의 움직임 벡터 차분(MVD)을 구할 수 있고, 이를 인코딩하여 비트스트림 형태로 출력할 수 있다. 즉, MVD는 현재 블록의 움직임 벡터에서 상기 움직임 벡터 예측자를 뺀 값으로 구해질 수 있다. 또한, 인코딩 장치는 MVP 후보 리스트에 포함된 움직임 벡터 예측자 후보들 중 상기 선택된 MVP 후보를 지시하는 MVP 인덱스를 인코딩할 수 있다.In addition, for example, when the MVP mode is applied to the current block, the encoding apparatus may derive a motion vector for the center position of the current block as the MVP candidate of the current block. The encoding apparatus may derive the MVP candidate as a motion vector predictor (MVP) of the current block, and derive the motion vector for the current block through the addition of the MVP and the MVD for the current block. The encoding apparatus may derive the reference block indicated by the motion vector on the reference picture for the current block, and use the reconstructed sample in the reference block as a prediction sample for the current block. Here, the encoding apparatus may generate and encode a reference picture index indicating the reference picture for the current block. In addition, the encoding apparatus may obtain a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, and may encode the same and output the encoded bitstream in the form of a bitstream. That is, MVD may be obtained by subtracting the motion vector predictor from the motion vector of the current block. In addition, the encoding apparatus may encode the MVP index indicating the selected MVP candidate among the motion vector predictor candidates included in the MVP candidate list.
인코딩 장치는 상기 현재 블록의 인터 예측에 대한 정보를 인코딩한다(S930). 인코딩 장치는 상기 현재 블록의 상기 인터 예측에 대한 정보를 인코딩하여 비트스트림 형태로 출력할 수 있다. 상기 인터 예측에 대한 정보는 상기 현재 블록에 인트라 예측이 적용되는지 또는 인터 예측이 적용되는지 여부를 나타내는 정보를 포함할 수 있다. 또한, 상기 인터 예측에 대한 정보는 상기 현재 블록에 스킵 모드가 적용되는지 여부를 나타내는 정보(예를 들어, 스킵 플래그)를 포함할 수 있다. 또한, 상기 인터 예측에 대한 정보는 상기 현재 블록에 머지 모드가 적용되는지 또는 AMVP 모드가 적용되는지 여부를 나타내는 정보(예를 들어, 머지 플래그)를 포함할 수 있다. 또한, 상기 현재 블록에 머지 모드가 적용되는 경우, 상기 인터 예측에 대한 정보는 상기 선택된 머지 후보를 가리키는 머지 인덱스를 포함할 수 있다. 또한, 상기 현재 블록에 AMVP 모드가 적용되는 경우, 상기 인터 예측에 대한 정보는 상기 선택된 MVP 후보를 가리키는 MVP 인덱스, 상기 현재 블록에 대한 MVD 및 상기 현재 블록에 대한 참조 픽처를 가리키는 참조 픽처 인덱스를 포함할 수 있다. The encoding device encodes information about inter prediction of the current block (S930). The encoding apparatus may encode and output the information about the inter prediction of the current block in the form of a bitstream. The information on the inter prediction may include information indicating whether intra prediction or inter prediction is applied to the current block. The information on the inter prediction may include information (eg, a skip flag) indicating whether a skip mode is applied to the current block. The information on the inter prediction may include information (eg, a merge flag) indicating whether a merge mode or an AMVP mode is applied to the current block. In addition, when a merge mode is applied to the current block, the information on the inter prediction may include a merge index indicating the selected merge candidate. In addition, when an AMVP mode is applied to the current block, the information on the inter prediction includes an MVP index indicating the selected MVP candidate, an MVD for the current block, and a reference picture index indicating a reference picture for the current block. can do.
또한, 인코딩 장치는 상기 레지듀얼 샘플을 기반으로 상기 레지듀얼에 관한 정보를 생성할 수 있다. 상기 레지듀얼에 관한 정보는 상기 레지듀얼 샘플에 관한 변환 계수들을 포함할 수 있다. 인코딩 장치는 상기 레지듀얼에 관한 정보를 인코딩하여 비트스트림 형태로 출력할 수 있다. 상기 비트스트림은 네트워크 또는 저장매체를 통하여 디코딩 장치로 전송될 수 있다.In addition, the encoding apparatus may generate information about the residual based on the residual sample. The information about the residual may include transform coefficients related to the residual sample. The encoding device may encode the information about the residual and output the encoded information about the residual. The bitstream may be transmitted to a decoding apparatus via a network or a storage medium.
도 10은 본 발명에 따른 영상 인코딩 방법을 수행하는 인코딩 장치를 개략적으로 나타낸다. 도 9에서 개시된 방법은 도 10에서 개시된 인코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 10의 상기 디코딩 장치의 예측부는 도 9의 S900 내지 S920을 수행할 수 있고, 도 10의 상기 디코딩 장치의 엔트로피 인코딩부는 도 9의 S930을 수행할 수 있다. 또한, 비록 도시되지는 않았으나 상기 현재 블록에 대한 원본 샘플과 예측 샘플을 기반으로 상기 현재 블록에 대한 레지듀얼 샘플을 도출하는 과정은 도 10의 상기 인코딩 장치의 감산부에 의하여 수행될 수 있고, 상기 레지듀얼 샘플을 기반으로 상기 현재 블록에 대한 레지듀얼에 관한 정보를 생성하는 과정은 도 10의 상기 인코딩 장치의 변환부에 의하여 수행될 수 있고, 상기 레지듀얼에 관한 정보를 인코딩하는 과정은 도 10의 상기 인코딩 장치의 엔트로피 인코딩부에 의하여 수행될 수 있다.10 schematically illustrates an encoding apparatus for performing an image encoding method according to the present invention. The method disclosed in FIG. 9 may be performed by the encoding apparatus disclosed in FIG. 10. Specifically, for example, the prediction unit of the decoding apparatus of FIG. 10 may perform S900 to S920 of FIG. 9, and the entropy encoding unit of the decoding apparatus of FIG. 10 may perform S930 of FIG. 9. Although not shown, a process of deriving a residual sample for the current block based on the original sample and the prediction sample for the current block may be performed by the subtraction unit of the encoding apparatus of FIG. 10. The generating of the information about the residual for the current block based on the residual sample may be performed by the converter of the encoding apparatus of FIG. 10, and the encoding of the residual information may be performed in FIG. 10. May be performed by an entropy encoding unit of the encoding apparatus.
도 11은 본 발명에 따른 디코딩 장치에 의한 영상 디코딩 방법을 개략적으로 나타낸다. 도 11에서 개시된 방법은 도 2에서 개시된 디코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 11의 S1600 내지 S1640은 상기 디코딩 장치의 예측부에 의하여 수행될 수 있다. 또한, 비록 도시되지는 않았으나 비트스트림을 통하여 현재 블록의 인터 예측에 대한 정보 및 레지듀얼에 관한 정보를 획득하는 과정은 상기 디코딩 장치의 엔트로피 디코딩부에 의하여 수행될 수 있고, 상기 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 상기 레지듀얼 샘플을 도출하는 과정은 상기 디코딩 장치의 역변환부에 의하여 수행될 수 있고, 예측 샘플과 상기 레지듀얼 샘플을 기반으로 복원 픽처를 생성하는 과정은 상기 디코딩 장치의 가산부에 의하여 수행될 수 있다.11 schematically illustrates an image decoding method by a decoding apparatus according to the present invention. The method disclosed in FIG. 11 may be performed by the decoding apparatus disclosed in FIG. 2. Specifically, for example, S1600 to S1640 of FIG. 11 may be performed by the prediction unit of the decoding apparatus. In addition, although not shown, the process of acquiring the information about the inter prediction and the residual information of the current block through the bitstream may be performed by an entropy decoding unit of the decoding apparatus, based on the residual information. Deriving the residual sample for the current block may be performed by an inverse transform unit of the decoding apparatus, and generating a reconstructed picture based on the prediction sample and the residual sample may be added by the decoding apparatus. Can be performed by wealth.
디코딩 장치는 현재 블록에 대한 주변 블록의 컨트롤 포인트(Control Point, CP)들의 움직임 벡터들을 도출한다(S1100). The decoding apparatus derives motion vectors of control points (CPs) of the neighboring block with respect to the current block (S1100).
디코딩 장치는 현재 블록에 대한 주변 블록의 컨트롤 포인트들의 움직임 벡터들을 도출할 수 있다. 상기 CP들을 2개가 사용될 수 있고 또는 3개가 사용될 수 있다. 여기서, 상기 주변 블록은 어파인 예측(affine prediction)이 적용된 주변 블록일 수 있다. 즉, 상기 주변 블록은 상기 어파인 예측을 기반으로 디코딩된 블록일 수 있다. The decoding apparatus may derive the motion vectors of the control points of the neighboring block for the current block. Two CPs may be used or three CPs may be used. Here, the neighboring block may be a neighboring block to which affine prediction is applied. That is, the neighboring block may be a block decoded based on the affine prediction.
또한, 상기 주변 블록은 상기 현재 블록에 대한 주변 블록들 중 하나일 수 있다. 상기 주변 블록들은 공간적 주변 블록 및/또는 시간적 주변 블록을 포함할 수 있다. 상기 공간적 주변 블록은 상기 현재 블록의 좌측 주변 블록, 상측 주변 블록, 좌상측 코너 주변 블록, 좌하측 코너 주변 블록, 우상측 코너 주변 블록을 포함할 수 있다. 예를 들어, 상기 현재 블록의 사이즈가 WxH 이고, 현재 블록의 좌상단(top-left) 샘플 포지션의 x성분이 0 및 y성분이 0인 경우, 상기 좌측 주변 블록은 (-1, H-1) 좌표의 샘플을 포함하는 블록이고, 상기 상측 주변 블록은 (W-1, -1) 좌표의 샘플을 포함하는 블록이고, 상기 우상측 코너 주변 블록은 (W, -1) 좌표의 샘플을 포함하는 블록이고, 상기 좌하측 코너 주변 블록은 (-1, H) 좌표의 샘플을 포함하는 블록이고, 상기 좌상측 코너 주변 블록은 (-1, -1) 좌표의 샘플을 포함하는 블록일 수 있다. 또한, 상기 시간적 주변 블록은 상기 현재 블록의 좌상단 위치, 우하단 위치, 센터 우상단 위치 및/또는 센터 좌하단 위치에 대응하는 참조 픽처 내 위치를 포함하는 동일 위치 블록을 포함할 수 있다.The neighboring block may be one of neighboring blocks with respect to the current block. The neighboring blocks may include spatial neighboring blocks and / or temporal neighboring blocks. The spatial peripheral block may include a left peripheral block, an upper peripheral block, an upper left corner peripheral block, a lower left corner peripheral block, and a right upper corner peripheral block of the current block. For example, when the size of the current block is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the left neighboring block is (-1, H-1). A block containing a sample of coordinates, wherein the upper peripheral block is a block containing a sample of (W-1, -1) coordinates, and the right upper corner peripheral block includes a sample of (W, -1) coordinates Block, the lower left corner peripheral block may be a block including samples of (-1, H) coordinates, and the upper left corner peripheral block may be a block including samples of (-1, -1) coordinates. In addition, the temporal neighboring block may include the same position block including a position within a reference picture corresponding to an upper left position, a lower right position, a center upper right position, and / or a center lower left position of the current block.
일 예로, 상기 주변 블록에 대한 상기 CP들의 개수는 2개일 수 있다. 예를 들어, 상기 주변 블록의 좌상단(top-left) 샘플 포지션의 좌표가 (a, b)이고, 상기 주변 블록의 폭(width)은 wn인 경우, 상기 CP들 중 CP0의 좌표는 (a, b)이고, CP1의 좌표는 (a+wn, b)일 수 있다. For example, the number of CPs for the neighboring block may be two. For example, when the coordinates of the top-left sample position of the neighboring block are (a, b) and the width of the neighboring block is w n , the coordinate of CP0 among the CPs is (a , b), and the coordinate of CP1 may be (a + w n , b).
또는, 다른 예로, 상기 주변 블록에 대한 상기 CP들의 개수는 3개일 수 있다. 예를 들어, 상기 주변 블록의 좌상단 샘플 포지션의 좌표가 (a, b)이고, 상기 주변 블록의 높이는 hn, 폭은 wn인 경우, 상기 CP들 중 CP0의 좌표는 (a, b)이고, CP1의 좌표는 (a+wn, b)이고, CP2의 좌표는 (a, b+hn)일 수 있다. Alternatively, as another example, the number of CPs for the neighboring block may be three. For example, when the coordinate of the upper left sample position of the neighboring block is (a, b), the height of the neighboring block is h n , and the width is w n , the coordinate of CP0 among the CPs is (a, b) , The coordinate of CP1 may be (a + w n , b), and the coordinate of CP2 may be (a, b + h n ).
디코딩 장치는 상기 CP들의 움직임 벡터들을 기반으로 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출한다(S1110). 디코딩 장치는 상술한 수학식 1 또는 수학식 3과 같은 어파인 움직임 모델에 상기 주변 블록의 컨트롤 포인트들의 움직임 벡터들과 상기 현재 블록의 센터 포지션을 적용하여, 상기 현재 블록의 상기 센터 포지션에 대한 상기 움직임 벡터를 도출할 수 있다. 예를 들어, 상기 센터 포지션에 대한 상기 움직임 벡터는 상술한 수학식 6을 기반으로 도출될 수 있다. The decoding apparatus derives a motion vector with respect to the center position of the current block based on the motion vectors of the CPs (S1110). The decoding apparatus applies the motion vectors of the control points of the neighboring block and the center position of the current block to an affine motion model such as Equation 1 or Equation 3 above, so that the decoding of the center position of the current block is performed. A motion vector can be derived. For example, the motion vector for the center position may be derived based on Equation 6 described above.
한편, 디코딩 장치는 비트스트림을 통하여 상기 현재 블록의 인터 예측에 대한 정보를 획득할 수 있고, 상기 인터 예측에 대한 정보를 기반으로 상기 현재 블록의 예측 모드를 결정할 수 있다. 상기 현재 블록에 인터 예측이 적용되는 경우, 디코딩 장치는 스킵(skip) 모드, 머지(merge) 모드 및 MVP 모드 중 어느 하나를 적용할 수 있다. Meanwhile, the decoding apparatus may obtain information on inter prediction of the current block through a bitstream, and determine a prediction mode of the current block based on the information on the inter prediction. When inter prediction is applied to the current block, the decoding apparatus may apply any one of a skip mode, a merge mode, and an MVP mode.
예를 들어, 디코딩 장치는 상기 현재 블록에 대한 스킵 플래그를 기반으로 상기 현재 블록에 스킵 모드가 적용되는지 여부를 판단할 수 있다. 상기 스킵 플래그는 상기 현재 블록에 상기 스킵 모드가 적용되는지 여부를 나타낼 수 있다. 상기 현재 블록에 상기 스킵 모드가 적용되지 않는 경우, 디코딩 장치는 상기 현재 블록에 대한 머지 플래그를 기반으로 상기 현재 블록에 머지 모드가 적용되는지 여부를 판단할 수 있다. 상기 머지 플래그는 상기 현재 블록에 머지 모드가 적용되는지 여부를 나타낼 수 있고, 상기 인터 예측에 대한 정보는 상기 머지 플래그를 포함할 수 있다. 상기 머지 플래그의 값이 1인 경우, 상기 머지 플래그는 상기 현재 블록에 상기 머지 모드가 적용됨을 나타낼 수 있고, 상기 머지 플래그의 값이 0인 경우, 상기 머지 플래그는 상기 현재 블록에 상기 머지 모드가 적용되지 않음을 나타낼 수 있다. 상기 현재 블록에 대한 머지 플래그를 기반으로 상기 현재 블록에 머지 모드가 적용되지 않는다고 판단된 경우, 상기 현재 블록은 상기 MVP 모드가 적용될 수 있다. For example, the decoding apparatus may determine whether a skip mode is applied to the current block based on a skip flag for the current block. The skip flag may indicate whether the skip mode is applied to the current block. When the skip mode is not applied to the current block, the decoding apparatus may determine whether a merge mode is applied to the current block based on a merge flag for the current block. The merge flag may indicate whether a merge mode is applied to the current block, and the information on the inter prediction may include the merge flag. When the merge flag has a value of 1, the merge flag may indicate that the merge mode is applied to the current block. When the merge flag has a value of 0, the merge flag may have the merge mode in the current block. May not apply. When it is determined that the merge mode is not applied to the current block based on the merge flag for the current block, the MVP mode may be applied to the current block.
또한, 상기 인터 예측에 대한 정보는 어파인 예측 플래그를 포함할 수 있다. 상기 어파인 예측 플래그는 상기 현재 블록에 어파인 예측이 적용되는지 여부를 나타낼 수 있다. 상기 어파인 예측 플래그의 값이 1인 경우, 상기 어파인 예측 플래그는 상기 현재 블록에 상기 어파인 예측이 적용됨을 나타낼 수 있고, 상기 어파인 예측 플래그의 값이 0인 경우, 상기 어파인 예측 플래그는 상기 현재 블록에 상기 어파인 예측이 적용되지 않음을 나타낼 수 있다. 한편, 상기 현재 블록에 머지 모드 또는 MVP 모드가 적용되고, 상기 현재 블록에 대한 어파인 예측 플래그의 값이 0인 경우(즉, 현재 블록에 어파인 예측이 적용되지 않는 경우), 상기 어파인 예측이 적용된 주변 블록의 컨트롤 포인트들의 움직임 벡터들을 기반으로 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터가 도출될 수 있고, 상기 움직임 벡터는 상기 현재 블록의 머지 후보 또는 MVP 후보로 도출될 수 있다.The information on the inter prediction may include an affine prediction flag. The affine prediction flag may indicate whether affine prediction is applied to the current block. When the value of the affine prediction flag is 1, the affine prediction flag may indicate that the affine prediction is applied to the current block. When the value of the affine prediction flag is 0, the affine prediction flag is 0. May indicate that the affine prediction is not applied to the current block. Meanwhile, when merge mode or MVP mode is applied to the current block, and the value of the affine prediction flag for the current block is 0 (that is, when affine prediction is not applied to the current block), the affine prediction is performed. The motion vector for the center position of the current block may be derived based on the motion vectors of the control points of the applied neighboring block, and the motion vector may be derived as a merge candidate or MVP candidate of the current block. have.
디코딩 장치는 상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행한다(S1120). 디코딩 장치는 상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 움직임 벡터를 도출할 수 있다. The decoding apparatus performs prediction on the current block based on the motion vector (S1120). The decoding apparatus may derive a motion vector for the current block based on the motion vector.
예를 들어, 상기 현재 블록에 머지 모드가 적용된 경우, 디코딩 장치는 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 상기 현재 블록의 머지 후보로 도출할 수 있다. 상기 머지 후보는 상기 센터 포지션에 대한 움직임 벡터 및 상기 주변 블록의 참조 픽처 인덱스를 포함할 수 있다. 디코딩 장치는 상기 머지 후보를 상기 현재 블록의 움직임 정보로 도출할 수 있고, 상기 참조 픽처 인덱스를 기반으로 참조 픽처를 도출할 수 있고, 상기 참조 픽처 상에서 상기 움직임 벡터가 가리키는 참조 블록을 도출할 수 있고, 상기 참조 블록 내의 복원 샘플을 상기 현재 블록에 대한 예측 샘플로 이용할 수 있다. 여기서, 예를 들어, 디코딩 장치는 상기 현재 블록의 머지 인덱스를 획득할 수 있고, 상기 머지 인덱스가 가리키는 머지 후보를 상기 현재 블록의 움직임 정보로 도출할 수 있다. 상기 머지 인덱스는 상기 센터 포지션에 대한 움직임 벡터를 포함하는 상기 머지 후보를 가리킬 수 있다.For example, when a merge mode is applied to the current block, the decoding apparatus may derive a motion vector for a center position of the current block as a merge candidate of the current block. The merge candidate may include a motion vector for the center position and a reference picture index of the neighboring block. The decoding apparatus may derive the merge candidate as motion information of the current block, derive a reference picture based on the reference picture index, derive a reference block indicated by the motion vector on the reference picture, The reconstruction sample in the reference block may be used as a prediction sample for the current block. Here, for example, the decoding apparatus may obtain a merge index of the current block and derive a merge candidate indicated by the merge index as motion information of the current block. The merge index may indicate the merge candidate including a motion vector for the center position.
또한, 예를 들어, 상기 현재 블록에 MVP 모드가 적용된 경우, 디코딩 장치는 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 상기 현재 블록의 MVP 후보로 도출할 수 있다. 디코딩 장치는 상기 MVP 후보를 상기 현재 블록의 MVP(motion vector predictor)로 도출할 수 있고, 상기 인터 예측에 대한 정보에 포함된 움직임 벡터 차분(Motion Vector Difference, MVD)을 획득할 수 있고, 상기 MVP 와 상기 MVD의 가산을 통해 상기 현재 블록에 대한 상기 움직임 벡터를 도출할 수 있다. 디코딩 장치는 상기 현재 블록에 대한 참조 픽처 인덱스를 기반으로 참조 픽처를 도출할 수 있고, 상기 참조 픽처 상에서 상기 움직임 벡터가 가리키는 참조 블록을 도출할 수 있고, 상기 참조 블록 내의 복원 샘플을 상기 현재 블록에 대한 예측 샘플로 이용할 수 있다. 여기서, 디코딩 장치는 비트스트림을 통하여 상기 참조 픽처 인덱스를 획득할 수 있다. 상기 인터 예측에 대한 정보는 상기 참조 픽처 인덱스를 포함할 수 있다. 또한, 예를 들어, 디코딩 장치는 상기 현재 블록의 MVP 인덱스를 획득할 수 있고, 상기 MVP 인덱스가 가리키는 MVP 후보를 상기 현재 블록의 MVP 로 도출할 수 있다. 상기 MVP 인덱스는 상기 센터 포지션에 대한 움직임 벡터를 나타내는 상기 MVP 후보를 가리킬 수 있다.In addition, for example, when the MVP mode is applied to the current block, the decoding apparatus may derive a motion vector for the center position of the current block as the MVP candidate of the current block. The decoding apparatus may derive the MVP candidate as a motion vector predictor (MVP) of the current block, obtain a motion vector difference (MVD) included in the information about the inter prediction, and the MVP And the motion vector for the current block can be derived through the addition of the MVD. The decoding apparatus may derive a reference picture based on a reference picture index for the current block, derive a reference block indicated by the motion vector on the reference picture, and assign a reconstructed sample in the reference block to the current block. It can be used as a predictive sample. Here, the decoding apparatus may obtain the reference picture index through the bitstream. The information on the inter prediction may include the reference picture index. In addition, for example, the decoding apparatus may obtain an MVP index of the current block and derive an MVP candidate indicated by the MVP index as the MVP of the current block. The MVP index may indicate the MVP candidate representing a motion vector with respect to the center position.
디코딩 장치는 상기 현재 블록에 대한 움직임 벡터가 가리키는 참조 블록의 복원 샘플을 기반으로 상기 현재 블록에 대한 예측 샘플(predicted sample)을 도출할 수 있다. The decoding apparatus may derive a predicted sample for the current block based on a reconstructed sample of the reference block indicated by the motion vector for the current block.
한편, 비록 도면에서 도시되지는 않았으나 디코딩 장치는 예측 모드에 따라 상기 예측 샘플을 바로 복원 샘플로 이용할 수도 있고, 또는 상기 예측 샘플에 레지듀얼 샘플을 더하여 복원 샘플을 생성할 수도 있다. 디코딩 장치는 상기 현재 블록에 대한 레지듀얼 샘플이 존재하는 경우, 상기 현재 블록에 대한 레지듀얼에 관한 정보를 수신할 수 있고, 상기 레지듀얼에 관한 정보는 상기 페이스에 대한 정보에 포함될 수 있다. 상기 레지듀얼에 관한 정보는 상기 레지듀얼 샘플에 관한 변환 계수를 포함할 수 있다. 디코딩 장치는 상기 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 상기 레지듀얼 샘플(또는 레지듀얼 샘플 어레이)을 도출할 수 있다. 디코딩 장치는 상기 예측 샘플과 상기 레지듀얼 샘플을 기반으로 복원 샘플을 생성할 수 있고, 상기 복원 샘플을 기반으로 복원 블록 또는 복원 픽처를 도출할 수 있다. 이후 디코딩 장치는 필요에 따라 주관적/객관적 화질을 향상시키기 위하여 디블록킹 필터링 및/또는 SAO 절차와 같은 인루프 필터링 절차를 상기 복원 픽처에 적용할 수 있음은 상술한 바와 같다.Although not shown in the drawing, the decoding apparatus may directly use the prediction sample as a reconstruction sample according to a prediction mode, or generate a reconstruction sample by adding a residual sample to the prediction sample. If there is a residual sample for the current block, the decoding apparatus may receive information about the residual for the current block, and the information about the residual may be included in the information about the face. The information about the residual may include transform coefficients regarding the residual sample. The decoding apparatus may derive the residual sample (or residual sample array) for the current block based on the residual information. The decoding apparatus may generate a reconstructed sample based on the prediction sample and the residual sample, and may derive a reconstructed block or a reconstructed picture based on the reconstructed sample. Thereafter, as described above, the decoding apparatus may apply an in-loop filtering procedure, such as a deblocking filtering and / or SAO procedure, to the reconstructed picture in order to improve subjective / objective picture quality as necessary.
도 12는 본 발명에 따른 영상 디코딩 방법을 수행하는 디코딩 장치를 개략적으로 나타낸다. 도 11에서 개시된 방법은 도 12에서 개시된 디코딩 장치에 의하여 수행될 수 있다. 구체적으로 예를 들어, 도 12의 상기 디코딩 장치의 예측부는 도 11의 S1100 내지 S1120을 수행할 수 있다. 또한, 비록 도시되지는 않았으나 비트스트림을 통하여 상기 현재 블록의 인터 예측에 대한 정보를 획득하는 과정 및 비트스트림을 통하여 상기 현재 블록에 대한 레지듀얼에 관한 정보를 획득하는 과정은 도 12의 상기 디코딩 장치의 엔트로피 디코딩부에 의하여 수행될 수 있고, 상기 레지듀얼 정보를 기반으로 상기 현재 블록에 대한 상기 레지듀얼 샘플을 도출하는 과정은 도 12의 상기 디코딩 장치의 역변환부에 의하여 수행될 수 있고, 상기 예측 샘플과 상기 레지듀얼 샘플을 기반으로 복원 픽처를 생성하는 과정은 도 12의 상기 디코딩 장치의 가산부에 의하여 수행될 수 있다. 12 schematically illustrates a decoding apparatus for performing an image decoding method according to the present invention. The method disclosed in FIG. 11 may be performed by the decoding apparatus disclosed in FIG. 12. In detail, for example, the prediction unit of the decoding apparatus of FIG. 12 may perform S1100 to S1120 of FIG. 11. In addition, although not shown, the process of acquiring information on the inter prediction of the current block through the bitstream and the process of acquiring information on the residual of the current block through the bitstream may be performed. The derivation of the residual sample for the current block based on the residual information may be performed by an inverse transform unit of the decoding apparatus of FIG. 12. A process of generating a reconstructed picture based on a sample and the residual sample may be performed by an adder of the decoding apparatus of FIG. 12.
상술한 본 발명에 따르면 어파인 예측이 적용된 주변 블록의 특성을 최대한 활용하여 상기 현재 블록의 움직임 벡터를 도출할 수 있고, 이를 통하여 어파인 움직임 모델을 수행하는 경우보다 메모리 접근 속도를 절약하면서 단순히 주변 블록의 움직임 벡터를 사용하여 움직임 예측을 수행하는 경우보다는 예측 정확도를 향상시킬 수 있다. According to the present invention described above, the motion vector of the current block can be derived by utilizing the characteristics of the neighboring block to which the affine prediction is applied, thereby saving the memory access speed rather than simply performing the affine motion model. It is possible to improve prediction accuracy than when performing motion prediction using the motion vector of the block.
또한, 본 발명에 따르면 어파인 예측이 적용된 주변 블록의 특성을 최대한 활용하여 상기 현재 블록의 움직임 벡터를 도출하되, 현재 블록의 샘플 또는 서브 블록 단위로 나뉘어서 움직임 보상이 수행되는 것을 방지하여 디코딩 과정의 연산 복잡도 및 메모리 접근 속도가 증가하는 문제를 방지할 수 있다.Further, according to the present invention, the motion vector of the current block is derived by utilizing the characteristics of the neighboring block to which the affine prediction is applied, but the motion compensation is prevented by dividing by the sample or sub-block unit of the current block. This avoids the problem of increased computational complexity and memory access speed.
상술한 실시예에서, 방법들은 일련의 단계 또는 블록으로써 순서도를 기초로 설명되고 있지만, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당업자라면 순서도에 나타내어진 단계들이 배타적이지 않고, 다른 단계가 포함되거나 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.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. That is, the embodiments described in the present invention may be implemented and performed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in each drawing may be implemented and performed on a computer, processor, microprocessor, controller, or chip.
또한, 본 발명이 적용되는 디코딩 장치 및 인코딩 장치는 멀티미디어 방송 송수신 장치, 모바일 통신 단말, 홈 시네마 비디오 장치, 디지털 시네마 비디오 장치, 감시용 카메라, 비디오 대화 장치, 비디오 통신과 같은 실시간 통신 장치, 모바일 스트리밍 장치, 저장 매체, 캠코더, 주문형 비디오(VoD) 서비스 제공 장치, OTT 비디오(Over the top video) 장치, 인터넷 스트리밍 서비스 제공 장치, 3차원(3D) 비디오 장치, 화상 전화 비디오 장치, 및 의료용 비디오 장치 등에 포함될 수 있으며, 비디오 신호 또는 데이터 신호를 처리하기 위해 사용될 수 있다. 예를 들어, OTT 비디오(Over the top video) 장치로는 게임 콘솔, 블루레이 플레이어, 인터넷 접속 TV, 홈시어터 시스템, 스마트폰, 태블릿 PC, DVR(Digital Video Recorder) 등을 포함할 수 있다.In addition, the decoding apparatus and encoding apparatus to which the present invention is applied include a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video chat device, a real time communication device such as video communication, and mobile streaming. Devices, storage media, camcorders, video on demand (VoD) service providers, over the top video (OTT) devices, internet streaming service providers, 3D (3D) video devices, video telephony video devices, and medical video devices It may be included and used to process a video signal or a data signal. For example, the OTT video device may include a game console, a Blu-ray player, an internet access TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), and the like.
또한, 본 발명이 적용되는 처리 방법은 컴퓨터로 실행되는 프로그램의 형태로 생산될 수 있으며, 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 본 발명에 따른 데이터 구조를 가지는 멀티미디어 데이터도 또한 컴퓨터가 판독할 수 있는 기록 매체에 저장될 수 있다. 상기 컴퓨터가 판독할 수 있는 기록 매체는 컴퓨터로 읽을 수 있는 데이터가 저장되는 모든 종류의 저장 장치 및 분산 저장 장치를 포함한다. 상기 컴퓨터가 판독할 수 있는 기록 매체는, 예를 들어, 블루레이 디스크(BD), 범용 직렬 버스(USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크 및 광학적 데이터 저장 장치를 포함할 수 있다. 또한, 상기 컴퓨터가 판독할 수 있는 기록 매체는 반송파(예를 들어, 인터넷을 통한 전송)의 형태로 구현된 미디어를 포함한다. 또한, 인코딩 방법으로 생성된 비트스트림이 컴퓨터가 판독할 수 있는 기록 매체에 저장되거나 유무선 통신 네트워크를 통해 전송될 수 있다. 또한, 본 발명의 실시예는 프로그램 코드에 의한 컴퓨터 프로그램 제품으로 구현될 수 있고, 상기 프로그램 코드는 본 발명의 실시예에 의해 컴퓨터에서 수행될 수 있다. 상기 프로그램 코드는 컴퓨터에 의해 판독 가능한 캐리어 상에 저장될 수 있다.In addition, the processing method to which the present invention is applied can be produced in the form of a program executed by a computer, and stored in a computer-readable recording medium. Multimedia data having a data structure according to the present invention can also be stored in a computer-readable recording medium. The computer readable recording medium includes all kinds of storage devices and distributed storage devices in which computer readable data is stored. The computer-readable recording medium may be, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical disc. It may include a data storage device. The computer-readable recording medium also includes media embodied in the form of a carrier wave (eg, transmission over the Internet). In addition, the bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted through a wired or wireless communication network. In addition, an embodiment of the present invention may be implemented as a computer program product by program code, which may be performed on a computer by an embodiment of the present invention. The program code may be stored on a carrier readable by a computer.
또한, 본 발명이 적용되는 컨텐츠 스트리밍 시스템은 크게 인코딩 서버, 스트리밍 서버, 웹 서버, 미디어 저장소, 사용자 장치 및 멀티미디어 입력 장치를 포함할 수 있다.In addition, the content streaming system to which the present invention is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
상기 인코딩 서버는 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들로부터 입력된 컨텐츠를 디지털 데이터로 압축하여 비트스트림을 생성하고 이를 상기 스트리밍 서버로 전송하는 역할을 한다. 다른 예로, 스마트폰, 카메라, 캠코더 등과 같은 멀티미디어 입력 장치들이 비트스트림을 직접 생성하는 경우, 상기 인코딩 서버는 생략될 수 있다. 상기 비트스트림은 본 발명이 적용되는 인코딩 방법 또는 비트스트림 생성 방법에 의해 생성될 수 있고, 상기 스트리밍 서버는 상기 비트스트림을 전송 또는 수신하는 과정에서 일시적으로 상기 비트스트림을 저장할 수 있다.The encoding server compresses content input from multimedia input devices such as a smart phone, a camera, a camcorder, etc. into digital data to generate a bitstream and transmit the bitstream to the streaming server. As another example, when multimedia input devices such as smart phones, cameras, camcorders, etc. directly generate a bitstream, the encoding server may be omitted. The bitstream may be generated by an encoding method or a bitstream generation method to which the present invention is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
상기 스트리밍 서버는 웹 서버를 통한 사용자 요청에 기초하여 멀티미디어 데이터를 사용자 장치에 전송하고, 상기 웹 서버는 사용자에게 어떠한 서비스가 있는지를 알려주는 매개체 역할을 한다. 사용자가 상기 웹 서버에 원하는 서비스를 요청하면, 상기 웹 서버는 이를 스트리밍 서버에 전달하고, 상기 스트리밍 서버는 사용자에게 멀티미디어 데이터를 전송한다. 이때, 상기 컨텐츠 스트리밍 시스템은 별도의 제어 서버를 포함할 수 있고, 이 경우 상기 제어 서버는 상기 컨텐츠 스트리밍 시스템 내 각 장치 간 명령/응답을 제어하는 역할을 한다.The streaming server transmits the multimedia data to the user device based on the user's request through the web server, and the web server serves as a medium for informing the user of what service. When a user requests a desired service from the web server, the web server delivers it to a streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server plays a role of controlling a command / response between devices in the content streaming system.
상기 스트리밍 서버는 미디어 저장소 및/또는 인코딩 서버로부터 컨텐츠를 수신할 수 있다. 예를 들어, 상기 인코딩 서버로부터 컨텐츠를 수신하게 되는 경우, 상기 컨텐츠를 실시간으로 수신할 수 있다. 이 경우, 원활한 스트리밍 서비스를 제공하기 위하여 상기 스트리밍 서버는 상기 비트스트림을 일정 시간동안 저장할 수 있다.The streaming server may receive content from a media store and / or an encoding server. For example, when the content is received from the encoding server, the content may be received in real time. In this case, in order to provide a smooth streaming service, the streaming server may store the bitstream for a predetermined time.
상기 사용자 장치의 예로는, 휴대폰, 스마트 폰(smart phone), 노트북 컴퓨터(laptop computer), 디지털방송용 단말기, PDA(personal digital assistants), PMP(portable multimedia player), 네비게이션, 슬레이트 PC(slate PC), 태블릿 PC(tablet PC), 울트라북(ultrabook), 웨어러블 디바이스(wearable device, 예를 들어, 워치형 단말기 (smartwatch), 글래스형 단말기 (smart glass), HMD(head mounted display)), 디지털 TV, 데스크탑 컴퓨터, 디지털 사이니지 등이 있을 수 있다. 상기 컨텐츠 스트리밍 시스템 내 각 서버들은 분산 서버로 운영될 수 있으며, 이 경우 각 서버에서 수신하는 데이터는 분산 처리될 수 있다.Examples of the user device include a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), navigation, a slate PC, Tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, glass glasses, head mounted displays), digital TVs, desktops Computer, digital signage, and the like. Each server in the content streaming system may be operated as a distributed server, in which case data received from each server may be distributed.

Claims (10)

  1. 디코딩 장치에 의하여 수행되는 영상 디코딩 방법에 있어서,In the image decoding method performed by the decoding apparatus,
    현재 블록에 대한 주변 블록의 컨트롤 포인트(Control Point, CP)들의 움직임 벡터들을 도출하는 단계;Deriving motion vectors of control points (CPs) of neighboring blocks with respect to the current block;
    상기 CP들의 움직임 벡터들을 기반으로 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출하는 단계; 및Deriving a motion vector for a center position of the current block based on the motion vectors of the CPs; And
    상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행하는 단계를 포함하는 것을 특징으로 하는 영상 디코딩 방법.And performing prediction on the current block based on the motion vector.
  2. 제1항에 있어서,The method of claim 1,
    상기 주변 블록에 대한 상기 CP들의 개수는 2개이고,The number of CPs for the neighboring block is two,
    상기 주변 블록의 좌상단(top-left) 샘플 포지션의 좌표가 (a, b)이고, 상기 주변 블록의 폭(width)은 wn인 경우, 상기 CP들 중 CP0의 좌표는 (a, b)이고, CP1의 좌표는 (a+wn, b)인 것을 특징으로 하는 영상 디코딩 방법.When the coordinates of the top-left sample position of the neighboring block are (a, b) and the width of the neighboring block is w n , the coordinate of CP0 among the CPs is (a, b) , Wherein the coordinate of CP1 is (a + w n , b).
  3. 제2항에 있어서,The method of claim 2,
    상기 센터 포지션에 대한 상기 움직임 벡터는 다음의 수학식을 기반으로 도출되며,The motion vector for the center position is derived based on the following equation,
    Figure PCTKR2019004424-appb-I000001
    Figure PCTKR2019004424-appb-I000001
    여기서, vx, vy는 각각 상기 현재 블록의 상기 센터 포지션에 대한 상기 움직임 벡터의 x성분, y성분을 나타내고, v0x, v0y는 각각 상기 CP0의 움직임 벡터의 x성분, y성분을 나타내고, v1x, v1y은 각각 상기 CP1의 움직임 벡터의 x성분, y성분을 나타내고, w는 상기 현재 블록의 폭(width)을 나타내고, h는 상기 현재 블록의 높이(height)를 나타내는 것을 특징으로 하는 영상 디코딩 방법.Here, x x and v y represent x components and y components of the motion vector with respect to the center position of the current block, respectively, and v 0x and v 0y represent x components and y components of the motion vector of CP0, respectively. , v 1x , v 1y respectively represent x component and y component of the motion vector of CP1, w denotes the width of the current block, and h denotes the height of the current block. Video decoding method.
  4. 제1항에 있어서,The method of claim 1,
    상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행하는 단계는,Performing prediction on the current block based on the motion vector,
    상기 센터 포지션에 대한 상기 움직임 벡터를 상기 현재 블록의 머지 후보로 도출하는 단계를 포함하고, Deriving the motion vector for the center position as a merge candidate of the current block,
    상기 머지 후보는 상기 센터 포지션에 대한 움직임 벡터 및 상기 주변 블록의 참조 픽처 인덱스를 포함하는 것을 특징으로 하는 영상 디코딩 방법. And the merge candidate comprises a motion vector for the center position and a reference picture index of the neighboring block.
  5. 제4항에 있어서,The method of claim 4, wherein
    상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행하는 단계는,Performing prediction on the current block based on the motion vector,
    상기 머지 후보를 상기 현재 블록의 움직임 정보로 도출하는 단계; 및Deriving the merge candidate as motion information of the current block; And
    상기 움직임 정보를 기반으로 상기 현재 블록에 대한 예측 샘플을 도출하는 단계를 더 포함하는 것을 특징으로 하는 영상 디코딩 방법.And deriving a prediction sample for the current block based on the motion information.
  6. 제1항에 있어서,The method of claim 1,
    상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행하는 단계는,Performing prediction on the current block based on the motion vector,
    상기 센터 포지션에 대한 상기 움직임 벡터를 상기 현재 블록의 MVP(motion vector predictor) 후보로 도출하는 단계를 포함하는 것을 특징으로 하는 영상 디코딩 방법. And deriving the motion vector for the center position as a motion vector predictor (MVP) candidate of the current block.
  7. 제6항에 있어서, The method of claim 6,
    비트스트림을 통하여 상기 현재 블록의 인터 예측에 대한 정보를 획득하는 단계;Obtaining information on inter prediction of the current block through a bitstream;
    상기 MVP 후보를 상기 현재 블록의 MVP(motion vector predictor)로 도출하는 단계;Deriving the MVP candidate as a motion vector predictor (MVP) of the current block;
    상기 MVP 및 MVD(motion vector difference)를 기반으로 상기 현재 블록의 움직임 벡터를 도출하는 단계;Deriving a motion vector of the current block based on the MVP and a motion vector difference (MVD);
    상기 현재 블록에 대한 움직임 벡터 및 참조 픽처 인덱스를 기반으로 상기 현재 블록의 예측 샘플을 도출하는 단계를 더 포함하되,Deriving a prediction sample of the current block based on a motion vector and a reference picture index for the current block,
    상기 인터 예측에 대한 정보는 상기 현재 블록의 상기 MVD 및 상기 참조 픽처 인덱스를 포함하는 것을 특징으로 하는 영상 디코딩 방법. The information on the inter prediction includes the MVD and the reference picture index of the current block.
  8. 인코딩 장치에 의하여 수행되는 영상 인코딩 방법에 있어서,In the video encoding method performed by the encoding device,
    현재 블록에 대한 주변 블록의 컨트롤 포인트(Control Point, CP)들의 움직임 벡터들을 도출하는 단계;Deriving motion vectors of control points (CPs) of neighboring blocks with respect to the current block;
    상기 CP들의 움직임 벡터들을 기반으로 상기 현재 블록의 센터 포지션(center position)에 대한 움직임 벡터를 도출하는 단계;Deriving a motion vector for a center position of the current block based on the motion vectors of the CPs;
    상기 움직임 벡터를 기반으로 상기 현재 블록에 대한 예측을 수행하는 단계; 및 Performing prediction on the current block based on the motion vector; And
    상기 현재 블록의 인터 예측에 대한 정보를 인코딩하는 단계를 포함하는 것을 특징으로 하는 영상 인코딩 방법.And encoding information on inter prediction of the current block.
  9. 제8항에 있어서,The method of claim 8,
    상기 주변 블록에 대한 상기 CP들의 개수는 2개이고,The number of CPs for the neighboring block is two,
    상기 주변 블록의 좌상단(top-left) 샘플 포지션의 좌표가 (a, b)이고, 상기 주변 블록의 폭(width)은 wn인 경우, 상기 CP들 중 CP0의 좌표는 (a, b)이고, CP1의 좌표는 (a+wn, b)인 것을 특징으로 하는 영상 인코딩 방법.When the coordinates of the top-left sample position of the neighboring block are (a, b) and the width of the neighboring block is w n , the coordinate of CP0 among the CPs is (a, b) , The coordinate of CP1 is (a + w n , b).
  10. 제8항에 있어서,The method of claim 8,
    상기 센터 포지션에 대한 상기 움직임 벡터는 다음의 수학식을 기반으로 도출되며,The motion vector for the center position is derived based on the following equation,
    Figure PCTKR2019004424-appb-I000002
    Figure PCTKR2019004424-appb-I000002
    여기서, vx, vy는 각각 상기 현재 블록의 상기 센터 포지션에 대한 상기 움직임 벡터의 x성분, y성분을 나타내고, v0x, v0y는 각각 상기 CP0의 움직임 벡터의 x성분, y성분을 나타내고, v1x, v1y은 각각 상기 CP1의 움직임 벡터의 x성분, y성분을 나타내고, w는 상기 현재 블록의 폭(width)을 나타내고, h는 상기 현재 블록의 높이(height)를 나타내는 것을 특징으로 하는 영상 인코딩 방법.Here, x x and v y represent x components and y components of the motion vector with respect to the center position of the current block, respectively, and v 0x and v 0y represent x components and y components of the motion vector of CP0, respectively. , v 1x , v 1y respectively represent x component and y component of the motion vector of CP1, w denotes the width of the current block, and h denotes the height of the current block. Video encoding method.
PCT/KR2019/004424 2018-04-14 2019-04-12 Method and device for decoding image according to inter-prediction in image coding system WO2019199106A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US201862657793P 2018-04-14 2018-04-14
US62/657,793 2018-04-14

Publications (1)

Publication Number Publication Date
WO2019199106A1 true WO2019199106A1 (en) 2019-10-17

Family

ID=68163256

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2019/004424 WO2019199106A1 (en) 2018-04-14 2019-04-12 Method and device for decoding image according to inter-prediction in image coding system

Country Status (1)

Country Link
WO (1) WO2019199106A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012081894A1 (en) * 2010-12-13 2012-06-21 한국전자통신연구원 Method and device for determining reference unit
US9438910B1 (en) * 2014-03-11 2016-09-06 Google Inc. Affine motion prediction in video coding
WO2017036045A1 (en) * 2015-08-29 2017-03-09 华为技术有限公司 Image prediction method and device
WO2017171107A1 (en) * 2016-03-28 2017-10-05 엘지전자(주) Inter-prediction mode based image processing method, and apparatus therefor

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012081894A1 (en) * 2010-12-13 2012-06-21 한국전자통신연구원 Method and device for determining reference unit
US9438910B1 (en) * 2014-03-11 2016-09-06 Google Inc. Affine motion prediction in video coding
WO2017036045A1 (en) * 2015-08-29 2017-03-09 华为技术有限公司 Image prediction method and device
WO2017171107A1 (en) * 2016-03-28 2017-10-05 엘지전자(주) Inter-prediction mode based image processing method, and apparatus therefor

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHEN, JIANLE ET AL.: "Algorithm Description of Joint Exploration Test Model 7 (JEM 7", JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP 3, 21 July 2017 (2017-07-21), Retrieved from the Internet <URL:http://phenix.int-evry.fr/jvet> [retrieved on 20190705] *

Similar Documents

Publication Publication Date Title
WO2020036417A1 (en) Inter prediction method based on history-based motion vector, and device therefor
WO2019194440A1 (en) Image coding method using lookup table for intra prediction mode and apparatus therefor
WO2020017840A1 (en) Method and device for inter predicting on basis of dmvr
WO2020009390A1 (en) Image processing method and device by means of inter-prediction in image coding system
WO2019194507A1 (en) Image coding method based on affine motion prediction, and device for same
WO2020141928A1 (en) Method and apparatus for decoding image on basis of prediction based on mmvd in image coding system
WO2020141886A1 (en) Sbtmvp-based inter prediction method and apparatus
WO2020141932A1 (en) Inter prediction method and apparatus using cpr-based mmvd
WO2017195914A1 (en) Inter prediction method and apparatus in video coding system
WO2020141885A1 (en) Image coding method and device using deblocking filtering
WO2019209026A1 (en) Method and apparatus for inter prediction in video coding system
WO2019212230A1 (en) Method and apparatus for decoding image by using transform according to block size in image coding system
WO2020013480A1 (en) Method for coding intra-prediction mode, and device for same
WO2021133060A1 (en) Image coding apparatus and method based on sub-picture
WO2020251338A1 (en) Inter prediction in video or image coding system
WO2020141884A1 (en) Method and apparatus for coding image by using mmvd based on cpr
WO2020004879A1 (en) Method and device for image decoding according to inter-prediction using plurality of neighboring blocks in image coding system
WO2019225932A1 (en) Method and apparatus for decoding image by using dmvr in image coding system
WO2019203533A1 (en) Inter-prediction method in accordance with multiple motion model, and device thereof
WO2020145656A1 (en) Method and device for signaling whether tmvp candidate is available
WO2020251339A1 (en) Image/video coding method and device based on bi-prediction
WO2020017841A1 (en) Method and apparatus for performing inter-prediction on basis of merge mode
WO2019212223A1 (en) Image decoding method using dmvr in image coding system and device therefor
WO2019203513A1 (en) Image decoding method and apparatus according to inter prediction using dmvd in image coding system
WO2019194458A1 (en) Image coding method using obmc and device thereof

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

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

Country of ref document: EP

Kind code of ref document: A1