Motion prediction-based video coding method and apparatus

The proposed video coding method enhances compression efficiency and inter-prediction by deriving prediction modes from bitstream conditions, addressing the challenges of high-resolution and immersive media data transmission and storage.

JP7860172B2Active Publication Date: 2026-05-15LG ELECTRONICS INC
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
LG ELECTRONICS INC
Filing Date
2024-06-26
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality images/videos, as well as immersive media, necessitates a highly efficient video coding technology to compress, transmit, and store this data effectively while minimizing transmission and storage costs.

Method used

A method and apparatus for video coding that includes deriving the prediction mode of a current block based on a bitstream, generating a prediction sample, and a restored sample, utilizing a CIIP availability flag and block size conditions to enhance inter-prediction efficiency and reduce unnecessary signaling.

Benefits of technology

Improves overall video compression efficiency, enables efficient inter-prediction, and reduces unwanted syntax signaling during interpretation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007860172000044
    Figure 0007860172000044
  • Figure 0007860172000045
    Figure 0007860172000045
  • Figure 0007860172000046
    Figure 0007860172000046
Patent Text Reader

Abstract

To provide a method and device for improving video coding efficiency.SOLUTION: A decoding method carried out by a decoding device comprises the steps of: acquiring, from a bitstream, information associated with a prediction mode of a current block; deriving a prediction mode of the current block on the basis of the information associated with the prediction mode; deriving prediction samples of the current block on the basis of the prediction mode; and generating reconstructed samples on the basis of the prediction samples. The bitstream comprises a sequence parameter set. The sequence parameter set comprises a CIIP enable flag. The step for deriving may comprise a step for parsing a regular merge flag from the bitstream on the basis of satisfaction of a condition based on the CIIP enable flag and a condition based on the size of the current block.SELECTED DRAWING: Figure 15
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present technology relates to a method and apparatus for coding video based on motion prediction.

Background Art

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

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

[0004] Therefore, there is a need for a highly efficient image / video compression technology to effectively compress, transmit, store, and reproduce the information of high-resolution and high-quality images / videos having various characteristics as described above.

Summary of the Invention

Problems to be Solved by the Invention

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

[0006] Another technical problem of this document is to provide a method and apparatus for efficiently performing inter prediction.

[0007] Another technical objective of this paper is to provide a method and apparatus for preventing unwanted signaling during interpretation. [Means for solving the problem]

[0008] According to one embodiment of this document, a decoding method performed by a decoding device includes the steps of: obtaining information about the prediction mode of the current block from a bitstream; deriving the prediction mode of the current block based on the information about the prediction mode; generating a prediction sample of the current block based on the prediction mode; and generating a restored sample based on the prediction sample, wherein the bitstream includes a sequence parameter set, the sequence parameter set includes a CIIP (combined inter-picture merge and intra-picture prediction) availability flag, and the derivation step may include the step of parsing a regular merge flag from the bitstream based on whether a condition based on the CIIP availability flag and a condition based on the size of the current block are met.

[0009] According to other embodiments of this document, an encoding method performed by an encoding device includes the steps of determining the prediction mode of the current block, generating information about the prediction mode based on the prediction mode, and encoding video information including the information about the prediction mode, wherein the video information includes a sequence parameter set, the sequence parameter set includes a CIIP availability flag, and the video information includes a regular merge flag based on whether a condition based on the CIIP availability flag and a condition based on the size of the current block are met.

[0010] In another embodiment of this document, a computer-readable digital storage medium includes information causing a decoding device to perform a decoding method, the decoding method comprising the steps of: obtaining information about the prediction mode of a current block from a bitstream; deriving the prediction mode of the current block based on the information about the prediction mode; generating a prediction sample of the current block based on the prediction mode; and generating a restored sample based on the prediction sample, wherein the bitstream includes a sequence parameter set, the sequence parameter set includes a CIIP availability flag, and the deriving step includes parsing a regular merge flag from the bitstream based on conditions based on the CIIP availability flag and conditions based on the size of the current block. [Effects of the Invention]

[0011] According to one embodiment of this document, the overall video compression efficiency can be improved.

[0012] According to one embodiment of this document, inter-prediction can be performed efficiently.

[0013] According to one embodiment of this document, unnecessary syntax signaling can be efficiently removed during interpretation. [Brief explanation of the drawing]

[0014] [Figure 1] This document outlines examples of video / image coding systems to which the embodiments described herein can be applied. [Figure 2] This diagram schematically illustrates the configuration of a video / image encoding device to which the embodiments described in this document can be applied. [Figure 3] This diagram schematically illustrates the configuration of a video / image decoding device to which the embodiments described in this document can be applied. [Figure 4]An example of an inter-prediction-based video / video encoding method is shown. [Figure 5] An example of an inter-prediction-based video / video decoding method is shown. [Figure 6] An example of an inter-prediction procedure is illustratively shown. [Figure 7] It is a diagram for explaining spatial candidates that can be used for inter-prediction. [Figure 8] It is a diagram for explaining a merge mode having a motion vector difference that can be used during inter-prediction. [Figure 9] It is a diagram for explaining a sub-block-based temporal motion vector prediction process that can be used during inter-prediction. [Figure 10] It is a diagram for explaining a sub-block-based temporal motion vector prediction process that can be used during inter-prediction. [Figure 11] It is a diagram for explaining a partitioning mode applicable to inter-prediction. [Figure 12] It is a diagram for explaining a CIIP mode applicable to inter-prediction. [Figure 13] An example of a video / video encoding method including an inter-prediction method according to an embodiment of this document and related components is schematically shown. [Figure 14] An example of a video / video encoding method including an inter-prediction method according to an embodiment of this document and related components is schematically shown. [Figure 15] An example of a video / video decoding method including an inter-prediction method according to an embodiment of this document and related components is schematically shown. [Figure 16] An example of a video / video decoding method including an inter-prediction method according to an embodiment of this document and related components is schematically shown. [Figure 17] An example of a content streaming system to which the embodiments disclosed in this document can be applied is shown.

Modes for Carrying Out the Invention

[0015] The disclosure of this document can be modified in various ways and can have various embodiments. Therefore, specific embodiments will be illustrated in the drawings and described in detail. The terms used in this document are merely used to describe specific embodiments and are not intended to limit the technical concept of this document. Singular expressions include the expression "at least one" unless the context clearly has a different meaning. Terms such as "including" or "having" in this document are intended to specify the existence of the features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and it should be understood that the existence or possibility of addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof is not precluded in advance.

[0016] On the other hand, each configuration on the drawings described in this document is independently illustrated for the convenience of explaining different characteristic functions, and it does not mean that each configuration is realized by separate hardware or separate software. For example, among each configuration, two or more configurations can be combined to form one configuration, and one configuration can also be divided into multiple configurations. Embodiments in which each configuration is integrated and / or separated are included in the disclosure scope of this document as long as they do not deviate from the essence of the method disclosed in this document.

[0017] Hereinafter, embodiments of this document will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used for the same components on the drawings, and duplicate descriptions regarding the same components will be omitted.

[0018] FIG. 1 schematically shows an example of a video / video coding system to which embodiments of this document can be applied.

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

[0020] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be called a video / image encoding device, and the decoding device may be called 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 consist of a separate device or external component.

[0021] A video source can acquire video / images through processes such as video / image capture, synthesis, or generation. A video source may include video / image capture devices and / or video / image generation devices. Video / image capture devices may include, for example, one or more cameras, or video / image archives containing previously captured video / images. Video / image generation devices may include, for example, computers, tablets, and smartphones, and can generate video / images (electronically). For example, virtual video / images may be generated via a computer, in which case the video / image capture process can be replaced by the process of generating the relevant data.

[0022] An encoding device can encode input video / image data. For compression and coding efficiency, the encoding device can perform a series of steps, including prediction, transformation, and quantization. The encoded data (encoded video / image information) can be output in bitstream format.

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

[0024] A decoding device can decode video / images by performing a series of steps, such as inverse quantization, inverse transformation, and prediction, corresponding to the operation of an encoding device.

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

[0026] This document relates to video / image coding. For example, the methods / examples disclosed in this document are applicable to the methods disclosed in the VVC (versatile video coding) standard. Furthermore, the methods / examples disclosed in this document are applicable to the methods disclosed in the EVC (essential video coding) standard, AV1 (AOMedia Video 1) standard, AVS2 (2nd generation of audio video coding standard), or next-generation video / image coding standards (e.g., H.267, H.268, etc.).

[0027] This document presents various examples of video / image coding, and unless otherwise noted, these examples can be combined with each other.

[0028] In this document, at least one of quantization / inverse quantization and / or transformation / inverse transformation may be omitted. If quantization / inverse quantization is omitted, the quantized transformation coefficients may be called transformation coefficients. If transformation / inverse transformation is omitted, the transformation coefficients may be called coefficients or residual coefficients, or for consistency of expression, they may be called transformation coefficients.

[0029] In this document, quantized transformation coefficients and transformation coefficients may also be referred to as transformation coefficients and scaled transformation coefficients, respectively. In this case, residual information includes information about the transformation coefficients, which can be signaled via residual coding syntax. Based on the residual information (or information about the transformation coefficients), transformation coefficients can be derived, and scaled transformation coefficients can be derived by an inverse transformation (scaling) of the transformation coefficients. Based on an inverse transformation (transformation) of the scaled transformation coefficients, residual samples can be derived. This can be similarly applied / expressed in other parts of this document.

[0030] In this document, "video" can mean a collection of images over time. "Picture" generally refers to a unit representing a single image at a specific time point in time, while "slice" or "tile" is a unit that constitutes part of a picture in coding. A slice or tile contains one or more CTUs (coding tree units). A picture consists of one or more slices or tiles. A picture consists of one or more tile groups. A tile group contains one or more tiles. A brick represents a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consists of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set.The tile row is a rectangular region of CTUs having a height specified by syntax elements in the picture parameter set and a width equal to the width of the picture. A tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit. A slice may consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile. In this document, tile groups and slices may be used interchangeably.For example, in this document, tile group / tile group header may also be called slice / slice header.

[0031] A pixel or pel can refer to the smallest unit that makes up a picture (or image). Alternatively, the term "sample" can be used as a counterpart to pixel. A sample can generally represent a pixel or a pixel value, or it can represent only the luma component pixel / pixel value, or only the chroma component pixel / pixel value. Alternatively, a sample can refer to a pixel value in the spatial domain, and if such a pixel value is converted to the frequency domain, it can also refer to the conversion coefficient in the frequency domain.

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

[0033] In this document, the terms " / " and "," should be interpreted as "and / or". For example, "A / B" is interpreted as "A and / or B," and "A, B" is interpreted as "A and / or B." Additionally, "A / B / C" means "at least one of A, B, and / or C." Similarly, "A, B, C" also means "at least one of A, B, and / or C."

[0034] Furthermore, in this document, "or" should be interpreted as "and / or." For example, "A or B" may mean 1) only "A," 2) only "B," or 3) both "A and B." In other words, "or" in this document may mean "additionally or alternatively."

[0035] Figure 2 is a schematic diagram illustrating the configuration of a video / image encoding device to which the embodiments described in this document can be applied. Hereinafter, "video encoding device" includes image encoding devices.

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

[0037] The image splitting unit 210 can split 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 can be recursively split from a coding tree unit (CTU) or the largest coding unit (LCU) using a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, one coding unit can be split into multiple coding units of deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, followed by the binary-tree structure and / or the ternary structure. Alternatively, the binary-tree structure may be applied first. The coding procedure according to this disclosure may be performed based on the final coding unit that is not further split. In this case, based on coding efficiency due to image characteristics, the largest coding unit can be used as the final coding unit, or, if necessary, the coding unit can be recursively divided into lower-depth coding units so that the optimally sized coding unit is 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 comprise a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit can each be separated or partitioned from the final coding unit described above.The prediction unit may be a unit of sample prediction, and the conversion unit may be a unit for deriving conversion coefficients and / or a unit for deriving a residual signal from conversion coefficients.

[0038] The term "unit" can sometimes be used interchangeably with terms such as "block" or "area." Generally, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and may represent only the luminance (luma) component pixel / pixel value, or only the chroma component pixel / pixel value. A sample can be used as the term corresponding to a single picture (or image) pixel or pel.

[0039] The encoding device 200 generates a residual signal (residual block, residual sample array) by subtracting the prediction signal (predicted block, predicted sample array) output from the inter-prediction unit 221 or intra-prediction unit 222 from the input video signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, the unit that subtracts the prediction signal (predicted block, predicted sample array) from the input video signal (original block, original sample array) within the encoder 200 is called the subtraction unit 231. The prediction unit 220 makes predictions for the block to be processed (hereinafter referred to as the current block) and can generate a predicted block that includes predicted samples for the current block. The prediction unit 220 determines whether intra-prediction or inter-prediction is applied on a current block or CU basis. The prediction unit 220 can generate various prediction-related information, such as prediction mode information, as will be described later in the explanation of each prediction mode, and transmit it to the entropy encoding unit 240. Information regarding the prediction can be encoded in the entropy encoding unit 240 and output in the form of a bitstream.

[0040] The intra-prediction unit 222 can predict the current block by referring to a sample in the current picture. The referenced sample may be located adjacent to the current block or at a distance, depending on the prediction mode. The prediction mode in intra-prediction may include multiple non-directional modes and multiple directional modes. Non-directional modes may include, for example, DC mode and planar mode. Directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes, depending on the degree of fineness of the prediction direction. However, this is illustrative, and more or fewer directional prediction modes may be used depending on the settings. The intra-prediction unit 222 may also determine the prediction mode to apply to the current block using the prediction modes applied to adjacent blocks.

[0041] The interprediction unit 221 can derive a predicted block relative to the current block based on a reference block (reference sample array) identified by motion vectors on the reference picture. In this case, in order to reduce the amount of motion information transmitted in interprediction mode, motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between adjacent blocks and the current block. The motion information may include motion vectors and reference picture indices. The motion information may further include interprediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of interprediction, adjacent blocks may include spatially adjacent blocks that exist in the current picture and temporally adjacent blocks that exist in the reference picture. The reference picture containing the reference block and the reference picture containing the temporally adjacent block may be the same or different. The temporally adjacent block may be called a collocated reference block, col CU, etc., and the reference picture containing the temporally adjacent block may be called a collocated picture (colPic). For example, the inter-prediction unit 221 can construct a motion information candidate list based on adjacent blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter-prediction can be performed based on various prediction modes, and for example, in skip mode and merge mode, the inter-prediction unit 221 can use the motion information of adjacent blocks as the motion information of the current block. In skip mode, unlike merge mode, a residual signal may not be transmitted.In motion vector prediction (MVP) mode, the motion vector of an adjacent block is used as a motion vector predictor, and the motion vector difference is signaled to indicate the motion vector of the current block.

[0042] The prediction unit 220 generates prediction signals based on various prediction methods described later. For example, the prediction unit 200 can apply intra-prediction or inter-prediction for predictions on a single block, and can also apply intra-prediction and inter-prediction simultaneously. This is called combined inter and intra prediction (CIIP). The prediction unit may also be based on an intra-block copy (IBC) prediction mode or a palette mode for predictions on blocks. The IBC prediction mode or palette mode can be used, for example, for content video / video coding such as in games, as in SCC (screen content coding). IBC basically performs predictions within the current picture, but is similar to inter-prediction in that it derives reference blocks within the current picture. That is, IBC can utilize at least one of the inter-prediction techniques described in this document. Palette mode can be considered an example of intra-coding or intra-prediction. When palette mode is applied, sample values ​​within the picture can be signaled based on information about the palette table and palette index.

[0043] The prediction signal generated via the prediction unit (including the inter-prediction unit 221 and / or the intra-prediction unit 222) can be used to generate a restored signal or to generate a residual signal.

[0044] The transformation unit 232 can generate transformation coefficients by applying transformation techniques to the residual signal. For example, the transformation techniques include at least one of DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT refers to a transformation obtained from a graph when relational information between pixels is represented by this graph. CNT refers to a transformation obtained by generating a prediction signal using all previously reconstructed pixels and based on that. Furthermore, the transformation process may be applied to pixel blocks of the same size and square shape, or to non-square blocks of variable size.

[0045] The quantization unit 233 quantizes the conversion coefficients and transmits them to the entropy encoding unit 240, which encodes the quantized signal (information about the quantized conversion coefficients) and outputs it as a bitstream. The information about the quantized conversion coefficients may also be called residual information. The quantization unit 233 can also rearrange the block-shaped quantized conversion coefficients into a one-dimensional vector form based on the coefficient scan order, and generate information about the quantized conversion coefficients based on the one-dimensional vector form of the quantized conversion coefficients.

[0046] The entropy encoding unit 240 can perform various encoding methods, such as exponential Golomb, CAVLC (context-adaptive variable length coding), and CABAC (context-adaptive binary arithmetic coding). In addition to the quantized conversion coefficients, the entropy encoding unit 240 can also encode information necessary for video / image restoration (e.g., the values ​​of syntax elements) together with or separately. The encoded information (e.g., encoded video / image information) can be transmitted or stored in bitstream form in units of NAL (network abstraction layer) units. The video / image information further includes information about various parameter sets, such as the adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). The video / image information may also further include general constraint information. In this document, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device are included in video / image information. The video / image information is encoded via the encoding procedure described above and included in the bitstream. The bitstream may be transmitted over a network or stored in a digital storage medium. Here, the network includes broadcast networks and / or communication networks, and the digital storage medium includes various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) that transmits and / or stores the signal output from the entropy encoding unit 240 may be configured as an internal / external element of the encoding device 200, or the transmitting unit may be included in the entropy encoding unit 240.

[0047] The quantized conversion coefficients output from the quantization unit 233 can be used to generate a prediction signal. For example, the residual signal (residual block or residual sample) is reconstructed by applying inverse quantization and inverse transformation to the quantized conversion coefficients via the inverse quantization unit 234 and the inverse transformation unit 235. The adder unit 250 adds the reconstructed residual signal to the prediction signal output from the inter-prediction unit 221 or the intra-prediction unit 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the reconstructed block. The adder unit 250 may also be called the reconstruction unit or reconstructed block generation unit. The generated reconstructed signal is used for intra-prediction of the next block to be processed in the current picture, and can also be used for inter-prediction of the next picture after filtering, as described later.

[0048] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture encoding and / or restoration process.

[0049] The filtering unit 260 can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit 260 applies various filtering methods to the restored picture to generate a modified restored picture and stores the modified restored picture in the memory 270, specifically in the DPB of the memory 270. The various filtering methods include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, and bilateral filter. The filtering unit 260 generates various filtering information, as will be described later in the description of each filtering method, and transmits it to the entropy encoding unit 240. The filtering information is encoded in the entropy encoding unit 240 and output in bitstream format.

[0050] The corrected restored picture sent to memory 270 can be used as a reference picture in the interpretation unit 221. When interpretation is applied, the encoding device can avoid prediction mismatches between the encoding device 100 and the decoding device, and can also improve encoding efficiency.

[0051] The DPB in memory 270 can store the corrected restored picture for use as a reference picture in the inter-prediction unit 221. Memory 270 can store motion information of blocks from which motion information in the current picture has been derived (or encoded) and / or motion information of blocks in the picture that have already been restored. The stored motion information can be transmitted to the inter-prediction unit 221 for use as motion information of spatially adjacent blocks or motion information of temporally adjacent blocks. Memory 270 can store restored samples of restored blocks in the current picture and transmit them to the intra-prediction unit 222.

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

[0053] As shown in Figure 3, the decoding device 300 can be configured to include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an inter-prediction unit 331 and an intra-prediction unit 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. The entropy decoder 310, residual processor 320, predictor 330, adder 340, and filtering unit 350 described above can be configured by a single hardware component (e.g., a decoder chipset or processor) depending on the embodiment. The memory 360 may include a decoded picture buffer (DPB) and may also be configured by a digital storage medium. The aforementioned hardware component may also further include memory 360 as an internal / external component.

[0054] When a bitstream containing video / image information is input, the decoding device 300 can reconstruct the image in accordance with the process by which the video / image information was processed in the encoding device shown in Figure 3. 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 the processing units applied in the encoding device. Therefore, the decoding processing unit can be, for example, a coding unit, which can be divided from a coding tree unit or a maximum coding unit according to a quad-tree structure, a binary tree structure, and / or a terminally tree structure. One or more conversion units can be derived from the coding unit. The reconstructed image signal decoded and output via the decoding device 300 can then be reproduced via a playback device.

[0055] The decoding device 300 receives the signal output from the encoding device shown in Figure 2 in the form of a bitstream, and the received signal is decoded by the entropy decoding unit 310. For example, the entropy decoding unit 310 can parse the bitstream to derive information necessary for image restoration (or picture restoration) (e.g., video / image information). The video / image information may further include information about various parameter sets such as the adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). The video / image information may also further include general constraint information. The decoding device can further decode the picture based on the parameter set information and / or the general constraint information. The signaling / received information and / or syntax elements described later in this document can be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 decodes information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC (context-adaptive variable length coding), or CABAC (context-adaptive arithmetic coding), and outputs the values ​​of the syntax elements necessary for image restoration and the quantized values ​​of the conversion coefficients related to the residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using the syntax element information to be decoded and the decoding information of the surrounding and decoded blocks or the symbol / bin information decoded in a previous step, predicts the probability of bin occurrence according to the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values ​​of each syntax element.At this time, the CABAC entropy decoding method can update the context model after determining the context model by utilizing the decoded symbol / bin information for the context model of the next symbol / bin. The prediction information from the information decoded in the entropy decoding unit 310 is provided to the prediction unit (inter-prediction unit 332 and intra-prediction unit 331), and the residual values ​​that have been entropy decoded in the entropy decoding unit 310, i.e., the quantized conversion coefficients and related parameter information, can be input to the residual processing unit 320.

[0056] The residual processing unit 320 can derive residual signals (residual blocks, residual samples, residual sample arrays). Furthermore, information related to filtering from the information decoded in the entropy decoding unit 310 is provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives signals output from the encoding device may be further configured as an internal / external element of the decoding device 300, and the receiving unit may also be a component of the entropy decoding unit 310. On the other hand, the decoding device according to this document may also be called a video / image / picture decoding device, and the decoding device can be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder includes the entropy decoding unit 310, and the sample decoder includes at least one of the inverse quantization unit 321, inverse transform unit 322, adder unit 340, filtering unit 350, memory 360, inter-prediction unit 332, and intra-prediction unit 331.

[0057] The inverse quantization unit 321 can inverse quantize the quantized transformation coefficients and output the transformation coefficients. The inverse quantization unit 321 can rearrange the quantized transformation coefficients in a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scan order performed by the encoding device. The inverse quantization unit 321 can perform inverse quantization on the quantized transformation coefficients using quantization parameters (e.g., quantization step size information) and obtain the transformation coefficients.

[0058] In the inverse conversion unit 322, the conversion coefficients are inversely converted to obtain a residual signal (residual block, residual sample array).

[0059] The prediction unit 330 makes a prediction for the current block and generates a predicted block that includes prediction samples for the current block. Based on the prediction information output from the entropy decoding unit 310, the prediction unit 330 can determine whether intra-prediction or inter-prediction is applied to the current block, and can determine a specific intra / inter-prediction mode.

[0060] The prediction unit 330 can generate prediction signals based on various prediction methods described later. For example, the prediction unit can apply intra-prediction or inter-prediction for prediction of a single block, and can also apply intra-prediction and inter-prediction simultaneously. This may be called combined inter and intra prediction (CIIP). The prediction unit may also be based on intra-block copy (IBC) prediction mode or palette mode for prediction of blocks. The IBC prediction mode or palette mode can be used for content video / movie coding such as games, for example, as in SCC (screen content coding). IBC basically performs prediction within the current picture, but can be performed similarly to inter-prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter-prediction techniques described in this document. Palette mode can be considered an example of intra-coding or intra-prediction. When palette mode is applied, information about the palette table and palette index is included in the video / movie information and signaled.

[0061] The intra-prediction unit 331 can predict the current block by referring to a sample in the current picture. The referenced sample may be located in the vicinity (neighbor) of the current block or at a distance, depending on the prediction mode. In intra-prediction, the prediction mode includes multiple non-directional modes and multiple directional modes. The intra-prediction unit 331 can also determine the prediction mode to be applied to the current block using the prediction modes applied to the surrounding blocks.

[0062] The interprediction unit 332 can derive a predicted block relative to the current block based on a reference block (reference sample array) identified by a motion vector on the reference picture. At that time, in order to reduce the amount of motion information transmitted in interprediction mode, motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between surrounding blocks and the current block. The motion information includes a motion vector and a reference picture index. The motion information may further include interprediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of interprediction, surrounding blocks include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the interprediction unit 332 can construct a motion information candidate list based on the surrounding blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Interprediction can be performed based on various prediction modes, and the information regarding the prediction includes information indicating the interprediction mode for the current block.

[0063] The summing unit 340 can generate a restored signal (restored picture, restored block, restored sample array) by adding the acquired residual signal to the predicted signal (predicted block, predicted sample array) output from the prediction unit (including the inter-prediction unit 332 and / or intra-prediction unit 331). If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the restored block.

[0064] The addition unit 340 may be called the restoration unit or restoration block generation unit. The generated restoration signal can be used for intra-prediction of the next block to be processed in the current picture, and can be output after filtering as described later, or it can be used for intra-prediction of the next picture.

[0065] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture decoding process.

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

[0067] The (modified) restored picture stored in the DPB of memory 360 can be used as a reference picture in the inter-prediction unit 332. Memory 360 can store motion information of blocks from which motion information in the current picture has been derived (or decoded) and / or motion information of blocks in the picture that have already been restored. The stored motion information is transmitted to the inter-prediction unit 221 for use as motion information of spatially surrounding blocks or motion information of temporally surrounding blocks. Memory 360 can store restored samples of restored blocks in the current picture and transmit them to the intra-prediction unit 331.

[0068] 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 in a corresponding manner to the filtering unit 350, inter-prediction unit 332, and intra-prediction unit 331 of the decoding device 300, respectively.

[0069] On the other hand, as mentioned above, prediction is performed to improve compression efficiency when performing video coding. This makes it possible to generate a predicted block that includes predicted samples for the current block, which is the block to be coded. Here, the predicted block includes predicted samples in the spatial domain (or pixel domain). The predicted block is similarly derived by the encoding and decoding devices, and the encoding device can improve image coding efficiency by signaling the decoding device with information about the residual between the original block and the predicted block (residual information), which is not the original sample value of the original block itself. The decoding device can derive a residual block that includes residual samples based on the residual information, and can generate a restored block that includes restored samples by adding the residual block and the predicted block, and can generate a restored picture that includes the restored block.

[0070] The residual information can be generated through transformation and quantization procedures. For example, an encoding device can signal the relevant residual information (via a bitstream) to a decoding device by deriving a residual block between the original block and the predicted block, performing a transformation procedure on the residual samples (residual sample array) contained in the residual block to derive transformation coefficients, and performing a quantization procedure on the transformation coefficients to derive quantized transformation coefficients. Here, the residual information may include information such as the value information, position information, transformation technique, transformation kernel, and quantization parameters of the quantized transformation coefficients. The decoding device can derive a residual sample (or residual block) by performing an inverse quantization / inverse transformation procedure based on the residual information. The decoding device can generate a reconstructed picture based on the predicted block and the residual block. The encoding device can also derive a residual block by inverse quantization / inverse transformation of the quantized transformation coefficients for reference for subsequent interpretation of the picture, and generate a reconstructed picture based on this.

[0071] When inter-prediction is applied to the current block, the prediction unit of the encoding / decoding device can perform inter-prediction on a block-by-block basis to derive predicted samples. Inter-prediction is a prediction derived in a manner that is dependent on data elements (e.g., sample values ​​or motion information) of picture(s) other than the current picture. When inter-prediction is applied to the current block, a predicted block (predicted sample array) for the current block can be derived based on a reference block (reference sample array) identified by a motion vector on the reference picture pointed to by the reference picture index. At this time, in order to reduce the amount of motion information transmitted in inter-prediction mode, the motion information of the current block can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between surrounding blocks and the current block. The motion information includes a motion vector and a reference picture index. The motion information may further include information on the inter-prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). When interpretation is applied, a surrounding block includes a spatial neighboring block currently present in the picture and a temporal neighboring block present in the reference picture. The reference picture containing the reference block and the reference picture containing the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block or colCU, and the reference picture containing the temporal neighboring block may be called a collocated picture (colPic).For example, a list of motion information candidates may be constructed based on the surrounding blocks of the current block, and flags or index information may be signaled indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block. Interpretation can be performed based on various prediction modes; for example, in skip mode and (normal) merge mode, the motion information of the current block may be the same as the motion information of the selected surrounding blocks. In skip mode, unlike merge mode, a residual signal may not be transmitted. In motion vector prediction (MVP) mode, the motion vector of the selected surrounding block may be used as a motion vector predictor, and the motion vector difference may be signaled. In this case, the motion vector of the current block can be derived using the sum of the motion vector predictor and the motion vector difference.

[0072] The video / image encoding procedure based on interpretation broadly includes, for example, the following:

[0073] Figure 4 shows an example of an interpretation-based video / image encoding method.

[0074] The encoding device performs interpretation for the current block (S400). The encoding device derives the interpretation mode and motion information of the current block and generates a prediction sample for the current block. Here, the procedures for determining the interpretation mode, deriving motion information, and generating the prediction sample may be performed simultaneously, or one procedure may be performed before the others. For example, the interpretation unit of the encoding device includes a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit determines the prediction mode for the current block, the motion information derivation unit derives the motion information of the current block, and the prediction sample derivation unit derives a prediction sample for the current block. For example, the interpretation unit of the encoding device can search for blocks similar to the current block within a certain area (search area) of the reference picture by motion estimation and derive a reference block whose difference from the current block is the minimum or below a certain standard. Based on this, a reference picture index pointing to the reference picture in which the reference block is located is derived, and a motion vector is derived based on the positional difference between the reference block and the current block. The encoding device can determine which of the various prediction modes is to be applied to the current block. The encoding device can compare the rate-distortion (RD) costs for the various prediction modes and determine the optimal prediction mode for the current block.

[0075] For example, when skip mode or merge mode is applied to the current block, the encoding device can configure a merge candidate list (described later) and derive a reference block from among the reference blocks pointed to by the merge candidates included in the merge candidate list whose difference from the current block is the minimum or below a certain standard. In this case, a merge candidate related to the derived reference block is selected, and merge index information pointing to the selected merge candidate is generated and signaled to the decoding device. The movement information of the current block can be derived using the movement information of the selected merge candidate.

[0076] As another example, when the (A)MVP mode is applied to the current block, the encoding device can configure the (A)MVP candidate list described later, and use the motion vector of the selected mvp candidate from among the mvp (motion vector predictor) candidates included in the (A)MVP candidate list as the mvp of the current block. In this case, for example, the motion vector pointing to the reference block derived by the motion estimation described above can be used as the motion vector of the current block, and the mvp candidate having the motion vector with the smallest difference from the motion vector of the current block among the mvp candidates may become the selected mvp candidate. The MVD (motion vector difference), which is the difference obtained by subtracting the mvp from the motion vector of the current block, can be derived. In that case, information regarding the MVD can be signaled to the decoding device. Also, when the (A)MVP mode is applied, the value of the reference picture index is composed of reference picture index information and is separately signaled to the decoding device.

[0077] The encoding device derives a residual sample based on the predicted sample (S410). The encoding device can derive the residual sample by comparing the original sample of the current block with the predicted sample.

[0078] The encoding device encodes video information including prediction information and residual information (S420). The encoding device can output the encoded video information in bitstream format. The prediction information is information related to the prediction procedure and includes prediction mode information (e.g., skip flag, merge flag, or mode index) and motion information. The motion information includes candidate selection information (e.g., merge index, mvp flag, or mvp index) which is information for deriving a motion vector. The motion information also includes the aforementioned MVD information and / or reference picture index information. The motion information also includes information indicating whether L0 prediction, L1 prediction, or bi prediction is applied. The residual information is information about the residual sample. The residual information includes information about the quantized conversion coefficients for the residual sample.

[0079] The output bitstream is stored in a (digital) storage medium and transmitted to a decoding device, or it can also be transmitted to a decoding device via a network.

[0080] On the other hand, as mentioned above, the encoding device can generate a reconstructed picture (including a reconstructed sample and a reconstructed block) based on the reference sample and the residual sample. This is because the encoding device can derive the same prediction results as the decoding device, thereby improving coding efficiency. Therefore, the encoding device can store the reconstructed picture (or reconstructed sample, reconstructed block) in memory and use it as a reference picture for interpretation. As mentioned above, in-loop filtering procedures and the like can be further applied to the reconstructed picture.

[0081] The video / image decoding procedure based on interpretation broadly includes, for example, the following:

[0082] Figure 5 shows an example of an interpretation-based video / image decoding method.

[0083] As shown in Figure 5, the decoding device can perform operations corresponding to those performed by the encoding device. The decoding device can make predictions for the current block based on the received prediction information and derive prediction samples.

[0084] Specifically, the decoding device determines the prediction mode for the current block based on the received prediction information (S500). Based on the prediction mode information in the prediction information, the decoding device determines which interpretation mode is applied to the current block.

[0085] For example, based on the merge flag, it can be determined whether the merge mode or (A)MVP mode is applied to the current block. Alternatively, one of several inter-prediction mode candidates can be selected based on the mode index. The inter-prediction mode candidates include skip mode, merge mode and / or (A)MVP mode, or include various inter-prediction modes as described below.

[0086] The decoding device derives motion information for the current block based on the determined interprediction mode (S510). For example, if a skip mode or merge mode is applied to the current block, the decoding device can configure a merge candidate list, which will be described later, and select one of the merge candidates included in the merge candidate list. The selection is made based on the selection information (merge index) described above. The motion information for the current block can be derived using the motion information for the selected merge candidate. The motion information for the selected merge candidate can be used as the motion information for the current block.

[0087] As another example, when the (A)MVP mode is applied to the current block, the decoding device can configure the (A)MVP candidate list described below, and use the motion vector of the selected mvp candidate from among the mvp (motion vector predictor) candidates included in the (A)MVP candidate list as the mvp of the current block. The selection is made based on the selection information (mvp flag or mvp index) described above. In this case, the MVD of the current block can be derived based on the information regarding the MVD, and the motion vector of the current block can be derived based on the mvp of the current block and the MVD. Furthermore, the reference picture index of the current block can be derived based on the reference picture index information. Within the reference picture list for the current block, the picture pointed to by the reference picture index can be derived as the reference picture referenced for interpretation of the current block.

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

[0089] The decoding device generates predicted samples for the current block based on the motion information of the current block (S520). In this case, the reference picture can be derived based on the reference picture index of the current block, and the predicted samples for the current block can be derived using the sample of the reference block pointed to by the motion vector of the current block on the reference picture. In this case, as will be described later, a further procedure of filtering all or some of the predicted samples for the current block may be performed.

[0090] For example, the interpretation unit of the decoding device includes a prediction mode determination unit, a motion information derivation unit, and a prediction sample derivation unit. The prediction mode determination unit determines the prediction mode for the current block based on the received prediction mode information, the motion information derivation unit derives motion information (such as motion vectors and / or reference picture indices) for the current block based on the received motion information, and the prediction sample derivation unit derives prediction samples for the current block.

[0091] The decoding device generates a residual sample for the current block based on the received residual information (S530). The decoding device generates a restored sample for the current block based on the predicted sample and the residual sample, and generates a restored picture based on this (S540). As previously mentioned, in-loop filtering procedures and the like can then be applied to the restored picture.

[0092] Figure 6 illustrates the interpretation prediction procedure.

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

[0094] As shown in Figure 6, the coding device determines the interpretation mode for the current block (S600). Various interpretation modes are used for predicting the current block in the picture. For example, various modes such as merge mode, skip mode, MVP (motion vector prediction) mode, affine mode, subblock merge mode, MMVD (merge with MVD) mode, and HMVP (historical motion vector prediction) mode can be used. Additional modes such as DMVR (decoder side motion vector refinement) mode, AMVR (adaptive motion vector resolution) mode, BCW (Bi-prediction with CU-level weight), and BDOF (Bi-directional optical flow) can be used further or instead. The affine mode may also be called "affine motion prediction mode". The MVP mode may also be called the AMVP (advanced motion vector prediction) mode. In this document, motion information candidates derived from some modes and / or some modes may be included as one of the motion information related candidates for other modes. For example, an HMVP candidate may be added as a merge candidate in the merge / skip mode, or as an mvp candidate in the MVP mode.

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

[0096] On the other hand, the current block is signaled with information indicating whether the aforementioned list0(L0) prediction, list1(L1) prediction, or bi-prediction is used in the current block (current coding unit). This information may also be called motion prediction direction information, inter-prediction direction information, or inter-prediction instruction information, and can be composed / encoded / signaled, for example, in the form of an inter_pred_idc syntax element. That is, the inter_pred_idc syntax element can indicate whether the aforementioned list0(L0) prediction, list1(L1) prediction, or bi-prediction is used in the current block (current coding unit). For the sake of clarity, in this document, the inter-prediction type (L0 prediction, L1 prediction, or BI prediction) pointed to by the inter_pred_idc syntax element may be represented as motion prediction direction. L0 prediction may be represented as pred_L0, L1 prediction as pred_L1, and bi-prediction as pred_BI. For example, depending on the value of the inter_pred_idc syntax element, the following prediction types can be indicated:

[0097] As mentioned above, a single picture contains one or more slices. A slice has one of three slice types, including I (intra) slices, P (predictive) slices, and B (bi-predictive) slices. The slice type is indicated based on the slice type information. For blocks in an I slice, only intra prediction is used for prediction; inter-predictive prediction is not used. Of course, even in this case, it is possible to code and signal the original sample values ​​without prediction. For blocks in a P slice, either intra-predictive or inter-predictive prediction is used, and if inter-predictive prediction is used, only uni prediction is used. On the other hand, for blocks in a B slice, either intra-predictive or inter-predictive prediction is used, and if inter-predictive prediction is used, up to bi-predictive prediction is used.

[0098] L0 and L1 contain reference pictures that were encoded / decoded before the current picture. For example, L0 contains reference pictures that are earlier and / or later than the current picture in the POC order, and L1 contains reference pictures that are later and / or earlier than the current picture in the POC order. In this case, L0 is assigned a reference picture index that is lower relative to the reference pictures that are earlier than the current picture in the POC order, and L1 is assigned a reference picture index that is lower relative to the reference pictures that are later than the current picture in the POC order. For B slices, biprediction is applied, and in this case either unidirectional biprediction or bidirectional biprediction can be applied. Bidirectional biprediction may be called true biprediction.

[0099] Specifically, for example, information regarding the interprediction mode of a current block is either coded and signaled at a level such as CU (CU syntax), or implicitly determined according to conditions. In this case, some modes may be explicitly signaled, while others may be implicitly derived.

[0100] For example, the CU syntax can carry information about the (inter)predictive mode, as shown in Table 1 below.

[0101] [Table 1-1]

[0102] [Table 1-2]

[0103] [Table 1-3]

[0104] [Table 1-4]

[0105] [Table 1-5]

[0106] [Table 1-6]

[0107] [Table 1-7]

[0108] [Table 1-8]

[0109] [Table 1-9]

[0110] [Table 1-10]

[0111] [Table 1-11]

[0112] [Table 1-12]

[0113] [Table 1-13]

[0114] Here, cu_skip_flag indicates whether skip mode is currently applied to the block (CU).

[0115] A value of 0 for `pred_mode_flag` indicates that the current coding unit is coded in inter-prediction mode. A value of 1 for `pred_mode_flag` indicates that the current coding unit is coded in intra-prediction mode.

[0116] A value of 1 for `pred_mode_ibc_flag` indicates that the current coding unit is coded in IBC prediction mode. A value of 0 for `pred_mode_ibc_flag` indicates that the current coding unit is not coded in IBC prediction mode.

[0117] A value of 1 for pcm_flag[x0][y0] indicates that the pcm_sample() syntax structure exists and the transform_tree() syntax structure does not exist in the coding unit including the luma coding block at position (x0, y0). A value of 0 for pcm_flag[x0][y0] indicates that the pcm_sample() syntax structure does not exist. In other words, pcm_flag indicates whether or not PCM (pulse coding modulation) mode is applied to the current block. If PCM mode is applied to the current block, prediction, transformation, quantization, etc., are not applied, and the values ​​of the original samples in the current block are coded and signaled.

[0118] A value of 1 for intra_mip_flag[x0][y0] indicates that the intra prediction type for luma samples is matrix-based intra prediction (MIP). A value of 0 for intra_mip_flag[x0][y0] indicates that the intra prediction type for luma samples is not matrix-based intra prediction. In other words, intra_mip_flag indicates whether or not the MIP prediction mode (type) is applied to the current block (of luma samples).

[0119] intra_chroma_pred_mode[x0][y0] specifies the intra prediction mode for chroma samples in the current block.

[0120] `general_merge_flag[x0][y0]` indicates whether the inter prediction parameters for the current coding unit are inferred from a neighboring inter-predicted partition. Specifically, `general_merge_flag[x0][y0]` indicates that general merge is available, and a value of `general_merge_flag` of 1 means that regular merge mode, mmvd mode, and merge subblock mode (subblock merge mode) are available. For example, if `general_merge_flag` is 1, the merge data syntax is parsed from the encoded video / image information (or bitstream), and the merge data syntax is structured / coded to include information as shown in Table 2 below.

[0121] [Table 2-1]

[0122] [Table 2-2]

[0123] [Table 2-3]

[0124] Here, a value of regular_merge_flag[x0][y0] equal to 1 indicates that regular merge mode is used to generate the inter prediction parameters of the current coding unit. In other words, regular_merge_flag indicates whether or not the merge mode (regular merge mode) is applied to the current block.

[0125] A value of 1 for mmvd_merge_flag[x0][y0] indicates that a merge mode with motion vector difference is used to generate the inter prediction parameters of the current coding unit. In other words, mmvd_merge_flag indicates whether MMVD is applied to the current block.

[0126] mmvd_cand_flag[x0][y0] indicates whether the first (0) or the second (1) candidate in the merging candidate list is used with the motion vector difference derived from mmvd_distance_idx[x0][y0] and mmvd_direction_idx[x0][y0].

[0127] mmvd_distance_idx[x0][y0] specifies the index used to derive MmvdDistance[x0][y0].

[0128] mmvd_direction_idx[x0][y0] specifies the index used to derive MmvdSign[x0][y0].

[0129] merge_subblock_flag[x0][y0] specifies whether the subblock-based inter prediction parameters for the current coding. In other words, merge_subblock_flag indicates whether subblock merge mode (or affine merge mode) is applied to the current block.

[0130] `merge_subblock_idx[x0][y0]` specifies the merging candidate index of the subblock-based merging candidate list.

[0131] ciip_flag[x0][y0] indicates whether the combined inter-picture merge and intra-picture prediction is applied for the current coding unit.

[0132] `merge_triangle_idx0[x0][y0]` specifies the first merging candidate index of the triangular shape-based motion compensation candidate list.

[0133] `merge_triangle_idx1[x0][y0]` specifies the second merging candidate index of the triangular shape-based motion compensation candidate list.

[0134] merge_idx[x0][y0] specifies the merging candidate index of the merging candidate list.

[0135] On the other hand, referring again to the CU syntax in Table 1, mvp_l0_flag[x0][y0] specifies the motion vector predictor index of list 0. That is, when MVP mode is applied, mvp_l0_flag indicates the candidate selected in MVP candidate list 0 for the MVP derivation of the current block.

[0136] mvp_l1_flag[x0][y0] has the same meaning as mvp_l0_flag, with l0, L0 and list 0 replaced by l1, L1 and list 1, respectively.

[0137] inter_pred_idc[x0][y0] indicates whether list0, list1, or bi-prediction is used for the current coding unit.

[0138] A value of sym_mvd_flag[x0][y0] equal to 1 indicates that the syntax elements ref_idx_l0[x0][y0] and ref_idx_l1[x0][y0] exist, and that the mvd_coding(x0, y0, refList, cpIdx) syntax structure for refList equal to 1 does not exist. In other words, sym_mvd_flag indicates whether symmetric MVD is used in MVD coding.

[0139] ref_idx_l0[x0][y0] specifies the list 0 reference picture index for the current coding unit.

[0140] ref_idx_l1[x0][y0] has the same semantics as ref_idx_l0, with l0, L0 and list 0 replaced by l1, L1 and list 1, respectively.

[0141] A value of inter_affine_flag[x0][y0] equal to 1 indicates that for the current coding unit, when decoding a P or B slice, affine model-based motion compensation is used to generate the prediction samples of the current coding unit.

[0142] A value of cu_affine_type_flag[x0][y0] equal to 1 indicates that for the current coding unit, when decoding a P or B slice, 6-parameter affine model-based motion compensation is used to generate the prediction samples of the current coding unit. A value of cu_affine_type_flag[x0][y0] equal to 0 indicates that 4-parameter affine model-based motion compensation is used to generate the prediction samples of the current coding unit.

[0143] amvr_flag[x0][y0] indicates the resolution of the motion vector difference. The array indices x0 and y0 indicate the position (x0, y0) of the upper-left luma sample of the coding block considered relative to the upper-left luma sample of the picture. A value of 0 for amvr_flag[x0][y0] indicates that the resolution of the motion vector difference is 1 / 4 of the luma sample. A value of 1 for amvr_flag[x0][y0] indicates that the resolution of the motion vector difference is further specified by amvr_precision_flag[x0][y0]. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. amvr_flag[x0][y0] equal to 0 specifies that the resolution of the motion vector difference is 1 / 4 of a luma sample. amvr_flag[x0][y0] equal to 1 specifies that the resolution of the motion vector difference is further specified by amvr_precision_flag[x0][y0].

[0144] If the value of amvr_precision_flag[x0][y0] is 0, and the value of inter_affine_flag[x0][y0] is 0, it indicates that the resolution of the motion vector difference is one integer luma sample; otherwise, it indicates that it is 1 / 16 of a luma sample. If the value of amvr_precision_flag[x0] is 1, and the value of inter_affine_flag[x0][y0] is 0, it indicates that the resolution of the motion vector difference is four luma samples; otherwise, it indicates that it is one integer luma sample. The array indices x0 and y0 indicate the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. (amvr_precision_flag[x0][y0] equal to 0 specifies that the resolution of the motion vector difference is one integer luma sample if inter_affine_flag[x0][y0] is equal to 0, and 1 / 16 of a luma sample otherwise. amvr_precision_flag[x0][y0] equal to 1 specifies that the resolution of the motion vector difference is four luma samples if inter_affine_flag[x0][y0] is equal to 0, and one integer luma sample otherwise. The array indices x0 and y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.)

[0145] bcw_idx[x0][y0] specifies the weight index of bi-prediction with CU weights.

[0146] When the coding device determines the (inter)prediction mode for the current block, it derives motion information for the current block based on the prediction mode (S610).

[0147] The coding device performs interpretation using motion information of the current block. The encoding device can derive optimal motion information for the current block through a motion estimation procedure. For example, the encoding device can use the original block in the original picture for the current block to search for highly correlated similar reference blocks in fractional pixel units within a defined search range in the reference picture, thereby deriving motion information. Block similarity is derived based on the difference in phase-based sample values. For example, block similarity is calculated based on the SAD between the current block (or the template of the current block) and the reference block (or the template of the reference block). In this case, motion information can be derived based on the reference block with the smallest SAD in the search area. The derived motion information is signaled to the decoding device in various ways based on the interpretation mode.

[0148] When motion information for the current block is derived, the coding device performs inter prediction based on the motion information for the current block (S620). The coding device can derive predicted samples(e) for the current block based on the motion information. The current block containing the predicted samples may be called a predicted block.

[0149] Based on the derived predicted samples, reconstructed samples and reconstructed pictures are generated, after which procedures such as in-loop filtering can be performed.

[0150] Figure 7 illustrates the merge and skip modes that can be used for interpretation.

[0151] When merge mode is applied during interpretation, the movement information of the current block is not transmitted directly, but rather the movement information of the surrounding predicted blocks is used to guide the current block's movement information. Therefore, the encoding device can indicate the movement information of the current block by transmitting flag information indicating that merge mode is being used and a merge index indicating which surrounding predicted block is being used. This merge mode may also be called regular merge mode.

[0152] The coding device searches for merge candidate blocks to be used to guide the movement information of the current block in order to perform merge mode. For example, up to five merge candidate blocks may be available, but this embodiment is not limited to this. Information regarding the maximum number of merge candidate blocks may also be transmitted in the slice header or tile group header, but this embodiment is not limited to this. After finding the merge candidate blocks, the coding device can generate a merge candidate list and select the merge candidate block with the lowest cost from among them as the final merge candidate block.

[0153] This document provides various embodiments for merge candidate blocks that constitute the merge candidate list.

[0154] The merge candidate list may include, for example, five merge candidate blocks. For example, four spatial merge candidates and one temporal merge candidate can be used. As a specific example, in the case of spatial merge candidates, the blocks shown in Figure 7 (A0, A1, B0, B1, B2) can be used as spatial merge candidates. Hereinafter, the spatial merge candidates or spatial MVP candidates described later may be called SMVPs, and the temporal merge candidates or temporal MVP candidates described later may be called TMVPs.

[0155] The list of merge candidates for the current block is constructed, for example, based on the following procedure:

[0156] First, the coding device (encoding device / decoding device) can search for spatially surrounding blocks of the current block and insert the derived spatial merge candidates into the merge candidate list. For example, the spatially surrounding blocks include the block around the lower left corner (A0), the left side surrounding block (A1), the upper right corner surrounding block (B0), the upper side surrounding block (B1), and the upper left corner surrounding block (B2) of the current block. However, this is an example, and additional surrounding blocks such as the right side surrounding block, the lower side surrounding block, and the lower right side surrounding block can also be used as spatially surrounding blocks. The coding device can search for the spatially surrounding blocks based on priority to detect available blocks and derive the movement information of the detected blocks as the spatial merge candidates. For example, the encoding device and / or decoding device can search the five blocks shown in Figure 7 in the order A1, B1, B0, A0, B2, and sequentially index the available candidates to form a merge candidate list.

[0157] Furthermore, the coding device can search for temporally surrounding blocks of the current block and insert the derived temporal merge candidates into the merge candidate list. The temporally surrounding blocks may be located on a reference picture that is a different picture from the current picture on which the current block is located. The reference picture on which the temporally surrounding blocks are located may be called a collocated picture or col picture. The temporally surrounding blocks can be searched for on the col picture in the order of the lower right corner surrounding block and the lower right center block of the co-located block relative to the current block.

[0158] On the other hand, the coding device checks whether the current number of merge candidates is less than the maximum number of merge candidates. The maximum number of merge candidates is either predefined or signaled from the encoding device to the decoding device. For example, the encoding device generates information about the maximum number of merge candidates, encodes it, and transmits it to the decoding device in bitstream form. Once the maximum number of merge candidates is filled, the process of adding candidates is not required.

[0159] If the results of the above check show that the number of current merge candidates is less than the number of maximum merge candidates, the coding device inserts additional merge candidates into the merge candidate list. These additional merge candidates include, for example, at least one of the following: history-based merge candidate(s), pair-wise average merge candidate(s), ATMP, combined bi-predictive merge candidate(s) (if the slice / tile group type of the current slice / tile group is type B), and / or zero vector merge candidate(s).

[0160] If, as a result of the above check, the number of current merge candidates is not less than the number of maximum merge candidates, the coding device terminates the configuration of the merge candidate list. In this case, the encoding device can select the optimal candidate from among the merge candidates constituting the merge candidate list based on the RD (rate-distortion) cost, and can signal selection information (e.g., merge index) pointing to the selected merge candidate to the decoding device. The decoding device can select the optimal merge candidate based on the merge candidate list and the selection information.

[0161] As previously mentioned, the motion information of the selected merge candidate can be used as the motion information of the current block, and predicted samples of the current block can be derived based on the motion information of the current block. The encoding device can derive residual samples of the current block based on the predicted samples, and the decoding device can signal residual information regarding the residual samples. As previously mentioned, the decoding device can generate restored samples based on the residual samples derived based on the residual information and the predicted samples, and generate a restored picture based on these.

[0162] When skip mode is applied during interpretation, the motion information of the current block can be derived in the same manner as when the merge mode described above is applied. However, when skip mode is applied, the residual signal for the block in question is omitted, and therefore, the predicted sample can be immediately used as the restored sample.

[0163] Figure 8 illustrates a merge mode that has motion vector differences available for use during interpretation.

[0164] In addition to the merge mode, where implicitly derived motion information is directly used for prediction sample generation of the current CU, a merge mode with motion vector differences (MMVD) is introduced to the VVC. Similar motion information derivation methods are used for the skip mode and the merge mode, so MMVD can be applied to the skip mode. An MMVD flag (e.g., mmvd_flag) is signaled immediately after sending a skip flag and a merge flag to indicate whether MMVD mode is applied to a CU.

[0165] In MMVD, after an amerge candidate is selected, it is further refined by the signaled MVD information. When an MMVD is applied to the current block (i.e., when the mmvd_flag is equal to 1), further information for the MMVD may be signaled.

[0166] The further information includes a merge candidate flag (e.g., mmvd_merge_flag) indicating whether the first (0) or the second (1) candidate in the merging candidate list is used with the motion vector difference, an index to specify motion magnitude (e.g., mmvd_distance_idx), and an index for indicating motion direction (e.g., mmvd_direction_idx). In MMVD mode, one of the first two candidates in the merge list is selected to be used as the MV basis. The merge candidate flag is signaled to specify which flag is used.

[0167] The distance index indicates motion magnitude information and shows a predetermined offset from the starting point.

[0168] As shown in Figure 8, an offset can be added to either the horizontal or vertical component of the starting motion vector (MV). The relationship between the distance index and the predetermined offset can be shown in Table 3.

[0169] [Table 3]

[0170] Here, slice_fpel_mmvd_enabled_flag equal to 1 specifies that merge mode with motion vector difference uses integer sample precision in the current slice. slice_fpel_mmvd_enabled_flag equal to 0 specifies that merge mode with motion vector difference can use fractional sample precision in the current slice. When not present, the value of slice_fpel_mmvd_enabled_flag is inferred to be 0. The `slice_fpel_mmvd_enabled_flag` syntax element may be signaled through (or comprised in) a slice header.

[0171] The direction index indicates the direction of the MVD relative to the starting point. The direction index represents four directions, as shown in Table 4. The meaning of the MVD indication can be modified according to the starting information of the MVs. When the starting MVs is an unprediction MV or biprediction MVs with both lists point to the same side of the current picture (e.g., the POCs of two references are both larger than the POC of the current picture, or are both smaller than the POC of the current picture), the sign in Table 4 specifies the sign of the MV offset added to the starting MV.When the starting MVs are bi-prediction MVs with the two MVs pointing to the different sides of the current picture (i.e., the POC of one reference is larger than the POC of the current picture, and the POC of the other reference is smaller than the PCO of the current picture), the sign in Table 4 indicates the sign of the MV offset added to the list0 MV component of the starting MV, and the sign for the list1 MV has the opposite value.

[0172] [Table 4]

[0173] The two components of the merge plus MVD offset MmvdOffset[x0][y0] are derived as follows:

[0174]

number

[0175] Figures 9 and 10 illustrate a subblock-based temporal motion vector prediction process that can be used during interpretation.

[0176] Subblock-based temporal motion vector prediction (SbTMVP) method can be used for inter prediction. Similar to TMVP (temporal motion vector prediction), SbTMVP uses the motion field in the collocated picture to improve motion vector prediction and merge mode for CUs in the current picture. The same collocated picture used by TMVP is used for SbTVMP. SbTMVP differs from TMVP in the following two main aspects.

[0177] 1. TMVP predicts motion at the CU level, while SbTMVP predicts motion at the sub-CU level.

[0178] 2. While TMVP fetches the temporal motion vectors from the collocated block in the collocated picture (the collocated block is the bottom-right or center (below-right center) block relative to the current CU), SbTMVP applies a motion shift before fetching the temporal motion information from the collocated picture, where the motion shift is obtained from the motion vector from one of the spatially neighboring blocks of the current CU.

[0179] Figures 9 and 10 show the SbTMVP process. SbTMVP predicts the motion vectors of the sub-CUs within the current CU in two steps. In the first step, the spatial neighbor A1 in Figure 9 is examined. If A1 has a motion vector that uses the collocated picture as its reference picture is identified, this motion vector (may be referred to as a temporal MV (tempMV)) is selected as the motion shift to be applied. If no such motion is identified, then the motion shift is set to (0, 0).

[0180] In the second step, the motion shift identified in Step 1 is applied (i.e., added to the current block's coordinates) to obtain sub-CU-level motion information (motion vectors and reference indices) from the collocated picture as shown in Figure 10. The example in Figure 10 assumes the motion shift is set to block A1's motion. Then, for each sub-CU, the motion information of its corresponding block (the smallest motion grid that covers the center sample) in the collocated picture is used to derive the motion information for the sub-CU.The center block (below right center sample) may correspond to the lower-right sample among the four central samples in the sub-CU when the sub-block has an even length, width, and height.

[0181] After the motion information of the collocated sub-CU is identified, it is converted to the motion vectors and reference indices of the current sub-CU in a manner similar to the TMVP process, where temporal motion scaling may be applied to align the reference pictures of the temporal motion vectors with the reference pictures of the current CU.

[0182] A combined sub-block based merge list containing all SbTVMP candidates and affine merge candidates can be used for signaling affine merge mode (may be referred to as sub-block (based) merge mode). The SbTVMP mode is enabled / disabled by a Sequence Parameter Set (SPS) flag. If the SbTMVP mode is enabled, the SbTMVP predictor is added as the first entry in the list of sub-block merge candidates, followed by the affine merge candidates. The maximum allowed size of the affine merge candidate list may be 5.

[0183] In SbTMVP, the sub-CU size is fixed to 8x8, and, as done for affine merge mode, SbTMVP mode is only applicable to CUs where both width and height are greater than or equal to 8.

[0184] The encoding logic for the additional SbTMVP merge candidate is the same as for the other merge candidates; that is, for each CU in a P or B slice, an additional RD check is performed to determine whether the SbTMVP candidate is usable.

[0185] Figure 11 illustrates partitioning modes that can be applied to interpretation.

[0186] A triangle partition mode may be used for inter prediction. The triangle partition mode may only be applied to CUs that are 8x8 or larger. The triangle partition mode is signaled using a CU-level flag as one kind of merge mode, with other merge modes including the regular merge mode, the MMVD mode, the CIIP mode, and the subblock merge mode.

[0187] When this mode is used, a CU may be split evenly into two triangle-shaped partitions, using either the diagonal split or the anti-diagonal split as shown in Figure 11. Each triangle partition in the CU is inter-predicted using its own motion; only uni-prediction is allowed for each partition, that is, each partition has one motion vector and one reference index. The uni-prediction motion constraint is applied to ensure that, same as the conventional bi-prediction, only two motion-compensated predictions are needed for each CU.

[0188] If triangle partition mode is currently used for the CU, then a flag indicating the direction of the triangle partition (diagonal or anti-diagonal) and two merge indices (one for each partition) are further signaled. The number of maximum TPM candidate sizes is signaled explicitly at the slice level and specifies syntax binarization for TPM merge indices. After predicting each of the triangle partitions, the sample values ​​along the diagonal or anti-diagonal edge are adjusted using a blending process with adaptive weights.This is the prediction signal for the whole CU, and the transform and quantization process will be applied to the whole CU as in other prediction modes. Finally, the motion field of a CU predicted using the triangle partition mode is stored in 4x4 units. The triangle partition mode is not used in combination with SBT (subblock transform); that is, when the signaled triangle mode is equal to 1, the cu_sbt_flag is derived as 0 without signaling.

[0189] The uni-prediction candidate list is derived directly from the merge candidate list constructed as described above.

[0190] After predicting each triangle partition using its own motion, blending is applied to the two prediction signals to derive samples around the diagonal or anti-diagonal edge.

[0191] Figure 12 illustrates the CIIP modes applicable to interpretation.

[0192] Combined inter and intra prediction can be applied to a current block. An additional flag (e.g., ciip_flag) may be signaled to indicate whether the combined inter / intra prediction (CIIP) mode is applied to the current CU. For example, when a CU is coded in merge mode, if the CU contains at least 64 luma samples (that is, the product of the CU width and CU height is equal to or greater than 64 luma samples), and if both the CU width and CU height are less than 128 luma samples, the additional flag is signaled to indicate whether the combined inter / intra prediction (CIIP) mode is currently applied to the CU. As its name indicates, the CIIP prediction combines an inter prediction signal with an intra prediction signal.The inter prediction signal in the CIIP mode P_inter is derived using the same inter prediction process applied to regular merge mode, and the intra prediction signal P_intra is derived following the regular intra prediction process with the planar mode. Then, the intra and inter prediction signals are combined using weighted averaging, where the weight value is calculated depending on the coding modes of the top and left neighboring blocks as follows (depicted in Figure 12).

[0193] If the top neighbor is available and intracoded, then set isIntraTop to 1; otherwise, set isIntraTop to 0.

[0194] If the left neighbor is available and intracoded, set isIntraLeft to 1; otherwise, set isIntraLeft to 0.

[0195] If (isIntraLeft + isIntraLeft) is 2, then the weight value (wt) is set to 3.

[0196] Instead, if (isIntraLeft + isIntraLeft) is equal to 1, then wt is set to 2.

[0197] Otherwise, wt will be set to 1.

[0198] The CIIP prediction is formed as follows:

[0199]

number

[0200] On the other hand, in order to generate predictive blocks in the coding device, motion information can be induced based on the aforementioned regular merge mode, skip mode, SbTMVP mode, MMVD mode, triangle partition mode (partitioning mode), and / or CIIP mode. Each mode is enabled / disabled via an on / off flag for that mode included in the sequence parameter set (SPS). If the on / off flag for a particular mode is disabled, the encoding device will not signal the syntax to be sent explicitly for that predictive mode at the CU or PU level.

[0201] Therefore, if all or some of the specific modes for merge / skip modes are disabled during the existing operation process, a problem arises where the on / off flag is signaled redundantly. Accordingly, in this document, one of the following methods is used to prevent the same information (flags) from being signaled redundantly during the process of selecting the merge mode to be applied to the current block based on the merge data syntax in Table 2.

[0202] The encoding device can signal a flag based on a sequence parameter set, as shown in Table 5, to select a prediction mode that can be used in the process of inducing motion information. Each prediction mode is turned on / off based on the sequence parameter set in Table 5, and each syntax element of the merged data syntax in Table 2 is parsed or induced depending on the flags in Table 5 and the conditions under which each mode can be used.

[0203] [Table 5-1]

[0204] [Table 5-2]

[0205] [Table 5-3]

[0206] [Table 5-4]

[0207] [Table 5-5]

[0208] [Table 5-6]

[0209] [Table 5-7]

[0210] [Table 5-8]

[0211] [Table 5-9]

[0212] [Table 5-10]

[0213] The following drawings were created to illustrate a specific example of this document. The names of specific devices and signals / information shown in the drawings are presented illustratively, and the technical features of this specification are not limited to the specific names used in the following drawings.

[0214] Figures 13 and 14 schematically illustrate an example of a video / image encoding method and related components, including the interpretation method according to the embodiments of this document.

[0215] The encoding method disclosed in Figure 13 can be performed by the encoding device 200 disclosed in Figure 2. Specifically, for example, steps S1300 and S1310 in Figure 13 are performed by the prediction unit 220 of the encoding device 200, and step S1320 is performed by the entropy encoding unit 240 of the encoding device 200. The encoding method disclosed in Figure 13 includes the embodiments described above in this document.

[0216] Specifically, referring to Figures 13 and 14, the prediction unit of the encoding device determines the prediction mode for the current block (S1300). As an example, when interpretation is applied to the current block, the prediction unit of the encoding device determines one of the following as the prediction mode for the current block: regular merge mode, skip mode, MMVD mode, subblock merge mode, partitioning mode, or CIIP mode.

[0217] Here, the regular merge mode is defined as a mode that uses motion information of surrounding blocks to guide the motion information of the current block. The skip mode is defined as a mode that uses the predicted block as the restored block. The MMVD mode is applied to the merge mode or the skip mode and is defined as a merge (or skip) mode that utilizes motion vector differences. The subblock merge mode is defined as a merge mode based on subblocks. The partitioning mode is defined as a mode that divides the current block into two partitions (diagonal or semi-diagonal) and performs prediction. The CIIP mode is defined as a mode that combines inter-picture merge and intra-picture prediction.

[0218] On the other hand, the prediction unit of the encoding device searches for blocks similar to the current block within a certain area (search area) of the reference picture by motion estimation, derives a reference block whose difference from the current block is the minimum or below a certain standard, and based on this, can derive a reference picture index that points to the reference picture in which the reference block is located. Furthermore, it can derive a motion vector based on the positional difference between the reference block and the current block.

[0219] The prediction unit of the encoding device can generate a predicted sample (predicted block) of the current block based on the prediction mode of the current block and the motion vector of the current block. It also generates information about the prediction mode based on the prediction mode (S1310). Here, the information about the prediction mode includes inter / intra prediction classification information, inter prediction mode information, etc., and includes various syntax elements related thereto.

[0220] The residual processing unit of the encoding device generates a residual sample based on the original sample (original block) for the current block and the predicted sample (predicted block) for the current block. Furthermore, information regarding the residual sample can be derived based on the residual sample.

[0221] The encoding unit of the encoding device encodes video information including information about the residual sample and information about the prediction mode (S1320). The video information includes partitioning-related information, information about the prediction mode, residual information, in-loop filtering-related information, and various syntax elements related thereto. The information encoded by the encoding unit of the encoding device is output in bitstream form. The bitstream is transmitted to the decoding device via a network or storage medium.

[0222] For example, the video information includes information about various parameter sets, such as the Adaptation Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Video Parameter Set (VPS). The video information also includes information about the prediction mode of the current block, such as the coding unit syntax and merge data syntax. Here, the sequence parameter set includes a CIIP (combined inter-picture merge and intra-picture prediction) enable flag and an enable flag for the partitioning mode. The coding unit syntax includes a CU skip flag indicating whether or not a skip mode is applied to the current block.

[0223] According to one embodiment, as an example, the encoding device may include a regular merge flag in the video information based on the conditions based on the CIIP availability flag and the current block size, so that the same syntax is not transmitted redundantly. Here, the condition based on the current block size may be that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CIIP availability flag may be that the value of the CIIP availability flag is 1. That is, the encoding device can signal the regular merge flag if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CIIP availability flag is 1.

[0224] As another example, the encoding device may include the regular merge flag in the video information based on whether the conditions based on the CU skip flag and the size of the current block are met. Here, the condition based on the CU skip flag may be that the value of the CU skip flag is 0. In other words, the encoding device may signal the regular merge flag if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CU skip flag is 0.

[0225] As another example, the encoding device may include the regular merge flag in the video information based on the condition based on the CU skip flag being met in addition to the condition based on the CIIP availability flag and the condition based on the size of the current block. Here, the condition based on the CU skip flag may be that the value of the CU skip flag is 0. In other words, the encoding device may signal a regular merge plug if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, the value of the CIIP availability flag is 1, and the value of the CU skip flag is 0.

[0226] As another example, the encoding device may include a regular merge flag in the video information based on whether conditions based on the current block information and the partitioning mode enabled flag are met. Here, the conditions based on the current block information include whether the product of the width and height of the current block is 64 or more and / or whether the slice type containing the current block is a B slice. The conditions based on the partitioning mode enabled flag may be whether the value of the partitioning mode enabled flag is 1. In other words, the encoding device may signal the regular merge flag if both the conditions based on the height of the current block and the current block information, and the conditions based on the partitioning mode enabled flag are met.

[0227] If the conditions based on the CIIP availability flag and the conditions based on the current block size are not met, the encoding device determines whether the conditions based on the current block information and the partitioning mode availability flag are met. Alternatively, if the conditions based on the current block information and the partitioning mode availability flag are not met, the encoding device determines whether the conditions based on the CIIP availability flag and the conditions based on the current block size are met.

[0228] On the other hand, the encoding device may signal the regular merge flag if the product of the current block's width and height is not 32, the value of the MMVD-enabled flag is 1, or if the maximum number of subblock merge candidates is greater than 0 and the current block's width and height are both 8 or greater.

[0229] For this reason, as an example, the merge data syntax is structured as shown in Table 6 below.

[0230] [Table 6-1]

[0231] [Table 6-2]

[0232] [Table 6-3]

[0233] In Table 6, a regular_merge_flag value of 1 indicates that regular merge mode is used to generate the inter prediction parameters of the current coding unit (current block). The array indices x0 and y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.

[0234] If the regular_merge_flag[x0][y0] does not exist, it is inferred as follows:

[0235] If all of the following conditions are true, regular_merge_flag[x0][y0] is inferred to be equal to 1.))。

[0236] - The value of the general_merge_flag is 1 (general_merge_flag[x0][y0] is equal to 1)

[0237] - The value of the SPS's MMVD available flag is 0, or the product of the current block's width and height is 32 (sps_mmvd_enable_flag is equal to 0 or cbWidth*cbHeight==32)

[0238] - The maximum number of sub-block merge candidates is 0 or less, or the current block's width is less than 8, or the current block's height is less than 8 (MaxNumSubblockMergeCand<=0 or cbWidth<8 or cbHeight<8)

[0239] - The value of the SPS's CIIP available flag is 0, or the product of the current block's width and height is less than 64, or the current block's width is 128 or more, or the current block's width is 128 or more, or the value of the CU skip flag is 1 (sps_ciip_enabled_flag is equal to 0 or cbWidth*cbHeight<64 or cbWidth>=128 or cbHeight>=128 or cu_skip_flag[x0][y0] is equal to 1)

[0240] - The value of the SPS's partitioning available flag is 0, or the maximum number of partitioning merge candidates is less than 2, or the slice type is not a B slice (sps_triangle_enabled_flag is equal to 0 or MaxNumTriangleMergeCand<2 or slice_type is not equal to B_SLICE)

[0241] Otherwise, regular_merge_flag[x0][y0] is inferred to be equal to 0.

[0242] On the other hand, according to another embodiment, as an example, the encoding apparatus can include an MMVD merge flag in the video information based on the condition based on the CIIP availability flag and the condition based on the size of the current block so that the same syntax is not transmitted repeatedly. Here, the condition based on the size of the current block is that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each smaller than 128. The condition based on the CIIP availability flag is that the value of the CIIP availability flag is 1. In other words, the encoding apparatus can signal the MMVD merge flag when the product of the height and width of the current block is 64 or more, the height and width of the current block are each smaller than 128, and the value of the CIIP availability flag is 1.

[0243] As another example, the encoding apparatus can include the MMVD merge flag in the video information based on the condition based on the CIIP availability flag and the condition based on the size of the current block, and further based on the condition based on the CU skip flag being satisfied. Here, the condition based on the CU skip flag is that the value of the CU skip flag is 0. That is, the encoding apparatus can signal the MMVD merge flag when the product of the height and width of the current block is 64 or more, the height and width of the current block are each smaller than 128, the value of the CIIP availability flag is 1, and the value of the CU skip flag is 0.

[0244] As another example, an encoding device may include an MMVD merge flag in the video information based on whether conditions based on the current block information and the partitioning mode enabled flag are met. Here, the conditions based on the current block information include whether the product of the width and height of the current block is 64 or more and / or whether the slice type containing the current block is a b slice. The condition based on the partitioning mode enabled flag is whether the value of the partitioning mode enabled flag is 1. In other words, an encoding device may signal the MMVD merge flag if both the conditions based on the height of the current block and the current block information, and the conditions based on the partitioning mode enabled flag are met.

[0245] The encoding device can determine whether the conditions based on the current block information and the partitioning mode availability flag are met if the conditions based on the CIIP availability flag and the current block size are not met. Alternatively, the encoding device can determine whether the conditions based on the CIIP availability flag and the current block size are met if the conditions based on the current block information and the partitioning mode availability flag are not met.

[0246] On the other hand, the encoding device can also signal the MMVD merge flag if the product of the current block's width and height is not 32 and the value of the MMVD availability flag is 1, or if the maximum number of subblock merge candidates is greater than 0 and the current block's width and height are both 8 or greater.

[0247] For this reason, as an example, the merge data syntax is structured as shown in Table 7 below.

[0248] [Table 7-1]

[0249] [Table 7-2]

[0250] [Table 7-3]

[0251] [Table 7-4]

[0252] A value of 1 for the MMVD merge flag indicates that a merge mode with motion vector difference is used to generate the inter prediction parameters of the current coding unit (current block). The array indices x0 and y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.

[0253] If the MMVD merge flag does not exist, it is inferred as follows:

[0254] If all of the following conditions are true, mmvd_merge_flag[x0][y0] is inferred to be equal to 1.

[0255] - general_merge_flag[x0][y0] is equal to 1

[0256] - regular_merge_flag[x0][y0] is equal to 0

[0257] - sps_mmvd_enable_flag is equal to 1

[0258] - cbWidth*cbHeight!=32

[0259] - MaxNumSubblockMergeCand<=0 or cbWidth<8 or cbHeight<8

[0260] - sps_ciip_enabled_flag is equal to 0 or cbWidth>=128 or cbHeight>=128 or cu_skip_flag[x0][y0] is equal to 1

[0261] - The value of the SPS partitioning enable flag is 0, or the maximum number of partitioning merge candidates is less than 2, or the slice type is not B-slice (sps_triangle_enabled_flag is equal to 0 or MaxNumTriangleMergeCand<2 or slice_type is not equal to B_SLICE)

[0262] Otherwise, the value of the MMVD merge flag is derived as 0.

[0263] On the other hand, according to another embodiment, for example, the encoding device may include a merge subblock flag in the video information based on the conditions based on the CIIP availability flag and the current block size, so that the same syntax is not transmitted redundantly. Here, the condition based on the current block size is that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CIIP availability flag is that the value of the CIIP availability flag is 1. In other words, the encoding device can signal the merge subblock flag if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CIIP availability flag is 1.

[0264] As another example, the encoding device may include the remaining subblock flags in the video information based on the condition based on the CU skip flag being met in addition to the condition based on the CIIP availability flag and the condition based on the size of the current block, where the condition based on the CU skip flag is when the value of the CU skip flag is 0. In other words, the encoding device may signal the merge subblock flag if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, the value of the CIIP availability flag is 1, and the value of the CU skip flag is 0.

[0265] As another example, the encoding device may include a merge subblock flag in the video information based on whether conditions based on the current block information and the partitioning mode enabled flag are met. Here, the conditions based on the current block information include whether the product of the width and height of the current block is 64 or more and / or whether the slice type containing the current block is a B slice. The condition based on the partitioning mode enabled flag is whether the value of the partitioning mode enabled flag is 1. In other words, the encoding device may signal the merge subblock flag if both the conditions based on the height of the current block and the current block information, and the conditions based on the partitioning mode enabled flag are met.

[0266] The encoding device can determine whether the conditions based on the current block information and the partitioning mode availability flag are met if the conditions based on the CIIP availability flag and the current block size are not met. Alternatively, the encoding device can determine whether the conditions based on the CIIP availability flag and the current block size are met if the conditions based on the current block information and the partitioning mode availability flag are not met.

[0267] On the other hand, the encoding device can also signal a merge subblock flag if the maximum number of subblock merge candidates is greater than 0 and the current block's width and height are both 8 or greater.

[0268] For this reason, as an example, the merge data syntax is structured as shown in Table 8 below.

[0269] [Table 8-1]

[0270] [Table 8-2]

[0271] [Table 8-3]

[0272] The merge_subblock_flag[x0][y0] indicates whether the subblock-based inter prediction parameters for the current coding unit are inferred from neighboring blocks. The array indices x0, y0 specify the location (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture.

[0273] If the merge subblock flag does not exist, it is inferred as follows:

[0274] If all of the following conditions are true, the value of merge_subblock_flag[x0][y0] is inferred to be equal to 1.

[0275] - The value of the general merge flag is 1 (general_merge_flag[x0][y0] is equal to 1)

[0276] - The value of the regular merge flag is 0 (regular_merge_flag[x0][y0] is equal to 0)

[0277] - The value of the merge subblock flag is 0 (merge_subblock_flag[x0][y0] is equal to 0)

[0278] - The value of the MMVD merge flag is 0 (mmvd_merge_flag[x0][y0] is equal to 0)

[0279] - The maximum number of subblock merge candidates is greater than 0 (MaxNumSubblockMergeCand>0)

[0280] - The current block width and height are both 8 or greater (cbWidth>=8 and cbHeight>=8)

[0281] - The value of the SPS CIIP enabled flag is 0, or the current block width is 128 or greater, or the current block height is 128 or greater, or the value of the CU skip flag is 1 (sps_ciip_enabled_flag is equal to 0 or cbWidth>=128 or cbHeight>=128 or cu_skip_flag[x0][y0] is equal to 1)

[0282] - The value of the SPS partitioning enable flag is 0, or the maximum number of partitioning merge candidates is less than 2, or the slice type is not B-slice (sps_triangle_enabled_flag is equal to 0 or MaxNumTriangleMergeCand<2 or slice_type is not equal to B_SLICE)

[0283] Otherwise, the merge_subblock_flag[x0][y0] value is inferred to be equal to 0.

[0284] On the other hand, according to another embodiment, for example, the encoding device may include a CIIP flag in the video information based on the conditions based on the CIIP availability flag and the current block size, so that the same syntax is not transmitted redundantly. Here, the condition based on the current block size may be that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CIIP availability flag is that the value of the CIIP availability flag is 1. That is, the encoding device can signal the CIIP flag if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CIIP availability flag is 1.

[0285] As another example, the encoding device may include the CIIP flag in the video information based on the condition based on the CU skip flag being met, in addition to the condition based on the CIIP availability flag and the condition based on the size of the current block. Here, the condition based on the CU skip flag is that the value of the CU skip flag is 0. In other words, the encoding device may signal the CIIP flag if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, the value of the CIIP availability flag is 1, and the value of the CU skip flag is 0.

[0286] As another example, the encoding device may include the CIIP flag in the video information based on the conditions based on the information about the current block and the partitioning mode enabled flag. Here, the conditions based on the information about the current block include the product of the width and height of the current block being 64 or greater and / or the type of slice containing the current block being a B slice. The condition based on the partitioning mode enabled flag is that the value of the partitioning mode enabled flag is 1. In other words, the encoding device may signal the CIIP flag if both the conditions based on the height of the current block and the information about the current block and the conditions based on the partitioning mode enabled flag are satisfied.

[0287] If the conditions based on the CIIP availability flag and the conditions based on the current block size are not met, the encoding device determines whether the conditions based on the current block information and the partitioning mode availability flag are met. Alternatively, if the conditions based on the current block information and the partitioning mode availability flag are not met, the encoding device determines whether the conditions based on the CIIP availability flag and the conditions based on the current block size are met.

[0288] For this reason, as an example, the merge data syntax is structured as shown in Table 9 below.

[0289] [Table 9-1]

[0290] [Table 9-2]

[0291] [Table 9-3]

[0292] The CIIP flag indicates whether the combined inter-picture merge and intra-picture prediction is applied to the current coding unit. The array indices x0 and y0 specify the location (x0, y0) of the top-left luma sample of the coding block considered relative to the top-left luma sample of the picture.

[0293] If the CIIP flag does not exist, it is inferred as follows:

[0294] If all of the following conditions are true, the value of the CIIP flag is derived to be 1.

[0295] - The value of the general merge flag is 1 (general_merge_flag[x0][y0] is equal to 1)

[0296] - The value of the regular merge flag is 0 (regular_merge_flag[x0][y0] is 0)

[0297] - The value of the merge subblock flag is 0 (merge_subblock_flag[x0][y0] is equal to 0)

[0298] - The value of the MMVD merge flag is 0 (mmvd_merge_flag[x0][y0] is equal to 0)

[0299] - The value of the CIIP enable flag for SPS is 1 (sps_ciip_enabled_flag is equal to 1)

[0300] -CU skip flag value is 0 (cu_skip_flag[x0][y0] is equal to 0)

[0301] - The product of the current block's width and height is 64 or greater, and the current block's width and height are both less than 128 (cbWidth*cbHeight>=64 and cbWidth<128 and cbHeight<128)

[0302] - The value of the SPS partitioning enable flag is 0, or the maximum number of partitioning merge candidates is less than 2, or the slice type is not B-slice (sps_triangle_enabled_flag is equal to 0 or MaxNumTriangleMergeCand<2 or slice_type is not equal to B_SLICE)

[0303] Otherwise, the value of the CIIP flag is derived as 0.

[0304] Figures 15 and 16 schematically illustrate an example of a video / image decoding method and related components, including the interpretation method according to the embodiments of this document.

[0305] The decoding method disclosed in Figure 15 can be performed by the decoding device 300 disclosed in Figures 3 and 16. Specifically, for example, steps S1500 to S1520 in Figure 15 are performed by the prediction unit 330 of the decoding device 300, and step S1530 is performed by the addition unit 340 of the decoding device 300. The decoding method disclosed in Figure 15 includes the embodiments described above in this document.

[0306] As shown in Figures 15 and 16, the decoding device obtains information regarding the prediction mode of the current block from the bitstream (S1500). Specifically, the entropy decoding unit 310 of the decoding device derives residual information and information regarding the prediction mode from the signal received in bitstream form from the encoding device shown in Figure 2. Here, the information regarding the prediction mode may also be called prediction-related information. The information regarding the prediction mode includes inter / intra prediction classification information, inter prediction mode information, etc., and includes various syntax elements related thereto.

[0307] The bitstream includes video information containing information about various parameter sets, such as the Adaptation Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Video Parameter Set (VPS). The video information further includes information about the prediction mode of the current block, such as the coding unit syntax and merge data syntax. The sequence parameter set includes a CIIP availability flag and an availability flag for the partitioning mode. The coding unit syntax includes a CU skip flag indicating whether a skip mode is applied to the current block.

[0308] Meanwhile, the residual processing unit 320 of the decoding device generates a residual sample based on the residual information. The prediction unit 330 of the decoding device derives the prediction mode of the current block based on the information regarding the prediction mode (S1510). Furthermore, motion information of the current block can be derived based on the derived prediction mode. At this time, the prediction unit of the decoding device can construct a motion information candidate list based on the surrounding blocks of the current block and derive the motion vector and / or reference picture index of the current block based on the candidate selection information received from the encoding device. Once the motion information of the current block is derived, the prediction unit of the decoding device generates a predicted sample of the current block based on the motion information of the current block (S1520). Subsequently, the addition unit 340 of the decoding device generates a restored sample based on the predicted sample generated by the prediction unit 330 and the residual sample generated by the residual processing unit 320 (S1530). The restored picture can be generated based on the restored sample. Subsequently, in-loop filtering procedures such as deblocking filtering, SAO, and / or ALF procedures may be applied to the restored picture to improve subjective / objective image quality as needed.

[0309] In one embodiment, the decoding device obtains the regular merge flag from the bitstream in deriving the prediction mode of the current block based on whether the conditions based on the CIIP availability flag and the current block size are met. Here, the condition based on the current block size may be that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CIIP availability flag is that the value of the CIIP availability flag is 1. In other words, if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CIIP availability flag is 1, the decoding device can parse the regular merge flag from the merge data syntax contained in the bitstream.

[0310] As another example, the regular merge flag can be obtained from the bitstream based on the satisfaction of conditions based on the CU skip flag and the size of the current block. Here, the condition based on the size of the current block may be that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CU skip flag is that the value of the CU skip flag is 0. In other words, if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CU skip flag is 0, the decoding device can parse the regular merge flag from the merge data syntax contained in the bitstream.

[0311] As another example, the decoding device may obtain the regular merge flag from the bitstream based on the condition based on the CU skip flag, in addition to the condition based on the CIIP availability flag and the condition based on the size of the current block. Here, the condition based on the CU skip flag is that the value of the CU skip flag is 0. In other words, the decoding device can parse the regular merge flag from the merge data syntax if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, the value of the CIIP availability flag is 1, and the value of the CU skip flag is 0.

[0312] As another example, the decoding device may obtain the regular merge flag from the bitstream based on the condition that the current block information and the partitioning mode enabled flag are met. Here, the condition based on the current block information includes the product of the width and height of the current block being 64 or greater and / or the type of slice containing the current block being a B slice. The condition based on the partitioning mode enabled flag is that the value of the partitioning mode enabled flag is 1. In other words, the decoding device may parse the regular merge flag from the merge data syntax if both the current block height and the condition based on the current block information and the condition based on the partitioning mode enabled flag are met.

[0313] If the conditions based on the CIIP availability flag and the conditions based on the current block size are not met, the decoding device determines whether the conditions based on the current block information and the partitioning mode availability flag are met. Alternatively, if the conditions based on the current block information and the partitioning mode availability flag are not met, the decoding device may determine whether the conditions based on the CIIP availability flag and the conditions based on the current block size are met.

[0314] On the other hand, the decoding device may parse the regularization flag from the bitstream if the product of the current block's width and height is not 32, the value of the MMVD availability flag is 1, or the maximum number of subblock merge candidates is greater than 0, and the current block's width and height are both 8 or greater. For this purpose, the merge data syntax is configured as shown in Table 6 above.

[0315] The decoding device can derive the value of the regular merge plug as 1 if the bitstream does not contain a regular merge flag, the value of the general merge flag is 1, the value of the SPS MMVD enable flag is 0 or the product of the width and height of the current block is 32, the maximum number of subblock merge candidates is 0 or less or the width of the current block is less than 8 or the height of the current block is less than 8, the value of the SPS CIIP enable flag is 0 or the product of the width and height of the current block is less than 64 or the width of the current block is 128 or more or the value of the CU skip flag is 1, the value of the SPS partitioning enable flag is 0 or the maximum number of partitioning merge candidates is less than 2 or the slice type is not a B slice. Otherwise, the value of the regular merge plug is derived as 0.

[0316] In another embodiment, the decoding device may obtain the MMVD merge flag from the bitstream in the derivation of the prediction mode of the current block, based on the conditions based on the CIIP availability flag and the conditions based on the size of the current block being met. Here, the condition based on the size of the current block may be that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CIIP availability flag is that the value of the CIIP availability flag is 1. In other words, if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CIIP availability flag is 1, the decoding device can parse the MMVD merge flag from the merge data syntax contained in the bitstream.

[0317] As another example, the MMVD merge flag can be obtained from the bitstream based on the satisfaction of conditions based on the CU skip flag and the size of the current block. Here, the condition based on the size of the current block may be that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CU skip flag is that the value of the CU skip flag is 0. In other words, if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CU skip flag is 0, the decoding device can parse the MMVD merge flag from the merge data syntax contained in the bitstream.

[0318] As another example, the decoding device may obtain the MMVD merge flag from the bitstream based on the condition based on the CU skip flag being met in addition to the condition based on the CIIP availability flag and the condition based on the size of the current block. Here, the condition based on the CU skip flag is when the value of the CU skip flag is 0. In other words, the decoding device may parse the MMVD merge flag from the merge data syntax if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, the value of the CIIP availability flag is 1, and the value of the CU skip flag is 0.

[0319] As another example, a decoding device may obtain an MMVD merge flag from the bitstream based on whether conditions based on the current block information and the partitioning mode enabled flag are met. Here, the conditions based on the current block information include whether the product of the width and height of the current block is 64 or greater and / or whether the slice containing the current block is a B slice. The condition based on the partitioning mode enabled flag is whether the value of the partitioning mode enabled flag is 1. In other words, a decoding device can parse an MMVD merge flag from the merge data syntax if both the conditions based on the height of the current block and the conditions based on the current block information and the conditions based on the partitioning mode enabled flag are met.

[0320] If the conditions based on the CIIP availability flag and the conditions based on the current block size are not met, the decoding device determines whether the conditions based on the current block information and the partitioning mode availability flag are met. Alternatively, if the conditions based on the current block information and the partitioning mode availability flag are not met, the decoding device may determine whether the conditions based on the CIIP availability flag and the conditions based on the current block size are met.

[0321] On the other hand, the decoding device can also parse the MMVD merge flag from the bitstream if the product of the current block's width and height is not 32, the value of the MMVD availability flag is 1, or the maximum number of subblock merge candidates is greater than 0, and the current block's width and height are both 8 or greater. For this purpose, the merge data syntax is configured as shown in Table 7 above.

[0322] The decoding device can derive the value of the MMVD merge flag as 1 if the MMVD merge flag does not exist in the bitstream, the value of the general merge flag is 1, the value of the regular merge flag is 0, the value of the SPS MMVD available flag is 1, the product of the width and height of the current block is not 32, the maximum number of subblock merge candidates is 0 or less, or the width of the current block is less than 8, or the height of the current block is less than 8, the value of the SPS CIIP available flag is 0, or the width of the current block is 128 or more, or the height of the current block is 128 or more, or the value of the CU skip flag is 1, and the value of the SPS partitioning available flag is 0, or the maximum number of partitioning merge candidates is less than 2, or the slice type is not a B slice. Otherwise, the value of the MMVD merge flag can be derived as 0.

[0323] In another embodiment, the decoding device may obtain the merge subblock flag from the bitstream in the derivation of the prediction mode of the current block, based on the conditions based on the CIIP availability flag and the conditions based on the size of the current block being met. Here, the condition based on the size of the current block may be that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CIIP availability flag is that the value of the CIIP availability flag is 1. In other words, if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CIIP availability flag is 1, the decoding device can parse the merge subblock flag from the merge data syntax contained in the bitstream.

[0324] As another example, the merge subblock flag can be obtained from the bitstream based on the satisfaction of conditions based on the CU skip flag and the size of the current block. Here, the condition based on the size of the current block may be that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CU skip flag is that the value of the CU skip flag is 0. In other words, if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CU skip flag is 0, the decoding device can parse the merge subblock flag from the merge data syntax contained in the bitstream.

[0325] As another example, the decoding device may obtain the merge subblock flag from the bitstream based on the condition based on the CU skip flag, in addition to the condition based on the CIIP availability flag and the condition based on the size of the current block. Here, the condition based on the CU skip flag is that the value of the CU skip flag is 0. In other words, the decoding device may parse the merge subblock flag from the merge data syntax if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, the value of the CIIP availability flag is 1, and the value of the CU skip flag is 0.

[0326] As another example, a decoding device may obtain a merge subblock flag from the bitstream based on whether conditions based on the current block information and the partitioning mode enabled flag are met. Here, the conditions based on the current block information include whether the product of the width and height of the current block is 64 or greater and / or whether the slice containing the current block is a B slice. The condition based on the partitioning mode enabled flag is whether the value of the partitioning mode enabled flag is 1. In other words, a decoding device may parse a merge subblock flag from the merge data syntax if both the conditions based on the height of the current block and the information about the current block, and the conditions based on the partitioning mode enabled flag are met.

[0327] If the conditions based on the CIIP availability flag and the conditions based on the current block size are not met, the decoding device can determine whether the conditions based on the current block information and the partitioning mode availability flag are met. Alternatively, if the conditions based on the current block information and the partitioning mode availability flag are not met, the decoding device can determine whether the conditions based on the CIIP availability flag and the conditions based on the current block size are met.

[0328] On the other hand, the decoding device can also parse the merge subblock flag from the bitstream if the maximum number of subblock merge candidates is greater than 0 and the current block width and height are both 8 or greater. For this purpose, the merge data syntax is configured as shown in Table 8 above.

[0329] The decoding device can derive the merge subblock flag value as 1 if the merge subblock flag does not exist in the bitstream, the general merge flag value is 1, the regular merge flag value is 0, the merge subblock flag value is 0, the MMVD merge flag value is 0, the maximum number of subblock merge candidates is greater than 0, the width and height of the current block are both 8 or greater, the SPS CIIP available flag value is 0 or the width of the current block is 128 or greater or the height of the current block is 128 or greater or the CU skip flag value is 1, the SPS partitioning available flag value is 9 or the maximum number of partitioning merge candidates is less than 2 or the slice type is not a B slice. Otherwise, the merge subblock flag value can be derived as 0.

[0330] In another embodiment, the decoding device can obtain the CIIP flag from the bitstream in the derivation of the prediction mode of the current block, based on the conditions based on the CIIP availability flag and the conditions based on the size of the current block being met. Here, the condition based on the size of the current block may be that the product of the height and width of the current block is 64 or more, and the height and width of the current block are each less than 128. The condition based on the CIIP availability flag is that the value of the CIIP availability flag is 1. In other words, the decoding device can parse the CIIP flag from the merged data syntax if the product of the height and width of the current block is 64 or more, the height and width of the current block are each less than 128, and the value of the CIIP availability flag is 1.

[0331] As another example, the decoding device may obtain the CIIP flag from the bitstream based on the conditions based on the CIIP availability flag and the current block size, plus the condition based on the CU skip flag, where the condition based on the CU skip flag is that the value of the CU skip flag is 0. In other words, the decoding device may parse the CIIP flag from the merged data syntax if the product of the current block height and the current block width is 64 or greater, the current block height and the current block width are both less than 128, the value of the CIIP availability flag is 1, and the value of the CU skip flag is 0.

[0332] As another example, a decoding device can obtain the CIIP flag from a bitstream based on whether conditions based on the current block information and the partitioning mode enabled flag are met. Here, the conditions based on the current block information include whether the product of the width and height of the current block is 64 or greater and / or whether the slice containing the current block is a B slice. The condition based on the partitioning mode enabled flag is whether the value of the partitioning mode enabled flag is 1. In other words, a decoding device can parse the CIIP flag from merged data syntax if both the conditions based on the height of the current block and the information about the current block, and the conditions based on the partitioning mode enabled flag are met.

[0333] If the conditions based on the CIIP availability flag and the conditions based on the current block size are not met, the decoding device determines whether the conditions based on the current block information and the partitioning mode availability flag are met. Alternatively, if the conditions based on the current block information and the partitioning mode availability flag are not met, the decoding device can determine whether the conditions based on the CIIP availability flag and the conditions based on the current block size are met. For this purpose, the merge data syntax is configured as shown in Table 9 above.

[0334] The decoding device can derive the CIIP flag value as 1 if the bitstream does not contain the CIIP flag, the general merge flag is valued as 1, the regular merge flag is valued as 0, the merge subblock flag is valued as 0, the MMVD merge flag is valued as 0, the SPS CIIP enabled flag is valued as 1, the CU skip flag is valued as 0, the product of the current block's width and height is 64 or greater, the current block's width and height are both less than 128, the SPS partitioning enabled flag is valued as 0, or the maximum number of partitioning merge candidates is less than 2, or the slice type is not a B slice. Otherwise, the CIIP flag value is derived as 0.

[0335] In the embodiments described above, the method is explained based on a flowchart in a series of steps or blocks, but the embodiments are not limited to the order of the steps, and some steps may occur with other steps, in a different order, or simultaneously. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the embodiments described herein.

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

[0337] In this document, when embodiments are implemented in software, the methods described above can be implemented by modules (processes, functions, etc.) that perform the functions described above. These modules are stored in memory and can be executed by a processor. The memory may be internal or external to the processor and may be connected to the processor by a variety of well-known means. The processor may include an ASIC (application-specific integrated circuit), other chipsets, logic circuits, and / or data processing devices. The memory may include ROM (read-only memory), RAM (random access memory), flash memory, memory cards, storage media, and / or other storage devices. That is, the embodiments described in this document can be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each drawing can be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information on instructions or algorithms for implementation may be stored on a digital storage medium.

[0338] Furthermore, the decoding and encoding devices to which the embodiments(et al.) of this document apply can include multimedia broadcasting transceivers, mobile communication terminals, home cinema video equipment, digital cinema video equipment, surveillance cameras, video interaction devices, real-time communication devices such as video communications, mobile streaming devices, storage media, camcorders, video-on-demand (VoD) service providers, over-the-top (OTT) video equipment, internet streaming service providers, 3D video equipment, virtual reality (VR) equipment, argumentative reality (AR) equipment, image-phone video equipment, transportation terminals (e.g., vehicle terminals (including autonomous vehicles), airplane terminals, ship terminals, etc.), and medical video equipment, and can be used to process video signals or data signals. For example, over-the-top (OTT) video equipment can include game consoles, Blu-ray players, internet-connected TVs, home theater systems, smartphones, tablet PCs, and digital video recorders (DVRs).

[0339] Furthermore, the processing methods to which the embodiments(et al.) of this document apply can be produced in the form of programs executed on a computer and stored on a computer-readable recording medium. Multimedia data having the data structures according to the embodiments(et al.) of this document can also be stored on a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices that store data that can be read by a computer. The computer-readable recording medium can include, for example, Blu-ray discs (BDs), general-purpose serial buses (USB), 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 over the Internet). Furthermore, bitstreams generated by encoding methods can be stored on a computer-readable recording medium or transmitted over a wireless network.

[0340] Furthermore, the embodiments(e) of this document can be embodied in computer program products using program code, and said program code can be executed on a computer according to the embodiments(e) of this document. The said program code can be stored on a computer-readable carrier.

[0341] Figure 17 shows an example of a content streaming system to which the embodiments disclosed in this document can be applied.

[0342] As shown in Figure 17, the content streaming system to which the embodiments described in this document apply broadly includes an encoding server, a streaming server, a web server, a media storage facility, user equipment, and multimedia input devices.

[0343] The encoding server is responsible for compressing content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data to generate a bitstream, and then transmitting this bitstream to the streaming server. In other cases, if a multimedia input device such as a smartphone, camera, or camcorder directly generates the bitstream, the encoding server may be omitted.

[0344] The bitstream can be generated by an encoding method or bitstream generation method applicable to the embodiments of this document, and the streaming server can temporarily store the bitstream in the process of transmitting or receiving the bitstream.

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

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

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

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

Claims

1. In a decoding method performed by a decoding device, Steps include obtaining information about the prediction mode of the current block from the bitstream, A step of deriving the prediction mode of the current block based on the information relating to the prediction mode, The steps include generating a prediction sample for the current block based on the prediction mode, The step of generating a reconstructed sample based on the predicted sample includes, The bitstream includes a sequence parameter set and merge data, The sequence parameter set includes a CIIP (combined inter-picture merge and intra-picture prediction) enablement flag and a partitioning mode enablement flag, The derivation step includes parsing the regular merge flag from the bitstream based on whether the first and second conditions are met, The first condition is satisfied only on the basis of the conditions relating to the height and width of the current block, The second condition is met based on the first or second case, The first case includes the value of the CIIP availability flag being equal to 1 and the product of the height of the current block and the width of the current block being 64 or more. The second case includes the value of the partitioning mode enable flag being equal to 1, A decoding method in which the regular merge flag is parsed from the merge data of the bitstream based on whether the first and second conditions are met.

2. In an encoding method performed by an encoding device, The current step is to determine the prediction mode of the block, A step of generating information about the prediction mode based on the prediction mode, The step of encoding video information including the information relating to the prediction mode, The aforementioned video information includes a sequence parameter set and merge data. The sequence parameter set includes a CIIP (combined inter-picture merge and intra-picture prediction) enablement flag and a partitioning mode enablement flag, The aforementioned video information includes a regular merge flag based on whether the first and second conditions are met. The first condition is satisfied only on the basis of the conditions relating to the height and width of the current block, The second condition is met based on the first or second case, The first case includes the value of the CIIP availability flag being equal to 1 and the product of the height of the current block and the width of the current block being 64 or more. The second case includes the value of the partitioning mode enable flag being equal to 1, An encoding method configured such that the regular merge flag is parsed from the merge data of the video information based on whether the first and second conditions are met.

3. Regarding methods for transmitting video data, A step of obtaining a bitstream relating to the video, wherein the bitstream is The current step is to determine the prediction mode of the block, A step of generating information about the prediction mode based on the prediction mode, A step of encoding video information including the information relating to the prediction mode, and a step of generating based on, The step of transmitting the data, which includes the bitstream, The aforementioned video information includes a sequence parameter set and merge data. The sequence parameter set includes a CIIP (combined inter-picture merge and intra-picture prediction) enablement flag and a partitioning mode enablement flag, The aforementioned video information includes a regular merge flag based on whether the first and second conditions are met. The first condition is satisfied only on the basis of the conditions relating to the height and width of the current block, The second condition is met based on the first or second case, The first case includes the value of the CIIP availability flag being equal to 1 and the product of the height of the current block and the width of the current block being 64 or more. The second case includes the value of the partitioning mode enable flag being equal to 1, A method wherein the regular merge flag is configured to be parsed from the merge data of the video information based on whether the first and second conditions are met.