WO2018226066A1 - Procédé et appareil de décodage de vidéo selon une prédiction affine dans un système de codage de vidéo - Google Patents

Procédé et appareil de décodage de vidéo selon une prédiction affine dans un système de codage de vidéo Download PDF

Info

Publication number
WO2018226066A1
WO2018226066A1 PCT/KR2018/006536 KR2018006536W WO2018226066A1 WO 2018226066 A1 WO2018226066 A1 WO 2018226066A1 KR 2018006536 W KR2018006536 W KR 2018006536W WO 2018226066 A1 WO2018226066 A1 WO 2018226066A1
Authority
WO
WIPO (PCT)
Prior art keywords
block
current block
affine
neighboring
peripheral
Prior art date
Application number
PCT/KR2018/006536
Other languages
English (en)
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 WO2018226066A1 publication Critical patent/WO2018226066A1/fr

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/129Scanning of coding units, e.g. zig-zag scan of transform coefficients or flexible macroblock ordering [FMO]
    • 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/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Definitions

  • the present invention relates to an image coding technique, and more particularly, to an image decoding method and apparatus according to affine 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 object of the present invention is to provide an image decoding method and apparatus for performing affine prediction on a current block based on an affine motion model from a neighboring block of the current block.
  • Another object of the present invention is to provide an image decoding method and apparatus for deriving neighboring blocks for deriving an affine motion model of the current block in consideration of the size of the current block.
  • Another object of the present invention is to provide an image decoding method and apparatus for deriving a scanning order of neighboring blocks for deriving an affine motion model of the current block in consideration of the size of the current block.
  • Another technical problem of the present invention is to provide an image decoding method and apparatus for deriving a plurality of affine merge candidate blocks for deriving an affine motion model of a current block.
  • an image decoding method performed by a decoding apparatus.
  • the method includes deriving neighboring blocks and a scanning order of a current block, scanning the neighboring blocks in the scanning order to derive at least one affine merge candidate block, and the affine Deriving motion vectors of CPs for the current block based on motion vectors of control points (CPs) for a merge candidate block, subblock or sample in the current block based on the motion vectors of the CPs Deriving a motion vector of a unit, deriving a prediction sample for the current block based on the motion vector of the sub-block or the sample unit, and generating a reconstructed sample based on the prediction sample It is characterized by.
  • a decoding apparatus for performing image decoding.
  • the decoding apparatus may include an entropy decoding unit that obtains prediction information about a current block through a bitstream, and extracts neighboring blocks and a scanning order of the current block, and scans the neighboring blocks in the scanning order.
  • Derive at least one affine merge candidate block derive motion vectors of CPs for the current block based on motion vectors of control points (CPs) for the affine merge candidate block, Deriving a motion vector of a sub-block or a sample unit in the current block based on the motion vectors, Deriving a prediction sample for the current block based on the motion vector of the sub-block or the sample unit, and extracting the prediction sample It characterized in that it comprises a prediction unit for generating a reconstructed sample on the basis.
  • CPs control points
  • a video encoding method performed by an encoding apparatus includes deriving neighboring blocks and a scanning order of a current block, scanning the neighboring blocks in the scanning order to derive at least one affine merge candidate block, and the affine Deriving motion vectors of CPs for the current block based on motion vectors of control points (CPs) for a merge candidate block, subblock or sample in the current block based on the motion vectors of the CPs Deriving a motion vector of a unit, deriving a predictive sample for the current block based on the motion vector of the sub-block or the sample unit, and generating, encoding, and outputting prediction information about the current block Characterized in that it comprises a.
  • CPs control points
  • a video encoding apparatus derives neighboring blocks and a scanning order of the current block, scans the neighboring blocks in the scanning order to derive at least one affine merge candidate block, and the affine merge Deriving the motion vectors of the CPs for the current block based on the motion vectors of the control points (CP) for the candidate block, and based on the motion vectors of the CPs of the sub-block or sample unit in the current block
  • neighboring blocks for deriving the affixed merge candidate block may be derived in consideration of the size of the current block.
  • the scanning order of neighboring blocks can be derived in consideration of the size of the current block, thereby improving prediction accuracy and efficiency and improving overall coding efficiency.
  • a plurality of affine merge candidate blocks for the current block can be derived, thereby improving prediction accuracy and efficiency, and improving overall coding efficiency.
  • the present invention it is possible to adaptively determine the number of affine merge candidate blocks derived in consideration of the size of the current block, thereby improving prediction accuracy and efficiency and improving overall coding efficiency.
  • 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 exemplarily shows an encoding process for a current block on which inter prediction is performed.
  • FIG. 10 exemplarily illustrates a decoding process for a current block on which inter prediction is performed.
  • 11 exemplarily illustrates a prediction process for the current block to which the affine merge mode is applied.
  • FIG. 12 exemplarily illustrates a method of deriving a CPMV of the current block when the affine block is a left neighboring block or an upper neighboring block.
  • FIG. 13 exemplarily illustrates an affine motion model in the case of non-square blocks having different widths and heights.
  • 15A to 15B exemplarily illustrate affine prediction for deriving a scanning order based on the width and height.
  • 16 exemplarily illustrates neighboring blocks for the affine prediction.
  • 17 exemplarily illustrates neighboring blocks for deriving the affine merge candidate block according to the width and height.
  • 18A to 18B exemplarily illustrate neighboring blocks for deriving an affinity merge candidate block of the current block derived according to a scanning order.
  • FIG. 19 illustrates an example of deriving an affine merge candidate block for the current block to which the affine merge mode is applied.
  • FIG. 21 schematically illustrates a video encoding method by an encoding device according to the present invention.
  • FIG. 22 schematically illustrates a video decoding method by a decoding apparatus 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.
  • 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.
  • the inter prediction on the current block may be performed in consideration of the movement of the target object or the image between the pictures.
  • the inter prediction method in the existing coding standard technology including HEVC uses only a translation motion model to express the motion of a coding block. That is, the conventional inter prediction method uses only one motion vector as a coding block unit, and in this case, if a part of the image is planarly moved as time passes, it may have high prediction performance.
  • the distortion of an image may include deformation of the image such as rotation, zoom in, or zoom out.
  • the optimal motion vector may be different for each sample in the coding block.
  • the present invention provides an inter prediction method considering distortion of an image.
  • a motion vector of sub blocks or sample points of a current block can be efficiently derived, and rotation, zoom-in, or In spite of modifications such as zoom out, the accuracy of inter prediction can be improved. That is, according to the present invention, coding efficiency can be improved by efficiently deriving a motion vector for sub-blocks or sample points of the current block.
  • the motion model according to the present invention may be referred to as an affine motion model, and the prediction using the affine motion model is called affine inter prediction or affine motion prediction. It can be called).
  • 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 shown in FIG. 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 indicate CP0
  • the control of the (w, 0) sample position the point is CP1
  • the control point of the (0, h) sample position is 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 indicate CP0, the control of the (w, 0) sample position as the point 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 the 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 center lower right position may indicate a sample position located on the lower right side among four samples positioned 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 the 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.
  • affine motion prediction there may be an affine merge mode (AF_MERGE) and an affine inter mode (AF_INTER).
  • AF_MERGE affine merge mode
  • AF_INTER affine inter mode
  • the affine inter 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, and controls the An inter prediction that derives an MVF of the current block based on a motion vector of points 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 affine merge mode is similar to the conventional skip / merge mode for 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
  • FIG. 7 exemplarily shows an encoding process for a current block on which inter prediction is performed.
  • the encoding apparatus may perform prediction on a current block by applying a skip mode, a merge mode, and a motion vector prediction (MVP) mode (S700).
  • the MVP mode may be referred to as an inter mode.
  • the encoding apparatus may use the motion information of the neighboring block as the motion information of the current block.
  • the encoding apparatus may derive the motion vector of the current block by using the motion vector of the neighboring block as a motion vector predictor (MVP) as the MVP of the current block.
  • MVP motion vector predictor
  • the encoding apparatus may perform prediction on the current block by applying the affine merge mode.
  • the encoding process of the affine merge mode performed by an encoding apparatus is as follows.
  • the encoding apparatus may scan neighboring blocks A, B, C, D, and E of the current block in alphabetical order, and perform the scanning order.
  • the encoded neighboring block may be derived using first, that is, the first order of affine prediction, and the derived neighboring block may be determined as an affinity merge candidate block of the current block.
  • the size of the neighboring blocks may be a 4x4 size.
  • the encoding apparatus may determine the affine motion model using the determined CPMV of the affine merge candidate block. That is, the affine motion model represented by Equation 1 or Equation 3 may be determined based on the CPMV of the merge candidate block.
  • the encoding apparatus may determine the CPMV of the current block according to the affine motion model of the merge candidate block.
  • the encoding device comprises a CPMV of CP0 of the current block V0 (V 0x, V 0y)
  • the V0, the V1, and the V2 may be derived by scaling the CPMV of the left neighboring block by a size ratio between the current block and the left neighboring block.
  • the encoding apparatus may determine the MVF of the current block based on the CPMV of the current block. Thereafter, the encoding apparatus may perform prediction of the current block based on the MVF.
  • the encoding apparatus may perform prediction on the current block by applying the affine inter mode (S720).
  • the encoding process of the affine inter mode performed by the encoding apparatus is as follows.
  • the encoding apparatus is ⁇ (v 0 , v 1 , v 2 )
  • the motion vector v 0 of CPMVP candidates for the CP0 the current block in the upper left corner of the motion of the neighboring blocks A vector v A, of the upper neighboring block B motion vectors v B, vector v of the left neighboring block C movement C can be derived
  • a CPMVP candidate vector v 1 moves to the CP1 is the current block upper neighboring block D of the motion vector v D
  • upper right corner of the motion of the neighboring block E vector v E can be derived
  • the lower left side corner of a neighboring block motion vector v G is G can be derived.
  • v 0 , v 1 , and v 2 CPMVP candidate combinations of the CPMV candidate list may be represented as a total of 12, and only the top 2 CPMVP candidate combinations obtained by classifying the 12 CPMVP candidate combinations in descending order of DV are described above. Can be used as a CPMVP candidate of the CPMV candidate list.
  • DV of the v 0 , v 1 , and v 2 CPMVP candidate combinations may be derived as in the following equation.
  • w denotes a width (width) of the current block
  • h represents a height (height) of the current block
  • v 0x, v 0y denotes an x component
  • v 1x, v 1y represents the x component and the y component of the CPMVP candidate of CP1, respectively
  • v 2x and v 2y represent the x component and the y component of the CPMVP candidate of CP2, respectively.
  • the existing AMVP candidate list may be used.
  • the encoding apparatus may determine a CPMV for each of the CPMVP candidates, and select a CPMVP candidate and a CPMV having a small cost value by comparing the RD costs of the CPMVs for the respective CPMVP candidates.
  • the encoding apparatus may transmit an index indicating the selected optimal CPMVP candidate, that is, CPMVP flag information and CPMVD for the CPMVP.
  • the CPMVP candidate list for the affine motion model using three control points may be derived, but the CPMVP candidate list for the affine motion model using two control points may be derived. .
  • the CPMVP candidate list for the affine motion model using the two control points is ⁇ (v 0 , v 1 )
  • the motion vector v 0 of CPMVP candidates for the CP0 As a motion vector v 0 of CPMVP candidates for the CP0 the current upper left corner of the surrounding motion of block A of the block vectors v A, of the upper neighboring block B motion vectors v B, of the left neighboring block C the motion vector v C is to be derived number, and the motion vector v 1 of the current block as the candidate CPMVP upper neighboring block D of the motion vector v D, upper right corner of the surrounding blocks of the E motion vector v for the CP1 is E can be derived.
  • the encoding apparatus may select an optimal mode for the current block among the skip mode, the merge mode, the MVP mode, the affine merge mode, and the affine inter mode (S730).
  • the encoding apparatus may compare the prediction performance results of the modes and determine a mode having a minimum cost as the inter prediction mode of the current block.
  • FIG. 10 exemplarily illustrates a decoding process for a current block on which inter prediction is performed.
  • the decoding apparatus may determine whether the affinity merge mode is applied to the current block (S1000). For example, the decoding apparatus may determine whether there is a neighboring block encoded / decoded using affine prediction among neighboring blocks of the current block, and when there is a neighboring block encoded / decoded using the affine prediction. Syntax information indicating whether the merge merge mode is applied may be parsed. The decoding apparatus may determine whether the fine merge mode is applied to the current block based on the syntax information.
  • the decoding apparatus may perform prediction of the current block according to the affine merge mode (S1010). For example, the decoding apparatus may derive an affine merge candidate based on a neighboring block of the current block, parse the index information indicating the affine merge candidate, and the affine merge candidate indicated by the index information. A CPMV and affine MVF of the current block may be derived based on the affine motion model of. Thereafter, the decoding apparatus may derive a prediction sample of the current block based on the affine MVF. Meanwhile, when the derived number of apaine merge candidates is one, index information indicating the affine merge candidate may not be signaled and parsed.
  • the decoding apparatus may determine whether the affine inter mode is applied to the current block (S1020). For example, the decoding apparatus may parse syntax information indicating whether the affine inter mode is applied. The decoding apparatus may determine whether the affine inter mode is applied to the current block based on the syntax information.
  • the decoding apparatus may perform prediction of the current block based on an existing inter prediction mode (S1030). For example, the decoding apparatus may derive the motion information of the current block based on the existing merge mode or the MVP mode, and may derive the predictive sample of the current block based on the motion information.
  • the decoding apparatus may perform prediction of the current block according to the affine inter mode (S1040). For example, the decoding apparatus may derive a CPMVP candidate list based on neighboring blocks of the current block, and parse index information (or flag information) indicating one CPMVP candidate among candidates included in the CPMVP candidate list.
  • the CPMV and affine MVF of the current block of the current block may be derived based on the CPMVP candidate and CPMVD indicated by the index information (or flag information). Thereafter, the decoding apparatus may derive a prediction sample of the current block based on the affine MVF.
  • syntax information on the affine inter prediction may be derived as shown in the following table.
  • cu_skip_flag or skip_flag represents syntax information of a flag indicating whether the skip mode is applied
  • isAffineMrgFlagCoded () is the presence of a neighboring block coded based on affine inter prediction among neighboring blocks of the current block.
  • Affine_flag indicates syntax information of a flag indicating whether affine inter prediction is performed
  • MaxNumMergeCand indicates the number of merge candidate blocks of the current block
  • merge_idx indicates a merge index of the merge candidate block of the current block. Represents syntax information.
  • the prediction according to the affine merge mode may be performed as follows.
  • 11 exemplarily illustrates a prediction process for the current block to which the affine merge mode is applied.
  • the encoding device / decoding device may scan neighboring blocks of the current block in a specific order in order to find an affine block (S1100). That is, for example, the encoding device / decoding device may scan neighboring blocks of the current block according to a specific scanning order to find an affine block.
  • the affine block may represent a neighboring block coded based on the affine inter prediction.
  • the neighboring blocks of the current block may include A, B, C, D, and E shown in FIG. 8A, and the specific scanning order is derived from A ⁇ B ⁇ C ⁇ D ⁇ E order.
  • the order may be referred to as alphabet order or first scanning order.
  • the encoding device / decoding device may determine whether the affine block exists among the scanned neighboring blocks (S1110).
  • the encoding device / decoding device is based on the affine motion model of the affine block of the first, i.
  • An affine motion model can be derived (S1120).
  • the encoding device / decoding device may derive the first, that is, the earlier order of the affine block in the specific order as the affine merge candidate block.
  • the encoding device / decoding device may derive the CPMV of the current block by scaling the CPMV of the affine merge candidate block by a size ratio between the current block and the affine merge candidate block.
  • the encoding device / decoding device may derive the affine motion model of the current block represented by Equation 1 or Equation 3 based on the derived CPMV of the current block.
  • the encoding device / decoding device ends the affine merge mode and based on the existing merge mode or MVP mode, The prediction may be performed (S1130).
  • the affine merge candidate block is derived as the first affine block in the scanning order, and the scanning order plays an important role in the affine inter prediction and overall coding efficiency. Accordingly, the present invention proposes a method of adaptively applying the scanning order for determining the affine merge candidate block based on the current block. As an example, a scheme may be proposed in which the scanning order is adaptively derived based on the width and / or height of the current block.
  • FIG. 12 exemplarily illustrates a method of deriving a CPMV of the current block when the affine block is a left neighboring block or an upper neighboring block.
  • FIG. 12A may show a case in which an affine block derived as a merge candidate block of the current block is a left neighboring block of the current block.
  • CPMV_0 and CPMV_2 of the current block may be more accurately derived than CPMV_1.
  • CPMVP_0 and CPMVP_2 of the current block may be more accurately derived than CPMVP_1.
  • the CPMV_0, CPMV_1, and CPMV_2 may represent motion vectors for CP0, CP1, and CP2 of the current block, and the CPMVP_0, CPMVP_1, and CPMVP_2 may predict motion vectors for CP0, CP1, and CP2 of the current block. It can represent a motion vector predictor (MVP).
  • MVP motion vector predictor
  • FIG. 13 exemplarily illustrates an affine motion model in the case of non-square blocks having different widths and heights.
  • the block between CPMV_0 (or CPMVP_0) and CPMV_2 (or CPMVP_2) of the current block is the CPMV_0 (or CPMVP_0) and CPMV_1 ( Alternatively, since there are more blocks than CPMVP_1), the CPMV_2 (or CPMVP_2) may have a higher correlation with the MVF of the current block than the CPMV_1 (or CPMVP_1).
  • the CPMV_2 of CP2 which is a lower left sample position than the CPMV_1 (or CPMVP_1) of CP1, which is the upper right sample position.
  • CPMVP_2) may have a high correlation with respect to MVF of the current block.
  • the CPMV_2 (or CPMVP_2) may be more important than the CPMV_1 (or CPMVP_1) in order to obtain a more accurate MVF.
  • the block between the CPMV_0 (or CPMVP_0) and CPMV_1 (or CPMVP_1) of the current block is the CPMV_0 (or CPMVP_0) Since there are more blocks than and between CPMV_2 (or CPMVP_2), the CPMV_1 (or CPMVP_1) may have a higher correlation to the MVF of the current block than the CPMV_2 (or CPMVP_2).
  • CPMVP_1) may have a high correlation with respect to MVF of the current block.
  • the CPMV_1 (or CPMVP_1) may be more important than the CPMV_2 (or CPMVP_2) in order to obtain a more accurate MVF.
  • the CPMV_1 when the width of the current block is larger than the height, the CPMV_1 may be more important than the CPMV_2, and thus, the method of scanning from the neighboring block close to CP1 may be more accurate than the CPMV_1 so that the CPMV_1 is more accurately derived. Coding efficiency can be improved.
  • the CPMV_2 when the height of the current block is greater than the width, the CPMV_2 may be more important than the CPMV_1, so that scanning from neighboring blocks close to CP2 may improve prediction accuracy and coding efficiency so that the CPMV_2 is more accurately derived. Can be.
  • the encoding apparatus / decoding apparatus may determine whether the width of the current block is greater than or equal to the height (S1400). If the width of the current block is greater than or equal to the height, the encoding device / decoding device may scan neighboring blocks of the current block according to the second scanning order (S1410). Alternatively, when the width of the current block is smaller than the height, the encoding device / decoding device may scan neighboring blocks of the current block according to the first scanning order (S1420).
  • the neighboring blocks of the current block may include A, B, C, D, and E shown in FIG. 8A, and the first scanning sequence is A ⁇ B ⁇ C ⁇ D ⁇ E.
  • the second scanning order may be derived in the order A ⁇ B ⁇ D ⁇ C ⁇ E.
  • the encoding device / decoding device may determine whether the affine block exists among the scanned neighboring blocks (S1430).
  • the encoding device / decoding device is the affine of the first, i.e., the prior order of the affine block in the first or second scanning order.
  • a motion model may be derived (S1440), and a CPMV and MVF of the current block may be derived based on the affine motion model (S1450).
  • the encoding device / decoding device may derive an affine block of a first, that is, an earlier order, on the first scanning order or the second scanning order as the affine merge candidate block.
  • the encoding device / decoding device may derive the CPMV of the current block by scaling the CPMV of the affine merge candidate block by a size ratio between the current block and the affine merge candidate block.
  • the encoding device / decoding device may derive the affine motion model of the current block represented by Equation 1 or Equation 3 based on the derived CPMV of the current block.
  • the encoding device / decoding device may scan neighboring blocks of the current block in a first scanning order.
  • the encoding device / decoding device may scan neighboring blocks of the current block according to a second scanning order.
  • the neighboring blocks of the current block may include A, B, C, D, and E shown in FIG. 8A
  • the first scanning sequence is A ⁇ B ⁇ C ⁇ D ⁇ E.
  • the second scanning order may be derived in the order A ⁇ B ⁇ D ⁇ C ⁇ E.
  • the encoding device / decoding device may scan neighboring blocks of the current block according to the third scanning order.
  • the encoding device / decoding device may scan neighboring blocks of the current block according to the fourth scanning order.
  • the neighboring blocks of the current block may include A, B, C, D, and E shown in FIG. 8A
  • the third scanning sequence is B ⁇ A ⁇ C ⁇ D ⁇ E.
  • the fourth scanning order may be derived from B ⁇ A ⁇ D ⁇ C ⁇ E order.
  • the encoding device / decoding device may determine whether the affine block exists among the scanned neighboring blocks, and if the affine block exists among the neighboring blocks of the current block, the encoding device / decoding device firstly determines the first. That is, it is possible to derive an affine motion model of the affine blocks in the most advanced order, and to derive the CPMV and MVF of the current block based on the affine motion model. For example, the encoding device / decoding device merges the first block of the first, i.e., earlier, order of the affine block in the first scanning order, the second scanning order, the third scanning order, or the fourth scanning order. Can be derived as a candidate block.
  • the encoding device / decoding device may derive the CPMV of the current block by scaling the CPMV of the affine merge candidate block by a size ratio between the current block and the affine merge candidate block.
  • the encoding device / decoding device may derive the affine motion model of the current block represented by Equation 1 or Equation 3 based on the derived CPMV of the current block.
  • a method of determining a scanning order when the width and height of the current block are the same may be further proposed.
  • 15A to 15B exemplarily illustrate affine prediction for deriving a scanning order based on the width and height.
  • the encoding device / decoding device may determine whether neighboring blocks A and B of the current block are affine blocks. For example, when the neighboring block A is the affine block and the neighboring block B is not the affine block, the encoding device / decoding device derives the neighboring block A as an affine merge candidate block of the current block. can do.
  • the encoding device / decoding device may derive the neighboring block B as an affinity merge candidate block of the current block. have.
  • the encoding device / decoding device selects the neighboring block having the larger size among the neighboring block A and the neighboring block B, and is the candidate merge candidate of the current block. Can be derived as a block.
  • the encoding device / decoding device may determine whether the neighbor blocks C and D of the current block are the affine block. For example, when the neighboring block C is the affine block and the neighboring block D is not the affine block, the encoding device / decoding device derives the neighboring block C as an affine merge candidate block of the current block. can do. Alternatively, when the neighboring block C is not the affine block and the neighboring block D is the affine block, the encoding device / decoding device may derive the neighboring block D as an affinity merge candidate block of the current block. have.
  • the encoding device / decoding device selects the neighboring block having the larger size among the neighboring block C and the neighboring block D and is the candidate merge candidate of the current block. Can be derived as a block.
  • the encoding device / decoding device may determine whether the neighbor block E of the current block is an affine block. For example, when the neighboring block E is the affine block, the encoding device / decoding device may derive the neighboring block E as an affine merge candidate block of the current block.
  • the encoding device / decoding device may derive the affine motion model of the current block based on the derived CPMV of the affine merge candidate block. That is, the encoding device / decoding device may derive the CPMV of the current block by scaling the CPMV of the affine merge candidate block by a size ratio between the current block and the affine merge candidate block, and calculate the CPMV of the current block. Based on the MVF of the current block can be derived.
  • a scanning order based on the width and height may be proposed.
  • a method of determining a scanning order in consideration of neighboring blocks other than the aforementioned neighboring blocks may be additionally proposed.
  • neighboring blocks for deriving the affine merge candidate block may include A, B, C, D, and E shown in FIG. 8A.
  • the neighboring block A may represent a left neighboring block located at the lowermost side among the left neighboring blocks of the current block.
  • the neighboring block B may represent an upper neighboring block located at the rightmost side among upper neighboring blocks of the current block.
  • the neighboring block C may represent a right upper corner peripheral block of the current block
  • the peripheral block D may represent a lower left corner peripheral block of the current block
  • the peripheral block E may represent a left upper corner peripheral block of the current block. .
  • the affine block 1600 may not be considered as the affine merge candidate block of the current block. Accordingly, the above-described problem may be solved when additional neighboring blocks other than the neighboring blocks A, B, C, D, and E are considered in deriving the affine merge candidate block.
  • neighboring blocks considered in derivation of the affine merge candidate block may include neighboring blocks A, B, C, D, E, neighboring blocks A ', and neighboring block B'. have.
  • the neighboring block A ' may represent a left neighboring block located at the uppermost side among the left neighboring blocks of the current block.
  • the neighboring block B ′ may represent an upper neighboring block located on the leftmost side among upper neighboring blocks of the current block.
  • the neighboring blocks of the current block including the neighboring block A 'and the neighboring block B' may be considered for deriving the candidate merge block.
  • the encoding device / decoding device may scan neighboring blocks of the current block including the neighboring block A 'and the neighboring block B' according to a fifth scanning order, a sixth scanning order, or a seventh scanning order.
  • the fifth scanning sequence may be derived from A ⁇ A ' ⁇ B ⁇ B' ⁇ C ⁇ D ⁇ E
  • the sixth scanning sequence may be A ⁇ B ⁇ A ' ⁇ B' ⁇ C ⁇ D ⁇
  • the seventh scanning order may be derived from the order E
  • the seventh scanning order may be derived from the order A ⁇ B ⁇ B ' ⁇ A' ⁇ C ⁇ D ⁇ E.
  • deriving a scanning order based on the width and height may be proposed.
  • a method of deriving neighboring blocks for deriving the affine merge candidate block based on the width and height of the current block and scanning the derived neighboring blocks may be further proposed.
  • 17 exemplarily illustrates neighboring blocks for deriving the affine merge candidate block according to the width and height.
  • neighboring blocks for deriving the affine merge candidate block may be derived based on a width and a height of the current block.
  • neighboring blocks of the current block for deriving the candidate merge block are neighboring block A, neighboring block B, neighboring block C, neighboring.
  • Block D and neighboring block E are neighboring blocks of the current block for deriving the candidate merge block.
  • the neighboring block A may represent a left neighboring block located at the lowermost side among the left neighboring blocks of the current block
  • the neighboring block B is an upper neighbor located at the rightmost side among the upper neighboring blocks of the current block.
  • the neighboring block C may represent a block around the upper right corner of the current block
  • the neighboring block D may represent a block around the lower left corner of the current block
  • the neighboring block E is the It may indicate a block around the upper left corner of the current block.
  • neighboring blocks of the current block for deriving the candidate merge block are neighboring block A, neighboring block B, neighboring block C, and neighboring.
  • the neighboring block A may represent a left neighboring block located at the lowermost side among the left neighboring blocks of the current block
  • the neighboring block B is an upper neighbor located at the rightmost side among the upper neighboring blocks of the current block.
  • the neighboring block C may represent a block around the upper right corner of the current block
  • the neighboring block D may represent a block around the lower left corner of the current block
  • the neighboring block E is the It may indicate a block around the upper left corner of the current block.
  • the neighboring block A ' may represent a left neighboring block located at the uppermost side among the left neighboring blocks of the current block.
  • neighboring blocks of the current block for deriving the candidate merge block are neighboring blocks A, neighboring blocks B, neighboring blocks C, and surroundings.
  • the neighboring block A may represent a left neighboring block located at the lowermost side among the left neighboring blocks of the current block
  • the neighboring block B is an upper neighbor located at the rightmost side among the upper neighboring blocks of the current block.
  • the neighboring block C may represent a block around the upper right corner of the current block
  • the neighboring block D may represent a block around the lower left corner of the current block
  • the neighboring block E is the It may indicate a block around the upper left corner of the current block.
  • the neighboring block B ′ may represent an upper neighboring block located on the leftmost side among upper neighboring blocks of the current block.
  • the scanning order for deriving the affine merge candidate block may be derived as shown in the following table.
  • the encoding device / decoding device may scan the neighboring blocks of the current block including the neighboring block A 'according to an eighth scanning order, and the current block If the width of P is greater than the height, the encoding device / decoding device may scan the neighboring blocks of the current block including the neighboring block B ′ according to a ninth scanning order.
  • the eighth scanning order may be derived from A ⁇ A ' ⁇ B ⁇ C ⁇ D ⁇ E
  • the ninth scanning order may be derived from A ⁇ B ⁇ B' ⁇ C ⁇ D ⁇ E. have.
  • the encoding device / decoding device may scan the neighboring blocks of the current block including the neighboring block A 'according to the eighth scanning order.
  • the encoding device / decoding device may scan the neighboring blocks of the current block including the neighboring block B ′ according to the tenth scanning order.
  • the tenth scanning order may be derived in the order of B ⁇ B ' ⁇ A ⁇ C ⁇ D ⁇ E.
  • the encoding device / decoding device may scan the neighboring blocks of the current block including the neighboring block A 'according to an eleventh scanning order, and the current When the width of the block is greater than the height, the encoding device / decoding device may scan the neighboring blocks of the current block including the neighboring block B ′ according to the tenth scanning order.
  • the eleventh scanning order may be derived in the order A ⁇ B ⁇ A ' ⁇ C ⁇ D ⁇ E.
  • the encoding device / decoding device may scan neighboring blocks of the current block including the neighboring block A 'according to the eleventh scanning order.
  • the encoding device / decoding device may scan the neighboring blocks of the current block including the neighboring block B ′ according to the twelfth scanning order.
  • the twelfth scanning order may be derived in the order of B ⁇ A ⁇ B ' ⁇ C ⁇ D ⁇ E.
  • the coding order is a Z scanning order.
  • the current block may be one of the plurality of CUs, and the decoding order of the plurality of CUs may be based on the Z scanning order.
  • the plurality of CUs may be sequentially decoded in the order of the following rows in the upper row, and in each row, the plurality of CUs may be sequentially decoded in the order of the left CU and the right CU in each row. Therefore, the block may be limited to blocks located at the left and the upper side of the current block in which encoding / decoding is already completed at the decoding time of the current block.
  • a scheme in which a scanning order other than the existing Z scanning order is applied may be considered.
  • the position of the block referred to in the prediction of the current block may be changed according to the scanning order applied.
  • 18A to 18B exemplarily illustrate neighboring blocks for deriving an affinity merge candidate block of the current block derived according to a scanning order.
  • the upper left corner peripheral block, the upper peripheral block, the upper right corner peripheral block, the right peripheral block, and the lower right corner peripheral block may be derived as neighboring blocks for deriving the affine merge candidate block.
  • the upper peripheral block may indicate an upper peripheral block located at the leftmost side among the upper peripheral blocks of the current block, and the right peripheral block indicates a right peripheral block located at the lowermost side among the right peripheral blocks of the current block. Can be represented.
  • the scanning order shown in (b) of FIG. 18A is applied.
  • the upper right corner peripheral block, the right peripheral block, the lower right corner peripheral block, the lower peripheral block and the lower left corner peripheral block may be derived as peripheral blocks for deriving the affine merge candidate block.
  • the right neighboring block may represent a right neighboring block located at the lowermost side among the right neighboring blocks of the current block, and the lower neighboring block is a lower neighboring block located at the leftmost of the lower neighboring blocks of the current block. Can be represented.
  • the upper left corner peripheral block, the upper peripheral block 1, the upper peripheral block 2, the upper right corner peripheral block, the right peripheral block 1, the right peripheral block 2, and the lower right corner peripheral block are derived from the merge candidate block. It can be derived as neighboring blocks for.
  • the upper peripheral block 1 may represent an upper peripheral block located at the leftmost side among the upper peripheral blocks of the current block, and the upper peripheral block 2 is an upper peripheral located at the rightmost side of the upper peripheral blocks of the current block.
  • the right peripheral block 1 may represent a right peripheral block located at the uppermost side among the right peripheral blocks of the current block, and the right peripheral block 2 is the lowest of the right peripheral blocks of the current block.
  • the right peripheral block located on the side can be shown.
  • the scanning order shown in (d) of FIG. 18A is applied.
  • the upper right corner block, the right peripheral block 1, the right peripheral block 2, the lower right corner peripheral block, the lower peripheral block 1, the lower peripheral block 2, and the lower left corner peripheral block are derived from the above merge merge block. It can be derived as neighboring blocks for.
  • the right peripheral block 1 may represent a right peripheral block located at the top of the right peripheral blocks of the current block, and the right peripheral block 2 is a right peripheral located at the bottom of the right peripheral blocks of the current block.
  • the lower peripheral block 1 may represent a lower peripheral block located at the rightmost side among the lower peripheral blocks of the current block, and the lower peripheral block 2 is the lowest neighboring block among the lower peripheral blocks of the current block.
  • a lower peripheral block located on the left side can be indicated.
  • neighboring blocks for deriving an affinity merge candidate block of the current block may be derived in consideration of the width and height of the current block.
  • FIG. 18B e
  • the block may be derived as neighboring blocks for deriving the affine merge candidate block, and if the width of the current block is greater than the height, the upper right corner peripheral block, the right peripheral block 2 and the lower right corner peripheral block
  • the lower peripheral block 1, the lower peripheral block 2, and the lower left corner peripheral block may be derived as neighboring blocks for deriving the affine merge candidate block.
  • FIG. 18B (f) when a scanning order is sequentially decoded in the lower row in the order of the lower row, and each row is sequentially decoded in the order of the right-most CU to the left-most CU, in FIG. 18B (f).
  • the width of the current block is smaller than the height
  • a corner peripheral block may be derived as neighboring blocks for deriving the affine merge candidate block
  • the width of the current block is greater than a height
  • the upper right corner peripheral block, the right peripheral block 1, and the lower right corner peripheral block may be derived as neighboring blocks for deriving the affine merge candidate block.
  • one affinity merge candidate block may be derived from neighboring blocks of the current block, but a plurality of affinity merge candidate blocks may be derived.
  • two affine merge candidate blocks may be derived from neighboring blocks of the current block.
  • index information indicating one of the affine merge candidate blocks among the affine merge candidate blocks may be signaled, and CPMV and MVF of the current block may be derived based on the affine candidate block indicated by the index information. Can be.
  • the present invention proposes a method of signaling index information indicating the optimal candidate merge candidate block by determining the optimal candidate merge block. That is, in the above-described embodiment, the first affine block in the scanning order, that is, the first-order affine block is determined as the affine merge candidate block, whereas in the below-described embodiment, two affine blocks of neighboring blocks are determined.
  • a method of signaling index information indicating the optimal affine merge candidate block by determining the candidate merge candidate blocks of the current block and determining the best affine merge candidate block among the affine merge candidate blocks will be described. do.
  • FIG. 19 illustrates an example of deriving an affine merge candidate block for the current block to which the affine merge mode is applied.
  • the encoding device / decoding device may scan neighboring blocks of the current block and derive the number of affine blocks among the neighboring blocks (S1900). For example, the encoding device / decoding device may scan neighboring blocks of the current block according to a specific scanning order to find the affine block.
  • the affine block may represent a neighboring block coded based on the affine inter prediction.
  • the neighboring blocks of the current block may include neighboring blocks A, B, C, D, and E shown in FIG. 8A, and the specific scanning order is A ⁇ B ⁇ C ⁇ D ⁇ E.
  • the order may be referred to as an alphabet order or a first scanning order.
  • the encoding device / decoding device may determine the number of the affine blocks among the scanned neighboring blocks, and the number of the affine blocks may be derived as N.
  • the encoding device / decoding device may determine whether the affine block exists among the neighboring blocks (S1910).
  • the encoding device / decoding device may derive N CPMVs and affine MVFs for the current block based on N affine blocks (S1920). For example, the encoding device / decoding device may derive the CPMV and the affine MVF based on the affine motion model of each of the N affine blocks. That is, the encoding device / decoding device may derive the CPMV of the current block by scaling the CPMV of the corresponding block among the N affine blocks by the size ratio between the current block and the corresponding block. The encoding device / decoding device may derive the affine motion model of the current block represented by Equation 1 or Equation 3 based on the derived CPMV of the current block, and derive the affine MVF of the current block. Can be.
  • the encoding device / decoding device selects an affine block having the same or similar CPMV and affine MVF as the CPMV and affine MVF of the preceding affine blocks among the N affine blocks derived through the pruning check.
  • the remaining i affine blocks may be derived.
  • an encoding device / decoding device may compare CPMV and affine MVFs of the affine blocks, and if there are affine blocks having the same or similar CPMV and affine MVF, the specific one of the affine blocks An affine block having a lower order in the scanning order may be excluded from the candidate for deriving the affine merge candidate block.
  • the pruning check for comparing the CPMV and affine MVFs of the affine blocks may consider the following methods.
  • First, a pruning check that performs the same determination may be considered as a commonly used pruning check method.
  • affine prediction a motion vector derived in sub-block units (or sample units) is derived, and thus the reliability of the motion vector is not very high. Thus, a small difference between the affine MVF of the affine blocks being compared can be ignored.
  • a pruning check method that can be considered in the following affine prediction may be proposed.
  • the encoding device / decoding device may compare the derived CPMVs of the first and second affine blocks to determine whether the CPMVs are the same. Meanwhile, in the case of affinity MVF, since the CPMVs are derived, only the CPMVs may be compared. Specifically, the comparison of the CPMVs can be derived as in the following equation.
  • V_11 represents CPMV of CP0 of the first affine block
  • V_12 represents CPMV of CP1 of the first affine block
  • V_21 represents CPMV of CP0 of the second affine block
  • V_22 represents CPMV for CP1 of the second affine block.
  • the encoding device / decoding device compares the difference values of x-component and y-component of the derived CPMVs of the first and second affine blocks to determine whether the CPMVs are the same. You can judge. In other words, the difference between the x component of CPMV of the first affine block and the x component of CPMV of the second affine block, the y component of CPMV of the first affine block and the CPMV of the second affine block. The difference between y components may be derived to determine whether the CPMVs are the same. For example, when the differences are smaller than a specific value, it may be determined that the CPMVs of the first and second affine blocks are the same. Meanwhile, in the case of affinity MVF, since the CPMVs are derived, only the CPMVs may be compared. Specifically, the comparison of the CPMVs can be derived as in the following equation.
  • V11_x represents the x component of CPMV for CP0 of the first affine block
  • V11_y represents the y component of CPMV for CP0 of the first affine block
  • V12_x represents CPMV for CP1 of the first affine block.
  • V12_y represents the y component of CPMV for CP1 of the first affine block
  • V21_x represents the x component of CPMV for CP0 of the second affine block
  • V21_y of the second affine block Represents the y component of CPMV for CP0
  • V22_x represents the x component of CPMV for CP1 of the second affine block
  • V22_y represents the y component of CPMV for CP1 of the second affine block.
  • T_x and T_y represent the specific value used as the reference
  • the CPMVs of the first and second affine blocks may be regarded as the same.
  • Tx and Ty which are the criteria for determining whether they are identical, may be derived as in the following equation.
  • width and height represent the width and height of the current block.
  • Equations 7 and 8 may be similar when the width and / or height of the current block is large, even if each component difference of the CPMVs is larger than when the width and / or height of the current block is small. It may indicate that there is. In addition, when the width and / or height of the current block is small, it means that the CPMVs may be similar when the difference between each component of the CPMVs is sufficiently small.
  • N is a value that can be determined experimentally.
  • the comparison of the CPMVs may be derived as in the following equation.
  • V11_x represents the x component of CPMV for CP0 of the first affine block
  • V11_y represents the y component of CPMV for CP0 of the first affine block
  • V12_x represents CPMV for CP1 of the first affine block.
  • V12_y represents the y component of CPMV for CP1 of the first affine block
  • V21_x represents the x component of CPMV for CP0 of the second affine block
  • V21_y of the second affine block Represents the y component of CPMV for CP0
  • V22_x represents the x component of CPMV for CP1 of the second affine block
  • V22_y represents the y component of CPMV for CP1 of the second affine block.
  • T_x and T_y represent the specific value used as the reference
  • the encoding device / decoding device may derive at most two affine merge candidate blocks according to the specific scanning order among the i affine blocks (S1940). For example, if the derived number of affine blocks is two or more, the encoding device / decoding device may derive the first and second affine blocks as the affine merge candidate blocks in the specific scanning order. . That is, the encoding device / decoding device may derive the affine block of the earliest order and the affine block of the second order as the affine merge candidate blocks in the scanning order. When the number of derived affine blocks is one, the encoding device / decoding device may derive one affine merge candidate block based on the derived affine blocks.
  • syntax information on the affine inter prediction may be derived as shown in the following table.
  • skip_flag represents syntax information of a flag indicating whether the skip mode is applied
  • isAffineMrgFlagCoded () represents whether a neighboring block coded based on affine inter prediction among neighboring blocks of the current block is present
  • affine_flag represents syntax information of a flag indicating whether or not affine inter prediction is performed
  • numAffineMergeCand represents a number of the affine merge candidate blocks
  • affine_merge_idx represents a plurality of affine merge candidate blocks (for example, two affines).
  • Among merge candidate blocks indicates syntax information of an merge merge index indicating the merge merge candidate block of the current block
  • MaxNumMergeCand represents the number of merge candidate blocks of the current block
  • merge_idx represents the merge candidate of the current block. Represents syntax information of a merge index pointing to a block.
  • the efficiency of using one affine merge candidate block and a plurality of affine merge candidate blocks in the affinity merge mode may vary depending on the size of the current block. For example, when the size of a block is small, it is possible to improve coding efficiency by applying an affine merge mode using one affine merge candidate block without using a plurality of affine merge candidate blocks.
  • Table 4 shows the optimal affine merge between an affine merge mode using one affine merge candidate block (Example 1) and an affine merge mode using two affine merge candidate blocks (Example 2). It may indicate a ratio determined by the mode.
  • the affiliation merge mode using two affine merge candidate blocks may have better efficiency.
  • Affine merge mode using the affine merge candidate block may be applied to have a better efficiency. Therefore, the present invention proposes a method of adaptively determining the number of affine merge blocks derived according to the size of a block.
  • Syntax information for the affine inter prediction that adaptively determines the number of affine merge blocks derived according to the size of a block may be derived as shown in the following table.
  • skip_flag represents syntax information of a flag indicating whether the skip mode is applied
  • isAffineMrgFlagCoded () represents whether a neighboring block coded based on affine inter prediction among neighboring blocks of the current block is present
  • affine_flag represents syntax information of a flag indicating whether or not affine inter prediction is performed
  • numAffineMergeCand represents a number of the affine merge candidate blocks
  • affine_merge_idx represents a plurality of affine merge candidate blocks (for example, two affines).
  • Among merge candidate blocks indicates syntax information of an merge merge index indicating the merge merge candidate block of the current block
  • MaxNumMergeCand represents the number of merge candidate blocks of the current block
  • merge_idx represents the merge candidate of the current block.
  • numPix represents the number of samples of the current block. If a plurality of affine merge candidate blocks are not derived, the derived affine merge candidate blocks may be used as the affine merge candidate blocks of the current block without separate signaled information.
  • an affine merge mode for deriving one affinity merge candidate block may be applied.
  • a plurality of frequencies An affine merge mode for deriving the merge candidate blocks may be applied.
  • the affinity merge index for the current block may not be parsed and signaled.
  • the affinity merge index for the current block may be parsed and signaled.
  • Table 5 described above is based on the number of 1024 samples based on statistical analysis, other values may be used.
  • whether or not to apply the affine merge mode for deriving a plurality of affine merge candidate blocks based on the width or height of the current block instead of the number of samples of the current block may be derived.
  • an example of the probability that the value of the affinity merge index is derived as 0 or 1 may be derived as shown in the following table.
  • the sequence represents a test image to be encoded / decoded
  • the QP represents an applied quantization parameter QP
  • the CABAC context model for the affinity merge index can be designed as follows.
  • x represents the initial value of the context model for the above merge merge index.
  • X may be derived as one of 149 to 153.
  • any of the affine merge candidate blocks of the affine merge candidate blocks may be recalled.
  • a method of determining as an merge merge block of the current block will be described.
  • the optimal merge merge candidate block that is, the merge merge candidate block for the current block, may be derived by the decoding apparatus through template matching, and no additional information may be signaled. The specific process is as follows.
  • the encoding device / decoding device may determine whether there is an affine block among neighboring blocks A, B, C, D, and E of the current block.
  • the neighboring block A may represent a left neighboring block located at the lowermost side among the left neighboring blocks of the current block
  • the neighboring block B is an upper neighbor located at the rightmost side among the upper neighboring blocks of the current block.
  • the neighboring block C may represent a block around the upper right corner of the current block
  • the neighboring block D may represent a block around the lower left corner of the current block
  • the neighboring block E is the It may indicate a block around the upper left corner of the current block.
  • the encoding device / decoding device may not perform prediction and encoding / decoding through the affine merge mode. If the affine block exists, the encoding device / decoding device may generate an affine merge candidate block based on the affine block.
  • the encoding device / decoding device may perform template matching on the affine merge candidate block, and thereby select an optimal affine merge candidate block.
  • FIG. 21 schematically illustrates a video encoding method by an encoding device according to the present invention.
  • the method disclosed in FIG. 21 may be performed by the encoding apparatus disclosed in FIG. 1.
  • S2100 to S2140 of FIG. 21 may be performed by the prediction unit of the encoding apparatus
  • S2150 may be performed by the entropy encoding unit of the encoding apparatus.
  • the encoding apparatus derives the neighboring blocks and the scanning order of the current block (S2100).
  • the peripheral blocks may include a left peripheral block, an upper peripheral block, a right upper corner peripheral block, a lower left corner peripheral block, and a left upper corner peripheral block of the current block.
  • the left peripheral block is a left peripheral block located at the lowermost side among the blocks adjacent to the left boundary of the current block
  • the upper peripheral block is an upper side located at the rightmost side among the blocks adjacent to the upper boundary of the current block. It may be a neighboring block.
  • the scanning order may be derived based on the width and height of the current block.
  • the specific scanning order may include the left peripheral block, the upper peripheral block, the lower left corner peripheral block, the upper right corner peripheral block, and the upper left corner.
  • the specific scanning order may be the upper peripheral block, the left peripheral block, the upper right corner peripheral block, the lower left corner peripheral block, It can be derived from the block order around the upper left corner.
  • the specific scanning order may include the left peripheral block, the upper peripheral block, the upper right corner peripheral block, the lower left corner peripheral block, and the upper left corner.
  • the specific scanning order may include the upper peripheral block, the left peripheral block, the lower left corner peripheral block, and the upper right corner peripheral block. The order of blocks around the upper left corner may be derived.
  • the specific scanning order may include the left peripheral block, the upper peripheral block, the lower left corner peripheral block, the upper right corner peripheral block, and the upper left corner.
  • the specific scanning order may include the upper peripheral block, the left peripheral block, the upper right corner peripheral block, and the lower left corner peripheral block. The order of blocks around the upper left corner may be derived.
  • the specific scanning order may include the left peripheral block and the upper peripheral block, the upper right corner peripheral block and the lower left corner peripheral block, and the upper left corner. It can be derived in the order of neighboring blocks.
  • the decoding apparatus may determine whether the left neighboring block and the upper neighboring block of the current block are an affine neighboring block, and the left neighboring block and the upper neighboring block are not the affine neighboring block.
  • the decoding apparatus may determine whether the upper right corner peripheral block and the lower left corner peripheral block of the current block are the affine peripheral blocks, and the upper right corner peripheral block and the lower left corner peripheral block are If it is not an affine neighboring block, the encoding device / decoding device may determine whether the upper left corner neighboring block of the current block is an affine neighboring block.
  • the neighboring blocks may include a left peripheral block 1, a left peripheral block 2, an upper peripheral block 1, an upper peripheral block 2, a right upper corner peripheral block, a lower left corner peripheral block, and an upper left corner peripheral block of the current block.
  • the left peripheral block 1 is a left peripheral block located at the lowermost side among the blocks adjacent to the left boundary of the current block
  • the left peripheral block 2 is the uppermost side of the blocks adjacent to the left boundary of the current block
  • the upper peripheral block 1 is the upper peripheral block located at the rightmost of the blocks adjacent to the upper boundary of the current block
  • the upper peripheral block 2 is adjacent to the upper boundary of the current block. It may be an upper peripheral block located on the leftmost side of the blocks.
  • the specific scanning order is the left peripheral block 1, the left peripheral block 2, the upper peripheral block 1, the upper peripheral block 2, the upper right corner peripheral block, the lower left corner peripheral block, the upper left corner It can be derived in the order of neighboring blocks.
  • the specific scanning order may include the left peripheral block 1, the upper peripheral block 1, the left peripheral block 2, the upper peripheral block 2, the upper right corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral.
  • the specific scanning sequence may include the left peripheral block 1, the upper peripheral block 1, the upper peripheral block 2, the left peripheral block 2, the upper right corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral.
  • the specific scanning order may be derived based on the width and height of the current block.
  • the neighboring blocks may be derived based on the width and height of the current block.
  • the neighboring blocks are left peripheral block 1, upper peripheral block 1, upper right corner peripheral block, lower left corner peripheral block and upper left corner peripheral block of the current block.
  • the peripheral blocks are the left peripheral block 1, the left peripheral block 2, the upper peripheral block 1, the upper right corner peripheral block, the It may include a lower left corner peripheral block and the upper left corner peripheral block
  • the peripheral blocks are the left peripheral block 1, the upper peripheral block 1, the upper side of the current block A peripheral block 2, the upper right corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral block may be included.
  • the left peripheral block 1 is a left peripheral block located at the lowermost side among the blocks adjacent to the left boundary of the current block, and the left peripheral block 2 is the uppermost side of the blocks adjacent to the left boundary of the current block.
  • the upper peripheral block 1 is the upper peripheral block located at the rightmost of the blocks adjacent to the upper boundary of the current block, and the upper peripheral block 2 is adjacent to the upper boundary of the current block. It may be an upper peripheral block located on the leftmost side of the blocks.
  • the scanning order may be derived based on the width and height of the current block.
  • the specific scanning order is the left peripheral block 1, the left peripheral block 2, the upper peripheral block 1, the upper right corner peripheral block, the lower left corner peripheral Block, the upper left corner peripheral block order
  • the specific scanning order is the left peripheral block 1, the upper peripheral block 1, the upper peripheral block 2, the Blocks around the upper right corner, blocks around the lower left corner, and blocks around the upper left corner may be derived.
  • the specific scanning order may include the left peripheral block 1, the left peripheral block 2, the upper peripheral block 1, the upper right corner peripheral block, and the lower left side.
  • the specific scanning order is the upper peripheral block 1, the upper peripheral block 2, the left peripheral block 1
  • the upper left corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral block may be derived in the order.
  • the specific scanning order may include the left peripheral block 1, the upper peripheral block 1, the left peripheral block 2, the upper right corner peripheral block, and the lower left side.
  • the specific scanning order is the upper peripheral block 1, the upper peripheral block 2, the left peripheral block 1
  • the upper left corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral block may be derived in the order.
  • the specific scanning order may include the left peripheral block 1, the upper peripheral block 1, the left peripheral block 2, the upper right corner peripheral block, and the lower left side.
  • the specific scanning order is the upper peripheral block 1, the left peripheral block 1, the upper peripheral block 2, and so on.
  • the upper left corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral block may be derived in the order.
  • the encoding apparatus scans the neighboring blocks in the scanning order to derive at least one affine merge candidate block (S2110).
  • the encoding apparatus may detect at least one affine neighboring block among the neighboring blocks in the scanning order.
  • the encoding apparatus may determine whether the neighboring blocks are affine neighboring blocks in the specific scanning order.
  • the affine neighboring block may be a subblock derived based on motion vectors of CPs or a neighboring block encoded based on a motion vector of a sample unit.
  • the encoding apparatus converts a neighboring block of the first order in the first affine merge candidate block and the specific scanning order among the affine neighboring blocks.
  • the neighboring blocks of the second order may be derived as the second candidate merge candidate block.
  • the encoding apparatus may derive motion vectors of CPs of each of the affine neighboring blocks, and the same as that of the affine neighboring blocks based on the motion vectors of the CPs. It can be determined. For example, whether the motion vectors of the CPs of the neighboring blocks of the first affine and the motion vectors of the CPs of the neighboring blocks of the second affine are equal may be determined based on Equation 6, Equation 7, or Equation 9 above. Can be.
  • the encoding apparatus may be configured to determine a difference between an x component of a motion vector for CP0 of the first affine neighboring block and a x component of a motion vector for CP0 of the second affine neighboring block, the first affine.
  • the difference between the y component of the motion vector for the CP0 of the neighboring block and the y component of the motion vector for the CP0 of the second affine neighboring block, the x of the motion vector for CP1 of the first affine neighboring block The difference between the component and the x component of the motion vector for CP1 of the second affine neighboring block, the y component of the motion vector for the CP1 of the first affine neighboring block and the CP1 of the second affine neighboring block
  • the difference between the y components of the motion vector for may be derived to determine whether the CPMVs are the same. For example, when the differences are smaller than a specific value, it may be determined that the CPMVs of the first and second affine blocks are the same.
  • An affine neighboring block having a later order in the specific scanning order may not be derived as the first affine merge candidate block or the second affine merge candidate block.
  • the encoding apparatus derives the motion vectors of the CPs for the current block based on the motion vectors of the CPs for the affixed merge candidate block (S2120).
  • the encoding apparatus is configured for the current block of the first affine merge candidate block and the second affine merge candidate block.
  • An optimal merge merge candidate block may be derived, and an affine merge index indicating the derived merge merge candidate block may be generated.
  • the encoding apparatus may derive the motion vectors of the CPs for the current block based on the motion vectors of the CPs for the derived merge candidate block.
  • the affinity merge index may indicate one of the first merge merge candidate blocks and the second merge merge candidate block.
  • the initial value of the context model for the affinity merge index may be derived as one of 149 to 153.
  • the encoding device may derive control points (CPs) for the current block. Two CPs may be used or three CPs may be used.
  • the number of CPs may be two.
  • the coordinate of the top-left sample position of the current block is (0, 0)
  • the height of the current block is h
  • the width is w
  • the coordinate of CP0 among the CPs is (0, 0).
  • the coordinate of CP1 may be (w, 0).
  • the number of CPs may be three.
  • the coordinate of the upper left sample position of the current block is (0, 0)
  • the height of the current block is h
  • the width is w
  • the coordinate of CP0 among the CPs is (0, 0)
  • the coordinate of CP1 Is (w, 0) and the coordinate of CP2 may be (0, h).
  • the motion vectors for the CPs may be derived based on the motion vectors for the CPs of the candidate merge block for the current block. Specifically, the decoding apparatus scales the motion vectors for the CPs for the affixed merge candidate block by a size ratio between the current block and the affine merge candidate block to increase the motion vectors for the CPs for the current block. Can be derived.
  • the encoding apparatus derives a motion vector of a sub block or a sample unit in the current block based on the motion vectors of the CPs (S2130).
  • the encoding apparatus may derive the motion vector of the sub-block unit or the sample unit in the current block according to the affine motion model according to the present invention, and thereby perform more accurate inter prediction.
  • the motion vector of the sub block or the sample unit in the current block may be derived based on Equation 3 described above.
  • v x and v y may be calculated based on Equation 3, wherein v x and v y represent x components and y components of a motion vector for any (x, y) coordinates in the current block. As described above.
  • the motion vector of the sub block or the sample unit in the current block may be derived based on Equation 1 described above.
  • the sub block may have a uniform size. That is, the sub block may have an n ⁇ n size.
  • n may be a positive integer or a power of 2.
  • n may be 4.
  • a motion vector corresponding to the upper left sample position coordinate of the sub block may be used as the motion vector for the sub block.
  • a motion vector corresponding to the center right lower sample position of the subblock may be used as the motion vector for the subblock.
  • the center lower right sample position may indicate a sample position located on the lower right side among four samples positioned at the center of the sub block as described above.
  • the encoding apparatus may generate an affine flag.
  • the affine flag may indicate whether the motion vector of the sub-block or the sample unit in the current block is derived based on the motion vectors of the CPs. That is, the affine flag may indicate whether or not affine prediction performed based on the affine motion model is performed.
  • the encoding apparatus derives a prediction sample (or a prediction sample array) for the current block based on the subblock or the motion vector in the sample unit (S2140).
  • the encoding apparatus derives a reference picture based on the reference picture index of the current block, derives a reference region indicated by the motion vector in the sample unit or the sub-block unit on the reference picture, and reconstructs in the reference region.
  • a sample can be used as a prediction sample for the current block.
  • the reference picture index of the current block may be derived based on the reference picture index of the affine merge candidate block.
  • the encoding apparatus may generate a residual sample (or a residual signal) based on the original sample of the original picture and the prediction sample.
  • the encoding apparatus generates, encodes and outputs prediction information about the current block (S2150).
  • the encoding apparatus may encode the prediction information for the current block and output the encoded information through a bitstream, which may be stored in a non-transitory computer readable medium.
  • the bitstream may be transmitted to a decoding apparatus via a network or a storage medium.
  • the prediction information may include the affine flag.
  • the affine flag may indicate whether the motion vector of the sub-block or the sample unit in the current block is derived based on the motion vectors of the CPs. That is, the affine flag may indicate whether or not affine prediction performed based on the affine motion model is performed. Meanwhile, the affine flag may be signaled only when there is an affine neighboring block among the neighboring blocks.
  • the prediction information may include the affinity merge index.
  • the affine merge index may be signaled only when a plurality of affine merge candidate blocks, for example, the first affine merge candidate block and the second affine merge candidate block are derived.
  • the encoding apparatus may derive an optimal affixed merge candidate block for the current block among the first and second affine merge candidate blocks, and indicates an derived merge candidate block. You can create an merge merge index.
  • the affinity merge index may indicate one of the first merge merge candidate blocks and the second merge merge candidate block.
  • the initial value of the context model for the affinity merge index may be derived as one of 149 to 153.
  • the encoding apparatus may encode and output information about the residual sample for the current block.
  • the information about the residual sample may include transform coefficients related to the residual sample.
  • FIG. 22 schematically illustrates a video decoding method by a decoding apparatus according to the present invention.
  • the method disclosed in FIG. 22 may be performed by the decoding apparatus disclosed in FIG. 2.
  • S2200 and S2250 of FIG. 22 may be performed by the prediction unit of the decoding apparatus.
  • the decoding apparatus derives the neighboring blocks and the scanning order of the current block (S2200).
  • the peripheral blocks may include a left peripheral block, an upper peripheral block, a right upper corner peripheral block, a lower left corner peripheral block, and a left upper corner peripheral block of the current block.
  • the left peripheral block is a left peripheral block located at the lowermost side among the blocks adjacent to the left boundary of the current block
  • the upper peripheral block is an upper side located at the rightmost side among the blocks adjacent to the upper boundary of the current block. It may be a neighboring block.
  • the scanning order may be derived based on the width and height of the current block.
  • the specific scanning order may include the left peripheral block, the upper peripheral block, the lower left corner peripheral block, the upper right corner peripheral block, and the upper left corner.
  • the specific scanning order may be the upper peripheral block, the left peripheral block, the upper right corner peripheral block, the lower left corner peripheral block, It can be derived from the block order around the upper left corner.
  • the specific scanning order may include the left peripheral block, the upper peripheral block, the upper right corner peripheral block, the lower left corner peripheral block, and the upper left corner.
  • the specific scanning order may include the upper peripheral block, the left peripheral block, the lower left corner peripheral block, and the upper right corner peripheral block. The order of blocks around the upper left corner may be derived.
  • the specific scanning order may include the left peripheral block, the upper peripheral block, the lower left corner peripheral block, the upper right corner peripheral block, and the upper left corner.
  • the specific scanning order may include the upper peripheral block, the left peripheral block, the upper right corner peripheral block, and the lower left corner peripheral block. The order of blocks around the upper left corner may be derived.
  • the specific scanning order may include the left peripheral block and the upper peripheral block, the upper right corner peripheral block and the lower left corner peripheral block, and the upper left corner. It can be derived in the order of neighboring blocks.
  • the decoding apparatus may determine whether the left neighboring block and the upper neighboring block of the current block are an affine neighboring block, and the left neighboring block and the upper neighboring block are not the affine neighboring block.
  • the decoding apparatus may determine whether the upper right corner peripheral block and the lower left corner peripheral block of the current block are the affine peripheral blocks, and the upper right corner peripheral block and the lower left corner peripheral block are If it is not an affine neighboring block, the encoding device / decoding device may determine whether the upper left corner neighboring block of the current block is an affine neighboring block.
  • the neighboring blocks may include a left peripheral block 1, a left peripheral block 2, an upper peripheral block 1, an upper peripheral block 2, a right upper corner peripheral block, a lower left corner peripheral block, and an upper left corner peripheral block of the current block.
  • the left peripheral block 1 is a left peripheral block located at the lowermost side among the blocks adjacent to the left boundary of the current block
  • the left peripheral block 2 is the uppermost side of the blocks adjacent to the left boundary of the current block
  • the upper peripheral block 1 is the upper peripheral block located at the rightmost of the blocks adjacent to the upper boundary of the current block
  • the upper peripheral block 2 is adjacent to the upper boundary of the current block. It may be an upper peripheral block located on the leftmost side of the blocks.
  • the specific scanning order is the left peripheral block 1, the left peripheral block 2, the upper peripheral block 1, the upper peripheral block 2, the upper right corner peripheral block, the lower left corner peripheral block, the upper left corner It can be derived in the order of neighboring blocks.
  • the specific scanning order may include the left peripheral block 1, the upper peripheral block 1, the left peripheral block 2, the upper peripheral block 2, the upper right corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral.
  • the specific scanning sequence may include the left peripheral block 1, the upper peripheral block 1, the upper peripheral block 2, the left peripheral block 2, the upper right corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral.
  • the specific scanning order may be derived based on the width and height of the current block.
  • the neighboring blocks may be derived based on the width and height of the current block.
  • the neighboring blocks are left peripheral block 1, upper peripheral block 1, upper right corner peripheral block, lower left corner peripheral block and upper left corner peripheral block of the current block.
  • the peripheral blocks are the left peripheral block 1, the left peripheral block 2, the upper peripheral block 1, the upper right corner peripheral block, the It may include a lower left corner peripheral block and the upper left corner peripheral block
  • the peripheral blocks are the left peripheral block 1, the upper peripheral block 1, the upper side of the current block A peripheral block 2, the upper right corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral block may be included.
  • the left peripheral block 1 is a left peripheral block located at the lowermost side among the blocks adjacent to the left boundary of the current block, and the left peripheral block 2 is the uppermost side of the blocks adjacent to the left boundary of the current block.
  • the upper peripheral block 1 is the upper peripheral block located at the rightmost of the blocks adjacent to the upper boundary of the current block, and the upper peripheral block 2 is adjacent to the upper boundary of the current block. It may be an upper peripheral block located on the leftmost side of the blocks.
  • the scanning order may be derived based on the width and height of the current block.
  • the specific scanning order is the left peripheral block 1, the left peripheral block 2, the upper peripheral block 1, the upper right corner peripheral block, the lower left corner peripheral Block, the upper left corner peripheral block order
  • the specific scanning order is the left peripheral block 1, the upper peripheral block 1, the upper peripheral block 2, the Blocks around the upper right corner, blocks around the lower left corner, and blocks around the upper left corner may be derived.
  • the specific scanning order may include the left peripheral block 1, the left peripheral block 2, the upper peripheral block 1, the upper right corner peripheral block, and the lower left side.
  • the specific scanning order is the upper peripheral block 1, the upper peripheral block 2, the left peripheral block 1
  • the upper left corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral block may be derived in the order.
  • the specific scanning order may include the left peripheral block 1, the upper peripheral block 1, the left peripheral block 2, the upper right corner peripheral block, and the lower left side.
  • the specific scanning order is the upper peripheral block 1, the upper peripheral block 2, the left peripheral block 1
  • the upper left corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral block may be derived in the order.
  • the specific scanning order may include the left peripheral block 1, the upper peripheral block 1, the left peripheral block 2, the upper right corner peripheral block, and the lower left side.
  • the specific scanning order is the upper peripheral block 1, the left peripheral block 1, the upper peripheral block 2, and so on.
  • the upper left corner peripheral block, the lower left corner peripheral block, and the upper left corner peripheral block may be derived in the order.
  • the decoding apparatus scans the neighboring blocks in the scanning order to derive at least one affine merge candidate block (S2210).
  • the decoding apparatus may detect at least one affine neighboring block among the neighboring blocks in the scanning order.
  • the decoding apparatus may determine whether the neighboring blocks are affine neighboring blocks in the specific scanning order.
  • the affine neighboring block may be a subblock derived based on motion vectors of CPs or a neighboring block decoded based on a motion vector of a sample unit.
  • the decoding apparatus when there are a plurality of the neighboring blocks of the affine, the decoding apparatus replaces the neighboring blocks of the first order in the first scanning merge candidate block and the specific scanning order among the affine neighboring blocks.
  • the neighboring blocks of the second order may be derived as the second candidate merge candidate block.
  • the decoding apparatus may derive motion vectors of CPs of each of the affine neighboring blocks, and the same as the affine neighboring blocks based on the motion vectors of the CPs. It can be determined. For example, whether the motion vectors of the CPs of the neighboring blocks of the first affine and the motion vectors of the CPs of the neighboring blocks of the second affine are equal may be determined based on Equation 6, Equation 7, or Equation 9 above. Can be.
  • the decoding apparatus may be configured to determine a difference between an x component of a motion vector of CP0 of a neighboring block of the first affine and a x component of a motion vector of CP0 of the second block of the second affine, and the first affine.
  • the difference between the y component of the motion vector for the CP0 of the neighboring block and the y component of the motion vector for the CP0 of the second affine neighboring block, the x of the motion vector for CP1 of the first affine neighboring block The difference between the component and the x component of the motion vector for CP1 of the second affine neighboring block, the y component of the motion vector for the CP1 of the first affine neighboring block and the CP1 of the second affine neighboring block
  • the difference between the y components of the motion vector for may be derived to determine whether the CPMVs are the same. For example, when the differences are smaller than a specific value, it may be determined that the CPMVs of the first and second affine blocks are the same.
  • An affine neighboring block having a later order in the specific scanning order may not be derived as the first affine merge candidate block or the second affine merge candidate block.
  • the decoding apparatus derives the motion vectors of the CPs for the current block based on the motion vectors of the CPs for the affixed merge candidate block (S2220).
  • the decoding apparatus may receive an affine merge index, and to the affine merge candidate block indicated by the affine merge index.
  • the motion vectors of the CPs for the current block may be derived based on the motion vectors of the CPs.
  • the affinity merge index may indicate one of the first merge merge candidate blocks and the second merge merge candidate block.
  • the initial value of the context model for the affinity merge index may be derived as one of 149 to 153.
  • the decoding apparatus may derive control points (CPs) for the current block. Two CPs may be used or three CPs may be used.
  • the number of CPs may be two.
  • the coordinate of the top-left sample position of the current block is (0, 0)
  • the height of the current block is h
  • the width is w
  • the coordinate of CP0 among the CPs is (0, 0).
  • the coordinate of CP1 may be (w, 0).
  • the number of CPs may be three.
  • the coordinate of the upper left sample position of the current block is (0, 0)
  • the height of the current block is h
  • the width is w
  • the coordinate of CP0 among the CPs is (0, 0)
  • the coordinate of CP1 Is (w, 0) and the coordinate of CP2 may be (0, h).
  • the motion vectors for the CPs may be derived based on the motion vectors for the CPs of the candidate merge block for the current block. Specifically, the decoding apparatus scales the motion vectors for the CPs for the affixed merge candidate block by a size ratio between the current block and the affine merge candidate block to increase the motion vectors for the CPs for the current block. Can be derived.
  • the decoding apparatus derives a motion vector of a sub block or a sample unit in the current block based on the motion vectors of the CPs (S2230).
  • the decoding apparatus may derive the motion vector of the sub-block unit or the sample unit in the current block according to the affine motion model according to the present invention, and thereby perform more accurate inter prediction.
  • the motion vector of the sub block or the sample unit in the current block may be derived based on Equation 3 described above.
  • v x and v y may be calculated based on Equation 3, wherein v x and v y represent x components and y components of a motion vector for any (x, y) coordinates in the current block. As described above.
  • the motion vector of the sub block or the sample unit in the current block may be derived based on Equation 1 described above.
  • the sub block may have a uniform size. That is, the sub block may have an n ⁇ n size.
  • n may be a positive integer or a power of 2.
  • n may be 4.
  • a motion vector corresponding to the upper left sample position coordinate of the sub block may be used as the motion vector for the sub block.
  • a motion vector corresponding to the center right lower sample position of the subblock may be used as the motion vector for the subblock.
  • the center lower right sample position may indicate a sample position located on the lower right side among four samples positioned at the center of the sub block as described above.
  • the decoding apparatus may receive an affine flag.
  • the decoding apparatus may derive the motion vector of the sub block or the sample unit in the current block based on the motion vectors of the CPs, and the value of the affine flag. If 0, the decoding apparatus may not derive the motion vector of the sub block or the sample unit in the current block.
  • the affine flag may indicate whether the motion vector of the sub-block or the sample unit in the current block is derived based on the motion vectors of the CPs. That is, the affine flag may indicate whether or not affine prediction performed based on the affine motion model is performed.
  • the decoding apparatus derives a prediction sample (or a prediction sample array) for the current block based on the subvector or the motion vector in the sample unit (S2240).
  • the decoding apparatus derives a reference picture based on the reference picture index of the current block, derives the reference region indicated by the motion vector in the sample unit or the sub-block unit on the reference picture, and reconstructs in the reference region.
  • a sample can be used as a prediction sample for the current block.
  • the reference picture index of the current block may be derived based on the reference picture index of the affine merge candidate block.
  • the decoding apparatus generates a reconstructed sample based on the prediction sample (S2250).
  • 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.
  • the decoding apparatus may obtain prediction information about the current block through the bitstream.
  • the decoding apparatus may receive the prediction information.
  • the prediction information may include the Affine flag.
  • the affine flag may indicate whether the motion vector of the sub-block or the sample unit in the current block is derived based on the motion vectors of the CPs. That is, the affine flag may indicate whether or not affine prediction performed based on the affine motion model is performed. Meanwhile, the affine flag may be signaled only when there is an affine neighboring block among the neighboring blocks.
  • the prediction information may include the affinity merge index.
  • the affine merge index may be signaled only when a plurality of affine merge candidate blocks, for example, the first affine merge candidate block and the second affine merge candidate block are derived.
  • the affinity merge index may indicate one of the first merge merge candidate blocks and the second merge merge candidate block.
  • the initial value of the context model for the affinity merge index may be derived as one of 149 to 153.
  • 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.
  • the decoding apparatus may receive information about the residual for the target 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 target 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.
  • 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.
  • the neighboring blocks for deriving the affine merge candidate block may be derived in consideration of the size of the current block, and thus, the prediction accuracy and the efficiency may be improved, and the overall coding efficiency may be improved.
  • the scanning order for neighboring blocks may be derived in consideration of the size of the current block, and thus, prediction accuracy and efficiency may be improved, and overall coding efficiency may be improved.
  • a plurality of affine merge candidate blocks for the current block may be derived, thereby improving prediction accuracy and efficiency and improving overall coding efficiency.
  • the number of affine merge candidate blocks derived in consideration of the size of the current block can be adaptively determined, thereby improving prediction accuracy and efficiency and improving overall coding efficiency.
  • 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.

Landscapes

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

Abstract

La présente invention concerne un procédé de décodage d'une vidéo, réalisé par un appareil de décodage. Ledit procédé comprend les étapes consistant à : déduire des blocs voisins d'un bloc actuel et d'un ordre de balayage ; déduire au moins un bloc candidat de fusion affine par balayage des blocs voisins dans l'ordre de balayage ; déduire des vecteurs de mouvement de points de contrôle (CP) pour le bloc actuel sur la base des vecteurs de mouvement des CP pour le bloc candidat de fusion affine ; déduire un vecteur de mouvement d'un sous-bloc ou d'une unité d'échantillon dans le bloc actuel sur la base des vecteurs de mouvement des CP ; déduire un échantillon de prédiction pour le bloc actuel sur la base du vecteur de mouvement de sous-bloc ou de l'unité d'échantillon ; et générer un échantillon reconstruit sur la base de l'échantillon de prédiction.
PCT/KR2018/006536 2017-06-09 2018-06-08 Procédé et appareil de décodage de vidéo selon une prédiction affine dans un système de codage de vidéo WO2018226066A1 (fr)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US201762517170P 2017-06-09 2017-06-09
US62/517,170 2017-06-09
US201762541085P 2017-08-03 2017-08-03
US62/541,085 2017-08-03

Publications (1)

Publication Number Publication Date
WO2018226066A1 true WO2018226066A1 (fr) 2018-12-13

Family

ID=64567227

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2018/006536 WO2018226066A1 (fr) 2017-06-09 2018-06-08 Procédé et appareil de décodage de vidéo selon une prédiction affine dans un système de codage de vidéo

Country Status (1)

Country Link
WO (1) WO2018226066A1 (fr)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355961A (zh) * 2018-12-24 2020-06-30 华为技术有限公司 一种帧间预测的方法和装置
WO2020138967A1 (fr) * 2018-12-26 2020-07-02 주식회사 엑스리스 Procédé d'encodage/de décodage de signal d'image et dispositif pour cela
WO2020141879A1 (fr) * 2019-01-02 2020-07-09 엘지전자 주식회사 Procédé et dispositif de décodage de vidéo basé sur une prédiction de mouvement affine au moyen d'un candidat de fusion temporelle basé sur un sous-bloc dans un système de codage de vidéo
CN111698515A (zh) * 2019-03-14 2020-09-22 华为技术有限公司 帧间预测的方法及相关装置
WO2020263067A1 (fr) * 2019-06-26 2020-12-30 삼성전자주식회사 Procédé de codage vidéo pour effectuer une prédiction basée sur un modèle affine compte tenu d'un ordre de codage, dispositif associé et procédé de décodage vidéo permettant de réaliser une prédiction basée sur un modèle affine compte tenu de l'ordre de décodage, et dispositif associé
CN113273187A (zh) * 2019-01-10 2021-08-17 北京字节跳动网络技术有限公司 基于仿射的具有运动矢量差(MVD)的Merge
CN113383545A (zh) * 2019-01-28 2021-09-10 腾讯美国有限责任公司 视频编解码的方法和装置
CN114342375A (zh) * 2019-07-05 2022-04-12 Lg电子株式会社 用于推导双向预测的权重索引的图像编码/解码方法和装置以及发送比特流的方法
CN114342376A (zh) * 2019-07-05 2022-04-12 Lg电子株式会社 用于推导合并候选的双向预测的权重索引的视频编码/解码方法和装置以及发送比特流的方法
CN114375573A (zh) * 2019-06-24 2022-04-19 Lg电子株式会社 使用合并候选推导预测样本的图像解码方法及其装置
CN114631318A (zh) * 2019-06-14 2022-06-14 Lg电子株式会社 应用双向预测时推导用于加权平均的权重索引信息的图像解码方法和设备
CN113615192B (zh) * 2019-03-15 2024-03-19 腾讯美国有限责任公司 视频解码的方法、装置及存储介质
US12034917B2 (en) 2023-03-27 2024-07-09 Lg Electronics Inc. Affine motion prediction-based video decoding method and device using subblock-based temporal merge candidate in video coding system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140024954A (ko) * 2011-06-20 2014-03-03 퀄컴 인코포레이티드 일원화된 병합 모드 및 적응적 모션 벡터 예측 모드 후보 선택
WO2016008408A1 (fr) * 2014-07-18 2016-01-21 Mediatek Singapore Pte. Ltd. Procédé de dérivation de vecteur de mouvement pour un codage vidéo
US9571833B2 (en) * 2011-11-04 2017-02-14 Nokia Technologies Oy Method for coding and an apparatus
JP2017085448A (ja) * 2015-10-30 2017-05-18 Nttエレクトロニクス株式会社 動画像符号化装置及び動画像符号化方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140024954A (ko) * 2011-06-20 2014-03-03 퀄컴 인코포레이티드 일원화된 병합 모드 및 적응적 모션 벡터 예측 모드 후보 선택
US9571833B2 (en) * 2011-11-04 2017-02-14 Nokia Technologies Oy Method for coding and an apparatus
WO2016008408A1 (fr) * 2014-07-18 2016-01-21 Mediatek Singapore Pte. Ltd. Procédé de dérivation de vecteur de mouvement pour un codage vidéo
JP2017085448A (ja) * 2015-10-30 2017-05-18 Nttエレクトロニクス株式会社 動画像符号化装置及び動画像符号化方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHEN, JIANLE ET AL.: "Algorithm Description of Joint Exploration Test Model 6 (JEM 6", JVET-F1001-V2, JOINT VIDEO EXPLORATION TEAM (JVET) OF ITU-T SG 16 WP3 AND ISO/IEC JTC 1/SC 29/WG 11, 31 May 2017 (2017-05-31), Hobart, AU, pages 1 - 44 *

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111355961A (zh) * 2018-12-24 2020-06-30 华为技术有限公司 一种帧间预测的方法和装置
CN111355961B (zh) * 2018-12-24 2023-11-03 华为技术有限公司 一种帧间预测的方法和装置
US11706444B2 (en) 2018-12-24 2023-07-18 Huawei Technologies Co., Ltd. Inter prediction method and apparatus
CN112237003A (zh) * 2018-12-26 2021-01-15 株式会社 Xris 用于对图像信号编码/解码的方法及其装置
WO2020138967A1 (fr) * 2018-12-26 2020-07-02 주식회사 엑스리스 Procédé d'encodage/de décodage de signal d'image et dispositif pour cela
CN112237003B (zh) * 2018-12-26 2024-05-31 苹果公司 用于对图像信号编码/解码的方法及其装置
US11463723B2 (en) 2018-12-26 2022-10-04 Apple Inc. Method for encoding/decoding image signal and device therefor
WO2020141879A1 (fr) * 2019-01-02 2020-07-09 엘지전자 주식회사 Procédé et dispositif de décodage de vidéo basé sur une prédiction de mouvement affine au moyen d'un candidat de fusion temporelle basé sur un sous-bloc dans un système de codage de vidéo
US11627310B2 (en) 2019-01-02 2023-04-11 Lg Electronics Inc. Affine motion prediction-based video decoding method and device using subblock-based temporal merge candidate in video coding system
CN113273187A (zh) * 2019-01-10 2021-08-17 北京字节跳动网络技术有限公司 基于仿射的具有运动矢量差(MVD)的Merge
US12010321B2 (en) 2019-01-10 2024-06-11 Beijing Bytedance Network Technology Co., Ltd Affine based merge with MVD
CN113383545B (zh) * 2019-01-28 2023-12-22 腾讯美国有限责任公司 视频编解码的方法和装置
CN113383545A (zh) * 2019-01-28 2021-09-10 腾讯美国有限责任公司 视频编解码的方法和装置
CN111698515B (zh) * 2019-03-14 2023-02-14 华为技术有限公司 帧间预测的方法及相关装置
CN111698515A (zh) * 2019-03-14 2020-09-22 华为技术有限公司 帧间预测的方法及相关装置
CN113615192B (zh) * 2019-03-15 2024-03-19 腾讯美国有限责任公司 视频解码的方法、装置及存储介质
CN114631318A (zh) * 2019-06-14 2022-06-14 Lg电子株式会社 应用双向预测时推导用于加权平均的权重索引信息的图像解码方法和设备
CN114375573A (zh) * 2019-06-24 2022-04-19 Lg电子株式会社 使用合并候选推导预测样本的图像解码方法及其装置
US11750827B2 (en) 2019-06-26 2023-09-05 Samsung Electronics Co., Ltd. Video encoding method for performing affine model-based prediction by considering encoding order, and device therefor, and video decoding method for performing affine model-based prediction by considering decoding order, and device therefor
WO2020263067A1 (fr) * 2019-06-26 2020-12-30 삼성전자주식회사 Procédé de codage vidéo pour effectuer une prédiction basée sur un modèle affine compte tenu d'un ordre de codage, dispositif associé et procédé de décodage vidéo permettant de réaliser une prédiction basée sur un modèle affine compte tenu de l'ordre de décodage, et dispositif associé
CN114342376A (zh) * 2019-07-05 2022-04-12 Lg电子株式会社 用于推导合并候选的双向预测的权重索引的视频编码/解码方法和装置以及发送比特流的方法
CN114342375A (zh) * 2019-07-05 2022-04-12 Lg电子株式会社 用于推导双向预测的权重索引的图像编码/解码方法和装置以及发送比特流的方法
US12034917B2 (en) 2023-03-27 2024-07-09 Lg Electronics Inc. Affine motion prediction-based video decoding method and device using subblock-based temporal merge candidate in video coding system

Similar Documents

Publication Publication Date Title
WO2018226066A1 (fr) Procédé et appareil de décodage de vidéo selon une prédiction affine dans un système de codage de vidéo
WO2019107916A1 (fr) Appareil et procédé de décodage d'image basés sur une inter-prédiction dans un système de codage d'image
WO2017026681A1 (fr) Procédé et dispositif d'interprédiction dans un système de codage vidéo
WO2018066867A1 (fr) Procédé et appareil de codage et décodage d'image, et support d'enregistrement pour la mémorisation de flux binaire
WO2020076143A1 (fr) Procédé et appareil de traitement de signal vidéo utilisant la prédiction à hypothèses multiples
WO2019164031A1 (fr) Procédé et appareil de décodage d'image en fonction d'une structure de division de bloc dans un système de codage d'image
WO2017204532A1 (fr) Procédé de codage/décodage d'images et support d'enregistrement correspondant
WO2018030773A1 (fr) Procédé et appareil destinés au codage/décodage d'image
WO2018026118A1 (fr) Procédé de codage/décodage d'images
WO2018030599A1 (fr) Procédé de traitement d'image fondé sur un mode de prédiction intra et dispositif associé
WO2018097607A1 (fr) Procédé et dispositif de codage/décodage d'image et support d'enregistrement stockant un flux binaire
WO2018124843A1 (fr) Procédé de codage/décodage d'image, appareil et support d'enregistrement pour stocker un train de bits
WO2017086748A1 (fr) Procédé et dispositif pour chiffrer/déchiffrer une image en utilisant une image modifiée géométriquement
WO2017086747A1 (fr) Procédé et dispositif pour coder/décoder une image à l'aide d'une image géométriquement modifiée
WO2018124333A1 (fr) Procédé de traitement d'image basé sur un mode de prédiction intra et appareil s'y rapportant
WO2020055107A1 (fr) Procédé et appareil de décodage d'image basé sur une prédiction de mouvement affine à l'aide d'une liste de candidats mvp affine dans un système de codage d'image
WO2020085800A1 (fr) Procédé et dispositif de traitement de signal vidéo à l'aide d'une compensation de mouvement basée sur un sous-bloc
WO2019221465A1 (fr) Procédé/dispositif de décodage d'image, procédé/dispositif de codage d'image et support d'enregistrement dans lequel un train de bits est stocké
WO2020055161A1 (fr) Procédé et appareil de décodage d'image basés sur une prédiction de mouvement dans une unité de sous-blocs dans un système de codage d'image
WO2016190627A1 (fr) Procédé et dispositif pour traiter un signal vidéo
WO2019190199A1 (fr) Procédé et dispositif de traitement de signal vidéo
WO2020013569A1 (fr) Procédé et appareil de décodage d'image sur la base d'une prédiction de mouvement affine dans un système de codage d'image
WO2020096427A1 (fr) Procédé de codage/décodage de signal d'image et appareil associé
WO2021172914A1 (fr) Procédé de décodage d'image pour un codage résiduel et dispositif associé
WO2020032609A1 (fr) Procédé et dispositif de décodage d'image basé sur une prédiction de mouvement affine à l'aide d'une liste de candidats de fusion affine dans un système de codage d'image

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

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

Country of ref document: EP

Kind code of ref document: A1