Image encoding / decoding method for template matching processing, method for transmitting bit stream, and recording medium having bit stream stored therein

By adopting a template matching-based prediction mode in image encoding/decoding, the problem of increased cost of high resolution and high-quality image transmission and storage is solved, and efficient image encoding and decoding is achieved, reducing costs and improving image quality.

CN119497993APending Publication Date: 2025-02-21LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380054913.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-07-19
Filing Date
2023-07-19
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The prior art is difficult to effectively solve the problem of increased transmission and storage costs of high-resolution and high-quality images, especially the lack of efficient image encoding/decoding methods in template matching processing.

Method used

Using a prediction mode based on template matching, a prediction block is generated by determining the prediction mode of the current block, and the current block is reconstructed based on the prediction block. The method includes technical means such as using template matching and merging mode, intra-block copy, intra-template matching, and inter-frame compilation tools to enable information.

Benefits of technology

Improve image encoding/decoding efficiency, achieve more efficient image transmission and storage, reduce costs, and enhance image quality and resolution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119497993A_ABST
    Figure CN119497993A_ABST
Patent Text Reader

Abstract

The present disclosure relates to an image encoding / decoding method for template matching processing, a method for transmitting a bitstream, and a recording medium having the bitstream stored therein. According to an embodiment of the present disclosure, an image decoding method performed by an image decoding apparatus may comprise the steps of: determining a prediction mode of a current block, generating a prediction block of the current block based on the prediction mode; and reconstructing the current block based on the prediction block, wherein the prediction mode can be determined according to the template matching-based compilation tool activation information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an image encoding / decoding method and apparatus for template matching processing, a method of transmitting a bitstream, and a recording medium storing the bitstream, and more particularly, to a method of performing prediction based on template matching. Background Art

[0002] Recently, the demand for high-resolution and high-quality images, such as high-definition (HD) images and ultra-high-definition (UHD) images, is increasing in various fields. As the resolution and quality of image data are improved, the amount of information or bit volume to be transmitted is relatively increased compared to existing image data. The increase in the amount of information or bit volume to be transmitted leads to an increase in transmission cost and storage cost.

[0003] Therefore, efficient image compression technology is needed to effectively transmit, store, and reproduce information about high-resolution and high-quality images. Summary of the invention

[0004] Technical issues

[0005] An object of the present disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.

[0006] Furthermore, an object of the present disclosure is to provide a method of performing prediction using a template matching-based prediction mode including a template matching merge mode and the like.

[0007] Furthermore, it is an object of the present disclosure to provide a method of signaling information that can enable a compilation tool based on template matching.

[0008] Furthermore, an object of the present disclosure is to provide a relationship between compilation tool enabling information based on template matching.

[0009] Furthermore, an object of the present disclosure is to provide a non-transitory recording medium storing a bit stream received, decoded, and used by the image decoding apparatus according to the present disclosure to reconstruct an image.

[0010] Furthermore, an object of the present disclosure is to provide a non-transitory computer-readable medium recording a bit stream received and decoded by an apparatus for decoding an image.

[0011] Furthermore, an object of the present disclosure is to provide a method of transmitting a bit stream generated by the image encoding method according to the present disclosure.

[0012] The technical problems solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described herein will become apparent to those skilled in the art from the following description.

[0013] Technical Solution

[0014] Image decoding according to one aspect of the present disclosure may include determining a prediction mode of a current block, generating a prediction block of the current block based on the prediction mode, and reconstructing the current block based on the prediction block. The prediction mode may be determined according to template matching-based coding tool enabling information.

[0015] According to an embodiment of the present disclosure, the template matching-based compilation tool enabling information may include template matching-based screen content compilation tool enabling information.

[0016] According to an embodiment of the present disclosure, the template matching-based compilation tool enabling information may include intra-block copy enabling information or intra-template matching enabling information.

[0017] According to an embodiment of the present disclosure, the template matching based coding tool enabling information may include template matching based inter coding tool enabling information.

[0018] According to an embodiment of the present disclosure, template matching-based compilation tool enabling information may include at least one of OBMC enabling information, ARMC enabling information, AMVP enabling information, merge enabling information, GPM enabling information, TMVP non-adjacent reordering enabling information, MVD symbol prediction enabling information, MMVD affine enabling information, GPM partitioning mode reordering enabling information, or reference picture reordering enabling information.

[0019] According to an embodiment of the present disclosure, the template matching based coding tool enabling information may include template matching based intra coding tool enabling information.

[0020] According to an embodiment of the present disclosure, the template matching based compilation tool enable information may include at least one of intra block copy enable information, intra template matching enable information, intra mode derivation enable information, or CIIP enable information.

[0021] According to an embodiment of the present disclosure, template matching-based compilation tool enabling information may be obtained from a bitstream.

[0022] According to an embodiment of the present disclosure, template matching-based coding tool enabling information may be included in one of a video parameter set, a sequence parameter set, a picture parameter set, a slice header, or a picture header.

[0023] According to an aspect of the present disclosure, an image encoding method may include determining a prediction mode of a current block, generating a prediction block of the current block based on the prediction mode, and reconstructing the current block based on the prediction block. The prediction mode may be determined according to template matching-based coding tool enabling information.

[0024] According to an embodiment of the present disclosure, template matching-based compilation tool enabling information may be encoded in a bitstream.

[0025] A method for transmitting a bitstream according to an aspect of the present disclosure may include transmitting a bitstream generated by an image coding method. The image coding method may include determining a prediction mode of a current block, generating a prediction block of the current block based on the prediction mode, and reconstructing the current block based on the prediction block. The prediction mode may be determined based on template matching-based compilation tool enabling information.

[0026] A computer-readable recording medium according to another aspect of the present disclosure can store a bit stream generated by the image encoding method or apparatus of the present disclosure.

[0027] A transmission method according to another aspect of the present disclosure can transmit a bit stream generated by the image encoding method or apparatus of the present disclosure.

[0028] The features briefly summarized above with respect to the present disclosure are merely exemplary aspects of the following detailed description of the present disclosure and do not limit the scope of the present disclosure.

[0029] Beneficial Effects

[0030] According to the present disclosure, it is possible to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.

[0031] Furthermore, according to the present disclosure, it is possible to provide a method of performing prediction using a prediction mode based on template matching including a template matching merge mode and the like.

[0032] Furthermore, according to the present disclosure, it is possible to provide a method of independently processing a technique based on template matching.

[0033] Furthermore, according to the present disclosure, a method of signaling information that can enable a template matching-based compilation tool can be provided.

[0034] Furthermore, according to the present disclosure, it is possible to provide a relationship between compilation tool enabling information based on template matching.

[0035] Furthermore, according to the present disclosure, it is possible to provide a non-transitory recording medium storing a bit stream generated by an image encoding method.

[0036] Furthermore, according to the present disclosure, it is possible to provide a non-transitory recording medium storing a bit stream received, decoded, and used by the image decoding device according to the present disclosure to reconstruct an image.

[0037] Furthermore, according to the present disclosure, it is possible to provide a method for transmitting a bit stream generated by an image encoding method.

[0038] Those skilled in the art will appreciate that the effects that can be achieved by the present disclosure are not limited to what has been specifically described above, and other advantages of the present disclosure will be more clearly understood from the detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a diagram schematically showing a video coding system to which an embodiment of the present disclosure is applicable.

[0040] Figure 2 is a view schematically showing an image encoding device to which an embodiment of the present disclosure is applied.

[0041] Figure 3 is a view schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.

[0042] Figure 4 is a diagram schematically showing an inter-frame prediction unit of an image encoding device.

[0043] Figure 5 is a flow chart illustrating a method of encoding an image based on inter-frame prediction.

[0044] Figure 6 is a diagram schematically showing an inter-frame prediction unit of an image decoding device.

[0045] Figure 7 is a flow chart illustrating a method of decoding an image based on inter-frame prediction.

[0046] Figure 8 is a flowchart showing an inter-frame prediction method.

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

[0048] Fig.10 is an exemplary diagram illustrating multi-pass decoder-side motion vector refinement (DMVR) according to the present disclosure.

[0049] Fig.11 is a flowchart illustrating an image encoding / decoding method according to an embodiment of the present disclosure.

[0050] Fig.12 is a diagram showing a content streaming system to which an embodiment of the present disclosure is applicable. DETAILED DESCRIPTION

[0051] Hereinafter, the embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to facilitate implementation by those skilled in the art. However, the present disclosure can be implemented in various forms and is not limited to the embodiments described herein.

[0052] When describing the present disclosure, if it is determined that the detailed description of related known functions or configurations makes the scope of the present disclosure unnecessarily ambiguous, the detailed description thereof will be omitted. In the drawings, parts irrelevant to the description of the present disclosure are omitted, and like reference numerals are given to like parts.

[0053] In the present disclosure, when a component is "connected", "coupled" or "linked" to another component, it may include not only a direct connection relationship but also an indirect connection relationship with intermediate components. In addition, when a component "includes" or "has" other components, unless otherwise specified, it means that other components may also be included, rather than excluding other components.

[0054] In the present disclosure, the terms first, second, etc. are used only for the purpose of distinguishing one component from other components, and do not limit the order or importance of the components unless otherwise specified. Accordingly, within the scope of the present 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.

[0055] In the present disclosure, components that are distinguished from each other are intended to clearly describe each feature and do not mean that the components must be separated. That is, multiple components can be integrated and implemented in one hardware or software unit, or one component can be distributed and implemented in multiple hardware or software units. Therefore, even if not specifically stated, implementations in which these components are integrated or distributed are also included in the scope of the present disclosure.

[0056] In the present disclosure, the components described in each embodiment are not necessarily indispensable components, and some components may be optional components. Therefore, the embodiments consisting of a subset of the components described in the embodiments are also included in the scope of the present disclosure. In addition, the embodiments including other components in addition to the components described in the various embodiments are included in the scope of the present disclosure.

[0057] The present disclosure relates to encoding and decoding of images. Unless otherwise defined in the present disclosure, terms used in the present disclosure may have general meanings commonly used in the technical field to which the present disclosure belongs.

[0058] In the present disclosure, "picture" generally means a basis for representing an image in a specific time period, and a slice / tile is a coding basis constituting a part of a picture. A picture may be composed of one or more slices / tiles. In addition, a slice / tile may include one or more coding tree units (CTUs).

[0059] In the present disclosure, "pixel" or "pel" may mean the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, or may represent only a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component.

[0060] In the present disclosure, a "unit" may refer to a basic unit of image processing. A unit may include at least one of a specific area of ​​a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., Cb, Cr) blocks. In some cases, a unit may be used interchangeably with terms such as "sample array", "block" or "area". In general, an M×N block may include M columns and N rows of samples (sample array) or a set (or array) of transform coefficients.

[0061] In the present disclosure, "current block" may mean one of "current coding block", "current coding unit", "coding target block", "decoding target block", or "processing target block". When prediction is performed, "current block" may mean "current prediction block" or "prediction target block". When transform (inverse transform) / quantization (dequantization) is performed, "current block" may mean "current transform block" or "transform target block". When filtering is performed, "current block" may mean "filtering target block".

[0062] Furthermore, in the present disclosure, unless explicitly stated as a chroma block, a “current block” may mean a block including both a luma component block and a chroma component block or a “luma block of the current block”. The luma component block of the current block may be expressed by including an explicit description of the luma component block such as “luma block” or “current luma block”. The chroma block of the current block may be expressed by including an explicit description of the chroma component block such as “chroma block” or “current chroma block”.

[0063] In the present disclosure, the terms " / " and "," should be interpreted as indicating "and / or". For example, the expressions "A / B" and "A, B" may mean "A and / or B". In addition, "A / B / C" and "A, B, C" may mean "at least one of A, B and / or C".

[0064] In the present disclosure, the term "or" should be interpreted as indicating "and / or". For example, the expression "A or B" may include 1) "only A", 2) "only B", and / or 3) "both A and B". In other words, in the present disclosure, the term "or" should be interpreted as indicating "in addition or alternatively".

[0065] Overview of video compilation system

[0066] Figure 1is a view schematically showing a video coding system to which embodiments of the present disclosure are applicable.

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

[0068] The encoding device 10 according to the embodiment may include a video source generator 11, an encoding unit (encoder) 12, and a transmitter 13. The decoding device 20 according to the embodiment may include a receiver 21, a decoding unit (decoder) 22, and a renderer 23. The encoding unit 12 may be referred to as a video / image encoding device, and the decoding unit 22 may be referred to as a video / image decoding device. The transmitter 13 may be included in the encoding unit 12. The receiver 21 may be included in the decoding unit 22. The renderer 23 may include a display, and the display may be configured as a separate device or an external component.

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

[0070] The encoding unit 12 can encode the input video / image. The encoding unit 12 can perform a series of processes such as prediction, transformation and quantization for compression and coding efficiency. The encoding unit 12 can output the encoded data (encoded video / image information) in the form of a bit stream.

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

[0072] The decoding unit 22 may decode the video / image by performing a series of processes such as inverse quantization, inverse transformation, and prediction corresponding to the operations of the encoding unit 12 .

[0073] The renderer 23 can render the decoded video / image. The rendered video / image can be displayed on a display.

[0074] Overview of Image Coding Equipment

[0075] Figure 2 is a view schematically showing an image encoding device to which an embodiment of the present disclosure is applicable.

[0076] like Figure 2 As shown, the image encoding device 100 may include an image segmenter 110, a subtractor 115, a transformer 120, a quantizer 130, a dequantizer 140, an inverse transformer 150, an adder 155, a filter 160, a memory 170, an inter-frame prediction unit 180, an intra-frame prediction unit 185, and an entropy encoder 190. The inter-frame prediction unit 180 and the intra-frame prediction unit 185 may be collectively referred to as a "prediction unit". The transformer 120, the quantizer 130, the dequantizer 140, and the inverse transformer 150 may be included in a residual processor. The residual processor may also include a subtractor 115.

[0077] In some embodiments, all or at least some of the components configuring the image encoding apparatus 100 may be configured by one hardware component (eg, an encoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) and may be configured by a digital storage medium.

[0078] The image divider 110 may divide the input image (or picture or frame) input to the image encoding device 100 into one or more processing units. For example, the processing unit may be referred to as a coding unit (CU). The coding unit may be obtained by recursively dividing a coding tree unit (CTU) or a maximum coding unit (LCU) according to a quadtree binary tree ternary tree (QT / BT / TT) structure. For example, a coding unit may be divided into a plurality of coding units of a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For the division of the coding unit, the quadtree structure may be applied first, and then the binary tree structure and / or the ternary tree structure may be applied. The coding process according to the present disclosure may be performed based on the final coding unit that is no longer divided. The maximum coding unit may be used as the final coding unit, and the coding unit of a deeper depth obtained by dividing the maximum coding unit may also be used as the final coding unit. Here, the coding process may include the prediction, transformation, and reconstruction processes described later. As another example, the processing unit of the coding process may be a prediction unit (PU) or a transformation unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit. The prediction unit may be a sample prediction unit, and the transform unit may be a unit for deriving a transform coefficient and / or a unit for deriving a residual signal from the transform coefficient.

[0079] The prediction unit (inter prediction unit 180 or intra prediction unit 185) may perform prediction on the block to be processed (current block) and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction based on the current block or CU. The prediction unit may generate various information related to the prediction of the current block and send the generated information to the entropy encoder 190. The information about the prediction may be encoded in the entropy encoder 190 and output in the form of a bitstream.

[0080] The intra prediction unit (intra predictor) 185 can predict the current block by referring to samples in the current picture. Depending on the intra prediction mode and / or intra prediction technology, the reference samples may be located in the neighborhood of the current block or may be placed separately. The intra prediction mode may include multiple non-directional modes and multiple directional modes. The non-directional mode may include, for example, a DC mode and a plane mode. Depending on the level of detail of the prediction direction, the directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes. However, this is only an example, and more or fewer directional prediction modes may be used depending on the setting. The intra prediction unit 185 may determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0081] The inter prediction unit (inter predictor) 180 may derive a prediction block of the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be referred to as a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block may be referred to as a collocated picture (colPic). For example, the inter prediction unit 180 may configure a motion information candidate list based on the neighboring blocks and generate information specifying 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. For example, in the case of skip mode and merge mode, the inter prediction unit 180 may use motion information of a neighboring block as motion information of a current block. In the case of skip mode, unlike merge mode, a residual signal may not be sent. In the case of motion vector prediction (MVP) mode, a motion vector of a neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be signaled by encoding a motion vector difference and an indicator of the motion vector predictor. The motion vector difference may mean the difference between the motion vector of the current block and the motion vector predictor.

[0082] The prediction unit may generate a prediction signal based on various prediction methods and prediction techniques described below. For example, the prediction unit may apply not only intra prediction or inter prediction, but also intra prediction and inter prediction simultaneously to predict the current block. The prediction method of applying both intra prediction and inter prediction to predict the current block may be referred to as combined inter and intra prediction (CIIP). In addition, the prediction unit may perform intra block copying (IBC) to predict the current block. Intra block copying may be used for content image / video coding of games, etc., such as screen content coding (SCC). IBC is a method of predicting the current picture using a previously reconstructed reference block in the current picture at a predetermined distance from the current block. When IBC is applied, the position of the reference block in the current picture may be encoded as a vector (block vector) corresponding to a predetermined distance. IBC basically performs prediction in the current picture, but may be performed similarly to inter prediction because the reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described in the present disclosure.

[0083] The prediction signal generated by the prediction unit can be used to generate a reconstruction signal or to generate a residual signal. The subtractor 115 can generate a residual signal (residual block or residual sample array) by subtracting the prediction signal (prediction block or prediction sample array) output from the prediction unit from the input image signal (original block or original sample array). The generated residual signal can be sent to the transformer 120.

[0084] The transformer 120 may generate a transform coefficient by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a karhunen-loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, GBT refers to a transform obtained from a graph when relationship information between pixels is represented by a graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to square pixel blocks of the same size or may be applied to blocks of variable size instead of square.

[0085] The quantizer 130 may quantize the transform coefficients and send them to the entropy encoder 190. The entropy encoder 190 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 130 may rearrange the quantized transform coefficients of the block type into a one-dimensional vector form based on the coefficient scanning order, and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form.

[0086] The entropy encoder 190 may perform various encoding methods, such as exponential Golomb, context adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), etc. The entropy encoder 190 may encode information required for video / image reconstruction other than quantized transform coefficients together or separately (e.g., values ​​of syntax elements, etc.). The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of a network abstraction layer (NAL) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptive 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 also include general constraint information. The signaled information, transmitted information, and / or syntax elements described in the present disclosure may be encoded and included in a bitstream through the above-described encoding process.

[0087] The bit stream may be transmitted through a network or may be stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits a signal output from the entropy encoder 190 and / or a storage unit (not shown) that stores the signal may be included as an internal / external element of the image encoding device 100. Alternatively, a transmitter may be provided as a component of the entropy encoder 190.

[0088] The quantized transform coefficients output from the quantizer 130 may be used to generate a residual signal. For example, the residual signal (residual block or residual sample) may be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients through the inverse quantizer 140 and the inverse transformer 150.

[0089] The adder 155 adds the reconstructed residual signal to the prediction signal output from the inter-frame prediction unit 180 or the intra-frame prediction unit 185 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If the block to be processed has no residual, such as when the skip mode is applied, the prediction block can be used as a reconstructed block. The adder 155 can be called a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.

[0090] The filter 160 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 160 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture, and store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filtering, bilateral filtering, etc. The filter 160 can generate various information related to filtering and transmit the generated information to the entropy encoder 190, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 190 and output in the form of a bit stream.

[0091] The modified reconstructed picture transmitted to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied by the image encoding apparatus 100, prediction mismatch between the image encoding apparatus 100 and the image decoding apparatus may be avoided and encoding efficiency may be improved.

[0092] The DPB of the memory 170 may store the modified reconstructed picture for use as a reference picture in the inter-frame prediction unit 180. The memory 170 may store the motion information of the block from which the motion information in the current picture is derived (or encoded) and / or the motion information of the reconstructed block in the picture. The stored motion information may be transmitted to the inter-frame prediction unit 180 and used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 170 may store the reconstructed samples of the reconstructed blocks in the current picture and may transmit the reconstructed samples to the intra-frame prediction unit 185.

[0093] Overview of Image Decoding Equipment

[0094] Figure 3 is a view schematically showing an image decoding device to which an embodiment of the present disclosure is applicable.

[0095] like Figure 3 As shown, the image decoding device 200 may include an entropy decoder 210, an inverse quantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame predictor 260, and an intra-frame predictor 265. The inter-frame predictor (inter-frame prediction unit) 260 and the intra-frame predictor (intra-frame prediction unit) 265 may be collectively referred to as a "prediction unit (predictor)". The inverse quantizer 220 and the inverse transformer 230 may be included in a residual processor.

[0096] According to an embodiment, all or at least some of the plurality of components configuring the image decoding apparatus 200 may be configured by hardware components (eg, a decoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium.

[0097] The image decoding device 200 having received a bit stream including video / image information may perform the same Figure 2 The image may be reconstructed by processing corresponding to the processing performed by the image encoding device 100. For example, the image decoding device 200 may perform decoding using a processing unit applied in the image encoding device. Therefore, the processing unit of decoding may be, for example, a coding unit. The coding unit may be obtained by splitting the coding tree unit or the maximum coding unit. The reconstructed image signal decoded and output by the image decoding device 200 may be reproduced by a reproduction device (not shown).

[0098] The image decoding device 200 may receive the image in the form of a bit stream from Figure 2The received signal may be decoded by the entropy decoder 210. For example, the entropy decoder 210 may parse the bitstream to derive information (e.g., video / image information) required for image reconstruction (or picture reconstruction). The video / image information may also include information about various parameter sets, such as an adaptive 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 also include general constraint information. The image decoding device may also decode the picture based on the information about the parameter set and / or the general constraint information. The information and / or syntax elements signaled / received described in the present disclosure may be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 210 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs the values ​​of the syntax elements required for image reconstruction and the quantized values ​​of the transform coefficients of the residual. More specifically, the CABAC entropy decoding method may receive a bin corresponding to each syntax element in a bitstream, use information of a decoding target syntax element, information of a neighboring block and a decoding target block, or information of a symbol / bin decoded at a previous stage to determine a context model, perform arithmetic decoding on the bin by predicting the probability of occurrence of the bin according to the determined context model, and generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model by using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information related to prediction in the information decoded by the entropy decoder 210 may be provided to the prediction unit (inter-frame predictor 260 and intra-frame predictor 265), and the residual value for which entropy decoding is performed in the entropy decoder 210, that is, the quantized transform coefficient and related parameter information may be input to the inverse quantizer 220. In addition, information about filtering in the information decoded by the entropy decoder 210 may be provided to the filter 240. In addition, a receiver (not shown) for receiving a signal output from the image encoding apparatus may be further configured as an internal / external element of the image decoding apparatus 200 , or the receiver may be a component of the entropy decoder 210 .

[0099] In addition, the image decoding device according to the present disclosure may be referred to as a video / image / picture decoding device. The image decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include an entropy decoder 210. The sample decoder may include at least one of an inverse quantizer 220, an inverse transformer 230, an adder 235, a filter 240, a memory 250, an inter-frame predictor 260, or an intra-frame prediction unit 265.

[0100] The inverse quantizer 220 may dequantize the quantized transform coefficients and output the transform coefficients. The inverse quantizer 220 may rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement may be performed based on a coefficient scanning order performed in an image encoding device. The inverse quantizer 220 may dequantize the quantized transform coefficients by using a quantization parameter (e.g., quantization step size information) and obtain the transform coefficients.

[0101] The inverse transformer 230 may inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).

[0102] The prediction unit may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The prediction unit may determine whether to apply intra prediction or inter prediction to the current block based on the information about prediction output from the entropy decoder 210, and may determine a specific intra / inter prediction mode (prediction technique).

[0103] The same as described in the prediction unit of the image encoding device 100 , the prediction unit can generate a prediction signal based on various prediction methods (techniques) described later.

[0104] The intra predictor 265 may predict the current block by referring to samples in the current picture. The description of the intra prediction unit 185 is also applicable to the intra predictor 265.

[0105] The inter-frame predictor 260 can derive the prediction block of the current block based on the reference block (reference sample array) specified by the motion vector on the reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter-frame prediction mode, the motion information can be predicted in units of blocks, sub-blocks or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter-frame predictor 260 may configure 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-frame prediction may be performed based on various prediction modes, and information about the prediction may include information specifying the inter-frame prediction mode of the current block.

[0106] The adder 235 can generate a reconstruction signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-frame predictor 260 and / or the intra-frame predictor 265). If the block to be processed has no residual (for example, when the skip mode is applied), the prediction block can be used as the reconstructed block. The description of the adder 155 is also applicable to the adder 235. The adder 235 can be called a reconstructor or a reconstructed block generator. The generated reconstruction signal can be used for intra-frame prediction of the next block to be processed in the current picture, and can be used for inter-frame prediction of the next picture by filtering as described below.

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

[0108] The (modified) reconstructed picture stored in the DPB of the memory 250 can be used as a reference picture in the inter-frame predictor 260. The memory 250 can store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information can be transmitted to the inter-frame predictor 260 to be used as the motion information of the spatial neighboring block or the motion information of the temporal neighboring block. The memory 250 can store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame predictor 265.

[0109] In the present disclosure, the embodiments described in the filter 160, the inter-frame prediction unit 180 and the intra-frame prediction unit 185 of the image encoding device 100 can be equally or correspondingly applied to the filter 240, the inter-frame predictor 260 and the intra-frame predictor 265 of the image decoding device 200.

[0110] Inter prediction

[0111] The prediction unit of the image encoding device 100 / image decoding device 200 may derive prediction samples by performing inter-frame prediction on a per-block basis. Inter-frame prediction may be a prediction derived in a manner based on data elements (e.g., sample values ​​or motion information) of a picture other than the current picture. When inter-frame prediction is applied to the current block, the prediction block (prediction sample array) of the current block may be derived based on a reference block (reference sample array) specified by a motion vector on a reference picture indicated by a reference picture index. Here, in order to reduce the amount of motion information sent in the inter-frame prediction mode, the motion information of the current block may be predicted on a per-block, sub-block or sample basis based on the motion information correlation between the neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may also include inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter-frame 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 may be the same as or different from the reference picture including the temporal neighboring block. A temporally neighboring block may be referred to as a collocated reference block or collocated CU (colCU). A reference picture including a temporally neighboring block may be referred to as a collocated picture (colPic). For example, a motion information candidate list may be constructed based on neighboring blocks of the current block. A flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled. Inter-frame prediction may be performed based on various prediction modes. 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 merge mode, a residual signal may not be sent. In the case of motion information prediction (motion vector prediction (MVP)) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and the motion vector 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.

[0112] According to the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), the motion information may include L0 motion information and / or L1 motion information. The motion vector in the L0 direction may be referred to as the L0 motion vector or MVL0, and the motion vector in the L1 direction may be referred to as the L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as L0 prediction. Prediction based on the L1 motion vector may be referred to as L1 prediction. Prediction based on both the L0 motion vector and the L1 motion vector may be referred to as bidirectional prediction. Here, the L0 motion vector may refer to a motion vector associated with the reference picture list L0 (L0), and the L1 motion vector may refer to a motion vector associated with the reference picture list L1 (L1). The reference picture list L0 may include a picture before the current picture in output order as a reference picture. The reference picture list L1 may include a picture after the current picture in output order. The previous picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. The reference picture list L0 may also include a picture after the current picture in output order as a reference picture. In this case, within the reference picture list L0, the previous picture may be indexed first, and the next picture may be indexed next. The reference picture list L1 may also include pictures that are before the current picture in output order as reference pictures. In this case, within the reference picture list 1, the next picture may be indexed first, and the previous picture may be indexed next. Here, the output order may correspond to a picture order count (POC) order.

[0113] Figure 4 is a diagram schematically showing the inter-frame prediction unit 180 of the image encoding device 100, and Figure 5 is a flowchart illustrating a method for encoding an image based on inter-frame prediction.

[0114] The encoding device may perform inter prediction on the current block (S510). The image encoding device 100 may derive an inter prediction mode and motion information of the current block, and may generate a prediction sample of the current block. In this article, the processes of determining the intra prediction mode, deriving motion information, and generating prediction samples may be performed simultaneously, or any one process may be performed before the other processes. For example, the inter prediction unit 180 of the image 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 a prediction mode for the current block. The motion information derivation unit 182 may derive motion information of the current block. The prediction sample derivation unit 183 may derive a prediction sample of the current block. For example, the inter prediction unit 180 of the image encoding device 100 may search a predetermined area (search area) of a reference picture for a block similar to the current block through motion estimation, and may derive a reference block having the smallest difference with the current block or less than or equal to a predetermined standard. Based on this, a reference picture index indicating a reference picture where a reference block is located can be derived, and a motion vector can be derived based on a position difference between the reference block and the current block. The image encoding apparatus 100 can determine a mode applied to the current block among various prediction modes. The image encoding apparatus 100 can compare the RD costs of various prediction modes and can determine the best prediction mode for the current block.

[0115] For example, when the skip mode or merge mode is applied to the current block, the image encoding device 100 may construct a merge candidate list described later, and may derive a reference block having the smallest difference from the current block or less than or equal to a predetermined standard among the reference blocks indicated by the merge candidates included in the merge candidate list. In this case, a merge candidate associated with the derived reference block may be selected, and merge index information indicating the selected merge candidate may be generated and signaled to the decoding device. The motion information of the selected merge candidate may be used to derive the motion information of the current block.

[0116] As another example, when the (A) MVP mode is applied to the current block, the image encoding device 100 may construct a (A) MVP candidate list described later, and may use a motion vector of an MVP candidate selected from among the MVP candidates included in the (A) MVP candidate list as a motion vector predictor (MVP) of the current block. In this case, for example, a motion vector indicating a reference block derived by the above-mentioned motion estimation may be used as the motion vector of the current block. Among the MVP candidates, an MVP candidate having a motion vector with the smallest difference from the motion vector of the current block may be the selected MVP candidate. A motion vector difference (MVD) as a difference value 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 image decoding device 200. In addition, when the (A) MVP mode is applied, a value of a reference picture index may be constructed as reference picture index information and may be signaled to the image decoding device 200 separately.

[0117] The image encoding apparatus 100 may induce residual samples based on the prediction samples (S520). The image encoding apparatus 100 may compare the prediction samples of the current block with the original samples to induce the residual samples.

[0118] The image encoding device 100 may encode the image information including prediction information and residual information (S530). The image encoding device 100 is capable of outputting the encoded image information in the form of a bitstream. The prediction information is an information item related to the prediction process, and may include prediction mode information (e.g., a skip flag, a merge flag, or a mode index) and information about motion information. The information about the motion information may include candidate selection information (e.g., a merge index, an mvp flag, or an mvp index) as information for deriving a motion vector. In addition, the information about the motion information may include the above-mentioned information about the 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 bidirectional prediction is applied. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficients of the residual sample.

[0119] The output bit stream may be stored in a (digital) storage medium and transmitted to the decoding device, or may be transmitted to the image decoding device 200 via a network.

[0120] In addition, as described above, the image encoding device 100 can generate a reconstructed picture (including a reconstructed sample and a reconstructed block) based on the reference sample and the residual sample. This is to derive the same prediction result as the prediction result performed in the image decoding device 200 by the image encoding device 100, and accordingly, the coding efficiency can be improved. Therefore, the image encoding device 100 can store the reconstructed picture (or reconstructed sample, reconstructed block) in a memory, and can use it as a reference picture for inter-frame prediction. As described above, a loop filtering process can also be applied to the reconstructed picture.

[0121] Figure 6 is a diagram schematically showing an inter-frame predictor 260 of the image decoding apparatus 200, and Figure 7 is a flow chart showing a method of decoding an image based on inter-frame prediction.

[0122] The image decoding apparatus 200 may perform an operation corresponding to the operation performed by the image encoding apparatus 100. The image decoding apparatus 200 may perform prediction on the current block based on the received prediction information, and may derive a prediction sample.

[0123] Specifically, the image decoding apparatus 200 may determine a prediction mode for a current block based on the received prediction information (S710). The image decoding apparatus 200 may determine which inter prediction mode to apply to the current block based on prediction mode information in the prediction information.

[0124] For example, based on the merge flag, it can be determined whether to apply the merge mode to the current block or determine the (A) MVP mode. Alternatively, one of various inter-frame prediction mode candidates can be selected based on the mode index. The inter-frame prediction mode candidate may include a skip mode, a merge mode, and / or an (A) MVP mode, or may include various inter-frame prediction modes described later.

[0125] The image decoding device 200 may derive motion information of the current block based on the determined inter-frame prediction mode (S720). For example, when the skip mode or merge mode is applied to the current block, the image decoding device 200 may construct a merge candidate list described later, and may select a merge candidate from the merge candidates included in the merge candidate list. The selection may be performed based on the above-mentioned selection information (merge index). The motion information of the selected merge candidate may be used to derive the motion information of the current block. The motion information of the selected merge candidate may be used as the motion information of the current block.

[0126] As another example, when the (A) MVP mode is applied to the current block, the image decoding device 200 may construct a (A) MVP candidate list described later, and may use the motion vector of the MVP candidate selected from among the MVP candidates included in the (A) MVP candidate list as the motion vector predictor (MVP) of the current block. The selection may be performed based on the above-mentioned selection information (MVP flag or MVP index). In this case, the MVD of the current block may be derived based on the information about the MVD, and the motion vector of the current block may be derived based on the MVP and MVD of the current block. In addition, the reference picture index of the current block may be derived based on the reference picture index information. The picture indicated by the reference picture index in the reference picture list related to the current block may be derived as the reference picture referenced by the inter-frame prediction of the current block.

[0127] In addition, as will be described later, the motion information of the current block can be derived without constructing a candidate list. In this case, the motion information of the current block can be derived according to the process described in the prediction mode described later. In this case, the candidate list configuration as described above can be omitted.

[0128] The image decoding apparatus 200 may generate a prediction sample of the current block based on the motion information of the current block (S730). In this case, a reference picture may be derived based on a reference picture index of the current block, and a sample of the reference block indicated on the reference picture by a motion vector of the current block may be used to derive the prediction sample of the current block. In this case, as described later, in some cases, a prediction sample filtering process may be further performed on all or some prediction samples of the current block.

[0129] For example, the inter-frame predictor 260 of the image decoding device 200 may include a prediction mode determination unit 261, a motion information derivation unit 262, and a prediction sample derivation unit 263. The prediction mode determination unit 181 may determine the prediction mode of the current block based on the received prediction mode information. The motion information derivation unit 182 may derive motion information (motion vector and / or reference picture index) of the current block based on the received information about motion information. The prediction sample derivation unit 183 may derive the prediction sample of the current block.

[0130] The image decoding device 200 may generate a residual sample of the current block based on the received residual information (S740). The image decoding device 200 may generate a reconstructed sample of the current block based on the predicted sample and the residual sample, and may generate a reconstructed picture based thereon (S750). Thereafter, as described above, a loop filtering process may be further applied to the reconstructed picture.

[0131] refer to Figure 8The inter prediction process may include the steps of determining an inter prediction mode (S810), deriving motion information according to the determined prediction mode (S820), and performing prediction (generating prediction samples) based on the derived motion information (S830). The inter prediction process may be performed in the image encoding apparatus 100 and the image decoding apparatus 200 as described above.

[0132] Inter prediction mode determination

[0133] Various inter prediction modes can be used to predict the current block in the picture. For example, various modes such as merge mode, skip mode, motion vector prediction (MVP) mode, affine mode, sub-block merge mode, and merge with MVD (MMVD) mode can be used. Decoder-side motion vector refinement (DMVR) mode, adaptive motion vector resolution (AMVR) mode, bidirectional prediction (BCW) with CU-level weights, bidirectional optical flow (BDOF), etc. can also be used as additional modes in addition or alternatively. Affine mode can be referred to as affine motion prediction mode. MVP mode can be referred to as advanced motion vector prediction (AMVP) mode. In this document, some modes and / or motion information candidates derived from some modes can be included as one of the motion information candidates of other modes. For example, an HMVP candidate can be added as a merge candidate in merge / skip mode, or can be added as an MVP candidate in MVP mode.

[0134] Prediction mode information indicating an inter prediction mode of a current block may be signaled from the image encoding device 100 to the image decoding device 200. The prediction mode information may be included in a bitstream and received by the image 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 by hierarchical signaling of flag information. In this case, the prediction mode information may include one or more flags. For example, a skip flag may be signaled to indicate whether a skip mode is applied, and if the skip mode is not applied, a merge flag may be signaled to indicate whether a merge mode is applied, and if the merge mode is not applied, an MVP mode may be indicated to be applied or a flag for an additional category may be further signaled. The affine mode may be signaled in an independent mode or may be signaled in a mode according to a merge mode or an MVP mode. For example, the affine mode may include an affine merge mode and an affine MVP mode.

[0135] Derivation of motion information

[0136] Inter-frame prediction can be performed using the motion information of the current block. The image encoding device 100 can derive the best motion information for the current block through a motion estimation process. For example, the image encoding device 100 can use the original block in the original picture for the current block to search for a similar reference block with high correlation in units of fractional pixels within a predetermined search range in the reference picture, thereby deriving motion information. The similarity of the blocks can be derived based on the difference in sample values ​​based on the phase. For example, the similarity of the 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, the motion information can be derived based on the reference block with the smallest SAD in the search area. The derived motion information can be sent to the image decoding device 200 using a signal according to various methods based on the inter-frame prediction mode.

[0137] Generation of prediction samples

[0138] A prediction block for the current block may be derived based on motion information derived according to a prediction mode. The prediction block may include prediction samples (prediction sample arrays) of the current block. When the motion vector of the current block indicates a fractional sample unit, an interpolation process may be performed, by which the prediction samples of the current block may be derived based on reference samples in the fractional sample unit within the reference picture. When affine inter prediction is applied to the current block, prediction samples may be generated based on sample / sub-block units MV. When bidirectional prediction is applied, prediction samples derived by weighting or weighted averaging (according to phase) prediction samples derived based on L0 prediction (that is, prediction using a reference picture and MVL0 in a reference picture list L0) and prediction samples derived based on L1 prediction (that is, prediction using a reference picture and MVL1 in a reference picture list L1) may be used as prediction samples of the current block. When bidirectional prediction is applied, if the reference picture for L0 prediction and the reference picture for L1 prediction are located in different temporal directions relative to the current picture (i.e., bi-prediction and bi-prediction), it may be referred to as true bi-directional prediction.

[0139] As described above, reconstructed samples and reconstructed pictures may be generated based on the derived prediction samples, and thereafter, processes such as in-loop filtering may be performed.

[0140] Template Matching (TM)

[0141] Fig. 9 2 is a diagram for explaining an encoding / decoding method based on template matching according to the present disclosure.

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

[0143] like Fig. 9 As shown, when the initial motion vector of the current block is derived, a better search for the motion vector can be performed in the surrounding area of ​​the initial motion vector. For example, the range of the surrounding area where the search is performed can be within the [-8, +8] pixel search area centered on the initial motion vector. In addition, the size of the search step used to perform the search can be determined based on the AMVR mode of the current block. In addition, template matching can be performed continuously with the bilateral matching process in the merge mode.

[0144] If the prediction mode of the current block is the 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 the reference template may be selected. Afterwards, template matching for refining the motion vector may be performed on the selected motion vector predictor candidate. At this time, template matching for refining the motion vector may not be performed on the unselected motion vector predictor candidate.

[0145] More specifically, the refinement of the selected motion vector predictor candidate can start with full pixel (whole pixel) accuracy within the [-8, +8] pixel search area using an iterative diamond search. Alternatively, in the case of a 4-pixel AMVR mode, it can start with 4-pixel accuracy. Afterwards, a search with half-pixel accuracy and / or quarter-pixel accuracy can follow depending on the AMVR mode. Depending on 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. During the iterative search process, if the difference between the previous minimum cost and the current minimum cost is less than an arbitrary threshold, the search process terminates. The threshold can be equal to the area of ​​the block, i.e., the number of samples in the block. Table 1 shows an example of a search pattern according to the AMVR mode and the merge mode accompanying the AMVR.

[0146] [Table 1]

[0147]

[0148] If the prediction mode of the current block is the 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 until 1 / 8 pixel accuracy or half pixel accuracy or lower pixel accuracy can be skipped, which can be determined based on whether an alternative interpolation filter is used based on the merged motion information. In this case, the alternative interpolation filter can be a filter used when the AMVR is in half pixel mode. In addition, if template matching is available, depending on whether bilateral matching (BM) is available, template matching can be run as an independent process, or it can be run as an additional motion vector refinement process between block-based bilateral matching and sub-block-based bilateral matching. Whether template matching is available and / or whether bilateral matching is available can be determined based on an availability condition check. In the above, the accuracy of the motion vector may refer to the accuracy of the motion vector difference (MVD).

[0149] Multi-pass decoder-side motion vector refinement

[0150] When applying multiple passes of decoder-side motion vector refinement, bilateral matching (BM) may be applied to the coding block in the first pass. In the second pass, BM may be applied to each 16×16 sub-block in the coding block. In the third pass, the MV of each 8×8 sub-block may be refined by applying bidirectional optical flow (BDOF). The refined MV may be stored for both spatial motion vector prediction and temporal motion vector prediction.

[0151] First pass - Block-based bilateral matching MV refinement

[0152] In the first pass, a refined MV can be derived by applying BM to the coding block. Similar to decoder-side motion vector refinement (DMVR), in bidirectional prediction, a refined MV can be searched around two initial MVs MV0 and MV1 of reference picture lists L0 and L1. Refined MVs MV0_pass0 and MV1_pass1 can be searched around the initial MV based on the minimum bilateral matching cost between the two reference blocks of L0 and L1.

[0153] In order to derive integer sample precision intDeltaMV during BM, a local search may be performed. The local search may be looped within a search range [-sHor, sHor] in the horizontal direction and a search range [-sVer, sVer] in the vertical direction by applying a 3×3 square search pattern. Here, the values ​​of sHor and sVer may be determined based on the block dimension, and the maximum values ​​of sHor and sVer may be 8.

[0154] The bilateral matching cost can be derived as follows: bilCost = mvDistanceCost + sadCost. When the block size cbW * cbH is greater than 64, the MRSAD cost function can be applied to remove the DC effect of distortion between reference blocks. When the bilCost at the center point of the 3×3 search pattern is the minimum cost, the intDeltaMV local search can be terminated. Otherwise, the current minimum cost search point becomes the new center point of the 3×3 search pattern, and the search for minimum cost can continue until the end of the search range is reached. The existing fractional sample refinement can be further applied to derive the final deltaMV. After the first pass, the refined MV can be derived as follows:

[0155] MV0_pass1 = MV0 + deltaMV

[0156] MV1_pass1 = MV1 – deltaMV

[0157] Second pass: Sub-block based bilateral matching MV refinement

[0158] In the second pass, a refined MV may be derived by applying BM to a 16×16 grid sub-block. In each sub-block, a refined MV may be searched around the two MVs MV0_pass1 and MV1_pass1 obtained in the first pass for reference picture lists L0 and L1. Refined MVs MV0_pass2(sbIdx2) and MV1_pass2(sbIdx2) may be derived based on the minimum bilateral matching cost between the two reference sub-blocks for L0 and L1.

[0159] In each sub-block, a full search may be performed to derive integer sample precision intDeltaMV during BM. The full search may have a search range of [-sHor, sHor] in the horizontal direction and a search range of [-sVer, sVer] in the vertical direction. Here, the values ​​of sHor and sVer may be determined based on the block dimension, and the maximum values ​​of sHor and sVer may be 8.

[0160] The bilateral matching cost can be calculated by applying a cost factor to the SATD cost between two reference blocks: bilCost = satdCost * costFactor. The search area (2*sHor + 1) * (2*sVer + 1) can be divided into Fig.10 Up to five diamond-shaped search areas are shown. Fig.10is a diagram showing search areas that can be applied in multi-pass DMVR (decoder-side motion vector refinement) according to the present disclosure. Each search area is assigned a costFactor determined by the distance intDeltaMV between each search point and the starting MV, and each diamond area can be processed sequentially starting from the center of the search area. In each area, the search points can be processed in a raster scan order starting from the upper left corner of the area to the lower right corner. When the minimum bilCost in the current search area is less than or equal to the threshold of sbW * sbH, the whole pixel full search is terminated, but in the opposite case, the whole pixel search can continue to the next search area until all search points are searched. In addition, if the difference between the previous minimum cost and the current minimum cost in the loop is less than or equal to the threshold of the area of ​​the block, the search process can be terminated.

[0161] The existing VVC DMVR fractional sample refinement can be further applied to derive the final deltaMV (sbIdx2). In the second pass, the refined MV can be derived as follows:

[0162] ·MV0_pass2(sbIdx2) = MV0_pass1 + deltaMV(sbIdx2)

[0163] ·MV1_pass2(sbIdx2) = MV1_pass1 – deltaMV(sbIdx2)

[0164] The third pass: sub-block-based bidirectional optical flow MV refinement

[0165] In the third pass, a refined MV can be derived by applying BDOF to the 8×8 grid sub-block. For each 8×8 grid sub-block, starting from the refined MV of the upper sub-block of the second pass, BDOF refinement can be applied to derive scaled Vx and Vy without clipping. The derived bioMv (Vx, Vy) is rounded to 1 / 16 sample precision and can be clipped to a value between -32 and 32. The refined MVs MV0_pass3 (sbIdx3) and MV1_pass3 (sbIdx3) of the third pass can be derived as follows:

[0166] ·MV0_pass3(sbIdx3) = MV0_pass2(sbIdx2) + bioMv

[0167] ·MV1_pass3(sbIdx3) = MV0_pass2(sbIdx2) – bioMv

[0168] Adaptive decoder-side motion vector refinement

[0169] Adaptive decoder side motion vector refinement technology is an extension of multi-pass DMVR including two new merge modes, which only refine MV in one of the L0 direction or L1 direction of bidirectional prediction for merge candidates that meet DMVR conditions. Multi-pass DMVR process can be applied to the selected merge candidate to refine its motion vector, but MVD0 or MVD1 can be set to 0 in the first pass (i.e., first pass) (i.e., PU level) DMVR. Similar to the conventional merge mode, the merge candidate for the new merge mode can be derived from spatially adjacent coding blocks, TMVP, non-adjacent blocks, HMVP and paired candidates. The only difference is that only items that meet DMVR conditions can be added to the candidate list. The same merge candidate list can be used in two new merge modes. If the BM candidate list includes inherited BCW weights, when the weights are unequal or the bidirectional prediction is weighted by the BCW weights, the DMVR process can remain unchanged except for the distortion calculation generated using MRSAD or MRSATD. The merge index can be compiled as in the conventional merge mode.

[0170] Conventionally, whether the template matching-based motion vector (MV) derivation technique is applied on the decoder side is processed together with whether the multi-pass DMVR-based motion vector derivation technique is applied on the decoder side as a single piece of information (e.g., a sequence parameter set (SPS) flag). However, in a coding layer video sequence (CLVS) supporting low latency or low delay applications, other TM-based image coding / decoding techniques, including template matching (TM)-based motion derivation techniques, may be disabled. In such a case, the single piece of information mentioned above must indicate that such image coding / decoding techniques are disabled, i.e., unavailable. In this process, the following problem may arise: using a single piece of information to indicate that the enabled multi-pass DMVR is disabled at the same time. In other words, because the bilateral match merge flag (bm_merge_flag) depends on the template match merge flag (tm_merge_flag), the conventional method may cause problems. In addition, since template match merging and bilateral match merging cannot be applied simultaneously according to conventional techniques, there is a problem of inefficiently signaling bits because syntax elements are signaled dependently, but there is no dependency on the coding tool.

[0171] In order to solve such a problem, in one embodiment of the present disclosure, it is proposed to use separate information (e.g., separate SPS flags) to process template matching (TM) and multi-pass DMVR respectively. In addition, in one embodiment of the present disclosure, the problem that adaptive decoder-side motion vector derivation is disabled when TM-based motion induction technology is disabled can also be solved.

[0172] Meanwhile, in describing one embodiment of the present disclosure, the prediction mode based on template matching may include template matching merging (mode), and the prediction mode based on bilateral matching may include bilateral matching merging (mode).

[0173] Meanwhile, when explaining an embodiment of the present disclosure, bilateral match merge mode may mean multi-pass DMVR. Meanwhile, when describing an embodiment of the present disclosure, the name and specific syntax of specific information are arbitrarily created and are examples, and are not used to limit the meaning of the corresponding information. In addition, the order of some words in the information name may also be changed (for example, sps_tm_inter_enabled_flag and sps_inter_tm_enabled_flag, etc.), and even if the order is changed, it may mean the same information.

[0174] Meanwhile, the embodiments of the present disclosure may be applied individually or in combination with each other.

[0175] Example 1-1

[0176] In an embodiment of the present disclosure, a syntax element capable of handling template-based decoder motion vector techniques is proposed. The syntax element can be signaled at various unit levels including a sequence parameter set (SPS).

[0177] As an example of the present disclosure, information that template matching can be processed may be signaled as a flag in the SPS, and the syntax element may be named sps_tmvd_enabled_flag. However, since this corresponds to an embodiment of the present disclosure, the present disclosure is not limited thereto.

[0178] [Table 2]

[0179]

[0180] As an example, if the syntax element sps_tmvd_enabled_flag is a first value (e.g., 1), it may indicate that a template-based decoder-side motion vector derivation technique is enabled for CLVS. On the other hand, if the syntax element sps_tmvd_enabled_flag is a second value (e.g., 0), it may indicate that a template matching-based decoder-side motion vector derivation is disabled for CLVS. The syntax element sps_tmvd_enabled_flag may be referred to as a first syntax element or first information. However, this is merely an example for clearly describing the present disclosure, and thus the present disclosure is not limited thereto.

[0181] Example 1-2

[0182] According to the first information as an embodiment of the present disclosure, when template matching merging (e.g., tm_merge) is disabled, whether to apply template matching merging (e.g., tm_merge) and whether to apply bilateral matching merging (e.g., bm_merge) can be separately signaled. That is, according to the present disclosure, template matching merging and bilateral matching merging can be processed independently.

[0183] According to embodiments of the present disclosure, the following changes may be made at a low level:

[0184] [Table 3]

[0185]

[0186] The syntax element tm_merge_flag may be information about whether template matching merging is applied. As an example, if the value of the syntax element tm_merge_flag (e.g., the second information) is a first value (e.g., 0), it may indicate that template matching merging is not applied, and if it is a second value (e.g., 1), it may indicate that template matching merging is applied. As an example, tm_merge_flag (pu) may indicate whether template matching merging is applied to a prediction unit (PU), and pu.tmMergeFlag may indicate the tm_merge_flag value of the corresponding PU. As an example, if the value of the second information (e.g., the syntax element tm_merge_flag) is a first value (e.g., 0), information about whether bilateral matching merging is applied (e.g., bm_merge_flag) may be signaled.

[0187] The syntax element bm_merge_flag (eg, the third information) may be information about whether bilateral match merging is applied. For example, if the value of the syntax element is a first value (eg, 0), it may indicate that bilateral match merging is not applied, and if the value is a second value (eg, 1), it may indicate that bilateral match merging is applied. For example, bm_merge_flag (pu) may indicate whether bilateral match merging is applied to a prediction unit (PU).

[0188] According to an embodiment, when template match merging is disabled, information about bilateral match merging is separately signaled so that whether to apply template match merging and bilateral match merging can be independently determined.

[0189] Examples 1-3

[0190] According to an embodiment of the present disclosure, there may be a case where bilateral match merging can be applied through the first information even when template match merging (eg, tm_merge) is disabled. As an example, the information on whether to apply bilateral match merging may be named as the third information (eg, bm_merge).

[0191] According to another embodiment of the present disclosure, even when information about whether template matching merging is applied (i.e., second information) is signaled using a value indicating that template matching merging is applied (e.g., second value 1), third information may be signaled. As an example, even when information about a higher level of template matching (i.e., first information indicating whether template matching is enabled / disabled) indicates that template matching is disabled (e.g., 0), if the second information is set to a specific value (e.g., second value, 1), the third information may be signaled. In this case, the third information may be set to the same value as the second information (e.g., second value, 1) without separate signaling, and the second information may be reset to 0 without separate signaling. In addition, if information about a higher level of template matching (i.e., first information indicating whether template matching is enabled / disabled) indicates that template matching is disabled (e.g., 0), information indicating whether bilateral matching merging is applied (i.e., third information) is not signaled, and only the bilateral matching direction (bm_direction or bmDir) for bilateral matching merging (bm_merge) may be signaled.

[0192] According to embodiments of the present disclosure, the following changes may be made at a low level:

[0193] [Table 4]

[0194]

[0195]

[0196]

[0197] As an example, in a certain function (e.g., CABACReader) stage, a certain condition for bilateral match merging can be determined (e.g., pu.cs->slice->getSPS()->getUseTM()||PU::isBMMergeFlagCoded(pu)). isBMMergeFlagCoded can indicate whether a bilateral match merging flag can be compiled for a specific unit (e.g., PU). For example, if a certain condition exists for a bilateral match merging flag to be compiled for a specific unit, it can indicate whether the certain condition is satisfied.

[0198] In addition, in a certain function (e.g., CABACReader), a certain condition for using template matching may be determined (e.g., !pu.cs->slice->getSPS()->getUseTM()). Based on the certain condition, the value of information (e.g., bmMergeFlag) of whether bilateral match merging is applied to a specific unit (e.g., PU) may be set to true, and in this case, the direction for bilateral match merging may be set.

[0199] Meanwhile, as an embodiment, in case template matching is enabled, it may be signaled with values ​​as shown in Table 5 below in order to apply bilateral matching merging.

[0200] [Table 5]

[0201]

[0202] According to Table 5, according to an embodiment of the present disclosure, when template matching merging is not applied (for example, the second information is 0), bilateral matching merging may be applied (for example, the third information is 1). According to another embodiment, when template matching merging is applied (for example, the second information is 1), bilateral matching merging may be applied (for example, the third information is 1).

[0203] At the same time, according to another embodiment of the present disclosure, when template matching is enabled (for example, the first information is 1), information about whether template merging is applied (for example, the second information) can be sent by a signal, but when template matching is disabled, the information about whether template merging is applied (for example, the second information) can be used to process the enabling of bilateral matching merging, as shown in Table 6 below.

[0204] [Table 6]

[0205]

[0206] According to Table 6, if the second information indicates that template matching is not applied, the third information may be signaled. As an example, in this case, the third information may indicate that bilateral match merging is applied (e.g., 1). As another example, if the second information indicates that template matching is applied (e.g., 1), the third information may not be signaled. In this case, as an example, the third information may be set to the same value as the second information.

[0207] According to the present disclosure, by assigning a flag to determine whether to enable a compilation tool, it is possible to individually determine whether to apply each compilation tool, and by assigning a flag having a small number of bits, it is possible to efficiently determine whether to apply a compilation tool even with a small number of bits.

[0208] Example 2-1

[0209] According to one embodiment of the present disclosure, information may be sent in a bitstream to determine whether template matching is enabled, and the template matching-based technique may be controlled based on this. Because the template matching-based technique may cause problems such as throughput delays in the decoder, it may depend on the decoder to consider whether template matching is supported. That is, whether template matching is supported may be determined by defining an arbitrary profile. To this end, according to the present disclosure, information (e.g., a flag, an HLS flag) may be provided in a high-level syntax (HLS) to indicate whether a template matching-based technique is applied in a bitstream. In addition, based on this, the decoder may adaptively determine whether to decode the bitstream.

[0210] As an embodiment, we propose a method of encoding a flag into a bitstream and transmitting the flag, and controlling a template matching-based coding tool used in a video encoding / decoding (encoder / decoder) process based on the flag.

[0211] Meanwhile, the syntax proposed below may be transmitted via any high-level syntax, such as video parameter set (VPS) / sequence parameter set (SPS) / picture parameter set (PPS) / picture header (PH) / slice header (SH). In the following, it is assumed that the proposed syntax is transmitted in SPS (sequence parameter set), but this is only for clarity of explanation, and the present disclosure is not limited thereto.

[0212] [Table 7]

[0213]

[0214] As an example, the syntax sps_tm_enabled_flag (hereinafter referred to as the first information) is information indicating whether the template matching technology is enabled, and may be information of a specific bit (e.g., 1 bit), and may have a first value (e.g., 0) or a second value (e.g., 1). The first information may indicate whether the coding tool based on overall template matching is applicable in the coding layer video sequence (CLVS) that references the sequence parameter set (SPS). For example, if the first information is the first value, it may indicate that the coding tool based on template matching is not applicable within the CLVS that references the SPS. In addition, if the first information is the second value, it may indicate that the coding tool based on template matching is applicable within the CLVS that references the sequence parameter set, that is, it may be enabled.

[0215] Meanwhile, as an example, a syntax for controlling one of the techniques of using template matching during encoding / decoding for inter / intra / screen content coding (scc) in the encoding / decoding process may be defined.

[0216] Table 8 below is an example of syntax information for controlling screen content compilation based on template matching.

[0217] [Table 8]

[0218]

[0219] As an example, the syntax sps_scc_tm_enabled_flag (hereinafter referred to as the second information) is information indicating whether the template matching-based screen content coding technology is enabled, and may be information of a specific bit (e.g., 1 bit) and may have a first value (e.g., 0) or a second value (e.g., 1). For example, if the second information is the first value, it may indicate that the template matching-based screen content coding tool may be disabled within the CLVS of the reference sequence parameter set (SPS). On the other hand, if the second information is the second value, it may indicate that the template matching-based screen content coding tool may be enabled within the CLVS of the reference sequence parameter set.

[0220] Table 9 below is an example of syntax information for controlling template matching based inter coding.

[0221] [Table 9]

[0222]

[0223] As an example, the syntax sps_inter_tm_enabled_flag (hereinafter referred to as the third information) is information indicating whether the intra-frame technology based on template matching is enabled, and may be information of a specific bit (e.g., 1 bit), and may have a first value (e.g., 0) or a second value (e.g., 1). For example, if the third information is the first value, it may indicate that the intra-frame coding tool based on template matching may be disabled in the coding layer video sequence (CLVS) of the reference sequence parameter set (SPS). On the other hand, if the third information is the second value, it may indicate that the screen content coding tool based on template matching may be enabled in the coding layer video sequence (CLVS) of the reference sequence parameter set.

[0224] Table 10 below is an example of syntax information for controlling template matching based intra coding.

[0225] [Table 10]

[0226]

[0227] As an example, the syntax sps_intra_tm_enabled_flag (hereinafter referred to as the fourth information) is information on whether the template matching type intra technology is enabled, and may be information of a specific bit (e.g., 1 bit), and may have a first value (e.g., 0) or a second value (e.g., 1). For example, if the fourth information is the first value, it may indicate that the template matching-based intra coding tool may be disabled in the coding layer video sequence (CLVS) of the reference sequence parameter set (SPS). On the other hand, if the fourth information is the second value, it may indicate that the template matching-based screen content coding tool may be enabled in the coding layer video sequence (CLVS) of the reference sequence parameter set.

[0228] Meanwhile, as described above, the first to fourth information may be defined at a level other than SPS (eg, PPS, VPS, SH, PH, etc.). For example, when the first to fourth information is included in PPS, the first to fourth information may be changed to pps_tm_enabled_flag, pps_scc_tm_enabled_flag, pps_inter_tm_enabled_flag, pps_intra_tm_enabled_flag, etc., respectively.

[0229] Meanwhile, the information controlled by the first to fourth information is not limited to controlling only the template matching-based encoding / decoding technology, which includes motion vector difference (MVD) sign prediction, multi-pass decoder-side motion vector refinement (e.g., first pass, second pass, third pass, etc.), adaptive decoder-side motion vector refinement, template matching-based OBMC (Overlapped Block Motion Compensation), Adaptive Reordering of Merge Candidates with Template Matching (ARMC-TM), Merge with Motion Vector Difference (MMVD) and template matching-based reordering for affine MMVD, Geometric Partition Mode (GPM) with template matching (TM), template matching-based reordering for GPM partition mode, intra-block copy (IBC) with template matching, intra-frame template matching, fusion for template-based intra-frame mode derivation (TIMD), combination of CIIP with TIMD and TM merge, block-level reference picture list reordering, etc., and all template matching-based technologies used in the video decoder / encoder can be controlled although not specified.

[0230] Meanwhile, as an example, if the proposed syntax (eg, first to fourth information) is not transmitted in a bitstream, its value may be derived as a specific value (eg, 0 or 1).

[0231] As another example, if the above-proposed syntax is not sent in the bitstream, their values ​​follow the value of whether the template matching technology of the specific profile is allowed, and whether the template matching technology of the specific profile is allowed can be deduced by the information of the profile, as exemplarily defined in Table 11 below.

[0232] [Table 11]

[0233]

[0234] The syntax general_profile_idc (hereinafter referred to as the fifth information) may represent a profile indicator, and the syntax general_tier_flag (hereinafter referred to as the sixth information) may represent a tier flag. As an example, the sixth information may be information of a specific bit (eg, 1 bit), and may have a first value (eg, 0) or a second value (eg, 1). Whether the template matching technology is applicable (permissible) may be derived based on at least one of the fifth information or the sixth information.

[0235] Alternatively, as another example, whether to apply (enable) the template matching technology may be derived based on the value of the proposed information, which is exemplarily defined at the profile level as shown in Table 12 below.

[0236] [Table 12]

[0237]

[0238] The template matching related information of the profile level proposed above may be defined as follows. The syntax ptl_template_matching_enabled_flag (hereinafter referred to as the seventh information) is information indicating whether the template matching-based technology is enabled, which may be information of a specific bit (e.g., 1 bit), and may have a first value (e.g., 0) or a second value (e.g., 1). As an example, if the seventh information is the first value, it may indicate that all slices in OlsInScope do not allow template matching compilation tools, and if it is the second value, it may indicate that the compiled video sequence (CVS) of OlsInScope may include a template matching-based compilation tool.

[0239] Example 2-2

[0240] One embodiment proposed in the present disclosure is a method of including a piece of information in a bitstream and processing it, and based on this, controlling a template matching coding tool used in a video decoder / encoder process, and each piece of information can be sent with a signal so that only when the value of the proposed information is a first value (e.g., 1), the template matching-based technology used in the video decoder or encoder can be enabled or disabled separately.

[0241] The information proposed below may be transmitted via any high-level syntax such as VPS / SPS / PPS / PH / SH, and in one embodiment of the present disclosure below, transmission in a sequence parameter set (SPS) is taken as an example for description.

[0242] As an example, if the HLS information (e.g., HLS flag) controlling the above-mentioned template matching-based encoding and decoding techniques is sent separately, redundant signaling may result in a decoder or encoder that does not support the template matching-based technique. In order to improve the reduction in compression efficiency due to such bit overhead, information controlling the enabling and disabling of template matching-based can be sent in the form of a signal, and the enabling information (e.g., enabling flag) for each technique can be sent with a signal only when the information has a specific value (e.g., 1). Examples of template matching-based compilation tool enabling information are shown in Tables 13 to 17 below, respectively.

[0243] Table 13 below shows an example of template matching compilation tool enabling information.

[0244] [Table 13]

[0245]

[0246] As an example, template matching-based compilation tool enabling information may include template matching enabling information (e.g., sps_tm_enabled_flag), template matching-based screen content enabling information (e.g., sps_tm_scc_enabled_flag), template matching-based inter-frame enabling information (e.g., sps_tm_inter_enabled_flag), and template matching-based intra-frame enabling information (e.g., sps_tm_intra_enabled_flag). The first information (e.g., sps_tm_enabled_flag), the second information, the third information, and the fourth information (e.g., sps_tm_scc_enabled_flag, sps_tm_inter_enabled_flag, sps_tm_intra_enabled_flag) may be obtained respectively. The first information to the fourth information may all be obtained from the bitstream and may be included in a sequence parameter set (SPS). The second information, the third information, or the fourth information may be obtained based on the first information. For example, if the first information is a specific value (e.g., true or 1), the second information to the fourth information may be obtained. The repeated description of the first to fourth information will be omitted. The second to fourth information can be obtained independently of each other. Meanwhile, although Table 13 shows that the order of the second to fourth information is fixed, this is for the clarity of explanation, and the order can be changed. That is, the second information can be obtained first or the fourth information can be obtained first, and the third information or the fourth information can be obtained last.

[0247] Meanwhile, in addition to the second to fourth information, template matching-based compilation tool enabling information can be further obtained through the first information. Table 14 below shows an example of template matching compilation tool enabling information that can be obtained. More specifically, according to one embodiment of the present disclosure, it can be determined whether to apply each template matching technology, and based on this, enabling information for each detailed technology can be sent with a signal.

[0248] [Table 14]

[0249]

[0250] As an example, the enabling information for each template matching technology, that is, the template matching based compilation tool enabling information, includes template matching based OBMC (Overlapped Block Motion Compensation) enabling information (e.g., sps_tm_obmc_enabled_flag), template matching based ARMC (Adaptive Reordering of Merge Candidates) enabling information (e.g., sps_tm_armc_enabled_flag), template matching based AMVP (Advanced Motion Vector Prediction) enabling information (e.g., sps_tm_amvp_enabled_flag), template matching based merge enabling information (e.g., sps_tm_merge_enabled_flag). sps_tm_gpm_enabled_flag), template matching based GPM (geometry partitioning mode) enabling information (e.g., sps_tm_gpm_enabled_Flag), and template matching based TMVP (temporal motion vector prediction) non-adjacent reordering enabling information (e.g., sps_tm_tmvp_nonadjacent_reordering_enabled_flag), template matching based motion vector difference (MVD) sign prediction enabling information (e.g., sps_tm_mvd_sign_prediction_enabled_flag), template matching based MMVD and / or affine MMVD (merged with MVD) enabling information (e.g., sps_tm_mmvd_affine_mmvd_enabled_flag), template matching based GPM split mode reordering enabling information (e.g., sps_tm_gpm_split_mode_reordering_enabled_flag), template matching based reference picture reordering enabling information (e.g., sps_tm_reference_picture_reordering_enabled_flag), template matching based intra block copy (IBC) enabling information (e.g., sps_tm_intra_block_copy_enabled_flag), template matching-based intra template matching enabling information (e.g., sps_tm_intra_template_matching_enabled_flag), template matching-based intra mode derivation enabling information (e.g., sps_tm_intra_mode_derivation_enabled_flag), template matching-based CIIP (combined intra and inter prediction) enabling information (e.g., sps_tm_ciip_enabled_flag), etc. The above-mentioned template matching-based coding tool enabling information can be obtained based on specific information (e.g., the first information, e.g., sps_tm_enabled_flag).All of the template matching-based compilation tool enabling information shown in Table 14 include the first information, which can be obtained from the bitstream and can be included in the sequence parameter set (SPS). At the same time, some of the template matching-based compilation tool enabling information can be obtained when the first information (e.g., sps_tm_enabled_flag) is a specific value (e.g., true or 1). Each template matching-based compilation tool enabling information can be obtained independently of each other. At the same time, although Table 14 shows that the order of each enabling information is fixed, this is for clarity of explanation, and the order can be changed. That is, in addition to the OBMC enabling information based on template matching, other information can be obtained first, or in addition to the CIIP enabling information based on template matching, other information can be obtained last. Table 15 below shows an example of template matching compilation tool enabling information. More specifically, it is an example of template matching compilation tool enabling information associated with the above-mentioned third information (e.g., sps_tm_inter_enabled_flag, i.e., sps_inter_tm_enabled_flag).

[0251] [Table 15]

[0252]

[0253] As an example, the enabling information of each template matching technology that can be associated with the third information, that is, the template matching-based compilation tool enabling information, includes template matching-based OBMC (Overlapped Block Motion Compensation) enabling information (e.g., sps_tm_obmc_enabled_flag), template matching-based ARMC (Adaptive Reordering of Merge Candidates) enabling information (e.g., sps_tm_armc_enabled_flag), template matching-based AMVP (Advanced Motion Vector Prediction) enabling information (e.g., sps_tm_amvp_enabled_flag), template matching-based merge enabling information (e.g., sps_tm_merge_enabled_flag), template matching-based GPM (Geometric Partitioning Mode) enabling information (e.g., sps_tm_gpm_enabled_Flag), template matching-based TMVP (Temporal Motion Vector Prediction) non-adjacent reordering enabling information. information (e.g., sps_tm_tmvp_nonadjacent_reordering_enabled_flag), template matching based motion vector difference (MVD) sign prediction enabling information (e.g., sps_tm_mvd_sign_prediction_enabled_flag), template matching based merging enabling information with MVD and / or affine MMVD (e.g., sps_tm_mmvd_affine_mmvd_enabled_flag), template matching based GPM split mode reordering enabling information (e.g., sps_tm_gpm_split_mode_reordering_enabled_flag), template matching based reference picture reordering enabling information (e.g., sps_tm_reference_picture_reordering_enabled_flag), etc. The above template matching based coding tool enabling information may be obtained based on specific information (e.g., third information, e.g., sps_inter_tm_enabled_flag). All of the template matching based compilation tool enabling information shown in Table 15 include the third information, which can be obtained from the bitstream and can be included in the sequence parameter set (SPS). Meanwhile, when the third information (e.g., sps_inter_tm_enabled_flag) is a specific value (e.g., true or 1), some of the template matching based compilation tool enabling information can be obtained. Each template matching based compilation tool enabling information can be obtained independently of each other. Meanwhile, although Table 15 shows that the order of each template matching based compilation tool enabling information is fixed, this is for clarity of explanation, and the order may be changed.That is, except for the template matching based OBMC enabling information, the other information may be obtained first, or except for the template matching based reference picture reordering enabling information, the other information may be obtained last.

[0254] Table 16 below shows an example of the template matching compiling tool enabling information. More specifically, it is an example of the template matching compiling tool enabling information associated with the above-mentioned fourth information (eg, sps_tm_intra_enabled_flag, ie, sps_intra_tm_enabled_flag).

[0255] [Table 16]

[0256]

[0257] As an example, the fourth information may have the enabling information of each template matching technology associated therewith, that is, the template matching based compilation tool enabling information, which may include template matching based intra block copy (IBC) enabling information (e.g., sps_tm_intra_block_copy_enabled_flag), template matching based intra template matching enabling information (e.g., sps_tm_intra_template_matching_enabled_flag), template matching based intra mode derivation enabling information (e.g., sps_tm_intra_mode_derivation_enabled_flag), template matching based CIIP (Combined Inter and Intra Prediction) enabling information (e.g., sps_tm_ciip_enabled_flag), and the like.

[0258] The above-mentioned template matching-based compilation tool enabling information can be obtained based on specific information (e.g., fourth information, e.g., sps_intra_tm_enabled_flag). All template matching-based compilation tool enabling information including the fourth information shown in Table 16 can be obtained from the bitstream and can be included in the sequence parameter set (SPS). At the same time, when the fourth information (e.g., sps_intra_tm_enabled_flag) is a specific value (e.g., true or 1), some of the template matching-based compilation tool enabling information can be obtained. Each template matching-based compilation tool enabling information can be obtained independently of each other. At the same time, although Table 16 shows that the order of each template matching-based compilation tool enabling information is fixed, this is for clarity of explanation, and the order can be changed. That is, in addition to the intra-frame block copy enabling information based on template matching, other information can be obtained first, or in addition to the CIIP enabling information based on template matching, other information can be obtained last.

[0259] Table 17 below shows an example of the template matching compiling tool enabling information. More specifically, it is an example of the template matching compiling tool enabling information associated with the above-mentioned second information (eg, sps_tm_scc_enabled_flag, ie, sps_scc_tm_enabled_flag).

[0260] [Table 17]

[0261]

[0262] As an example, the second information may be the enabling information of each template matching technology associated therewith, that is, the template matching based compilation tool enabling information, which may include template matching based intra block copy (IBC) enabling information (e.g., sps_tm_intra_block_copy_enabled_flag), template matching based intra template matching enabling information (e.g., sps_tm_intra_template_matching_enabled_flag), and the like.

[0263] The above-mentioned template matching-based compilation tool enabling information can be obtained based on specific information (e.g., second information, e.g., sps_scc_tm_enabled_flag). All template matching-based compilation tool enabling information including the second information shown in Table 17 can be obtained from the bitstream and can be included in the sequence parameter set (SPS). At the same time, when the second information (e.g., sps_scc_tm_enabled_flag) is a specific value (e.g., true or 1), some of the template matching-based compilation tool enabling information can be obtained. Each template matching-based compilation tool enabling information can be obtained independently of each other. At the same time, although Table 17 shows that the order of each template matching-based compilation tool enabling information is fixed, this is for clarity of explanation, and the order can be changed. That is, in addition to the intra-frame block copy enabling information based on template matching, other information can also be obtained first, or in addition to the intra-frame template matching enabling information based on template matching, other information can also be obtained last.

[0264] Meanwhile, the template matching-based coding tool enabling information is not limited to the control of the template matching-based encoding / decoding technology mentioned above. That is, although not specified, all template matching-based technologies used in video decoders / encoders can be controlled.

[0265] In addition, although an example of sending all information in a sequence parameter set (SPS) is described in the syntax structure of the embodiment, each piece of information may be sent at a different level. As another example, the first information (e.g., sps_tm_enabled_flag) may be sent with a signal in a sequence parameter set (SPS), and the above-mentioned other template matching-based compilation tool enabling information (e.g., template matching-based OBMC enabling information (e.g., sps_tm_obmc_enabled_flag), template matching-based CIIP enabling information (e.g., sps_tm_ciip_enabled_flag), etc.) may be sent at a lower syntax level (e.g., picture parameter set (PPS), picture header, slice header) of the sequence parameter set (SPS). In this case, the first information (e.g., sps_tm_enabled_flag) may also be referenced in the information at a lower syntax level of the sequence parameter set. That is, the template matching-based compilation tool enabling information at a lower syntax level may be obtained based on the first information. For example, template matching based compilation tool enablement information is obtained based on that the value of the first information is a specific value (e.g., true or 1), and template matching based OBMC enablement information (e.g., sps_tm_obmc_enabled_flag above) can be sent by a signal in a slice header (e.g., sh_tm_obmc_enabled_flag), and template matching based CIIP enablement information (e.g., sps_tm_ciip_enabled_flag above) can be sent by a signal in a picture header (e.g., ph_tm_ciip_enabled_flag).

[0266] As another example, if the template matching based compilation tool enabling information proposed above (eg, sps_tm_enabled_flag, sps_inter_tm_enabled_flag, sps_intra_tm_enabled_flag, sps_scc_tm_enabled_flag, etc.) is not signaled in a bitstream, its value may be derived as a specific value (eg, 0).

[0267] As another example, or if the template matching based compilation tool enabling information proposed above is not signaled in the bitstream, its value may be derived as a specific value (eg, 1).

[0268] Alternatively, if the template matching-based compilation tool enabling information proposed above is not signaled in the bitstream, the value of the information follows the value of whether template matching is allowed in a specific profile, and whether template matching is allowed in a specific profile can be derived by the value definition information in the following profile. Table 18 below shows an example of information in a profile.

[0269] [Table 18]

[0270]

[0271] The syntax general_profile_idc (hereinafter referred to as fifth information) may indicate a profile indicator, and the syntax general_tier_flag (hereinafter referred to as sixth information) may indicate a tier flag. A repeated description of the fifth information and the sixth information will be omitted.

[0272] As another example, the value of other template matching-based compilation tool enabling information may be derived according to the value of the template matching enabling information defined at the profile level, as exemplarily shown in Table 19 below.

[0273] [Table 19]

[0274]

[0275] The template matching related information of the profile level proposed above may be defined as follows. Syntax ptl_template_matching_enabled_flag (hereinafter referred to as seventh information) may be information indicating whether a technique based on template matching is enabled. A repeated description of the seventh information will be omitted.

[0276] Meanwhile, if the template matching-based compilation tool enabling information (e.g., sps_tm_enabled_flag, sps_inter_tm_enabled_flag, sps_intra_tm_enabled_flag, sps_scc_tm_enabled_flag, etc.) has a specific value (e.g., 0), the higher-level compilation tool enabling information (e.g., sps_tm_obmc_enabled_flag, sps_tm_armc_enabled_flag, etc.) that is not transmitted may be inferred to have a specific value (e.g., the same value, i.e., 0).

[0277] At the same time, because the order disclosed in Tables 13 to 19 is only an embodiment of the present disclosure, the order in which each piece of information is obtained can be changed. In addition, only some of the information expressed in Tables 13 to 19 can be obtained, and other information may not be obtained, and the order in which it is obtained can also be changed.

[0278] Fig.11 is a flowchart illustrating an image encoding / decoding method according to an embodiment of the present disclosure.

[0279] As an example, Fig.11 The method may be executed by an image encoding device or an image decoding device, and may be combined with the other embodiments described above.

[0280] As an example, if Fig.11 The image decoding method performed by the image decoding device is shown, and the prediction mode of the current block can be determined (S1110). Based on the determined prediction mode, a prediction block of the current block can be generated (S1120), and based on the generated prediction block, the current block can be reconstructed (S1130).

[0281] As another example, if Fig.11 An image encoding method performed by an image encoding device is shown, a prediction mode of a current block may be determined (S1110), and based on the determined prediction mode, a prediction block of the current block may be generated (S1120), and based on the generated prediction block, the current block may be reconstructed (S1130).

[0282] At the same time, the template matching-based coding tool enabling information may include template matching-based screen content coding tool enabling information, and in this case, the template matching-based screen content coding tool enabling information may include intra-frame block copy enabling information or intra-frame template matching enabling information. As an example, the template matching-based coding tool enabling information may include template matching-based inter-frame coding tool enabling information, and in this case, the template matching-based inter-frame coding tool enabling information may include OBMC enabling information, ARMC enabling information, AMVP enabling information, merge enabling information, GPM enabling information, TMVP non-adjacent reordering enabling information, MMVD affine enabling information, GPM partitioning mode reordering enabling information, or reference picture reordering enabling information. At least one. In addition, as an example, the template matching-based coding tool enabling information may include template matching-based intra-frame coding tool enabling information, and in this case, the template matching-based intra-frame coding tool enabling information may include intra-frame block copy enabling information, intra-frame template matching enabling information, intra-frame mode derivation enabling information, or CIIP enabling information. At least one. In addition, the template matching-based coding tool enabling information can be sent with a signal in a bitstream. That is, at the encoding end, the template matching-based coding tool enabling information can be encoded in the bitstream, and at the decoding end, the template matching-based coding tool enabling information can be obtained from the bitstream. In addition, the template matching-based coding tool enabling information can be included in a sequence parameter set, a picture parameter set, a slice header, a picture header, etc.

[0283] Meanwhile, the bit stream generated by the image encoding method can be sent to a decoder or other device, or can be stored in a computer-readable medium.

[0284] Fig.12 is a diagram showing a content streaming system to which an embodiment of the present disclosure can be applied.

[0285] like Fig.12 As shown in , a content streaming system to which an embodiment of the present disclosure is applied may mainly include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.

[0286] The encoding server compresses the content input from a multimedia input device such as a smart phone, a camera, a camcorder, etc. into digital data to generate a bitstream and sends the bitstream to the streaming server. As another example, when a multimedia input device such as a smart phone, a camera, a camcorder, etc. directly generates a bitstream, the encoding server can be omitted.

[0287] A bitstream may be generated by an image encoding method or an image encoding apparatus to which an embodiment of the present disclosure is applied, and a streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0288] The streaming server sends multimedia data to the user device based on the user's request through the network server, and the network server is used as a medium to inform the user of the service. When the user requests the required service from the network server, the network server can deliver it to the streaming server, and the streaming server can send the multimedia data to the user. In this case, the content streaming system may include a separate control server. In this case, the control server is used to control the command / response between the devices in the content streaming system.

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

[0290] Examples of user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smart watches, smart glasses, head-mounted displays), digital televisions, desktop computers, digital signage, etc.

[0291] Each server in the content streaming system may operate as a distributed server, in which case data received from each server may be distributed.

[0292] The scope of the present disclosure includes software or machine-executable commands (e.g., operating systems, applications, firmware, programs, etc.) for enabling operations of methods according to various embodiments to be performed on a device or computer, and non-transitory computer-readable media having such software or commands stored thereon and executable on a device or computer.

[0293] Industrial Applicability

[0294] The embodiments of the present disclosure may be used to encode or decode an image.

Claims

1. An image decoding method performed by an image decoding device, the image decoding method comprising: Determine the prediction mode of the current block; generating a prediction block of the current block based on the prediction mode; as well as reconstructing the current block based on the prediction block, The prediction mode is determined according to compilation tool enabling information based on template matching.

2. The image decoding method according to claim 1, wherein: The template matching-based compilation tool enabling information includes template matching-based screen content compilation tool enabling information.

3. The image decoding method according to claim 2, wherein: The template matching-based coding tool enabling information includes intra-frame block copy enabling information or intra-frame template matching enabling information.

4. The image decoding method according to claim 1, wherein: The template matching based coding tool enabling information includes template matching based inter-frame coding tool enabling information.

5. The image decoding method according to claim 4, wherein: The template matching-based compilation tool enabling information includes at least one of OBMC enabling information, ARMC enabling information, AMVP enabling information, merge enabling information, GPM enabling information, TMVP non-adjacent reordering enabling information, MVD symbol prediction enabling information, MMVD affine enabling information, GPM partitioning mode reordering enabling information or reference picture reordering enabling information.

6. The image decoding method according to claim 1, wherein: The template matching-based coding tool enabling information includes template matching-based intra-frame coding tool enabling information.

7. The image decoding method according to claim 6, wherein: The template matching based coding tool enabling information includes at least one of intra block copy enabling information, intra template matching enabling information, intra mode derivation enabling information or CIIP enabling information.

8. The image decoding method according to claim 1, wherein: The template matching based compilation tool enabling information is obtained from a bitstream.

9. The image decoding method according to claim 8, wherein: The template matching based coding tool enabling information is included in one of a video parameter set, a sequence parameter set, a picture parameter set, a slice header or a picture header.

10. An image encoding method performed by an image encoding device, the image encoding method comprising: Determine the prediction mode of the current block; generating a prediction block of the current block based on the prediction mode; as well as reconstructing the current block based on the prediction block, The prediction mode is determined according to compilation tool enabling information based on template matching.

11. The image encoding method according to claim 10, wherein: The template matching based compilation tool enabling information is encoded in a bitstream.

12. A method for sending a bit stream, comprising: Send the bitstream generated by the image encoding method, Wherein, the image encoding method comprises: Determine the prediction mode of the current block; generating a prediction block of the current block based on the prediction mode; and reconstructing the current block based on the prediction block, and The prediction mode is determined according to compilation tool enabling information based on template matching.

13. A computer-readable medium storing a bit stream generated by the image encoding method according to claim 10.