Video encoding and decoding method, storage medium, and transmission method of image data

By constructing a candidate list of affine motion vector prediction sub-candidates and using inherited and constructed affine MVP candidates, the motion vector of the control point in the current block is derived, which solves the problem of low efficiency in high-resolution, high-quality image and video coding and achieves more efficient video coding and storage.

CN116156188BActive Publication Date: 2026-02-13LG ELECTRONICS INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310166629.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-09-10
Filing Date
2019-09-10
Publication Date
2026-02-13
Estimated Expiration
2039-09-10

AI Technical Summary

Technical Problem

Existing technologies have low coding efficiency in video encoding of high-resolution, high-quality images, leading to increased transmission and storage costs.

Method used

By constructing a candidate list of affine motion vector predictors (MVPs), and using the inherited and constructed affine MVP candidates, the control point motion vector predictor (CPMVP) of the current block is derived, and the control point motion vector (CPMV) of the current block is derived based on CPMVP and CPMVD, so as to improve the efficiency of video coding.

Benefits of technology

It improves the overall compression efficiency of video encoding, reduces the complexity and hardware cost of deriving the affine MVP candidate list, and reduces storage requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116156188B_ABST
    Figure CN116156188B_ABST
Patent Text Reader

Abstract

The present application relates to a video encoding and decoding method, a storage medium and a method of transmitting image data. A video decoding method performed by a decoding device according to the present document comprises the following steps: obtaining motion prediction information of a current block from a bitstream; constructing an affine motion vector predictor MVP candidate list of the current block; deriving a control point motion vector predictor CPMVP of a control point CP of the current block based on the affine MVP candidate list; deriving a control point motion vector difference CPMVD of the CP of the current block based on the motion prediction information; deriving a control point motion vector CPMV of the CP of the current block based on the CPMVP and the CPMVD; deriving a prediction sample of the current block based on the CPMV; and generating a reconstructed picture of the current block based on the derived prediction sample.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the original application No. 201980006206.6 (International Application No. PCT / KR2019 / 011733, filed on September 10, 2019, entitled "Affine motion prediction based image decoding method and apparatus using affine MVP candidate list in image coding system"). TECHNICAL FIELD TECHNICAL FIELD

[0002] The disclosure relates to a video coding technology, and more particularly, to an affine motion prediction based video decoding method and apparatus in a video coding system. BACKGROUND

[0003] In various fields, the demand for high-resolution, high-quality images such as HD (High Definition) images and UHD (Ultra High Definition) images is increasing. Because image data has high resolution and high quality, the amount of information or bits to be transmitted increases relative to conventional image data. Therefore, when transmitting image data using a medium such as a conventional wired / wireless broadband line or storing image data using an existing storage medium, the transmission cost and storage cost thereof increase.

[0004] Therefore, there is a need for an efficient image compression technology for efficiently transmitting, storing, and reproducing information of a high-resolution high-quality image. SUMMARY

[0005] TECHNICAL PROBLEM

[0006] The technical object of the disclosure is to provide a method and apparatus for improving video coding efficiency.

[0007] Another technical object of the disclosure is to provide an affine motion prediction based video decoding method and apparatus that constructs an affine MVP candidate list of a current block by constructing an affine MVP candidate based on a neighboring block only when all candidate motion vectors of the CP are available and performs prediction of the current block based on the constructed affine MVP candidate list.

[0008] Still another technical object of the disclosure is to provide an affine motion prediction based video decoding method and apparatus that derives an affine MVP candidate by using a candidate motion vector derived from a process for deriving an increased affine MVP candidate as a constructed affine MVP candidate when the number of available inherited affine MVP candidates and constructed affine MVP candidates (i.e., the number of candidates of the MVP candidate list) is less than a maximum number and performs prediction of a current block based on the constructed affine MVP candidate list.

[0009] TECHNICAL SOLUTION

[0010] According to one embodiment of the present disclosure, a video decoding method performed by a decoding device is provided. The method includes obtaining motion prediction information of a current block from a bitstream; constructing an affine motion vector predictor (MVP) candidate list of the current block; deriving a control point motion vector predictor (CPMVP) of a control point (CP) of the current block based on the affine MVP candidate list; deriving a control point motion vector difference (CPMVD) of the CP of the current block based on the motion prediction information; deriving a control point motion vector (CPMV) of the CP of the current block based on the CPMVP and the CPMVD; deriving a prediction sample of the current block based on the CPMV; and generating a reconstructed picture of the current block based on the derived prediction sample, wherein the step of constructing the affine MVP candidate list includes: checking whether an inherited affine MVP candidate of the current block is available, wherein the inherited affine MVP candidate is derived when the inherited affine MVP candidate is available; checking whether a constructed affine MVP candidate of the current block is available, wherein the constructed affine MVP candidate is derived when the constructed affine MVP candidate is available, and the constructed affine MVP candidate includes a candidate motion vector of CP0 of the current block, a candidate motion vector of CP1 of the current block, and a candidate motion vector of CP2 of the current block; deriving a first affine MVP candidate when a number of the derived affine MVP candidates is less than 2 and a motion vector of CP0 is available, wherein the first affine MVP candidate is an affine MVP candidate including the motion vector of CP0 as a candidate motion vector of the CP; deriving a second affine MVP candidate when the number of the derived affine MVP candidates is less than 2 and a motion vector of CP1 is available, wherein the second affine MVP candidate is an affine MVP candidate including the motion vector of CP1 as the candidate motion vector of the CP; deriving a third affine MVP candidate when the number of the derived affine MVP candidates is less than 2 and a motion vector of CP2 is available, wherein the third affine MVP candidate is an affine MVP candidate including the motion vector of CP2 as the candidate motion vector of the CP; deriving a fourth affine MVP candidate when the number of the derived affine MVP candidates is less than 2, the fourth affine MVP candidate including a temporal MVP derived based on a temporal neighboring block of the current block as the candidate motion vector of the CP; and deriving a fifth affine MVP candidate when the number of the derived affine MVP candidates is less than 2, the fifth affine MVP candidate including a zero motion vector as the candidate motion vector of the CP.

[0011] According to another embodiment of the disclosure, a decoding device performing video coding is provided. The decoding device includes an entropy decoder obtaining motion prediction information of a current block; a predictor constructing an affine motion vector predictor (MVP) candidate list of the current block, deriving a control point motion vector predictor (CPMVP) of a control point (CP) of the current block based on the affine MVP candidate list, deriving a control point motion vector difference (CPMVD) of the CP of the current block based on the motion prediction information; deriving a control point motion vector (CPMV) of the CP of the current block based on the CPMVD; deriving a prediction sample of the current block based on the CPMV; and an adder generating a reconstructed picture of the current block based on the derived prediction sample, wherein the affine MVP candidate list is constructed based on: checking whether an inherited affine MVP candidate of the current block is available, wherein the inherited affine MVP candidate is derived when the inherited affine MVP candidate is available; checking whether a constructed affine MVP candidate of the current block is available, wherein the constructed affine MVP candidate is derived when the constructed affine MVP candidate is available, and the constructed affine MVP candidate includes a candidate motion vector of CP0 of the current block, a candidate motion vector of CP1 of the current block, and a candidate motion vector of CP2 of the current block; deriving a first affine MVP candidate when a number of the derived affine MVP candidates is less than 2 and a motion vector of CP0 is available, wherein the first affine MVP candidate is an affine MVP candidate including the motion vector of CP0 as a candidate motion vector of the CP; deriving a second affine MVP candidate when the number of the derived affine MVP candidates is less than 2 and a motion vector of CP1 is available, wherein the second affine MVP candidate is an affine MVP candidate including the motion vector of CP1 as the candidate motion vector of the CP; deriving a third affine MVP candidate when the number of the derived affine MVP candidates is less than 2 and a motion vector of CP2 is available, wherein the third affine MVP candidate is an affine MVP candidate including the motion vector of CP2 as the candidate motion vector of the CP; deriving a fourth affine MVP candidate when the number of the derived affine MVP candidates is less than 2, the fourth affine MVP candidate including a temporal MVP derived based on a temporal neighboring block of the current block as the candidate motion vector of the CP; and deriving a fifth affine MVP candidate when the number of the derived affine MVP candidates is less than 2, the fifth affine MVP candidate including a zero motion vector as the candidate motion vector of the CP.

[0012] According to yet another embodiment of the disclosure, a video encoding method performed by an encoding device is provided. The method includes constructing an affine motion vector predictor (MVP) candidate list for a current block, deriving a control point motion vector predictor (CPMVP) for a control point (CP) of the current block based on the affine MVP candidate list, deriving a CPMV for the CP of the current block, deriving a control point motion vector difference (CPMVD) for the CP of the current block based on the CPMVP and the CPMV, and encoding motion prediction information including information on the CPMVD, wherein the constructing of the affine MVP candidate list includes checking whether an inherited affine MVP candidate for the current block is available, deriving the inherited affine MVP candidate when the inherited affine MVP candidate is available, checking whether a constructed affine MVP candidate for the current block is available, deriving the constructed affine MVP candidate when the constructed affine MVP candidate is available, and the constructed affine MVP candidate includes a candidate motion vector for a CP0 of the current block, a candidate motion vector for a CP1 of the current block, and a candidate motion vector for a CP2 of the current block, deriving a first affine MVP candidate when a number of the derived affine MVP candidates is less than 2 and a motion vector for the CP0 is available, wherein the first affine MVP candidate is an affine MVP candidate including the motion vector for the CP0 as a candidate motion vector for the CP, deriving a second affine MVP candidate when the number of the derived affine MVP candidates is less than 2 and a motion vector for the CP1 is available, wherein the second affine MVP candidate is an affine MVP candidate including the motion vector for the CP1 as a candidate motion vector for the CP, deriving a third affine MVP candidate when the number of the derived affine MVP candidates is less than 2 and a motion vector for the CP2 is available, wherein the third affine MVP candidate is an affine MVP candidate including the motion vector for the CP2 as a candidate motion vector for the CP, deriving a fourth affine MVP candidate when the number of the derived affine MVP candidates is less than 2, the fourth affine MVP candidate including a temporal MVP derived based on a temporal neighboring block of the current block as a candidate motion vector for the CP, and deriving a fifth affine MVP candidate when the number of the derived affine MVP candidates is less than 2, the fifth affine MVP candidate including a zero motion vector as a candidate motion vector for the CP.

[0013] According to still another embodiment of the present disclosure, a video encoding device is provided. The encoding device includes a predictor configured to construct an affine motion vector predictor (MVP) candidate list for a current block, derive a control point motion vector predictor (CPMVP) for a control point (CP) of the current block, and derive a CP motion vector (CMV) for the CP of the current block; a subtractor configured to derive a CP motion vector difference (CPMVD) for the CP of the current block based on the CPMVP and the CP motion vector (CMV); and an entropy encoder configured to encode motion prediction information including information on the CPMVD, wherein the affine MVP candidate list is constructed based on checking whether an inherited affine MVP candidate for the current block is available, deriving the inherited affine MVP candidate when the inherited affine MVP candidate is available, checking whether a constructed affine MVP candidate for the current block is available, deriving the constructed affine MVP candidate when the constructed affine MVP candidate is available, and the constructed affine MVP candidate including a candidate motion vector for a CP0 of the current block, a candidate motion vector for a CP1 of the current block, and a candidate motion vector for a CP2 of the current block, deriving a first affine MVP candidate when a number of derived affine MVP candidates is less than 2 and a motion vector for the CP0 is available, wherein the first affine MVP candidate is an affine MVP candidate including the motion vector for the CP0 as a candidate motion vector for the CP, deriving a second affine MVP candidate when the number of derived affine MVP candidates is less than 2 and a motion vector for the CP1 is available, wherein the second affine MVP candidate is an affine MVP candidate including the motion vector for the CP1 as a candidate motion vector for the CP, deriving a third affine MVP candidate when the number of derived affine MVP candidates is less than 2 and a motion vector for the CP2 is available, wherein the third affine MVP candidate is an affine MVP candidate including the motion vector for the CP2 as a candidate motion vector for the CP, deriving a fourth affine MVP candidate when the number of derived affine MVP candidates is less than 2, wherein the fourth affine MVP candidate includes a temporal MVP derived based on a temporal neighboring block of the current block as a candidate motion vector for the CP, and deriving a fifth affine MVP candidate when the number of derived affine MVP candidates is less than 2, wherein the fifth affine MVP candidate includes a zero motion vector as a candidate motion vector for the CP.

[0014] Advantageous Effects

[0015] According to the present disclosure, the overall image / video compression efficiency can be improved.

[0016] According to the present disclosure, the efficiency of video encoding based on affine motion prediction can be improved.

[0017] According to the disclosure, in deriving the affine MVP candidate list, the constructed affine MVP candidate can be added only when all candidate motion vectors of the CP of the constructed affine MVP candidate are available, thereby reducing the complexity of deriving the constructed affine MVP candidate and constructing the affine MVP candidate list, and improving coding efficiency.

[0018] According to the disclosure, in deriving the affine MVP candidate list, the additional affine MVP candidate can be derived based on the candidate motion vector of the CP derived from the process for deriving the constructed affine MVP candidate, thereby reducing the complexity of constructing the affine MVP candidate list, and improving coding efficiency.

[0019] According to the disclosure, in deriving the inherited affine MVP candidate, the inherited affine MVP candidate can be derived by using the upper neighboring block only when the upper neighboring block is included in the current CTU, thereby reducing the storage amount of the line buffer for affine prediction, and minimizing the hardware cost. BRIEF DESCRIPTION OF DRAWINGS

[0020] Figure 1 An example of a video / image encoding system to which the disclosure can be applied is illustrated.

[0021] Figure 2 is a schematic diagram illustrating a configuration of a video / image encoding apparatus to which an embodiment of the present document can be applied.

[0022] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding apparatus to which an embodiment of the present document can be applied.

[0023] Figure 4 Motion represented by an affine motion model is illustrated.

[0024] Figure 5 An affine motion model using 3 control points of a motion vector is illustrated.

[0025] Figure 6 An affine motion model using 2 control points of a motion vector is illustrated.

[0026] Figure 7 A method of deriving a motion vector on a sub-block basis based on an affine motion model is illustrated.

[0027] Figure 8 is a flowchart illustrating an affine motion prediction method according to one embodiment of the disclosure.

[0028] Figure 9A method for deriving a motion vector predictor (MVP) at a control point is exemplified according to one embodiment of the disclosure.

[0029] Figure 10 A method for deriving a motion vector predictor at a control point is exemplified according to one embodiment of the disclosure.

[0030] Figure 11 An example of affine prediction performed when a neighboring block A is selected as an affine merge candidate is exemplified.

[0031] Figure 12 A neighboring block used for deriving an inherited affine candidate is exemplified.

[0032] Figure 13 A spatial candidate used for constructing an affine candidate is exemplified.

[0033] Figure 14 An example of constructing an affine MVP list is exemplified.

[0034] Figure 15 An example of deriving a constructed candidate is exemplified.

[0035] Figure 16 An example of deriving a constructed candidate is exemplified.

[0036] Figure 17 A position of a neighboring block scanned for deriving an inherited affine candidate is exemplified.

[0037] Figure 18 An example of deriving a constructed candidate when a four-parameter affine motion model is applied to a current block is exemplified.

[0038] Figure 19 An example of deriving a constructed candidate when a six-parameter affine motion model is applied to a current block is exemplified.

[0039] Figure 20a and Figure 20b An embodiment for deriving an inherited affine candidate is exemplified.

[0040] Figure 21 A video encoding method performed by an encoding device according to the disclosure is exemplified.

[0041] Figure 22 An encoding device performing a video encoding method according to the disclosure is exemplified.

[0042] Figure 23 A video decoding method performed by a decoding device according to the disclosure is exemplified.

[0043] Figure 24A decoding apparatus performing a video decoding method according to the present disclosure is exemplified.

[0044] Figure 25 A content streaming system structure to which an embodiment of the present disclosure is applied is exemplified. DETAILED DESCRIPTION

[0045] The present disclosure can be modified in various forms, and specific embodiments thereof will be described and exemplified in the drawings. However, the embodiments are not intended to limit the present disclosure. The terms used in the following description are used to describe specific embodiments only and are not intended to limit the present disclosure. The singular expression includes the plural expression as long as it is clearly understood in different ways. Terms such as "include" and "have" are intended to indicate that there is a feature, number, step, operation, element, component, or a combination thereof described in the following description, and it should be understood that the possibility of existence or addition of one or more different features, numbers, steps, operations, elements, components, or a combination thereof is not excluded.

[0046] On the other hand, the elements in the drawings described in the present disclosure are independently drawn for the convenience of explaining different specific functions, and do not mean that the elements are embodied by independent hardware or independent software. For example, two or more of the elements can be combined to form a single element, or one element can be divided into a plurality of elements. Embodiments in which the elements are combined and / or divided belong to the present disclosure without departing from the concept of the present disclosure.

[0047] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. In addition, throughout the drawings, like reference numerals are used to refer to like elements, and the same description of the similar elements will be omitted.

[0048] Figure 1 An example of a video / image encoding system to which the present disclosure can be applied is exemplified.

[0049] REFERENCE Figure 1 The video / image encoding system can include a first apparatus (a source apparatus) and a second apparatus (a receiving apparatus). The source apparatus can transmit encoded video / image information or data in the form of a file or a stream to the receiving apparatus via a digital storage medium or a network.

[0050] The source apparatus can include a video source, an encoding apparatus, and a transmitter. The receiving apparatus can include a receiver, a decoding apparatus, and a renderer. The encoding apparatus can be referred to as a video / image encoding apparatus, and the decoding apparatus can be referred to as a video / image decoding apparatus. The transmitter can be included in the encoding apparatus. The receiver can be included in the decoding apparatus. The renderer can include a display, and the display can be configured as a separate apparatus or an external component.

[0051] The video source can acquire a video / image through a process of capturing, synthesizing, or generating a video / image. The video source can include a video / image capturing device and / or a video / image generating device. The video / image capturing device can include, for example, one or more cameras, a video / image archive including previously captured videos / images, etc. The video / image generating device can include, for example, a computer, a tablet, and a smartphone, and can (electronically) generate a video / image. For example, a virtual video / image can be generated through a computer, etc. In this case, the video / image capturing process can be replaced by a process of generating related data.

[0052] The encoding device can encode an input video / image. The encoding device can perform a series of processes such as prediction, transformation, and quantization to achieve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.

[0053] The transmitter can transmit the encoded image / image information or data output in the form of a bitstream to a receiver of a receiving device in the form of a file or a stream through a digital storage medium or a network. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter can include an element for generating a media file through a predetermined file format, and can include an element for transmission through a broadcasting / communication network. The receiver can receive / extract a bitstream and transmit the received bitstream to a decoding device.

[0054] The decoding device can decode a video / image by performing a series of processes such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding device.

[0055] The renderer can render the decoded video / image. The rendered video / image can be displayed through a display.

[0056] This document relates to video / image encoding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the Versatile Video Coding (VVC), EVC (Elementary Video Coding) standard, AOMedia Video 1 (AV1) standard, 2nd generation Audio Video Coding standard (AVS2), or next generation video / image encoding standards (e.g., H.267, or H.268, etc.).

[0057] This document presents various embodiments of video / image encoding, and the embodiments can be performed in combination with each other unless otherwise mentioned.

[0058] In this document, a video can refer to a series of pictures over time. A picture generally refers to a unit representing an image at a specific time region, while a slice / tile is a unit that constitutes a part of a picture in encoding. A slice / tile can include one or more coding tree units (CTUs). A picture can include one or more slices / tiles. A picture can include one or more tile groups. A tile group can include one or more tiles. A brick can represent a rectangular region of CTU rows within a tile in a picture. A tile can be partitioned into multiple bricks, each including one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks can also be referred to as a brick. Brick scanning refers to a specific order of CTUs that partitions a picture in which the CTUs are sequentially ordered in a CTU raster scan of bricks, the bricks within a slice are sequentially arranged in a raster scan of bricks of the slice, and the slices in a picture are sequentially ordered in a raster scan of slices of the picture. A slice is a rectangular region of CTUs within a specific tile column and a specific tile row in a picture. A tile column is a rectangular region of CTUs with a height equal to the height of the picture and a width specified by a syntax element in a picture parameter set. A tile row is a rectangular region of CTUs with a height specified by a syntax element in a picture parameter set and a width equal to the picture width. Slice scanning refers to a specific order of CTUs that partitions a picture in which the CTUs are sequentially ordered in a CTU raster scan of slices, while the slices in a picture are sequentially ordered in a raster scan of slices of the picture. A slice includes an integer number of bricks of a picture that can be uniquely contained in a single NAL unit. A slice can include multiple complete tiles or only a consecutive sequence of complete bricks of one tile. Tile groups and slices can be used interchangeably in this document. For example, a tile group / tile group header can be referred to as a slice / slice header in this document.

[0059] A pixel can represent the smallest unit constituting an image (or a picture). In addition, a "sample" can be used as a term corresponding to a pixel. A sample can generally represent a pixel or a pixel value, and can represent only a pixel / pixel value of a luma component or only a pixel / pixel value of a chroma component.

[0060] A unit can represent a basic unit of image processing. A unit can include at least one of a specific region of a picture and information related to the region. One unit can include one luma block and two chroma (e.g., cb, cr) blocks. In some cases, a unit can be used interchangeably with terms such as a block or a region. In general, an MxN block can include a set (or an array) of M columns and N rows of samples (or sample arrays) or transform coefficients.

[0061] In this document, the terms “ / ” and “,” are to be interpreted as “and / or”. For example, the expression “A / B” can mean “A and / or B”. Also, “A, B” can mean “A and / or B”. Also, “A / B / C” can mean “at least one of A, B, and / or C”. Also, “A / B / C” can mean “at least one of A, B, and / or C”.

[0062] Also, in this document, the term “or” is to be interpreted as “and / or”. For example, the expression “A or B” can include 1) only A, 2) only B, and / or 3) both A and B. In other words, the term “or” in this document is to be interpreted as “additionally or alternatively”.

[0063] Figure 2 is a schematic diagram illustrating a configuration of a video / image encoding apparatus to which embodiments of the present document can be applied. Hereinafter, the video encoding apparatus can include an image encoding apparatus.

[0064] Referring to Figure 2 The encoding apparatus 200 includes an image partitioner 210, a predictor 220, a residual processor 230, and an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 can include an inter-predictor 221 and an intra-predictor 222. The residual processor 230 can include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 can further include a subtractor 231. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the image partitioner 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250, and the filter 260 can be constituted by at least one hardware component (e.g., an encoder chipset or a processor). In addition, the memory 270 can include a decoded picture buffer (DPB) or can be constituted by a digital storage medium. The hardware component can further include the memory 270 as an internal / external component.

[0065] The image partitioner 210 can partition an input image (or picture or frame) input to the encoding apparatus 200 into one or more processors. For example, the processor can be referred to as a coding unit (CU). In this case, the coding unit can be recursively partitioned from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad tree binary tree ternary (QTBTTT) structure. For example, one coding unit can be partitioned into a plurality of coding units deeper in depth based on a quad tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad tree structure can be applied first, and then the binary tree structure and / or the ternary structure can be applied. Alternatively, the binary tree structure can be applied first. An encoding process according to the present document can be performed based on the final coding unit that is no longer partitioned. In this case, the largest coding unit can be used as the final coding unit based on encoding efficiency according to image characteristics, or if necessary, the coding unit can be recursively partitioned into a coding unit deeper in depth and having an optimal size, and the coding unit can be used as the final coding unit. Here, the encoding process can include a process of prediction, transform, and reconstruction, which will be described later. As another example, the processor can also include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit can be separated or partitioned from the final coding unit described above. The prediction unit can be a unit of sample prediction, and the transform unit can be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.

[0066] In some cases, a unit can be used interchangeably with a term such as a block or an area. In general, an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, can represent only a pixel / pixel value of a luminance component, or can represent only a pixel / pixel value of a chrominance component. A sample can be used as a term corresponding to a picture (or image) of pixels or picture elements.

[0067] In the encoding device 200, a prediction signal (prediction block, prediction sample array) output from the inter-predictor 221 or the intra-predictor 222 is subtracted from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array) and the generated residual signal is sent to the transformer 232. In this case, as illustrated, a unit for subtracting a prediction signal (prediction block, prediction sample array) from an input image signal (original block, original sample array) in the encoder 200 can be referred to as a subtractor 231. The predictor can perform prediction on a block to be processed (hereinafter referred to as a current block) and generate a prediction block including predicted samples of the current block. The predictor can determine whether to apply intra-prediction or inter-prediction on a basis of the current block or CU. As described later in the description of each prediction mode, the predictor can generate various information related to prediction, such as prediction mode information, and send the generated information to the entropy encoder 240. The information about prediction can be encoded in the entropy encoder 240 and output in the form of a bitstream.

[0068] The intra-predictor 222 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referred samples can be located in the vicinity of the current block, or can be far away from the current block. In intra-prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes can include, for example, a DC mode and a planar mode. The directional modes can include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the level of detail of the prediction direction. However, this is only an example, and more or less directional prediction modes can be used depending on the settings. The intra-predictor 222 can determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

[0069] The inter predictor 221 can derive a prediction block of a current block based on a reference block (a reference sample array) specified by a motion vector on a reference picture. Here, to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of a block, a sub-block, or a sample based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block can be the same or different. The temporal neighboring block can be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block can be referred to as a collocated picture (colPic). For example, the inter predictor 221 can configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate to use to derive the motion vector and / or the reference picture index of the current block. The inter prediction can be performed based on various prediction modes. For example, in the case of a skip mode and a merge mode, the inter predictor 221 can use the motion information of the neighboring blocks as the motion information of the current block. In the skip mode, unlike the merge mode, a residual signal can not be transmitted. In the case of a motion vector prediction (MVP) mode, the motion vector of the neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling a motion vector difference.

[0070] The predictor 220 can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict one block, but also can simultaneously apply both intra prediction and inter prediction. This can be referred to as combined inter-intra prediction (CIIP). In addition, the predictor can predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode can be used for content image / video encoding of a game or the like, e.g., screen content coding (SCC). The IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC can use at least one of the inter prediction techniques described herein. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, sample values within a picture can be signaled based on information about a palette table and a palette index.

[0071] The prediction signal generated by the predictor (including the inter-predictor 221 and / or the intra-predictor 222) can be used to generate a reconstructed signal or to generate a residual signal. The transformer 232 can generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique can include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional non-linear transform (CNT). Here, the GBT denotes a transform obtained from a graph when relationship information between pixels is represented by a graph. The CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. Also, the transform process can be applied to a square pixel block having the same size, or can be applied to a block having a variable size other than a square.

[0072] The quantizer 233 can quantize the transform coefficients and transmit them to the entropy encoder 240, and the entropy encoder 240 can encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients can be referred to as residual information. The quantizer 233 can rearrange the block-type quantized transform coefficients into a one-dimensional vector form based on a coefficient scan order, and generate information about the quantized transform coefficients based on the one-dimensional vector-form quantized transform coefficients. Information about the transform coefficients can be generated. The entropy encoder 240 can perform various encoding methods such as, for example, exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), and the like. The entropy encoder 240 can encode information (e.g., values of syntax elements, etc.) required for video / image reconstruction, together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer). The video / image information can further include information about various parameter sets such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information can further include general constraint information. In the present document, information and / or syntax elements transmitted / signaled from the encoding apparatus to the decoding apparatus can be included in the video / picture information. The video / image information can be encoded through the above-described encoding process and included in the bitstream. The bitstream can be transmitted through a network, or can be stored in a digital storage medium. The network can include a broadcast network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 240 and / or a storage medium (not shown) that stores the signal can be included as an internal / external element of the encoding apparatus 200, or alternatively, the transmitter can be included in the entropy encoder 240.

[0073] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, a residual signal (a residual block or a residual sample) can be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients using the dequantizer 234 and the inverse transformer 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the inter-predictor 221 or the intra-predictor 222 to generate a reconstructed signal (a reconstructed picture, a reconstructed block, a reconstructed sample array). If a block to be processed has no residual (such as a case where a skip mode is applied), a prediction block can be used as a reconstructed block. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-prediction of a next block to be processed in a current picture, and can be used for inter-prediction of a next picture by filtering as described below.

[0074] Further, during picture encoding and / or reconstruction, luma mapping with chroma scaling (LMCS) can be applied.

[0075] The filter 260 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 270 (specifically, a DPB of the memory 270). The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various information related to filtering, and transmit the generated information to the entropy encoder 240, as described later in descriptions of the various filtering methods. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bitstream.

[0076] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter-predictor 221. When inter-prediction is applied by the encoding apparatus, prediction mismatch between the encoding apparatus 200 and a decoding apparatus can be avoided, and encoding efficiency can be improved.

[0077] The DPB of the memory 270 can store the modified reconstructed picture used as a reference picture in the inter-predictor 221. The memory 270 can store motion information of a block from which motion information in a current picture is derived (or encoded), and / or motion information of a reconstructed block in a picture. The stored motion information can be transmitted to the inter-predictor 221, and used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 can store reconstructed samples of a reconstructed block in a current picture, and can transfer the reconstructed samples to the intra-predictor 222.

[0078] Figure 3 is a schematic diagram illustrating a configuration of a video / image decoding apparatus to which embodiments of the present document can be applied.

[0079] Referring to Figure 3 , the decoding apparatus 300 can include an entropy decoder 310, a residue processor 320, a predictor 330, an adder 340, a filter 350, a memory 360. The predictor 330 can include an inter-predictor 332 and an intra-predictor 331. The residue processor 320 can include a dequantizer 321 and an inverse transformer 322. According to an embodiment, the entropy decoder 310, the residue processor 320, the predictor 330, the adder 340, and the filter 350 can be constituted by hardware components (e.g., a decoder chipset or a processor). In addition, the memory 360 can include a decoded picture buffer (DPB), or can be constituted by a digital storage medium. The hardware components can further include the memory 360 as an internal / external component.

[0080] When a bitstream including video / image information is input, the decoding apparatus 300 can reconstruct an image corresponding to the processing of the video / image information in the encoding apparatus of Figure 2 . For example, the decoding apparatus 300 can derive a unit / block based on block partitioning-related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processor applied in the encoding apparatus. Thus, the decoded processor can be, for example, an encoding unit, and can partition an encoding unit from a coding tree unit or a largest coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the encoding unit. The reconstructed image signal decoded and output by the decoding apparatus 300 can be reproduced by a reproducing apparatus.

[0081] The decoding apparatus 300 can receive a bitstream from Figure 2The signal output from the encoding apparatus can be received and decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse a bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information can further include information on various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information can further include general constraint information. The decoding apparatus can further decode a picture based on the information on the parameter sets and / or the general constraint information. The signaled / received information and / or syntax elements described later herein can be decoded through the decoding process and obtained from the bitstream. For example, the entropy decoder 310 decodes information in the bitstream based on an encoding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs syntax elements and quantized values of transform coefficients of a residual required for image reconstruction. More specifically, the CABAC entropy decoding method can receive bins (bits) corresponding to each syntax element in the bitstream, determine a context model using information of a decoding target syntax element, decoding information of a decoding target block, or a symbol / bin decoded in a previous stage, and arithmetically decode the bins by predicting a probability of occurrence of the bins according to the determined context model, and generate a symbol corresponding to a value of each syntax element. In this case, after the context model is determined, the CABAC entropy decoding method can update the context model by using the decoded information of the symbols / bins for the context model of the next symbol / bin. Information related to prediction among the information decoded by the entropy decoder 310 can be provided to the predictors (inter-predictor 332 and intra-predictor 331), and residual values (that is, quantized transform coefficients and related parameter information) on which entropy decoding is performed in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive a residual signal (a residual block, residual samples, a residual sample array). In addition, information related to filtering among the information decoded by the entropy decoder 310 can be provided to the filter 350. Further, a receiver (not shown) for receiving a signal output from the encoding apparatus can be further configured as an internal / external element of the decoding apparatus 300, or the receiver can be a component of the entropy decoder 310. Furthermore, the decoding apparatus according to the present document can be referred to as a video / image / picture decoding apparatus, and the decoding apparatus can be classified into an information decoder (a video / image / picture information decoder) and a sample decoder (a video / image / picture sample decoder). The information decoder can include the entropy decoder 310, and the sample decoder can include at least one of the inverse quantizer 321, the inverse transformer 322, the adder 340, the filter 350, the memory 360, the inter-predictor 332, and the intra-predictor 331.

[0082] The dequantizer 321 can dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 321 can rearrange the quantized transform coefficients in the form of a two-dimensional block. In this case, the rearrangement can be performed based on a coefficient scanning order performed in the encoding apparatus. The dequantizer 321 can perform dequantization on the quantized transform coefficients by using a quantization parameter (e.g., quantization step length information), and obtain the transform coefficients.

[0083] The inverse transformer 322 inversely transforms the transform coefficients to obtain a residual signal (a residual block, a residual sample array).

[0084] The predictor can perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor can determine whether to apply intra prediction or inter prediction to the current block based on information about prediction output from the entropy decoder 310, and can determine a specific intra / inter prediction mode.

[0085] The predictor 320 can generate a prediction signal based on various prediction methods described below. For example, the predictor can not only apply intra prediction or inter prediction to predict one block, but also can simultaneously apply intra prediction and inter prediction. This can be referred to as combined inter and intra prediction (CIIP). In addition, the predictor can predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or the palette mode can be used for content image / video encoding of games, etc., for example, screen content coding (SCC). The IBC basically performs prediction in the current picture, but can be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC can use at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, sample values within a picture can be signaled based on information about a palette table and a palette index.

[0086] The intra predictor 331 can predict the current block by referring to samples in the current picture. Depending on the prediction mode, the referred samples can be located in the vicinity of the current block, or can be far from the current block. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The intra predictor 331 can determine the prediction mode applied to the current block by using a prediction mode applied to a neighboring block.

[0087] The inter predictor 332 can derive a prediction block of the current block based on reference blocks (reference sample arrays) specified by motion vectors on reference pictures. In this case, to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of a block, a sub-block, or a sample based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference pictures. For example, the inter predictor 332 can configure a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index of the current block based on received candidate selection information. The inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating a mode of the inter prediction for the current block.

[0088] The adder 340 can generate a reconstructed signal (a reconstructed picture, a reconstructed block, a reconstructed sample array) by adding the obtained residual signal to a prediction signal (a prediction block, a prediction sample array) output from the predictor (including the inter predictor 332 and / or the intra predictor 331). If there is no residual for a block to be processed (for example, when a skip mode is applied), the prediction block can be used as the reconstructed block.

[0089] The adder 340 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra prediction of a next block to be processed in the current picture, can be output through filtering as described below, or can be used for inter prediction of a next picture.

[0090] Further, luma mapping with chroma scaling (LMCS) can be applied in the picture decoding process.

[0091] The filter 350 can improve subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 360 (specifically, the DPB of the memory 360). The various filtering methods can include, for example, a deblocking filter, a sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.

[0092] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter prediction 332. The memory 360 can store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a reconstructed block in the picture. The stored motion information can be transmitted to the inter prediction 260 to be utilized as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 can store reconstructed samples of a reconstructed block in the current picture and can transfer the reconstructed samples to the intra prediction 331.

[0093] In the present disclosure, the embodiments described in the filter 260, the inter prediction 221, and the intra prediction 222 of the encoding apparatus 200 can be the same as or respectively applied to correspond to the filter 350, the inter prediction 332, and the intra prediction 331 of the decoding apparatus 300. The same can also apply to the inter prediction 332 and the intra prediction 331.

[0094] Further, with respect to inter prediction, an inter prediction method considering image distortion has been proposed. More specifically, an affine motion model that effectively derives a motion vector of a sub-block or a sample point of a current block and improves accuracy of inter prediction regardless of deformation due to image rotation, enlargement, or reduction has been proposed. In other words, an affine motion model that derives a motion vector of a sub-block or a sample point of a current block has been proposed. Prediction using the affine motion model can be referred to as affine inter prediction or affine motion prediction.

[0095] For example, affine inter prediction using the affine motion model can effectively express four motions, i.e., four deformations, as described below.

[0096] Figure 4 The motions expressed by the affine motion model are exemplified. Referring to Figure 4 The motions that can be expressed by the affine motion model can include a translation motion, a scaling motion, a rotation motion, and a shear motion. That is, the motions can be effectively expressed as shown in Figure 3 Figure 4 the scaling motion in which a (part of) image is scaled according to lapse of time, the rotation motion in which a (part of) image is rotated according to lapse of time, and the shear motion in which a (part of) image is parallelogrammatically deformed according to lapse of time, and the translation motion in which a (part of) image is moved planarly according to lapse of time of the image.

[0097] ​The encoding device / decoding device can predict a distorted shape of an image based on a motion vector at a control point (CP) of a current block through affine inter prediction, and can improve compression performance of the image by improving prediction accuracy. In addition, since a motion vector of at least one control point of the current block can be derived using a motion vector of a neighboring block of the current block, a burden of a data amount regarding additional information can be reduced, and inter prediction efficiency can be significantly improved.

[0098] As an example of the affine inter prediction, motion information at three control points (i.e., three reference points) can be required.

[0099] Figure 5 An affine motion model using motion vectors of three control points is exemplified.

[0100] When a top-left sample position in the current block 500 is (0, 0), sample positions (0, 0), (w, 0), and (0, h) can be defined as control points as shown in the following. Figure 5 Hereinafter, the control point of the sample position (0, 0) can be denoted as CP0, the control point of the sample position (w, 0) can be denoted as CP1, and the control point of the sample position (0, h) can be denoted as CP2.

[0101] A formula of the affine motion model can be derived using the above-described control points and motion vectors of the respective control points. The formula of the affine motion model can be expressed as follows.

[0102] [Equation 1]

[0103]

[0104] Here, w denotes a width of the current block 500, h denotes a height of the current block 500, v 0x and v 0y denote an x component and a y component of a motion vector of CP0, respectively, v 1x and v 1y denote an x component and a y component of a motion vector of CP1, respectively, and v 2x and v 2y denote an x component and a y component of a motion vector of CP2, respectively. In addition, x denotes an x component of a position of a target sample in the current block 500, y denotes a y component of the position of the target sample in the current block 500, v x denotes the x component of the motion vector of the target sample in the current block 500, and v y denotes the y component of the motion vector of the target sample in the current block 500.

[0105] Since the motion vector of CP0, the motion vector of CP1, and the motion vector of CP2 are known, the motion vector based on 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 ), v1(v 1x , v 1y ), and v2(v 2x , v 2y ) at the control points can be scaled based on the distance ratio between the coordinates (x, y) of the target sample and the three control points to derive the motion vector of the target sample according to the position of the target sample. That is, according to the affine motion model, the motion vector of each sample in the current block can be derived based on the motion vectors of the control points. In addition, the set of the motion vectors of the samples in the current block derived according to the affine motion model can be referred to as an affine motion vector field (MVF).

[0106] In addition, the six parameters of Equation 1 can be represented by a, b, c, d, e, and f as shown in the following equation, and the formula of the affine motion model represented by the six parameters can be as follows.

[0107] [Equation 2]

[0108]

[0109]

[0110]

[0111] Here, w denotes the width of the current block 500, h denotes the height of the current block 500, v 0x and v 0y denote the x component and the y component of the motion vector of CP0, v 1x and v 1y denote the x component and the y component of the motion vector of CP1, respectively, and v 2x and v 2y denote the x component and the y component of the motion vector of CP2, respectively. In addition, x denotes the x component of the position of the target sample in the current block 500, y denotes the y component of the position of the target sample in the current block 500, v x denotes the x component of the motion vector of the target sample in the current block 500, and v y denotes the y component of the motion vector of the target sample in the current block 500.

[0112] The affine motion model or the affine inter prediction using the six parameters can be referred to as a 6-parameter affine motion model or AF6.

[0113] Further, as an example of affine inter prediction, motion information at two control points (i.e., two reference points) can be required.

[0114] Figure 6 An affine motion model using motion vectors of two control points is exemplified. The affine motion model using two control points can represent three kinds of motion including translational motion, scaling motion, and rotational motion. The affine motion model representing the three kinds of motion can be referred to as a similarity affine motion model or a simplified affine motion model.

[0115] When a top-left sample position in the current block 600 is (0, 0), sample positions (0, 0) and (w, 0) can be defined as control points, as shown in the following. Figure 6 Hereinafter, the control point of the sample position (0, 0) can be denoted as CP0, and the control point of the sample position (w, 0) can be denoted as CP1.

[0116] A formula of the affine motion model can be derived using the above-described control points and motion vectors of the corresponding control points. The formula of the affine motion model can be expressed as follows.

[0117] [Equation 3]

[0118]

[0119] Here, w denotes a width of the current block 600, v 0x and v 0y denote an x component and a y component of a motion vector of CP0, respectively, and v 1x and v 1y denote an x component and a y component of a motion vector of CP1. In addition, x denotes an x component of a position of a target sample in the current block 600, y denotes a y component of the position of the target sample in the current block 600, v x denotes an x component of a motion vector of the target sample in the current block 600, and v y denotes a y component of the motion vector of the target sample in the current block 600.

[0120] Further, the four parameters of Equation 3 can be denoted by a, b, c and d in the following equation, and the formula of the affine motion model represented by the four parameters can be as follows.

[0121] [Equation 4]

[0122] c = v 0x d = v 0y

[0123]

[0124] Here, w denotes a width of the current block 600, v0x and v 0y respectively represent the x component and the y component of the motion vector of CP0, and v 1x and v 1y respectively represent the x component and the y component of the motion vector of CP1. In addition, x represents the x component of the position of the target sample in the current block 600, y represents the y component of the position of the target sample in the current block 600, v x represents the x component of the motion vector of the target sample in the current block 600, and v y represents the y component of the motion vector of the target sample in the current block 600. The affine motion model using two control points can be represented by four parameters a, b, c and d as shown in Equation 4, and thus, the affine motion model or the affine inter prediction using four parameters can be referred to as 4-parameter affine motion model or AF4. That is, according to the affine motion model, the motion vector of each sample in the current block can be derived based on the motion vectors of the control points. In addition, the set of the motion vectors of the samples in the current block derived according to the affine motion model can be referred to as affine motion vector field (MVF).

[0125] In addition, as described above, the motion vector of the sample unit can be derived by the affine motion model, and thus the accuracy of the inter prediction can be significantly improved. However, in this case, the complexity in the motion compensation process can be greatly increased.

[0126] Therefore, the restriction can be made so that the motion vector of the sub-block unit of the current block is derived, instead of the motion vector of the sample unit.

[0127] Figure 7 A method of deriving the motion vector based on the affine motion model in the sub-block unit is exemplified. Figure 7 A case where the size of the current block is 16x16 and the motion vector is derived in the 4x4 sub-block unit is exemplified. The sub-block can be set to various sizes. For example, when the sub-block is set to n x n size (n is a positive integer, for example, n is 4), the motion vector can be derived in the n x n sub-block unit in the current block based on the affine motion model, and various methods for deriving the motion vector representing each sub-block can be applied.

[0128] For example, with reference to Figure 7The center or lower-right sample position of each sub-block can be used as a representative coordinate to derive a motion vector of each sub-block. Here, the center lower-right position can indicate a sample position located at the lower right among four samples located at the center of the sub-block. For example, when n is an odd number, one sample can be located at the center of the sub-block, and in this case, the center sample position can be used to derive the motion vector of the sub-block. However, when n is an even number, four samples can be located adjacent at the center of the sub-block, and in this case, the lower-right sample position can be used to derive the motion vector. For example, referring to FIG. 2, when n is an odd number, the center sample position (2, 2) can be used to derive the motion vector of the sub-block. However, when n is an even number, the lower-right sample position (6, 2) can be used to derive the motion vector of the sub-block. Figure 7 The representative coordinates of each sub-block can be derived as (2, 2), (6, 2), (10, 2), …, (14, 14), and the encoding / decoding apparatus can derive the motion vector of each sub-block by substituting each representative coordinate of the sub-block into Equation 1 or Equation 3 above. The motion vector of the sub-block in the current block derived through the affine motion model can be referred to as an affine MVF.

[0129] Further, as an example, the size of the sub-block in the current block can be derived based on the following equation.

[0130] [Equation 5]

[0131]

[0132] Here, M denotes the width of the sub-block, and N denotes the height of the sub-block. In addition, v 0x and v 0y denote the x and y components of the CPMV0 of the current block, v 1x and v 1y denote the x and y components of the CPMV1 of the current block, w denotes the width of the current block, h denotes the height of the current block, and MvPre denotes the motion vector fractional precision. For example, the motion vector fractional precision can be set to 1 / 16.

[0133] Further, in inter prediction using the above-described affine motion model (i.e., affine motion prediction), there can be an affine merge mode AF_MERGE and an affine inter mode AF_INTER. Here, the affine inter mode can be referred to as an affine MVP mode AF_MVP.

[0134] The affine merge mode is similar to the existing merge mode in that the MVD of the motion vector of the control point is not transmitted. That is, similar to the existing skip / merge mode, the affine merge mode can refer to an encoding / decoding method in which prediction is performed by deriving the CPMV for each of two or three control points from the neighboring blocks of the current block.

[0135] For example, when the AF_MRG mode is applied to the current block, the motion vectors (i.e., CPMV0 and CPMV1) of CP0 and CP1 can be derived from a neighboring block of the current block, among the neighboring blocks of which the affine mode has been applied. In other words, the CPMV0 and CPMV1 of the neighboring block of which the affine mode has been applied can be derived as a merge candidate, or can be derived as the CPMV0 and CPMV1 of the current block based on the merge candidate. The affine motion model can be derived based on the CPMV0 and CPMV1 of the neighboring block represented by the merge candidate, and based on the affine motion model, the CPMV0 and CPMV1 of the current block can be derived.

[0136] The affine inter mode can represent an inter prediction that derives a motion vector predictor (MVP) of a control point, derives a motion vector of the control point based on a received motion vector difference (MVD) and the MVP, and derives an affine MVF of a current block based on the motion vector of the control point; and performs prediction according to the affine MVF. Here, the motion vector of the control point can be referred to as a control point motion vector (CPMV), the MVP of the control point can be referred to as a control point motion vector predictor (CPMVP), and the MVD of the control point can be referred to as a control point motion vector difference (CPMVD). More specifically, for example, an encoding device can derive a control point motion vector predictor (CPMVP) and a control point motion vector (CPMV) of CP0 and CP1 (or CP0, CP1, and CP2), respectively, and transmit or store information about the CPMVP and / or a CPMVD representing a difference between the CPMVP and the CPMV.

[0137] Here, if the affine inter mode is applied to the current block, the encoding / decoding device can construct an affine MVP candidate list based on the neighboring blocks of the current block, in which the affine MVP candidate can be referred to as a CPMVP pair candidate, and the affine MVP candidate list can be referred to as a CPMVP candidate list.

[0138] In addition, each affine MVP candidate can represent a combination of CPMVPs of CP0 and CP1 in a four-parameter affine motion model, and a combination of CPMVPs of CP0, CP1, and CP2 in a six-parameter affine motion model.

[0139] Figure 8 is a flowchart illustrating an affine motion prediction method according to one embodiment of the present disclosure.

[0140] Referring to Figure 8 The affine motion prediction method can be mainly described as follows. Once the affine motion prediction method starts, a CPMV pair is first obtained at S800. Here, if a four-parameter affine model is used, the CPMV pair can include CPMV0 and CPMV1.

[0141] Thereafter, affine motion compensation can be performed based on the CPMV pair at S810, after which affine motion prediction can be terminated.

[0142] In addition, two affine prediction modes can be defined to determine the CPMV0 and CPMV1. Here, the two affine prediction modes can include an affine inter mode and an affine merge mode. The affine inter mode can signal information about a motion vector difference (MVD) between the two motion vectors of the CPMV0 and CPMV1 to clearly determine the CPMV0 and CPMV1. On the other hand, the affine merge mode can derive the CPMV pair without signaling the MVD information.

[0143] In other words, the affine merge mode can derive the CPMV of the current block by using the CPMV of a neighboring block coded in the affine mode, and if the motion vector is determined by a sub-block unit, the affine merge mode can be referred to as a sub-block merge mode.

[0144] In the affine merge mode, the encoding device can signal an index of a neighboring block coded in the affine mode to the decoding device for deriving the CPMV of the current block, and can also signal a difference value between the CPMV of the neighboring block and the CPMV of the current block. Here, the affine merge mode can construct an affine merge candidate list based on the neighboring block, wherein the index of the neighboring block can indicate the neighboring block to be utilized within the affine merge candidate list to derive the CPMV of the current block. The affine merge candidate list can also be referred to as a sub-block merge candidate list.

[0145] The affine inter mode can also be referred to as an affine MVP mode. In the affine MVP mode, the CPMV of the current block can be derived based on a control point motion vector predictor (CPMVP) and a control point motion vector difference (CPMVD). In other words, the encoding device can determine the CPMVP of the CPMV of the current block, derive the CPMVD as a difference value between the CPMV of the current block and the CPMVP, and signal information about the CPMVP and information about the CPMVD to the decoding device. Here, the affine MVP mode can construct an affine MVP candidate list based on the neighboring block, and the information about the CPMVP can indicate the neighboring block to be utilized to derive the CPMVP of the CPMV of the current block from the affine MVP candidate list. The affine MVP candidate list can also be referred to as a control point motion vector predictor candidate list.

[0146] For example, when the affine inter mode applying a six-parameter affine motion model, the current block can be coded as follows.

[0147] Figure 9 A method for deriving a motion vector predictor at a control point according to one embodiment of the present disclosure is illustrated.

[0148] With reference to Figure 9 , a motion vector of the CP0 of the current block can be referred to as v0, a motion vector of the CP1 can be referred to as v1, a motion vector of the control point at the lower left sample position can be referred to as v2, and a motion vector of the CP2 can be referred to as v3. In other words, v0 can represent a CPMVP of the CP0, v1 can represent a CPMVP of the CP1, and v2 can represent a CPMVP of the CP2.

[0149] The affine MVP candidate can be a combination of the CPMVP candidate of the CP0, the CPMVP candidate of the CP1, and the CPMVP candidate of the CP2.

[0150] For example, the affine MVP candidate can be derived as follows.

[0151] More specifically, a maximum of 12 CPMVP candidate combinations can be determined as shown in the following equation.

[0152] [Equation 6]

[0153] {(v0, v1, u2) | v0 = {v A , v B , v c}, v1 = {v D , v E}, v2 = {v F , v G}}

[0154] Here, v A represents a motion vector of a neighboring block A, v B represents a motion vector of a neighboring block B, v C represents a motion vector of a neighboring block C, v D represents a motion vector of a neighboring block D, v E represents a motion vector of a neighboring block E, v F represents a motion vector of a neighboring block F, and v G represents a motion vector of a neighboring block G.

[0155] Additionally, the neighboring block A can represent a neighboring block located above and to the left of the upper left sample position of the current block, the neighboring block B can represent a neighboring block located above the upper left sample position of the current block, and the neighboring block C can represent a neighboring block located to the left of the upper left sample position of the current block. Additionally, the neighboring block D can represent a neighboring block located above the upper right sample position of the current block, and the neighboring block E can represent a neighboring block located above and to the right of the upper right sample position of the current block. Also, the neighboring block F can represent a neighboring block located to the left of the lower left sample position of the current block, and the neighboring block G can represent a neighboring block located below and to the left of the lower left sample position of the current block.

[0156] In other words, referring to Equation 6 above, the CPMVP candidates of CP0 can include a motion vector v A of a neighboring block A, a motion vector v B of a neighboring block B, and / or a motion vector v C of a neighboring block C; the CPMVP candidates of CP1 can include a motion vector v D of a neighboring block D, and / or a motion vector v E of a neighboring block E; the CPMVP candidates of CP2 can include a motion vector v F of a neighboring block F, and / or a motion vector v G of a neighboring block G.

[0157] In other words, the CPMVP v0 of CP0 can be derived based on at least one motion vector of the neighboring blocks A, B, and C with respect to the top-left sample position of the current block. Here, the neighboring block A can represent a block located above and to the left of the top-left sample position of the current block, the neighboring block B can represent a block located above the top-left sample position of the current block, and the neighboring block C can represent a block located to the left of the top-left sample position of the current block.

[0158] Based on the motion vectors of the neighboring blocks, up to 12 CPMVP candidate combinations including the CPMVP candidates of CP0, the CPMVP candidates of CP1, and the CPMVP candidates of CP2 can be derived.

[0159] Afterwards, the derived CPMVP candidate combinations are arranged in ascending order of DV, and the first two CPMVP candidate combinations can be derived as affine MVP candidates.

[0160] The DV of a CPMVP candidate combination is derived by the following equation.

[0161] [Equation 7]

[0162] DV = | (v 1x - v 0x ) * h - (v2 y - v0 y ) * w | + | (v1 y - v0 y ) * h + (v2 x - v0 x ) * w |

[0163] Afterwards, the encoding device can determine the CPMVs of the respective affine MVP candidates, compare the rate-distortion (RD) costs between the CPMVs, and select the affine MVP candidate with the smallest RD cost as the best affine MVP candidate for the current block. The encoding device can encode and signal the index indicating the best candidate and the CPMVD.

[0164] In addition, for example, if the affine merge mode is applied, the current block can be encoded as follows.

[0165] Figure 10 A method for deriving a motion vector predictor at a control point is exemplified according to one embodiment of the present disclosure.

[0166] Based on Figure 10 An affine merge candidate list of the current block can be constructed based on the neighboring blocks of the current block. The neighboring blocks can include a neighboring block A, a neighboring block B, a neighboring block C, a neighboring block D, and a neighboring block E. The neighboring block A can represent a left neighboring block of the current block, the neighboring block B can represent an above neighboring block of the current block, the neighboring block C can represent a top-right corner neighboring block of the current block, the neighboring block D can represent a bottom-left corner neighboring block of the current block, and the neighboring block E can represent a top-left corner neighboring block of the current block.

[0167] For example, when a size of the current block is WxH, an x component of a top-left sample position of the current block is 0, and a y component of the top-left sample position is 0, the left neighboring block can be a block including a sample at coordinate (-1, H-1), the above neighboring block can be a block including a sample at coordinate (W-1, -1), the top-right corner neighboring block can be a block including a sample at coordinate (W, -1), the bottom-left corner neighboring block can be a block including a sample at coordinate (-1, H), and the top-left corner neighboring block can be a block including a sample at coordinate (-1, -1).

[0168] More specifically, for example, the encoding device can scan the neighboring block A, the neighboring block B, the neighboring block C, the neighboring block D, and the neighboring block E of the current block in a certain scan order; determine a neighboring block that is first encoded in the affine prediction mode according to the scan order as a candidate block for the affine merge mode, i.e., an affine merge candidate. In other words, the certain scan order can be performed in the order of the neighboring block A, the neighboring block B, the neighboring block C, the neighboring block D, and the neighboring block E.

[0169] Subsequently, the encoding device can determine an affine motion model of the current block by using the CPMV of the determined candidate block, determine the CPMV of the current block based on the affine motion model, and determine the affine MVF of the current block based on the CPMV.

[0170] As one example, if the neighboring block A is determined as the candidate block of the current block, the encoding can be performed as follows.

[0171] Figure 11 One example of the affine prediction performed when the neighboring block A is selected as the affine merge candidate is exemplified.

[0172] Referring to Figure 11, the encoding device can determine a neighboring block A of the current block as a candidate block and derive an affine motion model of the current block based on CPMVs (v2 and v3) of the neighboring block. Thereafter, the encoding device can determine CPMVs (v0 and v1) of the current block based on the affine motion model. The encoding device can determine an affine MVF based on the CPMVs (v0 and v1) of the current block and perform a process for encoding the current block based on the affine MVF.

[0173] Further, in relation to affine inter prediction, inherited affine candidates and constructed affine candidates are under consideration as means to construct an affine MVP candidate list.

[0174] Here, the inherited affine candidate can be described as follows.

[0175] For example, if a neighboring block of the current block is an affine block and a reference picture of the current block is the same as a reference picture of the neighboring block, an affine MVP pair of the current block can be determined from an affine motion model of the neighboring block. Here, the affine block can represent a block to which affine inter prediction has been applied. The inherited affine candidate can represent a CPMV (e.g., an affine MVP pair) derived based on the affine motion model of the neighboring block.

[0176] More specifically, as one example, the inherited affine candidate can be derived as described below.

[0177] Figure 12 A neighboring block used to derive the inherited affine candidate is exemplified.

[0178] Referring to Figure 12 , the neighboring blocks of the current block can include a left neighboring block A0 of the current block, a lower-left corner neighboring block Al of the current block, an upper neighboring block B0 of the current block, a right-upper corner neighboring block Bl of the current block, and a left-upper corner neighboring block B2 of the current block.

[0179] For example, when a size of the current block is WxH, an x-component of a top-left sample position of the current block is 0, and a y-component thereof is 0, the left neighboring block can be a block including a sample at coordinates (-1, H-1), the upper neighboring block can be a block including a sample at coordinates (W-1, -1), the right-upper corner neighboring block can be a block including a sample at coordinates (W, -1), the lower-left corner neighboring block can be a block including a sample at coordinates (-1, H), and the left-upper corner neighboring block can be a block including a sample at coordinates (-1, -1).

[0180] The encoding / decoding device can check the neighboring blocks A0, Al, B0, Bl, and B2 in sequence, and if a neighboring block is coded according to the affine motion model and the reference picture of the current block is the same as the reference picture of the neighboring block, can derive two CPMVs or three CPMVs of the current block based on the affine motion model of the neighboring block. The CPMVs can be derived as affine MVP candidates of the current block. The affine MVP candidates can represent inherited affine candidates.

[0181] As one example, up to two inherited affine candidates can be derived based on the neighboring blocks.

[0182] For example, the encoding / decoding device can derive a first affine MVP candidate of the current block based on a first block among the neighboring blocks. Here, the first block can be coded according to the affine motion model and the reference picture of the first block can be the same as the reference picture of the current block. In other words, the first block can be a block that is first confirmed to satisfy the condition from checking the neighboring blocks according to a certain order. The condition can be coded according to the affine motion model and the reference picture of the block can be the same as the reference picture of the current block.

[0183] Thereafter, the encoding / decoding device can derive a second affine MVP candidate based on a second block among the neighboring blocks. Here, the second block can be coded according to the affine motion model and the reference picture of the second block can be the same as the reference picture of the current block. In other words, the second block can be a block that is second confirmed to satisfy the condition from checking the neighboring blocks according to a certain order. The condition can be coded according to the affine motion model and the reference picture of the block can be the same as the reference picture of the current block.

[0184] Further, for example, when the number of available inherited affine candidates is less than 2 (i.e., when the number of derived inherited affine candidates is less than 2), constructed affine candidates can be considered. The constructed affine candidates can be derived as follows.

[0185] Figure 13 A spatial candidate of the constructed affine candidate is exemplified.

[0186] As Figure 13 indicated, the motion vectors of the neighboring blocks of the current block can be divided into three groups. Referring to Figure 13 , the neighboring blocks can include a neighboring block A, a neighboring block B, a neighboring block C, a neighboring block D, a neighboring block E, a neighboring block F, and a neighboring block G.

[0187] The neighboring block A can denote a neighboring block located above the top-left sample position of the current block, the neighboring block B can denote a neighboring block located above the top-right sample position of the current block, and the neighboring block C can denote a neighboring block located to the left of the top-right sample position of the current block. In addition, the neighboring block D can denote a neighboring block located above the bottom-left sample position of the current block, and the neighboring block E can denote a neighboring block located above and to the right of the bottom-left sample position of the current block. In addition, the neighboring block F can denote a neighboring block located to the left of the bottom-right sample position of the current block, and the neighboring block G can denote a neighboring block located below and to the left of the bottom-right sample position of the current block.

[0188] For example, the three groups can include S0, S1, and S2, where S0, S1, and S2 can be derived as shown in the following table.

[0189] [Table 1]

[0190] A B C D E F G ​​​​​​​​

[0191] Here, mv0 can denote a motion vector of the neighboring block A, mv1 can denote a motion vector of the neighboring block B, and mv2 can denote a motion vector of the neighboring block C. A Here, mv0 can denote a motion vector of the neighboring block A, mv1 can denote a motion vector of the neighboring block B, and mv2 can denote a motion vector of the neighboring block C. B Here, mv0 can denote a motion vector of the neighboring block A, mv1 can denote a motion vector of the neighboring block B, and mv2 can denote a motion vector of the neighboring block C. C Here, mv0 can denote a motion vector of the neighboring block A, mv1 can denote a motion vector of the neighboring block B, and mv2 can denote a motion vector of the neighboring block C. D Here, mv0 can denote a motion vector of the neighboring block A, mv1 can denote a motion vector of the neighboring block B, and mv2 can denote a motion vector of the neighboring block C. E Here, mv0 can denote a motion vector of the neighboring block A, mv1 can denote a motion vector of the neighboring block B, and mv2 can denote a motion vector of the neighboring block C. F Here, mv0 can denote a motion vector of the neighboring block A, mv1 can denote a motion vector of the neighboring block B, and mv2 can denote a motion vector of the neighboring block C. G S0 can denote a first group, S1 can denote a second group, and S2 can denote a third group.

[0192] The encoding / decoding device can derive mv0 from S0, derive mv1 from S1, derive mv2 from S2, and derive an affine MVP candidate including mv0, mv1, and mv2. The affine MVP candidate can denote a constructed affine candidate. In addition, mv0 can be a CPMVP candidate of CP0, mv1 can be a CPMVP candidate of CP1, and mv1 can be a CPMVP candidate of CP2.

[0193] Here, a reference picture of mv0 can be the same as a reference picture of the current block. In other words, mv0 can be a motion vector first confirmed to satisfy a condition by checking motion vectors within S0. The condition can be such that the reference picture of the motion vector is the same as the reference picture of the current block. The specific order can be such that the motion vectors within S0 are checked in the order of the neighboring block A, the neighboring block B, and the neighboring block C. Furthermore, the checking order can be performed differently from the above, and can not be limited to the above example.

[0194] Further, the reference picture of mv1 can be the same as the reference picture of the current block. In other words, mv1 can be a motion vector that is first confirmed to satisfy the condition from the checking of the motion vectors within S1. The condition can be such that the reference picture of the motion vector is the same as the reference picture of the current block. The specific order can be such that the motion vectors within S1 are checked in the order of neighboring block D and neighboring block E. In addition, the checking order can be performed differently from the above, and can not be limited to the above example.

[0195] Further, the reference picture of mv2 can be the same as the reference picture of the current block. In other words, mv2 can be a motion vector that is first confirmed to satisfy the condition from the checking of the motion vectors within S2. The condition can be such that the reference picture of the motion vector is the same as the reference picture of the current block. The specific order can be such that the motion vectors within S2 are checked in the order of neighboring block F and neighboring block G. In addition, the checking order can be performed differently from the above, and can not be limited to the above example.

[0196] Further, mv2 can be derived by the following equation only when mv0 and mv1 are available, that is, only when mv0 and mv1 are derived.

[0197] [Equation 8]

[0198]

[0199] Herein, represents an x component of mv2, represents a y component of mv2, represents an x component of mv0, represents a y component of mv0, represents an x component of mv1, and represents a y component of mv1. In addition, w represents the width of the current block, and h represents the height of the current block.

[0200] Further, when only mv0 and mv2 are derived, mv1 can be derived by the following equation.

[0201] [Equation 9]

[0202]

[0203] Herein, represents an x component of mv1, represents a y component of mv1, represents an x component of mv0, represents a y component of mv0, represents an x component of mv2, and represents a y component of mv2. In addition, w represents the width of the current block, and h represents the height of the current block.

[0204] Further, when the number of available inherited affine candidates and / or the number of constructed affine candidates is less than 2, the AMVP process of the existing HEVC standard can be applied to construct the affine MVP list. In other words, when the number of available inherited affine candidates and / or the number of constructed affine candidates is less than 2, the process for constructing the MVP candidates specified in the existing HEVC standard can be performed.

[0205] Further, a flowchart of the embodiment for constructing the affine MVP list can be described as follows.

[0206] Figure 14 One example of constructing the affine MVP list is illustrated.

[0207] Referring to Figure 14 At S1400, the encoding / decoding device can add the inherited candidate to the affine MVP list of the current block. The inherited candidate can denote the above-described inherited affine candidate.

[0208] More specifically, at S1405, the encoding / decoding device can derive up to two inherited affine candidates from neighboring blocks of the current block. Here, the neighboring blocks can include a left neighboring block A0 of the current block, a lower-left corner neighboring block A1 of the current block, an upper neighboring block B0 of the current block, an upper-right corner neighboring block B1 of the current block, and an upper-left corner neighboring block B2 of the current block.

[0209] For example, the encoding / decoding device can derive a first affine MVP candidate of the current block based on a first block among the neighboring blocks. Here, the first block can be encoded according to the affine motion model, and a reference picture of the first block can be the same as a reference picture of the current block. In other words, the first block can be a block that is first confirmed to satisfy the condition from checking the neighboring blocks according to a certain order. The condition can be encoded according to the affine motion model, and a reference picture of the block can be the same as a reference picture of the current block.

[0210] Thereafter, the encoding / decoding device can derive a second affine MVP candidate based on a second block among the neighboring blocks. Here, the second block can be encoded according to the affine motion model, and a reference picture of the second block can be the same as a reference picture of the current block. In other words, the second block can be a block that is second confirmed to satisfy the condition from checking the neighboring blocks according to a certain order. The condition can be encoded according to the affine motion model, and a reference picture of the block can be the same as a reference picture of the current block.

[0211] Further, the certain order can be such that the neighboring blocks are checked in the order of the left neighboring block A0, the lower-left corner neighboring block A1, the upper neighboring block B0, the upper-right corner neighboring block B1, and the upper-left corner neighboring block B2. In addition, the checking order can be performed differently from the above, and can not be limited to the above example.

[0212] At S1410, the encoding / decoding device can add the constructed candidate to the affine MVP list of the current block. The constructed candidate can represent the above-constructed affine candidate. The constructed candidate can also be referred to as a constructed affine MVP candidate. If the number of available inherited candidates is less than 2, the encoding / decoding device can add the constructed candidate to the affine MVP list of the current block. For example, the encoding / decoding device can derive one constructed affine candidate.

[0213] Further, the method for deriving the constructed affine candidate can differ depending on whether the affine motion model applied to the current block is a six-parameter affine motion model or a four-parameter affine motion model. Detailed descriptions on how to derive the constructed candidate will be provided later.

[0214] At S1420, the encoding / decoding device can add the HEVC AMVP candidate to the affine MVP list of the current block. If the number of available inherited candidates and / or the number of constructed candidates is less than 2, the encoding / decoding device can add the HEVC AMVP candidate to the affine MVP list of the current block. In other words, when the number of available inherited candidates and / or the number of constructed candidates is less than 2, the encoding / decoding device can perform a process for constructing the MVP candidate specified in the existing HEVC standard.

[0215] Further, the method for deriving the constructed candidate can be performed as follows.

[0216] For example, if the affine motion model applied to the current block is a six-parameter affine motion model, the constructed candidate can be derived as shown in the embodiment of FIG. 6. Figure 15

[0217] Figure 15 An example of deriving the constructed candidate is illustrated.

[0218] Referring to Figure 15 At S1500, the encoding / decoding device can check mv0, mv1, and mv2 with respect to the current block. In other words, the encoding / decoding device can determine whether mv0, mv1, and mv2 are available among the neighboring blocks of the current block. Here, mv0 can represent a CPMVP candidate of CP0 of the current block, mv1 can represent a CPMVP candidate of CP1 of the current block, and mv2 can represent a CPMVP candidate of CP2 of the current block. In addition, mv0, mv1, and mv2 can represent candidate motion vectors of the respective CPs.

[0219] ​For example, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the first group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv0. In other words, mv0 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the first group according to the certain order. If the motion vectors of the neighboring blocks within the first group do not satisfy the certain condition, mv0 can not exist. Here, for example, the certain order can be performed in the order of neighboring block A, neighboring block B, and neighboring block C in the first group. Also, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0220] Also, for example, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the second group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv1. In other words, mv1 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the second group according to the certain order. If the motion vectors of the neighboring blocks within the second group do not satisfy the certain condition, mv1 can not exist. Here, for example, the certain order can be performed from neighboring block D to neighboring block E in the second group. Also, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0221] Also, for example, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the third group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv2. In other words, mv2 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the third group according to the certain order. If the motion vectors of the neighboring blocks within the third group do not satisfy the certain condition, mv2 can not exist. Here, for example, the certain order can be performed from neighboring block F to neighboring block G within the third group. Also, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0222] Further, the first group can include a motion vector of a neighboring block A, a motion vector of a neighboring block B, and a motion vector of a neighboring block C; the second group can include a motion vector of a neighboring block D and a motion vector of a neighboring block E; and the third group can include a motion vector of a neighboring block F and a motion vector of a neighboring block G. The neighboring block A can denote a neighboring block located above and left of a top-left sample position of the current block; the neighboring block B can denote a neighboring block located above the top-left sample position of the current block; the neighboring block C can denote a neighboring block located left of the top-left sample position of the current block; the neighboring block D can denote a neighboring block located above a top-right sample position of the current block; the neighboring block E can denote a neighboring block located above and right of the top-right sample position of the current block; the neighboring block F can denote a neighboring block located left of a bottom-left sample position of the current block; and the neighboring block G can denote a neighboring block located below and left of the bottom-left sample position of the current block.

[0223] When only mv0 and mv1 are available for the current block, i.e., when only mv0 and mv1 are derived for the current block, the encoding / decoding device can derive mv2 of the current block based on the above Equation 8 at S1510. The encoding / decoding device can derive mv2 by inserting the derived mv0 and mv1 into the above Equation 8.

[0224] When only mv0 and mv2 are available for the current block, i.e., when only mv0 and mv2 are derived for the current block, the encoding / decoding device can derive mv1 of the current block based on the above Equation 9 at S1520. The encoding / decoding device can derive mv1 by inserting the derived mv0 and mv2 into the above Equation 9.

[0225] The encoding / decoding device can provide the derived mv0, mv1, and mv2 as a candidate for construction of the current block at S1530. When mv0, mv1, and mv2 are available, i.e., when mv0, mv1, and mv2 are derived based on neighboring blocks of the current block, the encoding / decoding device can provide the derived mv0, mv1, and mv2 as a candidate for construction of the current block.

[0226] Further, when only mv0 and mv1 are available for the current block, i.e., when only mv0 and mv1 are derived for the current block, the encoding / decoding device can provide the derived mv0, mv1, and mv2 derived based on the above Equation 8 as a candidate for construction of the current block.

[0227] Further, when only mv0 and mv2 are available for the current block, i.e., when only mv0 and mv2 are derived for the current block, the encoding / decoding device can provide the derived mv0, mv2, and mv1 derived based on the above Equation 9 as a candidate for construction of the current block.

[0228] Further, for example, if an affine motion model applied to the current block is a four-parameter affine motion model, the encoding / decoding device can provide the derived mv0, mv1, and mv2 as a candidate for construction of the current block asFigure 15 derivation of the constructed candidate.

[0229] Figure 16 An example of the derivation of the constructed candidate is illustrated.

[0230] Referring to Figure 16 At S1600, the encoding / decoding device can check mv0, mv1, and mv2. In other words, the encoding / decoding device can determine whether mv0, mv1, and mv2 are available among the neighboring blocks of the current block. Here, mv0 can denote a CPMVP candidate of CP0 of the current block, mv1 can denote a CPMVP candidate of CP1 of the current block, and mv2 can denote a CPMVP candidate of CP2 of the current block.

[0231] For example, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the first group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv0. In other words, mv0 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the first group according to the certain order. If the motion vectors of the neighboring blocks within the first group do not satisfy the certain condition, the available mv0 can not exist. Here, for example, the certain order can be performed in the order of the neighboring block A, the neighboring block B, and the neighboring block C within the first group. Also, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0232] Also, for example, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the second group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv1. In other words, mv1 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the second group according to the certain order. If the motion vectors of the neighboring blocks within the second group do not satisfy the certain condition, the available mv1 can not exist. Here, for example, the certain order can be performed from the neighboring block D to the neighboring block E within the second group. Also, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0233] Additionally, for example, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the third group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv2. In other words, mv2 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the third group according to the certain order. If the motion vectors of the neighboring blocks within the third group do not satisfy the certain condition, the available mv2 can not exist. Here, for example, the certain order can be performed from the neighboring block F to the neighboring block G within the third group. Additionally, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0234] Further, the first group can include the motion vector of the neighboring block A, the motion vector of the neighboring block B, and the motion vector of the neighboring block C; the second group can include the motion vector of the neighboring block D and the motion vector of the neighboring block E; and the third group can include the motion vector of the neighboring block F and the motion vector of the neighboring block G. The neighboring block A can denote a neighboring block located left and above the top-left sample position of the current block; the neighboring block B can denote a neighboring block located above the top-left sample position of the current block; the neighboring block C can denote a neighboring block located left of the top-left sample position of the current block; the neighboring block D can denote a neighboring block located above the top-right sample position of the current block; the neighboring block E can denote a neighboring block located right and above the top-right sample position of the current block; the neighboring block F can denote a neighboring block located left of the bottom-left sample position of the current block; and the neighboring block G can denote a neighboring block located left and below the bottom-left sample position of the current block.

[0235] When only mv0 and mv1 are available for the current block, or when mv0, mv1 and mv2 are available for the current block, i.e., when only mv0 and mv1 are derived for the current block, or when mv0, mv1 and mv2 are derived for the current block, the encoding / decoding device can provide the derived mv0 and mv1 as candidates for the construction of the current block at S1610.

[0236] Further, when only mv0 and mv2 are available for the current block, i.e., when only mv0 and mv2 are derived for the current block, the encoding / decoding device can derive mv1 of the current block based on Equation 9 above at S1620. The encoding / decoding device can derive mv1 by plugging the derived mv0 and mv2 into Equation 9 above.

[0237] Thereafter, the encoding / decoding device can provide the derived mv0 and mv1 as candidates for the construction of the current block at S1610.

[0238] Further, another embodiment for deriving inherited affine candidates according to the disclosure will be proposed. In deriving inherited affine candidates, the proposed embodiment can reduce computational complexity, thereby improving coding performance.

[0239] Figure 17 The positions of neighboring blocks scanned for deriving inherited affine candidates are exemplified.

[0240] The encoding / decoding device can derive at most two inherited affine candidates from neighboring blocks of the current block. Figure 17 The neighboring blocks of inherited affine candidates are exemplified. For example, the neighboring blocks can include Figure 17 The illustrated neighboring block A and neighboring block B. The neighboring block A can denote a left neighboring block A0, and the neighboring block B can denote an above neighboring block B0.

[0241] For example, the encoding / decoding device can check availability of the neighboring blocks in a certain order, and can derive inherited affine candidates of the current block based on the neighboring block first confirmed to be available. In other words, the encoding / decoding device can check the neighboring blocks in a certain order to see whether the neighboring blocks satisfy a certain condition, and derive inherited affine candidates of the current block based on the neighboring block first confirmed to satisfy the certain condition. In addition, the encoding / decoding device can derive inherited affine candidates of the current block based on the second neighboring block confirmed to satisfy the certain condition. In other words, the encoding / decoding device can derive inherited affine candidates of the current block based on the second neighboring block confirmed to satisfy the certain condition. Here, the availability can mean that the block is coded based on an affine motion model and a reference picture of the block is the same as a reference picture of the current block. In other words, the certain condition can indicate that the block is coded based on an affine motion model and a reference picture of the block is the same as a reference picture of the current block. In addition, for example, the certain order can be performed from the neighboring block A to the neighboring block B. Further, a pruning check process can not be performed between two inherited affine candidates (i.e., the derived inherited affine candidates). The pruning check process can denote a process of checking whether the candidates are the same as each other and removing the latter derived candidate if the candidates are found to be the same.

[0242] The above embodiment proposes a method for checking only two neighboring blocks (i.e., the neighboring block A and the neighboring block B) and deriving inherited affine candidates, instead of checking all existing neighboring blocks (i.e., the neighboring block A, the neighboring block B, the neighboring block C, the neighboring block D, and the neighboring block E) and deriving inherited affine candidates. Here, the neighboring block C can denote a top-right corner neighboring block B1, the neighboring block D can denote a bottom-left corner neighboring block A1, and the neighboring block E denotes a top-left corner neighboring block B2.

[0243] When affine prediction is applied to each neighboring block to analyze the spatial correlation between the neighboring blocks and the current block, the probability of applying affine prediction to the current block can be utilized. When affine prediction is applied to each neighboring block, the probability of applying affine prediction to the current block can be derived as shown in the following table.

[0244] [Table 2]

[0245] Reference block A B C D E Probability 65% 41% 5% 3% 1%

[0246] Referring to Table 2 above, it can be found that the spatial correlation with the current block is high for neighboring blocks A and B among the neighboring blocks. Therefore, by using only the neighboring blocks A and B that exhibit high spatial correlation to derive the inherited affine candidates, the processing time can be reduced, and high decoding performance can be achieved.

[0247] In addition, a pruning check process can be performed to prevent the same candidate from existing in the candidate list. Since the pruning check process can remove redundancy, a beneficial effect can be obtained in terms of coding efficiency, but at the same time, the computational complexity can increase due to the pruning check process. Specifically, since the pruning check process for the affine candidate must be performed considering the affine type (e.g., whether the affine motion model is a four-parameter affine motion model or a six-parameter affine motion model), the reference picture (or the reference picture index), and the MVs of CP0, CP1, and CP2, the computational complexity is very high. Therefore, the present embodiment proposes a method of not performing the pruning check process between the inherited affine candidate (e.g., inherited_A) derived based on the neighboring block A and the inherited affine candidate (e.g., inherited_B) derived based on the neighboring block B. In the case of the neighboring blocks A and B, they are far apart from each other, and thus exhibit low spatial correlation. Therefore, the probability of inherited_A and inherited_B being the same is low. Therefore, it can be expected that the pruning check process is not performed between the inherited affine candidates.

[0248] In addition, based on the above reasons, a method for performing the pruning check process as little as possible can be proposed. For example, the encoding / decoding device can perform the pruning check process in such a manner that only the MVs of CP0 of the inherited affine candidates are compared with each other.

[0249] In addition, the present disclosure proposes a method for deriving a constructed candidate different from the constructed candidate obtained by the above embodiment. The proposed embodiment can improve the coding performance by reducing the complexity compared to the above embodiment for deriving the constructed candidate. The proposed embodiment can be described as follows. In addition, when the number of available inherited affine candidates is less than 2 (i.e., when the number of derived inherited affine candidates is less than 2), the constructed affine candidate can be considered.

[0250] For example, the encoding / decoding device can check mv0, mv1, and mv2 with respect to the current block. In other words, the encoding / decoding device can determine whether mv0, mv1, and mv2 are available among neighboring blocks of the current block. Here, mv0 can denote a CPMVP candidate of CP0 of the current block, mv1 can denote a CPMVP candidate of CP1 of the current block, and mv2 can denote a CPMVP candidate of CP2 of the current block.

[0251] Specifically, the neighboring blocks of the current block can be divided into three groups, and the neighboring blocks can include a neighboring block A, a neighboring block B, a neighboring block C, a neighboring block D, a neighboring block E, a neighboring block F, and a neighboring block G. A first group can include a motion vector of the neighboring block A, a motion vector of the neighboring block B, and a motion vector of the neighboring block C; a second group can include a motion vector of the neighboring block D and a motion vector of the neighboring block E; and a third group can include a motion vector of the neighboring block F and a motion vector of the neighboring block G. The neighboring block A can denote a neighboring block located above and left of a top-left sample position of the current block; the neighboring block B can denote a neighboring block located above the top-left sample position of the current block; the neighboring block C can denote a neighboring block located left of the top-left sample position of the current block; the neighboring block D can denote a neighboring block located above a top-right sample position of the current block; the neighboring block E can denote a neighboring block located above and right of the top-right sample position of the current block; the neighboring block F can denote a neighboring block located left of a bottom-left sample position of the current block; and the neighboring block G can denote a neighboring block located below and left of the bottom-left sample position of the current block.

[0252] The encoding / decoding device can determine availability of mv0 within the first group, determine availability of mv1 within the second group, and determine availability of mv2 within the third group.

[0253] More specifically, for example, the encoding / decoding device can check whether motion vectors of the neighboring blocks within the first group satisfy a certain condition according to a certain order. The encoding / decoding device can derive a motion vector of a neighboring block that is first confirmed to satisfy the certain condition during the checking process as mv0. In other words, mv0 can be a motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the first group according to the certain order. If the motion vectors of the neighboring blocks within the first group do not satisfy the certain condition, the available mv0 can not exist. Here, for example, the certain order can be performed in the order of the neighboring block A, the neighboring block B, and the neighboring block C within the first group. Also, for example, the certain condition can be such that a reference picture of the motion vector of the neighboring block is identical to a reference picture of the current block.

[0254] Additionally, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the second group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv1. In other words, mv1 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the second group according to the certain order. If the motion vectors of the neighboring blocks within the second group do not satisfy the certain condition, mv1 can not exist. Here, for example, the certain order can be performed from the neighboring block D to the neighboring block E within the second group. Additionally, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0255] Additionally, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the third group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv2. In other words, mv2 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the third group according to the certain order. If the motion vectors of the neighboring blocks within the third group do not satisfy the certain condition, mv2 can not exist. Here, for example, the certain order can be performed from the neighboring block F to the neighboring block G within the third group. Additionally, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0256] Then, if the affine motion model applied to the current block is a 4-parameter affine motion model, and mv0 and mv1 of the current block are available, the encoding / decoding device can provide the derived mv0 and mv1 as a constructed candidate for the current block. Further, if mv0 and / or mv1 of the current block are not available, i.e., if at least one of mv0 and mv1 is not derived from the neighboring blocks of the current block, the encoding / decoding device can not add the constructed candidate to the affine MVP list of the current block.

[0257] Further, if the affine motion model applied to the current block is a 6-parameter affine motion model, and mv0, mv1, and mv2 of the current block are available, the encoding / decoding device can provide the derived mv0, mv1, and mv2 as a constructed candidate for the current block. Further, if mv0, mv1, and / or mv2 of the current block are not available, i.e., if at least one of mv0, mv1, and mv2 is not derived from the neighboring blocks of the current block, the encoding / decoding device can not add the constructed candidate to the affine MVP list of the current block.

[0258] The proposed embodiments describe a method of considering the motion vectors of the CPs for generating the affine motion model of the current block as constructed candidates only when all the motion vectors are available. Here, the availability can mean that the reference pictures of the neighboring blocks are the same as the reference picture of the current block. In other words, the constructed candidates can be derived only when there are motion vectors satisfying the condition among the motion vectors of the neighboring blocks of the respective CPs of the current block. Therefore, if the affine motion model applied to the current block is the 4-parameter affine motion model, the constructed candidates can be considered only when the motion vectors (i.e., mv0 and mv1) of the CP0 and CP1 of the current block are available. In addition, if the affine motion model applied to the current block is the 6-parameter affine motion model, the constructed candidates can be considered only when the motion vectors (i.e., mv0, mv1, and mv2) of the CP0, CP1, and CP2 of the current block are available. Therefore, according to the proposed embodiments, the additional construction for deriving the motion vectors of the CPs based on Equation 8 or Equation 9 can not be needed. By the proposed embodiments, the computational complexity for deriving the constructed candidates can be reduced. In addition, since the constructed candidates are determined only when the CPMVP candidates with the same reference picture are available, the overall coding performance can be improved.

[0259] Further, the pruning check process can not be performed between the derived inherited affine candidates and the constructed affine candidates. The pruning check process can mean a process of checking whether the candidates are the same as each other and removing the latter derived candidate if the candidates are found to be the same.

[0260] The above-described embodiments can be as shown in Figure 18 and Figure 19 .

[0261] Figure 18 One example of deriving the constructed candidates when the four-parameter affine motion model is applied to the current block is exemplified.

[0262] Referring to Figure 18 , at S1800, the encoding / decoding device can determine whether mv0 and mv1 of the current block are available. In other words, the encoding / decoding device can determine whether there are available mv0 and mv1 in the neighboring blocks of the current block. Here, mv0 can be the CPMVP candidate of the CP0 of the current block, and mv1 can be the CPMVP candidate of the CP1.

[0263] The encoding / decoding device can determine whether mv0 is available in the first group and whether mv1 is available in the second group.

[0264] Specifically, neighboring blocks of the current block can be divided into three groups, and the neighboring blocks can include a neighboring block A, a neighboring block B, a neighboring block C, a neighboring block D, a neighboring block E, a neighboring block F, and a neighboring block G. A first group can include a motion vector of the neighboring block A, a motion vector of the neighboring block B, and a motion vector of the neighboring block C; a second group can include a motion vector of the neighboring block D and a motion vector of the neighboring block E; and a third group can include a motion vector of the neighboring block F and a motion vector of the neighboring block G. The neighboring block A can denote a neighboring block located above and left of a top-left sample position of the current block; the neighboring block B can denote a neighboring block located above the top-left sample position of the current block; the neighboring block C can denote a neighboring block located left of the top-left sample position of the current block; the neighboring block D can denote a neighboring block located above a top-right sample position of the current block; the neighboring block E can denote a neighboring block located above and right of the top-right sample position of the current block; the neighboring block F can denote a neighboring block located left of a bottom-left sample position of the current block; and the neighboring block G can denote a neighboring block located below and left of the bottom-left sample position of the current block.

[0265] The encoding / decoding device can check whether the motion vectors of the neighboring blocks within the first group satisfy a certain condition according to a certain order. The encoding / decoding device can derive a motion vector of a neighboring block that is first confirmed to satisfy the condition during the checking process as mv0. In other words, mv0 can be a motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the first group according to the certain order. If the motion vectors of the neighboring blocks within the first group do not satisfy the certain condition, mv0 can not exist. Here, for example, the certain order can be performed in the order of the neighboring block A, the neighboring block B, and the neighboring block C within the first group. Also, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0266] Also, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the second group satisfy a certain condition according to a certain order. The encoding / decoding device can derive a motion vector of a neighboring block that is first confirmed to satisfy the condition during the checking process as mv1. In other words, mv1 can be a motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the second group according to the certain order. If the motion vectors of the neighboring blocks within the second group do not satisfy the certain condition, mv1 can not exist. Here, for example, the certain order can be performed from the neighboring block D to the neighboring block E within the second group. Also, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0267] If mv0 and mv1 of the current block are available, i.e., if mv0 and mv1 of the current block are derived, the encoding / decoding device can provide the derived mv0 and mv1 as a constructed candidate of the current block at S1810. In addition, if mv0 and mv1 of the current block are not available, i.e., if at least one of mv0 and mv1 is not derived from the neighboring blocks of the current block, the encoding / decoding device can not add the constructed candidate to the affine MVP list of the current block.

[0268] In addition, a pruning check process can not be performed between the derived inherited affine candidate and the constructed affine candidate. The pruning check process can mean a process of checking whether the candidates are identical to each other and removing the latter derived candidate if the candidates are found to be identical.

[0269] Figure 19 One example of deriving a constructed candidate when a six-parameter affine motion model is applied to the current block is exemplified.

[0270] Referring to Figure 19 The encoding / decoding device can determine whether mv0, mv1, and mv2 are available among the neighboring blocks of the current block at S1900. In other words, the encoding / decoding device can determine whether available mv0, mv1, and mv2 exist in the neighboring blocks of the current block. Here, mv0 can mean a CPMVP candidate of CP0 of the current block, mv1 can mean a CPMVP candidate of CP1 of the current block, and mv2 can mean a CPMVP candidate of CP2 of the current block.

[0271] The encoding / decoding device can determine whether mv0 is available in a first group, whether mv1 is available in a second group, and whether mv2 is available in a third group.

[0272] Specifically, the neighboring blocks of the current block can be divided into three groups, and the neighboring blocks can include a neighboring block A, a neighboring block B, a neighboring block C, a neighboring block D, a neighboring block E, a neighboring block F, and a neighboring block G. The first group can include a motion vector of the neighboring block A, a motion vector of the neighboring block B, and a motion vector of the neighboring block C; the second group can include a motion vector of the neighboring block D and a motion vector of the neighboring block E; and the third group can include a motion vector of the neighboring block F and a motion vector of the neighboring block G. The neighboring block A can mean a neighboring block located left and above a top-left sample position of the current block; the neighboring block B can mean a neighboring block located above the top-left sample position of the current block; the neighboring block C can mean a neighboring block located left of the top-left sample position of the current block; the neighboring block D can mean a neighboring block located above a top-right sample position of the current block; the neighboring block E can mean a neighboring block located right and above the top-right sample position of the current block; the neighboring block F can mean a neighboring block located left of a bottom-left sample position of the current block; and the neighboring block G can mean a neighboring block located left and below the bottom-left sample position of the current block.

[0273] The encoding / decoding device can check whether the motion vectors of the neighboring blocks within the first group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv0. In other words, mv0 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the first group according to the certain order. If the motion vectors of the neighboring blocks within the first group do not satisfy the certain condition, mv0 can not exist. Here, for example, the certain order can be performed in the order of neighboring block A, neighboring block B, and neighboring block C within the first group. Also, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0274] Also, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the second group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv1. In other words, mv1 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the second group according to the certain order. If the motion vectors of the neighboring blocks within the second group do not satisfy the certain condition, mv1 can not exist. Here, for example, the certain order can be performed from neighboring block D to neighboring block E within the second group. Also, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0275] Also, the encoding / decoding device can check whether the motion vectors of the neighboring blocks within the third group satisfy a certain condition according to a certain order. The encoding / decoding device can derive the motion vector of the neighboring block that is first confirmed to satisfy the condition during the checking process as mv2. In other words, mv2 can be the motion vector that is first confirmed to satisfy the certain condition from checking the motion vectors within the third group according to the certain order. If the motion vectors of the neighboring blocks within the third group do not satisfy the certain condition, mv2 can not exist. Here, for example, the certain order can be performed from neighboring block F to neighboring block G within the third group. Also, for example, the certain condition can be such that the reference picture of the motion vector of the neighboring block is the same as the reference picture of the current block.

[0276] If the mvO, mv1 and mv2 of the current block are available, i.e., if the mvO, mv1 and mv2 of the current block are derived, the encoding / decoding device can provide the derived mvO, mv1 and mv2 as constructed candidates of the current block at S1910. In addition, if the mvO, mv1 and / or mv2 of the current block are not available, i.e., if at least one of the mvO, mv1 and mv2 is not derived from the neighboring blocks of the current block, the encoding / decoding device can not add the constructed candidates to the affine MVP list of the current block.

[0277] In addition, the pruning check process can not be performed between the derived inherited affine candidates and the constructed affine candidates.

[0278] In addition, when the number of derived affine candidates is less than 2 (i.e., when the number of inherited affine candidates and / or the number of constructed affine candidates is less than 2), the HEVC AMVP candidate can be added to the affine MVP list of the current block.

[0279] For example, the HEVC AMVP candidate can be derived in the following order.

[0280] More specifically, when the number of derived affine candidates is less than 2 and the CPMV0 of the constructed affine candidate is available, the CPMV0 can be used as an affine MVP candidate. In other words, when the number of derived affine candidates is less than 2 and the CPMV0 of the constructed affine candidate is available (i.e., when the number of derived affine candidates is less than 2 and the CPMV0 of the constructed affine candidate is derived), the CPMV0 of the constructed affine candidate can be derived as a first affine MVP candidate including the CPMV0, CPMV1 and CPMV2.

[0281] In addition, next, when the number of derived affine candidates is less than 2 and the CPMV1 of the constructed affine candidate is available, the CPMV1 can be used as an affine MVP candidate. In other words, when the number of derived affine candidates is less than 2 and the CPMV1 of the constructed affine candidate is available (i.e., when the number of derived affine candidates is less than 2 and the CPMV1 of the constructed affine candidate is derived), the CPMV1 of the constructed affine candidate can be derived as a second affine MVP candidate including the CPMV0, CPMV1 and CPMV2.

[0282] In addition, next, when the number of derived affine candidates is less than 2, and the CPMV2 of the constructed affine candidate is available, the CPMV2 can be used as an affine MVP candidate. In other words, when the number of derived affine candidates is less than 2, and the CPMV2 of the constructed affine candidate is available (i.e., when the number of derived affine candidates is less than 2, and the CPMV2 of the constructed affine candidate is derived), the CPMV2 of the constructed affine candidate can be derived as a third affine MVP candidate including the CPMV0, the CPMV1, and the CPMV2.

[0283] In addition, next, when the number of derived affine candidates is less than 2, a HEVC temporal motion vector predictor (TMVP) can be used as an affine MVP candidate. The HEVC TMVP can be derived based on motion information of a temporal neighboring block of the current block. In other words, when the number of derived affine candidates is less than 2, a motion vector of a temporal neighboring block of the current block can be derived as a third affine MVP candidate including the CPMV0, the CPMV1, and the CPMV2. The temporal neighboring block can indicate a collocated block within a collocated picture corresponding to the current block.

[0284] In addition, next, when the number of derived affine candidates is less than 2, a zero motion vector (MV) can be used as an affine MVP candidate. In other words, when the number of derived affine candidates is less than 2, a zero motion vector can be derived as a third affine MVP candidate including the CPMV0, the CPMV1, and the CPMV2. The zero motion vector can represent a motion vector whose elements are all zeros.

[0285] The processing steps using the CPMVs of the constructed affine candidate reuses the MVs that have already been considered to generate the constructed affine candidate, thereby reducing the processing complexity compared to the existing method for deriving HEVC AMVP candidates.

[0286] In addition, the disclosure proposes another embodiment for deriving inherited affine candidates.

[0287] To derive the inherited affine candidates, affine prediction information of neighboring blocks is needed, and more specifically, the following affine prediction information is needed:

[0288] 1) an affine flag (affine_flag) indicating whether affine prediction based encoding has been applied to the neighboring blocks, and

[0289] 2) motion information of the neighboring blocks.

[0290] If the four-parameter affine motion model is applied to the neighboring block, the motion information of the neighboring block can include L0 motion information and L1 motion information for CP0, and L0 motion information and L1 motion information for CP1. In addition, if the six-parameter affine motion model is applied to the neighboring block, the motion information of the neighboring block can include L0 motion information and L1 motion information for CP0, and L0 motion information and L1 motion information for CP2. Here, the L0 motion information can denote motion information for a list 0 (L0), and the L1 motion information can denote motion information for a list 1 (L1). The L0 motion information can include an L0 reference picture index and an L0 motion vector, and the L1 motion information can include an L1 reference picture index and an L1 motion vector.

[0291] As described above, in the case of affine prediction, a large amount of information must be stored, which can be a major cause of an increase in hardware cost in actual implementation of an encoding / decoding device. Specifically, if the neighboring block is located above the current block and belongs to a CTU boundary, a line buffer needs to be used to store information related to affine prediction of the neighboring block, which can further increase implementation cost. Hereinafter, this problem can be referred to as a line buffer problem. In this regard, the disclosure proposes an embodiment for deriving an inherited affine candidate that minimizes hardware cost by not storing information related to affine prediction in a line buffer or by reducing information related to affine prediction in a line buffer. The proposed embodiment can improve encoding performance by reducing computational complexity in deriving an inherited affine candidate. In addition, it should be noted that the line buffer already stores motion information about a block of 4x4 size, and if information related to affine prediction is additionally stored, the amount of stored information can be increased to three times the existing storage amount.

[0292] In the present embodiment, additional information about affine prediction can not be stored in the line buffer, and when the inherited affine candidate must be generated using information within the line buffer, generation of the inherited affine candidate can be limited.

[0293] Figure 20a and Figure 20b Embodiments for deriving an inherited affine candidate are exemplified.

[0294] Referring to Figure 20a, when the neighboring block B of the current block (i.e., the neighboring block above the current block) does not belong to the same CTU as the current block, the neighboring block B can not be used to generate the inherited affine candidate. In addition, although the neighboring block A also does not belong to the same CTU as the current block, information about the neighboring block A is not stored in the line buffer, and thus the neighboring block A can be used to generate the inherited affine candidate. Therefore, according to the present embodiment, only when the neighboring block above the current block belongs to the same CTU as the current block, the neighboring block can be used to derive the inherited affine candidate. In addition, when the neighboring block above the current block does not belong to the same CTU as the current block, the upper neighboring block can not be used to derive the inherited affine candidate.

[0295] With reference to Figure 20b , the neighboring block B of the current block (i.e., the neighboring block above the current block) can belong to the same CTU as the current block. In this case, the encoding / decoding device can generate the inherited affine candidate by referring to the neighboring block B.

[0296] Figure 21 A video encoding method performed by an encoding device according to the present disclosure is exemplified. Figure 21 The method disclosed in the Figure 2 may be performed by the encoding device disclosed in the. More specifically, for example, the steps S2100 to S2120 can be performed by a predictor of the encoding device, the step S2130 can be performed by a subtractor of the encoding device, and the step S2140 can be performed by an entropy encoder of the encoding device. In addition, although not shown in the figure, a process for deriving prediction samples of the current block based on the CPMV can be performed by the predictor of the encoding device, a process for deriving residual samples of the current block based on original samples and the prediction samples of the current block can be performed by the subtractor of the encoding device, a process for generating information about a residual of the current block based on the residual samples can be performed by a transformer of the encoding device, and a process for encoding the information about the residual can be performed by an encoder of the encoding device.

[0297] At S2100, the encoding device constructs an affine motion vector predictor (MVP) candidate list of the current block. The encoding device can construct an affine MVP candidate list of the current block including affine MVP candidates. The maximum number of affine MVP candidates in the affine MVP candidate list can be 2.

[0298] In addition, as an example, the affine MVP candidate list can include inherited affine MVP candidates. The encoding device can check whether inherited affine MVP candidates of the current block are available, and if the inherited affine MVP candidates are available, the inherited affine MVP candidates can be derived. For example, the inherited affine MVP candidates can be derived based on neighboring blocks of the current block, and a maximum number of the inherited affine MVP candidates can be 2. The availability of the neighboring blocks can be checked in a certain order, and the inherited affine MVP candidates can be derived based on the checked available neighboring blocks. In other words, the availability of the neighboring blocks can be checked in a certain order, a first inherited affine MVP candidate can be derived based on a first checked available neighboring block, and a second inherited affine MVP candidate can be derived based on a second checked available neighboring block. The availability can mean that the neighboring block is encoded based on an affine motion model, and a reference picture of the neighboring block is the same as a reference picture of the current block. In other words, the available neighboring block can refer to a neighboring block that is encoded according to an affine motion model (i.e., a neighboring block to which affine prediction is applied) and whose reference picture is the same as a reference picture of the current block. More specifically, the encoding device can derive a motion vector of a CP of the current block based on an affine motion model of the first checked available neighboring block, and derive a first inherited affine MVP candidate including the motion vector as a CPMVP candidate. In addition, the encoding device can derive a motion vector of the CP of the current block based on an affine motion model of the second checked available neighboring block, and derive a second inherited affine MVP candidate including the motion vector as a CPMVP candidate. The affine motion model can be derived in Equation 1 or Equation 3 above.

[0299] Additionally, in other words, the neighboring blocks can be checked in a particular order to see if the neighboring blocks satisfy a particular condition, and the inherited affine MVP candidate can be derived based on the neighboring block that first satisfies the particular condition. In other words, the neighboring blocks can be checked in a particular order to see if the neighboring blocks satisfy a particular condition, a first inherited affine MVP candidate can be derived based on the neighboring block that first satisfies the particular condition, and a second inherited affine MVP candidate can be derived based on the second neighboring block that satisfies the particular condition. More specifically, the encoding device can derive a motion vector for a CP of the current block based on the affine motion model of the neighboring block that first satisfies the particular condition, and derive a first inherited affine MVP candidate that includes the motion vector as a CPMVP candidate. Additionally, the encoding device can derive a motion vector for the CP of the current block based on the affine motion model of the second neighboring block that satisfies the particular condition, and derive a second inherited affine MVP candidate that includes the motion vector as a CPMVP candidate. The affine motion model can be derived in accordance with Equation 1 or Equation 3 above. Furthermore, the particular condition can indicate that the neighboring block is coded according to an affine motion model, and that the reference picture of the neighboring block is the same as the reference picture of the current block. In other words, the neighboring block that satisfies the particular condition can be coded according to an affine motion model (i.e., affine prediction is applied to the neighboring block), and the reference picture is the same as the reference picture of the current block.

[0300] Here, for example, the neighboring blocks can include a left neighboring block, an above neighboring block, a top-right corner neighboring block, a bottom-left corner neighboring block, and a top-left corner neighboring block of the current block. In this case, the particular order can be an order from the left neighboring block to the bottom-left corner neighboring block to the above neighboring block to the top-right corner neighboring block to the top-left corner neighboring block.

[0301] Alternatively, for example, the neighboring blocks can include only the left neighboring block and the above neighboring block. In this case, the particular order can be an order from the left neighboring block to the above neighboring block.

[0302] Alternatively, for example, the neighboring blocks can include the left neighboring block, and the neighboring blocks can further include the above neighboring block if the above neighboring block belongs to a current CTU that includes the current block. In this case, the particular order can be an order from the left neighboring block to the above neighboring block. Additionally, the neighboring blocks can not include the above neighboring block if the above neighboring block does not belong to the current CTU. In this case, only the left neighboring block can be checked.

[0303] Further, when a size of the current block is WxH, an x-component of a top-left sample position of the current block is 0, and a y-component thereof is 0, the bottom-left corner neighboring block can be a block including a sample at coordinates (-1, H), the left neighboring block can be a block including a sample at coordinates (-1, H-1), the top-right corner neighboring block can be a block including a sample at coordinates (W, -1), the top neighboring block can be a block including a sample at coordinates (W-1, -1), and the top-left corner neighboring block can be a block including a sample at coordinates (-1, -1). In other words, the left neighboring block can be a left neighboring block of the current block that is at a lowest position among the left neighboring blocks of the current block, and the top neighboring block can be a top neighboring block of the current block that is at a leftmost position among the top neighboring blocks of the current block.

[0304] In addition, as one example, the affine MVP candidate list can include a constructed affine MVP candidate if the constructed affine MVP candidate is available. The encoding device can check whether the constructed affine MVP candidate of the current block is available, and can derive the constructed affine MVP candidate if the constructed affine MVP candidate is available. In addition, for example, the constructed affine MVP candidate can be derived after the inherited affine MVP candidate is derived. If the number of derived affine MVP candidates (i.e., the number of inherited affine MVPs) is less than 2, and the constructed affine MVP candidate is available, the affine MVP candidate list can include the constructed affine MVP candidate. Here, the constructed affine MVP candidate can include a candidate motion vector of a CP. The constructed affine MVP candidate can be available when all candidate motion vectors are available.

[0305] For example, if a four-parameter affine motion model is applied to the current block, the CPs of the current block can include CP0 and CP1. If a candidate motion vector of CP0 is available, and a candidate motion vector of CP1 is available, the constructed affine MVP candidate can be available, and the affine MVP candidate list can include the constructed affine MVP candidate. Here, CP0 can denote a top-left position of the current block, and CP1 can denote a top-right position of the current block.

[0306] The constructed affine MVP candidate can include a candidate motion vector of CP0 and a candidate motion vector of CP1. The candidate motion vector of CP0 can be a motion vector of a first block, and the candidate motion vector of CP1 can be a motion vector of a second block.

[0307] Additionally, the first block can be a block that has been first confirmed to have the same reference picture as the current block while checking the neighboring blocks in the first group in the first particular order. In other words, the candidate motion vector of CP1 can be a motion vector of a block that has been first confirmed to have the same reference picture as the current block by checking the neighboring blocks within the first group according to the first order. The availability can indicate that there is a neighboring block, and the neighboring block is encoded by inter prediction. Here, the candidate motion vector of CP0 can be available if the reference picture of the first block within the first group is the same as the reference picture of the current block. Additionally, for example, the first group can include a neighboring block A, a neighboring block B, and a neighboring block C, and the first particular order can be an order from the neighboring block A to the neighboring block B, and then to the neighboring block C.

[0308] Additionally, the second block can be a block that has been first confirmed to have the same reference picture as the current block while checking the neighboring blocks in the second group in the second particular order. Here, the candidate motion vector of CP1 can be available if the reference picture of the second block within the second group is the same as the reference picture of the current block. Additionally, for example, the second group can include a neighboring block D and a neighboring block E, and the second particular order can be an order from the neighboring block D to the neighboring block E.

[0309] Further, when the size of the current block is WxH, the x component of the top-left sample position of the current block is 0, and the y component thereof is 0, the neighboring block A can be a block including a sample at coordinates (-1, -1), the neighboring block B can be a block including a sample at coordinates (0, -1), the neighboring block C can be a block including a sample at coordinates (-1, 0), the neighboring block D can be a block including a sample at coordinates (W-1, -1), and the neighboring block E can be a block including a sample at coordinates (W, -1). In other words, the neighboring block A can be a top-left corner neighboring block of the current block, the neighboring block B can be an upper neighboring block of the current block among upper neighboring blocks at a leftmost position, the neighboring block C can be a left neighboring block of the current block among left neighboring blocks at a topmost position, the neighboring block D can be an upper neighboring block of the current block among upper neighboring blocks at a rightmost position, and the neighboring block E can be a top-right corner neighboring block of the current block.

[0310] Further, if at least one of the candidate motion vector of CP0 and the candidate motion vector of CP1 is not available, the constructed affine MVP candidate can not be available.

[0311] Alternatively, for example, if a six-parameter affine motion model is applied to the current block, the CPs of the current block can include CP0, CP1, and CP2. If a candidate motion vector for CP0 is available, a candidate motion vector for CP1 is available, and a candidate motion vector for CP2 is available, a constructed affine MVP candidate can be available, and an affine MVP candidate list can include the constructed affine MVP candidate. Here, CP0 can denote a top-left position of the current block, CP1 can denote a top-right position of the current block, and CP2 can denote a bottom-left position of the current block.

[0312] The constructed affine MVP candidate can include a candidate motion vector for CP0, a candidate motion vector for CP1, and a candidate motion vector for CP2. The candidate motion vector for CP0 can be a motion vector of a first block, the candidate motion vector for CP1 can be a motion vector of a second block, and the candidate motion vector for CP2 can be a motion vector of a third block.

[0313] In addition, the first block can be a block that has been first confirmed to have the same reference picture as the current block while checking the neighboring blocks in the first group in a first specific order. Here, if the reference picture of the first block within the first group is the same as the reference picture of the current block, the candidate motion vector for CP0 can be available. In addition, for example, the first group can include a neighboring block A, a neighboring block B, and a neighboring block C, and the first specific order can be an order from the neighboring block A to the neighboring block B, and then to the neighboring block C.

[0314] In addition, the second block can be a block that has been first confirmed to have the same reference picture as the current block while checking the neighboring blocks in the second group in a second specific order. Here, if the reference picture of the second block within the second group is the same as the reference picture of the current block, the candidate motion vector for CP1 can be available. In addition, for example, the second group can include a neighboring block D and a neighboring block E, and the second specific order can be an order from the neighboring block D to the neighboring block E.

[0315] In addition, the third block can be a block that has been first confirmed to have the same reference picture as the current block while checking the neighboring blocks in the third group in a third specific order. Here, if the reference picture of the third block within the third group is the same as the reference picture of the current block, the candidate motion vector for CP2 can be available. In addition, for example, the third group can include a neighboring block F and a neighboring block G, and the third specific order can be an order from the neighboring block F to the neighboring block G.

[0316] Further, when the size of the current block is WxH, the x-component of the top-left sample position of the current block is 0, and the y-component of the top-left sample position of the current block is 0, the neighboring block A can be a block including a sample at coordinate (-1, -1), the neighboring block B can be a block including a sample at coordinate (0, -1), the neighboring block C can be a block including a sample at coordinate (-1, 0), the neighboring block D can be a block including a sample at coordinate (W-1, -1), the neighboring block E can be a block including a sample at coordinate (W, -1), the neighboring block F can be a block including a sample at coordinate (-1, H-1), and the neighboring block G can be a block including a sample at coordinate (-1, H). In other words, the neighboring block A can be a top-left corner neighboring block of the current block, the neighboring block B can be a top neighboring block of the current block among the top neighboring blocks at the leftmost position, the neighboring block C can be a left neighboring block of the current block among the left neighboring blocks at the highest position, the neighboring block D can be a top neighboring block of the current block among the top neighboring blocks at the rightmost position, the neighboring block E can be a top-right corner neighboring block of the current block, the neighboring block F can be a left neighboring block of the current block among the left neighboring blocks at the lowest position, and the neighboring block G can be a bottom-left corner neighboring block of the current block.

[0317] Further, if at least one of the candidate motion vector of CP0, the candidate motion vector of CP1, and the candidate motion vector of CP2 is not available, the constructed affine MVP candidate can not be available.

[0318] Afterwards, the affine MVP candidate list can be derived based on steps described below.

[0319] For example, when the number of derived affine MVP candidates is less than 2 and the motion vector of CP0 is available, the encoding device can derive a first affine MVP candidate. Here, the first affine MVP candidate can be an affine MVP candidate including the motion vector of CP0 as the candidate motion vector of CP.

[0320] In addition, for example, when the number of derived affine MVP candidates is less than 2 and the motion vector of CP1 is available, the encoding device can derive a second affine MVP candidate. Here, the second affine MVP candidate can be an affine MVP candidate including the motion vector of CP1 as the candidate motion vector of CP.

[0321] In addition, for example, when the number of derived affine MVP candidates is less than 2 and the motion vector of CP2 is available, the encoding device can derive a third affine MVP candidate. Here, the third affine MVP candidate can be an affine MVP candidate including the motion vector of CP2 as the candidate motion vector of CP.

[0322] Additionally, for example, when the number of derived affine MVP candidates is less than 2, the encoding device can derive a fourth affine MVP candidate that includes a temporal MVP derived based on a temporal neighboring block of the current block as a candidate motion vector for the CP. The temporal neighboring block can refer to a same collocated block within a same collocated picture corresponding to the current block. The temporal MVP can be derived based on a motion vector of the temporal neighboring block.

[0323] Additionally, for example, when the number of derived affine MVP candidates is less than 2, the encoding device can derive a fifth affine MVP candidate that includes a zero motion vector as a candidate motion vector for the CP. The zero motion vector can represent a motion vector with all elements being zero.

[0324] At S2110, the encoding device derives control point motion vector predictors (CPMVPs) for control points (CPs) of the current block based on the list of affine MVP candidates. The encoding device can derive a CPMVP for a CP of the current block that exhibits a best RD cost, and can select an affine MVP candidate among the affine MVP candidates that is most similar to the CPMVP as an affine MVP candidate for the current block. The encoding device can derive CPMVPs for the CPs of the current block based on the selected affine MVP candidate among the affine MVP candidates. More specifically, if the affine MVP candidate includes a candidate motion vector for CP0 and a candidate motion vector for CP1, the candidate motion vector for CP0 of the affine MVP candidate can be derived as the CPMVP for CP0 and the candidate motion vector for CP1 of the affine MVP candidate can be derived as the CPMVP for CP1. Additionally, if the affine MVP candidate includes a candidate motion vector for CP0, a candidate motion vector for CP1, and a candidate motion vector for CP2, the candidate motion vector for CP0 of the affine MVP candidate can be derived as the CPMVP for CP0, the candidate motion vector for CP1 of the affine MVP candidate can be derived as the CPMVP for CP1, and the candidate motion vector for CP2 of the affine MVP candidate can be derived as the CPMVP for CP2. Additionally, if the affine MVP candidate includes a candidate motion vector for CP0 and a candidate motion vector for CP2, the candidate motion vector for CP0 of the affine MVP candidate can be derived as the CPMVP for CP0 and the candidate motion vector for CP2 of the affine MVP candidate can be derived as the CPMVP for CP2.

[0325] The encoding device can encode an affine MVP candidate index that indicates the selected affine MVP candidate among the affine MVP candidates. The affine MVP candidate index can indicate one affine MVP candidate among the affine MVP candidates included in an affine motion vector predictor (MVP) candidate list for the current block.

[0326] At S2120, the encoding device derives a CPMV of a CP of the current block. The encoding device can derive the CPMV of each CP of the current block.

[0327] At S2130, the encoding device derives a control point motion vector difference (CPMVD) of the CP of the current block based on the CPMVP and the CPMV. The encoding device can derive the CPMVD of the CP of the current block based on the CPMVP and the CPMV of each CP.

[0328] At S2140, the encoding device encodes motion prediction information including information on the CPMVD. The encoding device can output the motion prediction information including the information on the CPMVD in the form of a bitstream. In other words, the encoding device can output image information including the motion prediction information in the form of a bitstream. The encoding device can encode information on the CPMVD of each CP, wherein the motion prediction information can include the information on the CPMVD.

[0329] In addition, the motion prediction can include an affine MVP candidate index. The affine MVP candidate index can indicate a selected affine MVP candidate among affine MVP candidates included in an affine motion vector predictor (MVP) candidate list of the current block.

[0330] Further, as one example, the encoding device can derive predicted samples of the current block based on the CPMV, derive residual samples of the current block based on original samples of the current block and the predicted samples, generate information on a residual of the current block based on the residual samples, and encode the information on the residual. The image information can include the information on the residual.

[0331] Further, the bitstream can be transmitted to a decoding device through a network or a (digital) storage medium. Here, the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various types of storage media including USB, SD, CD, DVD, Blu-ray, HDD, and SSD.

[0332] Figure 22 An encoding device performing a video encoding method according to the disclosure is exemplified. Figure 21 The method disclosed in the Figure 22 The encoding device disclosed in the can perform. More specifically, for example, the predictor of the encoding device can perform Figure 21 the steps of S2100 to S2130 of the Figure 22 The entropy encoder of the encoding device of the can perform Figure 21 the step of S2140 of the In addition, although not shown in the figure, a process for deriving predicted samples of the current block based on the CPMV can be performed by Figure 22the predictor of the encoding device, for deriving the residual samples of the current block based on the original samples and the predicted samples of the current block, can be performed by Figure 22 the subtractor of the encoding device, for generating the information about the residual of the current block based on the residual samples, can be performed by the transformer of the encoding device, and for encoding the information about the residual, can be performed by Figure 22 the entropy encoder of the encoding device.

[0333] Figure 23 A video decoding method performed by a decoding device according to the present disclosure is exemplified. Figure 23 The method disclosed in the Figure 3 The decoding device disclosed in the can perform. More specifically, for example, the step S2300 of Figure 23 the predictor of the decoding device, the steps S2310 to S2350 can be performed by the predictor of the decoding device, and the step S2360 can be performed by the adder of the decoding device. In addition, although not shown in the figure, the processing for obtaining the information about the residual of the current block from the bitstream can be performed by the entropy decoder of the decoding device, and the processing for deriving the residual samples of the current block based on the residual information can be performed by the inverse transformer of the decoding device.

[0334] At S2300, the decoding device obtains the motion prediction information of the current block from the bitstream. The decoding device can obtain the image information including the motion prediction information from the bitstream.

[0335] In addition, for example, the motion prediction information can include information about a control point (CP) motion vector difference (CPMVD) of the current block. In other words, the motion prediction information can include information about a CPMVD of each CP of the current block.

[0336] In addition, for example, the motion prediction information can include an affine motion vector predictor (MVP) candidate index of the current block. The affine MVP candidate index can indicate one of the affine MVP candidates included in an affine MVP candidate list of the current block.

[0337] At S2310, the decoding device constructs an affine MVP candidate list of the current block. The decoding device can construct the affine MVP candidate list of the current block including the affine MVP candidate. The maximum number of the affine MVP candidates in the affine MVP candidate list can be 2.

[0338] Further, as an example, the affine MVP candidate list can include inherited affine MVP candidates. The decoding device can check whether inherited affine MVP candidates of the current block are available, and if the inherited affine MVP candidates are available, can derive the inherited affine MVP candidates. For example, the inherited affine MVP candidates can be derived based on neighboring blocks of the current block, and a maximum number of the inherited affine MVP candidates can be 2. The availability of the neighboring blocks can be checked in a particular order, and the inherited affine MVP candidates can be derived based on the checked available neighboring blocks. In other words, the availability of the neighboring blocks can be checked in a particular order, a first inherited affine MVP candidate can be derived based on a first checked available neighboring block, and a second inherited affine MVP candidate can be derived based on a second checked available neighboring block. The availability can mean that the neighboring block is encoded based on an affine motion model, and a reference picture of the neighboring block is the same as a reference picture of the current block. In other words, an available neighboring block can refer to a neighboring block that is encoded according to an affine motion model (i.e., a neighboring block to which affine prediction is applied) and whose reference picture is the same as a reference picture of the current block. More specifically, the decoding device can derive a motion vector of a CP of the current block based on an affine motion model of the first checked available neighboring block, and derive a first inherited affine MVP candidate including the motion vector as a CPMVP candidate. In addition, the decoding device can derive a motion vector of the CP of the current block based on an affine motion model of the second checked available neighboring block, and derive a second inherited affine MVP candidate including the motion vector as a CPMVP candidate. The affine motion model can be derived in the above Equation 1 or the above Equation 3.

[0339] Additionally, in other words, the neighboring blocks can be checked in a particular order to see if the neighboring blocks satisfy a particular condition, and the inherited affine MVP candidate can be derived based on the neighboring block that first satisfies the particular condition. In other words, the neighboring blocks can be checked in a particular order to see if the neighboring blocks satisfy a particular condition, a first inherited affine MVP candidate can be derived based on the neighboring block that first satisfies the particular condition, and a second inherited affine MVP candidate can be derived based on the second neighboring block that satisfies the particular condition. More specifically, the decoding device can derive a motion vector for a CP of the current block based on the affine motion model of the neighboring block that first satisfies the particular condition, and derive a first inherited affine MVP candidate including the motion vector as a CPMVP candidate. Additionally, the decoding device can derive a motion vector for the CP of the current block based on the affine motion model of the second neighboring block that satisfies the particular condition, and derive a second inherited affine MVP candidate including the motion vector as a CPMVP candidate. The affine motion model can be derived in accordance with Equation 1 or Equation 3 above. Furthermore, the particular condition can indicate that the neighboring block is encoded according to an affine motion model and that the reference picture of the neighboring block is the same as the reference picture of the current block. In other words, the neighboring block that satisfies the particular condition can be encoded according to an affine motion model (i.e., affine prediction is applied to the neighboring block) and the reference picture is the same as the reference picture of the current block.

[0340] Here, for example, the neighboring blocks can include a left neighboring block, an above neighboring block, a top-right corner neighboring block, a bottom-left corner neighboring block, and a top-left corner neighboring block of the current block. In this case, the particular order can be an order from the left neighboring block to the bottom-left corner neighboring block to the above neighboring block to the top-right corner neighboring block to the top-left corner neighboring block.

[0341] Alternatively, for example, the neighboring blocks can include only the left neighboring block and the above neighboring block. In this case, the particular order can be an order from the left neighboring block to the above neighboring block.

[0342] Alternatively, for example, the neighboring blocks can include the left neighboring block, and the neighboring blocks can further include the above neighboring block if the above neighboring block belongs to a current CTU that includes the current block. In this case, the particular order can be an order from the left neighboring block to the above neighboring block. Additionally, the neighboring blocks can not include the above neighboring block if the above neighboring block does not belong to the current CTU. In this case, only the left neighboring block can be checked. In other words, the above neighboring block can be used to derive the inherited affine MVP candidate if the above neighboring block of the current block belongs to a current coding tree unit (CTU) that includes the current block, and the above neighboring block can not be used to derive the inherited affine MVP candidate if the above neighboring block of the current block does not belong to the current CTU.

[0343] Further, when a size of the current block is WxH, an x-component of a top-left sample position of the current block is 0, and a y-component thereof is 0, the bottom-left corner neighboring block can be a block including a sample at coordinates (-1, H), the left neighboring block can be a block including a sample at coordinates (-1, H-1), the top-right corner neighboring block can be a block including a sample at coordinates (W, -1), the top neighboring block can be a block including a sample at coordinates (W-1, -1), and the top-left corner neighboring block can be a block including a sample at coordinates (-1, -1). In other words, the left neighboring block can be a left neighboring block of the current block that is at a lowest position among the left neighboring blocks of the current block, and the top neighboring block can be a top neighboring block of the current block that is at a leftmost position among the top neighboring blocks of the current block.

[0344] In addition, as one example, the affine MVP candidate list can include a constructed affine MVP candidate if the constructed affine MVP candidate is available. The decoding device can check whether the constructed affine MVP candidate of the current block is available, and can derive the constructed affine MVP candidate if the constructed affine MVP candidate is available. In addition, for example, the constructed affine MVP candidate can be derived after the inherited affine MVP candidate is derived. If the number of derived affine MVP candidates (i.e., the number of inherited affine MVPs) is less than 2, and the constructed affine MVP candidate is available, the affine MVP candidate list can include the constructed affine MVP candidate. Here, the constructed affine MVP candidate can include candidate motion vectors of CPs. The constructed affine MVP candidate can be available when all candidate motion vectors are available.

[0345] For example, if a four-parameter affine motion model is applied to the current block, the CPs of the current block can include CP0 and CP1. If a candidate motion vector of CP0 is available, and a candidate motion vector of CP1 is available, the constructed affine MVP candidate can be available, and the affine MVP candidate list can include the constructed affine MVP candidate. Here, CP0 can denote a top-left position of the current block, and CP1 can denote a top-right position of the current block.

[0346] The constructed affine MVP candidate can include a candidate motion vector of CP0 and a candidate motion vector of CP1. The candidate motion vector of CP0 can be a motion vector of a first block, and the candidate motion vector of CP1 can be a motion vector of a second block.

[0347] Also, the first block can be a block that has been first confirmed to have the same reference picture as the current block while checking the neighboring blocks in the first group in the first specific order. In other words, the candidate motion vector of CP1 can be a motion vector of a block whose reference picture is first confirmed to be the same as that of the current block by checking the neighboring blocks within the first group according to the first order. The availability can indicate that there is a neighboring block, and the neighboring block is encoded by inter prediction. Here, the candidate motion vector of CP0 can be available if the reference picture of the first block within the first group is the same as that of the current block. Also, for example, the first group can include a neighboring block A, a neighboring block B, and a neighboring block C, and the first specific order can be an order from the neighboring block A to the neighboring block B, and then to the neighboring block C.

[0348] Also, the second block can be a block that has been first confirmed to have the same reference picture as the current block while checking the neighboring blocks in the second group in the second specific order. Here, the candidate motion vector of CP1 can be available if the reference picture of the second block within the second group is the same as that of the current block. Also, for example, the second group can include a neighboring block D and a neighboring block E, and the second specific order can be an order from the neighboring block D to the neighboring block E.

[0349] Also, when the size of the current block is WxH, the x component of the top-left sample position of the current block is 0, and the y component thereof is 0, the neighboring block A can be a block including a sample at coordinates (-1, -1), the neighboring block B can be a block including a sample at coordinates (0, -1), the neighboring block C can be a block including a sample at coordinates (-1, 0), the neighboring block D can be a block including a sample at coordinates (W-1, -1), and the neighboring block E can be a block including a sample at coordinates (W, -1). In other words, the neighboring block A can be a top-left corner neighboring block of the current block, the neighboring block B can be a top neighboring block among the top neighboring blocks of the current block at a leftmost position, the neighboring block C can be a left neighboring block among the left neighboring blocks of the current block at a topmost position, the neighboring block D can be a top neighboring block among the top neighboring blocks of the current block at a rightmost position, and the neighboring block E can be a top-right corner neighboring block of the current block.

[0350] Also, if at least one of the candidate motion vector of CP0 and the candidate motion vector of CP1 is not available, the constructed affine MVP candidate can not be available.

[0351] Alternatively, for example, if a six-parameter affine motion model is applied to the current block, the CPs of the current block can include CP0, CP1, and CP2. If a candidate motion vector for CP0 is available, a candidate motion vector for CP1 is available, and a candidate motion vector for CP2 is available, a constructed affine MVP candidate can be available, and an affine MVP candidate list can include the constructed affine MVP candidate. Here, CP0 can denote a top-left position of the current block, CP1 can denote a top-right position of the current block, and CP2 can denote a bottom-left position of the current block.

[0352] The constructed affine MVP candidate can include a candidate motion vector for CP0, a candidate motion vector for CP1, and a candidate motion vector for CP2. The candidate motion vector for CP0 can be a motion vector of a first block, the candidate motion vector for CP1 can be a motion vector of a second block, and the candidate motion vector for CP2 can be a motion vector of a third block.

[0353] In addition, the first block can be a block that has been first confirmed to have the same reference picture as the current block while checking the neighboring blocks in the first group in a first specific order. Here, if the reference picture of the first block within the first group is the same as the reference picture of the current block, the candidate motion vector for CP0 can be available. In addition, for example, the first group can include a neighboring block A, a neighboring block B, and a neighboring block C, and the first specific order can be an order from the neighboring block A to the neighboring block B, and then to the neighboring block C.

[0354] In addition, the second block can be a block that has been first confirmed to have the same reference picture as the current block while checking the neighboring blocks in the second group in a second specific order. Here, if the reference picture of the second block within the second group is the same as the reference picture of the current block, the candidate motion vector for CP1 can be available. In addition, for example, the second group can include a neighboring block D and a neighboring block E, and the second specific order can be an order from the neighboring block D to the neighboring block E.

[0355] In addition, the third block can be a block that has been first confirmed to have the same reference picture as the current block while checking the neighboring blocks in the third group in a third specific order. Here, if the reference picture of the third block within the third group is the same as the reference picture of the current block, the candidate motion vector for CP2 can be available. In addition, for example, the third group can include a neighboring block F and a neighboring block G, and the third specific order can be an order from the neighboring block F to the neighboring block G.

[0356] Further, when the size of the current block is WxH, the x-component of the top-left sample position of the current block is 0, and the y-component of the top-left sample position of the current block is 0, the neighboring block A can be a block including a sample at coordinate (-1, -1), the neighboring block B can be a block including a sample at coordinate (0, -1), the neighboring block C can be a block including a sample at coordinate (-1, 0), the neighboring block D can be a block including a sample at coordinate (W-1, -1), the neighboring block E can be a block including a sample at coordinate (W, -1), the neighboring block F can be a block including a sample at coordinate (-1, H-1), and the neighboring block G can be a block including a sample at coordinate (-1, H). In other words, the neighboring block A can be a top-left corner neighboring block of the current block, the neighboring block B can be an upper neighboring block of the current block among the upper neighboring blocks at the leftmost position, the neighboring block C can be a left neighboring block of the current block among the left neighboring blocks at the uppermost position, the neighboring block D can be an upper neighboring block of the current block among the upper neighboring blocks at the rightmost position, the neighboring block E can be a top-right corner neighboring block of the current block, the neighboring block F can be a left neighboring block of the current block among the left neighboring blocks at the lowermost position, and the neighboring block G can be a bottom-left corner neighboring block of the current block.

[0357] Further, if at least one of the candidate motion vector of CP0, the candidate motion vector of CP1, and the candidate motion vector of CP2 is not available, the constructed affine MVP candidate can not be available.

[0358] Further, a pruning check process can not be performed between the inherited affine MVP candidate and the constructed affine MVP candidate. The pruning check process can mean a process of checking whether the constructed affine MVP candidate is the same as the inherited affine MVP candidate, and not deriving the constructed affine MVP candidate if they are found to be the same.

[0359] Thereafter, the affine MVP candidate list can be derived based on steps described below.

[0360] For example, when the number of the derived affine MVP candidates is less than 2 and the motion vector of CP0 is available, the decoding device can derive a first affine MVP candidate. Here, the first affine MVP candidate can be an affine MVP candidate including the motion vector of CP0 as a candidate motion vector of CP.

[0361] In addition, for example, when the number of the derived affine MVP candidates is less than 2 and the motion vector of CP1 is available, the decoding device can derive a second affine MVP candidate. Here, the second affine MVP candidate can be an affine MVP candidate including the motion vector of CP1 as a candidate motion vector of CP.

[0362] Additionally, for example, when the number of derived affine MVP candidates is less than 2 and the motion vector of CP2 is available, the decoding device can derive a third affine MVP candidate. Here, the third affine MVP candidate can be an affine MVP candidate that includes the motion vector of CP2 as a candidate motion vector of the CP.

[0363] Additionally, for example, when the number of derived affine MVP candidates is less than 2, the decoding device can derive a fourth affine MVP candidate that includes a temporal MVP derived based on a temporal neighboring block of the current block as a candidate motion vector of the CP. The temporal neighboring block can refer to a co-located block within a same co-located picture corresponding to the current block. The temporal MVP can be derived based on a motion vector of the temporal neighboring block.

[0364] Additionally, for example, when the number of derived affine MVP candidates is less than 2, the decoding device can derive a fifth affine MVP candidate that includes a zero motion vector as a candidate motion vector of the CP. The zero motion vector can represent a motion vector whose elements are all zeros.

[0365] At S2320, the decoding device derives control point motion vector predictors (CPMVPs) for control points (CPs) of the current block based on the affine MVP candidate list.

[0366] The decoding device can select a particular affine MVP candidate among the affine MVP candidates included in the affine MVP candidate list, and derive the selected affine MVP candidate as the CPMVPs of the CPs of the current block. For example, the decoding device can obtain an affine MVP candidate index of the current block from the bitstream, and among the affine MVP candidates included in the affine MVP candidate list, derive the affine MVP candidate indicated by the affine MVP candidate index as the CPMVPs of the CPs of the current block. More specifically, if the affine MVP candidate includes a candidate motion vector of CP0 and a candidate motion vector of CP1, the candidate motion vector of CP0 of the affine MVP candidate can be derived as the CPMVP of CP0, and the candidate motion vector of CP1 of the affine MVP candidate can be derived as the CPMVP of CP1. In addition, if the affine MVP candidate includes a candidate motion vector of CP0, a candidate motion vector of CP1, and a candidate motion vector of CP2, the candidate motion vector of CP0 of the affine MVP candidate can be derived as the CPMVP of CP0, the candidate motion vector of CP1 of the affine MVP candidate can be derived as the CPMVP of CP1, and the candidate motion vector of CP2 of the affine MVP candidate can be derived as the CPMVP of CP2. In addition, if the affine MVP candidate includes a candidate motion vector of CP0 and a candidate motion vector of CP2, the candidate motion vector of CP0 of the affine MVP candidate can be derived as the CPMVP of CP0, and the candidate motion vector of CP2 of the affine MVP candidate can be derived as the CPMVP of CP2.

[0367] At S2330, the decoding device derives control point motion vector differences (CPMVDs) of the CPs of the current block based on the motion prediction information. The motion prediction information can include information about the CPMVD of each CP, and the decoding device can derive the CPMVD of each CP of the current block based on the information about the CPMVD of each CP.

[0368] At S2340, the decoding device derives control point motion vectors (CPMVs) of the CPs of the current block based on the CPMVPs and the CPMVDs. The decoding device can derive the CPMV of each CP based on the CPMVP and the CPMVD of each CP. For example, the decoding device can derive the CPMV of each CP by adding the CPMVP and the CPMVD of the CP.

[0369] At S2350, the decoding device derives prediction samples of the current block based on the CPMV. The decoding device can derive the motion vector of the current block in sub-blocks or samples based on the CPMV. In other words, the decoding device can derive the motion vector of each sub-block or each sample of the current block based on the CPMV. The motion vector in sub-blocks or samples can be derived in accordance with the above Equation 1 or the above Equation 3. The motion vector can be referred to as an affine motion vector field (MVF) or a motion vector array.

[0370] The decoding device can derive the prediction samples of the current block based on the motion vector in sub-blocks or samples. The decoding device can derive a reference region within the reference picture based on the motion vector in sub-blocks or samples, and generate the prediction samples of the current block based on the reconstructed samples within the reference region.

[0371] At S2360, the decoding device generates a reconstructed picture of the current block based on the derived prediction samples. The decoding device can generate the reconstructed picture of the current block based on the derived prediction samples. Depending on the prediction mode, the decoding device can directly use the prediction samples as the reconstructed samples, or can generate the reconstructed samples by adding the residual samples to the prediction samples. In a case where there are residual samples of the current block, the decoding device can obtain information about the residual of the current block from the bitstream. The information about the residual can include transform coefficients of the residual samples. The decoding device can derive the residual samples (or the residual sample array) of the current block based on the residual information. The decoding device can generate the reconstructed samples based on the prediction samples and the residual samples, and derive the reconstructed block or the reconstructed picture based on the reconstructed samples. Thereafter, the decoding device can apply loop filtering processes such as deblocking filtering and / or SAO processing to the reconstructed picture as necessary to improve subjective / objective image quality, as described above.

[0372] Figure 24 A decoding device performing a video decoding method according to the present disclosure is exemplified. Figure 23 The method disclosed in the Figure 24 The decoding device disclosed in the Figure 24 The entropy decoder of the decoding device of Figure 23 S2300 steps of the Figure 24 The predictor of the decoding device of Figure 24 The adder of the decoding device of Figure 23 S2360 steps of the Figure 24 The entropy decoder of the decoding device of Figure 24 The inverse transformer of the decoding device of

[0373] According to the disclosure, the efficiency of video coding based on affine motion prediction can be improved.

[0374] In addition, according to the disclosure, in deriving the affine MVP candidate list, the constructed affine MVP candidate can be added only when the candidate motion vectors of the CP of the constructed affine MVP candidate are all available, thereby reducing the complexity of the process for deriving the constructed affine MVP candidate and the process for constructing the affine MVP candidate list, and improving the coding efficiency.

[0375] In addition, according to the disclosure, in deriving the affine MVP candidate list, the additional affine MVP candidate can be derived based on the candidate motion vectors of the CP derived through the process for deriving the constructed affine MVP candidate, thereby reducing the complexity of the process for constructing the affine MVP candidate list, and improving the coding efficiency.

[0376] In addition, according to the disclosure, in deriving the inherited affine MVP candidate, the inherited affine MVP candidate can be derived by using the upper neighboring block only when the upper neighboring block is included in the current CTU, thereby reducing the storage amount of the line buffer for affine prediction, and minimizing the hardware cost.

[0377] In the above embodiments, although the method is described based on the flowchart using a series of steps or blocks, the disclosure does not limit the specific order of the steps, and some steps can be performed in a different order from the remaining steps or simultaneously with the remaining steps. In addition, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and can further include other steps, or one or more steps in the flowchart can be deleted without affecting the technical scope of the disclosure.

[0378] The embodiments according to the disclosure can be implemented and executed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in each figure can be implemented and executed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information for implementation (for example, information on instructions) or an algorithm can be stored in a digital storage medium.

[0379] In addition, the decoding apparatus and the encoding apparatus to which the embodiments of the disclosure are applied can include a multimedia broadcast transmitting and receiving apparatus, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video communication device, a real-time communication device for video communication, a mobile streaming device, a storage medium, a camcorder, a video on demand (VoD) service providing apparatus, an over-the-top (OTT) video device, an Internet streaming service providing apparatus, a 3D video device, a video phone device, a transportation terminal (e.g., a vehicle terminal, an airplane terminal, and a ship terminal), and a medical video device; and can be used to process a video signal or a data signal. For example, the OTT video device can include a game console, a Blu-ray player, an Internet-connected television, a home theater system, a smart phone, a tablet, a digital video recorder (DVR), or the like.

[0380] In addition, the processing method to which the embodiments of the disclosure are applied can be generated in the form of a program executed by a computer, and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the disclosure can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distribution devices in which computer-readable data are stored. The computer-readable recording medium can include, for example, a Blu-ray disc (BD), a universal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disc, and an optical data storage device. In addition, the computer-readable recording medium includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated according to an encoding method can be stored in a computer-readable recording medium or transmitted through a wired / wireless communication network.

[0381] In addition, the embodiments of the disclosure can be implemented as a computer program product in the form of program codes, and according to the embodiments of the disclosure, the program codes can be executed by a computer. The program codes can be stored on a computer-readable carrier.

[0382] Figure 25 A content streaming system structure to which the embodiments of the disclosure are applied is exemplified.

[0383] A content streaming system to which the embodiments of the disclosure are applied can mainly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

[0384] The encoding server compresses content input from a multimedia input device such as a smart phone, a camera, or a camcorder into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smart phone, a camera, or a camcorder directly generates a bitstream, the encoding server can be omitted.

[0385] A bitstream can be generated by applying an encoding method or a method for generating a bitstream according to an embodiment of the disclosure, and a streaming server can temporarily store a bitstream while transmitting or receiving the bitstream.

[0386] A streaming server transmits multimedia data to a user device based on a user request through a web server, and the web server plays a role of informing a user of which services are available. If a user requests a desired service from the web server, the web server transmits a request to the streaming server, and then the streaming server transmits multimedia data to the user. In this case, a content streaming system can include a separate control server. In this case, the control server is used to control commands / responses between devices within the content streaming system.

[0387] A streaming server can receive content from a media storage and / or an encoding server. For example, when receiving content from an encoding server, content can be received in real time. In this case, in order to provide a smooth streaming service, a streaming server can store a bitstream for a predetermined period of time.

[0388] Examples of a user device can include a mobile phone, a smart phone, a laptop computer, a digital broadcasting terminal, a personal digital assistant (PDA), a portable multimedia player (PMP), a navigation terminal, a touch screen PC, a tablet PC, an ultrabook, a wearable device (for example, a smart watch, smart glasses, and a head-mounted display (HMD)), a digital TV, a desktop computer, and a digital signage. Each separate server within a content streaming system can operate as a distributed server, in which case data received from each server can be processed in a distributed manner.

Claims

1. A video decoding method performed by a decoding device, the video decoding method comprising the following steps: Obtain motion prediction information for the current block from the bit stream; Construct a candidate list of affine motion vector prediction sub-MVPs for the current block; Based on the affine MVP candidate list, derive the control point motion vector prediction sub-CPMVP for the control point CP of the current block; Based on the motion prediction information, the control point motion vector difference (CPMVD) for the current block is derived. Based on the CPMVP and the CPMVD, derive the control point motion vector CPMV for the CP of the current block; Based on the CPMV, derive the prediction sample for the current block; as well as Based on the derived prediction samples, a reconstructed image for the current block is generated. The steps for constructing the affine MVP candidate list include the following: Check whether the inherited affine MVP candidate is available, wherein the inherited affine MVP candidate is an affine MVP candidate configured with motion vectors derived from the affine model of the adjacent blocks of the inherited affine MVP candidate for the current block as candidate motion vectors for the CP. The inherited affine MVP candidate is derived when it is available, and the availability condition of the inherited affine MVP candidate is whether the reference image of the adjacent block of the inherited affine MVP candidate is the same as the reference image of the current block. Check whether the constructed affine MVP candidate is available, wherein the constructed affine MVP candidate is an affine MVP candidate in which the motion vector derived from the first adjacent block in the first adjacent block group of the current block is configured as a candidate motion vector for CP0, the motion vector derived from the second adjacent block in the second adjacent block group of the current block is configured as a candidate motion vector for CP1, and the motion vector derived from the third adjacent block in the third adjacent block group of the current block is configured as a candidate motion vector for CP2, and derive the constructed affine MVP candidate when it is available. The availability condition for the constructed affine MVP candidate is whether all the motion vectors derived from the first adjacent block, the second adjacent block, and the third adjacent block are available, and The availability condition for the motion vector derived from the first adjacent block is whether the reference image of the first adjacent block is the same as the reference image of the current block; the availability condition for the motion vector derived from the second adjacent block is whether the reference image of the second adjacent block is the same as the reference image of the current block; and the availability condition for the motion vector derived from the third adjacent block is whether the reference image of the third adjacent block is the same as the reference image of the current block. When the number of derived affine MVP candidates, including the inherited affine MVP candidates and the constructed affine MVP candidates, is less than 2, a first affine MVP candidate is derived, wherein the first affine MVP candidate is an affine MVP candidate that includes a specific motion vector as a candidate motion vector for the CP, and the specific motion vector is an available motion vector among the motion vectors derived from the first adjacent block, the motion vectors derived from the second adjacent block, and the motion vectors derived from the third adjacent block; When the number of derived affine MVP candidates is less than 2, the derivation includes a second affine MVP candidate derived based on the temporally adjacent blocks of the current block as a candidate motion vector for the CP; and When the number of derived affine MVP candidates is less than 2, a third affine MVP candidate including zero motion vector is derived as a candidate motion vector for the CP.

2. The video decoding method according to claim 1, wherein, CP0 represents the top-left position of the current block, CP1 represents the top-right position of the current block, and CP2 represents the bottom-left position of the current block.

3. The video decoding method according to claim 1, wherein, The first adjacent block group includes adjacent block A, adjacent block B, and adjacent block C; the second adjacent block group includes adjacent block D and adjacent block E; and the third adjacent block group includes adjacent block F and adjacent block G; and When the size of the current block is W×H, and the x and y components of the top-left sample position of the current block are 0, the neighboring block A is the block that includes the sample at coordinate (-1, -1), the neighboring block B is the block that includes the sample at coordinate (0, -1), the neighboring block C is the block that includes the sample at coordinate (-1, 0), the neighboring block D is the block that includes the sample at coordinate (W-1, -1), the neighboring block E is the block that includes the sample at coordinate (W, -1), the neighboring block F is the block that includes the sample at coordinate (-1, H-1), and the neighboring block G is the block that includes the sample at coordinate (-1, H).

4. The video decoding method according to claim 3, wherein, The first adjacent block is the block that has been identified as having the same reference image as the current block while checking adjacent blocks in the first adjacent block group in a first specific order. The second adjacent block is a block that has already been identified as having the same reference image as the current block while checking adjacent blocks in the second adjacent block group in a second specific order, and... The third adjacent block is a block that has been identified first as having the same reference image as the reference image of the current block while checking the adjacent blocks in the third adjacent block group in a third specific order.

5. The video decoding method according to claim 4, wherein, The first specific order is the order from the adjacent block A to the adjacent block B, and then to the adjacent block C. The second specific order is the order from the adjacent block D to the adjacent block E, and The third specific order is the order from the adjacent block F to the adjacent block G.

6. The video decoding method according to claim 1, wherein, No pruning check is performed between the inherited affine MVP candidate and the constructed affine MVP candidate.

7. A video encoding method performed by an encoding device, the video encoding method comprising the following steps: Construct a candidate list of affine motion vector prediction sub-MVPs for the current block; Based on the affine MVP candidate list, derive the control point motion vector prediction sub-CPMVP for the control point CP of the current block; Derive the control point motion vector CPMV for the CP of the current block; Based on the CPMVP and the CPMV, derive the control point motion vector difference CPMVD for the CP of the current block; and The motion prediction information, including information about the CPMVD, is encoded. The steps for constructing the affine MVP candidate list include the following: Check whether the inherited affine MVP candidate is available, wherein the inherited affine MVP candidate is an affine MVP candidate configured with motion vectors derived from the affine model of the adjacent blocks of the inherited affine MVP candidate for the current block as candidate motion vectors for the CP. The inherited affine MVP candidate is derived when it is available, and the availability condition of the inherited affine MVP candidate is whether the reference image of the adjacent block of the inherited affine MVP candidate is the same as the reference image of the current block. Check whether the constructed affine MVP candidate is available, wherein the constructed affine MVP candidate is an affine MVP candidate in which the motion vector derived from the first adjacent block in the first adjacent block group of the current block is configured as a candidate motion vector for CP0, the motion vector derived from the second adjacent block in the second adjacent block group of the current block is configured as a candidate motion vector for CP1, and the motion vector derived from the third adjacent block in the third adjacent block group of the current block is configured as a candidate motion vector for CP2, and derive the constructed affine MVP candidate when it is available. The availability condition for the constructed affine MVP candidate is whether all the motion vectors derived from the first adjacent block, the second adjacent block, and the third adjacent block are available, and The availability condition for the motion vector derived from the first adjacent block is whether the reference image of the first adjacent block is the same as the reference image of the current block; the availability condition for the motion vector derived from the second adjacent block is whether the reference image of the second adjacent block is the same as the reference image of the current block; and the availability condition for the motion vector derived from the third adjacent block is whether the reference image of the third adjacent block is the same as the reference image of the current block. When the number of derived affine MVP candidates, including the inherited affine MVP candidates and the constructed affine MVP candidates, is less than 2, a first affine MVP candidate is derived, wherein the first affine MVP candidate is an affine MVP candidate that includes a specific motion vector as a candidate motion vector for the CP, and the specific motion vector is an available motion vector among the motion vectors derived from the first adjacent block, the motion vectors derived from the second adjacent block, and the motion vectors derived from the third adjacent block; When the number of derived affine MVP candidates is less than 2, the derivation includes a second affine MVP candidate derived based on the temporally adjacent blocks of the current block as a candidate motion vector for the CP; and When the number of derived affine MVP candidates is less than 2, a third affine MVP candidate including zero motion vector is derived as a candidate motion vector for the CP.

8. A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause a method to be performed, the method comprising the steps of: Construct a candidate list of affine motion vector prediction sub-MVPs for the current block; Based on the affine MVP candidate list, derive the control point motion vector prediction sub-CPMVP for the control point CP of the current block; Derive the control point motion vector CPMV for the CP of the current block; Based on the CPMVP and the CPMV, derive the control point motion vector difference CPMVD for the CP of the current block; The motion prediction information, including information about the CPMVD, is encoded; as well as Generate a bitstream that includes the motion prediction information. The steps for constructing the affine MVP candidate list include the following: Check whether the inherited affine MVP candidate is available, wherein the inherited affine MVP candidate is an affine MVP candidate configured with motion vectors derived from the affine model of the adjacent blocks of the inherited affine MVP candidate for the current block as candidate motion vectors for the CP. The inherited affine MVP candidate is derived when it is available, and the availability condition of the inherited affine MVP candidate is whether the reference image of the adjacent block of the inherited affine MVP candidate is the same as the reference image of the current block. Check whether the constructed affine MVP candidate is available, wherein the constructed affine MVP candidate is an affine MVP candidate in which the motion vector derived from the first adjacent block in the first adjacent block group of the current block is configured as a candidate motion vector for CP0, the motion vector derived from the second adjacent block in the second adjacent block group of the current block is configured as a candidate motion vector for CP1, and the motion vector derived from the third adjacent block in the third adjacent block group of the current block is configured as a candidate motion vector for CP2, and derive the constructed affine MVP candidate when it is available. The availability condition for the constructed affine MVP candidate is whether all the motion vectors derived from the first adjacent block, the second adjacent block, and the third adjacent block are available, and The availability condition for the motion vector derived from the first adjacent block is whether the reference image of the first adjacent block is the same as the reference image of the current block; the availability condition for the motion vector derived from the second adjacent block is whether the reference image of the second adjacent block is the same as the reference image of the current block; and the availability condition for the motion vector derived from the third adjacent block is whether the reference image of the third adjacent block is the same as the reference image of the current block. When the number of derived affine MVP candidates, including the inherited affine MVP candidates and the constructed affine MVP candidates, is less than 2, a first affine MVP candidate is derived, wherein the first affine MVP candidate is an affine MVP candidate that includes a specific motion vector as a candidate motion vector for the CP, and the specific motion vector is an available motion vector among the motion vectors derived from the first adjacent block, the motion vectors derived from the second adjacent block, and the motion vectors derived from the third adjacent block; When the number of derived affine MVP candidates is less than 2, the derivation includes a second affine MVP candidate derived based on the temporally adjacent blocks of the current block as a candidate motion vector for the CP; and When the number of derived affine MVP candidates is less than 2, a third affine MVP candidate including zero motion vector is derived as a candidate motion vector for the CP.

9. A method for transmitting image data, the method comprising the following steps: A bitstream of image information is obtained, wherein the bitstream is generated based on the following steps: constructing a candidate list of affine motion vector prediction sub-MVPs for the current block; deriving a control point motion vector prediction sub-CPMVP for the control point CP of the current block based on the affine MVP candidate list; deriving the control point motion vector CPMV for the CP of the current block; deriving the control point motion vector difference CPMVD for the CP of the current block based on the CPMVP and the CPMV; and encoding motion prediction information including information about the CPMVD; and Send the data including the bit stream. The steps for constructing the affine MVP candidate list include the following: Check whether the inherited affine MVP candidate is available, wherein the inherited affine MVP candidate is an affine MVP candidate configured with motion vectors derived from the affine model of the adjacent blocks of the inherited affine MVP candidate for the current block as candidate motion vectors for the CP. The inherited affine MVP candidate is derived when it is available, and the availability condition of the inherited affine MVP candidate is whether the reference image of the adjacent block of the inherited affine MVP candidate is the same as the reference image of the current block. Check whether the constructed affine MVP candidate is available, wherein the constructed affine MVP candidate is an affine MVP candidate in which the motion vector derived from the first adjacent block in the first adjacent block group of the current block is configured as a candidate motion vector for CP0, the motion vector derived from the second adjacent block in the second adjacent block group of the current block is configured as a candidate motion vector for CP1, and the motion vector derived from the third adjacent block in the third adjacent block group of the current block is configured as a candidate motion vector for CP2, and derive the constructed affine MVP candidate when it is available. The availability condition for the constructed affine MVP candidate is whether all the motion vectors derived from the first adjacent block, the second adjacent block, and the third adjacent block are available, and The availability condition for the motion vector derived from the first adjacent block is whether the reference image of the first adjacent block is the same as the reference image of the current block; the availability condition for the motion vector derived from the second adjacent block is whether the reference image of the second adjacent block is the same as the reference image of the current block; and the availability condition for the motion vector derived from the third adjacent block is whether the reference image of the third adjacent block is the same as the reference image of the current block. When the number of derived affine MVP candidates, including the inherited affine MVP candidates and the constructed affine MVP candidates, is less than 2, a first affine MVP candidate is derived, wherein the first affine MVP candidate is an affine MVP candidate that includes a specific motion vector as a candidate motion vector for the CP, and the specific motion vector is an available motion vector among the motion vectors derived from the first adjacent block, the motion vectors derived from the second adjacent block, and the motion vectors derived from the third adjacent block; When the number of derived affine MVP candidates is less than 2, the derivation includes a second affine MVP candidate derived based on the temporally adjacent blocks of the current block as a candidate motion vector for the CP; and When the number of derived affine MVP candidates is less than 2, a third affine MVP candidate including zero motion vector is derived as a candidate motion vector for the CP.

Citation Information

Patent Citations

  • Image prediction method and device

    CN106559669A

  • Inter prediction method and apparatus in video coding system

    CN108141582A