Image encoding / decoding method based on multiple reference lines, method for transmitting bitstream, and recording medium on which bitstream is stored

By adopting a template-based multi-reference line mode in image encoding/decoding, the problem of low high-resolution image encoding/decoding efficiency in the prior art is solved, and more efficient prediction and coding effects are achieved.

CN119452637APending Publication Date: 2025-02-14LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380048211.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-06-29
Filing Date
2023-06-26
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The prior art is difficult to effectively improve the encoding/decoding efficiency of high resolution and high-quality images, resulting in increased transmission and storage costs.

Method used

The template-based multi-reference pattern is adopted to improve the accuracy and encoding efficiency of intra prediction by generating and reordering multiple reference indexes, combining vertical and horizontal reference indexes.

Benefits of technology

Improves image encoding/decoding efficiency, improves prediction performance and bit efficiency, and reduces transmission and storage costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119452637A_ABST
    Figure CN119452637A_ABST
Patent Text Reader

Abstract

An image encoding / decoding method, a bit stream transmission method, and a computer-readable recording medium on which a bit stream is stored are provided. According to the present disclosure, a method by which an image decoding device decodes an image may comprise: generating a prediction value obtained by predicting a first reference line for a current block on the basis of each of a plurality of reference lines for the current block; calculating an error between the corresponding predicted value and a recovery value of the first reference line; and deriving, based on the error, at least one second reference line to be used for intra prediction of the current block among the plurality of reference lines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to an image encoding / decoding method and apparatus, a method of transmitting a bitstream, and a recording medium storing the bitstream, and to prediction based on a plurality of reference lines. Background Art

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

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

[0004] Public Content

[0005] Technical issues

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

[0007] In addition, the present disclosure aims to propose a template-based multi-reference line mode.

[0008] In addition, an object of the present disclosure is to propose a method for deriving multiple reference line indexes based on a template.

[0009] In addition, an object of the present disclosure is to propose a method for reordering a list of multiple reference line index candidates based on a template.

[0010] In addition, an object of the present disclosure is to propose a method of combining vertical multiple reference line indexes and horizontal multiple reference line indexes.

[0011] In addition, an object of the present disclosure is to provide a recording medium storing a bit stream generated by the image encoding method apparatus according to the present disclosure.

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

[0013] In addition, an object of the present disclosure is to provide a method of transmitting a bit stream generated by the image encoding method or apparatus according to the present disclosure.

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

[0015] Technical Solution

[0016] An image decoding method according to one aspect of the present disclosure is an image decoding method performed by an image decoding device. The image decoding method may include: generating a prediction value obtained by predicting a first reference line for a current block based on each of a plurality of reference lines for a current block; calculating an error between the prediction value and a reconstructed value of the first reference line; and deriving at least one second reference line to be used for intra-frame prediction of the current block among the plurality of reference lines based on the error.

[0017] According to another aspect of the present disclosure, an image encoding method is an image encoding method performed by an image encoding device. The image encoding method may include: generating a prediction value obtained by predicting a first reference line for a current block based on each of a plurality of reference lines for a current block; calculating an error between the prediction value and a reconstructed value of the first reference line; and deriving at least one second reference line to be used for intra-frame prediction of the current block among the plurality of reference lines based on the error.

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

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

[0020] The features briefly summarized above with respect to the present disclosure are merely exemplary aspects of the disclosure described in detail below and do not limit the scope of the disclosure.

[0021] Beneficial Effects

[0022] According to the present disclosure, an image encoding / decoding method and apparatus with improved encoding / decoding efficiency can be provided.

[0023] Furthermore, according to the present disclosure, by deriving a plurality of reference line indexes without signaling them, prediction performance can be improved and coding efficiency can be increased.

[0024] Furthermore, according to the present disclosure, by reordering a plurality of reference line index candidates, the bit efficiency for corresponding index signaling can be improved.

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

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

[0027] Furthermore, according to the present disclosure, a method of transmitting a bit stream generated by an image encoding method can be provided.

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

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

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

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

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

[0033] Figure 5 It is a diagram schematically showing an intra prediction unit in the image encoding device.

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

[0035] Figure 7 It is a diagram schematically showing an intra prediction unit in an image decoding device.

[0036] Figure 8 is a diagram for explaining a method of deriving an intra mode based on a template.

[0037] Fig. 9 and Fig.10 is a diagram used to explain the multiple reference line mode.

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

[0039] Fig.12 and Fig.13 is a diagram for explaining the template-based multi-reference line mode.

[0040] Fig.14is a flowchart illustrating an image encoding method according to another embodiment of the present disclosure.

[0041] Fig.15 is a flowchart illustrating an image decoding method according to another embodiment of the present disclosure.

[0042] Fig.16 is a flowchart illustrating an image encoding method and an image decoding method according to another embodiment of the present disclosure.

[0043] Fig.17 It is a drawing for explaining the combination between reference lines.

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

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

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

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

[0048] In the present disclosure, the terms first, second, etc. are used only for the purpose of distinguishing one component from other components, and do not limit the order or importance of the components unless otherwise specified. Accordingly, within the scope of the present disclosure, the first component in one embodiment may be referred to as the second component in another embodiment, and similarly, the second component in one embodiment may be referred to as the first component in another embodiment.

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

[0050] In the present disclosure, the components described in the various embodiments are not necessarily essential components, and some components may be optional components. Therefore, embodiments consisting of a subset of the components described in the embodiments are also included in the scope of the present disclosure. In addition, embodiments that include other components in addition to the components described in the various embodiments are included in the scope of the present disclosure.

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

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

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

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

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

[0056] In addition, in the present disclosure, unless explicitly stated as a chroma block, "current block" may mean a block including both a luma component block and a chroma component block or a "luminance block of the current block". The luma component block of the current block may be expressed by an explicit description including a luma component block such as "luminance block" or "current luma block". In addition, "chroma component block of the current block" may be expressed by an explicit description including a chroma component block such as "chroma block" or "current chroma block".

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

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

[0059] Video compilation system overview

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

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

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

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

[0064] The coding unit 12 may encode the input video / image. For compression and coding efficiency, the coding unit 12 may perform a series of processes such as prediction, transformation, and quantization. The coding unit 12 may output coded data (coded video / image information) in the form of a bitstream.

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

[0066] The decoding unit 22 may decode a video / image by performing a series of processes corresponding to the operation of the coding unit 12, such as dequantization, inverse transformation, and prediction.

[0067] The renderer 23 may render the decoded video / image. The rendered video / image may be displayed through a display.

[0068] Overview of Image Coding Device

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0087] Overview of Image Decoding Device

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0104] Intra-frame prediction

[0105] Based on the reference samples in the picture to which the current block belongs (hereinafter referred to as the current picture), the intra prediction may represent a prediction for generating a prediction sample for the current block. When the intra prediction is applied to the current block, the neighboring reference samples for the intra prediction of the current block may be derived. The neighboring reference samples of the current block may include a total of 2xnh samples adjacent to the left boundary of the current block having a size of nWxnH and samples adjacent to the lower left, a total of 2xnW samples adjacent to the upper boundary of the current block and samples adjacent to the upper right, and one sample adjacent to the upper left of the current block. Alternatively, the neighboring reference samples of the current block may include multiple columns of upper neighboring samples and multiple rows of left neighboring samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block having a size of nWxnH, a total of nW samples adjacent to the lower boundary of the current block, and one sample adjacent to the lower right boundary of the current block.

[0106] However, some neighboring reference samples of the current block have not been decoded or may not be available. In this case, the image decoding device 200 can construct neighboring reference samples to be used for prediction by replacing unavailable samples with available samples. Alternatively, the neighboring reference samples to be used for prediction can be constructed by interpolation of available samples.

[0107] When the neighboring reference samples are derived, (i) the prediction samples may be derived based on the average or interpolation of the neighboring reference samples of the current block, and (ii) the prediction samples may be derived based on the reference samples existing in a specific (prediction) direction relative to the prediction samples among the neighboring reference samples of the current block. The case of (i) may be referred to as a non-directional mode or a non-angular mode, and the case of (ii) may be referred to as a directional mode or an angular mode. In addition, the prediction samples may be generated by interpolating the second neighboring samples and the first neighboring samples located in the opposite direction of the prediction direction of the intra prediction mode of the current block based on the prediction samples of the current block among the neighboring reference samples. The case described above may be referred to as linear interpolation intra prediction (LIP). In addition, the chrominance prediction samples may be generated based on the luminance samples using a linear model. This case may be referred to as an LM mode. In addition, the temporary prediction samples of the current block may be derived based on the filtered neighboring reference samples, and the prediction samples of the current block may be derived by weighted summing at least one reference sample derived according to the intra prediction mode among the existing neighboring reference samples (that is, the unfiltered neighboring reference samples) and the temporary prediction samples. The case described above may be referred to as position-dependent intra prediction (PDPC). In addition, a reference sample row with the highest prediction accuracy is selected from among multiple neighboring reference sample rows of the current block to derive a prediction sample using a reference sample in a prediction direction located in the corresponding row, and at this time, intra-frame prediction encoding can be performed by indicating (signaling) the reference sample row used to the image decoding device 200. The situation described above may be referred to as multi-reference row (MRL) intra-frame prediction or MRL-based intra-frame prediction. In addition, by dividing the current block into vertical or horizontal sub-partitions, intra-frame prediction is performed based on the same intra-frame prediction mode, and neighboring reference samples may be derived and used in units of sub-partitions. That is, in this case, the intra-frame prediction mode for the current block is also applied to the sub-partition, but in some cases the intra-frame prediction performance may be improved by deriving and using neighboring reference samples in units of sub-partitions. This prediction method may be referred to as intra-frame sub-partitioning (ISP) or intra-frame prediction based on ISP. The intra-frame prediction method described above may be referred to as an intra-frame prediction type to distinguish it from the intra-frame prediction mode in the table of directory 1.2. The intra-frame prediction type may be referred to as various terms such as intra-frame prediction technology or additional intra-frame prediction mode. For example, the intra prediction type (or additional intra prediction mode, etc.) may include at least one of the aforementioned LIP, PDPC, MRL, or ISP. A general intra prediction method excluding a specific intra prediction type such as LIP, LM, PDPC, MRL, and ISP may be referred to as a normal intra prediction type. When the above-mentioned specific intra prediction type is not applied, a normal intra prediction type may generally be applied, and prediction may be performed based on the intra prediction mode described above.Also, post-processing filtering may be performed on the derived prediction samples if desired.

[0108] Specifically, the intra prediction process may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and a prediction sample derivation step based on the intra prediction mode / type. In addition, if necessary, a post-filtering step may be performed on the derived prediction samples.

[0109] Meanwhile, in addition to the intra prediction types described above, affine linear weighted intra prediction (ALWIP) can also be used. ALWIP may be referred to as linear weighted intra prediction (LWIP), or matrix weighted intra prediction, or matrix-based intra prediction (MIP). If MIP is applied to the current block, i) neighboring reference samples to which an averaging process has been performed are used, ii) a matrix vector multiplication process is performed, and iii) a horizontal / vertical interpolation process is further performed if necessary to derive a prediction sample for the current block. The intra prediction mode for MIP may be configured to be different from the intra prediction mode used in LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction. The intra prediction mode for MIP may be referred to as MIP intra prediction mode, MIP prediction mode, or MIP mode. For example, the matrix and offset used in the matrix vector multiplication may be set differently according to the intra prediction mode for MIP. Here, the matrix may be referred to as a (MIP) weighting matrix, and the offset may be referred to as a (MIP) offset vector or a (MIP) deviation vector. The detailed MIP method will be described later.

[0110] The block reconstruction process based on intra-frame prediction and the intra-frame prediction unit 185 in the image encoding device 100 may illustratively include, for example, Figure 4 and Figure 5 .

[0111] Step S400 may be performed by the intra prediction unit 185 of the image encoding device 100, and step S410 may be performed by the residual processor of the image encoding device 100. Specifically, step S410 may be performed by the subtractor 115 of the image encoding device 100. In step S420, prediction information may be derived by the intra prediction unit 185 and encoded by the entropy encoder 190. In step S420, residual information may be derived by the residual processor and encoded by the entropy encoder 190. The residual information is information about the residual sample. The residual information may include information about the quantized transform coefficient for the residual sample. As described above, the residual sample may be derived as a transform coefficient by the transformer 120 of the image encoding device 100, and the transform coefficient may be derived as a quantized transform coefficient by the quantizer 130. Information about the quantized transform coefficient may be encoded in the entropy encoder 190 through a residual coding process.

[0112] The image encoding device 100 performs intra prediction on the current block (S400). The image encoding device 100 may derive an intra prediction mode / type for the current block, derive neighboring reference samples of the current block, and generate prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the process for determining the intra prediction mode / type, the process for deriving neighboring reference samples, and the process for generating prediction samples may be performed simultaneously, or any one process may be performed before the other process. For example, the intra prediction unit 185 of the image 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 the intra prediction mode / type for the current block, the reference sample derivation unit 187 may derive neighboring reference samples of the current block, and the prediction sample derivation unit 188 may derive prediction samples of the current block. Meanwhile, although not shown, when performing a prediction sample filtering process, the intra prediction unit 185 may further include a prediction sample filter (not shown). The image encoding device 100 may determine a mode / type applied to a current block among a plurality of intra prediction modes / types. The image encoding device 100 may compare RD costs of intra prediction modes / types and determine an optimal intra prediction mode / type for the current block.

[0113] At the same time, the image encoding device 100 may perform a prediction sample filtering process. 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 process. In some cases, the prediction sample filtering process may be omitted.

[0114] The image encoding device 100 may generate residual samples for the current block based on the (filtered) prediction samples (S410). The image encoding device 100 may compare the prediction samples with the original samples of the current block based on a phase and derive the residual samples.

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

[0116] The residual information may include a residual coding syntax described below. The image encoding apparatus 100 may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information on the quantized transform coefficients.

[0117] At the same time, as described above, the image encoding device 100 can generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the image encoding device 100 can perform dequantization / inverse transformation on the quantized transform coefficients again to derive (modified) residual samples. The residual samples are transformed / quantized and then dequantized / inverse transformed to derive residual samples that are the same as the residual samples derived in the image decoding device 200 as described above. The image encoding device 100 can generate a reconstructed block including reconstructed samples for the current block based on the predicted samples and the (modified) residual samples. A reconstructed picture for the current picture can be generated based on the reconstructed block. As described above, the in-loop filtering process can be further applied to the reconstructed picture.

[0118] The video / image decoding process based on intra-frame prediction and the intra-frame prediction unit in the image decoding device 200 may schematically include, for example, the following contents.

[0119] The image decoding device 200 may perform an operation corresponding to the operation performed by the image encoding device 100 .

[0120] Steps S600 to S620 may be performed by the intra prediction unit 265 of the image decoding device 200, and the prediction information of step S600 and the residual information of step S630 may be obtained from the bitstream by the entropy decoding unit 210 of the image decoding device 200. The residual processor of the image decoding device 200 may derive residual samples for the current block based on the residual information. Specifically, the dequantizer 220 of the residual processor may perform dequantization according to the quantized transform coefficient derived based on the residual information to derive the transform coefficient, and the inverse transformer 230 of the residual processor may perform inverse transformation on the transform coefficient to derive the residual sample for the current block. Step S640 may be performed by the adder 235 or the reconstructor of the image decoding device 200.

[0121] Specifically, the image decoding device 200 may derive the intra prediction mode / type of the current block based on the received prediction information (intra prediction mode / type information) (S600). The image decoding device 200 may derive the neighboring reference samples of the current block (S610). The image decoding device 200 may generate prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples (S620). In this case, the image decoding device 200 may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.

[0122] The image decoding device 200 generates residual samples for the current block based on the received residual information. The image decoding device 200 may generate reconstructed samples for the current block based on the predicted samples and the residual samples, and derive a reconstructed block including the reconstructed samples (S630). A reconstructed picture for the current picture may be generated based on the reconstructed block. As described above, the in-loop filtering process may be further applied to the reconstructed picture.

[0123] Here, the intra prediction unit 265 of the image decoding device 200 may include an intra prediction mode / type determination unit 266, which may determine the intra prediction mode / type for the current block based on the intra prediction mode / type information generated and signaled by the intra prediction mode / type determination unit 186 of the image encoding device 100, a reference sample derivation unit 267, and a prediction sample derivation unit 268. The reference sample derivation unit 267 may derive the neighboring reference samples of the current block, and the prediction sample derivation unit 268 may derive the prediction sample of the current block. Meanwhile, although not shown, when performing the prediction sample filtering process described above, the intra prediction unit 265 may further include a prediction sample filter (not shown).

[0124] The intra-frame prediction mode information may include flag information (e.g., intra_luma_mpm_flag) specifying whether the most probable mode (MPM) or the residual 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) specifying one of the intra-frame prediction mode candidates (MPM candidates). The intra-frame 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-frame prediction mode information may further include residual mode information (e.g., intra_luma_mpm_remainder) specifying one of the remaining intra-frame prediction modes excluding the intra-frame prediction mode candidates (MPM candidates). The image decoding device 200 may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information. For the MIP described above, a separate MPM list may be configured.

[0125] In addition, the intra-frame prediction type information can be implemented in various forms. For example, the intra-frame prediction type information may include intra-frame prediction type index information specifying one of the intra-frame prediction types. As another example, the intra-frame prediction type information may include at least one of the following: reference sample line information (e.g., intra_luma_ref_idx) specifying whether MRL is applied to the current block and which reference sample line to use if applied, ISP flag information (e.g., intra_subpartitions_mode_flag) specifying whether ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) specifying the split type of the sub-partition when ISP is applied, flag information specifying whether PDCP is applied, or flag information specifying whether LIP is applied. In addition, the intra-frame prediction type information may include a MIP flag specifying whether MIP is applied to the current block.

[0126] Intra-frame prediction mode information and / or intra-frame prediction type information can be encoded / decoded by the coding method described in the present disclosure. For example, intra-frame prediction mode information and / or intra-frame prediction type information can be encoded / decoded by entropy coding based on truncated (Rice) binary code (e.g., CABAC or CAVLC).

[0127] Template-based Intra Mode Derivation (TIMD)

[0128] Figure 8 is a diagram for explaining a template-based intra mode (TIMD) method.

[0129] In TIMD, for the intra prediction modes (IPM) of adjacent intra blocks and inter blocks, the sum of absolute transform differences (SATD) between the predicted block predicted from the template region and the actual reconstructed samples can be obtained, and the mode with the smallest SATD can be selected as the intra mode of the current block.

[0130] Alternatively, in TIMD, two modes having the smallest SATD may be selected, and then prediction blocks for the two prediction modes may be mixed using a weighted sum method to be used as a prediction block for the current block.

[0131] When the following condition (Formula 1) is satisfied, a method of mixing two modes can be applied.

[0132] [Formula 1]

[0133] .

[0134] If the above conditions are met, the two modes are mixed to generate a prediction block, otherwise only one mode with the minimum SATD value can be selected.

[0135] When mixing two prediction blocks, the weight ratio is as shown in Equation 2 below.

[0136] [Formula 2]

[0137]

[0138] Multiple Reference Line (MRL) Intra Prediction

[0139] Fig. 9 and Fig.10 is a diagram for explaining a multiple reference line (MRL) (intra prediction) mode.

[0140] In conventional intra prediction, only the neighboring samples of the first row at the top and the first row at the left of the current block are used as reference samples for intra prediction. However, in the multiple reference line (MRL) method, neighboring samples located on a sample line separated by one to three samples above and / or to the left of the current block can be used as reference samples to perform intra prediction. Fig. 9 is a view illustrating multiple reference lines. Here, a multiple reference line index (eg, mrl_idx) indicates which line is used for intra prediction of a current block.

[0141] For example, the multiple reference line index may be signaled via the coding unit syntax of Table 1. The multiple reference line index may be configured in the form of an intra_luma_ref_idx syntax element.

[0142] [Table 1]

[0143]

[0144] intra_luma_ref_idx may specify the intra-frame reference line index IntraLumaRefLineIdx[x0][y0] shown in Table 2. If intra_luma_ref_idx does not exist, the value of intra_luma_ref_idx may be inferred to be 0. intra_luma_ref_idx may be referred to as (intra-frame) reference sample line index mrl_idx or index information. In addition, intra_luma_ref_idx may also be referred to as intra_luma_ref_line_idx.

[0145] [Table 2]

[0146]

[0147] MRL can be disabled for blocks on the first line (row) within a CTU. This is to prevent the use of extended reference lines outside the current CTU line. In addition, PDPC can be disabled when using the additional reference lines described above.

[0148] In the MRL method, intra prediction is performed using neighboring samples located in a sample line spaced one to three samples above and / or to the left of the current block as reference samples, but in the extended MRL method, it is extended so that intra prediction is performed using neighboring samples located in a sample line spaced twelve samples above and / or to the left of the current block as reference samples. The reference sample line index of the extended MRL list consists of {1, 3, 5, 7, 12}, and Fig.10 An example of the extended MRL candidate list is shown. In addition, Table 3 shows the relationship between intra_luma_ref_idx and IntraLumaRefLineIdx[x0][y0] in the extended MRL.

[0149] [Table 3]

[0150]

[0151] Example

[0152] The present disclosure proposes embodiments for performing MRL based on templates. Fig.11 is a flowchart illustrating an image encoding method and an image decoding method according to an embodiment of the present disclosure.

[0153] refer to Fig.11 , the image encoding device 100 and the image decoding device 200 may generate a prediction value for a first reference line ( S1110 ).

[0154] The first reference line may correspond to any one of the multiple reference lines that may be used for MRL. Here, the multiple reference lines may correspond to the reference lines used for the current block. In addition, the first reference line may correspond to the template of the TIMD described above. The first reference line may be the reference line closest to the current block among the multiple reference lines (e.g., a reference line with an index value of 0).

[0155] A prediction value for the first reference line may be generated based on each of the plurality of reference lines. For example, a prediction value for the first reference line may be generated based on any one of the plurality of reference lines, and another prediction value for the first reference line may be generated based on another reference line of the plurality of reference lines.

[0156] The image encoding device 100 and the image decoding device 200 may calculate an error between each predicted value of the first reference line and a reconstructed value (reconstructed value of the first reference line) (S1120). Since the predicted value is generated based on each of the plurality of reference lines, an error may also be calculated for each of the plurality of reference lines.

[0157] Here, the error may be calculated based on the "difference between the predicted block predicted from the template region and the actual reconstructed sample" of the TIMD described above. The error may be referred to as "cost", "error", "difference", etc. That is, in the present disclosure, "error", "cost", "error", "difference", etc. may have the same meaning.

[0158] The image encoding device 100 and the image decoding device 200 may derive a second reference line based on the calculated error (S1130). The second reference line may correspond to a reference line used for intra prediction of the current block among the plurality of reference lines.

[0159] Hereinafter, the embodiments proposed by the present disclosure will be described in detail. The embodiments described below can be used as Fig.11 At least one process among the processes expressed in is executed.

[0160] Example 1

[0161] Embodiment 1 relates to a method of deriving a multiple reference line index (ref_idx) in the image encoding device 100 and the image decoding device 200 without signaling it when MRL is performed. Fig.12 and Fig.13 Shown in.

[0162] exist Fig.12 In the example, k may be an integer greater than or equal to 1, and i may be an integer greater than or equal to 0 and less than k. Fig.12 , samples of a plurality of reference lines (ref_idx=0…k) for a current block (CU) may be used to predict samples of the i-th reference line (ref_idx=i). The i-th reference line may correspond to a first reference line. Among the prediction values ​​of the i-th reference line, the prediction value that is most similar to the reconstructed value (reconstructed signal) of the i-th reference line (that is, the most similar reference line (second reference line)) may be determined as the reference line for predicting the current block (or the reference line index of the corresponding reference line). In the above description, the prediction value of the reference line may be the reference line index of the corresponding reference line.

[0163] exist Fig.13In Pred A(k) It can be the prediction signal of region 'A' predicted by using the reference sample with ref_idx=k, Pred L(k) can be the prediction signal of region 'L' predicted using the reference sample with ref_idx=k, and Pred AL(k) It can be the prediction signal of the area 'AL' predicted by the reference sample with ref_idx=k. A It can be the previous reconstructed signal of region 'A', Rec L may be the previously reconstructed signal of region 'L', and Rec AL can be the previously reconstructed signal of region 'AL'. In addition, the width q of region 'A' (pAxqA) A can be different from the width W of the current block, and the height p A can be greater than or equal to 1 and less than k. In addition, the area 'L' (p L xq L ) of the height p L Can be different from the current block height H and width q L can be greater than or equal to 1 and less than k. Additionally, the area 'AL' (p A xq L ) A ,q L Can be greater than or equal to 1 and less than k.

[0164] Rec L 、Rec A and Rec AL The previously reconstructed signals corresponding to the regions 'L', 'A' and 'AL' respectively adjacent to the current block (CU) and the value (signal) Pred predicted by the reference sample with ref_idx=k may correspond to the previously reconstructed signals of the regions 'L', 'A' and 'AL' respectively adjacent to the current block (CU). L(k) 、Pred A(k) and Pred AL(k) Can be separately in Rec L 、Rec A and Rec AL is generated at the same location as .

[0165] At the same time, the error between the predicted value and the reconstructed value can be calculated using the sum of absolute differences (SAD), SATD, or the sum of squared differences (SSD). For example, the error between the predicted value and the reconstructed value can be calculated using Formula 3. L(k) , Rec L )、(Pred A(k) , Rec A )、(Pred AL(k) , Rec AL) to calculate the error. N represents the number of predicted values.

[0166] [Formula 3]

[0167]

[0168] As another example, if only the left and above reference samples of the current block are available, the error can be calculated by Equation 4.

[0169] [Formula 4]

[0170]

[0171] As another example, if only the left reference samples of the current block are available, the error can be calculated by Equation 5.

[0172] [Formula 5]

[0173]

[0174] As another example, if only the upper reference sample of the current block is available, the error can be calculated by Equation 6.

[0175] [Formula 6]

[0176]

[0177] In other embodiments, if the current block is located at a slice boundary, a CTU boundary, a picture boundary, etc., the embodiments of the present disclosure may be disabled.

[0178] Meanwhile, the method of Embodiment 1 for deriving ref_idx through a 1-bit first flag (derive_mrl_flag) and the existing MRL technology may be selectively used.

[0179] [Table 4]

[0180]

[0181] As shown in Table 4, the value of mrl_flag indicating whether MRL is applied is determined, and when MRL is applied (mrl_flag=0), derive_mrl_flag may be signaled. When derive_mrl_flag=1, the reference line with the minimum error calculated as proposed in Embodiment 1 is determined as the reference line (second reference line) for predicting the current block. On the contrary, when derive_mrl_flag=0, the multi-reference line index (intra_luma_ref_idx) may be signaled in the same manner as the existing method, and the MRL mode may be performed using this.

[0182] In other embodiments, as shown in Table 5, if mrl_flag is not 0, the second reference line may be derived without signaling a separate flag and a multiple reference line index.

[0183] [Table 5]

[0184]

[0185] Fig.14 is a flowchart illustrating an image encoding method according to Embodiment 1, and Fig.15 is a flowchart illustrating an image decoding method according to Embodiment 1.

[0186] refer to Fig.14 , the image encoding device 100 determines whether the MRL mode is applied ( S1410 ), and when it is determined that the MRL mode is not applied, may encode mrl_flag=0 ( S1420 ).

[0187] When it is determined that the MRL mode is applied, the image encoding device 100 may determine whether to signal the reference line index (ref_idx) (S1430). When it is determined that the reference line index is signaled (ie, if the conventional MRL method is applied), the image encoding device 100 may encode mrl_flag=1, derive_mrl_flag=0, and ref_idx (S1440). On the other hand, when it is determined that the reference line index is not signaled (ie, if the method proposed in Embodiment 1 is applied), the image encoding device 100 may encode mrl_flag=1 and derive_mrl_flag=1 (S1450).

[0188] refer to Fig.15 , the image decoding device 200 may obtain mrl_flag from a bitstream ( S1510 ), and determine whether to apply the MRL mode based on the value of mrl_flag ( S1520 ).

[0189] When the MRL mode (mrl_flag=1) is applied, the image decoding device 200 may obtain derive_mrl_flag from a bitstream ( S1530 ) and determine a value of derive_mrl_flag ( S1540 ).

[0190] When derive_mrl_flag=0, the existing MRL method is applied, and thus the image decoding device 200 may obtain ref_idx from a bitstream ( S1550 ) and perform intra prediction for the current block based on a reference line indicated by ref_idx among a plurality of reference lines.

[0191] In contrast, when derive_mrl_flag=1, since the method proposed by Embodiment 1 is applied, the image decoding device 200 can derive a second reference line from among multiple reference lines based on the error described above without obtaining ref_idx, and perform intra prediction for the current block based on the second reference line.

[0192] According to the above-described embodiments, by deriving a multi-reference line index without signaling it, prediction performance can be improved and coding efficiency can be increased.

[0193] Example 2

[0194] Embodiment 2 corresponds to a method of reordering a plurality of reference line candidates (reference line candidate list or lists) based on errors.

[0195] Fig.16 It is a flowchart illustrating an image encoding method and an image decoding method according to Embodiment 2.

[0196] refer to Fig.16 , the image encoding device 100 and the image decoding device 200 may determine an intra prediction mode (ipm) of a current block ( S1610 ).

[0197] The image encoding device 100 may encode and signal information about the determined intra prediction mode. The image decoding device 200 may obtain information about the intra prediction mode from a bitstream and determine the intra prediction mode based thereon.

[0198] DIMD mode (decoder-side intra mode derivation), MIP (matrix-based intra prediction) mode, MPM (most probable mode), SMPM (second most probable mode) mode, ISP (intra sub-partitioning) mode, etc. may be included to obtain the intra prediction mode. In addition, mrl_idx may be obtained in step S1610.

[0199] The image encoding device 100 and the image decoding device 200 may reorder the order of the plurality of reference lines ( S1620 ).

[0200] The image encoding device 100 and the image decoding device 200 may calculate the error between the predicted value obtained by predicting the first reference line and the reconstructed value of the first reference line, and reorder the reference line candidates based on the calculated error. The error calculation may be performed by the method described above. Specifically, the error may be calculated using any one of Equations 3 to 6. For example, if the reference line candidate list is mrl_candidate_list={0,1,3,5,7,12}, and the reference line from the current block to the twelfth reference line is accessible, the error is calculated for candidates 1, 3, 5, 7, and 12 in each list except the 0th reference line, and the reference line candidates may be reordered in ascending order based on the calculated error.

[0201] The image encoding device 100 and the image decoding device 200 may perform prediction and reconstruction on the current block based on the reordered list (S1630). Among the reordered reference line candidates, the reference line indicated by mrl_idx is determined as the second reference line, and intra prediction and reconstruction may be performed based on the second reference line.

[0202] According to an embodiment, the image encoding device 100 and the image decoding device 200 may perform a process of updating mrl_idx of a reference line candidate (reference line candidate list) in step S1620.

[0203] For example, if mrl_candidate_list={0, 1, 3, 5, 7, 12} and mrl_idx=7 are obtained in step S1610, and the reference line candidate list is reordered to mrl_candidate_list={0, 1, 7, 5, 3, 12} in step S1620, since the fourth position in the reference line candidate list is 7, the value of mrl_idx can be updated to 3 based on the reordered reference line candidate list.

[0204] Example 3

[0205] Embodiment 3 relates to a method of configuring reference line candidates as a combination of an upper reference line and a left reference line.

[0206] Fig.17 A diagram for explaining the upper reference line and the left reference line is shown in FIG. Fig.17 In, k A and k L May have the same or different values. The top reference line is a reference line located at the top (A) side of the current block (CU), and the left reference line may be a reference line located at the left (L) side of the current block.

[0207] The image encoding device 100 and the image decoding device 200 may configure a reference line candidate list. The reference line candidate list may be configured with a reference line candidate list for an above reference line (mrl_idx_candi_above) and a reference line candidate list for a left reference line (mrl_idx_candi_left).

[0208] The image encoding device 100 and the image decoding device 200 may generate a prediction value for the first reference line based on each combination of an upper reference line and a left reference line, and derive the second reference line based on any one of the generated combinations.

[0209] Assuming mrl_idx_candi_above={0,1,3,5,7,12}, mrl_idx_candi_left={0,1,3,5,7,12}, the error can be obtained by (k L, k A ) are calculated by various combinations. For example, (k L , k A ) can have the combinations of (0,3), (1,3), (3,3), (5,3), (7,3), (12,3). (k L , k A ) may be defined as a convention between the image encoding device 100 and the image decoding device 200.

[0210] According to an embodiment, when a reference line (ref_idx=k) having a minimum error is determined, the reference line (k) may be additionally generated. L , k A ). For example, (k L , k A ) may consist of a combination of (k, k-1), (k, k+1), (k-1, k), (k+1, k) that is close to the determined reference line (ref_idx=k).

[0211] According to an embodiment, when the x value of the upper left position of the current block (CU) is 0 or the y value is 0, or when the current block is located at a slice boundary, a CTU boundary, a picture boundary, etc., (k L , k A ) can be composed of the following combinations.

[0212] - If the x value of the top left position is 0 or is located at a slice boundary, CTU boundary, picture boundary, etc.: (k L ,k A ) = (0, k)

[0213] - If the y value of the top left position is 0 or is located at a slice boundary, CTU boundary, picture boundary, etc.: (kL ,k A ) = (k,0)

[0214] - If both x and y are 0 or are located at a slice boundary, CTU boundary, picture boundary, etc.: the proposed combination is not performed

[0215] Fig.18 is a view showing a content streaming system to which an embodiment of the present disclosure can be applied.

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

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

[0218] A bitstream may be generated by applying the image encoding method or the image encoding device according to the embodiment of the present disclosure, and a streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

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

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

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

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

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

[0224] Industrial Applicability

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

Claims

1. An image decoding method performed by an image decoding device, the image decoding method comprising: generating, based on each of a plurality of reference lines for a current block, a prediction value obtained by predicting a first reference line for the current block; calculating an error between the predicted value and the reconstructed value of the first reference line; as well as Based on the error, at least one second reference line among the plurality of reference lines to be used for intra prediction of the current block is derived.

2. The image decoding method according to claim 1, wherein: The first reference line is a reference line closest to the current block among the plurality of reference lines.

3. The image decoding method according to claim 1, wherein: The second reference line is derived as a reference line having a minimum error among the plurality of reference lines.

4. The image decoding method according to claim 3, wherein: The second reference line is derived as the reference line having the minimum error based on a first flag indicating a first value obtained from a bit stream.

5. The image decoding method according to claim 1, wherein: Deriving the second reference line includes: reordering the order of the plurality of reference lines based on the error; and A reference line indicated by the index information among the plurality of reordered reference lines is derived as the second reference line.

6. The image decoding method according to claim 5, wherein: The plurality of reference lines are reordered in ascending order based on the error.

7. The image decoding method according to claim 5, wherein: The index information is obtained from the bitstream based on a first flag indicating a second value obtained through the bitstream.

8. The image decoding method according to claim 1, in, The multiple reference lines include an upper reference line and a left reference line, wherein the predicted value is generated based on each combination of the upper reference line and the left reference line, and Wherein, the second reference line is derived based on any one of the combinations.

9. An image encoding method performed by an image encoding device, the image encoding method comprising: generating, based on each of a plurality of reference lines for a current block, a prediction value obtained by predicting a first reference line for the current block; calculating an error between the predicted value and the reconstructed value of the first reference line; as well as Based on the error, at least one second reference line among the plurality of reference lines to be used for intra prediction of the current block is derived.

10. A method for transmitting a bit stream generated by an image encoding method, the image encoding method comprising: generating, based on each of a plurality of reference lines for a current block, a prediction value obtained by predicting a first reference line for the current block; calculating an error between the predicted value and the reconstructed value of the first reference line; as well as Based on the error, at least one second reference line among the plurality of reference lines to be used for intra prediction of the current block is derived.