Intra template matching-based image encoding / decoding method, bitstream transmission method, and recording medium for storing bitstream

The video encoding/decoding method employing intra template matching addresses the challenge of high-resolution video data efficiency by enhancing prediction performance and coding efficiency, thereby reducing transmission and storage costs.

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

Patent Information

Application Number
PCT/KR2024/005391
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-24
Filing Date
2024-04-22
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality video data, such as HD and UHD, leads to a significant increase in video data size, resulting in higher transmission and storage costs, necessitating highly efficient video compression technologies.

Method used

A video encoding/decoding method utilizing intra template matching for improved encoding/decoding efficiency, including determining a search area for template matching prediction blocks and deriving sample values in reference blocks to enhance prediction performance and coding efficiency.

Benefits of technology

The method achieves improved encoding/decoding efficiency and prediction performance, reducing the complexity and cost associated with transmitting and storing high-resolution video data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024005391_31102024_PF_FP_ABST
    Figure KR2024005391_31102024_PF_FP_ABST
Patent Text Reader

Abstract

Provided are an image encoding / decoding method, a bitstream transmission method, and a computer-readable recording medium for storing a bitstream. The image decoding method, according to the present disclosure, may be an image decoding method carried out by an image decoding device, the image decoding method comprising the steps of: determining a search space associated with the current block; inducing errors between reference template regions which are the respective template regions of reference blocks in the search space, and the current template region which is the template region of the current block; and determining a reference block of the current block on the basis of the errors.
Need to check novelty before this filing date? Find Prior Art

Description

A method for encoding / decoding a video based on intra template matching, a method for transmitting a bitstream, and a recording medium storing the bitstream

[0001] The present disclosure relates to a video encoding / decoding method, a method for transmitting a bitstream, and a recording medium storing the bitstream, and relates to prediction based on intra template matching.

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

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

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

[0005] Additionally, the present disclosure aims to propose a template search region for effectively generating template matching prediction blocks.

[0006] Additionally, the present disclosure aims to propose a method for deriving values ​​of unavailable samples within a reference block or reference template area.

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

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

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

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

[0011] An image decoding method according to one aspect of the present disclosure may be an image decoding method performed by an image decoding device, the image decoding method including: determining a search area related to a current block; deriving an error between a reference template area, which is a template area of ​​each reference block within the search area, and a current template area, which is a template area of ​​the current block; and determining a reference block of the current block based on the error.

[0012] According to another aspect of the present disclosure, an image encoding method may be performed by an image encoding device, the image encoding method comprising: determining a search area related to a current block; deriving an error between a reference template area, which is a template area of ​​each reference block within the search area, and a current template area, which is a template area of ​​the current block; and determining a reference block of the current block based on the error.

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

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

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

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

[0017] Additionally, according to the present disclosure, the prediction performance of intra template matching can be improved.

[0018] Additionally, according to the present disclosure, coding efficiency can be improved as the prediction performance of intra template matching is improved.

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

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

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

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

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

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

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

[0026] Figure 4 is a flowchart illustrating an image encoding method based on intra prediction.

[0027] Figure 5 is a schematic diagram showing an intra prediction unit in a video encoding device.

[0028] Figure 6 is a flowchart illustrating an image encoding method based on intra prediction.

[0029] Figure 7 is a schematic diagram showing an intra prediction unit in an image decoding device.

[0030] FIGS. 8 to 11 are diagrams illustrating examples of search areas and block vector candidates for intra template matching.

[0031] Figures 12 and 13 are drawings for explaining examples of reference blocks that go out of the search area.

[0032] FIG. 14 and FIG. 15 are flowcharts illustrating an image encoding method and an image decoding method according to one embodiment of the present disclosure.

[0033] Figure 16 is a diagram for explaining an example of a search position in an integer sample unit and a search position in a fractional sample unit.

[0034] Figure 17 is a diagram illustrating an example of a block vector for a search area.

[0035] Figures 18 to 25 are diagrams for explaining examples of deriving unavailable sample values.

[0036] FIG. 26 and FIG. 27 are flowcharts illustrating an image encoding method and an image decoding method according to another embodiment of the present disclosure.

[0037] FIG. 28 is a drawing exemplifying a content streaming system to which an embodiment according to the present disclosure can be applied.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0052] Overview of Video Coding Systems

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

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

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

[0056] The video source generation unit (11) can obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source generation unit (11) can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive including previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced with a process of generating related data.

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

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

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

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

[0061] Overview of the video encoding device

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

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

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

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

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

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

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

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

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

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

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

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

[0074] The above bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmission unit (not shown) for transmitting the signal output from the entropy encoding unit (190) and / or a storage unit (not shown) for storing the signal may be provided as an internal / external element of the video encoding device (100), or the transmission unit may be provided as a component of the entropy encoding unit (190).

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

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

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

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

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

[0080] Video Decryption Device Overview

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0097] Intra prediction

[0098] Intra prediction may refer to a prediction that generates prediction samples for a current block based on reference samples within a picture to which the current block belongs (hereinafter, referred to as the current picture). When intra prediction is applied to a current block, peripheral reference samples to be used for intra prediction of the current block may be derived. The peripheral reference samples of the current block may include a total of 2 x nH samples adjacent to a left boundary and a bottom-left neighboring sample of a current block of a size nW x nH, a total of 2 x nW samples adjacent to a top boundary and a top-right neighboring sample of the current block, and one sample adjacent to the top-left neighboring sample of the current block. Alternatively, the peripheral reference samples of the current block may include upper peripheral samples of multiple columns and left peripheral samples of multiple rows. Additionally, the surrounding reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.

[0099] However, some of the surrounding reference samples of the current block may not yet have been decoded or may not be available. In this case, the image decoding device (200) may construct surrounding reference samples to be used for prediction by substituting the unavailable samples with available samples. Alternatively, the surrounding reference samples to be used for prediction may be constructed through interpolation of the available samples.

[0100] When neighboring reference samples are derived, (i) a prediction sample can be derived based on the average or interpolation of neighboring reference samples of the current block, and (ii) the prediction sample can be derived based on a reference sample that exists in a specific (prediction) direction with respect to the prediction sample among the neighboring reference samples of the current block. Case (i) may be called a non-directional mode or a non-angular mode, and case (ii) may be called a directional mode or an angular mode. In addition, the prediction sample may be generated through interpolation between the second neighboring sample and the first neighboring sample, which are located in the opposite direction of the prediction direction of the intra prediction mode of the current block with respect to the prediction sample of the current block among the neighboring reference samples. The above-described case may be called linear interpolation intra prediction (LIP). In addition, chroma prediction samples may be generated based on luma samples using a linear model. This case may be called LM mode. In addition, a temporary prediction sample of the current block may be derived based on filtered peripheral reference samples, and a prediction sample of the current block may be derived by weighting at least one reference sample derived according to the intra prediction mode among the existing peripheral reference samples, i.e., unfiltered peripheral reference samples, with the temporary prediction sample. The above-described case may be referred to as PDPC (Position dependent intra prediction).In addition, intra prediction encoding can be performed by selecting a reference sample line with the highest prediction accuracy among the surrounding multiple reference sample lines of the current block, deriving a prediction sample using the reference sample located in the prediction direction from the corresponding line, and instructing (signaling) the image decoding device (200) to use the used reference sample line. The above-described case may be referred to as multi-reference line (MRL) intra prediction or MRL-based intra prediction. In addition, the current block may be divided into vertical or horizontal sub-partitions, and intra prediction may be performed based on the same intra prediction mode, while deriving and using surrounding reference samples for each sub-partition. That is, in this case, the intra prediction mode for the current block is applied equally to the sub-partitions, and by deriving and using surrounding reference samples for each sub-partition, the intra prediction performance may be improved in some cases. This prediction method may be referred to as intra sub-partitions (ISP) or ISP-based intra prediction. The above-described intra prediction methods may be referred to as intra prediction types to distinguish them from the intra prediction modes in Table of Contents 1.2. The above intra prediction type may be called by various terms such as intra prediction technique or additional intra prediction mode. For example, the above intra prediction type (or additional intra prediction mode, etc.) may include at least one of the above-described LIP, PDPC, MRL, and ISP. A general intra prediction method excluding specific intra prediction types such as the above-described LIP, PDPC, MRL, and ISP may be called a normal intra prediction type. The normal intra prediction type may be generally applied when the above-described specific intra prediction types are not applied, and prediction may be performed based on the above-described intra prediction mode. Meanwhile, post-processing filtering may be performed on the derived prediction samples as needed.

[0101] Specifically, the intra prediction procedure may include an intra prediction mode / type determination step, a surrounding reference sample derivation step, and an intra prediction mode / type-based prediction sample derivation step. Additionally, a post-processing filtering step may be performed on the derived prediction samples, if necessary.

[0102] Meanwhile, in addition to the intra prediction types described above, affine linear weighted intra prediction (ALWIP) may be used. The ALWIP may also be called linear weighted intra prediction (LWIP) or matrix weighted intra prediction (MIP or matrix based intra prediction). When the MIP is applied to the current block, prediction samples for the current block may be derived by i) performing a matrix-vector-multiplication procedure using surrounding reference samples on which an averaging procedure has been performed, ii) further performing a horizontal / vertical interpolation procedure as necessary. The intra prediction modes used for the MIP may be configured differently from the intra prediction modes used in the LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction described above. The intra prediction mode for the MIP may be called a MIP intra prediction mode, a MIP prediction mode, or a MIP mode. For example, the metrics and offsets used in the matrix vector multiplication may be set differently depending on the intra prediction mode for the MIP. Here, the metrics may be referred to as (MIP) weight metrics, and the offset may be referred to as (MIP) offset vectors or (MIP) bias vectors. A specific MIP method will be described later.

[0103] A block restoration procedure based on intra prediction and an intra prediction unit (185) within an image encoding device (100) may schematically include, for example, FIGS. 4 and 5.

[0104] S400 may be performed by the intra prediction unit (185) of the video encoding device (100), and S410 may be performed by the residual processing unit of the video encoding device (100). Specifically, S410 may be performed by the subtraction unit (115) of the video encoding device (100). In S420, the prediction information may be derived by the intra prediction unit (185) and encoded by the entropy encoding unit (190). In S420, the residual information may be derived by the residual processing unit and encoded by the entropy encoding unit (190). The residual information is information about the residual samples. The residual information may include information about quantized transform coefficients for the residual samples. As described above, the residual samples are derived as transform coefficients through the transform unit (120) of the image encoding device (100), and the transform coefficients can be derived as quantized transform coefficients through the quantization unit (130). Information about the quantized transform coefficients can be encoded in the entropy encoding unit (190) through a residual coding procedure.

[0105] The video encoding device (100) performs intra prediction on the current block (S400). The video encoding device (100) can derive an intra prediction mode / type for the current block, derive surrounding reference samples of the current block, and generate prediction samples within the current block based on the intra prediction mode / type and the surrounding reference samples. Here, the intra prediction mode / type determination, the surrounding reference sample derivation, and the prediction sample generation procedures may be performed simultaneously, or one procedure may be performed before the other. For example, the intra prediction unit (185) of the video encoding device (100) may include an intra prediction mode / type determination unit (186), a reference sample derivation unit (187), and a prediction sample derivation unit (188). The intra prediction mode / type determination unit (186) may determine an intra prediction mode / type for the current block, the reference sample derivation unit (187) may derive surrounding reference samples of the current block, and the prediction sample derivation unit (188) may derive prediction samples of the current block. Meanwhile, although not illustrated, when a prediction sample filtering procedure described below is performed, the intra prediction unit (185) may further include a prediction sample filtering unit (not illustrated). The video encoding device (100) may determine a mode / type to be applied to the current block among a plurality of intra prediction modes / types. The video encoding device (100) can compare the RD costs for the intra prediction modes / types and determine the optimal intra prediction mode / type for the current block.

[0106] Meanwhile, the video encoding device (100) may also perform a prediction sample filtering procedure. Prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered through the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.

[0107] The video encoding device (100) generates residual samples for the current block based on (filtered) prediction samples (S410). The video encoding device (100) can compare the prediction samples with the original samples of the current block based on phase and derive the residual samples.

[0108] The video encoding device (100) can encode video information including information about the intra prediction (prediction information) and residual information about the residual samples (S420). The prediction information can include the intra prediction mode information and the intra prediction type information. The video encoding device (100) can output the encoded video information in the form of a bitstream. The output bitstream can be transmitted to the video decoding device (200) via a storage medium or a network.

[0109] The residual information may include the residual coding syntax described below. The video encoding device (100) may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.

[0110] Meanwhile, as described above, the video encoding device (100) can generate a restored picture (including restored samples and restored blocks). To this end, the video encoding device (100) can inversely quantize / inversely transform the quantized transform coefficients to derive (corrected) residual samples. The reason for performing inverse quantization / inverse transformation on the residual samples after transforming / quantizing them in this way is to derive residual samples that are identical to the residual samples derived from the video decoding device (200) as described above. The video encoding device (100) can generate a restored block including restored samples for the current block based on the predicted samples and the (corrected) residual samples. A restored picture for the current picture can be generated based on the restored block. As described above, an in-loop filtering procedure, etc. can be further applied to the restored picture.

[0111] A video / image decoding procedure based on intra prediction and an intra prediction unit within an image decoding device (200) may schematically include, for example, the following.

[0112] The image decoding device (200) can perform an operation corresponding to the operation performed in the image encoding device (100).

[0113] S600 to S620 may be performed by the intra prediction unit (265) of the image decoding device (200), and the prediction information of S600 and the residual information of S630 may be obtained from the bitstream by the entropy decoding unit (210) of the image decoding device (200). The residual processing unit of the image decoding device (200) may derive residual samples for the current block based on the residual information. Specifically, the inverse quantization unit (220) of the residual processing unit may perform inverse quantization based on the quantized transform coefficients derived based on the residual information to derive transform coefficients, and the inverse transform unit (230) of the residual processing unit may perform inverse transformation on the transform coefficients to derive residual samples for the current block. S640 can be performed by the addition unit (235) or restoration unit of the image decoding device (200).

[0114] Specifically, the video decoding device (200) can derive an intra prediction mode / type for the current block based on the received prediction information (intra prediction mode / type information) (S600). The video decoding device (200) can derive surrounding reference samples of the current block (S610). The video decoding device (200) generates prediction samples within the current block based on the intra prediction mode / type and the surrounding reference samples (S620). In this case, the video decoding device (200) can perform a prediction sample filtering procedure. The prediction sample filtering procedure may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.

[0115] The video decoding device (200) generates residual samples for the current block based on the received residual information. The video decoding device (200) generates reconstructed samples for the current block based on the prediction samples and the residual samples, and can derive a reconstructed block including the reconstructed samples (S630). A reconstructed picture for the current picture can be generated based on the reconstructed block. As described above, an in-loop filtering procedure, etc. can be further applied to the reconstructed picture.

[0116] Here, the intra prediction unit (265) of the video decoding device (200) may include an intra prediction mode / type determination unit (266), a reference sample derivation unit (267), and a prediction sample derivation unit (268). The intra prediction mode / type determination unit (266) determines the intra prediction mode / type for the current block based on intra prediction mode / type information generated and signaled by the intra prediction mode / type determination unit (186) of the video encoding device (100), the reference sample derivation unit (266) may derive surrounding reference samples of the current block, and the prediction sample derivation unit (267) may derive prediction samples of the current block. Meanwhile, although not illustrated, when the above-described prediction sample filtering procedure is performed, the intra prediction unit (265) may further include a prediction sample filtering unit (not illustrated).

[0117] The intra prediction mode information may include flag information (e.g., intra_luma_mpm_flag) indicating, for example, whether the most probable mode (MPM) or the remaining mode is applied to the current block, and when the MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM candidate list or an MPM list. In addition, when the MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The image decoding device (200) may determine the intra prediction mode of the current block based on the intra prediction mode information. A separate MPM list can be configured for the above-described MIP.

[0118] In addition, the intra prediction type information can be implemented in various forms. For example, the intra prediction type information can include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information can include at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if so, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating a split type of subpartitions if the ISP is applied, flag information indicating whether PDCP is applied, or flag information indicating whether LIP is applied. In addition, the intra prediction type information can include a MIP flag indicating whether MIP is applied to the current block.

[0119] The intra prediction mode information and / or the intra prediction type information may be encoded / decoded using the coding method described in this document. For example, the intra prediction mode information and / or the intra prediction type information may be encoded / decoded using entropy coding (e.g., CABAC, CAVLC) based on a truncated (rice) binary code.

[0120] Intra template matching prediction (IntraTMP)

[0121] Intra-template matching prediction (IntraTMP) is a special intra-prediction mode that copies (derives) the optimal prediction block from the reconstructed portion of the current frame where the L-shaped template matches the current template. For a given search region, the encoder searches the reconstructed portion of the current frame for the template most similar to the current template and uses the corresponding block (the Matching block in Figure 8) as the prediction block. The encoder can signal the use of the IntraTMP mode, and the same prediction operation can be performed at the decoder side.

[0122] A prediction signal can be generated by matching the L-shaped casual neighbors of the current block with other blocks in a predefined search area, as shown in Fig. 8. In Fig. 8, R1 represents the current CTU, R2 represents the top-left CTU, R3 represents the above CTU, and R4 represents the left CTU.

[0123] The sum of absolute differences (SAD) can be used as an error function. Within each region, the decoder searches for the template with the lowest SAD relative to the current block and uses the block corresponding to the searched template as the predicted block.

[0124] The sizes of all regions (SearchRange_w, SearchRange_h) can be set proportionally to the block sizes (BlkW, BlkH) to have a fixed number of SAD comparisons per pixel. That is, the sizes of all regions can be set as in Equation 1.

[0125]

[0126] In Equation 1, α is a constant that controls the trade-off between gain and complexity. For example, α can be equal to 5.

[0127] To speed up the template matching process, the search range of all search regions can be subsampled by a factor of two. This reduces the template matching search by a factor of four. After the optimal match is found, a refinement process can be performed. This refinement process can be performed by performing a second template matching search around the optimal match with a reduced range. The reduced range can be defined as min(BlkW, BlkH) / 2.

[0128] The intra-template matching tool can be enabled for CUs with a width and height size of 64 or less. The maximum CU size for intra-template matching can be variable.

[0129] The intra-template matching prediction mode can be signaled at the CU level via a dedicated flag when decoder-side intra-mode derivation (DIMD) is not used for the current CU. Here, the dedicated flag can indicate whether the intra-template matching prediction mode is applied.

[0130] IntraTMP derived block vector candidates for IBC

[0131] Block vectors derived from intra-template matching prediction (IntraTMP BV) can be used for IBC. Stored IntraTMP BVs of neighboring blocks can be used as spatial BV candidates in constructing an IBC candidate list, along with the IBC BV.

[0132] IntraTMP BVs can be stored in the block vector buffer of the IBC. As shown in Fig. 9, the current IBC block can use both the IBC BVs and IntraTMP BVs of surrounding blocks as BV candidates for the IBC BV candidate list.

[0133] IntraTMP BVs may be added as spatial candidates to the IBC BV candidate list.

[0134] Example

[0135] The present disclosure proposes a template search area in IntraTMP technology. Furthermore, the present disclosure proposes a method for generating or deriving new samples for unavailable (unavailable) sample locations within a reference block and its template area (reference template area). According to the embodiments proposed in the present disclosure, the performance of IntraTMP can be improved.

[0136] In IntraTMP, template search areas can be set to specific areas R1, R2, R3, and R4, as shown in Figure 10, and searches can be performed for each search area. In this case, the scope of each search area can vary depending on the width and height of the current block, or the location of the current block. Furthermore, the scope of each search area can be determined by an agreement between the encoder and decoder.

[0137] When template search is performed using search areas, constraints may be applied to the scope of each search area (i.e., search range). For example, as illustrated in Fig. 11, when a search area is expressed by a position (StartX, StartY) and a position (EndX, EndY), (StartX, StartY) may be constrained to have a value greater than or equal to the (minimum) template size. For example, the template size may be a predetermined value of 4. (StartX, StartY) represents the upper-left position of the search area, StartX represents the horizontal position of the upper-left position of the search area, and StartY represents the vertical position of the upper-left position of the search area. (EndX, EndY) represents the lower-right position of the search area, EndX represents the horizontal position of the lower-right position of the search area, and EndY represents the vertical position of the lower-right position of the search area. As another example, as shown in Fig. 11, when the search area is expressed by positions (StartX, StartY) and (EndX, EndY), (EndX, EndY) can be restricted to have a value less than or equal to picture width - block width and a value less than or equal to picture height - block height, respectively.

[0138] These restrictions can reduce the complexity of the encoding and decoding processes by preventing excessive template search. However, conversely, these restrictions can degrade the prediction performance of IntraTMP. For example, as shown in FIG. 12, since a reference block that falls outside the search range to the left may be the block most similar to the current block, such restrictions on the search area (i.e., the search range) can degrade the prediction performance of IntraTMP. As another example, as shown in FIG. 13, since a reference block that falls outside the search range to the right may be the block most similar to the current block, such restrictions on the search area (i.e., the search range) can degrade the prediction performance of IntraTMP.

[0139] Below, various embodiments that can solve the problem of degraded prediction performance of IntraTMP due to limitations in the search area are described. The image encoding method described below can be performed by an image encoding device (100), and the image decoding method described below can be performed by an image decoding device (200).

[0140] FIG. 14 is a diagram illustrating an image encoding / decoding method according to one embodiment of the present disclosure.

[0141] Referring to FIG. 14, a search area related to the current block may be determined (S1410). There may be multiple search areas, and they may be determined in advance identically in the video encoding device (100) and the video decoding device (200). The size of the search area, i.e., the search range, may also be determined in advance identically in the video encoding device (100) and the video decoding device (200). For example, the search range may be determined based on the size of the current block, as in Mathematical Expression 1.

[0142] An error between a reference template region and a current template region can be induced (S1420). The reference template region is a template region for each reference block located within each search region, and may be a template region corresponding to each reference block or a template region of each reference block. The current template region is a template region of the current block, and may be a template region corresponding to the current block. The error can be induced based on a difference between the current template region and the reference template region. The error may be referred to as a “cost,” “error,” “difference,” “template cost,” etc. That is, in the present disclosure, “error,” “cost,” “error,” “difference,” “template cost,” etc. may have the same meaning. The error can be derived based on at least one of SAD (sum of difference), SATD (sum of transformed difference), SSE (sum of squared error), MR-SAD (mean-removed sum of difference), MR-SSE (mean-removed sum of squared error), and MR-SATD (mean-removed sum of transformed difference).

[0143] The reference block of the current block may be determined based on an error (S1430). For example, among the reference template regions, the reference template region with the smallest error (optimal) compared to the current template region may be determined, and the reference block corresponding to the determined reference template region may be determined as the reference block of the current block. Here, the reference block of the current block may be a reference block used for prediction of the current block.

[0144] FIG. 15 is a diagram illustrating an example of an image encoding / decoding method for searching for an optimal reference template area.

[0145] Referring to FIG. 15, a flag (IntraTMP flag) indicating whether IntraTMP is applied can be encoded in the bitstream, and the IntraTMP flag can be obtained from the bitstream. If the IntraTMP flag indicates that IntraTMP is applied (S1510), a search for a search area can be performed.

[0146] It can be determined whether the search for all predetermined search areas has been completed (S1520). If there are search areas for which the search has not been completed, a search range for the corresponding search area can be set (S1530). The setting of the search range may vary depending on the width and height of the current block, the position of the current block, etc. Alternatively, the search range may be preset as an agreement between the video encoding device (100) and the video decoding device (200).

[0147] In a defined search range, an error between a neighboring template (current template region) of a current block and a neighboring template (reference template region) of a reference block may be induced while moving a reference block by sub-sampling units (S1540). The S1540 process may be a process of inducing an error between a reference template region corresponding to a reference block at each movement position and the current template region while moving by a plurality of sample units. In the search process, the bv position of the reference block may be added to a candidate list in the order of lowest error. The size of the candidate list may be defined by an agreement between the image encoding device (100) and the image decoding device (200). For example, the size of the candidate list may be 1, 4, 15, 19, or 30. The error may be induced based on at least one of SAD, SATD, SSE, MR-SAD, MR-SSE, and MR-SATD.

[0148] When the search for all predetermined search areas is completed, a search for position refinement may be performed for the surrounding positions of each candidate in the candidate list (S1550, S1560). For example, the error between the template adjacent to the current block (current template area) and the template adjacent to the candidate reference block (reference template area) may be induced by moving the reference block by 1 pixel within the search range defined between the image encoding device (100) and the image decoding device (200). This refinement search may have eight adjacent positions centered around the candidate reference block position (Candidate pixel position) as the search range, as shown in (a) of FIG. 16. In addition, during the search process, the bv positions of the reference blocks may be added to the candidate list in descending order of error. The error may be induced based on at least one of SAD, SATD, SSE, MR-SAD, MR-SSE, and MR-SATD.

[0149] A search for surrounding sub-pel locations can be performed for a candidate within the candidate list (S1570). As shown in (b) of Fig. 16, the sub-pel search can be performed in units of 1 / 4, 1 / 2, and 3 / 4 positions, and the search direction can be in eight neighboring directions centered around the position of the candidate reference block (Candidate pixel position). Whether or not to perform a sub-pel search can be signaled or determined by an agreement between the video encoding device (100) and the video decoding device (200).

[0150] Example 1

[0151] Example 1 describes a method for changing or removing restrictions on the search area of ​​IntraTMP.

[0152] There may be no restrictions on the start position of the search area of ​​IntraTMP. For example, StratX and StratY in FIG. 11 may each have values ​​less than a predetermined template size. On the other hand, there may be no restrictions on the end position of the search area of ​​IntraTMP. For example, EndX in FIG. 11 may have a value greater than or equal to picture width - block width, and EndY may have a value greater than or equal to picture height - block height.

[0153] As an example for Example 1, StartX, StartY, EndX and EndY of the search area can be defined as in Table 1.

[0154]

[0155] In Table 1 and Tables 2 to 4 described below, iTemplateSize represents a given template size, iCurrY represents the y-position (vertical position) of the current block, and iCurrX represents the x-position (horizontal position) of the current block. iTemplateSize may be 4. In addition, iBlkHeight represents the height of the current block, iBlkWidth represents the width of the current block, and TMP_SEARCH_RANGE_MULT_FACTOR may represent a value required to obtain a search range. For example, TMP_SEARCH_RANGE_MULT_FACTOR may be 5. Also, searchRangeHeight represents TMP_SEARCH_RANGE_MULT_FACTOR * uiBlkWidth, searchRangeWidth represents TMP_SEARCH_RANGE_MULT_FACTOR * uiBlkHeight, PicHeight represents the height of the picture, and PicWidth represents the width of the picture. Also, ctuRsAddrY represents the y position (vertical position) of the current CTU, ctuRsAddrX represents the x position (vertical position) of the current CUT, offsetLCUY represents iCurrY - ctuRsAddrY, and offsetLCUX represents iCurrY - ctuRsAddrX.

[0156] In Table 1, StartX can be std::max( α, iCurrX - searchRangeWidth ). Therefore, the upper left position of the search area (StartX) can be determined based on the position of the current block (iCurrX) and the given search range (searchRangeWidth). Since α can be a real number with 0≤α≤iTemplateSize, StartX, which is the horizontal position of the upper left position of the search area, can have a value less than the given template size.

[0157] In Table 1, EndX can be std::min( iCurrX + searchRangeWidth , PicWidth - β ). Therefore, the lower right position of the search area (EndX) can be determined based on the position of the current block (iCurrX) and the given search range (searchRangeWidth). Since β can be a real number with 0 ≤ β ≤ iBlkWidth, EndX, which is the horizontal position of the lower right position of the search area, can have a value that exceeds the size difference between the current picture and the current block.

[0158] As another example for Example 1, StartX, StartY, EndX and EndY of the search area can be defined as in Table 2.

[0159]

[0160] In Table 2, StartX can be std::max( α, iCurrX - searchRangeWidth). Therefore, the upper left position of the search area (StartX) can be determined based on the position of the current block (iCurrX) and the given search range (searchRangeWidth). Since α can be a real number with 0≤α≤iTemplateSize, StartX, which is the horizontal position of the upper left position of the search area, can have a value less than the given template size.

[0161] In Table 2, StartY can be std::max( α, iCurrY - iBlkHeight - offsetLCUY ). Therefore, the upper left position of the search area (StartY) can be determined based on the position of the current block (iCurrY), the size of the current block (iBlkHeight), and the position of the current CTU (offsetLCUY = iCurrY - ctuRsAddrY). Since α can be a real number with 0≤α≤iTemplateSize, StartY, which is the vertical position of the upper left position of the search area, can have a value less than a given template size.

[0162] As another example for Example 1, StartX, StartY, EndX and EndY of the search area can be defined as in Table 3.

[0163]

[0164] In Table 3, EndY can be std::min(PicHeight - β, iCurrY - offsetLCUY + getCTUSize - iBlkHeight). Therefore, the bottom right position (EndY) of the search area can be determined based on the position of the current block (iCurrY), the size of the current block (iBlkHeight), the height of the current picture (PicHeight), the position of the current CTU (offsetLCUY = iCurrY - ctuRsAddrY), and the size of the current CTU (getCTUSize). Since β can be a real number with 0≤β≤iBlkWidth, EndY, which is the vertical position of the bottom right position of the search area, can have a value that exceeds the size difference between the current picture and the current block.

[0165] In Table 3, StartX can be std::max(α, iCurrX - searchRangeWidth). Therefore, the upper left position of the search area (StartX) can be determined based on the position of the current block (iCurrX) and the given search range (searchRangeWidth). Since α can be a real number with 0≤α≤iTemplateSize, StartX, which is the horizontal position of the upper left position of the search area, can have a value less than the given template size.

[0166] As another example for Example 1, StartX, StartY, EndX and EndY of the search area can be defined as in Table 4.

[0167]

[0168] In Table 4, StartY can be std::max(α, iCurrY - offsetLCUY - iBlkHeight + 1). Therefore, the upper left position of the search area (StartY) can be determined based on the position of the current block (iCurrY), the size of the current block (iBlkHeight), and the position of the current CTU (offsetLCUY = iCurrY - ctuRsAddrY). Since α can be a real number with 0≤α≤iTemplateSize, StartY, which is the vertical position of the upper left position of the search area, can have a value less than a given template size.

[0169] In Table 4, StartX can be std::max(α, iCurrX - offsetLCUX - iBlkWidth + 1). Therefore, the upper left position of the search area (StartX) can be determined based on the position of the current block (iCurrX), the size of the current block (iBlkWeight), and the position of the current CTU (offsetLCUX iCurrX - ctuRsAddrX). Since α can be a real number with 0≤α≤iTemplateSize, StartX, which is the horizontal position of the upper left position of the search area, can have a value less than a given template size.

[0170] For StartX, StartY, EndX and EndY defined by examples according to Tables 1 to 4, mvMin, mvMax, mvMax and mvMin can be derived as shown in Table 5.

[0171]

[0172] In Table 5 and Figure 17, (mvXMin, mvYMin) may be bv indicating the start position (upper left position) of the search area, and (mvXMax, mvYMax) may be bv indicating the end position (lower right position) of the search area.

[0173] Example 2

[0174] When the restriction on the search area is changed or removed according to Example 1, there may be a case where there are no restored samples in the process of inducing an error between the current template area and the reference template area. That is, as illustrated in FIG. 18, among the samples in the reference template area or the reference block, there may be samples that fall outside the picture boundary or the CTU boundary, and there may not be restored sample values ​​for these samples. Here, a sample for which there is a restored sample value may be referred to as an "Available sample," and a sample for which there is no restored sample value may be referred to as a "Not available sample."

[0175] Example 2 describes a method for deriving values ​​of unavailable samples from values ​​of available samples.

[0176] As an example for Example 2, if some samples within the reference template area and / or the reference block are unavailable samples, the values ​​of the unavailable samples can be derived by padding the available samples into the unavailable sample positions.

[0177] For example, as in (a) of Fig. 19, if an unavailable sample exists on the upper side of the reference template area, the value of the unavailable sample can be derived by padding the nearest available sample in the vertical direction. As another example, as in (b) of Fig. 19, if an unavailable sample exists on the left side of the reference template area, the value of the unavailable sample can be derived by padding the nearest available sample in the horizontal direction. As another example, as in (c) of Fig. 19, if an unavailable sample exists on the left and upper side of the reference template area, the value of the unavailable sample can be derived by padding the nearest available sample in the vertical and horizontal directions. The value of the unavailable sample located at the upper left position can be derived by padding the nearest available sample. As another example, as in (a) of Fig. 20, if an unavailable sample exists on the right side of the reference template area and the reference block, the value of the unavailable sample can be derived by padding the nearest available sample in the horizontal direction. Here, the available samples used for padding may exist in the reference template area and the reference block. As another example, as in (b) of Fig. 20, if there are unavailable samples in the lower part of the reference template area and the reference block, the values ​​of the unavailable samples can be derived by vertically padding the nearest available sample. Here, the available samples used for padding can exist in the reference template area and the reference block. In the above, the padding was described with a focus on the L-shaped template, but the padding can be equally applied to the Above shape template or the Left shape template.

[0178] As another example for Example 2, if some samples within the reference template area and / or the reference block are unavailable samples, the values ​​of the unavailable samples can be derived by averaging the values ​​of the available samples.

[0179] For example, as in (a) of Fig. 21, when there is an unavailable sample on the upper side of the reference template area, the value of the unavailable sample can be derived from the average value of the available samples. In Figs. 21 to 25, 'a' represents the average value of the available samples, which may be a real number. 'b' may represent available samples used to calculate the average value. The average value may be the average of the available samples within the reference template area or the average of the upper available samples within the reference template area ((b) of Fig. 21). Alternatively, the average value may be the average of the available samples ((c) of Fig. 21) closest to the unavailable sample.

[0180] As another example, as in (a) of Fig. 22, when there is an unavailable sample on the left side of the reference template area, the value of the unavailable sample can be derived from the average value of the available samples. The average value can be the average of the available samples within the reference template area or the average of the available samples on the left side of the reference template area ((b) of Fig. 22). Alternatively, the average value can be the average of the available samples closest to the unavailable sample ((c) of Fig. 22).

[0181] As another example, as in (a) of Fig. 23, when unavailable samples exist on the left and upper sides of the reference template area, the value of the unavailable sample can be derived from the average value of the available samples. The average value can be the average of the available samples within the reference template area or the average of the available samples closest to the unavailable sample ((b) of Fig. 23).

[0182] As another example, as in (a) of Fig. 24, when there are unavailable samples on the right side of the reference template area and the reference block, the value of the unavailable sample can be derived from the average value of the available samples. The average value can be the average of the available samples within the reference template area and the reference block, or the average of the available samples on the right side within the reference template area and the reference block ((b) of Fig. 24), or the average value can be the average of the available samples closest to the unavailable sample ((c) of Fig. 24).

[0183] As another example, as in (a) of FIG. 25, when there are unavailable samples in the lower part of the reference template area and the reference block, the value of the unavailable sample can be derived from the average value of the available samples. The average value can be the average of the available samples in the reference template area and the reference block, or the average of the available samples in the lower part of the reference template area and the reference block ((b) of FIG. 25), or the average value can be the average of the available samples closest to the unavailable sample ((c) of FIG. 25).

[0184] In the above, padding was described focusing on the L-shaped template, but the padding can be equally applied to the Above shape template or the Left shape template.

[0185] Figure 26 is a drawing for explaining an example of an image encoding / decoding method for Example 2.

[0186] Referring to FIG. 26, it may be determined whether at least one unavailable sample (unavailable sample) exists within the reference template region (S2610). If an unavailable sample exists within the reference template region, the value of the unavailable sample may be derived based on at least one available sample (available sample) within the reference template region (S2620). For example, the value of the unavailable sample may be derived by padding the available samples or based on the average value of the available samples. In addition, the available samples used to derive the unavailable sample value may be all available samples within the reference template region, or available samples located at a specific location (upper, left, upper left, right, or lower) within the reference template region. Alternatively, the available samples used to derive the unavailable sample value may be the available samples closest to the unavailable sample.

[0187] FIG. 27 is a drawing for explaining another example of an image encoding / decoding method for Example 2.

[0188] Referring to FIG. 27, it can be determined whether the right samples or the lower samples within the reference block correspond to unavailable samples (S2710). If the right samples or the lower samples within the reference block are unavailable samples, the value of the unavailable sample can be derived based on the available samples within the reference template area and / or the reference block (S2720). For example, the value of the unavailable sample can be derived by padding the available samples or based on the average value of the available samples. When the value of the unavailable sample is derived through padding, the available samples within the reference block can be used for padding. When the value of the unavailable sample is derived through average value derivation, the available samples within the reference template area and the reference block can be used for average value derivation. The available samples used for deriving the value of the unavailable sample can be all available samples within the reference template area and / or the reference block, or available samples located at a specific location (or lower) within the reference template area and / or the reference block. Alternatively, the available samples used to derive the unavailable sample values ​​may be the available samples closest to the unavailable sample.

[0189] In Example 2, a method for deriving a value of an unavailable sample is described for all cases where the unavailable sample is present above the reference template area, the unavailable sample is present on the left side of the reference template area, the unavailable sample is present on the right side of the reference template area and the reference block, and the unavailable sample is present on the lower side of the reference template area and the reference block. However, the method for deriving a value of an unavailable sample may be limited to be performed only when the unavailable sample is present above the reference template area and when the unavailable sample is present on the left side of the reference template area.

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

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

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

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

[0194] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server can transmit multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server may control commands / responses between each device within the content streaming system.

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

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

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

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

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

Claims

1. An image decoding method performed by an image decoding device, A step of determining the search area related to the current block; A step of inducing an error between a reference template region, which is a template region of each reference block in the search region, and a current template region, which is a template region of the current block; and An image decoding method, comprising a step of determining a reference block of the current block based on the above error.

2. In paragraph 1, A method for decoding an image, wherein the upper left position of the above search area is determined based on the position of the current block and a predetermined search range.

3. In paragraph 2, A method for decoding an image, wherein the upper left position of the above search area is determined further based on the size of the current block and the position of the current coding tree unit (CTU).

4. In paragraph 1, An image decoding method, wherein at least one of the horizontal and vertical positions of the upper left position of the above search area has a value less than a predetermined template size.

5. In paragraph 1, A method for decoding an image, wherein the lower right position of the above search area is determined based on the position of the current block and a predetermined search range.

6. In paragraph 5, A method for decoding an image, wherein the lower right position of the above search area is determined based on the position of the current coding tree unit (CTU) and the size of the CTU.

7. In paragraph 1, A video decoding method, wherein at least one of the horizontal and vertical positions of the lower right position of the above search area has a value exceeding the size difference between the current picture and the current block.

8. In paragraph 1, A method for decoding an image, wherein, based on at least one sample being unavailable within the reference template region, the value of the unavailable at least one sample is derived based on at least one sample being available within the reference template region.

9. In paragraph 8, A method for decoding an image, wherein at least one available sample within the above reference template area is the closest sample to at least one unavailable sample.

10. In paragraph 8, A method for decoding an image, wherein the values ​​of the unavailable right samples or lower samples within the reference block are derived based on the available samples within the reference block.

11. In paragraph 8, A method for decoding an image, wherein the value of at least one unavailable sample is derived based on an average value of available samples within the reference template region.

12. An image encoding method performed by an image encoding device, A step of determining the search area related to the current block; A step of inducing an error between a reference template region, which is a template region of each reference block in the search region, and a current template region, which is a template region of the current block; and A video encoding method, comprising a step of determining a reference block of the current block based on the above error.

13. A computer-readable recording medium storing a bitstream generated by the image encoding method of Article 12.

14. A method for transmitting a bitstream generated by an image encoding method, wherein the image encoding method comprises: A step of determining the search area related to the current block; A step of inducing an error between a reference template region, which is a template region of each reference block in the search region, and a current template region, which is a template region of the current block; and A method comprising the step of determining a reference block of the current block based on the above error.

Citation Information

Patent Citations

  • Template matching intra-frame sub-division method

    CN111629207A

  • Method, apparatus and system for rapid motion search applied in template matching

    US20150181219A1

  • Predictive coding concept using template matching

    US20190364283A1

  • Video codec using template matching prediction

    WO2019228660A1

  • Template matching based motion vector refinement in video coding system

    WO2023020588A1