Image decoding method and apparatus using bi-prediction
The video decoding method optimizes bi-prediction and affine merge candidates to enhance image coding efficiency, addressing the challenges of high-resolution and immersive media data compression, transmission, and storage.
Patent Information
- Application Number
- JP2023070080
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-06-24
- Filing Date
- 2023-04-21
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-06-24
AI Technical Summary
The increasing demand for high-resolution and high-quality images/videos, such as 4K or 8K UHD, and immersive media like VR and AR, has led to challenges in efficiently compressing, transmitting, and storing image/video data, resulting in higher costs and inefficiencies in existing media technologies.
A video decoding method that includes deriving weight index information for bi-prediction and affine merge candidates, optimizing the construction of merge candidate lists during inter-prediction to enhance image coding efficiency.
Improves overall image/video compression efficiency by efficiently constructing motion vector candidates and performing weight-based bi-prediction, thereby reducing transmission and storage costs.
Smart Images

Figure 0007571189000063 
Figure 0007571189000064 
Figure 0007571189000065
Abstract
Description
[Technical field]
[0001] The present technology relates to a video decoding method and an apparatus therefor that apply bi-prediction. [Background technology]
[0002] In recent years, the demand for high-resolution, high-quality images / videos such as 4K or 8K or higher UHD (Ultra High Definition) images / videos is increasing in various fields. As the image / video data has higher resolution and quality, the amount of information or bits to be transmitted increases relatively compared to existing image / video data, so that when image data is transmitted using a medium such as an existing wired or wireless broadband line or image / video data is stored using an existing storage medium, the transmission cost and storage cost increase.
[0003] In addition, in recent years, interest in and demand for immersive media such as virtual reality (VR), artificial reality (AR) content, and holograms has been increasing, and the broadcast of images / videos having different image characteristics from real images, such as game images, has been increasing.
[0004] Therefore, there is a demand for highly efficient image / video compression technology to effectively compress and transmit, store, and play back high-resolution, high-quality image / video information having the various characteristics described above. Summary of the Invention [Problem to be solved by the invention]
[0005] The technical problem of this document is to provide a method and apparatus for increasing image coding efficiency.
[0006] Another technical problem of this document is to provide a method and apparatus for deriving weight index information for bi-prediction in inter prediction.
[0007] Yet another technical problem of this document is to provide a method and apparatus for deriving weighted index information for candidates in an affine merge candidate list during bi-prediction. [Means for solving the problem]
[0008] According to an embodiment of the present document, there is provided a video decoding method performed by a decoding device, the method including the steps of: acquiring video information including inter prediction mode information through a bitstream; generating a merge candidate list for a current block based on the inter prediction mode information; selecting one of the candidates included in the merge candidate list; and generating a predicted sample for the current block based on the selected candidate and weight index information for the selected candidate, the candidates including a constructed affine merge candidate, and if a motion vector for a control point CP0 located at an upper left side of the current block is available in the constructed affine merge candidate, weight index information for the constructed affine merge candidate is derived based on weight index information for the CP0, and if a motion vector for a control point CP0 located at an upper left side of the current block is not available in the constructed affine merge candidate, weight index information for the constructed affine merge candidate is derived based on weight index information for a control point CP1 located at an upper right side of the current block.
[0009] According to another embodiment of the present document, there is provided a video encoding method performed by an encoding device. the inter prediction mode information indicating the inter prediction mode; generating a merge candidate list for the current block based on the inter prediction mode; generating selection information indicating one of the candidates included in the merge candidate list; generating a predicted sample for the current block based on the selected candidate and weighted value index information for the selected candidate; and encoding image information including the inter prediction mode information and the selection information, wherein the candidates include a constructed affine merge candidate, and if a motion vector for a control point CP0 located at an upper left side of the current block is available in the constructed affine merge candidate, weighted value index information for the constructed affine merge candidate is indicated based on weighted value index information for the CP0, and if a motion vector for a control point CP0 located at an upper left side of the current block is not available in the constructed affine merge candidate, weighted value index information for the constructed affine merge candidate is indicated based on weighted value index information for the CP0.
[0010] According to yet another embodiment of the present document, there is provided a computer-readable digital storage medium having stored thereon a bitstream including video information for causing a decoding device to perform a video decoding method. The image decoding method includes the steps of: obtaining image information including inter prediction mode information via a bitstream; generating a merge candidate list for a current block based on the inter prediction mode information; selecting one of the candidates included in the merge candidate list; and generating a predicted sample for the current block based on the selected candidate and weighted value index information for the selected candidate, wherein the candidates include a constructed affine merge candidate, and if a motion vector for a control point CP0 located at an upper left side of the current block is available in the constructed affine merge candidate, weighted value index information for the constructed affine merge candidate is derived based on weighted value index information for the CP0, and if a motion vector for a control point CP0 located at an upper left side of the current block is not available in the constructed affine merge candidate, weighted value index information for the constructed affine merge candidate is derived based on weighted value index information for the control point CP1 located at an upper right side of the current block. Effect of the Invention
[0011] According to this document, the overall image / video compression efficiency can be improved.
[0012] According to this document, motion vector candidates can be efficiently constructed during inter prediction.
[0013] According to this document, weighted value-based bi-prediction can be performed efficiently. [Brief description of the drawings]
[0014] [Figure 1]1 illustrates generally an example of a video / image coding system in which embodiments of the present document may be applied; [Diagram 2] FIG. 1 is a diagram illustrating the configuration of a video / image encoding device to which the embodiments of this document can be applied. [Diagram 3] FIG. 1 is a diagram illustrating the configuration of a video / image decoding device to which an embodiment of the present document can be applied. [Figure 4] FIG. 13 is a diagram for explaining a merge mode in inter prediction. [Figure 5a] 13 illustrates an exemplary CPMV for affine motion prediction. [Figure 5b] 13 illustrates an exemplary CPMV for affine motion prediction. [Figure 6] A case where the affine MVF is determined on a sub-block basis is illustrated as an example. [Figure 7] FIG. 13 is a diagram for explaining an affine merge mode in inter prediction. [Figure 8] FIG. 13 is a diagram for explaining the positions of candidates in the affine merge mode. [Figure 9] FIG. 13 is a diagram for explaining SbTMVP in inter prediction. [Figure 10] 13 is a diagram showing control points for constructed affine merge candidates. [Figure 11] 1 illustrates a schematic diagram of an example video / image encoding method and associated components according to embodiments of the present document. [Figure 12] 1 illustrates a schematic diagram of an example video / image encoding method and associated components according to embodiments of the present document. [Figure 13] 1 illustrates a schematic diagram of an example of a picture / video decoding method and related components according to an embodiment of the present document. [Figure 14] 1 illustrates a schematic diagram of an example of a picture / video decoding method and related components according to an embodiment of the present document. [Figure 15] 1 illustrates an example of a content streaming system to which the embodiments disclosed herein may be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0015] The present disclosure may have various modifications and various embodiments, and a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit the present disclosure to a specific embodiment. Terms commonly used in this document are used merely to describe a specific embodiment, and are not intended to limit the technical idea of the present disclosure. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this specification, the terms "include" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0016] Meanwhile, each configuration in the drawings described in this disclosure is illustrated independently for the convenience of describing different characteristic functions, and does not mean that each configuration is realized by separate hardware or software. For example, two or more of each configuration may be combined to form one configuration, and one configuration may be divided into multiple configurations. An embodiment in which each configuration is integrated and / or separated is also included in the scope of the present disclosure as long as it does not deviate from the essence of this document.
[0017] As used herein, "A or B" can mean "A only," "B only," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B or C" can mean "A only," "B only," "C only," or "any combination of A, B and C."
[0018] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Thus, "A / B" can mean "A only," "B only," or "both A and B." For example, "A, B, C" can mean "A, B, or C."
[0019] In this specification, "at least one of A and B" can mean "A only," "B only," or "both A and B." In addition, in this specification, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted similarly to "at least one of A and B."
[0020] In addition, in this specification, "at least one of A, B and C" can mean "A only," "B only," "C only," or "any combination of A, B and C." Furthermore, "at least one of A, B or C" and "at least one of A, B and / or C" can mean "at least one of A, B and C."
[0021] Furthermore, parentheses used in this specification may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra prediction," and "intra prediction" is proposed as an example of "prediction." Furthermore, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction."
[0022] Technical features described individually in one drawing in this specification can be realized individually or simultaneously.
[0023] Hereinafter, preferred embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals are used for the same components in the drawings, and duplicated descriptions of the same components may be omitted.
[0024] FIG. 1 illustrates generally an example of a video / image coding system to which the present disclosure may be applied.
[0025] As shown in Figure 1, the video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in a file or streaming form via a digital storage medium or a network.
[0026] The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device 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 also include a display unit, which may be a separate device or an external component.
[0027] A video source may acquire video / images through a video / image capture, synthesis, or generation process, etc. A video source may include a video / image capture device and / or a video / image generation device. A video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device may include, for example, a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process in which related data is generated.
[0028] An encoding device can encode an input video / image. The encoding device can perform a series of steps such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0029] The transmitting unit can transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit can include elements for generating a media file through a predetermined file format and can include elements for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.
[0030] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, prediction, etc., which correspond to the operations of the encoding device.
[0031] The renderer can render the decoded video / images. The rendered video / images can be displayed via a display unit.
[0032] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation of audio video coding standard (AVS2), or the next generation video / image coding standard (ex. H.267 or H.268, etc.).
[0033] In this document, various embodiments relating to video / image coding are presented, which, unless otherwise stated, may also be implemented in combination with each other.
[0034] In this document, video can mean a collection of a series of images over time. A picture generally means a unit that shows one image at a specific time, and a slice / tile is a unit that constitutes a part of a picture in coding. A slice / tile can include one or more coding tree units (CTUs). One picture can be composed of one or more slices / tiles.
[0035] A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set. The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture.A tile scan can represent a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice can include multiple complete tiles or multiple consecutive CTU rows in one tile of a picture that can be included in one NAL unit. Tile group and slice can be used interchangeably in this document. For example, tile group / tile group header can be referred to as slice / slice header in this document.
[0036] On the other hand, a picture can be partitioned into two or more sub-pictures, where a sub-picture can be a rectangular region of one or more slices within a picture.
[0037] A pixel or a pel may refer to the smallest unit that constitutes one picture (or image). A term corresponding to a pixel may also be used as a "sample." A sample may generally refer to a pixel or a pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. Alternatively, a sample may refer to a pixel value in the spatial domain, or may refer to a transform coefficient in the frequency domain when such a pixel value is transformed into the frequency domain.
[0038] A unit may indicate a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. A unit may be used in combination with terms such as block or area, depending on the case. In a general case, an M×N block may include a sample (or sample array) consisting of M columns and N rows, or a set (or array) of transform coefficients.
[0039] 2 is a diagram for explaining the schematic configuration of a video / image encoding device to which the present disclosure can be applied. Hereinafter, the video encoding device may include an image encoding device.
[0040] As shown in FIG. 2, the encoding device 200 may be configured to include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter prediction unit 221 and an intra prediction unit 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image division unit 210, the prediction unit 220, the residual processing unit 230, the entropy encoding unit 240, the addition unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chip set or a processor) according to an embodiment. In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.
[0041] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree binary-tree ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as necessary, and a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU: Prediction Unit) or a transform unit (TU: Transform Unit). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit described above.The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0042] The unit may be used interchangeably with terms such as block or area. In general, an M×N block may refer to a collection of samples or transform coefficients consisting of M columns and N rows. A sample may generally refer to a pixel or pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. A sample may be used as a term that corresponds to a pixel or pel of one picture (or image).
[0043] The encoding device 200 may generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input image signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as illustrated, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input image signal (original block, original sample array) in the encoding device 200 may be called a subtraction unit 231. The prediction unit may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of a current block or a CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0044] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. In the intra prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to the neighboring blocks.
[0045] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between a neighboring block and a current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (col CU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 221 may generate information indicating which candidate is used to construct a motion information candidate list based on neighboring blocks and derive a motion vector and / or a reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 221 may use motion information of neighboring blocks as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the current block can be indicated by using the motion vector of a neighboring block as a motion vector predictor and signaling the motion vector difference.
[0046] The prediction unit 220 may generate a prediction signal based on various prediction methods described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, as well as intra prediction and inter prediction simultaneously. This may be called combined inter and intra prediction (CIIP). The prediction unit may also be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding such as games, for example, screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in that a reference block is derived within the current picture. That is, IBC may utilize at least one of the inter prediction techniques described in this document. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, a sample value within a picture may be signaled based on information regarding a palette table and a palette index.
[0047] The prediction signal generated by the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a restored signal or may be used to generate a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same size of a regular square, and may also be applied to blocks of variable sizes that are not regular squares.
[0048] The quantizer 233 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoder 240, which may encode the quantized signal (information on the quantized transform coefficients) and output the quantized signal to a bitstream. The information on the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoder 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 240 may encode information required for video / image restoration (e.g., values of syntax elements, etc.) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / image information) may be transmitted or stored in the form of a bitstream in units of network abstraction layer (NAL) units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may further include general constraint information. Information and / or syntax elements transmitted / signaled from an encoding device to a decoding device in this document may be included in the video / image information. The video / image information may be encoded through the above-mentioned encoding procedure and included in the bitstream.The bitstream may be transmitted via a network or may be stored in a digital storage medium, where the network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding device 200, or the transmitter may be included in the entropy encoding unit 240.
[0049] The quantized transform coefficients output from the quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be restored by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the current block, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 250 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.
[0050] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.
[0051] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240, as will be described later in the description of each filtering method. The filtering information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0052] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. When inter prediction is applied through this, the encoding device can avoid prediction mismatch between the encoding device 200 and the decoding device, and can also improve encoding efficiency.
[0053] The DPB of the memory 270 may store a modified reconstructed picture for use as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatially neighboring block or motion information of a temporally neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.
[0054] Meanwhile, in this document, at least one of the quantization / dequantization and / or the transform / inverse transform may be omitted. If the quantization / dequantization is omitted, the quantized transform coefficients may be referred to as transform coefficients. If the transform / inverse transform is omitted, the transform coefficients may be referred to as coefficients or residual coefficients, or may still be referred to as transform coefficients for uniformity of expression.
[0055] Also, in this document, the quantized transform coefficients and the transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information may include information on the transform coefficient(s), and the information on the transform coefficient(s) may be signaled via a residual coding syntax. A transform coefficient may be derived based on the residual information (or information on the transform coefficient(s)), and a scaled transform coefficient may be derived through an inverse transform (scaling) on the transform coefficient. A residual sample may be derived based on an inverse transform (transform) on the scaled transform coefficient. This may be similarly applied / expressed in other parts of this document.
[0056] FIG. 3 is a diagram illustrating a schematic configuration of a video / image decoding device to which the present disclosure can be applied.
[0057] As shown in FIG. 3, the decoding device 300 may be configured to 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 intra predictor 331 and an inter predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. The entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured as one hardware component (e.g., a decoder chipset or processor) according to an embodiment. Also, the memory 360 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.
[0058] If a bitstream including video / image information is input, the decoding device 300 can restore an image corresponding to a process in which the video / image information is processed by the encoding device of FIG. 2. For example, the decoding device 300 can derive a unit / block based on block division related information obtained from the bitstream. The decoding device 300 can perform decoding using a processing unit applied in the encoding device. Thus, the processing unit for decoding can be, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. Then, the restored image signal decoded and output by the decoding device 300 can be reproduced by a reproduction device.
[0059] The decoding device 300 may receive a signal output from the encoding device of FIG. 3 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may derive information (ex. video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding device may further decode a picture based on information on the parameter set and / or the general constraint information. Signaling / received information and / or syntax elements described later in this document may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in the bitstream, determine a context model using syntax element information to be decoded and decode information of neighboring and to-be-decoded blocks, or information of symbols / bins decoded in a previous step, predict the occurrence probability of bins according to the determined context model, and perform arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element. In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model.Among the information decoded by the entropy decoding unit 310, information related to prediction is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). Also, among the information decoded by the entropy decoding unit 310, information related to filtering may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document may be called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.
[0060] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement may be performed based on a coefficient scan order performed in the encoding device. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0061] The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0062] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information on the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0063] The prediction unit 330 may generate a prediction signal based on various prediction methods described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). In addition, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding such as games, for example, screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in that a reference block is derived within the current picture. That is, IBC may utilize at least one of the inter prediction techniques described in this document. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / image information and signaled.
[0064] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away from the current block depending on a prediction mode. In intra prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block by using prediction modes applied to neighboring blocks.
[0065] The inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 332 may configure a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes, and the information regarding the prediction may include information indicating a mode of inter prediction for the current block.
[0066] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including an inter prediction unit 332 and / or an intra prediction unit 331). When there is no residual for a current block, such as when a skip mode is applied, the predicted block may be used as a reconstructed block.
[0067] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in a current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0068] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during the picture decoding process.
[0069] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0070] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 332. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 332 to be used as motion information of a spatially neighboring block or motion information of a temporally neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 331.
[0071] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding device 200 can also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding device 300, respectively.
[0072] Meanwhile, as described above, prediction is performed to improve compression efficiency when performing video coding. As a result, a predicted block including predicted samples for a current block, which is a block to be coded, can be generated. Here, the predicted block includes predicted samples in a spatial domain (or a pixel domain). The predicted block is derived in the same way in an encoding device and a decoding device, and the encoding device can improve image coding efficiency by signaling information (residual information) about the residual between the original block and the predicted block, which is not an original sample value of the original block, to the decoding device. The decoding device can derive a residual block including residual samples based on the residual information, and can generate a reconstructed block including reconstructed samples by adding the residual block and the predicted block, and can generate a reconstructed picture including the reconstructed block.
[0073] The residual information may be generated through a transform and quantization procedure. For example, the encoding apparatus may derive a residual block between the original block and the predicted block, perform a transform procedure on the residual samples (residual sample array) included in the residual block to derive transform coefficients, and perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and then signal the related residual information (through a bitstream) to the decoding apparatus. Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding apparatus may derive a residual sample (or a residual block) by performing an inverse quantization / inverse transform procedure based on the residual information. The decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block. Also, the encoding apparatus may derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a future picture, and generate a reconstructed picture based on the residual block.
[0074] FIG. 4 is a diagram illustrating the merge mode in inter prediction.
[0075] When a merge mode is applied, motion information of a current prediction block is not directly transmitted, but is derived using motion information of neighboring prediction blocks. Therefore, the motion information of the current prediction block can be indicated by transmitting flag information indicating that the merge mode is used and a merge index indicating which neighboring prediction block is used. The merge mode may be called a regular merge mode. For example, the merge mode may be applied when a value of a regular_merge_flag syntax element is 1.
[0076] To perform the merge mode, the encoding apparatus must search for merge candidate blocks to be used to derive motion information of the current prediction block. For example, up to five merge candidate blocks may be used, but the embodiment (etc.) of this document is not limited thereto. The maximum number of merge candidate blocks may be transmitted in a slice header or a tile group header, but the embodiment (etc.) of this document is not limited thereto. After searching for the merge candidate blocks, the encoding apparatus may generate a merge candidate list and may select a merge candidate block having the smallest cost among them as a final merge candidate block.
[0077] This document may provide various embodiments for the merge candidate blocks that make up the merge candidate list.
[0078] For example, the merge candidate list may use five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate may be used. As a specific example, in the case of spatial merge candidates, the blocks shown in FIG. 4 may be used as spatial merge candidates. Hereinafter, the spatial merge candidates or spatial MVP candidates described later may be referred to as SMVPs, and the temporal merge candidates or temporal MVP candidates described later may be referred to as TMVPs.
[0079] The merge candidate list for the current block may be constructed, for example, according to the following procedure.
[0080] A coding apparatus (encoder / decoder) may search for spatially neighboring blocks of a current block and insert derived spatial merge candidates into a merge candidate list. For example, the spatial neighboring blocks may include a lower left corner neighboring block, a left peripheral block, a right upper corner neighboring block, an upper peripheral block, and an upper left corner neighboring block of the current block. However, this is merely an example, and in addition to the above-mentioned spatial neighboring blocks, additional neighboring blocks such as a right peripheral block, a lower peripheral block, and a lower right peripheral block may be further used as the spatial neighboring blocks. The coding apparatus may search the spatial neighboring blocks based on a priority order to detect available blocks, and derive motion information of the detected blocks as the spatial merge candidates. For example, the encoding apparatus or the decoding apparatus may search the five blocks shown in FIG. 4 in the order of A1→B1→B0→A0→B2, and sequentially index available candidates to configure a merge candidate list.
[0081] The coding apparatus may search for temporal neighboring blocks of the current block and insert derived temporal merge candidates into the merge candidate list. The temporal neighboring blocks may be located on a reference picture that is a different picture from the current picture in which the current block is located. The reference picture in which the temporal neighboring blocks are located may be called a collocated picture or a col picture. The temporal neighboring blocks may be searched for in the order of a lower right corner neighboring block and a lower right center block of a co-located block with respect to the current block on the col picture. Meanwhile, when motion data compression is applied, specific motion information may be stored as representative motion information for each certain storage unit in the col picture. In this case, it is not necessary to store motion information for all blocks in the certain storage unit, and thus a motion data compression effect can be obtained. In this case, the fixed storage unit may be predetermined, for example, in 16x16 sample units or 8x8 sample units, or size information for the fixed storage unit may be signaled from the encoding device to the decoding device. When the motion data compression is applied, the motion information of the temporal neighboring block may be replaced with representative motion information of the fixed storage unit in which the temporal neighboring block is located. That is, in this case, from the perspective of implementation, the temporal merge candidate may be derived based on motion information of a predictive block that is not a predictive block located at the coordinates of the temporal neighboring block, but is arithmetically shifted right by a certain value based on the coordinates (upper left sample position) of the temporal neighboring block and then arithmetically shifted left.For example, when the fixed storage unit is a 2n×2n sample unit, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>n)<<n), (yTnb>>n)<<n)) can be used for the temporal merge candidate. Specifically, for example, when the fixed storage unit is a 16×16 sample unit, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>4)<<4), (yTnb>>4)<<4)) can be used for the temporal merge candidate. Alternatively, for example, when the fixed storage unit is an 8×8 sample unit, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>3)<<3), (yTnb>>3)<<3)) can be used for the temporal merge candidate.
[0082] The coding device can check whether the number of current merge candidates is less than the number of maximum merge candidates. The number of the maximum merge candidates can be predefined or signaled from the encoding device to the decoding device. For example, the encoding device can generate information regarding the number of the maximum merge candidates, encode it, and transmit it to the decoder in the form of a bitstream. If all the numbers of the maximum merge candidates are filled, the subsequent candidate addition process cannot proceed.
[0083] If the number of the current merge candidates is less than the maximum number of merge candidates, the coding apparatus may insert an additional merge candidate into the merge candidate list. For example, the additional merge candidate may include at least one of a history based merge candidate(s), a pair-wise average merge candidate(s), an ATMVP, a combined bi-predictive merge candidate (when the slice / tile group type of the current slice / tile group is type B), and / or a zero vector merge candidate, which will be described later.
[0084] If the check result indicates that the number of the current merge candidates is not less than the maximum number of merge candidates, the coding apparatus may terminate construction of the merge candidate list. In this case, the encoding apparatus may select an optimal merge candidate from among the merge candidates constituting the merge candidate list based on a rate-distortion (RD) cost, and may signal selection information (e.g., merge index) indicating the selected merge candidate to the decoding apparatus. The decoding apparatus may select the optimal merge candidate based on the merge candidate list and the selection information.
[0085] As described above, the motion information of the selected merging candidate may be used as the motion information of the current block, and a prediction sample of the current block may be derived based on the motion information of the current block. The encoding device may derive a residual sample of the current block based on the prediction sample, and may signal residual information regarding the residual sample to a decoding device. As described above, the decoding device may generate a reconstructed sample based on the residual sample derived based on the residual information and the prediction sample, and may generate a reconstructed picture based on the reconstructed sample.
[0086] When a skip mode is applied, the motion information of the current block can be derived in the same manner as when the merge mode is applied. However, when the skip mode is applied, the residual signal for the block is omitted, and thus the predicted samples can be used directly as reconstructed samples. The skip mode can be applied, for example, when the value of the cu_skip_flag syntax element is 1.
[0087] Meanwhile, the pair-wise average merge candidate may be referred to as a pair-wise average candidate. A pair-wise average candidate (etc.) may be generated by averaging pairs of predefined candidates in an existing merge candidate list. Also, the predefined pairs may be defined as {(0,1), (0,2), (1,2), (0,3), (1,3), (2,3)}. Here, the numbers may represent merge indexes for the merge candidate list. An averaged motion vector may be calculated separately for each reference list. For example, if two motion vectors are available in one list, the two motion vectors may be averaged even if they point to different reference pictures. For example, if only one motion vector is available, one may be used directly. For example, if no motion vector is available, the list may be kept in an inactive state.
[0088] For example, if the merge candidate list is not full even after the pairwise average merge candidate is added, i.e., if the number of current merge candidates in the merge candidate list is less than the maximum number of merge candidates, a zero vector (zero MVP) can be inserted at the end until the maximum merge candidate number appears, i.e., the number of current merge candidates in the merge candidate list can be inserted until it reaches the maximum number of merge candidates.
[0089] Meanwhile, conventionally, only one motion vector can be used to represent the motion of a coding block. That is, a translation motion model can be used. Although such a method may represent the optimal motion on a block-by-block basis, in fact, if an optimal motion vector can be determined on a sample-by-sample basis, rather than the optimal motion of each sample, coding efficiency can be improved. For this purpose, an affine motion model can be used. An affine motion prediction method for coding using an affine motion model can be as follows.
[0090] The affine motion prediction method can express a motion vector for each sample of a block using two, three, or four motion vectors. For example, an affine motion model can express four motions. Among the motions that can be expressed by the affine motion model, an affine motion model that expresses three motions (translation, scale, and rotate) can be called a similarity (or simplified) affine motion model. However, the affine motion model is not limited to the above-mentioned motion models.
[0091] 5a and 5b exemplarily illustrate CPMV for affine motion prediction.
[0092] Affine motion prediction can determine motion vectors for sample positions included in a block using two or more control point motion vectors (CPMVs). In this case, a collection of motion vectors can be represented as an affine motion vector field (MVF).
[0093] For example, FIG. 5a may represent the case where two CPMVs are used, which may be referred to as a four-parameter affine model. In this case, the motion vector at the (x, y) sample position may be determined, for example, as shown in Equation 1.
[0094]
number
[0095] For example, FIG. 5b may represent the case where three CPMVs are used, which may be referred to as a six-parameter affine model. In this case, the motion vector at the (x, y) sample position may be determined, for example, as shown in Equation 2.
[0096]
number
[0097] In Formula 1 and Formula 2, {v x , v y} can represent a motion vector at the (x, y) position. 0x , v 0y} can represent the CPMV of the control point (CP) at the upper left corner position of the coding block, and {v 1x , v 1y} can represent the CPMV of the CP at the top right corner, and {v 2x , v 2y} may represent the CPMV of the CP at the bottom left corner position, W may represent the width of the current block, and H may represent the height of the current block.
[0098] FIG. 6 exemplarily illustrates a case where the affine MVF is determined on a sub-block basis.
[0099] During encoding / decoding, the affine MVF can be determined in sample units or in predefined subblock units. For example, when it is determined in sample units, a motion vector can be obtained based on each sample value. Or, when it is determined in subblock units, a motion vector of the corresponding block can be obtained based on the sample value of the center (bottom right of center, i.e., the bottom right sample of the central four samples) of the subblock. That is, the motion vector of the current block in affine motion prediction can be derived in sample units or subblock units.
[0100] In the case of FIG. 6, the affine MVF is determined in units of 4×4 sub-blocks, but the size of the sub-blocks can be variously modified.
[0101] That is, when affine prediction is available, there are three motion models applicable to the current block (translational motion model, 4-parameter affine motion model, and 6-parameter affine motion model). Here, the translational motion model may represent a model in which an existing block-based motion vector is used, the 4-parameter affine motion model may represent a model in which two CPMVs are used, and the 6-parameter affine motion model may represent a model in which three CPMVs are used.
[0102] On the other hand, affine motion prediction can include affine MVP (or affine inter) mode or affine merge mode.
[0103] FIG. 7 is a diagram illustrating the affine merge mode in inter prediction.
[0104] For example, in the affine merge mode, the CPMV may be determined by the affine motion model of the neighboring blocks coded with affine motion prediction. For example, neighboring blocks coded with affine motion prediction in the search order may be used for the affine merge mode. That is, if at least one of the neighboring blocks is coded with affine motion prediction, the current block may be coded in the affine merge mode. Here, the affine merge mode may be referred to as AF_MERGE.
[0105] When the affine merge mode is applied, the CPMV of the current block may be derived using the CPMV of the neighboring blocks. In this case, the CPMV of the neighboring blocks may be used as the CPMV of the current block as is, or the CPMV of the neighboring blocks may be modified based on the size of the neighboring blocks and the size of the current block, and then used as the CPMV of the current block.
[0106] Meanwhile, in the case of an affine merge mode in which a motion vector (MV) is derived in subblock units, it may be called a subblock merge mode, which may be indicated based on a subblock merge flag (or a merge_subblock_flag syntax element). Alternatively, when the value of the merge_subblock_flag syntax element is 1, it may be indicated that the subblock merge mode is applied. In this case, an affine merge candidate list described later may also be called a subblock merge candidate list. In this case, the subblock merge candidate list may further include a candidate derived by SbTMVP described later. In this case, the candidate derived by SbTMVP may be used as a candidate of the 0th index of the subblock merge candidate list. In other words, the candidate derived by SbTMVP may be located before an inherited affine candidate or a constructed affine candidate described later in the subblock merge candidate list.
[0107] When an affine merge mode is applied, an affine merge candidate list may be constructed for CPMV derivation for a current block. For example, the affine merge candidate list may include at least one of the following candidates: 1) inherited affine merge candidate; 2) constructed affine merge candidate; and 3) zero motion vector candidate (or zero vector). Here, the inherited affine merge candidate is a candidate derived based on the CPMVs of neighboring blocks when the neighboring blocks are coded in the affine mode, and the constructed affine merge candidate is a candidate derived by constructing CPMVs based on the MVs of neighboring blocks of the corresponding CP in each CPMV unit, and the zero motion vector candidate may represent a candidate constructed with a CPMV whose value is 0.
[0108] The affine merge candidate list can be constructed, for example, as follows:
[0109] There may be up to two inherited affine candidates, and the inherited affine candidates may be derived from the affine motion models of the surrounding blocks. The surrounding blocks may include one left surrounding block and one above surrounding block. The candidate blocks may be located as shown in FIG. 4. The scan order for the left predictor may be A1→A0, and the scan order for the above predictor may be B1→B0→B2. Only one inherited candidate from each of the left and above may be selected. There may be no pruning check between the two inherited candidates.
[0110] When a neighboring affine block is identified, the control point motion vector of the identified block may be used to derive a CPMVP candidate in the affine merge list of the current block. Here, the neighboring affine block may represent a block coded in an affine prediction mode among neighboring blocks of the current block. For example, as shown in FIG. 7, when the bottom-left neighboring block A is coded in an affine prediction mode, motion vectors v2, v3, and v4 of the top-left corner, top-right corner, and bottom-left corner of the neighboring block A may be obtained. When the neighboring block A is coded in a 4-parameter affine motion model, two CPMVs of the current block may be calculated by v2 and v3. When the neighboring block A is coded in a 6-parameter affine motion model, three CPMVs of the current block may be calculated by v2, v3, and v4.
[0111] FIG. 8 is a diagram for explaining the positions of the candidates in the affine merge mode.
[0112] A constructed affine candidate may refer to a candidate constructed by combining translational motion information around each control point. The motion information of a control point may be derived from the identified spatial and temporal surroundings. CPMVk (k=0, 1, 2, 3) may represent the kth control point.
[0113] As shown in Figure 8, for CPMV0, blocks may be checked in the B2->B3->A2 order and the motion vector of the first available block may be used. For CPMV1, blocks may be checked in the B1->B0 order and for CPMV2, blocks may be checked in the A1->A0 order. A temporal motion vector predictor (TMVP) may be used in CPMV3 if available.
[0114] After the motion vectors of the four control points are obtained, affine merge candidates can be generated based on the obtained motion information. The combination of control point motion vectors can be any one of {CPMV0, CPMV1, CPMV2}, {CPMV0, CPMV1, CPMV3}, {CPMV0, CPMV2, CPMV3}, {CPMV1, CPMV2, CPMV3}, {CPMV0, CPMV1}, and {CPMV0, CPMV2}.
[0115] A combination of three CPMVs can constitute a 6-parameter affine merge candidate, and a combination of two CPMVs can constitute a 4-parameter affine merge candidate. To avoid the motion scaling process, related combinations of control point motion vectors can be discarded if the reference indexes of the control points are different from each other.
[0116] FIG. 9 is a diagram for explaining SbTMVP in inter prediction.
[0117] Meanwhile, a subblock-based temporal motion vector prediction (SbTMVP) method may also be used. For example, SbTMVP may be referred to as advanced temporal motion vector prediction (ATMVP). SbTMVP may utilize motion fields in a collocated picture to improve motion vector prediction and merge mode for a CU in a current picture. Here, the collocated picture may also be referred to as a col picture.
[0118] For example, SbTMVP can predict motion at a sub-block (or sub-CU) level, and can apply a motion shift before fetching temporal motion information from the colpicture, where the motion shift can be obtained from the motion vector of one of the spatially neighboring blocks of the current block.
[0119] SbTMVP can predict the motion vectors of sub-blocks (or sub-CUs) in a current block (or CU) through two steps.
[0120] In a first step, the spatially neighboring blocks may be examined in the order of A1, B1, B0, and A0 in FIG. 4. The first spatially neighboring block having a motion vector that uses the col picture as its reference picture may be identified, and the motion vector may be selected with a motion shift to be applied. If no such motion is identified from the spatially neighboring blocks, the motion shift may be set to (0,0).
[0121] In a second step, the motion shift identified in the first step can be applied to obtain sub-block level motion information (motion vectors and reference indexes) from the col picture. For example, the motion shift can be added to the coordinates of the current block. For example, the motion shift can be set as the motion of A1 in FIG. 4. In this case, for each sub-block, the motion information of the corresponding block in the col picture can be used to derive the motion information of the sub-block. Temporal motion scaling can be applied to align the reference picture of the temporal motion vector with the reference picture of the current block.
[0122] The combined sub-block based merge list including all SbTVMP candidates and affine merge candidates can be used to signal the affine merge mode. Here, the affine merge mode can be referred to as a sub-block based merge mode. The SbTVMP mode can be enabled or disabled by a flag included in the sequence parameter set (SPS). If the SbTMVP mode is enabled, the SbTMVP predictor can be added as the first entry in the list of sub-block based merge candidates, followed by the affine merge candidates. The maximum allowed size of the affine merge candidate list can be 5.
[0123] The size of the sub-CU (or sub-block) used in SbTMVP may be fixed at 8x8, and like the affine merge mode, the SbTMVP mode may only be applied to blocks whose width and height are both 8 or more. The encoding logic of the additional SbTMVP merge candidate may be the same as other merge candidates. That is, for each CU in a P or B slice, an RD check using an additional RD cost may be performed to determine whether to use an SbTMVP candidate.
[0124] Meanwhile, a predicted block for the current block may be derived based on motion information derived according to the prediction mode. The predicted block may include a prediction sample (prediction sample array) of the current block. If the motion vector of the current block points to a fractional sample unit, an interpolation procedure may be performed, through which a prediction sample of the current block may be derived based on a reference sample of a fractional sample unit in a reference picture. If affine inter prediction (affine prediction mode) is applied to the current block, a prediction sample may be generated based on a sample / sub-block unit MV. If bi (Bi) prediction is applied, a prediction sample derived through a weighted sum or weighted average (by phase) of a prediction sample derived based on L0 prediction (i.e., prediction using a reference picture in a reference picture list L0 and MVL0) and a prediction sample derived based on L1 prediction (i.e., prediction using a reference picture in a reference picture list L1 and MVL1) may be used as a prediction sample of the current block. Here, the motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and the motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. When bi-prediction is applied, if a reference picture used in L0 prediction and a reference picture used in L1 prediction are located in different temporal directions with respect to a current picture (i.e., bi-prediction is applicable to both directions), this may be referred to as true bi-prediction.
[0125] Also, as described above, reconstructed samples and reconstructed pictures may be generated based on the derived predicted samples, and then procedures such as in-loop filtering may be performed.
[0126] On the other hand, when bi-prediction is applied to the current block, a prediction sample can be derived based on a weighted average. For example, bi-prediction using a weighted average can be called BCW (Bi-prediction with CU-level Weight), BWA (Bi-prediction with Weighted Average), or weighted averaging bi-prediction.
[0127] Conventionally, a bi-predictive signal (i.e., a bi-predictive sample) could be derived by a simple average of an L0 predicted signal (L0 predicted sample) and an L1 predicted signal (L1 predicted sample). That is, a bi-predictive sample was derived by an average of an L0 predicted sample based on an L0 reference picture and MVL0 and an L1 predicted sample based on an L1 reference picture and MVL1. However, when bi-prediction is applied, a bi-predictive signal (bi-predictive sample) can also be derived by a weighted average of an L0 predicted signal and an L1 predicted signal as follows. For example, a bi-predictive signal (bi-predictive sample) can be derived as shown in Equation 3.
[0128]
number
[0129] In Equation 3, Pbi-pred may represent a value of a bi-predictive signal, i.e., a predicted sample value derived by applying bi-prediction, and w may represent a weighting value. In addition, P0 may represent a value of an L0 predicted signal, i.e., a predicted sample value derived by applying L0 prediction, and P1 may represent a value of an L1 predicted signal, i.e., a predicted sample value derived by applying L1 prediction.
[0130] For example, five weights may be allowed in weighted average bi-prediction. For example, the five weights (w) may include -2, 3, 4, 5, or 10. That is, the weight (w) may be determined to be one of the weight candidates including -2, 3, 4, 5, or 10. The weight w for each CU to which bi-prediction is applied may be determined in one of two ways. In the first way, a weight index for a non-merged CU may be signaled after a motion vector difference. In the second way, a weight index for a merged CU may be inferred from a neighboring block based on a merge candidate index.
[0131] For example, weighted average bi-prediction may be applied to a CU having 256 or more luma samples. That is, weighted average bi-prediction may be applied when the product of the width and height of a CU is equal to or greater than 256. For low-delay pictures, five weights may be used, and for non-low-delay pictures, three weights may be used. For example, the three weights may include 3, 4, or 5.
[0132] For example, in an encoding device, a fast search algorithm can be applied to find the weight index without significantly increasing the complexity of the encoding device. Such an algorithm can be summarized as follows. For example, when combined with adaptive motion vector resolution (AMVR) (when AMVR is used as an inter prediction mode), if the current picture is a low latency picture, non-identical weights can be conditionally checked for 1-pel and 4-pel motion vector precision. For example, when combined with affine (when an affine prediction mode is used as an inter prediction mode), if the affine prediction mode is currently selected as the best mode, affine motion estimation (ME) can be performed for non-identical weights. For example, if two reference pictures of bi-prediction are identical, non-identical weights can be conditionally checked. For example, non-identical weighting values may not be searched if certain conditions are met depending on the POC distance between the current picture and the reference picture, the coding quantization parameter (QP), and the temporal level.
[0133] For example, a BCW weight index (or weight index) may be coded using one context coded bin and a subsequent bypass coded bin. The first context coded bin may indicate whether or not the same weights are used. If non-identical weights are used based on the first context coded bin, additional bins may be signaled using bypass coding to indicate the non-identical weights used.
[0134] Meanwhile, when bi-prediction is applied, weighting information used to generate a predicted sample can be derived based on weighting index information for a selected candidate among the candidates included in the merge candidate list.
[0135] According to an embodiment of this document, when configuring a motion vector candidate for a merge mode, weight index information for a temporal motion vector candidate may be derived as follows. For example, when a temporal motion vector candidate uses bi-prediction, weight index information for a weighted average may be derived. That is, when an inter prediction type is bi-prediction, weight index information for a temporal merge candidate (or a temporal motion vector candidate) in a merge candidate list may be derived.
[0136] For example, weight index information for weighted averaging of temporal motion vector candidates may always be derived to 0. Here, weight index information being 0 may mean that the weights of each reference direction (i.e., the L0 prediction direction and the L1 prediction direction in bi-prediction) are the same. For example, a procedure for deriving a motion vector of a luma component for a merge mode may be as shown in Table 1 below.
[0137] [Table 1-1]
[0138] [Table 1-2]
[0139] [Table 1-3]
[0140] [Table 1-4]
[0141] [Table 1-5]
[0142] Referring to Table 1, gbiIdx may represent a bi-prediction weight index, and gbiIdxCol may represent a bi-prediction weight index for a temporal merge candidate (e.g., a temporal motion vector candidate in a merge candidate list). In a procedure for deriving a motion vector of a luma component for the merge mode (Table of Contents 3 of 8.4.2.2), gbiIdxCol may be derived to 0. That is, a weight index of a temporal motion vector candidate may be derived to 0.
[0143] Alternatively, a weight index for weighted averaging of temporal motion vector candidates may be derived based on weight index information of a collocated block. Here, a collocated block may be referred to as a col block, a co-located block, or a co-located reference block, and a col block may represent a block at the same position as a current block on a reference picture. For example, a procedure for deriving a motion vector of a luma component for a merge mode may be as shown in Table 2 below.
[0144] [Table 2-1]
[0145] [Table 2-2]
[0146] [Table 2-3]
[0147] [Table 2-4]
[0148] [Table 2-5]
[0149] Referring to Table 2, gbiIdx may represent a bi-prediction weight index, and gbiIdxCol may represent a bi-prediction weight index for a temporal merge candidate (e.g., a temporal motion vector candidate in a merge candidate list). If the type of slice or the type of tile group is B in the procedure of deriving a motion vector of a luma component for the merge mode (Table of Contents 4 of 8.4.2.2), gbiIdxCol may be derived from gbiIdxCol. That is, the weight index of a temporal motion vector candidate may be derived from the weight index of a col block.
[0150] Meanwhile, according to another embodiment of the present document, when constructing a motion vector candidate for a subblock-based merge mode, a weight index for weighted averaging for a temporal motion vector candidate may be derived. Here, the subblock-based merge mode may be referred to as an affine merge mode (subblock-based). The temporal motion vector candidate may represent a subblock-based temporal motion vector candidate, and may also be referred to as an SbTMVP (or ATMVP) candidate. That is, when the inter prediction type is bi-prediction, weight index information for an SbTMVP candidate (or a subblock-based temporal motion vector candidate) in an affine merge candidate list or a subblock merge candidate list may be derived.
[0151] For example, weight index information for weighted averaging of sub-block-based temporal motion vector candidates may always be derived to 0. Here, weight index information being 0 may mean that the weights of each reference direction (i.e., L0 prediction direction and L1 prediction direction in bi-prediction) are the same. For example, a procedure for deriving motion vectors and reference indexes in a sub-block merging mode and a procedure for deriving sub-block-based temporal merging candidates may be as shown in Tables 3 and 4, respectively.
[0152] [Table 3-1]
[0153] [Table 3-2]
[0154] [Table 3-3]
[0155] [Table 3-4]
[0156] [Table 3-5]
[0157] [Table 3-6]
[0158] [Table 3-7]
[0159] [Table 3-8]
[0160] [Table 4]
[0161] Referring to Tables 3 and 4, gbiIdx may represent a bi-prediction weight index, and gbiIdxSbCol may represent a bi-prediction weight index for a sub-block based temporal merge candidate (e.g., a temporal motion vector candidate in a sub-block based merge candidate list), and in the procedure (8.4.4.3) of deriving the sub-block based temporal merge candidate, gbiIdxSbCol may be derived to 0. That is, the weight index of the sub-block based temporal motion vector candidate may be derived to 0.
[0162] Alternatively, weight index information for weighted averaging of sub-block-based temporal motion vector candidates may be derived based on weight index information of a temporal center block. For example, the temporal center block may represent a col block or a sub-block or sample located at the center of the col block, and more specifically, may represent a sub-block or sample located at the lower right side of the four sub-blocks or samples in the center of the col block. For example, in this case, a procedure for deriving motion vectors and reference indexes in a sub-block merging mode, a procedure for deriving sub-block-based temporal merging candidates, and a procedure for deriving base motion information for sub-block-based temporal merging may be as shown in Tables 5, 6, and 7, respectively.
[0163] [Table 5-1]
[0164] [Table 5-2]
[0165]
Table 5-3
[0166]
Table 5-4
[0167]
Table 5-5
[0168]
Table 5-6
[0169]
Table 5-7
[0170]
Table 5-8
[0171]
Table 6-1
[0172]
Table 6-2
[0173]
Table 6-3
[0174]
Table 6-4
[0175] [Table 7-1]
[0176] [Table 7-2]
[0177] [Table 7-3]
[0178] [Table 7-4]
[0179] Referring to Tables 5, 6, and 7, gbiIdx may represent a bi-prediction weight index, and gbiIdxSbCol may represent a bi-prediction weight index for a sub-block-based temporal merge candidate (e.g., a temporal motion vector candidate in a sub-block-based merge candidate list). In a procedure (8.4.4.4) of deriving base motion information for sub-block-based temporal merge, gbiIdxSbCol may be derived from gbiIdxcolCb. That is, a weight index of a sub-block-based temporal motion vector candidate may be derived from a weight index of a temporal center block. For example, the temporal center block may represent a col block or a sub-block or sample located at the center of the col block, and more specifically, may represent a sub-block or sample located at the lower right side of the four central sub-blocks or samples of the col block.
[0180] Alternatively, weight index information for weighted averaging of subblock-based temporal motion vector candidates may be derived based on weight index information of each subblock, and if a subblock is not available, it may be derived based on weight index information of a temporal center block. For example, the temporal center block may represent a col block or a subblock or sample located at the center of the col block, and more specifically, a subblock or sample located at the lower right side of the four central subblocks or samples of the col block. For example, in this case, a procedure for deriving motion vectors and reference indexes in a subblock merging mode, a procedure for deriving subblock-based temporal merging candidates, and a procedure for deriving base motion information for subblock-based temporal merging may be as shown in Tables 8, 9, and 10 below.
[0181] [Table 8-1]
[0182] [Table 8-2]
[0183] [Table 8-3]
[0184] [Table 8-4]
[0185] [Table 8-5]
[0186] [Table 8-6]
[0187]
Table 8-7
[0188]
Table 8-8
[0189]
Table 9-1
[0190]
Table 9-2
[0191]
Table 9-3
[0192]
Table 9-4
[0193]
Table 9-5
[0194]
Table 10-1
[0195]
Table 10-2
[0196]
Table 10-3
[0197] [Table 10-4]
[0198] Referring to Tables 8, 9, and 10, gbiIdx may represent a bi-prediction weight index, and gbiIdxSbCol may represent a bi-prediction weight index for a sub-block-based temporal merge candidate (e.g., a temporal motion vector candidate in a sub-block-based merge candidate list). In the procedure (8.4.4.3) of deriving base motion information for sub-block-based temporal merging, gbiIdxSbCol may be derived from gbiIdxcolCb. Alternatively, in a procedure (8.4.4.3) of deriving base motion information for sub-block based temporal merging according to a condition (e.g., when availableFlagL0SbCol and availableFlagL1SbCol are both 0), the gbiIdxSbCol may be derived from ctrgbiIdx, and in a procedure (8.4.4.4) of deriving base motion information for sub-block based temporal merging, the ctrgbiIdx may be derived from gbiIdxSbCol. That is, the weight index of the sub-block based temporal motion vector candidate may be derived from the weight index of each sub-block unit, and if the sub-block is not available, it may be derived from the weight index of the temporal center block. For example, the temporal center block may represent a col block or a sub-block or sample located at the center of the col block, and more specifically, may represent a sub-block or sample located at the lower right side of the four central sub-blocks or samples of the col block.
[0199] Meanwhile, according to another embodiment of the present document, when constructing a motion vector candidate for a merge mode, weight index information for pair-wise candidates may be derived. For example, pair-wise candidates may be included in a merge candidate list, and weight index information for a weighted average of the pair-wise candidates may be derived. The pair-wise candidates may be derived based on other merge candidates in the merge candidate list, and if the pair-wise candidates use bi-prediction, weight index information for a weighted average may be derived. That is, if an inter prediction type is bi-prediction, weight index information for a pair-wise candidate in the merge candidate list may be derived.
[0200] The pairwise candidate may be derived based on the other two merge candidates among the candidates included in the merge candidate list. For example, weight index information for the pairwise candidate may be derived based on weight index information of one of the two merge candidates. Alternatively, for example, weight index information for the pairwise candidate may be derived based on weight index information of a candidate using bi-prediction among the two merge candidates.
[0201] Alternatively, the pairwise candidate may be derived based on a first candidate and a second candidate among the candidates included in the merge candidate list. For example, weight index information for the pairwise candidate may be derived based on value index information of the first candidate. Thus, weight index information for the pairwise candidate may be derived as shown in Table 11 below.
[0202] [Table 11]
[0203] In Table 11, bcwIdx may correspond to weight index information for pairwise candidates, and bcwIdx0 may correspond to weight index information of the first candidate among the candidates included in the merge candidate list.
[0204] Alternatively, for example, if the weight index information of the first candidate and the second candidate are identical to each other, the weight index information for the pairwise candidate may be derived based on the weight index information of the first candidate. Meanwhile, if the weight index information of the first candidate and the second candidate are not identical to each other, the weight index information for the pairwise candidate may be derived based on default weight index information. The default weight index information may correspond to weight index information that assigns the same weight to each of the L0 prediction sample and the L1 prediction sample. Thus, the weight index information for the pairwise candidate may be derived as shown in Table 12 below.
[0205] [Table 12]
[0206] In Table 12, bcwIdx may correspond to weight index information for pairwise candidates, bcwIdx0 may correspond to weight index information for the first candidate among the candidates included in the merge candidate list, bcwIdx1 may correspond to weight index information for the second candidate among the candidates included in the merge candidate list, and Default value may correspond to default weight index information.
[0207] Alternatively, if the weight index information of the first candidate and the second candidate are identical to each other, the weight index information for the pairwise candidate may be derived based on the weight index information of the first candidate. On the other hand, if the weight index information of the first candidate and the second candidate are not identical to each other, the weight index information for the pairwise candidate may be derived based on weight index information of the first candidate and the second candidate that is not default weight index information. The default weight index information may correspond to weight index information that assigns the same weight to each of the L0 prediction sample and the L1 prediction sample.
[0208] Meanwhile, according to another embodiment of the present document, when constructing a motion vector candidate for a sub-block-based merge mode, weight index information for weighted averaging for a temporal motion vector candidate can be derived. Here, the sub-block-based merge mode can be referred to as an affine merge mode (sub-block-based). The temporal motion vector candidate can represent a sub-block-based temporal motion vector candidate, and can also be referred to as an SbTMVP (or ATMVP) candidate. The weight index information for the SbTMVP candidate can be derived based on weight index information of a left peripheral block of the current block. That is, when a candidate derived in SbTMVP uses bi-prediction, the weight index of the left peripheral block of the current block can be derived as a weight index for a sub-block-based merge mode.
[0209] For example, since the SbTMVP candidate can derive a col block based on a spatially adjacent left block (or a left peripheral block) of the current block, the weight index of the left peripheral block can be considered to be reliable. Thus, the weight index for the SbTMVP candidate can be derived from the weight index of the left peripheral block.
[0210] Meanwhile, according to another embodiment of the present document, when constructing a motion vector candidate for an affine merge mode, if the affine merge candidate uses bi-prediction, weight index information for weighted averaging can be derived. That is, if the inter prediction type is bi-prediction, weight index information for candidates in an affine merge candidate list or a sub-block merge candidate list can be derived.
[0211] For example, a constructed affine merge candidate among the affine merge candidates may indicate a candidate for deriving MVF as an affine model by deriving CP0, CP1, CP2, or CP3 candidate based on motion information of spatially adjacent blocks (or spatial surrounding blocks) or temporally adjacent blocks (or temporal surrounding blocks) of the current block.
[0212] FIG. 10 is a diagram showing control points for constructed affine merge candidates.
[0213] 10, for example, CP0 may indicate a control point located at the upper left sample position of the current block, CP1 may indicate a control point located at the upper right sample position of the current block, CP2 may indicate a control point located at the lower left sample position of the current block, and CP3 may indicate a control point located at the lower right sample position of the current block.
[0214] For example, a constructed affine merge candidate among the affine merge candidates may be generated by combining motion vectors for each control point of the current block. The constructed affine merge candidates may include at least one of CPMV0 for control point CP0, CPMV1 for control point CP1, and CPMV2 for control point CP2. CPMV0, CPMV1, CPMV2, and CPMV3 may correspond to motion vectors for CP0, CP1, CP2, and CP3, respectively.
[0215] CPMV0 may be derived based on an upper left peripheral block of the current block, a first left peripheral block adjacent to the lower side of the upper left peripheral block, or a first upper peripheral block adjacent to the right side of the upper left peripheral block. CPMV1 may be derived based on an upper right peripheral block of the current block or a second upper peripheral block adjacent to the left side of the upper right peripheral block. Also, CPMV2 may be derived based on a lower left peripheral block of the current block or a second left peripheral block adjacent to the upper side of the lower left peripheral block.
[0216] For example, the constructed affine merge candidates may be generated based on a combination of each control point of the current block, such as {CP0,CP1,CP2}, {CP0,CP1,CP3}, {CP0,CP2,CP3}, {CP1,CP2,CP3}, {CP0,CP1}, and {CP0,CP2}. For example, the constructed affine merge candidates may include at least one of {CPMV0,CPMV1,CPMV2}, {CPMV0,CPMV1,CPMV3}, {CPMV0,CPMV2,CPMV3}, {CPMV1,CPMV2,CPMV3}, {CPMV0,CPMV1}, and {CPMV0,CPMV2}.
[0217] In one embodiment, weight index information for the constructed affine merge candidates can be derived as shown in Table 13 below.
[0218] [Table 13]
[0219] In Table 13, bcwIdxCornerX (X=0,1,2) may represent weight index information for each control point of the current block. For example, bcwIdxCorner0 may represent weight index information for CP0, bcwIdxCorner1 may represent weight index information for CP1, and bcwIdxCorner2 may represent weight index information for CP2. Alternatively, the affine merge candidates constructed as described above may be generated based on combinations of each control point such as {CP0,CP1,CP2}, {CP0,CP1,CP3}, {CP0,CP2,CP3}, {CP1,CP2,CP3}, {CP0,CP1} and {CP0,CP2}, where bcwIdxCorner0 corresponds to weighted value index information for the first control point in each combination, bcwIdxCorner1 corresponds to weighted value index information for the second control point in each combination, and bcwIdxCorner2 corresponds to weighted value index information for the third control point in each combination.
[0220] On the other hand, bcwIdxGroupX is a BCW group index and is divided into three groups: {0}, {1,2,3}, and {4}. That is, bcwIdxGroupX is divided into three groups: {(-1 / 4,5 / 4)}, {(1 / 4,3 / 4), (2 / 4,2 / 4), (3 / 4,1 / 4)}, and {(5 / 4,-1 / 4)}.
[0221] Referring to Table 13 above, when three control points are used, six comparison processes may be required.
[0222] At this time, the weight index information for the temporal candidate is set to a default value, thereby simplifying the comparison process of bcwIdxCorner2. Thus, the weight index information for the constructed affine merge candidate can be derived as shown in Table 14 below. In Table 14 below, the comparison process of bcwIdxCorner0 and bcwIdxCorner2 and the comparison process of bcwIdxCorner1 and bcwIdxCorner2 can be omitted.
[0223] [Table 14]
[0224] Also, since only three weight index information are used in the BCW group index {(1 / 4, 3 / 4), (2 / 4, 2 / 4), (3 / 4, 1 / 4)} and such weight index information is mapped to only one group, the comparison process of the BCW group indexes can be simplified as shown in Table 15. In Table 15, the comparison process between bcwIdxGroup0 and bcwIdxGroup2 and the comparison process between bcwIdxGroup0 and bcwIdxGroup1 can be omitted.
[0225] [Table 15]
[0226] As described above, the process of deriving weighted index information for the constructed affine merge candidates can be simplified by removing unnecessary conditions. In the following, another embodiment for simplifying the process of deriving weighted index information for the constructed affine merge candidates will be described.
[0227] In one embodiment, if a motion vector for control point CP0 located at the upper left side of the current block in the constructed affine merge candidate is available, weighted index information for the constructed affine merge candidate may be derived based on weighted index information for CP0. For example, if the constructed affine merge candidate corresponds to any of {CPMV0,CPMV1,CPMV2}, {CPMV0,CPMV2,CPMV3}, {CPMV1,CPMV2,CPMV3}, {CPMV0,CPMV1}, and {CPMV0,CPMV2}, a motion vector for control point CP0 may be available.
[0228] In this case, the weight index information for CP0 may correspond to weight index information of blocks used to derive a motion vector for CP0 among the neighboring blocks of CP0. In addition, the neighboring blocks of CP0 may include a neighboring block at the upper left corner of the current block, a left neighboring block adjacent to the lower side of the neighboring block at the upper left corner, and an upper neighboring block adjacent to the right side of the neighboring block at the upper left corner.
[0229] Meanwhile, if a motion vector for control point CP0 located at the upper left side of the current block is not available in the constructed affine merge candidate, weighted index information for the constructed affine merge candidate can be derived based on weighted index information for control point CP1 located at the upper right side of the current block. For example, if the constructed affine merge candidate corresponds to {CPMV1,CPMV1,CPMV3}, a motion vector for control point CP0 may not be available.
[0230] In this case, the weight index information for CP1 may correspond to weight index information of blocks used to derive a motion vector for CP1 among the neighboring blocks of CP1. In addition, the neighboring blocks of CP1 may include a neighboring block at the upper right corner of the current block and an upper neighboring block adjacent to the left of the neighboring block at the upper right corner.
[0231] According to the above method, the weight index information for the affine merge candidates is For each of {CPMV0,CPMV1,CPMV2}, {CPMV0,CPMV1,CPMV3}, {CPMV0,CPMV2,CPMV3}, {CPMV1,CPMV2,CPMV3}, {CPMV0,CPMV1}, and {CPMV0,CPMV2}, the weight index information of the block used to derive the first CPMV can be derived. Thus, the weight index information for the affine merge candidates can be derived as shown in Table 16 below.
[0232] [Table 16]
[0233] According to another embodiment of the method for deriving weight index information for an affine merge candidate, if weight index information for CP0 located at the upper left side of the current block is the same as weight index information for CP1 located at the upper right side of the current block, weight index information for the affine merge candidate may be derived based on weight index information for CP0. On the other hand, if weight index information for CP0 located at the upper left side of the current block is not the same as weight index information for CP1 located at the upper right side of the current block, weight index information for the affine merge candidate may be derived based on default weight index information. The default weight index information may correspond to weight index information that assigns the same weight to each of the L0 prediction sample and the L1 prediction sample. Accordingly, weight index information for an affine merge candidate may be derived as shown in Table 17 below.
[0234] [Table 17]
[0235] According to another embodiment of deriving weight index information for the affine merge candidate, the weight index information for the affine merge candidate may be derived from a weight index of a candidate with a high occurrence frequency among the weight indexes of the candidates. For example, the most overlapping weight index among the weight index of a candidate block determined to have a motion vector at CP0 among the CP0 candidate blocks, the weight index of a candidate block determined to have a motion vector at CP1 among the CP1 candidate blocks, the weight index of a candidate block determined to have a motion vector at CP2 among the CP2 candidate blocks, and / or the weight index of a candidate block determined to have a motion vector at CP3 among the CP3 candidate blocks may be derived as the weight index of the affine merge candidate.
[0236] For example, CP0 and CP1 may be used as the control points, or CP0, CP1 and CP2 may be used, and CP3 may not be used. However, for example, when using a CP3 candidate of an affine block (a block coded in an affine prediction mode), the method of deriving a weight index in a temporal candidate block described in the above embodiment may be used.
[0237] 11 and 12 illustrate an example of a schematic of a video / image encoding method and associated components according to an embodiment of the present document.
[0238] The method disclosed in FIG. 11 may be performed by the encoding apparatus disclosed in FIG. 2 or FIG. 12. Specifically, for example, S1100 to S1130 in FIG. 11 may be performed by the prediction unit 220 of the encoding apparatus 200 in FIG. 12, and S1140 in FIG. 11 may be performed by the entropy encoding unit 240 of the encoding apparatus 200 in FIG. 11. Also, although not shown in FIG. 11, the prediction unit 220 of the encoding apparatus 200 in FIG. 12 may derive a prediction sample or prediction related information, the residual processing unit 230 of the encoding apparatus 200 may derive residual information from an original sample or a prediction sample, and the entropy encoding unit 240 of the encoding apparatus 200 may generate a bitstream from the residual information or the prediction related information. The method disclosed in FIG. 11 may include the embodiments described above in this document.
[0239] 11, an encoding apparatus may determine an inter prediction mode of a current block and generate inter prediction mode information indicating the inter prediction mode (S1100). For example, the encoding apparatus may determine a merge mode, an affine (merge) mode, or a sub-block merge mode as an inter prediction mode to be applied to the current block, and may generate inter prediction mode information indicating the same.
[0240] The encoding apparatus may generate a merge candidate list for the current block based on the inter prediction mode (S1110). For example, the encoding apparatus may generate the merge candidate list according to a determined inter prediction mode. Here, when the determined inter prediction mode is an affine merge mode or a sub-block merge mode, the merge candidate list may be referred to as an affine merge candidate list or a sub-block merge candidate list, or may be simply referred to as a merge candidate list.
[0241] For example, candidates may be inserted into the merge candidate list until the number of candidates in the merge candidate list becomes the maximum number of candidates. Here, the candidate may indicate a candidate or a candidate block for deriving motion information (or a motion vector) of the current block. For example, a candidate block may be derived through a search for neighboring blocks of the current block. For example, the neighboring blocks may include spatial neighboring blocks and / or temporal neighboring blocks of the current block, and the spatial neighboring blocks may be searched first to derive (spatial merge) candidates, and then the temporal neighboring blocks may be searched to derive (temporal merge) candidates, and the derived candidates may be inserted into the merge candidate list. For example, the merge candidate list may insert an additional candidate if the number of candidates in the merge candidate list is less than the maximum number of candidates even after inserting the candidate. For example, the additional candidates may include at least one of history based merge candidate(s), pair-wise average merge candidate(s), ATMVP, combined bi-predictive merge candidate (when the slice / tile group type of the current slice / tile group is type B), and / or zero vector merge candidate.
[0242] Alternatively, for example, candidates may be inserted into the affine merge candidate list until the number of candidates in the affine merge candidate list reaches the maximum number of candidates. Here, the candidates may include a control point motion vector (CPMV) of the current block. Or, the candidates may indicate candidates or candidate blocks for deriving the CPMV. The CPMV may indicate a motion vector at a control point (CP) of the current block. For example, there may be two, three, or four CPs, and they may be located at at least a portion of the upper left side (or upper left corner), upper right side (or upper right corner), lower left side (or lower left corner), or lower right side (or lower right corner) of the current block, and there may be only one CP for each position.
[0243] For example, the candidates may be derived through a search for neighboring blocks of the current block (or neighboring blocks of the CP of the current block). For example, the affine merge candidate list may include at least one of an inherited affine merge candidate, a constructed affine merge candidate, or a zero motion vector candidate. For example, the affine merge candidate list may first insert the inherited affine merge candidate, and then insert the constructed affine merge candidate. In addition, if the number of candidates in the affine merge candidate list is less than the maximum number of candidates after the constructed affine merge candidates have been inserted into the affine merge candidate list, the remaining candidates may be filled with zero motion vector candidates. Here, the zero motion vector candidate may also be called a zero vector. For example, the affine merge candidate list may be a list according to an affine merge mode in which a motion vector is derived in a sample unit, or may be a list according to an affine merge mode in which a motion vector is derived in a subblock unit. In this case, the affine merge candidate list may also be called a subblock merge candidate list, and the subblock merge candidate list may also include candidates derived by SbTMVP (or SbTMVP candidates). For example, if an SbTMVP candidate is included in the subblock merging candidate list, it may be positioned before inherited and constructed affine merge candidates in the subblock merging candidate list.
[0244] The encoding apparatus may generate selection information indicating one of the candidates included in the merge candidate list (S1120). For example, the merge candidate list may include at least a portion of a spatial merge candidate, a temporal merge candidate, a pairwise candidate, or a zero vector candidate, and one of such candidates may be selected for inter prediction of the current block. Alternatively, for example, the sub-block merge candidate list may include at least a portion of an inherited affine merge candidate, a constructed affine merge candidate, an SbTMVP candidate, or a zero vector candidate, and one of such candidates may be selected for inter prediction of the current block.
[0245] For example, the selection information may include index information indicating a selected candidate in the merge candidate list, for example, the selection information may be referred to as merge index information or sub-block merge index information.
[0246] The encoding apparatus may encode image information including inter prediction mode information, selection information, and inter prediction type information (S1130). For example, the image information may be referred to as video information. The image information may include various information according to the above-mentioned embodiments of this document. For example, the image information may include at least a portion of prediction related information or residual related information. For example, the prediction related information may include at least a portion of the inter prediction mode information, selection information, and inter prediction type information. For example, the encoding apparatus may generate a bitstream or encoded information by encoding the image information including all or a portion of the above-mentioned information (or syntax elements). Alternatively, the bitstream or encoded information may be output in the form of a bitstream. Also, the bitstream or encoded information may be transmitted to a decoding apparatus via a network or a storage medium.
[0247] Although not shown in FIG. 11, for example, the encoding apparatus may generate a prediction sample of the current block. Alternatively, for example, the encoding apparatus may generate a prediction sample of the current block based on a selected candidate. Alternatively, for example, the encoding apparatus may derive motion information based on a selected candidate and generate a prediction sample of the current block based on the motion information. For example, the encoding apparatus may generate an L0 prediction sample and an L1 prediction sample by bi-prediction, and may generate a prediction sample of the current block based on the L0 prediction sample and the L1 prediction sample. In this case, a prediction sample of the current block may be generated from the L0 prediction sample and the L1 prediction sample using weight index information (or weight information) for bi-prediction. Here, the weight information may be indicated based on the weight index information.
[0248] In other words, for example, the encoding apparatus may generate an L0 prediction sample and an L1 prediction sample of the current block based on the selected candidate. For example, if the inter prediction type of the current block is determined to be bi-prediction, reference picture list 0 and reference picture list 1 may be used for predicting the current block. For example, the L0 prediction sample may indicate a prediction sample of the current block derived based on the reference picture list 0, and the L1 prediction sample may indicate a prediction sample of the current block derived based on the reference picture list 1.
[0249] For example, the candidates may include spatial merge candidates. For example, if the selected candidate is the spatial merge candidate, L0 motion information and L1 motion information may be derived based on the spatial merge candidate, and the L0 prediction sample and the L1 prediction sample may be generated based on the L0 motion information and the L1 motion information.
[0250] For example, the candidates may include a temporal merge candidate. For example, if the selected candidate is the temporal merge candidate, L0 motion information and L1 motion information may be derived based on the temporal merge candidate, and the L0 prediction sample and the L1 prediction sample may be generated based on the L0 motion information and the L1 motion information.
[0251] For example, the candidates may include pair-wise candidates. For example, if the selected candidate is a pair-wise candidate, L0 motion information and L1 motion information may be derived based on the pair-wise candidate, and the L0 prediction sample and the L1 prediction sample may be generated based on the pair-wise candidate. For example, the pair-wise candidate may be derived based on a first candidate and a second candidate in the merge candidate list.
[0252] Alternatively, for example, the merging candidate list may be a sub-block merging candidate list, and an affine merging candidate, a sub-block merging candidate, or an SbTMVP candidate may be selected, where the sub-block affine merging candidate may also be referred to as a sub-block merging candidate.
[0253] For example, the candidates may include subblock merging candidates. For example, if the selected candidate is the subblock merging candidate, L0 motion information and L1 motion information may be derived based on the subblock merging candidate, and the L0 prediction sample and the L1 prediction sample may be generated based on the L0 motion information and the L1 prediction sample. For example, the subblock merging candidate may include a control point motion vector (CPMV), and the L0 prediction sample and the L1 prediction sample may be generated by performing prediction on a subblock basis based on the CPMV.
[0254] Here, the CPMV can be represented based on one of the neighboring blocks of the CP (Control Point) of the current block. For example, there can be two, three, or four CPs, and they can be located at least in part of the upper left side (or upper left corner), upper right side (or upper right corner), lower left side (or lower left corner), or lower right side (or lower right corner) of the current block, and only one CP can exist for each position.
[0255] For example, the CP may be CP0 located at the upper left side of the current block. In this case, the peripheral blocks may include an upper left corner peripheral block of the current block, a left peripheral block adjacent to the lower side of the upper left corner peripheral block, and an upper peripheral block adjacent to the right side of the upper left corner peripheral block. Alternatively, the peripheral blocks may include A2 block, B2 block, or B3 block in FIG. 8.
[0256] Alternatively, for example, the CP may be CP1 located at the upper right side of the current block. In this case, the peripheral blocks may include the upper right corner peripheral block of the current block and the upper peripheral block adjacent to the left of the upper right corner peripheral block. Alternatively, the peripheral blocks may include the B0 block or the B1 block in FIG. 8.
[0257] Alternatively, for example, the CP may be CP2 located at the lower left side of the current block. In this case, the peripheral blocks may include a lower left corner peripheral block of the current block and a left peripheral block adjacent to the upper side of the lower left corner peripheral block. Alternatively, the peripheral blocks may include A0 block or A1 block in FIG. 8.
[0258] Alternatively, for example, the CP may be CP3 located at the lower right side of the current block. Here, CP3 may also be referred to as RB. In this case, the peripheral block may include a col block of the current block or a peripheral block at the lower right corner of the col block. Here, the col block may include a block at the same position as the current block in a reference picture different from the current picture in which the current block is located. Alternatively, the peripheral block may include a T block in FIG. 8.
[0259] Alternatively, for example, the candidate may include an SbTMVP candidate. For example, if the selected candidate is the SbTMVP candidate, L0 motion information and L1 motion information may be derived based on a left neighboring block of the current block, and the L0 prediction sample and the L1 prediction sample may be generated based on the L0 motion information and the L1 prediction sample. For example, the L0 prediction sample and the L1 prediction sample may be generated by performing prediction on a sub-block basis.
[0260] For example, the L0 motion information may include an L0 reference picture index and an L0 motion vector, etc., and the L1 motion information may include an L1 reference picture index and an L1 motion vector, etc. The L0 reference picture index may include information representing a reference picture in reference picture list 0, and the L1 reference picture index may include information representing a reference picture in reference picture list 1.
[0261] For example, the encoding apparatus may generate a prediction sample of a current block based on an L0 prediction sample, an L1 prediction sample, and weight information. For example, the weight information may be represented based on weight index information. The weight index information may represent weight index information for bi-prediction. For example, the weight information may include information for a weighted average of an L0 prediction sample or an L1 prediction sample. That is, the weight index information may represent index information for a weight used in the weighted average, and the weight index information may be generated in a procedure of generating a prediction sample based on the weighted average. For example, the weight index information may include information representing any one of three or five weights. For example, the weight average may represent a weighted average in Bi-prediction with CU-level Weight (BCW) or Bi-prediction with Weighted Average (BWA).
[0262] For example, the candidates may include a temporal merge candidate, and the weight index information for the temporal merge candidate may be represented as 0. That is, the weight index information for the temporal merge candidate may be represented as 0. Here, the weight index information being 0 may represent that the weights of each reference direction (i.e., L0 prediction direction and L1 prediction direction in bi-prediction) are the same. Alternatively, for example, the candidates may include a temporal merge candidate, and the weight index information may be represented based on weight index information of a col block. That is, the weight index information for a temporal merge candidate may be represented based on weight index information of a col block. Here, the col block may include a block at the same position as the current block in a reference picture different from the current picture in which the current block is located.
[0263] For example, the candidates may include pair-wise candidates, and the weighted index information may be indicated based on the weighted index information of a first candidate among a first candidate and a second candidate in a merge candidate list used to derive the pair-wise candidate.
[0264] For example, the candidates include pair-wise candidates, and the pair-wise candidates may be indicated based on a first candidate and a second candidate in the merge candidate list. If the weight index information of the first candidate and the second candidate are identical to each other, the weight index information for the pair-wise candidate may be indicated based on the weight index information of the first candidate. If the weight index information of the first candidate and the second candidate are not identical to each other, the weight index information for the pair-wise candidate may be indicated based on default weight index information. In this case, the default weight index information may correspond to weight index information that assigns the same weight to each of the L0 prediction sample and the L1 prediction sample.
[0265] For example, the candidates include pair-wise candidates, and the pair-wise candidates may be displayed based on a first candidate and a second candidate in the merge candidate list. If the weight index information of the first candidate and the second candidate are identical to each other, the weight index information for the pair-wise candidates may be displayed based on the weight index information of the first candidate. If the weight index information of the first candidate and the second candidate are not identical to each other, the weight index information for the pair-wise candidates may be displayed based on weight index information that is not default weight index information among the weight index information of the first candidate and the second candidate. The default weight index information may correspond to weight index information that assigns the same weight to each of the L0 prediction sample and the L1 prediction sample.
[0266] For example, the merge candidate list may be a sub-block merge candidate list, and an affine merge candidate, a sub-block merge candidate, or an SbTMVP candidate may be selected. Here, the sub-block-based affine merge candidate may also be referred to as a sub-block merge candidate.
[0267] For example, the candidates may include constructed affine merge candidates.
[0268] For example, if a motion vector for control point CP0 located at the upper left side of the current block is available in the constructed affine merge candidate, weight index information for the constructed affine merge candidate may be indicated based on weight index information for CP0. If a motion vector for control point CP0 located at the upper left side of the current block is not available in the constructed affine merge candidate, weight index information for the constructed affine merge candidate may be indicated based on weight index information for control point CP1 located at the upper right side of the current block.
[0269] The weight index information for CP0 may correspond to weight index information of blocks used to derive a motion vector for CP0 among the neighboring blocks of CP0. In addition, the neighboring blocks of CP0 may include a neighboring block at the upper left corner of the current block, a left neighboring block adjacent to the lower side of the neighboring block at the upper left corner, and an upper neighboring block adjacent to the right side of the neighboring block at the upper left corner.
[0270] The weight index information for CP1 may correspond to weight index information of blocks used to derive a motion vector for CP1 among the neighboring blocks of CP1. In addition, the neighboring blocks of CP1 may include a neighboring block at the upper right corner of the current block and an upper neighboring block adjacent to the left of the neighboring block at the upper right corner.
[0271] Alternatively, for example, the candidates may include SbTMVP candidates, and weight index information for the SbTMVP candidates may be indicated based on weight index information of left neighboring blocks of the current block, i.e., weight index information for SbTMVP candidates may be indicated based on weight index information of the left neighboring blocks.
[0272] Alternatively, for example, the candidates may include an SbTMVP candidate, and weight index information for the SbTMVP candidate may be indicated as 0. That is, weight index information for an SbTMVP candidate may be indicated as 0. Here, weight index information of 0 may indicate that the weights of each reference direction (i.e., the L0 prediction direction and the L1 prediction direction in bi-prediction) are the same.
[0273] Alternatively, for example, the candidates may include SbTMVP candidates, and the weight index information may be indicated based on the weight index information of a center block in a col block. That is, the weight index information for the SbTMVP candidate may be indicated based on the weight index information of a center block in a col block. Here, the col block may be located in a reference picture different from the current picture in which the current block is located, and may include a block derived based on a motion vector of a left peripheral block of the current block. Also, the center block may include a lower right sub-block of four sub-blocks located in the center of the col block.
[0274] Or, for example, the candidates may include SbTMVP candidates, and the weight index information may be indicated based on the weight index information of each of the sub-blocks of a col block, i.e., the weight index information for the SbTMVP candidates may be indicated based on the weight index information of each of the sub-blocks of a col block.
[0275] Alternatively, although not shown in FIG 11, for example, the encoding apparatus may derive a residual sample based on the prediction sample and an original sample. In this case, residual-related information may be derived based on the residual sample. A residual sample may be derived based on the residual-related information. A reconstructed sample may be generated based on the residual sample and the prediction sample. A reconstructed block and a reconstructed picture may be derived based on the reconstructed sample. Alternatively, for example, the encoding apparatus may encode video information including residual-related information or prediction-related information.
[0276] For example, an encoding device may generate a bitstream or encoded information by encoding video information including all or a part of the above-mentioned information (or syntax elements). Alternatively, the encoding device may output the video information in the form of a bitstream. The bitstream or encoded information may be transmitted to a decoding device via a network or a storage medium. Alternatively, the bitstream or encoded information may be stored in a computer-readable storage medium, and the bitstream or encoded information may be generated by the above-mentioned video encoding method.
[0277] 13 and 14 show a schematic diagram of an example of a video / image decoding method and associated components according to an embodiment of the present document.
[0278] The method disclosed in Fig. 13 may be performed by the decoding apparatus disclosed in Fig. 3 or Fig. 14. Specifically, for example, S1300 in Fig. 13 may be performed by the entropy decoding unit 310 of the decoding apparatus 300 in Fig. 14, and S1310 to S1330 in Fig. 13 may be performed by the prediction unit 330 of the decoding apparatus 300 in Fig. 14. Also, although not shown in Fig. 13, in Fig. 14, the entropy decoding unit 310 of the decoding apparatus 300 may derive prediction related information or residual information from a bitstream, the residual processing unit 320 of the decoding apparatus 300 may derive residual samples from the residual information, the prediction unit 330 of the decoding apparatus 300 may derive prediction samples from the prediction related information, and the adder 340 of the decoding apparatus 300 may derive reconstructed blocks or reconstructed pictures from the residual samples or prediction samples. The method disclosed in FIG. 13 may include the embodiments previously described in this document.
[0279] Referring to FIG 13, a decoding device may receive image information including inter prediction mode information and inter prediction type information via a bitstream (S1300). For example, the image information may be referred to as video information. The image information may include various information according to the above-mentioned embodiments of this document. For example, the image information may include at least a portion of prediction-related information or residual-related information.
[0280] For example, the prediction related information may include inter prediction mode information or inter prediction type information. For example, the inter prediction mode information may include information indicating at least a part of various inter prediction modes. For example, various modes such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, or merge with MVD (MMVD) mode may be used. In addition, a decoder side motion vector refinement (DMVR) mode, an adaptive motion vector resolution (AMVR) mode, bi-prediction with CU-level weight (BCW), or bi-directional optical flow (BDOF), etc. may be used in addition to or instead of the additional mode. For example, the inter prediction type information may include an inter_pred_idc syntax element. Alternatively, the inter prediction type information may include information indicating any of L0 prediction, L1 prediction, or bi-prediction.
[0281] The decoding apparatus may generate a merge candidate list for the current block based on inter prediction mode information (S1310). For example, the decoding apparatus may determine the inter prediction mode of the current block as a merge mode, an affine (merge) mode, or a sub-block merge mode based on the inter prediction mode information, and may generate a merge candidate list according to the determined inter prediction mode. Here, when the inter prediction mode is determined to be the affine merge mode or the sub-block merge mode, the merge candidate list may be called an affine merge candidate list, a sub-block merge candidate list, or the like, or may be simply called a merge candidate list.
[0282] For example, candidates may be inserted into the merge candidate list until the number of candidates in the merge candidate list becomes the maximum number of candidates. Here, a candidate may represent a candidate or a candidate block for deriving motion information (or a motion vector) of a current block. For example, a candidate block may be derived through a search for neighboring blocks of a current block. For example, the neighboring blocks may include spatial neighboring blocks and / or temporal neighboring blocks of a current block, and the spatial neighboring blocks may be searched first to derive a (spatial merge) candidate, and then the temporal neighboring blocks may be searched to derive a (temporal merge) candidate, and the derived candidate may be inserted into the merge candidate list. For example, the merge candidate list may insert an additional candidate if the number of candidates in the merge candidate list is less than the maximum number of candidates even after inserting the candidate. For example, the additional candidates may include at least one of history based merge candidate(s), pair-wise average merge candidate(s), ATMVP, combined bi-predictive merge candidate (if the slice / tile group type of the current slice / tile group is type B), and / or zero vector merge candidate.
[0283] Alternatively, for example, candidates may be inserted into the affine merge candidate list until the number of candidates in the affine merge candidate list reaches the maximum number of candidates. Here, the candidates may include a control point motion vector (CPMV) of the current block. Alternatively, the candidates may represent candidates or candidate blocks for deriving the CPMV. The CPMV may represent a motion vector at a control point (CP) of the current block. For example, there may be two, three, or four CPs, and the CPs may be located at least in part at the upper left side (or upper left corner), upper right side (or upper right corner), lower left side (or lower left corner), or lower right side (or lower right corner) of the current block, and there may be only one CP for each position.
[0284] For example, the candidate block may be derived through a search for neighboring blocks of the current block (or neighboring blocks of the CP of the current block). For example, the affine merge candidate list may include at least one of an inherited affine merge candidate, a constructed affine merge candidate, or a zero motion vector candidate. For example, the affine merge candidate list may first insert the inherited affine merge candidate, and then insert the constructed affine merge candidate. In addition, if the number of candidates in the affine merge candidate list is less than the maximum number of candidates after the constructed affine merge candidate is inserted in the affine merge candidate list, the remainder may be filled with a zero motion vector candidate. Here, the zero motion vector candidate may also be referred to as a zero vector. For example, the affine merge candidate list may be a list according to an affine merge mode in which a motion vector is derived in a sample unit, or may be a list according to an affine merge mode in which a motion vector is derived in a sub-block unit. In this case, the affine merge candidate list may also be referred to as a sub-block merge candidate list, and the sub-block merge candidate list may also include candidates derived with SbTMVP (or SbTMVP candidates). For example, if an SbTMVP candidate is included in the sub-block merge candidate list, it may be positioned before the inherited affine merge candidate and the constructed affine merge candidate in the sub-block merge candidate list.
[0285] The decoding apparatus may select one of the candidates included in the merge candidate list (S1320). For example, the merge candidate list may include at least a portion of a spatial merge candidate, a temporal merge candidate, a pairwise candidate, or a zero vector candidate, and one of such candidates may be selected for inter prediction of the current block. Alternatively, for example, the sub-block merge candidate list may include at least a portion of an inherited affine merge candidate, a constructed affine merge candidate, an SbTMVP candidate, or a zero vector candidate, and one of such candidates may be selected for inter prediction of the current block. For example, the selected candidate may be selected from the merge candidate list based on selection information. For example, the selection information may include index information indicating a selected candidate in the merge candidate list. For example, the selection information may be referred to as merge index information or sub-block merge index information. For example, the selection information may be included in the video information. Or, the selection information may be included in the inter prediction mode information.
[0286] The decoding apparatus may generate a prediction sample of the current block based on the selected candidate and weight index information for the selected candidate (S1330). For example, when the inter prediction type is derived as bi-prediction, the decoding apparatus may derive L0 motion information and L1 motion information based on the selected candidate. The decoding apparatus may derive the inter prediction type of the current block as bi-prediction based on the inter prediction type information. For example, the inter prediction type of the current block may be derived as bi-prediction among L0 prediction, L1 prediction, or bi-prediction based on the inter prediction type information. Here, the L0 prediction may indicate a reference picture list 0-based prediction, the L1 prediction may indicate a reference picture list 1-based prediction, and the bi-prediction may indicate a reference picture list 0-based and a reference picture list 1-based prediction. For example, the inter prediction type information may include an inter_pred_idc syntax element.
[0287] For example, the L0 motion information may include an L0 reference picture index and an L0 motion vector, etc., and the L1 motion information may include an L1 reference picture index and an L1 motion vector, etc. The L0 reference picture index may include information indicating a reference picture in reference picture list 0, and the L1 reference picture index may include information indicating a reference picture in reference picture list 1.
[0288] For example, the candidates may include spatial merge candidates. For example, if the selected candidate is the spatial merge candidate, L0 motion information and L1 motion information may be derived based on the spatial merge candidate, and the L0 prediction sample and the L1 prediction sample may be generated based on the L0 motion information and the L1 motion information.
[0289] For example, the candidates may include a temporal merge candidate. For example, if the selected candidate is the temporal merge candidate, L0 motion information and L1 motion information may be derived based on the temporal merge candidate, and the L0 prediction sample and the L1 prediction sample may be generated based on the L0 motion information and the L1 motion information.
[0290] For example, the candidates may include pair-wise candidates. For example, if the selected candidate is a pair-wise candidate, L0 motion information and L1 motion information may be derived based on the pair-wise candidate, and the L0 prediction sample and the L1 prediction sample may be generated based on the L0 motion information and the L1 motion information. For example, the pair-wise candidate may be derived based on a first candidate and a second candidate in the merge candidate list.
[0291] Alternatively, for example, the merging candidate list may be a sub-block merging candidate list, and an affine merging candidate, a sub-block merging candidate, or an SbTMVP candidate may be selected, where the sub-block affine merging candidate may also be referred to as a sub-block merging candidate.
[0292] For example, the candidates may include an affine merge candidate. For example, if the selected candidate is the affine merge candidate, L0 motion information and L1 motion information may be derived based on the affine merge candidate, and the L0 prediction sample and the L1 prediction sample may be generated based on the affine merge candidate. For example, the affine merge candidate may include a control point motion vector (CPMV), and the L0 prediction sample and the L1 prediction sample may be generated by performing prediction on a sub-block basis based on the CPMV.
[0293] Here, the CPMV may be derived based on one of the neighboring blocks of the CP (Control Point) of the current block. For example, there may be two, three, or four CPs, which may be located at least in the upper left (or upper left corner), upper right (or upper right corner), lower left (or lower left corner), or lower right (or lower right corner) of the current block, and only one CP may exist for each position.
[0294] For example, the CP may be CP0 located at the upper left side of the current block. In this case, the peripheral blocks may include an upper left corner peripheral block of the current block, a left peripheral block adjacent to the lower side of the upper left corner peripheral block, and an upper peripheral block adjacent to the right side of the upper left corner peripheral block. Alternatively, the peripheral blocks may include A2 block, B2 block, or B3 block in FIG. 8.
[0295] Alternatively, for example, the CP may be CP1 located at the upper right side of the current block. In this case, the peripheral blocks may include the upper right corner peripheral block of the current block and the upper peripheral block adjacent to the left of the upper right corner peripheral block. Alternatively, the peripheral blocks may include the B0 block or the B1 block in FIG. 8.
[0296] Alternatively, for example, the CP may be CP2 located at the lower left side of the current block. In this case, the peripheral blocks may include a lower left corner peripheral block of the current block and a left peripheral block adjacent to the upper side of the lower left corner peripheral block. Alternatively, the peripheral blocks may include A0 block or A1 block in FIG. 8.
[0297] Alternatively, for example, the CP may be CP3 located at the lower right side of the current block. Here, CP3 may also be referred to as RB. In this case, the peripheral block may include a col block of the current block or a peripheral block at the lower right corner of the col block. Here, the col block may include a block at the same position as the current block in a reference picture different from the current picture in which the current block is located. Alternatively, the peripheral block may include a T block in FIG. 8.
[0298] Alternatively, for example, the candidate may include an SbTMVP candidate. For example, if the selected candidate is the SbTMVP candidate, L0 motion information and L1 motion information may be derived based on a left neighboring block of the current block, and the L0 prediction sample and the L1 prediction sample may be generated based on the L0 motion information and the L1 prediction sample. For example, the L0 prediction sample and the L1 prediction sample may be generated by performing prediction on a sub-block basis.
[0299] The decoding apparatus may generate a prediction sample of the current block based on a selected candidate and weight index information for the selected candidate (S1530). For example, the weight information for the selected candidate may include information for a weighted average of an L0 prediction sample or an L1 prediction sample. That is, the weight index information may indicate index information for a weight used in the weighted average, and the weighted average may be performed based on the weight index information. For example, the weight index information may include information indicating any one of three or five weights. For example, the weighted average may indicate a weighted average in Bi-prediction with CU-level Weight (BCW) or Bi-prediction with Weighted Average (BWA).
[0300] For example, the candidates may include temporal merge candidates, and weight index information for the temporal merge candidates may be derived as 0. That is, weight index information for the temporal merge candidates may be derived as 0. Here, weight index information being 0 may indicate that weights of each reference direction (i.e., L0 prediction direction and L1 prediction direction in bi-prediction) are the same.
[0301] For example, the candidates may include temporal merge candidates, and weight index information for the temporal merge candidates may be derived based on weight index information of col blocks. That is, weight index information for the temporal merge candidates may be derived based on weight index information of col blocks. Here, the col blocks may include blocks at the same position as the current block in a reference picture different from the current picture in which the current block is located.
[0302] For example, the candidates may include pair-wise candidates, and the weighted index information may be derived based on the weighted index information of a first candidate among a first candidate and a second candidate in a merge candidate list used to derive the pair-wise candidate.
[0303] For example, the candidates include pair-wise candidates, and the pair-wise candidates may be derived based on a first candidate and a second candidate in the merge candidate list. If the weight index information of the first candidate and the second candidate are identical to each other, the weight index information for the pair-wise candidate may be derived based on the weight index information of the first candidate. If the weight index information of the first candidate and the second candidate are not identical to each other, the weight index information for the pair-wise candidate may be derived based on default weight index information. In this case, the default weight index information may correspond to weight index information that assigns the same weight to each of the L0 prediction sample and the L1 prediction sample.
[0304] For example, the candidates include pair-wise candidates, and the pair-wise candidates may be derived based on a first candidate and a second candidate in the merge candidate list. If the weight index information of the first candidate and the second candidate are identical to each other, the weight index information for the pair-wise candidate may be derived based on the weight index information of the first candidate. If the weight index information of the first candidate and the second candidate are not identical to each other, the weight index information for the pair-wise candidate may be derived based on weight index information of the first candidate and the second candidate that is not default weight index information. The default weight index information may correspond to weight index information that assigns the same weight to each of the L0 prediction sample and the L1 prediction sample.
[0305] For example, the merge candidate list may be a sub-block merge candidate list, and affine merge candidates, sub-block merge candidates, or SbTMVP candidates may be selected. Here, the sub-block-based affine merge candidates may also be referred to as sub-block merge candidates.
[0306] For example, the candidates may include constructed affine merge candidates.
[0307] For example, if a motion vector for control point CP0 located at the upper left side of the current block is available in the constructed affine merge candidate, weight index information for the constructed affine merge candidate can be derived based on weight index information for CP0. If a motion vector for control point CP0 located at the upper left side of the current block is not available in the constructed affine merge candidate, weight index information for the constructed affine merge candidate can be derived based on weight index information for control point CP1 located at the upper right side of the current block.
[0308] The weight index information for CP0 may correspond to weight index information of blocks used to derive a motion vector for CP0 among the neighboring blocks of CP0. In addition, the neighboring blocks of CP0 may include a neighboring block at the upper left corner of the current block, a left neighboring block adjacent to the lower side of the neighboring block at the upper left corner, and an upper neighboring block adjacent to the right side of the neighboring block at the upper left corner.
[0309] The weight index information for CP1 may correspond to weight index information of blocks used to derive a motion vector for CP1 among the neighboring blocks of CP1. In addition, the neighboring blocks of CP1 may include a neighboring block at the upper right corner of the current block and an upper neighboring block adjacent to the left of the neighboring block at the upper right corner.
[0310] Alternatively, for example, the candidates may include SbTMVP candidates, and weight index information for the SbTMVP candidates may be derived based on weight index information of left neighboring blocks of the current block. That is, weight index information for SbTMVP candidates may be derived based on weight index information of the left neighboring blocks.
[0311] Alternatively, for example, the candidates may include an SbTMVP candidate, and weight index information for the SbTMVP candidate may be derived as 0. That is, weight index information for an SbTMVP candidate may be derived as 0. Here, weight index information that is 0 may indicate that the weights of each reference direction (i.e., the L0 prediction direction and the L1 prediction direction in bi-prediction) are the same.
[0312] Alternatively, for example, the candidates may include SbTMVP candidates, and the weight index information may be derived based on the weight index information of a center block in a col block. That is, the weight index information for the SbTMVP candidate may be derived based on the weight index information of a center block in a col block. Here, the col block may include a block located in a reference picture different from the current picture in which the current block is located, and derived based on the motion vector of a left peripheral block of the current block. Also, the center block may include a lower right sub-block among four sub-blocks located in the center of the col block.
[0313] Alternatively, for example, the candidates may include SbTMVP candidates, and the weight index information may be derived based on the weight index information of each of the sub-blocks of a col block. That is, the weight index information for the SbTMVP candidates may be derived based on the weight index information of each of the sub-blocks of a col block.
[0314] Although not shown in Fig. 12, for example, the decoding apparatus may derive a residual sample based on residual-related information included in the video information, generate a reconstructed sample based on the prediction sample and the residual sample, and derive a reconstructed block and a reconstructed picture based on the reconstructed sample.
[0315] For example, a decoding device may decode a bitstream or encoded information to obtain video information including all or a part of the above-mentioned information (or syntax elements), and the bitstream or encoded information may be stored in a computer-readable storage medium, and the above-mentioned decoding method may be performed.
[0316] In the above embodiments, the methods are described with reference to flow charts as a series of steps or blocks, but the embodiments are not limited to the order of steps, and certain steps may occur in a different order or simultaneously with other steps than those described. Additionally, those skilled in the art will appreciate that the steps shown in the flow charts are not exclusive, and other steps may be included, or one or more steps of the flow charts may be omitted without affecting the scope of the embodiments herein.
[0317] The methods according to the embodiments of the present document described above may be embodied in software form, and the encoding device and / or decoding device according to the present document may be included in a device that performs video processing, such as a TV, a computer, a smartphone, a set-top box, or a display device.
[0318] In this document, when the embodiments are implemented in software, the methods described above may be implemented with modules (processes, functions, etc.) that perform the functions described above. The modules may be stored in a memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor in various well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in this document may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored on a digital storage medium.
[0319] In addition, the decoding device and encoding device to which the embodiment(s) of this document are applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interactive device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an argument reality (AR) device, an image telephone video device, a transportation means terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, and may be used to process a video signal or a data signal. For example, an over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.
[0320] In addition, the processing method to which the embodiment(s) of the present document are applied may be produced in the form of a program executed by a computer and may be stored in a computer-readable recording medium. In addition, multimedia data having a data structure according to the embodiment(s) of the present document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium may include a medium embodied in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0321] Furthermore, the embodiment(s) of the present document may be embodied in a computer program product by program code, the program code being executable by a computer in accordance with the embodiment(s) of the present document, and the program code may be stored on a computer readable carrier.
[0322] FIG. 15 illustrates an example of a content streaming system in which the embodiments disclosed herein may be applied.
[0323] Referring to FIG. 15, a content streaming system to which the embodiments of this document are applied may broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.
[0324] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0325] The bitstream may be generated by an encoding method or a bitstream generation method applied to an embodiment of this document, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0326] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server controls commands / responses between devices in the content streaming system.
[0327] The streaming server can receive content from a media repository and / or an encoding server. For example, when the content is received from the encoding server, the content can be received in real time. In this case, the streaming server can store the bitstream for a certain period of time to provide a smooth streaming service.
[0328] Examples of the user devices include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glass, head mounted displays (HMDs), digital TVs, desktop computers, and digital signage.
[0329] Each server in the content streaming system can be operated as a distributed server, in which case data received by each server can be processed in a distributed manner.
[0330] The claims described herein may be combined in various ways. For example, the technical features of the method claims herein may be combined and embodied in an apparatus, and the technical features of the apparatus claims herein may be combined and embodied in a method. Also, the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied in an apparatus, and the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied in a method.
Claims
1. 1. A video decoding method performed by a decoding device, comprising: obtaining video information including inter-prediction mode information via a bitstream; generating a sub-block merging candidate list for a current block based on the inter-prediction mode information; selecting a candidate from among the candidates included in the sub-block merging candidate list; generating a prediction sample for the current block based on a weight index for the selected candidate; the sub-block merge candidate list includes inherited affine merge candidates and constructed affine merge candidates; the inherited affine merging candidate is derived based on control point motion vectors of neighboring blocks of the current block; the constructed affine merge candidate is generated based on at least two of a control point CP0 associated with an upper left corner of the current block, a control point CP1 associated with an upper right corner of the current block, a control point CP2 associated with a lower left corner of the current block, and a control point CP3 associated with a lower right corner of the current block; where the constructed affine merge candidates are generated based on {CP0, CP2}, a weight index for the constructed affine merge candidates is equal to a weight index for the CP0, where the constructed affine merge candidates are generated based on {CP1, CP2, CP3}, the weight index for the constructed affine merge candidates is equal to the weight index for CP1, The constructed affine merge candidate is inserted after the inherited affine merge candidate in the sub-block merging candidate list.
2. A video encoding method performed by an encoding device, comprising: determining an inter prediction mode of a current block and generating inter prediction mode information indicating the inter prediction mode; generating a sub-block merging candidate list for the current block based on the inter prediction mode; generating selection information indicative of one of the candidates included in the sub-block merging candidate list; encoding image information including the inter prediction mode information and the selection information; the sub-block merge candidate list includes inherited affine merge candidates and constructed affine merge candidates; the inherited affine merging candidate is derived based on control point motion vectors of neighboring blocks of the current block; the constructed affine merge candidate is generated based on at least two of a control point CP0 associated with an upper left corner of the current block, a control point CP1 associated with an upper right corner of the current block, a control point CP2 associated with a lower left corner of the current block, and a control point CP3 associated with a lower right corner of the current block; where the constructed affine merge candidates are generated based on {CP0, CP2}, a weight index for the constructed affine merge candidates is equal to a weight index for the CP0, where the constructed affine merge candidates are generated based on {CP1, CP2, CP3}, the weight index for the constructed affine merge candidates is equal to the weight index for CP1, The constructed affine merge candidate is inserted after the inherited affine merge candidate in the sub-block merging candidate list.
3. A method for transmitting data for a video, the method comprising: determining an inter prediction mode of a current block, generating inter prediction mode information indicating the inter prediction mode, generating a sub-block merging candidate list for the current block based on the inter prediction mode, generating selection information indicating one of the candidates included in the sub-block merging candidate list, and generating a bitstream for the image based on encoding image information including the inter prediction mode information and the selection information; transmitting the data including the bitstream; the sub-block merge candidate list includes inherited affine merge candidates and constructed affine merge candidates; the inherited affine merging candidate is derived based on control point motion vectors of neighboring blocks of the current block; the constructed affine merge candidate is generated based on at least two of a control point CP0 associated with an upper left corner of the current block, a control point CP1 associated with an upper right corner of the current block, a control point CP2 associated with a lower left corner of the current block, and a control point CP3 associated with a lower right corner of the current block; where the constructed affine merge candidates are generated based on {CP0, CP2}, a weight index for the constructed affine merge candidates is equal to a weight index for the CP0, where the constructed affine merge candidates are generated based on {CP1, CP2, CP3}, the weight index for the constructed affine merge candidates is equal to the weight index for CP1, the constructed affine merge candidate is inserted after the inherited affine merge candidate in the sub-block merging candidate list.
Citation Information
Cited By
Video decoding method and apparatus applying bi-prediction
JP2024180468A
Video decoding method and apparatus for deriving predicted sample using merge candidates
JP2025011218A
Video decoding method and apparatus applying bi-prediction
JP2025161870A
