Image coding method and apparatus using motion vector differences

By signaling motion vector differences using SMVD reference indices in video coding, the method enhances inter prediction efficiency, addressing inefficiencies in compressing high-resolution and immersive media, thereby improving video compression and transmission.

JP2024114882AActive Publication Date: 2024-08-23LG ELECTRONICS INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024104033
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-06-24
Filing Date
2024-06-27
Publication Date
2024-08-23
Estimated Expiration
2040-06-24

AI Technical Summary

Technical Problem

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, with existing technologies facing inefficiencies in video coding, particularly in inter prediction methods.

Method used

A method and apparatus for signaling motion vector differences, specifically L0 and L1 motion vector differences, using a symmetric motion vector difference (SMVD) reference index derived from shot-term reference pictures, enhancing inter prediction efficiency in video coding systems.

Benefits of technology

This approach increases overall video compression efficiency by efficiently signaling motion vector differences and reducing coding system complexity, allowing for improved inter prediction through specific reference picture types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024114882000001_ABST
    Figure 2024114882000001_ABST
Patent Text Reader

Abstract

To provide a method and apparatus for increasing image / video coding efficiency.SOLUTION: According to embodiments of the present document, a prediction procedure can be performed for image / video coding, and the prediction procedure can comprise merge mode motion vector differences (MMVD) and symmetric motion vector differences (SMVD) according to inter prediction. The inter prediction can be performed on the basis of reference pictures of a current picture, and types of the reference pictures (e.g., a long-term reference picture, a short-term reference picture, etc.) can be taken into account for the inter prediction. Accordingly, performance and coding efficiency in the prediction procedure can be increased.SELECTED DRAWING: Figure 20
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This document relates to a method and apparatus for video coding using motion vector differentials. [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.

[0005] In particular, inter prediction in image / video coding can utilize motion vector differentials. In connection with the above procedure, there is discussion of deriving motion vector differentials based on the reference picture type (e.g., shot-term or long-term reference picture). Summary of the Invention [Means for solving the problem]

[0006] According to one embodiment of the present document, a method and apparatus for increasing image / video coding efficiency is provided.

[0007] According to one embodiment of the present document, a method and apparatus for efficient inter prediction in a projection / video coding system is provided.

[0008] According to one embodiment of the present document, a method and apparatus for signaling information about motion vector differentials in inter prediction is provided.

[0009] According to one embodiment of the present document, a method and apparatus are provided for signaling information regarding an L0 motion vector differential and an L1 motion vector differential when bi-prediction is applied to a current block.

[0010] According to an embodiment of the present document, a method and apparatus for signaling an SMVD flag is provided.

[0011] According to one embodiment of this document, a specific reference picture type is used for the derivation of symmetric motion vector differentials.

[0012] According to one embodiment of this document, the SMVD reference index derivation procedure is performed using shot-term reference pictures (pictures marked as being used for shot-term reference).

[0013] According to one embodiment of the present document, there is provided a video / image decoding method performed by a decoding device.

[0014] According to one embodiment of the present document, there is provided a decoding device for performing video / image decoding.

[0015] According to one embodiment of the present document, there is provided a video / image encoding method performed by an encoding device.

[0016] According to one embodiment of the present document, an encoding device for performing video / image encoding is provided.

[0017] According to one embodiment of the present document, a computer-readable digital storage medium is provided having encoded video / image information generated by the video / image encoding method disclosed in at least one of the embodiments of the present document stored thereon.

[0018] According to one embodiment of the present document, a computer-readable digital storage medium is provided having encoded information or encoded video / image information stored thereon, which enables a decoding device to perform the video / image decoding method disclosed in at least one of the embodiments of the present document. Effect of the Invention

[0019] According to the document, it can improve the overall image / video compression efficiency.

[0020] According to this document, information regarding motion vector differentials can be signaled efficiently.

[0021] According to this document, when bi-prediction is applied to the current block, the L1 motion vector differential can be derived efficiently.

[0022] According to this document, the information used to derive the L1 motion vector differential is signaled based on the type of reference picture, thus reducing the complexity of the coding system.

[0023] According to an embodiment of this document, efficient inter prediction can be performed by using a specific reference picture type for deriving reference picture indexes for SMVD.

[0024] The effects that can be obtained through a specific example of this document are not limited to the effects listed above. For example, there may be various technical effects that a person having ordinary skill in the related art can understand or derive from this document. Thus, the specific effects of this document are not limited to those explicitly described in this document, but may include various effects that can be understood or derived from the technical features of this document. [Brief description of the drawings]

[0025] [Figure 1] 1 illustrates generally an example of a video / image coding system that can be applied to embodiments of the present document; [Diagram 2] FIG. 1 is a diagram illustrating the configuration of a video / image encoding device that can be applied to an embodiment of this document. [Diagram 3] FIG. 1 is a diagram illustrating the configuration of a video / image decoding device that can be applied to an embodiment of this document. [Figure 4] 1 illustrates an example of an inter-prediction based video / image encoding method. [Diagram 5] 1 illustrates an example of an inter-prediction based video / picture decoding method. [Figure 6] 1 illustrates an exemplary inter prediction procedure. [Figure 7] FIG. 1 is a diagram for explaining SMVD. [Figure 8] FIG. 13 is a diagram for explaining a method of deriving a motion vector in inter prediction. [Figure 9] 1 shows a method for deriving MVD for MMVD according to one embodiment of this document. [Figure 10] 1 shows a method for deriving MVD for MMVD according to one embodiment of this document. [Figure 11] 1 shows a method for deriving MVD for MMVD according to one embodiment of this document. [Figure 12] 1 shows a method for deriving MVD for MMVD according to one embodiment of this document. [Figure 13] 1 shows a method for deriving MVD for MMVD according to one embodiment of this document. [Figure 14] FIG. 1 is a diagram for explaining SMVD according to one embodiment of the present document. [Figure 15] 1 is a flow chart illustrating a method for deriving the MMVD according to one embodiment of the present document. [Figure 16] 1 is a flow chart illustrating a method for deriving the MMVD according to one embodiment of the present document. [Figure 17] 1 is a flow chart illustrating a method for deriving the MMVD according to one embodiment of the present document. [Figure 18] 1 illustrates a schematic diagram of an example video / image encoding method and associated components according to an embodiment of the present document; [Figure 19] 1 illustrates a schematic diagram of an example video / image encoding method and associated components according to an embodiment of the present document; [Figure 20] 1 illustrates a schematic diagram of an example of an image / video decoding method and associated components according to embodiments of the present document. [Figure 21] 1 illustrates a schematic diagram of an example of an image / video decoding method and associated components according to embodiments of the present document. [Figure 22] 1 illustrates an example of a content streaming system to which the embodiments disclosed herein may be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0026] Although the disclosure of this document may be modified in various ways and may have various embodiments, a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit the disclosure to a specific embodiment. The terms used in this document are merely used to describe a specific embodiment, and are not intended to limit the technical ideas of the embodiments in this document. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this document, the terms "include" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the document, and should be understood not to preclude the possibility of the presence or addition of one or more different features, numbers, steps, operations, components, parts, or combinations thereof.

[0027] Meanwhile, each component in the drawings described in this document is shown independently for the convenience of describing different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components among the components may be combined to form one component, and one component may be divided into multiple components. Embodiments in which each component is integrated and / or separated are also included in the disclosure scope of this document.

[0028] Hereinafter, the embodiments of the present document will be described with reference to the accompanying drawings. Hereinafter, the same reference numerals may be used for the same components in the drawings, and duplicated descriptions of the same components may be omitted.

[0029] FIG. 1 illustrates a schematic diagram of an example video / image coding system in which embodiments of the present document may be applied.

[0030] As shown in Figure 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in a file or streaming form via a digital storage medium or a network.

[0031] The source device may comprise a video source, an encoding device, and a sending unit. The receiving device may comprise a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / video encoding device, and the decoding device may be referred to as a video / video decoding device. The transmitter may be comprised in the encoding device. The receiver may be comprised in the decoding device. The renderer may comprise a display unit, which may be a separate device or an external component.

[0032] A video source may acquire video / images through a video / image capture, synthesis, or generation process. 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 via a computer, etc., in which case the video / image capture process may be replaced by a process in which related data is generated.

[0033] An encoding device may encode an input video / image. The encoding device may perform a series of procedures such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) may be output in the form of a bitstream.

[0034] The transmitting unit may transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit may include elements for generating a media file through a predetermined file format and may include elements for transmission via a broadcasting / communication network. The receiving unit may receive / extract the bitstream and transmit it to a decoding device.

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

[0036] The renderer may render the decoded video / image, and the rendered video / image may be displayed via a display unit.

[0037] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document may be applied to methods disclosed in the versatile video coding (VVC) standard. Also, the methods / embodiments disclosed in this document may be applied to methods disclosed in the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation of audio video coding standard (AVS2) or next generation video / image coding standards (e.g., H.267 or H.268, etc.).

[0038] Various embodiments relating to video / image coding are presented herein and, unless otherwise stated, the embodiments may be used in combination with each other.

[0039] In this document, video may mean a collection of a series of images over time. A picture generally means a unit showing one image at a particular time, and a slice / tile is a unit constituting a part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). One picture may be composed of one or more slices / tiles. 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 may indicate a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice includes an integer number of complete tiles or an integer number of consecutive complete CTU rows within a tile of a picture that may be exclusively contained in a single NAL unit.

[0040] 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.

[0041] A pixel or a pel may refer to the smallest unit that constitutes one picture (or image). A term corresponding to a pixel may be "sample." A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.

[0042] 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 set (or array) of samples or transform coefficients consisting of M columns and N rows.

[0043] In this document, "A or B" may mean "only A," "only B," or "both A and B." In other words, in this document, "A or B" may be interpreted as "A and / or B." For example, in this document, "A, B or C" may mean "only A," "only B," "only C," or "any combination of A, B and C."

[0044] As used in this document, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Thus, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."

[0045] In this document, "at least one of A and B" may mean "only A," "only B," or "both A and B." Also, in this document, the expressions "at least one of A or B" and "at least one of A and / or B" may be interpreted as "at least one of A and B."

[0046] Also, in this document, "at least one of A, B and C" can mean "only A," "only B," "only C," or "any combination of A, B and C." Also, "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."

[0047] Furthermore, parentheses used in this document may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" may be proposed as an example of "prediction." In other words, "prediction" in this document is not limited to "intra prediction," and "intra prediction" may be proposed as an example of "prediction." Furthermore, even when "prediction (i.e., intra prediction)" is displayed, "intra prediction" may be proposed as an example of "prediction."

[0048] Technical features described individually in one drawing in this document may be embodied individually or simultaneously.

[0049] 2 is a diagram for explaining a schematic configuration of a video / image encoding device to which the embodiment of the present document can be applied. Hereinafter, the encoding device may include an image encoding device and / or a video encoding device.

[0050] As shown in FIG. 2, the encoding apparatus 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 predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 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.

[0051] The image division unit 210 may divide an input image (or a picture or a 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) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit described above.The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0052] The unit may be used interchangeably with terms such as block or area. In general, an M×N block may refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally refer to a pixel or 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 corresponding to a pixel or pel of one picture (or image).

[0053] The encoding apparatus 200 may generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input image signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as illustrated, a unit in the encoder 200 that subtracts a prediction signal (predicted block, prediction sample array) from an input image signal (original block, original sample array) 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 the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction-related information can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

[0054] 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 modes may include, for example, a DC mode and a planar mode. The directional modes 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 settings. 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.

[0055] 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 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 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 a neighboring block 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 neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0056] 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, or 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 deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be 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.

[0057] The prediction signal generated through 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 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 square size, or may be applied to non-square variable-sized blocks.

[0058] The quantization unit 233 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoding unit 240, which may encode the quantized signal (information on the quantized transform coefficients) and output the quantized signal to a bitstream. The information on the quantized transform coefficients may be referred to as residual information. The quantization unit 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit 240 may 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 / picture information) may be transmitted or stored in the form of a bitstream in network abstraction layer (NAL) unit units. The video / picture 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 / picture information may further include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / picture 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 stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A 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 apparatus 200, or the transmitter may be included in the entropy encoding unit 240.

[0059] 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.

[0060] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.

[0061] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240, as will be described later in the description of each filtering method. The information related to filtering may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

[0062] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221. When inter prediction is applied through this, the encoding apparatus may avoid prediction mismatch between the encoding apparatus 100 and the decoding apparatus, and may also improve encoding efficiency.

[0063] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.

[0064] 3 is a diagram for explaining the configuration of a video / image decoding device to which the embodiment of the present document can be applied. Hereinafter, the decoding device may include an image decoding device and / or a video decoding device.

[0065] 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 321. The entropy decoding unit 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.

[0066] If a bitstream including video / image information is input, the decoding apparatus 300 can restore an image corresponding to a process in which the video / image information is processed by the encoding apparatus of FIG. 3. For example, the decoding apparatus 300 can derive a unit / block based on block division related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied in the encoding apparatus. Thus, the processing unit for decoding can be, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximal 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 apparatus 300 can be reproduced by a reproduction device.

[0067] The decoding apparatus 300 may receive a signal output from the encoding apparatus 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 (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding apparatus may further decode pictures based on information on the parameter set and / or the general constraint information. Signaling / received information and / or syntax elements described later in this document may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in a bitstream, determine a context model using syntax element information to be decoded and decoding information of adjacent and to-be-decoded blocks or symbol / bin information decoded in a previous step, predict the occurrence probability of a bin according to the determined context model, and perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element.In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Prediction information from the information decoded by the entropy decoding unit 310 may be provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values ​​entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, filtering information from the information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding 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.

[0068] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the 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.

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

[0070] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on the prediction information output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.

[0071] 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 / movie 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 deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be 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.

[0072] 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 depending on a prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block using a prediction mode applied to a neighboring block.

[0073] 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 construct 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 on the prediction may include information indicating a mode of inter prediction for the current block.

[0074] 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.

[0075] 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, and may be output after filtering as described below, or may be used for inter prediction of a next picture.

[0076] Meanwhile, luma mapping with chroma scaling (LMCS) can be applied during the picture decoding process.

[0077] 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.

[0078] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 332. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 331.

[0079] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding apparatus 200 can also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding apparatus 300, respectively.

[0080] As described above, prediction is performed to improve compression efficiency when performing video coding. Through this, 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 manner by an encoding device and a decoding device, and the encoding device can improve video coding efficiency by signaling information (residual information) on the residual between the original block and the predicted block, which is not an original sample value of the original block, to a decoding device. The decoding device can derive a residual block including residual samples based on the residual information, combine the residual block with the predicted block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.

[0081] 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. In addition, 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.

[0082] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. When the quantization / dequantization is omitted, the quantized transform coefficients may be referred to as transform coefficients. When the transform / inverse transform is omitted, the transform coefficients may also be referred to as coefficients or residual coefficients, or may still be referred to as transform coefficients for uniformity of representation.

[0083] 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 coefficients, and the information on the transform coefficients may be signaled via a residual coding syntax. Transform coefficients may be derived based on the residual information (or the information on the transform coefficients), and scaled transform coefficients may be derived through an inverse transform (scaling) on ​​the transform coefficients. Residual samples may be derived based on an inverse transform (transform) on the scaled transform coefficients. This may be similarly applied / expressed in other parts of this document.

[0084] Intra prediction may refer to a prediction that generates a prediction sample for a current block based on a reference sample in a picture (hereinafter, referred to as a current picture) to which the current block belongs. When intra prediction is applied to the current block, neighboring reference samples used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may include a sample adjacent to the left boundary of the current block having a size of nW×nH and a total of 2×nH samples adjacent to the bottom-left side, a sample adjacent to the top boundary of the current block and a total of 2×nW samples adjacent to the top-right side, and one sample adjacent to the top-left side of the current block. Alternatively, the neighboring reference samples of the current block may include upper neighboring samples of multiple columns and left neighboring samples of multiple rows. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block having a size of nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.

[0085] However, some of the neighboring reference samples of the current block may not yet be decoded or may not be available. In this case, the decoder may substitute the unavailable samples as available samples to construct neighboring reference samples to be used for prediction. Alternatively, the decoder may construct neighboring reference samples to be used for prediction through interpolation of available samples.

[0086] When a neighboring reference sample is derived, (i) a predicted sample can be derived based on an average or an interpolation of neighboring reference samples of the current block, or (ii) the predicted sample can be derived based on a reference sample that exists in a specific (prediction) direction with respect to the predicted sample among the neighboring reference samples of the current block. The case (i) can be called a non-directional mode or a non-angular mode, and the case (ii) can be called a directional mode or an angular mode.

[0087] In addition, the prediction sample may be generated by interpolating a first adjacent sample located in a prediction direction of an intra prediction mode of the current block and a second adjacent sample located in an opposite direction to the prediction direction based on a prediction sample of the current block among the adjacent reference samples. The above case may be called linear interpolation intra prediction (LIP). In addition, a chroma prediction sample may be generated based on a luma sample using a linear model. In this case, it may be called LM mode.

[0088] Also, a temporary prediction sample of the current block may be derived based on the filtered neighboring reference samples, and the prediction sample of the current block may be derived by weighting the temporary prediction sample and at least one reference sample derived according to the intra prediction mode among the existing neighboring reference samples, i.e., the non-filtered neighboring reference samples. The above case may be called Position Dependent Intra Prediction (PDPC).

[0089] Also, the reference sample line with the highest prediction accuracy is selected from the adjacent multiple reference sample lines of the current block, a prediction sample is derived using a reference sample located in the prediction direction of the corresponding line, and the reference sample line used at this time is signaled to a decoding device, thereby performing intra prediction encoding. The above case can be called multi-reference line intra prediction or MRL-based intra prediction.

[0090] Also, the current block may be divided into vertical or horizontal sub-partitions, intra prediction may be performed based on the same intra prediction mode, and adjacent reference samples may be derived and used in units of the sub-partitions. That is, in this case, the intra prediction mode for the current block is equally applied to the sub-partitions, and adjacent reference samples may be derived and used in units of the sub-partitions, thereby improving intra prediction performance in some cases. Such a prediction method may be called ISP (intra sub-partitions) based intra prediction.

[0091] The above-mentioned intra prediction methods may be called intra prediction types, distinguished from intra prediction modes. The intra prediction types may be called various terms, such as intra prediction techniques or additional intra prediction modes. For example, the intra prediction types (or additional intra prediction modes, etc.) may include at least one of the above-mentioned LIP, PDPC, MRL, and ISP. A general intra prediction method excluding a specific intra prediction type, such as the LIP, PDPC, MRL, or ISP, may be called a normal intra prediction type. The normal intra prediction type may be generally applied when the above-mentioned specific intra prediction types are not applied, and prediction may be performed based on the above-mentioned intra prediction modes. Meanwhile, post-processing filtering may be performed on the derived prediction samples, if necessary.

[0092] Specifically, the intra prediction procedure may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and an intra prediction mode / type-based prediction sample derivation step. If necessary, a post-processing filtering step may be performed on the derived prediction sample.

[0093] When intra prediction is applied, the intra prediction mode applied to the current block may be determined using the intra prediction mode of a neighboring block. For example, the decoding apparatus may select one of MPM candidates in an MPM (most probable mode) list derived based on the intra prediction mode of a neighboring block (e.g., a left and / or upper neighboring block) of the current block and an additional candidate mode based on the received MPM index, or may select one of the remaining intra prediction modes not included in the MPM candidates (and the planar mode) based on the remaining intra prediction mode information. The MPM list may be configured with or without including a planar mode as a candidate. For example, if the MPM list includes a planar mode as a candidate, the MPM list may have six candidates, and if the MPM list does not include a planar mode as a candidate, the MPM list may have five candidates. If the MPM list does not include a planar mode as a candidate, a not planar flag (e.g., intra_luma_not_planar_flag) indicating that the intra prediction mode of the current block is not a planar mode may be signaled. For example, the MPM flag may be signaled first, and the MPM index and the not planar flag may be signaled when the value of the MPM flag is 1. Also, the MPM index may be signaled when the value of the not planar flag is 1. Here, the reason why the MPM list is configured not to include a planar mode as a candidate is to first signal a flag (not planar flag) to first check whether the mode is a planar mode, since the planar mode is always considered as an MPM, rather than meaning that the planar mode is not an MPM.

[0094] For example, whether the intra prediction mode applied to the current block is among the MPM candidates (and planar mode) or among the remaining mode may be indicated based on an MPM flag (e.g., intra_luma_mpm_flag). A value of 1 of the MPM flag may indicate that the intra prediction mode for the current block is among the MPM candidates (and planar mode), and a value of 0 of the MPM flag may indicate that the intra prediction mode for the current block is not among the MPM candidates (and planar mode). A value of 0 of the not planar flag (e.g., intra_luma_not_planar_flag) may indicate that the intra prediction mode for the current block is a planar mode, and a value of 1 of the not planar flag may indicate that the intra prediction mode for the current block is not a planar mode. The MPM index may be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information may be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may index the remaining intra prediction modes not included in the MPM candidates (and planar modes) among all intra prediction modes in order of prediction mode numbers, and may indicate one of them. The intra prediction mode is an intra prediction mode for a luma component (sample). Hereinafter, the intra prediction mode information may include at least one of the MPM flag (e.g., intra_luma_mpm_flag), the not planar flag (e.g., intra_luma_not_planar_flag), the MPM index (e.g., mpm_idx or intra_luma_mpm_idx), and the remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder).In this document, the MPM list may be referred to by various terms such as MPM candidate list, candModeList, etc. If MIP is applied to the current block, a separate mpm flag (e.g., intra_mip_mpm_flag), mpm index (e.g., intra_mip_mpm_idx), and remaining intra-prediction mode information (e.g., intra_mip_mpm_remainder) for MIP may be signaled, and the not planar flag is not signaled.

[0095] That is, in general, when an image is divided into blocks, a current block to be coded and a neighboring block have similar image characteristics. Therefore, the current block and the neighboring blocks are highly likely to have the same or similar intra prediction modes. Therefore, an encoder can use the intra prediction modes of the neighboring blocks to encode the intra prediction mode of the current block.

[0096] For example, the encoder / decoder may configure a most probable modes (MPM) list for the current block. The MPM list may also be referred to as an MPM candidate list. Here, MPM may refer to a mode used to improve coding efficiency by considering similarity between a current block and an adjacent block during intra prediction mode coding. As described above, the MPM list may be configured to include a planar mode or may be configured to exclude the planar mode. For example, if the MPM list includes the planar mode, the number of candidates in the MPM list is six. And, if the MPM list does not include the planar mode, the number of candidates in the MPM list is five.

[0097] The encoder / decoder can construct an MPM list containing 5 or 6 MPMs.

[0098] To construct the MPM list, three types of modes can be considered: default intra modes, neighbor intra modes, and derived intra modes.

[0099] For the adjacent intra mode, two neighboring blocks can be considered: a left neighboring block and an upper neighboring block.

[0100] As mentioned above, if the MPM list is configured not to include a planar mode, the planar mode is excluded from the list and the number of MPM list candidates can be set to five.

[0101] In addition, among the intra prediction modes, the non-directional mode (or non-angular mode) may include a DC mode based on an average of neighboring reference samples of the current block or a planar mode based on interpolation.

[0102] When inter prediction is applied, a prediction unit of an encoding device / decoding device may perform inter prediction in units of blocks to derive prediction samples. Inter prediction may indicate a prediction derived in a manner dependent on data elements (e.g., sample values ​​or motion information) of pictures other than the current picture. When inter prediction is applied to the current block, a predicted block (prediction sample array) for the current block may be derived based on a reference block (reference sample array) identified by a motion vector on a reference picture indicated by an index of the reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information of the current block may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and an index of a reference picture. The motion information may further include information on an inter prediction type (L0 prediction, L1 prediction, BI prediction, etc.). When inter prediction is applied, the neighboring 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 (colCU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, a candidate list of motion information may be constructed based on the neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) to derive the motion vector and / or the index of the reference picture of the current block may be signaled.Inter prediction is performed based on various prediction modes. For example, in the case of skip mode and merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the selected neighboring block is used as a motion vector predictor, and a motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.

[0103] The motion information may include L0 motion information and / or L1 motion information depending on an inter prediction type (L0 prediction, L1 prediction, BI prediction, etc.). A motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and a motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. A prediction based on an L0 motion vector may be referred to as an L0 prediction, a prediction based on an L1 motion vector may be referred to as an L1 prediction, and a prediction based on both the L0 motion vector and the L1 motion vector may be referred to as a bi-prediction. Here, the L0 motion vector may indicate a motion vector associated with a reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector associated with a reference picture list L1 (L1). The reference picture list L0 may include pictures that are earlier in output order than the current picture, and the reference picture list L1 may include pictures that are later in output order than the current picture. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may further include a picture subsequent to the current picture in output order as a reference picture. In this case, the previous picture may be indexed earlier in the reference picture list L0, and the subsequent picture may be indexed thereafter. The reference picture list L1 may further include a picture subsequent to the current picture in output order as a reference picture. In this case, the subsequent picture may be indexed earlier in the reference picture list 1, and the previous picture may be indexed thereafter. Here, the output order may correspond to a picture order count (POC) order.

[0104] A video / picture encoding procedure based on inter prediction generally includes, for example:

[0105] FIG. 4 illustrates an example of an inter-prediction based video / image encoding method.

[0106] The encoding apparatus performs inter prediction on a current block (S400). The encoding apparatus derives an inter prediction mode and motion information of the current block, and generates a prediction sample of the block. Here, the procedures of determining the inter prediction mode, deriving the motion information, and generating the prediction sample may be performed simultaneously, or one procedure may be performed before the other procedures. For example, the inter prediction unit of the encoding apparatus includes a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, in which the prediction mode determination unit determines a prediction mode for the current block, the motion information derivation unit derives motion information of the current block, and the prediction sample derivation unit derives a prediction sample of the current block. For example, the inter prediction unit of the encoding apparatus searches for a block similar to the current block within a certain region (search region) of a reference picture by motion estimation, and derives a reference block whose difference with the current block is minimum or equal to a certain criterion. Based on this, a reference picture index indicating a reference picture in which the reference block is located may be derived, and a motion vector may be derived based on a position difference between the reference block and the current block. The encoding apparatus may determine a mode to be applied to the current block from among various prediction modes. The encoding apparatus may compare RD costs for the various prediction modes to determine an optimal prediction mode for the current block.

[0107] For example, when a skip mode or a merge mode is applied to the current block, the encoding apparatus may construct a merge candidate list (to be described later) and derive a reference block whose difference from the current block is minimum or equal to or less than a certain criterion among reference blocks indicated by merge candidates included in the merge candidate list. In this case, a merge candidate related to the derived reference block is selected, and merge index information indicating the selected merge candidate is generated and signaled to a decoding apparatus. Motion information of the current block may be derived using motion information of the selected merge candidate.

[0108] As another example, when the (A)MVP mode is applied to the current block, the encoding apparatus may construct an (A)MVP candidate list (to be described later) and use a motion vector of an MVP candidate selected from the MVP (motion vector predictor) candidates included in the (A)MVP candidate list as the MVP of the current block. In this case, for example, a motion vector indicating a reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block, and an MVP candidate having a motion vector with the smallest difference from the motion vector of the current block among the MVP candidates may be the selected MVP candidate. A motion vector difference (MVD), which is a difference obtained by subtracting the MVP from the motion vector of the current block, may be derived. In this case, information regarding the MVD may be signaled to the decoding apparatus. Also, when the (A)MVP mode is applied, the value of the reference picture index is configured as reference picture index information and is separately signaled to the decoding apparatus.

[0109] The encoding apparatus derives a residual sample based on the predicted sample (S410). The encoding apparatus may derive the residual sample by comparing an original sample of the current block with the predicted sample.

[0110] The encoding apparatus encodes video information including prediction information and residual information (S420). The encoding apparatus outputs the encoded video information in the form of a bitstream. The prediction information is information related to the prediction procedure and includes prediction mode information (e.g., skip flag, merge flag, or mode index) and information on motion information. The information on the motion information includes candidate selection information (e.g., merge index, mvp flag, or mvp index) which is information for deriving a motion vector. The information on the motion information also includes information on the above-mentioned MVD and / or reference picture index information. The information on the motion information also includes information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information on the residual sample. The residual information includes information on quantized transform coefficients for the residual sample.

[0111] The output bitstream may be stored in a (digital) storage medium and then transmitted to the decoding device, or may be transmitted to the decoding device via a network.

[0112] Meanwhile, as described above, the encoding apparatus generates a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference samples and the residual samples. This is because the encoding apparatus derives the same prediction result as that performed by the decoding apparatus, thereby improving coding efficiency. Therefore, the encoding apparatus can store the reconstructed picture (or reconstructed samples, reconstructed blocks) in a memory and use it as a reference picture for inter prediction. As described above, an in-loop filtering procedure can be further applied to the reconstructed picture.

[0113] A video / picture decoding procedure based on inter prediction generally includes, for example, the following.

[0114] FIG. 5 illustrates an example of an inter-prediction based video / picture decoding method.

[0115] As shown in Fig. 5, the decoding apparatus performs operations corresponding to those performed by the encoding apparatus, and can perform prediction on a current block based on received prediction information to derive a prediction sample.

[0116] Specifically, the decoding apparatus determines a prediction mode for the current block based on received prediction information (S500). The decoding apparatus may determine which inter prediction mode is applied to the current block based on prediction mode information in the prediction information.

[0117] For example, it may be determined whether the merge mode is applied to the current block or whether the (A)MVP mode is determined based on the merge flag, or any one of various inter prediction mode candidates may be selected based on the mode index. The inter prediction mode candidates may include a skip mode, a merge mode, and / or an (A)MVP mode, or may include various inter prediction modes described below.

[0118] The decoding apparatus derives motion information of the current block based on the determined inter prediction mode (S510). For example, when a skip mode or a merge mode is applied to the current block, the decoding apparatus forms a merge candidate list (described later) and selects one of the merge candidates included in the merge candidate list. The selection is performed based on the above-mentioned selection information (merge index). The motion information of the selected merge candidate may be used to derive motion information of the current block. The motion information of the selected merge candidate may be used as motion information of the current block.

[0119] As another example, when the (A)MVP mode is applied to the current block, the decoding apparatus may construct an (A)MVP candidate list (to be described later) and use a motion vector of a selected MVP candidate among the MVP (motion vector predictor) candidates included in the (A)MVP candidate list as the MVP of the current block. The selection is performed based on the above-mentioned selection information (mvp flag or mvp index). In this case, the MVD of the current block may be derived based on information on the MVD, and the motion vector of the current block may be derived based on the MVP of the current block and the MVD. Also, the reference picture index of the current block may be derived based on the reference picture index information. A picture pointed to by the reference picture index in the reference picture list for the current block may be derived as a reference picture referenced for inter prediction of the current block.

[0120] On the other hand, the motion information of the current block may be derived without constructing a candidate list as described below, in which case the motion information of the current block may be derived according to a procedure disclosed in a prediction mode as described below. In this case, the candidate list construction as described above may be omitted.

[0121] The decoding apparatus generates a prediction sample for the current block based on the motion information of the current block (S520). In this case, the reference picture may be derived based on a reference picture index of the current block, and the prediction sample for the current block may be derived using a sample of a reference block to which the motion vector of the current block points on the reference picture. In this case, as described below, a prediction sample filtering procedure may be further performed on all or some of the prediction samples of the current block, depending on the case.

[0122] For example, the inter prediction unit of the decoding device may include a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit, and may determine a prediction mode for the current block based on prediction mode information received by the prediction mode determination unit, derive motion information (such as a motion vector and / or a reference picture index) of the current block based on information regarding the motion information received by the motion information derivation unit, and derive a prediction sample of the current block from the prediction sample derivation unit.

[0123] The decoding apparatus generates a residual sample for the current block based on the received residual information (S530). The decoding apparatus generates a reconstructed sample for the current block based on the predicted sample and the residual sample, and generates a reconstructed picture based on the reconstructed sample (S540). Thereafter, an in-loop filtering procedure can be further applied to the reconstructed picture, as described above.

[0124] FIG. 6 exemplarily illustrates an inter prediction procedure.

[0125] 6, as described above, the inter prediction procedure includes an inter prediction mode determination step, a motion information derivation step according to the determined prediction mode, and a prediction (prediction sample generation) step based on the derived motion information. The inter prediction procedure is performed in an encoding device and a decoding device as described above. In this document, a coding device includes an encoding device and / or a decoding device.

[0126] As shown in FIG. 6, the coding apparatus determines an inter prediction mode for a current block (S600). Various inter prediction modes can be used for predicting a current block in a picture. For example, various modes such as merge mode, skip mode, motion vector prediction mode (MVP), affine mode, sub-block merge mode, and merge with MVD mode (MMVD) can be used. Decoder side motion vector refinement mode (DMVR), adaptive motion vector resolution mode (AMVR), Bi-prediction with CU-level weight (BCW), Bi-directional optical flow (BDOF), etc. can be used in addition to or instead as additional modes. The affine mode may be referred to as an affine motion prediction mode. The MVP mode may also be referred to as "AMVP (advanced motion vector prediction) mode." In this document, some modes and / or motion information candidates derived by some modes may be included as one of the motion information related candidates of other modes. For example, an HMVP candidate may be added as a merge candidate of the merge / skip mode, or may be added as an MVP candidate of the MVP mode. When the HMVP candidate is used as a motion information candidate of the merge mode or skip mode, the HMVP candidate may be referred to as an HMVP merge candidate.

[0127] Prediction mode information indicating an inter prediction mode of a current block may be signaled from an encoding apparatus to a decoding apparatus. The prediction mode information may be included in a bitstream and received by the decoding apparatus. The prediction mode information includes index information indicating one of a number of candidate modes. Alternatively, the inter prediction mode may be indicated through hierarchical signaling of flag information. In this case, the prediction mode information includes one or more flags. For example, a skip flag may be signaled to indicate whether a skip mode is applied, and if the skip mode is not applied, a merge flag may be signaled to indicate whether a merge mode is applied, and if the merge mode is not applied, an MVP mode may be indicated to be applied, or a flag for additional classification may be further signaled. The affine mode may be signaled in an independent mode, or may be signaled in a mode dependent on the merge mode or MVP mode. For example, the affine mode includes an affine merge mode and an affine MVP mode.

[0128] Meanwhile, information indicating whether the above-mentioned list0 (L0) prediction, list1 (L1) prediction, or bi-prediction is used for the current block (current coding unit) may be signaled. The information may be called motion prediction direction information, inter prediction direction information, or inter prediction indication information, and may be configured / encoded / signaled in the form of, for example, an inter_pred_idc syntax element. That is, the inter_pred_idc syntax element may indicate whether the above-mentioned list0 (L0) prediction, list1 (L1) prediction, or bi-prediction is used for the current block (current coding unit). In this document, for convenience of explanation, the inter prediction type (L0 prediction, L1 prediction, or BI prediction) indicated by the inter_pred_idc syntax element may be represented as a motion prediction direction. L0 prediction may be represented as pred_L0, L1 prediction as pred_L1, and bi-prediction as pred_BI. For example, the value of the inter_pred_idc syntax element can indicate the prediction type as follows:

[0129] [Table 1]

[0130] As described above, one picture includes one or more slices. A slice may have one of slice types including an I (intra) slice, a P (predictive) slice, and a B (bi-predictive) slice. The slice type is indicated based on slice type information. For blocks in an I slice, inter prediction is not used for prediction, and only intra prediction is used. Of course, in this case, original sample values ​​can also be coded and signaled without prediction. For blocks in a P slice, intra prediction or inter prediction is used, and when inter prediction is used, only uni prediction can be used. Meanwhile, for blocks in a B slice, intra prediction or inter prediction is used, and when inter prediction is used, up to bi prediction can be used.

[0131] L0 and L1 include reference pictures encoded / decoded before the current picture. For example, L0 includes reference pictures before and / or after the current picture in POC order, and L1 includes reference pictures after and / or before the current picture in POC order. In this case, a lower reference picture index is assigned to L0 relative to a reference picture before the current picture in POC order, and a lower reference picture index is assigned to L1 relative to a reference picture after the current picture in POC order. In the case of B slices, bi-prediction is applied, and unidirectional bi-prediction may also be applied in this case, or bi-directional bi-prediction may also be applied. Bi-directional bi-prediction is also called true bi-prediction.

[0132] The following table shows the syntax for a coding unit according to one embodiment of this document.

[0133] [Table 2-1]

[0134] [Table 2-2]

[0135] [Table 2-3]

[0136] [Table 2-4]

[0137] [Table 2-5]

[0138] Referring to Table 2, general_merge_flag indicates that general merging is available, and regular merge mode, mmvd mode, and merge subblock mode (subblock merge mode) are available when the value of general_merge_flag is 1. For example, when the value of general_merge_flag is 1, merge data syntax can be parsed from the encoded video / image information (or bitstream), and the merge data syntax is configured / coded to include information as shown in the following table.

[0139] [Table 3]

[0140] The coding apparatus derives motion information for the current block (S610). The motion information may be derived based on the inter prediction mode.

[0141] The coding apparatus may perform inter prediction using motion information of the current block. The encoding apparatus may derive optimal motion information for the current block through a motion estimation procedure. For example, the encoding apparatus may search for a similar reference block with high correlation in a fractional pixel unit within a determined search range in the reference picture using an original block in an original picture for the current block, thereby deriving motion information. The similarity of the blocks may be derived based on a difference in phase-based sample values. For example, the similarity of the blocks may be calculated based on the sum of absolute differences (SAD) between the current block (or the template of the current block) and the reference block (or the template of the reference block). In this case, the motion information may be derived based on the reference block with the smallest SAD in the search area. The derived motion information may be signaled to the decoding apparatus in various ways based on the inter prediction mode.

[0142] The coding apparatus performs inter prediction based on motion information for the current block (S620). The coding apparatus may derive predictive samples for the current block based on the motion information. The current block including the predictive samples may be referred to as a predicted block.

[0143] When a merge mode is applied, the motion information of the current prediction block is derived using the motion information of the neighboring prediction blocks without directly transmitting the motion information of the current prediction block. 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.

[0144] To perform the merge mode, the encoder 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 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. After finding the merge candidate blocks, the encoder may generate a merge candidate list and select the merge candidate block with the smallest cost among them as the final merge candidate block.

[0145] The merge candidate list may use, for example, five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate may be used. Hereinafter, the spatial merge candidates or the spatial MVP candidates described below may be referred to as SMVPs, and the temporal merge candidates or the temporal MVP candidates described below may be referred to as TMVPs.

[0146] The following describes how to construct a merge candidate list according to this document.

[0147] A coding apparatus (encoder / decoder) searches spatial neighboring blocks of a current block and inserts derived spatial merging candidates into a merging candidate list. For example, the spatial neighboring blocks include a lower left corner neighboring block, a left neighboring block, a upper right corner neighboring block, an upper neighboring block, and an upper left corner neighboring block of the current block. However, this is an example, and additional neighboring blocks such as a right neighboring block, a lower neighboring block, and a lower right neighboring block can be used as the spatial neighboring blocks in addition to the above-mentioned spatial neighboring blocks. The coding apparatus searches the spatial neighboring blocks based on a priority order to detect available blocks, and derives motion information of the detected blocks as the spatial merging candidates.

[0148] The coding device inserts a temporal merge candidate, which is derived by searching for temporally neighboring blocks of the current block, into the merge candidate list. The temporally neighboring blocks may be located on a reference picture that is different from the current picture in which the current block is located. The reference picture on which the temporally neighboring blocks are located may be referred to as a collocated picture or a col picture. The temporally neighboring blocks can be searched in the order of the peripheral blocks of the lower right corner and the lower right center block of the co-located block with respect to the current block on the col picture. On the other hand, when motion data compression is applied, specific motion information is stored as representative motion information for each fixed storage unit in the col picture. In this case, it is not necessary to store the motion information for all blocks within the fixed 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 units of 16×16 samples or 8×8 samples, or size information regarding the fixed storage unit may be signaled from the encoder to the decoder. When the motion data compression is applied, the motion information of the temporally neighboring blocks can be replaced with the representative motion information of the fixed storage unit in which the temporally neighboring blocks are located. That is, in this case, from the perspective of implementation, instead of the prediction block located at the coordinates of the temporally neighboring blocks, based on the coordinates (upper left sample position) of the temporally neighboring blocks, after arithmetic right shift by a certain value, the temporal merge candidate is derived based on the motion information of the prediction block covering the position after arithmetic left shift. For example, when the fixed storage unit is a 2n×2n sample unit, if the coordinates of the temporally neighboring blocks are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb>n)<<n), (yTnb>n)<<n)) is 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 modified position ((xTnb>4)<<4), (yTnb>4)<<4) is used for the temporal merge candidate. Or, 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 modified position ((xTnb>3)<<3), (yTnb>3)<<3) is used for the temporal merge candidate.

[0149] The coding apparatus may check whether the number of current merging candidates is smaller than the number of maximum merging candidates. The number of maximum merging candidates may be predefined or signaled from the encoder to the decoder. For example, the encoder generates information on the number of maximum merging candidates, encodes the information, and transmits the information to the decoder in the form of a bitstream. If the number of maximum merging candidates is filled, no further candidate addition process may be performed.

[0150] If the check indicates that the number of current merging candidates is less than the maximum number of merging candidates, the coding apparatus inserts an additional merging candidate into the merging candidate list.

[0151] If the check results in that the number of the current merging candidates is not less than the maximum number of merging candidates, the coding apparatus terminates constructing the merging candidate list. In this case, the encoder may select an optimal merging candidate from among the merging candidates constituting the merging candidate list based on a rate-distortion (RD) cost, and may signal selection information (e.g., a merge index) indicating the selected merging candidate to a decoder. The decoder selects the optimal merging candidate based on the merging candidate list and the selection information.

[0152] As described above, the motion information of the selected merging candidate may be used as the motion information of the current block, and a predicted sample of the current block may be derived based on the motion information of the current block. An encoder may derive a residual sample of the current block based on the predicted sample, and signal residual information regarding the residual sample to a decoder. As described above, a decoder may generate a reconstructed sample based on the residual sample derived based on the residual information and the predicted sample, and generate a reconstructed picture based on the reconstructed sample.

[0153] 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, except that when the skip mode is applied, the residual signal for the corresponding block is omitted, and therefore the predicted samples can be used directly as reconstructed samples.

[0154] When the MVP mode is applied, a motion vector predictor (mvp) candidate list is generated using the motion vector of the restored spatial neighboring block and / or the motion vector corresponding to the temporal neighboring block (or Col block). That is, the motion vector of the restored spatial neighboring block and / or the motion vector corresponding to the temporal neighboring block may be used as a motion vector predictor candidate. When bi-prediction is applied, an mvp candidate list for L0 motion information derivation and an mvp candidate list for L1 motion information derivation may be generated and used separately. The prediction information (or prediction information) includes selection information (e.g., an MVP flag or an MVP index) indicating an optimal motion vector predictor candidate selected from the motion vector predictor candidates included in the list. Here, the prediction unit may select a motion vector predictor of a current block from the motion vector predictor candidates included in the motion vector candidate list using the selection information. The prediction unit of the encoding device may obtain a motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, encode the MVD, and output it in the form of a bitstream. That is, the MVD is calculated by subtracting the motion vector predictor from the motion vector of the current block. Here, the prediction unit of the decoding device may obtain a motion vector differential included in the prediction information, and derive the motion vector of the current block by adding the motion vector differential and the motion vector predictor. The prediction unit of the decoding device may obtain or induce a reference picture index indicating a reference picture from the prediction information.

[0155] The method for constructing the motion vector predictor candidate list according to this document is described below.

[0156] In one embodiment, first, a spatial candidate block for motion vector prediction is searched for and inserted into a prediction candidate list. Then, in one embodiment, it is determined whether the number of spatial candidate blocks is less than two. For example, in one embodiment, if the number of spatial candidate blocks is less than two, a temporal candidate block is searched for and added to the prediction candidate list, and if the temporal candidate block is unavailable, a zero motion vector is used. That is, a zero motion vector can be added to the prediction candidate list. Then, in one embodiment, the construction of a reserve candidate list is terminated. Alternatively, in one embodiment, if the number of spatial candidate blocks is not less than two, the construction of a reserve candidate list is terminated. Here, the reserve candidate list refers to an MVP candidate list.

[0157] On the other hand, when the MVP mode is applied, the reference picture index is explicitly signaled. In this case, the reference picture index for L0 prediction (refidxL0) and the reference picture index for L1 prediction (refidxL1) may be signaled separately. For example, when the MVP mode is applied and bi-prediction (BI prediction) is applied, both the information on refidxL0 and the information on refidxL1 may be signaled.

[0158] When the MVP mode is applied, as described above, information on the MVD derived from the encoding device is signaled to the decoding device. The information on the MVD may include, for example, information indicating the x, y components for the MVD absolute value and the code. In this case, information indicating whether the MVD absolute value is greater than 0, whether it is greater than 1, and the MVD remainder may be signaled stepwise. For example, information indicating whether the MVD absolute value is greater than 1 may be signaled only if the value of flag information indicating whether the MVD absolute value is greater than 0 is 1.

[0159] For example, information regarding the MVD is configured in the syntax shown in the table below, encoded in the encoding device, and signaled to the decoding device.

[0160] [Table 4]

[0161] For example, in Table 4, the abs_mvd_greater0_flag syntax element indicates information regarding whether the difference (MVD) is greater than 0, and the abs_mvd_greater1_flag syntax element indicates information regarding whether the difference (MVD) is greater than 1. Additionally, the abs_mvd_minus2 syntax element indicates information regarding the difference (MVD) minus 2, and the mvd_sign_flag syntax element indicates information regarding the sign of the difference (MVD). Additionally, in Table 4, [0] in each syntax element indicates information regarding L0, and [1] indicates information regarding L1.

[0162] For example, MVD[compIdx] is derived based on abs_mvd_greater0_flag[compIdx]*(abs_mvd_minus2[compIdx]+2)*(1-2*mvd_sign_flag[compIdx]). Here, compIdx (or cpIdx) indicates an index of each component and can have a value of 0 or 1. For compIdx, 0 indicates the x component and compIdx1 indicates the 7th component. However, this is merely an example, and values ​​for each component can be expressed using other coordinate systems instead of the x, y coordinate system.

[0163] Meanwhile, an MVD for L0 prediction (MVD L0) and an MVD for L1 prediction (MVD L1) may be signaled separately, and information about the MVD may include information about the MVD L0 and / or information about the MVD L1. For example, when the MVP mode and BI prediction are applied to the current block, information about the MVD L0 and information about the MVD L1 are both signaled.

[0164] FIG. 7 is a diagram for explaining symmetric motion vector differences (SMVD).

[0165] When BI prediction is applied, SMVD (symmetric MVD) may be used in consideration of coding efficiency. In this case, some signaling of motion information may be omitted. For example, when SMVD is applied to the current block, information on refidxL0, information on refidxL1, and information on MVD L1 may be internally derived without being signaled from the encoding device to the decoding device. For example, when MVP mode and BI prediction are applied to the current block, flag information indicating whether SMVD is applied (e.g., SMVD flag information or sym_mvd_flag syntax element) is signaled, and if the value of the flag information is 1, the decoding device determines that SMVD is applied to the current block.

[0166] When the SMVD mode is applied (i.e., the value of the SMVD flag information is 1), information on mvp_l0_flag, mvp_l1_flag, and MVD L0 (motion vector difference L0) is explicitly signaled, and as described above, information on refidxL0, information on refidx1, and information on MVD L1 (motion vector difference L1) may be omitted and internally derived. For example, refidxL0 may be derived as an index pointing to a previous reference picture that is closest to the current picture in the POC procedure in a reference picture list 0 (which may be called list0 or L0). refidxL1 may be derived as an index pointing to a future reference picture that is closest to the current picture in the POC procedure in a reference picture list 1 (which may be called list1 or L1). Or, for example, refidxL0 and refidxL1 may both be derived as 0, respectively. Alternatively, for example, refidxL0 and refidxL1 may be derived as the minimum indexes having the same POC difference in relation to the current picture. Specifically, for example, when "POC of current picture - POC of first reference picture indicated by refidxL0" is referred to as a first POC difference and "POC of current picture - POC of second reference picture indicated by refidxL1" is referred to as a second POC difference, only when the first POC difference and the second POC difference are the same, the value of refidxL0 indicating the first reference picture may be derived as refidxL0 of the current block, and the value of refidxL1 indicating the second reference picture may be derived as refidxL1 of the current block. Also, for example, when there are a plurality of sets in which the first POC difference and the second POC difference are the same, refidxL0 and refidxL1 of the set in which the difference is the smallest may be derived as refidxL0 and refidxL1 of the current block.

[0167] 7, there are shown a reference picture list 0, a reference picture list 1, an MVD L0, and an MVD L1, where the MVD L1 is symmetrical to the MVD L0.

[0168] MVD L1 may be derived as minus (−)MVD L0. For example, the final (improved or revised) motion information (motion vector: MV) for the current block may be derived based on the following equation:

[0169]

number

[0170] In Equation 1, mvx0 and mvy0 indicate the x and y components of the L0 motion information or the motion vector for L0 prediction, and mvx1 and mvy1 indicate the x and y components of the L1 motion information or the motion vector for L1 prediction. Also, mvpx0 and mvpy0 indicate the x and y components of the motion vector predictor for L0 prediction, and mvpx1 and mvpy1 indicate the x and y components of the motion vector predictor for L1 prediction. Also, mvdx0 and mvdy0 indicate the x and y components of the motion vector difference for L0 prediction.

[0171] Meanwhile, in the MMVD mode, as a method of applying motion vector difference (MVD) to the merge mode, motion information directly used to generate a predicted sample of the current block (i.e., the current CU) can be implicitly derived. For example, an MMVD flag (e.g., mmvd_flag) indicating whether or not to use MMVD for the current block (i.e., the current CU) is signaled, and MMVD can be performed based on this MMVD flag. If MMVD is applied to the current block (e.g., mmvd_flag is 1), additional information for MMVD can be signaled.

[0172] Here, the additional information for the MMVD includes a merge candidate flag (e.g., mmvd_cand_flag) indicating whether the first or second candidate in the merge candidate list is used with the MVD, a distance index (e.g., mmvd_distance_idx) to indicate the motion magnitude, and a direction index (mmvd_direction_idx) to indicate the motion direction.

[0173] In the MMVD mode, two candidates (i.e., the first candidate or the second candidate) located at the first and second entries among the candidates in the merge candidate list can be used, and any one of the two candidates (i.e., the first candidate or the second candidate) can be used as the base MV. For example, a merge candidate flag (e.g., mmvd_cand_flag) can be signaled to indicate any one of the two candidates (i.e., the first candidate or the second candidate) in the merge candidate list.

[0174] Also, the distance index (e.g., mmvd_distance_idx) indicates motion magnitude information and may indicate a predefined offset from the starting point. The offset may be added to the horizontal or vertical component of the starting motion vector. The relationship between the distance index and the predefined offset may be as shown in the following table.

[0175] [Table 5]

[0176] Referring to Table 5, the MVD distance (e.g., MmvdDistance) is determined by the value of the distance index (e.g., mmvd_distance_idx), and the MVD distance (e.g., MmvdDistance) can be derived using integer sample precision or fractional sample precision based on the value of tile_group_fpel_mmvd_enabled_flag. For example, if tile_group_fpel_mmvd_enabled_flag is 1, it indicates that the MVD distance is derived using integer sample units in the current tile group (or picture header), and if tile_group_fpel_mmvd_enabled_flag is 0, it indicates that the MVD distance is derived using fractional sample units in the tile group (or picture header). In Table 1, information (flag) for the tile group can be replaced with information for the picture header, for example, tile_group_fpel_mmvd_enabled_flag can be replaced with ph_fpel_mmvd_enabled_flag (or ph_mmvd_fullpel_only_flag).

[0177] In addition, the direction index (e.g., mmvd_direction_idx) indicates the direction of the MVD based on the start point, and indicates four directions as shown in Table 5 below. Here, the MVD direction can indicate the sign of the MVD. The relationship between the direction index and the MVD sign is shown in the table below.

[0178] [Table 6]

[0179] Referring to Table 6, the MVD code (eg, MmvdSign) is determined by the value of the direction index (eg, mmvd_direction_idx), and the MVD code (eg, MmvdSign) is derived for the L0 reference picture and the L1 reference picture.

[0180] Based on the distance index (e.g., mmvd_distance_idx) and direction index (e.g., mmvd_direction_idx) described above, the MVD offset can be calculated using the following formula.

[0181]

number

[0182]

number

[0183] In Equation 2 and Equation 3, the MMVD distance (MmvdDistance[x0][y0]) and the MMVD sign (MmvdSign[x0][y0][0], MmvdSign[x0][y0][1]) are derived based on Table 5 and / or Table 6. In summary, in the MMVD mode, a merge candidate indicated by a merge candidate flag (e.g., mmvd_cand_flag) is selected from among the merge candidates in the merge candidate list derived based on the neighboring blocks, and the selected merge candidate can be used as a base candidate (e.g., MVP). Then, the motion information (i.e., motion vector) of the current block can be derived by adding the MVD derived using the distance index (e.g., mmvd_distance_idx) and the direction index (e.g., mmvd_direction_idx) based on the base candidate.

[0184] A predicted block for the current block may be derived based on motion information derived according to a prediction mode. The predicted block includes prediction samples (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, whereby 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 bi-prediction is applied, a prediction sample derived by a weighted sum or weighted average (according to phase) of a prediction sample derived based on an L0 prediction (i.e., prediction using a reference picture in a reference picture list L0 and MVL0) and a prediction sample derived based on an 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. If bi-prediction is applied, when a reference picture used for L0 prediction and a reference picture used for L1 prediction are located in different temporal directions with respect to the current picture (i.e., when bi-prediction is applied but corresponds to bidirectional prediction), this may be referred to as true bi-prediction.

[0185] As mentioned above, reconstructed samples and reconstructed pictures are generated based on the derived predicted samples, after which procedures such as in-loop filtering can be performed.

[0186] As described above, according to this document, when bi-prediction is applied to a current block, a prediction sample may be derived based on a weighted average. Conventionally, a bi-prediction signal (i.e., a bi-prediction sample) has been derived by a simple average of an L0 prediction signal (L0 prediction sample) and an L1 prediction signal (L1 prediction sample). That is, a bi-prediction sample is derived as an average of an L0 prediction sample based on an L0 reference picture and MVL0 and an L1 prediction sample based on an L1 reference picture and MVL1. However, according to this document, when bi-prediction is applied, a bi-prediction signal (bi-prediction sample) may be derived by a weighted average of an L0 prediction signal and an L1 prediction signal as follows:

[0187] In the above-mentioned embodiment related to MMVD, a method that considers long-term reference pictures in the MVD derivation process of MMVD can be proposed, thereby maintaining and increasing compression efficiency in various applications. In addition, the method proposed in the embodiment of this document can be similarly applied to SMVD, which is a symmetric MVD technique used in inter mode (MVP mode), in addition to the MMVD technique used in MERGE.

[0188] FIG. 8 is a diagram for explaining a method of deriving a motion vector in inter prediction.

[0189] In one embodiment of this document, an MV-guided method is used that considers long-term reference pictures during the motion vector scaling (MV scaling) of a temporal motion candidate (temporal motion candidate, temporal merge candidate, or temporal mvp candidate). A temporal motion candidate can correspond to mvCol (mvLXCol). A temporal motion candidate may be referred to as "TMVP".

[0190] The following table describes the definition of a long-term reference picture.

[0191] [Table 7]

[0192] Referring to Table 7, when LongTermRefPic (aPic, aPb, refIdx, LX) is 1 (true), the corresponding reference picture is marked as used for long-term reference. For example, a reference picture that is not marked as used for long-term reference may be a reference picture marked as used for short-term reference. In another example, a reference picture that is not marked as used for long-term reference and is not marked as unused may be a reference picture marked as used for short-term reference. Hereinafter, a reference picture marked as used for long-term reference may be referred to as a long-term reference picture, and a reference picture marked as used for short-term reference may be referred to as a short-term reference picture.

[0193] The following table explains the derivation of TMVP(mvLXCol).

[0194] [Table 8]

[0195] Referring to FIG. 8 and Table 8, if the reference picture type (e.g., long-term reference picture (LTRP) or short-term reference picture (STRP)) pointed to by the current picture is not the same as the type of the collocated reference picture pointed to by the collocated picture, the temporal motion vector (mvLXCol) is not used. That is, if all are long-term reference pictures or all are short-term reference pictures, colMV is induced, and if there is another type, colMV is not induced. Also, if all are long-term reference pictures and the POC difference between the current picture and the reference picture of the current picture is the same as the POC difference between the reference picture of the collocated picture and the reference picture of the collocated picture, the motion vector of the collocated block can be used as is without scaling. If it is a shot-term reference picture and the POC difference is different, the motion vector of the scaled collocated block is used.

[0196] In the embodiment of this document, the MMVD used in the MERGE / SKIP mode signals a base motion vector index, a distance index, and a direction index for one coding block as information for deriving MVD information. In the case of unidirectional prediction, MVD is derived from motion information, and in the case of bidirectional prediction, symmetric MVD information is generated using a mirroring and scaling method.

[0197] When performing bi-prediction, the MVD information for L0 or L1 is scaled to generate the MVD for L1 or L0, but when referring to long-term reference pictures, a change is required in the MVD derivation process.

[0198] 9 to 13 show a method for deriving MVD for MMVD according to an embodiment of the present document. The method shown in FIG. 9 to FIG. 13 may be for a block to which bi-prediction is applied.

[0199] In one embodiment of Figure 9, if the distance from the L0 reference picture and the distance from the L1 reference picture are the same, the induced MmvdOffset can be used as the MVD as is, and when the POC difference (the POC difference between the L0 reference picture and the current picture and the POC difference between the L1 reference picture and the current picture) is different, the MVD can be derived by scaling or simply mirroring (i.e., -1 to *MmvdOffset) depending on the POC difference and whether it is a long-term or short-term reference picture.

[0200] For example, a method of deriving a symmetric MVD using MMVD for a block to which bidirectional prediction is applied is not suitable for a block using a long-term reference picture, and in particular, when the reference picture types for each direction are different, it is difficult to expect performance improvement when using MMVD. Therefore, in the following figures and embodiments, an example is introduced in which MMVD is not applied when the reference picture types for L0 and L1 are different.

[0201] In one embodiment according to Fig. 10, different MVD deriving methods are applied depending on whether a reference picture referred to by a current picture (or a current slice, a current block) is a long-term reference picture (LTRP) or a short-term reference picture (STRP). In one example, when the method according to the embodiment according to Fig. 10 is applied, a part of the standard document according to this embodiment is described as follows:

[0202] [Table 9-1]

[0203] [Table 9-2]

[0204] In one embodiment according to Fig. 11, different MVD deriving methods are applied depending on whether a reference picture referred to by a current picture (or a current slice, a current block) is a long-term reference picture (LTRP) or a short-term reference picture (STRP). In one example, when the method according to the embodiment according to Fig. 11 is applied, a part of the standard document according to this embodiment is described as follows:

[0205] [Table 10-1]

[0206] [Table 10-2]

[0207] In summary, an MVD derivation process for MMVD that does not derive MVD when the reference picture types for each direction are different is described.

[0208] In one embodiment according to Fig. 12, the MVD is not derived in all cases where a long-term reference picture is referenced, that is, if at least one of the L0 and L1 reference pictures is a long-term reference picture, the MVD is set to 0, and the MVD can be derived only when there is a shot-term reference picture.

[0209] In one example, the MVD for the MMVD can be derived when the current picture (or current slice, current block) only references shot-term reference pictures based on the highest priority condition (RefPicL0!=LTRP&&RefPicL1!=STRP). In one example, when the method of the embodiment according to FIG. 12 is applied, a part of the standard document according to this embodiment is described as the following table.

[0210] [Table 11-1]

[0211] [Table 11-2]

[0212] In one embodiment according to FIG. 13, when the reference picture types in each direction are different, the MVD is induced when having a shot-term reference picture, and the MVD is induced to 0 when having a long-term reference picture.

[0213] In one example, when the reference picture types in each direction are different, MmvdOffset is applied when referring to a reference picture (shot-term reference picture) that is close to the current picture, and MVD has a value of 0 when referring to a reference picture (long-term reference picture) that is far from the current picture. Here, a picture close to the current picture can be considered to have a shot-term reference picture, but if the close picture is a long-term reference picture, mmvdOffset can be applied to the motion vector of the list that points to the shot-term reference picture.

[0214] [Table 12]

[0215] For example, the four paragraphs included in Table 12 can sequentially replace the bottom block (content) of the flow chart included in FIG.

[0216] In one example, when the method according to the embodiment of FIG. 13 is applied, a portion of the standard document according to the embodiment is written as in the following table.

[0217] [Table 13-1]

[0218] [Table 13-2]

[0219] The following table provides a comparison table between the examples contained in this document.

[0220] [Table 14]

[0221] With reference to Table 14, a comparison is shown between methods of applying offsets taking into account reference picture type for MVD derivation of MMVD described in the embodiments according to Figures 9 to 13. In Table 14, embodiment A relates to the existing MMVD, embodiment B shows an embodiment according to Figures 9 to 11, embodiment C shows an embodiment according to Figure 12, and embodiment D shows an embodiment according to Figure 13.

[0222] That is, in the embodiments of Figures 9, 10, and 11, a method of deriving an MVD only when the reference picture types in both directions are the same is described, and in the embodiment of Figure 12, a method of deriving an MVD only when both directions are short-term reference pictures is described. In the embodiment of Figure 12, if the reference picture is a long-term reference picture for unidirectional prediction, the MVD is set to 0. Also, in the embodiment of Figure 13, a method of deriving an MVD in only one direction when the reference picture types in both directions are different is described. Such differences between the embodiments indicate various characteristics of the technology described in this document, and it can be understood by a person skilled in the art to which this specification pertains that the effects to be achieved by the embodiments of this document can be achieved based on the characteristics.

[0223] In an embodiment of this document, if the reference picture type is a long-term reference picture, a separate process is performed. When a long-term reference picture is included, POCDiff-based scaling or mirroring does not affect performance improvement, so the MVD in the direction having the shot-term reference picture is assigned the MmvdOffset value, and the MVD in the direction having the long-term reference picture is assigned the 0 value. In one example, when this embodiment is applied, a portion of the standard document according to this embodiment is described as follows:

[0224] [Table 15-1]

[0225] [Table 15-2]

[0226] In another example, a portion of Table 15 can be replaced with the following table: Referring to Table 16, Offset is applied based on the reference picture type, not POCDiff.

[0227] [Table 16]

[0228] In another example, a part of Table 15 can be replaced with the following table: Referring to Table 17, MmvdOffset can always be set for L0 and −MmvdOffset can always be set for L1 without considering the reference picture type.

[0229] [Table 17]

[0230] According to an embodiment of this document, SMVD in inter mode can be performed similarly to the MMVD used in the above-mentioned MERGE mode. In the case of bidirectional prediction, the encoding device signals whether or not symmetric MVD derivation is performed to the decoding device, and when a related flag (e.g., sym_mvd_flag) is true (or its value is 1), the second direction MVD (e.g., MVD L1) is derived by mirroring the first direction MVD (e.g., MVD L0). In this case, scaling for the first direction MVD may not be performed.

[0231] The following table shows the syntax for a coding unit according to one embodiment of this document.

[0232] [Table 18]

[0233] [Table 19]

[0234] Referring to Tables 18 and 19, if inter_pred_idc==PRED_BI and L0 and L1 reference pictures are available (eg, RefIdxSymL0>-1 && RefIdxSymL1>-1), sym_mvd_flag is signaled.

[0235] The following table shows a decoding procedure for an MMVD reference index according to one example.

[0236] [Table 20]

[0237] With reference to Table 20, the procedure for deriving the availability of L0 and L1 reference pictures is described. That is, if there is a reference picture in the forward direction among the L0 reference pictures, the reference picture index closest to the current picture is set to RefIdxSymL0, and the corresponding value is set to the reference index of L0. Also, if there is a reference picture in the backward direction among the L1 reference pictures, the reference picture index closest to the current picture is set to RefIdxSymL1, and the corresponding value is set to the reference index of L1.

[0238] Table 21 below shows a decoding procedure for an MMVD reference index according to another example.

[0239] [Table 21]

[0240] Referring to Table 21, when the L0 or L1 reference picture types are different, i.e., when long-term and short-term reference pictures are used, as in the embodiments described with reference to Figures 9, 10, and 11, in order to prevent SMVD, after reference index derivation for SMVD, if the reference picture types of L0 and L1 are different, SMVD is not used (see the last paragraph of Table 20).

[0241] In one embodiment of this document, SMVD can be applied in inter mode similarly to MMVD used in merge mode. When long-term reference pictures are used as in the embodiment described with reference to FIG. 12, in order to prevent SMVD, the long-term reference pictures can be excluded in the process of deriving reference indexes for SMVD as shown in the following table.

[0242] [Table 22]

[0243] The following table according to another example of this embodiment shows an example of processing in which SMVD is not applied when a long-term reference picture is used after reference picture index derivation for SMVD.

[0244] [Table 23]

[0245] In one embodiment of this document, in the TMVP colMV derivation process, if the reference picture type of the current picture and the reference picture type of the co-located picture are different, the motion vector MV is set to 0. However, since this differs from the derivation method in the cases of MMVD and SMVD, this is to be unified.

[0246] When the reference picture type of the current picture is a long-term reference picture and the reference picture type of the co-located picture is a long-term reference picture, the motion vector uses the co-located motion vector value as is, but in this case, in MMVD and SMVD, MV is set to 0. Here, TMVP also sets MV to 0 without additional guidance.

[0247] In addition, even if the reference picture type is different, there may be a long-term reference picture that is close to the current picture. Taking this into consideration, instead of setting MV to 0, colMV can be used as MV without scaling.

[0248] FIG. 14 is a diagram for explaining SMVD according to one embodiment of the present document.

[0249] To derive the SMVD, a method as shown in Fig. 14 can be used. That is, the SMVD can be derived based on STRP (short-term reference picture) and / or LTRP (long-term reference picture). When the mirrored L0 MVD is used for the L1 MVD, if the types of reference pictures are different, an inaccurate MVD may be derived. This is because the ratio of distances (distance between reference picture 0 and the current picture and distance between reference picture 1 and the current picture) becomes large, and the correlation of the motion vectors in each direction decreases.

[0250] According to one embodiment of this document, the availability of reference pictures is checked, and if the condition is met, sym_mvd_flag can be parsed. If sym_mvd_flag is true, the MVD of L1 (MVDL1) can be derived with the mirrored MVDL0 (MVD of L0).

[0251] The following table shows a portion of the coding unit syntax according to this embodiment.

[0252] [Table 24]

[0253] Based on Table 24, the procedure for deriving sym_mvd_flag according to this embodiment can be explained.

[0254] In this embodiment, reference picture indexes (RefIdxSymLX with X=0,1) for SMVD can be derived. RefIdxSymL0 can indicate (the index of) the closest reference picture with a POC smaller than that of the current picture. RefIdxSymL1 can indicate (the index of) the closest reference picture with a POC larger than that of the current picture.

[0255] The following table describes, in the form of a standard document, how to derive reference picture indexes for SMVD according to the present embodiment.

[0256] [Table 25]

[0257] The following table shows the comparison results between the embodiments. The accuracy of MVD in SMVD can be improved by taking into account the reference picture type according to the embodiments included in Table 26. In Table 26, MVD can indicate MVD 0 (MVD of L0).

[0258] [Table 26]

[0259] Referring to Table 26, embodiment P shows a method of deriving the existing SMVD. In embodiment Q, SMVD may be restricted when mixed reference picture types (ex. STRP / LTRP or LTRP / STRP) are used in L0 and L1. In embodiment R, SMVD may be restricted when referring to long-term reference pictures (LTRP).

[0260] The following table describes, in standard document format, how to derive reference picture indexes for SMVD according to embodiment Q of Table 26.

[0261] [Table 27]

[0262] The following table describes, in standard document format, how to derive reference picture indexes for SMVD according to embodiment Q of Table 26.

[0263] [Table 28]

[0264] [Table 29]

[0265] With reference to Table 28 and / or Table 29, SMVD may be restricted when referring to a long-term reference picture (LTRP). For example, with reference to Table 28, long-term reference pictures may be excluded in a reference picture checking process. This allows other reference pictures (e.g., not long-term reference pictures) to be considered for SMVD. With reference to Table 29, SMVD may not be performed when the closest reference picture from the current picture is a long-term reference picture. For example, even if the reference picture list includes a short-term reference picture, SMVD may not be performed when the closest reference picture from the current picture is a long-term reference picture.

[0266] In one example according to one embodiment of this document, if the POC distance of L0 is greater than or equal to the POC of L1 in the MMVD procedure, the L1 MVD can be derived as a scaled or mirrored L0 MVD. If the POC distance of L0 is less than the POC of L1 in the MMVD procedure, the L0 MVD can be derived as a scaled or mirrored L1 MVD in the MMVD procedure.

[0267] FIG. 15 is a flow chart illustrating a method for deriving the MMVD according to one embodiment of the present document.

[0268] In one embodiment of this document, the MVD can be derived in the MMVD, taking into account the POC difference and / or the reference picture type. With reference to FIG. 15, currPocDiffLX can mean the difference between the POC of the current picture and the POC of the reference picture LX. CurrPocDiffL0 and currPocDiffL1 can be compared with each other, and the type of the reference picture can be checked ("refPicList0!=LTRP" or "refPicList1!=LTRP"). Taking into account the condition, MmvdOffset (derived using mmvd_cand_flag, mmvd_distance_idx, and / or mmvd_direction_idx) can be assigned as the same value as mmvdLX, a mirrored value, or a scaled value.

[0269] The following table shows a portion of a standard document according to this embodiment.

[0270] [Table 30-1]

[0271] [Table 30-2]

[0272] When the current picture refers to one or more long-term reference pictures (LTRPs), the mirroring procedure that considers the POC distance may not be necessary. This is because the mirroring MVD obtained from the reference picture that is much farther away than other MVDs is not effective in terms of accuracy. A proposal to solve this problem is described below.

[0273] The following table shows the comparison results between the examples.

[0274] [Table 31]

[0275] Referring to Table 31, Example X shows an existing method of deriving MMVD. Example Y may restrict the MMVD procedure when one or more long-term reference pictures are referenced to the current block. That is, in Example Y, the POC distance comparison procedure for long-term reference pictures may be omitted. Example Z may restrict the MMVD derivation procedure for all cases. That is, in Example Z, the POC distance comparison procedure may be omitted for all cases. In Table 31, offset may refer to MmvdOffset.

[0276] 16 is a flowchart showing a method for deriving an MMVD according to an embodiment of the present document. The flowchart in FIG. 16 can show a method for deriving an MMVD according to the above-mentioned embodiment Y.

[0277] Referring to FIG. 16, the condition of comparing the POC difference when the reference picture type is a long-term reference picture may be removed, and the anchor MVD used for the mirroring procedure can be fixed to the L0 MVD.

[0278] The following table describes, in standard document format, how to derive the MMVD according to Example Y of Table 31.

[0279] [Table 32-1]

[0280] [Table 32-2]

[0281] 17 is a flowchart showing a method for deriving the MMVD according to one embodiment of the present document. The flowchart in FIG. 17 can show a method for deriving the MMVD according to Example Z described above.

[0282] 17, in embodiment Z, for all cases, the derivation procedure of the MMVD may be restricted. For all cases, the condition of comparing the POC difference may be removed, and the anchor MVD used for the mirroring or scaling procedure may be fixed to the L0 MVD.

[0283] The following table describes, in standard document format, how to derive the MMVD according to Example Z of Table 31.

[0284] [Table 33-1]

[0285] [Table 33-2]

[0286] Also, in one embodiment of the present invention, the requirement to compare POC differences for all cases may be removed and only the mirroring scheme may be used. The following table describes, in the form of a standard document, how to derive the MMVD in this example.

[0287] [Table 34]

[0288] The following drawings are created to illustrate a specific example of the present specification. The names of specific devices and the names of specific signal message fields shown in the drawings are presented for illustrative purposes only, and the technical features of the present specification are not limited to the specific names used in the drawings.

[0289] 18 and 19 illustrate an example of a video / image encoding method and related components according to an embodiment of the present document. The method disclosed in FIG. 18 may be performed by the encoding device disclosed in FIG. 2. Specifically, for example, S1800 to S1850 in FIG. 18 may be performed by the prediction unit 220 of the encoding device, and S1860 may be performed by the residual processing unit 230 of the encoding device. S1870 may be performed by the entropy encoding unit 240 of the encoding device. The method disclosed in FIG. 18 may include the embodiments described above in this document.

[0290] 18, the encoding apparatus derives an inter prediction mode for a current block in a current picture (S1800). Here, the inter prediction mode may include the above-mentioned merge mode, AMVP mode (a mode using a motion vector predictor candidate), MMVD, and SMVD.

[0291] The encoding device may derive a reference picture for the inter prediction mode. The encoding device may construct a reference picture list for deriving the reference picture. In one example, the reference picture list may include reference picture list 0 (or L0, reference picture list L0) or reference picture list 1 (or L1, reference picture list L1). For example, the encoding device may construct a reference picture list for each slice included in the current picture.

[0292] The encoding device constructs an MVP candidate list for a current block based on neighboring blocks of the current block (S1810). The MVP candidate list may include an MVP candidate list L0 and an MVP candidate list L1. In one example, the neighboring blocks may be included in a current picture including the current block. In another example, the neighboring blocks may be included in a previous (reference) picture or a subsequent (reference) picture from the current picture. Here, the POC of the previous picture may be smaller than the POC of the current picture, and the POC of the subsequent picture may be larger than the POC of the current picture. According to one example, the POC difference between the current picture and the previous (reference) picture from the current picture may be larger than 0. In another example, the POC difference between the current picture and the subsequent (reference) picture from the current picture may be smaller than 0. However, this is merely an example.

[0293] The encoding apparatus may derive an MVP for the current block based on the MVP candidate list (S1820). The MVP may include MVPL0 and MVPL1. MVPL0 may be derived from the MVP candidate list L0, and MVPL1 may be derived from the MVP candidate list L1. The encoding apparatus may derive an optimal motion vector predictor candidate from among the motion vector predictor candidates included in the MVP candidate list. The encoding apparatus may generate selection information (e.g., MVP flag or MVP index) indicating the optimal motion vector predictor candidate.

[0294] The encoding apparatus generates prediction-related information including the inter prediction mode (S1830). In one example, the prediction-related information may include information on a motion vector difference (MVD) for the current block. Also, the prediction-related information may include information on an MMVD, information on an SMVD, etc.

[0295] The encoding apparatus derives motion information for prediction of the current block based on information about the MVP and the MVD (S1840). For example, the motion information may include a reference index for SMVD (symmetric motion vector differential reference index). The reference index for SMVD may point to a reference picture for application of SMVD. The reference index for SMVD may include a reference index L0 (RefIdxSumL0) and a reference index L1 (RefIdxSumL1).

[0296] The encoding apparatus generates a prediction sample based on the motion information (S1850). The encoding apparatus may generate the prediction sample based on a motion vector and a reference picture index included in the motion information. For example, the prediction sample may be generated based on a block (or sample) indicated by the motion vector among blocks (or samples) in the reference picture pointed to by the reference picture index.

[0297] The encoding apparatus derives residual information based on the predicted samples (S1860). Specifically, the encoding apparatus may derive residual samples based on the predicted samples and original samples. The encoding apparatus may derive residual information based on the residual samples. In order to derive the residual information, the above-mentioned conversion and quantization processes may be performed.

[0298] An encoding device encodes image / video information including the prediction related information and the residual information (S1870). The encoded image / video information may be output in the form of a bitstream. The bitstream may be transmitted to a decoding device via a network or a (digital) storage medium.

[0299] The image / video information may include various information according to embodiments of this document, for example, the image / video information may include at least one of the information disclosed in Tables 1 to 34 above.

[0300] In one embodiment, the motion information may include a motion vector (MV) and a symmetric motion vector differential reference index. The MV may include an MVL0 for L0 prediction and an MVL1 for L1 prediction. The symmetric motion vector differential reference index may include a symmetric motion vector differential reference index L0 for the L0 prediction and a symmetric motion vector differential reference index L1 for the L1 prediction. The information about the MVD may include information about an MVDL0 for the L0 prediction. In one example, information about an MVDL1 for the L1 prediction may be derived based on information about the MVDL0. In another example, information about an MVDL0 and / or information about an MVDL1 may be derived based on neighboring blocks for prediction of a current block. The encoding apparatus may exclude information about an MVDL1 when encoding image / video information. The MVL0 may be derived based on information about the MVDL0, and the MVL1 may be derived based on information about the MVDL1. The symmetric motion vector differential reference index L0 and the symmetric motion vector differential reference index L1 may be derived based on a short-term reference picture among reference pictures included in a reference picture list.

[0301] In one embodiment, the MVP may include MVPL0 for the L0 prediction and MVPL1 for the L1 prediction. The MVL0 may be derived based on a sum of the MVDL0 and the MVPL0. The MVL1 may be derived based on a sum of the MVDL1 and the MVPL1.

[0302] In one embodiment, the prediction related information may include information about a symmetric motion vector difference (information about SMVD or SMVD flag information). When the symmetric motion vector difference reference index L0 and the symmetric motion vector difference reference index L1 are derived based on a picture order count (POC) difference between the short-term reference picture and a current picture including the current block, the value of the information about the symmetric motion vector difference may be 1.

[0303] In one embodiment, the magnitude of the MVDL1 may be the same as the magnitude of the MVDL0. The sign of the MVDL1 may be opposite to the sign of the MVDL0.

[0304] In one embodiment, the short-term reference pictures may include a short-term reference picture L0 and a short-term reference picture L1. For example, the symmetric motion vector differential reference index L0 may point to the short-term reference picture L0, and the symmetric motion vector differential reference index L1 may point to the short-term reference picture L1.

[0305] In one embodiment, the reference picture list may include reference picture list 0. The reference picture list 0 may include the short-term reference picture L0. The symmetric motion vector differential reference index L0 may be derived based on a picture order count (POC) difference between each of the short-term reference pictures included in the reference picture list 0 and a current picture including the current block.

[0306] In one embodiment, based on a comparison between the POC differences, the symmetric motion vector differential reference index L0 can be derived.

[0307] In one embodiment, the reference picture list 0 may further include another short-term reference picture L0. The POC difference may include a first POC difference between the short-term reference picture L0 and the current picture, and a second POC difference between the other short-term reference picture L0 and the current picture. The first POC difference may be smaller than the second POC difference.

[0308] Figures 20 and 21 illustrate an example of an image / video decoding method and related components according to an embodiment of the present document. The method disclosed in Figure 20 may be performed by the decoding device disclosed in Figure 3. Specifically, for example, S2000 in Figure 20 may be performed by the entropy decoding unit 310 of the decoding device, and S2010 to S2050 may be performed by the prediction unit 330 of the decoding device. The method disclosed in Figure 20 may include the embodiments described above in this document.

[0309] Referring to FIG. 20, a decoding device receives / acquires image / video information (S2000). The decoding device may receive / acquire the image / video information via a bitstream. The image / video information may include prediction related information (including prediction mode information), information related to MVD, and / or residual information. The prediction related information may include information related to MMVD, information related to SMVD, etc. Also, the image / video information may include various information according to embodiments of the present document. For example, the image / video information may include information described in conjunction with FIGS. 1 to 17 and / or information disclosed in at least one of Tables 1 to 34 above.

[0310] The decoding apparatus derives an inter prediction mode for the current block based on the prediction related information (S2010). Here, the inter prediction mode may include the above-mentioned merge mode, AMVP mode (a mode using a motion vector predictor candidate), MMVD, and SMVD.

[0311] The decoding device constructs an MVP candidate list for a current block based on the neighboring blocks of the current block (S2020). The MVP candidate list may include an MVP candidate list L0 and an MVP candidate list L1. In one example, the neighboring blocks may be included in a current picture including the current block. In another example, the neighboring blocks may be included in a previous (reference) picture or a subsequent (reference) picture from the current picture. Here, the POC of the previous picture may be smaller than the POC of the current picture, and the POC of the subsequent picture may be larger than the POC of the current picture. According to one example, the POC difference between the current picture and the previous (reference) picture from the current picture may be larger than 0. In another example, the POC difference between the current picture and the subsequent (reference) picture from the current picture may be smaller than 0. However, this is merely an example.

[0312] The decoding apparatus may derive an MVP for the current block based on the MVP candidate list (S2030). The MVP may include MVPL0 and MVPL1. MVPL0 may be derived from the MVP candidate list L0, and MVPL1 may be derived from the MVP candidate list L1. The decoding apparatus may derive an optimal motion vector predictor candidate from among the motion vector predictor candidates included in the MVP candidate list. The encoding apparatus may generate selection information (e.g., MVP flag or MVP index) indicating the optimal motion vector predictor candidate.

[0313] The decoding apparatus derives motion information for the current block based on information about the MVD and the MVP (S2040). For example, the motion information may include a reference index for SMVD. The reference index for SMVD may point to a reference picture for application of SMVD. The reference index for SMVD may include a reference index L0 (RefIdxSumL0) and a reference index L1 (RefIdxSumL1).

[0314] The decoding apparatus generates a prediction sample based on the motion information (S2050). The decoding apparatus may generate the prediction sample based on a motion vector and a reference picture index included in the motion information. For example, the prediction sample may be generated based on a block (or sample) indicated by the motion vector among blocks (or samples) in the reference picture pointed to by the reference picture index.

[0315] The decoding apparatus may generate a residual sample based on the residual information. Specifically, the decoding apparatus may derive a quantized transform coefficient based on the residual information. The quantized transform coefficient may have a one-dimensional vector shape based on a coefficient scan order. The decoding apparatus may derive a transform coefficient based on an inverse quantization procedure on the quantized transform coefficient. The decoding apparatus may derive a residual sample based on an inverse transform procedure on the transform coefficient.

[0316] The decoding device may generate reconstructed samples of the current picture based on the predicted samples and the residual samples. The decoding device may further perform a filtering procedure to generate (modified) reconstructed samples.

[0317] In one embodiment, the motion information may include a motion vector (MV) and a symmetric motion vector differential reference index. The MV may include an MVL0 for L0 prediction and an MVL1 for L1 prediction. The symmetric motion vector differential reference index may include a symmetric motion vector differential reference index L0 for the L0 prediction and a symmetric motion vector differential reference index L1 for the L1 prediction. The information about the MVD may include information about an MVDL0 for the L0 prediction. In one example, information about an MVDL1 for the L1 prediction may be derived based on information about the MVDL0. In another example, information about an MVDL0 and / or information about an MVDL1 may be derived based on neighboring blocks for prediction of a current block. The encoding apparatus may exclude information about an MVDL1 when encoding image / video information. The MVL0 may be derived based on information about the MVDL0, and the MVL1 may be derived based on information about the MVDL1. The symmetric motion vector differential reference index L0 and the symmetric motion vector differential reference index L1 may be derived based on a short-term reference picture among reference pictures included in a reference picture list.

[0318] In one embodiment, the MVP may include MVPL0 for the L0 prediction and MVPL1 for the L1 prediction. The MVL0 may be derived based on a sum of the MVDL0 and the MVPL0. The MVL1 may be derived based on a sum of the MVDL1 and the MVPL1.

[0319] In one embodiment, the prediction related information may include information about a symmetric motion vector difference (information for SMVD or SMVD flag information). For example, if the value of the information about the symmetric motion vector difference is 1, the symmetric motion vector difference reference index L0 and the symmetric motion vector difference reference index L1 may be derived based on a POC difference between the short-term reference picture and a current picture including the current block.

[0320] In one embodiment, the magnitude of the MVDL1 may be the same as the magnitude of the MVDL0. The sign of the MVDL1 may be opposite to the sign of the MVDL0.

[0321] In one embodiment, the short-term reference pictures may include a short-term reference picture L0 and a short-term reference picture L1. For example, the symmetric motion vector differential reference index L0 may point to the short-term reference picture L0, and the symmetric motion vector differential reference index L1 may point to the short-term reference picture L1.

[0322] In one embodiment, the reference picture list may include reference picture list 0. The reference picture list 0 may include the short-term reference picture L0. The symmetric motion vector differential reference index L0 may be derived based on a picture order count (POC) difference between each of the short-term reference pictures included in the reference picture list 0 and a current picture including the current block.

[0323] In one embodiment, based on a comparison between the POC differences, the symmetric motion vector differential reference index L0 can be derived.

[0324] In one embodiment, the reference picture list 0 may further include another short-term reference picture L0. The POC difference may include a first POC difference between the short-term reference picture L0 and the current picture, and a second POC difference between the other short-term reference picture L0 and the current picture. The first POC difference may be smaller than the second POC difference.

[0325] In one embodiment, the symmetric motion vector differential reference index L0 and the symmetric motion vector differential reference index L1 (ex.ref_idx_l1[x0][y0], ref_idx_l1[x0][y0]) are not directly signaled and can be derived based on information about the symmetric motion vector differential (ex.sym_mvd_flag).

[0326] In the above embodiments, the method is described based on a flowchart as a series of steps or blocks, but the embodiment is not limited to the order of steps, and certain steps may occur in a different order or simultaneously with other steps than those described above. In addition, those skilled in the art will understand that the steps shown in the flowcharts are not exclusive, and different steps may be included, or one or more steps of the flowcharts may be deleted without affecting the scope of the embodiments of this document.

[0327] The methods according to the embodiments of the present document described above may be embodied in the form of software, and the encoding device and / or decoding device according to the present document may be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.

[0328] When the embodiments in this document are implemented in software, the methods described above may be implemented in modules (processes, functions, etc.) performing 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 performed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each drawing may be implemented and performed on a computer, processor, microprocessor, controller, or chip. In this case, information on instructions or algorithms for implementation may be stored in a digital storage medium.

[0329] In addition, the decoding device and encoding device to which the embodiments of the present 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 customized video (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an argument reality (AR) device, a video 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, etc., and may be used to process a video signal or a data signal. For example, an over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet access TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.

[0330] In addition, the processing method to which the embodiments of this 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. Multimedia data having a data structure according to the embodiments of this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium may also 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.

[0331] Furthermore, the embodiments 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 embodiments of the present document. The program code may be stored on a carrier readable by a computer.

[0332] FIG. 22 illustrates an example of a content streaming system in which the embodiments disclosed herein can be applied.

[0333] Referring to FIG. 22, 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.

[0334] 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.

[0335] The bitstream may be generated by an encoding method or a bitstream generation method to which an embodiment of this document is applied, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0336] 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.

[0337] The streaming server may receive content from a media repository and / or an encoding server. For example, when content is received from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time in order to provide a smooth streaming service.

[0338] 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, digital signage, etc.

[0339] 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.

[0340] 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 as an apparatus, and the technical features of the apparatus claims herein may be combined and embodied as a method. In addition, the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied as 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 as a method.

Claims

1. 1. An image decoding method performed by a decoding device, comprising: receiving image information including prediction related information and information regarding a motion vector difference (MVD) via a bitstream; deriving an inter prediction mode for a current block based on the prediction related information; constructing a motion vector predictor (MVP) candidate list for the current block based on neighboring blocks of the current block; deriving an MVP for the current block based on the MVP candidate list; deriving motion information for the current block based on the information about the MVD and the MVP; generating a prediction sample for the current block based on the motion information; bi-prediction is applied to the current block; The motion information includes a motion vector (MV) and a symmetric motion vector differential reference index; The MVs include MVL0 for L0 prediction and MVL1 for L1 prediction, The symmetric motion vector differential reference index includes a symmetric motion vector differential reference index L0 for the L0 prediction, and a symmetric motion vector differential reference index L1 for the L1 prediction, the information regarding the MVD includes information regarding MVDL0 for the L0 prediction, Information regarding MVDL1 for the L1 prediction is derived based on the information regarding MVDL0; the MVDL0 is derived based on the information regarding the MVDL0; the MVDL1 is derived based on the information regarding the MVDL1; The MVPs include MVPL0 for the L0 prediction and MVPL1 for the L1 prediction; the MVL0 is derived based on a sum of the MVDL0 and the MVPL0; The MVL1 is derived based on a sum of the MVDL1 and the MVPL1; A method in which the symmetric motion vector differential reference index L0 and the symmetric motion vector differential reference index L1 are derived based on a picture order count (POC) difference between a short-term reference picture among reference pictures included in a reference picture list and a current picture including the current block.

2. 1. An image encoding method performed by an encoding device, comprising: deriving an inter prediction mode for a current block; constructing a motion vector predictor (MVP) candidate list for the current block based on neighboring blocks of the current block; deriving an MVP for the current block based on the MVP candidate list; deriving motion information for the current block including a motion vector (MV); generating prediction-related information including information about the inter-prediction mode and information about a motion vector difference (MVD) for the current block; generating a prediction sample for the current block based on the motion information; generating residual information based on the predicted samples; encoding image information including said prediction related information and said residual information; the motion information includes a symmetric motion vector differential reference index; The MVs include MVL0 for L0 prediction and MVL1 for L1 prediction, The symmetric motion vector differential reference index includes a symmetric motion vector differential reference index L0 for the L0 prediction, and a symmetric motion vector differential reference index L1 for the L1 prediction, the information regarding the MVD includes information regarding MVDL0 for the L0 prediction, Information regarding MVDL1 for the L1 prediction is derived based on the information regarding MVDL0; the MVL0 is derived based on the information regarding the MVDL0; the MVL1 is derived based on the information regarding the MVDL1; The MVPs include MVPL0 for the L0 prediction and MVPL1 for the L1 prediction; the MVL0 is derived based on a sum of the MVDL0 and the MVPL0; The MVL1 is derived based on a sum of the MVDL1 and the MVPL1; A method in which the symmetric motion vector differential reference index L0 and the symmetric motion vector differential reference index L1 are derived based on a picture order count (POC) difference between a short-term reference picture among reference pictures included in a reference picture list and a current picture including the current block.

3. 1. A method of transmitting data for an image, comprising: obtaining a bitstream for the image, the bitstream comprising: deriving an inter prediction mode for a current block; constructing a motion vector predictor (MVP) candidate list for the current block based on neighboring blocks of the current block; deriving an MVP for the current block based on the MVP candidate list; deriving motion information for the current block including a motion vector (MV); generating prediction-related information including information about the inter-prediction mode and information about a motion vector difference (MVD) for the current block; generating a prediction sample for the current block based on the motion information; generating residual information based on the predicted samples; encoding image information including the prediction related information and the residual information; transmitting the data including the bitstream; the motion information includes a symmetric motion vector differential reference index; The MVs include MVL0 for L0 prediction and MVL1 for L1 prediction, The symmetric motion vector differential reference index includes a symmetric motion vector differential reference index L0 for the L0 prediction, and a symmetric motion vector differential reference index L1 for the L1 prediction, the information regarding the MVD includes information regarding MVDL0 for the L0 prediction, Information regarding MVDL1 for the L1 prediction is derived based on the information regarding MVDL0; the MVL0 is derived based on the information regarding the MVDL0; the MVL1 is derived based on the information regarding the MVDL1; The MVPs include MVPL0 for the L0 prediction and MVPL1 for the L1 prediction; the MVL0 is derived based on a sum of the MVDL0 and the MVPL0; The MVL1 is derived based on a sum of the MVDL1 and the MVPL1; A method in which the symmetric motion vector differential reference index L0 and the symmetric motion vector differential reference index L1 are derived based on a picture order count (POC) difference between a short-term reference picture among reference pictures included in a reference picture list and a current picture including the current block.

Citation Information

Patent Citations

  • Signaling Of Motion Vector Difference Derivation

    US20200374551A1

  • Constrained motion vector derivation for long-term reference pictures in video coding

    WO2020172341A1