Video decoding method and apparatus for deriving prediction samples based on default merge mode

The video decoding method addresses the need for efficient image/video compression by applying a regular merge mode as the default when other modes are unavailable, improving coding efficiency through efficient inter prediction.

JP7719728B2Active Publication Date: 2025-08-06LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2021576156
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-06-19
Filing Date
2020-06-19
Publication Date
2025-08-06
Estimated Expiration
2040-06-19

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality images/videos, as well as immersive media, has led to a need for highly efficient image/video compression technologies to reduce transmission and storage costs.

Method used

A video decoding method that applies a regular merge mode as the default merge mode when other modes like MMVD, merge subblock mode, CIIP, or partitioning mode are unavailable, using merge index information to derive motion information for efficient inter prediction.

Benefits of technology

This approach improves the overall efficiency of image/video compression by enabling efficient inter prediction even when other modes are not selectable, thereby enhancing coding efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007719728000032
    Figure 0007719728000032
  • Figure 0007719728000033
    Figure 0007719728000033
  • Figure 0007719728000034
    Figure 0007719728000034
Patent Text Reader

Abstract

According to the disclosure of this document, when a merge mode cannot be finally selected for a current block, a default merge mode can be applied to efficiently perform inter prediction.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present technology relates to a video decoding method and apparatus for deriving prediction samples based on a default merge mode. [Background technology]

[0002] In recent years, demand for high-resolution, high-quality images / videos, such as 4K or 8K or higher UHD (Ultra High Definition) images / videos, has been increasing in various fields. As the resolution and quality of image / video data increases, the amount of information or bits to be transmitted increases relatively compared to existing image / video data. Therefore, when transmitting image data using existing media such as wired or wireless broadband lines or storing image / video data using existing storage media, transmission costs and storage costs increase.

[0003] In addition, interest in and demand for immersive media such as VR (Virtual Reality), AR (Artificial Reality) content, and holograms have been increasing in recent years, and the broadcast of images / videos with different image characteristics from real images, such as game images, has been increasing.

[0004] Therefore, there is a demand for highly efficient image / video compression technology to effectively compress and transmit, store, and play back high-resolution, high-quality image / video information that has the various characteristics described above. Summary of the Invention [Problem to be solved by the invention]

[0005] The technical problem of this document is to provide a method and apparatus for increasing video coding efficiency.

[0006] Another technical problem of this document is to provide a method and apparatus for deriving prediction samples based on a default merge mode.

[0007] Yet another technical problem of this document is to provide a method and apparatus for deriving prediction samples by applying a regular merge mode as the default merge mode. [Means for solving the problem]

[0008] According to an embodiment of the present document, there is provided a video decoding method performed by a decoding device, the method including: receiving video information including inter-prediction mode information via a bitstream; determining a prediction mode of a current block based on the inter-prediction mode information; generating predicted samples by performing inter-prediction on the current block based on the prediction mode; and generating reconstructed samples based on the predicted samples, wherein a regular merge mode is applied to the current block when a merge subblock mode, a merge mode with motion vector difference (MMVD) mode, a combined inter-picture merge and intra-picture prediction (CIIP) mode, or a partitioning mode that divides the current block into two partitions for prediction is unavailable; the inter-prediction mode information includes merge index information that points to one merge candidate among merge candidates included in a merge candidate list of the current block; deriving motion information of the current block based on the candidate pointed to by the merge index information; and generating the predicted samples based on the motion information.

[0009] According to another embodiment of the present document, there is provided a video encoding method performed by an encoding apparatus, the method including: determining an inter prediction mode of a current block and generating inter prediction mode information indicating the inter prediction mode; performing inter prediction on the current block based on the inter prediction mode to generate predicted samples; and encoding video information including the inter prediction mode information, wherein a regular merge mode is applied to the current block when an MMVD mode (merge mode with motion vector difference), a merge subblock mode, a CIIP mode (combined inter-picture merge and intra-picture prediction mode), and a partitioning mode that divides the current block into two partitions for prediction are not available, and the inter prediction mode information includes merge index information that points to one of merge candidates included in a merge candidate list of the current block.

[0010] According to yet another embodiment of the present document, there is provided a computer-readable digital storage medium storing a bitstream containing video information for causing a decoding device to perform a video decoding method, the video decoding method including the steps of: acquiring video information including inter-prediction mode information through the bitstream; determining a prediction mode of a current block based on the inter-prediction mode information; generating predicted samples by performing inter-prediction on the current block based on the prediction mode; and generating reconstructed samples based on the predicted samples, wherein a regular merge mode is applied to the current block when a merge subblock mode, a merge mode with motion vector difference (MMVD) mode, a combined inter-picture merge and intra-picture prediction (CIIP) mode, or a partitioning mode for performing prediction by dividing the current block into two partitions is unavailable; the inter-prediction mode information includes merge index information indicating one of merge candidates included in a merge candidate list of the current block; deriving motion information of the current block based on the candidate indicated by the merge index information; and generating the predicted samples based on the motion information. [Effects of the Invention]

[0011] According to this document, it is possible to improve the overall efficiency of image / video compression.

[0012] According to this document, when a merge mode cannot be finally selected, a default merge mode is applied, thereby enabling efficient inter prediction.

[0013] According to this document, when a merge mode cannot be selected ultimately, the regular merge mode is applied, and motion information is derived based on the candidate indicated by the merge index information, thereby enabling efficient inter prediction. [Brief explanation of the drawings]

[0014] [Figure 1] 1 illustrates schematically an example of a video / image coding system to which embodiments of the present document can be applied. [Figure 2] 1 is a diagram illustrating the configuration of a video / image encoding device to which the embodiments of this document can be applied. [Figure 3] 1 is a diagram illustrating the configuration of a video / image decoding device to which an embodiment of the present document can be applied. [Figure 4] FIG. 10 is a diagram illustrating a merge mode in inter prediction. [Figure 5] FIG. 10 is a diagram illustrating an MMVD mode (merge mode with motion vector difference mode) in inter prediction. [Figure 6a] 1 illustrates an exemplary CPMV for affine motion prediction. [Figure 6b] 1 illustrates an exemplary CPMV for affine motion prediction. [Figure 7] A case where the affine MVF is determined in units of sub-blocks will be illustrated as an example. [Figure 8] FIG. 10 is a diagram illustrating an affine merge mode or a sub-block merge mode in inter prediction. [Figure 9] FIG. 10 is a diagram illustrating the positions of candidates in affine merge mode or sub-block merge mode. [Figure 10] FIG. 10 is a diagram illustrating SbTMVP in inter prediction. [Figure 11]FIG. 1 is a diagram illustrating a combined inter-picture merge and intra-picture prediction mode (CIIP mode) in inter prediction. [Figure 12] FIG. 10 is a diagram for explaining a partitioning mode in inter prediction. [Figure 13] 1 illustrates an example of a video / image encoding method and associated components according to embodiment(s) of the present document; [Figure 14] 1 illustrates an example of a video / image encoding method and associated components according to embodiment(s) of the present document; [Figure 15] 1 illustrates an example of a schematic representation of a picture / video decoding method and associated components according to embodiment(s) of the present document; [Figure 16] 1 illustrates an example of a schematic representation of a picture / video decoding method and associated components according to embodiment(s) of the present document; [Figure 17] An example of a content streaming system to which the embodiments disclosed herein can be applied is shown. DETAILED DESCRIPTION OF THE INVENTION

[0015] The present disclosure may be modified in various ways and may have various embodiments. Specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit the disclosure to the specific embodiments. Common terms used in this document are used merely to describe specific embodiments and are not intended to limit the technical ideas of the present disclosure. The singular expressions include the plural expressions unless the context clearly dictates otherwise. In this specification, the terms "comprise" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0016] Meanwhile, each component in the drawings described in this disclosure is illustrated independently for the convenience of explaining different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components may be combined to form a single component, or a single component may be divided into multiple components. Embodiments in which each component is integrated and / or separated are also within the scope of the present disclosure as long as they do not deviate from the essence of this document.

[0017] As used herein, "A or B" can mean "A only," "B only," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B, or C" can mean "A only," "B only," "C only," or "any combination of A, B, and C."

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

[0019] As used herein, "at least one of A and B" can mean "A only," "B only," or "both A and B." Furthermore, as used herein, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted in the same way as "at least one of A and B."

[0020] Furthermore, in this specification, "at least one of A, B, and C" can mean "A only," "B only," "C only," or "any combination of A, B, and C." Furthermore, "at least one of A, B, or C" or "at least one of A, B, and / or C" can mean "at least one of A, B, and C."

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

[0022] Technical features individually described in one drawing in this specification can be realized individually or simultaneously.

[0023] Hereinafter, preferred embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used to refer to the same components in the drawings, and redundant descriptions of the same components may be omitted.

[0024] FIG. 1 illustrates schematically an example of a video / image coding system to which the present disclosure may be applied.

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

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

[0027] A video source can acquire video / images through a video / image capture, synthesis, or generation process. A video source can include a video / image capture device and / or a video / image generation device. A video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated via a computer, etc., in which case the video / image capture process can be replaced with a process in which related data is generated.

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

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

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

[0031] The renderer can render the decoded video / image, and the rendered video / image can be displayed via the display unit.

[0032] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation audio video coding standard (AVS2), or the next generation video / image coding standard (e.g., H.267 or H.268).

[0033] This document presents various embodiments relating to video / image coding, which, unless otherwise stated, may also be implemented in combination with one another.

[0034] In this document, video can refer to a collection of a series of images over time. A picture generally refers to a unit that shows one image at a specific time, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile can include one or more coding tree units (CTUs). One picture can consist of one or more slices / tiles.

[0035] A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set. The tile row is a rectangular region of CTUs having a width specified by syntax elements in the picture parameter set and a height equal to the height of the picture.A tile scan may represent a specific sequential ordering of CTUs partitioning a picture, where the CTUs are ordered consecutively in a CTU raster scan in a tile, whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice may include multiple complete tiles or multiple consecutive CTU rows in one tile of a picture, which may be included in one NAL unit. In this document, the terms tile group and slice may be used interchangeably. For example, in this document, tile group / tile group header may be referred to as slice / slice header.

[0036] On the other hand, a picture can be divided into two or more sub-pictures, each of which can be a rectangular region of one or more slices within a picture.

[0037] A pixel or a pel may refer to the smallest unit constituting a picture (or an image). A "sample" may also be used as a term corresponding to a pixel. A sample may generally refer to a pixel or a pixel value, or may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. Alternatively, a sample may refer to a pixel value in the spatial domain, or, when such a pixel value is transformed into the frequency domain, may refer to a transform coefficient in the frequency domain.

[0038] A unit may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to that region. One unit may include one luma block and two chroma (e.g., cb, cr) blocks. The term unit may be used interchangeably with terms such as block or area. In general, an M×N block may include samples (or a sample array) consisting of M columns and N rows, or a set (or an array) of transform coefficients.

[0039] 2 is a diagram illustrating the configuration of a video / image encoding device to which the present disclosure can be applied. Hereinafter, the term "video encoding device" may include an image encoding device.

[0040] As shown in FIG. 2, the encoding device 200 may include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image dividing unit 210, the predicting unit 220, the residual processing unit 230, the entropy encoding unit 240, the adding unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chipset or a processor) depending on the embodiment. Also, the memory 270 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware components may further include the memory 270 as an internal / external component.

[0041] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) using a quad-tree, binary-tree, ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into multiple coding units of deeper depths based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. In this case, the largest coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as needed, and a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit.The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0042] The term "unit" may be used interchangeably with terms such as "block" or "area." In general, an MxN block can refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample generally refers to a pixel or pixel value, and can refer to only a pixel / pixel value of a luma component or only a pixel / pixel value of a chroma component. A sample can also be used as a term corresponding to one pixel or pel of a picture (or image).

[0043] The encoding apparatus 200 may subtract a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, a unit in the encoding apparatus 200 that subtracts a prediction signal (predicted block, prediction sample array) from an input image signal (original block, original sample array) may be referred to as a subtraction unit 231. The prediction unit may perform prediction on a current block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied on a current block or CU basis. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

[0044] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away, depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, DC mode and planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the granularity of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to neighboring blocks.

[0045] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on the inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (col CU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter predictor 221 may construct a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive a motion vector and / or a reference picture index for the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode or a merge mode, the inter predictor 221 may use motion information of neighboring blocks as motion information for the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the current block can be indicated by using the motion vector of a neighboring block as a motion vector predictor and signaling the motion vector difference.

[0046] The predictor 220 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may not only apply intra prediction or inter prediction for prediction of a block, but also simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The predictor may also use intra block copy (IBC) prediction mode or palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be similar to inter prediction in that it derives a reference block within the current picture. That is, IBC may utilize at least one of the inter prediction techniques described herein. Palette mode may be considered an example of intra coding or intra prediction. When palette mode is applied, sample values within a picture may be signaled based on information related to a palette table and a palette index.

[0047] The prediction signal generated by the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a reconstructed signal or a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-Linear Transform (CNT). Here, GBT refers to a transform obtained from a graph representing inter-pixel relationship information. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same rectangular size, or may be applied to non-rectangular blocks of variable size.

[0048] The quantizer 233 quantizes the transform coefficients and transmits the quantized signal to the entropy encoder 240. The entropy encoder 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoder 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. In addition to the quantized transform coefficients, the entropy encoder 240 may encode information required for video / image restoration (e.g., values of syntax elements) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / image information) may be transmitted or stored in the form of a bitstream in units of network abstraction layer (NAL) units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may also include general constraint information. Information and / or syntax elements transmitted / signaled from an encoding device to a decoding device in this document may be included in the video / image information. The video / image information may be encoded through the above-described encoding procedure and included in the bitstream.The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding device 200, or the transmitter may be included in the entropy encoding unit 240.

[0049] The quantized transform coefficients output from the quantization unit 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantization unit 234 and the inverse transform unit 235. The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the current block, such as when skip mode is applied, a predicted block may be used as the reconstructed block. The adder 250 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, or may be used for inter prediction of the next picture after filtering, as described below.

[0050] Meanwhile, luma mapping with chrominance scaling (LMCS) can be applied during picture encoding and / or reconstruction.

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

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

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

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

[0055] Furthermore, in this document, quantized transform coefficients and transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, residual information may include information about the transform coefficient(s), and the information about the transform coefficient(s) may be signaled via residual coding syntax. Transform coefficients may be derived based on the residual information (or information about the transform coefficient(s)), and scaled transform coefficients may be derived through an inverse transform (scaling) of the transform coefficient(s). Residual samples may be derived based on an inverse transform (transform) of the scaled transform coefficient(s). This may be similarly applied / expressed in other parts of this document.

[0056] FIG. 3 is a diagram illustrating the schematic configuration of a video / image decoding device to which the present disclosure can be applied.

[0057] As shown in FIG. 3, the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an intra predictor 331 and an inter predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 322. The entropy decoder 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured as a single hardware component (e.g., a decoder chipset or processor) according to an embodiment. The memory 360 may include a decoded picture buffer (DPB) or may be configured as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.

[0058] When a bitstream including video / image information is input, the decoding device 300 can reconstruct an image corresponding to the process in which the video / image information was processed by the encoding device of FIG. 2. For example, the decoding device 300 can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device 300 can perform decoding using a processing unit applied by the encoding device. Therefore, the processing unit for decoding can be, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximal coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 can be reproduced by a playback device.

[0059] The decoding device 300 may receive a signal output from the encoding device of FIG. 3 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may also include general constraint information. The decoding device may further decode pictures based on the information on the parameter sets and / or the general constraint information. Signaling / received information and / or syntax elements, which will be described later in this document, may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as Exponential-Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration and quantized values of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information about the syntax element to be decoded and decoded information about neighboring and current blocks, or information about symbols / bins decoded in previous steps, predicts the occurrence probability of the bins based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element. After determining the context model, the CABAC entropy decoding method may update the context model using information about the decoded symbol / bin for the context model of the next symbol / bin.Among the information decoded by the entropy decoding unit 310, information related to prediction is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to a residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, among the information decoded by the entropy decoding unit 310, information related to filtering may be provided to a filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document may be called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.

[0060] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The inverse quantization unit 321 may inverse quantize the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.

[0061] The inverse transform unit 322 performs inverse transform on the transform coefficients to obtain a residual signal (residual block, residual sample array).

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

[0063] The predictor 330 may generate a prediction signal based on various prediction methods, which will be described later. For example, the predictor may apply intra prediction or inter prediction for predicting a block, or may simultaneously apply intra prediction and inter prediction. This may be referred to as combined inter and intra prediction (CIIP). The predictor may also use an intra block copy (IBC) prediction mode or a palette mode for predicting a block. The IBC prediction mode or palette mode may be used for content image / video coding, such as games, such as screen content coding (SCC). IBC basically performs prediction within a current picture, but may be similar to inter prediction in that a reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / image information and signaled.

[0064] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away from the current block depending on the prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.

[0065] The inter prediction unit 332 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. To reduce the amount of motion information transmitted in inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on the inter prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 332 may construct a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on received candidate selection information. Inter prediction may be performed based on various prediction modes, and the prediction information may include information indicating the inter prediction mode for the current block.

[0066] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a predicted signal (predicted block, predicted sample array) output from a prediction unit (including an inter prediction unit 332 and / or an intra prediction unit 331). When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as the reconstructed block.

[0067] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in the current picture, may be output after filtering as described below, or may be used for inter prediction of a next picture.

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

[0069] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.

[0070] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter predictor 332. The memory 360 can store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information can be transmitted to the inter predictor 332 to be used as motion information of a spatially neighboring block or a temporally neighboring block. The memory 360 can store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra predictor 331.

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

[0072] Meanwhile, as described above, prediction is performed to improve compression efficiency during video coding. Accordingly, a predicted block including predicted samples for a current block, which is a block to be coded, can be generated. Here, the predicted block includes predicted samples in the spatial domain (or pixel domain). The predicted block is derived in the same way by an encoding device and a decoding device. The encoding device can improve image coding efficiency by signaling to a decoding device information (residual information) regarding the residual between the original block and the predicted block, rather than the original sample values of the original block themselves. The decoding device can derive a residual block including residual samples based on the residual information, add the residual block and the predicted block to generate a reconstructed block including reconstructed samples, and generate a reconstructed picture including the reconstructed block.

[0073] The residual information may be generated through a transform and quantization procedure. For example, an encoding device may derive a residual block between the original block and the predicted block, perform a transform procedure on residual samples (residual sample array) included in the residual block to derive transform coefficients, and perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and then signal the related residual information (via a bitstream) to a decoding device. Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding device may derive residual samples (or residual blocks) by performing an inverse quantization / inverse transform procedure based on the residual information. The decoding device may generate a reconstructed picture based on the predicted block and the residual block. The encoding device may also derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a future picture, and generate a reconstructed picture based on the residual block.

[0074] Meanwhile, various inter-prediction modes can be used for predicting a current block in a picture. For example, various prediction modes can be used, such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, and merge with MVD (MMVD) mode. Decoder side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bi-prediction with CU-level weight (BCW), bi-directional optical flow (BDOF), etc. can be used as additional modes or instead of them. Affine mode can also be referred to as affine motion prediction mode. MVP mode can also be referred to as advanced motion vector prediction (AMVP) mode. In this document, motion information candidates derived by some modes and / or some modes can also be included as one of the motion information-related candidates of other modes. For example, an HMVP candidate can be added as a merge candidate in the merge / skip mode, or as an MVP candidate in the MVP mode.

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

[0076] Meanwhile, information indicating whether list 0 (L0) prediction, list 1 (L1) prediction, or bi-prediction is used for the current block (current coding unit) may be signaled. This information may be called motion prediction direction information, inter-prediction direction information, or inter-prediction indication information, and may be configured / encoded / signaled in the form of, for example, an inter_pred_idc syntax element. That is, the inter_pred_idc syntax element may indicate whether the above-mentioned list 0 (L0) prediction, list 1 (L1) prediction, or bi-prediction is used for the current block (current coding unit). For convenience of explanation, in this document, the inter-prediction type (L0 prediction, L1 prediction, or BI prediction) indicated by the inter_pred_idc syntax element may be referred to as a motion prediction direction. L0 prediction may be represented by pred_L0, L1 prediction by pred_L1, and bi-prediction by pred_BI. For example, the following prediction types can be represented by values of the inter_pred_idc syntax element:

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

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

[0079] For example, information about the inter prediction mode of the current block may be coded and signaled at a level such as a CU (CU syntax), or may be implicitly determined by conditions, in which case some modes may be explicitly signaled and the remaining modes may be implicitly derived.

[0080] For example, the CU syntax may carry information about an (inter) prediction mode as follows: The CU syntax may be as shown in Table 1 below.

[0081] [Table 1-1]

[0082] [Table 1-2]

[0083] [Table 1-3]

[0084] [Table 1-4]

[0085] [Table 1-5]

[0086] [Table 1-6]

[0087] [Table 1-7]

[0088] [Table 1-8]

[0089] [Table 1-9]

[0090] [Table 1-10]

[0091] In Table 1, cu_skip_flag may indicate whether the skip mode is applied to the current block (CU).

[0092] When pred_mode_flag is 0, it is possible to specify that the current block is coded in inter prediction mode, and when pred_mode_flag is 1, it is possible to specify that the current coding unit is coded in intra prediction mode.

[0093] When pred_mode_ibc_flag is 1, it can specify that the current block is coded in IBC prediction mode, and when pred_mode_ibc_flag is 0, it can specify that the current block (CU) is not coded in IBC prediction mode.

[0094] Also, if pcm_flag[x0][y0] is 1, it can be specified that the pcm_sample() syntax structure is present and the transform_tree() syntax structure is not present in the current block including the luma coding block at position (x0, y0). If pcm_flag[x0][y0] is equal to 0, it can be specified that the pcm_sample() syntax structure is not present. That is, pcm_flag can indicate whether pulse coding modulation (PCM) mode is applied to the current block. If PCM mode is applied to the current block, prediction / transform / quantization, etc. are not applied, and the values of the original samples in the current block can be coded and signaled.

[0095] In addition, if intra_mip_flag[x0][y0] is 1, it can specify that the intra prediction type for the luma sample is matrix-based intra prediction (MIP), and if intra_mip_flag[x0][y0] is 0, it can specify that the intra prediction type for the luma sample is not matrix-based intra prediction. In other words, intra_mip_flag can indicate whether a MIP prediction mode (type) is applied to the luma sample of the current block.

[0096] "intra_chroma_pred_mode[x0][y0" can specify the intra prediction mode for chroma samples from the current block.

[0097] general_merge_flag[x0][y0] may specify whether inter prediction parameters for the current block are inferred from adjacent inter predicted partitions. That is, general_merge_flag may indicate that a general merge mode is available. For example, if the value of general_merge_flag is 1, a regular merge mode, a merge mode with motion vector difference (MMVD) mode, a merge subblock mode, etc. may be available. For example, if the value of general_merge_flag is 1, a merge data syntax may be parsed from the encoded video / image information (or bitstream), and the merge data syntax may be configured / coded as shown in Table 2 below.

[0098] [Table 2-1]

[0099] [Table 2-2]

[0100] In Table 2, if regular_merge_flag[x0][y0] is 1, it may be specified that the regular merge mode is used to generate inter prediction parameters of the current block. That is, regular_merge_flag may indicate whether the merge mode (regular merge mode) is applied to the current block.

[0101] When mmvd_merge_flag[x0][y0] is 1, it can be specified that the MMVD mode (merge mode with motion vector difference mode) is used to generate inter prediction parameters of the current block. That is, mmvd_merge_flag can indicate whether MMVD is applied to the current block.

[0102] "mmvd_cand_flag[x0][y0]" can specify whether to use the first (0) or second (1) candidate in the merge candidate list along with the motion vector difference derived from mmvd_distance_idx[x0][y0] and mmvd_direction_idx[x0][y0].

[0103] "mmvd_distance_idx[x0][y0]" can specify the index used to derive MmvdDistance[x0][y0].

[0104] "mmvd_direction_idx[x0][y0]" can specify the index used to derive MmvdSign[x0][y0].

[0105] merge_subblock_flag[x0][y0] may specify subblock-based inter prediction parameters for the current block. That is, merge_subblock_flag may indicate whether a subblock merge mode (or an affine merge mode) is applied to the current block.

[0106] "merge_subblock_idx[x0][y0" can specify a merge candidate index from the subblock-based merge candidate list.

[0107] 'ciip_flag[x0][y0' can specify whether CIIP (combined inter-picture merge and intra-picture prediction) prediction is applied to the current block.

[0108] "merge_triangle_idx0[x0][y0" can specify the first merge candidate index in a triangular shape based motion compensation candidate list.

[0109] "merge_triangle_idx1[x0][y0" can specify the second merge candidate index of a triangular shape based motion compensation candidate list.

[0110] "merge_idx[x0][y0" can specify a merge candidate index in the merge candidate list.

[0111] Meanwhile, referring again to the CU syntax, "mvp_l0_flag[x0][y0" can specify a motion vector predictor index in list 0. That is, "mvp_l0_flag" can indicate a candidate in MVP candidate list 0 to be selected for MVP derivation of the current block when the MVP mode is applied.

[0112] "mvp_l1_flag[x0][y0" has the same meaning as mvp_l0_flag, and l0 and list 0 can be replaced with l1 and list 1, respectively.

[0113] "inter_pred_idc[x0][y0" can specify whether list 0, list 1 or bi-prediction is used in the current coding unit.

[0114] When sym_mvd_flag[x0][y0] is 1, it can specify that there is no mvd_coding(x0,y0,refList,cpIdx) syntax structure for the syntax elements ref_idx_l0[x0][y0] and ref_idx_l1[x0][y0] and refList 1. In other words, sym_mvd_flag can indicate whether symmetric MVD is used in mvd coding.

[0115] "ref_idx_l0[x0][y0" can specify the list 0 reference picture index for the current block.

[0116] "ref_idx_l1[x0][y0" has the same meaning as "ref_idx_l0", and l0, L0 and list 0 can be replaced with l1, L1 and list 1, respectively.

[0117] If inter_affine_flag[x0][y0] is 1, it specifies that affine model based motion compensation is used to generate predicted samples for the current block when decoding a P or B slice.

[0118] When cu_affine_type_flag[x0][y0] is 1, it specifies that 6-parameter affine model based motion compensation is used to generate predicted samples for the current block when decoding a P or B slice. When cu_affine_type_flag[x0][y0] is 0, it specifies that 4-parameter affine model based motion compensation is used to generate predicted samples for the current block when decoding a P or B slice.

[0119] amvr_flag[x0][y0] can specify the resolution of the motion vector differential value. The array index x0,y0 can specify the position (x0,y0) of the top left luma sample of the coding block to be considered relative to the top left luma sample of the picture. When amvr_flag[x0][y0] is 0, it can specify that the resolution of the motion vector differential value is 1 / 4 of the luma sample. When amvr_flag[x0][y0] is 1, the resolution of the motion vector differential value can be further specified by amvr_precision_flag[x0][y0].

[0120] If amvr_precision_flag[x0][y0] is 0, the resolution of the motion vector differential value is 1 integer luma sample if inter_affine_flag[x0][y0] is 0, otherwise it can be specified as 1 / 16 of a luma sample. If amvr_precision_flag[x0][y0] is 1, the resolution of the motion vector differential value is 4 luma samples if inter_affine_flag[x0][y0] is 0, otherwise it can be specified as 1 integer luma sample.

[0121] "bcw_idx[x0][y0" can specify a weight index for bi-prediction using CU weights.

[0122] FIG. 4 is a diagram illustrating the merge mode in inter prediction.

[0123] When a merge mode is applied, the motion information of the current prediction block is not directly transmitted, but is derived using the motion information of an adjacent prediction block. Therefore, the motion information of the current prediction block can be indicated by transmitting flag information indicating that the merge mode is used and a merge index indicating which adjacent prediction block is used. The merge mode can be called a regular merge mode.

[0124] To perform the merge mode, the encoding device must search for merge candidate blocks to be used to derive motion information of the current prediction block. For example, up to five merge candidate blocks may be used, but the embodiment (or others) of this document is not limited to this. The maximum number of merge candidate blocks may be transmitted in a slice header or a tile group header, but the embodiment (or others) of this document is not limited to this. After searching for the merge candidate blocks, the encoding device may generate a merge candidate list and select the merge candidate block with the smallest cost as the final merge candidate block.

[0125] This document may provide various embodiments for the merge candidate blocks that make up the merge candidate list.

[0126] For example, the merge candidate list may use five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate may be used. As a specific example, in the case of spatial merge candidates, the blocks shown in FIG. 4 may be used as spatial merge candidates. Hereinafter, the spatial merge candidates or spatial MVP candidates described below may be referred to as SMVPs, and the temporal merge candidates or temporal MVP candidates described below may be referred to as TMVPs.

[0127] The merge candidate list for the current block may be constructed, for example, according to the following procedure.

[0128] A coding apparatus (encoder / decoder) may search for spatially neighboring blocks of a current block and insert the derived spatial merge candidates into a merge candidate list. For example, the spatial neighboring blocks may include a lower left corner neighboring block, a left peripheral block, a right upper corner neighboring block, an upper peripheral block, and an upper left corner neighboring block of the current block. However, this is merely an example, and in addition to the above-described spatial neighboring blocks, additional neighboring blocks such as a right peripheral block, a lower peripheral block, and a lower right peripheral block may also be used as the spatial neighboring blocks. The coding apparatus may search the spatial neighboring blocks based on priority to detect available blocks and derive motion information of the detected blocks as the spatial merge candidates. For example, the encoding apparatus or decoding apparatus may search the five blocks shown in FIG. 4 in order of A1→B1→B0→A0→B2, sequentially index available candidates, and construct a merge candidate list.

[0129] The coding apparatus may search for temporal neighboring blocks of the current block and insert the derived temporal merge candidates into the merge candidate list. The temporal neighboring blocks may be located in a reference picture that is a different picture from the current picture in which the current block is located. The reference picture in which the temporal neighboring blocks are located may be called a collocated picture or col picture. The temporal neighboring blocks may be searched for in the order of a lower right corner neighboring block and a lower right center block of a co-located block with respect to the current block in 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 motion information for all blocks within the predetermined storage unit, thereby achieving a motion data compression effect. In this case, the fixed storage unit may be predetermined, for example, in 16x16 sample units or 8x8 sample units, or size information for the fixed storage unit may be signaled from the encoding device to the decoding device. When motion data compression is applied, the motion information of the temporal neighboring block may be replaced with representative motion information of the fixed storage unit in which the temporal neighboring block is located. That is, in this case, from the perspective of implementation, the temporal merge candidate may be derived based on motion information of a predictive block that covers a position arithmetically shifted leftward by a fixed value based on the coordinates (upper left sample position) of the temporal neighboring block, rather than a predictive block located at the coordinates of the temporal neighboring block.For example, when the fixed storage unit is a 2n×2n sample unit, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>n)<<n), (yTnb>>n)<<n)) can be used for the temporal merge candidate. Specifically, for example, when the fixed storage unit is a 16×16 sample unit, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>4)<<4), (yTnb>>4)<<4)) can be used for the temporal merge candidate. Or, for example, when the fixed storage unit is an 8×8 sample unit, if the coordinates of the temporal neighboring block are (xTnb, yTnb), the motion information of the prediction block located at the corrected position ((xTnb>>3)<<3), (yTnb>>3)<<3)) can be used for the temporal merge candidate.

[0130] The coding device can check whether the number of current merge candidates is smaller than the number of maximum merge candidates. The number of the maximum merge candidates can be predefined or signaled from the encoding device to the decoding device. For example, the encoding device can generate information regarding the number of the maximum merge candidates, encode it, and transmit it to the decoder in the form of a bitstream. If all the numbers of the maximum merge candidates are satisfied, the subsequent candidate addition process cannot proceed.

[0131] If the check result indicates that the number of current merge candidates is less than the maximum number of merge candidates, the coding apparatus may insert additional merge candidates into the merge candidate list. For example, the additional merge candidates may include at least one of history-based merge candidate(s), pair-wise average merge candidate(s), ATMVP, combined bi-predictive merge candidate (when the slice / tile group type of the current slice / tile group is type B), and / or zero vector merge candidate.

[0132] If the check result indicates that the number of current merge candidates is not less than the maximum number of merge candidates, the coding device may terminate construction of the merge candidate list. In this case, the encoding device may select an optimal merge candidate from among the merge candidates constituting the merge candidate list based on rate-distortion (RD) cost and signal selection information (e.g., merge index) indicating the selected merge candidate to the decoding device. The decoding device may select the optimal merge candidate based on the merge candidate list and the selection information.

[0133] As described above, the motion information of the selected merging candidate can be used as the motion information of the current block, and the predicted sample of the current block can be derived based on the motion information of the current block. The encoding device can derive a residual sample of the current block based on the predicted sample and signal residual information about the residual sample to a decoding device. The decoding device can generate reconstructed samples based on the residual samples derived based on the residual information and the predicted sample, and generate a reconstructed picture based on the reconstructed samples.

[0134] When the skip mode is applied, the motion information of the current block can be derived in the same manner as when the merge mode is applied. However, when the skip mode is applied, the residual signal for the current block is omitted, and therefore, the predicted samples can be directly used as reconstructed samples. The skip mode can be applied, for example, when the value of the cu_skip_flag syntax element is 1.

[0135] FIG. 5 is a diagram illustrating the MMVD mode (merge mode with motion vector difference mode) in inter prediction.

[0136] The MMVD mode is a method of applying MVD (motion vector difference) to the merge mode in which derived motion information is directly used to generate a prediction sample of the current block.

[0137] For example, an MMVD flag (e.g., mmvd_flag) indicating whether MMVD is used for the current block (i.e., the current CU) may be signaled, and MMVD may be performed based on this MMVD flag. If MMVD is applied to the current block (e.g., mmvd_flag is 1), additional information for MMVD may be signaled.

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

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

[0140] Furthermore, a distance index (e.g., mmvd_distance_idx) represents motion magnitude information and can indicate a predetermined offset from the starting point. Referring to Figure 5, the offset can be added to the horizontal or vertical component of the starting motion vector. The relationship between the distance index and the predetermined offset can be expressed as shown in Table 3 below.

[0141] [Table 3]

[0142] As shown in Table 3, the MVD distance (e.g., MmvdDistance) is determined according to the value of the distance index (e.g., mmvd_distance_idx), and the MVD distance (e.g., MmvdDistance) can be derived using integer sample precision or fractional sample precision based on the value of slice_fpel_mmvd_enabled_flag. For example, when slice_fpel_mmvd_enabled_flag is 1, it indicates that the MVD distance is derived using integer sample units in the current slice, and when slice_fpel_mmvd_enabled_flag is 0, it indicates that the MVD distance is derived using fractional sample units in the current slice.

[0143] In addition, the direction index (e.g., mmvd_direction_idx) represents the direction of the MVD based on the start point, and can represent four directions as shown in Table 4 below. In this case, the MVD direction can represent the MVD code. The relationship between the direction index and the MVD code can be expressed as shown in Table 4 below.

[0144] [Table 4]

[0145] As shown in Table 4, the MVD code (e.g., MmvdSign) is determined according to the value of the direction index (e.g., mmvd_direction_idx), and the MVD code (e.g., MmvdSign) can be derived for the L0 reference picture and the L1 reference picture.

[0146] Based on the distance index (e.g., mmvd_distance_idx) and direction index (e.g., mmvd_direction_idx) as described above, the MVD offset can be calculated as shown in Equation 1 below.

[0147]

number

[0148] That is, in the MMVD mode, a merge candidate indicated by a merge candidate flag (e.g., mmvd_cand_flag) can be selected from among merge candidates in a merge candidate list derived based on neighboring blocks, and the selected merge candidate can be used as a base candidate (e.g., MVP). Then, motion information (i.e., a motion vector) of the current block can be derived by adding the MVD derived based on the base candidate using a distance index (e.g., mmvd_distance_idx) and a direction index (e.g., mmvd_direction_idx).

[0149] 6a and 6b exemplarily illustrate CPMV for affine motion prediction.

[0150] Conventionally, only one motion vector could be used to represent the motion of a coding block. That is, a translation motion model could be used. However, although this method may represent the optimal motion on a block-by-block basis, coding efficiency can be improved if an optimal motion vector can be determined on a sample-by-sample basis, rather than the optimal motion of each sample. For this purpose, an affine motion model can be used. An affine motion prediction method for coding using an affine motion model can be as follows.

[0151] The affine motion prediction method can express a motion vector for each sample of a block using two, three, or four motion vectors. For example, an affine motion model can express four types of motion. Among the motions that can be expressed by an affine motion model, an affine motion model that expresses three types of motion (translation, scale, and rotation) can be called a similarity (or simplified) affine motion model. However, the affine motion model is not limited to the above-mentioned motion models.

[0152] Affine motion estimation can determine the motion vector for a sample position included in a block using two or more control point motion vectors (CPMVs). In this case, the set of motion vectors can be represented as an affine motion vector field (MVF).

[0153] For example, Figure 6a may represent the case where two CPMVs are used, which may be called a four-parameter affine model. In this case, the motion vector at the (x, y) sample position may be determined as shown in Equation 2.

[0154]

number

[0155] For example, Figure 6b may represent a case where three CPMVs are used, which may be called a six-parameter affine model. In this case, the motion vector at the (x, y) sample position may be determined as shown in Equation 3.

[0156]

number

[0157] In Formula 2 and Formula 3, {v x ,v y} can represent a motion vector at the (x,y) position. 0x ,v 0y} can represent the CPMV of the control point (CP) at the upper left corner position of the coding block, and {v 1x ,v 1y} can represent the CPMV of the CP at the upper right corner position, and {v 2x ,v 2y} may represent the CPMV of the CP at the bottom left corner position, W may represent the width of the current block, and H may represent the height of the current block.

[0158] FIG. 7 exemplarily shows a case where the affine MVF is determined in units of subblocks.

[0159] During encoding / decoding, the affine MVF can be determined in sample units or in predefined sub-block units. For example, when determined in sample units, a motion vector can be obtained based on each sample value. Or, when determined in sub-block units, a motion vector for a corresponding block can be obtained based on the sample value of the center (bottom right of the center, i.e., the bottom right sample of the central four samples) of the sub-block. That is, in affine motion prediction, the motion vector of a current block can be derived in sample units or sub-block units.

[0160] In the case of FIG. 7, the affine MVF is determined in units of 4x4 sub-blocks, but the size of the sub-blocks can be varied in various ways.

[0161] That is, when affine prediction is available, there are three types of motion models that can be applied to the current block: a translational motion model, a 4-parameter affine motion model, and a 6-parameter affine motion model. Here, the translational motion model can represent a model in which a conventional block-based motion vector is used, the 4-parameter affine motion model can represent a model in which two CPMVs are used, and the 6-parameter affine motion model can represent a model in which three CPMVs are used.

[0162] On the other hand, affine motion prediction can include affine MVP (or affine inter) mode or affine merge mode.

[0163] FIG. 8 is a diagram illustrating the affine merge mode or the sub-block merge mode in inter prediction.

[0164] For example, in affine merge mode, CPMV can be determined by the affine motion model of neighboring blocks coded with affine motion prediction. For example, neighboring blocks coded with affine motion prediction in the search order can be used for the affine merge mode. That is, if at least one of the neighboring blocks is coded with affine motion prediction, the current block can be coded in the affine merge mode. Here, the affine merge mode can be referred to as AF_MERGE.

[0165] When the affine merge mode is applied, the CPMV of the current block may be derived using the CPMV of a neighboring block. In this case, the CPMV of the neighboring block may be used as the CPMV of the current block as is, or the CPMV of the neighboring block may be modified based on the size of the neighboring block and the size of the current block, and then used as the CPMV of the current block.

[0166] Meanwhile, an affine merge mode in which a motion vector (MV) is derived on a sub-block basis may be referred to as a sub-block merge mode, which may be indicated based on a sub-block merge flag (or a merge_subblock_flag syntax element). Alternatively, a value of 1 in the merge_subblock_flag syntax element may indicate that the sub-block merge mode is applied. In this case, an affine merge candidate list (described later) may also be referred to as a sub-block merge candidate list. In this case, the sub-block merge candidate list may further include a candidate derived by SbTMVP (described later). In this case, the candidate derived by SbTMVP may be used as the candidate with the zeroth index in the sub-block merge candidate list. In other words, the candidate derived by SbTMVP may be positioned before an inherited affine candidate or a constructed affine candidate (described later) in the sub-block merge candidate list.

[0167] When an affine merge mode is applied, an affine merge candidate list may be constructed for CPMV derivation for the current block. For example, the affine merge candidate list may include at least one of the following candidates: 1) inherited affine merge candidates; 2) constructed affine merge candidates; and 3) zero motion vector candidates (or zero vectors). Here, the inherited affine merge candidates are candidates derived based on the CPMVs of neighboring blocks when the neighboring blocks are coded in affine mode. The constructed affine merge candidates are candidates derived by constructing CPMVs based on the MVs of neighboring blocks of the corresponding CPMV in each CPMV unit. The zero motion vector candidate may represent a candidate constructed with a CPMV whose value is 0.

[0168] The affine merge candidate list can be constructed, for example, as follows:

[0169] There may be up to two inherited affine candidates, which may be derived from the affine motion models of the surrounding blocks. The surrounding blocks may include one left surrounding block and one above surrounding block. The candidate blocks may be positioned as shown in FIG. 4. The scan order for the left predictor may be A1→A0, and the scan order for the above predictor may be B1→B0→B2. Only one inherited candidate may be selected from each of the left and above. There may be no pruning check between two inherited candidates.

[0170] If a neighboring affine block is identified, the control point motion vector of the identified block may be used to derive a CPMVP candidate in the affine merge list of the current block. Here, the neighboring affine block may refer to a block that is coded in an affine prediction mode among neighboring blocks of the current block. For example, as shown in FIG. 8, if the bottom-left neighboring block A is coded in the affine prediction mode, motion vectors v2, v3, and v4 of the top-left corner, top-right corner, and bottom-left corner of neighboring block A may be obtained. If neighboring block A is coded using a 4-parameter affine motion model, two CPMVs of the current block may be calculated using v2 and v3. If neighboring block A is coded using a 6-parameter affine motion model, three CPMVs of the current block may be calculated using v2, v3, and v4.

[0171] FIG. 9 is a diagram for explaining the positions of candidates in the affine merge mode or the sub-block merge mode.

[0172] An affine candidate constructed in the affine merge mode or sub-block merge mode can refer to a candidate constructed by combining the translational motion information of neighboring control points. The motion information of a control point can be derived from identified spatial and temporal neighbors. CPMVk (k=0, 1, 2, 3) can represent the kth control point.

[0173] As shown in Figure 9, for CPMV0, blocks may be checked in the order B2->B3->A2, and the motion vector of the first available block may be used. For CPMV1, blocks may be checked in the order B1->B0, and for CPMV2, blocks may be checked in the order A1->A0. A temporal motion vector predictor (TMVP) may be used in CPMV3 if available.

[0174] After the motion vectors of the four control points are obtained, affine merge candidates can be generated based on the obtained motion information. The control point motion vector combinations can be any one of {CPMV0,CPMV1,CPMV2}, {CPMV0,CPMV1,CPMV3}, {CPMV0,CPMV2,CPMV3}, {CPMV1,CPMV2,CPMV3}, {CPMV0,CPMV1}, and {CPMV0,CPMV2}.

[0175] A combination of three CPMVs can form a 6-parameter affine merge candidate, and a combination of two CPMVs can form a 4-parameter affine merge candidate. To avoid the motion scaling process, related combinations of control point motion vectors can be discarded if the reference indices of the control points are different from each other.

[0176] FIG. 10 is a diagram illustrating SbTMVP in inter prediction.

[0177] Subblock-based temporal motion vector prediction (SbTMVP) can also be called advanced temporal motion vector prediction (ATMVP). SbTMVP can utilize motion fields in collocated pictures to improve motion vector prediction and merge modes for CUs in the current picture. Here, a collocated picture can also be called a col-picture.

[0178] For example, SbTMVP can predict motion at the sub-block (or sub-CU) level and can apply a motion shift before fetching temporal motion information from the colpicture, where the motion shift can be obtained from the motion vector of one of the spatially neighboring blocks of the current block.

[0179] SbTMVP can predict the motion vectors of sub-blocks (or sub-CUs) within the current block (or CU) through two steps.

[0180] In the first step, the spatial neighboring blocks may be examined in the order of A1, B1, B0, and A0 in FIG. 4. The first spatial neighboring block having a motion vector using the col picture as its reference picture may be identified, and the motion vector may be selected with an applied motion shift. If no such motion is identified from the spatial neighboring blocks, the motion shift may be set to (0,0).

[0181] In the second step, the motion shift identified in the first step can be applied to obtain sub-block level motion information (motion vectors and reference indices) from the col picture. For example, the motion shift can be added to the coordinates of the current block. For example, the motion shift can be set as the motion of A1 in FIG. 4. In this case, for each sub-block, the motion information of the corresponding block in the col picture can be used to derive the motion information of the sub-block. Temporal motion scaling can be applied to align the reference picture of the temporal motion vector with the reference picture of the current block.

[0182] The combined sub-block-based merge list including all SbTVMP candidates and affine merge candidates can be used to signal the affine merge mode. Here, the affine merge mode can be referred to as the sub-block-based merge mode. The SbTVMP mode can be enabled or disabled by a flag included in the sequence parameter set (SPS). If the SbTMVP mode is enabled, the SbTMVP predictor can be added as the first entry in the list of sub-block-based merge candidates, followed by the affine merge candidates. The maximum allowed size of the affine merge candidate list can be five.

[0183] The size of the sub-CUs (or sub-blocks) used in SbTMVP can be fixed at 8x8, and like the affine merge mode, SbTMVP mode can only be applied to blocks whose width and height are both 8 or greater. The encoding logic for additional SbTMVP merge candidates can be the same as for other merge candidates. That is, for each CU in a P or B slice, an RD (rate-distortion) check using an additional RD cost can be performed to determine whether to use an SbTMVP candidate.

[0184] FIG. 11 is a diagram illustrating the CIIP mode (combined inter-picture merge and intra-picture prediction mode) in inter prediction.

[0185] CIIP (Combined Inter and Intra Prediction) may be applied to the current CU. For example, if a CU is coded in merge mode, the CU includes at least 64 luma samples (i.e., the product of the CU width and CU height is 64 or more), and the total of the CU width and CU height is less than 128 luma samples, an additional flag (e.g., ciip_flag) may be signaled to indicate whether the CIIP mode is applied to the current CU.

[0186] In CIIP prediction, the inter prediction signal and the intra prediction signal can be combined. In CIIP mode, the inter prediction signal P_inter can be derived using the same inter prediction process applied to the regular merge mode. The intra prediction signal P_intra can be derived according to an intra prediction process with a planar mode.

[0187] The intra-predicted signal and the inter-predicted signal may be combined using a weighted average, as shown in Equation 4. The weights may be calculated according to the coding modes of the upper and left neighboring blocks shown in FIG.

[0188]

number

[0189] In Equation 4, if the upper neighboring block is available and intra-coded, isIntraTop may be set to 1; otherwise, isIntraTop may be set to 0. If the left neighboring block is available and intra-coded, isIntraLeft may be set to 1; otherwise, isIntraLeft may be set to 0. If (isIntraLeft+isIntraLeft) is 2, wt may be set to 3; if (isIntraLeft+isIntraLeft) is 1, wt may be set to 2; otherwise, wt may be set to 1.

[0190] FIG. 12 is a diagram illustrating partitioning modes in inter prediction.

[0191] As shown in Figure 12, when a partitioning mode is applied, a CU may be evenly divided into two triangular partitions using a diagonal split or an anti-diagonal split. However, this is only one example of a partitioning mode, and a CU may be evenly or unevenly divided into partitions of various shapes.

[0192] Only unidirectional prediction is allowed for each partition of a CU. That is, each partition can have one motion vector and one reference index. The unidirectional prediction constraint is to ensure that only two motion compensation predictions are required for each CU, just like bi-prediction.

[0193] If the partitioning mode is applied, a flag indicating the split direction (diagonal or anti-diagonal) and two merge indices (for each partition) can be further signaled.

[0194] After predicting each partition, the sample values of the diagonal or anti-diagonal boundary lines can be adjusted using a blending process with adaptive weights.

[0195] On the other hand, when merge mode or skip mode is applied, motion information can be derived based on the regular merge mode, merge mode with motion vector difference (MMVD mode), merge subblock mode, combined inter-picture merge and intra-picture prediction mode (CIIP mode), or partitioning mode to generate prediction samples, as described above. Each mode can be enabled or disabled via an on / off flag in a sequence parameter set (SPS). If the on / off flag for a specific mode is disabled in the SPS, syntax that is explicitly transmitted for the prediction mode on a CU or PU basis can be omitted.

[0196] Table 5 below relates to a process for deriving merge mode or skip mode from the conventional merge_data synatx. In Table 5 below, CUMergeTriangleFlag[x0][y0] may correspond to the on / off flag for the partitioning mode described above in FIG. 12, and merge_triangle_split_dir[x0][y0] may represent the split direction (diagonal or anti-diagonal) when the partitioning mode is applied. Also, merge_triangle_idx0[x0][y0] and merge_triangle_idx1[x0][y0] may represent two merge indexes for each partition when the partitioning mode is applied.

[0197] [Table 5-1]

[0198] [Table 5-2]

[0199] Meanwhile, each prediction mode including the regular merge mode, MMVD mode, merge sub-block mode, CIIP mode, and partitioning mode can be enabled or disabled from the sequence parameter set (SPS) as shown in Table 6. In Table 6, sps_triangle_enabled_flag may correspond to a flag that enables or disables the partitioning mode described above in FIG. 12 from the SPS.

[0200] [Table 6-1]

[0201] [Table 6-2]

[0202] [Table 6-3]

[0203] [Table 6-4]

[0204] [Table 6-5]

[0205] [Table 6-6]

[0206] The merge_data syntax in Table 5 may be parsed or derived according to the conditions under which the SPS flags and each prediction mode can be used in Table 6. All cases according to the conditions under which the SPS flags and each prediction mode can be used may be summarized as shown in Tables 7 and 8 below. Table 7 shows the number of cases when the current block is in merge mode, and Table 8 shows the number of cases when the current block is in skip mode. In Tables 7 and 8 below, "regular" corresponds to the regular merge mode, and "mmvd", "Triangle", or "TRI" may correspond to the partitioning mode described above in FIG. 12.

[0207] [Table 7]

[0208] [Table 8]

[0209] As an example of the cases mentioned in Tables 7 and 8, a case where the current block is 4x16 and in skip mode will be described. When merge subblock mode, MMVD mode, CIIP mode, and partitioning mode are all enabled in the SPS, if regular_merge_flag[x0][y0], mmvd_flag[x0][y0], and merge_subblock_flag[x0][y0] are all 0 in the merge_data syntax, motion information for the current block must be derived in partitioning mode. However, even if the partitioning mode is enabled from an on / off flag in the SPS, it cannot be used as a prediction mode unless it additionally satisfies the conditions in Table 9 below. In Table 9 below, MergeTriangleFlag[x0][y0] may correspond to an on / off flag for the partitioning mode, and sps_triangle_enabled_flag may correspond to a flag for enabling or disabling the partitioning mode from the SPS.

[0210] [Table 9]

[0211] Referring to Table 9, if the current slice is P slice, it is not possible to generate prediction samples through the partitioning mode, so the decoder may not be able to decode the bitstream any further. In order to solve the problem that occurs in exceptional cases where decoding is not performed because the final prediction mode cannot be selected according to the on / off flags and merge data syntax of the SPS, this document proposes a default merge mode. The default merge mode may be pre-defined in various ways or induced through additional syntax signaling.

[0212] In one embodiment, if the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning mode that divides the current block into two partitions and performs prediction are not available, the regular merge mode may be applied to the current block. That is, if a merge mode cannot be finally selected for the current block, the regular merge mode may be applied as the default merge mode.

[0213] For example, if the value of a general merge flag, which indicates whether a merge mode is available for the current block, is 1, but a merge mode cannot be finally selected for the current block, the regular merge mode can be applied as the default merge mode.

[0214] In this case, motion information of the current block can be derived based on merge index information that points to one of the merge candidates included in the merge candidate list of the current block, and a prediction sample can be generated based on the derived motion information.

[0215] The merge data syntax for this may be as shown in Table 10 below.

[0216] [Table 10-1]

[0217] [Table 10-2]

[0218] Referring to Tables 10 and 6, if the MMVD mode is not available, the flag sps_mmvd_enabled_flag that enables or disables the MMVD mode from the SPS may be 0, or the first flag (mmvd_merge_flag[x0][y0]) that indicates whether the MMVD mode is applied may be 0.

[0219] Also, if the merge sub-block mode is not available, a flag sps_affine_enabled_flag that enables or disables the merge sub-block mode from the SPS may be 0, or a second flag (merge_subblock_flag[x0][y0]) that indicates whether the merge sub-block mode is applied may be 0.

[0220] In addition, a flag sps_ciip_enabled_flag that enables or disables the CIIP mode from the SPS based on whether the CIIP mode is available may be 0, or a third flag (ciip_flag[x0][y0]) that indicates whether the CIIP mode is applied may be 0.

[0221] Also, depending on whether the partitioning mode is not available, a flag sps_triangle_enabled_flag that enables or disables the partitioning mode from the SPS may be 0, or a fourth flag (MergeTriangleFlag[x0][y0]) that indicates whether the partitioning mode is applied may be 0.

[0222] Also, for example, if the partitioning mode is disabled based on the flag sps_triangle_enabled_flag, a fourth flag (MergeTriangleFlag[x0][y0]) indicating whether the partitioning mode is applied can be set to 0.

[0223] In another embodiment, the regular merge mode may be applied to the current block when the regular merge mode, the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning mode in which prediction is performed by dividing the current block into two partitions are not available. That is, when a merge mode cannot be finally selected for the current block, the regular merge mode may be applied as the default merge mode.

[0224] For example, if the value of a general merge flag, which indicates whether a merge mode is available for the current block, is 1, but a merge mode cannot be ultimately selected for the current block, the regular merge mode can be applied as the default merge mode.

[0225] For example, if the MMVD mode is not available, a flag sps_mmvd_enabled_flag that enables or disables the MMVD mode from the SPS may be 0, or a first flag (mmvd_merge_flag[x0][y0]) that indicates whether the MMVD mode is applied may be 0.

[0226] Also, if the merge sub-block mode is not available, a flag sps_affine_enabled_flag that enables or disables the merge sub-block mode from the SPS may be 0, or a second flag (merge_subblock_flag[x0][y0]) that indicates whether the merge sub-block mode is applied may be 0.

[0227] In addition, a flag sps_ciip_enabled_flag that enables or disables the CIIP mode from the SPS based on whether the CIIP mode is available may be 0, or a third flag (ciip_flag[x0][y0]) that indicates whether the CIIP mode is applied may be 0.

[0228] Also, depending on whether the partitioning mode is not available, a flag sps_triangle_enabled_flag that enables or disables the partitioning mode from the SPS may be 0, or a fourth flag (MergeTriangleFlag[x0][y0]) that indicates whether the partitioning mode is applied may be 0.

[0229] Furthermore, if the regular merge mode is not available, a fifth flag (regular_merge_flag[x0][y0]) indicating whether the regular merge mode is to be applied may be set to 0. That is, even if the value of the fifth flag is 0, if the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning mode are not available, the regular merge mode may be applied to the current block.

[0230] In this case, motion information of the current block may be derived based on the first merging candidate among the merging candidates included in the merging candidate list of the current block, and a prediction sample may be generated based on the derived motion information.

[0231] In yet another embodiment, the regular merge mode may be applied to the current block when the regular merge mode, the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning mode in which prediction is performed by dividing the current block into two partitions are not available. That is, when a merge mode cannot be finally selected for the current block, the regular merge mode may be applied as a default merge mode.

[0232] For example, if the value of a general merge flag, which indicates whether a merge mode is available for the current block, is 1, but a merge mode cannot be ultimately selected for the current block, the regular merge mode can be applied as the default merge mode.

[0233] For example, if the MMVD mode is not available, a flag sps_mmvd_enabled_flag that enables or disables the MMVD mode from the SPS may be 0, or a first flag (mmvd_merge_flag[x0][y0]) that indicates whether the MMVD mode is applied may be 0.

[0234] Also, if the merge sub-block mode is not available, a flag sps_affine_enabled_flag that enables or disables the merge sub-block mode from the SPS may be 0, or a second flag (merge_subblock_flag[x0][y0]) that indicates whether the merge sub-block mode is applied may be 0.

[0235] In addition, a flag sps_ciip_enabled_flag that enables or disables the CIIP mode from the SPS based on whether the CIIP mode is available may be 0, or a third flag (ciip_flag[x0][y0]) that indicates whether the CIIP mode is applied may be 0.

[0236] Also, depending on whether the partitioning mode is not available, a flag sps_triangle_enabled_flag that enables or disables the partitioning mode from the SPS may be 0, or a fourth flag (MergeTriangleFlag[x0][y0]) that indicates whether the partitioning mode is applied may be 0.

[0237] Furthermore, if the regular merge mode is not available, a fifth flag (regular_merge_flag[x0][y0]) indicating whether the regular merge mode is to be applied may be set to 0. That is, even if the value of the fifth flag is 0, if the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning mode are not available, the regular merge mode may be applied to the current block.

[0238] In this case, a (0,0) motion vector can be derived as motion information of the current block, and a predicted sample of the current block can be generated based on the (0,0) motion information. The (0,0) motion vector can be predicted by referring to the 0th reference picture in the L0 reference list. However, if the 0th reference picture (RefPicList[0][0]) in the L0 reference list does not exist, prediction can be performed by referring to the 0th reference picture (RefPicList[1][0]) in the L1 reference list.

[0239] 13 and 14 illustrate an example of a video / image encoding method and associated components according to embodiment(s) of the present document.

[0240] The method disclosed in Figure 13 may be performed by the encoding apparatus disclosed in Figure 2 or Figure 14. Specifically, for example, S1300 to S1310 of Figure 13 may be performed by the prediction unit 220 of the encoding apparatus 200 of Figure 14, and S1320 of Figure 13 may be performed by the entropy encoding unit 240 of the encoding apparatus 200 of Figure 11. Also, although not shown in Figure 13, prediction samples or prediction-related information may be derived by the prediction unit 220 of the encoding apparatus 200 in Figure 13, residual information may be derived from original samples or predicted samples by the residual processing unit 230 of the encoding apparatus 200, and a bitstream may be generated from the residual information or prediction-related information by the entropy encoding unit 240 of the encoding apparatus 200. The method disclosed in Figure 13 may include the embodiments described above in this document.

[0241] 13, the encoding apparatus may determine an inter prediction mode of a current block and generate inter prediction mode information representing the inter prediction mode (S1300). For example, the encoding apparatus may determine at least one of various modes, such as a regular merge mode, a skip mode, a motion vector prediction (MVP) mode, a merge mode with motion vector difference (MMVD) mode, a merge subblock mode, a combined inter-picture merge and intra-picture prediction (CIIP) mode, and a partitioning mode in which the current block is divided into two partitions for prediction, as the inter prediction mode to be applied to the current block, and may generate inter prediction mode information representing the determined mode.

[0242] The encoding apparatus may generate a prediction sample by performing inter prediction on the current block based on the inter prediction mode (S1310). For example, the encoding apparatus may generate a merge candidate list according to the determined inter prediction mode.

[0243] For example, candidates may be inserted into the merge candidate list until the number of candidates in the merge candidate list reaches the maximum number of candidates. Here, a candidate may represent a candidate or a candidate block for deriving motion information (or a motion vector) of a current block. For example, a candidate block may be derived through a search of neighboring blocks of the current block. For example, the neighboring blocks may include spatial neighboring blocks and / or temporal neighboring blocks of the current block. The spatial neighboring blocks may be searched first to derive candidates (spatial merge), and then the temporal neighboring blocks may be searched to derive candidates (temporal merge), and the derived candidates may be inserted into the merge candidate list. For example, if the number of candidates in the merge candidate list is less than the maximum number of candidates even after inserting a candidate, an additional candidate may be inserted into the merge candidate list. For example, the additional candidates may include at least one of history based merge candidate(s), pair-wise average merge candidate(s), ATMVP, combined bi-predictive merge candidate (if the slice / tile group type of the current slice / tile group is type B), and / or zero vector merge candidate.

[0244] As described above, the merge candidate list may include at least some of spatial merge candidates, temporal merge candidates, pairwise candidates, or zero vector candidates, and one of such candidates may be selected for inter prediction of the current block.

[0245] For example, the selection information may include index information that indicates one of the merge candidates included in the merge candidate list, and may also be referred to as merge index information.

[0246] For example, the encoding apparatus may generate a predicted sample of the current block based on a candidate indicated by the merge index information, or may derive motion information based on a candidate indicated by the merge index information and generate a predicted sample of the current block based on the motion information.

[0247] Meanwhile, according to one embodiment, if MMVD mode (merge mode with motion vector difference), merge subblock mode, CIIP mode (combined inter-picture merge and intra-picture prediction mode), and partitioning mode, which divides the current block into two partitions and performs prediction, are not available, regular merge mode can be applied to the current block.

[0248] In this case, the inter prediction mode information includes merge index information indicating one of merge candidates included in the merge candidate list of the current block, and motion information of the current block can be derived based on the candidate indicated by the merge index information. Also, a predicted sample of the current block can be generated based on the derived motion information.

[0249] For example, the inter prediction mode information may include a first flag indicating whether the MMVD mode is applied, a second flag indicating whether the merge sub-block mode is applied, and a third flag indicating whether the CIIP mode is applied.

[0250] For example, if the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning mode are not available, the values of the first flag, the second flag, and the third flag may all be 0.

[0251] Also, for example, the inter prediction mode information may include a general merge flag indicating whether a merge mode is available for the current block, and the value of the general merge flag may be 1.

[0252] For example, a flag for enabling or disabling the partitioning mode may be included in the Sequence Parameter Set (SPS) of the video information, and the value of a fourth flag indicating whether the partitioning mode is applied may be set to 0 based on when the partitioning mode is disabled.

[0253] Meanwhile, the inter prediction mode information may further include a fifth flag indicating whether the regular merge mode is applied. Even if the value of the fifth flag is 0, the regular merge mode may be applied to the current block if the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning mode are not available.

[0254] In this case, the motion information of the current block may be derived based on a first merging candidate among merging candidates included in a merging candidate list of the current block, and the prediction sample may be generated based on the motion information of the current block derived based on the first merging candidate.

[0255] Alternatively, in this case, motion information of the current block may be derived based on the (0,0) motion vector, and the predicted sample may be generated based on the motion information of the current block derived based on the (0,0) motion vector.

[0256] The encoding device may encode video information including inter-prediction mode information (S1320). For example, the video information may be referred to as video information. The video information may include various information according to the above-described embodiment(s) of this document. For example, the video information may include at least a portion of prediction-related information or residual-related information. For example, the prediction-related information may include at least a portion of the inter-prediction mode information, selection information, and inter-prediction type information. For example, the encoding device may encode video information including all or a portion of the above-described information (or syntax elements) to generate a bitstream or encoded information. Alternatively, the bitstream or encoded information may be output in the form of a bitstream. The bitstream or encoded information may be transmitted to a decoding device via a network or a storage medium.

[0257] Alternatively, although not shown in FIG. 13 , for example, the encoding apparatus may derive residual samples based on the predicted samples and original samples. In this case, residual-related information may be derived based on the residual samples. Residual samples may be derived based on the residual-related information. Reconstructed samples may be generated based on the residual samples and the predicted samples. Reconstructed blocks and reconstructed pictures may be derived based on the reconstructed samples. Alternatively, for example, the encoding apparatus may encode video information including residual-related information or prediction-related information.

[0258] For example, an encoding device may encode video information including all or part of the above-described information (or syntax elements) to generate a bitstream or encoded information. Alternatively, the video information may be output in the form of a bitstream. The bitstream or encoded information may be transmitted to a decoding device via a network or a storage medium. Alternatively, the bitstream or encoded information may be stored in a computer-readable storage medium, and the bitstream or encoded information may be generated by the above-described video encoding method.

[0259] 15 and 16 illustrate an example of a video / image decoding method and associated components according to embodiment(s) of the present document.

[0260] The method disclosed in Figure 15 may be performed by the decoding apparatus disclosed in Figure 3 or Figure 16. Specifically, for example, S1500 of Figure 15 may be performed by the entropy decoding unit 310 of the decoding apparatus 300 in Figure 16, and S1510 to S1520 of Figure 15 may be performed by the prediction unit 330 of the decoding apparatus 300 in Figure 16. Also, S1530 of Figure 15 may be performed by the addition unit 340 of the decoding apparatus 300 in Figure 16.

[0261] Also, although not shown in Figure 15, prediction-related information or residual information can be derived from the bitstream by the entropy decoding unit 310 of the decoding device 300 in Figure 16. The method disclosed in Figure 15 may include the embodiments described above in this document.

[0262] As shown in FIG. 15, a decoding device may receive image information including inter-prediction mode information via a bitstream (S1500). For example, the image information may be referred to as video information. The image information may include various information according to the above-described embodiment(s) of this document. For example, the image information may include at least a portion of prediction-related information or residual-related information.

[0263] For example, the prediction-related information may include inter-prediction mode information or inter-prediction type information. For example, the inter-prediction mode information may include information indicating at least some of various inter-prediction modes. For example, various modes may be used, such as a regular merge mode, a skip mode, a motion vector prediction (MVP) mode, a merge mode with motion vector difference (MMVD) mode, a merge subblock mode, a combined inter-picture merge and intra-picture prediction (CIIP) mode, and a partitioning mode in which prediction is performed by dividing the current block into two partitions. For example, the inter-prediction type information may include an inter_pred_idc syntax element. Alternatively, the inter-prediction type information may include information indicating any one of L0 prediction, L1 prediction, or bi-prediction.

[0264] The decoding device may determine a prediction mode of the current block based on the inter prediction mode information (S1510). For example, the decoding device may generate a merge candidate list according to the determined inter prediction mode of the current block based on the inter prediction mode information, from among a regular merge mode, a skip mode, an MVP mode, an MMVD mode, a merge sub-block mode, a CIIP mode, and a partitioning mode in which prediction is performed by dividing the current block into two partitions.

[0265] For example, candidates may be inserted into the merge candidate list until the number of candidates in the merge candidate list reaches the maximum number of candidates. Here, a candidate may represent a candidate or a candidate block for deriving motion information (or a motion vector) of the current block. For example, a candidate block may be derived through a search of neighboring blocks of the current block. For example, the neighboring blocks may include spatial neighboring blocks and / or temporal neighboring blocks of the current block. The spatial neighboring blocks may be searched first to derive candidates (spatial merge), and then the temporal neighboring blocks may be searched to derive candidates (temporal merge), and the derived candidates may be inserted into the merge candidate list. For example, if the number of candidates in the merge candidate list is less than the maximum number of candidates even after inserting a candidate, additional candidates may be inserted into the merge candidate list. For example, the additional candidates may include at least one of history-based merge candidate(s), pair-wise average merge candidate(s), ATMVP, combined bi-predictive merge candidate (when the slice / tile group type of the current slice / tile group is type B), and / or zero vector merge candidate.

[0266] The decoding apparatus may generate a prediction sample by performing inter prediction on the current block based on the prediction mode (S1520).

[0267] As described above, the merge candidate list may include at least some of spatial merge candidates, temporal merge candidates, pairwise candidates, or zero vector candidates, and one of such candidates may be selected for inter prediction of the current block.

[0268] For example, the selection information may include index information that indicates one of the merge candidates included in the merge candidate list, and may also be referred to as merge index information.

[0269] For example, the decoding device may generate a predicted sample of the current block based on a candidate indicated by the merge index information, or may derive motion information based on a candidate indicated by the merge index information and generate a predicted sample of the current block based on the motion information.

[0270] Meanwhile, according to one embodiment, if the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning mode are not available, the regular merge mode may be applied to the current block.

[0271] In this case, the inter prediction mode information includes merge index information indicating one of merge candidates included in the merge candidate list of the current block, and motion information of the current block can be derived based on the candidate indicated by the merge index information. Also, a predicted sample of the current block can be generated based on the derived motion information.

[0272] For example, the inter prediction mode information may include a first flag indicating whether the MMVD mode is applied, a second flag indicating whether the merge sub-block mode is applied, and a third flag indicating whether the CIIP mode is applied.

[0273] For example, if the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning mode are not available, the values of the first flag, the second flag, and the third flag may all be 0.

[0274] Also, for example, the inter prediction mode information may include a general merge flag indicating whether a merge mode is available for the current block, and the value of the general merge flag may be 1.

[0275] For example, if the value of the general merge flag is 1, the first flag, the second flag, and the third flag may be signaled.

[0276] For example, a flag for enabling or disabling the partitioning mode may be included in the Sequence Parameter Set (SPS) of the video information, and the value of a fourth flag indicating whether the partitioning mode is applied may be set to 0 based on when the partitioning mode is disabled.

[0277] Meanwhile, the inter prediction mode information may further include a fifth flag indicating whether the regular merge mode is applied. Even if the value of the fifth flag is 0, the regular merge mode may be applied to the current block if the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning mode are not available.

[0278] In this case, the motion information of the current block may be derived based on a first merging candidate among merging candidates included in a merging candidate list of the current block, and the prediction sample may be generated based on the motion information of the current block derived based on the first merging candidate.

[0279] Alternatively, in this case, motion information of the current block may be derived based on the (0,0) motion vector, and the predicted sample may be generated based on the motion information of the current block derived based on the (0,0) motion vector.

[0280] The decoding apparatus may generate reconstructed samples based on the predicted samples (S1530). For example, the decoding apparatus may generate reconstructed samples based on the predicted samples and the residual samples, and reconstructed blocks and pictures may be derived based on the reconstructed samples.

[0281] Although not shown in FIG. 15, for example, a decoding device can derive residual samples based on residual-related information included in the video information.

[0282] For example, a decoding device may decode a bitstream or encoded information to obtain video information including all or part of the above-described information (or syntax elements). The bitstream or encoded information may be stored in a computer-readable storage medium, and the above-described decoding method may be performed.

[0283] In the above-described embodiments, the methods are described with reference to flow charts as a series of steps or blocks, but the embodiments are not limited to the order of the steps, and certain steps may occur in a different order or simultaneously with other steps than those described. Furthermore, those skilled in the art will understand that the steps shown in the flow charts are not exclusive, and other steps may be included, or one or more steps in the flow charts may be deleted without affecting the scope of the embodiments herein.

[0284] The methods according to the embodiments of the present document described above can be implemented in software form, and the encoding device and / or decoding device according to the present document can be included in devices that perform video processing, such as TVs, computers, smartphones, set-top boxes, and display devices.

[0285] In this document, when an embodiment is implemented in software, the method described above may be implemented with modules (processes, functions, etc.) that perform the functions described above. The modules may be stored in memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor in various well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include read-only memory (ROM), random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described herein may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored on a digital storage medium.

[0286] In addition, the decoding device and encoding device to which the embodiment(s) of this document are applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interaction device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top (OTT) video (over-the-top) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an augmented reality (AR) device, an image telephone video device, a vehicle terminal (e.g., a vehicle terminal (including an autonomous vehicle), an airplane terminal, a ship terminal, etc.), a medical video device, etc., and may be used to process a video signal or a data signal. For example, over-the-top (OTT) video (over-the-top) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.

[0287] In addition, a processing method to which the embodiment(s) of this document is applied may be produced in the form of a computer-executable program and stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiment(s) of this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. Examples of the computer-readable recording medium include Blu-ray Discs (BDs), Universal Serial Buses (USBs), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. The computer-readable recording medium also includes media embodied in the form of carrier waves (e.g., transmission via the Internet). A bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0288] Furthermore, the embodiment(s) of this document may be embodied in a computer program product by program code, which may be executed by a computer in accordance with the embodiment(s) of this document, and which may be stored on a computer-readable carrier.

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

[0290] As shown in FIG. 17, a content streaming system to which the embodiments of this document are applied can broadly include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.

[0291] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.

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

[0293] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, which then transmits the multimedia data to the user. In this case, the content streaming system may include a separate control server, which controls commands and responses between devices in the content streaming system.

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

[0295] Examples of the user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, head-mounted displays (HMDs)), digital TVs, desktop computers, and digital signs.

[0296] Each server in the content streaming system can be operated as a distributed server, in which case data received by each server can be processed in a distributed manner.

[0297] The claims described herein may be combined in various ways. For example, the technical features of the method claims herein may be combined and embodied in an apparatus, and the technical features of the apparatus claims herein may be combined and embodied in a method. Furthermore, the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied in an apparatus, and the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied in a method.

Claims

1. A video decoding method performed by a decoding device, comprising: receiving video information including inter-prediction mode information via a bitstream; determining a prediction mode of a current block based on the inter prediction mode information; generating a prediction sample by performing inter prediction on the current block based on the prediction mode; generating reconstructed samples based on the predicted samples; a first enable flag specifying whether a combined inter-picture merge and intra-picture prediction mode (CIIP mode) is enabled, and a second enable flag specifying whether a partitioning prediction mode for performing prediction by dividing the current block into two partitions is enabled, are included in a sequence parameter set of the video information; The inter prediction mode information is a regular merge flag that specifies whether regular merge mode is applied to the current block; a merge sub-block flag specifying whether merge sub-block mode applies to the current block; an mmvd merge flag specifying whether MMVD (merge mode with motion vector difference) mode is applied to the current block; or at least one CIIP flag specifying whether the CIIP mode is applied to the current block; the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning prediction mode are not available based on the value of the first enable flag for the CIIP mode being equal to 0, the value of the second enable flag for the partitioning prediction mode being equal to 0, the value of the merge sub-block flag being equal to 0, and the value of the mmvd merge flag being equal to 0; The regular merge mode is applied to the current block, and merge index information is signaled based on the maximum number of merge candidates being greater than a specific value; the inter prediction mode information includes the merge index information indicating one of the merge candidates included in a merge candidate list of the current block; the one of the merging candidates included in the merging candidate list is used to derive motion information of the current block; The method of video decoding, wherein the prediction samples are generated based on the motion information derived based on the particular merge candidate in the merge candidate list.

2. A video encoding method performed by an encoding device, comprising: determining an inter prediction mode of a current block and generating inter prediction mode information representing the inter prediction mode; generating a prediction sample by performing inter prediction on the current block based on the inter prediction mode; encoding video information including the inter-prediction mode information; a first enable flag specifying whether a combined inter-picture merge and intra-picture prediction mode (CIIP mode) is enabled, and a second enable flag specifying whether a partitioning prediction mode for performing prediction by dividing the current block into two partitions is enabled, are included in a sequence parameter set of the video information; The inter prediction mode information is a regular merge flag that specifies whether regular merge mode is applied to the current block; a merge sub-block flag specifying whether merge sub-block mode applies to the current block; an mmvd merge flag specifying whether MMVD (merge mode with motion vector difference) mode is applied to the current block; or at least one CIIP flag specifying whether the CIIP mode is applied to the current block; the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning prediction mode are not available based on the value of the first enable flag for the CIIP mode being equal to 0, the value of the second enable flag for the partitioning prediction mode being equal to 0, the value of the merge sub-block flag being equal to 0, and the value of the mmvd merge flag being equal to 0; The regular merge mode is applied to the current block, and merge index information is signaled based on the maximum number of merge candidates being greater than a specific value; the inter prediction mode information includes the merge index information indicating one of the merge candidates included in a merge candidate list of the current block; the one of the merging candidates included in the merging candidate list is used to derive motion information of the current block; The video encoding method, wherein the prediction sample is generated based on the motion information derived based on the particular merge candidate in the merge candidate list.

3. A method for transmitting data for video, comprising: generating a bitstream for the video, the bitstream comprising: determining an inter prediction mode of a current block and generating inter prediction mode information representing the inter prediction mode; generating a prediction sample by performing inter prediction on the current block based on the inter prediction mode; encoding video information including the inter-prediction mode information; transmitting the data including the bitstream; a first enable flag specifying whether a combined inter-picture merge and intra-picture prediction mode (CIIP mode) is enabled, and a second enable flag specifying whether a partitioning prediction mode for performing prediction by dividing the current block into two partitions is enabled, are included in a sequence parameter set of the video information; The inter prediction mode information is a regular merge flag that specifies whether regular merge mode is applied to the current block; a merge sub-block flag specifying whether merge sub-block mode applies to the current block; an mmvd merge flag specifying whether MMVD (merge mode with motion vector difference) mode is applied to the current block; or at least one CIIP flag specifying whether the CIIP mode is applied to the current block; the MMVD mode, the merge sub-block mode, the CIIP mode, and the partitioning prediction mode are not available based on the value of the first enable flag for the CIIP mode being equal to 0, the value of the second enable flag for the partitioning prediction mode being equal to 0, the value of the merge sub-block flag being equal to 0, and the value of the mmvd merge flag being equal to 0; The regular merge mode is applied to the current block, and merge index information is signaled based on the maximum number of merge candidates being greater than a specific value; the inter prediction mode information includes the merge index information indicating one of the merge candidates included in a merge candidate list of the current block; the one of the merging candidates included in the merging candidate list is used to derive motion information of the current block; The method of transmitting, wherein the prediction samples are generated based on the motion information derived based on the particular merging candidate in the merging candidate list.