Image encoding / decoding method using template matching, method for transmitting bitstream, and recording medium having bitstream stored therein

The video encoding/decoding method employing template matching for inter prediction constructs a generalized merge candidate list to efficiently compress high-resolution video data, addressing the cost and efficiency challenges of high-definition and ultra-high-definition video by reducing the required bits for transmission.

WO2024225782A1PCT designated stage expired Publication Date: 2024-10-31LG ELECTRONICS INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/005621
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-30
Filing Date
2024-04-25
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality video data leads to a significant increase in the amount of information to be transmitted and stored, resulting in higher transmission and storage costs, necessitating highly efficient video compression technologies.

Method used

A video encoding/decoding method utilizing template matching for inter prediction, which constructs a generalized merge candidate list to derive motion information and generate prediction blocks, reducing the amount of bits required by using a single composite merge candidate list.

Benefits of technology

This method improves encoding/decoding efficiency, reduces the amount of bits needed for transmission, and enhances the compression of high-resolution video data, addressing the cost and efficiency challenges associated with high-definition and ultra-high-definition video.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024005621_31102024_PF_FP_ABST
    Figure KR2024005621_31102024_PF_FP_ABST
Patent Text Reader

Abstract

An image encoding / decoding method, a method for transmitting a bitstream, and a computer-readable recording medium for storing a bitstream are provided. An image decoding method according to the present disclosure, as an image decoding method performed by an image decoding device, may comprise the steps of: determining a prediction mode of a current block; generating an inter prediction block of the current block on the basis that the prediction mode of the current block is an inter prediction mode; and restoring the current block on the basis of the inter prediction block, wherein the inter prediction block is generated on the basis of prediction candidates of a prediction candidate list, and the prediction candidate list includes two or more prediction candidates among a merge prediction candidate, a merge with motion vector difference (MMVD) prediction candidate, a combined inter-intra prediction (CIIP), a multi-hypothesis prediction, an affine merge, a subblock-based temporal motion vector prediction (SbTMVP), and a geometric partitioning mode (GPM) merge prediction candidate.
Need to check novelty before this filing date? Find Prior Art

Description

A video encoding / decoding method using template matching, a method for transmitting a bitstream, and a recording medium storing a bitstream

[0001] The present disclosure relates to a video encoding / decoding method utilizing template matching (TM), a method for transmitting a bitstream, and a recording medium storing the bitstream. More specifically, the present disclosure relates to a method for performing inter prediction utilizing template matching.

[0002] Recently, demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, has been increasing across various fields. As image data becomes higher resolution and higher quality, the amount of information transmitted, or bits, increases relative to conventional image data. This increase in information or bits transmitted leads to increased transmission and storage costs.

[0003] Accordingly, a highly efficient image compression technology is required to effectively transmit, store, and play high-resolution, high-quality image information.

[0004] The present disclosure aims to provide a video encoding / decoding method and device with improved encoding / decoding efficiency.

[0005] In addition, the present disclosure aims to provide a method for performing inter prediction using template matching.

[0006] In addition, the present disclosure aims to provide a method for constructing a generalized, i.e., composite merge candidate list based on template matching in the process of constructing a prediction candidate list during inter prediction.

[0007] Additionally, the present disclosure aims to provide a single merge candidate list that includes merge candidates derived in various ways.

[0008] In addition, the present disclosure aims to provide a method for deriving motion information and generating a prediction block by referring to candidates of a generalized merge candidate list.

[0009] In addition, the present disclosure aims to provide a non-transitory computer-readable recording medium for storing a bitstream generated by an image encoding method according to the present disclosure.

[0010] In addition, the present disclosure aims to provide a non-transitory computer-readable recording medium that stores a bitstream received and decoded by an image decoding device according to the present disclosure and used for restoring an image.

[0011] In addition, the present disclosure aims to provide a method for transmitting a bitstream generated by an image encoding method according to the present disclosure.

[0012] The technical problems to be achieved in the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by a person having ordinary skill in the technical field to which the present disclosure belongs from the description below.

[0013] An image decoding method performed by an image decoding device according to one aspect of the present disclosure includes the steps of determining a prediction mode of a current block, generating an inter prediction block of the current block based on the prediction mode of the current block being an inter prediction mode, and reconstructing the current block based on the inter prediction block, wherein the inter prediction block is generated based on a prediction candidate of a prediction candidate list, and the prediction candidate list may include at least two prediction candidates from among a merge prediction candidate, a MMVD (Merge with Motion Vector Difference) prediction candidate, a CIIP (Combined inter-intra prediction), a multi-hypothesis prediction, an affine merge, a SbTMVP (subblock-based temporal motion vector prediction), or a GPM (geometric partitioning mode) merge prediction candidate.

[0014] Meanwhile, according to one embodiment of the present disclosure, the prediction candidate list can be derived based on a prediction candidate list usage flag.

[0015] Meanwhile, according to one embodiment of the present disclosure, the prediction candidate list usage flag can be obtained from a bitstream.

[0016] Meanwhile, according to one embodiment of the present disclosure, the prediction candidate may be selected based on a prediction candidate index.

[0017] Meanwhile, according to one embodiment of the present disclosure, the prediction candidate index can be signaled from the bitstream.

[0018] Meanwhile, according to one embodiment of the present disclosure, the prediction candidates of the prediction candidate list can be sorted according to an error value derived based on a difference value between a pixel value of a template area of ​​a reference picture and a surrounding pixel of the current block.

[0019] Meanwhile, according to one embodiment of the present disclosure, the error value can be derived based on at least one of SAD (sum of absolute difference) or MR-SAD (Mean-Reduced SAD).

[0020] Meanwhile, according to one embodiment of the present disclosure, based on the CIIP prediction candidate being included in the prediction candidate list, an error value for the CIIP prediction candidate can be derived based on a weighted average of pixel values ​​of an intra prediction block and a template area of ​​a reference picture.

[0021] Meanwhile, according to one embodiment of the present disclosure, based on the GPM prediction candidate being included in the prediction candidate list, an error value for the GPM prediction candidate can be derived based on a weighted average of pixel values ​​of template areas of a plurality of inter prediction blocks.

[0022] An image encoding method performed by an image encoding device according to one aspect of the present disclosure includes the steps of determining a prediction mode of a current block as an inter prediction mode, generating a prediction block of the current block based on the inter prediction mode, and encoding the current block based on the prediction block, wherein the prediction block is generated based on a prediction candidate of a prediction candidate list, and the prediction candidate list may include at least two prediction candidates from among a merge prediction candidate, a MMVD (Merge with Motion Vector Difference) prediction candidate, a CIIP (Combined inter-intra prediction), a multi-hypothesis prediction, an affine merge, a SbTMVP (subblock-based temporal motion vector prediction), or a GPM (geometric partitioning mode) merge prediction candidate.

[0023] Meanwhile, according to one embodiment of the present disclosure, information about the prediction candidate list can be encoded into a bitstream.

[0024] Meanwhile, according to one embodiment of the present disclosure, information about the prediction candidate list may include a prediction candidate list usage flag and a prediction candidate index.

[0025] A computer-readable recording medium according to another aspect of the present disclosure can store a bitstream generated by an image encoding method or device of the present disclosure.

[0026] A transmission method according to another aspect of the present disclosure can transmit a bitstream generated by an image encoding method or device of the present disclosure.

[0027] The features briefly summarized above regarding the present disclosure are merely exemplary aspects of the detailed description of the present disclosure that follows and do not limit the scope of the present disclosure.

[0028] According to the present disclosure, a video encoding / decoding method and device with improved encoding / decoding efficiency can be provided.

[0029] Additionally, according to the present disclosure, a method for performing inter prediction using template matching can be provided.

[0030] Additionally, according to the present disclosure, coding efficiency can be improved through a single merge candidate list including merge candidates derived in various ways.

[0031] Additionally, according to the present disclosure, the amount of bits required can be reduced by using a single composite merge candidate list.

[0032] In addition, according to the present disclosure, a non-transitory computer-readable recording medium for storing a bitstream generated by an image encoding method according to the present disclosure can be provided.

[0033] In addition, according to the present disclosure, a non-transitory computer-readable recording medium can be provided that stores a bitstream received and decoded by an image decoding device according to the present disclosure and used for restoring an image.

[0034] Additionally, according to the present disclosure, a method for transmitting a bitstream generated by an image encoding method can be provided.

[0035] The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects that are not mentioned will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the description below.

[0036] FIG. 1 is a diagram schematically illustrating a video coding system to which an embodiment according to the present disclosure can be applied.

[0037] FIG. 2 is a schematic diagram of an image encoding device to which an embodiment according to the present disclosure can be applied.

[0038] FIG. 3 is a schematic diagram illustrating an image decoding device to which an embodiment according to the present disclosure can be applied.

[0039] Fig. 4 is a schematic diagram showing an inter prediction unit of a video encoding device.

[0040] Figure 5 is a flowchart illustrating a method for encoding an image based on inter prediction.

[0041] Figure 6 is a schematic diagram showing an inter prediction unit of an image decoding device.

[0042] Figure 7 is a flowchart illustrating a method for decoding an image based on inter prediction.

[0043] Figure 8 is a flowchart showing an inter prediction method.

[0044] FIG. 9 is a diagram for explaining a template matching-based encoding / decoding method according to the present disclosure.

[0045] Figure 10 is a diagram illustrating an example of a template of a current block and reference samples of the template within reference pictures.

[0046] Figure 11 is a drawing for explaining a method of specifying a template using motion information of a sub-block.

[0047] FIG. 12 is a diagram illustrating an example of a method for calculating a template matching error according to one embodiment of the present disclosure.

[0048] FIG. 13 is a diagram illustrating an example of a method for calculating a template matching error according to one embodiment of the present disclosure.

[0049] FIG. 14 is a diagram illustrating an example of a method for calculating a template matching error according to one embodiment of the present disclosure.

[0050] FIG. 15 is a diagram illustrating an example of a method for calculating a template matching error according to one embodiment of the present disclosure.

[0051] FIG. 16 is a diagram illustrating an example of a method for calculating a template matching error according to one embodiment of the present disclosure.

[0052] FIG. 17 is a diagram illustrating an example of a method for calculating a template matching error according to one embodiment of the present disclosure.

[0053] FIG. 18 is a diagram illustrating an example of a method for calculating a template matching error according to one embodiment of the present disclosure.

[0054] FIGS. 19 to 22 are diagrams for explaining a process of constructing a generalized merge prediction candidate list according to one embodiment of the present disclosure.

[0055] FIG. 23 is a diagram for explaining an image decoding method according to one embodiment of the present disclosure.

[0056] FIG. 24 is a drawing for explaining an image encoding method according to one embodiment of the present disclosure.

[0057] FIG. 25 is a diagram exemplifying a content streaming system to which an embodiment according to the present disclosure can be applied.

[0058] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the attached drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be implemented in various different forms and is not limited to the embodiments described herein.

[0059] In describing embodiments of the present disclosure, detailed descriptions of known configurations or functions will be omitted if they are deemed to obscure the gist of the present disclosure. Furthermore, portions unrelated to the description of the present disclosure in the drawings have been omitted, and similar portions have been designated with similar reference numerals.

[0060] In the present disclosure, when a component is said to be "connected," "coupled," or "connected" to another component, this may include not only a direct connection, but also an indirect connection in which another component exists in between. Furthermore, when a component is said to "include" or "have" another component, unless otherwise specifically stated, this does not exclude the other component, but rather implies that the other component may be included.

[0061] In this disclosure, terms such as first, second, etc. are used solely to distinguish one component from another, and do not limit the order or importance of components unless specifically stated otherwise. Accordingly, within the scope of this disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.

[0062] In this disclosure, distinct components are used to clearly illustrate their respective characteristics, and do not necessarily imply that the components are separated. That is, multiple components may be integrated into a single hardware or software unit, or a single component may be distributed into multiple hardware or software units. Therefore, even if not specifically mentioned, such integrated or distributed embodiments are also included within the scope of this disclosure.

[0063] In the present disclosure, the components described in various embodiments are not necessarily essential components, and some may be optional components. Therefore, embodiments comprising a subset of the components described in one embodiment are also within the scope of the present disclosure. Furthermore, embodiments including other components in addition to the components described in various embodiments are also within the scope of the present disclosure.

[0064] The present disclosure relates to encoding and decoding of images, and terms used in the present disclosure may have their usual meanings commonly used in the technical field to which the present disclosure belongs, unless newly defined in the present disclosure.

[0065] In the present disclosure, a "picture" generally refers to a unit representing one image of a specific time period, and a slice / tile is a coding unit that constitutes a part of a picture, and a single picture may be composed of one or more slices / tiles. In addition, a slice / tile may include one or more coding tree units (CTUs).

[0066] In the present disclosure, "pixel" or "pel" may refer to the smallest unit that constitutes a picture (or image). Additionally, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luma component or only a pixel / pixel value of a chroma component.

[0067] In the present disclosure, a "unit" may represent a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. In some cases, the term "unit" may be used interchangeably with terms such as "sample array," "block," or "area." In general, an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows.

[0068] In the present disclosure, the "current block" may mean one of the following: a "current coding block," a "current coding unit," a "block to be encoded," a "block to be decoded," or a "block to be processed." When prediction is performed, the "current block" may mean a "current prediction block" or a "block to be predicted." When transformation (inverse transformation) / quantization (inverse quantization) is performed, the "current block" may mean a "current transformation block" or a "block to be transformed." When filtering is performed, the "current block" may mean a "block to be filtered."

[0069] In the present disclosure, a "current block" may mean a block that includes both a luma component block and a chroma component block, or a "luma block of the current block," unless explicitly described as a chroma block. The luma component block of the current block may be explicitly expressed by including an explicit description of the luma component block, such as "luma block" or "current luma block." Additionally, the chroma component block of the current block may be explicitly expressed by including an explicit description of the chroma component block, such as "chroma block" or "current chroma block."

[0070] In this disclosure, " / " and "," can be interpreted as "and / or". For example, "A / B" and "A, B" can be interpreted as "A and / or B". Additionally, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."

[0071] In this disclosure, "or" may be interpreted as "and / or." For example, "A or B" may mean 1) "A" only, 2) "B" only, or 3) "A and B." Alternatively, "or" in this disclosure may mean "additionally or alternatively."

[0072] Video Coding System Overview

[0073] FIG. 1 is a diagram schematically illustrating a video coding system to which an embodiment according to the present disclosure can be applied.

[0074] A video coding system according to one embodiment may include an encoding device (10) and a decoding device (20). The encoding device (10) may transmit encoded video and / or image information or data to the decoding device (20) in the form of a file or streaming through a digital storage medium or a network.

[0075] An encoding device (10) according to one embodiment may include a video source generation unit (11), an encoding unit (12), and a transmission unit (13). A decoding device (20) according to one embodiment may include a reception unit (21), a decoding unit (22), and a rendering unit (23). The encoding unit (12) may be referred to as a video / image encoding unit, and the decoding unit (22) may be referred to as a video / image decoding unit. The transmission unit (13) may be included in the encoding unit (12). The reception unit (21) may be included in the decoding unit (22). The rendering unit (23) may include a display unit, and the display unit may be configured as a separate device or an external component.

[0076] The video source generation unit (11) can obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source generation unit (11) can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive including previously captured video / images, etc. The 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 through a computer, etc., in which case the video / image capture process can be replaced with a process of generating related data.

[0077] The encoding unit (12) can encode input video / images. The encoding unit (12) can perform a series of procedures, such as prediction, transformation, and quantization, to improve compression and encoding efficiency. The encoding unit (12) can output encoded data (encoded video / image information) in the form of a bitstream.

[0078] The transmission unit (13) can obtain encoded video / image information or data output in the form of a bitstream, and transmit it to the reception unit (21) of the decoding device (20) or another external object through a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit (13) may include an element for generating a media file through a predetermined file format, and may include an element for transmission through a broadcasting / communication network. The transmission unit (13) may be provided as a separate transmission device from the encoding device (12), and in this case, the transmission device may include at least one processor for obtaining encoded video / image information or data output in the form of a bitstream, and a transmission unit for transmitting it in the form of a file or streaming. The reception unit (21) can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit (22).

[0079] The decoding unit (22) can decode video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding unit (12).

[0080] The rendering unit (23) can render the decrypted video / image. The rendered video / image can be displayed through the display unit.

[0081] Overview of the video encoding device

[0082] FIG. 2 is a schematic diagram illustrating an image encoding device to which an embodiment according to the present disclosure can be applied.

[0083] As illustrated in FIG. 2, the image encoding device (100) may include an image segmentation unit (110), a subtraction unit (115), a transformation unit (120), a quantization unit (130), an inverse quantization unit (140), an inverse transformation unit (150), an addition unit (155), a filtering unit (160), a memory (170), an inter prediction unit (180), an intra prediction unit (185), and an entropy encoding unit (190). The inter prediction unit (180) and the intra prediction unit (185) may be collectively referred to as a “prediction unit.” The transformation unit (120), the quantization unit (130), the inverse quantization unit (140), and the inverse transformation unit (150) may be included in a residual processing unit. The residual processing unit may further include a subtraction unit (115).

[0084] All or at least some of the plurality of components constituting the video encoding device (100) may be implemented as a single hardware component (e.g., an encoder or a processor) according to an embodiment. In addition, the memory (170) may include a decoded picture buffer (DPB) and may be implemented by a digital storage medium.

[0085] The image segmentation unit (110) can segment an input image (or picture, frame) input to the image encoding device (100) into one or more processing units. For example, the processing units may be referred to as coding units (CUs). The coding units can be obtained by recursively segmenting a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / binary-tree / ternary-tree) structure. For example, one coding unit can be segmented into a plurality of coding units of deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. For segmenting the coding unit, the quad-tree structure may be applied first, and the binary-tree structure and / or the ternary-tree structure may be applied later. The coding procedure according to the present disclosure can be performed based on the final coding unit that is no longer segmented. The maximum coding unit can be used directly as the final coding unit, and the coding unit of the lower depth obtained by dividing the maximum coding unit can be used as the final concatenated unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration described below. As another example, the processing unit of the coding procedure may be a prediction unit (PU) or a transformation unit (TU). The prediction unit and the transformation unit may each be divided or partitioned from the final coding unit. The prediction unit may be a unit of sample prediction, and the transformation unit may be a unit that derives a transform coefficient and / or a unit that derives a residual signal from a transform coefficient.

[0086] The prediction unit (inter-prediction unit (180) or intra-prediction unit (185)) can perform prediction on a block to be processed (current block) and generate a predicted block including prediction samples for the current block. The prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block or CU unit. The prediction unit can generate various information regarding the prediction of the current block and transmit the information to the entropy encoding unit (190). The information regarding the prediction can be encoded by the entropy encoding unit (190) and output in the form of a bitstream.

[0087] The intra prediction unit (185) can predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from it, depending on the intra prediction mode and / or intra prediction technique. The intra prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes, depending on the degree of detail in the prediction direction. However, this is merely an example, and a greater or lesser number of directional prediction modes may be used depending on the settings. The intra prediction unit (185) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0088] The inter prediction unit (180) can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include information on the inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring block can include a spatial neighboring block existing in the current picture and a temporal neighboring block existing 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 from each other. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc. A reference picture including the above temporal neighboring blocks may be called a collocated picture (colPic). For example, the inter prediction unit (180) may construct a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit (180) may use the motion information of neighboring blocks as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the motion vector prediction (MVP) mode, the motion vector of the current block can be signaled by using the motion vector of the surrounding blocks as the motion vector predictor and encoding the motion vector difference and an indicator for the motion vector predictor. The motion vector difference can mean the difference between the motion vector of the current block and the motion vector predictor.

[0089] The prediction unit can generate a prediction signal based on various prediction methods and / or prediction techniques described below. For example, the prediction unit can apply intra prediction or inter prediction to predict the current block, and can also apply intra prediction and inter prediction simultaneously. A prediction method that simultaneously applies intra prediction and inter prediction to predict the current block may be called combined inter and intra prediction (CIIP). In addition, the prediction unit may perform intra block copy (IBC) to predict the current block. Intra block copy can be used for video / image coding of content such as games, such as screen content coding (SCC). IBC is a method of predicting the current block using a previously restored reference block within the current picture located at a predetermined distance from the current block. When IBC is applied, the location of the reference block within the current picture can be encoded as a vector (block vector) corresponding to the predetermined distance. IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives reference blocks within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in the present disclosure.

[0090] The prediction signal generated through the prediction unit can be used to generate a restoration signal or a residual signal. The subtraction unit (115) can generate a residual signal (residual block, residual sample array) by subtracting the prediction signal (predicted block, predicted sample array) output from the prediction unit from the input image signal (original block, original sample array). The generated residual signal can be transmitted to the conversion unit (120).

[0091] The transform unit (120) can apply a transform technique to the residual signal to generate transform coefficients. For example, the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. CNT refers to a transform obtained based on generating a prediction signal using all previously reconstructed pixels. The transform process can be applied to a pixel block having a square equal size, or can be applied to a block of a non-square variable size.

[0092] The quantization unit (130) can quantize the transform coefficients and transmit them to the entropy encoding unit (190). The entropy encoding unit (190) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream. The information about the quantized transform coefficients can be called residual information. The quantization unit (130) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.

[0093] The entropy encoding unit (190) can perform various encoding methods, such as, for example, exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoding unit (190) can also encode, together or separately, information necessary for video / image restoration (e.g., values ​​of syntax elements) in addition to quantized transform coefficients. The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in the form of a network abstraction layer (NAL) unit. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The signaling information, transmitted information and / or syntax elements mentioned in the present disclosure may be encoded through the encoding procedure described above and included in the bitstream.

[0094] The above 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 USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmission unit (not shown) for transmitting the signal output from the entropy encoding unit (190) and / or a storage unit (not shown) for storing the signal may be provided as an internal / external element of the video encoding device (100), or the transmission unit may be provided as a component of the entropy encoding unit (190).

[0095] The quantized transform coefficients output from the quantization unit (130) can be used to generate a residual signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (140) and inverse transformation unit (150), a residual signal (residual block or residual samples) can be restored.

[0096] The addition unit (155) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit (180) or the intra prediction unit (185). When there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the reconstructed block. The addition unit (155) can be called a reconstructor or a reconstructed block generation unit. The generated reconstructed signal can be used for intra prediction of the next block to be processed within the current picture, and can also be used for inter prediction of the next picture after filtering as described below.

[0097] The filtering unit (160) can improve subjective / objective picture quality by applying filtering to the restoration signal. For example, the filtering unit (160) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and store the modified restoration picture in the memory (170), specifically, in the DPB of the memory (170). The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (160) can generate various information regarding filtering and transmit the information to the entropy encoding unit (190), as described later in the description of each filtering method. The information regarding filtering may be encoded by the entropy encoding unit (190) and output in the form of a bitstream.

[0098] The modified restored picture transmitted to the memory (170) can be used as a reference picture in the inter prediction unit (180). Through this, when inter prediction is applied, the image encoding device (100) can avoid prediction mismatch between the image encoding device (100) and the image decoding device, and can also improve encoding efficiency.

[0099] The DPB in the memory (170) can store a modified reconstructed picture to be used as a reference picture in the inter prediction unit (180). The memory (170) can store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of blocks in a picture that has already been reconstructed. The stored motion information can be transferred to the inter prediction unit (180) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (170) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (185).

[0100] Video Decryption Device Overview

[0101] FIG. 3 is a schematic diagram illustrating an image decoding device to which an embodiment according to the present disclosure can be applied.

[0102] As illustrated in FIG. 3, the image decoding device (200) may be configured to include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an addition unit (235), a filtering unit (240), a memory (250), an inter prediction unit (260), and an intra prediction unit (265). The inter prediction unit (260) and the intra prediction unit (265) may be collectively referred to as a “prediction unit.” The inverse quantization unit (220) and the inverse transformation unit (230) may be included in a residual processing unit.

[0103] All or at least some of the plurality of components constituting the video decoding device (200) may be implemented as a single hardware component (e.g., a decoder or processor) depending on the embodiment. In addition, the memory (170) may include a DPB and may be implemented by a digital storage medium.

[0104] The video decoding device (200) that receives a bitstream including video / image information can restore the image by performing a process corresponding to the process performed in the video encoding device (100) of FIG. 2. For example, the video decoding device (200) can perform decoding using a processing unit applied in the video encoding device. Therefore, the processing unit for decoding may be, for example, a coding unit. The coding unit may be a coding tree unit or may be obtained by dividing a maximum coding unit. In addition, the restored image signal decoded and output by the video decoding device (200) can be reproduced through a reproduction device (not shown).

[0105] The video decoding device (200) can receive a signal output from the video encoding device of FIG. 2 in the form of a bitstream. The received signal can be decoded through the entropy decoding unit (210). For example, the entropy decoding unit (210) can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The video decoding device may additionally use information on the parameter set and / or the general constraint information to decode the image. The signaling information, received information, and / or syntax elements mentioned in the present disclosure can be obtained from the bitstream by being decoded through the decoding procedure. For example, the entropy decoding unit (210) can decode information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values ​​of syntax elements required for image restoration and the quantized values ​​of transform coefficients for residuals. More specifically, the CABAC entropy decoding method receives a bin corresponding to each syntax element in the bitstream, determines a context model using information of the syntax element to be decoded and the decoding information of the surrounding block and the decoding target block or the information of the symbol / bin decoded in the previous step, and predicts the occurrence probability of the bin according to the determined context model to perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element.At this time, the CABAC entropy decoding method can update the context model using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information regarding prediction among the information decoded by the entropy decoding unit (210) is provided to the prediction unit (inter prediction unit (260) and intra prediction unit (265)), and the residual value on which entropy decoding is performed by the entropy decoding unit (210), i.e., quantized transform coefficients and related parameter information, can be input to the inverse quantization unit (220). In addition, information regarding filtering among the information decoded by the entropy decoding unit (210) can be provided to the filtering unit (240). Meanwhile, a receiving unit (not shown) that receives a signal output from an image encoding device may be additionally provided as an internal / external element of the image decoding device (200), or the receiving unit may be provided as a component of an entropy decoding unit (210).

[0106] Meanwhile, the video decoding device according to the present disclosure may be referred to as a video / video / picture decoding device. The video decoding device may include an information decoder (video / video / picture information decoder) and / or a sample decoder (video / video / picture sample decoder). The information decoder may include an entropy decoding unit (210), and the sample decoder may include at least one of an inverse quantization unit (220), an inverse transformation unit (230), an addition unit (235), a filtering unit (240), a memory (250), an inter prediction unit (260), and an intra prediction unit (265).

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

[0108] In the inverse transform unit (230), the transform coefficients can be inversely transformed to obtain a residual signal (residual block, residual sample array).

[0109] The prediction unit can perform a prediction on the current block and generate a predicted block containing prediction samples for the current block. The prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block based on the prediction information output from the entropy decoding unit (210), and can determine a specific intra / inter-prediction mode (prediction technique).

[0110] The fact that the prediction unit can generate a prediction signal based on various prediction methods (techniques) described later is the same as that mentioned in the description of the prediction unit of the image encoding device (100).

[0111] The intra prediction unit (265) can predict the current block by referring to samples within the current picture. The description of the intra prediction unit (185) can be equally applied to the intra prediction unit (265).

[0112] The inter prediction unit (260) can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include information on the inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit (260) can construct a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be performed based on various prediction modes (techniques), and the information about the prediction can include information indicating the mode (technique) of inter prediction for the current block.

[0113] The addition unit (235) can generate a restoration signal (restored picture, restoration block, restoration sample array) by adding the acquired residual signal to the prediction signal (predicted block, prediction sample array) output from the prediction unit (including the inter prediction unit (260) and / or the intra prediction unit (265)). When there is no residual for the block to be processed, such as when the skip mode is applied, the predicted block can be used as the restoration block. The description of the addition unit (155) can be equally applied to the addition unit (235). The addition unit (235) can be called a restoration unit or a restoration block generation unit. The generated restoration signal can be used for intra prediction of the next block to be processed within the current picture, and can also be used for inter prediction of the next picture after going through filtering as described below.

[0114] The filtering unit (240) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (240) can apply various filtering methods to the restored picture to generate a modified restored picture, and store the modified restored picture in the memory (250), specifically, in the DPB of the memory (250). The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0115] The (modified) reconstructed picture stored in the DPB of the memory (250) can be used as a reference picture in the inter prediction unit (260). The memory (250) can store motion information of a block from which motion information is derived (or decoded) in the current picture and / or motion information of blocks in a picture that has already been reconstructed. The stored motion information can be transferred to the inter prediction unit (260) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (250) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (265).

[0116] In this specification, the embodiments described in the filtering unit (160), the inter prediction unit (180), and the intra prediction unit (185) of the image encoding device (100) can be applied to the filtering unit (240), the inter prediction unit (260), and the intra prediction unit (265) of the image decoding device (200) in the same or corresponding manner, respectively.

[0117] Inter prediction

[0118] The prediction unit of the video encoding device (100) and the video decoding device (200) can perform inter prediction on a block-by-block basis to derive prediction samples. Inter prediction may be a prediction derived in a manner dependent on data elements (e.g., sample values, or motion information, etc.) of pictures other than the current picture. When inter prediction is applied to the current block, a predicted block (prediction sample array) for the current block may be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture pointed to by a reference picture index. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information of the current block may be predicted on a block, sub-block, or sample basis based on the correlation of the motion information between the surrounding 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 (L0 prediction, L1 prediction, Bi prediction, etc.). When inter prediction is applied, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing 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 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 (colPic).For example, a motion information candidate list may be constructed based on neighboring blocks of a current block, and flag or index information may be signaled to indicate which candidate is selected (used) to derive a motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and a motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.

[0119] The above motion information may include L0 motion information and / or L1 motion information depending on the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). A motion vector in the L0 direction may be called an L0 motion vector or MVL0, and a motion vector in the L1 direction may be called an L1 motion vector or MVL1. Prediction based on an L0 motion vector may be called an L0 prediction, prediction based on an L1 motion vector may be called an L1 prediction, and prediction based on both the L0 motion vector and the L1 motion vector may be called a bi-prediction (Bi). Here, an L0 motion vector may represent a motion vector associated with a reference picture list L0 (L0), and an L1 motion vector may represent a motion vector associated with a reference picture list L1 (L1). The reference picture list L0 may include pictures preceding the current picture in output order as reference pictures, and the reference picture list L1 may include pictures succeeding the current picture in output order. The preceding pictures may be called forward (reference) pictures, and the succeeding pictures may be called backward (reference) pictures. The reference picture list L0 may further include pictures succeeding the current picture in output order as reference pictures. In this case, the preceding pictures may be indexed first and the succeeding pictures may be indexed next within the reference picture list L0. The reference picture list L1 may further include pictures preceding the current picture in output order as reference pictures. In this case, the succeeding pictures may be indexed first and the succeeding pictures may be indexed next within the reference picture list 1. Here, the output order may correspond to a POC (picture order count) order.

[0120] FIG. 4 is a schematic diagram showing an inter prediction unit (180) of an image encoding device (100), and FIG. 5 is a flowchart showing a method of encoding an image based on inter prediction.

[0121] The video encoding device (100) can perform inter prediction on the current block (S510). The video encoding device (100) can derive the inter prediction mode and motion information of the current block, and generate prediction samples of the current block. Here, the procedures of determining the inter prediction mode, deriving motion information, and generating prediction samples may be performed simultaneously, or one procedure may be performed before the other. For example, the inter prediction unit (180) of the video encoding device (100) may include a prediction mode determination unit (181), a motion information derivation unit (182), and a prediction sample derivation unit (183). The prediction mode determination unit (181) may determine the prediction mode for the current block, the motion information derivation unit (182) may derive motion information of the current block, and the prediction sample derivation unit (183) may derive prediction samples of the current block. For example, the inter prediction unit (180) of the video encoding device (100) can search for a block similar to the current block within a certain area (search area) of reference pictures through motion estimation, and derive a reference block whose difference from the current block is minimal or below a certain standard. 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 the positional difference between the reference block and the current block. The video encoding device (100) can determine a mode to be applied to the current block among various prediction modes. The video encoding device (100) can compare RD costs for the various prediction modes and determine an optimal prediction mode for the current block.

[0122] For example, when the skip mode or merge mode is applied to the current block, the video encoding device (100) may configure a merge candidate list, which will be described later, and derive a reference block among the reference blocks indicated by the merge candidates included in the merge candidate list, the difference from the current block being at least or below a certain standard. In this case, a merge candidate associated with the derived reference block is selected, and merge index information indicating the selected merge candidate may be generated and signaled to a decoding device. Motion information of the current block may be derived using motion information of the selected merge candidate.

[0123] As another example, when the (A)MVP mode is applied to the current block, the video encoding device (100) may configure an (A)MVP candidate list, which will be described later, and use the motion vector of an mvp candidate selected from among mvp (motion vector predictor) candidates included in the (A)MVP candidate list as the mvp of the current block. In this case, for example, a motion vector pointing to a reference block derived by the above-described motion estimation may be used as the motion vector of the current block, and an mvp candidate having a motion vector with the smallest difference from the motion vector of the current block among the mvp candidates may become the selected mvp candidate. A motion vector difference (MVD), which is a difference obtained by subtracting the mvp from the motion vector of the current block, may be derived. In this case, information about the MVD may be signaled to the video decoding device (200). In addition, when the (A)MVP mode is applied, the value of the reference picture index can be configured as reference picture index information and signaled separately to the image decoding device (200).

[0124] The video encoding device (100) can derive residual samples based on the predicted samples (S520). The video encoding device (100) can derive the residual samples by comparing the original samples of the current block with the predicted samples.

[0125] The video encoding device (100) can encode video information including prediction information and residual information (S530). The video encoding device (100) can output the encoded video information in the form of a bitstream. The prediction information may include information related to the prediction procedure, such as prediction mode information (e.g., skip flag, merge flag, or mode index) and information about motion information. The information about the motion information may include candidate selection information (e.g., merge index, mvp flag, or mvp index), which is information for deriving a motion vector. In addition, the information about the motion information may include information about the above-described MVD and / or reference picture index information. In addition, the information about the motion information may include information indicating whether L0 prediction, L1 prediction, or bi-prediction is applied. The residual information is information about the residual samples. The residual information may include information about quantized transform coefficients for the residual samples.

[0126] The output bitstream can be stored in a (digital) storage medium and transmitted to a decoding device, or can be transmitted to an image decoding device (200) via a network.

[0127] Meanwhile, as described above, the video encoding device (100) can generate a restored picture (including restored samples and restored blocks) based on the reference samples and the residual samples. This is to derive the same prediction result as that performed by the video decoding device (200) from the video encoding device (100), thereby increasing coding efficiency. Accordingly, the video encoding device (100) can store the restored picture (or restored samples, restored blocks) in memory and utilize it as a reference picture for inter prediction. As described above, an in-loop filtering procedure, etc. can be further applied to the restored picture.

[0128] FIG. 6 is a schematic diagram showing an inter prediction unit (260) of an image decoding device (200), and FIG. 7 is a flowchart showing a method of decoding an image based on inter prediction.

[0129] The image decoding device (200) can perform an operation corresponding to the operation performed in the image encoding device (100). The image decoding device (200) can perform a prediction on the current block based on the received prediction information and derive prediction samples.

[0130] Specifically, the image decoding device (200) can determine a prediction mode for the current block based on the received prediction information (S710). The image decoding device (200) can determine which inter prediction mode is applied to the current block based on the prediction mode information in the prediction information.

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

[0132] The video decoding device (200) can derive motion information of the current block based on the determined inter prediction mode (S720). For example, when skip mode or merge mode is applied to the current block, the video decoding device (200) can configure a merge candidate list described below and select one of the merge candidates included in the merge candidate list. The selection can be performed based on the above-described selection information (merge index). Motion information of the current block can be derived using motion information of the selected merge candidate. Motion information of the selected merge candidate can be used as motion information of the current block.

[0133] As another example, when the (A)MVP mode is applied to the current block, the video decoding device (200) may configure an (A)MVP candidate list described below, and use the motion vector of an MVP candidate selected from among the MVP (motion vector predictor) 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) described above. In this case, the MVD of the current block may be derived based on the information about the MVD, and the motion vector of the current block may be derived based on the MVP of the current block and the MVD. In addition, the reference picture index of the current block may be derived based on the reference picture index information. A picture indicated by the reference picture index within the reference picture list for the current block may be derived as a reference picture referenced for inter prediction of the current block.

[0134] Meanwhile, as described below, motion information of the current block can be derived without constructing a candidate list. In this case, motion information of the current block can be derived according to the procedure initiated in the prediction mode described below. In this case, constructing a candidate list as described above can be omitted.

[0135] The video decoding device (200) may generate prediction samples for the current block based on motion information of the current block (S730). In this case, the reference picture is derived based on the reference picture index of the current block, and prediction samples of the current block may be derived using samples of a reference block pointed to by the motion vector of the current block on the reference picture. In this case, as described below, a prediction sample filtering procedure may be further performed on all or part of the prediction samples of the current block, depending on the case.

[0136] For example, the inter prediction unit (260) of the video decoding device (200) may include a prediction mode determination unit (261), a motion information derivation unit (262), and a prediction sample derivation unit (263), and may determine a prediction mode for the current block based on prediction mode information received from the prediction mode determination unit (181), derive motion information (motion vector and / or reference picture index, etc.) of the current block based on information about motion information received from the motion information derivation unit (182), and derive prediction samples of the current block from the prediction sample derivation unit (183).

[0137] The video decoding device (200) can generate residual samples for the current block based on the received residual information (S740). The video decoding device (200) can generate restoration samples for the current block based on the prediction samples and the residual samples, and can generate a restoration picture based on the restoration samples (S750). As described above, an in-loop filtering procedure, etc., can be further applied to the restoration picture.

[0138] Referring to FIG. 8, the inter prediction procedure as described above may include an inter prediction mode determination step (S810), a motion information derivation step (S820) according to the determined prediction mode, and a prediction performance (prediction sample generation) step (S830) based on the derived motion information. The inter prediction procedure may be performed in the image encoding device (100) and the image decoding device (200) as described above.

[0139] Determine inter prediction mode

[0140] Various inter prediction modes can be used to predict the current block in a picture. For example, various modes can be used, such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, and merge with MVD (MMVD) mode. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bi-prediction with CU-level weight (BCW), and bi-directional optical flow (BDOF) can be used in addition to or instead of these modes. Affine mode may also be called affine motion prediction mode. MVP mode may also be called advanced motion vector prediction (AMVP) mode. In this document, motion information candidates derived by some modes and / or 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 above merge / skip mode, or may be added as an mvp candidate in the above MVP mode.

[0141] Prediction mode information indicating the inter prediction mode of the current block may be signaled from the video encoding device (100) to the video decoding device (200). The prediction mode information may be included in a bitstream and received by the video decoding device (200). The prediction mode information may include index information indicating one of a plurality of 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, whether to apply the skip mode may be indicated by signaling a skip flag, and whether to apply the merge mode may be indicated by signaling a merge flag when the skip mode is not applied, and when the merge mode is not applied, the MVP mode may be indicated to be applied, or a flag for additional distinction may be further signaled. The affine mode may be signaled as an independent mode, or may be signaled as a mode dependent on the merge mode or the MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.

[0142] Deriving movement information

[0143] Inter prediction can be performed using motion information of the current block. The video encoding device (100) can derive optimal motion information for the current block through a motion estimation procedure. For example, the video encoding device (100) can search for similar reference blocks with high correlation in fractional pixel units within a predetermined search range within the reference picture using the original block within the original picture for the current block, and can derive motion information through this. The similarity of blocks can be derived based on the difference in phase-based sample values. For example, the similarity of blocks can be calculated based on the SAD between the current block (or the template of the current block) and the reference block (or the template of the reference block). In this case, motion information can be derived based on the reference block with the smallest SAD within the search range. The derived motion information can be signaled to the video decoding device (200) in various ways based on the inter prediction mode.

[0144] Generate prediction samples

[0145] A predicted block for a current block can be derived based on motion information derived according to a prediction mode. The predicted block can 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 can be performed, through which prediction samples of the current block can be derived based on reference samples of the fractional sample unit within a reference picture. If affine inter prediction is applied to the current block, prediction samples can be generated based on a sample / subblock unit MV. If bi-prediction is applied, prediction samples derived based on L0 prediction (i.e., prediction using a reference picture in a reference picture list L0 and MVL0) and L1 prediction (i.e., prediction using a reference picture in a reference picture list L1 and MVL1) can be used as prediction samples of the current block through a weighted sum or weighted average (according to phase). 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 with respect to the current picture (i.e., if it is bi-prediction and bidirectional prediction), it can be called true bi-prediction.

[0146] As described above, restoration samples and restoration pictures can be generated based on the derived prediction samples, and then procedures such as in-loop filtering can be performed.

[0147] Template matching (TM)

[0148] FIG. 9 is a diagram for explaining a template matching-based encoding / decoding method according to the present disclosure.

[0149] Template Matching (TM) is a method of deriving a motion vector performed at the decoder stage. It is a method of refining the motion information of the current block by finding a template (hereinafter referred to as a "reference template") within a reference picture that is most similar to a template (hereinafter referred to as a "current template") adjacent to the current block (e.g., current coding unit, current CU). The current template may be an upper neighboring block and / or a left neighboring block of the current block, or a part of these neighboring blocks. In addition, the reference template may be determined to have the same size as the current template.

[0150] As illustrated in Fig. 9, once the initial motion vector of the current block is derived, a search for a better motion vector can be performed in a surrounding area of ​​the initial motion vector. For example, the range of the surrounding area where the search is performed can be within a [-8, +8]-pel search area centered on the initial motion vector. In addition, the size of the search step for performing the search can be determined based on the AMVR mode of the current block. In addition, template matching can also be performed continuously with the bilateral matching process in merge mode.

[0151] If the prediction mode of the current block is AMVP mode, a motion vector predictor candidate (MVP candidate) may be determined based on a template matching error. For example, a motion vector predictor candidate (MVP candidate) that minimizes the error between the current template and a reference template may be selected. Thereafter, template matching for improving a motion vector may be performed on the selected motion vector predictor candidate. At this time, template matching for improving a motion vector may not be performed on motion vector predictor candidates that are not selected.

[0152] More specifically, the improvement of the selected motion vector predictor candidate can be started from full-pel accuracy within the [-8, +8]-pel search region using an iterative diamond search. Alternatively, it can be started from 4-pel accuracy in the case of 4-pel AMVR mode. This can be followed by a search for half-pel and / or quarter-pel accuracy depending on the AMVR mode. According to the search process, the motion vector predictor candidate can maintain the same motion vector accuracy as indicated by the AMVR mode even after the template matching process. In the iterative search process, the search process is terminated if the difference between the previous minimum cost and the current minimum cost is less than an arbitrary threshold. The threshold can be equal to the area of ​​the block, i.e., the number of samples in the block. Table 1 shows examples of search patterns according to the AMVR mode and the merge mode accompanied by AMVR.

[0153] Search patternAMVR modeMerge mode4-pelFull-pelHalf-pelQuarter-pelAltIF=0AltIF=14-pel diamondv4-pel crossvFull-pel diamondvvvvvFull-pel crossvvvvvHalf-pel crossvvvvQuarter-pel crossvv1 / 8-pel crossv

[0154] If the prediction mode of the current block is merge mode, a similar search method can be applied to the merge candidate indicated by the merge index. As shown in Table 1 above, template matching can be performed up to 1 / 8-pel accuracy or can skip half-pel accuracy or lower, which can be determined depending on whether an alternative interpolation filter is used according to merge motion information. In this case, the alternative interpolation filter can be a filter used when AMVR is in half-pel mode. In addition, if template matching is available, depending on whether bilateral matching (BM) is available, the template matching can operate as an independent process, or can operate as an additional motion vector improvement process between block-based bilateral matching and sub-block-based bilateral matching. The availability of template matching and / or bilateral matching can be determined based on an availability condition check. The accuracy of the motion vector as described above can refer to the accuracy of the motion vector difference (MVD).

[0155] Adaptive reordering of merge candidates with template matching (ARMC-TM)

[0156] Merge candidates can be adaptively rearranged through template matching. The rearrangement method can be applied to the general merge mode, template matching (TM) merge mode, and affine merge mode (excluding SbTMVP candidates). In the TM merge mode, the rearrangement of merge candidates can be performed before the motion vector refinement process described above.

[0157] After the merge candidate list is constructed, the merge candidates can be divided into one or more subgroups. The subgroup size for the regular merge mode and the TM merge mode can be 5. Additionally, the subgroup size for the affine merge mode can be 3. The merge candidates within each subgroup can be reordered in ascending order based on cost values ​​based on template matching. For simplicity, the merge candidates within the last subgroup, but not the first, may not be reordered.

[0158] The template matching cost of a merge candidate can be measured by the sum of absolute differences (SAD) between the samples of the template of the current block and the corresponding reference samples. The template may include a set of reconstructed samples neighboring the current block. The locations of the reference samples of the template can be determined by motion information of the merge candidate.

[0159] FIG. 10 is a diagram exemplarily illustrating reference samples of a template of a current block and templates in reference pictures. When a merge candidate uses bidirectional prediction, reference samples of the template of the merge candidate can be generated as illustrated in FIG. 10. Specifically, after a reference block in a list 0 reference picture is specified based on a list 0 (L0) motion vector of a merge candidate of a current block, a reference template (reference template 0, RT0) in the list 0 reference picture can be specified. Similarly, after a reference block in a list 1 reference picture is specified based on a list 1 (L1) motion vector of a merge candidate of a current block, a reference template (reference template 1, RT1) in the list 1 reference picture can be specified.

[0160] For a sub-block-based merge candidate where the size of a sub-block is Wsub Х Hsub, the upper template may include one or more sub-templates of size Wsub Х 1, and the left template may include one or more sub-templates of size 1 Х Hsub.

[0161] Figure 11 is a drawing for explaining a method of specifying a template using motion information of a sub-block.

[0162] In the example illustrated in Fig. 11, reference samples of each sub-template can be derived using motion information of sub-blocks included in the first column and the first row of the current block. More specifically, reference sub-blocks corresponding to the reference picture (A_ref, B_ref, C_ref, D_ref, E_ref, F_ref, G_ref) can be specified using motion vectors of sub-blocks (A, B, C, D, E, F, G) included in the first column and the first row of the current block in the current picture. For example, the position of the corresponding reference sub-block can be specified from a collocated block in the reference picture based on the motion vector of each sub-block. Thereafter, reference templates can be constructed from the reconstructed area adjacent to each reference sub-block. As illustrated in Fig. 11, when the size of a sub-block is Wsub Х Hsub, the upper reference template can include one or more sub-reference templates of the size Wsub Х 1, and the left reference template can include one or more sub-reference templates of the size 1 Х Hsub.

[0163] In the present disclosure, template matching may be a process of searching for a reference template with the highest similarity to the current template. According to the present disclosure, a template matching error (e.g., an error cost) may be calculated to measure the similarity, and a cost function such as the SAD may be used for this purpose. A large template matching error may indicate a large template matching error and thus low similarity between templates. Conversely, a small template matching cost may indicate a small template matching error and therefore high similarity between templates.

[0164] In the present disclosure, the cost function for calculating the template matching cost may be a function that utilizes the difference between a sample value in a current template and a corresponding sample value in a reference template. Accordingly, the cost function may be referred to as a "difference(error)-based function" or a "difference(error)-based equation" between corresponding samples in two templates. In addition, the template matching cost calculated by the cost function may be referred to as a "difference(error)-based function value" or a "difference(error)-based value" between corresponding samples in two templates.

[0165] Various embodiments according to the present disclosure are described below with reference to the drawings.

[0166] Example

[0167] Various embodiments of the present disclosure relate to techniques related to the aforementioned video encoding / decoding operations, and may be particularly related to the template matching described above. According to one embodiment of the present disclosure, in the process of constructing a prediction candidate list during inter-screen prediction, a generalized (i.e., composite) merge candidate list is constructed based on template matching, and a method is provided for deriving motion information and generating a prediction block by referencing candidates of the generalized (i.e., composite) merge candidate list.

[0168] As an example, according to the present disclosure, prediction candidates with various characteristics, such as conventional Regular merge, CIIP merge, GPM merge, MMVD merge, SbTMVP merge, and affine MERGE, can be configured as a single prediction candidate list. Here, among the prediction candidates with various characteristics, different prediction candidates may be used to mean not only prediction candidates having different methods of deriving motion vectors, such as conventional Regular merge, affine merge, etc., but also prediction blocks having different characteristics when the final prediction blocks are different due to differences in BCW, interpolation filters, etc. even if the prediction candidates have the same motion vector.

[0169] In addition, according to one embodiment of the present disclosure, a method for calculating template matching errors of various prediction candidates is proposed. In addition, according to the present disclosure, when various prediction candidates are configured as a single list, priorities among the prediction candidates can be determined based on the template matching error. As an example, a method is proposed in which a single prediction candidate list is configured to include prediction candidates with various characteristics, and the prediction candidates are sorted in order from those with high similarity to those with low similarity according to template similarity, and a method for generating a prediction block using motion information derived from the proposed prediction candidate list is proposed.

[0170] According to an embodiment of the present disclosure, a prediction candidate list composed of motion information of different characteristics can be constructed, thereby improving compression efficiency while minimizing the amount of bits required for signaled information.

[0171] According to embodiments of the present disclosure, a list including prediction candidates of various characteristics can be constructed, and the prediction candidate list can include the following candidates.

[0172] 1. Regular merge using movement information of surrounding blocks

[0173] 2. MMVD (Merge with MVD (motion vector difference)) that derives motion information by applying additional compensation values ​​to the motion information of surrounding blocks.

[0174] 3. Combined inter-intra prediction (CIIP) that blends a prediction block generated using motion information of surrounding blocks and a prediction block generated using intra (within the screen) prediction by referencing surrounding pixels of the current block.

[0175] 4. Multi-Hypothesis Prediction, which blends three or more prediction blocks derived from motion information.

[0176] 5. Affine, which derives motion information in sub-block units through an affine model by referencing surrounding motion information.

[0177] 6. TMVP (Temporal Motion Vector Prediction) and SbTMVP (Subblock-based Temporal Motion Vector Prediction) refer to the motion information of reference pictures that have already been decoded.

[0178] 7. Geometric Partitioning: Blending prediction blocks of geometric shapes

[0179] As an example, a single prediction candidate list containing all of the prediction candidates listed above can be proposed. Furthermore, as an example, the prediction candidates in the prediction candidate list can be sorted based on their similarity to the template, from those with the highest similarity to those with the lowest similarity.

[0180] For example, assume that there is a list of prediction candidates containing prediction candidates, as shown in Table 2 below.

[0181] IndexChacteristicDetail0Above neighbor candidateRegular merge(as regular merge)1Left neighbor candidateRegular merge(as regular merge)2Left-Above neighbor candidateRegular merge(as regular merge)3Above neighbor candidate + MMVD offset 1(as MMVD merge)4Above neighbor candidate + MMVD offset 2(as MMVD merge)5Constructed affine candidate 1(as affine merge)6Inherited affine candidate 1(as affine merge)7Inherited affine candidate 2(as affine merge) merge)8Multi-hypothesis candidate 1MHP(as MHP)9Multi-hypothesis candidate 2MHP(as MHP)10TMVPTMVP(as TMVP)11SbTMVPsbTMVP(as sbTMVP)12GEO candidate 1GPM(as GPM)13GEO candidate 2GPM(as GPM)14CIIP candidate 1CIIP(as CIIP)15CIIP candidate 2CIIP(as CIIP)

[0182] As an example, if the template similarity of the prediction candidates included in the prediction candidate list expressed in Table 2 above is expressed as a cost (or error, cost), it can be as shown in Table 3 below.

[0183] IndexChacteristiccost0Above neighbor candidate101Left neighbor candidate1102Left-Above neighbor candidate1003Above neighbor candidate + MMVD offset 1304Above neighbor candidate + MMVD offset 2205Constructed affine candidate 1906Inherited affine candidate 1407Inherited affine candidate 21208Multi-hypothesis candidate 1809Multi-hypothesis candidate 25010TMVP13011SbTMVP6012GEO(geometric Partitioning) Candidate 1 (GEO candidate 1) 7013GEO candidate 2 (GEO candidate 2) 16014CIIP candidate 1 (CIIP candidate 1) 15015CIIP candidate 2 (CIIP candidate 2) 140

[0184] If we define that the smaller the error in Table 3 above, the higher the similarity, then candidates with high similarity can be sorted to have a higher priority than candidates with low similarity, as shown in Table 4 below.

[0185] IndexChacteristiccost0Above neighbor candidate101Above neighbor candidate + MMVD offset 2202Above neighbor candidate + MMVD offset 1303Inherited affine candidate 1404Multi-hypothesis candidate 2505SbTMVP606GEO candidate 1707Multi-hypothesis candidate 1808Constructed affine candidate 1909Left-Above neighbor candidate10010Left neighbor candidate11011Inherited affine candidate 2 2)12012TMVP13013CIIP candidate 2 (CIIP candidate 2)14014CIIP candidate 1 (CIIP candidate 1)15015GEO candidate 2 (GEO candidate 2)160

[0186] As shown in Table 4 above, a list of sorted prediction candidates can be obtained from the encoder and decoder sides, and on the encoder side, information about the candidates actually used for prediction, i.e., the actually selected prediction candidates (e.g., the prediction candidate index), can be signaled as a bitstream. For example, if a prediction candidate corresponding to prediction candidate index 2 in Table 4 above, i.e., a prediction candidate based on above neighbor candidate + MMVD offset 1, is selected, the prediction candidate index may need to be signaled as a bitstream. In this case, to define the prediction candidate in the conventional way, information on whether regular merge is used (e.g., regular_merge_flag), information on whether MMVD merge is used (e.g., mmvd_merge_flag), MMVD base candidate index (e.g., mmvd_base_candidate_idx), MMVD direction index (e.g., mmvd_direction_idx), and MMVD offset index (e.g., mmvd_offset_idx) must be signaled. However, according to one embodiment of the present disclosure, only information on whether generalized (i.e., composite) merge is applied (e.g., proposed_generalized_merge_flag) and prediction candidate index (e.g., merge index, merge_idx) can be signaled, thereby improving compression efficiency using reduced bits compared to the conventional method.

[0187] Meanwhile, according to one embodiment of the present disclosure, a template matching error can be calculated for each prediction candidate to indicate the template similarity of each prediction candidate. Furthermore, when prediction candidates with various characteristics are included in a single prediction candidate list, they can be sorted in order of priority based on the value of the template matching error proposed in one embodiment of the present disclosure.

[0188] FIG. 12 is a diagram illustrating an example of a method for deriving a template matching error according to an embodiment of the present disclosure. In order to determine priorities among prediction candidates by comparing template matching errors among prediction candidates derived in various ways included in a generalized (i.e., composite) merge list according to an embodiment of the present disclosure, an example of calculating a template matching error is described below with reference to FIG. 12.

[0189] An embodiment shown in Fig. 12 relates to a method for calculating a template matching error of a regular merge prediction candidate. As a merge prediction motion candidate, motion information of a decoded prediction block at a predefined location (e.g., left or top) may be used. According to an embodiment shown in Fig. 12, motion information of a decoded prediction block located at a predefined location (e.g., left) may be used. As an example, the template matching error may be expressed as a cost, and the corresponding error value (cost) may be a pixel value (T) of a template area of ​​a reference picture referred to by motion information. r ) and the decrypted pixels (T) located around the current block c) can be derived based on the difference (error) value between them. In addition, as an example, func() shown in Fig. 12 can be defined by various metrics, for example, SAD, MR-SAD (Mean-Reduced SAD), etc.

[0190] Meanwhile, FIG. 13 is a diagram for explaining an example of a method for calculating a template matching error according to an embodiment of the present disclosure. More specifically, it is a diagram for a method for calculating a template matching error of a CIIP prediction candidate. An example of calculating a template matching error according to an embodiment of the present disclosure may use motion information of a decoded prediction block at a predefined location (e.g., left or top) as a merge prediction motion candidate. According to an embodiment shown in FIG. 13, as an example of a case in which motion information of a decoded prediction block located at a predefined location (e.g., left) and intra (in-screen) prediction mode are used, the matching error may be expressed as a cost, and the cost may be expressed as a pixel value (T) of a template area of ​​a reference picture referenced by the motion information. r ) and the surrounding decrypted pixels of the current block (T x ) is derived by referring to the intra (intra, within the screen) prediction block (P c ) can be derived as an error value between them. In Fig. 13, func() can be defined with various metrics, for example, SAD, MR-SAD (Mean-Reduced SAD), etc. In addition, the Func_blend() function derives the template matching error by using intra (intra, within the screen) prediction block (P c ) and the pixel values ​​of the template area of ​​the reference picture (T r) can be defined as a function using a weighted average.

[0191] FIG. 14 is a diagram for explaining an example of a method for deriving a template matching error according to an embodiment of the present disclosure. The example shown in FIG. 14 relates to a method for calculating a template matching error of an MMVD prediction candidate. According to FIG. 14, as a merge prediction motion candidate, motion information of a decoded prediction block at a predefined location (e.g., left or top) may be used. According to an embodiment shown in FIG. 14, motion information of a decoded prediction block located at a predefined location (e.g., left) may be used. More specifically, the diagram is for explaining an example in which motion information is derived by applying an MMVD offset to the motion information of a prediction block located at a predefined location (e.g., left). As an example, when explaining the example of FIG. 14, the template matching error may be expressed as a cost, and the cost may be expressed as a pixel value (T) of a template area of ​​a reference picture to which motion information refers. r ) and the surrounding decrypted pixels of the current block (T c ) can be derived based on the difference (error) value between them. In the example of Fig. 14, func() can be defined with various metrics, for example, SAD, MR-SAD (Mean-Reduced SAD), etc.

[0192] Meanwhile, Fig. 15 is a diagram for explaining an example of a method for deriving a template matching error according to an embodiment of the present disclosure. More specifically, the example of Fig. 15 is about a method for deriving a template matching error of an affine prediction candidate. As an example, a method for calculating a template matching error of an affine prediction candidate can be classified into two: a case in which the affine model shown on the left side of Fig. 15 is applied by considering the template region, and a case in which the affine model shown on the right side is applied to the current block region and adjacent decoded pixels are used as the template region. Meanwhile, in deriving a template matching error, the matching error can be expressed as a cost, and the cost is a pixel value (T) of the template region of a reference picture referred to by motion information. r ) and the surrounding decrypted pixels of the current block (T c ) can be derived based on the difference (error) value between them. Meanwhile, in Fig. 15, func() can be defined with various metrics, for example, SAD, MR-SAD (Mean-Reduced SAD), etc.

[0193] Meanwhile, Fig. 16 is a diagram for explaining an example of a method for deriving a template matching error according to an embodiment of the present disclosure. More specifically, it is a diagram for explaining an example of a method for deriving a template matching error of a GPM prediction candidate. According to the example of Fig. 16, template areas ((T) corresponding to motion information for two areas r1 ), (T r2 )) may exist, and the matching error can be expressed as a cost, which is the pixel value (T) of the template area of ​​the reference picture referred to by the motion information. r ) and the surrounding decoded pixels of the current block (T c) can be derived based on the difference (error) value between the two prediction blocks. In Fig. 16, func() can be defined with various metrics, for example, SAD, MR-SAD (Mean-Reduced SAD), etc. In addition, the Func_blend() function can be a function that derives the cost based on a weighted average value of pixel values ​​of template areas of multiple (e.g., two) inter (inter-screen) prediction blocks.

[0194] FIGS. 17 and 18 are diagrams for explaining an example of a method for deriving a template matching error according to an embodiment of the present disclosure. More specifically, FIGS. 17 and 18 are diagrams for explaining an example of a method for deriving a template matching error of a TMVP and / or sbTMVP prediction candidate. As an example, the proposed method for deriving a template matching error of a TMVP and / or sbTMVP prediction candidate can be broadly classified into two types. First, referring to FIG. 17, a case may occur in which a temporal motion vector (temporal MV) referenced in a collocated picture is applied to a current block region and adjacent decoded pixels are used as a template region, or referring to FIG. 18, a case may occur in which a temporal motion vector (temporal MV) referenced in a collocated picture is applied while taking into consideration the template region, and thus a template matching error may be induced. As an example, here, the matching error can be expressed as a cost, which is the pixel value (T) of the template area of ​​the reference picture to which the motion information refers. r ) and the surrounding decrypted pixels of the current block (T c) can be derived based on the difference (error) value between the two. In addition, in FIG. 17 and FIG. 18, func() can be defined with various metrics, for example, SAD, MR-SAD (Mean-Reduced SAD), etc.

[0195] Meanwhile, when motion prediction candidates consisting of a single list are sorted based on template similarity, the information about the prediction candidates signaled in the bitstream (e.g., prediction candidate index) may be configured to only refer to a predefined number of prediction candidates, rather than defining the entire number of available candidates. That is, for example, assuming that the number of available prediction candidates is 30, instead of allowing the prediction candidate index to refer to 0 to 29, only a predefined number (N) may be referred to, so that the prediction candidate index may refer to only 0 to (N-1). In this case, a specific prediction candidate included in the prediction candidate list may not be selected.

[0196] Meanwhile, as an example, the prediction candidate list and / or information about the prediction candidates can be signaled as follows. Referring to Table 5 below, as an example, a modified signaling method for the modified prediction candidate list and / or information about the prediction candidates is described. As an example, Table 5 may be a modified example based on an existing video codec standard (e.g., VVC).

[0197]

[0198] Meanwhile, as an example, in order to effectively signal information about prediction candidates (e.g., prediction candidate indexes described above), binarization can be performed using integers N and M as shown in Table 6 below, in case only N prediction candidates are predefined.

[0199] Syntax structureSyntax elementBinarizationProcessInput parametersmerge_data( )generalized_merge_candidate_idx[ ][ ]TRcMax = N, cRiceParam = M

[0200] Meanwhile, the syntax name generalized_merge_candidate_idx is arbitrarily designated for clarity in describing the embodiments of the present disclosure, and it is obvious that other names may also be included in the present disclosure. As an example, the method of generating a generalized (i.e., composite) merge candidate list proposed in the present disclosure may be classified as a separate prediction mode. For example, taking a conventional video codec standard (e.g., VVC), in order to enable the embodiments of the present disclosure to define prediction candidates with shorter bits without replacing the conventional prediction candidate construction process, the syntax may be signaled as shown in Table 7 below.

[0201]

[0202] For example, when the value of the generalized_merge_flag[ x0 ][ y0 ] syntax is 1, it may mean that a single merge list including regular merge mode, MMVD mode, and CIIP prediction mode is applied to the current coding unit. In this case, subblock-based inter prediction parameters for the current coding unit may be inferred from surrounding blocks or generated based on geometric partition-based inter prediction. Meanwhile, the array indices x0, y0 may be variables for specifying the upper-left luma sample position (x0, y0) of the coding block considered based on the upper-left luma sample of the picture. Meanwhile, if the value of the syntax is 0, it may indicate that the single merge list described above is not applied to the current coding unit (generalized_merge_flag[ x0 ][ y0 ] equal to 1 specifies that the single merge list which contains regular merge mode, merge mode with motion vector difference, combined inter-picture merge and intra-picture prediction is applied for the current coding unit, subblock-based inter prediction parameters for the current coding unit are inferred from neighboring blocks, or geometric partition-based inter prediction is used to generate the inter prediction parameters of 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).

[0203] As an example, generalized_merge_candidate_idx[ x0 ][ y0 ] may be a merge candidate index, i.e., a prediction candidate index, of the generalized (i.e., merged) merge candidate list described above. Here, x0, y0 may 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 (generalized_merge_candidate_idx[ x0 ][ y0 ] specifies the merging candidate index of the generalized 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).

[0204] In addition, in order to effectively signal information about prediction candidates (e.g., prediction candidate index, etc.), binarization can be performed using integers N and M as follows to refer to only predefined N prediction candidates.

[0205] Syntax structureSyntax elementBinarizationProcessInput parametersmerge_data( )regular_merge_flag[ ][ ]FLcMax = 1generalized_merge_candidate_idx[ ][ ]TRcMax = N, cRiceParam = M

[0206] Meanwhile, as an example, the residual signal may not be signaled based on the generalized merge candidate list proposed above. This embodiment may only be applied when the value of cu_skip_flag is 1, meaning that the residual signal of the current block is not transmitted in the bitstream, as shown in Table 9 below.

[0207]

[0208] In Table 9 above, cu_skip_flag may be information that has been decoded before the proposed syntax, and may also be information signaled in the bitstream. For example, if the value of cu_skip_flag[ x0 ][ y0 ] is 1, it may indicate that when decoding a P or B slice for the current coding unit, there are no more parsed syntax elements after cu_skip_flag other than the IBC mode flag pred_mode_ibc_flag [ x0 ][ y0 ] and / or the merge_data( ) syntax structure. Meanwhile, when decoding an I slice, it may indicate that, based on the value of the syntax, there are no more parsed syntax elements after cu_skip_flag[ x0 ][ y0 ] other than merge_idx[ x0 ][ y0 ]. Meanwhile, if the value of cu_skip_flag[ x0 ][ y0 ] is 0, it can indicate that the coding unit is not skipped. Meanwhile, the array indices x0, y0 can specify the upper left luma sample position (x0, y0) of the coding block considered based on the upper left luma sample of the picture (cu_skip_flag[ x0 ][ y0 ] equal to 1 specifies that for the current coding unit, when decoding a P or B slice, no more syntax elements except one or more of the following are parsed after cu_skip_flag[ x0 ][ y0 ]: the IBC mode flag pred_mode_ibc_flag [ x0 ][ y0 ], and the merge_data( ) syntax structure; when decoding an I slice, no more syntax elements except merge_idx[ x0 ][ y0 ] are parsed after cu_skip_flag[ x0 ][ y0 ].cu_skip_flag[ x0 ][ y0 ] equal to 0 specifies that the coding unit is not skipped. 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).

[0209] In Table 9 above, information about the generalized merge candidate list and / or prediction candidate proposed in the embodiment of the present disclosure may be signaled based on the value of cu_skip_flag.

[0210] Meanwhile, in the following embodiments, the generalized merge prediction candidate configuration process described above will be described with reference to FIGS. 19 to 22. According to the embodiments referring to FIGS. 19 to 22, prediction candidates with various characteristics can be configured in one list, and the configuration order of the prediction candidates constituting the list and the number of prediction candidates can affect the performance. For this reason, as an embodiment, while iterating over some or all of the various prediction candidates including the merge prediction candidates below, prediction candidates can be added to the list in the number defined in advance in the decoder or the number defined in the bitstream. As an example, the types of prediction candidates added to the list can be as follows.

[0211] 1. A of the multiple motion information (spatial candidates) derived from the surrounding decoded blocks

[0212] 2. Among the surrounding decrypted blocks, B of the motion information derived from blocks that are not adjacent to the current block

[0213] 3. C of the multiple motion information (temporal candidates) derived from previously decoded reference pictures.

[0214] 4. D of the multiple motion information (e.g. HMVP) derived from the motion information stored in the look-up table

[0215] 5. E of the multiple motion information derived from the combination of motion information of two or more prediction candidates.

[0216] 6. F of the multiple motion (MMVD) information that compensated for MVD

[0217] 7. G of the multiple motion information derived from the affine model

[0218] 8. H motion information derived from the decoder through template matching

[0219] 9. I of the intraTMP prediction candidates

[0220] 10. J of the IBC prediction candidates

[0221] 11. K candidates (CIIP) that generate prediction blocks by combining motion information and intra-screen prediction information.

[0222] 12. L of the prediction candidates that generate the non-forward prediction block (GPM)

[0223] 13. M candidates for generating prediction blocks with three or more pieces of motion information, i.e., multi-hypothesis prediction

[0224] Each of the above prediction candidates can be included in the prediction candidate list, and when constructing the prediction candidate list based on each prediction candidate, the order illustrated in FIG. 22 may be followed, for example. According to FIG. 22, inherited candidates may be included in the generalized prediction candidate list described above (S2210), and then constructed candidates may be included in the candidate list (S2220). Afterwards, if the number of current candidates is less than the maximum number of candidates, zero MV candidates may optionally be included in the list (S2230). In this case, when deriving an arbitrary number of prediction candidates in each method, prediction candidates are derived according to priority, but it may be possible to add candidates by iterating over all candidates that can be derived or by iterating over only some of the candidates. In addition, when adding a predefined number of candidates, the process may proceed to constructing prediction candidates with different characteristics. That is, when A candidates are added to the above table of contents 1, B candidates of table of contents 2 may be included in the list, but it is also possible that only some of the candidates, not all of A, are included, and then candidates of table of contents 2 to 13 are included.

[0225] For example, in the process of constructing a generalized merge candidate list according to an embodiment of the present disclosure described above, it is assumed that the spatial candidate 1 and the affine prediction candidate 7 are included in the list. At this time, it is assumed that the spatial candidate can refer to the motion information of the location of FIG. 19 and follows the order of FIG. 20. If it is determined to include two spatial candidates when constructing the generalized merge prediction candidate, the process of constructing two or more prediction candidates by circulating the order shown in FIG. 20, and once two prediction candidates are constructed, the process of constructing the affine prediction candidate of FIG. 21 may be performed without further construction. As an example, if the process of constructing the affine prediction candidate follows the same order, all prediction candidates may be added. However, only some prediction candidates may be added, and a predefined number of affine prediction candidates may be added to the generalized prediction candidate list. Since this corresponds to one embodiment of the present disclosure, other prediction candidates may be added.

[0226] Meanwhile, as an example, the above prediction candidates that can be included in the generalized prediction candidate list can be included according to a predetermined order of addition to the prediction candidate list. For example, the order may be such that the affine candidate is added to the list, then the MMVD candidate is added, and then the GPM candidate is added, or the order may be such that the MMVD candidate is added, then the affine candidate is added, and then the GPM candidate is added, and so on. In other words, the prediction candidate list can be composed according to a predefined order, and other prediction candidates other than those described in Tables 1 to 13 above can be included, and when adding prediction candidates, they can be included in the list according to a specific priority determination method.

[0227] Embodiments of the present disclosure relate to a method and apparatus for image / video coding, and more particularly, to a process for deriving motion information during an inter-screen prediction process and generating a prediction block based on the derived motion information. Embodiments of the present disclosure provide a prediction candidate list including prediction candidates composed of motion information of different characteristics, a method for determining the order of the prediction candidate list, and a method for calculating an error value that can serve as a criterion for list reordering, thereby improving compression efficiency while minimizing the amount of transmitted bits.

[0228] FIG. 23 illustrates an image decoding method that can be performed by an image decoding device according to one embodiment of the present disclosure. As an example, the embodiment of FIG. 23 may be based on the embodiment described above, and therefore, any overlapping portions described above will be omitted for brevity.

[0229] As an example, according to the image decoding method performed by the image decoding device of FIG. 23, the prediction mode of the current block can be determined (S2310). As an example, the prediction mode of the current block can be determined based on prediction mode information, and the prediction mode information can indicate whether an inter prediction mode or an intra prediction mode is applied. As an example, the prediction mode information can be signaled in a bitstream. This is the same as described above, so a duplicate description is omitted.

[0230] Thereafter, based on the prediction mode of the current block being the inter prediction mode, an inter prediction block of the current block may be generated (S2320), and the current block may be reconstructed (S2330) based on the generated inter prediction block. For example, the inter prediction block may be generated based on prediction candidates of a prediction candidate list, and the prediction candidate list may include at least two prediction candidates from among a merge prediction candidate, a MMVD (Merge with Motion Vector Difference) prediction candidate, a CIIP (Combined inter-intra prediction), a multi-hypothesis prediction, an affine merge, a SbTMVP (subblock-based temporal motion vector prediction), or a GPM (geometric partitioning mode) merge prediction candidate. Prediction candidates derived in various ways may be included in one prediction candidate list. Since the description of each prediction candidate is the same as that described above, redundant description is omitted. Meanwhile, as an example, the prediction candidate list may be the generalized (i.e., composite) prediction candidate list described above, and the prediction candidate list may be derived based on the prediction candidate list usage flag, and the prediction candidate list usage flag may be proposed_generalized_merge_flag as described above, and may also be information signaled in the bitstream. Since the description thereof is the same as described above, redundant description thereof is omitted. In addition, specific information may be derived to select a prediction candidate included in the prediction candidate list. As an example, the prediction candidate may be selected based on the prediction candidate index, and the prediction candidate index may be merge_idx as described above, and may also be information signaled in the bitstream. Since the description thereof is the same as described above, redundant description thereof is omitted.In addition, the prediction candidates in the prediction candidate list can be sorted according to the error value derived based on the difference value between the pixel value of the template region of the reference picture and the surrounding pixels of the current block. In this case, since the embodiment of determining the priority described above can be applied, a redundant description is omitted. Meanwhile, the error value can be derived based on at least one of the sum of absolute difference (SAD) or the mean-reduced SAD (MR-SAD). In addition, based on the inclusion of the CIIP prediction candidate in the prediction candidate list, the error value for the CIIP prediction candidate can be derived based on the weighted average value of the pixel value of the template region derived using the intra prediction method and the pixel value of the template region of the reference picture. In addition, based on the inclusion of the GPM prediction candidate in the prediction candidate list, the error value for the GPM prediction candidate can be derived based on the weighted average value of the pixel values ​​of the template regions of a plurality of inter prediction blocks. Since this is the same as that described with reference to FIGS. 12 to 22, a redundant description is omitted.

[0231] Meanwhile, since FIG. 23 corresponds to one embodiment of the present disclosure, it will be obvious that the order of some steps may be changed, some steps may be added, or some steps may not be performed, and this is also included in the scope of the present disclosure.

[0232] Meanwhile, as another example, FIG. 23 may be included in an image encoding method performed by an image encoding device. In other words, FIG. 23 may be an example of an image encoding method performed by an image encoding device.

[0233] FIG. 24 illustrates an image encoding method that can be performed by an image encoding device according to one embodiment of the present disclosure. As an example, the embodiment of FIG. 24 may be based on the embodiment described above, and therefore, any overlapping portions described above will be omitted for brevity.

[0234] As an example, according to the image encoding method performed by the image encoding device of FIG. 24, the prediction mode of the current block may be determined as the inter prediction mode (S2410). If the prediction mode is determined as the inter prediction mode, a prediction block of the current block may be generated (S2420) based on the determined inter prediction mode. Here, the generated prediction block may be an inter prediction block, and the current block may be encoded (S2430) based on the generated prediction block. As an example, the prediction block is generated based on a prediction candidate of a prediction candidate list, and the prediction candidate list may include at least two prediction candidates from among a merge prediction candidate, a MMVD (Merge with Motion Vector Difference) prediction candidate, a CIIP (Combined inter-intra prediction), a multi-hypothesis prediction, an affine merge, a SbTMVP (subblock-based temporal motion vector prediction), or a GPM (geometric partitioning mode) merge prediction candidate. Prediction candidates derived in various ways may be included in a single prediction candidate list. For example, the prediction candidate list may be the generalized (i.e., composite) prediction candidate list described above, and the prediction candidate list may be derived based on a determination that the prediction candidate list is to be used. In addition, the prediction candidate list usage flag may be proposed_generalized_merge_flag as described above, and may also be information encoded and signaled in a bitstream. Since the description thereof is the same as that described above, a duplicate description is omitted. In addition, information necessary to specify a prediction candidate selected from among the prediction candidates included in the prediction candidate list may be encoded and signaled in a bitstream.For example, a prediction candidate may be selected based on a prediction candidate index, which may be merge_idx as described above, and may also be information signaled in the bitstream. Since the description thereof is the same as that described above, redundant description is omitted. In addition, the prediction candidates in the prediction candidate list may be sorted according to an error value derived from a difference value between a pixel value of a template region of a reference picture and a neighboring pixel of a current block. In this case, the embodiment for determining priorities described above may be applied, and therefore redundant description is omitted. Meanwhile, the error value may be derived based on at least one of a sum of absolute difference (SAD) or a mean-reduced SAD (MR-SAD). In addition, based on the inclusion of a CIIP prediction candidate in the prediction candidate list, an error value for the CIIP prediction candidate may be derived based on a weighted average of the pixel values ​​of the template region derived using an intra prediction method and the pixel values ​​of the template region of the reference picture. In addition, based on the inclusion of the GPM prediction candidate in the prediction candidate list, the error value for the GPM prediction candidate can be derived based on the weighted average of the pixel values ​​of the template region of multiple inter-prediction blocks. This is the same as described with reference to FIGS. 12 to 22, and thus, a duplicate description thereof will be omitted. In addition, the current block can be encoded using a residual block derived based on the prediction block, and this is the same as described above, and thus, a duplicate description thereof will be omitted.

[0235] Meanwhile, information about the prediction candidate list may be encoded and signaled as a bitstream, and the information about the prediction candidate list may include a prediction candidate list usage flag and / or a prediction candidate index, and the prediction candidate index may be encoded and signaled as a bitstream based on the prediction candidate list usage flag.

[0236] Meanwhile, as an example, a bitstream generated by a video encoding method may be transmitted from one device to another (e.g., transmitted from an encoder to a decoder), and may be recorded or stored on a computer-readable medium. Accordingly, a bitstream transmission device, transmission method, and / or recording / storage medium generated by a video encoding method are also included in embodiments of the present disclosure.

[0237] Meanwhile, since FIG. 24 corresponds to one embodiment of the present disclosure, it will be obvious that the order of some steps may be changed, some steps may be added, or some steps may not be performed, and this is also included in the scope of the present disclosure.

[0238] While the exemplary methods of this disclosure are presented as a series of operations for clarity of description, this is not intended to limit the order in which the steps are performed, and individual steps may be performed simultaneously or in different orders, if desired. To implement a method according to this disclosure, additional steps may be included in addition to the steps illustrated, some steps may be excluded and the remaining steps included, or some steps may be excluded and additional steps included.

[0239] In the present disclosure, a video encoding device or video decoding device performing a predetermined operation (step) may perform an operation (step) of checking the conditions or circumstances under which the operation (step) is performed. For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the video encoding device or video decoding device may perform an operation of checking whether the predetermined condition is satisfied and then perform the predetermined operation.

[0240] The various embodiments of the present disclosure are not intended to list all possible combinations but rather to illustrate representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.

[0241] Additionally, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, the embodiments may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general processors, controllers, microcontrollers, microprocessors, etc.

[0242] In addition, the video decoding device and the video encoding device to which the embodiments of the present disclosure are applied may be included in a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a video phone video device, and a medical video device, and may be used to process a video signal or a data signal. For example, the OTT (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), and the like.

[0243] FIG. 25 is a diagram illustrating an example of a content streaming system to which an embodiment according to the present disclosure can be applied.

[0244] As illustrated in FIG. 25, a content streaming system to which an embodiment of the present disclosure is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

[0245] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and camcorders directly generate bitstreams, the encoding server may be omitted.

[0246] The above bitstream can be generated by an image encoding method and / or an image encoding device to which an embodiment of the present disclosure is applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0247] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act 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, and the streaming server can transmit multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server may control commands / responses between each device within the content streaming system.

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

[0249] Examples of the user devices may include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs), digital TVs, desktop computers, digital signage, etc.

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

[0251] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of various embodiments to be executed on a device or a computer, and a non-transitory computer-readable medium having such software or instructions stored thereon and executable on the device or computer.

[0252] Embodiments according to the present disclosure can be used to encode / decode images.

Claims

1. In a video decoding method performed by a video decoding device, A step of determining the prediction mode of the current block; A step of generating an inter prediction block of the current block based on the prediction mode of the current block being an inter prediction mode; and A step of restoring the current block based on the inter prediction block; including: The above inter prediction block is generated based on the prediction candidates in the prediction candidate list, A method for decoding an image, wherein the above prediction candidate list includes at least two prediction candidates selected from among merge prediction candidates, MMVD (Merge with Motion Vector Difference) prediction candidates, CIIP (Combined inter-intra prediction), multi-hypothesis prediction, affine merge, SbTMVP (subblock-based temporal motion vector prediction), or GPM (geometric partitioning mode) merge prediction candidates.

2. In paragraph 1, A method for decoding an image, wherein the above prediction candidate list is derived based on a prediction candidate list usage flag.

3. In paragraph 2, A method for decoding an image, wherein the above prediction candidate list usage flag is obtained from a bitstream.

4. In paragraph 1, A method for decoding an image, wherein the above prediction candidate is selected based on a prediction candidate index.

5. In paragraph 4, A method for decoding an image, wherein the above prediction candidate index is signaled from a bitstream.

6. In paragraph 1, A method for decoding an image, wherein the prediction candidates in the prediction candidate list are sorted according to an error value derived based on a difference value between a pixel value of a template area of ​​a reference picture and a surrounding pixel of the current block.

7. In paragraph 6, An image decoding method, wherein the above error value is derived based on at least one of SAD (sum of absolute difference) or MR-SAD (Mean-Reduced SAD).

8. In paragraph 6, A method for decoding an image, wherein an error value for the CIIP prediction candidate is derived based on a weighted average of pixel values ​​of a template region derived using an intra prediction method and pixel values ​​of a template region of a reference picture, based on the inclusion of the CIIP prediction candidate in the prediction candidate list.

9. In paragraph 6, A method for decoding an image, wherein an error value for the GPM prediction candidate is derived based on a weighted average of pixel values ​​of template areas of a plurality of inter-prediction blocks, based on the inclusion of the GPM prediction candidate in the prediction candidate list.

10. In a video encoding method performed by a video encoding device, A step of determining the prediction mode of the current block as inter prediction mode; A step of generating a prediction block of the current block based on the inter prediction mode; and A step of encoding the current block based on the predicted block; including: The above prediction block is generated based on the prediction candidates in the prediction candidate list, A video encoding method, wherein the above prediction candidate list includes at least two prediction candidates selected from among merge prediction candidates, MMVD (Merge with Motion Vector Difference) prediction candidates, CIIP (Combined inter-intra prediction), multi-hypothesis prediction, affine merge, SbTMVP (subblock-based temporal motion vector prediction), or GPM (geometric partitioning mode) merge prediction candidates.

11. In paragraph 10, A video encoding method, wherein information about the above prediction candidate list is encoded into a bitstream.

12. In paragraph 11, A method for encoding an image, wherein information about the above prediction candidate list includes a prediction candidate list usage flag and a prediction candidate index.

13. In a computer-readable medium storing a bitstream generated by an image encoding method, the image encoding method, A step of determining the prediction mode of the current block as inter prediction mode; A step of generating a prediction block of the current block based on the inter prediction mode; and A step of encoding the current block based on the predicted block; including: The above prediction block is generated based on the prediction candidates in the prediction candidate list, A medium in which the above prediction candidate list includes at least two prediction candidates among merge prediction candidates, MMVD (Merge with Motion Vector Difference) prediction candidates, CIIP (Combined inter-intra prediction), Multi Hypothesis prediction, affine merge, SbTMVP (subblock-based temporal motion vector prediction), or GPM (geometric partitioning mode) merge prediction candidates.

14. In a method for transmitting a bitstream generated by an image encoding method, the image encoding method comprises: A step of determining the prediction mode of the current block as inter prediction mode; A step of generating a prediction block of the current block based on the inter prediction mode; and A step of encoding the current block based on the predicted block; including: The above prediction block is generated based on the prediction candidates in the prediction candidate list, A method wherein the above prediction candidate list includes at least two prediction candidates selected from among merge prediction candidates, MMVD (Merge with Motion Vector Difference) prediction candidates, CIIP (Combined inter-intra prediction), multi-hypothesis prediction, affine merge, SbTMVP (subblock-based temporal motion vector prediction), or GPM (geometric partitioning mode) merge prediction candidates.

Citation Information

Patent Citations

  • Transparent electrodes using metal nanowire mesh structure and method of fabricating the same

    KR1020210108571A

  • Forming method of sheet and protection member

    KR1020220011074A

  • Thermal request mediating device, thermal request mediating method and vehicle

    KR1020220011198A

  • Control Method for Power Tool

    KR1020230010099A

  • KR20230034191A