Image encoding / decoding method, method for transmitting bitstream, and recording medium storing bitstream thereon

By partitioning the image block into three areas and making accurate predictions, the problem of low encoding efficiency in high-resolution image encoding is solved, and more efficient image compression and transmission is achieved.

CN120435862APending Publication Date: 2025-08-05LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202480006775.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-01-04
Filing Date
2024-01-04
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

In the prior art, in the encoding and decoding process of high resolution and high quality images, there is a problem of low encoding efficiency, especially when predicting blocks, it is difficult to effectively utilize the structural characteristics of the block for efficient compression.

Method used

A method called TGIP mode is used to partition the block into three regions, and a prediction block is generated based on the prediction information of these regions, and more accurate prediction is made by defining angles and straight lines.

Benefits of technology

It improves encoding and decoding efficiency, reduces the transmission amount of residual signals, improves compression efficiency, and supports storing and transmitting bitstreams on non-transitory computer-readable recording media.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120435862A_ABST
    Figure CN120435862A_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 the steps of: dividing a current block into three regions on the basis of division information; generating a prediction region for each region on the basis of information for prediction of the three regions; and generating a prediction block for the current block based on the generated prediction region.
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, a method for transmitting a bitstream, and a recording medium storing the bitstream, and to a method for partitioning a block into three areas and predicting. Background Art

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

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

[0004] Technical issues

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

[0006] In addition, the present disclosure is to provide a TGIP mode that partitions a block into three regions and predicts them.

[0007] In addition, the present disclosure is to provide a method for defining an angle and two straight lines used to partition a block into three areas.

[0008] In addition, the present disclosure is to provide a method for defining a syntax for determining whether to allow and apply a TGIP mode.

[0009] Additionally, the present disclosure is to provide a method for implicitly deriving an angle and two lines.

[0010] Additionally, the present disclosure is to provide a method for deriving a prediction mode for a region.

[0011] Additionally, the present disclosure is to provide a method for deriving prediction information for a region.

[0012] In addition, the present disclosure is to provide a method for deriving a prediction block of a block based on a prediction region of a prediction region.

[0013] In addition, the present disclosure is to provide a method for storing a prediction mode and prediction information for a region.

[0014] In addition, the present disclosure is to provide a non-transitory computer-readable recording medium for storing a bit stream generated by the image encoding method according to the present disclosure.

[0015] In addition, the present disclosure is to provide a non-transitory computer-readable recording medium for storing a bit stream received and decoded by the image decoding apparatus according to the present disclosure and used for image reconstruction.

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

[0017] The technical problems to be achieved in the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described can be clearly understood by those skilled in the art from the following description.

[0018] Technical Solution

[0019] According to an aspect of the present disclosure, an image decoding method, as an image decoding method performed by an image decoding device, may be an image decoding method including: partitioning a current block into three regions based on partition information; generating a prediction region for each region based on prediction information for the three regions; and generating a prediction block for the current block based on the generated prediction region.

[0020] According to another aspect of the present disclosure, an image encoding method, as an image encoding method performed by an image encoding device, may be an image encoding method including: partitioning a current block into three regions; generating a prediction region for each region based on prediction information for the three regions; and generating a prediction block for the current block based on the generated prediction regions.

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

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

[0023] The features briefly summarized above for the present disclosure are merely exemplary aspects of the detailed description of the present disclosure described below and do not limit the scope of the present disclosure.

[0024] Beneficial effects

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

[0026] In addition, according to the present disclosure, since a block partitioned into three regions is predicted in units of regions, a more accurate prediction block can be generated.

[0027] In addition, according to the present disclosure, since a prediction block is accurately generated, a signaled residual signal can be minimized to improve compression efficiency.

[0028] In addition, according to the present disclosure, a non-transitory computer-readable recording medium for storing a bit stream generated by the image encoding method according to the present disclosure may be provided.

[0029] According to the present disclosure, there may be provided a non-transitory computer-readable recording medium for storing a bit stream received and decoded by the image decoding apparatus according to the present disclosure and used for image reconstruction.

[0030] According to the present disclosure, a method of transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure may be provided.

[0031] Effects obtainable by the present disclosure are not limited to the above-described effects, and other effects that are not described can be clearly understood from the following description by those having ordinary skill in the art. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 FIG2 shows a schematic diagram of a video coding system to which an embodiment of the present disclosure can be applied.

[0033] Figure 2 A schematic diagram showing an image encoding apparatus to which an embodiment of the present disclosure can be applied is shown.

[0034] Figure 3 A schematic diagram showing an image decoding apparatus to which an embodiment of the present disclosure can be applied is shown.

[0035] Figure 4 The figure shows an example of partitioning of an existing GPM.

[0036] Figure 5 is a diagram showing an example of GPM intra-frame mixing.

[0037] Figure 6 FIG. 4 is a flowchart illustrating an image encoding method based on the TGIP mode according to an embodiment of the present disclosure.

[0038] Figure 7 FIG. 4 is a flowchart illustrating an image decoding method based on the TGIP mode according to an embodiment of the present disclosure.

[0039] Figure 8 is a diagram illustrating an example of the present disclosure of partitioning a block into regions in TGIP mode.

[0040] Figure 9 is a diagram illustrating an example of the present disclosure for a prediction mode applied to each region in a TGIP mode.

[0041] Figure 10 is a diagram illustrating an example of the present disclosure of generating prediction blocks for blocks and regions in TGIP mode.

[0042] Figure 11 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.

[0043] Figure 12 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.

[0044] Figure 13 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.

[0045] Figure 14 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.

[0046] Figure 15 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.

[0047] Figure 16 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.

[0048] Figure 17 and Figure 18 is a diagram of an example of the present disclosure for describing an angle for TGIP.

[0049] Figure 19 is a diagram of an example of the present disclosure for describing a partition structure of TGIP.

[0050] Figure 20 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.

[0051] Figure 21 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.

[0052] Figure 22 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.

[0053] Figure 23 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.

[0054] Figure 24 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.

[0055] Figure 25 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.

[0056] Figure 26is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.

[0057] Figure 27 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.

[0058] Figure 28 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.

[0059] Figure 29 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.

[0060] Figure 30 is a flowchart illustrating an image encoding method according to an embodiment of the present disclosure.

[0061] Figure 31 is a flowchart illustrating an image decoding method according to an embodiment of the present disclosure.

[0062] Figure 32 is a diagram of an example of the present disclosure illustrating a partition structure and a prediction mode for TGIP.

[0063] Figure 33 is a diagram illustrating an example of the present disclosure for determining a partition structure of a TGIP.

[0064] Figure 34 is a diagram illustrating an example of the present disclosure in which a partition structure of a TGIP is determined.

[0065] Figures 35 to 39 is a diagram illustrating an example of the present disclosure in which a prediction block of a TGIP is generated.

[0066] Figure 40 An exemplary diagram showing a content streaming system to which embodiments of the present disclosure can be applied. DETAILED DESCRIPTION

[0067] Hereinafter, in order for those skilled in the art to easily implement them, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings. However, the present disclosure can be implemented in various forms and is not limited to the embodiments described herein.

[0068] When describing the embodiments of the present disclosure, when well-known configurations or functions are considered to obscure the main points of the present disclosure, their detailed explanation will be omitted. In addition, parts that are not related to the description of the present disclosure are omitted from the accompanying drawings, and similar reference numerals have been assigned to similar parts.

[0069] In the present disclosure, when certain components are described as being “connected,” “coupled,” or “linked” to another component, this may include not only direct connections but also indirect connections with another component interposed therebetween. In addition, when a component is described as “including” or “having” another component, this means that, unless expressly stated otherwise, it does not exclude other components but may further include additional components.

[0070] In this disclosure, unless otherwise expressly stated, the terms first, second, etc. are used only to distinguish one component from another and do not limit the order or importance of the components. Therefore, 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.

[0071] In this disclosure, distinguishable components are described to clearly explain their respective characteristics and do not necessarily mean that the components are separate. In other words, multiple components can be integrated into a single hardware or software unit, or a single component can be distributed across multiple hardware or software units. Therefore, such integrated or distributed embodiments are also included in the scope of this disclosure without explicitly describing them.

[0072] In the present disclosure, the components described in the various embodiments do not necessarily mean required components, and some may be optional components. Therefore, embodiments consisting of a subset of the components described in one embodiment are also included in the scope of the present disclosure. In addition, embodiments including additional components in addition to the components described in the various embodiments are also included in the scope of the present disclosure.

[0073] The present disclosure relates to encoding and decoding of images, and terms used herein may have ordinary meanings commonly used in the technical field to which the present disclosure belongs, unless these terms are newly defined in the present disclosure.

[0074] In this disclosure, a "picture" generally refers to a unit representing a single image at a specific point in time. A slice / tile is a coding unit that constitutes part of a picture, and 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).

[0075] In this disclosure, "pixel" or "picture element" may refer to the smallest unit that constitutes a picture (or image). Furthermore, the term "sample" may be used as a corresponding term for a pixel. A sample may generally represent a pixel or a pixel value, and may indicate only the pixel / pixel value of the luma component or only the pixel / pixel value of the chroma component.

[0076] In this disclosure, a "unit" may refer to a basic unit of image processing. A unit may include at least one of a specific region of a picture or information related to that region. Depending on the context, the term "unit" may be used interchangeably with "sample array," "block," "region," and the like. Typically, an M×N block may include a set (or array) of samples (or sample array) or a set (or array) of transform coefficients, consisting of M columns and N rows.

[0077] In the present disclosure, the term "current block" may refer to one of the following: "current coding block," "current coding unit," "encoding target block," "decoding target block," or "processing target block." When prediction is performed, the "current block" may refer to the "current prediction block" or the "prediction target block." When transform (inverse transform) / quantization (dequantization) is performed, the "current block" may refer to the "current transform block" or the "transform target block." When filtering is performed, the "current block" may refer to the "filtering target block."

[0078] In the present disclosure, unless explicitly stated as a chroma block, the term "current block" may refer to a block including both a luma component block and a chroma component block, or may refer to a "luma block of the current block." The luma component block of the current block may be explicitly expressed with terms such as "luma block" or "current luma block," clearly indicating that it is a luma component block. Additionally, the chroma component block of the current block may be explicitly expressed with terms such as "chroma block" or "current chroma block," clearly indicating that it is a chroma component block.

[0079] In the present disclosure, " / " and "," may refer to "and / or". For example, "A / B" and "A, B" may refer to "A and / or B". In addition, "A / B / C" and "A, B, C" may refer to "at least one of A, B, and / or C".

[0080] In the present disclosure, "or" may mean "and / or". For example, "A or B" may mean 1) only "A", 2) only "B", or 3) "A and B". Alternatively, in the present disclosure, "or" may also mean "in addition or alternatively".

[0081] Overview of the video compilation system

[0082] Figure 1 A schematic diagram illustrating a video coding system to which embodiments of the present disclosure can be applied is shown.

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

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

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

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

[0087] Transmitter 13 can obtain the encoded video / image information or data output in the form of a bitstream and transmit it in the form of a file or stream to receiver 21 of decoder device 20 or another external device via a digital storage medium or network. Digital storage media can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. Transmitter 13 can include components for generating media files using a predetermined file format and components for transmission via a broadcast / communication network. Transmitter 13 can be provided as a transmission device separate from encoding device 12. In this case, the transmission device can include at least one processor for obtaining the encoded video / image information or data in the form of a bitstream and a transmitter for delivering it in the form of a file or stream. Receiver 21 can extract / receive the bitstream from the storage medium or network and transmit it to decoder 22.

[0088] The decoder 22 may decode a video / image by performing a series of processes such as dequantization, inverse transformation, prediction, etc. corresponding to the operation of the encoder 12 .

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

[0090] Overview of image encoding apparatus

[0091] Figure 2 A schematic diagram showing an image encoding apparatus to which an embodiment of the present disclosure can be applied is shown.

[0092] like Figure 2 As described in

[15] , the image encoding apparatus 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 predictor 180, an intra-frame predictor 185, and an entropy encoder 190. The inter-frame predictor 180 and the intra-frame predictor 185 may be collectively referred to as a "predictor." 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 further include a subtractor 115.

[0093] Depending on the embodiment, all or at least some of the components constituting the image encoding apparatus 100 may be implemented as a single hardware component (ie, an encoder or a processor). In addition, the memory 170 may include a decoded picture buffer (DPB) and may be implemented by a digital storage medium.

[0094] The image partitioner 110 may partition the input image (or picture, or frame) input to the image encoding device 100 into at least one processing unit. 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 largest coding unit (LCU) according to a quadtree, binary tree, or ternary tree (QT / BT / TT) structure. For example, a coding unit may be divided into coding units of greater depth based on a quadtree, binary tree, and / or ternary tree structure. The coding unit partitioning may first be applied using a quadtree structure, followed by a binary tree and / or ternary tree structure. The coding process according to the present disclosure may be performed based on a final coding unit without further partitioning the final coding unit. The largest coding unit may be used directly as the final coding unit, or a coding unit of greater depth obtained by partitioning the largest coding unit may be used as the final coding unit. The coding process may include processes such as prediction, transform, and / or reconstruction, which will be described later. As another example, the processing unit used in the coding process may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may each be divided or partitioned from the final coding unit. The prediction unit may be a unit for sample prediction, and the transform unit may be a unit for deriving a transform coefficient from a transform coefficient and / or deriving a residual signal from the transform coefficient.

[0095] The predictor (inter-frame predictor 180 or intra-frame predictor 185) can perform prediction on the target block (current block) and generate a prediction block including prediction samples for the current block. The predictor can determine whether to apply intra-frame prediction or inter-frame prediction to the current block or coding unit (CU). The predictor can generate various information related to the prediction of the current block and send it to the entropy encoder 190. The prediction-related information can be encoded by the entropy encoder 190 and can be output in the form of a bitstream.

[0096] The intra-frame predictor 185 can predict the current block by referring to samples within the current picture. The referenced samples may be located in a neighboring area of the current block, or may be located at a farther position, depending on the intra-frame prediction mode and / or the intra-frame prediction method. The intra-frame 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 planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the granularity of the predicted orientation, depending on the granularity of the predicted orientation. However, this is only an example, and a greater or lesser number of directional prediction modes may be used depending on the configuration. The intra-frame predictor 185 may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring block.

[0097] The inter-frame predictor 180 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between neighboring blocks and the current block. Motion information can include a motion vector and a reference picture index. The motion information can further include information regarding the inter-frame prediction direction (i.e., L0 prediction, L1 prediction, Bi prediction, etc.). In inter-frame prediction, neighboring blocks can include spatially neighboring blocks within the current picture and temporally neighboring blocks within a reference picture. The reference picture containing the reference block and the reference picture containing the temporally neighboring block can be the same or different. Temporally neighboring blocks can be referred to as collocated reference blocks or collocated coding units (colCUs). The reference picture containing temporally neighboring blocks can be referred to as collocated pictures (colPics). For example, the inter-frame predictor 180 can construct a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index for the current block. Inter-frame prediction can be performed based on various prediction modes, and for example, in skip mode and merge mode, the inter-frame predictor 180 can use the motion information of a neighboring block as the motion information of the current block. In skip mode, unlike merge mode, a residual signal may not be transmitted. In motion vector prediction (MVP) mode, the motion vector of a neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be signaled by encoding a motion vector difference and an indicator for the motion vector predictor. The motion vector difference may refer to the difference between the motion vector of the current block and the motion vector predictor.

[0098] The predictor can generate a prediction signal based on various prediction methods and / or prediction techniques described below. For example, the predictor can apply intra prediction or inter prediction to the prediction of the current block, or it can apply both intra and inter prediction simultaneously. A prediction method that applies both intra and inter prediction to the prediction of the current block is referred to as combined inter and intra prediction (CIIP). Furthermore, the predictor can perform intra block copying (IBC) on the prediction of the current block. Intra block copying can be used, for example, for screen content coding (SCC) in applications such as game content image / video coding. IBC is a method that predicts the current block using a pre-reconstructed reference block within the current picture, which is located at a predetermined distance from the current block. When applying IBC, the location of the reference block within the current picture can be encoded as a vector (block vector) corresponding to the predetermined distance. IBC essentially performs prediction within the current picture, but because it derives the reference block within the current picture, it can operate similarly to inter prediction. In other words, IBC can use at least one of the inter prediction methods described in this disclosure.

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

[0100] Transformer 120 can generate transform coefficients by applying a transform method to the residual signal. For example, the transform method may 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 conditional nonlinear transform (CNT). Here, GBT refers to a transform obtained from a graph when relationship information between pixels is represented as a graph. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. The transform process can be applied to pixel blocks of the same square size or to non-square, variable-sized blocks.

[0101] 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 it as a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 130 may rearrange the block-shaped quantized transform coefficients into a one-dimensional vector based on a coefficient scanning order and may generate information about the quantized transform coefficients based on the one-dimensional vector of the quantized transform coefficients.

[0102] The entropy encoder 190 can perform various encoding methods, such as Exponential Golomb, Context-Adaptive Variable Length Coding (CAVLC), or Context-Adaptive Binary Arithmetic Coding (CABAC). The entropy encoder 190 can not only encode the quantized transform coefficients, but also encode information necessary for video / image reconstruction (i.e., syntax element values) together with or separately from the quantized transform coefficients. The encoded information (i.e., the encoded video / image information) can be transmitted or stored in a network abstraction layer (NAL) unit in the form of a bitstream. The video / image information may further include information about 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 described in this disclosure can be included in the bitstream by being encoded through the above-mentioned encoding process.

[0103] The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcast network and / or a communication network, etc., 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) for transmitting the signal output from the entropy encoder 190 and / or a storage unit (not shown) for storing the signal may be provided as an internal / external element of the image encoding device 100, or the transmitter may be configured as a component of the entropy encoder 190.

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

[0105] The adder 155 can generate a reconstructed signal (reconstructed picture, reconstructed block, or reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter-frame predictor 180 or the intra-frame predictor 185. When there is no residual for the target block, such as when skip mode is applied, the prediction block can be used as the reconstructed block. The adder 155 can be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal can be used for intra-frame prediction of the next target block in the current picture, and as described later, after filtering, it can also be used for inter-frame prediction of the next picture.

[0106] The filter 160 can apply filtering to the reconstructed signal to enhance the subjective / objective quality. For example, the filter 160 can apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and the modified reconstructed picture can be stored 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 filter, bilateral filter, etc. The filter 160 can generate various filtering related information, as described in the explanation of each filtering method later, and can send it to the entropy encoder 190. The filtering related information can be encoded by the entropy encoder 190 and output in the form of a bit stream.

[0107] The modified reconstructed picture sent to the memory 170 can be used as a reference picture in the inter-frame predictor 180. When applying inter-frame prediction in this case, the image encoding device 100 can avoid prediction mismatch between the image encoding device 100 and the image decoding device, and can improve encoding efficiency.

[0108] The DPB in memory 170 can store the modified reconstructed picture for use as a reference picture in the inter-frame predictor 180. Memory 170 can store motion information for blocks in the current picture for which motion information has been derived (or encoded) and / or motion information for blocks in reconstructed pictures. The stored motion information can be sent to the inter-frame predictor 180 for use as motion information for spatially or temporally neighboring blocks. Memory 170 can store reconstructed samples of the reconstructed blocks in the current picture and send them to the intra-frame predictor 185.

[0109] Overview of image decoding device

[0110] Figure 3 A schematic diagram illustrating an image decoding device to which embodiments of the present disclosure can be applied.

[0111] like Figure 3 As shown, the image decoding apparatus 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 predictor 260, and an intra-frame predictor 265. The inter-frame predictor 260 and the intra-frame predictor 265 may be collectively referred to as a "predictor." The dequantizer 220 and the inverse transformer 230 may be included in a residual processor.

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

[0113] The image decoding apparatus 200 that receives a bit stream containing video / image information may perform the same Figure 2 The image is reconstructed using a process corresponding to the process performed by the image encoding device 100 in the image decoding apparatus 200. For example, the image decoding apparatus 200 may perform decoding using the processing units employed in the image encoding apparatus. Thus, the processing units used for decoding may be, for example, coding units. Coding units may be coding tree units or may be obtained by segmenting a maximum coding unit. Furthermore, the reconstructed image signal decoded and output by the image decoding apparatus 200 may be played back via a playback device (not shown).

[0114] The image decoding apparatus 200 can 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 extract information necessary for image reconstruction (or picture reconstruction) (i.e., video / image information). The video / image information may further 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). Furthermore, the video / image information may further include general constraint information. The image decoding device may additionally use the parameter set information and / or general constraint information to decode the image. The signaling information, received information, and / or syntax elements described in this disclosure may be obtained from the bitstream through a decoding process. For example, the entropy decoder 210 may decode the information in the bitstream based on a coding method such as Exponential Golomb coding, CAVLC, or CABAC, and may output syntax element values necessary for image reconstruction and quantized values of transform coefficients associated with the residual. More specifically, the CABAC entropy decoding method receives bins corresponding to syntax elements in a bitstream, determines a context model using information about the target syntax element, decoded information about neighboring blocks and the target block, or information about previously decoded symbols / bins, predicts the probability of a bin's occurrence based on the determined context model, and performs arithmetic decoding on the bins to generate the symbol corresponding to each syntax element. After determining the context model, the CABAC entropy decoding method uses the decoded symbol / bin information to update the context model for the next symbol / bin. Prediction-related information in the decoded information from the entropy decoder 210 is provided to the predictor (inter-frame predictor 260 and intra-frame predictor 265), and the residual values entropy-decoded by the entropy decoder 210, in other words, the quantized transform coefficients and related parameter information, are input to the dequantizer 220. Furthermore, filtering-related information in the decoded information from the entropy decoder 210 is provided to the filter 240. Meanwhile, a receiver (not shown) that receives a signal output from the image encoding device may be additionally configured as an internal / external element of the image decoding device 200 , or the receiver may be configured as a component of the entropy decoder 210 .

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

[0116] The dequantizer 220 may dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 220 may rearrange the quantized transform coefficients into two-dimensional blocks. In this case, the rearrangement may be performed based on the coefficient scanning order used in the image encoding device. The dequantizer 220 may dequantize the quantized transform coefficients using a quantization parameter (i.e., quantization step size information) and obtain the transform coefficients.

[0117] The inverse transformer 230 may perform inverse transform on the transform coefficients to obtain a residual signal (a residual block or a residual sample array).

[0118] The predictor may perform prediction on the current block and generate a prediction block including prediction samples for the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on the prediction-related information output from the entropy decoder 210, and may determine a specific intra / inter prediction mode (prediction method).

[0119] The predictor can generate a prediction signal based on various prediction methods (techniques) to be described later, which is the same as described in the explanation of the predictor in the image encoding device 100 .

[0120] The intra predictor 265 may predict the current block by referring to samples within the current picture. The explanation of the intra predictor 185 can also be applied to the intra predictor 265 in the same manner.

[0121] The inter-frame predictor 260 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted at the block, sub-block, or sample level based on the correlation of motion information between neighboring blocks and the current block. Motion information can include a motion vector and a reference picture index. The motion information can further include information regarding the inter-frame prediction direction (i.e., L0 prediction, L1 prediction, Bi prediction, etc.). In inter-frame prediction, neighboring blocks can include spatially neighboring blocks within the current picture and temporally neighboring blocks in reference pictures. For example, the inter-frame predictor 260 can construct a motion information candidate list based on the neighboring blocks and derive the motion vector and / or reference picture index for the current block based on received candidate selection information. Inter-frame prediction can be performed based on various prediction modes (methods), and prediction-related information can include information indicating the inter-frame prediction mode (method) applied to the current block.

[0122] The adder 235 can generate a reconstruction signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 260 and / or the intra-frame predictor 265). When there is no residual for the target block, such as when skip mode is applied, the prediction block can be used as the reconstructed block. The explanation of the adder 155 can also be applied to the adder 235 in the same manner. The adder 235 can be called a reconstructor or a reconstructed block generator. The generated reconstruction signal can be used for intra-frame prediction of the next target block in the current picture, and as described later, can also be used for inter-frame prediction of the next picture after filtering.

[0123] The filter 240 may apply filtering to the reconstructed signal to enhance the subjective / objective quality. For example, the filter 240 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and the modified reconstructed picture may be stored in the memory 250, specifically in the DPB of the memory 250. Various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0124] The (modified) reconstructed picture stored in the DPB of the memory 250 can be used as a reference picture in the inter-frame predictor 260. The memory 250 can store motion information for blocks in the current picture for which motion information has been derived (or decoded) and / or motion information for blocks in the reconstructed picture. The stored motion information can be sent to the inter-frame predictor 260 to be used as motion information for spatially or temporally neighboring blocks. The memory 250 can store reconstructed samples of the reconstructed blocks in the current picture and send them to the intra-frame predictor 265.

[0125] In this specification, the embodiments described for the filter 160, the inter-frame predictor 180, and the intra-frame predictor 185 of the image encoding device 100 can be applied to the filter 240, the inter-frame predictor 260, and the intra-frame predictor 265 of the image decoding device 200 in the same or corresponding manner.

[0126] Inter-frame prediction

[0127] The predictors of the image encoding device 100 and the image decoding device 200 can perform inter-frame prediction on a block-by-block basis to derive prediction samples. Inter-frame prediction can be derived in a manner that relies on data elements (e.g., sample values or motion information) from pictures other than the current picture. When inter-frame prediction is applied to the current block, the prediction block (prediction sample array) for the current block can be derived based on a reference block (reference sample array) specified by a motion vector in a reference picture indicated by a reference picture index. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, the motion information of the current block can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and / or a reference picture index. The motion information can further include information on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). When inter-frame prediction is applied, the neighboring blocks can include spatially neighboring blocks in the current picture and temporally neighboring blocks in reference pictures. The reference picture comprising the reference block and the reference picture comprising the temporally neighboring blocks can be the same or different. Temporally neighboring blocks may be referred to as co-located reference blocks, co-located CUs (colCUs), etc., and a reference picture including temporally neighboring blocks may be referred to as a co-located picture (colPic). For example, a motion information candidate list may be configured based on neighboring blocks of the current block, and a flag or index information indicating which candidate is selected (used) to derive the motion vector and / or reference picture index of the current block may be signaled. Inter-frame prediction may be performed based on various prediction modes, and for example, for skip mode and merge mode, the motion information of the current block may be the same as the motion information of the selected neighboring block. For skip mode, unlike merge mode, a residual signal may not be sent. For motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and the motion vector difference may be signaled. In this case, the motion vector of the current block may be derived by using the sum of the motion vector factor and the motion vector difference. MVP mode may also be referred to as advanced motion vector prediction (AMVP) mode.

[0128] Depending on the inter-frame prediction type (L0 prediction, L1 prediction, Bi prediction, etc.), motion information may include L0 motion information and / or L1 motion information. A motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and a motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. Prediction based on the L0 motion vector may be referred to as L0 prediction, prediction based on the L1 motion vector may be referred to as L1 prediction, and prediction based on both the L0 and L1 motion vectors may be referred to as Bi prediction. Here, an L0 motion vector may refer to a motion vector associated with reference picture list L0 (L0), and an L1 motion vector may refer to a motion vector associated with reference picture list L1 (L1). Reference picture list L0 may include pictures preceding the current picture in output order as reference pictures, and reference picture list L1 may include pictures following the current picture in output order. The preceding picture may be referred to as a forward (reference) picture, and the subsequent picture may be referred to as a backward (reference) picture. Reference picture list L0 may further include pictures following the current picture in output order as reference pictures. In this case, within reference picture list L0, the previous picture may be indexed first, and the subsequent picture may be indexed next. Reference picture list L1 may further include pictures preceding the current picture in output order as reference pictures. In this case, within reference picture list 1, the subsequent picture may be indexed first, and the previous picture may be indexed next. Here, the output order may correspond to the picture order count (POC) order.

[0129] Template Matching (TM)

[0130] Template matching (TM) is a method used to derive motion vectors at the decoder end. It refines the motion information of a current block (e.g., current coding unit, current CU) by finding a template (hereinafter referred to as a reference template) in a reference picture that is most similar to a template adjacent to the current block (hereinafter referred to as the current template). The current template can be the upper and / or left neighboring blocks of the current block, or a portion of these neighboring blocks. Furthermore, the reference template can be determined to have the same size as the current template.

[0131] When deriving an initial motion vector for the current block, a search for a better motion vector can be performed in the neighborhood of the initial motion vector. For example, the search can be performed within a search range of [-8, +8] pixels based on the initial motion vector. Furthermore, the search step size used for the search can be determined based on the AMVR mode of the current block. Furthermore, template matching can be performed continuously using a bilateral matching process in merge mode.

[0132] When the prediction mode of the current block is AMVP mode, a motion vector predictor candidate (MVP candidate) may be determined based on the template matching error. For example, a motion vector predictor candidate (MVP candidate) that minimizes the error between the current template and the reference template may be selected. Template matching may then be performed on the selected motion vector predictor candidate to refine the motion vector. In this case, template matching may not be performed on unselected motion vector predictor candidates to refine the motion vector.

[0133] More specifically, refinement of the selected motion vector predictor candidate begins with full-pixel (integer-pixel) precision within the [-8, +8] pixel search range using an iterative diamond search. Alternatively, for the 4-pixel AMVR mode, it can start with 4-pixel precision. Thereafter, a search for half-pixel and / or quarter-pixel precision can be followed according to the AMVR mode. Depending on the search process, the motion vector predictor candidate can maintain the same motion vector precision as indicated by the AMVR mode even after the template matching process. During the iterative search process, the search process is terminated when the difference between the previous minimum cost and the current minimum cost is less than an arbitrary threshold. This threshold can be the same as the area of the block, i.e., the number of samples in the block. Table 1 shows examples of search patterns according to the AMVR mode and the merge mode with AMVR.

[0134] [Table 1]

[0135]

[0136] When the prediction mode of the current block is merge mode, a similar search method can be applied to the merge candidate indicated by the merge index. As shown in Table 1 above, template matching can be performed up to 1 / 8 pixel accuracy, or half pixel accuracy or lower accuracy can be skipped, which can be determined based on whether an alternative interpolation filter is used based on the merge motion information. In this case, the alternative interpolation filter can be the filter used when AMVR is in half pixel mode. In addition, when template matching is available, template matching can be operated as an independent process depending on whether bilateral matching (BM) is available, or it can be operated as an additional motion vector refinement process between block-based bilateral matching and sub-block-based bilateral matching. Whether template matching is available and / or whether bilateral matching is available can be determined by checking availability conditions. In the above, the accuracy of the motion vector can mean the accuracy of the motion vector difference (MVD).

[0137] Geometric Partitioning Mode (GPM)

[0138] GPM can be supported for inter prediction. GPM can be signaled as a type of merge mode using a CU level flag along with other merge modes such as normal merge mode, merge mode with MVD (MMVD) mode, CIIP mode, sub-block merge mode, etc. GPM is supported for every possible CU size w×h=2 excluding 8x64 and 64x8. m ×2 n A total of 64 partitions are supported for m,n ∈ {3⋯6}.

[0139] When using GPM, a CU can be partitioned into two parts by a geometrically located straight line (partition line), such as Figure 4 As shown in . The position of the partition line can be mathematically derived from the angle and offset parameters of the specific partition. Each part of the geometric partition within the CU can be inter-frame predicted by using its motion, and only unidirectional prediction is allowed for each partition. In other words, each part can have one motion vector and one reference index. Because the unidirectional prediction constraint is applied, only two motion compensated predictions may be required for each CU, similar to the existing bidirectional prediction.

[0140] When GPM is used for the current CU, a geometry partition index (GPM index) indicating the partition mode (angle and offset) of the geometry partition and two merge indices for the partition can be signaled. The maximum number of GPM candidate sizes is explicitly signaled in the SPS, which can represent the syntax binarization for the GPM merge indices.

[0141] Geometry Partition Intra Blending Mode (GPM Intra Blending)

[0142] In the existing GPM, the syntax in Table 2 can be signaled, and based on the signaled GPM index, the angle and distance can be derived using Table 3, and one block can be partitioned into two arbitrary regions based on the angle and distance. A prediction block for each region can be generated by using different motion prediction information, and prediction can be performed by mixing the generated prediction blocks and using them as prediction blocks for the corresponding block.

[0143] [Table 2]

[0144]

[0145] [Table 3]

[0146]

[0147] Existing GPM methods use only inter-frame prediction to generate prediction blocks for each of the two regions.

[0148] However, the GPM intra hybrid method can utilize intra prediction to generate a prediction block for each region. Figure 5 is an example of a prediction block generated by the GPM intra hybrid method, and a prediction block may be generated for at least one of the two regions by the intra prediction method.

[0149] Intra Block Copy (IBC)

[0150] IBC can be used for content image / video coding, including games, such as screen content coding (SCC). IBC essentially performs prediction within the current picture, but in a manner similar to inter-frame prediction, deriving reference blocks within the current picture. In other words, IBC can utilize at least one of the inter-frame prediction techniques described in this disclosure. For example, IBC can utilize at least one of the methods for deriving motion information (motion vectors). IBC can refer to the current picture and, therefore, can be referred to as the current picture reference (CPR).

[0151] For IBC, the encoding device can perform block matching (BM) to derive the optimal block vector (or motion vector) for the current block (e.g., CU). The derived block vector (or motion vector) can be signaled to the decoding device via the bitstream using a method similar to the block information (motion vector) signaling described above in inter-frame prediction. The decoding device can use the signaled block vector (motion vector) to derive a reference block for the current block within the current picture, from which it can derive a prediction signal (prediction block or prediction sample) for the current block. Here, a block vector (or motion vector) can represent the displacement from the current block to a reference block located in a reconstructed area of the current picture. Therefore, a block vector (or motion vector) can also be referred to as a displacement vector. Hereinafter, in IBC, a motion vector may correspond to a block vector or a displacement vector. The motion vector of the current block can include a motion vector for the luma component (luminance motion vector) or a motion vector for the chroma component (chroma motion vector). For example, the luma motion vector of a CU coded for IBC can be in integer sample units (i.e., integer precision). Chroma motion vectors can also be clipped to integer sample units. As described above, IBC may use at least one of the inter-frame prediction techniques, and for example, when IBC is applied like AMVR, 1-pel and 4-pel motion vector precision may be switched.

[0152] To reduce memory consumption and decoder complexity, only the reconstructed portion of the predefined area including the current CTU may be used. This constraint allows the IBC mode to be implemented using local on-chip memory for hardware implementation.

[0153] On the encoder side, hash-based motion estimation can be performed for IBC. The encoder can perform RD check on blocks whose width or height is no greater than 16 luma samples. For non-merge mode, a block vector search can be performed by first using a hash-based search. When no valid candidates are returned in the hash search, a local search based on block matching can be performed.

[0154] In hash-based search, hash key matching (32-bit CRC) between the current block and reference blocks can be extended to all allowed block sizes. Hash key calculations for all locations in the current picture can be based on smaller 4x4 blocks. For larger current blocks, a hash key can be determined to ensure that it matches the hash key of the reference block when the hash keys of all 4x4 sub-blocks match the hash keys of the corresponding reference locations. When the hash keys of multiple reference blocks match the hash key of the current block, a block vector cost can be calculated for each matching reference block, and the block vector with the lowest cost can be selected.

[0155] In a block matching search, the search range can be set to N samples on the left and top of the current block in the current CTU. At the beginning of the CTU, when there is no temporal reference picture, the value of N can be initialized to 128, or when there is at least one temporal reference picture, the value of N can be initialized to 64. The hash hit rate can be defined as the proportion of samples in the CTU that find a matching match using a hash-based search. When the hash hit rate is less than 5% while encoding the current CTU, N can be halved.

[0156] At the CU level, the IBC mode may be signaled by using a flag, and may be signaled in IBC AMVP mode or IBC skip / merge mode as follows.

[0157] IBC skip / merge mode: It can be used to indicate the block vector used to predict the current block among the block vectors present in the list of neighboring candidate IBC coding blocks. The merge list can consist of spatial, HMVP and pairwise candidates.

[0158] IBC AMVP mode: Block vector differences can be coded in the same way as motion vector differences. The block vector prediction method uses two candidates as predictors, one of which can be used as the predictor for the left neighbor and the other can be used as the predictor for the upper neighbor (if IBC coded). When one of the two neighbors is unavailable, a default block vector can be used as the predictor. A flag indicating the block vector predictor index can be signaled.

[0159] Intra-frame prediction

[0160] Intra-frame prediction may refer to a prediction method that generates prediction samples for the current block based on reference samples within the picture (current picture) to which the current block belongs. When intra-frame prediction is applied to the current block, neighboring reference samples to be used for intra-frame prediction of the current block may be derived. The neighboring reference samples of the current block may include a total of 2×nH samples adjacent to the left boundary of the current block (nW×nH) and adjacent to the lower left corner of the current block (nW×nH), a total of 2×nW samples adjacent to the upper boundary of the current block and adjacent to the upper right corner of the current block, and one sample adjacent to the upper left corner 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 (nW×nH), a total of nW samples adjacent to the lower boundary of the current block, and one sample adjacent to the lower right corner of the current block.

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

[0162] When deriving neighboring reference samples, (i) the 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 reference samples located in a specific prediction direction among the neighboring reference samples of the current block for the prediction sample. Case (i) can be referred to as non-directional mode or non-angular mode, and case (ii) can be referred to as directional mode or angular mode. Furthermore, the prediction sample can be generated based on interpolation between a first neighboring sample and a second neighboring sample of the current block, located in a direction opposite to the prediction direction of the intra prediction mode of the current block, among the neighboring reference samples. This case can be referred to as linear interpolation intra prediction (LIP). Furthermore, chroma prediction samples can be generated based on luma samples using a linear model. This case can be referred to as LM mode. Furthermore, temporary prediction samples for the current block can be derived based on filtered neighboring reference samples, and the prediction sample for the current block can be derived by calculating a weighted sum of at least one of reference samples derived according to the intra prediction mode and the temporary prediction sample among conventional neighboring reference samples (i.e., unfiltered neighboring reference samples). This case is referred to as position-dependent intra prediction (PDPC). In addition, intra-frame prediction encoding can be performed by selecting a reference sample line with the highest prediction accuracy among multiple reference sample lines adjacent to the current block, deriving prediction samples using reference samples located in the prediction direction on the corresponding line, and indicating (signaling) the reference sample line used to the image decoding device 200. This approach can be referred to as multiple reference line (MRL) intra-frame prediction or MRL-based intra-frame prediction. Alternatively, the current block is divided into vertical or horizontal sub-partitions to perform intra-frame prediction based on the same intra-frame prediction mode, but adjacent reference samples can be derived and used on a sub-partition basis. In other words, in this case, the intra-frame prediction mode used for the current block is applied identically to each sub-partition, and adjacent reference samples are derived and used for each sub-partition unit, which can improve intra-frame prediction performance in some cases. This prediction method is called intra sub-partitioning (ISP) or ISP-based intra-frame prediction. The aforementioned intra-frame prediction methods can be referred to as intra-frame prediction types. Intra-frame prediction types can be referred to by various terms, such as intra-frame prediction techniques or additional intra-frame prediction modes. 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 that excludes specific intra prediction types such as LIP, PDPC, MRL, ISP, etc. may be referred to as a normal intra prediction type. When the aforementioned specific intra prediction types are not used, the normal intra prediction type may generally be applied, and prediction may be performed based on the aforementioned intra prediction modes. Furthermore, post-processing filtering may be performed on the derived prediction samples, if necessary.

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

[0164] In addition to the aforementioned intra prediction types, affine linear weighted intra prediction (ALWIP) can also be used. ALWIP can also be referred to as linear weighted intra prediction (LWIP), matrix weighted intra prediction, or matrix-based intra prediction (MIP). When MIP is applied to the current block, prediction samples for the current block are derived by: i) using neighboring reference samples on which an averaging process has been performed; ii) performing a matrix-vector multiplication process; and iii) further performing horizontal / vertical interpolation processes as necessary. The intra prediction mode used for MIP can be configured differently from those used in the aforementioned LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction. The intra prediction mode used for MIP can 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 can be set differently depending on the intra prediction mode used for the MIP. Here, the matrix can be referred to as a (MIP) weight matrix, and the offset can be referred to as a (MIP) offset vector or a (MIP) deviation vector.

[0165] Example

[0166] The present disclosure relates to a predictor generation method based on ternary geometric partitioning (TGIP). The present disclosure proposes a method for determining a prediction mode for generating a prediction block based on a TGIP mode, a method for deriving prediction information when using the TGIP mode, and a method for generating a prediction block based on the derived prediction information.

[0167] Unlike the existing GPM, the TGIP mode proposed in this disclosure can effectively provide the effect of expressing an object in a scene where a new object is generated on the background. In addition, because one additional region (i.e., three regions in total) is blended to different widths or areas, while the existing GPM blends two predictors (prediction blocks), the TGIP mode can further improve the performance of the prediction block.

[0168] The characteristics of the TGIP model proposed in this disclosure are as follows.

[0169] 1. In TGIP mode, a block can be partitioned into three regions using an angle to generate a predictor. For example, two straight lines can be defined based on an angle, and then a block can be partitioned into three regions using the two defined straight lines. A "region" is the result of partitioning a block and can correspond to a "lower block," "subblock," "subregion," etc. for a block.

[0170] 2. When two straight lines are defined by an angle, the total number of areas that can be partitioned by the two straight lines may vary depending on the angle.

[0171] 3. Whether TGIP mode is allowed in a coded video sequence (CVS) or coded layer video sequence (CLVS) can be determined by explicit syntax transmission in HLS (VPS, SPS, PPS, picture header, slice header, DCI, etc.).

[0172] 4. Whether the TGIP mode is applied to a specific block level (a level defined by the size and / or shape of the current block and / or information derived based on previously reconstructed information) can be determined by explicit syntax transmission.

[0173] 5. In TGIP mode, information about the angle can be sent explicitly through the bitstream or can be derived implicitly from the decoder.

[0174] 6. In TGIP mode, the information used to define the two lines can be sent explicitly through the bitstream or can be implicitly derived from the decoder.

[0175] 7. In TGIP mode, the syntax may be explicitly sent via the bitstream or may be implicitly defined in order to adaptively determine the combination of regions supported for each specific block level (a level defined by the size and / or shape of the current block and / or information derived based on previously reconstructed information), i.e., the number of partitions.

[0176] 8. In TGIP mode, two straight lines can be defined by an angle for each specific block level (a level defined by the size and / or shape and / or information of the current block derived based on previously reconstructed information), and the sizes of the three areas partitioned by using the two straight lines can be adaptively determined.

[0177] 9. In the TGIP model, the prediction modes of the three partitioned regions can be the same or different.

[0178] 10. In TGIP mode, motion information or prediction information (intra-frame prediction mode and / or intra-frame motion information, etc.) can be derived for each of the three partitioned regions.

[0179] 11. In TGIP mode, in order to derive motion information or prediction information (intra-frame prediction mode and / or intra-frame motion information, etc.) for the three regions, syntax can be explicitly sent through the bitstream or can be derived implicitly.

[0180] 12. In TGIP mode, you can configure a motion information list and / or prediction information list to derive motion information or prediction information for three regions.

[0181] 13. In TGIP mode, a motion information list and / or prediction information list can be configured for each region to derive motion information or prediction information for three regions.

[0182] 14. In TGIP mode, a blending process can be performed to combine predictors (prediction regions) derived from three types of motion information or prediction information into one predictor (prediction block for the current block). A "prediction region" is the result of predicting a region partitioned from a block, which can be a prediction block for that region.

[0183] 15. In TGIP mode, weights can be defined based on two defined lines for the blending process.

[0184] 16. In TGIP mode, the mixing process can be performed by applying weights during the mixing process.

[0185] 17. In TGIP mode, motion information and / or prediction information may be stored in a memory so that the derived motion information and / or prediction information is referenced in the next decoded block.

[0186] 18. In the TGIP mode, motion information or prediction information can be stored in units of pixels or in units of a certain size, and in this process, the motion information or prediction information can be adaptively stored by considering an angle and two straight lines.

[0187] Hereinafter, various embodiments of the present disclosure will be described. The embodiments described below can be performed individually or in combination of at least two.

[0188] exist Figure 6 The image coding method based on the TGIP mode is shown in Figure 7 FIG shows an image decoding method based on the TGIP mode. Figure 6 The image encoding method can be performed by the image encoding device 100, and Figure 7 The image decoding method may be performed by the image encoding device 100. In some cases Figure 6 and Figure 7 Some processes in the encoding / decoding process can be bypassed, and the order of the processes can be changed as needed.

[0189] refer to Figure 6 Whether the TGIP mode for CVS and / or CLVS is allowed can be determined, and if the TGIP mode is allowed, whether the TGIP mode is applied at the specific block level can be determined. Whether the TGIP mode is allowed can also be determined and transmitted in other units such as the SPS, PPS, picture, slice, etc. When the TGIP mode is applied at the specific block level, the current block can be partitioned into three regions based on partition information (i.e., two straight lines expressed at a specific angle) (S610). Prediction information (prediction mode and / or prediction information) can be determined for each region, and each region can be predicted based on the determined prediction information to generate a total of three prediction regions (S620). A final prediction block (prediction block for the current block) can be generated based on the three generated prediction regions (S630). A reconstructed block for the current block can be generated using the generated prediction blocks and a residual signal (residual block for the current block) (S640), and the reconstructed block can be loop-filtered using the partition information (S650). The information used to predict each region can be stored in a memory (S660).

[0190] refer to Figure 7 , it is possible to decode and determine whether the TGIP mode for CVS and / or CLVS is allowed (S710). If the TGIP mode is allowed, it is possible to decode and determine whether to apply the TGIP mode at the specific block level (S720). When the TGIP mode is applied at the specific block level, partition information (i.e., information about two straight lines expressed at a specific angle) is decoded or implicitly derived (S730). Based on the partition information, the current block can be partitioned into three regions (S740). Prediction information (prediction mode and / or prediction information) can be decoded or implicitly derived for each region (S750). Each region can be predicted based on the prediction information to generate a total of three prediction regions (S760). A final prediction block (prediction block for the current block) can be generated based on the three generated prediction regions (S770). A reconstructed block for the current block can be generated using the generated prediction block and a residual signal (residual block for the current block) (S780). The reconstructed block can be loop-filtered using the partition information (S790). The information used to predict each region can be stored in a memory (S795).

[0191] exist Figure 8 An example of partitioning the current block into three regions is shown in FIG. Figure 8 (a), the current block is expressed as a horizontal angle and can be partitioned into three regions (region #0, region #1, region #2) by two straight lines (line 0, line 1) with a predetermined distance. Figure 8(b) The current block is expressed as an upward angle and can be partitioned into three regions (region #0, region #1, region #2) by two straight lines (line 0, line 1) with a predetermined distance. Figure 8 (c) The current block is expressed as a vertical angle and can be partitioned into three regions (region #0, region #1, region #2) by two straight lines (line 0, line 1) with a predetermined distance. Figure 8 (d) The current block is expressed as a downward angle and can be partitioned into three regions (region #0, region #1, region #2) by two straight lines (line 0, line 1) having a predetermined distance.

[0192] For Figure 8 In the example of the three regions partitioned by two parallel straight lines, a prediction mode (inter mode, intra mode, IBC mode, etc.) can be determined to generate prediction regions. Furthermore, necessary prediction information (motion information, intra prediction mode, IBC prediction information, etc.) can be decoded and determined based on each determined prediction mode. A prediction region can be generated based on the decoded and determined prediction information.

[0193] Figure 9 An example of the prediction mode and prediction information determined for each region is shown. Figure 9 In (a), prediction regions for the three regions can be generated by using at least one different prediction mode. Depending on the embodiment, while supporting various prediction modes, by considering the amount of information transmitted through the bitstream, the directionality of the intra-frame prediction mode can be constrained, or the motion prediction region for inter-frame prediction can be constrained, or the prediction region can be generated by using only the constrained intra-frame prediction mode.

[0194] As in Figure 9 In (b), the prediction information required to generate the prediction region may be encoded and decoded for each region. Alternatively, a process of encoding and decoding at least one piece of prediction information and mapping and storing them in a prediction information storage region corresponding to each region may be additionally performed.

[0195] As in Figure 9 In (c), when the prediction mode of all regions is determined to be the inter prediction mode, information used for prediction of all regions may be derived as motion information.

[0196] Figure 10 An example is shown in which a prediction region for a region is generated based on information used for prediction, and a prediction block for a current block is generated based on the generated region.

[0197] As in Figure 10In (a) to (c), a prediction region for each region can be generated based on the prediction information for each region. As in (d) to (f), the generated prediction regions can be combined (or added) to generate a final prediction block (a prediction block for the current block). In the process of adding the prediction regions, blending in a smoothing method can be applied to eliminate discontinuities in pixel values that may occur at the boundaries of each prediction region. As in Figure 10 In (g), a smoothing range can be defined based on two straight lines (region boundaries) that partition each region. The prediction regions can be summed to apply a smoothing effect, such as a weighted summation of the prediction region values for each region. The smoothing range can be a straight line or have a variable value for each region.

[0198] For a reconstructed block generated based on a prediction block, loop filtering can be performed to improve subjective image quality by taking into account the angle, two-line information, and / or smoothing range, etc., which are partition information of the TGIP mode. Whether loop filtering is permitted, the size of the filtering area, and / or the filtering intensity can be adaptively defined. Alternatively, when a blending process has been applied to the boundary of a region within a prediction block generated using the TGIP mode, it is determined that the same smoothing process as loop filtering has been applied, and thus the loop filtering process can be skipped.

[0199] Prediction information (prediction mode and / or prediction information) used in TGIP mode can be stored in memory for reference by a subsequently decoded block. The prediction information can be adaptively stored in memory by considering an angle, two straight line information, and / or a smoothing range, etc., as partition information in TGIP mode.

[0200] Example 1

[0201] To determine whether TGIP mode is allowed, syntax may be explicitly sent via the Video Parameter Set (VPS), Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Picture Header (PH), and Decoding Capability Information (DCI) as non-VCL NALs and / or the Slice Header (SH) as VCL NALs.

[0202] exist Figure 11 The image encoding method for whether to allow the TGIP mode is shown in Figure 12 The image decoding method for determining whether the TGIP mode is permitted is shown in FIG. Figure 11 The image encoding method can be performed by the image encoding device 100, and Figure 12 The image decoding method can be performed by the image decoding device 200.

[0203] refer to Figure 11 , it may be determined whether the TGIP mode is allowed (S1110), and based on the result of the corresponding determination, permission information may be encoded (S1120 and S1130). The permission information is information indicating whether the TGIP mode is allowed, and may be a syntax such as sps_tgip_enabled_flag. When the TGIP mode is allowed, the sps_tgip_enabled_flag may be encoded as a value of 1 (S1120), and when the TGIP mode is not allowed, the sps_tgip_enabled_flag may be encoded as a value of 0 (S1130).

[0204] refer to Figure 12 When the sps_tgip_enabled_flag is obtained from the bitstream ( S1210 ), whether the TGIP mode is enabled can be determined based on the value of the sps_tgip_enabled_flag. When the value of the sps_tgip_enabled_flag is 1 ( S1220 ), the TGIP mode can be enabled ( S1230 ), and when the value of the sps_tgip_enabled_flag is 0 ( S1220 ), the TGIP mode can be disabled ( S1240 ). Specifically, when the value of the sps_tgip_enabled_flag is 1, the TGIP mode can be enabled per slice that references the corresponding parameter set or header information, or per unit (coding unit, prediction unit, etc.) at a specific level less than or equal to the corresponding parameter set or header information. When the value of the sps_tgip_enabled_flag is 0, the TGIP mode can be disallowed per slice that references the corresponding parameter set or header information, or per unit (coding unit, prediction unit, etc.) at a specific level less than or equal to the corresponding parameter set or header information. In this case, when there is a restriction that the TGIP mode is not allowed in the high-level syntax, the syntax for whether to allow the TGIP mode can be implicitly set to 0 in units belonging to the low level.

[0205] An example of signaling permission information through the SPS level is shown in Table 4. The SPS level is only an example, and the permission information may be signaled through PPS, PH, SH, etc.

[0206] [Table 4]

[0207]

[0208] The value of sps_tgip_enabled_flag is 1, which may indicate that TGIP mode (or motion compensation based on ternary geometric partitioning) is enabled in CLVS, and merge_tgip_partition_idx, merge_tgip_idx0, merge_tgip_idx1, and merge_tgip_idx2 are present in the coding unit syntax of CLVS. The value of sps_tgip_enabled_flag is 0, which may indicate that TGIP mode is disabled in CLVS, and merge_tgip_partition_idx, merge_tgip_idx0, merge_tgip_idx1, and merge_tgip_idx2 may not be present in the coding unit syntax of CLVS. When sps_tgip_enabled_flag is not present, the value of sps_tgip_enabled_flag may be inferred to be 0.

[0209] Meanwhile, a syntax for defining the number of prediction candidates required to derive prediction information in the TGIP mode may be signaled. Table 5 shows a syntax for deriving prediction information for three regions by configuring a prediction candidate list having at least two prediction candidates.

[0210] [Table 5]

[0211]

[0212] sps_max_num_merge_cand_minus_max_num_tgip_cand may indicate the maximum number of TGIP merge mode candidates (ternary geometry partitioning merge mode candidates) subtracted from the maximum number of merge candidates (MaxNumMergeCand). The value of sps_max_num_merge_cand_minus_max_num_tgip_cand may have a value from 0 to MaxNumMergeCand - 2.

[0213] MaxNumTgipMergeCand, the maximum number of TGIP merge mode candidates, can be derived by Formula 1.

[0214] [Formula 1]

[0215] if( )

[0216]

[0217] Otherwise if ( )

[0218]

[0219] otherwise

[0220]

[0221] Table 6 shows syntax for allowing three regions to have different prediction information by configuring a prediction candidate list having at least three prediction candidates.

[0222] [Table 6]

[0223]

[0224] sps_max_num_merge_cand_minus_max_num_tgip_cand may indicate the maximum number of TGIP merge mode candidates (ternary geometry partitioning merge mode candidates) subtracted from the maximum number of merge candidates. The value of sps_max_num_merge_cand_minus_max_num_tgip_cand may have a value from 0 to MaxNumMergeCand - 3.

[0225] MaxNumTgipMergeCand, the maximum number of TGIP merge mode candidates, can be derived by Formula 2.

[0226] [Formula 2]

[0227] if( )

[0228]

[0229] Otherwise if ( )

[0230]

[0231] otherwise

[0232]

[0233] Meanwhile, the syntax for defining the prediction mode supported in the TGIP mode may be explicitly signaled. Table 7 shows an example of signaling of the syntax for defining the prediction mode.

[0234] [Table 7]

[0235]

[0236] sps_tgip_prediction_mode_idc may indicate the prediction mode of ternary geometric partitioning. The value of sps_tgip_prediction_mode_idc may be defined as in Table 8.

[0237] [Table 8]

[0238] sps_tgip_prediction_mode_idc definition 0 Only supports interframe 1 Only supports intraframe 2 Only supports IBC 3 Supports inter-frame and intra-frame 4 Support inter-frame and IBC 5 Supports intra and IBC … …

[0239] Meanwhile, according to an embodiment of the present disclosure, the case where the bitstream does not support the TGIP mode by taking into account the decoding capability may be explicitly signaled through constraint information.

[0240] exist Figure 13 The image coding method for whether to constrain the TGIP mode is shown in Figure 14 The image decoding method for whether to constrain the TGIP mode is shown in FIG. Figure 13 The image encoding method in can be performed by the image encoding device 100, and Figure 14 The image decoding method in can be performed by the image decoding device 200.

[0241] refer to Figure 13 Whether the TGIP mode is constrained may be determined S1310. When the TGIP mode is constrained, constraint information (gci_no_tgip_constraint_flag) may be encoded as a value (e.g., 1) indicating that the TGIP mode is constrained S1320, and when the TGIP mode is constrained, the constraint information may be encoded as a value (e.g., 0) indicating that the TGIP mode is not constrained S1330.

[0242] refer to Figure 14 When constraint information is obtained from a bitstream (S1410), a value of the constraint information may be determined (S1420). When the value of the constraint information is 1, the TGIP mode is constrained and may not be allowed to decode the bitstream (S1430), and when the value of the constraint information is 0, the TGIP mode is not constrained and may be allowed to decode the bitstream (S1440).

[0243] An example of constraint information signaled through the DCI NAL unit is shown in Table 9.

[0244] [Table 9]

[0245]

[0246] The value of gci_no_tgip_constraint_flag of 1 may indicate that the value of sps_tgip_enabled_flag for all pictures in OlsInScope must be 0, and the value of gci_no_tgip_constraint_flag of 0 may indicate that no such constraint is imposed.

[0247] Example 2

[0248] In embodiment 2, a method of explicitly signaling whether the TGIP mode is applied through a specific unit (coding unit, prediction unit, etc.) level is proposed.

[0249] Figure 15 shows the image encoding method for whether the TGIP mode is applied, and Figure 16 Shows the image decoding method for whether the TGIP mode is applied. Figure 15 The image encoding method can be performed by the image encoding device 100, and Figure 16 The image decoding method can be performed by the image decoding device 200.

[0250] refer to Figure 15 , it may be determined whether the TGIP mode is applied to the current block S1510. When it is determined that the TGIP mode is applied, the value of the application information (tgip_flag) may be encoded as a value (e.g., 1) indicating that the TGIP mode is applied S1520, and when it is determined that the TGIP mode is not applied, the value of the application information may be encoded as a value (e.g., 0) indicating that the TGIP mode is not applied S1530.

[0251] refer to Figure 16 , application information may be obtained from the bitstream S1610, and a value of the application information may be determined S1620. When the value of the application information is 1, the TGIP mode may be applied S1630, and when the value of the application information is 0, the TGIP mode may not be applied S1640.

[0252] Example 3

[0253] In embodiment 3, a partition structure of the TGIP mode is proposed. According to the partition structure of the TGIP mode, the current block can be partitioned into three regions by using two straight lines and an angle. Hereinafter, the "partition structure of the TGIP mode" will be referred to as the "partition structure".

[0254] As in Figure 17 In (a), the angle (Angle (α)) may have a value greater than or equal to 0 degrees and less than 180 degrees relative to the horizontal direction. Figure 17In (b), the angle (Angle(α)) may have a value greater than or equal to 0 degrees and less than 260 degrees based on the horizontal direction. Figure 17 In (b), two straight lines, line #0 and line #1, have the same angle relative to the horizontal, but can be expressed differently (α degrees for line #0 and α+180 degrees for line #1) depending on the reference position used to determine the angle.

[0255] The number of supported combinations of two lines and an angle may be infinite, and among the infinite angles, the angles that can be supported in TGIP mode may be limited. Furthermore, in TGIP mode, the supported angles can be adaptively defined by considering the size and / or shape of the block and / or the characteristics of the current block that can be derived from decoded information. In other words, M angles can be supported in a specific block, while N angles can be supported in another specific block.

[0256] To define the angle, the angle can be partitioned by uniform angle differences, as in Figure 18 (a). Alternatively, the angles can be partitioned by non-uniform angle differences, as in Figure 18 (b).

[0257] As in Figure 19 In the example of , we can limit the number of cases where a block can be partitioned into straight lines with a certain angle. For example, as in Figure 19 In (a), seven straight lines with the same distance between them can be defined so that a block can be partitioned into eight arbitrary areas, and the partition structure can be defined by the combination of the defined straight lines. In this example, the number of combinations that can be derived from two straight lines among the seven straight lines can be 21. According to an embodiment, the partition structure of all combinations can be limited to a specific structure. In other words, in Figure 19 Among all the combinations in (a), only four partition structures can be used, such as Figure 19 (a) (1) to (4).

[0258] As another example, in Figure 19 In (b), seven straight lines with different distances between them can be defined so that a block can be partitioned into eight arbitrary areas, and the partition structure can be defined by the combination of the defined straight lines. In this example, the number of combinations that can be derived from two straight lines among the seven straight lines can be 21. According to an embodiment, the partition structure of all combinations can be limited to a specific structure. In other words, in Figure 19 Among all the combinations in (b), only four partition structures can be used, such as Figure 19 (b) (1) to (4).

[0259] The distance between the straight lines can be determined adaptively, and the number of straight lines can also be determined adaptively. For example, the number of straight lines can be adaptively defined based on the size of the block or the decoded information. Figure 19 In (b), when defining a block to be partitioned into six arbitrary regions, the number of lines that can be considered is 5, and the number of possible combinations may be limited to 10. In other words, depending on the size of the block or the decoded information, different numbers of partition structures can be supported even at the same angle. Figure 19 Among all the combinations of (c), we can limit ourselves to four partition structures, which is consistent with Figure 19 (c) (1) to (4).

[0260] In this manner, in a specific block, specific N combinations among 21 combinations may be supported, or specific M combinations among 10 combinations may be supported.

[0261] Depending on the embodiment, different numbers of lines can be defined for each angle and different distances between the lines. In addition, the angles and distances supported in TGIP mode can be limited to predefined specific types based on the width, height, or size (product or sum of width and height) of the current block.

[0262] This is an example of the description, and a method for defining an angle, and / or a method for defining a straight line and / or a combination of partitions that can be derived from a straight line and / or the number of partitions that can be supported among a combination of partitions that can be derived, etc. can be adaptively defined.

[0263] Example 4

[0264] In Embodiment 4, when it is determined that a prediction block is generated using the TGIP mode at the level of a specific unit (coding unit, prediction unit, etc.), a method is proposed for explicitly transmitting or implicitly deriving relevant information (partition information) for partitioning a block (a region of the current block) at the low level of the specific unit in the TGIP mode. Furthermore, a method for defining a partition mode that can be derived from the partition information is also proposed.

[0265] Figure 20 An image encoding method for deriving partition information is shown, and Figure 21 An image decoding method for deriving partition information is shown. Figure 20 The image encoding method can be performed by the image encoding device 100, and Figure 21 The image decoding method can be performed by the image decoding device 200.

[0266] refer to Figure 20, it may be determined whether the TGIP mode is applied to the current block S2010. When the TGIP mode is applied, partition information may be selectively encoded S2020. Selective encoding of partition information means that, when the TGIP mode is applied, the partition information may be encoded and explicitly signaled, or the partition information may not be signaled.

[0267] refer to Figure 21 , it may be determined whether the TGIP mode is applied to the current block based on the application information (tgip_flag) S2110. When the TGIP mode is applied, the partition information explicitly signaled may be obtained from the bitstream, or the partition information may be derived without signaling the partition information S2120.

[0268] Example 4-1

[0269] In Example 4-1, a method for explicitly signaling partition information via the bitstream and a method for deriving a partition structure for a TGIP mode based on the signaled partition information are proposed. In other words, in Example 4-1, a method for deriving a predefined partition mode using partition information (ternary_gpm_partition_idx) to derive the partition structure of the current block and a method for signaling the partition information (ternary_gpm_partition_idx) are proposed. The method proposed in Example 4-1 improves compression efficiency while minimizing increases in complexity, such as decoder pipeline delay.

[0270] Figure 22 An image encoding method for deriving partition information is shown, and Figure 23 An image decoding method for deriving partition information is shown. Figure 22 The image encoding method can be performed by the image encoding device 100, and Figure 23 The image decoding method can be performed by the image decoding device 200.

[0271] refer to Figure 22 When determining the partition structure of the current block (S2210), partition information representing the determined partition structure may be encoded (S2220). The partition information may include a partition index. The partition index may represent any one of the partition structure candidates that may be used to partition the current block.

[0272] refer to Figure 23 , when a partition index is obtained from a bitstream S2310, a partition structure candidate represented by the partition index among partition structure candidates that can be used to partition a current block can be determined as a partition structure of the current block S2320.

[0273] Examples of partition structure candidates are shown in Table 10.

[0274] [Table 10]

[0275]

[0276] In Table 10, ternary_gpm_partition_idx represents a partition index, angleIdx represents an index from which angle information can be derived (partition angle index), and partitionIdx represents an index from which the partition structure can be derived (partition position index). In other words, each partition structure candidate may include a partition angle index and a partition position index. Based on the partition angle index and partition position index represented by the partition index, the partition structure of the current block can be determined.

[0277] X (X is a natural number greater than or equal to 0) partition structures (partition structure candidates) supported for one block may be defined. The number of angles used to derive the partition structure may be defined, and the number of combinations of lines used to support the partition structure may also be defined.

[0278] Furthermore, the X partition structures can represent the sum of the number of angles and the number of combinations between lines. The X partition structures can be derived using the partition index (ternary_gpm_partition_idx). In other words, the angle and line combinations can be derived using the signaled partition index. The number of partitions defined for each angle (A, B, C, D, E, F, G, H, ...) can have the same value or different values. When the number of partitions defined for each angle has the same value, the same number of partitions can be supported for each angle. When the number of partitions defined for each angle has different values, a different number of partitions can be supported for each angle.

[0279] An example of partition structure candidates is shown in Table 11, where the total number X of partition structures is defined as 32, and 4 partitions are defined for each angle.

[0280] [Table 11]

[0281]

[0282] The partition structure may only support some angles, such as Figure 18 Among the supported angles in (a), Figure 18 (b). However, Figure 18 For example, the angle supported by the partition structure may be Figure 18(b) which are the different angles, and angleIdx representing this may have different values depending on the number of supported angles.

[0283] When angleIdx 1 is selected among the partition structure candidates in Table 11, the number of cases where two straight lines are generated at the angle defined by angleIdx 1 to partition one block may be infinite. However, for convenience of description, based on the Figure 19 Among the 21 combinations in (a), Figure 19 Four partition structures (1) to (4) of (a) are described.

[0284] You can use Figure 19 (a) The partition structures of (1) to (4) are defined as the partition index values 4 to 7 among the candidate partition structures in Table 11. In other words, when the partition index value signaled through the bitstream is 5, the current block can be partitioned into Figure 19 (a) Partition structure in (2).

[0285] At the same time, the partition angle index and partition position index used to derive the partition structure can also be signaled. Figure 24 An image coding method for signaling a partition angle index and a partition position index is shown, and Figure 25 An image decoding method for signaling a partition angle index and a partition position index is shown. Figure 24 The image encoding method can be performed by the image encoding device 100, and Figure 25 The image decoding method can be performed by the image decoding device 200.

[0286] refer to Figure 24 When the partition structure / position is determined ( S2410 ), the partition position / angle may be determined based on the partition position / angle supported by the determined partition structure / position ( S2420 ). Specifically, when the partition angle is determined, any one of the partition positions supported by the determined partition angle may be determined as the partition position of the current block. In addition, when the partition position is determined, any one of the partition angles supported by the determined partition position may be determined as the partition angle of the current block.

[0287] A partition angle index representing the determined partition angle and a partition position index representing the determined partition position may be encoded (S2430). For example, the partition angle index may be signaled first, and then the partition position index may be adaptively signaled based on the number of partitions (number of partition positions) supported by the signaled partition angle index. As another example, the partition position index may be signaled, and then the partition angle index may be adaptively signaled based on the number of angles (number of partition angles) supported by the signaled partition position index.

[0288] refer to Figure 25 When a partition angle / position index is obtained from a bitstream (S2510), the partition angle / position indicated by the partition angle / position index may be determined (S2520). In addition, any one of the partition positions / angles supported by the determined partition angle / position may be determined (S2530). Specifically, when the partition angle is determined, any one of the partition positions supported by the determined partition angle may be determined as the partition position of the current block. In addition, when the partition position is determined, any one of the partition angles supported by the determined partition position may be determined as the partition angle of the current block.

[0289] Example 4-2

[0290] In embodiment 4-2, a method for more efficiently signaling partition information is proposed.

[0291] Template matching costs are calculated for the partition structures (or partition structure candidates), and after reordering the partition structures in ascending order based on the calculated costs, partition structure index values can be defined in the reordered order. In other words, among the partition structures, partition structures with a high probability of selection can be given priority. In this way, when a partition structure with a high probability of selection has a high priority, a smaller number of bits are signaled in the bitstream to derive or determine the partition structure with a high probability of selection, thereby improving compression efficiency.

[0292] When there are 32 partition structure candidates as in the example of Table 12, it may be the same as in Table 13 when calculating template matching costs for the 32 partition structure candidates and reordering the partition structure candidates in ascending order based on the calculated template matching costs.

[0293] [Table 12]

[0294]

[0295] [Table 13]

[0296]

[0297] When sorting is not performed as in Table 12, ternary_gpm_partition_idx with a value of 8 must be signaled to derive a partition structure defined as having an angleIdx value of 2 and a partitionIdx value of 0. However, when sorting is performed as in Table 13, ternary_gpm_partition_idx with a value of 2 must be signaled to derive a partition structure defined as having an angleIdx value of 2 and a partitionIdx value of 0.

[0298] Because the sorting process must also be performed in the decoder, complexity issues may arise. To address this issue, the following approach can be used.

[0299] For example, angleIdx may be fixed, the template matching cost of the partition structure corresponding to the partitionIdx supported by the fixed angleIdx may be calculated, and the partition positions may be reordered in ascending order based on the template matching cost. In other words, the partition positions for corresponding angles may be defined in order of priority, and the corresponding partitionIdx may be signaled.

[0300] As another example, partionIdx may be fixed, a template matching cost for a partition structure supporting an angle with the fixed partionIdx may be calculated, and the angles may be reordered in ascending order based on the template matching cost. In other words, angleIdx may be defined in order of priority for supporting the corresponding partition position, and the corresponding angleIdx may be signaled.

[0301] According to an embodiment, the gradient of the neighboring reconstructed reference samples of the current block is calculated to derive an angle value, and the magnitude corresponding to the calculated gradient can be calculated and accumulated in units of gradients. In this case, each gradient can be defined as an angle value. Based on the magnitude of the accumulated gradients, the current block can be partitioned by using the angle defined as the gradient with the largest magnitude value or the gradient with the smallest magnitude value.

[0302] According to an embodiment, the gradient of the neighboring reconstructed reference samples of the current block is calculated to derive an angle value, and the magnitude corresponding to the calculated gradient can be calculated and accumulated in units of gradients. In this case, each gradient can be defined as an angle value. Based on the magnitude of the accumulated gradient, the current block can be partitioned by using an angle perpendicular to the angle defined as the gradient with the maximum magnitude value or the gradient with the minimum magnitude value.

[0303] Example 5

[0304] In embodiment 5, a method for deriving prediction information for generating prediction regions for three regions is proposed.

[0305] The prediction region for each region can be generated based on at least one of intra mode (or intra prediction mode), inter mode (or inter prediction mode), and IBC mode (or IBC prediction mode). In other words, all prediction modes for the three regions can be the same or different. Alternatively, the prediction mode for two of the three regions can be the same, and the prediction mode for the remaining region can be different.

[0306] Figure 26 An example of an image encoding method for deriving a prediction mode is shown, and Figure 27 An example of an image decoding method for deriving a prediction mode is shown. Figure 26 The image encoding method can be performed by the image encoding device 100, and Figure 27 The image decoding method can be performed by the image decoding device 200.

[0307] refer to Figure 26 A region index (region idx) for identifying a region may be set to an initial value (e.g., 0) (S2610), and whether a prediction mode is determined for all regions may be determined (S2620). If a region exists for which a prediction mode has not been determined, a prediction mode for the corresponding region may be determined (S2630). When the prediction mode for the corresponding region is intra mode (Intra), prediction mode information may be encoded as the intra mode, and intra prediction information (e.g., the intra prediction mode) used to perform intra prediction may be encoded (S2640). When the prediction mode for the corresponding region is inter mode (Inter), prediction mode information may be encoded as the inter mode, and inter prediction information (e.g., motion information) used to perform inter prediction may be encoded (S2650). When the prediction mode for the corresponding region is IBC mode, prediction mode information may be encoded as the IBC mode, and IBC prediction information (e.g., a block vector) used to perform IBC prediction may be encoded (S2660). After the value of the region index is increased by 1 S2670, it may be determined again whether to determine the prediction mode for all regions S2620. These processes may be repeatedly performed to determine and encode the prediction mode for all regions.

[0308] refer to Figure 27A region index (region idx) used to identify a region may be set to an initial value (e.g., 0) S2710, and a determination may be made as to whether prediction modes are derived for all regions S2720. If a region exists for which a prediction mode has not been derived, prediction mode information for the corresponding region may be obtained from the bitstream S2730, and a prediction mode for the corresponding region may be determined based on the obtained prediction mode information S2740. When the prediction mode for the corresponding region is intra mode (Intra), the prediction mode may be set to intra mode S2750, and intra prediction information (e.g., intra prediction mode) for performing intra prediction may be obtained S2755. When the prediction mode for the corresponding region is inter mode (Inter), the prediction mode may be set to inter mode S2760, and inter prediction information (e.g., motion information) for performing inter prediction may be obtained S2765. When the prediction mode for the corresponding region is IBC mode, the prediction mode may be set to IBC mode S2770, and IBC prediction information (e.g., block vector) for performing IBC prediction may be obtained S2775. After the value of the region index is increased by 1 S2780, it may be determined again whether to derive prediction modes for all regions S2720. These processes may be repeatedly performed to derive prediction modes for all regions.

[0309] Meanwhile, the prediction region for each region may be generated based on only one of the intra mode, inter mode, and IBC mode. In other words, the prediction regions for the three regions may be generated using only a single prediction mode.

[0310] Figure 28 An example of an image encoding method for a single prediction mode is shown, and Figure 29 An example of an image decoding method for a single prediction mode is shown. Figure 28 The image encoding method can be performed by the image encoding device 100, and Figure 29 The image decoding method can be performed by the image decoding device 200.

[0311] refer to Figure 28 , the region index (Region idx) used to identify the region may be set to an initial value (e.g., 0) S2810, and it may be determined whether a prediction mode is determined for all regions S2820. When there is a region for which a prediction mode has not been determined, the prediction mode for the corresponding region may be encoded as any one of intra mode, inter mode, or IBC mode S2830. After the value of the region index is increased by 1 S2840, it may be determined again whether a prediction mode is determined for all regions S2820. These processes may be repeatedly performed to determine and encode a single prediction mode for all regions.

[0312] refer to Figure 29 , the region index (Region idx) used to identify the region can be set to an initial value (e.g., 0) S2910, and it can be determined whether to derive a prediction mode for all regions S2920. When there is a region for which a prediction mode has not been derived, prediction mode information for the corresponding region can be obtained from the bitstream S2930, and the prediction mode for the corresponding region can be determined as any one of intra mode, inter mode, and IBC mode based on the obtained prediction mode information. After the value of the region index is increased by 1 S2400, it can be determined again whether to derive a prediction mode for all regions S2920. These processes can be repeated to derive a single prediction mode for all regions.

[0313] At the same time, the prediction region for each region can be generated based on only any two of the intra mode, inter mode, and IBC mode. For example, the prediction region can be generated based on the intra mode and the inter mode, or the prediction region can be generated based on the intra mode and the IBC mode, or the prediction region can be generated based on the inter mode and the IBC mode.

[0314] Figure 30 An example of an image encoding method for two prediction modes is shown, and Figure 31 An example of an image decoding method for two prediction modes is shown. Figure 30 The image encoding method can be performed by the image encoding device 100, and Figure 31 The image decoding method can be performed by the image decoding device 200.

[0315] refer to Figure 30 A region index (Region idx) for identifying a region may be set to an initial value (e.g., 0) S3010, and a determination may be made as to whether a prediction mode is determined for all regions S3020. If a region exists for which a prediction mode has not been determined, a prediction mode for the corresponding region may be determined S3030. When the prediction mode for the corresponding region is intra mode (Intra), prediction mode information may be encoded in the intra mode, and intra prediction information for performing intra prediction (e.g., intra prediction mode) may be encoded S3040. When the prediction mode for the corresponding region is inter mode (Inter), prediction mode information may be encoded in the inter mode, and inter prediction information for performing inter prediction (e.g., motion information) may be encoded S3050. After the value of the region index is incremented by 1 S3060, a determination may be made again as to whether a prediction mode is determined for all regions S3020. These processes may be repeated to determine and encode prediction modes for all regions.

[0316] refer to Figure 31A region index (Region idx) used to identify a region may be set to an initial value (e.g., 0) (S3110), and a determination may be made as to whether prediction modes have been derived for all regions (S3120). If a region exists for which a prediction mode has not been derived, prediction mode information for the corresponding region may be obtained from the bitstream (S3130), and a prediction mode for the corresponding region may be determined based on the obtained prediction mode information (S3140). When the prediction mode for the corresponding region is intra mode (Intra), the prediction mode may be set to intra mode (S3150), and intra prediction information (e.g., intra prediction mode) for performing intra prediction may be obtained (S3155). When the prediction mode for the corresponding region is inter mode (Inter), the prediction mode may be set to inter mode (S3160), and inter prediction information (e.g., motion information) for performing inter prediction may be obtained (S3165). After the value of the region index is incremented by 1 (S3170), a determination may be made again as to whether prediction modes have been derived for all regions (S3120). These processes may be repeated to derive prediction modes for all regions.

[0317] According to an embodiment, the prediction information (intra-frame prediction mode, motion information, block vector, etc.) required to generate the prediction region can be explicitly signaled or implicitly derived in units of regions. Figure 32 In (a), the current block can be partitioned into three regions, and prediction regions for the partitioned regions can be generated by using different prediction modes. In this case, prediction information required to generate the prediction region for each region can be signaled or derived.

[0318] Example 6

[0319] In Embodiment 6, various examples of partition structure candidates are proposed.

[0320] As in Table 14, whether a GPM is ternary partitioned can be defined by adding merge_gpm_partition_idx (partition index) to an existing GPM.

[0321] [Table 14]

[0322]

[0323] Each merge_gpm_partition_idx (ie, each partition structure candidate indicated by merge_gpm_partition_idx) may include angleIdx from which an angle (partition angle index) may be derived, distanceIdx from which a partition (distance index) may be derived, and ternarySplit indicating whether it is ternary partitioned (ternary information).

[0324] merge_gpm_partition_idx with a ternarySplit value defined as 0 may indicate that ternary partitioning is not applied and the current block is binary partitioned into two regions in the same manner as the existing GPM. merge_gpm_partition_idx with a ternarySplit value defined as 1 may indicate that the current block is ternary partitioned into three regions.

[0325] For example, when the value of merge_gpm_partition_idx is 0, the value of ternarySplit is 0, so the current block can be partitioned into a structure in which angleIdx is 0 and distanceIdx is 1, as in Figure 33 As another example, when the value of merge_gpm_partition_idx is 64, the value of ternarySplit is 1, so the current block can be ternary partitioned.

[0326] The value of angleIdx is 0 means that partitioning is performed at the same angle as in the existing GPM where angleIdx is 0. However, the value of distanceIdx is 1 defines two straight lines, while partitioning is performed by using the straight line at the position defined by distanceIdx 1 in the existing GPM. Based on the straight line defined at the position of distanceIdx, the remaining straight line can be defined at a predefined distance, as in Figure 33 (a). In other words, in order to derive two straight lines, line 0 can be defined at a position where distanceIdx is 1, and line 1 can be defined at a position separated by a distance (Distance(δ)) between the predefined straight lines. In other words, the distance Distance(δ) between line 0 and line 1 can be predefined. Distance(δ) can have an integer value and can have the same value for all angles, or can have a different value for each angle. In addition, Distance(δ) can have the same or different values according to the size of the block. The value of Distance(δ) can be predefined in the decoder, or can be defined in non-VCL NAs such as SPS / PPS / PH / APS / DCI and VCL NALs such as SH. In addition, the value of Distance(δ) can be predefined as a value of width / N or height / N according to the angle, and N can be an arbitrary integer.

[0327] When Distance (δ) is predefined as a value of width / 2, as in Figure 33In (b), the partition structure when merge_gpm_partition_idx is 64 is the same as the partition structure when merge_gpm_partition_idx is 101, so the same prediction area can be generated. To solve this redundancy problem, as in Figure 33 In (c), the value for defining the distance of line 1 according to angleIdx may be adaptively defined to have different values, such as Distance(δ) and Distance(Ω).

[0328] According to another embodiment, as shown in Table 15, in a ternary partition structure that can be generated by two straight lines, some partition structures can be predefined and new distanceIdx can be assigned to them. In other words, unlike the above method in which a straight line is defined based on distanceIdx and another straight line is separated from it at the position of Distance (δ), a new distanceIdx can be defined for each predefined partition structure of angles, 4, 5, 6, 7, ..., M, and a partition structure corresponding to distanceIdx for each angle can be defined.

[0329] [Table 15]

[0330]

[0331] In Table 15, partition structure candidates with distanceIdx values of 0 to 3 may be binary partition structure candidates, and partition structure candidates with distanceIdx values of 4 to M(6) may be ternary partition structure candidates. In other words, the embodiment of Table 15 may be an embodiment for distinguishing between binary partitions and ternary partitions according to the value of distanceIdx.

[0332] In another embodiment, binary partitioning and ternary partitioning can be distinguished based on the value of angleIdx. In other words, for ternary partitioning, considering that its prediction effect may vary depending on the angle, the number of partitions supported for each angle can be adaptively determined. Alternatively, for a specific angle, ternary partitioning may not be supported.

[0333] Table 16 is an example of partition structure candidates for distinguishing binary partitions and ternary partitions according to the value of angleIdx.

[0334] [Table 16]

[0335]

[0336] In Table 16, the partition structure candidates having angleIdx values of 0, 4, 8, and 12 may be ternary partition structure candidates, and the partition structure candidates having angleIdx values other than 0, 4, 8, and 12 may be binary partition structure candidates. In other words, in the example of Table 16, the number of added X partition structures is 16, and 0, 4, 8, and 12 may be defined such that 4 angles are supported to support 16 partition structures.

[0337] In such Figure 34 For the angles in (a), distanceIdx can be defined so that 4 predefined ternary partition structures are supported for each angle. For example, when angleIdx is 0 and distanceIdx is 4, 5, 6, and 7, you can define and map Figure 34 Partition structures in (b) to (e). As the same example, when the value of angleIdx is 4 and the values of distanceIdx are 4, 5, 6, and 7, it is possible to define and map Figure 34 Partition structure in (f) to (i).

[0338] The method described in Embodiment 6 is merely an example, and X, which is the total number of added partition structures, the number of ternary partition structures defined for each angle, and the like may be changed.

[0339] Example 7

[0340] In embodiment 7, a method of deriving prediction information for deriving three prediction regions is proposed.

[0341] Multiple prediction modes can be supported for generating prediction regions in TGIP mode. For example, when (prediction mode for region 0, prediction mode for region 1, prediction mode for region 2) is defined as (X, Y, Z), X, Y, and Z can be inter-frame mode, intra-frame mode, and / or IBC mode.

[0342] Table 17 shows a syntax structure that supports generating a prediction region by using at least one different prediction mode.

[0343] [Table 17]

[0344]

[0345] In Table 17, array indexes x0 and y0 may represent a position (x0, y0) of a top-left luma sample of a coding block considered based on a top-left luma sample of a picture.

[0346] tgip_flag may indicate whether the TGIP mode is applied to the current coding unit. When tgip_flag does not exist, the value of tgip_flag may be inferred to be 0.

[0347] tgip_partition_idx may indicate the partition shape (partition structure) of the TGIP mode. In other words, tgip_partition_idx may be a partition index. When tgip_partition_idx does not exist, the value of tgip_partition_idx may be inferred to be 0.

[0348] tgip_pred_mode_idx0 may indicate the prediction mode of the first geometric partition region (first region). In other words, tgip_pred_mode_idx0 may be prediction mode information. When tgip_pred_mode_idx0 does not exist, the value of tgip_pred_mode_idx0 may be inferred to be inter-frame.

[0349] tgip_inter_cand_idx0 may indicate the first inter candidate index of the motion compensation candidate list based on geometric partitioning (TGIP). tgip_inter_cand_idx0 may be prediction information. When tgip_inter_cand_idx0 does not exist, the value of tgip_inter_cand_idx0 may be inferred to be 0.

[0350] tgip_intra_cand_idx0 may indicate the first intra candidate index of the intra mode list based on geometric partitioning. tgip_intra_cand_idx0 may be prediction information. When tgip_intra_cand_idx0 does not exist, the value of tgip_intra_cand_idx0 may be inferred to be 0.

[0351] tgip_ibc_cand_idx0 may indicate the first IBC candidate index of the IBC motion compensation candidate list based on geometric partitioning. tgip_ibc_cand_idx0 may be prediction information. When tgip_ibc_cand_idx0 does not exist, the value of tgip_ibc_cand_idx0 may be inferred to be 0.

[0352] tgip_pred_mode_idx1 may indicate the prediction mode of the second geometric partition region (second region). In other words, tgip_pred_mode_idx1 may be prediction mode information. When tgip_pred_mode_idx1 does not exist, the value of tgip_pred_mode_idx1 may be inferred to be inter-frame.

[0353] tgip_inter_cand_idx1 may indicate the second inter candidate index of the motion compensation candidate list based on geometric partitioning (TGIP). tgip_inter_cand_idx1 may be prediction information. When tgip_inter_cand_idx1 does not exist, the value of tgip_inter_cand_idx1 may be inferred to be 0.

[0354] tgip_intra_cand_idx1 may indicate the second intra candidate index of the intra mode list based on geometric partitioning. tgip_intra_cand_idx1 may be prediction information. When tgip_intra_cand_idx1 does not exist, the value of tgip_intra_cand_idx1 may be inferred to be 0.

[0355] tgip_ibc_cand_idx1 may indicate the second IBC candidate index of the IBC motion compensation candidate list based on geometric partitioning. tgip_ibc_cand_idx1 may be prediction information. When tgip_ibc_cand_idx1 does not exist, the value of tgip_ibc_cand_idx1 may be inferred to be 0.

[0356] tgip_pred_mode_idx2 may indicate the prediction mode of the third geometric partition region (third region). In other words, tgip_pred_mode_idx2 may be prediction mode information. When tgip_pred_mode_idx2 does not exist, the value of tgip_pred_mode_idx2 may be inferred to be inter-frame.

[0357] tgip_inter_cand_idx2 may indicate the third inter candidate index of the motion compensation candidate list based on geometric partitioning (TGIP). tgip_inter_cand_idx2 may be prediction information. When tgip_inter_cand_idx2 does not exist, the value of tgip_inter_cand_idx2 may be inferred to be 0.

[0358] tgip_intra_cand_idx2 may indicate the third intra candidate index of the intra mode list based on geometric partitioning. tgip_intra_cand_idx2 may be prediction information. When tgip_intra_cand_idx2 does not exist, the value of tgip_intra_cand_idx2 may be inferred to be 0.

[0359] tgip_ibc_cand_idx2 may indicate the third IBC candidate index of the IBC motion compensation candidate list based on geometric partitioning. tgip_ibc_cand_idx2 may be prediction information. When tgip_ibc_cand_idx2 does not exist, the value of tgip_ibc_cand_idx2 may be inferred to be 0.

[0360] Table 18 shows the relationship between prediction mode information and prediction modes.

[0361] [Table 18]

[0362]

[0363] Table 19 shows the syntax structure supporting intra mode and inter mode.

[0364] [Table 19]

[0365]

[0366] Table 20 shows the syntax structure supporting IBC mode and inter-frame mode.

[0367] [Table 20]

[0368]

[0369] Table 21 shows a syntax structure supporting generation of prediction blocks in the same prediction mode.

[0370] [Table 21]

[0371]

[0372] According to Table 21, prediction information for the third region (tgip_inter_cand_idx2) can be signaled only when at least four prediction candidates are derived from the prediction candidate list (MaxNumTgipCand > 3). When fewer than four prediction candidates are derived from the prediction candidate list, prediction information for the third region can be derived as the remaining prediction information not selected from the first and second regions. Furthermore, prediction information for the third region can be implicitly derived as prediction information for the first or second region, or as predefined default prediction information.

[0373] In the TGIP mode, only partition information is signaled, and for information used for prediction for each region (prediction mode information and prediction information), a syntax structure for a method using predefined values is shown in Table 22. For example, prediction regions for three regions may be generated using a predefined prediction mode, and prediction information may be derived from a decoder, or predefined prediction information may be used.

[0374] [Table 22]

[0375]

[0376] Example 8

[0377] In embodiment 8, a method is proposed for mixing each region unit to generate a final prediction block (prediction block of the current block) by combining prediction regions generated by the TGIP mode. Figure 35 Embodiment 8 is described with reference to the prediction blocks, region 0, region 1, and region 2 illustrated in FIG. Region 0 represents a first prediction region, region 1 represents a second prediction region, and region 2 represents a third prediction region.

[0378] Example 8-1

[0379] As in Figure 36 In the example, the prediction block can be generated by weighted summing the result of mixing region 0 and region 1 based on line 0 and the result of mixing region 1 and region 2 based on line 2. α and β are weight values, which can be based on Figure 37 The straight lines in the equation are derived. For example, α can be derived based on the first straight line, and β can be derived based on the second straight line. C can represent the maximum value of the weight. α, β, and C can have integer values.

[0380] exist Figure 37 In the example of (a), the weights (α, β) can be derived using Formula 3.

[0381] [Formula 3]

[0382]

[0383] b(x, y) can represent the weight value.

[0384] The mixing process can be performed asymmetrically based on two straight lines. Figure 37 In the example of (b), region 1, which is the region between the two straight lines, has regions mixed on both sides that are different from those of regions 0 and 2, and therefore a different mixing method needs to be applied to regions 0 and 2.

[0385] For this purpose, Figure 37 The weight derivation method of (c) can be applied to the lower left corner of region 1, and such as Figure 37 The weight derivation method of (d) can be applied to the upper right corner of region 1.

[0386] exist Figure 37 In the example of (c), the weights (α, β) can be derived using Formula 4.

[0387] [Formula 4]

[0388]

[0389] exist Figure 37 In the example of (d), the weights (α, β) can be derived using Formula 5.

[0390] [Formula 5]

[0391]

[0392] Example 8-2

[0393] like Figure 38 As shown in , a prediction block can be generated by using a weight defined for each prediction region for each region. The sum of the weights applied to the prediction regions can be a specific integer value.

[0394] To blend region 0, region 1, and region 2, weights (α, β, γ) for region 0, region 1, and region 2 may be defined. The weight values may have different values depending on the pixel location. The sum of α, β, and γ may have the same integer value at all pixel locations.

[0395] The weight values can be derived based on the position of the pixels and the line to be blended. Figure 39 An example of deriving weight values is shown in . Figure 39 (a) shows a method for deriving a weight α applied to a first prediction region based on a distance ( d1 ) between a pixel and a straight line 0 and a range to be blended ( b1 ). Figure 39 (c) shows a method for deriving the weight γ applied to the third prediction region based on the distance (d2) between the pixel and the straight line 1 and the range to be blended (b2). Figure 39 (b) shows a method for deriving a weight β applied to the second prediction region based on predetermined values C, α, and γ. C may be the maximum value of the weight.

[0396] Figure 40 An exemplary diagram showing a content streaming system to which embodiments of the present disclosure can be applied is shown.

[0397] like Figure 40As shown in , a content streaming system to which an embodiment of the present disclosure is applied may broadly include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

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

[0399] A bitstream may be generated by applying the video encoding method and / or the image encoding apparatus according to the embodiments of the present disclosure, and a streaming server may temporarily store the bitstream during a process of transmitting or receiving the bitstream.

[0400] The streaming server can transmit multimedia data to a user device via a web server based on a user request, and the web server can act as an intermediary to inform the user of available services. When the user requests a desired service from the web server, the web server can transmit the request to the streaming server, and the streaming server can transmit the multimedia data to the user. In this case, the content streaming system can include a separate control server, and in this case, the control server can play a role in controlling the command / response exchange between devices within the content streaming system.

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

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

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

[0404] The scope of the present disclosure includes software or machine-executable instructions (i.e., operating systems, applications, firmware, programs, etc.) that enable the operations of the methods according to various embodiments to be performed on a device or computer, as well as non-transitory computer-readable media in which such software or instructions are stored and executable on a device or computer.

[0405] [Industrial Applicability]

[0406] The embodiments of the present disclosure may be used to encode / decode images.

Claims

1. An image decoding method performed by an image decoding apparatus, comprising: Based on the partition information, the current block is partitioned into three regions; generating a predicted region for each region based on the predicted information for the three regions; as well as Based on the generated prediction area, a prediction block for the current block is generated.

2. The method according to claim 1, wherein obtaining the partition information from the bitstream based on application information obtained from the bitstream indicating that a mode of partitioning the block into three regions is applied; as well as The application information is obtained from the bitstream based on permission information obtained from the bitstream, indicating that the mode is permitted.

3. The method according to claim 1, wherein The partition information includes a partition index indicating any one of partition structure candidates that can be used to partition the current block, and The current block is partitioned into the three regions based on the partition structure candidate represented by the partition index among the partition structure candidates.

4. The method according to claim 3, wherein: Each partition structure candidate includes a partition angle index and a partition position index, and The current block is partitioned into the three regions based on the partition angle index and the partition position index represented by the partition index.

5. The method according to claim 3, wherein Each of the partition structure candidates includes ternary information indicating whether to perform ternary partitioning, and Partitioning the current block into the three regions based on the ternary information represented by the partition index indicating that the ternary partitioning is performed, and partitioning the current block into the two regions based on the ternary information represented by the partition index indicating that the ternary partitioning is not performed.

6. The method according to claim 5, wherein: Each partition structure candidate further includes a partition angle index and a distance index; Wherein, based on the first straight line and the second straight line, the current block is partitioned into the three areas; wherein the first straight line is derived based on a partition angle index and a distance index represented by the partition index; and The second straight line is derived based on the partition angle index represented by the partition index, the distance index, and a predetermined distance.

7. The method according to claim 3, wherein: The partition structure candidates include binary partition structure candidates and ternary partition structure candidates, and The current block is partitioned into the three regions based on the partition index representing any one of the ternary partition structure candidates, and is partitioned into two regions based on the partition index representing any one of the binary partition structure candidates.

8. The method according to claim 1, wherein The information used for the prediction includes prediction mode information indicating a prediction mode for each of the regions, and The prediction mode information indicates any one of an intra mode, an inter mode, and an intra block copy (IBC) mode.

9. The method according to claim 8, wherein The information for the prediction further includes prediction information on the prediction mode indicated by the prediction mode information, and The prediction information is an index representing any one of the available prediction candidates.

10. The method according to claim 1, wherein generating the final prediction block based on a value obtained by weighted averaging the first prediction region and the second prediction region using a first weight and a value obtained by weighted averaging the second prediction region and the third prediction region using a second weight, wherein the first weight is derived based on a first straight line partitioning the first prediction area and the second prediction area, and The second weight is derived based on a second straight line partitioning the second prediction region and the third prediction region.

11. The method according to claim 1, wherein generating the final prediction block based on a value obtained by applying a first weight to the first prediction region, a value obtained by applying a second weight to the second prediction region, and a value obtained by applying a third weight to the third prediction region, The first weight is derived based on a first straight line that partitions the first prediction area and the second prediction area. wherein the third weight is derived based on a second straight line partitioning the second prediction area and the third prediction area, and The second weight is derived based on the first weight and the third weight.

12. The method according to claim 1, wherein Information used for the prediction is stored in a memory.

13. An image encoding method performed by an image encoding apparatus, comprising: Partition the current block into three regions; generating a predicted region for each region based on the predicted information for the three regions; as well as Based on the generated prediction area, a prediction block for the current block is generated.

14. A method for transmitting a bitstream generated by an image encoding method, the image encoding method comprising: Partition the current block into three regions; generating a predicted region for each region based on the predicted information for the three regions; as well as Based on the generated prediction area, a prediction block for the current block is generated.

15. A recording medium storing a bit stream generated by the image encoding method according to claim 13.