Decoding method, encoding method, and data transmission method

Through inter prediction and derivation methods of motion vector differences, especially signaling processing of L0 and L1 motion vector differences, the problem of low high-resolution image/video encoding efficiency is solved, and more efficient image/video compression and transmission are achieved.

CN120378632APending Publication Date: 2025-07-25LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510612484.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2019-06-24
Filing Date
2020-06-24
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The prior art has problems with low encoding efficiency in high resolution, high quality image/video encoding, especially in the context of increased transmission and storage costs, it is difficult to effectively compress and transmit image/video data of various characteristics.

Method used

Using the inter prediction method, the coding efficiency is improved by deriving the motion vector difference, especially the L0 motion vector difference and the L1 motion vector difference, and using specific reference picture types, including signaling processing of double prediction and symmetric motion vector difference.

Benefits of technology

Improve image/video compression efficiency, reduce the complexity of the encoding system, and achieve more efficient inter-frame prediction, reducing transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378632A_ABST
    Figure CN120378632A_ABST
Patent Text Reader

Abstract

The invention relates to a decoding method, an encoding method, and a data transmission method. According to embodiments of this document, a prediction process may be performed for image / video coding, and according to inter prediction, the prediction process may include Merge-mode Motion Vector Difference (MMVD) and Symmetric Motion Vector Difference (SMVD). Inter prediction may be performed based on a reference picture of a current picture, and a type of reference picture (e.g., a long-term reference picture, a short-term reference picture, etc. Therefore, the performance and coding efficiency in the prediction process can be increased.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with the original application number 202080059858.9 (International Application No.: PCT / KR2020 / 008138, filing date: June 24, 2020, invention title: Image coding method and apparatus using motion vector difference). Technical Field

[0002] This document relates to an image coding method and apparatus using motion vector difference. Background Art

[0003] Recently, there has been an increasing demand for high-resolution and high-quality images / videos such as 4K or 8K ultra-high definition (UHD) images / videos in various fields. As the resolution or quality of images / videos becomes higher, relatively more information or bits are transmitted compared to traditional image / video data. Therefore, if image / video data is transmitted via a medium such as an existing wired / wireless broadband line or stored in a traditional storage medium, the cost of transmission and storage is likely to increase.

[0004] In addition, there has been a growing interest and demand for virtual reality (VR) and artificial reality (AR) content as well as immersive media such as holograms; and there has also been a growing broadcast of images / videos (e.g., game images / videos) that exhibit different image / video characteristics from real images / videos.

[0005] Therefore, highly efficient image / video compression technologies are needed to effectively compress, transmit, store, or play high-resolution and high-quality images / videos that exhibit various characteristics as described above.

[0006] Specifically, inter-frame prediction in image / video coding can use motion vector difference. Regarding this process, there has been a discussion on deriving motion vector difference based on reference picture types (e.g., short-term or long-term reference pictures). Summary of the Invention

[0007] Technical Solution for Solving the Problem

[0008] According to an embodiment of this document, a method and apparatus for improving image / video coding efficiency are provided.

[0009] According to an embodiment of this document, a method and apparatus for effectively performing inter-frame prediction in an image / video coding system are provided.

[0010] According to an embodiment of this document, a method and apparatus for signaling information about motion vector difference for inter-frame prediction are provided.

[0011] According to an embodiment of this document, when bi-prediction is applied to a current block, a method and apparatus for signaling information about an L0 motion vector difference and an L1 motion vector difference are provided.

[0012] According to an embodiment of this document, a method and apparatus for signaling an SMVD flag are provided.

[0013] According to an embodiment of the present disclosure, a specific reference picture type can be used to derive a symmetric motion vector difference.

[0014] According to an embodiment of this document, a process for deriving an SMVD reference index using a short-term reference picture (a picture marked for short-term reference) can be performed.

[0015] According to an embodiment of this document, a video / image decoding method performed by a decoding device is provided.

[0016] According to an embodiment of this document, a decoding device for performing video / image decoding is provided.

[0017] According to an embodiment of this document, a video / image encoding method performed by an encoding device is provided.

[0018] According to an embodiment of this document, an encoding device for performing video / image encoding is provided.

[0019] According to an embodiment of this document, a computer-readable digital storage medium is provided, in which encoded video / image information generated according to a video / image encoding method disclosed in at least one embodiment of this document is stored.

[0020] According to an embodiment of this document, a computer-readable digital storage medium is provided, in which encoding information or encoded video / image information for causing a decoding device to perform a video / image decoding method disclosed in at least one embodiment of this document is stored.

[0021] Advantageous Effects

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

[0023] According to the present disclosure, signaling of information about a motion vector difference can be effectively performed.

[0024] According to the present disclosure, when bi-prediction is applied to a current block, an L1 motion vector difference can be effectively derived.

[0025] According to the present disclosure, information for deriving an L1 motion vector difference can be signaled based on the type of a reference picture, and thus the complexity of an encoding system can be reduced.

[0026] According to one embodiment of the present disclosure, an efficient inter-frame prediction can be performed using a specific reference picture type for deriving a reference picture index for SMVD.

[0027] The effects obtained through specific embodiments of the present disclosure are not limited to those described above. For example, various other technical effects that can be understood or derived by those of ordinary skill in the relevant art can be obtained. Therefore, the specific effects of the present disclosure are not limited to those explicitly disclosed in this document, and may include various other effects that can be understood or derived from the technical features of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 An example of a video / image coding system to which the embodiments of this document can be applied is illustrated.

[0029] Figure 2 FIG. schematically illustrates the configuration of a video / image coding device to which the embodiments of this document can be applied.

[0030] Figure 3 FIG. is a schematic diagram illustrating the configuration of a video / image decoding device to which the embodiments of this document can be applied.

[0031] Figure 4 An example of a video / image coding method based on inter-frame prediction is shown.

[0032] Figure 5 An example of a video / image decoding method based on inter-frame prediction is shown.

[0033] Figure 6 An inter-frame prediction process is exemplarily shown.

[0034] Figure 7 FIG. is a diagram for describing the symmetric motion vector difference (SMVD).

[0035] Figure 8 FIG. is a diagram for describing a method of deriving a motion vector in inter-frame prediction.

[0036] Figures 9 to 13 An MVD derivation method of MMVD according to an embodiment of the present disclosure is illustrated.

[0037] Figure 14 FIG. is a diagram for describing the SMVD according to one embodiment of the present disclosure.

[0038] Figure 15 FIG. is a flowchart exemplarily showing a method for deriving MMVD according to one embodiment of the present disclosure.

[0039] Figure 16It is a flowchart illustrating a method for deriving MMVD according to an embodiment of the present disclosure.

[0040] Figure 17 It is a flowchart illustrating a method for deriving MMVD according to an embodiment of the present disclosure.

[0041] Figure 18 and Figure 19 An example of a video / image encoding method and related components according to an embodiment of the present disclosure is illustrated.

[0042] Figure 20 and Figure 21 An example of an image / video decoding method and related components according to an embodiment of the present disclosure is illustrated.

[0043] Figure 22 An example of a content stream system to which the embodiments of this document can be applied is illustrated. Detailed Description

[0044] This document can be modified in various ways, and its specific embodiments will be described and illustrated in the accompanying drawings. However, the embodiments are not intended to limit this document. The terms used in the following description are only for describing specific embodiments and are not intended to limit this document. Singular expressions include plural expressions as long as they are not clearly understood differently. Terms such as "including" or "having" should be understood as indicating the presence of the features, numbers, steps, operations, elements, components, or combinations thereof used in the following description, without excluding the possibility of the presence or addition of one or more different features, numbers, steps, operations, elements, components, or combinations thereof.

[0045] Meanwhile, for the convenience of describing different feature functions, each configuration in the accompanying drawings described in this document is shown independently, and it does not mean that each configuration is implemented as a separate piece of hardware or separate software. For example, two or more components in each component can be combined to form one component, or one component can be divided into multiple components. Embodiments in which each component is integrated and / or separated are also included within the scope of the disclosure of this document.

[0046] Hereinafter, examples of this embodiment will be described in detail with reference to the accompanying drawings. In addition, in the accompanying drawings, the same reference numerals are used to indicate the same elements, and the repeated description of the same elements may be omitted.

[0047] Figure 1 An example of a video / image encoding system to which the embodiments of this document can be applied is illustrated.

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

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

[0050] The video source may obtain video / images through processes such as capturing, synthesizing, or generating video / images. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include, for example, one or more cameras, a video / image archive including previously captured video / images, etc. The video / image generation device may include, for example, a computer, a tablet computer, and a smart phone, and may (electronically) generate video / images. For example, virtual video / images may be generated by a computer or the like. In this case, the video / image capture process may be replaced by a process of generating relevant data.

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

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

[0053] The decoding device may decode the video / image by performing a series of processes such as dequantization, inverse transformation, prediction, etc., corresponding to the operations of the encoding device.

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

[0055] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to the methods disclosed in the Versatile Video Coding (VVC), Essential Video Coding (EVC) standard, AOMedia Video 1 (AV1) standard, Second Generation Audio Video Coding Standard (AVS2), or next-generation video / image coding standards (e.g., H.267 or H.268, etc.).

[0056] This document presents various embodiments of video / image coding, and unless otherwise mentioned, these embodiments can be executed in combination with each other.

[0057] In this document, video can refer to a series of images over time. A picture generally refers to a unit representing one image at a specific time frame, and a slice / tile refers to a unit that constitutes a part of a picture in terms of coding. A slice / tile can include one or more Coding Tree Units (CTUs). A picture can be composed of one or more slices / tiles. A picture can be composed of one or more tile groups. A tile group can include one or more tiles. A brick can represent a rectangular area of CTU rows within a tile in a picture. A tile can be partitioned into multiple bricks, and each brick can be constructed using one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks can also be referred to as a brick. Tile scan can represent a specific order sorting of CTUs that partition a picture, where CTUs can be sorted in a CTU raster scan within a tile, and the bricks within a tile can be sorted continuously in a raster scan of the tile of the tile, and the tiles in a picture can be sorted continuously in a raster scan of the tile of the picture. A tile is a rectangular area of CTUs within a specific tile column and a specific tile row within a picture. A tile column is a rectangular area of CTUs that has a height equal to the height of the picture and a width specified by a syntax element in the picture parameter set. A tile row is a rectangular area of CTUs that has a height specified by a syntax element in the picture parameter set and a width equal to the width of the picture. Tile scan is a specific order sorting of CTUs that partition a picture, where CTUs are sorted continuously in a CTU raster scan within a tile while the tiles in a picture are sorted continuously in a raster scan of the tile of the picture. A slice includes an integer number of bricks of a picture, which can be exclusively included in a single NAL unit. A slice can be composed of multiple complete tiles, or only composed of a continuous sequence of complete bricks of one tile. In this document, tile groups and slices can be used in place of each other. For example, in this document, a tile group / tile group header can be referred to as a slice / slice header.

[0058] Meanwhile, a picture can be divided into two or more sub-pictures. A sub-picture can be a rectangular area of one or more slices within a picture.

[0059] A pixel or pel can mean the smallest unit that makes up a picture (or image). Additionally, "sample" can be used as a term corresponding to a pixel. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chrominance component.

[0060] A unit can represent the basic unit of image processing. A unit can include at least one of a specific area of a picture and information related to that area. A unit can include one luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit can be used interchangeably with terms such as a block or a region. Generally, an M×N block can include an array of M columns and N rows of samples (or sample array) or a set (or array) of transform coefficients. Optionally, a sample can mean a pixel value in the spatial domain, and when such a pixel value is transformed to the frequency domain, it can mean a transform coefficient in the frequency domain.

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

[0062] The slash " / " or comma (,) used in this document 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".

[0063] In this document, "at least one of A and B" can mean "only A", "only B", or "both A and B". Additionally, in this document, the expression "at least one of A or B" or "at least one of A and / or B" can be interpreted as "at least one of A and B".

[0064] Furthermore, 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". Additionally, "at least one of A, B, or C" or "at least one of A, B, and / or C" can mean "at least one of A, B, and C".

[0065] In addition, the parentheses used in this document may mean "for example". Specifically, when indicating "prediction (intra prediction)", "intra prediction" can be presented as an example of "prediction". In other words, "prediction" in this document is not limited to "intra prediction", and "intra prediction" can be presented as an example of "prediction". In addition, even when indicating "prediction (i.e., intra prediction)", "intra prediction" can be presented as an example of "prediction".

[0066] The technical features separately described in one drawing of this document can be implemented individually or simultaneously.

[0067] Figure 2 The structure of a video / image encoding device to which embodiments of this document can be applied is shown. Hereinafter, the so-called video encoding device may include an image encoding device.

[0068] Refer to Figure 2 As shown in, the encoding device 200 includes an image splitter 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 reconstruction block generator. According to an embodiment, the image splitter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250, and the filter 260 may be configured by at least one hardware component (e.g., an encoder chipset or a processor). Additionally, the memory 270 may include a decoded picture buffer (DPB), or may be configured by a digital storage medium. The hardware component may also include the memory 270 as an internal / external component.

[0069] The image splitter 210 may partition an input image (or picture or frame) input to the encoding device 200 into one or more processing units. For example, the processing unit may be referred to as a coding unit (CU). In this case, the coding unit may be recursively partitioned from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quadtree binary tree ternary tree (QTBTTT) structure. For example, a coding unit may be partitioned into a plurality of coding units with deeper depths based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quadtree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied first. The encoding process according to this document may be performed based on the final coding unit that is no longer partitioned. In this case, based on the encoding efficiency according to the image characteristics, the largest coding unit may be used as the final coding unit, or if necessary, the coding unit may be recursively partitioned into coding units with deeper depths and the coding unit with the optimal size may be used as the final coding unit. Here, the encoding process may include processes of prediction, transformation, and reconstruction (which will be described later). As another example, the processing unit may further include a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit may be split or partitioned from the above-mentioned final coding unit. The prediction unit may be a unit for sample prediction, and the transformation unit may be a unit for deriving transformation coefficients and / or a unit for deriving a residual signal from the transformation coefficients.

[0070] In some cases, the unit may be used interchangeably with terms such as a block or a region. In general, an M×N block may represent a set of samples or transformation coefficients composed of M columns and N rows. Samples generally may represent pixels or pixel values, which may represent only the pixels / pixel values of the luminance component or only the pixels / pixel values of the chrominance component. Samples may be used as a term corresponding to a picture (or image) of pixels or pels.

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

[0072] The intra-frame predictor 222 may predict the current block by referring to samples in the current picture. Depending on the prediction mode, the samples referred to may be located near the current block or may be separated. In intra-frame prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. For example, the non-directional modes may include the DC mode and the planar mode. For example, depending on the level of detail of the prediction direction, the directional modes may include 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used according to the settings. The intra-frame predictor 222 may use the prediction mode applied to the neighboring block to determine the prediction mode applied to the current block.

[0073] The inter - frame predictor 221 can derive a predicted block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. Here, in order to reduce the amount of motion information transmitted in the inter - frame prediction mode, the motion information can be predicted in units of blocks, sub - blocks, or samples based on the correlation of the motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can also include inter - frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter - frame prediction, neighboring blocks can include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block can be the same or different. The temporal neighboring block can be referred to as a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block can be referred to as a collocated picture (colPic). For example, the inter - frame predictor 221 can configure a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter - frame prediction can be performed based on various prediction modes. For example, in the skip mode and the merge mode, the inter - frame predictor 221 can use the motion information of neighboring blocks as the motion information of the current block. In the skip mode, different from the merge mode, the residual signal may not be sent. In the case of the motion vector prediction (MVP) mode, the motion vector of a 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.

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

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

[0076] Quantizer 233 may quantize the transform coefficients and send them to entropy encoder 240, and entropy encoder 240 may encode the quantized signals (information on the quantized transform coefficients) and output a bitstream. The information on the quantized transform coefficients may be referred to as residual information. Quantizer 233 may rearrange the block type quantized transform coefficients into a one-dimensional vector form based on the coefficient scan order, and generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. Information on the transform coefficients may be generated. Entropy encoder 240 may perform various coding methods such as, for example, exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. Entropy encoder 240 may encode, together or separately, information required for video / image reconstruction other than the quantized transform coefficients (e.g., values of syntax elements, etc.). The encoded information (e.g., encoded video / image information) may be sent or stored in the form of a bitstream in units of NAL (network abstraction layer). The video / image information may also include information on various parameter sets, such as adaptive parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). Additionally, the video / image information may also include general constraint information. In this document, the information and / or syntax elements sent / signaled from the encoding device to the decoding device may be included in the video / picture information. The video / image information may be encoded through the above encoding process and included in the bitstream. The bitstream may be sent via a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for sending the signal output from entropy encoder 240 and / or a storage unit (not shown) for storing the signal may be included as internal / external elements of encoding device 200, and alternatively, the transmitter may be included in entropy encoder 240.

[0077] The quantized transform coefficients output from quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual samples) may be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients via dequantizer 234 and inverse transformer 235. Adder 250 adds the reconstructed residual signal to the prediction signal output from inter-frame predictor 221 or intra-frame predictor 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If there is no residual in the block to be processed (e.g., in the case where the skip mode is applied), the predicted block may be used as the reconstructed block. Adder 250 may be referred to as a reconstructor or a reconstructed block generator. As described below, the generated reconstructed signal may be used for intra-frame prediction of the next block to be processed in the current picture and may be used for inter-frame prediction of the next picture through filtering.

[0078] In addition, luminance mapping and chrominance scaling (LMCS) can be applied during picture coding and / or reconstruction.

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

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

[0081] The DPB of memory 270 can store the modified reconstructed picture used as a reference picture in inter-frame predictor 221. Memory 270 can store the motion information of the blocks that derive (or encode) the motion information in the current picture and / or the motion information of the blocks that have been reconstructed in the picture. The stored motion information can be sent to inter-frame predictor 221 and used as the motion information of spatially adjacent blocks or temporally adjacent blocks. Memory 270 can store the reconstructed samples of the reconstructed blocks in the current picture and can transfer the reconstructed samples to intra-frame predictor 222.

[0082] Figure 3 The configuration of a video / image decoding device to which embodiments of the present specification can be applied is shown.

[0083] Referring to Figure 3 , decoding device 300 can include entropy decoder 310, residual processor 320, predictor 330, adder 340, filter 350, memory 360. Predictor 330 can include inter-frame predictor 332 and intra-frame predictor 331. Residual processor 320 can include dequantizer 321 and inverse transformer 322. According to an embodiment, entropy decoder 310, residual processor 320, predictor 330, adder 340, and filter 350 can be configured by hardware components (e.g., a decoder chipset or a processor). Additionally, memory 360 can include a decoded picture buffer (DPB) or can be configured by a digital storage medium. The hardware components can also include memory 360 as an internal / external component.

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

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

[0086] The dequantizer 321 can dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 321 can rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scan order executed in the encoding device. The dequantizer 321 can perform dequantization on the quantized transform coefficients using quantization parameters (e.g., quantization step information) and obtain the transform coefficients.

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

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

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

[0090] The intra predictor 331 can predict the current block by referring to the samples in the current picture. Depending on the prediction mode, the samples referred to can be located near the current block or can be separated. In intra prediction, the prediction mode can include multiple non - directional modes and multiple directional modes. The intra predictor 331 can use the prediction mode applied to the neighboring blocks to determine the prediction mode applied to the current block.

[0091] The inter-frame predictor 332 may derive a prediction block of a current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter-frame prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of the 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-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame 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-frame predictor 332 may configure a motion information candidate list based on neighboring blocks and derive a motion vector and / or a reference picture index of the current block based on the received candidate selection information. The inter-frame prediction may be performed based on various prediction modes, and the information about the prediction may include information indicating the inter-frame prediction mode of the current block.

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

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

[0094] In addition, luminance mapping and chrominance scaling (LMCS) may be applied in the picture decoding process.

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

[0096] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter - frame predictor 332. The memory 360 can store the motion information of the blocks that derive (or decode) the motion information in the current picture and / or the motion information of the blocks that have been reconstructed in the picture. The stored motion information can be sent to the inter - frame predictor 332 to be used as the motion information of spatially adjacent blocks or temporally adjacent blocks. The memory 360 can store the reconstructed samples of the reconstructed blocks in the current picture and transmit the reconstructed samples to the intra - frame predictor 331.

[0097] In this document, the embodiments described in the filter 260, the inter - frame predictor 221, and the intra - frame predictor 222 of the encoding device 200 can be the same as or respectively correspond to those of the filter 350, the inter - frame predictor 332, and the intra - frame predictor 331 of the decoding device 300. This also applies to the inter - frame predictor 332 and the intra - frame predictor 331.

[0098] As described above, when performing video encoding, prediction is performed to increase the compression efficiency. Through this, a prediction block including prediction samples for the current block (the block to be encoded) can be generated. Here, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived identically in the encoding device and the decoding device, and the encoding device decodes the information about the residual between the original block and the prediction block (residual information), rather than the original sample values of the original block itself. By signaling to the device, the image encoding efficiency can be increased. The decoding device can derive a residual block including residual samples based on the residual information, generate a reconstructed block including reconstructed samples by summing the residual block and the prediction block, and generate a reconstructed picture including the reconstructed block.

[0099] The residual information can be generated through a transformation process and a quantization process. For example, the encoding device can derive a residual block between the original block and the prediction block, perform a transformation process on the residual samples (residual sample array) included in the residual block to derive transformation coefficients, and then, by performing a quantization process on the transformation coefficients, derive quantized transformation coefficients to signal the residual - related information (through the bitstream) to the decoding device. Here, the residual information can include position information, transformation technique, transformation kernel, quantization parameters, value information of the quantized transformation coefficients, etc. The decoding device can perform a de - quantization / inverse - transformation process based on the residual information and derive the residual samples (or residual block). The decoding device can generate a reconstructed picture based on the prediction block and the residual block. The encoding device can also de - quantize / inverse - transform the quantized transformation coefficients for inter - frame prediction reference of subsequent pictures to derive the residual block and generate a reconstructed picture based on it.

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

[0101] 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 about the transform coefficients, and the information about the transform coefficients may be signaled by the residual coding syntax. The transform coefficients may be derived based on the residual information (or the information about the transform coefficients), and the scaled transform coefficients may be derived by inverse-transforming (scaling) the transform coefficients. The residual samples may be derived based on the inverse-transform (transform) of the scaled transform coefficients. This may also be applied / represented in other parts of this document.

[0102] Intra prediction may refer to prediction that generates prediction samples for a current block based on reference samples in a picture (hereinafter referred to as the current picture) to which the current block belongs. When intra prediction is applied to the current block, the neighboring reference samples to be used for the intra prediction of the current block may be derived. The neighboring reference samples of the current block may include samples adjacent to the left boundary of the current block of size nW x nH and a total of 2 x nH samples adjacent to the lower left, samples adjacent to the upper boundary of the current block and a total of 2 x nW samples adjacent to the upper right, and one sample adjacent to the upper left of the current block. Alternatively, the neighboring reference samples of the current block may include a plurality of upper neighboring samples and a plurality of left neighboring samples. 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 of size nW x nH, a total of nW samples adjacent to the lower boundary of the current block, and one sample adjacent to the lower right (adjacent to the lower right) of the current block.

[0103] However, some of the neighboring reference samples of the current block have not been decoded or may be unavailable. In this case, the decoder may configure the neighboring reference samples to be used for prediction by replacing the unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction may be configured by interpolation of the available samples.

[0104] When deriving the neighboring reference samples, (i) the prediction samples may be derived based on the average value or interpolation of the neighboring reference samples of the current block, and (ii) the prediction samples may be derived based on the reference samples existing in a specific (prediction) direction for the prediction samples among the surrounding reference samples of the current block. The case of (i) may be referred to as a non-directional mode or a non-angle mode, and the case of (ii) may be referred to as a directional mode or an angle mode.

[0105] Alternatively, a prediction sample can also be generated by interpolating a first neighboring sample in the prediction direction of the intra prediction mode of the current block among neighboring reference samples and a second neighboring sample in the direction opposite to the prediction direction. The above situation can be referred to as linear interpolation intra prediction (LIP). In addition, a chrominance prediction sample can be generated based on luminance samples using a linear model. This situation can be referred to as the LM mode.

[0106] In addition, a temporary prediction sample for the current block can be derived based on filtered neighboring reference samples, and a prediction sample for the current block can also be derived by performing a weighted sum of at least one reference sample derived among existing neighboring reference samples (i.e., unfiltered neighboring reference samples) according to the intra prediction mode and the temporary prediction sample. The foregoing situation can be referred to as position-dependent intra prediction (PDPC).

[0107] In addition, a prediction sample can be derived by selecting a reference sample line with the highest prediction accuracy among neighboring multi-reference sample lines of the current block and using reference samples in the prediction direction in the corresponding line, and then the reference sample line used herein can be indicated (signaled) to the decoding device, thereby performing intra prediction coding. The above situation can be referred to as multi-reference line (MRL) intra prediction or MRL-based intra prediction.

[0108] In addition, intra prediction can be performed based on the same intra prediction mode by dividing the current block into vertical or horizontal sub-partitions, and neighboring reference samples can be derived and used on a sub-partition basis. That is, in this case, the intra prediction mode for the current block is equally applied to the sub-partitions, and the intra prediction performance can be improved in some cases by deriving and using neighboring reference samples on a sub-partition basis. This prediction method can be referred to as intra sub-partition (ISP) intra prediction or ISP-based intra prediction.

[0109] The above intra prediction methods can be referred to as intra prediction types separate from the intra prediction mode. Intra prediction types can be referred to by various terms such as intra prediction techniques or additional intra prediction modes. For example, an intra prediction type (or an additional intra prediction mode, etc.) can include at least one of the above LIP, PDPC, MRL, and ISP. A general intra prediction method excluding specific intra prediction types such as LIP, PDPC, MRL, and ISP can be referred to as a normal intra prediction type. When a specific intra prediction type is not applied, the normal intra prediction type can generally be applied, and prediction can be performed based on the above intra prediction mode. At the same time, post-filtering can also be performed on the prediction samples derived as needed.

[0110] Specifically, the intra prediction process may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and a predicted sample derivation step based on the intra prediction mode / type. In addition, a post-filtering step may be performed on the predicted samples derived as needed.

[0111] When intra prediction is applied, the intra prediction mode of neighboring blocks may be used to determine the intra prediction mode applied to the current block. For example, the decoding device may select one of the MPM candidates in the MPM (Most Probable Mode) list based on the received MPM index, where the MPM (Most Probable Mode) list is derived based on the intra prediction modes of the neighboring blocks (e.g., left and / or upper neighboring blocks) of the current block, and may select one of the remaining intra prediction modes (and the planar mode) not included in the MPM candidates based on the remaining intra prediction mode information. The MPM list may be configured to include or not include the planar mode as a candidate. For example, if the MPM list includes the planar mode as a candidate, the MPM list may have 6 candidates. If the MPM list does not include the planar mode as a candidate, the MPM list may have 5 candidates. When the MPM list does not include the planar mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not the planar mode may be signaled. For example, the MPM flag may be signaled first, and when the value of the MPM flag is 1, the MPM index and the non-planar flag may be signaled. In addition, the MPM index may be signaled when the value of the non-planar flag is 1. Here, the reason for configuring the MPM list not to include the planar mode as a candidate is that the planar mode is always considered an MPM, so by signaling the flag (non-planar flag) first, it is first checked whether the MPM is the planar mode, rather than saying that the planar mode is not an MPM.

[0112] For example, based on an MPM flag (e.g., intra_luma_mpm_flag), it can be indicated whether the intra prediction mode applied to the current block is among the MPM candidates (and the planar mode) or among the remaining modes. An MPM flag value of 1 can indicate that the intra prediction mode for the current block is within the MPM candidates (and the planar mode), while an MPM flag value of 0 can indicate that the intra prediction mode for the current block is not within the MPM candidates (and the planar mode). A non-planar flag (e.g., intra_luma_not_planar_flag) value of 0 can indicate that the intra prediction mode for the current block is the planar mode, and a non-planar flag value of 1 can indicate that the intra prediction mode for the current block is not the planar mode. The MPM index can be signaled in the form of the mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information can be signaled in the form of the rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information can indicate one of the remaining intra prediction modes not included in the MPM candidates (and the planar mode) among all intra prediction modes by indexing in the order of the prediction mode numbers. The intra prediction mode can be the intra prediction mode of the luminance component (samples). Hereinafter, the intra prediction mode information can include at least one of the following: an MPM flag (e.g., intra_luma_mpm_flag), a non-planar flag (e.g., intra_luma_not_planar_flag), an 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 can be referred to by various terms such as the MPM candidate list and candModeList. When 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 the remaining intra prediction mode information (e.g., intra_mip_mpm_remainder) for MIP can be signaled, and the non-planar flag is not signaled.

[0113] In other words, generally, when performing block segmentation on an image, the current block to be encoded and neighboring blocks have similar image characteristics. Therefore, it is highly likely that the current block and neighboring blocks have the same or similar intra prediction modes. Thus, the encoder can use the intra prediction mode of neighboring blocks to encode the intra prediction mode of the current block.

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

[0115] The encoder / decoder may be configured with an MPM list including five or six MPMs.

[0116] To configure the MPM list, three modes may be considered: a default intra mode, a neighboring intra mode, and a derived intra mode.

[0117] For the neighboring intra mode, two neighboring blocks may be considered, namely, a left neighboring block and an upper neighboring block.

[0118] As described above, if the MPM list is configured to exclude the planar mode, the planar mode is excluded from the list, and the number of candidates in the MPM list may be set to five.

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

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

[0121] Motion information may include L0 motion information and / or L1 motion information according to 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. Prediction based on the L0 motion vector may be called L0 prediction, prediction based on the L1 motion vector may be called L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be called bi - prediction. Here, the L0 motion vector may indicate a motion vector associated with the reference picture list L0, and the L1 motion vector may indicate a motion vector associated with the reference picture list L1. The reference picture list L0 may include pictures that are before the current picture in output order as reference pictures, and the reference picture list L1 may include pictures that are after the current picture in output order. A previous picture may be called a forward (reference) picture and a subsequent picture may be called a backward (reference) picture. The reference picture list L0 may further include pictures that are after the current picture in output order as reference pictures. In this case, the previous pictures may be indexed first in the reference picture list L0, and then the subsequent pictures may be indexed. The reference picture list L1 may further include pictures that are before the current picture in output order as reference pictures. In this case, the subsequent pictures may be indexed first in the reference picture list L1, and then the previous pictures may be indexed. The output order may correspond to the picture order count (POC) order.

[0122] The video / image encoding process based on inter - prediction may include, for example, the following.

[0123] Figure 4 An example of a video / image encoding method based on inter - prediction is shown.

[0124] The encoding device performs inter prediction on the current block (S400). The encoding device may derive an inter prediction mode and motion information of the current block, and generate prediction samples of the current block. Here, the processes of determining the inter prediction mode, deriving the motion information, and generating the prediction samples may be performed simultaneously, or any one of the processes may be performed before the other processes. For example, the inter predictor of the encoding device may include a prediction mode determiner, a motion information deriver, and a prediction sample deriver, and the prediction mode determiner may determine the prediction mode of the current block, the motion information deriver may derive the motion information of the current block, and the prediction sample deriver may derive the prediction samples of the current block. For example, the inter predictor of the encoding device may search for a block similar to the current block in a specific area (search area) of a reference picture through motion estimation, and derive a reference block with the smallest difference from the current block or a reference block equal to or below a specific reference. Based on this, a reference picture index indicating the reference picture in which the reference block is located may be derived, and a motion vector may be derived based on the position difference between the reference block and the current block. The encoding device may determine a mode to be applied to the current block among various prediction modes. The encoding device may compare the RD costs of various prediction modes and determine an optimal prediction mode for the current block.

[0125] For example, if the skip mode or the merge mode is applied to the current block, the encoding device may configure a merge candidate list described later, and derive a reference block with the smallest difference from the current block or a reference block equal to or below a specific reference among the reference blocks indicated by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding device. The motion information of the current block may be derived using the motion information of the selected merge candidate.

[0126] As another example, if the (A)MVP mode is applied to the current block, the encoding device may configure an (A)MVP candidate list described later, and use the motion vector of the selected mvp candidate among the motion vector predictor (mvp) candidates included in the (A)MVP candidate list as the mvp of the current block. In this case, for example, the motion vector indicating the reference block derived through the above motion estimation may be used as the motion vector of the current block, and the mvp candidate having 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 the difference obtained by subtracting the mvp from the motion vector of the current block, may be derived. In this case, information about the MVD may be signaled to the decoding device. Additionally, if the (A)MVP mode is applied, the value of the reference picture index may be configured as reference picture index information and signaled to the decoding device separately.

[0127] The encoding device may derive a residual sample based on a prediction sample (S410). The encoding device may derive a residual sample by comparing the original sample of the current block with the prediction sample.

[0128] The encoding device encodes the image information including prediction information and residual information (S420). The encoding device may output the encoded image information in the form of a bitstream. The prediction information may include information about prediction mode information (e.g., skip flag, merge flag, mode index, etc.) and motion information as information related to the prediction process. The information about the motion information may include candidate selection information (e.g., merge index, mvp flag, or mvp index) as information for deriving a motion vector. Additionally, the information about the motion information may include the above-mentioned information about MVD and / or reference picture index information. Additionally, the information about the motion information may include information indicating whether L0 prediction, L1 prediction, or bi prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantization transform coefficients of the residual sample.

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

[0130] Furthermore, as described above, the encoding device may generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on the reference sample and the residual sample. This is to derive the same prediction result as that derived by the decoding device by the encoding device, so the encoding efficiency can be increased. Therefore, the encoding device may store the reconstructed picture (or reconstructed samples, reconstructed blocks) in the memory and use it as a reference picture for inter-frame prediction. As described above, an in-loop filtering process, etc. may also be applied to the reconstructed picture.

[0131] The video / image decoding process based on inter-frame prediction may include, for example, the following.

[0132] Figure 5 An example of a video / image decoding method based on inter-frame prediction is shown.

[0133] Referring to Figure 5 , the decoding device may perform operations corresponding to those performed by the encoding device. The decoding device may perform prediction on the current block based on the received prediction information and derive a prediction sample.

[0134] Specifically, the decoding device may determine the prediction mode of the current block based on the received prediction information (S500). The decoding device may determine the inter-frame prediction mode applied to the current block based on the prediction mode information in the prediction information.

[0135] For example, the decoding device may determine whether to apply the merge mode or determine the (A)MVP mode to the current block based on the merge flag. Alternatively, the decoding device may select one of various inter prediction mode candidates based on the mode index. The inter prediction mode candidates may include the skip mode, the merge mode, and / or the (A)MVP mode, or may include various inter prediction modes described later.

[0136] The decoding device derives the motion information of the current block based on the determined inter prediction mode (S510). For example, if the skip mode or the merge mode is applied to the current block, the decoding device may configure a merge candidate list described later and select one merge candidate among the merge candidates included in the merge candidate list. The selection may be performed based on the above selection information (merge index). The motion information of the selected merge candidate may be used to derive the motion information of the current block. The motion information of the selected merge candidate may be used as the motion information of the current block.

[0137] As another example, if the (A)MVP mode is applied to the current block, the decoding device may configure an (A)MVP candidate list described later and use the motion vector of the selected mvp candidate among the motion vector predictor (mvp) candidates included in the (A)MVP candidate list as the mvp of the current block. The selection may be performed based on the above selection information (mvp flag or mvp index). In this case, the MVD of the current block may be derived based on the information about the MVD, and the motion vector of the current block may be derived based on the mvp and the MVD of the current block. Additionally, the reference picture index of the current block may be derived based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list of the current block may be derived as the reference picture referred to for the inter prediction of the current block.

[0138] Furthermore, as described later, the motion information of the current block may be derived without configuring a candidate list, and in this case, the motion information of the current block may be derived according to the process disclosed in the prediction mode described later. In this case, the configuration of the above candidate list may be omitted.

[0139] The decoding device may generate a prediction sample of the current block based on the motion information of the current block (S520). In this case, the decoding device may derive the reference picture based on the reference picture index of the current block and use the samples of the reference block indicated by the motion vector of the current block on the reference picture to derive the prediction sample of the current block. In this case, as described later, in some cases, a prediction sample filtering process may also be performed on all or some of the prediction samples of the current block.

[0140] For example, the inter-frame predictor of a decoding device may include a prediction mode determiner, a motion information derivator, and a predicted sample derivator. The prediction mode determiner may determine the prediction mode of a current block based on the received prediction mode information. The motion information derivator may derive the motion information of the current block (such as a motion vector and / or a reference picture index) based on information about the received motion information. The predicted sample derivator may derive the predicted sample of the current block.

[0141] The decoding device generates residual samples of a current block based on the received residual information (S530). The decoding device may generate reconstructed samples of the current block based on the predicted samples and the residual samples, and generate a reconstructed picture based on them (S540). Thereafter, an in-loop filtering process or the like may also be applied to the reconstructed picture as described above.

[0142] Figure 6 An inter-frame prediction process is exemplarily illustrated.

[0143] Referring to Figure 6 , as described above, the inter-frame prediction process may include: determining an inter-frame prediction mode, deriving motion information according to the determined prediction mode, and performing prediction (generating predicted samples) based on the derived motion information. The inter-frame prediction process may be executed by the encoding device and the decoding device as described above. The encoding device in this document may include an encoding device and / or a decoding device.

[0144] Referring to Figure 6 , the encoding device determines an inter-frame prediction mode for a current block (S600). Various inter-frame prediction modes may be used to predict a current block in a picture. For example, various modes such as a merge mode, a skip mode, a motion vector prediction (MVP) mode, an affine mode, a sub-block merge mode, and a merge with MVD (MMVD) mode may be used. Additionally or as an incidental mode instead of these modes, a decoder-side motion vector refinement (DMVR) mode, an adaptive motion vector resolution (AMVR) mode, bi-prediction with CU-level weights (BCW), bi-directional optical flow (BDOF), etc. may be used. The affine mode may be referred to as an affine motion prediction mode. The MVP mode may be referred to as an advanced motion vector prediction (AMVP) mode. In this document, some modes and / or candidates of motion information derived by some modes may also be included as one of the motion information-related candidates under another mode. For example, an HMVP candidate may be added as a merge candidate in the merge / skip mode, or may be added as an MVP candidate in the MVP mode. If the HMVP candidate is used as a motion information candidate in the merge mode or the skip mode, the HMVP candidate may be referred to as an HMVP merge candidate.

[0145] Prediction mode information indicating an inter - prediction mode of a current block can be signaled from an encoding device to a decoding device. The prediction mode information can be included in a bitstream and received by the decoding device. The prediction mode information can include index information indicating one of a plurality of candidate modes. Alternatively, the inter - prediction mode can be indicated by hierarchical signaling of flag information. In this case, the prediction mode information can include one or more flags. For example, it can be signaled whether to apply the skip mode by signaling a skip flag, and if the skip mode is not applied, it can be signaled whether to apply the merge mode by signaling a merge flag, and a flag indicating to apply the MVP mode or flags for additional classification can be further signaled. The affine mode can be signaled as an independent mode or as a dependent mode with respect to the merge mode or the MVP mode. For example, the affine mode can include an affine merge mode and an affine MVP mode.

[0146] Meanwhile, information indicating whether to use the above - mentioned list0 (L0) prediction, list1 (L1) prediction, or bi - prediction in a current block (current coding unit) can be signaled in the current block. This information can be referred to as motion prediction direction information, inter - prediction direction information, or inter - prediction indication information, and can be configured / encoded / signaled in the form of, for example, an inter_pred_idc syntax element. That is, the inter_pred_idc syntax element can indicate whether the aforementioned list0 (L0) prediction, list1 (L1) prediction, or bi - prediction is used for the current block (current coding unit). In this document, for ease of description, the inter - prediction type (L0 prediction, L1 prediction, or BI prediction) indicated by the inter_pred_idc syntax element can be referred to as a motion prediction direction. L0 prediction can be represented as pred_L0, L1 prediction as pred_L1, and bi - prediction as pred_BI. For example, the following prediction types can be indicated according to the value of the inter_pred_idc syntax element.

[0147] [Table 1]

[0148]

[0149] As described above, an image may include one or more slices. A slice may have one of slice types including an intra (I) slice, a predictive (P) slice, and a bi-predictive (B) slice. The slice type may be indicated based on slice type information. For blocks in an I slice, inter prediction may not be used for prediction, and only intra prediction may be used. Of course, even in such a case, the original sample values may be encoded and signaled without prediction. For blocks in a P slice, intra prediction or inter prediction may be used, and in the case of using inter prediction, only uni-directional prediction may be used. Meanwhile, for blocks in a B slice, intra prediction or inter prediction may be used, and in the case of using inter prediction, up to bi-prediction may be used.

[0150] L0 and L1 may include reference images previously encoded / decoded before the current image. For example, L0 may include reference pictures before and / or after the current image in POC order, and L1 may include reference pictures after and / or before the current image in POC order. In this case, L0 may be assigned a reference picture index lower than the current reference picture in POC order with respect to the previous reference picture, and L1 may be assigned a reference picture index lower than the current reference picture in POC order with respect to the previous reference picture. In the case of a B slice, bi-prediction may be applied, and in this case, uni-directional bi-prediction or bi-directional bi-prediction may be applied. Bi-directional bi-prediction may be referred to as true bi-prediction.

[0151] The following shows the syntax of a coding unit according to an embodiment of this document.

[0152] [Table 2]

[0153]

[0154]

[0155]

[0156]

[0157]

[0158] Referring to Table 2, general_merge_flag may indicate that general merge is available, and when the value of general_merge_flag is 1, the normal merge mode, the MMVD mode, and the merge sub-block mode (sub-block merge mode) may be available. For example, when the value of general_merge_flag is 1, the merge data syntax may be parsed from the encoded video / image information (or bitstream), and the merge data syntax may be configured / encoded to include the information as shown in the following table.

[0159] [Table 3]

[0160]

[0161] The encoding device derives motion information for the current block (S610). The motion information can be derived based on the inter-frame prediction mode.

[0162] The encoding device can use the motion information of the current block to perform inter-frame prediction. The encoding device can derive the optimal motion information of the current block through a motion estimation process. For example, the encoding device can search for similar reference blocks with high correlation in a predetermined search range of the reference picture for the original block in the original picture for the current block in units of fractional pixels to derive the motion information. The similarity of the block can be derived based on the difference between the phase-based sample values. For example, the similarity of the block can be calculated based on the SAD between the current block (or the template of the current block) and the reference block (or the template of the reference block). In this case, the motion information can be derived based on the reference block with the minimum SAD in the search area. The derived motion information can be signaled to the decoding device according to various methods based on the inter-frame prediction mode.

[0163] The encoding device performs inter-frame prediction based on the motion information of the current block (S620). The encoding device can derive the predicted samples of the current block based on the motion information. The current block including the predicted samples can be referred to as a predicted block.

[0164] When the merge mode is applied, the motion information of the current predicted block is not directly sent, and the motion information of the neighboring predicted block is used to derive the motion information of the current predicted block. Therefore, the motion information of the current predicted block can be indicated by sending flag information indicating the use of the merge mode and a merge index indicating which neighboring predicted block to use. The merge mode can be referred to as the regular merge mode.

[0165] The encoder must search for merge candidate blocks for deriving the motion information of the current predicted block to perform the merge mode. For example, up to five merge candidate blocks can be used, but the embodiments of this document are not limited thereto. The maximum number of merge candidate blocks can be sent in the slice header or the tile group header, and the embodiments of this document are not limited thereto. After finding the merge candidate blocks, the encoder can generate a merge candidate list and select the merge candidate block with the minimum cost therein as the final merge candidate block.

[0166] The merge candidate list can use, for example, five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate can be used. Hereinafter, the spatial merge candidate or the spatial MVP candidate described later can be referred to as SMVP, and the temporal merge candidate or the temporal MVP candidate described later can be referred to as TMVP.

[0167] Next, a method for constructing a merge candidate list according to this document will be described.

[0168] The encoding device (encoder / decoder) inserts the spatial merge candidates derived by searching for the spatial neighboring blocks of the current block into the merge candidate list. For example, the spatial neighboring blocks may include the lower left neighboring block, the left neighboring block, the upper right neighboring block, the upper neighboring block, and the upper left neighboring block of the current block. However, this is an example, and in addition to the above spatial neighboring blocks, additional neighboring blocks such as the right neighboring block, the lower neighboring block, and the lower right neighboring block may further be used as spatial neighboring blocks. The encoding device may detect available blocks by searching for spatial neighboring blocks based on priority, and may derive the motion information of the detected blocks as spatial merge candidates.

[0169] The encoding device inserts into the merge candidate list the temporal merge candidates derived by searching for temporally neighboring blocks of the current block. The temporally neighboring blocks may be located on a reference picture that is a picture 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 may be searched in the order of the bottom-right neighboring block and the bottom-right center block of the collocated block of the current block on the col picture. Meanwhile, when motion data compression is applied, specific motion information may be stored as representative motion information for each predetermined storage unit in the col picture. In this case, it is not necessary to store the motion information of all blocks in the predetermined storage unit, thereby achieving a motion data compression effect. In this case, the predetermined storage unit may be previously determined, for example, as 16x16 sample units, 8x8 sample units, etc., or the size information about the predetermined storage unit may be signaled from the encoder to the decoder. When motion data compression is applied, the motion information of the temporally neighboring blocks may be replaced with the representative motion information of the predetermined storage unit in which the temporally neighboring blocks are located. That is, in this case, from an implementation perspective, a predetermined value is arithmetically shifted to the right based on the coordinates (top-left sample position) of the temporally neighboring blocks, and thereafter, the motion information of the prediction block covering the arithmetically left-shifted position may be used to derive the temporal merge candidates. For example, in the case where the sample unit of the predetermined storage unit is 2nx2n, if the coordinates of the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb>>n)<<n), (yTnb>>n)<<n)) may be used for the temporal merge candidates. Specifically, for example, in the case where the predetermined storage unit is 16x16 sample units, if the coordinates of the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb>>4)<<4), (yTnb>>4)<<4)) may be used for the temporal merge candidates. Or, for example, in the case where the predetermined storage unit is 8x8 sample units, if the coordinates of the temporally neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the modified position ((xTnb>>3)<<3), (yTnb>>3)<<3)) may be used for the temporal merge candidates.

[0170] The encoding device may determine whether the number of current merge candidates is less than the number of maximum merge candidates. The number of maximum merge candidates may be predefined or signaled from the encoder to the decoder. For example, the encoder may generate information about the number of maximum merge candidates, encode the information, and send the encoded information to the decoder in the form of a bitstream. If the number of maximum merge candidates is filled, the subsequent candidate addition process may not be performed.

[0171] As a result of the check, if the number of current merge candidates is less than the number of maximum merge candidates, the encoding device inserts additional merge candidates into the merge candidate list.

[0172] As a result of the check, if the number of current merge candidates is not less than the number of maximum merge candidates, the encoding device may terminate the construction of the merge candidate list. In this case, the encoder may select the best merge candidate among the merge candidates configuring the merge candidate list based on the rate distortion (RD) cost and signal to the decoder selection information (e.g., merge index) indicating the selected merge candidate. The decoder may select the best merge candidate based on the merge candidate list and the selection information.

[0173] The motion information of the selected merge candidate may be used as the motion information of the current block, and the prediction samples of the current block may be derived based on the motion information of the current block. The encoder may derive the residual samples of the current block based on the prediction samples, and may signal residual information regarding the residual samples to the decoder. The decoder may generate reconstructed samples based on the residual samples and the prediction samples derived based on the residual information, and generate a reconstructed picture based on the reconstructed samples as described above.

[0174] When the skip mode is applied, the motion information of the current block may be derived in the same manner as in the case where the merge mode is applied. However, when the skip mode is applied, the residual signal of the corresponding block is omitted, and thus the prediction samples may be used as the reconstructed samples.

[0175] When applying the MVP mode, the motion vectors of reconstructed spatial neighboring blocks and / or the motion vectors of temporal neighboring blocks (or Col blocks) can be used to generate a motion vector predictor (MVP) candidate list. That is, the motion vectors corresponding to the reconstructed spatial neighboring blocks and / or the motion vectors corresponding to the temporal neighboring blocks can be used as MVP candidate motion vectors. When applying dual prediction, an MVP candidate list for deriving L0 motion information and an MVP candidate list for deriving L1 motion information can be generated and used separately. The above prediction information (or information about prediction) can include selection information (e.g., an MVP flag or an MVP index) indicating the best MVP candidate selected from the MVP candidate motion vectors included in the list. In this case, the predictor can use the selection information to select the motion vector predictor for the current block from the MVP candidate motion vectors included in the motion vector candidate list. The predictor of the encoding device can obtain the motion vector difference (MVD) between the motion vector of the current block and the motion vector predictor, encode it, and output it in the form of a bitstream. That is, the MVD can be obtained as the value obtained by subtracting the motion vector predictor from the motion vector of the current block. In this case, the predictor of the decoding device can obtain the motion vector difference included in the information about prediction and derive the motion vector of the current block by adding the motion vector difference to the motion vector predictor. The predictor of the decoding device can obtain or derive a reference picture index indicating the reference picture from the information about prediction.

[0176] Next, a method of constructing an MVP candidate list according to this document will be described.

[0177] An embodiment can first search for spatial candidate blocks for motion vector prediction and insert them into the prediction candidate list. Thereafter, the embodiment can determine whether the number of spatial candidate blocks is less than 2. For example, in one embodiment, when the number of spatial candidate blocks is less than 2, temporal candidate blocks can be searched and additionally inserted into the prediction candidate list, and when the temporal candidate blocks are not available, a zero motion vector can be used. That is, a zero motion vector can be additionally inserted into the prediction candidate list. Thereafter, the embodiment can end the construction of the preliminary candidate list. Alternatively, according to an embodiment, when the number of spatial candidate blocks is not less than two, the construction of the preliminary candidate list can be terminated. Here, the preliminary candidate list can indicate the MVP candidate list.

[0178] Meanwhile, when applying the MVP mode, the reference picture index can be explicitly signaled. In this case, the reference picture index refidxL0 for L0 prediction and the reference picture index refidxL1 for L1 prediction can be signaled respectively. For example, when applying the MVP mode and the BI prediction, both the information about refidxL0 and the information about refidxL1 can be signaled.

[0179] When applying the MVP mode, as described above, the information about the MVD derived from the encoding device can be signaled to the decoding device. The information about the MVD can include, for example, the information representing the x and y components indicating the absolute value and sign of the MVD. In this case, the information indicating whether the absolute value of the MVD is greater than 0 and greater than 1 and the MVD remainder can be signaled step by step. For example, only when the value of the flag information indicating whether the absolute value of the MVD is greater than 0 is 1, the information indicating whether the absolute value of the MVD is greater than 1 can be signaled.

[0180] For example, the information about the MVD can be configured into the following syntax, encoded in the encoding device, and signaled to the decoding device.

[0181] [Table 4]

[0182]

[0183] For example, in Table 4, the abs_mvd_greater0_flag syntax element can indicate the information about whether the differential MVD is greater than 0, and the abs_mvd_greater1_flag syntax element can indicate the information about whether the differential MVD is greater than 1. In addition, the abs_mvd_minus2 syntax element can indicate the information about the value obtained by subtracting 2 from the differential MVD, and the mvd_sign_flag syntax element can indicate the information about the sign of the differential MVD. In addition, in Table 4, [0] of each syntax element can indicate the information about L0, and [1] can indicate the information about L1.

[0184] For example, MVD[compIdx] can be derived based on abs_mvd_greater0_flag[compIdx]*(abs_mvd_minus2[compIdx]+2)*(1 - 2*mvd_sign_flag[compIdx]). Here, compIdx (or cpIdx) represents the index of each component and can have a value of 0 or 1. compIdx 0 can indicate the X component, and compIdx 1 can indicate the Y component. However, this is only an example, and the value of each component can be expressed by using a coordinate system other than the x and y coordinate systems.

[0185] Meanwhile, the MVD for L0 prediction (MVDL0) and the MVD for L1 prediction (MVDL1) can be signaled separately, and the information about the MVD can include the information about MVDL0 and / or the information about MVDL1. For example, when the MVP mode is applied to the current block and BI prediction is applied, both the information about MVDL0 and the information about MVDL1 can be signaled.

[0186] Figure 7 is a diagram for describing the symmetric motion vector difference (SMVD).

[0187] When BI prediction is applied, symmetric MVD can be used considering the coding efficiency. In this case, the signaling of some motion information can be omitted. For example, when symmetric MVD is applied to the current block, the information about refidxL0, the information about refidxL1, and the information about MVDL1 may not be signaled from the coding device to the decoding device and can be derived internally. For example, when the MVP mode and BI prediction are applied to the current block, the flag information indicating whether symmetric MVD is applied (e.g., symmetric MVD flag information or sym_mvd_flag syntax element) can be signaled, and when the value of the flag information is 1, the decoding device can determine that symmetric MVD is applied to the current block.

[0188] When applying the symmetric MVD mode (i.e., the value of the symmetric MVD flag information is 1), the information about mvp_l0_flag, mvp_l1_flag, and MVDL0 can be explicitly signaled, and as described above, the signaling of the information about refidxL0, the information about refidxL1, and the information about MVDL1 can be omitted and internally derived. For example, refidxL0 can be derived as an index that indicates the previous reference picture closest to the current picture in the reference picture list 0 (which can be referred to as list 0 or L0) in POC order. refidxL1 can be derived as an index that indicates the next reference picture closest to the current picture in the reference picture list 1 (which can be referred to as list 1 or L1) in POC order. Or, for example, both refidxL0 and refidxL1 can be derived as 0. Or, for example, refidxL0 and refidxL1 can be derived as the smallest indices having the same POC difference as the relationship with the current picture. Specifically, for example, when [POC of the current picture] - [POC of the first reference picture indicated by refidxL0] is the first POC difference and [POC of the current picture] - [POC of the second reference picture indicated by refidxL1] is the 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 can be derived as the value of refidxL0 of the current block, and the value of refidxL1 indicating the second reference picture can be derived as the value of refidxL1 of the current block. Additionally, for example, when there are multiple sets with the same first POC difference and second POC difference, the refidxL0 and refidxL1 of the set with the smallest difference can be derived as the refidxL0 and refidxL1 of the current block.

[0189] Refer to Figure 7 , reference picture list 0, reference picture list 1, and MVDL0 and MVDL1 are shown. Here, MVDL1 is symmetric with MVDL0.

[0190] MVDL1 can be derived as negative (-) MVDL0. For example, the final (improved or modified) motion information (motion vector; MV) for the current block can be derived based on the following equation.

[0191] [Equation 1]

[0192]

[0193] In Equation 1, mvx0 and mvy0 can represent the x and y components of the L0 motion information or motion vectors for L0 prediction, and mvx1 and mvy1 can represent the x and y components of the L1 motion information or motion vectors for L1 prediction. Additionally, mvpx0 and mvpy0 can represent the x and y components of the motion vector predictor for L0 prediction, and mvpx1 and mvpy1 can represent the x and y components of the motion vector predictor for L1 prediction. Moreover, mvdx0 and mvdy0 can represent the x and y components of the motion vector difference.

[0194] Meanwhile, the MMVD mode is a method of applying the motion vector difference (MVD) to the merge mode and can implicitly derive the motion information directly used to generate the prediction samples for the current block (i.e., the current CU). For example, an MMVD flag (i.e., mmvd_flag) indicating whether MMVD is used for the current block (i.e., the current CU) can be signaled, and MMVD can be performed based on this MMVD flag. When MMVD is applied to the current block (i.e., when mmvd_flag is 1), additional information about MMVD can be signaled.

[0195] Here, the additional information about MMVD includes a merge candidate flag (i.e., mmvd_cand_flag) indicating whether the first candidate or the second candidate in the merge candidate list is used together with the MVD, a distance index (i.e., mmvd_distance_idx) for indicating the motion amplitude, and a direction index (i.e., mmvd_direction_idx) for indicating the motion direction.

[0196] In the MMVD mode, two candidates (i.e., the first candidate or the second candidate) among the candidates located in the merge candidate list can be used, and two candidates (i.e., the first candidate or the second candidate) can be used. One of them can be used as the base MV. For example, a merge candidate flag (i.e., mmvd_cand_flag) can be signaled to indicate either of the two candidates (i.e., the first candidate or the second candidate) in the merge candidate list.

[0197] Furthermore, the distance index (i.e., mmvd_distance_idx) specifies the motion amplitude information and indicates a predefined offset from the starting point. The offset can be added to the horizontal or vertical component of the starting MV. The following table specifies the relationship between the distance index and the predefined offset.

[0198] [Table 5]

[0199]

[0200] Refer to Table 5 above. Determine the distance of the MVD (i.e., MmvdDistance) according to the value of the distance index (i.e., mmvd_distance_idx), and the distance of the MVD (i.e., MmvdDistance) can be derived by using integer sample accuracy or fractional sample accuracy based on the value of tile_group_fpel_mmvd_enabled_flag. For example, when tile_group_fpel_mmvd_enabled_flag is equal to 1, it indicates that the distance of the MVD is derived by using the integer sample accuracy in the current tile group (or picture header), and when tile_group_fpel_mmvd_enabled_flag is equal to 0, it indicates that the distance of the MVD is derived by using the fractional sample accuracy in the tile group (or picture header). In Table 1, the information (flags) of the tile group can be replaced with the information of 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).

[0201] In addition, the direction index (i.e., mmvd_direction_idx) indicates the direction of the MVD relative to the starting point and can indicate the four directions as shown in Table 6 below. In this case, the direction of the MVD can indicate the sign of the MVD. The relationship between the direction index and the MVD sign can be expressed as the following table.

[0202] [Table 6]

[0203] mmvd_direction_idx[x0][y0] MmvdSign[x0][y0][0] MmvdSign[x0][y0][1] 0 +1 0 1 -1 0 2 0 +1 3 0 -1

[0204] Refer to Table 6. The sign of the MVD (i.e., MmvdSign) is determined according to the value of the direction index (i.e., mmvd_direction_idx), and the sign of the MVD (i.e., MmvdSign) can be derived for the L0 reference picture and the L1 reference picture.

[0205] Based on the above distance index (i.e., mmvd_distance_idx) and direction index (i.e., mmvd_direction_idx), the following equation can be used to calculate the offset of the MVD.

[0206] [Equation 2]

[0207] MmvdOffset[x0][y0][1] = (MmvdDistance[x0][y0] << 2) * MmvdSign[x0][y0][0]

[0208] [Equation 3]

[0209] MmvdOffset[x0][y0][1] = (MmvdDistance[x0][y0] << ) * MmvdSign[x0][y0][1] In Equations 2 and 3, the MMVD distance (MmvdDistance[x0][y0]) and the MMVD signs (MmvdSign[x0][y0][0], MmvdSign[x0][y0][1]) can be 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 the merge candidates in the merge candidate list derived based on neighboring blocks, and the selected merge candidate is used as the base candidate (i.e., MVP). Additionally, the motion information (i.e., motion vector) of the current block can be derived by adding the MVDs derived based on the base candidate using a distance index (e.g., mmvd_distance_idx) and a direction index (i.e., mmvd_direction_idx).

[0210] The predicted block of the current block can be derived based on the motion information derived according to the prediction mode. The predicted block can include the predicted samples (predicted sample array) of the current block. When the motion vector of the current block indicates a fractional sample unit, an interpolation process can be performed, through which the predicted samples of the current block can be derived based on the reference samples in the reference picture in units of fractional samples. When dual prediction is applied, the predicted samples derived by weighting or weighted averaging (according to the phase) of the predicted samples derived based on L0 prediction (i.e., prediction using the reference picture in reference picture list L0 and MVL0) and the predicted samples derived based on L1 prediction (i.e., prediction using the reference picture in reference picture list L1 and MVL1) can be used as the predicted samples of the current block. When dual prediction is applied, if the reference picture used for L0 prediction and the reference picture used for L1 prediction are in different temporal directions with respect to the current picture (i.e., dual prediction and bidirectional prediction), it can be referred to as true dual prediction.

[0211] As described above, the reconstructed samples and the reconstructed picture can be generated based on the derived predicted samples, and then processes such as in-loop filtering can be performed.

[0212] As described above, according to this document, when dual prediction is applied to the current block, the predicted sample can be derived based on weighted average. Generally, the dual prediction signal (i.e., the dual prediction sample) can be derived by a simple average of the L0 prediction signal (L0 prediction sample) and the L1 prediction signal (L1 prediction sample). That is, the dual prediction sample is derived as the average of the L0 prediction sample based on the L0 reference picture and MVL0 and the L1 prediction sample based on the L1 reference picture and MVL1. However, according to this document, when dual prediction is applied, the dual prediction signal (dual prediction sample) can be derived by the weighted average of the L0 prediction signal and the L1 prediction signal as follows.

[0213] In the above-described MMVD-related embodiments, a method of considering long-term reference pictures in the MVD derivation process of MMVD can be proposed, so as to maintain and increase the compression efficiency in various applications. In addition, in addition to the MMVD technology used in MERGE, the method proposed in the embodiments of this document can be similarly applied to SMVD, which is a symmetric MVD technology used in the inter-frame mode (MVP mode).

[0214] Figure 8 is a diagram for describing a method of deriving a motion vector in inter-frame prediction.

[0215] In the embodiments of this document, an MV derivation method considering long-term reference pictures is used in the motion vector scaling process of temporal motion candidates (temporal motion candidates, temporal merge candidates, or temporal mvp candidates). The temporal motion candidate can correspond to mvCol (mvLXCol). The temporal motion candidate can be referred to as TMVP.

[0216] The following table describes the definition of long-term reference pictures.

[0217] [Table 7]

[0218]

[0219] Referring to the above Figure 7 , if LongTermRefPic(aPic, aPb, refIdx, LX) is equal to 1 (true), the corresponding reference picture can be marked as being used for long-term reference. For example, a reference picture not marked as being used for long-term reference can be a reference picture marked as being used for short-term reference. In another example, a reference picture not marked as being used for long-term reference and not marked as not being used can be a reference picture marked as being used for short-term reference. Hereinafter, a reference picture marked as being used for long-term reference can be referred to as a long-term reference picture, and a reference picture marked as being used for short-term reference can be referred to as a short-term reference picture.

[0220] The following table describes the derivation of TMVP (mvLXCol).

[0221] [Table 8]

[0222]

[0223] Refer to Figure 8 and Table 8. When the type of the reference image pointed to by the current picture (e.g., indicating whether it is a long-term reference picture (LTRP) or a short-term reference picture (STRP)) is not equal to the type of the collocated reference picture pointed to by the collocated picture, the temporal motion vector mvLXCol is not used. That is, when all of these are long-term reference pictures or short-term reference pictures, the colMV is derived; otherwise, the colMV is not derived. Additionally, in the case where all of these are long-term reference pictures, and when the POC difference between the current picture and the reference picture of the current picture is the same as the POC difference between the collocated picture and the reference picture of the collocated picture, the collocated motion vector can be used as it is without scaling. If it is a short-term reference picture and the POC differences are different, the motion vector of the collocated block is used after scaling.

[0224] In the embodiments of this document, the MMVD used in the MERGE / SKIP mode signals the basic motion vector index (basic MV index), distance index, and direction index for one coding block as the information for deriving the MVD information. In the case of uni-directional prediction, the MVD is derived from the motion information, and in the case of bi-directional prediction, the symmetric MVD information is generated using mirroring and scaling methods.

[0225] In the case of bi-directional prediction, the MVD information for L0 or L1 is scaled to generate the MVD for L1 or L0. However, when referring to a long-term reference picture, it needs to be modified during the MVD derivation process.

[0226] Figures 9 to 13 Shows the MVD derivation method of the MMVD according to the embodiments of this document. Figures 9 to 13 The method shown can be used for blocks applying bi-directional prediction.

[0227] In one embodiment according to Figure 9 when the distances to the L0 reference picture and the L1 reference picture are the same, the derived MmvdOffset can be used as the MVD as it is, and when the POC differences (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) are different, the MVD can be derived according to the POC differences and whether it is a long-term or short-term reference picture by scaling or simple mirroring (i.e., -1*MmvdOffset).

[0228] In one example, a method of using MMVD to derive a symmetric MVD for a block to which dual prediction is applied is not suitable for a block using a long-term reference picture. It is difficult to expect performance improvement. Therefore, in the following drawings and embodiments, an example in which MMVD is not applied when the reference picture types of L0 and L1 are different is introduced.

[0229] In one embodiment according to Figure 10 , depending on whether the reference picture referred to by the current picture (or current slice, current block) is a long-term reference picture (LTRP) or a short-term reference picture (STRP), the method for deriving the MVD can be different. In one example, when applying the method of the embodiment according to Figure 10 , a part of the standard document according to this embodiment can be described as shown in the following table.

[0230] [Table 9]

[0231]

[0232]

[0233]

[0234] In one embodiment according to Figure 11 , depending on whether the reference picture referred to by the current picture (or current slice, current block) is a long-term reference picture (LTRP) or a short-term reference picture (STRP), the method for deriving the MVD can be different. In one example, when applying the method of the embodiment according to Figure 11 , a part of the standard document according to this embodiment can be described as shown in the following table.

[0235] [Table 10]

[0236]

[0237]

[0238]

[0239]

[0240]

[0241] In summary, the MVD derivation process of MMVD that does not derive the MVD when the reference picture types in each direction are different has been described.

[0242] In one embodiment according to Figure 12In one embodiment, the MVD may not be derived in all cases where long-term reference pictures are referenced. That is, when 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 only be derived when short-term reference pictures are included.

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

[0244] [Table 11]

[0245]

[0246]

[0247]

[0248]

[0249] In accordance with Figure 13 the embodiment, when the reference picture types in each direction are different, the MVD is derived when a short-term reference picture is obtained, and the MVD is derived as 0 when a long-term reference picture is included.

[0250] In one example, when the reference picture types in each direction are different, MmvdOffset is applied when referencing a reference picture (short-term reference picture) close to the current picture, and the MVD has a value of 0 when referencing a reference picture (long-term reference picture) far from the current picture. In this case, a picture close to the current picture can be regarded as having a short-term reference picture, but when the close picture is a long-term reference picture, mmvdOffset can be applied to the motion vectors of the list indicating the short-term reference pictures.

[0251] [Table 12]

[0252]

[0253] For example, the four paragraphs included in Table 12 can sequentially replace the bottom block (content) of the flowchart included in Figure 13 .

[0254] In one example, when applying the method according to Figure 13 the embodiment, a part of the standard document according to this embodiment can be described as shown in the following table.

[0255] [Table 13]

[0256]

[0257]

[0258]

[0259]

[0260] The following table shows a comparison table between the examples included in this document.

[0261] [Table 14]

[0262]

[0263] Referring to Table 14, a comparison is shown between methods of applying an offset to a reference picture type for MVD derivation of MMVD described in the embodiments according to Figures 9 to 13 . In Table 14, Embodiment A may relate to existing MMVD, Embodiment B may show an embodiment according to Figures 9 to 11 , Embodiment C may show an embodiment according to Figure 12 , and Embodiment D may show an embodiment according to Figure 13 .

[0264] That is, in the embodiments according to Figure 9 , Figure 10 and Figure 11 , a method of deriving an MVD only when the reference picture types in two directions are the same has been described, and in the embodiment according to Figure 12 , a method of deriving an MVD only when the reference picture types in two directions are the same has been described. In the case of the embodiment according to Figure 12 , in the case of a long-term reference picture for unidirectional prediction, the MVD may be set to 0. Additionally, in the embodiment according to Figure 13 , a method of deriving an MVD in only one direction when the reference picture types in two directions are different has been described. The differences between the embodiments represent various features of the technology described in this document, and those of ordinary skill in the art can understand that the effects that will be achieved according to the embodiments of this document can be realized based on these features.

[0265] In an embodiment according to this document, when the reference picture type is a long-term reference picture, separate processing is performed. When a long-term reference picture is included, scaling or mirroring based on the POC difference (POCDiff) does not affect performance improvement. Therefore, the MmvdOffset value is assigned to the MVD in the direction of the short-term reference picture, and the value 0 is assigned to the MVD in the direction of the long-term reference picture. In one example, when this embodiment is applied, a part of the standard document conforming to this embodiment can be described as shown in the following table.

[0266] [Table 15]

[0267]

[0268]

[0269]

[0270]

[0271] In another example, a part of Table 15 can be replaced with the following table. Referring to Table 16, the offset can be applied based on the reference picture type other than POCDiff.

[0272] [Table 16]

[0273]

[0274] In another example, a part of Table 15 can be replaced with the following table. Referring to Table 17, MmvdOffset can always be set to L0, and MmvdOffset can be set to L1 regardless of the reference picture type.

[0275] [Table 17]

[0276]

[0277]

[0278] According to the embodiments of this document, the SMVD in the inter-frame mode can be performed similarly to the MMVD used in the above MERGE mode. In the case of bi-directional prediction, it is signaled from the encoding device to the decoding device whether the symmetric MVD is derived, and when the relevant flag (e.g., sym_mvd_flag) is true (or has a value of 1), the second direction MVD (i.e., MVDL1) is derived by mirroring the first direction MVD (e.g., MVDL0). In this case, scaling of the first direction MVD may not be performed.

[0279] The following table shows the syntax of the coding unit according to the embodiments of this document.

[0280] [Table 18]

[0281]

[0282] [Table 19]

[0283]

[0284] Referring to Tables 18 and 19, when inter_pred_idc == PRED_BI and the reference pictures of L0 and L1 are available (e.g., RefIdxSymL0 > -1 && RefIdxSymL1 > -1), sym_mvd_flag is signaled.

[0285] The following table shows the decoding process of the MMVD reference index according to the example.

[0286] [Table 20]

[0287]

[0288]

[0289] Referring to Table 20, the process for deriving the availability of the reference pictures of L0 and L1 is described. That is, if there is a forward reference picture in the L0 reference picture, the index of the reference picture closest to the current picture is set to RefIdxSymL0, and the corresponding value is set to the reference index of L0. In addition, when there is a backward reference picture in the L1 reference picture, the index of the reference picture closest to the current picture is set to RefIdxSymL1, and the corresponding value is set to the reference index of L1.

[0290] The following Table 21 shows the decoding process of the MMVD reference index according to another example.

[0291] [Table 21]

[0292]

[0293]

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

[0295] In an embodiment of this document, SMVD can be applied in an intermediate mode similar to MMVD used in the merge mode. When using a long-term reference picture as in the embodiment described in Figure 12 , the long-term reference picture can be excluded from the reference index derivation process for SMVD as shown in the following table to prevent SMVD.

[0296] [Table 22]

[0297]

[0298]

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

[0300] [Table 23]

[0301]

[0302]

[0303]

[0304] In an embodiment of this document, during the colMV derivation process of TMVP, when the reference picture type of the current picture and the reference picture type of the collocated picture are different, the motion vector MV is set to 0. However, the derivation methods in the cases of MMVD and SMVD are different from TMVP and they need to be unified.

[0305] Even when the reference picture type of the current picture is a long-term reference picture and the reference picture type of the collocated picture is a long-term reference picture, the motion vector uses the value of the collocated motion vector as it is. However, in MMVD and SMVD, MV can be set to 0. In this case, TMVP also sets MV to 0 without additional induction.

[0306] In addition, even if the reference picture types are different, there can be a long-term reference picture that is close to the current picture. Therefore, instead of setting MV to 0, colMV can be used as MV without scaling.

[0307] Figure 14 is a diagram for describing symmetric motion vector difference (SMVD) according to an embodiment of the present disclosure.

[0308] As Figure 14The method shown can be used to derive the SMVD. In other words, the SMVD can be derived based on the short-term reference picture (STRP) and / or the long-term reference picture (LTRP). If different types of reference pictures are used when using the mirrored L0MVD as the L1MVD, an inaccurate MVD may be derived. This is because the distance ratio (the distance between reference picture 0 and the current picture and the distance between reference picture 1 and the current picture) increases, and the correlation between motion vectors in different directions decreases.

[0309] According to one embodiment of the present disclosure, the availability of the reference picture is checked, and if the condition is satisfied, the sym_mvd_flag can be parsed. If the sym_mvd_flag is true, the MVD of L1 (MVDL1) can be derived as the mirrored MVDL0 (the MVD of L0).

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

[0311] [Table 24]

[0312]

[0313] The process for deriving the sym_mvd_flag according to this embodiment can be described based on Table 24.

[0314] In this embodiment, the reference picture index for the SMVD (RefIdxSymLX, where X = 0, 1) can be derived. RefIdxSymL0 can represent the index of the closest reference picture having a POC smaller than the POC of the current picture. RefIdxSymL1 can represent the index of the closest reference picture having a POC larger than the POC of the current picture.

[0315] The following table describes the method for deriving the reference picture index for the SMVD according to this embodiment in the form of a standard document.

[0316] [Table 25]

[0317]

[0318] The following table shows the comparison results between the embodiments. By considering the reference picture types according to the embodiments included in Table 26, the MVD accuracy of the SMVD can be improved. In Table 26, MVD can represent MVD 0 (the MVD of L0).

[0319] [Table 26]

[0320]

[0321] Referring to Table 26, Embodiment P describes an existing method for deriving SMVD. In Embodiment Q, when a mixed reference picture type (e.g., STRP / LTRP or LTRP / STRP) is used in L0 and L1, SMVD can be restricted. In Embodiment R, when referring to a long-term reference picture (LTRP), SMVD can be restricted.

[0322] The following table describes, in the form of a standard document, a method for deriving a reference picture index for SMVD according to Embodiment Q of Table 26.

[0323] [Table 27]

[0324]

[0325] The following table describes, in the form of a standard document, a method for deriving a reference picture index for SMVD according to Embodiment Q of Table 26.

[0326] [Table 28]

[0327]

[0328] [Table 29]

[0329]

[0330]

[0331] Referring to Table 28 and / or Table 29, when referring to a long-term reference picture (LTRP), SMVD can be restricted. For example, referring to Table 28, long-term reference pictures can be excluded from the reference picture checking process. Therefore, for SMVD, other reference pictures (e.g., instead of long-term reference pictures) can be considered. Referring to Table 29, when the reference picture closest to the current picture is a long-term reference picture, SMVD may not be performed. For example, even if short-term reference pictures are included in the reference picture list, when the reference picture closest to the current picture is a long-term reference picture, SMVD may not be performed.

[0332] In an example according to an embodiment of the present disclosure, when the POC distance of L0 is greater than or equal to the POC of L1 during the MMVD process, L1MVD can be derived as a scaled or mirrored L0MVD. When the POC distance of L0 is less than the POC of L1 during the MMVD process, L0MVD can be derived as a scaled or mirrored L1MVD during the MMVD process.

[0333] Figure 15 is a flowchart illustrating a method for deriving MMVD according to an embodiment of the present disclosure.

[0334] In one embodiment of the present disclosure, the MVD may be derived from the MMVD by considering the POC difference and / or the reference picture type. Refer to Figure 15 , currPocDiffLX may represent the difference between the POC of the current picture and the POC of the reference picture LX. currPocDiffL0 and currPocDiffL1 may be compared with each other, and the type of the reference picture ("refPicList0 != LTRP" or "refPicList1 != LTRP") may be checked. Considering the conditions, the MmvdOffset (derived using mmvd_cand_flag, mmvd_distance_idx, and / or mmvd_direction_idx) may be assigned the same value as mMvdLX, the mirrored or scaled value of mMvdLX.

[0335] The following table shows a part of the standard document according to this embodiment.

[0336] [Table 30]

[0337]

[0338]

[0339] When the current picture references one or more long-term reference pictures (LTRPs), the mirroring process of the POC distance may not need to be considered. This is because the mirrored MVD obtained from a reference picture at a much farther distance than other MVDs is ineffective in terms of accuracy. A method for solving the above problem will be described below.

[0340] The following table shows the comparison results between embodiments.

[0341] [Table 31]

[0342]

[0343] Referring to Table 31, Embodiment X shows an existing method for deriving the MMVD. In Embodiment Y, when the current block references one or more long-term reference pictures, the MMVD process may be restricted. In other words, the process of comparing the POC distances of the long-term reference pictures may be omitted in Embodiment Y. In Embodiment Z, the process for deriving the MMVD may be restricted for all cases. In other words, the process of comparing the POC distances may be omitted for all cases in Embodiment Z. In Table 29, the offset may refer to the MmvdOffset.

[0344] Figure 16 is a flowchart illustrating a method for deriving the MMVD according to an embodiment of the present disclosure.Figure 16 The flowchart of Figure 16 can describe the method for deriving MMVD according to the above-described Embodiment Y.

[0345] Referring to Figure 16 , when the reference picture type is a long-term reference picture, the condition for comparing the POC difference can be removed, and the anchor MVD for the mirroring process can be fixed to the L0MVD.

[0346] The following table describes, in the form of a standard document, the method for deriving MMVD according to Embodiment Y of Table 31.

[0347] [Table 32]

[0348]

[0349]

[0350] Figure 17 is a flowchart illustrating the method for deriving MMVD according to an embodiment of the present disclosure. Figure 17 The flowchart of Figure 17 can describe the method for deriving MMVD according to the above-described Embodiment Z.

[0351] Referring to Figure 17 , for all cases, the process for deriving MMVD can be restricted. For all cases, the condition for comparing the POC difference can be removed, and the anchor MVD for the mirroring or scaling process can be fixed to the L0MVD.

[0352] The following table describes, in the form of a standard document, the method for deriving MMVD according to Embodiment Z of Table 31.

[0353] [Table 33]

[0354]

[0355]

[0356] In addition, in an example of the present embodiment, the condition for comparing the POC difference can be removed for all cases, and only the mirroring process can be used. The following table describes, in the form of a standard document, the method for deriving MMVD according to the present embodiment.

[0357] [Table 34]

[0358]

[0359] The following drawings are created to explain specific examples of this specification. Since the names of specific devices or the names of specific signals / messages / fields described in the drawings are presented by way of example, the technical features of this specification are not limited to the specific names used in the following drawings.

[0360] Figure 18 and Figure 19 illustrates an example of a video / image encoding method and related components according to an embodiment of the present disclosure. Figure 2 The encoding device of can execute Figure 18 the method of. Specifically, for example, the predictor 220 of the encoding device can execute Figure 18 steps S1800 to S1850 of, and the residual processor 230 of the encoding device can execute step S1860. The entropy encoder 240 of the encoding device can execute step S1870. Figure 18 The method of can include the above embodiments of the present disclosure.

[0361] Referring to Figure 18 , the encoding device derives the inter prediction mode S1800 of the current block within the current picture. Here, the inter prediction mode can include the merge mode, the AMVP mode (a mode using motion vector predictor candidates), MMVD, and SMVD.

[0362] The encoding device can derive the reference pictures for the inter prediction mode. The encoding device can construct a reference picture list for deriving the reference pictures. In one embodiment, the reference picture list can 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 can construct a reference picture list for each slice included in the current picture.

[0363] The encoding device constructs the MVP candidate list S1810 of the current block based on the neighboring blocks of the current block. The MVP candidate list can include MVP candidate list L0 and MVP candidate list L1. In one example, the neighboring blocks can be included in the current picture containing the current block. In another example, the neighboring blocks can be included in the previous (reference) picture or the next (reference) picture of the current picture. Here, the POC of the previous picture can be less than the POC of the current picture, and the POC of the next picture can be greater than the POC of the current picture. According to one example, the POC difference between the current picture and the previous (reference) picture of the current picture can be greater than zero. In another example, the POC difference between the current picture and the next (reference) picture of the current picture can be less than zero. However, the above descriptions are only examples.

[0364] The encoding device may derive the MVP for the current block, i.e., S1820, based on the MVP candidate list. 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 device may derive the best motion vector predictor candidate from among the motion vector predictor candidates included in the MVP candidate list. The encoding device may generate selection information (e.g., an MVP flag or an MVP index) indicating the best motion vector predictor candidate.

[0365] The encoding device generates prediction-related information including an inter prediction mode, i.e., S1830. In one example, the prediction-related information may include information about the motion vector difference (MVD) of the current block. The prediction-related information may include information about the MMVD and information about the SMVD.

[0366] The encoding device derives motion information for predicting the current block based on the information about the MVP and the MVD, i.e., S1840. For example, the motion information may include a reference index (symmetric motion vector difference reference index) of the SMVD. The reference index of the SMVD may indicate the reference picture for SMVD application. The reference index of the SMVD may include a reference index L0 (RefIdxSumL0) and a reference index L1 (RefIdxSumL1).

[0367] The encoding device generates a prediction sample based on the motion information, i.e., S1450. The encoding device may generate a prediction sample based on the motion vector and the reference picture index included in the motion information. For example, a prediction sample may be generated based on the block (or sample) indicated by the motion vector among the blocks (or samples) in the reference picture indicated by the reference picture index.

[0368] The encoding device derives residual information based on the prediction sample, i.e., S1860. Specifically, the encoding device may derive a residual sample based on the prediction sample and the original sample. The encoding device may derive residual information based on the residual sample. A transform and quantization process may be performed to derive the residual information.

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

[0370] According to an embodiment of the present disclosure, the image / video information may include various types of information. For example, the image / video information may include the information disclosed in at least one of Tables 1 to 34 above.

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

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

[0373] In one embodiment, the prediction-related information may include information about the 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 the picture order count (POC) difference between the short-term reference picture and the current picture including the current block, the value of the information about the symmetric motion vector difference may be 1.

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

[0375] 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 difference reference index L0 may indicate the short-term reference picture L0. In addition, the symmetric motion vector difference reference index L1 may indicate the short-term reference picture L1.

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

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

[0378] 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 0 and the current picture and a second POC difference between another short-term reference picture L0 and the current picture. The first POC difference may be less than the second POC difference.

[0379] Figure 20 and Figure 21 An example of an image / video decoding method and related components according to an embodiment of the present disclosure is illustrated. Figure 3 The decoding device of Figure 20 can execute the method of Figure 20 Specifically, for example, the entropy decoder 310 of the decoding device can execute step S2000 of Figure 20 and the predictor 330 of the decoding device can execute steps S2010 to S2050.

[0380] Referring to Figure 20 , the decoding device receives / obtains image / video information S2000. The decoding device can receive / obtain image / video information through a bitstream. The image / video information may include prediction-related information (including prediction mode information), information about MVD, and / or residual information. The prediction-related information may include information about MMVD and information about SMVD. In addition, according to an embodiment of the present disclosure, the image / video information may include various types of information. For example, the image / video information may include the information described with reference to Figures 1 to 17 and / or the information disclosed in at least one of Tables 1 to 34 above.

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

[0382] The decoding device constructs a MVP candidate list S2020 for the current block based on neighboring blocks of the current block. The MVP candidate list may include a MVP candidate list L0 and a MVP candidate list L1. In one example, the neighboring blocks may be included in the current picture containing the current block. In another example, the neighboring blocks may be included in a previous (reference) picture or a next (reference) picture of the current picture. Here, the POC of the previous picture may be less than the POC of the current picture, and the POC of the subsequent picture may be greater than the POC of the current picture. According to one example, the POC difference between the current picture and the previous (reference) picture of the current picture may be greater than 0. In another example, the POC difference between the current picture and the next (reference) picture of the current picture may be less than 0. However, the above descriptions are only examples.

[0383] The decoding device may derive the MVP of 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 device may derive the best motion vector predictor candidate from among the motion vector predictor candidates included in the MVP candidate list. The encoding device may generate selection information (e.g., a MVP flag or a MVP index) indicating the best motion vector predictor candidate.

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

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

[0386] The decoding device may generate a residual sample based on the residual information. Specifically, the decoding device may derive quantization transform coefficients based on the residual information. The quantization transform coefficients may have a one-dimensional vector form based on the coefficient scan order. The decoding device may derive transform coefficients based on an inverse quantization process for the quantization transform coefficients. The decoding device may derive residual samples based on an inverse transform process for the transform coefficients.

[0387] The decoding device may generate a reconstructed sample of the current picture based on a prediction sample and a residual sample. The decoding device may also perform a filtering process to generate a (modified) reconstructed sample.

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

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

[0390] In one embodiment, the prediction-related information may include information about the symmetric motion vector difference (information about SMVD or SMVD flag information). For example, when 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 the POC difference between the short-term reference picture and the current picture including the current block.

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

[0392] 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 difference reference index L0 may indicate the short-term reference picture L0. In addition, the symmetric motion vector difference reference index L1 may indicate the short-term reference picture L1.

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

[0394] In one embodiment, based on the comparison between the POC differences, the symmetric motion vector difference reference index L0 may be derived.

[0395] 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 0 and the current picture and a second POC difference between another short-term reference picture L0 and the current picture. The first POC difference may be less than the second POC difference.

[0396] In one embodiment, the symmetric motion vector difference reference index L0 and the symmetric motion vector difference reference index L1 (e.g., ref_idx_l1[x0][y0], ref_idx_l1[x0][y0]) may not be signaled directly, but may be derived based on information regarding the symmetric motion vector difference (e.g., sym_mvd_flag).

[0397] In the above embodiment, the method is described based on a flowchart as a series of steps or blocks, but the corresponding embodiment is not limited to this step order. Specific steps may occur in an order different from the above or simultaneously with steps different from the above. Additionally, those skilled in the art will understand that the steps shown in the flowchart are not exclusive and may include other steps or one or more steps in the flowchart may be deleted without affecting the scope of the embodiments of this document.

[0398] The above method according to an embodiment of this document may be implemented in the form of software, and the encoding device and / or decoding device according to this document may be included in a device for performing image processing such as a TV, a computer, a smart phone, a set-top box, a display device, etc.

[0399] When the embodiments in this document are implemented in software, the above methods can be implemented as modules (processes, functions, etc.) for performing the above functions. Such modules can be stored in a memory and executed by a processor. The memory can be located inside or outside the processor and can be coupled to the processor by various well-known means. The processor can include an application-specific integrated circuit (ASIC), other chip sets, logic circuits, and / or data processing devices. The memory can 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 can be implemented and executed on a processor, a microprocessor, a controller, or a chip. For example, the functional units shown in the respective drawings can be implemented and executed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, the information for implementation (e.g., information about instructions) or algorithms can be stored in a digital storage medium.

[0400] In addition, the decoding device and the encoding device to which the embodiments of this document are applied can be included in a multimedia broadcast transmission and reception device, a mobile communication terminal, a home theater video device, a digital cinema video device, a surveillance camera, a video chat device, a real-time communication device (e.g., video communication), a mobile streaming device, a storage medium, a camera, a video-on-demand (VoD) service provider, an over-the-top (OTT) video device, an Internet streaming service provider, a 3D video device, a virtual reality device, an augmented reality (AR) device, a video phone video device, a vehicle terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an aircraft terminal, a ship terminal, etc.), a medical video device, etc., and can be used to process video signals or data signals. For example, an over-the-top video (OTT) device can include a game console, a Blu-ray player, an Internet access TV, a home theater system, a smart phone, a tablet PC, a digital video recorder (DVR), etc.

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

[0402] In addition, the embodiments of this document can be implemented as a computer program product through program code, and the program code can be executed on a computer through the embodiments of this document. The program code can be stored on a carrier readable by a computer.

[0403] Figure 22 An example of a content stream system to which the embodiments disclosed in this document can be applied is shown.

[0404] Refer to Figure 22 , a content stream system to which the embodiments of this document can be applied may mainly include an encoding server, a streaming server, a web server, a media storage device, a user device, and a multimedia input device.

[0405] The encoding server functions to generate a bitstream by compressing the content input from a multimedia input device (e.g., a smart phone, a camera, or a video camera) into digital data and sending the generated bitstream to the streaming server. As another example, if the multimedia input device (e.g., a smart phone, a camera, or a video camera) directly generates a bitstream, the encoding server can be omitted.

[0406] A bitstream can be generated by applying the encoding method or the method of generating a bitstream of the present disclosure, and while sending or receiving the bitstream, the streaming server can temporarily store the bitstream.

[0407] The streaming server functions to send multimedia data to the user device based on a user request through the web server, and the web server functions to inform the user which services are available. If the user requests a desired service from the web server, the web server sends the request to the streaming server, and the streaming server sends the multimedia data to the user. At this time, the content stream system may include a separate control server, and in this case, the control server functions to control commands / responses between the devices within the content stream system.

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

[0409] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation terminals, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches or smart glasses), digital TVs, desktop computers, and digital signage.

[0410] Each individual server within the content flow system can operate as a distributed server, and in such a case, the data received by each server can be processed in a distributed manner.

[0411] The claims described herein can be combined in various ways. For example, the technical features of the method claims in this document can be combined and implemented as a device, and the technical features of the device claims in this document can be combined and implemented as a method. Additionally, the technical features of the method claims in this document and the technical features of the device claims can be combined to be implemented as a device, and the technical features of the method claims in this document and the technical features of the device claims can be combined and implemented as a method.

Claims

1. An image decoding method performed by a decoding device, the image decoding method comprising the following steps: Obtaining image information including prediction-related information and information about a motion vector difference (MVD) from 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 a motion vector (MV) for the current block based on the MVD and the MVP; And Generating a prediction sample for the current block based on motion information including the MV and a symmetric motion vector difference reference index, wherein dual prediction is applied to the current block, wherein the MV includes an MVL0 for L0 prediction and an MVL1 for L1 prediction, wherein the symmetric motion vector difference reference index includes a symmetric motion vector difference reference index L0 for the L0 prediction and a symmetric motion vector difference reference index L1 for the L1 prediction, wherein the information about the MVD includes information about an MVDL0 for the L0 prediction, wherein the MVD includes the MVDL0 for the L0 prediction and an MVDL1 for the L1 prediction, wherein the MVDL0 is derived based on the information about the MVDL0, wherein the MVDL1 is derived based on the MVDL0, wherein the magnitude of the MVDL1 is the same as the magnitude of the MVDL0, and the sign of the MVDL1 is opposite to the sign of the MVDL0, wherein the MVP includes an MVPL0 for the L0 prediction and an MVPL1 for the L1 prediction, wherein the MVL0 is derived based on the sum of the MVDL0 and the MVPL0, wherein the MVL1 is derived based on the sum of the MVDL1 and the MVPL1, wherein 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 a short-term reference picture among reference pictures included in a reference picture list and a current picture including the current block.

2. An image encoding method performed by an encoding device, the image encoding method comprising the following steps: 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, the motion information including a motion vector (MV) and a symmetric motion vector difference reference index; Generating prediction-related information for the current block including information about the inter prediction mode and information about a motion vector difference (MVD); Generating a prediction sample for the current block based on the motion information; Generating residual information based on the prediction sample; And Encoding image information including the prediction-related information and the residual information, Among them, dual prediction is applied to the current block, wherein, the MVP includes MVPL0 for L0 prediction and MVPL1 for L1 prediction, wherein, the MV includes MVL0 for the L0 prediction and MVL1 for the L1 prediction, wherein, the symmetric motion vector difference reference index includes a symmetric motion vector difference reference index L0 for the L0 prediction and a symmetric motion vector difference reference index L1 for the L1 prediction, wherein, the information about the MVD includes information about MVDL0 for the L0 prediction, wherein, the MVDL0 is derived by subtracting the MVPL0 from the MVL0, wherein, MVDL1 is derived by subtracting the MVPL1 from the MVL1, wherein, the magnitude of the MVDL1 is the same as the magnitude of the MVDL0, and the sign of the MVDL1 is opposite to the sign of the MVDL0, and wherein, the symmetric motion vector difference reference index L0 and the symmetric motion vector difference reference index L1 are derived based on the picture order count (POC) difference between the short-term reference picture among the reference pictures included in the reference picture list and the current picture including the current block.

3. A method for transmitting data of an image, the transmitting method comprising the following steps: Obtaining a bitstream for the image, wherein the bitstream is generated based on the following operations: 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, the motion information including a motion vector (MV) and a symmetric motion vector difference reference index; generating prediction-related information for the current block including information about the inter prediction mode and information about a motion vector difference (MVD); generating a prediction sample for the current block based on the motion information; generating residual information based on the prediction sample; and encoding image information including the prediction-related information and the residual information; and Transmitting the data including the bitstream, wherein, dual prediction is applied to the current block, wherein, the MVP includes MVPL0 for L0 prediction and MVPL1 for L1 prediction, wherein, the MV includes MVL0 for the L0 prediction and MVL1 for the L1 prediction, wherein, the symmetric motion vector difference reference index includes a symmetric motion vector difference reference index L0 for the L0 prediction and a symmetric motion vector difference reference index L1 for the L1 prediction, wherein, the information about the MVD includes information about MVDL0 for the L0 prediction, wherein, the MVDL0 is derived by subtracting the MVPL0 from the MVL0, wherein, MVDL1 is derived by subtracting the MVPL1 from the MVL1, wherein, the size of the MVDL1 is the same as the size of the MVDL0, and the sign of the MVDL1 is opposite to the sign of the MVDL0, and wherein, the symmetric motion vector difference reference index L0 and the symmetric motion vector difference reference index L1 are derived based on the picture order count (POC) difference between a short-term reference picture among the reference pictures included in a reference picture list and the current picture including the current block.