Image decoding method and apparatus based on subblock-based motion prediction in an image coding system
The image decoding method addresses the challenge of efficiently compressing high-resolution images by constructing affine MVP candidate lists in sub-block units, enhancing compression efficiency and reducing hardware costs.
Patent Information
- Application Number
- JP2023209973
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-09-12
- Filing Date
- 2023-12-13
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2039-09-11
AI Technical Summary
The increasing demand for high-resolution, high-quality images and immersive media such as VR and AR content has led to challenges in efficiently compressing, transmitting, and storing image/video data, resulting in high transmission and storage costs.
An image decoding method and apparatus that utilizes a motion candidate list for deriving motion information in sub-block units, specifically constructing an affine MVP candidate list only when all candidate motion vectors are available, and deriving additional candidates using derived motion vectors to reduce complexity and improve coding efficiency.
This approach enhances overall image/video compression efficiency by reducing the complexity of deriving affine MVP candidates and minimizing hardware costs, while improving coding efficiency and reducing line buffer storage.
Smart Images

Figure 0007571268000011 
Figure 0007571268000012 
Figure 0007571268000013
Abstract
Description
[Technical field]
[0001] This document relates to image coding techniques, and more particularly to an image coding method and apparatus based on motion prediction using a motion candidate list for derivation of sub-block-wise motion information in an image coding system. [Background technology]
[0002] Recently, the demand for high-resolution, high-quality images / videos such as 4K or 8K or higher UHD (Ultra High Definition) images / videos is increasing in various fields. As the image / video data becomes higher in resolution and quality, the amount of information or bits transmitted increases relatively compared to existing image / video data, so the transmission and storage costs increase when transmitting image data using existing media such as wired or wireless broadband lines or storing image / video data using existing storage media.
[0003] In addition, interest and demand for immersive media such as virtual reality (VR), artificial reality (AR) content, and holograms has been increasing recently, and the broadcast of images / videos having different image characteristics from real images, such as game images, is increasing.
[0004] Accordingly, there is a demand for highly efficient image / video compression techniques in order to effectively compress, transmit, store, and play back high-resolution, high-quality image / video information having the above-mentioned diverse characteristics. Summary of the Invention [Problem to be solved by the invention]
[0005] The technical problem of this document is to provide a method and apparatus for increasing the efficiency of image coding.
[0006] Another technical problem of this document is to provide an image decoding method and apparatus that derives constructed affine MVP candidates based on surrounding blocks only when all candidate motion vectors for a CP are available, constructs an affine MVP candidate list for the current block, and performs prediction for the current block based on the constructed affine MVP candidate list.
[0007] Another technical objective of this document is to provide an image decoding method and apparatus for deriving an affine MVP candidate using a derived candidate motion vector in the process of deriving the constructed affine MVP candidate as an added affine MVP candidate when the number of available inherited affine MVP candidates and constructed affine MVP candidates is smaller than the maximum number of candidates in the MVP candidate list, and for performing prediction for the current block based on the constructed affine MVP candidate list. [Means for solving the problem]
[0008] According to an embodiment of the present document, an image decoding method performed by a decoding device includes the steps of: acquiring motion prediction information for a current block from a bitstream; constructing an affine motion vector predictor (MVP) candidate list for the current block; deriving Control Point Motion Vector Predictors (CPMVP) for a Control Point (CP) of the current block based on the affine MVP candidate list; deriving Control Point Motion Vector Differences (CPMVD) for the CP of the current block based on the motion prediction information; and deriving Control Point Motion Vector Differences (CPMVD) for the CP of the current block based on the CPMVP and the CPMVD. and generating a reconstructed picture for the current block based on the derived predicted samples, wherein constructing the affine MVP candidate list includes checking whether a first affine MVP candidate is available, and the first affine MVP candidate is a candidate for a first block in a left block group that is coded with an affine motion model and a reference picture index of the first block is equal to or greater than a reference picture index of the current block. and checking whether a second affine MVP candidate is available, the second affine MVP candidate being available if a second block in an upper block group is coded with an affine motion model and a reference picture index of the second block is the same as a reference picture index of the current block. If the number of available affine MVP candidates is less than two, checking whether a third affine MVP candidate is available, the third affine MVP candidate being available if a four-parameter affine model is applied to inter prediction.a first motion vector for CP0 of the current block and a second motion vector for CP1 of the current block can be derived from a top left block group of the current block and a top right block group of the current block, respectively, and when a 6-parameter affine model is applied to the inter prediction, a first motion vector for CP0 of the current block, a second motion vector for CP1 of the current block, and a third motion vector for CP2 of the current block can be derived from a top left block group of the current block, a top right block group of the current block, and the left block group, respectively; and if a number of the available affine MVP candidates is less than two and the first motion vector is available, deriving a fourth affine MVP candidate, the fourth affine MVP candidate being an affine MVP candidate that includes the motion vector for CP0 in a candidate motion vector for the CP. and deriving a fifth affine MVP candidate if the number of available affine MVP candidates is less than two and the second motion vector is available, the fifth affine MVP candidate being an affine MVP candidate including a motion vector for the CP1 as a candidate motion vector for the CP. If the number of available affine MVP candidates is less than two and a third motion vector for CP2 of the current block is available, deriving a sixth affine MVP candidate, the sixth affine MVP candidate being an affine MVP candidate including the third motion vector as a candidate motion vector for the CP. If the number of available affine MVP candidates is less than two and a temporal MVP candidate derived based on a temporal neighboring block of the current block is available, deriving a seventh affine MVP candidate including the temporal MVP as a candidate motion vector for the CP. If the number of available affine MVP candidates is less than two, a zero motion vector (zero and deriving an eighth affine candidate including a candidate motion vector for the CP.
[0009] According to an embodiment of the present document, an image encoding method performed by an encoding device includes the steps of: constructing an affine motion vector predictor (MVP) candidate list for a current block; deriving Control Point Motion Vector Predictors (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 Control Point Motion Vector Differences (CPMVD) for the CP of the current block based on the CPMVP and the CPMV; and calculating motion prediction information including information on the CPMVD. and constructing the affine MVP candidate list includes the steps of: checking whether a first affine MVP candidate is available, the first affine MVP candidate being available if a first block in a left group of blocks is coded with an affine motion model and a reference picture index of the first block is the same as a reference picture index of the current block; and checking whether a second affine MVP candidate is available, the second affine MVP candidate being available if a second block in a top group of blocks is coded with an affine motion model and a reference picture index of the second block is the same as a reference picture index of the current block. and if the number of the available affine MVP candidates is less than two, checking whether a third affine MVP candidate is available. The third affine MVP candidate is available if a first motion vector for CP0 of the current block and a second motion vector for CP1 of the current block are derived from a block group at the top left of the current block and a block group at the top right of the current block, respectively, when a four-parameter affine model is applied to inter prediction, and if a six-parameter affine model is applied to the inter prediction, the first motion vector for CP0 of the current block,a second motion vector for CP1 of the current block and a third motion vector for CP2 of the current block are derived from a top left block group of the current block, a top right block group of the current block, and a left block group, respectively; if the number of available affine MVP candidates is less than two and the first motion vector is available, deriving a fourth affine MVP candidate, the fourth affine MVP candidate being an affine MVP candidate including a motion vector for CP0 as a candidate motion vector for the CP; if the number of available affine MVP candidates is less than two and the second motion vector is available, deriving a fifth affine MVP candidate, the fifth affine MVP candidate being an affine MVP candidate including a motion vector for CP1 If the number of available affine MVP candidates is less than two and a third motion vector for CP2 of the current block is available, deriving a sixth affine MVP candidate, the sixth affine MVP candidate being an affine MVP candidate including the third motion vector as a candidate motion vector for the CP; if the number of available affine MVP candidates is less than two and a temporal MVP candidate derived based on a temporal neighboring block of the current block is available, deriving a seventh affine MVP candidate including the temporal MVP as a candidate motion vector for the CP; if the number of available affine MVP candidates is less than two and a temporal MVP candidate derived based on a temporal neighboring block of the current block is available, deriving an eighth affine MVP candidate including a zero motion vector as a candidate motion vector for the CP. Effect of the Invention
[0010] According to an embodiment of this document, the overall image / video compression efficiency can be improved.
[0011] According to this document, the efficiency of image coding based on affine motion prediction can be improved.
[0012] According to this document, when deriving an affine MVP candidate list, a constructed affine MVP candidate can be added only if all candidate motion vectors for the CP of the constructed affine MVP candidate are available, thereby reducing the complexity of the process of deriving a constructed affine MVP candidate and the process of constructing an affine MVP candidate list, and improving coding efficiency.
[0013] According to this document, in deriving an affine MVP candidate list, in the process of deriving a constructed affine MVP candidate, a further affine MVP candidate can be derived based on a candidate motion vector for the derived CP, thereby reducing the complexity of the process of constructing an affine MVP candidate list and improving coding efficiency.
[0014] According to this document, in the process of deriving an inherited affine MVP candidate, the upper surrounding block can be used only if the upper surrounding block is included in the current CTU, and the inherited affine MVP candidate can be derived, thereby reducing the amount of line buffer storage for affine prediction and minimizing hardware costs. [Brief description of the drawings]
[0015] [Figure 1] 1 illustrates generally an example of a video / image coding system to which this document may be applied; [Diagram 2] FIG. 1 is a diagram illustrating the configuration of a video / image encoding device to which this document can be applied. [Diagram 3] 1 is a diagram illustrating the schematic configuration of a video / image decoding device to which this document can be applied. [Figure 4] 1 illustrates an example of an inter-prediction based video / image encoding method. [Diagram 5] 1 illustrates an example of an inter-prediction based video / image encoding method. [Figure 6]1 illustrates an exemplary inter-prediction procedure. [Figure 7] 10 illustrates an exemplary motion representation via an affine motion model. [Figure 8] 1 exemplarily illustrates the affine motion model in which motion vectors for three control points are used. [Figure 9] 10 exemplarily illustrates the affine unit motion model in which motion vectors for two control points are used. [Figure 10] A method for deriving a motion vector on a sub-block basis based on an affine motion model will be described below as an example. [Figure 11] 4 shows an exemplary set of neighboring blocks for deriving the inherited affine candidates. [Figure 12] 13 shows an example of spatial candidates for the constructed affine candidates. [Figure 13] An example of constructing an affine MVP list is given below. [Figure 14] An example of deriving the constructed candidates will be described below. [Figure 15] An example of deriving the constructed candidates will be described below. [Figure 16] 13 shows an exemplary location of neighboring blocks scanned to derive inherited affine candidates. [Figure 17] 13 shows an exemplary location of neighboring blocks scanned to derive inherited affine candidates. [Figure 18] 13 shows an exemplary location for deriving inherited affine candidates. [Figure 19] An example of constructing a merge candidate list for the current block is shown below. [Figure 20] 1 illustrates neighboring blocks of the current block for deriving constructed candidates according to one embodiment of the present document; [Figure 21] An example of deriving the constructed candidates when four affine motion models are applied to the current block is shown. [Figure 22]An example of deriving the constructed candidates when a 6-affine motion model is applied to the current block is shown. [Figure 23a] An example of deriving the inherited affine candidates is shown by way of example. [Figure 23b] An example of deriving the inherited affine candidates is shown by way of example. [Figure 24] 1 illustrates a schematic diagram of an image encoding method according to an encoding device according to the present document; [Diagram 25] 1 shows a schematic representation of an encoding device for performing an image encoding method according to the present document; [Figure 26] 1 illustrates a schematic diagram of an image decoding method by a decoding device according to the present document; [Figure 27] 1 shows a schematic diagram of a decoding device for performing an image decoding method according to the present document; [Figure 28] 1 illustrates an exemplary structural diagram of a content streaming system to which the embodiments disclosed in this document can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0016] Since this document can be modified in various ways and can have various embodiments, a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to a specific embodiment. Terms commonly used in this specification are used only to describe a specific embodiment and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this specification, the terms "include" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the possibility of the presence or addition of one or more different features, numbers, steps, operations, components, parts, or combinations thereof.
[0017] Meanwhile, each component in the drawings described in this document is shown independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components among each component may be combined to form one component, and one component may be divided into multiple components. An embodiment in which each component is integrated and / or separated is also included in the scope of this document as long as it does not deviate from the essence of this document.
[0018] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. In the following, the same reference numerals are used for the same components in the drawings, and duplicated descriptions of the same components may be omitted.
[0019] FIG. 1 illustrates a schematic diagram of an example of a video / image coding system to which this document can be applied.
[0020] Referring to Figure 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in the form of a file or streaming via a digital storage medium or a network.
[0021] The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device is called a video / image encoding device, and the decoding device is called a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may be configured as a separate device or an external component.
[0022] A video source may acquire video / images through a video / image capture, synthesis or generation process, etc. A video source may include a video / image capture device and / or a video / image generation device. A video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured videos / images, etc. A video / image generation device may include, for example, a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process in which the associated data is generated.
[0023] An encoding device can encode input video / images. The encoding device can perform a series of procedures such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0024] The transmitting unit may transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit may include an element for generating a media file through a predetermined file format and may include an element for transmission via a broadcasting / communication network. The receiving unit may receive / extract the bitstream and transmit it to a decoding device.
[0025] The decoding device can decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, prediction, etc., which correspond to the operations of the encoding device.
[0026] The renderer can render the decoded video / images, and the rendered video / images can be displayed via a display unit.
[0027] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation of audio video coding standard (AVS2) or next generation video / image coding standards (e.g., H.267 or H.268, etc.).
[0028] In this document, various embodiments for video / image coding are presented, which may be combined with each other, unless otherwise stated.
[0029] In this document, a video may mean a collection of a series of images over time. A picture generally means a unit showing one image at a particular time, and a slice / tile is a unit constituting a part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may be also referred to as a brick.A brick scan can refer to a specific sequential ordering of CTUs partitioning a picture, in which the CTUs are ordered consecutively in CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set.The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture. A tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit. A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile.In this document, tile group and slice may be used interchangeably. For example, in this document, tile group / tile group header is called slice / slice header.
[0030] A pixel or a pel can mean the smallest unit that constitutes one picture (or image). A term corresponding to a pixel can also be used as a "sample." A sample can generally indicate a pixel or a pixel value, or can indicate only a pixel / pixel value of a luma component, or can indicate only a pixel / pixel value of a chroma component.
[0031] A unit may indicate a basic unit of image processing. A unit may include at least one of a specific region of a picture and information about the region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. A unit may be used in combination with terms such as block or area depending on the case. In a general case, an MxN block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.
[0032] In this document, the term “ / ” and “,” should be interpreted to indicate “and / or.” For instance, the expression “A / B” may mean “A and / or B.” Further, “A,B” may mean “A and / or B.” Further, “A / B / C” may mean “at least one of A,B,and / or C.” Also, “A,B,C” may mean “at least one of A,B,and / or C.”
[0033] Further, in this document, the term “or” should be interpreted to indicate “and / or.” For instance, the expression “A or B” may comprise 1) only A, 2) only B, and / or 3) both A and B. In other words, the term “or” in this document should be interpreted to indicate “additionally or alternatively.”
[0034] 2 is a diagram for explaining the schematic configuration of a video / image encoding device to which this document can be applied. Hereinafter, the video encoding device may include an image encoding device.
[0035] Referring to FIG. 2, the encoding apparatus 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 is called a reconstructor or a reconstructed block generator. The image division unit 210, the prediction unit 220, the residual processing unit 230, the entropy encoding unit 240, the addition unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chip set or a processor) depending on the embodiment. In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0036] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units are called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree binary-tree ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure according to this document is performed based on the final coding unit that is not further divided. In this case, the largest coding unit may be used as the final coding unit immediately based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as necessary, and the coding unit of the optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit described above.The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0037] The unit may be used interchangeably with terms such as block or area. In the general case, an MxN block may refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally refer to a pixel or a pixel value, or may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. A sample may be used as a term corresponding to a pixel or pel of one picture (or image).
[0038] The encoding apparatus 200 may generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input image signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown, a unit in the encoder 200 that subtracts a prediction signal (predicted block, prediction sample array) from an input image signal (original block, original sample array) is called a subtraction unit 231. The prediction unit may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as described below in the description of each prediction mode. The prediction-related information can be encoded in the entropy encoding unit 240 and output in the form of a bitstream.
[0039] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. In the intra prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to the neighboring blocks.
[0040] The inter prediction unit 221 may derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between a neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on an inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block is called a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block is also called a collocated picture (colPic). For example, the inter prediction unit 221 may generate information indicating which candidate is used to construct a candidate list of motion information based on neighboring blocks and derive a motion vector and / or a reference picture index of the current block. Inter prediction is performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit 221 may use motion information of neighboring blocks as motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the surrounding blocks can be used as a motion vector predictor and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0041] The prediction unit 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This is called combined inter and intra prediction (CIIP). The prediction unit may also be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for coding of content images / videos such as games, for example, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but is similar to inter prediction in that a reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be seen as an example of intra coding or intra prediction. When the palette mode is applied, a sample value within a picture may be signaled based on information regarding a palette table and a palette index.
[0042] The prediction signal generated by the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a restored signal or a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may be a discrete cosine transform (DCT), a discrete sine transform (DST), JPEG0007571268000001.jpg7116, GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT means a transformation obtained from a graph when the relationship information between pixels is expressed as a graph. CNT means a transformation obtained based on a predicted signal generated using all previously reconstructed pixels. In addition, the transformation process may be applied to pixel blocks having the same square size, or may be applied to non-square variable size blocks.
[0043] The quantization unit 233 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoding unit 240, which may encode the quantized signal (information on the quantized transform coefficients) and output the quantized signal to a bitstream. The information on the quantized transform coefficients is called residual information. The quantization unit 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit 240 may also encode information required for video / image restoration other than the quantized transform coefficients (e.g., values of syntax elements, etc.) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / image information) may be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) unit units. The video / image information may 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). The video / image information may further include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / image information. The video / image information is encoded through the above-mentioned encoding procedure and is included in the bitstream.The bitstream may be transmitted via a network or may be stored in a digital storage medium, where the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storing unit (not shown) for storing the signal may be configured as an internal / external element of the encoding apparatus 200, or the transmitting unit may be included in the entropy encoding unit 240.
[0044] The quantized transform coefficients output from the quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be restored by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the block to be processed, such as when the skip mode is applied, the predicted block may be used as the reconstructed block. The adder 250 is called a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, and may also be used for inter prediction of the next picture after filtering as described below.
[0045] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.
[0046] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240, as will be described later in relation to each filtering method. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0047] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. Through this, the encoding apparatus can avoid prediction mismatch between the encoding apparatus 100 and the decoding apparatus when inter prediction is applied, and can also improve encoding efficiency.
[0048] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.
[0049] FIG. 3 is a diagram illustrating the schematic configuration of a video / image decoding device to which this document can be applied.
[0050] Referring to FIG. 3, the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter predictor 331 and an intra predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. The entropy decoding unit 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured by one hardware component (e.g., a decoder chipset or processor) according to an embodiment. Also, the memory 360 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include memory 360 as an internal / external component.
[0051] When a bitstream including video / image information is input, the decoding apparatus 300 can restore an image corresponding to the process in which the video / image information is processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive a unit / block based on information on block division acquired from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied in the encoding apparatus. Thus, the processing unit for decoding may be, for example, a coding unit, and the coding unit may be divided according to a coding tree unit or a quad tree structure, a binary tree structure, and / or a ternary tree structure from a maximum coding unit. One or more transform units may be derived from the coding unit. Also, the restored image signal decoded and output by the decoding apparatus 300 can be reproduced by a reproduction device.
[0052] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may 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 may further include general constraint information. The decoding apparatus may further decode pictures based on the information on the parameter set and / or the general constraint information. Signaling / received information and / or syntax elements described later in this document may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in a bitstream, determine a context model using information on the syntax element to be decoded and decoding information on neighboring and target blocks to be decoded, or information on symbols / bins decoded in a previous step, predict the occurrence probability of a bin according to the determined context model, and perform arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element.In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Prediction information from the information decoded by the entropy decoding unit 310 is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, filtering information from the information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding apparatus may be further configured as an internal / external element of the decoding apparatus 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document is called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.
[0053] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in the form of a two-dimensional block. In this case, the rearrangement may be performed based on a coefficient scanning order performed in an encoding device. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0054] The inverse transform unit 322 inverse transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0055] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0056] The prediction unit 320 may generate a prediction signal based on various prediction methods, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This is called combined inter and intra prediction (CIIP). The prediction unit may also be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for coding of images / videos of content such as games, for example, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but is similar to inter prediction in that a reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be seen as an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / image information and signaled.
[0057] The intra prediction unit 331 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. Prediction modes in intra prediction may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.
[0058] The inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on an inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 332 may configure a candidate list of motion information based on the neighboring blocks, and derive a motion vector and / or a reference picture index of the current block based on the received candidate selection information. Inter prediction is performed based on various prediction modes, and the information on the prediction may include information indicating a mode of inter prediction for the current block.
[0059] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for a block to be processed, such as when a skip mode is applied, the predicted block can be used as a reconstructed block.
[0060] The adder 340 is called a reconstruction unit or a reconstruction block generator. The reconstruction signal generated may be used for intra prediction of a next block to be processed in the current picture, and may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0061] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture decoding.
[0062] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0063] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 332. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 331.
[0064] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding apparatus 200 can also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding apparatus 300, respectively.
[0065] As described above, prediction is performed to improve compression efficiency when performing video coding. Through this, a predicted block including a predicted sample for a current block, which is a block to be coded, can be generated. Here, the predicted block includes a predicted sample in a spatial domain (or a pixel domain). The predicted block is derived in the same way by an encoding device and a decoding device, and the encoding device signals information (residual information) on a residual between the original block and the predicted block, rather than the original sample value of the original block, to the decoding device, thereby improving image coding efficiency. The decoding device derives a residual block including residual samples based on the residual information, and can generate a reconstructed block including reconstructed samples by combining the residual block and the predicted block, and can generate a reconstructed picture including the reconstructed block.
[0066] The residual information may be generated through a transform and quantization procedure. For example, the encoding apparatus may derive a residual block between the original block and the predicted block, perform a transform procedure on the residual samples (residual sample array) included in the residual block to derive transform coefficients, perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and signal the related residual information to the decoding apparatus (via a bitstream). Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding apparatus may perform an inverse quantization / inverse transform procedure based on the residual information to derive a residual sample (or a residual block). The decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block. The encoding apparatus may also derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a subsequent picture, and generate a reconstructed picture based on the residual block.
[0067] When inter prediction is applied, a prediction unit of an encoding device / decoding device may perform inter prediction in units of blocks to derive a prediction sample. Inter prediction may indicate a prediction derived in a manner that is dependent on data elements (e.g., sample values or motion information) of pictures other than the current picture. When inter prediction is applied to a current block, a predicted block (prediction sample array) for the current block may be derived based on a reference block (reference sample array) identified by a motion vector on a reference picture indicated by a reference picture index. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information of the current block may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between a neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on an inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). When inter prediction is applied, the neighboring blocks may 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 blocks may be the same or different. The temporal neighboring blocks are called collocated reference blocks, collocated CUs (colCUs), etc., and the reference pictures including the temporal neighboring blocks are called collocated pictures (colPic).For example, a candidate list of motion information may be constructed based on neighboring blocks of the current block, and flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and (normal) merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted. In the case of a motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and a motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.
[0068] A video / image encoding procedure based on inter prediction may generally include, for example:
[0069] FIG. 4 illustrates an example of an inter-prediction based video / image encoding method.
[0070] The encoding apparatus performs inter prediction on a current block (S400). The encoding apparatus may derive an inter prediction mode and motion information of the current block and generate a prediction sample of the current block. Here, the procedures of determining an inter prediction mode, deriving motion information, and generating a prediction sample may be performed simultaneously, or any of the procedures may be performed prior to the other procedures. For example, the inter prediction unit of the encoding apparatus may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and may determine a prediction mode for the current block from the prediction mode determination unit, derive motion information of the current block from the motion information derivation unit, and derive a prediction sample of the current block from the prediction sample derivation unit. For example, the inter prediction unit of the encoding apparatus may search for a block similar to the current block within a certain region (search region) of a reference picture through motion estimation, and derive a reference block whose difference with the current block is minimum or equal to a certain criterion. Based on this, a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on a difference between the positions of the reference block and the current block. The encoding apparatus may determine a mode to be applied to the current block from among various prediction modes. The encoding apparatus may compare RD costs for the various prediction modes to determine an optimal prediction mode for the current block.
[0071] For example, when a skip mode or a merge mode is applied to the current block, the encoding apparatus may construct a merge candidate list (to be described later) and derive a reference block, among reference blocks indicated by merge candidates included in the merge candidate list, whose difference between the current block and the current block is minimum or equal to or less than a certain criterion. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to a decoding apparatus. Motion information of the current block may be derived using motion information of the selected merge candidate.
[0072] As another example, when the (A)MVP mode is applied to the current block, the encoding apparatus may construct an (A)MVP candidate list, which will be described later, and may use a motion vector of a selected MVP candidate among the MVP (motion vector predictor) candidates included in the (A)MVP candidate list as the MVP of the current block. In this case, for example, a motion vector indicating a reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and an MVP candidate having a motion vector with the smallest difference from the motion vector of the current block among the MVP candidates may become the selected MVP candidate. A motion vector difference (MVD), which is a difference obtained by subtracting the MVP from the motion vector of the current block, may be derived. In this case, information regarding the MVD may be signaled to the decoding apparatus. Also, when the (A)MVP mode is applied, the value of the reference picture index may be configured as reference picture index information and separately signaled to the decoding apparatus.
[0073] The encoding apparatus may derive residual samples based on the predicted samples (S410). The encoding apparatus may derive the residual samples through a comparison between original samples of the current block and the predicted samples.
[0074] The encoding apparatus encodes image information including prediction information and residual information (S420). The encoding apparatus may output the encoded image information in the form of a bitstream. The prediction information may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index, etc.) and information on motion information as information on the prediction procedure. The information on the motion information may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index) which is information for deriving a motion vector. In addition, the information on the motion information may include the above-mentioned information on the MVD and / or reference picture index information. Furthermore, the information on the motion information may include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information on the residual sample. The residual information may include information on quantized transform coefficients for the residual sample.
[0075] The output bitstream can be stored in a (digital) storage medium and then transmitted to the decoding device, or can be transmitted to the decoding device via a network.
[0076] Meanwhile, as described above, the encoding apparatus can generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is because the same prediction result as that performed by the decoding apparatus can be derived from the encoding apparatus, thereby improving coding efficiency. Therefore, the encoding apparatus can store the reconstructed picture (or reconstructed samples, reconstructed blocks) in a memory and use it as a reference picture for inter prediction. As described above, an in-loop filtering procedure, etc. can be further applied to the reconstructed picture.
[0077] A video / image decoding procedure based on inter prediction may generally include, for example, the following.
[0078] FIG. 5 illustrates an example of an inter-prediction based video / picture decoding method.
[0079] 5, the decoding apparatus may perform operations corresponding to those performed by the encoding apparatus, such as performing prediction on a current block based on received prediction information and deriving a prediction sample.
[0080] Specifically, the decoding device may determine a prediction mode for the current block based on received prediction information (S500). The decoding device may determine which inter prediction mode is applied to the current block based on prediction mode information in the prediction information.
[0081] For example, it may be determined whether the merge mode is applied to the current block or whether the (A)MVP mode is determined based on the merge flag. Alternatively, one of various inter prediction mode candidates may be selected based on the mode index. The inter prediction mode candidates may include skip mode, merge mode, and / or (A)MVP mode, or may include various inter prediction modes described below.
[0082] The decoding apparatus derives motion information of the current block based on the determined inter prediction mode (S510). For example, when a skip mode or a merge mode is applied to the current block, the decoding apparatus may form a merge candidate list (described later) and select one merge candidate from among the merge candidates included in the merge candidate list. The selection is performed based on the selection information (merge index) described above. Motion information of the selected merge candidate may be used to derive motion information of the current block. The motion information of the selected merge candidate may be used as motion information of the current block.
[0083] As another example, when the (A)MVP mode is applied to the current block, the decoding apparatus may construct an (A)MVP candidate list described below, and use a motion vector of an MVP candidate selected from the MVP (motion vector predictor) candidates included in the (A)MVP candidate list as the MVP of the current block. The selection is performed based on the selection information (mvp flag or mvp index) described above. In this case, the MVD of the current block may be derived based on information on the MVD, and the motion vector of the current block may be derived based on the MVP of the current block and the MVD. Also, the reference picture index of the current block may be derived based on the reference picture index information. In a list of reference pictures for the current block, a picture pointed to by the reference picture index may be derived as a reference picture referenced for inter prediction of the current block.
[0084] On the other hand, as described below, the motion information of the current block can be derived without constructing a candidate list, in which case the motion information of the current block can be derived by a procedure started in a prediction mode, as described below. In this case, the construction of the candidate list as described above can be omitted.
[0085] The decoding apparatus may generate a prediction sample for the current block based on the motion information of the current block (S520). In this case, the reference picture may be derived based on a reference picture index of the current block, and the prediction sample for the current block may be derived using a sample of a reference block to which the motion vector of the current block points on the reference picture. In this case, as described below, a prediction sample filtering procedure may be further performed on all or some of the prediction samples of the current block, depending on the circumstances.
[0086] For example, the inter prediction unit of the decoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and may determine a prediction mode for the current block based on prediction mode information received by the prediction mode determination unit, derive motion information (such as a motion vector and / or a reference picture index) of the current block based on information regarding the motion information received by the motion information derivation unit, and derive a prediction sample of the current block in the prediction sample derivation unit.
[0087] The decoding apparatus generates a residual sample for the current block based on the received residual information (S530). The decoding apparatus generates a reconstructed sample for the current block based on the prediction sample and the residual sample, and can generate a reconstructed picture based on the reconstructed sample (S540). As described above, an in-loop filtering procedure can then be further applied to the reconstructed picture.
[0088] FIG. 6 exemplarily illustrates an inter prediction procedure.
[0089] 6, as described above, the inter prediction procedure may include an inter prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction execution step (generation of a prediction sample) based on the derived motion information. The inter prediction procedure is performed by an encoding device and a decoding device as described above. In this document, a coding device may include an encoding device and / or a decoding device.
[0090] Referring to FIG. 6, the coding apparatus determines an inter prediction mode for a current block (S600). Various inter prediction modes can be used for predicting a current block in a picture. For example, various modes such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, merge with MVD (MMVD) mode, etc. can be used. Decoder side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, Bi-prediction with CU-level weight (BCW), Bi-directional optical flow (BDOF), etc. can be used in addition to or instead of the additional mode. The affine mode is also called an affine motion prediction mode. The MVP mode is also called an advanced motion vector prediction mode (AMVP). In this document, some modes and / or candidates for motion information derived by some modes may be included in one of candidates for motion information of other modes. For example, an HMVP candidate may be added as a merge candidate of the merge / skip mode, or may be added as an MVP candidate of the MVP mode. When the HMVP candidate is used as a motion information candidate of the merge mode or skip mode, the HMVP candidate is called an HMVP merge candidate.
[0091] Prediction mode information indicating an inter prediction mode of a current block may be signaled from an encoding apparatus to a decoding apparatus. The prediction mode information may be included in a bitstream and received by the decoding apparatus. The prediction mode information may include index information indicating one of a number of candidate modes. Alternatively, the inter prediction mode may be indicated through hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, a skip flag may be signaled to indicate whether or not a skip mode is applied, and if the skip mode is not applied, a merge flag may be signaled to indicate whether or not a merge mode is applied, and if the merge mode is not applied, an MVP mode may be indicated to be applied, or a flag for further classification may be further signaled. The affine mode may be an independent mode that is signaled, or may be a mode that is subordinate to the merge mode or MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.
[0092] The coding apparatus derives motion information for the current block (S610). The motion information may be derived based on the inter prediction mode.
[0093] The coding apparatus may perform inter prediction using motion information of the current block. The encoding apparatus may derive optimal motion information for the current block through a motion estimation procedure. For example, the encoding apparatus may use an original block in an original picture for the current block to search for a similar reference block with high correlation in a fractional pixel unit within a determined search range in the reference picture, and may derive motion information through this. The similarity of the block may be derived based on a difference in phase-based sample values. For example, the similarity of the block may be calculated based on the SAD between the current block (or the template of the current block) and the reference block (or the template of the reference block). In this case, the motion information may be derived based on the reference block with the smallest SAD in the search area. The derived motion information may be signaled to the decoding apparatus by various methods based on the inter prediction mode.
[0094] The coding apparatus performs inter prediction based on motion information for the current block (S620). The coding apparatus may derive predictive samples for the current block based on the motion information. The current block including the predictive samples is called a predicted block.
[0095] Meanwhile, in the case of inter prediction, an inter prediction method that takes image distortion into consideration has been proposed. Specifically, an affine motion model has been proposed that efficiently derives motion vectors for sub-blocks or sample points of a current block, and improves the accuracy of inter prediction despite deformations such as image rotation, zoom-in or zoom-out. That is, the affine motion model derives motion vectors for sub-blocks or sample points of a current block, and prediction using the affine motion model is called affine motion prediction, sub-block-based motion prediction, or sub-block motion prediction.
[0096] For example, the sub-block motion prediction using the affine motion model can efficiently represent four motions, ie, four transformations, as described below.
[0097] Figure 7 exemplarily illustrates motions represented through an affine motion model. Referring to Figure 7, motions that can be represented through the affine motion model can include translation motion, scale motion, rotation motion, and shear motion. That is, not only the translation motion in which an image (part of it) moves on a plane as time passes as shown in Figure 7, but also the scale motion in which an image (part of it) is scaled as time passes, the rotation motion in which an image (part of it) is rotated as time passes, and the shear motion in which an image (part of it) is transformed into a parallelogram as time passes can be efficiently represented through the sub-block unit motion prediction.
[0098] The encoding / decoding apparatus can predict the distortion type of the image based on a motion vector at a control point (CP) of the current block through the affine inter prediction, thereby improving the accuracy of prediction and thereby improving the compression performance of the image. Also, since a motion vector for at least one control point of the current block can be derived using the motion vectors of neighboring blocks of the current block, the burden of data volume for added additional information can be reduced and the efficiency of inter prediction can be significantly improved.
[0099] As an example of the affine motion prediction, three control points, i.e., motion information at three reference points, may be required.
[0100] FIG. 8 exemplarily illustrates the affine motion model in which motion vectors for three control points are used.
[0101] If the position of the top-left sample in the current block 800 is (0,0), then the sample positions (0,0), (w,0), and (0,h) can be determined as the control points as shown in Fig. 8. Hereinafter, the control point of the (0,0) sample position can be indicated as CP0, the control point of the (w,0) sample position can be indicated as CP0, and the control point of the (0,h) sample position can be indicated as CP1.
[0102] Using each of the control points and the motion vectors for the corresponding control points, an equation for the affine motion model can be derived. The equation for the affine motion model can be expressed as follows.
[0103]
number
[0104] Here, w represents the width of the current block 800, h represents the height of the current block 800, and v 0x , v 0y represent the x and y components of the motion vector of CP0, respectively, and v 1x , v 1y represent the x and y components of the motion vector of CP0, respectively, and v 2x , v 2y represent the x and y components of the motion vector of CP1, respectively. Also, x represents the x component of the position of the target sample in the current block 800, y represents the y component of the position of the target sample in the current block 800, and v x is the x component of the motion vector of the target sample in the current block 800, v y represents the y-component of the motion vector of the target sample in the current block 800.
[0105] Since the motion vector of CP0, the motion vector of CP1, and the motion vector of CP2 are known, a motion vector according to a sample position in the current block can be derived based on Equation 1. That is, according to the affine motion model, a motion vector at the control point, v0(v 0x ,v 0y ), v1(v 1x ,v 1y ), v2(v 2x ,v 2y ) is scaled, and a motion vector of the target sample according to the position of the target sample can be derived. That is, according to the affine motion model, a motion vector of each sample in the current block can be derived based on the motion vector of the control point. Meanwhile, a set of motion vectors of samples in the current block derived by the affine motion model can be referred to as an affine motion vector field (MVF).
[0106] Meanwhile, the six parameters for Equation 1 can be expressed as a, b, c, d, e, and f as in the following equation, and the equation for the affine motion model expressed by the six parameters is as follows.
[0107]
number
[0108] Here, w represents the width of the current block 800, h represents the height of the current block 800, and v 0x , v 0y represent the x and y components of the motion vector of CP0, respectively, and v 1x , v 1y represent the x and y components of the motion vector of CP0, respectively, and v 2x , v 2yrepresent the x and y components of the motion vector of CP1, respectively. Also, x represents the x component of the position of the target sample in the current block 800, y represents the y component of the position of the target sample in the current block 800, and v x is the x component of the motion vector of the target sample in the current block 800, v y represents the y-component of the motion vector of the target sample in the current block 800.
[0109] The affine motion model or the affine inter prediction using the six parameters may be denoted as a six-parameter affine motion model or AF6.
[0110] As an example of the affine motion prediction, motion information at two control points, i.e., two reference points, may be required.
[0111] 9 exemplarily illustrates the affine unit motion model in which motion vectors for two control points are used. The affine motion model using two control points can express three motions including translational motion, scale motion, and rotational motion. The affine motion model expressing three motions can also be referred to as a similarity affine motion model or a simplified affine motion model.
[0112] If the position of the top-left sample in the current block 900 is (0,0), the sample positions (0,0) and (w,0) can be determined as the control points as shown in Fig. 9. Hereinafter, the control point of the sample position (0,0) can be indicated as CP0, and the control point of the sample position (w,0) can be indicated as CP0.
[0113] Using each of the control points and the motion vectors for the corresponding control points, an equation for the affine motion model can be derived. The equation for the affine motion model can be expressed as follows.
[0114]
number
[0115] where w represents the width of the current block 900, and v 0x , v 0y represent the x and y components of the motion vector of CP0, respectively, and v 1x , v 1y represent the x and y components of the motion vector of CP0, respectively. Also, x represents the x component of the position of the target sample in the current block 900, y represents the y component of the position of the target sample in the current block 900, and v x is the x component of the motion vector of the target sample in the current block 900, v y represents the y-component of the motion vector of the target sample in the current block 900.
[0116] Meanwhile, the four parameters of Equation 3 can be expressed as a, b, c, and d as follows, and the equation for the affine motion model expressed by the four parameters is as follows.
[0117]
number
[0118] where w represents the width of the current block 900, and v 0x , v 0y represent the x and y components of the motion vector of CP0, respectively, and v 1x , v 1yrepresent the x and y components of the motion vector of CP0, respectively. Also, x represents the x component of the position of the target sample in the current block 900, y represents the y component of the position of the target sample in the current block 900, and v x is the x component of the motion vector of the target sample in the current block 900, v y represents the y component of the motion vector of the target sample in the current block 900. Since the affine motion model using the two control points can be expressed by four parameters a, b, c, and d as in Equation 4, the affine motion model or the affine motion prediction using the four parameters can be expressed as a four-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 vector of the control point. Meanwhile, a set of motion vectors of samples in the current block derived by the affine motion model can be expressed as an affine motion vector field (MVF).
[0119] Meanwhile, as described above, the affine motion model can derive a motion vector for each sample, thereby significantly improving the accuracy of inter prediction, but in this case, the complexity of the motion compensation process may be significantly increased.
[0120] Therefore, instead of deriving a motion vector in units of samples, it is possible to restrict the motion vector to be derived in units of sub-blocks within the current block.
[0121] Fig. 10 exemplarily illustrates a method of deriving a motion vector in sub-block units based on an affine motion model. Fig. 10 exemplarily illustrates a case where the size of the current block is 16x16 and the motion vector is derived in 4x4 sub-block units. The sub-blocks can be set to various sizes, and for example, when the sub-blocks are set to a size of nxn (n is a positive integer, e.g., n is 4), the motion vector can be derived in nxn sub-block units in the current block based on the affine motion model, and various methods can be applied to derive a motion vector representing each sub-block.
[0122] For example, referring to FIG. 10, the motion vector of each subblock may be derived by using the sample position at the center or the lower right side of the center as the representative coordinate. Here, the lower right position of the center may refer to a sample position at the lower right side of four samples located at the center of the subblock. For example, when n is an odd number, one sample may be located at the center of the subblock, and in this case, the center sample position may be used to derive the motion vector of the subblock. However, when n is an even number, four samples may be located adjacent to the center of the subblock, and in this case, the lower right sample position may be used to derive the motion vector. For example, referring to FIG. 10, the representative coordinates of each subblock may be derived as (2,2), (6,2), (10,2), ... (14,14), and the encoding / decoding apparatus may substitute each of the representative coordinates of the subblocks into the above-mentioned Equation 1 or 3 to derive the motion vector of each subblock. Predicting the motion of a sub-block within a current block through the affine motion model is called sub-block-based motion prediction or sub-block motion prediction, and the motion vector of such a sub-block can be denoted as MVF.
[0123] Meanwhile, as an example, the size of the sub-block within the current block may be derived based on the following formula:
[0124]
number
[0125] Here, M represents the width of the sub-block, and N represents the height of the sub-block. 0x , v 0y represent the x and y components of the CPMV0 of the current block, respectively, and v 1x , v 1y where x and y represent the x and y components of the CPMV1 of the current block, w represents the width of the current block, h represents the height of the current block, and MvPre represents the motion vector fraction accuracy. For example, the motion vector fraction accuracy can be set to 1 / 16.
[0126] Meanwhile, the inter prediction using the above-mentioned affine motion model, i.e., affine motion prediction, may include a merge mode (AF_MERGE) and an affine inter mode (AF_INTER). Here, the affine inter mode may be referred to as an affine motion vector prediction mode (AF_MVP).
[0127] The merge mode using the affine motion model is similar to the existing merge mode in that MVD for the motion vector of the control point is not transmitted. That is, the merge mode using the affine motion model can indicate an encoding / decoding method in which CPMV for each of two or three control points from neighboring blocks of the current block is derived and prediction is performed without coding for MVD (motion vector difference) like the existing skip / merge mode.
[0128] For example, when the AF_MRG mode is applied to the current block, CP0 and MVs for CP0 (i.e., CPMV0 and CPMV1) can be derived from neighboring blocks of the current block to which an affine mode, i.e., a prediction mode using affine motion prediction, is applied. That is, CPMV0 and CPMV1 of the neighboring blocks to which the affine mode is applied can be derived as merging candidates, and the merging candidates can be derived from CPMV0 and CPMV1 for the current block.
[0129] The affine inter mode may indicate inter prediction, which derives a motion vector predictor (MVP) for the motion vector of the control point, derives the motion vector of the control point based on a received motion vector difference (MVD) and the MVP, derives an affine MVF of the current block based on the motion vector of the control point, and performs prediction based on the affine MVF. Here, the motion vector of the control point may be indicated as a control point motion vector (CPMV), the MVP of the control point may be indicated as a control point motion vector predictor (CPMVP), and the MVD of the control point may be indicated as a control point motion vector difference (CPMVD). Specifically, for example, the encoding apparatus may derive a control point point motion vector predictor (CPMVP) and a control point point motion vector (CPMVD) for each of CP0 and CP1 (or CP0, CP1, and CP2), and may transmit or store information on the CPMVP and / or CPMVD, which is a difference value between the CPMVP and CPMV.
[0130] Here, when the affine inter mode is applied to the current block, the encoding device / decoding device can construct an affine MVP candidate list based on neighboring blocks of the current block, where the affine MVP candidates are referred to as CPMVP pair candidates, and the affine MVP candidate list is also referred to as the CPMVP candidate list.
[0131] In addition, each affine MVP candidate may represent a combination of CPMVPs of CP0 and CP1 in a four parameter affine motion model, or a combination of CPMVPs of CP0, CP1, and CP2 in a six parameter affine motion model.
[0132] Meanwhile, for affine inter prediction, an inherited affine candidate or an inherited candidate and a constructed affine candidate are considered for the construction of an affine MVP candidate list. An inherited candidate may refer to a candidate whose motion information of a peripheral block of a current block, i.e., the CPMV of the peripheral block itself, is added to the motion candidate list of the current block without any different modification or combination. Here, the peripheral blocks may include a peripheral block A0 at the lower left corner of the current block, a peripheral block A1 at the left side, a peripheral block B0 at the upper side, a peripheral block B1 at the upper right corner, and a peripheral block B2 at the upper left corner. A constructed affine candidate refers to an affine candidate that constructs the CPMV of the current block by a combination of the CPMW of at least two peripheral blocks. The derivation of the constructed affine candidate will be described in detail below.
[0133] Here, the inherited affine candidates are:
[0134] For example, if a neighboring block of the current block is an affine block and the reference picture of the current block is the same as the reference picture of the neighboring block, an affine MVP pair of the current block can be determined from the affine motion model of the neighboring block. Here, the affine block may indicate a block to which the affine inter prediction is applied. The inherited affine candidate may indicate a CPMVP (e.g., the affine MVP pair) derived based on the affine motion model of the neighboring block.
[0135] Specifically, as an example, the inherited affine candidates can be derived as described below.
[0136] FIG. 11 exemplarily illustrates neighboring blocks for deriving the inherited affine candidates.
[0137] Referring to FIG. 11, the neighboring blocks of the current block may include neighboring block A0 on the left side of the current block, neighboring block A1 in the lower left corner of the current block, neighboring block B0 on the upper side of the current block, neighboring block B1 in the upper right corner of the current block, and neighboring block B2 in the upper left corner of the current block.
[0138] For example, if the size of the current block is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the left neighboring block may be a block including a sample with coordinates (-1,H-1), the upper neighboring block may be a block including a sample with coordinates (W-1,-1), the upper right corner neighboring block may be a block including a sample with coordinates (W,-1), the lower left corner neighboring block may be a block including a sample with coordinates (-1,H), and the upper left corner neighboring block may be a block including a sample with coordinates (-1,-1).
[0139] The encoding / decoding device may sequentially check the neighboring blocks A0, A1, B0, B1, and B2, and may derive two or three CPMVs of the current block based on the affine motion models of the neighboring blocks if the neighboring blocks are coded using an affine motion model and the reference picture of the current block and the reference picture of the neighboring blocks are the same. The CPMVs may be derived from affine MVP candidates of the current block. The affine MVP candidates may indicate the inherited affine candidates.
[0140] As an example, up to two inherited affine candidates can be derived based on the surrounding blocks.
[0141] For example, the encoding / decoding apparatus may derive a first affine MVP candidate for the current block based on a first block among neighboring blocks. Here, the first block may be coded with an affine motion model, and a reference picture of the first block may be the same as a reference picture of the current block. That is, the first block may be a block that satisfies a condition that is first confirmed by checking the neighboring blocks in a specific order. The condition may be that the block is coded with an affine motion model, and a reference picture of the block is the same as a reference picture of the current block.
[0142] Thereafter, the encoding / decoding apparatus may derive a second affine MVP candidate for the current block based on a second block in the neighboring blocks. Here, the second block may be coded with an affine motion model, and the reference picture of the second block may be the same as the reference picture of the current block. That is, the second block may be a block that satisfies a second confirmed condition by checking the neighboring blocks in a specific order. The condition may be that the block is coded with an affine motion model, and the reference picture of the block is the same as the reference picture of the current block.
[0143] On the other hand, for example, if the available number of inherited affine candidates is less than two (i.e., the number of derived inherited affine candidates is less than two), a constructed affine candidate can be considered. The constructed affine candidate can be derived as follows:
[0144] FIG. 12 exemplarily shows spatial candidates for the constructed affine candidates.
[0145] As shown in Fig. 12, the motion vectors of the neighboring blocks of the current block are divided into three groups. Referring to Fig. 12, the neighboring blocks may 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.
[0146] The peripheral block A may indicate a peripheral block located at the upper left of the upper left sample position of the current block, the peripheral block B may indicate a peripheral block located at the upper left sample position of the current block, and the peripheral block C may indicate a peripheral block located at the left of the upper left sample position of the current block. Also, the peripheral block D may indicate a peripheral block located at the upper right sample position of the current block, and the peripheral block E may indicate a peripheral block located at the upper right of the upper right sample position of the current block. Also, the peripheral block F may indicate a peripheral block located at the left of the lower left sample position of the current block, and the peripheral block G may indicate a peripheral block located at the lower left of the lower left sample position of the current block.
[0147] For example, the three groups are S 0 , S 1 , S 2 and S 0 , the above S 1 , the above S 2 can be derived as shown in the following table:
[0148] [Table 1]
[0149] Here, mv A is the motion vector of the neighboring block A, mv B is the motion vector of the neighboring block B, mv C is the motion vector of the neighboring block C, mv D is the motion vector of the neighboring block D, mv E is the motion vector of the neighboring block E, mv F is the motion vector of the neighboring block F, mv G indicates the motion vector of the surrounding block G. 0 is the first group, S 1is the second group, S 2 may be denoted as the third group.
[0150] The encoding device / decoding device is 0 From mv 0 can be derived, and S 1 From mv 1 can be derived, and S 2 From mv 2 can be derived, and mv 0 , the mv 1 , the mv 2 The affine MVP candidate may represent the constructed affine candidate. 0 may be a CPMVP candidate for CP0, 1 may be a CPMVP candidate for CP1, 2 may be a CPMVP candidate for CP2.
[0151] Here, the mv 0 The reference picture for mv may be the same as the reference picture for the current block. 0 S in a specific order 0 The specific order may be a motion vector that satisfies a condition confirmed for the first time by checking the motion vectors in the S. The condition may be that a reference picture for the motion vector is the same as a reference picture for the current block. 0 Alternatively, the order may be peripheral block A, peripheral block B, and peripheral block C. Furthermore, the order may be other than the above-mentioned order, and is not limited to the above-mentioned example.
[0152] Also, the above mv 1 The reference picture for mv may be the same as the reference picture for the current block. 1 S in a specific order 1The specific order may be a motion vector that satisfies a condition confirmed for the first time by checking the motion vectors in the S. The condition may be that a reference picture for the motion vector is the same as a reference picture for the current block. 1 The order may be from peripheral block D to peripheral block E. The order may be other than the above-mentioned order, and is not limited to the above-mentioned example.
[0153] Also, the above mv 2 The reference picture block for mv may be the same as the reference picture for the current block. 2 S in a specific order 2 The specific order may be a motion vector that satisfies a condition confirmed for the first time by checking the motion vectors in the S. The condition may be that a reference picture for the motion vector is the same as a reference picture for the current block. 2 The order may be from the peripheral block F to the peripheral block G. The order may be other than the above-mentioned order, and is not limited to the above-mentioned example.
[0154] On the other hand, the mv 0 and the above mv 1 Only when available, i.e., the mv 0 and the above mv 1 If only mv is derived, 2 can be derived as follows:
[0155]
number
[0156] Here, mv 2 x is the above mv 2 represents the x component of mv 2 y is the above mv 2 represents the y component of mv 0 x is the above mv 0 represents the x component of mv0 y is the above mv 0 represents the y component of mv 1 x is the above mv 1 represents the x component of mv 1 y is the above mv 1 In addition, w represents the width of the current block, and h represents the height of the current block.
[0157] On the other hand, the mv 0 and the above mv 2 If only mv is derived, 1 can be derived as follows:
[0158]
number
[0159] Here, mv 1 x is the above mv 1 represents the x component of mv 1 y is the above mv 1 represents the y component of mv 0 x is the above mv 0 represents the x component of mv 0 y is the above mv 0 represents the y component of mv 2 x is the above mv 2 represents the x component of mv 2 y is the above mv 2 In addition, w represents the width of the current block, and h represents the height of the current block.
[0160] Also, if the number of available inherited affine candidates and / or constructed affine candidates is less than 2, the AMVP process of the existing HEVC standard can be applied to construct the affine MVP list. That is, if the number of available inherited affine candidates and / or constructed affine candidates is less than 2, a process of constructing MVP candidates in the existing HEVC standard is performed.
[0161] On the other hand, a flowchart of an embodiment for constructing the above-mentioned affine MVP list is as described below.
[0162] FIG. 13 illustrates an example of constructing an affine MVP list.
[0163] 13, the encoding device / decoding device may add an inherited candidate to an affine MVP list of a current block (S1300). The inherited candidate may indicate the inherited affine candidate described above.
[0164] Specifically, the encoding / decoding apparatus may derive up to two inherited affine candidates from neighboring blocks of the current block (S1305), where the neighboring blocks may include a left neighboring block A0, a lower left neighboring block A1, an upper neighboring block B0, a right upper neighboring block B1, and an upper left neighboring block B2 of the current block.
[0165] For example, the encoding / decoding apparatus may derive a first affine MVP candidate for the current block based on a first block among neighboring blocks. Here, the first block may be coded with an affine motion model, and a reference picture of the first block may be the same as a reference picture of the current block. That is, the first block may be a block that satisfies a condition that is first confirmed by checking the neighboring blocks in a specific order. The condition may be that the block is coded with an affine motion model, and a reference picture of the block is the same as a reference picture of the current block.
[0166] Thereafter, the encoding / decoding apparatus may derive a second affine MVP candidate for the current block based on a second block among neighboring blocks. Here, the second block may be coded with an affine motion model, and a reference picture of the second block may be the same as a reference picture of the current block. That is, the second block may be a block that satisfies a second confirmed condition by checking the neighboring blocks in a specific order. The condition may be that the block is coded with an affine motion model, and a reference picture of the block is the same as a reference picture of the current block.
[0167] On the other hand, the specific order may be the left peripheral block A0, the lower left peripheral block A1, the upper peripheral block B0, the upper right peripheral block B1, and the upper left peripheral block B2. Also, the order may be other than the above-mentioned order, and is not limited to the above-mentioned example.
[0168] The encoding device / decoding device may add a constructed candidate to the affine MVP list of the current block (S1310). The constructed candidate may indicate the above-mentioned constructed affine candidate. The constructed candidate may be indicated as a constructed affine MVP candidate. If the number of available inherited candidates is less than two, the encoding device / decoding device may add a constructed candidate to the affine MVP list of the current block. For example, the encoding device / decoding device may derive one constructed affine candidate.
[0169] Meanwhile, the scheme for deriving the constructed affine candidates may differ depending on whether the affine motion model applied to the current block is a 6-affine motion model or a 4-affine motion model. The scheme for deriving the constructed affine candidates will be described in detail later.
[0170] The encoding device / decoding device may add an HEVC AMVP candidate to the affine MVP list of the current block (S1320). If the number of available inherited candidates and / or constructed candidates is less than 2, the encoding device / decoding device may add an HEVC AMVP candidate to the affine MVP list of the current block. That is, if the number of available inherited candidates and / or constructed candidates is less than 2, the encoding device / decoding device performs a process of configuring an MVP candidate in the existing HEVC standard.
[0171] Meanwhile, the proposed method for deriving the constructed candidates is as follows.
[0172] For example, if the affine motion model applied to the current block is a 6-affine motion model, the constructed candidates can be derived as in the embodiment shown in FIG.
[0173] FIG. 14 shows an example of deriving the constructed candidates.
[0174] Referring to FIG. 14, the encoding / decoding apparatus performs mv 0 , mv 1 , mv 2 That is, the encoding device / decoding device checks the available mv 0 , mv 1 , mv 2 Here, it can be determined whether the mv 0 may be a CPMVP candidate of CP0 of the current block, and the mv 1 may be a CPMVP candidate for CP1, 2 may be a CPMVP candidate for CP2. 0 , the mv 1 , the mv 2 can be denoted as a candidate motion vector for the CP.
[0175] For example, the encoding / decoding apparatus may check whether the motion vectors of the neighboring blocks in the first group satisfy a certain condition in a certain order. The encoding / decoding apparatus may set the motion vector of the neighboring block that satisfies the condition first confirmed in the checking process as the mv 0 That is, the above mv 0 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the first group according to a specific order. If the motion vectors of the neighboring blocks in the first group do not satisfy the specific condition, the available mv 0may not exist. Here, for example, the specific order may be from the neighboring block A in the first group to the neighboring block B and the neighboring block C. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0176] Also, for example, the encoding device / decoding device may check whether the motion vectors of the neighboring blocks in the second group satisfy a certain condition in a certain order. The encoding device / decoding device may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 1 That is, the above mv 1 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the second group according to a specific order. If the motion vectors of the neighboring blocks in the second group do not satisfy the specific condition, the available mv 1 may not exist. Here, for example, the specific order may be from the neighboring block D to the neighboring block E in the second group. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0177] Also, for example, the encoding device / decoding device may check whether the motion vectors of the neighboring blocks in the third group satisfy a certain condition in a certain order. The encoding device / decoding device may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 2 That is, the above mv 2 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the third group according to a specific order. If the motion vectors of the neighboring blocks in the third group do not satisfy the specific condition, the available mv 2may not exist. Here, for example, the specific order may be from the neighboring block F to the neighboring block G in the third group. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0178] Meanwhile, the first group may include motion vectors of peripheral blocks A, B, and C, the second group may include motion vectors of peripheral blocks D and E, and the third group may include motion vectors of peripheral blocks F and G. The peripheral block A may indicate a peripheral block located at the upper left of the upper left sample position of the current block, the peripheral block B may indicate a peripheral block located at the upper left sample position of the current block, the peripheral block C may indicate a peripheral block located at the left of the upper left sample position of the current block, the peripheral block D may indicate a peripheral block located at the upper right sample position of the current block, the peripheral block E may indicate a peripheral block located at the upper right of the upper right sample position of the current block, the peripheral block F may indicate a peripheral block located at the left of the lower left sample position of the current block, and the peripheral block G may indicate a peripheral block located at the lower left of the lower left sample position of the current block.
[0179] The mv for the current block 0 and the above mv 1 only available, i.e., the mv 0 and the above mv 1 When only mv is derived, the encoding device / decoding device calculates mv for the current block based on Equation 6. 2The encoding device / decoding device can derive the derived mv 0 and the above mv 1 Substituting, mv 2 can be derived.
[0180] The mv for the current block 0 and the above mv 2 only available, i.e., the mv 0 and the above mv 2 When only mv is derived, the encoding device / decoding device calculates mv for the current block based on Equation 7. 1 The encoding device / decoding device can derive the derived mv 0 and the above mv 2 Substituting, mv 1 can be derived.
[0181] The encoding device / decoding device is 0 , mv 1 and mv 2 can be derived as a constructed candidate of the current block (S1430). 0 , the mv 1 and the above mv 2 is available, i.e., the mv 0 , the mv 1 and the above mv 2 is derived, the encoding device / decoding device 0 , the mv 1 and the above mv 2 can be derived as a constructed candidate for the current block.
[0182] Also, the mv 0 and the above mv 1only available, i.e., the mv 0 and the above mv 1 When only mv is derived, the encoding device / decoding device 0 , the mv 1 and mv derived based on the above-mentioned Equation 6 2 can be derived as the constructed candidate for the current block.
[0183] Also, the mv 0 and the above mv 2 only available, i.e., the mv 0 and the above mv 2 When only mv is derived, the encoding device / decoding device 0 , the mv 2 and mv derived based on the above-mentioned Equation 7 1 can be derived as the constructed candidate for the current block.
[0184] Also, for example, when the affine motion model applied to the current block is a 4-affine motion model, the constructed candidates can be derived as in the embodiment shown in FIG.
[0185] FIG. 15 shows an example of deriving the constructed candidates.
[0186] Referring to FIG. 15, the encoding / decoding apparatus performs mv 0 , mv 1 , mv 2 That is, the encoding device / decoding device checks the available mv 0 , mv 1 , mv 2 Here, it can be determined whether the mv 0may be a CPMVP candidate of CP0 of the current block, and the mv 1 may be a CPMVP candidate of CP1, 2 may be a CPMVP candidate for CP2.
[0187] For example, the encoding / decoding apparatus may check whether the motion vectors of the neighboring blocks in the first group satisfy a certain condition in a certain order. The encoding / decoding apparatus may set the motion vector of the neighboring block that satisfies the condition first confirmed in the checking process as the mv 0 That is, the above mv 0 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the first group according to a specific order. If the motion vectors of the neighboring blocks in the first group do not satisfy the specific condition, the available mv 0 may not exist. Here, for example, the specific order may be from the neighboring block A in the first group to the neighboring block B and the neighboring block C. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0188] Also, for example, the encoding device / decoding device may check whether the motion vectors of the neighboring blocks in the second group satisfy a certain condition in a certain order. The encoding device / decoding device may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 1 That is, the above mv 1 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the second group according to a specific order. If the motion vectors of the neighboring blocks in the second group do not satisfy the specific condition, the available mv 1may not exist. Here, for example, the specific order may be from the neighboring block D to the neighboring block E in the second group. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0189] Also, for example, the encoding device / decoding device may check whether the motion vectors of the neighboring blocks in the third group satisfy a certain condition in a certain order. The encoding device / decoding device may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 2 That is, the above mv 2 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the third group according to a specific order. If the motion vectors of the neighboring blocks in the third group do not satisfy the specific condition, the available mv 2 may not exist. Here, for example, the specific order may be from the neighboring block F to the neighboring block G in the third group. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0190] Meanwhile, the first group may include motion vectors of peripheral blocks A, B, and C, the second group may include motion vectors of peripheral blocks D and E, and the third group may include motion vectors of peripheral blocks F and G. The peripheral block A may indicate a peripheral block located at the upper left of the upper left sample position of the current block, the peripheral block B may indicate a peripheral block located at the upper left sample position of the current block, the peripheral block C may indicate a peripheral block located at the left of the upper left sample position of the current block, the peripheral block D may indicate a peripheral block located at the upper right sample position of the current block, the peripheral block E may indicate a peripheral block located at the upper right of the upper right sample position of the current block, the peripheral block F may indicate a peripheral block located at the left of the lower left sample position of the current block, and the peripheral block G may indicate a peripheral block located at the lower left of the lower left sample position of the current block.
[0191] The mv for the current block 0 and the above mv 1 If only the mv 0 , the mv 1 and the above mv 2 is available, i.e., the mv 0 and the above mv 1 If only mv 0 , the mv 1 and the above mv 2 is derived, the encoding device / decoding device 0 , the mv 1 can be derived as a constructed candidate for the current block (S1510).
[0192] On the other hand, the mv 0 and the above mv 2 only available, i.e., the mv 0 and the above mv 2 When only mv is derived, the encoding device / decoding device calculates mv for the current block based on Equation 7. 1 The encoding device / decoding device can derive the derived mv 0 and the above mv 2 Substituting, mv 1 can be derived.
[0193] Thereafter, the encoding device / decoding device uses the derived mv 0 and mv 1 can be derived as a constructed candidate for the current block (S1510).
[0194] Meanwhile, this document proposes another embodiment for deriving the inherited affine candidates, which can reduce the computational complexity and improve the coding performance when deriving the inherited affine candidates.
[0195] Meanwhile, this document proposes another embodiment for deriving the inherited affine candidates, which can reduce the computational complexity and improve the coding performance when deriving the inherited affine candidates.
[0196] FIG. 16 exemplarily shows the locations of the surrounding blocks scanned to derive the inherited affine candidates.
[0197] The encoding device / decoding device may derive up to two inherited affine candidates from neighboring blocks of the current block. Figure 16 may show the neighboring blocks for the inherited affine candidates. For example, the neighboring blocks may include neighboring block A and neighboring block B shown in Figure 16. The neighboring block A may represent the left neighboring block A0 described above, and the neighboring block B may represent the upper neighboring block B0 described above.
[0198] For example, the encoding apparatus / decoding apparatus may check whether the neighboring blocks are available in a specific order, and may derive an inherited affine candidate for the current block based on the first identified available neighboring block. That is, the encoding apparatus / decoding apparatus may check whether the neighboring blocks satisfy a specific condition in a specific order, and may derive an inherited affine candidate for the current block based on the first identified available neighboring block. Also, the encoding apparatus / decoding apparatus may derive an inherited affine candidate for the current block based on a second identified neighboring block that satisfies a specific condition. That is, the encoding apparatus / decoding apparatus may derive an inherited affine candidate for the current block based on a second identified neighboring block that satisfies a specific condition. Here, the availability may be coded using an affine motion model, and a reference picture of the block may be the same as a reference picture of the current block. That is, the specific condition may be coded using an affine motion model, and a reference picture of the block may be the same as a reference picture of the current block. Also, for example, the specific order may be the neighboring block A → the neighboring block B. Meanwhile, a pruning check process between two inherited affine candidates (i.e., derived inherited affine candidates) may not be performed. The pruning check process may refer to a process of checking whether they are identical to each other, and removing the candidate derived in the later order if they are the same candidate.
[0199] The above-mentioned embodiment proposes a scheme to check only two surrounding blocks (i.e., surrounding block A and surrounding block B) to derive the inherited affine candidate, instead of checking all existing surrounding blocks (i.e., surrounding block A, surrounding block B, surrounding block C, surrounding block D, surrounding block E) to derive the inherited affine candidate. Here, the surrounding block C may indicate the surrounding block B1 in the upper right corner mentioned above, the surrounding block D may indicate the surrounding block A1 in the lower left corner mentioned above, and the surrounding block E may indicate the surrounding block B2 in the upper left corner mentioned above.
[0200] In order to analyze the spatial correlation between the neighboring blocks and the current block by affine inter-prediction, the probability that affine prediction is applied to the current block when affine prediction is applied to each neighboring block may be referenced. The probability that affine prediction is applied to the current block when affine prediction is applied to each neighboring block may be derived as shown in the following table.
[0201] [Table 2]
[0202] Referring to Table 2, it can be seen that among the neighboring blocks, neighboring block A and neighboring block B have high spatial correlation with the current block. Therefore, an effect of deriving high decoding performance while reducing processing time can be obtained through an embodiment in which only neighboring blocks A and B having high spatial correlation are used to derive the inherited affine candidate.
[0203] Meanwhile, the pruning check process may be performed to prevent the same candidate from being present in the candidate list. The pruning check process may be advantageous in terms of encoding efficiency since it can eliminate redundancy, but has a disadvantage in that the pruning check process increases the computational complexity. In particular, the pruning check process for affine candidates is very complex since it should be performed for the affine type (e.g., whether the affine motion model is a 4-affine motion model or a 6-affine motion model), the reference picture (or reference picture index), and the MVs of CP0, CP1, and CP2. Therefore, this embodiment proposes a scheme in which the pruning check process is not performed 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 neighboring blocks A and B, the distance is far and the spatial correlation is low, so that the inherited_A and the inherited_B are unlikely to be the same. Therefore, it may be appropriate not to perform a pruning check process between the inherited affine candidates.
[0204] Alternatively, based on the above, a scheme of performing a minimal pruning check process may be proposed, for example, the encoding device / decoding device may perform a pruning check process by comparing only the MVs of CP0 of the inherited affine candidates.
[0205] However, in this document, an alternative embodiment for deriving the inherited affine candidates is proposed.
[0206] FIG. 17 exemplarily shows the locations of the surrounding blocks scanned to derive the inherited affine candidates.
[0207] The encoding device / decoding device may derive up to two inherited affine candidates from the neighboring blocks of the current block. Figure 17 may show the neighboring blocks for the inherited affine candidates. For example, the neighboring blocks may include neighboring blocks A to D shown in Figure 17. The neighboring block A may indicate the left neighboring block A0 described above, the neighboring block B may indicate the upper neighboring block B0 described above, the neighboring block C may indicate the upper right corner neighboring block B1 described above, and the neighboring block D may indicate the lower left corner neighboring block A1 described above.
[0208] For example, the encoding apparatus / decoding apparatus may check whether the neighboring blocks are available in a specific order, and may derive an inherited affine candidate for the current block based on the first identified available neighboring block. That is, the encoding apparatus / decoding apparatus may check whether the neighboring blocks satisfy a specific condition in a specific order, and may derive an inherited affine candidate for the current block based on the first identified available neighboring block. Also, the encoding apparatus / decoding apparatus may derive an inherited affine candidate for the current block based on a second identified neighboring block that satisfies a specific condition. That is, the encoding apparatus / decoding apparatus may derive an inherited affine candidate for the current block based on a second identified neighboring block that satisfies a specific condition. Here, the availability may be coded using an affine motion model, and a reference picture of the block may be the same as a reference picture of the current block. That is, the specific condition may be coded using an affine motion model, and a reference picture of the block may be the same as a reference picture of the current block.
[0209] Surrounding blocks A and D in FIG. 17 can be used to derive the left predictor among the inherited affine candidates, and surrounding blocks B and C can be used to derive the upper predictor among the inherited affine candidates.
[0210] The left predictor, i.e., the motion candidate that can be added in the left peripheral block, can be added to the inherited candidate in the order of blocks A→D or D→A, with the "neighboring effective block" that is determined to be available first. The upper predictor, i.e., the motion candidate that can be added in the upper peripheral block, can be added to the inherited candidate in the order of blocks B→C or C→B, with the "neighboring effective block" that is determined to be available first. That is, the maximum number of inherited candidates that can be derived from each of the left predictor and the upper predictor is one.
[0211] If the "adjacent valid block" is coded with a four-parameter affine motion model, the inherited candidate can be determined using the four-parameter affine motion model, and if the "adjacent valid block" is coded with a six-parameter affine motion model, the inherited candidate can be determined using the six-parameter affine motion model.
[0212] When the number of inherited candidates determined by the left predictor and the upper predictor is two, the pruning check process may or may not be performed. It is common to perform the pruning check process to prevent the same candidate from being added to the candidate list, but the pruning check process increases the complexity because the MV of each CP should be compared in the motion prediction using the affine model. However, when the inherited candidates are configured using the embodiment described with reference to FIG. 17, the distance between the candidates determined by the left predictor and the upper predictor is large, so that the candidates are very likely to be different from each other. Therefore, even if the pruning check process is not performed, there is an effect that there is almost no degradation in coding performance.
[0213] However, in this document, another embodiment is proposed for deriving the inherited affine candidates.
[0214] FIG. 18 exemplarily illustrates positions for deriving inherited affine candidates.
[0215] The encoding device / decoding device may derive up to two inherited affine candidates from the neighboring blocks of the current block. FIG. 18 shows the neighboring blocks for the inherited affine candidates according to this embodiment. For example, the neighboring blocks may include neighboring blocks A to E shown in FIG. 18. The neighboring block A may indicate the left neighboring block A0 described above, the neighboring block B may indicate the upper neighboring block B0 described above, the neighboring block C may indicate the upper right neighboring block B1 described above, the neighboring block D may indicate the lower left neighboring block A1 described above, and the neighboring block E may indicate the left neighboring block located adjacent to the lower part of the upper left neighboring block B2 described above.
[0216] For example, the encoding apparatus / decoding apparatus may check whether the neighboring blocks are available in a specific order, and may derive an inherited affine candidate for the current block based on the first identified available neighboring block. That is, the encoding apparatus / decoding apparatus may check whether the neighboring blocks satisfy a specific condition in a specific order, and may derive an inherited affine candidate for the current block based on the first identified available neighboring block. Also, the encoding apparatus / decoding apparatus may derive an inherited affine candidate for the current block based on the second identified neighboring block that satisfies a specific condition. That is, the encoding apparatus / decoding apparatus may derive an inherited affine candidate for the current block based on the second identified neighboring block that satisfies a specific condition. Here, the availability may be coded using an affine motion model, and a reference picture of the block may be the same as a reference picture of the current block. That is, the specific condition may be coded using an affine motion model, and a reference picture of the block may be the same as a reference picture of the current block.
[0217] The surrounding blocks A, D, and E in FIG. 18 can be used to derive the left predictor of the inherited affine candidates, and the surrounding blocks B and C can be used to derive the upper predictor of the inherited affine candidates.
[0218] The left predictor, i.e., the motion candidate that can be added in the left peripheral block, can be added to the inherited candidate of the "neighboring valid block" that is determined to be first available in the block order of A→D→E (or A→E→D, D→A→E). The upper predictor, i.e., the motion candidate that can be added in the upper peripheral block, can be added to the inherited candidate of the "neighboring valid block" that is determined to be first available in the block order of B→C or C→B. That is, the maximum number of inherited candidates that can be derived from each of the left predictor and the upper predictor is 1.
[0219] If the "adjacent valid block" is coded with a four-parameter affine motion model, the inherited candidates can be determined using the four-parameter affine motion model, and if the "adjacent valid block" is coded with a six-parameter affine motion model, the inherited candidates can be determined using the six-parameter affine motion model.
[0220] When the number of inherited candidates determined by the left predictor and the upper predictor is two, a pruning check process may or may not be performed. It is common to perform a pruning check process to prevent the same candidate from being added to a candidate list, but the pruning check process increases the complexity because the MV of each CP should be compared in motion prediction using an affine model. However, when inherited candidates are configured using the embodiment described with reference to FIG. 18, the distance between the candidates determined by the left predictor and the upper predictor is large, so that the candidates are very likely to be different from each other. Therefore, even if a pruning check process is not performed, there is an effect that there is almost no degradation in coding performance.
[0221] Meanwhile, instead of performing the pruning check process, a pruning check method with low complexity can be used, for example, the pruning check process can be performed by only comparing the MV of CP0.
[0222] The reason why E is determined as the position of the neighboring block to be scanned for the inherited candidate is as follows: In the line buffer reduction method described below, if the reference block (i.e., neighboring block B, neighboring block C) located above the current block does not exist in the same CTU as the current block, the line buffer reduction method cannot be used. Therefore, when applying the line buffer reduction method together while generating the inherited candidate, the positions of the neighboring blocks shown in FIG. 18 are used to maintain the coding performance.
[0223] In addition, the method can construct a maximum of one inherited candidate and use it as an affine MVP candidate. In this case, the motion vector of the first valid neighboring block in the order A→B→C→D→E can be used as the inherited candidate, regardless of the left predictor and the upper predictor.
[0224] However, in this document, another embodiment is proposed for deriving the inherited affine candidates.
[0225] In this embodiment, the neighboring blocks shown in FIG. 18 can be used to derive the inherited candidates.
[0226] That is, the encoding / decoding apparatus can derive up to two inherited affine candidates from neighboring blocks of the current block.
[0227] Also, the encoding apparatus / decoding apparatus may check whether the neighboring blocks are available in a specific order, and may derive an inherited affine candidate for the current block based on the first identified available neighboring block. That is, the encoding apparatus / decoding apparatus may check whether the neighboring blocks satisfy a specific condition in a specific order, and may derive an inherited affine candidate for the current block based on the first identified available neighboring block. Also, the encoding apparatus / decoding apparatus may derive an inherited affine candidate for the current block based on a neighboring block that satisfies a second identified specific condition. That is, the encoding apparatus / decoding apparatus may derive an inherited affine candidate for the current block based on a neighboring block that satisfies a second identified specific condition. Here, being available may be coded with an affine motion model, and a reference picture of the block may be the same as a reference picture of the current block. That is, the specific condition may be coded with an affine motion model, and a reference picture of the block may be the same as a reference picture of the current block.
[0228] As described above, surrounding blocks A, D, and E can be used in deriving the left predictor of the inherited affine candidates, and surrounding blocks B and C can be used in deriving the upper predictor of the inherited affine candidates.
[0229] The left predictor, i.e., the motion candidate that can be added in the left peripheral block, can be added to the inherited candidate of the "neighboring valid block" that is determined to be first available in the block order of A→D→E (or A→E→D, D→A→E). The upper predictor, i.e., the motion candidate that can be added in the upper peripheral block, can be added to the inherited candidate of the "neighboring valid block" that is determined to be first available in the block order of B→C or C→B. That is, the maximum number of inherited candidates that can be derived from each of the left predictor and the upper predictor is 1.
[0230] If the "adjacent valid block" is coded with a four-parameter affine motion model, the inherited candidate can be determined using the four-parameter affine motion model, and if the "adjacent valid block" is coded with a six-parameter affine motion model, the inherited candidate can be determined using the six-parameter affine motion model.
[0231] Also, in this embodiment, when the number of inherited candidates determined by the left predictor and the upper predictor is two, the pruning check process may or may not be performed. It is common to perform the pruning check process to prevent the same candidate from being added to the candidate list, but the pruning check process increases the complexity because the MV of each CP should be compared in the motion prediction using the affine model. However, when the inherited candidates are configured using the embodiment described with reference to FIG. 18, the distance between the candidates determined by the left predictor and the upper predictor is large, so that the candidates are very likely to be different from each other. Therefore, even if the pruning check process is not performed, there is an effect that there is almost no degradation in coding performance.
[0232] Meanwhile, instead of performing the pruning check process, a pruning check method with low complexity can be used. For example, only when the neighboring block E is a "neighboring valid block", it is possible to determine whether the neighboring block E is included in the same coding block as the neighboring block A, and perform the pruning check process. This is because the pruning check is performed only once, and therefore the complexity is low. The reason for performing the pruning check only on the neighboring block E is that the reference blocks of the upper predictor (neighboring block B, neighboring block C) excluding the neighboring block E are located far enough away from the reference blocks of the left predictor (neighboring block A, neighboring block D), and therefore the possibility of forming the same inherited candidate is very low. On the other hand, in the case of the neighboring block E, if it is included in the same block as the neighboring block A, there is a possibility that it forms the same inherited candidate.
[0233] The reason why E is determined as the position of the neighboring block to be scanned for the inherited candidate is as follows: In the line buffer reduction method described below, if the reference block (i.e., neighboring block B, neighboring block C) located above the current block does not exist in the same CTU as the current block, the line buffer reduction method cannot be used. Therefore, when applying the line buffer reduction method together while generating the inherited candidate, the positions of the neighboring blocks shown in FIG. 18 are used to maintain coding performance.
[0234] In addition, the method can generate a maximum of one inherited candidate and use it as an affine MVP candidate. In this case, the motion vector of the first valid neighboring block in the order A→B→C→D→E can be used as the inherited candidate, regardless of the left predictor and the upper predictor.
[0235] Meanwhile, according to one embodiment of the present document, the method of generating an affine MVP list described with reference to Figures 16 to 18 can also be applied to deriving inherited candidates of a merge candidate list based on an affine motion model. In this embodiment, the same process can be applied to generating an affine MVP list and a merge candidate list, which is advantageous in terms of design costs. An example of generating a merge candidate list based on an affine motion model is as follows, and this process can be applied to construct inherited candidates when generating other merge lists.
[0236] Specifically, the merge candidate list can be constructed as follows.
[0237] FIG. 19 shows an example of constructing a merge candidate list for the current block.
[0238] Referring to FIG. 19, the encoding device / decoding device may add inherited merging candidates to a merging candidate list (S1900).
[0239] Specifically, the encoding / decoding apparatus can derive the successive candidates based on neighboring blocks of the current block.
[0240] The neighboring blocks of the current block for deriving the inherited candidates are shown in Fig. 11. That is, the neighboring blocks of the current block may include a neighboring block A0 at the lower left corner of the current block, a neighboring block A1 on the left side of the current block, a neighboring block B0 at the upper right corner of the current block, a neighboring block B1 above the current block, and a neighboring block B2 at the upper left corner of the current block.
[0241] The inherited candidates may be derived based on valid neighboring reconstructed blocks coded in affine mode. For example, the encoding device / decoding device may check neighboring blocks A0, A1, B0, B1, and B2 in sequence or A1, B1, B0, A0, and B2 in sequence, and if the neighboring blocks are coded in affine mode (i.e., the neighboring blocks are validly reconstructed using an affine motion model), it may derive two or three CPMVs for the current block based on the affine motion model of the neighboring blocks, and the CPMVs may be derived as inherited candidates for the current block. As an example, up to five inherited candidates may be added to the merge candidate list. That is, up to five inherited candidates may be derived based on the neighboring blocks.
[0242] In this embodiment, in order to derive inherited candidates, the peripheral blocks of Figures 16 to 18 can be used instead of the peripheral blocks of Figure 11, and the embodiment described with reference to Figures 16 to 18 can be applied.
[0243] Thereafter, the encoding / decoding device can add the constructed candidate to a merge candidate list (S1910).
[0244] For example, if the number of merge candidates in the merge candidate list is less than five, the constructed candidate may be added to the merge candidate list. The constructed candidate may indicate a merge candidate generated by combining neighboring motion information (i.e., motion vectors and reference picture indexes of neighboring blocks) for each CP of the current block. The motion information for each CP may be derived based on spatial or temporal neighboring blocks for the corresponding CP. The motion information for each CP may be indicated as a candidate motion vector for the corresponding CP.
[0245] FIG. 20 shows neighboring blocks of the current block for deriving constructed candidates according to one embodiment of the present document.
[0246] Referring to Fig. 20, the neighboring blocks may include spatial neighboring blocks and temporal neighboring blocks. The spatial neighboring blocks may include a neighboring block A0, a neighboring block A1, a neighboring block A2, a neighboring block B0, a neighboring block B1, a neighboring block B2, and a neighboring block B3. The neighboring block T shown in Fig. 20 may represent the temporal neighboring block.
[0247] Here, the peripheral block B2 may indicate a peripheral block located at the upper left of the upper left sample position of the current block, the peripheral block B3 may indicate a peripheral block located at the upper left sample position of the current block, and the peripheral block A2 may indicate a peripheral block located at the left of the upper left sample position of the current block. Also, the peripheral block B1 may indicate a peripheral block located at the upper right sample position of the current block, and the peripheral block B0 may indicate a peripheral block located at the upper right of the upper right sample position of the current block. Also, the peripheral block A1 may indicate a peripheral block located at the left of the lower left sample position of the current block, and the peripheral block A0 may indicate a peripheral block located at the lower left of the lower left sample position of the current block.
[0248] Also, referring to FIG. 20, the CP of the current block may include CP0, CP1, CP2, and / or CP3. The CP0 may indicate a position of the top left of the current block, the CP1 may indicate a position of the top right of the current block, the CP2 may indicate a position of the bottom left of the current block, and the CP3 may indicate a position of the bottom right of the current block. For example, if the size of the current block is WxH and the x component of the sample position of the top-left of the current block is 0 and the y component is 0, the CP0 may indicate a position of (0,0) coordinates, the CP1 may indicate a position of (W,0) coordinates, the CP2 may indicate a position of (0,H) coordinates, and the CP3 may indicate a position of (W,H) coordinates.
[0249] Candidate motion vectors for each of the above-mentioned CPs can be derived as follows.
[0250] For example, the encoding / decoding apparatus may check whether the neighboring blocks in the first group are available in a first order, and derive a motion vector of the available neighboring block first identified in the checking process as a candidate motion vector for the CP0. That is, the candidate motion vector for the CP0 may be a motion vector of the available neighboring block first identified by checking the neighboring blocks in the first group in a first order. The availability may indicate that a motion vector of the neighboring block exists. That is, the available neighboring block may be a block coded by inter prediction (i.e., a block to which inter prediction is applied). Here, for example, the first group may include the neighboring block B2, the neighboring block B3, and the neighboring block A2. The first order may be in the order of the neighboring block B2 to the neighboring block B3 to the neighboring block A2 in the first group. As an example, if the surrounding block B2 is available, the motion vector of the surrounding block B2 can be derived as a candidate motion vector for the CP0, if the surrounding block B2 is not available and the surrounding block B3 is available, the motion vector of the surrounding block B3 can be derived as a candidate motion vector for the CP0, and if the surrounding block B2 and the surrounding block B3 are not available and the surrounding block A2 is available, the motion vector of the surrounding block A2 can be derived as a candidate motion vector for the CP0.
[0251] Also, for example, the encoding apparatus / decoding apparatus may check whether the neighboring blocks in the second group are available in a second order, and derive a motion vector of the available neighboring block first identified in the checking process as a candidate motion vector for the CP1. That is, the candidate motion vector for the CP1 may be a motion vector of the available neighboring block first identified by checking the neighboring blocks in the second group in the second order. The availability may indicate that a motion vector of the neighboring block exists. That is, the available neighboring block may be a block coded by inter prediction (i.e., a block to which inter prediction is applied). Here, the second group may include the neighboring block B1 and the neighboring block B0. The second order may be from the neighboring block B1 to the neighboring block B0 in the second group. As an example, if the surrounding block B1 is available, the motion vector of the surrounding block B1 can be derived as a candidate motion vector for the CP1, and if the surrounding block B1 is not available but the surrounding block B0 is available, the motion vector of the surrounding block B0 can be derived as a candidate motion vector for the CP1.
[0252] Also, for example, the encoding apparatus / decoding apparatus may check whether the neighboring blocks in the third group are available in a third order, and derive a motion vector of the available neighboring block first identified in the checking process as a candidate motion vector for the CP2. That is, the candidate motion vector for the CP2 may be a motion vector of the available neighboring block first identified by checking the neighboring blocks in the third group in a third order. The availability may indicate that a motion vector of the neighboring block exists. That is, the available neighboring block may be a block coded by inter prediction (i.e., a block to which inter prediction is applied). Here, the third group may include the neighboring block A1 and the neighboring block A0. The third order may be from the neighboring block A1 to the neighboring block A0 in the third group. As an example, if the surrounding block A1 is available, the motion vector of the surrounding block A1 can be derived as a candidate motion vector for the CP2, and if the surrounding block A1 is not available but the surrounding block A0 is available, the motion vector of the surrounding block A0 can be derived as a candidate motion vector for the CP2.
[0253] Also, for example, the encoding device / decoding device can check whether the temporal surrounding block (i.e., the surrounding block T) is available, and if the temporal surrounding block (i.e., the surrounding block T) is available, it can derive the motion vector of the temporal surrounding block (i.e., the surrounding block T) as a candidate motion vector for CP3.
[0254] A combination of the candidate motion vector for CP0, the candidate motion vector for CP1, the candidate motion vector for CP2, and / or the candidate motion vector for CP3 may be derived as a constructed candidate.
[0255] For example, as described above, a 6-affine model requires motion vectors of three CPs. Three CPs can be selected from the CP0, CP1, CP2, and CP3 for the 6-affine model. For example, the CPs can be selected as one of {CP0, CP1, CP3}, {CP0, CP1, CP2}, {CP1, CP2, CP3}, and {CP0, CP2, CP3}. As an example, the 6-affine model can be constructed using CP0, CP1, and CP2. In this case, the CPs can be denoted as {CP0, CP1, CP2}.
[0256] Also, for example, as described above, a 4-affine model requires motion vectors of two CPs. Two CPs can be selected from CP0, CP1, CP2, and CP3 for the 4-affine model. For example, the CPs can be selected as one of {CP0, CP3}, {CP1, CP2}, {CP0, CP1}, {CP1, CP3}, {CP0, CP2}, and {CP2, CP3}. As an example, the 4-affine model can be constructed using CP0 and CP1. In this case, the CPs can be denoted as {CP0, CP1}.
[0257] Constructed candidates, which are combinations of candidate motion vectors, may be added to the merge candidate list in the following order: That is, after the candidate motion vectors for the CP are derived, constructed candidates may be derived in the following order.
[0258] {CP0, CP1, CP2}, {CP0, CP1, CP3}, {CP0, CP2, CP3}, {CP1, CP2, CP3}, {CP0, CP1}, {CP0, CP2}, {CP1, CP2}, {CP0, CP3}, {CP1, CP3}, {CP2, CP3}
[0259] That is, for example, a constructed candidate including the candidate motion vector for CP0, the candidate motion vector for CP1, and the candidate motion vector for CP2, a constructed candidate including the candidate motion vector for CP0, the candidate motion vector for CP1, and the candidate motion vector for CP3, a constructed candidate including the candidate motion vector for CP0, the candidate motion vector for CP2, and the candidate motion vector for CP3, a constructed candidate including the candidate motion vector for CP1, the candidate motion vector for CP2, and the candidate motion vector for CP3, a constructed candidate including the candidate motion vector for CP0, the candidate motion vector for CP1, the candidate motion vector for CP2, and the candidate motion vector for CP3, The merge candidate list may be added in the following order: constructed candidate including a candidate motion vector, constructed candidate including a candidate motion vector for CP0, a candidate motion vector for CP2, constructed candidate including a candidate motion vector for CP1, a candidate motion vector for CP2, constructed candidate including a candidate motion vector for CP0, a candidate motion vector for CP3, constructed candidate including a candidate motion vector for CP1, a candidate motion vector for CP3, constructed candidate including a candidate motion vector for CP2, a candidate motion vector for CP3.
[0260] Thereafter, the encoding / decoding apparatus can add the 0 motion vector as a merging candidate to the merging candidate list (S1920).
[0261] For example, if the number of merge candidates in the merge candidate list is less than 5, merge candidates including zero motion vectors may be added to the merge candidate list until the merge candidate list is configured with a maximum number of merge candidates, which may be 5. In addition, the zero motion vector may indicate a motion vector whose vector value is zero.
[0262] Meanwhile, the scanning method for the position of the neighboring blocks and the configuration of the candidates used in the method for generating the affine MVP list described with reference to FIG. 16 to FIG. 18 can also be used for normal merge and normal MVP. Here, normal merge means a merge mode that can be used in HEVC, etc., other than the affine merge mode, and normal MVP can also mean AMVP that can be used in HEVC, etc., other than the affine MVP. For example, applying the method described with reference to FIG. 16 to normal merge and / or normal MVP specifically means scanning or scanning the neighboring blocks at the spatial positions of FIG. 16, configuring or configuring the left predictor and the upper predictor using the neighboring blocks of FIG. 16, performing a pruning check, or performing in a low-complexity manner. When such a method is applied to normal merge or MVP, it can be shown to be effective in terms of design costs.
[0263] This document also proposes a scheme for deriving constructed candidates different from the above-mentioned embodiment. The proposed embodiment can reduce complexity and improve coding performance compared to the above-mentioned embodiment for deriving constructed candidates. The proposed embodiment is described below. Also, when the available number of inherited affine candidates is less than two (i.e., when the number of derived inherited affine candidates is less than two), a constructed affine candidate can be considered.
[0264] For example, the encoding device / decoding device may perform mv 0 , mv 1 , mv 2 That is, the encoding device / decoding device checks the available mv 0 , mv 1 , mv 2 Here, it can be determined whether the mv 0may be a CPMVP candidate of CP0 of the current block, and the mv 1 may be a CPMVP candidate of CP1, 2 may be a CPMVP candidate for CP2.
[0265] Specifically, the neighboring blocks of the current block are divided into three groups, and the neighboring blocks may 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 may 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 may include a motion vector of a neighboring block D, a motion vector of a neighboring block E, and the third group may include a motion vector of a neighboring block F, and a motion vector of a neighboring block G. The peripheral block A may indicate a peripheral block located in the upper left section of the upper left sample position of the current block, the peripheral block B may indicate a peripheral block located in the upper section of the upper left sample position of the current block, the peripheral block C may indicate a peripheral block located in the left section of the upper left sample position of the current block, the peripheral block D may indicate a peripheral block located in the upper section of the upper right sample position of the current block, the peripheral block E may indicate a peripheral block located in the upper right section of the upper right sample position of the current block, the peripheral block F may indicate a peripheral block located in the left section of the lower left sample position of the current block, and the peripheral block G may indicate a peripheral block located in the lower left section of the lower left sample position of the current block.
[0266] The encoding device / decoding device uses the available mv 0 It can be determined whether there is an available mv in the second group. 1 It can be determined whether there is an available mv in the third group. 2It is possible to determine whether
[0267] Specifically, for example, the encoding device / decoding device may check whether the motion vectors of the neighboring blocks in the first group satisfy a certain condition in a certain order. The encoding device / decoding device may set the motion vector of the neighboring block that satisfies the condition first confirmed in the checking process as the mv 0 That is, the above mv 0 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the first group according to a specific order. If the motion vectors of the neighboring blocks in the first group do not satisfy the specific condition, the available mv 0 may not exist. Here, for example, the specific order may be from the neighboring block A in the first group to the neighboring block B and the neighboring block C. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0268] In addition, the encoding / decoding apparatus may check whether the motion vectors of the neighboring blocks in the second group satisfy a certain condition in a certain order. The encoding / decoding apparatus may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 1 That is, the above mv 1 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the second group according to a specific order. If the motion vectors of the neighboring blocks in the second group do not satisfy the specific condition, the available mv 1may not exist. Here, for example, the specific order may be from the neighboring block D to the neighboring block E in the second group. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0269] In addition, the encoding / decoding apparatus may check whether the motion vectors of the neighboring blocks in the third group satisfy a certain condition in a certain order. The encoding / decoding apparatus may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 2 That is, the above mv 2 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the third group according to a specific order. If the motion vectors of the neighboring blocks in the third group do not satisfy the specific condition, the available mv 2 may not exist. Here, for example, the specific order may be from the neighboring block F to the neighboring block G in the third group. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0270] Then, if the affine motion model applied to the current block is a 4-affine motion model, mv 0 and mv 1 is available, the encoding device / decoding device 0 and mv 1 can be derived as a constructed candidate for the current block. 0 and / or mv 1 If mv is not available, that is, mv is obtained from the neighboring blocks of the current block. 0 and mv 1If at least one of the above is not derived, the encoding device / decoding device may not add a constructed candidate to the affine MVP list of the current block.
[0271] In addition, if the affine motion model applied to the current block is a 6-affine motion model, the mv 0 , mv 1 and mv 2 is available, the encoding device / decoding device 0 , mv 1 and mv 2 can be derived as a constructed candidate for the current block. 0 , mv 1 and / or mv 2 If mv is not available, that is, mv is obtained from the neighboring blocks of the current block. 0 , mv 1 and mv 2 If at least one of the above is not derived, the encoding device / decoding device may not add a constructed candidate to the affine MVP list of the current block.
[0272] The above-mentioned proposed embodiment is a method of considering a constructed candidate only when all the motion vectors of the CPs for generating an affine motion model of the current block are available. Here, available may indicate that the reference picture of the neighboring block is the same as the reference picture of the current block. That is, the constructed candidate can be derived only when there is a motion vector that satisfies the above condition among the motion vectors of the neighboring blocks for each CP of the current block. Therefore, when the affine motion model applied to the current block is a 4-affine motion model, the MVs of CP0 and CP1 of the current block (i.e., the mv 0 and the above mv 1) is available. In addition, if the affine motion model applied to the current block is a 6-affine motion model, the MVs of CP0, CP1, and CP2 of the current block (i.e., the mv 0 , the mv 1 and the above mv 2 ) is available, the constructed candidate can be considered. Therefore, according to the proposed embodiment, a further configuration for deriving a motion vector for a CP based on the above-mentioned Equation 6 or Equation 7 may not be necessary. Through this, the computational complexity for deriving the constructed candidate can be reduced. In addition, the constructed candidate is determined only when a CPMVP candidate having the same reference picture is available, so that the overall coding performance can be improved.
[0273] Meanwhile, a pruning check process between the derived inherited affine candidates and the constructed affine candidates may not be performed. The pruning check process may include a process of checking whether they are identical to each other, and removing the candidate derived in the later order if they are the same candidate.
[0274] The above embodiment can be illustrated as in FIG. 21 and FIG.
[0275] FIG. 21 shows an example of deriving the constructed candidates when a four-affine motion model is applied to the current block.
[0276] Referring to FIG. 21, the encoding / decoding device performs mv 0 , mv 1 That is, the encoding device / decoding device may determine whether mv is available in the neighboring blocks of the current block (S2100). 0 , mv 1 Here, it can be determined whether the mv 0may be a CPMVP candidate of CP0 of the current block, and the mv 1 may be a CPMVP candidate for CP1.
[0277] The encoding device / decoding device uses the available mv 0 It is possible to determine whether there is a mv available in the second group. 1 It is possible to determine whether
[0278] Specifically, the neighboring blocks of the current block are divided into three groups, and the neighboring blocks may 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 may 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 may include a motion vector of a neighboring block D, a motion vector of a neighboring block E, and the third group may include a motion vector of a neighboring block F, and a motion vector of a neighboring block G. The peripheral block A may indicate a peripheral block located in the upper left section of the upper left sample position of the current block, the peripheral block B may indicate a peripheral block located in the upper section of the upper left sample position of the current block, the peripheral block C may indicate a peripheral block located in the left section of the upper left sample position of the current block, the peripheral block D may indicate a peripheral block located in the upper section of the upper right sample position of the current block, the peripheral block E may indicate a peripheral block located in the upper right section of the upper right sample position of the current block, the peripheral block F may indicate a peripheral block located in the left section of the lower left sample position of the current block, and the peripheral block G may indicate a peripheral block located in the lower left section of the lower left sample position of the current block.
[0279] The encoding / decoding device may check whether the motion vectors of the neighboring blocks in the first group satisfy a certain condition in a certain order. The encoding / decoding device may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 0 That is, the above mv 0 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the first group according to a specific order. If the motion vectors of the neighboring blocks in the first group do not satisfy the specific condition, the available mv 0 may not exist. Here, for example, the specific order may be from the neighboring block A in the first group to the neighboring block B and the neighboring block C. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0280] In addition, the encoding / decoding apparatus may check whether the motion vectors of the neighboring blocks in the second group satisfy a certain condition in a certain order. The encoding / decoding apparatus may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 1 That is, the above mv 1 may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the second group according to a specific order. If the motion vectors of the neighboring blocks in the second group do not satisfy the specific condition, the available mv 1 may not exist. Here, for example, the specific order may be from the neighboring block D to the neighboring block E in the second group. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0281] The mv for the current block 0 and the above mv 1 is available, i.e., the mv 0 and the above mv 1 is derived, the encoding device / decoding device 0 and mv 1 can be derived as a constructed candidate for the current block (S2110). 0 and / or mv 1 If mv is not available, that is, mv is obtained from the neighboring blocks of the current block. 0 and mv 1 If at least one of the above is not derived, the encoding device / decoding device may not add a constructed candidate to the affine MVP list of the current block.
[0282] Meanwhile, the pruning check process between the derived inherited affine candidates and the constructed affine candidates may not be performed. The pruning check process may include a process of checking whether the candidates are identical to each other, and removing the candidate derived in the later order if they are the same candidate.
[0283] FIG. 22 shows an example of deriving the constructed candidates when a 6-affine motion model is applied to the current block.
[0284] Referring to FIG. 22, the encoding / decoding device performs mv 0 , mv 1 , mv 2 That is, the encoding device / decoding device may determine whether mv is available in the neighboring blocks of the current block (S2200). 0 , mv 1 , mv 2 Here, it can be determined whether the mv 0may be a CPMVP candidate of CP0 of the current block, and the mv 1 may be a CPMVP candidate for CP1, 2 may be a CPMVP candidate for CP2.
[0285] The encoding device / decoding device uses the available mv 0 It is possible to determine whether there is a mv available in the second group. 1 It is possible to determine whether there are any available mvs in the third group. 2 It is possible to determine whether
[0286] Specifically, the neighboring blocks of the current block are divided into three groups, and the neighboring blocks may 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 may 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 may include a motion vector of a neighboring block D, a motion vector of a neighboring block E, and the third group may include a motion vector of a neighboring block F, and a motion vector of a neighboring block G. The peripheral block A may indicate a peripheral block located in the upper left section of the upper left sample position of the current block, the peripheral block B may indicate a peripheral block located in the upper section of the upper left sample position of the current block, the peripheral block C may indicate a peripheral block located in the left section of the upper left sample position of the current block, the peripheral block D may indicate a peripheral block located in the upper section of the upper right sample position of the current block, the peripheral block E may indicate a peripheral block located in the upper right section of the upper right sample position of the current block, the peripheral block F may indicate a peripheral block located in the left section of the lower left sample position of the current block, and the peripheral block G may indicate a peripheral block located in the lower left section of the lower left sample position of the current block.
[0287] The encoding / decoding device may check whether the motion vectors of the neighboring blocks in the first group satisfy a certain condition in a certain order. The encoding / decoding device may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 0 That is, the above mv 0may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the first group according to a specific order. If the motion vectors of the neighboring blocks in the first group do not satisfy the specific condition, the available mv 0 may not exist. Here, for example, the specific order may be from the neighboring block A in the first group to the neighboring block B and the neighboring block C. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0288] In addition, the encoding / decoding apparatus may check whether the motion vectors of the neighboring blocks in the second group satisfy a certain condition in a certain order. The encoding / decoding apparatus may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 1 That is, the above mv 1 may be a motion vector that satisfies the specific condition by checking the motion vectors in the second group in a specific order. If the motion vectors of the neighboring blocks in the second group do not satisfy the specific condition, the available mv 1 may not exist. Here, for example, the specific order may be from the neighboring block D to the neighboring block E in the second group. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0289] In addition, the encoding / decoding apparatus may check whether the motion vectors of the neighboring blocks in the third group satisfy a certain condition in a certain order. The encoding / decoding apparatus may set the motion vector of the neighboring block that satisfies the condition for the first time confirmed in the checking process as the mv 2 That is, the above mv 2may be a motion vector that satisfies the specific condition and is first confirmed by checking the motion vectors in the third group according to a specific order. If the motion vectors of the neighboring blocks in the third group do not satisfy the specific condition, the available mv 2 may not exist. Here, for example, the specific order may be from the neighboring block F to the neighboring block G in the third group. Also, for example, the specific condition may be that a reference picture for a motion vector of a neighboring block is the same as a reference picture of the current block.
[0290] The mv for the current block 0 , the mv 1 and the above mv 2 is available, i.e., the mv 0 , the mv 1 and the above mv 2 is derived, the encoding device / decoding device 0 , mv 1 and mv 2 can be derived as a constructed candidate for the current block (S2210). Meanwhile, mv 0 , mv 1 and / or mv 2 If mv is not available, that is, mv is obtained from the neighboring blocks of the current block. 0 , mv 1 and mv 2 If at least one of the above is not derived, the encoding device / decoding device may not add a constructed candidate to the affine MVP list of the current block.
[0291] Meanwhile, the pruning check process between the derived inherited affine candidates and the constructed affine candidates may not be performed.
[0292] On the other hand, if the number of derived affine candidates is less than two (i.e., if the number of inherited affine candidates and / or constructed affine candidates is less than two), an HEVC AMVP candidate may be added to the affine MVP list of the current block.
[0293] For example, the HEVC AMVP candidates may be derived in the following order:
[0294] Specifically, when the number of derived affine candidates is less than 2, if the constructed affine candidate CPMV0 is available, the CPMV0 can be used as the affine MVP candidate. That is, when the number of derived affine candidates is less than 2, if the constructed affine candidate CPMV0 is available (i.e., the number of derived affine candidates is less than 2 and the constructed affine candidate CPMV0 is derived), a first affine MVP candidate including the constructed affine candidate CPMV0 in CPMV0, CPMV1, and CPMV2 can be derived.
[0295] Furthermore, when the number of derived affine candidates is less than 2, if the constructed affine candidate CPMV1 is available, the CPMV1 can be used as the affine MVP candidate. That is, when the number of derived affine candidates is less than 2, if the constructed affine candidate CPMV1 is available (that is, when the number of derived affine candidates is less than 2 and the constructed affine candidate CPMV1 has been derived), a second affine MVP candidate including the constructed affine candidate CPMV1 in CPMV0, CPMV1, and CPMV2 can be derived.
[0296] Next, when the number of derived affine candidates is less than 2 and CPMV2 of the constructed affine candidate is available, the CPMV2 can be used as the affine MVP candidate. That is, when the number of derived affine candidates is less than 2 and CPMV2 of the constructed affine candidate is available (that is, when the number of derived affine candidates is less than 2 and CPMV2 of the constructed affine candidate has been derived), a third affine MVP candidate including CPMV2 of the constructed affine candidate in CPMV0, CPMV1, and CPMV2 can be derived.
[0297] Next, if the number of derived affine candidates is less than 2, a HEVC TMVP (Temporal Motion vector predictor) can be used as the affine MVP candidate. The HEVC TMVP can be derived based on motion information of temporal neighboring blocks of the current block. That is, if the number of derived affine candidates is less than 2, a third affine MVP candidate including motion vectors of temporal neighboring blocks of the current block as CPMV0, CPMV1, and CPMV2 can be derived. The temporal neighboring blocks can indicate collocated blocks in a collocated picture corresponding to the current block.
[0298] Next, if the number of derived affine candidates is less than 2, a zero motion vector (zero MV) can be used as the affine MVP candidate. That is, if the number of derived affine candidates is less than 2, a third affine MVP candidate including the zero motion vector as CPMV0, CPMV1, and CPMV2 can be derived. The zero motion vector can indicate a motion vector whose value is 0.
[0299] This is because the step of using the CPMV of the constructed affine candidate reuses the MV already considered for generating the constructed affine candidate, thereby reducing the complexity compared to existing methods of deriving HEVC AMVP candidates.
[0300] However, this document proposes an alternative embodiment for deriving the inherited affine candidates.
[0301] In order to derive the inherited affine candidates, affine prediction information of neighboring blocks is required. Specifically, the following affine prediction information is required.
[0302] 1) An affine flag (affine_flag) indicating whether affine prediction-based encoding of the neighboring block is applied.
[0303] 2) Motion information of the surrounding blocks
[0304] When a 4-affine motion model is applied to the surrounding blocks, the motion information of the surrounding blocks may include L0 motion information and L1 motion information for CP0 and L0 motion information and L1 motion information for CP1. When a 6-affine motion model is applied to the surrounding blocks, the motion information of the surrounding blocks may 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 may indicate motion information for L0 (List 0), and the L1 motion information may indicate motion information for L1 (List 1). The L0 motion information may include an L0 reference picture index and an L0 motion vector, and the L1 motion information may include an L1 reference picture index and an L1 motion vector.
[0305] As described above, in the case of affine prediction, a large amount of information needs to be stored, which may be a major cause of increasing hardware costs in the actual implementation of an encoding device / decoding device. In particular, when a neighboring block is located above a current block and is a CTU boundary, a line buffer needs to be used to store information related to affine prediction of the neighboring block, which may cause a greater cost problem. This problem may be referred to as a line buffer issue hereinafter. Therefore, this document proposes an embodiment in which affine prediction-related information is not stored or is reduced in a line buffer, thereby minimizing hardware costs and deriving an inherited affine candidate. The proposed embodiment may reduce the computational complexity in deriving the inherited affine candidate, thereby improving coding performance. Meanwhile, for reference, if motion information of a 4x4 size block is already stored in the line buffer and the affine prediction-related information is further stored, the amount of stored information may increase by three times compared to the existing amount of storage.
[0306] In this embodiment, it is not necessary to store any further information for affine prediction in the line buffer, and if information in the line buffer must be referenced to generate the inherited affine candidate, the generation of the inherited affine candidate may be restricted.
[0307] 23a-b show an exemplary embodiment of deriving the inherited affine candidates.
[0308] Referring to FIG. 23a, if a neighboring block B of the current block (i.e., an upper neighboring block of the current block) is not present in the same CTU as the current block (i.e., the current CTU), the neighboring block B may not be used to generate the inherited affine candidate. Meanwhile, although the neighboring block A is not present in the same CTU as the current block, it may be used to generate the inherited affine candidate since information on the neighboring block A is not stored in a line buffer. Therefore, in this embodiment, only when the upper neighboring block of the current block is included in the same CTU as the current block, it may be used to derive the inherited affine candidate. Also, if the upper neighboring block of the current block is not included in the same CTU as the current block, the upper neighboring block may not be used to derive the inherited affine candidate.
[0309] 23b, the neighboring block B of the current block (i.e., the neighboring block above the current block) may be in the same CTU as the current block. In this case, the encoding device / decoding device may refer to the neighboring block B to generate the inherited affine candidate.
[0310] FIG. 24 is a schematic diagram of an image encoding method by an encoding device according to the present document. The method disclosed in FIG. 24 is performed by the encoding device disclosed in FIG. 2. Specifically, for example, S2400 to S2430 in FIG. 24 may be performed by a prediction unit of the encoding device, and S2440 may be performed by an entropy encoding unit of the encoding device. Also, although not shown, the process of deriving a prediction sample for the current block based on the CPMV may be performed by a prediction unit of the encoding device, the process of deriving a residual sample for the current block based on an original sample and a prediction sample for the current block may be performed by a subtraction unit of the encoding device, the process of generating information on the residual for the current block based on the residual sample may be performed by a transformation unit of the encoding device, and the process of encoding information on the residual may be performed by an entropy encoding unit of the encoding device.
[0311] The encoding apparatus constructs an affine motion vector predictor (MVP) candidate list for a current block (S2400). The encoding apparatus may construct an affine MVP candidate list including affine MVP candidates for the current block. The maximum number of the affine MVP candidates in the affine MVP candidate list may be two.
[0312] Also, as an example, the affine MVP candidate list may include an inherited affine MVP candidate. The encoding apparatus may check whether an inherited affine MVP candidate of the current block is available, and if the inherited affine MVP candidate is available, the inherited affine MVP candidate may be derived. For example, the inherited affine MVP candidate may be derived based on neighboring blocks of the current block, and the maximum number of the inherited affine MVP candidates may be 2. The neighboring blocks may be checked whether they are available in a specific order, and the inherited affine MVP candidate may be derived based on the checked available neighboring blocks. That is, the neighboring blocks may be checked whether they are available in a specific order, and a first inherited affine MVP candidate may be derived based on the first checked available neighboring block, and a second inherited affine MVP candidate may be derived based on the second checked available neighboring block. The availability may indicate that the neighboring block is coded with an affine motion model and the reference picture of the neighboring block is the same as the reference picture of the current block. That is, the available neighboring block may be a neighboring block coded with an affine motion model (i.e., affine prediction is applied) and the reference picture is the same as the reference picture of the current block. Specifically, the encoding apparatus may derive a motion vector for a CP of the current block based on the affine motion model of the first checked available neighboring block, and derive the first inherited affine MVP candidate including the motion vector as a CPMVP candidate. Also, the encoding apparatus may derive a motion vector for a CP of the current block based on the affine motion model of the second checked available neighboring block, and derive the second inherited affine MVP candidate including the motion vector as a CPMVP candidate. The affine motion model may be derived as shown in Equation 1 or Equation 3 above.
[0313] In other words, the neighboring blocks may be checked to see if they satisfy a specific condition in a specific order, and the inherited affine MVP candidate may be derived based on the neighboring blocks that satisfy the checked specific condition. That is, the neighboring blocks may be checked to see if they satisfy the specific condition in a specific order, and a first inherited affine MVP candidate may be derived based on the neighboring blocks that satisfy the first checked specific condition, and a second inherited affine MVP candidate may be derived based on the neighboring blocks that satisfy the second checked specific condition. Specifically, the encoding apparatus may derive a motion vector for a CP of the current block based on an affine motion model of the neighboring blocks that satisfy the first checked specific condition, and may derive the first inherited affine MVP candidate including the motion vector as a CPMVP candidate. Also, the encoding apparatus may derive a motion vector for a CP of the current block based on an affine motion model of the neighboring blocks that satisfy the second checked specific condition, and may derive the second inherited affine MVP candidate including the motion vector as a CPMVP candidate. The affine motion model may be derived as shown in Equation 1 or Equation 3. Meanwhile, the specific condition may indicate that the neighboring block is coded with an affine motion model and the reference picture of the neighboring block is the same as the reference picture of the current block. That is, the neighboring block satisfying the specific condition may be a neighboring block coded with an affine motion model (i.e., affine prediction is applied) and the reference picture is the same as the reference picture of the current block.
[0314] Here, for example, the neighboring blocks may include a left neighboring block, an upper neighboring block, a right upper corner neighboring block, a lower left corner neighboring block, and an upper left corner neighboring block of the current block. In this case, the specific order may be from the left neighboring block to the lower left corner neighboring block, the upper neighboring block, the right upper corner neighboring block, and the upper left corner neighboring block.
[0315] Alternatively, for example, the peripheral blocks may include only the left peripheral block and the upper peripheral block, in which case the specific order may be from the left peripheral block to the upper peripheral block.
[0316] Or, for example, the peripheral blocks may include the left peripheral block, and if the upper peripheral block is included in a current CTU including the current block, the peripheral blocks may further include the upper peripheral block. In this case, the specified order may be from the left peripheral block to the upper peripheral block. Also, if the upper peripheral block is not included in a current CTU, the peripheral blocks may not include the upper peripheral block. In this case, only the left peripheral block may be checked.
[0317] On the other hand, if the size is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the bottom left corner neighbor block may be a block including a sample at (-1, H) coordinates, the left side neighbor block may be a block including a sample at (-1, H-1) coordinates, the top right corner neighbor block may be a block including a sample at (W, -1) coordinates, the upper side neighbor block may be a block including a sample at (W-1, -1) coordinates, and the top left corner neighbor block may be a block including a sample at (-1, -1) coordinates. That is, the left side neighbor block may be the left side neighbor block located at the bottom among the left side neighbor blocks of the current block, and the upper side neighbor block may be the upper side neighbor block located at the leftmost among the upper side neighbor blocks of the current block.
[0318] Also, as an example, if a constructed affine MVP candidate is available, the affine MVP candidate list may include the constructed affine MVP candidate. The encoding apparatus may check whether a constructed affine MVP candidate of the current block is available, and if the constructed affine MVP candidate is available, the constructed affine MVP candidate may be derived. Also, for example, the constructed affine MVP candidate may be derived after the inherited affine MVP candidate is derived. If the number of derived affine MPV candidates (i.e., the inherited affine MVP candidate) is less than two and the constructed affine MVP candidate is available, the affine MVP candidate list may include the constructed affine MVP candidate. Here, the constructed affine MVP candidate may include candidate motion vectors for the CP. The constructed affine MVP candidate may be available if all of the candidate motion vectors are available.
[0319] For example, if a 4 affine motion model is applied to the current block, the CP of the current block may include CP0 and CP1. If a candidate motion vector for the CP0 is available and a candidate motion vector for the CP1 is available, the constructed affine MVP candidate may be available and the affine MVP candidate list may include the constructed affine MVP candidate. Here, the CP0 may indicate a position in the upper left corner of the current block, and the CP1 may indicate a position in the upper right corner of the current block.
[0320] The constructed affine MVP candidates may include a candidate motion vector for the CP0 and a candidate motion vector for the CP1. The candidate motion vector for the CP0 may be a motion vector of a first block, and the candidate motion vector for the CP1 may be a motion vector of a second block.
[0321] Also, the first block may be a block in which the first reference picture identified by checking the neighboring blocks in the first group according to a first specific order is the same as the reference picture of the current block. That is, the candidate motion vector for the CP1 may be a motion vector of a block in which the first reference picture identified by checking the neighboring blocks in the first group according to a first order is the same as the reference picture of the current block. The availability may indicate that the neighboring block exists and is coded by inter prediction. Here, if the reference picture of the first block in the first group is the same as the reference picture of the current block, the candidate motion vector for the CP0 may be available. Also, for example, the first group may include a neighboring block A, a neighboring block B, and a neighboring block C, and the first specific order may be from the neighboring block A to the neighboring block B to the neighboring block C.
[0322] Also, the second block may be a block whose reference picture confirmed for the first time is the same as the reference picture of the current block by checking the neighboring blocks in the second group according to a second specific order. Here, if the reference picture of the second block in the second group is the same as the reference picture of the current block, a candidate motion vector for the CP1 may be available. Also, for example, the second group may include a neighboring block D and a neighboring block E, and the second specific order may be from the neighboring block D to the neighboring block E.
[0323] On the other hand, if the size of the current block is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the surrounding block A may be a block including a sample at (-1, -1) coordinates, the surrounding block B may be a block including a sample at (0, -1) coordinates, the surrounding block C may be a block including a sample at (-1, 0) coordinates, the surrounding block D may be a block including a sample at (W-1, -1) coordinates, and the surrounding block E may be a block including a sample at (W, -1) coordinates. That is, the peripheral block A may be the peripheral block in the upper left corner of the current block, the peripheral block B may be the upper peripheral block located at the leftmost position among the peripheral blocks above the current block, the peripheral block C may be the left peripheral block located at the topmost position among the peripheral blocks on the left side of the current block, the peripheral block D may be the upper peripheral block located at the rightmost position among the peripheral blocks above the current block, and the peripheral block E may be the peripheral block in the upper right corner of the current block.
[0324] On the other hand, if at least one of the CP0 candidate motion vector and the CP1 candidate motion vector is not available, the constructed affine MVP candidate may not be available.
[0325] Alternatively, for example, if a 6 affine motion model is applied to the current block, the CPs of the current block may include CP0, CP1, and CP2. If a candidate motion vector for the CP0 is available, a candidate motion vector for the CP1 is available, and a candidate motion vector for the CP2 is available, the constructed affine MVP candidates may be available, and the affine MVP candidate list may include the constructed affine MVP candidates. Here, the CP0 may indicate a position of the top left corner of the current block, the CP1 may indicate a position of the top right corner of the current block, and the CP2 may indicate a position of the bottom left corner of the current block.
[0326] The constructed affine MVP candidates may include a candidate motion vector for the CP0, a candidate motion vector for the CP1, and a candidate motion vector for the CP2. The candidate motion vector for the CP0 may be a motion vector of a first block, the candidate motion vector for the CP1 may be a motion vector of a second block, and the candidate motion vector for the CP2 may be a motion vector of a third block.
[0327] Also, the first block may check neighboring blocks in the first group according to a first specific order, and a reference picture confirmed for the first time may be the same as the reference picture of the current block. Here, if the reference picture of the first block in the first group is the same as the reference picture of the current block, a candidate motion vector for CP0 may be available. Also, for example, the first group may include a neighboring block A, a neighboring block B, and a neighboring block C, and the first specific order may be from the neighboring block A to the neighboring block B, and then to the neighboring block C.
[0328] Also, the second block may check the neighboring blocks in the second group according to a second specific order, and the first confirmed reference picture may be the same as the reference picture of the current block. Here, if the reference picture of the second block in the second group is the same as the reference picture of the current block, the candidate motion vector for CP1 may be available. Also, for example, the second group may include a neighboring block D and a neighboring block E, and the second specific order may be from the neighboring block D to the neighboring block E.
[0329] Also, the third block may be a block whose reference picture confirmed for the first time is the same as the reference picture of the current block when neighboring blocks in the third group are checked according to a third specific order. Here, if the reference picture of the third block in the third group is the same as the reference picture of the current block, a candidate motion vector for the CP2 may be available. Also, for example, the third group may include a neighboring block F and a neighboring block G, and the third specific order may be from the neighboring block F to the neighboring block G.
[0330] On the other hand, if the size of the current block is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the surrounding block A may be a block including a sample at (-1, -1) coordinates, the surrounding block B may be a block including a sample at (0, -1) coordinates, the surrounding block C may be a block including a sample at (-1, 0) coordinates, the surrounding block D may be a block including a sample at (W-1, -1) coordinates, the surrounding block E may be a block including a sample at (W, -1) coordinates, the surrounding block F may be a block including a sample at (-1, H-1) coordinates, and the surrounding block G may be a block including a sample at (-1, H) coordinates. That is, the peripheral block A may be the peripheral block in the upper left corner of the current block, the peripheral block B may be the upper peripheral block located at the leftmost position among the peripheral blocks above the current block, the peripheral block C may be the left peripheral block located at the topmost position among the peripheral blocks on the left side of the current block, the peripheral block D may be the upper peripheral block located at the rightmost position among the peripheral blocks above the current block, the peripheral block E may be the peripheral block in the upper right corner of the current block, the peripheral block F may be the left peripheral block located at the bottommost position among the peripheral blocks on the left side of the current block, and the peripheral block G may be the peripheral block in the lower left corner of the current block.
[0331] On the other hand, if at least one of the CP0 candidate motion vector, the CP1 candidate motion vector, and the CP2 candidate motion vector is not available, the constructed affine MVP candidate may not be available.
[0332] Thereafter, the affine MVP candidate list can be derived based on an ordered step sequence as described below.
[0333] For example, if the number of derived affine MVP candidates is less than two and a motion vector for the CP0 is available, the encoding apparatus may derive a first affine MVP candidate, where the first affine MVP candidate may be an affine MVP candidate that includes the motion vector for the CP0 in the candidate motion vector for the CP.
[0334] Also, for example, if the number of derived affine MVP candidates is less than two and a motion vector for the CP1 is available, the encoding apparatus may derive a second affine MVP candidate, where the second affine MVP candidate may be an affine MVP candidate that includes the motion vector for the CP1 in the candidate motion vector for the CP.
[0335] Also, for example, if the number of derived affine MVP candidates is less than two and a motion vector for the CP2 is available, the encoding apparatus may derive a third affine MVP candidate, where the third affine MVP candidate may be an affine MVP candidate that includes the motion vector for the CP2 in the candidate motion vector for the CP.
[0336] Also, for example, when the number of derived affine MVP candidates is less than two, the encoding apparatus may derive a 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. The temporal neighboring block may indicate a collocated block in a collocated picture corresponding to the current block. The temporal MVP may be derived based on the motion vector of the temporal neighboring block.
[0337] Also, for example, if the number of derived affine MVP candidates is less than two, the encoding apparatus may derive a fifth affine MVP candidate including a zero motion vector as a candidate motion vector for the CP. The zero motion vector may indicate a motion vector whose value is 0.
[0338] The encoding apparatus derives control point motion vector predictors (CPMVP) for a control point (CP) of the current block based on the affine MVP candidate list (S2410). The encoding apparatus may derive a CPMV for the CP of the current block having an optimal RD cost, and may select an affine MVP candidate most similar to the CPMV among the affine MVP candidates as an affine MVP candidate for the current block. The encoding apparatus may derive control point motion vector predictors (CPMVP) for a control point (CP) of the current block based on the selected affine MVP candidate among the affine MVP candidates included in the affine MVP candidate list. Specifically, when an affine MVP candidate includes a candidate motion vector for CP0 and a candidate motion vector for CP1, a candidate motion vector for CP0 of the affine MVP candidate may be derived as the CPMVP of the CP0, and a candidate motion vector for CP1 of the affine MVP candidate may be derived as the CPMVP of the CP1. Also, when an 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 of the affine MVP candidate for CP0 can be derived as the CPMVP of the CP0, the candidate motion vector of the affine MVP candidate for CP1 can be derived as the CPMVP of the CP1, and the candidate motion vector of the affine MVP candidate for CP2 can be derived as the CPMVP of the CP2. Also, when an affine MVP candidate includes a candidate motion vector for CP0 and a candidate motion vector for CP2, the candidate motion vector of the affine MVP candidate for CP0 can be derived as the CPMVP of the CP0, and the candidate motion vector of the affine MVP candidate for CP2 can be derived as the CPMVP of the CP2.
[0339] The encoding apparatus may encode an affine MVP candidate index indicating the selected affine MVP candidate from among the affine MVP candidates, wherein the affine MVP candidate index may indicate the one affine MVP candidate from among affine MVP candidates included in an affine motion vector predictor (MVP) candidate list for the current block.
[0340] The encoding apparatus derives a CPMV for the CP of the current block (S2420). The encoding apparatus may derive a CPMV for each of the CPs of the current block.
[0341] The encoding apparatus derives control point motion vector differences (CPMVD) for the CP of the current block based on the CPMVP and the CPMV (S2430). The encoding apparatus can derive CPMVD for the CP of the current block based on the CPMVP and the CPMV for each of the CPs.
[0342] The encoding apparatus encodes motion prediction information including information on the CPMVD (S2440). The encoding apparatus may output the motion prediction information including the information on the CPMVD in the form of a bitstream. That is, the encoding apparatus may output image information including the motion prediction information in the form of a bitstream. The encoding apparatus may encode information on the CPMVD for each of the CPs, and the motion prediction information may include information on the CPMVD.
[0343] Also, the motion prediction information may include the affine MVP candidate index, which may indicate the selected affine MVP candidate from among affine MVP candidates included in an affine motion vector predictor (MVP) candidate list for the current block.
[0344] Meanwhile, as an example, the encoding device may derive a prediction sample for the current block based on the CPMV, derive a residual sample for the current block based on the original sample and the prediction sample for the current block, generate information on the residual for the current block based on the residual sample, and encode the information on the residual. The image information may include information on the residual. Meanwhile, the bitstream may be transmitted to the decoding device via a network or a (digital) storage medium. Here, the network may include a broadcasting network and / or a communication network, etc., and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
[0345] FIG. 25 is a schematic diagram of an encoding apparatus for performing an image encoding method according to the present document. The method disclosed in FIG. 24 is performed by the encoding apparatus disclosed in FIG. 25. Specifically, for example, the prediction unit of the encoding apparatus of FIG. 25 may perform S2400 to S2430 of FIG. 24, and the entropy encoding unit of the encoding apparatus of FIG. 25 may perform S2440 of FIG. 24. Although not shown, the process of deriving a prediction sample for the current block based on the CPMV may be performed by the prediction unit of the encoding apparatus of FIG. 25, the process of deriving a residual sample for the current block based on the original sample and the prediction sample for the current block may be performed by the subtraction unit of the encoding apparatus of FIG. 25, the process of generating information on the residual for the current block based on the residual sample may be performed by the transformation unit of the encoding apparatus of FIG. 25, and the process of encoding information on the residual may be performed by the entropy encoding unit of the encoding apparatus of FIG. 25.
[0346] FIG. 26 is a schematic diagram showing a method for decoding an image by a decoding device according to the present document. The method disclosed in FIG. 26 is performed by the decoding device disclosed in FIG. 3. Specifically, for example, S2600 in FIG. 26 may be performed by an entropy decoding unit of the decoding device, S2610 to S2650 may be performed by a prediction unit of the decoding device, and S2660 may be performed by an adder unit of the decoding device. Also, although not shown, a process of acquiring information on the residual of the current block through a bitstream may be performed by an entropy decoding unit of the decoding device, and a process of deriving the residual sample for the current block based on the residual information may be performed by an inverse transform unit of the decoding device.
[0347] The decoding apparatus obtains motion prediction information for a current block from a bitstream (S2600). The decoding apparatus can obtain image information including the motion prediction information from the bitstream.
[0348] Also, for example, the motion prediction information may include information on Control Point Motion Vector Differences (CPMVD) for the control points (CPs) of the current block, i.e., the motion prediction information may include information on CPMVD for each of the CPs of the current block.
[0349] Also, for example, the motion prediction information may include an affine MVP candidate index for the current block, which may indicate one of the affine MVP candidates included in an affine motion vector predictor (MVP) candidate list for the current block.
[0350] The decoding apparatus constructs an affine motion vector predictor (MVP) candidate list for the current block (S2610). The decoding apparatus may construct an affine MVP candidate list including affine MVP candidates for the current block. The maximum number of the affine MVP candidates in the affine MVP candidate list may be two.
[0351] Also, as an example, the affine MVP candidate list may include an inherited affine MVP candidate. The decoding apparatus may check whether an inherited affine MVP candidate of the current block is available, and if the inherited affine MVP candidate is available, the inherited affine MVP candidate may be derived. For example, the inherited affine MVP candidate may be derived based on neighboring blocks of the current block, and the maximum number of the inherited affine MVP candidates may be 2. The neighboring blocks may be checked whether they are available in a specific order, and the inherited affine MVP candidate may be derived based on the checked available neighboring blocks. That is, the neighboring blocks may be checked whether they are available in a specific order, and a first inherited affine MVP candidate may be derived based on the first checked available neighboring block, and a second inherited affine MVP candidate may be derived based on the second checked available neighboring block. The availability may indicate that the neighboring block is coded with an affine motion model and the reference picture of the neighboring block is the same as the reference picture of the current block. That is, the available neighboring block may be a neighboring block coded with an affine motion model (i.e., affine prediction is applied) and the reference picture is the same as the reference picture of the current block. Specifically, the decoding apparatus may derive a motion vector for a CP of the current block based on the affine motion model of the first checked available neighboring block, and may derive the first inherited affine MVP candidate including the motion vector as a CPMVP candidate. Also, the decoding apparatus may derive a motion vector for a CP of the current block based on the affine motion model of the second checked available neighboring block, and may derive the second inherited affine MVP candidate including the motion vector as a CPMVP candidate. The affine motion model may be derived as shown in Equation 1 or Equation 3 above.
[0352] In other words, the neighboring blocks may be checked to see if they satisfy a specific condition in a specific order, and the inherited affine MVP candidate may be derived based on the neighboring blocks that satisfy the checked specific condition. That is, the neighboring blocks may be checked to see if they satisfy the specific condition in a specific order, and a first inherited affine MVP candidate may be derived based on the neighboring blocks that satisfy the first checked specific condition, and a second inherited affine MVP candidate may be derived based on the neighboring blocks that satisfy the second checked specific condition. Specifically, the decoding apparatus may derive a motion vector for a CP of the current block based on an affine motion model of the neighboring blocks that satisfy the first checked specific condition, and may derive the first inherited affine MVP candidate including the motion vector as a CPMVP candidate. Also, the decoding apparatus may derive a motion vector for a CP of the current block based on an affine motion model of the neighboring blocks that satisfy the second checked specific condition, and may derive the second inherited affine MVP candidate including the motion vector as a CPMVP candidate. The affine motion model may be derived as shown in Equation 1 or Equation 3. Meanwhile, the specific condition may indicate that the neighboring block is coded with an affine motion model and the reference picture of the neighboring block is the same as the reference picture of the current block. That is, the neighboring block satisfying the specific condition may be a neighboring block coded with an affine motion model (i.e., affine prediction is applied) and the reference picture is the same as the reference picture of the current block.
[0353] Here, for example, the neighboring blocks may include a left neighboring block, an upper neighboring block, a right upper corner neighboring block, a lower left corner neighboring block, and an upper left corner neighboring block of the current block. In this case, the specified order may be from the left neighboring block to the lower left corner neighboring block, the upper neighboring block, the right upper corner neighboring block, and the upper left corner neighboring block.
[0354] Alternatively, for example, the peripheral blocks may include only the left peripheral block and the upper peripheral block, in which case the specific order may be from the left peripheral block to the upper peripheral block.
[0355] Or, for example, the peripheral blocks may include the left peripheral block, and if the upper peripheral block is included in a current CTU including the current block, the peripheral blocks may further include the upper peripheral block. In this case, the specified order may be from the left peripheral block to the upper peripheral block. Also, if the upper peripheral block is not included in a current CTU, the peripheral blocks may not include the upper peripheral block. In this case, only the left peripheral block may be checked.
[0356] On the other hand, if the size is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the bottom left corner neighbor block may be a block including a sample at (-1, H) coordinates, the left side neighbor block may be a block including a sample at (-1, H-1) coordinates, the top right corner neighbor block may be a block including a sample at (W, -1) coordinates, the upper side neighbor block may be a block including a sample at (W-1, -1) coordinates, and the top left corner neighbor block may be a block including a sample at (-1, -1) coordinates. That is, the left side neighbor block may be the left side neighbor block located at the bottom among the left side neighbor blocks of the current block, and the upper side neighbor block may be the upper side neighbor block located at the leftmost among the upper side neighbor blocks of the current block.
[0357] Also, as an example, if a constructed affine MVP candidate is available, the affine MVP candidate list may include the constructed affine MVP candidate. The decoding apparatus may check whether a constructed affine MVP candidate of the current block is available, and if the constructed affine MVP candidate is available, the constructed affine MVP candidate may be derived. Also, for example, the constructed affine MVP candidate may be derived after the inherited affine MVP candidate is derived. If the number of derived affine MPV candidates (i.e., the inherited affine MVP candidate) is less than two and the constructed affine MVP candidate is available, the affine MVP candidate list may include the constructed affine MVP candidate. Here, the constructed affine MVP candidate may include candidate motion vectors for the CP. The constructed affine MVP candidate may be available if all of the candidate motion vectors are available.
[0358] For example, when a 4 affine motion model is applied to the current block, the CP of the current block may include CP0 and CP1. If a candidate motion vector for the CP0 is available and a candidate motion vector for the CP1 is available, the constructed affine MVP candidate may be available, and the affine MVP candidate list may include the constructed affine MVP candidate. Here, the CP0 may indicate a position in the upper left corner of the current block, and the CP1 may indicate a position in the upper right corner of the current block.
[0359] The constructed affine MVP candidates may include a candidate motion vector for the CP0 and a candidate motion vector for the CP1. The candidate motion vector for the CP0 may be a motion vector of a first block, and the candidate motion vector for the CP1 may be a motion vector of a second block.
[0360] Also, the first block may be a block in which the first reference picture identified by checking the neighboring blocks in the first group according to a first specific order is the same as the reference picture of the current block. That is, the candidate motion vector for the CP1 may be a motion vector of a block in which the first reference picture identified by checking the neighboring blocks in the first group according to a first order is the same as the reference picture of the current block. The availability may indicate that the neighboring block exists and is coded by inter prediction. Here, if the reference picture of the first block in the first group is the same as the reference picture of the current block, the candidate motion vector for the CP0 may be available. Also, for example, the first group may include a neighboring block A, a neighboring block B, and a neighboring block C, and the first specific order may be from the neighboring block A to the neighboring block B to the neighboring block C.
[0361] Also, the second block may be a block whose reference picture confirmed for the first time is the same as the reference picture of the current block by checking the neighboring blocks in the second group according to a second specific order. Here, if the reference picture of the second block in the second group is the same as the reference picture of the current block, a candidate motion vector for the CP1 may be available. Also, for example, the second group may include a neighboring block D and a neighboring block E, and the second specific order may be from the neighboring block D to the neighboring block E.
[0362] On the other hand, if the size of the current block is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the surrounding block A may be a block including a sample at (-1, -1) coordinates, the surrounding block B may be a block including a sample at (0, -1) coordinates, the surrounding block C may be a block including a sample at (-1, 0) coordinates, the surrounding block D may be a block including a sample at (W-1, -1) coordinates, and the surrounding block E may be a block including a sample at (W, -1) coordinates. That is, the peripheral block A may be the peripheral block in the upper left corner of the current block, the peripheral block B may be the upper peripheral block located at the leftmost position among the peripheral blocks above the current block, the peripheral block C may be the left peripheral block located at the topmost position among the peripheral blocks on the left side of the current block, the peripheral block D may be the upper peripheral block located at the rightmost position among the peripheral blocks above the current block, and the peripheral block E may be the peripheral block in the upper right corner of the current block.
[0363] On the other hand, if at least one of the CP0 candidate motion vector and the CP1 candidate motion vector is not available, the constructed affine MVP candidate may not be available.
[0364] Alternatively, for example, if a 6 affine motion model is applied to the current block, the CPs of the current block may include CP0, CP1, and CP2. If a candidate motion vector for the CP0 is available, a candidate motion vector for the CP1 is available, and a candidate motion vector for the CP2 is available, the constructed affine MVP candidates may be available, and the affine MVP candidate list may include the constructed affine MVP candidates. Here, the CP0 may indicate a position of the top left corner of the current block, the CP1 may indicate a position of the top right corner of the current block, and the CP2 may indicate a position of the bottom left corner of the current block.
[0365] The constructed affine MVP candidates may include a candidate motion vector for the CP0, a candidate motion vector for the CP1, and a candidate motion vector for the CP2, where the candidate motion vector for CP0 may be a motion vector of a first block, the candidate motion vector for CP1 may be a motion vector of a second block, and the candidate motion vector for CP2 may be a motion vector of a third block.
[0366] Also, the first block may check neighboring blocks in the first group according to a first specific order, and a reference picture confirmed for the first time may be the same as the reference picture of the current block. Here, if the reference picture of the first block in the first group is the same as the reference picture of the current block, a candidate motion vector for CP0 may be available. Also, for example, the first group may include a neighboring block A, a neighboring block B, and a neighboring block C, and the first specific order may be from the neighboring block A to the neighboring block B, and then to the neighboring block C.
[0367] Also, the second block may be a block whose reference picture confirmed for the first time is the same as the reference picture of the current block by checking the neighboring blocks in the second group according to a second specific order. Here, if the reference picture of the second block in the second group is the same as the reference picture of the current block, a candidate motion vector for the CP1 may be available. Also, for example, the second group may include a neighboring block D and a neighboring block E, and the second specific order may be from the neighboring block D to the neighboring block E.
[0368] Also, the third block may be a block whose reference picture confirmed for the first time is the same as the reference picture of the current block when neighboring blocks in the third group are checked according to a third specific order. Here, if the reference picture of the third block in the third group is the same as the reference picture of the current block, a candidate motion vector for the CP2 may be available. Also, for example, the third group may include a neighboring block F and a neighboring block G, and the third specific order may be from the neighboring block F to the neighboring block G.
[0369] On the other hand, if the size of the current block is WxH and the x component of the top-left sample position of the current block is 0 and the y component is 0, the surrounding block A may be a block including a sample at (-1, -1) coordinates, the surrounding block B may be a block including a sample at (0, -1) coordinates, the surrounding block C may be a block including a sample at (-1, 0) coordinates, the surrounding block D may be a block including a sample at (W-1, -1) coordinates, the surrounding block E may be a block including a sample at (W, -1) coordinates, the surrounding block F may be a block including a sample at (-1, H-1) coordinates, and the surrounding block G may be a block including a sample at (-1, H) coordinates. That is, the peripheral block A may be the peripheral block in the upper left corner of the current block, the peripheral block B may be the upper peripheral block located at the leftmost position among the peripheral blocks above the current block, the peripheral block C may be the left peripheral block located at the topmost position among the peripheral blocks on the left side of the current block, the peripheral block D may be the upper peripheral block located at the rightmost position among the peripheral blocks above the current block, the peripheral block E may be the peripheral block in the upper right corner of the current block, the peripheral block F may be the left peripheral block located at the bottommost position among the peripheral blocks on the left side of the current block, and the peripheral block G may be the peripheral block in the lower left corner of the current block.
[0370] On the other hand, if at least one of the CP0 candidate motion vector, the CP1 candidate motion vector, and the CP2 candidate motion vector is not available, the constructed affine MVP candidate may not be available.
[0371] Thereafter, the affine MVP candidate list can be derived based on an ordered step sequence as described below.
[0372] For example, if the number of derived affine MVP candidates is less than two and a motion vector for the CP0 is available, the decoding apparatus may derive a first affine MVP candidate, where the first affine MVP candidate may be an affine MVP candidate that includes the motion vector for the CP0 in the candidate motion vector for the CP.
[0373] Also, for example, if the number of derived affine MVP candidates is less than two and a motion vector for the CP1 is available, the decoding apparatus may derive a second affine MVP candidate, where the second affine MVP candidate may be an affine MVP candidate that includes the motion vector for the CP1 in the candidate motion vector for the CP.
[0374] Also, for example, if the number of derived affine MVP candidates is less than two and a motion vector for the CP2 is available, the decoding apparatus may derive a third affine MVP candidate, where the third affine MVP candidate may be an affine MVP candidate that includes the motion vector for the CP2 in the candidate motion vector for the CP.
[0375] Also, for example, when the number of derived affine MVP candidates is less than two, the decoding apparatus may derive a 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. The temporal neighboring block may indicate a collocated block in a collocated picture corresponding to the current block. The temporal MVP may be derived based on the motion vector of the temporal neighboring block.
[0376] Also, for example, if the number of derived affine MVP candidates is less than two, the decoding apparatus may derive a fifth affine MVP candidate including a zero motion vector as a candidate motion vector for the CP. The zero motion vector may indicate a motion vector whose value is 0.
[0377] The decoding apparatus derives Control Point Motion Vector Predictors (CPMVPs) for the Control Point (CP) of the current block based on the affine MVP candidate list (S2620).
[0378] The decoding apparatus may select a specific affine MVP candidate from the affine MVP candidates included in the affine MVP candidate list, and derive the selected affine MVP candidate as the CPMVP for the CP of the current block. For example, the decoding apparatus may obtain the affine MVP candidate index for the current block from a bitstream, and derive the affine MVP candidate pointed to by the affine MVP candidate index from the affine MVP candidates included in the affine MVP candidate list as the CPMVP for the CP of the current block. Specifically, if an 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 may be derived as the CPMVP of the CP0, and the candidate motion vector for CP1 of the affine MVP candidate may be derived as the CPMVP of the CP1. Also, when an 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 of the affine MVP candidate for CP0 can be derived as the CPMVP of the CP0, the candidate motion vector of the affine MVP candidate for CP1 can be derived as the CPMVP of the CP1, and the candidate motion vector of the affine MVP candidate for CP2 can be derived as the CPMVP of the CP2. Also, when an affine MVP candidate includes a candidate motion vector for CP0 and a candidate motion vector for CP2, the candidate motion vector of the affine MVP candidate for CP0 can be derived as the CPMVP of the CP0, and the candidate motion vector of the affine MVP candidate for CP2 can be derived as the CPMVP of the CP2.
[0379] The decoding apparatus derives control point motion vector differences (CPMVDs) for the CPs of the current block based on the motion prediction information (S2630). The motion prediction information may include information for CPMVDs for each of the CPs, and the decoding apparatus may derive the CPMVDs for each of the CPs of the current block based on the information for the CPMVDs for each of the CPs.
[0380] The decoding apparatus derives control point motion vectors (CPMV) for the CP of the current block based on the CPMVP and the CPMVD (S2640). The decoding apparatus may derive a CPMV for each CP based on the CPMVP and CPMVD for each of the CPs. For example, the decoding apparatus may add the CPMVP and CPMVD for each CP to derive a CPMV for the CP.
[0381] The decoding apparatus derives prediction samples for the current block based on the CPMV (S2650). The decoding apparatus may derive a sub-block-based or sample-based motion vector of the current block based on the CPMV. That is, the decoding apparatus may derive a motion vector of each sub-block or each sample of the current block based on the CPMV. The sub-block-based or sample-based motion vector may be derived based on Equation 1 or Equation 3 above. The motion vector may be represented as an affine motion vector field (MVF) or a motion vector array.
[0382] The decoding apparatus may derive a prediction sample for the current block based on the motion vector of the sub-block unit or the sample unit, may derive a reference area in a reference picture based on the motion vector of the sub-block unit or the sample unit, and may generate a prediction sample for the current block based on a reconstructed sample in the reference area.
[0383] The decoding apparatus generates a reconstructed picture for the current block based on the derived prediction sample (S2660). The decoding apparatus may generate a reconstructed picture for the current block based on the derived prediction sample. The decoding apparatus may directly use the prediction sample as a reconstructed sample according to a prediction mode, or may generate a reconstructed sample by adding a residual sample to the prediction sample. The decoding apparatus may obtain information about a residual for the current block from the bitstream if a residual sample for the current block exists. The information about the residual may include a transform coefficient for the residual sample. The decoding apparatus may derive the residual sample (or a residual sample array) for the current block based on the residual information. The decoding apparatus may generate a reconstructed sample based on the prediction sample and the residual sample, and may derive a reconstructed block or a reconstructed picture based on the reconstructed sample. As described above, the decoding apparatus may apply an in-loop filtering procedure, such as a deblocking filtering and / or an SAO procedure, to the reconstructed picture to improve subjective / objective image quality as necessary.
[0384] FIG. 27 is a schematic diagram of a decoding device that performs the image decoding method according to the present document. The method disclosed in FIG. 26 is performed by the decoding device disclosed in FIG. 27. Specifically, for example, the entropy decoding unit of the decoding device of FIG. 27 may perform S2600 of FIG. 26, the prediction unit of the decoding device of FIG. 27 may perform S2610 to S2650 of FIG. 26, and the addition unit of the decoding device of FIG. 27 may perform S2660 of FIG. 26. Although not shown, the process of obtaining image information including information on the residual of the current block through a bitstream may be performed by the entropy decoding unit of the decoding device of FIG. 27, and the process of deriving the residual sample for the current block based on the residual information may be performed by an inverse transform unit of the decoding device of FIG. 27.
[0385] According to the above mentioned document, it is possible to increase the efficiency of image coding based on affine motion prediction.
[0386] In addition, according to this document, when deriving an affine MVP candidate list, a constructed affine MVP candidate can be added only if all candidate motion vectors for the CP of the constructed affine MVP candidate are available, thereby reducing the complexity of the process of deriving a constructed affine MVP candidate and the process of constructing an affine MVP candidate list, and improving coding efficiency.
[0387] In addition, according to this document, in deriving an affine MVP candidate list, in the process of deriving a constructed affine MVP candidate, further affine MVP candidates can be derived based on candidate motion vectors for the derived CP, thereby reducing the complexity of the process of constructing an affine MVP candidate list and improving coding efficiency.
[0388] In addition, according to this document, in the process of deriving an inherited affine MVP candidate, the upper surrounding block can be used only if the upper surrounding block is included in the current CTU, and the inherited affine MVP candidate can be derived, thereby reducing the amount of line buffer storage for affine prediction and minimizing hardware costs.
[0389] Although in the above embodiments, the method is described based on a flowchart as a series of steps or blocks, this document is not limited to the order of steps, and certain steps may occur in a different order or simultaneously with other steps than those described above. Additionally, one skilled in the art will appreciate that the steps shown in the flowcharts are not exclusive, and different steps may be included, or one or more steps of the flowcharts may be removed without affecting the scope of this document.
[0390] The embodiments described in this document may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each figure may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored in a digital storage medium.
[0391] In addition, the decoding device and encoding device to which this document is applied may be included in a multimedia broadcasting transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interactive device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a customized video (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, a transportation terminal (e.g., a vehicle terminal, an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process a video signal or a data signal. For example, an over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0392] In addition, the processing method to which this document is applied may be produced in the form of a program executed by a computer and may be stored in a computer-readable recording medium. Multimedia data having a data structure according to this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may 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 disk, and an optical data storage device. In addition, the computer-readable recording medium may include a medium realized in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bit stream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0393] Also, the embodiments of the present document may be implemented in a computer program product by program code, which may be executed by a computer according to the embodiments of the present document. The program code may be stored on a carrier readable by a computer.
[0394] FIG. 28 illustrates an example of a content streaming system to which the embodiments disclosed herein may be applied.
[0395] Referring to FIG. 28, the content streaming system to which this document is applied may broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0396] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. 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 smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0397] The bitstream may be generated by an encoding method or a bitstream generation method to which this document applies, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.
[0398] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transfers the request to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server controls commands / responses between devices in the content streaming system.
[0399] The streaming server may receive content from a media storage and / or an encoding server. For example, when content is received from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time in order to provide a smooth streaming service.
[0400] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices such as smartwatches, smart glass, head mounted displays (HMDs), digital TVs, desktop computers, and digital signage.
[0401] Each server in the content streaming system can be operated as a distributed server, in which case data received by each server can be processed in a distributed manner.
Claims
1. 1. An image decoding method by a decoding device, comprising: obtaining motion prediction information for the current block from the bitstream; constructing an affine motion vector predictor (MVP) candidate list for the 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 control point motion vector differential (CPMVD) for the CP of the current block based on the motion prediction information; deriving a control point motion vector (CPMV) for the CP of the current block based on the CPMVP and the CPMVD; deriving a prediction sample for the current block based on the CPMV; generating a reconstructed picture for the current block based on the derived predicted samples; Including, The step of constructing the affine MVP candidate list comprises: checking whether a first affine MVP candidate is available, the first affine MVP candidate being available based on a first block in a left block group being coded with an affine motion model and a reference picture index of the first block being the same as a reference picture index of the current block; checking whether a second affine MVP candidate is available, the second affine MVP candidate being available based on a second block in a top group of blocks being coded with the affine motion model and a reference picture index of the second block being the same as a reference picture index of the current block; if the number of available affine MVP candidates is less than two, checking whether a third affine MVP candidate is available; the left block group includes a lower left corner peripheral block of the current block and a first left peripheral block adjacent to the upper side of the lower left corner peripheral block, the upper block group includes a upper right corner peripheral block of the current block, a first upper peripheral block adjacent to the left side of the upper right corner peripheral block, and an upper left corner peripheral block; A four-parameter affine model or a six-parameter affine model is used for inter prediction; When the four-parameter affine model is used for the inter prediction, the third affine MVP candidate is available based on the fact that a first motion vector for CP0 of the current block and a second motion vector for CP1 of the current block are derived from a block group on the upper left side of the current block and a block group on the upper right side of the current block, respectively; When the six-parameter affine model is used for the inter prediction, the third affine MVP candidate is available based on the fact that the first motion vector for the CP0, the second motion vector for the CP1, and the third motion vector for the CP2 of the current block are derived from a top-left block group of the current block, a top-right block group of the current block, and the left block group, respectively; an upper left block group including a peripheral block in the upper left corner of the current block, a second left peripheral block adjacent to the lower side of the peripheral block in the upper left corner, and a second upper peripheral block adjacent to the right side of the peripheral block in the upper left corner, and the upper right block group including a peripheral block in the upper right corner and the first upper peripheral block.
2. In a method for encoding an image by an encoding device, constructing an affine motion vector predictor (MVP) candidate list for the 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 control point motion vector (CPMV) for the CP of the current block; deriving a control point motion vector differential (CPMVD) for the CP of the current block based on the CPMVP and the CPMV; encoding motion prediction information including information regarding the CPMVD; Including, The step of constructing the affine MVP candidate list comprises: checking whether a first affine MVP candidate is available, the first affine MVP candidate being available based on a first block in a left block group being coded with an affine motion model and a reference picture index of the first block being the same as a reference picture index of the current block; checking whether a second affine MVP candidate is available, the second affine MVP candidate being available based on a second block in a top group of blocks being coded with the affine motion model and a reference picture index of the second block being the same as a reference picture index of the current block; if the number of available affine MVP candidates is less than two, checking whether a third affine MVP candidate is available; the left block group includes a lower left corner peripheral block of the current block and a first left peripheral block adjacent to the upper side of the lower left corner peripheral block, the upper block group includes a upper right corner peripheral block of the current block, a first upper peripheral block adjacent to the left side of the upper right corner peripheral block, and an upper left corner peripheral block; A four-parameter affine model or a six-parameter affine model is used for inter prediction; When the four-parameter affine model is used for the inter prediction, the third affine MVP candidate is available based on the fact that a first motion vector for CP0 of the current block and a second motion vector for CP1 of the current block are derived from a block group on the upper left side of the current block and a block group on the upper right side of the current block, respectively; When the six-parameter affine model is used for the inter prediction, the third affine MVP candidate is available based on the fact that the first motion vector for the CP0, the second motion vector for the CP1, and the third motion vector for the CP2 of the current block are derived from a top-left block group of the current block, a top-right block group of the current block, and the left block group, respectively; an upper left block group including a peripheral block in the upper left corner of the current block, a second left peripheral block adjacent to the lower side of the peripheral block in the upper left corner, and a second upper peripheral block adjacent to the right side of the peripheral block in the upper left corner, and the upper right block group including a peripheral block in the upper right corner and the first upper peripheral block.
3. A method for transmitting data for an image, comprising: obtaining a bitstream for the image, the bitstream being generated based on: 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 control point motion vector (CPMV) for the CP of the current block; deriving a control point motion vector differential (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; transmitting the data including the bitstream; Including, Constructing the affine MVP candidate list includes: checking whether a first affine MVP candidate is available, and determining that the first affine MVP candidate is available based on the fact that a first block in a left block group is coded with an affine motion model and the reference picture index of the first block is the same as the reference picture index of the current block; checking whether a second affine MVP candidate is available, and determining that the second affine MVP candidate is available based on the second block in the top group of blocks being coded with an affine motion model and the reference picture index of the second block being the same as the reference picture index of the current block; if the number of available affine MVP candidates is less than two, checking whether a third affine MVP candidate is available; the left block group includes a lower left corner peripheral block of the current block and a first left peripheral block adjacent to the upper side of the lower left corner peripheral block, the upper block group includes a upper right corner peripheral block of the current block, a first upper peripheral block adjacent to the left side of the upper right corner peripheral block, and an upper left corner peripheral block; A four-parameter affine model or a six-parameter affine model is used for inter prediction; When the four-parameter affine model is used for the inter prediction, the third affine MVP candidate is available based on the fact that a first motion vector for CP0 of the current block and a second motion vector for CP1 of the current block are derived from a block group on the upper left side of the current block and a block group on the upper right side of the current block, respectively; When the six-parameter affine model is used for the inter prediction, the third affine MVP candidate is available based on the fact that the first motion vector for the CP0, the second motion vector for the CP1, and the third motion vector for the CP2 of the current block are derived from a top-left block group of the current block, a top-right block group of the current block, and the left block group, respectively; A data transmission method, wherein the upper left block group includes a peripheral block in the upper left corner of the current block, a second left peripheral block adjacent to the lower side of the peripheral block in the upper left corner, and a second upper peripheral block adjacent to the right side of the peripheral block in the upper left corner, and the upper right block group includes a peripheral block in the upper right corner and the first upper peripheral block.
Citation Information
Patent Citations
Motion vector prediction for affine motion models in video coding
US20180098063A1
Motion vector generation for affine motion model for video coding
US20180192069A1
Method and apparatus for affine merge mode prediction for video coding system
WO2017118409A1
Method and apparatus of video coding with affine motion compensation
WO2017148345A1
