Method and apparatus for syntax signaling in video / image coding system

The method enhances video coding efficiency by determining prediction modes using CIIP and partitioning flags, addressing the need for efficient compression of high-resolution images/videos and immersive media.

JP2026012338APending Publication Date: 2026-01-23LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2025183275
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-06-23
Filing Date
2025-10-30
Publication Date
2026-01-23

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 image/video compression technology to reduce transmission and storage costs while improving coding efficiency, particularly in inter prediction processes.

Method used

A method and apparatus for video coding that includes determining prediction modes based on CIIP availability flags and partitioning mode availability flags, and efficiently signaling syntax related to merge modes during inter prediction.

Benefits of technology

Improves overall image/video compression efficiency, enables efficient inter prediction, and reduces unnecessary syntax signaling during inter prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026012338000001_ABST
    Figure 2026012338000001_ABST
Patent Text Reader

Abstract

To provide a method and apparatus for improving video coding efficiency.SOLUTION: A decoding method performed by a decoding apparatus includes obtaining at least one of a CIIP available flag indicating whether CIIP is available and a partitioning mode available flag indicating whether a partitioning mode for performing prediction by dividing a current block into two partitions is available from a bitstream, determining a prediction mode of the current block based on at least one of the CIIP available flag and the partitioning mode available flag, and generating a prediction sample of the current block based on the prediction mode, wherein the determining includes obtaining a regular merge flag from the bitstream based on at least one of the CIIP available flag and the partitioning mode available flag.SELECTED DRAWING: Figure 8
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 signaling syntax required for video / image reconstruction in a video / image coding system. [Background technology]

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

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

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

[0005] The technical problem of this document is to provide a method and apparatus for 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 problem of this document is to provide a method and apparatus for removing unnecessary signaling during inter prediction.

[0008] Another technical problem of this document is to provide a method and apparatus for efficiently signaling syntax related to a merge mode during inter prediction. [Means for solving the problem]

[0009] According to an embodiment of this document, a decoding method performed by a decoding device includes the steps of: obtaining at least one of a CIIP availability flag indicating whether CIIP (combined inter-picture merge and intra-picture prediction) is available from a bitstream; and a partitioning mode availability flag indicating whether a partitioning mode that divides a current block into two partitions and performs prediction is available; determining a prediction mode for the current block based on at least one of the CIIP availability flag and the partitioning mode availability flag; and generating a prediction sample for the current block based on the prediction mode, wherein the determining step includes the step of obtaining a regular merge flag from the bitstream based on at least one of the CIIP availability flag and the partitioning mode availability flag.

[0010] According to another embodiment of the present document, an encoding method performed by an encoding device includes the steps of determining a prediction mode of a current block, deriving a prediction sample of the current block based on the prediction mode, deriving a residual sample based on the prediction sample, and encoding video information including information on the prediction mode generated based on the prediction mode and residual information generated based on the residual sample, wherein the information on the prediction mode includes at least one of a CIIP availability flag indicating whether CIIP is available and a partitioning mode availability flag indicating whether a partition mode in which prediction is performed by dividing the current block into two partitions is available, and the video information includes a regular merge flag based on at least one of the CIIP availability flag and the partitioning mode availability flag.

[0011] According to another embodiment of the present document, there is provided a computer-readable digital storage medium, the digital storage medium including information for performing a decoding method by decoding, the decoding method including the steps of: obtaining at least one of a CIIP availability flag indicating whether CIIP is available from a bitstream and a partitioning mode availability flag indicating whether a partitioning mode for dividing a current block into two partitions and performing prediction is available; determining a prediction mode for the current block based on at least one of the CIIP availability flag and the partitioning mode availability flag; and generating a prediction sample for the current block based on the prediction mode, wherein the determining step includes the step of obtaining a regular merge flag from the bitstream based on at least one of the CIIP availability flag and the partitioning mode availability flag. [Effects of the Invention]

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

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

[0014] According to one embodiment of this document, unnecessary syntax signaling during inter prediction can be efficiently removed.

[0015] According to one embodiment of this document, syntax regarding merge modes can be signaled efficiently during inter prediction.

[0016] According to one embodiment of this document, syntax regarding merge modes can be signaled efficiently during inter prediction. [Brief explanation of the drawings]

[0017] [Figure 1] 1 illustrates schematically an example of a video / image coding system to which embodiments of the present document may be applied; [Figure 2] 1 is a diagram illustrating the configuration of a video / image encoding device to which an embodiment of the present document can be applied; [Figure 3] 1 is a diagram illustrating the configuration of a video / image decoding device to which an embodiment of the present document can be applied. [Figure 4] FIG. 2 illustrates a hierarchical structure for coded video. [Figure 5] 1 illustrates an example of an inter-prediction based video / image encoding method. [Figure 6] 1 illustrates an example of an inter-prediction based video / image decoding method. [Figure 7] 1 illustrates a schematic diagram of a merge candidate list construction method. [Figure 8] 1 illustrates an example of a video / image encoding method and associated components including an inter-prediction method according to embodiments of the present document. [Figure 9]1 illustrates an example of a video / image encoding method and associated components including an inter-prediction method according to embodiments of the present document. [Figure 10] 1 illustrates an example of a video / picture decoding method and related components including an inter-prediction method according to an embodiment of the present document. [Figure 11] 1 illustrates an example of a video / picture decoding method and related components including an inter-prediction method according to an embodiment of the present document. [Figure 12] 1 illustrates an example of a content streaming system to which the embodiments disclosed herein may be applied. DETAILED DESCRIPTION OF THE INVENTION

[0018] Because the disclosure of this document can be modified in various ways and can have various embodiments, specific embodiments will be illustrated in the drawings and described in detail. The terms used in this document are used merely to describe specific embodiments and are not intended to limit the technical ideas of this document. The singular expressions include the expression "at least one" unless the context clearly indicates otherwise. In this document, terms such as "comprise" or "have" are intended to specify the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

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

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

[0021] In this document, various embodiments relating to video / image coding are presented, and unless otherwise stated, the embodiments may be performed in combination with each other.

[0022] In this document, video may refer to a collection of a series of images over time. A picture generally refers to a unit that shows one image at a specific time, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile may contain one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A picture may be composed of one or more tile groups. A tile group may contain one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each consisting 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 refers to a specific sequential ordering of CTUs partitioning a picture, in which the CTUs are ordered consecutively in a CTU raster scan within 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 height of the picture. A tile scan indicates a specific sequential ordering of CTUs partitioning a picture, in which the CTUs are ordered consecutively in a CTU raster scan in a tile, whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice includes an integer number of bricks of a picture, which 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, the terms tile group and slice may be used interchangeably.For example, in this document, a tile group / tile group header may be referred to as a slice / slice header.

[0023] A pixel or a pel may refer to the smallest unit constituting one picture (or image). A term corresponding to a pixel may also be used: "sample." A sample may generally refer to a pixel or a pixel value, or may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component.

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

[0025] In this document, the terms " / " and "," should be interpreted to mean "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." Also, "A, B, C" means "at least one of A, B, and / or C." (In this document, the term " / " and "," should be interpreted to indicate "and / or." For instance, the expression "A / B" may mean "A and / or B." Further, "A, B" may mean "A and / or B." Further, "A / B / C" may mean "at least one of A, B, and / or C." Also, "A / B / C" may mean "at least one of A, B, and / or C.")

[0026] Additionally, 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) "A and B." Further, in the document, the term "or" should be interpreted to indicate "and / or." For instance, the expression "A or B" may comprise 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" in this document should be interpreted to indicate "additionally or alternatively."

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

[0028] FIG. 1 illustrates schematically an example of a video / image coding system to which embodiments of this document may be applied.

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

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

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

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

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

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

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

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

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

[0038] 2 is a diagram for explaining the configuration of a video / image encoding device to which the embodiments of this document can be applied. Hereinafter, the term "video encoding device" includes the image encoding device.

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

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

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

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

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

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

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

[0046] 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 reconstructed signal or a residual signal.

[0047] The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, GBT refers to a transform obtained from a graph representing inter-pixel relationship information. CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same square size or to non-square blocks of variable size.

[0048] The quantization unit 233 quantizes the transform coefficients and transmits the quantized signal to the entropy encoding unit 240. The entropy encoding unit 240 encodes the quantized signal (information about the quantized transform coefficients) and outputs it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantization unit 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.

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

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

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

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

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

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

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

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

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

[0058] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 3 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may parse the bitstream to derive information (e.g., video / video information) necessary for video restoration (or picture restoration). The video / video information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / video information may also include general constraint information. The decoding apparatus may further decode pictures based on the information on the parameter sets and / or the general constraint information. Signaled / received information and / or syntax elements, which will be described later in this document, may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as Exponential Golomb Coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using information on the syntax element to be decoded and decoding information on neighboring and current blocks or information on symbols / bins decoded in previous steps, predicts the occurrence probability of the bins based on the determined context model, and performs arithmetic decoding of the bins to generate symbols corresponding to the values ​​of each syntax element.In this case, the CABAC entropy decoding method may update the context model using information on the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Prediction-related information among the information decoded by the entropy decoding unit 310 is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values ​​entropy-decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 320.

[0059] The residual processing unit 320 can derive a residual signal (residual block, residual sample, residual sample array). Furthermore, filtering-related information from the information decoded by the entropy decoding unit 310 can be provided to the filtering unit 350. A receiving unit (not shown) for receiving a signal output from the encoding device can be further configured as an internal / external element of the decoding device 300, or the receiving unit can be a component of the entropy decoding unit 310. The decoding device according to this document can be referred to as 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 may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.

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

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

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

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

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

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

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

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

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

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

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

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

[0072] The video / picture coding method according to this document is performed based on the following partitioning structure. Specifically, procedures such as prediction, residual processing (e.g., inverse transform, inverse quantization), syntax element coding, and filtering, which will be described later, can be performed based on the CTUs and CUs (and / or TUs and PUs) derived based on the partitioning structure. The block partitioning procedure is performed by the image partitioning unit 210 of the encoding device, and partition-related information is encoded by the entropy encoding unit 240 and transmitted to the decoding device in the form of a bitstream. The entropy decoding unit 310 of the decoding device derives a block partitioning structure for the current picture based on the partitioning-related information obtained from the bitstream, and then performs a series of procedures for video decoding (e.g., prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.) based on the block partitioning structure. The CU size and the TU size may be the same, or multiple TUs may exist within a CU region. Meanwhile, the CU size generally refers to the luma component (sample) CB (coding block) size. The TU size generally refers to the size of a luma component (sample) TB (transform block). The chroma component (sample) CB or TB size may be derived based on the luma component (sample) CB or TB size according to a component ratio according to the color format (chroma format, for example, 4:4:4, 4:2:2, 4:2:0, etc.) of a picture / video. The TU size is derived based on maxTbSize. For example, if the CU size is larger than maxTbSize, a plurality of TUs (TBs) of the maxTbSize may be derived from the CU, and transform / inverse transform may be performed in units of the TUs (TBs). Also, for example, if intra prediction is applied, the intra prediction mode / type may be derived in units of the CU (or CB), and procedures for deriving neighboring reference samples and generating predicted samples may be performed in units of TUs (or TBs).In this case, there are one or more TUs (or TBs) within one CU (or CB) region, and in this case, the multiple TUs (or TBs) can share the same intra prediction mode / type.

[0073] Furthermore, in video / image coding according to this document, video processing units have a hierarchical structure. A picture is divided into one or more tiles, bricks, slices, and / or tile groups. A slice includes one or more bricks. A brick includes one or more CTU rows within the tile. A slice includes an integer number of bricks in a picture. A tile group includes one or more tiles. A tile includes one or more CTUs. The CTUs can be divided into one or more CUs. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. A tile group includes an integer number of tiles according to tile raster scan within a picture. A slice header can carry information / parameters applicable to the slice (block within the slice). If an encoding / decoding device has a multi-core processor, the encoding / decoding procedures for the tiles, slices, bricks, and / or tile groups are processed in parallel. In this document, the terms slice and tile group may be used interchangeably. That is, a tile group header may be referred to as a slice header. Here, a slice has one of the slice types, including an intra (I) slice, a predictive (P) slice, and a bI-predictive (B) slice. For blocks in an I slice, inter prediction is not used for prediction, and only intra prediction is used. Of course, even in this case, original sample values ​​can be coded and signaled without prediction. For blocks in a P slice, intra prediction or inter prediction is used, and when inter prediction is used, only uni prediction is used. On the other hand, for blocks in a B slice, intra prediction or inter prediction is used, and when inter prediction is used, up to bi prediction can be used.

[0074] In the encoder, the tile / tile group, brick, slice, maximum and minimum coding unit sizes are determined according to the characteristics of the video image (e.g., resolution) or taking into consideration coding efficiency or parallel processing, and information regarding this or information that can lead to this is included in the bitstream.

[0075] The decoder can obtain information indicating whether the tile / tile group, brick, slice, or CTU within the current picture is divided into multiple coding units, etc. Efficiency can be improved by allowing such information to be obtained (transmitted) only under certain conditions.

[0076] The slice header (slice header syntax) includes information / parameters commonly applicable to the slices. The APS (APS syntax) or PPS (PPS syntax) includes information / parameters commonly applicable to one or more pictures. The SPS (SPS syntax) includes information / parameters commonly applicable to one or more sequences. The VPS (VPS syntax) includes information / parameters commonly applicable to multiple layers. The DPS (DPS syntax) includes information / parameters commonly applicable to video in general. The DPS includes information / parameters related to concatenation of a coded video sequence (CVS).

[0077] In this document, the higher level syntax includes at least one of the APS syntax, PPS syntax, SPS syntax, VPS syntax, DPS syntax, and slice header syntax.

[0078] Also, for example, information regarding the division and configuration of tiles / tile groups / bricks / slice is configured in the encoding stage through the higher level syntax and transmitted to a decoding device in the form of a bitstream.

[0079] FIG. 4 is a diagram showing a hierarchical structure for coded video.

[0080] The coded video is divided into the VCL (video coding layer), which handles the video decoding process and the video itself, the lower system that transmits and stores the coded information, and the NAL (network abstraction layer), which exists between the VCL and the lower system and handles network adaptation functions.

[0081] In VCL, it is possible to generate VCL data including compressed video data (slice data), or to generate parameter sets including information such as a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), and a Video Parameter Set (VPS), or an SEI (Supplemental Enhancement Information) message that is additionally required for the video decoding process.

[0082] In NAL, NAL units are generated by adding header information (NAL unit header) to RBSP (Raw Byte Sequence Payload) generated by VCL. Here, RBSP refers to slice data, parameter sets, SEI messages, etc. generated by VCL. NAL units include NAL unit type information identified by the RBSP data included in the NAL unit.

[0083] As shown in Figure 4, NAL units are classified into VCL NAL units and non-VCL NAL units according to the RBSP generated in the VCL. A VCL NAL unit refers to a NAL unit that contains information about a video (slice data), and a non-VCL NAL unit refers to a NAL unit that contains information necessary for decoding a video (parameter set or SEI message).

[0084] The VCL NAL units and non-VCL NAL units are transmitted over a network with header information according to the data standard of the lower system. For example, the NAL units can be transformed into a data format conforming to a predetermined standard, such as the H.266 VVC file format, the Real-time Transport Protocol (RTP), or the Transport Stream (TS), and then transmitted over various networks.

[0085] As described above, the NAL unit type of an NAL unit is identified by the RBSP data structure included in the NAL unit, and information about such NAL unit type is stored and signaled in the NAL unit header.

[0086] For example, NAL units are broadly classified into VCL NAL unit types and non-VCL NAL unit types depending on whether they contain video-related information (slice data). VCL NAL unit types are classified according to the properties and types of pictures contained in the VCL NAL units, and non-VCL NAL unit types are classified according to the types of parameter sets.

[0087] The following are examples of NAL unit types identified by the types of parameter sets included in the non-VCL NAL unit types:

[0088] -APS (Adaptation Parameter Set) NAL unit: Type for NAL units containing APS

[0089] -DPS (Decoding Parameter Set) NAL unit: Type for NAL units containing DPS

[0090] -VPS (Video Parameter Set) NAL unit: Type for NAL units containing VPS

[0091] -SPS (Sequence Parameter Set) NAL unit: Type for NAL unit including SPS

[0092] -PPS (Picture Parameter Set) NAL unit: Type for NAL unit containing PPS

[0093] The NAL unit type has syntax information for the NAL unit type, and the syntax information is stored in a NAL unit header and signaled. For example, the syntax information is nal_unit_type, and the NAL unit type can be specified by the value of nal_unit_type.

[0094] The slice header (slice header syntax) includes information / parameters commonly applicable to the slices. The APS (APS syntax) or PPS (PPS syntax) includes information / parameters commonly applicable to one or more slices or pictures. The SPS (SPS syntax) includes information / parameters commonly applicable to one or more sequences. The VPS (VPS syntax) includes information / parameters commonly applicable to multiple layers. The DPS (DPS syntax) includes information / parameters commonly applicable to video in general. The DPS includes information / parameters related to concatenation of coded video sequences (CVSs). In this document, the term High Level Syntax (HLS) includes at least one of the APS syntax, PPS syntax, SPS syntax, VPS syntax, DPS syntax, and slice header syntax.

[0095] In this document, the image / video information encoded from an encoding device to a decoding device and signaled in bitstream form not only includes partitioning-related information within a picture, intra / inter prediction information, residual information, in-loop filtering information, etc., but also includes information contained in the slice header, information contained in the APS, information contained in the PPS, information contained in the SPS, and / or information contained in the VPS.

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

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

[0098] When inter prediction is applied to the current block, a prediction unit of an encoding / decoding device performs inter prediction on a block-by-block basis to derive predicted samples. Inter prediction refers to 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 (prediction sample array) for the current block can be derived based on a reference block (reference sample array) identified by a motion vector on a reference picture indicated by a reference picture index. In this case, to reduce the amount of motion information transmitted in the inter prediction mode, motion information for the current block can be predicted on a block, sub-block, or sample-by-block basis based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include information on an inter prediction type (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). When inter-prediction is applied, the neighboring blocks include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring blocks may be the same or different. The temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and the reference picture including the temporal neighboring blocks may be called collocated pictures (colPics).For example, a motion information candidate list may be constructed based on neighboring blocks of the current block, and flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled. Inter prediction may 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 that of the selected neighboring block. 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 neighboring block is used as a motion vector predictor, and a motion vector difference is signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.

[0099] A video / picture encoding procedure based on inter prediction may generally include, for example, the following.

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

[0101] An encoding apparatus performs inter prediction on a current block (S500). The encoding apparatus derives an inter prediction mode and motion information for the current block and generates a predicted sample for the block. Here, the inter prediction mode determination, motion information derivation, and predicted sample generation procedures may be performed simultaneously, or one procedure may be performed before the other procedures. For example, an inter prediction unit of the encoding apparatus includes a prediction mode determination unit, a motion information derivation unit, and a predicted sample derivation unit, in which the prediction mode determination unit determines a prediction mode for the current block, the motion information derivation unit derives motion information for the current block, and the predicted sample derivation unit derives a predicted sample for the current block. For example, the inter prediction unit of the encoding apparatus may search for a block similar to the current block within a certain region (search region) of a reference picture using motion estimation, and derive a reference block whose difference from the current block is minimum or equal to or less than a certain criterion. Based on this, a reference picture index indicating a reference picture in which the reference block is located can be derived, and a motion vector can be derived based on a position difference between the reference block and the current block. The encoding apparatus can determine a mode to be applied to the current block from various prediction modes. The encoding apparatus can compare rate-distortion (RD) costs for the various prediction modes to determine an optimal prediction mode for the current block.

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

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

[0104] The encoding apparatus derives residual samples based on the predicted samples (S510) by comparing the original samples of the current block with the predicted samples.

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

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

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

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

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

[0110] As shown in Figure 6, the decoding apparatus performs operations corresponding to those performed by the encoding apparatus: The decoding apparatus performs prediction on the current block based on received prediction information, and derives predicted samples.

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

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

[0113] The decoding apparatus derives motion information of the current block based on the determined inter prediction mode (S610). For example, when a skip mode or a merge mode is applied to the current block, the decoding apparatus may construct a merge candidate list (described below) and select one of the merge candidates included in the merge candidate list. The selection is performed based on the selection information (merge index) described above. Motion information of the selected merge candidate is used to derive motion information of the current block. The motion information of the selected merge candidate may be used as motion information of the current block.

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

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

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

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

[0118] The decoding apparatus generates residual samples for the current block based on the received residual information (S630). The decoding apparatus generates reconstructed samples for the current block based on the predicted samples and the residual samples, and generates a reconstructed picture based on the reconstructed samples (S640). As described above, an in-loop filtering procedure can then be applied to the reconstructed picture.

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

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

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

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

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

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

[0125] Specifically, for example, information about the inter prediction mode of the current block may be coded and signaled at a level such as a CU (CU syntax), or may be implicitly determined depending on conditions. In this case, some modes may be explicitly signaled, and the remaining modes may be implicitly derived.

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

[0127] [Table 1-1] [Table 1-2] [Table 1-3] [Table 1-4] [Table 1-5] [Table 1-6] [Table 1-7] [Table 1-8] [Table 1-9] [Table 1-10] [Table 1-11] [Table 1-12] [Table 1-13]

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

[0129] A value of 0 in pred_mode_flag indicates that the current coding unit is coded in inter prediction mode. A value of 1 in pred_mode_flag indicates that the current coding unit is coded in intra prediction mode. (pred_mode_flag equal to 0 specifies that the current coding unit is coded in inter prediction mode. pred_mode_flag equal to 1 specifies that the current coding unit is coded in intra prediction mode.)

[0130] A value of 1 in pred_mode_ibc_flag indicates that the current coding unit is coded in IBC prediction mode. A value of 0 in pred_mode_ibc_flag indicates that the current coding unit is not coded in IBC prediction mode (pred_mode_ibc_flag equal to 1 specifies that the current coding unit is coded in IBC prediction mode. pred_mode_ibc_flag equal to 0 specifies that the current coding unit is not coded in IBC prediction mode).

[0131] A value of 1 in pcm_flag[x0][y0] indicates that the pcm_sample() syntax structure is present and the transform_tree() syntax structure is not present in the coding unit including the luma coding block at the location (x0, y0). A value of 0 in pcm_flag[x0][y0] indicates that the pcm_sample() syntax structure is not present (pcm_flag[x0][y0] equal to 1 specifies that the pcm_sample() syntax structure is present and the transform_tree() syntax structure is not present in the coding unit including the luma coding block at the location (x0, y0). pcm_flag[x0][y0] equal to 0 specifies that the pcm_sample() syntax structure is not present. In other words, pcm_flag indicates whether PCM (pulse coding modulation) mode is applied to the current block. If PCM mode is applied to the current block, the values ​​of the original samples in the current block can be coded and signaled without applying prediction, transformation, quantization, etc.

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

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

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

[0135] [Table 2-1] [Table 2-2] [Table 2-3]

[0136] Here, if the value of regular_merge_flag[x0][y0] is 1, it indicates that regular merge mode is used to generate the inter prediction parameters of the current coding unit. That is, regular_merge_flag indicates whether the merge mode (regular merge mode) can be applied to the current block.

[0137] When the value of mmvd_merge_flag[x0][y0] is 1, it indicates that 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.

[0138] mmvd_cand_flag[x0][y0] specifies 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].

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0154] A value of 1 in cu_affine_type_flag[x0][y0] indicates that 6-parameter affine model-based motion compensation is used to generate the prediction samples of the current coding unit when decoding a P or B slice for the current coding unit. A value of 0 in cu_affine_type_flag[x0][y0] indicates that 4-parameter affine model-based motion compensation is used to generate the prediction samples of the current coding unit. (cu_affine_type_flag[x0][y0] equal to 1 specifies 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. cu_affine_type_flag[x0][y0] equal to 0 specifies that 4-parameter affine model-based motion compensation is used to generate the prediction samples of the current coding unit.)

[0155] amvr_flag[x0][y0] indicates the resolution of the motion vector differential. The array indexes x0, y0 indicate the position (x0, y0) of the top-left luma sample of the considered coding block relative to the top-left luma sample of the picture. A value of 0 in amvr_flag[x0][y0] indicates that the resolution of the motion vector differential is 1 / 4 of the luma sample. A value of 1 in amvr_flag[x0][y0] indicates that the resolution of the motion vector difference is additionally specified by amvr_precision_flag[x0][y0]. (amvr_flag[x0][y0] specifies the resolution of motion vector difference. 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].)

[0156] A value of 0 in amvr_precision_flag[x0][y0] indicates that the resolution of the motion vector differential is 1 integer luma sample if the value of inter_affine_flag[x0][y0] is 0, and 1 / 16 of a luma sample if the value of amvr_precision_flag[x0][y0] is 0; otherwise, it indicates that the resolution of the motion vector differential is 4 luma samples if the value of inter_affine_flag[x0][y0] is 0, and 1 integer luma sample if the value of amvr_precision_flag[x0][y0] is 1. The array indices x0, 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, 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.)

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

[0158] A coding apparatus performs inter prediction using motion information of a current block. An encoding apparatus can derive optimal motion information for a current block through a motion estimation procedure. For example, the encoding apparatus can use an original block in an original picture for the current block to search for a similar reference block with high correlation in fractional pixel units within a predetermined search range in the reference picture, thereby deriving motion information. Block similarity can be derived based on a phase-based sample value difference. For example, block similarity is calculated based on the SAD between the current block (or a template of the current block) and a reference block (or a template of the reference block). In this case, motion information can be derived based on the reference block with the smallest SAD within the search range. The derived motion information is signaled to a decoding apparatus in various ways based on the inter prediction mode.

[0159] The coding apparatus may derive predictive sample(s) for the current block based on the motion information, and the current block including the predictive samples may be referred to as a predicted block.

[0160] The predicted block may include prediction samples (prediction sample array) of the current block. If the motion vector of the current block indicates a fractional sample unit, an interpolation procedure is performed, through which prediction samples of the current block can be derived based on reference samples in fractional sample units within a reference picture. If affine inter-prediction is applied to the current block, the coding device may generate prediction samples based on motion vectors (MVs) in sample / sub-block units. If bi-prediction is applied, prediction samples derived through a weighted sum or weighted average (according to the phase) of prediction samples derived based on L0 prediction (i.e., prediction using a reference picture in the reference picture list L0 and MVL0) and prediction samples derived based on L1 prediction (i.e., prediction using a reference picture in the reference picture list L1 and MVL1) can be used as prediction samples of the current block. When bi-prediction is applied, if the reference picture used for L0 prediction and the reference picture used for L1 prediction are located in different temporal directions relative to the current picture (i.e., if they are bi-predictive but also bidirectional), this may be called true bi-prediction.

[0161] Based on the derived prediction samples, reconstructed samples and pictures can be generated, followed by procedures such as in-loop filtering.

[0162] FIG. 7 shows a schematic diagram of a merge candidate list construction method.

[0163] When a merge mode is applied during inter prediction, motion information of a current block is not directly transmitted, but is derived using motion information of neighboring predicted blocks. Therefore, the encoding apparatus can indicate motion information of the current block by transmitting flag information indicating that the merge mode is used and a merge index indicating which neighboring predicted block is used. The merge mode may also be called a regular merge mode.

[0164] The coding device searches for merge candidate blocks to be used to derive motion information of the current block to perform the merge mode. For example, up to five merge candidate blocks may be used, but this embodiment is not limited to this. Also, information regarding the maximum number of merge candidate blocks may be transmitted in a slice header or a tile group header, but this embodiment is not limited to this. After finding the merge candidate blocks, the coding device may generate a merge candidate list and select the merge candidate block with the smallest cost as the final merge candidate block.

[0165] This document provides various embodiments for the merge candidate blocks that make up the merge candidate list.

[0166] The merge candidate list includes, 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 (A0, A1, B0, B1, B2) shown in FIG. 6 can be used as spatial merge candidates. Hereinafter, the spatial merge candidates or spatial MVP candidates described later may be referred to as SMVPs, and the temporal merge candidates or temporal MVP candidates described later may be referred to as TMVPs.

[0167] The merge candidate list for the current block is constructed, for example, according to the following procedure.

[0168] First, a coding apparatus (encoding apparatus / decoding apparatus) searches spatial neighboring blocks of a current block and inserts derived spatial merge candidates into a merge candidate list (S700). For example, the spatial neighboring blocks may include a lower-left corner neighboring block (A0), a left-side neighboring block (A1), a right-side neighboring block (B0), an upper-right corner neighboring block (B1), and an upper-left corner neighboring block (B2) of the current block. However, this is merely an example, and additional neighboring blocks, such as a right-side neighboring block, a lower-side neighboring block, and a lower-right neighboring block, may also be used as the spatial neighboring blocks. The coding apparatus may search the spatial neighboring blocks based on priority to detect available blocks and derive motion information of the detected blocks as the spatial merge candidates. For example, the encoding apparatus and / or decoding apparatus may search the five blocks in the order of A1, B1, B0, A0, and B2 and sequentially index available candidates to form a merge candidate list.

[0169] The coding apparatus also searches for temporal neighboring blocks of the current block and inserts derived temporal merge candidates into the merge candidate list (S710). The temporal neighboring blocks may be located on a reference picture that is a different picture from the current picture in which the current block is located. The reference picture in which the temporal neighboring blocks are located may be called a collocated picture or col picture. The temporal neighboring blocks may be searched for in the order of a lower right corner neighboring block and a lower right center block of a co-located block with respect to the current block on the col picture.

[0170] Meanwhile, the coding apparatus checks whether the number of current merge candidates is less than the maximum number of merge candidates (S720). The maximum number of merge candidates can be predefined or signaled from the encoding apparatus to the decoding apparatus. For example, the encoding apparatus generates information about the maximum number of merge candidates, encodes it, and transmits it to the decoding apparatus in the form of a bitstream. If the maximum number of merge candidates is reached, no further candidate addition processes may be performed.

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

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

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

[0174] When the skip mode is applied during inter prediction, the motion information of the current block can be derived in the same manner as when the merge mode is applied, except that when the skip mode is applied, the residual signal for the corresponding block is omitted, and therefore, the predicted samples can be used directly as reconstructed samples.

[0175] The temporal candidate refers to the temporal merge candidate described above. In addition, the motion vector included in the temporal candidate may correspond to a temporal MVP candidate.

[0176] In this step, only one candidate is added to the candidate list. Particularly, in the derivation of this temporal merge candidate, a scaled motion vector is derived based on the co-located CU belonging to the collocated reference picture (may be referred to as colPic). The reference picture list to be used for the derivation of the co-located CU is explicitly signaled in the slice header.The scaled motion vector for the temporal merge candidate is obtained as illustrated by the dotted line in Figure 8, which is scaled from the motion vector of the co-located CU using the POC (picture order count) distances tb and td, where tb is defined to be the POC difference between the reference picture of the current picture and the current picture, and tb is defined to be the POC difference between the reference picture of the co-located picture and the co-located picture. The reference picture index of the temporal merge candidate is set equal to zero.

[0177] A position is selected between temporal candidates C0 and C1. If the CU at position C0 is unavailable, intra-coded, or outside the current row of CTUs, position C1 is used. Otherwise, position C0 is used in the derivation of the temporal merge candidate.

[0178] In addition to the merge mode, where implicitly derived motion information is directly used for prediction sample generation of the current CU, the merge mode with motion vector differences (MMVD) is introduced in VVC. Because similar motion information derivation methods are used for the skip mode and the merge mode, MMVD may be applied to the skip mode. An MMVD flag (e.g., mmvd_flag) may be signaled right after sending a skip flag and a merge flag to specify whether the MMVD mode is applied to a CU.

[0179] In MMVD, after a merge candidate is selected, it is further refined by the signaled MVD information. When 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.

[0180] The additional information includes a merge candidate list (e.g., mmvd_merge_flag) indicating whether the first (0) or second (1) candidate in the merging candidate list is used with the motion vector difference, an index to specify the motion magnitude (e.g., mmvd_distance_idx), and an index for indication of the 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 basis for MV. The merge candidate flag is signaled to specify which one is used.

[0181] The distance index specifies motion magnitude information and indicates the pre-defined offset from the starting point.

[0182] An offset is added to either the horizontal or vertical component of the starting motion vector. The relationship between the distance index and the pre-defined offset is specified in Table 3 below.

[0183] [Table 3]

[0184] 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. When slice_fpel_mmvd_enabled_flag is 0, it 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 (may be comprised in) a slice header.

[0185] The direction index indicates the direction of the MVD relative to the starting point. The direction index can indicate four directions as shown in Table 4. The meaning of the MVD sign can be varied depending on the starting MVs. When the starting MV is a non-prediction MV or a bi-prediction MV with two lists point to the same side of the current picture (for example, when the POCs of the two references are both larger than the POC of the current picture, or 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 MV is a bi-prediction MV with two MVs pointing to other 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 POC of the current picture), the sign in Table 4 specifies 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.

[0186] [Table 4]

[0187] Both components of the merge plus MVD offset MmvdOffset[x0][y0] are derived as follows.

[0188]

number

[0189] The subblock-based temporal motion vector prediction (SbTMVP) method can be used for inter prediction. Similar to MVP (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:

[0190] 1. TMVP predicts motion at the CU level, but SbTMVP predicts motion at the sub-CU level.

[0191] 2. Whereas 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 spatial neighboring blocks of the current CU.

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

[0193] In the second step, the motion shift identified in Step 1 is applied (i.e., added as a candidate for the current block) to obtain sub-CU-level motion information (motion vectors and reference indices) from the collocated picture. 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 a below-right sample among four central samples in the sub-CU when the sub-block has even length, width, and height.

[0194] 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 similar way as the TMVP process, where temporal motion scaling may be applied to align the reference pictures of the temporal motion vectors to those of the current CU.

[0195] A combined sub-block based merge list containing both SbTVMP candidates and affine merge candidates may 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.

[0196] The sub-CU size used in SbTMVP may be fixed to be 8x8, and as done for affine merge mode, SbTMVP mode may be only applicable to CUs with both width and height larger than or equal to 8.

[0197] The encoding logic of 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 may be performed to decide whether to use the SbTMVP candidate.

[0198] 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 can be signaled using a CU-level flag as one kind of merge mode, along with other merge modes including the regular merge mode, the MMVD mode, the CIIP mode, and the subblock merge mode.

[0199] When this mode is used, a CU may be split evenly into two triangle-shaped partitions using a diagonal or semi-diagonal split. Each triangular partition within a 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 only two motion-compensated predictions are needed for each CU, just like in conventional bi-prediction.

[0200] If triangle partition mode is used for the current CU, then a flag indicating the triangle partition direction (diagonal or semi-diagonal) and two merge indices (one for each partition) are further signaled. The number of maximum TPM (triangle partition mode) candidate sizes is signaled explicitly at the slice level and specifies syntax binarization for TPM merge indices. After predicting each triangle partition, the sample values ​​along the diagonal or semi-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 inferred to be 0 without signaling.

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

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

[0203] Meanwhile, 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 (i.e., the product of the CU width and CU height is greater than or equal to 64 luma samples) and the CU width and CU height are all less than 128 luma samples, an additional flag is signaled to indicate whether the combined inter / intra prediction (CIIP) mode is applied to the current 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:

[0204] If the top neighbor is available and intra-coded, then set isIntraTop to 1; otherwise, set isIntraTop to 0.

[0205] If the left neighbor is available and intra-coded, then set isIntraLeft to 1; otherwise, set isIntraLeft to 0.

[0206] If (isIntraLeft + isIntraLeft) is equal to 2, then wt is set to 3.

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

[0208] Otherwise, set wt to 1.

[0209] The CIIP prediction is formed as follows:

[0210]

number

[0211] Meanwhile, to generate a prediction block in a coding device, motion information can be derived based on the regular merge mode, skip mode, SbTMVP mode, MMVD mode, triangle partition mode (partitioning mode), and / or CIIP mode. Each mode is activated / disabled via an on / off flag for each mode included in a sequence parameter set (SPS). If the on / off flag for a specific mode is deactivated, the encoding device does not signal an explicit syntax for the corresponding prediction mode on a CU or PU basis.

[0212] This document discloses a method for signaling syntax that takes into account whether merge / skip mode is on / off and how it is applied, so that signaling of redundant syntax is eliminated.

[0213] For example, in the case of the regular merge flag (regular_merge_flag), in conditions where MMVD, subblock merge, CIIP merge, and triangle merge are not allowed, there is no need to signal a flag (e.g., regular merge flag) because there are no possible candidates other than regular merge mode.

[0214] Also, mmvd-related flags (eg, mmvd_merge_flag) do not need to be signaled under conditions where sub-block merging, CIIP merging, and triangle merging are not permitted.

[0215] Subblock-related flags (e.g., merge_subblock_flag) do not need to be signaled in conditions where CIIP merging and triangle merging are not allowed.

[0216] For CIIP-related flags (e.g., ciip_flag), conditions under which triangle merging is not allowed do not need to be signaled.

[0217] Therefore, according to the merge data syntax of Table 2, if a specific mode for merge / skip mode is all or partly disabled, a problem occurs in which the on / off flag is signaled redundantly. Therefore, in this document, the following method is used to prevent redundant signaling of the same information (flag) in the process of selecting the merge mode to be applied to the current block.

[0218] The following drawings are created to explain a specific example of the present document. The names of specific devices and names of specific signals / information shown in the drawings are presented for illustrative purposes only, and the technical features of the present specification are not limited to the specific names used in the following drawings.

[0219] 8 and 9 illustrate an example of a video / image encoding method and associated components including an inter-prediction method according to an embodiment of this document.

[0220] The encoding method disclosed in Fig. 8 is performed by the encoding apparatus 200 disclosed in Fig. 2. Specifically, for example, S800 and S810 in Fig. 8 are performed by the prediction unit 220 of the encoding apparatus 200, S820 is performed by the residual processing unit 230 of the encoding apparatus 200, and S830 is performed by the entropy encoding unit 240 of the encoding apparatus 200. The encoding method disclosed in Fig. 8 includes the embodiments described above in this document.

[0221] 8 and 9, a prediction unit of an encoding device determines a prediction mode of a current block (S800). For example, when inter prediction is applied to the current block, the prediction unit of the encoding device may determine one of a regular merge mode, a skip mode, an MMVD mode, a sub-block merge mode, a partitioning mode, and a CIIP mode as the prediction mode of the current block.

[0222] Here, the regular merge mode is defined as a mode in which motion information of a current block is derived using motion information of neighboring blocks. The skip mode is defined as a mode in which a predicted block is used as a reconstruction block. The MMVD mode is applied to the merge mode or the skip mode and is defined as a merge (or skip) mode that uses a motion vector difference. The sub-block merge mode is defined as a merge mode based on a sub-block. The partitioning mode is defined as a mode in which prediction is performed by dividing the current block into two partitions (diagonal or semi-diagonal). The CIIP mode is defined as a mode in which inter-picture merge and intra-picture prediction are combined.

[0223] A prediction unit of the encoding apparatus derives a prediction sample of a current block based on a prediction mode of the current block (S810). For example, if the prediction mode for the current block is determined to be a (regular) merge mode, the prediction unit of the encoding apparatus may construct a merge candidate list (or a motion information candidate list) based on spatial and temporal neighboring blocks of the current block and generate motion information based on the merge candidate list. The motion information includes a motion vector and a reference picture index. The prediction unit of the encoding apparatus may search for blocks similar to the current block within a certain region (search region) of a reference picture through motion estimation to derive a reference block whose difference from the current block is minimum or equal to or less than a certain criterion, and based on the reference block, derive a reference picture index indicating a reference picture in which the reference block is located. The prediction unit may also derive a motion vector based on the position difference between the reference block and the current block.

[0224] For example, when the prediction mode for a current block is determined to be a (regular) merge mode, a prediction unit of the encoding apparatus may construct a merge candidate list (or a motion information candidate list) based on spatial and temporal neighboring blocks of the current block and generate motion information based on the merge candidate list. The prediction unit of the encoding apparatus may derive a predicted sample (prediction block) of the current block based on the prediction mode of the current block and the motion information of the current block. Furthermore, the prediction mode information may be generated based on the prediction mode. Here, the prediction mode information includes inter / intra prediction classification information, inter prediction mode information, etc., and includes various syntax elements related thereto.

[0225] The residual processing unit of the encoding apparatus generates residual samples based on original samples (original block) for the current block and predicted samples (predicted block) for the current block (S820), and can derive information about the residual samples based on the residual samples.

[0226] An encoding unit of the encoding device encodes video information including information on the residual samples and information on the prediction mode (S830). The video information includes partitioning-related information, prediction mode-related information, 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 the form of a bitstream. The bitstream can be transmitted to a decoding device via a network or a storage medium.

[0227] For example, the video information includes information on various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video information also includes information on a prediction mode of a current block such as a coding unit syntax and a merge data syntax. Here, the sequence parameter set includes a combined inter-picture merge and intra-picture prediction (CIIP) enabled flag, an enabled flag for a partitioning mode, etc. The coding unit syntax includes a CU skip flag indicating whether a skip mode is applied to the current block.

[0228] According to one embodiment, for example, the encoding device may apply some or all of the signaling conditions and associated semantics of the regular merge flag (regular_merge_flag), the signaling conditions and associated semantics of the MMVD merge flag (MMVD_merge_flag), the signaling conditions and associated semantics of the merge subblock flag (merge_subblock_flag), and / or the signaling conditions and associated semantics of the CIIP flag based on the conditions for allowing MMVD (MMVD mode) (MMVDAllowed), the conditions for allowing merge subblock (subblock merge mode) (MergeSubBlockAllowed), the conditions for allowing merge CIIP (CIIP mode) (MergeCIIPAllowed), and / or the conditions for allowing merge triangle (partitioning mode) (MergeTriangleAllowed) so that the same syntax is not transmitted repeatedly.

[0229] For this purpose, the merge data syntax is configured as shown in Table 5 below, as an example.

[0230] [Table 5-1] [Table 5-2]

[0231] In Table 5, general_merge_flag[x0][y0] indicates whether the inter prediction parameters for the current coding unit are inferred from a neighboring inter-predicted partition. 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.

[0232] When general_merge_flag[x0][y0] is not present, it is inferred as follows:

[0233] -If the value of cu_skip_flag[x0][y0] is 1, general_merge_flag[x0][y0] is inferred to be equal to 1.

[0234] - Otherwise, the value of general_merge_flag[x0][y0] is inferred to be equal to 0.

[0235] In Table 5, the conditions under which MMVD (MMVD mode) is allowed (MMVDAllowed), the conditions under which merge subblocks (subblock merge mode) are allowed (MergeSubBlockAllowed), the conditions under which merge CIIP (CIIP mode) is allowed (MergeCIIPAllowed), and the conditions under which merge triangles (partitioning mode) are allowed (MergeTriangleAllowed) are derived according to the following conditions, respectively.

[0236] If all of the following conditions are true, the variable MMVDAllowed is set equal to true.

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

[0238] -sps_mmvd_enabled_flag is equal to 1

[0239] - The product of the current block height and the current block width is greater than 32 (cbWidth * cbHeight is greater than 32)

[0240] If all of the following conditions are true, the variable MMVDSubblockAllowed is set equal to true:

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

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

[0243] -Block width is greater than or equal to 8 and block height is greater than or equal to 8 (cbWidth is greater than or equal to 8 and cbHeight is greater than or equal to 8)

[0244] If all of the following conditions are true, the variable MergeCIIPAllowed is set equal to true.

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

[0246] -sps_ciip_enabled_Flag value is 1 (sps_ciip_enabled_Flag is equal to 1)

[0247] -cu_skip_flag[x0][y0] is equal to 0

[0248] - The product of the width and height of the current block is greater than or equal to 64 (cbWidth * cbHeight is greater than or equal to 64)

[0249] -The current block width is smaller than 128 and the current block height is smaller than 128 (cbWidth is smaller than 128 and cbHeight is smaller than 128)

[0250] If all of the following conditions are true, the variable MergeTriangleAllowed is set equal to true.

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

[0252] -sps_triangle_enalbed_Flag is equal to 1 and slice_type is equal to B

[0253] - The maximum number of triangle merge candidates is 2 or more (NaxNumTriangleMergeCand is greater than or equal to 2).

[0254] - The product of the width and height of the current block is greater than or equal to 64 (cbWidth * cbHeight is greater than or equal to 64)

[0255] Among the above conditions, MMVDAllowed means a condition under which MMVD is allowed, and in this case, the condition based on block size is possible when the current block is not 4x8 or 8x4. However, if uni-prediction MMVD is allowed in 4x8 and / or 8x4 blocks, compression efficiency can be improved, so the MMVDAllowed condition can be changed as follows:

[0256] If all of the following conditions are true, the variable MMVDAllowed is set equal to true.

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

[0258] -sps_mmvd_enabled_flag value is 1 (sps_mmvd_enabled_flag is equal to 1)

[0259] On the other hand, a value of 1 in the regular_merge_flag indicates that regular merge mode is used to generate the inter prediction parameters of the current coding unit (current block). 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.

[0260] Referring to Table 5, if at least one of the conditions based on the MMVD mode (MMVDAllowed), the condition based on the sub-block merge mode (MergeSubBlockAllowed), the condition based on the CIIP mode (MergeCIIPAllowed), and the condition based on the partitioning mode (MergeTriangleAllowed) is 1, the regular media plug is included in the video information and signaled in the form of a bitstream.

[0261] For example, the regular merge flag may be included in the bitstream if CIIP is available. Whether CIIP is available may be determined based on at least one of a general merge flag, a CIIP available flag, the size of the current block, and a CU skip flag. For example, the regular merge flag may be included in the bitstream if the general merge flag is 1, or if the CIIP available flag is 1, or if the product of the height and width of the current block is 64 or greater, or if the height and width of the current block are each less than 128, or if the skip flag is 0. Alternatively, the regular merge flag may be included in the bitstream if all of the conditions based on the general merge flag, the CIIP available flag, the size of the current block, and the CU skip flag are satisfied.

[0262] As another example, the regular merge flag may be included in the bitstream if a partitioning mode is available. Whether a partitioning mode is available is determined based on at least one of a general merge flag, a partitioning mode available flag indicating whether a partitioning mode is available, and information about the current block. For example, the regular merge flag is included in the bitstream if the value of the general merge flag is 1, or if the value of the partitioning mode available flag is 1, or if the product of the height and width of the current block is 64 or greater, or if the slice type of the current block is a B slice, or if the maximum number of partitioning mode candidates is 2 or greater. Alternatively, the regular merge flag is included in the bitstream if all of the above conditions are met.

[0263] When regular_merge_flag[x0][y0] is not present in the merge data syntax, it is inferred as follows.

[0264] If all of the following conditions are true, the value of the regular merge flag is inferred to be equal to 1.

[0265] -MMVDAllowed is equal to 0

[0266] -MergeSubBlockAllowed is equal to 0

[0267] -MergeCIIPAllowed is equal to 0

[0268] -MergeTriangleAllowed is equal to 0

[0269] -Otherwise, the value of regular_merge_flag[x0][y0] is inferred to be equal to 0.

[0270] On the other hand, a value of 1 in the MMVD merge flag indicates that 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, 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.

[0271] Referring to Table 5, the MMVD merge flag is included in the video information and signaled in the form of a bitstream if at least one of the conditions based on the MMVD mode (MMVDAllowed), the condition based on the sub-block merge mode (MergeSubBlockAllowed), the condition based on the CIIP mode (MergeCIIPAllowed), and the condition based on the partitioning mode (MergeTriangleAllowed) has a value of 1.

[0272] When the MMVD merge flag is not present in the merge data syntax, it is derived as follows:

[0273] If all of the following conditions are true, the value of the MMVD merge flag is inferred to be equal to 1.

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

[0275] -MMVDAllowed has a value of 1 (MMVDAllowed is equal to 0)

[0276] -MergeSubBlockAllowed is equal to 0

[0277] -MergeCIIPAllowed is equal to 0

[0278] -MergeTriangleAllowed is equal to 0

[0279] Otherwise, the value of the MMVD merge flag is inferred to be equal to 0.

[0280] mmvd_cand_flag[x0][y0] specifies 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]. 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. When mmvd_cand_flag[x0][y0] is not present, it is inferred to be equal to 0.

[0281] mmvd_distance_idx[x0][y0] specifies the index used to derive MMVDDistance[x0][y0] as specified in Table 3. 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.

[0282] mmvd_direction_idx[x0][y0] specifies index used to derive MMVDSign[x0][y0] as specified in Table 4. 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.

[0283] Both components of the merge plus MVD offset MMVDOffset[x0][y0] are derived as Equation 1.

[0284] Meanwhile, the merge_subblock_flag[x0][y0] specifies 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.

[0285] Referring to Table 5, if at least one of the conditions based on the sub-block merge mode (MergeSubBlockAllowed), the condition based on the CIIP mode (MergeCIIPAllowed), and the condition based on the partitioning mode (MergeTriangleAllowed) has a value of 1, the merge sub-block flag is included in the video information and signaled in bitstream form.

[0286] When merge_subblock_flag[x0][y0] is not present in the merge data syntax, it is inferred as follow.

[0287] If all of the following conditions are true, the value of the merge subblock flag is inferred as 1.

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

[0289] -MMVD merge flag value is 0 (mmvd_merge_flag[x0][y0] is equal to 0)

[0290] -MergeSubBlockAllowed is equal to 0

[0291] -MergeCIIPAllowed is equal to 0

[0292] -MergeTriangleAllowed is equal to 0

[0293] Otherwise, the value of the merge subblock flag is inferred to be equal to 0.

[0294] merge_subblock_idx[x0][y0] specifies the merging candidate index of the subblock-based merging candidate list where 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.

[0295] When merge_subblock_idx[x0][y0] is not present, it is inferred to bequal to 0.

[0296] Meanwhile, ciip_flag[x0][y0] specifies whether the combined inter-picture merge and intra-picture prediction is applied to the current coding unit. 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.

[0297] Referring to Table 5, if at least one of the CIIP mode-based condition (MergeCIIPAllowed) and the partitioning mode-based condition (MergeTriangleAllowed) has a value of 1, the CIIP flag is included in the video information and signaled in the form of a bitstream.

[0298] For example, the CIIP flag may be included in the bitstream if a partitioning mode is available. Whether a partitioning mode is available may be determined based on at least one of a general merge flag, a partitioning mode available flag indicating whether a partitioning mode is available, and information about the current block. For example, the CIIP flag may be included in the bitstream if the value of the general merge flag is 1, or if the value of the partitioning mode available flag is 1, or if the product of the height and width of the current block is 64 or greater, or if the slice type of the current block is a B slice, or if the maximum number of partitioning mode candidates is 2 or greater. Alternatively, the CIIP flag may be included in the bitstream if all of the above conditions are met.

[0299] When ciip_flag[x0][y0] is not present in the merge data syntax, it is derived as follows:

[0300] If all the following conditions are true, the value of the CIIP flag is derived as 1. (If all the following conditions are true, ciip_flag[x0][y0] is set equal to 1.)

[0301] -MergeCIIPAllowed is equal to 0

[0302] -MergeTriangleAllowed is equal to 0

[0303] Otherwise, the value of the CIIP flag is set to 0.

[0304] When the value of ciip_flag[x0][y0] is equal to 1, the variable IntraPredModeY[x][y] with x = xCb..xCb + cbWidth - 1 and y = yCb..yCb + cbHeight - 1 is set to be equal to INTRA_PLANAR.

[0305] The variable MergeTriangleFlag[x0][y0] indicates whether triangular shape based motion compensation is used to generate the prediction samples of the current coding unit when decoding a B slice, and is derived as follows:

[0306] If all the following conditions are true, the value of MergeTriangleFlag[x0][y0] is set equal to 1.

[0307] -MergeTriangleAllowed has a value of 1 (MergeTriangleAllowed is equal to 1)

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

[0309] - The value of mmvd_merge_flag[x0][y0] is equal to 0.

[0310] -merge_subblock_flag[x0][y0] is equal to 0

[0311] -ciip_flag[x0][y0] is equal to 0

[0312] In all other cases, the value of MergeTriangleFlag[x0][y0] is set to 0.

[0313] 10 and 11 illustrate an example of a video / picture decoding method including an inter-prediction method and related components according to an embodiment of this document.

[0314] The decoding method disclosed in Figure 10 is performed by the decoding device 300 disclosed in Figures 3 and 11. Specifically, for example, S1000 in Figure 10 is performed by the entropy decoding unit 310 of the decoding device, and S1010 to S1020 are performed by the prediction unit 330 of the decoding device 300. The decoding method disclosed in Figure 10 includes the embodiments described above in this document.

[0315] The decoding device obtains at least one of a CIIP available flag, a CU skip flag, and a partitioning mode available flag from a bitstream (S1000). The decoding device also determines a prediction mode for a current block based on the CIIP available flag, the CU skip flag, the partitioning mode available flag, etc. (S1010). Specifically, the entropy decoding unit 310 of the decoding device may derive residual information and information about a prediction mode from a signal received in the form of a bitstream from the encoding device of FIG. 2. Here, the information about the prediction mode may be referred to as prediction-related information. The information about the prediction mode includes inter / intra prediction classification information, inter prediction mode information, etc., and various syntax elements related thereto.

[0316] The bitstream includes video information including information on various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video information may further include information on a prediction mode of a current block such as a coding unit syntax and a merge data syntax. The sequence parameter set includes a CIIP available flag, an available flag for a partitioning mode, etc. The coding unit syntax includes a CU skip flag indicating whether a skip mode is applied to the current block.

[0317] The prediction unit 320 of the decoding device derives motion information of the current block based on a prediction mode of the current block. For example, the prediction unit 320 of the decoding device may construct a motion information candidate list (or a merge candidate list) for the current block based on information about the prediction mode acquired from the bitstream. Furthermore, the prediction unit 320 may select a merge candidate from the motion information candidate list based on candidate selection information (merge index) acquired from the bitstream, and derive motion information of the current block using motion information of the selected merge candidate.

[0318] When the motion information of the current block is derived, a prediction unit of the decoding apparatus generates a prediction sample of the current block based on the prediction mode of the current block, the motion information of the current block, etc. (S1020).

[0319] Meanwhile, the residual processor 320 of the decoding device can generate residual samples based on residual information obtained from the bitstream.

[0320] The adder 340 of the decoding device may generate reconstructed samples based on the predicted samples generated by the predictor 330 and the residual samples generated by the residual processor 320. A reconstructed picture is generated based on the reconstructed samples. Thereafter, in-loop filtering procedures such as deblocking filtering, SAO, and / or ALF procedures may be applied to the reconstructed picture to improve subjective / objective image quality, as needed.

[0321] In one embodiment, when determining the prediction mode of the current block, the prediction unit of the decoding device can obtain or parse a regular merge flag from the bitstream if at least one of the above-mentioned MMVD mode-based condition (MMVDAllowed), sub-block merge mode-based condition (MergeSubBlockAllowed), CIIP mode-based condition (MergeCIIPAllowed), and partitioning mode-based condition (MergeTrrangleAllowed) has a value of 1.

[0322] For example, if a CIIP is available, the decoding device may parse a regular merge flag from the bitstream. The availability of a CIIP may be determined based on at least one of a general merge flag, a CIIP availability flag, the size of the current block, and a CU skip flag. For example, the decoding device may determine that a CIIP is available if the general merge flag is 1, or if the CIIP availability flag is 1, or if the product of the height and width of the current block is 64 or greater, or if the height and width of the current block are each less than 128, or if the skip flag is 0. Alternatively, the decoding device may determine that a CIIP is available if all of the conditions based on the general merge flag, the CIIP availability flag, the size of the current block, and the CU skip flag are satisfied.

[0323] As another example, if a partitioning mode is available, the decoding device may parse a regular merge flag from the bitstream. Whether a partitioning mode is available is determined based on at least one of a general merge flag, a partitioning mode available flag indicating whether a partitioning mode is available, and information about the current block. For example, the decoding device determines that a partitioning mode is available if the general merge flag has a value of 1, or if the partitioning mode available flag has a value of 1, or if the product of the height and width of the current block is 64 or greater, or if the slice type of the current block is a B slice, or if the maximum number of partitioning mode candidates is 2 or greater. Alternatively, the decoding device may determine that a partitioning mode is available if all of the above conditions are met.

[0324] On the other hand, when determining the prediction mode of the current block, the prediction unit of the decoding device can also obtain or parse the MMVD merge flag from the bitstream if at least one of the above-mentioned MMVD mode-based condition (MMVDAllowed), sub-block merge mode-based condition (MergeSubBlockAllowed), CIIP mode-based condition (MergeCIIPAllowed), and partitioning mode-based condition (MergeTriangleAllowed) has a value of 1.

[0325] In addition, when determining the prediction mode of the current block, the prediction unit of the decoding device can obtain or parse a merge sub-block flag from the bitstream if at least one of the above-mentioned conditions based on the sub-block merge mode (MergeSubBlockAllowed), the condition based on the CIIP mode (MergeCIIPAllowed), and the condition based on the partitioning mode (MergeTriangleAllowed) has a value of 1.

[0326] In determining the prediction mode of the current block, the prediction unit of the decoding device may acquire or parse a CIIP flag from the bitstream if at least one of the CIIP mode-based condition (MergeCIIPAllowed) and the partitioning mode-based condition (MergeTriangleAllowed) has a value of 1. As an example, if the partitioning mode is available, the decoding device may parse the CIIP flag from the bitstream. Whether the partitioning mode is available is determined based on at least one of a general merge flag, a partitioning mode available flag indicating whether the partitioning mode is available, and information about the current block. For example, the decoding device may determine that the partitioning mode is available if the general merge flag has a value of 1, or if the partitioning mode available flag has a value of 1, or if the product of the height and width of the current block is 64 or more, or if the slice type of the current block is a B slice, or if the maximum number of partitioning mode candidates is 2 or more. Alternatively, the decoding device determines that the partitioning mode is available if all of the above conditions are met.

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

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

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

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

[0331] In addition, a processing method to which the embodiment(s) of this document is applied may be produced in the form of a computer-executable program and stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiments of this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium may also include media embodied in the form of a carrier wave (e.g., transmission via the Internet). The bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0332] Furthermore, the embodiments of the present document may be embodied in a computer program product having program code, which may be executed by a computer in accordance with the embodiments of the present document. The program code may be stored on a computer-readable carrier.

[0333] FIG. 12 illustrates an example of a content streaming system to which the embodiments disclosed herein can be applied.

[0334] As shown in FIG. 12, the content streaming system to which the embodiments of this document are applied mainly includes an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.

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

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

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

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

[0339] Examples of the user device include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a PDA (personal digital assistant), a PMP (portable multimedia player), a navigation system, a slate PC, a tablet PC, an ultrabook, a wearable device (e.g., a smartwatch, a smart glass, a head mounted display (HMD)), a digital TV, a desktop computer, a digital signage, etc.

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

Claims

1. A decoding method performed by a decoding device, From the bitstream, a CIIP available flag indicating whether CIIP (combined inter-picture merge and intra-picture prediction) is available; a general merge flag indicating whether the inter prediction parameters for the current block are inferred from neighboring inter predicted partitions; and obtaining a skip flag indicating whether a skip mode is applied to the current block; determining whether a regular merge mode applies to the current block; generating a predicted sample for the current block based on the regular merge mode; The determining step includes: obtaining a regular merge flag from the bitstream if certain conditions are met; determining, based on the value of the regular merge flag being equal to 1, that the regular merge mode is applied to the current block; The following conditions: (i) the value of the CIIP available flag is equal to 1; (ii) the value of the general merge flag is equal to 1; (iii) the value of the skip flag is equal to 0; (iv) the product of the height of the current block and the width of the current block is 64 or greater; (v) the height of the current block is less than 128; (vi) the width of the current block is less than 128, the particular condition is met when all of the following are true:

2. In an encoding method performed by an encoding device, determining whether regular merge mode applies to the current block; deriving a predicted sample of the current block based on the regular merge mode; deriving a residual sample based on the predicted sample; encoding video information including a combined inter-picture merge and intra-picture prediction (CIIP) available flag indicating whether CIIP is available, a general merge flag indicating whether inter-prediction parameters for a current block are inferred from neighboring inter-predicted partitions, and a skip flag indicating whether a skip mode is applied to the current block; If a certain condition is met, the video information includes a regular merge flag; The value of the regular merge flag is equal to 1, which indicates that the regular merge mode is applied to the current block; The following conditions: (i) the value of the CIIP available flag is equal to 1; (ii) the value of the general merge flag is equal to 1; (iii) the value of the skip flag is equal to 0; (iv) the product of the height of the current block and the width of the current block is 64 or greater; (v) the height of the current block is less than 128; (vi) the width of the current block is less than 128, the particular condition being met when all of the following are true:

3. In a method for transmitting video data, generating a bitstream, said bitstream comprising: determining whether regular merge mode applies to the current block; deriving a predicted sample of the current block based on the regular merge mode; deriving a residual sample based on the predicted sample; encoding video information including a combined inter-picture merge and intra-picture prediction (CIIP) available flag indicating whether CIIP is available, a general merge flag indicating whether inter-prediction parameters for the current block are inferred from neighboring inter-predicted partitions, and a skip flag indicating whether a skip mode is applied to the current block; transmitting the data including the bitstream; If a certain condition is met, the video information includes a regular merge flag; The value of the regular merge flag is equal to 1, which indicates that the regular merge mode is applied to the current block; The following conditions: (i) the value of the CIIP available flag is equal to 1; (ii) the value of the general merge flag is equal to 1; (iii) the value of the skip flag is equal to 0; (iv) the product of the height of the current block and the width of the current block is 64 or greater; (v) the height of the current block is less than 128; (vi) the width of the current block is less than 128, the specific condition being met when all of the following are true: