Decoding apparatus, encoding apparatus, and apparatus for transmitting data of an image
By configuring a candidate list of affine motion vector prediction terms, the image decoding process is optimized, solving the problem of increased information content in high-resolution image/video encoding, and achieving higher encoding efficiency and reduced hardware costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LG ELECTRONICS INC
- Filing Date
- 2019-09-11
- Publication Date
- 2026-06-05
AI Technical Summary
Existing technologies suffer from increased information content in high-resolution and high-quality image/video coding, leading to high transmission and storage costs, and lack effective methods to improve coding efficiency.
By configuring an affine motion vector prediction term (MVP) candidate list, affine MVP candidates are exported only when all candidate motion vectors are available, and inherited candidates and exported motion vectors are used when the number of candidates is insufficient, thus optimizing the image decoding process.
It improves image/video compression efficiency, reduces the processing complexity and hardware cost of exporting affine MVP candidates, and enhances encoding efficiency.
Smart Images

Figure CN117560487B_ABST
Abstract
Description
[0001] This application is a divisional application of the original invention patent application No. 201980005219.1 (International Application No.: PCT / KR2019 / 011827, Application Date: September 11, 2019, Invention Title: Image Decoding Method and Apparatus Based on Motion Prediction in Sub-block Units in an Image Coding System). Technical Field
[0002] This document relates to image coding techniques, and more specifically, to an image decoding method and apparatus in an image coding system based on motion prediction using a motion candidate list for deriving motion information of sub-block units. Background Technology
[0003] Today, the demand for high-resolution and high-quality images / videos, such as 4K, 8K, or even higher Ultra High Definition (UHD) images / videos, is constantly growing across various fields. As image / video data becomes higher resolution and higher quality, the amount of information or bits transmitted increases compared to traditional image data. Therefore, transmission and storage costs increase when using media such as traditional wired / wireless broadband lines to transmit image data or when using existing storage media to store image / video data.
[0004] In addition, there is increasing interest and demand for immersive media such as virtual reality (VR) and artificial reality (AR) content or holograms, and broadcasting of images / videos with image characteristics that differ from real images such as game images is on the rise.
[0005] Therefore, there is a need for efficient image / video compression techniques to effectively compress, transmit, store, and reproduce information with high resolution and high quality images / videos that have the various characteristics described above. Summary of the Invention
[0006] Technical issues
[0007] One of the technical problems to be solved in this document is to provide a method and device for improving image coding efficiency.
[0008] Another technical problem to be solved in this document is to provide an image decoding method and apparatus that configures the affine MVP candidate list of the current block by deriving the constructed affine MVP candidates based on the neighboring blocks only when all candidate motion vectors for CP are available, and performs prediction on the current block based on the configured affine MVP candidate list.
[0009] Another technical problem to be solved in this document is to provide an image decoding method and apparatus that uses candidate motion vectors already exported in the process of exporting the constructed affine MVP candidates as added affine MVP candidates to export affine MVP candidates and performs prediction on the current block based on the configured affine MVP candidate list when the number of available inherited affine MVP candidates and the number of constructed affine MVP candidates are less than the maximum number of candidates in the MVP candidate list.
[0010] Technical solution
[0011] According to the examples in this document, an image decoding method performed by a decoding device is provided. This image decoding method includes the following steps: obtaining motion prediction information for a current block from a bitstream; configuring an affine motion vector prediction term (MVP) candidate list for the current block; deriving a control point motion vector prediction term (CPMVP) for control points (CPs) of the current block based on the affine MVP candidate list; deriving a control point motion vector difference (CPMVD) for the CPs of the current block based on the motion prediction information; deriving a control point motion vector CPMV for the CPs of the current block based on the CPMVP and CPMVD; deriving a prediction sample for the current block based on the CPMV; and based on... The exported predicted samples are used to generate a reconstructed image for the current block. The step of configuring the affine MVP candidate list includes the following steps: checking if a first affine MVP candidate is available, wherein the first affine MVP candidate is available when the first block in the left block group is encoded using the affine motion model and the reference image index of the first block is the same as the reference image index of the current block; checking if a second affine MVP candidate is available, wherein the second affine MVP candidate is available when the second block in the upper block group is encoded using the affine motion model and the reference image index of the second block is the same as the reference image index of the current block; and checking if the number of available affine MVP candidates is less than two. The availability of candidates is determined as follows: The third affine MVP candidate is available when a first motion vector for CP0 and a second motion vector for CP1 of the current block are derived from the upper-left block group and the upper-right block group of the current block, respectively, for a 4-parameter affine model applied to inter-frame prediction; and the third affine MVP candidate is available when a first motion vector for CP0, a second motion vector for CP1, and a third motion vector for CP2 of the current block are derived from the upper-left block group, the upper-right block group, and the left block group of the current block, respectively, for a 6-parameter affine model applied to inter-frame prediction; when the number of available affine MVP candidates is less than... 2. When the first motion vector is available, a fourth affine MVP candidate is derived, wherein the fourth affine MVP candidate includes the motion vector for CP0 as a candidate motion vector for CP; when the number of available affine MVP candidates is less than 2 and the second motion vector is available, a fifth affine MVP candidate is derived, wherein the fifth affine MVP candidate includes the motion vector for CP1 as a candidate motion vector for CP; when the number of available affine MVP candidates is less than 2 and the third motion vector for CP2 of the current block is available, a sixth affine MVP candidate is derived, wherein the sixth affine MVP candidate includes the third motion vector as a candidate motion vector for CP.When the number of available affine MVP candidates is less than 2 and a time MVP candidate derived from the time neighboring block of the current block is available, a seventh affine MVP candidate is derived, which includes the time MVP as a candidate motion vector for the CP; and when the number of available affine MVP candidates is less than 2, an eighth affine MVP candidate is derived, which includes a zero motion vector as a candidate motion vector for the CP.
[0012] According to an example of the present invention, an image encoding method performed by an encoding device is provided, the image encoding method comprising the following steps: configuring an affine motion vector prediction term (MVP) candidate list for a current block; deriving a control point motion vector prediction term (CPMVP) for a control point (CP) of the current block based on the affine MVP candidate list; deriving a CPMV for the CP of the current block; deriving a control point motion vector difference (CPMVD) for the CP of the current block based on the CPMVP and CPMV; and encoding motion prediction information including information about the CPMVD, wherein the step of configuring the affine MVP candidate list includes The following steps are taken: First, check if a first affine MVP candidate is available, wherein the first affine MVP candidate is available when the first block in the left block group is encoded using an affine motion model and the reference image index of the first block is the same as the reference image index of the current block; second, check if a second affine MVP candidate is available, wherein the second affine MVP candidate is available when the second block in the upper block group is encoded using an affine motion model and the reference image index of the second block is the same as the reference image index of the current block; when the number of available affine MVP candidates is less than 2, check if a third affine MVP candidate is available, wherein the third affine MVP candidate is available when, for the 4-parameter affine model applied to inter-frame prediction, the first affine MVP candidate is available from the reference image index of the current block; third, check if a third affine MVP candidate is available, wherein, for the 4-parameter affine model applied to inter-frame prediction, the third affine MVP candidate is available from the reference image index of the current block; fourth, check if a third affine MVP candidate is available, wherein, for the 4-parameter affine model applied to inter-frame prediction, the third affine MVP candidate is available from the reference image index of the current block; fifth, check if a third affine MVP candidate is available, wherein, for the 4-parameter affine model applied to inter-frame prediction, the third affine MVP candidate is available from the reference image index of the current block; sixth, check if a third affine MVP candidate is available, wherein, for the 4-parameter affine model applied to inter-frame prediction, the third affine MVP candidate is available from the reference image index of the current block; seventh, check if a third affine MVP candidate is available, wherein, for the 4-parameter affine model applied to inter-frame prediction, the third affine MVP candidate is available from the reference image index of the current block; fifth, check if a third affine MVP candidate is available, wherein The third affine MVP candidate is available when a first motion vector for CP0 and a second motion vector for CP1 of the current block are derived from the top-left block group and the top-right block group of the current block, respectively. The third affine MVP candidate is available when a first motion vector for CP0, a second motion vector for CP1, and a third motion vector for CP2 of the current block are derived from the top-left block group, the top-right block group, and the left block group of the current block, respectively, for a 6-parameter affine model applied to inter-frame prediction. When the number of available affine MVP candidates is less than 2 and the first motion vector is available, the third affine MVP candidate is available. A fourth affine MVP candidate is derived, wherein the fourth affine MVP candidate includes the motion vector for CP0 as a candidate motion vector for CP; when the number of available affine MVP candidates is less than 2 and the second motion vector is available, a fifth affine MVP candidate is derived, wherein the fifth affine MVP candidate includes the motion vector for CP1 as a candidate motion vector for CP; when the number of available affine MVP candidates is less than 2 and the third motion vector for CP2 of the current block is available, a sixth affine MVP candidate is derived, wherein the sixth affine MVP candidate includes the third motion vector as a candidate motion vector for CP;When the number of available affine MVP candidates is less than 2 and a time MVP candidate derived from the time neighboring block of the current block is available, a seventh affine MVP candidate is derived, which includes the time MVP as a candidate motion vector for the CP; and when the number of available affine MVP candidates is less than 2, an eighth affine MVP candidate is derived, which includes a zero motion vector as a candidate motion vector for the CP.
[0013] Beneficial effects
[0014] The examples in this document demonstrate how to improve the efficiency of regular image / video compression.
[0015] According to this document, image coding efficiency can be improved based on affine motion prediction.
[0016] According to this document, when exporting the affine MVP candidate list, a constructed affine MVP candidate can only be added if all candidate motion vectors for the CP of the constructed affine MVP candidate are available. This reduces the complexity of exporting the constructed affine MVP candidate and configuring the affine MVP candidate list, and improves coding efficiency.
[0017] According to this document, when exporting the affine MVP candidate list, additional affine MVP candidates can be exported based on the candidate motion vectors for CP exported in the process of exporting the constructed affine MVP candidates. This can reduce the complexity of the process of configuring the affine MVP candidate list and improve coding efficiency.
[0018] According to this document, in the process of deriving inherited affine MVP candidates, the upper neighbor block can be used to derive inherited affine MVP candidates only when the upper neighbor block is included in the current CTU. This reduces the storage of the row buffer used for affine prediction and minimizes hardware costs. Attached Figure Description
[0019] Figure 1 This document provides illustrative examples of video / image encoding systems that can be applied to this document.
[0020] Figure 2 This is a diagram that schematically illustrates the configuration of video / image encoding devices to which this document can be applied.
[0021] Figure 3 This is a diagram that schematically illustrates the configuration of a video / image decoding device to which this document can be applied.
[0022] Figure 4 Examples of video / image coding methods based on inter-frame prediction are presented.
[0023] Figure 5 Examples of video / image coding methods based on inter-frame prediction are presented.
[0024] Figure 6 The inter-frame prediction process is presented as an example.
[0025] Figure 7 An illustrative representation of motion represented by an affine motion model is presented.
[0026] Figure 8 An affine motion model using motion vectors for three control points is presented as an example.
[0027] Figure 9 An illustrative motion model using an affine unit with motion vectors for two control points is presented.
[0028] Figure 10 An illustrative method for deriving motion vectors from sub-blocks based on an affine motion model is presented.
[0029] Figure 11 The neighboring blocks used to derive affine candidates for inheritance are presented as an example.
[0030] Figure 12 Spatial candidates for the constructed affine candidates are presented illustratively.
[0031] Figure 13 An example of configuring an affine MVP list is presented.
[0032] Figure 14 Present an example of the constructed candidate.
[0033] Figure 15 Present an example of the constructed candidate.
[0034] Figure 16 The neighboring block locations of the inherited affine candidates are presented as an example of what happens when the scan is performed to derive them.
[0035] Figure 17 The neighboring block locations of the inherited affine candidates are presented as an example of what happens when the scan is performed to derive them.
[0036] Figure 18 The positions of affine candidates used to derive inheritance are presented as examples.
[0037] Figure 19 An example of a list of merge candidates configured for the current block.
[0038] Figure 20 Presents neighboring blocks of the current block constructed as an example based on the examples in this document for deriving the candidate blocks.
[0039] Figure 21 Presents examples of the constructed candidates for the 4-affine motion model applied to the current block.
[0040] Figure 22 Presents examples of the constructed candidates for the 6-affine motion model applied to the current block.
[0041] Figure 23a and Figure 23b Examples of affine candidates for derived inheritance are presented illustratively.
[0042] Figure 24 This document schematically illustrates an image encoding method performed by an encoding device according to this document.
[0043] Figure 25 An encoding device for performing an image encoding method according to this document is illustrated schematically.
[0044] Figure 26 This document schematically illustrates an image decoding method performed by a decoding device according to this document.
[0045] Figure 27 This schematically illustrates a decoding device that performs an image decoding method according to this document.
[0046] Figure 28 An illustrative diagram of a content streaming system architecture that can be applied to the implementation methods disclosed in this document is presented. Detailed Implementation
[0047] While this document may be readily modified and includes various embodiments, specific embodiments thereof have been illustrated by way of example in the accompanying drawings and will now be described in detail. However, this is not intended to limit this document to the specific embodiments disclosed herein. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the technical ideas of this document. Singular forms may include plural forms unless the context clearly indicates otherwise. Terms such as “comprising” and “having” are intended to indicate the presence of the features, numbers, steps, operations, elements, components, or combinations thereof used in the following description, and should therefore not be construed as pre-excluding the possibility of the presence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof.
[0048] Furthermore, for ease of description of their different features and functions, the components in the accompanying drawings described herein are illustrated independently; however, this does not imply that each component is implemented by a separate piece of hardware or software. For example, any two or more of these components can be combined to form a single component, and any single component can be divided into multiple components. Embodiments in which components are combined and / or divided will fall within the scope of this document's patent rights, provided they do not depart from the spirit of this document.
[0049] In the following description, preferred embodiments of this document will be described in more detail with reference to the accompanying drawings. Furthermore, in the drawings, the same reference numerals are used for the same components, and repeated descriptions of the same components will be omitted.
[0050] Figure 1 This document provides illustrative examples of video / image encoding systems that can be applied to this document.
[0051] Reference Figure 1 A video / image encoding 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 stream via a digital storage medium or network.
[0052] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as 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, and the display may be configured as a separate device or an external component.
[0053] Video sources can be obtained through processes that capture, synthesize, or generate video / images. Video sources may include video / image capture devices and / or video / image generation devices. Video / image capture devices may include, for example, one or more cameras, video / image archives including previously captured video / images, etc. Video / image generation devices may include, for example, computers, tablets, and smartphones, and can generate video / images (electronically). For example, virtual video / images can be generated by computers, etc. In this case, the video / image capture process can be replaced by a process that generates related data.
[0054] Encoding devices can encode input video / images. They can perform a series of processes such as prediction, transformation, and quantization for compression and coding efficiency. The encoded data (encoded video / image information) can be output as a bitstream.
[0055] A transmitter can send encoded video / image information or data, output as a bitstream, to a receiver in a receiving device via a digital storage medium or network, either as a file or a stream. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter can include elements for generating media files according to a predetermined file format and may include elements for transmission over a broadcast / communication network. The receiver can receive / extract the bitstream and send the received / extracted bitstream to a decoding device.
[0056] Decoding devices can decode video / images by performing a series of processes such as inverse quantization, inverse transform, and prediction, which correspond to the operations of encoding devices.
[0057] The renderer can render decoded video / images. The rendered video / images can then be displayed on a monitor.
[0058] This document relates to video / image coding. For example, the methods / implementations disclosed in this document can be applied to methods disclosed in the Universal Video Coding (VVC) standard, the Basic Video Coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second-generation Audio Video Coding (AVS2) standard, or the next-generation video / image coding standard (e.g., H.267, H.268, etc.).
[0059] This document provides various implementations related to video / image encoding, and these implementations may be combined and performed together unless otherwise specified.
[0060] In this document, video can refer to a collection of images over time. Generally, an image refers to a unit representing an image within a specific time period, and a tile is a unit that constitutes a part of an image. A tile can include one or more Coded Tree Units (CTUs). An image can consist of one or more tiles. An image can consist of one or more groups of tiles. A group of tiles can include one or more tiles. A brick can represent a rectangular area of CTU rows within a tile in an image. A tile can be divided into multiple bricks, each brick consisting of one or more CTU rows within the tile. A tile that is not divided into multiple bricks can also be called a brick. Block scanning can be a specific order of CTUs in a segmented image, as follows: CTUs can be ordered by raster scan within a block, blocks within a block can be ordered sequentially by raster scan of the block portion of a tile, and tiles within an image can be ordered sequentially by raster scan of the image's tiles (block scanning is a specific order of CTUs in a segmented image, as follows: CTUs can be ordered sequentially by raster scan within a block, blocks within a block can be ordered sequentially by raster scan of the block portion of a tile, and tiles within an image can be ordered sequentially by raster scan of the image's tiles). A tile is a rectangular region of CTUs within a specific tile column and row (a tile is a rectangular region of CTUs within a specific tile column and row of an image). A tile column is a rectangular region where the height of a CTU is equal to the height of the image and the width is specified by the syntax element in the image parameter set. A tile row is a rectangular area whose width is specified by a syntax element in the image parameter set and whose height is equal to the height of the image. A tile scan can be a specific order of CTUs in a segmented image, where CTUs can be ordered consecutively by raster scan within a tile, or consecutively by raster scan of the image's tiles. A slice can include an integer number of tiles in the image that can be contained within a single NAL unit. A slice can consist of multiple complete tiles or a continuous sequence of complete tiles from a single tile. In this document, tile groups and slices can be used interchangeably. For example, in this document, a tile group / tile group header can be referred to as a slice / slice header.
[0061] A pixel, or pel, can refer to the smallest unit that makes up a picture (or image). Additionally, "sample" can be used as the term corresponding to a pixel. A sample can typically represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component.
[0062] A unit can represent a basic unit of image processing. A unit may include a specific region and at least one of the information associated with that region. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. Depending on the context, units and terms such as blocks and regions may be used interchangeably. Typically, an M×N block may include a set (or array) of samples (or sample arrays) or transform coefficients consisting of M columns and N rows.
[0063] In this document, the terms " / " and "," should be interpreted as indicating "and / or". For example, the expression "A / B" can mean "A and / or B". Additionally, "A, B" can mean "A and / or B". Furthermore, "A / B / C" can mean "at least one of A, B, and / or C". Additionally, "A, B, C" can mean "at least one of A, B, and / or C". (In this document, the terms " / " and "," should be interpreted as indicating "and / or". For example, the expression "A / B" can mean "A and / or B". Additionally, "A, B" can mean "A and / or B". Additionally, "A / B / C" can mean "at least one of A, B, and / or C". Additionally, "A / B / C" can mean "at least one of A, B, and / or C".)
[0064] Additionally, in this document, the term "or" should be interpreted as indicating "and / or". For example, the expression "A or B" can include 1) "A only", 2) "B only", and / or 3) both "A and B". In other words, the term "or" in this document should be interpreted as indicating "alternatively or alternatively".
[0065] Figure 2 This is a schematic diagram illustrating the configuration of a video / image encoding device to which this document can be applied. In the following text, the term "video encoding device" may include an image encoding device.
[0066] Reference Figure 2The encoding device 200 may include an image segmenter 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-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transform 232, a quantizer 233, an inverse quantizer 234, and an inverse transform 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstruction block generator. According to embodiments, the image segmenter 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filter 260 described above may be constituted by one or more hardware components (e.g., an encoder chipset or processor). Additionally, the memory 270 may include a decoded image buffer (DPB) and may be constituted by a digital storage medium. The hardware components may also include the memory 270 as an internal / external component.
[0067] Image segmenter 210 segments an input image (or picture or frame) input to encoding device 200 into one or more processing units. As an example, a processing unit may be referred to as a coding unit (CU). In this case, starting from a coding tree unit (CTU) or a maximum coding unit (LCU), the coding unit can be recursively segmented according to a quadtree-binary-tritree (QTBTTT) structure. For example, a coding unit can be divided into multiple deeper coding units based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. In this case, for example, a quadtree structure can be applied first, followed by a binary tree structure and / or a ternary tree structure. Alternatively, a binary tree structure can be applied first. The encoding process according to this document can be performed based on the final coding unit that has not been further segmented. In this case, based on the encoding efficiency according to image characteristics, the maximum coding unit can be directly used as the final coding unit. Alternatively, the coding unit can be recursively segmented into even deeper coding units as needed, such that the optimally sized coding unit can be used as the final coding unit. Here, the encoding process may include processes such as prediction, transformation, and reconstruction, which will be described later. As another example, the processing unit may also include a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit can be divided or segmented from the final encoding unit described above. The prediction unit may be a unit for predicting samples, and the transformation unit may be a unit for deriving the transformation coefficients and / or a unit for deriving the residual signal from the transformation coefficients.
[0068] Depending on the context, units and terms such as blocks and regions can be used interchangeably. Typically, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. Samples can usually represent pixels or pixel values, and can represent pixel / pixel values only for the luminance component, or pixel / pixel values only for the chrominance component. Samples can be used as a term corresponding to pixels or pels of a picture (or image).
[0069] In the encoding device 200, a residual signal (residual block, residual sample array) is generated by subtracting the prediction signal (prediction block, prediction sample array) output from the inter-frame predictor 221 or the intra-frame predictor 222 from the input image signal (original block, original sample array), and the generated residual signal is sent to the converter 232. In this case, as shown, the unit in the encoding device 200 that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) can be referred to as subtractor 231. The predictor can perform prediction on the processing target block (hereinafter referred to as "current block") and can generate a prediction block including prediction samples for the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction based on the current block or CU. As discussed later in the description of each prediction mode, the predictor can generate various prediction-related information such as prediction mode information and send the generated information to the entropy encoder 240. The prediction information can be encoded in the entropy encoder 240 and output as a bitstream.
[0070] Intra-predictor 222 can predict the current block by referencing samples in the current image. Depending on the prediction mode, the reference samples can be located near or separate from the current block. In intra-prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. Non-directional modes can include, for example, DC mode and planar mode. Depending on the level of detail in the prediction direction, the directional modes can include, for example, 33 or 65 directional prediction modes. However, this is just an example, and more or fewer directional prediction modes can be used depending on the settings. Intra-predictor 222 can determine the prediction mode to be applied to the current block by using the prediction modes applied to neighboring blocks.
[0071] Inter-frame predictor 221 can derive a predicted block for the current block based on a reference block (reference sample array) specified by motion vectors on a reference image. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted based on the correlation between motion information of neighboring blocks and the current block, on a block, sub-block, or sample basis. Motion information may include motion vectors and reference image indices. Motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, neighboring blocks may include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. The reference image including the reference block and the reference image including the temporally neighboring block may be the same as or different from each other. The temporally neighboring block may be referred to as a juxtaposed reference block, juxtaposed CU (colCU), etc., and the reference image including the temporally neighboring block may be referred to as a juxtaposed image (colPic). For example, inter-frame predictor 221 can configure a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference image index of the current block. Inter-frame prediction can be performed based on various prediction modes. For example, in jump mode and merge mode, the inter-frame predictor 221 can use motion information of neighboring blocks as motion information of the current block. In jump mode, unlike merge mode, residual signals cannot be sent. In motion information prediction (motion vector prediction, MVP) mode, motion vectors of neighboring blocks can be used as motion vector prediction terms, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0072] Predictor 220 can generate prediction signals based on various prediction methods. For example, the predictor can apply intra-frame prediction or inter-frame prediction to the prediction of a block, and can also apply intra-frame prediction and inter-frame prediction simultaneously. This can be referred to as combined inter-frame and intra-frame prediction (CIIP). Additionally, the predictor can perform prediction on a block based on an intra-block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or palette mode can be used for content image / video encoding such as games, etc. Although IBC essentially performs prediction within the current block, its execution is similar to inter-frame prediction in that it derives a reference block within the current block. That is, IBC can use at least one of the inter-frame prediction techniques described in this document. The palette mode can be considered an example of intra-frame coding or intra-frame prediction. When applying a palette mode, sample values in the image can be signaled based on information about the palette index and palette table.
[0073] The predicted signal generated by the predictor (including inter-frame predictor 221 and / or intra-frame predictor 222) can be used to generate a reconstructed signal or a residual signal. Transformer 232 can generate transform coefficients by applying transform techniques to the residual signal. For example, the transform technique can include at least one of Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), Karhunen-Loève Transform (KLT), Graph-Based Transform (GBT), or Conditional Nonlinear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is represented as a graph. CNT refers to a transform obtained based on the predicted signal generated using all previously reconstructed pixels. Furthermore, the transform processing can be applied to square pixel blocks of the same size, or to blocks of variable size that are not square.
[0074] Quantizer 233 quantizes the transform coefficients and sends them to entropy encoder 240, which encodes the quantized signal (information about the quantized transform coefficients) and outputs the encoded signal in a bitstream. The information about the quantized transform coefficients can be referred to as residual information. Quantizer 233 can rearrange the block-type quantized transform coefficients into a one-dimensional vector based on the coefficient scan order, and generate information about the quantized transform coefficients based on the one-dimensional vector form. Entropy encoder 240 can perform various encoding methods such as exponential Golomb, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). Entropy encoder 240 can encode information required for video / image reconstruction, other than the quantized transform coefficients (e.g., values of syntax elements), either together or separately. The encoded information (e.g., encoded video / image information) can be transmitted or stored in bitstream form at the unit level of the Network Abstraction Layer (NAL). The video / image information may also include information about various parameter sets such as Adaptive Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), and Video Parameter Set (VPS). Additionally, the video / image information may include general constraint information. In this document, information and / or syntax elements sent from the encoding device to / signaled to the decoding device may be included in the video / image information. The video / image information can be encoded using the encoding process described above and included in the bitstream. The bitstream can be transmitted over a network or stored in a digital storage medium. Here, the network may include broadcast networks, communication networks, and / or the like, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that sends the signal output from the entropy encoder 240 or a memory (not shown) that stores it may be configured as an internal / external element of the encoding device 200, or the transmitter may be included in the entropy encoder 240.
[0075] The quantized transform coefficients output from quantizer 233 can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transform to the vectorized transform coefficients using inverse quantizer 234 and inverse transform 235, the residual signal (residual block or residual sample) can be reconstructed. Adder 155 adds the reconstructed residual signal to the prediction signal output from inter-frame predictor 221 or intra-frame predictor 222, thereby generating a reconstructed signal (reconstructed image, reconstructed block, reconstructed sample array). When there is no residual for the processing target block, as in the case of applying a jump mode, the prediction block can be used as the reconstructed block. Adder 250 can be referred to as a reconstructor or reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next processing target block in the current block, and, as described later, for inter-frame prediction of the next image through filtering.
[0076] In addition, luminance mapping with chroma scaling (LMCS) can be applied in image encoding and / or reconstruction processing.
[0077] Filter 260 can improve subjective / objective video quality by applying filtering to the reconstructed signal. For example, filter 260 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image, and the modified reconstructed image can be stored in memory 270, specifically in the DPB of memory 270. Various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive ring filter, bilateral filter, etc. As discussed later in the description of each filtering method, filter 260 can generate various filtering-related information and send the generated information to entropy encoder 240. The filtering information can be encoded in entropy encoder 240 and output as a bitstream.
[0078] The modified reconstructed image sent to memory 270 can be used as a reference image in inter-frame predictor 221. Accordingly, the encoding device can avoid prediction mismatch in the encoding device 100 and the decoding device when applying inter-frame prediction, and can also improve encoding efficiency.
[0079] The memory 270DPB can store modified reconstructed images for use as reference images in the inter-frame predictor 221. The memory 270 can store motion information of blocks in the current image from which motion information has been derived (or encoded) and / or motion information of blocks in reconstructed images. The stored motion information can be sent to the inter-frame predictor 221 to be used as motion information for neighboring blocks or temporally neighboring blocks. The memory 270 can store reconstructed samples of reconstructed blocks in the current image and send them to the intra-frame predictor 222.
[0080] Figure 3This is a diagram that schematically illustrates the configuration of a video / image decoding device to which this document can be applied.
[0081] Reference Figure 3 The video 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-frame predictor 332 and an intra-frame predictor 331. The residual processor 320 may include an inverse quantizer 321 and an inverse transformer 322. According to embodiments, the entropy decoder 310, residual processor 320, predictor 330, adder 340, and filter 350 described above may be constituted by one or more hardware components (e.g., a decoder chipset or processor). Additionally, the memory 360 may include a decoded picture buffer (DPB) and may be constituted by a digital storage medium. The hardware components may also include the memory 360 as an internal / external component.
[0082] When the input includes a bitstream containing video / image information, the decoding device 300 can interact with data already prepared therein. Figure 2 The processing of video / image information in the encoding device correspondingly reconstructs the image. For example, the decoding device 300 can derive units / blocks based on information related to block segmentation obtained from the bitstream. The decoding device 300 can perform decoding by using processing units applied in the encoding device. Therefore, the decoding processing unit can be, for example, an encoding unit, which can be segmented along a quadtree, binary tree, and / or ternary tree structure using encoding tree units or maximum encoding units. One or more transform units can be derived from the encoding units. And, the reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a reproducer.
[0083] Decoding device 300 can receive data from... in the form of a bitstream. Figure 2The signal output by the encoding device can be decoded by the entropy decoder 310. For example, the entropy decoder 310 can parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets such as Adaptive Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), Video Parameter Set (VPS), etc. In addition, the video / image information may also include general constraint information. The decoding device can further decode the picture based on the information about the parameter sets and / or general constraint information. In this document, the signaling / receiving information and / or syntax elements, which will be described later, can be decoded and obtained from the bitstream through the decoding process. For example, the entropy decoder 310 can decode the information in the bitstream based on encoding methods such as Exponential Golomb coding, CAVLC, CABAC, etc., and can output the values of the syntax elements required for image reconstruction and the quantized values of the transform coefficients of the residuals. More specifically, the CABAC entropy decoding method can receive bins corresponding to each syntax element in the bitstream, determine a context model using information about the target syntax element and the decoding information of neighboring and target blocks, or information about symbols / bins decoded in previous steps, predict the bin generation probability based on the determined context model, and perform arithmetic decoding on the bins to generate symbols corresponding to each syntax element value. Here, the CABAC entropy decoding method can update the context model after determining it using information about symbols / bins decoded for the context model of the next symbol / bin. Prediction information from the information decoded in the entropy decoder 310 can be provided to the predictors (inter-frame predictor 332 and intra-frame predictor 331), and the residual values (i.e., quantized transform coefficients) and associated parameter information that have undergone entropy decoding in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive residual signals (residual blocks, residual samples, residual sample arrays). Additionally, filtering information from the information decoded in the entropy decoder 310 can be provided to the filter 350. Furthermore, a receiver (not shown) that receives the signal output from the encoding device can also configure the decoding device 300 as an internal / external component, and the receiver can be a component of the entropy decoder 310. Additionally, the decoding device according to this document can be referred to as a video / image / picture encoding device, and the decoding device can be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder can include the entropy decoder 310, and the sample decoder can include at least one of a dequantizer 321, an inverse transformer 322, an adder 340, a filter 350, a memory 360, an inter-frame predictor 332, and an intra-frame predictor 331.
[0084] The dequantizer 321 can output transform coefficients by dequantizing the quantized transform coefficients. The dequantizer 321 can rearrange the quantized transform coefficients into two-dimensional blocks. In this case, the rearrangement can be performed based on the order of coefficient scans already performed in the encoding device. The dequantizer 321 can perform dequantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain the transform coefficients.
[0085] The inverse converter 322 obtains the residual signal (residual block, residual sample array) by performing an inverse transformation on the transformation coefficients.
[0086] The predictor can perform predictions on the current block and generate a prediction block that includes prediction samples for the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction to the current block based on information about the prediction output from the entropy decoder 310, and specifically, can determine the intra-frame / inter-frame prediction mode.
[0087] Predictor 330 can generate prediction signals based on various prediction methods. For example, the predictor can apply intra-frame prediction or inter-frame prediction to the prediction of a block, and can also apply intra-frame prediction and inter-frame prediction simultaneously. This can be referred to as combined intra-frame and inter-frame prediction (CIIP). Additionally, the predictor can perform prediction on a block based on an intra-block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or palette mode can be used for content image / video encoding such as games with screen content coding (SCC). Although IBC essentially performs prediction within the current block, its execution is similar to inter-frame prediction in that it derives a reference block within the current block. That is, IBC can use at least one of the inter-frame prediction techniques described in this document. The palette mode can be considered an example of intra-frame coding or intra-frame prediction. When a palette mode is applied, information about the palette table and palette index can be included in the video / image information and signaled.
[0088] The intra-predictor 331 can predict the current block by referencing samples in the current image. Depending on the prediction mode, the reference samples can be located near or separate from the current block. In intra-prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The intra-predictor 331 can determine the prediction mode applied to the current block by using the prediction modes applied to neighboring blocks.
[0089] Inter-frame predictor 332 can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference image. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted based on the correlation between motion information of neighboring blocks and the current block, at the block, sub-block, or sample level. Motion information may include motion vectors and a reference image index. Motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, neighboring blocks may include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. For example, inter-frame predictor 332 can configure a motion information candidate list based on neighboring blocks and derive the motion vector and / or reference image index for the current block based on the received candidate selection information. Inter-frame prediction can be performed based on various prediction modes, and the information about the prediction may include information indicating the mode of inter-frame prediction for the current block.
[0090] Adder 340 adds the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (inter-frame predictor 332 or intra-frame predictor 331) to generate a reconstruction signal (reconstructed image, reconstruction block, reconstruction sample array). When there is no residual for processing the target block, as in the case of applying a jump mode, the prediction block can be used as the reconstruction block.
[0091] Adder 340 can be referred to as a reconstructor or reconstruction block generator. The generated reconstructed signal can be used for intra-frame prediction of the next processing target block in the current block, and as described later, it can be output by filtering or used for inter-frame prediction of the next image.
[0092] In addition, luminance mapping with chroma scaling (LMCS) can be applied in image decoding processing.
[0093] Filter 350 can improve subjective / objective video quality by applying filtering to the reconstructed signal. For example, filter 350 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image, and the modified reconstructed image can be sent to memory 360, specifically to the DPB of memory 360. Various filtering methods can include, for example, deblocking filtering, adaptive sample shifting, adaptive ring filtering, bilateral filtering, etc.
[0094] The (modified) reconstructed image stored in the DPB of memory 360 can be used as a reference image in inter-frame predictor 332. Memory 360 can store motion information of blocks in the current image from which motion information has been derived (or decoded) and / or motion information of blocks in a reconstructed image. The stored motion information can be sent to inter-frame predictor 332 to be used as motion information of neighboring blocks or temporally neighboring blocks. Memory 360 can store reconstructed samples of reconstructed blocks in the current image and send them to intra-frame predictor 331.
[0095] The embodiments described in this specification in the filter 260, inter-frame predictor 221 and intra-frame predictor 222 of the encoding device 200 can be similarly or correspondingly applied to the filter 350, inter-frame predictor 332 and intra-frame predictor 331 of the decoding device 300.
[0096] As described above, prediction is performed to improve compression efficiency during video encoding. Accordingly, a prediction block can be generated that includes prediction samples for the current block, which is the target block for encoding. Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block can be derived identically in both the encoding and decoding devices, and the encoding device can improve image encoding efficiency by signaling to the decoding device information about the residual between the original block and the prediction block (residual information), not the original sample values of the original block itself. The decoding device can derive a residual block including residual samples based on the residual information, generate a reconstructed block including reconstructed samples by adding the residual block to the prediction block, and generate a reconstructed image including the reconstructed block.
[0097] Residual information can be generated through transformation and quantization processes. For example, an encoding device can derive a residual block between the original block and the prediction block, derive transform coefficients by performing a transform process on the residual samples (residual sample array) included in the residual block, and derive quantized transform coefficients by performing a quantization process on the transform coefficients. This allows the device to signal the associated residual information to the decoding device (via a bitstream). Here, the residual information can include the value information, position information, transform technique, transform kernel, quantization parameters, etc., of the quantized transform coefficients. The decoding device can perform quantization / dequantization processes based on the residual information and derive residual samples (or residual sample blocks). The decoding device can generate a reconstructed block based on the prediction block and the residual block. The encoding device can derive a residual block by performing dequantization / inverse transform on the quantized transform coefficients to serve as a reference for inter-frame prediction of the next image, and can generate a reconstructed image based on this.
[0098] When applying inter-frame prediction, the predictor of the encoding / decoding device can perform inter-frame prediction on a block-unit basis and derive prediction samples. Inter-frame prediction can be derived in a way that depends on data elements (e.g., sample values or motion information) of images other than the current image. When applying inter-frame prediction to the current block, a prediction block (prediction sample array) for the current block can be derived based on a reference block (reference sample array) specified by motion vectors on a reference image indicated by a reference image index. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, the motion information of the current block can be predicted on a block, sub-block, or sample-based basis based on the correlation of motion information between neighboring blocks and the current block. Motion information can include motion vectors and reference image indices. Motion information can also include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When applying inter-frame prediction, neighboring blocks can include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. The reference image including the reference block and the reference image including the temporally neighboring block can be the same as or different from each other. Temporally neighboring blocks can be referred to as collated reference blocks, collated CUs (colCU), etc., and reference pictures including temporally neighboring blocks can be referred to as collated pictures (colPic). For example, a motion information candidate list can be configured based on the current block's neighboring blocks, and a signal can be sent indicating which candidate's flag or index information is selected (used) to derive the current block's motion vector and / or reference picture index. Inter-frame prediction can be performed based on various prediction modes. For example, in jump mode and (normal) merge mode, the motion information of the current block can be the same as the motion information of the selected neighboring blocks. In jump mode, unlike merge mode, residual signals cannot be sent. In motion information prediction (motion vector prediction (MVP)) mode, the motion vectors of the selected neighboring blocks can be used as motion vector prediction terms, and the motion vector difference can be signaled. In this case, the motion vector of the current block can be derived using the sum of the motion vector prediction terms and the motion vector difference.
[0099] The video / image coding process based on inter-frame prediction can schematically include, for example, the following.
[0100] Figure 4 Examples of video / image coding methods based on inter-frame prediction are presented.
[0101] The encoding device performs inter-frame prediction on the current block (S400). The encoding device can derive the inter-frame prediction mode and motion information for the current block, and generate prediction samples for the current block. Here, the inter-frame prediction mode determination, motion information derivation, and prediction sample generation processes can be performed simultaneously or sequentially. For example, the inter-frame predictor of the encoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit can determine the prediction mode for the current block, the motion information derivation unit can derive the motion information for the current block, and the prediction sample derivation unit can derive prediction samples for the current block. For example, the inter-frame predictor of the encoding device can search for blocks similar to the current block in a certain region (search region) of the reference image through motion estimation, and derive reference blocks whose differences from the current block are minimal or less than or equal to a certain level. Based on this, a reference image index indicating the reference image where the reference block is located can be derived, and a motion vector can be derived based on the positional difference between the reference block and the current block. The encoding device can determine the mode to be applied to the current block from various prediction modes. The encoding device can compare the RD costs for various prediction modes and determine the best prediction mode for the current block.
[0102] For example, when applying a transition mode or a merge mode to the current block, the encoding device can configure a merge candidate list, which will be described later, and export the reference block among the reference blocks indicated by the merge candidates in the merge candidate list that has the smallest difference from the current block or is less than or equal to a certain level. In this case, a merge candidate associated with the exported reference block can be selected, and merge index information indicating the selected merge candidate can be generated and signaled to the decoding device. The motion information of the current block can be exported using the motion information of the selected merge candidate.
[0103] As another example, when applying the (A)MVP mode to the current block, the encoding device can configure an (A)MVP candidate list and use the motion vector of an MVP candidate selected from the MVP (motion vector prediction) candidates included in the (A)MVP candidate list as the MVP of the current block. In this case, for example, it indicates that the motion vector of the reference block derived through the above motion estimation can be used as the motion vector of the current block, and among the MVP candidates, the MVP candidate with the motion vector having the smallest difference from the motion vector of the current block can be selected as the MVP candidate. The MVD (motion vector difference) can be derived as the difference obtained by subtracting the MVP from the motion vector of the current block. In this case, information about the MVD can be signaled to the decoding device. Additionally, when applying the (A)MVP mode, the value of the reference image index can be configured as reference image index information and signaled to the decoding device respectively.
[0104] The encoding device can derive residual samples based on the predicted samples (S410). The encoding device can derive residual samples by comparing the original samples of the current block with the predicted samples.
[0105] The encoding device encodes image information including prediction information and residual information (S420). The encoding device can output the encoded image information in the form of a bitstream. The prediction information may include prediction mode information (e.g., transition flag, merge flag, mode index, etc.) and information about motion information as information about the prediction process. The information about motion information may include candidate selection information (e.g., merge index, MVP flag, or MVP index) as information for deriving motion vectors. In addition, the information about motion information may include information about the aforementioned MVD and / or reference image index information. Furthermore, the information about motion information may include information indicating whether L0 prediction, L1 prediction, or bidirectional prediction has been applied. The residual information is information about the residual samples. The residual information may include information about the quantized transform coefficients for the residual samples.
[0106] The output bitstream can be stored in (digital) storage media and transmitted to the decoding device, or it can be transmitted to the decoding device via a network.
[0107] Furthermore, as mentioned above, the encoding device can generate a reconstructed image (including reconstructed samples and reconstructed blocks) based on reference samples and residual samples. This is to derive the same prediction result in the encoding device as the prediction result performed in the decoding device, and because it can improve encoding efficiency. Therefore, the encoding device can store the reconstructed image (or reconstructed samples, reconstructed blocks) in memory and use it as a reference image for inter-frame prediction. In-loop filtering can also be applied to the reconstructed image as described above.
[0108] The video / image decoding process based on inter-frame prediction can schematically include, for example, the following.
[0109] Figure 5 This represents an example of a video / image decoding method based on inter-frame prediction.
[0110] Reference Figure 5 The decoding device can perform operations corresponding to those already performed in the encoding device. The decoding device can perform predictions on the current block and derive prediction samples based on the received prediction information.
[0111] Specifically, the decoding device can determine the prediction mode for the current block based on the received prediction information (S500). The decoding device can determine which inter-frame prediction mode to apply to the current block based on the prediction mode information in the prediction information.
[0112] For example, a merge flag can be used to determine whether to apply a merge mode to the current block or to determine an (A)MVP mode. Alternatively, an inter-frame prediction mode can be selected from a variety of inter-frame prediction mode candidates based on a mode index. Inter-frame prediction mode candidates may include jump modes, merge modes, and / or (A)MVP modes, or may include various inter-frame prediction modes described below.
[0113] The decoding device derives motion information for the current block based on the determined inter-frame prediction mode (S510). For example, when applying a jump mode or a merge mode to the current block, the decoding device can configure a merge candidate list (described later) and select one of the merge candidates included in the merge candidate list. The selection can be performed based on the selection information (merge index) described above. The motion information of the selected merge candidate can be used to derive motion information for the current block. The motion information of the selected merge candidate can be used as motion information for the current block.
[0114] As another example, when applying the (A)MVP mode to the current block, the decoding device can configure an (A)MVP candidate list, which will be described later, and use the motion vector prediction term (MVP) candidate selected from the MVP candidates included in the (A)MVP candidate list as the MVP of the current block. Selection can be performed based on the aforementioned selection information (MVP flag or MVP index). In this case, the MVD of the current block can be derived based on information about the MVD, and the motion vector of the current block can be derived based on the MVD and MVP of the current block. Additionally, the reference image index of the current block can be derived based on reference image index information. Images in the reference image list of the current block indicated by the reference image index can be exported as reference images for inter-frame prediction of the current block.
[0115] Furthermore, as described later, the motion information of the current block can be exported without configuring a candidate list, and in this case, the motion information of the current block can be exported according to the process disclosed in the prediction mode described later. In this case, the configuration of the candidate list as described above can be omitted.
[0116] The decoding device can generate prediction samples for the current block based on the motion information of the current block (S520). In this case, a reference image can be derived based on the reference image index of the current block, and prediction samples for the current block can be derived using samples of the reference block on the reference image indicated by the motion vector of the current block. In this case, a prediction sample filtering process for all or some of the prediction samples for the current block can be further performed, depending on the circumstances described later.
[0117] For example, the inter-frame predictor of the coding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. It can determine the prediction mode for the current block based on the prediction mode information received at the prediction mode determination unit, derive the motion information (motion vector and / or reference picture index and / or similar) of the current block based on the motion information received at the motion information derivation unit, and derive the prediction sample of the current block at the prediction sample derivation unit.
[0118] The decoding device generates residual samples for the current block based on the received residual information (S530). The decoding device can generate reconstruction samples for the current block based on the residual samples and the prediction samples, and can generate a reconstructed image based on the reconstruction samples (S540). In the following text, an in-loop filtering process can also be applied to the reconstructed image as described above.
[0119] Figure 6 The inter-frame prediction process is presented as an example.
[0120] Reference Figure 6 As described above, the inter-frame prediction process may include determining an inter-frame prediction mode, deriving motion information based on the determined prediction mode, and performing prediction (generating prediction samples) based on the derived motion information. The inter-frame prediction process may be performed in the encoding and decoding devices described above. In this document, the encoding device may include an encoding device and / or a decoding device.
[0121] Reference Figure 6 The decoding device determines the inter-frame prediction mode for the current block (S600). Various inter-frame prediction modes can be used to predict the current block in the image. For example, modes such as merge mode, jump mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, and merge with MVD mode can be used. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bidirectional prediction with CU-level weights (BCW), and bidirectional optical flow (BDOF) can be used as additional modes or as alternatives. The affine mode can be referred to as the affine motion prediction mode. The MVP mode can be referred to as the advanced motion vector prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived from some modes can be included as one of the candidates related to the motion information of another mode. For example, an HMVP candidate can be added as a merge candidate for a merge / jump mode, or as an MVP candidate for an MVP mode. When an HVMP candidate is used as a motion information candidate for a merge mode or jump mode, the HVMP candidate can be referred to as an HMVP merge candidate.
[0122] The encoding device can signal prediction mode information, indicating the inter-frame prediction mode of the current block, to the decoding device. This prediction mode information can be included in the bitstream and received at the decoding device. The prediction mode information may include index information indicating one of several candidate modes. Alternatively, the inter-frame prediction mode can be indicated by hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, it may indicate whether to apply a transition mode by signaling a transition flag, whether to apply a merge mode by signaling a merge flag for transition modes that have not been applied, and whether to apply the MVP mode when the merge mode is not applied, or it may also signal flags for further segmentation. Affine modes can be signaled as independent modes or as modes dependent on the merge mode, MVP mode, etc. For example, affine modes may include affine merge mode and affine MVP mode.
[0123] The encoding device exports motion information for the current block (S610). Motion information can be exported based on inter-frame prediction modes.
[0124] The encoding device can perform inter-frame prediction using motion information for the current block. The encoding device can derive optimal motion information for the current block through a motion estimation process. For example, the encoding device can use original blocks in the original image for the current block to search for highly relevant similar reference blocks within a predetermined search range in a reference image within fractional pixel units, and can derive motion information accordingly. Block similarity can be derived based on the difference between phase-based sample values. For example, block similarity can be calculated based on the SAD (Self-Average Difference) between the current block (or its template) and a reference block (or its template). In this case, motion information can be derived based on the reference block with the minimum SAD in the search region. The derived motion information can be signaled to the decoding device based on the inter-frame prediction mode using various methods.
[0125] The encoding device performs inter-frame prediction based on motion information for the current block (S620). The encoding device can derive prediction samples for the current block based on the motion information. The current block, including the prediction samples, can be referred to as the prediction block.
[0126] Furthermore, in the case of inter-frame prediction, inter-frame prediction methods that consider image distortion are being proposed. Specifically, an affine motion model is proposed that efficiently derives motion vectors for sample blocks or sub-blocks for the current block, and improves the accuracy of inter-frame prediction despite image distortions such as rotation, scaling, and reduction. That is, the affine motion model is a model that derives motion vectors for sample points or sub-blocks for the current block, and predictions using the affine motion model can be called affine motion prediction, affine motion prediction, sub-block unit motion prediction, or sub-block motion prediction.
[0127] For example, sub-block motion prediction using an affine motion model can efficiently represent the four motions subsequently described, i.e., the four deformations subsequently described.
[0128] Figure 7 The motion represented by an affine motion model is presented illustratively. (Refer to...) Figure 7 Motions that can be represented by affine motion models can include translational motion, scaling motion, rotational motion, and shearing motion. That is, as... Figure 7 As shown, the motion prediction of sub-block units can efficiently represent translational motion of an image (or a portion thereof) moving on a plane over time, scaling motion of an image (or a portion thereof) scaling over time, rotational motion of an image (or a portion thereof) rotating over time, and shearing motion of an image (or a portion thereof) deforming into a parallelogram over time.
[0129] Encoding / decoding devices can predict the distortion shape of an image by using affine inter-frame prediction based on motion vectors at control points (CP) of the current block. This can improve prediction accuracy and thus enhance image compression performance. Furthermore, by using motion vectors from neighboring blocks, motion vectors for at least one control point of the current block can be derived, thereby reducing the amount of additional information required and significantly improving inter-frame prediction efficiency.
[0130] As an example of affine motion prediction, motion information at three control points (i.e., three reference points) may be required.
[0131] Figure 8 An affine motion model using motion vectors for three control points is presented as an example.
[0132] If the top left sample position in the current block 800 is as follows Figure 8If the value is set to (0,0), then the sample locations (0,0), (w,0), and (0,h) can be determined as control points. In the following text, the control point at the sample location (0,0) can be represented as CP0; the control point at the sample location (w,0) can be represented as CP1; and the control point at the sample location (0,h) can be represented as CP2.
[0133] By using each of the aforementioned control points and the motion vector for the corresponding control point, an equation for the affine motion model can be derived. This equation for the affine motion model can be expressed as follows:
[0134] [Formula 1]
[0135]
[0136] Where w represents the width of the current block 800; h represents the height of the current block 800; v0x and v 0y Let v1x and v2x represent the x and y components of the motion vector of CP0, respectively; 1y Let v2x and v be the x and y components of the motion vector of CP1, respectively; and v2x and v 2y Let x and y represent the x and y components of the motion vector of CP2, respectively. Additionally, 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; vx represents the x-component of the motion vector of the target sample in the current block 800; and vy represents the y-component of the motion vector of the target sample in the current block 800.
[0137] Since the motion vectors of CP0, CP1, and CP2 are known, the motion vector based on the sample position in the current block can be derived based on Equation 1. That is, according to the affine motion model, the motion vector v0(v0x,v...) at the control point can be scaled based on the ratio of the target sample's coordinates (x,y) to the distances between the three control points. 0y v1(v1x,v) 1y v2(v2x,v) 2y This allows the motion vectors of target samples to be derived based on their positions. In other words, based on the affine motion model, the motion vectors of each sample in the current block can be derived from the motion vectors of the control points. Furthermore, the set of motion vectors of the samples in the current block derived from the affine motion model can be represented as an affine motion vector field (MVF).
[0138] Furthermore, the six parameters in Equation 1 above can be expressed as a, b, c, d, e, and f in the following equation, and the equation for the affine motion model expressed using these six parameters can be as follows:
[0139] [Equation 2]
[0140] C = v 0x
[0141] f = v 0y
[0142]
[0143] Where w represents the width of the current block 800; h represents the height of the current block 800; v0x and v 0y Let v1x and v2x represent the x and y components of the motion vector of CP0, respectively; 1y Let v2x and v represent the x and y components of the motion vector of CP0, respectively; 2y Let x and y represent the x and y components of the motion vector of CP1, respectively. Additionally, 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; vx represents the x-component of the motion vector of the target sample in the current block 800; and v y This represents the y-component of the motion vector of the target sample in the current block 800.
[0144] A affine motion model or affine inter-frame prediction using six parameters can be represented as a 6-parameter affine motion model or AF6.
[0145] Additionally, as an example of affine motion prediction, motion information at two control points (i.e., two reference points) may be required.
[0146] Figure 9 An affine unit motion model using motion vectors for two control points is presented illustratively. An affine motion model using two control points can represent three motions: translation, scaling, and rotation. An affine motion model representing these three motions can be represented as a similarity affine motion model or a simplified affine motion model.
[0147] If the top left sample position in the current block 900 is as follows Figure 9 If the setting shown is (0,0), then the sample positions (0,0) and (w,0) can be determined as control points. In the following text, the control point at the sample position (0,0) can be denoted as CP0; and the control point at the sample position (w,0) can be denoted as CP0.
[0148] By using each of the aforementioned control points and the motion vector for the corresponding control point, an equation for the affine motion model can be derived. This equation for the affine motion model can be expressed as follows:
[0149] [Formula 3]
[0150]
[0151] Where w represents the width of the current block 800; v0x and v 0y Let v1x and v2x represent the x and y components of the motion vector of CP0, respectively; 1y Let x and y represent the x and y components of the motion vector of CP0, respectively. Additionally, 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; vx represents the x-component of the motion vector of the target sample in the current block 900; and v y This represents the y-component of the motion vector of the target sample in the current block 900.
[0152] Furthermore, the four parameters in Equation 3 above can be expressed as a, b, c, and d in the following equation, and the equation for the affine motion model expressed using these four parameters can be as follows:
[0153] [Formula 4]
[0154] c = v 0x d = v 0y
[0155]
[0156] Where w represents the width of the current block 900; v0x and v 0y Let v1x and v2x represent the x and y components of the motion vector of CP0, respectively; 1y Let x and y represent the x and y components of the motion vector of CP0, respectively. Additionally, 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; vx represents the x-component of the motion vector of the target sample in the current block 900; and v y This represents the y-component of the motion vector of the target sample in the current block 900. Since the affine motion model using two control points can be represented by four parameters a, b, c, and d as in Equation 4, the affine motion model or affine motion prediction using these four parameters can be represented as a 4-parameter affine motion model or AF4. That is, based on the affine motion model, the motion vector of each sample in the current block can be derived from the motion vectors of the control points. Furthermore, the set of motion vectors of the samples in the current block derived from the affine motion model can be represented as an affine motion vector field (MVF).
[0157] Furthermore, as mentioned above, the motion vectors of sample units can be derived using an affine motion model, which can significantly improve the accuracy of inter-frame prediction. However, in this case, the complexity of motion compensation processing increases dramatically.
[0158] Therefore, it may be limited to deriving the motion vectors of sub-block units in the current block rather than the motion vectors of sample units.
[0159] Figure 10 An illustrative method for deriving motion vectors from sub-blocks based on an affine motion model is presented. Figure 10 The example illustrates a scenario where the current block is 16×16 and motion vectors are derived from 4×4 sub-blocks. Sub-blocks can be set to various sizes; for example, if sub-blocks are set to an n×n size (n is a positive integer, e.g., n is 4), motion vectors can be derived from the current block using n×n sub-blocks based on an affine motion model, and various methods for deriving motion vectors representing each sub-block can be applied.
[0160] For example, refer to Figure 10 The motion vector for each sub-block can be derived by setting the center or lower-right center sample position as the representative coordinate. Here, the lower-right center position can represent the lower-right sample position among the four samples located at the center of the sub-block. For example, if n is odd, a sample can be located at the center of the sub-block, and in this case, the center sample position can be used to derive the motion vector of the sub-block. However, if n is even, four samples can be located near the center of the sub-block, and in this case, the lower-right sample position can be used to derive the motion vector. For example, refer to... Figure 10 The representative coordinates of each sub-block can be derived as (2, 2), (6, 2), (10, 2), ..., (14, 14), and the encoding / decoding device can derive the motion vector of each sub-block by inputting the representative coordinates of each sub-block into Equations 1 to 3. Predicting the motion of sub-blocks in the current block using an affine motion model can be called sub-block unit motion prediction or sub-block motion prediction, and this motion vector of the sub-block can be represented as MVF.
[0161] Furthermore, as an example, the size of the sub-blocks in the current block can be derived based on the following formula:
[0162] [Formula 5]
[0163]
[0164] Where M represents the width of the sub-block; N represents the height of the sub-block. Additionally, v 0x and v 0y These represent the x and y components of CPMV0 in the current block, respectively; v 1x and v 1yThese represent the x and y components of the current block's CPMV1, respectively; w represents the width of the current block; h represents the height of the current block; and MvPre represents the motion vector fraction precision. For example, the motion vector fraction precision can be set to 1 / 16.
[0165] Furthermore, in inter-frame prediction (i.e., affine motion prediction) using the aforementioned affine motion model, there can be a merging mode (AF_MERGE) and an affine inter-frame mode (AF_INTER). Here, the affine inter-frame mode can be represented as an affine motion vector prediction mode (affine MVP mode, AF_MVP).
[0166] The merging mode using an affine motion model is similar to existing merging modes in that it does not send the MVD (Motion Vector Difference) for the motion vectors of the control points. That is, like existing jump / merge modes, the merging mode using an affine motion model can represent an encoding / decoding method that performs prediction by deriving the CPMV (Concurrent Positive Motion Vector Difference) for each of two or three control points using the neighboring blocks of the current block without decoding the MVD.
[0167] For example, if the AF_MRG mode is applied to the current block, the MVs (e.g., CPMV0 and CPMV1) for CP0 can be derived from neighboring blocks of the current block that have applied a prediction mode using affine mode (i.e., affine motion prediction). That is, CPMV0 and CPMV1 of neighboring blocks that have applied affine mode are derived as merge candidates, and merge candidates can be derived as CPMV0 and CPMV1 for the current block.
[0168] Affine inter-frame mode can represent the following inter-frame prediction: Affine MVF-based prediction is performed by deriving an MVP (Motion Vector Prediction Term) for the motion vectors of control points, deriving the motion vectors of control points based on the MVP and the received MVP, and deriving the affine MVF for the current block based on the motion vectors of the control points. Here, the motion vectors of control points can be represented as Control Point Motion Vectors (CPMV); the MVP of control points can be represented as Control Point Motion Vector Prediction Term (CPMVP); and the MVD of control points can be represented as Control Point Motion Vector Difference (CPMVD). Specifically, for example, the encoding device can derive Control Point Motion Vector Prediction Term (CPMVP) and Control Point Motion Vector (CPMV) for each of CP0 and CP1 (or CP0, CP1, and CP2), and can send or store information about CPMVP and / or CPMVD as the difference between CPMVP and CPMV.
[0169] Here, if an affine inter-frame mode is applied to the current block, the encoding / decoding device can construct an affine MVP candidate list based on the neighboring blocks of the current block, and the affine MVP candidates can be called CPMVP pair candidates, and the affine MVP candidate list can be called the CPMVP candidate list.
[0170] Furthermore, each affine MVP candidate can refer to a combination of CP0 and CP1 CPMVPs in a four-parameter affine motion model (four-parameter affine motion model), and can refer to a combination of CP0, CP1 and CP2 CPMVPs in a six-parameter affine motion model.
[0171] Furthermore, in addition to affine inter-frame prediction, the configuration of the affine MVP candidate list considers inherited affine candidates or inherited candidates and constructed affine candidates. Inherited candidates can refer to candidates whose motion information (i.e., the CPMV of the neighboring blocks themselves) without other modifications or combinations is added to the motion candidate list of the current block. Here, neighboring blocks can include the lower-left neighboring block A0, left neighboring block A1, upper neighboring block B0, upper-right neighboring block B1, and upper-left neighboring block B2 of the current block. Constructed affine candidates refer to affine candidates for configuring the CPMV of the current block through combinations of the CPMWs of at least two neighboring blocks. The driving force of the constructed affine candidates will be described in detail below.
[0172] Here, the affine candidates for inheritance can be as follows.
[0173] For example, when the neighboring blocks of the current block are affine blocks and the reference image of the current block is the same as that of the neighboring blocks, the affine MVP pair of the current block can be determined using the affine motion model of the neighboring blocks. Here, an affine block can represent a block to which affine inter-frame prediction is applied. Inherited affine candidates can represent CPMVPs (e.g., affine MVP pairs) derived based on the affine motion model of the neighboring blocks.
[0174] Specifically, for example, affine candidates for inheritance can be derived as described below.
[0175] Figure 11 The neighboring blocks used to derive affine candidates for inheritance are presented as an example.
[0176] Reference Figure 11 The neighboring blocks of the current block can include the left neighboring block A0, the lower left neighboring block A1, the upper neighboring block B0, the upper right neighboring block B1, and the upper left neighboring block B2.
[0177] 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 its y-component is 0, then the left neighboring block can be the block that includes the sample at coordinates (-1, H-1); the top neighboring block can be the block that includes the sample at coordinates (W-1, -1); the top-right neighboring block can be the block that includes the sample at coordinates (W, -1); the bottom-left neighboring block can be the block that includes the sample at coordinates (-1, H); and the top-left neighboring block can be the block that includes the sample at coordinates (-1, -1).
[0178] The encoding / decoding device can sequentially examine neighboring blocks A0, A1, B0, B1, and B2. If neighboring blocks have been encoded using an affine motion model, and the reference image of the current block is the same as that of the neighboring blocks, the encoding / decoding device can derive two or three CPMVs for the current block based on the affine motion models of the neighboring blocks. The CPMVs can be derived as affine MVP candidates for the current block. Affine MVP candidates can represent inherited affine candidates.
[0179] As an example, up to two affine candidates for inheritance can be derived based on neighboring blocks.
[0180] For example, the encoding / decoding device can derive the first affine MVP candidate for the current block based on the first block among its neighbors. Here, the first block can be encoded using an affine motion model, and the reference image of the first block can be the same as the reference image of the current block. That is, the first block can be the first block identified as satisfying a condition while checking neighboring blocks in a specific order. This condition can be that the block is encoded using an affine motion model and the reference image of the block is the same as the reference image of the current block.
[0181] In the following text, the encoding / decoding device can derive a second affine MVP candidate for the current block based on the second block among its neighboring blocks. Here, the second block can be encoded using an affine motion model, and the reference image of the second block can be the same as the reference image of the current block. That is, the second block can be the second block confirmed to meet a condition while checking neighboring blocks in a specific order. This condition can be that the block is encoded using an affine motion model and that the reference image of the block is the same as the reference image of the current block.
[0182] Furthermore, for example, when the number of available affine candidates for inheritance is less than 2 (i.e., the number of derived affine candidates for inheritance is less than 2), the constructed affine candidates can be considered. The configured affine candidates can be derived as follows.
[0183] Figure 12 Spatial candidates for the constructed affine candidates are presented illustratively.
[0184] like Figure 12As shown, the motion vectors of the current block's neighboring blocks can be divided into three groups. (Refer to...) Figure 12 Neighboring blocks can include neighboring block A, neighboring block B, neighboring block C, neighboring block D, neighboring block E, neighboring block F, and neighboring block G.
[0185] Neighbor block A can represent the neighboring block located at the top-left of the top-left sample position of the current block; neighboring block B can represent the neighboring block located above the top-left sample position of the current block; and neighboring block C can represent the neighboring block located to the left of the top-left sample position of the current block. Additionally, neighboring block D can represent the neighboring block located above the top-right sample position of the current block; and neighboring block E can represent the neighboring block located to the top-right of the top-right sample position of the current block. Furthermore, neighboring block F can represent the neighboring block located to the left of the bottom-left sample position of the current block; and neighboring block G can represent the neighboring block located to the bottom-left of the bottom-left sample position of the current block.
[0186] For example, these three groups can include S0, S1, and S2, and S0, S1, and S2 can be derived from the following table.
[0187] [Table 1]
[0188]
[0189] Among them, mv A This represents the motion vector of neighboring block A; mv B This represents the motion vector of neighboring block B; mv C This represents the motion vector of the neighboring block C; mv D This represents the motion vector of the neighboring block D; mv E mv represents the motion vector of the neighboring block E; F Let mv represent the motion vector of the neighboring block F; and mv G Let S0 represent the motion vector of the neighboring block G. S0 can be represented as the first group; S1 can be represented as the second group; and S2 can be represented as the third group.
[0190] The encoding / decoding device can derive mv0 using S0, mv1 using S1, and mv2 using S2, and can also derive affine MVP candidates including mv0, mv1, and mv2. An affine MVP candidate can represent the constructed affine candidate. Furthermore, mv0 can be a CPMVP candidate for CP0; mv1 can be a CPMVP candidate for CP1; and mv2 can be a CPMVP candidate for CP2.
[0191] Here, the reference image for mv0 can be the same as the reference image for the current block. That is, mv0 can be the first motion vector identified as satisfying a condition while checking motion vectors in S0 in a specific order. This condition can be that the reference image for the motion vector should be the same as the reference image for the current block. This specific order can be the following: neighboring block A in S0 → neighboring block B → neighboring block C. Alternatively, it can be executed in a different order than the above, and is not limited to the above example.
[0192] Furthermore, the reference image for mv1 can be the same as the reference image for the current block. That is, mv1 can be the first motion vector identified as satisfying a condition while checking motion vectors in S1 in a specific order. This condition can be that the reference image for the motion vector should be the same as the reference image for the current block. This specific order can be the following: neighboring block D in S1 → neighboring block E. Alternatively, it can be executed in a different order than the above, and is not limited to the example above.
[0193] Furthermore, the reference image for mv2 can be the same as the reference image for the current block. That is, mv2 can be the first motion vector identified as satisfying a condition while checking motion vectors in S2 in a specific order. This condition can be that the reference image for the motion vector should be the same as the reference image for the current block. This specific order can be the following: neighboring block F in S2 → neighboring block G. Alternatively, it can be executed in any order other than the above, and is not limited to the example above.
[0194] In addition, when only mv0 and mv1 are available, that is, when only mv0 and mv1 are exported, mv2 can be exported using the following formula.
[0195] [Formula 6]
[0196]
[0197] Among them, mv2 x Represents the x-component of mv2; mv2 y Represents the y-component of mv2; mv0 x Represents the x-component of mv0; mv0 y Represents the y-component of mv0; mv1 x Represents the x-component of mv1; mv1 y This represents the y-component of mv1. Additionally, w represents the width of the current block, and h represents the height of the current block.
[0198] In addition, when only mv0 and mv2 are exported, mv1 can be exported using the following formula.
[0199] [Formula 7]
[0200]
[0201] Among them, mv1 x Represents the x-component of mv1; mv1 y Represents the y-component of mv1; mv0 x Represents the x-component of mv0; mv0 y Represents the y-component of mv0; mv2 x Represents the x-component of mv2; mv2 y This represents the y-component of mv2. Additionally, w represents the width of the current block, and h represents the height of the current block.
[0202] Additionally, when the number of available inherited affine candidates and / or the number of constructed affine candidates is less than two, AMVP processing applying the regular HEVC standard can be configured in the affine MVP list. That is, when the number of available inherited affine candidates and / or the number of constructed affine candidates is less than two, the processing of configuring MVP candidates in the regular HEVC standard can be performed.
[0203] Furthermore, a flowchart illustrating the configuration of the above affine MVP list is described below.
[0204] Figure 13 An example of configuring an affine MVP list is presented.
[0205] Reference Figure 13 The encoding / decoding device can add the inherited candidate to the affine MVP list of the current block (S1300). The inherited candidate can represent the affine candidate of the above inheritance.
[0206] Specifically, the encoding / decoding device can derive up to two inherited affine candidates from the neighboring blocks of the current block (S1305). Here, the neighboring blocks can include the left neighboring block A0, the lower left neighboring block A1, the upper neighboring block B0, the upper right neighboring block B1, and the upper left neighboring block B2 of the current block.
[0207] For example, the encoding / decoding device can derive the first affine MVP candidate for the current block based on the first block among its neighbors. Here, the first block can be encoded using an affine motion model, and the reference image of the first block can be the same as the reference image of the current block. That is, the first block can be the first block identified as satisfying a condition while checking neighboring blocks in a specific order. This condition can be that the block is encoded using an affine motion model and the reference image of the block is the same as the reference image of the current block.
[0208] In the following text, the encoding / decoding device can derive a second affine MVP candidate for the current block based on the second block among its neighboring blocks. Here, the second block can be encoded using an affine motion model, and the reference image of the second block can be the same as the reference image of the current block. That is, the second block can be the second block confirmed to meet a condition while checking neighboring blocks in a specific order. This condition can be that the block is encoded using an affine motion model and that the reference image of the block is the same as the reference image of the current block.
[0209] Furthermore, a specific order can be as follows: left neighboring block A0 → bottom left neighboring block A1 → top neighboring block B0 → top right neighboring block B1 → top left neighboring block B2. Additionally, execution can proceed in orders other than those listed above, and is not limited to the examples above.
[0210] The encoding / decoding device can add the constructed candidate to the affine MVP list of the current block (S1310). The constructed candidate can represent the affine candidate constructed above. The constructed candidate can be represented as the constructed affine MVP candidate. When the number of available inherited candidates is less than 2, the encoding / decoding device can add the constructed candidate to the affine MVP list of the current block. For example, the encoding / decoding device can derive a constructed affine candidate.
[0211] Furthermore, the method for deriving the constructed affine candidates can 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 specific details of the method for deriving the constructed candidates will be described later.
[0212] The encoding / decoding device can add HEVC AMVP candidates to the affine MVP list of the current block (S1320). When the number of available inherited candidates and / or constructed candidates is less than two, the encoding / decoding device can add HEVC AMVP candidates to the affine MVP list of the current block. That is, when the number of available inherited candidates and / or constructed candidates is less than two, the encoding / decoding device can perform the MVP candidate configuration process as in the regular HEVC standard.
[0213] Furthermore, the constructed candidate methods can be derived as follows.
[0214] For example, when the affine motion model applied to the current block is a 6-affine motion model, it can be like this: Figure 14 The example shown is used to derive the constructed candidate.
[0215] Figure 14 This indicates an example of the constructed candidate.
[0216] Reference Figure 14The encoding / decoding device can examine mv0, mv1, and mv2 of the current block (S1400). That is, the encoding / decoding device can determine whether there are available mv0, mv1, or mv2 in the neighboring blocks of the current block. Here, mv0 can be a CPMVP candidate for CP0 of the current block; mv1 can be a CPMVP candidate for CP1; and mv2 can be a CPMVP candidate for CP2. In addition, mv0, mv1, and mv2 can be represented as candidate motion vectors of CP.
[0217] For example, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the first group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv0 from the motion vector of the first neighboring block identified as satisfying the condition during the checking process. That is, mv0 can be the first motion vector identified as satisfying the specific condition while checking the motion vectors in the first group in a specific order. When the motion vectors of neighboring blocks in the first group do not satisfy the specific condition, there may be no available mv0. Here, for example, the specific order could be from neighboring block A to neighboring block B and then to neighboring block C in the first group. Alternatively, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image for the current block.
[0218] Additionally, for example, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the second group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv1 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv1 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the second group in a specific order. When the motion vectors of neighboring blocks in the second group do not satisfy the specific condition, there may be no available mv1. Here, for example, the specific order could be from neighboring block D to neighboring block E in the second group. Furthermore, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image of the current block.
[0219] Additionally, for example, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the third group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv2 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv2 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the third group in a specific order. When the motion vectors of neighboring blocks in the third group do not satisfy the specific condition, there may be no available mv2. Here, for example, the specific order can be from neighboring block F to neighboring block G in the third group. Furthermore, for example, the specific condition can be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image of the current block.
[0220] Furthermore, the first group may include the motion vectors of neighboring block A, neighboring block B, and neighboring block C; the second group may include the motion vectors of neighboring block D and neighboring block E; and the third group may include the motion vectors of neighboring block F and neighboring block G. Neighboring block A may represent the neighboring block located at the upper left of the upper left sample position of the current block; neighboring block B may represent the neighboring block located above the upper left sample position of the current block; neighboring block C may represent the neighboring block located to the left of the upper left sample position of the current block; neighboring block D may represent the neighboring block located above the upper right sample position of the current block; neighboring block E may represent the neighboring block located to the upper right of the upper right sample position of the current block; neighboring block F may represent the neighboring block located to the left of the lower left sample position of the current block; and neighboring block G may represent the neighboring block located to the lower left of the lower left sample position of the current block.
[0221] When mv0 and mv1 are available only for the current block, that is, when only mv0 and mv1 for the current block are exported, the encoding / decoding device can export mv2 for the current block based on Equation 6 above (S1410). The encoding / decoding device can export mv2 by substituting the exported mv0 and mv1 into Equation 6 above.
[0222] When mv0 and mv2 are available only for the current block, that is, when only mv0 and mv2 for the current block are exported, the encoding / decoding device can export mv1 for the current block based on Equation 7 above (S1420). The encoding / decoding device can export mv1 by substituting the exported mv0 and mv2 into Equation 7 above.
[0223] The encoding / decoding device can export the derived mv0, mv1, and mv2 as candidates for the construction of the current block (S1430). When mv0, mv1, and mv2 are available, that is, when mv0, mv1, and mv2 are derived based on the neighboring blocks of the current block, the encoding / decoding device can export the derived mv0, mv1, and mv2 as candidates for the construction of the current block.
[0224] Additionally, when mv0 and mv1 are available only for the current block, i.e., when mv0 and mv1 are only exported for the current block, the encoding / decoding device can export mv0, mv1, and mv2 derived based on Equation 6 above as constructed candidates for the current block.
[0225] Additionally, when mv0 and mv2 are available only for the current block, i.e., when mv0 and mv2 are only exported for the current block, the encoding / decoding device can export the exported mv0, mv2 and mv1 based on Equation 7 above as constructed candidates for the current block.
[0226] Additionally, for example, when the affine motion model applied to the current block is a 4-affine motion model, it can be as follows: Figure 15 The example shown is used to derive the constructed candidate.
[0227] Figure 15 An example of deriving the constructed candidate is presented.
[0228] Reference Figure 15 The encoding / decoding device can examine mv0, mv1, and mv2 of the current block (S1500). That is, the encoding / decoding device can determine whether there is a usable mv0, mv1, or mv2 in the neighboring blocks of the current block. Here, mv0 can be a CPMVP candidate for CP0 of the current block; mv1 can be a CPMVP candidate for CP1; and mv2 can be a CPMVP candidate for CP2.
[0229] For example, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the first group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv0 from the motion vector of the first neighboring block identified as satisfying the condition during the checking process. That is, mv0 can be the first motion vector identified as satisfying the specific condition while checking the motion vectors in the first group in a specific order. When the motion vectors of neighboring blocks in the first group do not satisfy the specific condition, there may be no available mv0. Here, for example, the specific order could be from neighboring block A to neighboring block B and then to neighboring block C in the first group. Alternatively, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image for the current block.
[0230] Additionally, for example, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the second group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv1 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv1 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the second group in a specific order. When the motion vectors of neighboring blocks in the second group do not satisfy the specific condition, there may be no available mv1. Here, for example, the specific order could be from neighboring block D to neighboring block E in the second group. Furthermore, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image of the current block.
[0231] Additionally, for example, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the third group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv2 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv2 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the third group in a specific order. When the motion vectors of neighboring blocks in the third group do not satisfy the specific condition, there may be no available mv2. Here, for example, the specific order can be from neighboring block F to neighboring block G in the third group. Furthermore, for example, the specific condition can be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image of the current block.
[0232] Furthermore, the first group may include the motion vectors of neighboring block A, neighboring block B, and neighboring block C; the second group may include the motion vectors of neighboring block D and neighboring block E; and the third group may include the motion vectors of neighboring block F and neighboring block G. Neighboring block A may represent the neighboring block located at the upper left of the upper left sample position of the current block; neighboring block B may represent the neighboring block located above the upper left sample position of the current block; neighboring block C may represent the neighboring block located to the left of the upper left sample position of the current block; neighboring block D may represent the neighboring block located above the upper right sample position of the current block; neighboring block E may represent the neighboring block located to the upper right of the upper right sample position of the current block; neighboring block F may represent the neighboring block located to the left of the lower left sample position of the current block; and neighboring block G may represent the neighboring block located to the lower left of the lower left sample position of the current block.
[0233] When mv0 and mv1 are available only for the current block, or when mv0, mv1 and mv2 are available for the current block, that is, when mv0 and mv1 are exported only for the current block, or when mv0, mv1 and mv2 are exported for the current block, the encoding device / decoding device may use the exported mv0 and mv1 as candidates for the construction of the current block (S1510).
[0234] Furthermore, when mv0 and mv2 are available only for the current block, i.e., when only mv0 and mv2 for the current block are exported, the encoding / decoding device can export mv1 for the current block based on Equation 7 above (S1520). The encoding / decoding device can export mv1 by substituting the exported mv0 and mv2 into Equation 7 above.
[0235] After this, the encoding / decoding device can export the exported mv0 and mv1 as constructed candidates for the current block (S1510).
[0236] Furthermore, this document presents another example of affine candidates for derived inheritance. The proposed example can improve coding performance by reducing the computational complexity when deriving affine candidates for derived inheritance.
[0237] Furthermore, this document presents another example of affine candidates for derived inheritance. The proposed example can improve coding performance by reducing the computational complexity when deriving affine candidates for derived inheritance.
[0238] Figure 16 The neighboring block locations of the inherited affine candidates are presented as an example.
[0239] The encoding / decoding device can derive up to two inherited affine candidates from the neighboring blocks of the current block. Figure 16 Neighboring blocks can represent inherited affine candidates. For example, neighboring blocks can include... Figure 16 Neighboring block A and neighboring block B are shown in the figure. Neighboring block A may represent the aforementioned left neighboring block A0, and neighboring block B may represent the aforementioned upper neighboring block B0.
[0240] For example, the encoding / decoding device can check whether neighboring blocks are available in a specific order and derive the affine candidate for inheritance of the current block based on the first neighboring block confirmed as available. That is, the encoding / decoding device can check whether neighboring blocks satisfy a specific condition in a specific order and derive the affine candidate for inheritance of the current block based on the first neighboring block confirmed as available. Additionally, the encoding / decoding device can derive the affine candidate for inheritance of the current block based on the second neighboring block confirmed as satisfying the specific condition. That is, the encoding / decoding device can derive the affine candidate for inheritance of the current block based on the second neighboring block confirmed as satisfying the specific condition. Here, "available" can mean that the block is encoded using an affine motion model and the reference image of the block is the same as the reference image of the current block. That is, the specific condition can mean that the block is encoded using an affine motion model and the reference image of the block is the same as the reference image of the current block. Furthermore, for example, the specific order can be: neighboring block A → neighboring block B. Moreover, pruning checks between the two inherited affine candidates (i.e., the derived inherited affine candidates) can be omitted. The pruning check process can be represented as follows: check if the candidates are the same as each other, and if they are the same, remove the candidates derived in the subsequent order.
[0241] The example above proposes the following method: deriving the affine candidates for inheritance by examining only two neighboring blocks (i.e., neighboring block A and neighboring block B), instead of examining all regular neighboring blocks (i.e., neighboring block A, neighboring block B, neighboring block C, neighboring block D, and neighboring block E). Here, neighboring block C can represent the top-right neighboring block B1 mentioned above; neighboring block D can represent the bottom-left neighboring block A1 mentioned above; and neighboring block E can represent the top-left neighboring block B2 mentioned above.
[0242] To analyze the spatial correlation between neighboring blocks and the current block based on affine inter-frame prediction, we can refer to the probability of applying affine prediction to the current block when applying affine prediction to the corresponding neighboring block. The probability of applying affine prediction to the current block when applying affine prediction to the corresponding neighboring block can be derived as shown in the table below.
[0243] [Table 2]
[0244] Reference block A B C D E probability 65% 41% 5% 3% 1%
[0245] Referring to Table 2, it can be confirmed that neighboring blocks A and B among the neighboring blocks have high spatial correlation with the current block. Therefore, by deriving examples of inherited affine candidates using only neighboring blocks A and B with high spatial correlation, it is possible to achieve the beneficial effects of reducing processing time and providing high decoding performance.
[0246] Furthermore, pruning checks can be performed to prevent duplicate candidates from existing in the candidate list. While pruning checks can remove redundancy and may offer advantages in coding efficiency, they also increase computational complexity. Specifically, the computational complexity is very high because pruning checks must be performed on affine types (e.g., whether the affine motion model is a 4-affine or 6-affine motion model), reference images (or reference image indices), and CP0, CP1, and CP2 of the MV. Therefore, this example proposes a method that does not perform pruning checks between inherited affine candidates derived from neighboring block A (e.g., inherited_A) and inherited affine candidates derived from neighboring block B (e.g., inherited_B). Neighboring block A and neighboring block B are far apart, resulting in low spatial correlation. Therefore, the probability that inherited_A and inherited_B are identical is very low. Thus, it is preferable not to perform pruning checks between inherited affine candidates.
[0247] Alternatively, a method for performing minimal pruning check processing can be proposed based on the above. For example, the encoding / decoding device can perform pruning check processing by comparing the MV of the inherited affine candidate CP0.
[0248] In addition, this document presents another example of affine candidates for derived inheritance.
[0249] Figure 17 The neighboring block locations of the inherited affine candidates are presented as an example.
[0250] The encoding / decoding device can derive up to two inherited affine candidates from the neighboring blocks of the current block. Figure 17 This can represent neighboring blocks for affine candidates of inheritance. For example, neighboring blocks can include... Figure 17 The neighboring blocks A to D are shown in the diagram. Neighboring block A can represent the aforementioned left neighboring block A0; neighboring block B can represent the aforementioned upper neighboring block B0; neighboring block C can represent the aforementioned upper right neighboring block B1; and neighboring block D can represent the aforementioned lower left neighboring block A1.
[0251] For example, the encoding / decoding device can check whether neighboring blocks are available in a specific order, and derive affine candidates for the current block's inheritance based on the first neighboring block confirmed as available. That is, the encoding / decoding device can check whether neighboring blocks satisfy a specific condition in a specific order, and derive affine candidates for the current block's inheritance based on the first neighboring block confirmed as available. Additionally, the encoding / decoding device can derive affine candidates for the current block's inheritance based on the second neighboring block confirmed as satisfying the specific condition. That is, the encoding / decoding device can derive affine candidates for the current block's inheritance based on the second neighboring block confirmed as satisfying the specific condition. Here, "available" can mean that the block is encoded using an affine motion model and the block's reference image is the same as the current block's reference image. That is, the specific condition can mean that the block is encoded using an affine motion model and the block's reference image is the same as the current block's reference image.
[0252] When deriving the left predictor from the inherited affine candidate, you can use Figure 17 Neighboring blocks A and D can be used to derive the prediction term from the inherited affine candidate, while neighboring blocks B and C can be used.
[0253] A left prediction term, which can be added as a motion candidate from the left neighboring block, can be added to the candidates that inherit from the first determined "nearest valid block" in the order of block A→block D or block D→block A. An upper prediction term, which can be added as a motion candidate from the upper neighboring block, can be added to the candidates that inherit from the first determined "nearest valid block" in the order of block B→block C or block C→block B. That is, the maximum number of inherited candidates derived from each of the left and upper prediction terms is 1.
[0254] When encoding "nearby valid blocks" using a 4-parameter affine motion model, the 4-parameter affine motion model can be used to determine inheritance candidates; and when encoding "nearby valid blocks" using a 6-parameter affine motion model, the 6-parameter affine motion model can be used to determine inheritance candidates.
[0255] When the number of inherited candidates determined by the left and upper predictors is 2, pruning checks can be performed or not. While pruning checks are typically performed to prevent duplicate candidates from being added to the candidate list, they increase complexity because the MV of each CP should be compared in motion predictions using an affine model. However, when using a reference... Figure 17 When configuring inheritance candidates using the described example, the probability that the candidates determined by the left and right predictors are different from each other is very high because the candidates are far apart. Therefore, the advantage is that coding performance is rarely degraded even without performing pruning checks.
[0256] In addition, this document presents yet another example of deriving affine candidates for inheritance.
[0257] Figure 18 The positions of affine candidates for deriving inheritance are presented illustratively.
[0258] The encoding / decoding device can derive up to two inherited affine candidates from the neighboring blocks of the current block. Figure 18 This can represent neighboring blocks for an affine candidate based on an example. For example, neighboring blocks can include... Figure 18 The neighboring blocks A to E are shown in the figure. Neighboring block A can represent the aforementioned left neighboring block A0; neighboring block B can represent the aforementioned upper neighboring block B0; neighboring block C can represent the aforementioned upper right neighboring block B1; neighboring block D can represent the aforementioned lower left neighboring block A1; and neighboring block E can represent the left neighboring block that is set adjacent to the bottom of the upper left neighboring block B2.
[0259] For example, the encoding / decoding device can check whether neighboring blocks are available in a specific order, and derive affine candidates for the current block's inheritance based on the first neighboring block confirmed as available. That is, the encoding / decoding device can check whether neighboring blocks satisfy a specific condition in a specific order, and derive affine candidates for the current block's inheritance based on the first neighboring block confirmed as available. Additionally, the encoding / decoding device can derive affine candidates for the current block's inheritance based on the second neighboring block confirmed as satisfying the specific condition. That is, the encoding / decoding device can derive affine candidates for the current block's inheritance based on the second neighboring block confirmed as satisfying the specific condition. Here, "available" can mean that the block is encoded using an affine motion model and the block's reference image is the same as the current block's reference image. That is, the specific condition can mean that the block is encoded using an affine motion model and the block's reference image is the same as the current block's reference image.
[0260] When deriving the left predictor from the inherited affine candidate, you can use Figure 18 The neighboring blocks A, D, and E are used, while when deriving the upper prediction term from the inherited affine candidate, neighboring blocks B and C can be used.
[0261] A left prediction term, which can be added as a motion candidate at the left neighboring block, can be added to the candidates that inherit from the first determined "nearest valid block" in the order of block A→block E→block D (or block A→block E→block D, block D→block A→block E). An upper prediction term, which can be added as a motion candidate at the upper neighboring block, can be added to the candidates that inherit from the first determined "nearest valid block" in the order of block B→block C or block C→block B. That is, the maximum number of inherited candidates derived from each of the left and upper prediction terms is 1.
[0262] When encoding "nearby valid blocks" using a 4-parameter affine motion model, the 4-parameter affine motion model can be used to determine inheritance candidates; and when encoding "nearby valid blocks" using a 6-parameter affine motion model, the 6-parameter affine motion model can be used to determine inheritance candidates.
[0263] When the number of inherited candidates determined by the left and upper predictors is 2, pruning checks can be performed or not. While pruning checks are typically performed to prevent duplicate candidates from being added to the candidate list, they increase complexity because the MV of each CP should be compared in motion predictions using an affine model. However, when using a reference... Figure 18 When configuring inheritance candidates using the described example, the probability that the candidates determined by the left and right predictors are different from each other is very high because the candidates are far apart. Therefore, the advantage is that coding performance is rarely degraded even without performing pruning checks.
[0264] Alternatively, a less complex pruning check method can be used instead of performing pruning check processing. For example, pruning check processing can be performed using a method that only compares the MV of CP0.
[0265] The reason for determining that E is located in the neighboring blocks to be scanned for inheritance candidates is as follows. In the line buffer reduction method described later, the line buffer reduction method cannot be used when the reference block above the current block (i.e., neighboring block B, neighboring block C) does not exist in the same CTU as the current block. Therefore, when applying the line buffer reduction method while generating inheritance candidates, the following method is used... Figure 18 The positions of neighboring blocks are indicated in the code to maintain coding performance.
[0266] Furthermore, this method can configure at most one inheritance candidate and use it as an affine MVP candidate. In this case, the motion vector of the first valid neighboring block based on the order A→B→C→D can be used as an inheritance candidate, without distinguishing between left and upper prediction terms.
[0267] In addition, this document presents yet another example of deriving affine candidates for inheritance.
[0268] In this example, you can use Figure 18 The neighboring blocks shown in the figure are used to derive candidates for inheritance.
[0269] That is, the encoding / decoding device can derive up to two inherited affine candidates from the neighboring blocks of the current block.
[0270] Furthermore, the encoding / decoding device can check whether neighboring blocks are available in a specific order, and derive affine candidates for the current block's inheritance based on the first neighboring block confirmed as available. That is, the encoding / decoding device can check whether neighboring blocks satisfy a specific condition in a specific order, and derive affine candidates for the current block's inheritance based on the first neighboring block confirmed as available. Additionally, the encoding / decoding device can derive affine candidates for the current block's inheritance based on the second neighboring block confirmed as satisfying the specific condition. Here, "available" can mean that the block is encoded using an affine motion model, and the block's reference image is the same as the current block's reference image. That is, the specific condition can mean that the block is encoded using an affine motion model, and the block's reference image is the same as the current block's reference image.
[0271] As mentioned above, when deriving a left prediction term from an inherited affine candidate, neighboring blocks A, D, and E can be used, while when deriving an upper prediction term from an inherited affine candidate, neighboring blocks B and C can be used.
[0272] A left prediction term, which can be added as a motion candidate at the left neighboring block, can be added to the candidates that inherit from the first determined "nearest valid block" in the order of block A→block E→block D (or block A→block E→block D, block D→block A→block E). An upper prediction term, which can be added as a motion candidate at the upper neighboring block, can be added to the candidates that inherit from the first determined "nearest valid block" in the order of block B→block C or block C→block B. That is, the maximum number of inherited candidates derived from each of the left and upper prediction terms is 1.
[0273] When encoding "nearby valid blocks" using a 4-parameter affine motion model, the 4-parameter affine motion model can be used to determine inheritance candidates; and when encoding "nearby valid blocks" using a 6-parameter affine motion model, the 6-parameter affine motion model can be used to determine inheritance candidates.
[0274] Furthermore, even in this example, when the number of inherited candidates determined by the left and upper predictors is 2, pruning checks can be performed or not. While pruning checks are typically performed to prevent duplicate candidates from being added to the candidate list, they increase complexity because the MV of each CP should be compared in motion predictions using an affine model. However, when using a reference... Figure 18 When configuring inheritance candidates using the described example, the probability that the candidates determined by the left and right predictors are different from each other is very high because the candidates are far apart. Therefore, the advantage is that coding performance is rarely degraded even without performing pruning checks.
[0275] Furthermore, a less complex pruning check method can be used instead of performing the pruning check process. For example, the pruning check process to determine whether neighboring block E is included in the same coded block as neighboring block A can be performed only if neighboring block E is a "neighboring valid block". Because it only performs the pruning check once, it has low complexity. The reason for performing the pruning check only on neighboring block E is that the probability that the reference blocks of the upper prediction (neighboring block B, neighboring block C) and the reference blocks of the left prediction (neighboring block A, neighboring block D) are configured with the same inheritance candidate is very low, because their positions are far enough apart from each other, and because, conversely, in the case of neighboring block E, there is a possibility that it is configured with the same inheritance candidate when it is included in the same block as neighboring block A.
[0276] The reason for determining E as the location of the neighboring blocks to be scanned for inheritance candidates is as follows. In the line buffer reduction method described later, the line buffer reduction method cannot be used when the reference block above the current block (i.e., neighboring block B, neighboring block C) does not exist in the same CTU as the current block. Therefore, when applying the line buffer reduction method while generating inheritance candidates, the method is used... Figure 18 The positions of neighboring blocks are indicated in the code to maintain coding performance.
[0277] Furthermore, this method can configure at most one inheritance candidate and use it as an affine MVP candidate. In this case, the motion vector of the first valid neighboring block based on the order A→B→C→D can be used as an inheritance candidate, without distinguishing between left and upper prediction terms.
[0278] In addition, refer to the examples in this document. Figures 16 to 18 The described method for generating the affine MVP list can be applied to methods that derive inherited candidates from merge candidate lists based on affine motion models. According to this example, there is an advantage in terms of design cost because the same processing can be applied to both affine MVP list generation and merge candidate list generation. An example of generating a merge candidate list based on an affine motion model is shown below, and this processing can be applied to configure inherited candidates when generating other merge lists.
[0279] Specifically, the candidate list for merging can be configured as follows.
[0280] Figure 19 An example of configuring the merge candidate list for the current block is presented.
[0281] Reference Figure 19 The encoding / decoding device can add inherited merge candidates to the merge candidate list (S1900).
[0282] Specifically, the encoding / decoding device can derive inheritance candidates based on the neighboring blocks of the current block.
[0283] The neighboring blocks of the current block used to derive the candidate for inheritance, such as Figure 11 The same applies to the current block. That is, the neighboring blocks of the current block can include the lower left neighboring block A0, the left neighboring block A1, the upper right neighboring block B0, the upper neighboring block B1, and the upper left neighboring block B2.
[0284] Inheritance candidates can be derived based on valid neighboring reconstructed blocks already encoded in affine mode. For example, the encoding / decoding device can sequentially examine neighboring blocks A0, A1, B0, B1, and B2, or sequentially examine neighboring blocks A1, B1, B0, A0, and B2. If the neighboring blocks have been encoded in affine mode (i.e., if the neighboring blocks are validly reconstructed using an affine motion model), the encoding / decoding device can derive two or three CPMVs for the current block based on the affine motion model of the neighboring blocks, and the CPMVs can be derived as candidates for inheritance of the current block. As an example, up to five inheritance candidates can be added to the merge candidate list. That is, up to five inheritance candidates can be derived based on neighboring blocks.
[0285] When following this example, in order to derive inheritance candidates, it is not necessary to use... Figure 11 Instead of using neighboring blocks Figures 16 to 18 Neighboring blocks, and references can be applied. Figures 16 to 18 Example of the description.
[0286] After this, the encoding / decoding device can add the constructed candidate to the merged candidate list (S1910).
[0287] For example, if the number of merge candidates in the merge candidate list is less than 5, the constructed candidate can be added to the merge candidate list. The constructed candidate can represent a merge candidate generated by combining the neighborhood motion information of each CP (i.e., the motion vectors of neighboring blocks and the reference image index) for the current block. Motion information about each CP can be derived based on spatial or temporal neighboring blocks for the corresponding CP. The motion information about each CP can be represented as candidate motion vectors for the corresponding CP.
[0288] Figure 20 The example in this document presents the neighboring blocks used to derive the constructed candidate current block.
[0289] Reference Figure 20Neighboring blocks can include spatial neighboring blocks and temporal neighboring blocks. Spatial neighboring blocks can include neighboring block A0, neighboring block A1, neighboring block A2, neighboring block B0, neighboring block B1, neighboring block B2, and neighboring block B3. Figure 20 The neighboring block T shown can represent a time-neighboring block.
[0290] Here, neighboring block B2 can represent the neighboring block located at the top left of the top left sample position of the current block; neighboring block B3 can represent the neighboring block located above the top left sample position of the current block; and neighboring block A2 can represent the neighboring block located to the left of the top left sample position of the current block. Additionally, neighboring block B1 can represent the neighboring block located above the top right sample position of the current block; and neighboring block B0 can represent the neighboring block located to the top right of the top right sample position of the current block. Furthermore, neighboring block A1 can represent the neighboring block located to the left of the bottom left sample position of the current block; and neighboring block A0 can represent the neighboring block located to the bottom left of the bottom left sample position of the current block.
[0291] Additionally, refer to Figure 20 The current block's CP can include CP0, CP1, CP2, and / or CP3. CP0 can represent the top-left position of the current block; CP1 can represent the top-right position of the current block; CP2 can represent the bottom-left position of the current block; and CP3 can represent the bottom-right position of the current block. For example, if the size of the current block is WxH, and the x-component and y-component of the top-left sample position of the current block are both 0, then CP0 can represent the position at coordinates (0, 0); CP1 can represent the position at coordinates (W, 0); CP2 can represent the position at coordinates (0, H); and CP3 can represent the position at coordinates (W, H).
[0292] The motion vectors for each of the above CPs can be derived as follows.
[0293] For example, the encoding / decoding device can check whether neighboring blocks in the first group are available in a first order, and can derive the motion vector of the first neighboring block confirmed as available during the checking process as a candidate motion vector for CP0. That is, the candidate motion vector for CP0 can be the motion vector of the first neighboring block confirmed as available while checking neighboring blocks in the first group in the first order. Available can indicate the presence of motion vectors of neighboring blocks. That is, available neighboring blocks can be blocks that have been encoded in inter-frame prediction (i.e., blocks to which inter-frame prediction has been applied). Here, for example, the first group may include neighboring block B2, neighboring block B3, and neighboring block A2. The first order can be the order in the first group from neighboring block B2 to neighboring block B3 and then to neighboring block A2. As an example, if neighboring block B2 is available, the motion vector of neighboring block B2 can be derived as a candidate motion vector for CP0; if neighboring block B2 is unavailable but neighboring block B3 is available, the motion vector of neighboring block B3 can be derived as a candidate motion vector for CP0; if neither neighboring block B2 nor neighboring block B3 is available and neighboring block A2 is available, the motion vector of neighboring block A2 can be derived as a candidate motion vector for CP0.
[0294] Additionally, for example, the encoding / decoding device can check whether neighboring blocks in the second group are available in a second order, and can derive the motion vector of the first neighboring block confirmed as available during the checking process as a candidate motion vector for CP1. That is, the candidate motion vector for CP1 can be the motion vector of the first neighboring block confirmed as available while checking neighboring blocks in the second group in the second order. Available can indicate the existence of motion vectors of neighboring blocks. That is, available neighboring blocks can be blocks that have been encoded in inter-frame prediction (i.e., blocks to which inter-frame prediction has been applied). Here, the second group can include neighboring block B1 and neighboring block B0. The second order can be the order from neighboring block B1 to neighboring block B0 in the second group. As an example, if neighboring block B1 is available, the motion vector of neighboring block B1 can be derived as a candidate motion vector for CP1; and if neighboring block B1 is unavailable but neighboring block B0 is available, the motion vector of neighboring block B0 can be derived as a candidate motion vector for CP1.
[0295] Additionally, for example, the encoding / decoding device can check the availability of neighboring blocks in the third group in a third order, and can derive the motion vector of the first neighboring block confirmed as available during the check process as a candidate motion vector for CP2. That is, the candidate motion vector for CP2 can be the motion vector of the first neighboring block confirmed as available while checking neighboring blocks in the third group in the third order. Available can indicate the existence of motion vectors for neighboring blocks. That is, an available neighboring block can be a block that has already been encoded in inter-frame prediction (i.e., a block to which inter-frame prediction has been applied). Here, the third group can include neighboring block A1 and neighboring block A0. The third order can be the order from neighboring block A1 to neighboring block A0 in the third group. As an example, if neighboring block A1 is available, the motion vector of neighboring block A1 can be derived as a candidate motion vector for CP2; if neighboring block A1 is unavailable but neighboring block A0 is available, the motion vector of neighboring block A0 can be derived as a candidate motion vector for CP2.
[0296] Additionally, for example, the encoding / decoding device can check whether a temporally neighboring block (i.e., neighboring block T) is available, and if a temporally neighboring block (i.e., neighboring block T) is available, the motion vector of the temporally neighboring block (i.e., neighboring block T) can be derived as a candidate motion vector for CP3.
[0297] The candidate motion vectors for CP0, CP1, CP2 and / or CP3 can be combined to derive the constructed candidate.
[0298] For example, as mentioned above, a 6-affine model requires motion vectors for three CPs. For a 6-affine model, three CPs can be selected from CP0, CP1, CP2, and CP3. For example, CPs can be chosen as one of {CP0, CP1, CP3}, {CP0, CP1, CP2}, {CP1, CP2, CP3}, and {CP0, CP2, CP3}. As an example, a 6-affine model can be configured using CP0, CP1, and CP2. In this case, CP can be represented as {CP0, CP1, CP2}.
[0299] Additionally, for example, as mentioned above, the 4-affine model requires motion vectors for two CPs. For a 4-affine model, two CPs can be selected from CP0, CP1, CP2, and CP3. For example, CPs can be chosen as one of {CP0, CP3}, {CP1, CP2}, {CP0, CP1}, {CP1, CP3}, {CP0, CP2}, and {CP2, CP3}. As an example, a 4-affine model can be configured using CP0 and CP1. In this case, CP can be represented as {CP0, CP1}.
[0300] The constructed candidates, as combinations of candidate motion vectors, can be added to the merged candidate list in the following order. That is, after the candidate motion vectors for CP have been derived, the constructed candidates can be derived in the following order:
[0301] {CP0,CP1,CP2}, {CP0,CP1,CP3}, {CP0,CP2,CP3}, {CP1,CP2,CP3}, {CP0,CP1}, {CP0,CP2}, {CP1,CP2}, {CP0,CP3}, {CP1,CP3}, {CP2,CP3}.
[0302] That is, for example, the candidate vectors constructed including candidate motion vectors for CP0, candidate motion vectors for CP1, and candidate motion vectors for CP2; the candidate vectors constructed including candidate motion vectors for CP0, candidate motion vectors for CP1, and candidate motion vectors for CP3; the candidate vectors constructed including candidate motion vectors for CP0, candidate motion vectors for CP2, and candidate motion vectors for CP3; the candidate vectors constructed including candidate motion vectors for CP1, candidate motion vectors for CP2, and candidate motion vectors for CP3; the candidate vectors constructed including candidate motion vectors for CP0 and candidate motion vectors for CP1. Candidates, including candidate motion vectors for CP0 and candidate motion vectors for CP1, candidate motion vectors for CP0 and candidate motion vectors for CP2, candidate motion vectors for CP1 and candidate motion vectors for CP2, candidate motion vectors for CP0 and candidate motion vectors for CP3, candidate motion vectors for CP1 and candidate motion vectors for CP3, and candidate motion vectors for CP2 and candidate motion vectors for CP3, can be added to the merged candidates in this order.
[0303] Subsequently, the encoding / decoding device can add the zero motion vector to the merging candidate list (S1920).
[0304] For example, if the number of merge candidates in the merge candidate list is less than 5, merge candidates including those with zero motion vectors can be added to the merge candidate list until the merge candidate list is configured with the maximum number of merge candidates. The maximum number of merge candidates can be 5. Additionally, a zero motion vector can represent a motion vector whose vector value is zero.
[0305] In addition, refer to Figures 16 to 18The scanning method used to configure the positions of candidate and neighboring blocks in the described method for generating the affine MVP list can be used for both normal merge and normal MVP. Here, normal merge can refer to a merge pattern that is not an affine merge pattern but can be used in HEVC, etc., and normal MVP can also refer to an AMVP that is not an affine MVP but can be used in HEVC. For example, refer to... Figure 16 The described method applies to normal merging and / or normal MVP, specifically meaning scanning. Figure 16 The spatial location of the adjacent block, and / or using Figure 16 The left and upper predictors are configured using neighboring blocks, and / or pruning checks are performed, or this is done using a low-complexity method. This approach has a favorable impact on design cost when applied to normal merging or normal MVP.
[0306] Furthermore, this document proposes a method for deriving constructed candidates that differs from the examples described above. Compared to the examples that derive constructed candidates, the proposed method improves coding performance by reducing complexity. The proposed example is described below. Additionally, the constructed affine candidates can be considered when the number of available affine candidates for inheritance is less than 2 (i.e., the number of derived affine candidates for inheritance is less than 2).
[0307] For example, the encoding / decoding device can examine mv0, mv1, and mv2 for the current block. That is, the encoding / decoding device can determine whether there is a usable mv0, mv1, or mv2 in the neighboring blocks of the current block. Here, mv0 can be a CPMVP candidate for CP0 of the current block; mv1 can be a CPMVP candidate for CP1; and mv2 can be a CPMVP candidate for CP2.
[0308] Specifically, the neighboring blocks of the current block can be divided into three groups, and the neighboring blocks can include neighboring block A, neighboring block B, neighboring block C, neighboring block D, neighboring block E, neighboring block F, and neighboring block G. The first group can include the motion vectors of neighboring block A, neighboring block B, and neighboring block C; the second group can include the motion vectors of neighboring block D and neighboring block E; and the third group can include the motion vectors of neighboring block F and neighboring block G. Neighboring block A can represent the neighboring block located at the upper left of the upper left sample position of the current block; neighboring block B can represent the neighboring block located above the upper left sample position of the current block; neighboring block C can represent the neighboring block located to the left of the upper left sample position of the current block; neighboring block D can represent the neighboring block located above the upper right sample position of the current block; neighboring block E can represent the neighboring block located to the upper right of the upper right sample position of the current block; neighboring block F can represent the neighboring block located to the left of the lower left sample position of the current block; and neighboring block G can represent the neighboring block located to the lower left of the lower left sample position of the current block.
[0309] The encoding / decoding device can determine whether there is a usable mv0 in the first group, whether there is a usable mv1 in the second group, and whether there is a usable mv2 in the third group.
[0310] Specifically, for example, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the first group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv0 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv0 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the first group in a specific order. When the motion vectors of neighboring blocks in the first group do not satisfy the specific condition, there may be no available mv0. Here, for example, the specific order could be from neighboring block A to neighboring block B and then to neighboring block C in the first group. Additionally, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image for the current block.
[0311] Additionally, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the second group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv1 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv1 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the second group in a specific order. When the motion vectors of neighboring blocks in the second group do not satisfy the specific condition, there may be no available mv1. Here, for example, the specific order could be from neighboring block D to neighboring block E in the second group. Furthermore, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image for the current block.
[0312] Additionally, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the third group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv2 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv2 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the third group in a specific order. When the motion vectors of neighboring blocks in the third group do not satisfy the specific condition, there may be no available mv2. Here, for example, the specific order could be from neighboring block F to neighboring block G in the third group. Furthermore, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image for the current block.
[0313] Subsequently, when the affine motion model applied to the current block is a 4-affine motion model, and when mv0 and mv1 are available for the current block, the encoding / decoding device can derive the derived mv0 and mv1 as constructed candidates for the current block. Furthermore, when mv0 and / or mv1 are not available for the current block, i.e., when at least one of mv0 and mv1 is not derived from neighboring blocks of the current block, the encoding / decoding device may not add the constructed candidate to the affine MVP list of the current block.
[0314] Additionally, when the affine motion model applied to the current block is a 6-affine motion model, and when mv0, mv1, and mv2 are available for the current block, the encoding / decoding device can derive the derived mv0, mv1, and mv2 as constructed candidates for the current block. Furthermore, when mv0, mv1, and / or mv2 are not available for the current block, i.e., when at least one of mv0, mv1, and mv2 is not derived from neighboring blocks of the current block, the encoding / decoding device may not add the constructed candidate to the affine MVP list of the current block.
[0315] The example presented above considers a candidate block as a construct only when all motion vectors of the CP used to generate the affine motion model for the current block are available. Here, "available" can mean that the reference image of a neighboring block is the same as the reference image of the current block. That is, a constructed candidate block can only be derived if there are motion vectors among the motion vectors of the neighboring blocks of the corresponding CP for the current block that satisfy the condition. Therefore, when the affine motion model applied to the current block is a 4-affine motion model, a constructed candidate block can only be considered if the MVs (i.e., mv0 and mv1) of CP0 and CP1 of the current block are available. Similarly, when the affine motion model applied to the current block is a 6-affine motion model, a constructed candidate block can only be considered if the MVs (i.e., mv0, mv1, and mv2) of CP0, CP1, and CP2 of the current block are available. Therefore, according to the proposed example, it may not be necessary to derive additional configurations of motion vectors for the CP based on Equation 6 or Equation 7. This reduces the computational complexity of deriving the constructed candidate block. In addition, since the constructed candidate is determined only when a CPMVP candidate with the same reference image is available, the overall coding performance can be improved.
[0316] Furthermore, pruning checks cannot be performed between derived inherited affine candidates and constructed affine candidates. A pruning check can be represented as checking if the candidates are identical to each other, and if they are identical, removing candidates derived in the subsequent order.
[0317] It is possible Figure 21 and Figure 22 The above examples are presented in the same way.
[0318] Figure 21 Examples of constructed candidates for the 4-affine motion model applied to the current block are presented.
[0319] Reference Figure 21 The encoding / decoding device can determine whether mv0 and mv1 are available for the current block (S2100). That is, the encoding / decoding device can determine whether there are available mv0 and mv1 in the neighboring blocks of the current block. Here, mv0 can be a CPMVP candidate for CP0 of the current block; mv1 can be a CPMVP candidate for CP1.
[0320] The encoding / decoding device can determine whether an available mv0 exists in the first group and whether an available mv1 exists in the second group.
[0321] Specifically, the neighboring blocks of the current block can be divided into three groups, and the neighboring blocks can include neighboring block A, neighboring block B, neighboring block C, neighboring block D, neighboring block E, neighboring block F, and neighboring block G. The first group can include the motion vectors of neighboring block A, neighboring block B, and neighboring block C; the second group can include the motion vectors of neighboring block D and neighboring block E; and the third group can include the motion vectors of neighboring block F and neighboring block G. Neighboring block A can represent the neighboring block located at the upper left of the upper left sample position of the current block; neighboring block B can represent the neighboring block located above the upper left sample position of the current block; neighboring block C can represent the neighboring block located to the left of the upper left sample position of the current block; neighboring block D can represent the neighboring block located above the upper right sample position of the current block; neighboring block E can represent the neighboring block located to the upper right of the upper right sample position of the current block; neighboring block F can represent the neighboring block located to the left of the lower left sample position of the current block; and neighboring block G can represent the neighboring block located to the lower left of the lower left sample position of the current block.
[0322] Additionally, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the first group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv0 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv0 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the first group in a specific order. When the motion vectors of neighboring blocks in the first group do not satisfy the specific condition, there may be no available mv0. Here, for example, the specific order could be from neighboring block A to neighboring block B and then to neighboring block C in the first group. Furthermore, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image for the current block.
[0323] Additionally, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the second group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv1 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv1 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the second group in a specific order. When the motion vectors of neighboring blocks in the second group do not satisfy the specific condition, there may be no available mv1. Here, for example, the specific order could be from neighboring block D to neighboring block E in the second group. Furthermore, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image for the current block.
[0324] When mv0 and mv1 are available for the current block, i.e., when mv0 and mv1 are exported for the current block, the encoding / decoding device may export the exported mv0 and mv1 as the constructed candidate for the current block (S2110). Furthermore, when mv0 and / or mv1 are not available for the current block, i.e., when at least one of mv0 and mv1 is not exported from the neighboring blocks of the current block, the encoding / decoding device may not add the constructed candidate to the affine MVP list of the current block.
[0325] Furthermore, pruning checks cannot be performed between derived inherited affine candidates and constructed affine candidates. A pruning check can be represented as checking if the candidates are identical to each other, and if they are identical, removing candidates derived in the subsequent order.
[0326] Figure 22 Examples of constructed candidates for the 6-affine motion model applied to the current block are presented.
[0327] Reference Figure 22 The encoding / decoding device can determine whether mv0, mv1, and mv2 are available for the current block (S2200). That is, the encoding / decoding device can determine whether there is a usable mv0, mv1, or mv2 in the neighboring blocks of the current block. Here, mv0 can be a CPMVP candidate for CP0 of the current block; mv1 can be a CPMVP candidate for CP1; and mv2 can be a CPMVP candidate for CP2.
[0328] The encoding / decoding device can determine whether there is a usable mv0 in the first group, whether there is a usable mv1 in the second group, and whether there is a usable mv2 in the third group.
[0329] Specifically, the neighboring blocks of the current block can be divided into three groups, and the neighboring blocks can include neighboring block A, neighboring block B, neighboring block C, neighboring block D, neighboring block E, neighboring block F, and neighboring block G. The first group can include the motion vectors of neighboring block A, neighboring block B, and neighboring block C; the second group can include the motion vectors of neighboring block D and neighboring block E; and the third group can include the motion vectors of neighboring block F and neighboring block G. Neighboring block A can represent the neighboring block located at the upper left of the upper left sample position of the current block; neighboring block B can represent the neighboring block located above the upper left sample position of the current block; neighboring block C can represent the neighboring block located to the left of the upper left sample position of the current block; neighboring block D can represent the neighboring block located above the upper right sample position of the current block; neighboring block E can represent the neighboring block located to the upper right of the upper right sample position of the current block; neighboring block F can represent the neighboring block located to the left of the lower left sample position of the current block; and neighboring block G can represent the neighboring block located to the lower left of the lower left sample position of the current block.
[0330] Additionally, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the first group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv0 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv0 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the first group in a specific order. When the motion vectors of neighboring blocks in the first group do not satisfy the specific condition, there may be no available mv0. Here, for example, the specific order could be from neighboring block A to neighboring block B and then to neighboring block C in the first group. Furthermore, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image for the current block.
[0331] Additionally, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the second group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv1 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv1 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the second group in a specific order. When the motion vectors of neighboring blocks in the second group do not satisfy the specific condition, there may be no available mv1. Here, for example, the specific order could be from neighboring block D to neighboring block E in the second group. Furthermore, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image for the current block.
[0332] Additionally, the encoding / decoding device can check whether the motion vectors of neighboring blocks in the third group satisfy a specific condition in a specific order. The encoding / decoding device can derive mv2 from the motion vector of the first neighboring block confirmed to satisfy the condition during the checking process. That is, mv2 can be the first motion vector confirmed to satisfy the specific condition while checking the motion vectors in the third group in a specific order. When the motion vectors of neighboring blocks in the third group do not satisfy the specific condition, there may be no available mv2. Here, for example, the specific order could be from neighboring block F to neighboring block G in the third group. Furthermore, for example, the specific condition could be that the reference image for the motion vectors of neighboring blocks should be the same as the reference image for the current block.
[0333] When mv0, mv1, and mv2 are available for the current block, i.e., when mv0, mv1, and mv2 are derived for the current block, the encoding / decoding device may export the exported mv0, mv1, and mv2 as constructed candidates for the current block (S2210). Furthermore, when mv0, mv1, and / or mv2 are not available for the current block, i.e., when at least one of mv0, mv1, and mv2 is not derived from neighboring blocks of the current block, the encoding / decoding device may not add the constructed candidate to the affine MVP list of the current block.
[0334] Furthermore, pruning checks cannot be performed between the derived inherited affine candidates and the constructed affine candidates.
[0335] In addition, when the number of derived affine candidates is less than 2 (i.e., when the number of inherited affine candidates and / or constructed affine candidates is less than 2), HEVC AMVP candidates can be added to the affine MVP list of the current block.
[0336] For example, HEVC AMVP candidates can be exported in the following order.
[0337] Specifically, when the number of derived affine candidates is less than 2, and when the constructed affine candidate CPMV0 is available, CPMV0 can be used as an affine MVP candidate. That is, when the number of derived affine candidates is less than 2, and when the constructed affine candidate CPMV0 is available (i.e., when the number of derived affine candidates is less than 2 and the constructed affine candidate CPMV0 is derived), a first affine MVP candidate including CPMV0 as a constructed affine candidate of CPMV0, CPMV1, and CPMV2 can be derived.
[0338] Furthermore, when the number of derived affine candidates is less than 2, and when the constructed affine candidate CPMV1 is available, CPMV1 can be used as an affine MVP candidate. That is, when the number of derived affine candidates is less than 2, and when the constructed affine candidate CPMV0 is available (i.e., when the number of derived affine candidates is less than 2 and the constructed affine candidate CPMV1 is derived), a second affine MVP candidate including CPMV1 as a constructed affine candidate of CPMV0, CPMV1, and CPMV2 can be derived.
[0339] Furthermore, when the number of derived affine candidates is less than 2, and when the constructed affine candidate CPMV2 is available, CPMV2 can be used as an affine MVP candidate. That is, when the number of derived affine candidates is less than 2, and when the constructed affine candidate CPMV2 is available (i.e., when the number of derived affine candidates is less than 2 and the constructed affine candidate CPMV2 is derived), a third affine MVP candidate including CPMV2 as the constructed affine candidate CPMV0, CPMV1, and CPMV2 can be derived.
[0340] Furthermore, when the number of derived affine candidates is less than two, the HEVC Temporal Motion Vector Prediction Term (TMVP) can be used as an affine MVP candidate. HEVC TMVP can be derived based on the motion information of temporally neighboring blocks of the current block. That is, when the number of derived affine candidates is less than two, a third affine MVP candidate, comprising the motion vectors of temporally neighboring blocks of the current block, can be derived as CPMV0, CPMV1, and CPMV2. Temporally neighboring blocks can represent juxtaposed blocks in the juxtaposed image corresponding to the current block.
[0341] Furthermore, when the number of derived affine candidates is less than 2, a zero motion vector (zero MV) can be used as an affine MVP candidate. That is, when the number of derived affine candidates is less than 2, a third affine MVP candidate, including zero motion vectors, can be derived as CPMV0, CPMV1, and CPMV2. A zero motion vector can be represented as a motion vector whose value is zero.
[0342] Compared to the conventional method of deriving HEVC AMVP candidates, the complexity is reduced because the step of using the CPMV of the constructed affine candidate reuses the MV already considered in order to generate the constructed affine candidate.
[0343] In addition, this document presents another example of affine candidates for derived inheritance.
[0344] To derive inherited affine candidates, affine prediction information of neighboring blocks is required, and specifically, the following affine prediction information is required.
[0345] 1) Indicates whether the Affine_flag based on affine prediction-based neighbor block coding has been applied.
[0346] 2) Motion information of neighboring blocks
[0347] When applying a 4-affine motion model to neighboring blocks, the motion information of the neighboring blocks can include L0 and L1 motion information for CP0 and for CP1. Conversely, when applying a 6-affine motion model to neighboring blocks, the motion information of the neighboring blocks can include L0 and L1 motion information for CP0 and for CP2. Here, L0 motion information can represent motion information about L0 (list 0), and L1 motion information can represent motion information about L1 (list 1). L0 motion information can include an L0 reference image index and an L0 motion vector, and L1 motion information can include an L1 reference image index and an L1 motion vector.
[0348] As mentioned above, the amount of information to be stored in the case of affine prediction is large, which can be a major cause of increased hardware costs when implemented in encoding / decoding devices. In particular, when a neighboring block is above the current block and is a CTU boundary, a line buffer should be used to store the affine prediction information of the neighboring block, thus potentially leading to further cost issues. This problem can be referred to as the line buffer problem below. Therefore, this document proposes an example of derived inheritance of affine candidates, where hardware costs are minimized by either not storing affine prediction information in the line buffer or by reducing it. The proposed example improves encoding performance by reducing the computational complexity of derived inheritance of affine candidates. Furthermore, for reference, motion information for a 4×4 block is already stored in the line buffer, and storing affine prediction information increases the amount of information stored by a factor of three compared to the previous storage.
[0349] In this example, information about affine prediction may not be stored separately in the line buffer, and the generation of inherited affine candidates may be restricted when the information in the line buffer should be referenced to generate inherited affine candidates.
[0350] Figure 23a and Figure 23b Examples of affine candidates for derived inheritance are presented illustratively.
[0351] Reference Figure 23aWhen the current block's neighboring block B (i.e., the current block's upper neighboring block) does not exist in the same CTU as the current block (i.e., the current CTU), neighboring block B may not be used to generate an affine candidate for inheritance. Furthermore, even if neighboring block A does not exist in the same CTU as the current block, information about neighboring block A can still be used to generate an affine candidate for inheritance because it is not stored in the line buffer. Therefore, in this example, the current block can only be used to generate an affine candidate for inheritance if its upper neighboring block is included in the same CTU as the current block. Additionally, when the current block's upper neighboring block is not included in the same CTU as the current block, the upper neighboring block may not be used to generate an affine candidate for inheritance.
[0352] Reference Figure 23b The neighboring block B of the current block (i.e., the upper neighboring block of the current block) can exist in the same CTU as the current block. In this case, the encoding / decoding device can refer to the neighboring block B to generate inherited affine candidates.
[0353] Figure 24 The image encoding method performed by the encoding device according to this document is illustrated schematically. Figure 24 The method disclosed in the article can be derived from Figure 2 The encoding device disclosed in the document executes the code. Specifically, for example, Figure 24 S2400 to S2430 can be executed by the predictor of the encoding device, and S2440 can be executed by the entropy encoder of the encoding device. Furthermore, although not shown, the process of deriving the prediction sample for the current block based on the CPMV can be executed by the predictor of the encoding device; the process of deriving the residual sample for the current block based on the prediction sample and the original sample can be executed by the subtractor of the encoding device; the process of generating residual information about the current block based on the residual sample can be executed by the transformer of the encoding device; and the process of encoding the information about the residual can be executed by the entropy encoder of the encoding device.
[0354] The encoding device configures an affine motion vector prediction term (MVP) candidate list for the current block (S2400). The encoding device can be configured with an affine MVP candidate list that includes affine MVP candidates for the current block. The maximum number of affine MVP candidates in the affine MVP candidate list can be 2.
[0355] Additionally, as an example, the affine MVP candidate list can include inherited affine MVP candidates. The encoding device can check if inherited affine MVP candidates for the current block are available, and when they are available, they can derive them. For example, inherited affine MVP candidates can be derived based on neighboring blocks of the current block, and the maximum number of inherited affine MVP candidates can be 2. Neighboring blocks can be checked for availability in a specific order, and inherited affine MVP candidates can be derived based on the detected available neighboring blocks. That is, neighboring blocks can be checked for availability in a specific order, and a first inherited affine MVP candidate can be derived based on the first neighboring block checked as available, and a second inherited affine MVP candidate can be derived based on the second neighboring block checked as available. Available can mean that the block is encoded using an affine motion model, and the reference image of the neighboring blocks is the same as the reference image of the current block. That is, available neighboring blocks are those encoded using an affine motion model (i.e., affine prediction is applied to them) and whose reference images are the same as the reference image of the current block. Specifically, the encoding device can derive the motion vector for the CP of the current block based on the affine motion model of the first neighboring block that has been checked as available, and can derive the first inherited affine MVP candidate including the motion vector as the CPMVP candidate. Additionally, the encoding device can derive the motion vector for the CP of the current block based on the affine motion model of the second neighboring block that has been checked as available, and can derive the second inherited affine MVP candidate including the motion vector as the CPMVP candidate. The affine motion model can be derived as shown in Equation 1 or Equation 3 above.
[0356] In other words, neighboring blocks can be checked for certain conditions in a specific order, and inherited affine MVP candidates can be derived based on neighboring blocks that have been checked to meet the specific conditions. That is, neighboring blocks can be checked for certain conditions in a specific order, and a first inherited affine MVP candidate can be derived based on the first neighboring block checked to meet the specific conditions, and a second inherited affine MVP candidate can be derived based on the second neighboring block checked to meet the specific conditions. Specifically, the encoding device can derive the motion vector of the CP for the current block based on the affine motion model of the first neighboring block checked to meet the specific conditions, and can derive the first inherited affine MVP candidate including the motion vector as a CPMVP candidate. In addition, the encoding device can derive the motion vector of the CP for the current block based on the affine motion model of the second neighboring block checked to meet the specific conditions, and can derive the second inherited affine MVP candidate including the motion vector as a CPMVP candidate. The affine motion model can be derived as shown in Equation 1 or Equation 3 above. Furthermore, the specific conditions can indicate that the block is encoded using the affine motion model, and the reference image of the neighboring block is the same as the reference image of the current block. That is, a neighboring block that meets certain conditions is a neighboring block that is encoded by an affine motion model (i.e., affine prediction is applied to it) and whose reference image is the same as the reference image of the current block.
[0357] Here, for example, neighboring blocks can include the current block's left neighbor, top neighbor, top right neighbor, bottom left neighbor, and top left neighbor. In this case, a specific order could be from the left neighbor to the bottom left neighbor to the top neighbor to the top right neighbor and then to the top left neighbor.
[0358] Alternatively, for example, the neighboring blocks may consist only of the left neighboring block and the top neighboring block. In this case, the specific order could be from the left neighboring block to the top neighboring block.
[0359] Alternatively, for example, a neighboring block may include only the left neighboring block, and a neighboring block may also include the upper neighboring block when the upper neighboring block is included in the current CTU that includes the current block. In this case, the specific order may be from the left neighboring block to the upper neighboring block. Additionally, a neighboring block may not include the upper neighboring block when the upper neighboring block is not included in the current CTU. In this case, only the left neighboring block may be checked.
[0360] Furthermore, if the size is WxH, and the x-component of the top-left sample position of the current block is 0 and its y-component is 0, then the bottom-left neighboring block can be the block that includes the sample at coordinates (-1, H); the left neighboring block can be the block that includes the sample at coordinates (-1, H-1); the top-right neighboring block can be the block that includes the sample at coordinates (W, -1); the top neighboring block can be the block that includes the sample at coordinates (W-1, -1); and the top-left neighboring block can be the block that includes the sample at coordinates (-1, -1). That is, the left neighboring block can be the bottom left neighboring block among the left neighboring blocks of the current block, and the top neighboring block can be the leftmost top neighboring block among the top neighboring blocks of the current block.
[0361] Additionally, as an example, the affine MVP candidate list can include constructed affine MVP candidates when they are available. The encoding device can check if constructed affine MVP candidates for the current block are available, and if so, can derive them. Alternatively, for example, constructed affine MVP candidates can be derived after inherited affine MVP candidates have been derived. The affine MVP candidate list can include constructed affine MVP candidates when the number of derived affine MVP candidates (i.e., inherited affine MVP candidates) is less than 2 and constructed affine MVP candidates are available. Here, constructed affine MVP candidates can include candidate motion vectors for the CP. Constructed affine MVP candidates can be available when all candidate motion vectors are available.
[0362] For example, when applying a 4-affine motion model to the current block, the current block's CP can include CP0 and CP1. When motion vectors for CP0 and CP1 are available, the constructed affine MVP candidates can be available, and the affine MVP candidate list can include the constructed affine MVP candidates. Here, CP0 can represent the top-left position of the current block, and CP1 can represent the top-right position of the current block.
[0363] The constructed affine MVP candidate can include candidate motion vectors for CP0 and candidate motion vectors for CP1. The candidate motion vector for CP0 can be the motion vector of the first block, and the candidate motion vector for CP1 can be the motion vector of the second block.
[0364] Additionally, the first block can be the first block whose reference image is the same as the reference image of the current block while checking neighboring blocks in the first group in a first specific order. That is, the candidate motion vector for CP1 can be the motion vector of the first block whose reference image is the same as the reference image of the current block while checking neighboring blocks in the first group in a first specific order. "Useful" can indicate the existence of a neighboring block and that neighboring block is encoded in inter-frame prediction. Here, the candidate motion vector for CP0 can be available when the reference image of the first block in the first group is the same as the reference image of the current block. Furthermore, for example, the first group can include neighboring block A, neighboring block B, and neighboring block C, and the first specific order can be from neighboring block A to neighboring block B and then to neighboring block C.
[0365] Additionally, the second block can be the first block identified as having the same reference image as the current block while its neighboring blocks in the second group are checked in a second specific order. Here, when the reference image of the second block in the second group is the same as the reference image of the current block, the candidate motion vector for CP1 can be available. Furthermore, for example, the second group can include neighboring blocks D and E, and the second specific order can be from neighboring block D to neighboring block E.
[0366] Furthermore, 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 its y-component is 0, then neighboring block A can be the block that includes the sample at coordinates (-1, -1); neighboring block B can be the block that includes the sample at coordinates (0, -1); neighboring block C can be the block that includes the sample at coordinates (-1, 0); neighboring block D can be the block that includes the sample at coordinates (W-1, -1); and neighboring block E can be the block that includes the sample at coordinates (W, -1). That is, neighboring block A can be the top-left neighboring block of the current block; neighboring block B can be the leftmost top neighboring block among the top neighboring blocks of the current block; neighboring block C can be the topmost left neighboring block among the left neighboring blocks of the current block; neighboring block D can be the rightmost top neighboring block among the top neighboring blocks of the current block; and neighboring block E can be the top-right neighboring block of the current block.
[0367] Furthermore, the constructed affine MVP candidate may be unavailable if at least one of the candidate motion vectors of CP0 and CP1 is unavailable.
[0368] Alternatively, for example, when applying a 6-affine motion model to the current block, the CP of the current block may include CP0, CP1, and CP2. The constructed affine MVP candidate may be available when motion vectors for CP0, CP1, and CP2 are available, and the list of affine MVP candidates may include the constructed affine MVP candidates. Here, CP0 may represent the top-left position of the current block; CP1 may represent the top-right position of the current block; and CP2 may represent the bottom-left position of the current block.
[0369] The constructed affine MVP candidates can include candidate motion vectors for CP0, candidate motion vectors for CP1, and candidate motion vectors for CP2. The candidate motion vectors for CP0 can be the motion vectors of the first block, the candidate motion vectors for CP1 can be the motion vectors of the second block, and the candidate motion vectors for CP2 can be the motion vectors of the third block.
[0370] Additionally, the first block can be the first block identified as having the same reference image as the reference image of the current block while checking neighboring blocks in the first group in a first specific order. Here, when the reference image of the first block in the first group is the same as the reference image of the current block, candidate motion vectors for CP0 can be available. Furthermore, for example, the first group can include neighboring block A, neighboring block B, and neighboring block C, and the first specific order can be from neighboring block A to neighboring block B and then to neighboring block C.
[0371] Additionally, the second block can be the first block identified as having the same reference image as the current block while its neighboring blocks in the second group are checked in a second specific order. Here, when the reference image of the second block in the second group is the same as the reference image of the current block, the candidate motion vector for CP1 can be available. Furthermore, for example, the second group can include neighboring blocks D and E, and the second specific order can be from neighboring block D to neighboring block E.
[0372] Additionally, the third block can be the first block identified as having the same reference image as the current block while checking neighboring blocks in the third group in a third specific order. Here, candidate motion vectors for CP2 can be available when the reference image of the third block in the third group is the same as the reference image of the current block. Furthermore, for example, the third group can include neighboring blocks F and G, and the third specific order can be from neighboring block F to neighboring block G.
[0373] Furthermore, 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 its y-component is 0, then neighboring block A can be a block that includes the sample at coordinate (-1, -1); neighboring block B can be a block that includes the sample at coordinate (0, -1); neighboring block C can be a block that includes the sample at coordinate (-1, 0); neighboring block D can be a block that includes the sample at coordinate (W-1, -1); neighboring block E can be a block that includes the sample at coordinate (W, -1); neighboring block F can be a block that includes the sample at coordinate (-1, H-1); and neighboring block G can be a block that includes the sample at coordinate (-1, H). That is, neighboring block A can be the top-left neighboring block of the current block; neighboring block B can be the leftmost top neighboring block among the top neighboring blocks of the current block; neighboring block C can be the top left neighboring block among the left neighboring blocks of the current block; neighboring block D can be the rightmost top neighboring block among the top neighboring blocks of the current block; neighboring block E can be the top-right neighboring block of the current block; neighboring block F can be the bottom left neighboring block among the left neighboring blocks of the current block; and neighboring block G can be the bottom-left neighboring block of the current block.
[0374] Furthermore, the constructed affine MVP candidate may be unavailable if at least one of the candidate motion vectors of CP0, CP1, and CP2 is unavailable.
[0375] Subsequently, the affine MVP candidate list can be derived in a specific order based on the following steps.
[0376] For example, when the number of derived affine MVP candidates is less than 2 and motion vectors for CP0 are available, the encoding device can derive a first affine MVP candidate. Here, the first affine MVP candidate can be an affine MVP candidate that includes candidate motion vectors for CP0 as candidate motion vectors for CP.
[0377] Additionally, for example, when the number of derived affine MVP candidates is less than 2 and motion vectors for CP1 are available, the encoding device can derive a second affine MVP candidate. Here, the second affine MVP candidate can be an affine MVP candidate that includes candidate motion vectors for CP1 as candidate motion vectors for CP.
[0378] Additionally, for example, when the number of derived affine MVP candidates is less than 2 and motion vectors for CP2 are available, the encoding device can derive a third affine MVP candidate. Here, the third affine MVP candidate can be an affine MVP candidate that includes candidate motion vectors for CP2 as candidate motion vectors for CP.
[0379] Additionally, for example, when the number of derived affine MVP candidates is less than two, the encoding device can derive a fourth affine MVP candidate, which includes a temporal MVP derived from the temporally neighboring blocks of the current block as candidate motion vectors for the CP. A temporally neighboring block can represent a juxtaposed block in the juxtaposed image corresponding to the current block. The temporal MVP can be derived based on the motion vectors of the temporally neighboring blocks.
[0380] Additionally, for example, when the number of derived affine MVP candidates is less than 2, the encoding device can derive a fifth affine MVP candidate, which includes a zero motion vector as a candidate motion vector for the CP. A zero motion vector can represent a motion vector whose value is zero.
[0381] The encoding device derives a control point motion vector prediction term (CPMVP) for the control point (CP) of the current block based on an affine MVP candidate list (S2410). The encoding device can derive a CPMV for the CP of the current block with the best RD cost, and can select the affine MVP candidate most similar to the CPMV from the affine MVP candidates as the affine MVP candidate for the current block. The encoding device can derive the control point motion vector prediction term (CPMVP) for the control point (CP) of the current block based on the affine MVP candidate selected from the affine MVP candidates included in the affine MVP candidate list. Specifically, when the affine MVP candidates include candidate motion vectors for CP0 and candidate motion vectors for CP1, the candidate motion vectors for CP0 of the affine MVP candidates can be derived as the CPMVP for CP0, and the candidate motion vectors for CP1 of the affine MVP candidates can be derived as the CPMVP for CP1. Furthermore, when an affine MVP candidate includes candidate motion vectors for CP0, candidate motion vectors for CP1, and candidate motion vectors for CP2, the candidate motion vectors for CP0 can be derived as the CPMVP for CP0, the candidate motion vectors for CP1 can be derived as the CPMVP for CP1, and the candidate motion vectors for CP2 can be derived as the CPMVP for CP2.
[0382] The encoding device can encode an affine MVP candidate index that indicates the affine MVP candidate selected from the affine MVP candidates. The affine MVP candidate index can indicate one of the multiple affine MVP candidates included in the affine motion vector prediction term (MVP) candidate list for the current block.
[0383] The encoding device exports the CPMV for the CP of the current block (S2420). The encoding device can export the CPMV for the corresponding CP of the current block.
[0384] The encoding device derives the control point motion vector difference (CPMVD) for the current block's CP based on CPMVP and CPMV (S2430). The encoding device can derive the CPMVD for the current block's CP based on the CPMV and CPMVP for the corresponding CP.
[0385] The encoding device encodes motion prediction information including information about the CPMVD (S2440). The encoding device can output the motion prediction information including information about the CPMVD in the form of a bitstream. That is, the encoding device can output image information including motion prediction information in the form of a bitstream. The encoding device can encode information about the CPMVD for the corresponding CP, and the motion prediction information can include information about the CPMVD.
[0386] Additionally, motion prediction information may include an affine MVP candidate index. The affine MVP candidate index indicates the affine MVP candidate selected from the list of affine motion vector prediction (MVP) candidates for the current block.
[0387] Furthermore, as an example, the encoding device can derive a prediction sample for the current block based on CPMV, derive a residual sample for the current block based on the prediction sample and the original sample, generate information about the residual for the current block based on the residual sample, and encode the information about the residual. Image information may include information about the residual. Additionally, the bitstream can be sent to the decoding device via a network or (digital) storage medium. Here, the network may include broadcast networks, communication networks, and / or the like, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
[0388] Figure 25 An encoding device for performing an image encoding method according to this document is illustrated schematically. Figure 24 The method disclosed in the article can be derived from Figure 25 The encoding device disclosed in the document executes the code. Specifically, for example, Figure 25 The predictor can perform Figure 24S2400 to S2410; and the entropy encoder of the encoding device can perform Figure 24 S2420 in [the diagram]. Furthermore, although not shown, the processing of deriving prediction samples for the current block based on CPMV can be performed by [the method described]. Figure 25 The predictor of the encoding device performs the processing; the process of deriving residual samples for the current block based on the predicted samples and original samples for the current block can be performed by... Figure 25 The subtractor of the encoding device performs the operation; the processing of generating information about the residuals for the current block based on the residual samples can be performed by... Figure 25 The encoding device's converter performs the work; and the processing of encoding information about the residual can be performed by... Figure 25 The entropy encoder of the encoding device is used to perform the operation.
[0389] Figure 26 This paper schematically illustrates an image decoding method performed by a decoding device according to this document. Figure 26 The method disclosed in the article can be derived from Figure 3 The decoding device disclosed in the document performs the operation. Specifically, for example, Figure 26 S2600 can be executed by the entropy decoder of the decoding device; S2610 to S2650 can be executed by the predictor of the decoding device; and S2660 can be executed by the adder of the decoding device. Additionally, although not shown, the process of obtaining residual information about the current block from the bitstream can be executed by the entropy decoder of the decoding device, and the process of deriving residual samples for the current block based on the residual information can be executed by the inverse transformer of the decoding device.
[0390] The encoding device obtains motion prediction information for the current block from the bitstream (S2600). The decoding device can obtain image information including the motion prediction information from the bitstream.
[0391] Additionally, for example, motion prediction information may include information about the control point motion vector difference (CPMVD) for the control point (CP) of the current block. That is, motion prediction information may include information about the CPVD of the corresponding CP for the current block.
[0392] Additionally, for example, motion prediction information may include an affine MVP candidate index for the current block. The affine MVP candidate index can indicate one of several affine MVP candidates included in a list of affine motion vector prediction (MVP) candidates for the current block.
[0393] The decoding device configures an affine motion vector prediction term (MVP) candidate list for the current block (S2610). The decoding device can be configured with an affine MVP candidate list that includes affine MVP candidates for the current block. The maximum number of affine MVP candidates in the affine MVP candidate list can be 2.
[0394] Additionally, as an example, the affine MVP candidate list can include inherited affine MVP candidates. The decoding device can check if inherited affine MVP candidates for the current block are available, and when they are available, they can derive them. For example, inherited affine MVP candidates can be derived based on neighboring blocks of the current block, and the maximum number of inherited affine MVP candidates can be 2. Neighboring blocks can be checked for availability in a specific order, and inherited affine MVP candidates can be derived based on the detected available neighboring blocks. That is, neighboring blocks can be checked for availability in a specific order, and a first inherited affine MVP candidate can be derived based on the first neighboring block checked as available, and a second inherited affine MVP candidate can be derived based on the second neighboring block checked as available. Available can mean that the block is encoded using an affine motion model and its reference image is the same as the reference image of the current block. That is, available neighboring blocks are neighboring blocks encoded using an affine motion model (i.e., affine prediction is applied to them) and whose reference images are the same as the reference image of the current block. Specifically, the decoding device can derive the motion vector for the CP of the current block based on the affine motion model of the first neighboring block that has been checked as available, and can derive the first inherited affine MVP candidate including the motion vector as a CPMVP candidate. Additionally, the decoding device can derive the motion vector for the CP of the current block based on the affine motion model of the second neighboring block that has been checked as available, and can derive the second inherited affine MVP candidate including the motion vector as a CPMVP candidate. The affine motion model can be derived as shown in Equation 1 or Equation 3 above.
[0395] In other words, neighboring blocks can be checked for certain conditions in a specific order, and inherited affine MVP candidates can be derived based on neighboring blocks that have been checked to meet the specific conditions. That is, neighboring blocks can be checked for certain conditions in a specific order, and a first inherited affine MVP candidate can be derived based on the first neighboring block checked to meet the specific conditions, and a second inherited affine MVP candidate can be derived based on the second neighboring block checked to meet the specific conditions. Specifically, the decoding device can derive the motion vector of the CP for the current block based on the affine motion model of the first neighboring block checked to meet the specific conditions, and can derive the first inherited affine MVP candidate including the motion vector as a CPMVP candidate. In addition, the decoding device can derive the motion vector of the CP for the current block based on the affine motion model of the second neighboring block checked to meet the specific conditions, and can derive the second inherited affine MVP candidate including the motion vector as a CPMVP candidate. The affine motion model can be derived as shown in Equation 1 or Equation 3 above. Furthermore, the specific conditions can indicate that the block is encoded using the affine motion model and the reference image of the neighboring block is the same as the reference image of the current block. That is, a neighboring block that meets certain conditions is a neighboring block that is encoded by an affine motion model (i.e., affine prediction is applied to it) and whose reference image is the same as the reference image of the current block.
[0396] Here, for example, neighboring blocks can include the current block's left neighbor, top neighbor, top right neighbor, bottom left neighbor, and top left neighbor. In this case, a specific order could be from the left neighbor to the bottom left neighbor to the top neighbor to the top right neighbor and then to the top left neighbor.
[0397] Alternatively, for example, the neighboring blocks may consist only of the left neighboring block and the top neighboring block. In this case, the specific order could be from the left neighboring block to the top neighboring block.
[0398] Alternatively, for example, a neighboring block may include only the left neighboring block, and a neighboring block may also include the upper neighboring block when the upper neighboring block is included in the current CTU that includes the current block. In this case, the specific order may be from the left neighboring block to the upper neighboring block. Additionally, a neighboring block may not include the upper neighboring block when the upper neighboring block is not included in the current CTU. In this case, only the left neighboring block may be checked.
[0399] Furthermore, if the size is WxH, and the x-component of the top-left sample position of the current block is 0 and its y-component is 0, then the bottom-left neighboring block can be the block that includes the sample at coordinates (-1, H); the left neighboring block can be the block that includes the sample at coordinates (-1, H-1); the top-right neighboring block can be the block that includes the sample at coordinates (W, -1); the top neighboring block can be the block that includes the sample at coordinates (W-1, -1); and the top-left neighboring block can be the block that includes the sample at coordinates (-1, -1). That is, the left neighboring block can be the bottom left neighboring block among the left neighboring blocks of the current block, and the top neighboring block can be the leftmost top neighboring block among the top neighboring blocks of the current block.
[0400] Additionally, as an example, the affine MVP candidate list can include constructed affine MVP candidates when they are available. The decoding device can check if constructed affine MVP candidates for the current block are available, and if so, can derive them. Alternatively, for example, constructed affine MVP candidates can be derived after inherited affine MVP candidates have been derived. The affine MVP candidate list can include constructed affine MVP candidates when the number of derived affine MVP candidates (i.e., inherited affine MVP candidates) is less than 2 and constructed affine MVP candidates are available. Here, constructed affine MVP candidates can include candidate motion vectors for the CP. Constructed affine MVP candidates can be available when all candidate motion vectors are available.
[0401] For example, when applying a 4-affine motion model to the current block, the current block's CP can include CP0 and CP1. When motion vectors for CP0 and CP1 are available, the constructed affine MVP candidates can be available, and the affine MVP candidate list can include the constructed affine MVP candidates. Here, CP0 can represent the top-left position of the current block, and CP1 can represent the top-right position of the current block.
[0402] The constructed affine MVP candidate can include candidate motion vectors for CP0 and candidate motion vectors for CP1. The candidate motion vector for CP0 can be the motion vector of the first block, and the candidate motion vector for CP1 can be the motion vector of the second block.
[0403] Additionally, the first block can be the first block whose reference image is the same as the reference image of the current block while checking neighboring blocks in the first group in a first specific order. That is, the candidate motion vector for CP1 can be the motion vector of the first block whose reference image is the same as the reference image of the current block while checking neighboring blocks in the first group in a first specific order. "Useful" can indicate the existence of a neighboring block and that neighboring block is encoded during inter-frame prediction. Here, the candidate motion vector for CP0 can be available when the reference image of the first block in the first group is the same as the reference image of the current block. Furthermore, for example, the first group can include neighboring block A, neighboring block B, and neighboring block C, and the first specific order can be from neighboring block A to neighboring block B and then to neighboring block C.
[0404] Additionally, the second block can be the first block identified as having the same reference image as the current block while its neighboring blocks in the second group are checked in a second specific order. Here, when the reference image of the second block in the second group is the same as the reference image of the current block, the candidate motion vector for CP1 can be available. Furthermore, for example, the second group can include neighboring blocks D and E, and the second specific order can be from neighboring block D to neighboring block E.
[0405] Furthermore, 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 its y-component is 0, then neighboring block A can be the block that includes the sample at coordinates (-1, -1); neighboring block B can be the block that includes the sample at coordinates (0, -1); neighboring block C can be the block that includes the sample at coordinates (-1, 0); neighboring block D can be the block that includes the sample at coordinates (W-1, -1); and neighboring block E can be the block that includes the sample at coordinates (W, -1). That is, neighboring block A can be the top-left neighboring block of the current block; neighboring block B can be the leftmost top neighboring block among the top neighboring blocks of the current block; neighboring block C can be the topmost left neighboring block among the left neighboring blocks of the current block; neighboring block D can be the rightmost top neighboring block among the top neighboring blocks of the current block; and neighboring block E can be the top-right neighboring block of the current block.
[0406] Furthermore, the constructed affine MVP candidate may be unavailable if at least one of the candidate motion vectors of CP0 and CP1 is unavailable.
[0407] Alternatively, for example, when applying a 6-affine motion model to the current block, the CP of the current block may include CP0, CP1, and CP2. The constructed affine MVP candidate may be available when motion vectors for CP0, CP1, and CP2 are available, and the list of affine MVP candidates may include the constructed affine MVP candidates. Here, CP0 may represent the top-left position of the current block; CP1 may represent the top-right position of the current block; and CP2 may represent the bottom-left position of the current block.
[0408] The constructed affine MVP candidates can include candidate motion vectors for CP0, candidate motion vectors for CP1, and candidate motion vectors for CP2. The candidate motion vectors for CP0 can be the motion vectors of the first block, the candidate motion vectors for CP1 can be the motion vectors of the second block, and the candidate motion vectors for CP2 can be the motion vectors of the third block.
[0409] Additionally, the first block can be the first block identified as having the same reference image as the reference image of the current block while checking neighboring blocks in the first group in a first specific order. Here, when the reference image of the first block in the first group is the same as the reference image of the current block, candidate motion vectors for CP0 can be available. Furthermore, for example, the first group can include neighboring block A, neighboring block B, and neighboring block C, and the first specific order can be from neighboring block A to neighboring block B and then to neighboring block C.
[0410] Additionally, the second block can be the first block identified as having the same reference image as the current block while its neighboring blocks in the second group are checked in a second specific order. Here, when the reference image of the second block in the second group is the same as the reference image of the current block, the candidate motion vector for CP1 can be available. Furthermore, for example, the second group can include neighboring blocks D and E, and the second specific order can be from neighboring block D to neighboring block E.
[0411] Additionally, the third block can be the first block identified as having the same reference image as the current block while checking neighboring blocks in the third group in a third specific order. Here, candidate motion vectors for CP2 can be available when the reference image of the third block in the third group is the same as the reference image of the current block. Furthermore, for example, the third group can include neighboring blocks F and G, and the third specific order can be from neighboring block F to neighboring block G.
[0412] Furthermore, 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 its y-component is 0, then neighboring block A can be a block that includes the sample at coordinate (-1, -1); neighboring block B can be a block that includes the sample at coordinate (0, -1); neighboring block C can be a block that includes the sample at coordinate (-1, 0); neighboring block D can be a block that includes the sample at coordinate (W-1, -1); neighboring block E can be a block that includes the sample at coordinate (W, -1); neighboring block F can be a block that includes the sample at coordinate (-1, H-1); and neighboring block G can be a block that includes the sample at coordinate (-1, H). That is, neighboring block A can be the top-left neighboring block of the current block; neighboring block B can be the leftmost top neighboring block among the top neighboring blocks of the current block; neighboring block C can be the top left neighboring block among the left neighboring blocks of the current block; neighboring block D can be the rightmost top neighboring block among the top neighboring blocks of the current block; neighboring block E can be the top-right neighboring block of the current block; neighboring block F can be the bottom left neighboring block among the left neighboring blocks of the current block; and neighboring block G can be the bottom-left neighboring block of the current block.
[0413] Furthermore, the constructed affine MVP candidate may be unavailable if at least one of the candidate motion vectors of CP0, CP1, and CP2 is unavailable.
[0414] Subsequently, the affine MVP candidate list can be derived in a specific order based on the following steps.
[0415] For example, when the number of derived affine MVP candidates is less than 2 and motion vectors for CP0 are available, the decoding device can derive a first affine MVP candidate. Here, the first affine MVP candidate can be an affine MVP candidate that includes candidate motion vectors for CP0 as candidate motion vectors for CP.
[0416] Additionally, for example, when the number of derived affine MVP candidates is less than 2 and motion vectors for CP1 are available, the decoding device can derive a second affine MVP candidate. Here, the second affine MVP candidate can be an affine MVP candidate that includes candidate motion vectors for CP1 as candidate motion vectors for CP.
[0417] Additionally, for example, when the number of derived affine MVP candidates is less than 2 and motion vectors for CP2 are available, the decoding device can derive a third affine MVP candidate. Here, the third affine MVP candidate can be an affine MVP candidate that includes candidate motion vectors for CP2 as candidate motion vectors for CP.
[0418] Additionally, for example, when the number of derived affine MVP candidates is less than two, the decoding device can derive a fourth affine MVP candidate, which includes a temporal MVP derived from the temporally neighboring block of the current block as a candidate motion vector for the CP. A temporally neighboring block can represent a juxtaposed block in the juxtaposed image corresponding to the current block. The temporal MVP can be derived based on the motion vector of the temporally neighboring block.
[0419] Additionally, for example, when the number of derived affine MVP candidates is less than 2, the decoding device can derive a fifth affine MVP candidate, which includes a zero motion vector as a candidate motion vector for the CP. A zero motion vector can represent a motion vector whose value is zero.
[0420] The decoding device derives the control point motion vector prediction term (CPMVP) for the control point (CP) of the current block based on the affine MVP candidate list (S2620).
[0421] The decoding device can select a specific affine MVP candidate from the affine MVP candidate list and derive the selected affine MVP candidate as a CPMVP for the current block's CP. For example, the decoding device can obtain the affine MVP candidate index for the current block from the bitstream and derive the affine MVP candidate indicated by the affine MVP candidate index from the affine MVP candidate list as a CPMVP for the current block's CP. Specifically, when the affine MVP candidate includes a candidate motion vector for CP0 and a candidate motion vector for CP1, the candidate motion vector for CP0 can be derived as a CPMVP for CP0, and the candidate motion vector for CP1 can be derived as a CPMVP for CP1. Furthermore, when an affine MVP candidate includes candidate motion vectors for CP0, candidate motion vectors for CP1, and candidate motion vectors for CP2, the candidate motion vectors for CP0 can be derived as the CPMVP for CP0, the candidate motion vectors for CP1 can be derived as the CPMVP for CP1, and the candidate motion vectors for CP2 can be derived as the CPMVP for CP2.
[0422] The decoding device derives the control point motion vector difference (CPMVD) for the current block's CP based on motion prediction information (S2630). The motion prediction information may include information about the CPMVD for the corresponding CP, and the decoding device can derive the CPMVD for the current block's corresponding CP based on the information about the CPMVD for the corresponding CP.
[0423] The decoding device derives the control point motion vector (CPMV) for the current block's CP based on CPMVP and CPVMD (S2640). The decoding device can derive the CPMV for each CP based on the CPMVD and CPMVP for the corresponding CP. For example, the decoding device can derive the CPMV for each CP by adding the CPMVD and CPMVP for each CP.
[0424] The decoding device can derive the predicted sample for the current block based on the CPMV (S2650). The decoding device can also derive the motion vectors of the sub-block units or sample units of the current block based on the CPMV. That is, the decoding device can derive the motion vectors of each sub-block or sample of the current block based on the CPMV. The motion vectors of the sub-block units or sample units can be derived based on Equation 1 or Equation 3 above. The motion vectors can be represented as an affine motion vector field (MVF) or a motion vector array.
[0425] The decoding device can derive a predicted sample for the current block based on the motion vectors of sub-block units or sample units. The decoding device can also derive a reference region in a reference image based on the motion vectors of sub-block units or sample units, and generate a predicted sample for the current block based on the reconstructed samples in the reference region.
[0426] The decoding device generates a reconstructed image for the current block based on the derived prediction samples (S2660). The decoding device can generate a reconstructed image for the current block based on the derived prediction samples. The decoding device can directly use the prediction samples as reconstructed samples according to the prediction mode, or it can generate reconstructed samples by adding residual samples to the prediction samples. If residual samples exist for the current block, the decoding device can obtain information about the residuals for the current block from the bitstream. The information about the residuals may include transform coefficients associated with the residual samples. The decoding device can derive residual samples (or an array of residual samples) for the current block based on the information about the residuals. The decoding device can generate reconstructed samples based on the prediction samples and residual samples, and derive a reconstructed block or reconstructed image based on the reconstructed samples. Thereafter, as described above, the decoding device can apply ring filtering processes such as SAO and / or deblocking filtering to the reconstructed image to improve subjective / objective video quality as needed.
[0427] Figure 27A decoding device for performing an image decoding method according to this document is illustrated schematically. Figure 26 The method disclosed in the article can be derived from Figure 27 The decoding device disclosed in the document performs the operation. Specifically, for example, Figure 27 The entropy decoder of the decoding device can perform Figure 26 The S2600; Figure 27 The predictor of the decoding device can perform Figure 26 S2610 to S2650; and Figure 27 The adder of the decoding device can perform Figure 26 The S2660. Additionally, although not shown, the processing of obtaining image information, including residual information about the current block, via a bitstream can be performed by... Figure 27 The entropy decoder of the decoding device performs the processing, and the processing of deriving residual samples for the current block based on residual information can be performed by... Figure 27 The inverse converter of the decoding device is executed.
[0428] According to the above document, the efficiency of image coding can be improved based on affine motion prediction.
[0429] Furthermore, according to this document, when exporting the affine MVP candidate list, a constructed affine MVP candidate can only be added if all candidate motion vectors for the CP of the constructed affine MVP candidate are available. This reduces the complexity of exporting the constructed affine MVP candidate and configuring the affine MVP candidate list, and improves coding efficiency.
[0430] Furthermore, according to this document, when exporting the affine MVP candidate list, additional affine MVP candidates can be exported based on the candidate motion vectors for CP exported in the process of exporting the constructed affine MVP candidates. This can reduce the complexity of the process of configuring the affine MVP candidate list and improve coding efficiency.
[0431] Furthermore, according to this document, in the process of deriving inherited affine MVP candidates, the upper neighbor block can only be used to derive inherited affine MVP candidates when the upper neighbor block is included in the current CTU. This reduces the storage of the row buffer used for affine prediction and minimizes hardware costs.
[0432] In the above embodiments, the method is explained based on a flowchart using a series of steps or blocks. However, this document is not limited to the order of the steps, and specific steps may occur in different orders or be sent simultaneously with other steps besides those described above. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, and one or more steps in the flowchart may be incorporated or removed without affecting the scope of this document.
[0433] Furthermore, the embodiments described in this document can be implemented and executed on a processor, microprocessor, controller, or chip. Additionally, the functional units shown in each figure can be implemented and executed on a processor, microprocessor, controller, or chip. In this case, the information or algorithms used for implementation (e.g., information about instructions) can be stored in a digital storage medium.
[0434] Furthermore, the decoding and encoding devices using this document can be included in multimedia broadcast transceivers, mobile communication terminals, home theater video devices, digital cinema video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, cameras, video-on-demand (VoD) service providers, over-the-top (OTT) video devices, internet streaming service providers, three-dimensional (3D) video devices, video telephony devices, transportation terminals (e.g., vehicle terminals, aircraft terminals, ship terminals, etc.), and medical video devices, and can be used to process video signals or data signals. For example, over-the-top (OTT) video devices can include game consoles, Blu-ray players, internet access TVs, home theater systems, smartphones, tablet PCs, digital video recorders (DVRs), etc.
[0435] Furthermore, the processing methods described in this document can be generated in the form of a computer-executable program and stored in a computer-readable recording medium. Multimedia data with a data structure according to this document can also be stored in a computer-readable recording medium. Computer-readable recording media include all types of storage devices and distributed storage devices in which computer-readable data is stored. Computer-readable recording media can include, for example, Blu-ray discs (BD), Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disks, and optical data storage devices. Additionally, computer-readable recording media also include media implemented in the form of a carrier (e.g., transmission over the Internet). Furthermore, bitstreams generated by encoding methods can be stored in computer-readable recording media or transmitted via wired or wireless communication networks.
[0436] Furthermore, the embodiments described in this document can be implemented as a computer program product using program code, and the program code can be executed on a computer using the embodiments described in this document. The program code can be stored on a computer-readable medium.
[0437] Figure 28 Examples of content streaming systems that can apply the implementation methods disclosed in this document are presented.
[0438] Reference Figure 28 The content streaming system implemented using the methods described in this document may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.
[0439] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data to generate a bitstream, and then sends the bitstream to a streaming server. As another example, when multimedia input devices such as smartphones, cameras, and camcorders directly generate bitstreams, the encoding server can be omitted.
[0440] Bitstreams can be generated using the encoding method or bitstream generation method described in this document, and the streaming server can temporarily store the bitstreams during the sending or receiving of bitstreams.
[0441] A streaming server sends multimedia data to a user's device via a web server based on a user's request, and the web server acts as a medium for informing the user of services. When a user requests a desired service from the web server, the web server forwards it to the streaming server, and the streaming server sends the multimedia data to the user. In this scenario, the content streaming system may include a separate control server. In this case, the control server is used to control the commands / responses between devices in the content streaming system.
[0442] A streaming server can receive content from media storage and / or encoding servers. For example, when content is received from an encoding server, it can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a predetermined period of time.
[0443] Examples of user devices may include mobile phones, smartphones, laptops, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigators, touchscreen PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, head-mounted displays), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system can operate as a distributed server, in which case data received from each server can be distributed.
[0444] In a content streaming system, each server can operate as a distributed server, in which case the data received by each server can be processed in a distributed manner.
Claims
1. A decoding device for image decoding, the decoding device comprising: Memory; as well as At least one processor, connected to the memory, is configured to: Obtain information about the control point motion vector difference (CPMVD) and the MVP index of the motion vector prediction term from the bitstream; The configuration includes a list of affine MVP candidates for the current block; The control point motion vector prediction term CPMVP for the current block is derived based on the information about the MVP index from the affine MVP candidate list. Derive the CPMVD for the current block based on the information about the CPMVD; Based on the CPMVP and the CPMVD, derive the control point motion vector CPMV for the CP of the current block; Based on the CPMV, a prediction sample for the current block is derived; as well as Based on the predicted samples, a reconstructed image for the current block is generated. Specifically, based on the availability of a first affine MVP candidate, the first affine MVP candidate is derived as the affine MVP candidate. Specifically, the first affine MVP candidate is available if the first block in the left block group is encoded using an affine motion model and the reference image of the first block is the same as the reference image of the current block. Specifically, based on the availability of a second affine MVP candidate, the second affine MVP candidate is derived as the affine MVP candidate. Specifically, based on encoding the second block in the upper block group using the affine motion model and the reference image of the second block being the same as the reference image of the current block, the second affine MVP candidate is available. Specifically, if the number of affine MVP candidates is less than 2 and a third affine MVP candidate is available, the third affine MVP candidate is derived as the affine MVP candidate. Specifically, based on deriving the first motion vector for CP0, the second motion vector for CP1, and the third motion vector for CP2 of the current block from the upper left block group, the upper right block group, and the lower left block group of the current block, respectively, the third affine MVP candidate is available. The upper left block group includes the upper left neighboring block of the current block, a first left neighboring block adjacent to the lower side of the upper left neighboring block, and a first upper neighboring block adjacent to the right side of the upper left neighboring block. The upper right block group includes the upper right corner neighboring block and the second upper neighboring block that is adjacent to the upper right corner neighboring block on its left. The lower left block group includes the lower left corner neighbor block and a second left neighbor block adjacent to the upper side of the lower left corner neighbor block. Wherein, based on the fact that the number of affine MVP candidates is less than 2 and the third motion vector for CP2 included in the third affine MVP candidate is available, the fourth affine MVP candidate is derived as the affine MVP candidate, and The fourth affine MVP candidate includes the third motion vector for CP2 included in the third affine MVP candidate as the first motion vector for CP0, the second motion vector for CP1, and the third motion vector for CP2.
2. An encoding device for image encoding, the encoding device comprising: Memory; as well as At least one processor, connected to the memory, is configured to: The configuration includes a list of affine MVP candidates for the affine motion vector prediction term MVP candidates for the current block; Based on the affine MVP candidate list, derive the control point motion vector prediction term CPMVP for the control point CP of the current block; Export the control point motion vector CPMV for the current block's CP; Based on the CPMVP and the CPMV, derive the control point motion vector difference CPMVD for the CP of the current block; and Information about the CPMVD and information about the MVP index related to the CPMVD are encoded. Specifically, based on the availability of a first affine MVP candidate, the first affine MVP candidate is derived as the affine MVP candidate. Specifically, the first affine MVP candidate is available if the first block in the left block group is encoded using an affine motion model and the reference image of the first block is the same as the reference image of the current block. Specifically, based on the availability of a second affine MVP candidate, the second affine MVP candidate is derived as the affine MVP candidate. Specifically, based on encoding the second block in the upper block group using the affine motion model and the reference image of the second block being the same as the reference image of the current block, the second affine MVP candidate is available. Specifically, if the number of affine MVP candidates is less than 2 and a third affine MVP candidate is available, the third affine MVP candidate is derived as the affine MVP candidate. Specifically, based on deriving the first motion vector for CP0, the second motion vector for CP1, and the third motion vector for CP2 of the current block from the upper left block group, the upper right block group, and the lower left block group of the current block, respectively, the third affine MVP candidate is available. The upper left block group includes the upper left neighboring block of the current block, a first left neighboring block adjacent to the lower side of the upper left neighboring block, and a first upper neighboring block adjacent to the right side of the upper left neighboring block. The upper right block group includes the upper right corner neighboring block and the second upper neighboring block that is adjacent to the upper right corner neighboring block on its left. The lower left block group includes the lower left corner neighbor block and a second left neighbor block adjacent to the upper side of the lower left corner neighbor block. Wherein, based on the fact that the number of affine MVP candidates is less than 2 and the third motion vector for CP2 included in the third affine MVP candidate is available, the fourth affine MVP candidate is derived as the affine MVP candidate, and The fourth affine MVP candidate includes the third motion vector for CP2 included in the third affine MVP candidate as the first motion vector for CP0, the second motion vector for CP1, and the third motion vector for CP2.
3. An apparatus for transmitting image data, the apparatus comprising: At least one processor is configured to obtain a bitstream of the image, wherein the bitstream is generated based on the following operations: configuring an affine MVP candidate list including affine motion vector prediction term (MVP) candidates for a current block; deriving a control point motion vector prediction term (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 difference (CPMVD) for the CP of the current block based on the CPMVP and the CPMV; and encoding information about the CPMVD and information about an MVP index associated with the CPMVP; and A transmitter configured to transmit the data comprising the bit stream. Specifically, based on the availability of a first affine MVP candidate, the first affine MVP candidate is derived as the affine MVP candidate. Specifically, the first affine MVP candidate is available if the first block in the left block group is encoded using an affine motion model and the reference image of the first block is the same as the reference image of the current block. Specifically, based on the availability of a second affine MVP candidate, the second affine MVP candidate is derived as the affine MVP candidate. Specifically, based on encoding the second block in the upper block group using the affine motion model and the reference image of the second block being the same as the reference image of the current block, the second affine MVP candidate is available. Specifically, if the number of affine MVP candidates is less than 2 and a third affine MVP candidate is available, the third affine MVP candidate is derived as the affine MVP candidate. Specifically, based on deriving the first motion vector for CP0, the second motion vector for CP1, and the third motion vector for CP2 of the current block from the upper left block group, the upper right block group, and the lower left block group of the current block, respectively, the third affine MVP candidate is available. The upper left block group includes the upper left neighboring block of the current block, a first left neighboring block adjacent to the lower side of the upper left neighboring block, and a first upper neighboring block adjacent to the right side of the upper left neighboring block. The upper right block group includes the upper right corner neighboring block and the second upper neighboring block that is adjacent to the upper right corner neighboring block on its left. The lower left block group includes the lower left corner neighbor block and a second left neighbor block adjacent to the upper side of the lower left corner neighbor block. Wherein, based on the fact that the number of affine MVP candidates is less than 2 and the third motion vector for CP2 included in the third affine MVP candidate is available, the fourth affine MVP candidate is derived as the affine MVP candidate, and The fourth affine MVP candidate includes the third motion vector for CP2 included in the third affine MVP candidate as the first motion vector for CP0, the second motion vector for CP1, and the third motion vector for CP2.