Image encoding / decoding method and device for utilizing simplified mpm list generation method and method for transmitting bitstream

The image encoding/decoding method addresses the high cost of transmitting high-resolution images by mapping intra prediction modes to predetermined modes, improving efficiency and reducing complexity for enhanced image transmission and storage.

JP2024157031AActive Publication Date: 2024-11-06NOKIA TECHNOLOGIES OY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024139477
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-06-13
Filing Date
2024-08-21
Publication Date
2024-11-06
Estimated Expiration
2040-06-15

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality images leads to a significant increase in transmission and storage costs due to the higher amount of information required, necessitating highly efficient image compression techniques.

Method used

An image encoding/decoding method that reduces prediction complexity by mapping intra prediction modes of peripheral blocks to predetermined modes, such as planar, DC, and vertical modes, and generates a candidate intra prediction mode list based on neighboring blocks.

Benefits of technology

This approach enhances encoding/decoding efficiency and reduces complexity while enabling effective transmission and storage of high-resolution images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024157031000001_ABST
    Figure 2024157031000001_ABST
Patent Text Reader

Abstract

To provide an image encoding / decoding method and an apparatus.SOLUTION: An image encoding / decoding method and an apparatus are provided. An image decoding method performed by an image decoding apparatus may include steps of: identifying a prediction mode of a current block; determining a candidate intra prediction mode for the current block, based on a prediction mode of a neighboring block located around the current block, based on the prediction mode of the current block being an intra prediction mode; generating a candidate intra prediction mode list of the current block based on the candidate intra prediction mode; and determining an intra prediction mode of the current block based on the candidate intra prediction mode list. In this case, the candidate intra prediction mode may be determined to be a predetermined intra prediction mode, based on the prediction mode of the neighboring block being an MIP (matrix based intra prediction) mode.SELECTED DRAWING: Figure 23
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to an image encoding / decoding method and apparatus, and more particularly to an image encoding / decoding method and apparatus for signaling intra-prediction modes, and a method for transmitting a bitstream generated by the image encoding method / apparatus of the present disclosure. [Background technology]

[0002] Recently, the demand for high-resolution, high-quality images, for example, HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various fields. As the resolution and quality of image data increases, the amount of information or bits transmitted increases relatively compared to conventional image data. The increase in the amount of information or bits transmitted leads to an increase in transmission costs and storage costs.

[0003] This requires a highly efficient image compression technique for effectively transmitting, storing, and reproducing high-resolution, high-quality image information. Summary of the Invention [Problem to be solved by the invention]

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

[0005] Another object of the present disclosure is to provide an image encoding / decoding method and apparatus capable of reducing prediction complexity by mapping the intra prediction modes of surrounding blocks to a predetermined prediction mode.

[0006] Another object of the present disclosure is to provide a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.

[0007] Another object of the present disclosure is to provide a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure.

[0008] Another object of the present disclosure is to provide a recording medium storing a bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.

[0009] The technical problems to be solved by the present disclosure are not limited to the above-mentioned technical problems, and other technical problems not described above will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the following description. [Means for solving the problem]

[0010] An image decoding method performed by an image decoding device according to an aspect of the present disclosure includes the steps of: identifying a prediction mode of a current block; if the prediction mode of the current block is an intra prediction mode, identifying whether the intra prediction mode of the current block is a matrix-based intra prediction (MIP) mode; if the intra prediction mode of the current block is not an MIP mode, determining a candidate intra prediction mode for the current block based on a prediction mode of a neighboring block located around the current block; generating a candidate intra prediction mode list for the current block based on the candidate intra prediction mode; and determining the intra prediction mode of the current block based on the candidate intra prediction mode list. If the prediction mode of the neighboring block is an MIP mode, the candidate intra prediction mode may be determined to be a predetermined intra prediction mode. The predetermined intra prediction mode may be any one of a planar mode, a DC mode, a horizontal mode, and a vertical mode.

[0011] Whether the prediction mode of the surrounding block is a MIP mode is determined based on a MIP mode indicator for the surrounding block, and the MIP mode indicator may be obtained from a bitstream.

[0012] The candidate intra prediction mode list may be generated based on a first candidate intra prediction mode and a second candidate intra prediction mode, where the first candidate intra prediction mode is determined based on a prediction mode of a first surrounding block located around the current block, and the second candidate intra prediction mode is determined based on a prediction mode of a second surrounding block located around the current block.

[0013] If the first candidate intra prediction mode and the second candidate intra prediction mode are the same and the first candidate intra prediction mode is an intra prediction mode having a value greater than a prediction mode value indicating a DC mode, the candidate intra prediction mode list may be determined to include the value of the first candidate intra prediction mode.

[0014] When the prediction mode of the first surrounding block and the prediction mode of the second surrounding block are both MIP modes, the candidate intra-prediction mode list may be determined to include a predetermined candidate intra-prediction mode.

[0015] The predetermined candidate intra-prediction modes may include at least one of a DC mode and a vertical mode.

[0016] If the prediction mode of the first surrounding block is an MIP mode, the first candidate intra prediction mode and the second candidate intra prediction mode are different from each other, and the second candidate intra prediction mode is an intra prediction mode having a value greater than a prediction mode value representing a DC mode, the candidate intra prediction mode list may be determined to include the second candidate intra prediction mode.

[0017] The step of determining the intra prediction mode of the current block based on the candidate intra prediction mode list may be performed by determining one of the candidate intra prediction modes included in the candidate intra prediction mode list as the intra prediction mode of the current block based on an intra prediction mode indicator obtained from the bitstream.

[0018] The image decoding method may further include determining a reference mode for determining an intra prediction mode of a chroma block corresponding to the current block, and determining the intra prediction mode of the chroma block based on the reference mode. In this case, if the current block is a luma block and the intra prediction mode of the current block is a MIP mode, the reference mode may be determined to be a planar mode.

[0019] The intra prediction mode of the chroma block may be determined as the reference mode.

[0020] If the intra prediction mode of the current block is not an MIP mode, the reference mode may be determined based on the intra prediction mode of the current block.

[0021] In addition, an image decoding device according to one aspect of the present disclosure is an image decoding device including a memory and at least one processor, wherein the at least one processor identifies a prediction mode of a current block, and if the prediction mode of the current block is an intra prediction mode, determines a candidate intra prediction mode for the current block based on a prediction mode of a neighboring block located around the current block, generates a candidate intra prediction mode list for the current block based on the candidate intra prediction mode, and determines the intra prediction mode of the current block based on the candidate intra prediction mode list, and if the prediction mode of the neighboring block is a matrix based intra prediction (MIP) mode, the candidate intra prediction mode may be determined to be a predetermined intra prediction mode.

[0022] In addition, an image encoding method performed by an image encoding device according to an aspect of the present disclosure may include the steps of: identifying a prediction mode of a current block; determining a candidate intra prediction mode based on a prediction mode of a neighboring block located around the current block when the prediction mode of the current block is an intra prediction mode; generating a candidate intra prediction mode list of the current block based on the candidate intra prediction mode; and encoding an intra prediction mode indicator indicating the intra prediction mode of the current block based on the candidate intra prediction mode list. When the prediction mode of the neighboring block is a matrix based intra prediction (MIP) mode, the candidate intra prediction mode may be determined to be a predetermined intra prediction mode.

[0023] The predetermined intra prediction mode may be any one of a planar mode, a DC mode, a horizontal mode, and a vertical mode.

[0024] The candidate intra prediction mode list is generated based on a first candidate intra prediction mode and a second candidate intra prediction mode, where the first candidate intra prediction mode is determined based on a prediction mode of a first surrounding block located around the current block, and the second candidate intra prediction mode is determined based on a prediction mode of a second surrounding block located around the current block, but if both the prediction modes of the first surrounding block and the second surrounding block are MIP modes, the candidate intra prediction mode list may be determined to include a predetermined candidate intra prediction mode.

[0025] Additionally, the predetermined candidate intra-prediction modes may include at least one of a DC mode and a vertical mode.

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

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

[0028] The features described above in the brief summary of the present disclosure are merely exemplary embodiments of the detailed description of the present disclosure that follows and are not intended to limit the scope of the present disclosure. Effect of the Invention

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

[0030] Furthermore, according to the present disclosure, an image encoding / decoding method and apparatus can be provided that can reduce prediction complexity by mapping the intra prediction mode of a neighboring block to a predetermined prediction mode.

[0031] According to the present disclosure, there can also be provided a method for transmitting a bitstream generated by the image encoding method or apparatus according to the present disclosure.

[0032] According to the present disclosure, a recording medium storing a bitstream generated by the image encoding method or apparatus according to the present disclosure can be provided.

[0033] Furthermore, according to the present disclosure, it is possible to provide a recording medium storing a bitstream that is received by the image decoding device according to the present disclosure, decoded, and used to restore an image.

[0034] The effects obtained by the present disclosure are not limited to the effects described above, and other effects not described above will be clearly understood by those having ordinary skill in the art to which the present disclosure pertains from the following description. [Brief description of the drawings]

[0035] [Figure 1] FIG. 1 is a schematic diagram illustrating a video coding system to which an embodiment of the present disclosure can be applied. [Diagram 2] 1 is a diagram illustrating an image encoding device to which an embodiment of the present disclosure can be applied; [Diagram 3] 1 is a diagram illustrating an image decoding device to which an embodiment of the present disclosure can be applied; [Figure 4] FIG. 2 illustrates a slice and tile structure according to one embodiment. [Diagram 5] FIG. 13 is a diagram illustrating a directional intra-prediction mode according to an embodiment. [Figure 6] FIG. 13 is a diagram illustrating a directional intra-prediction mode according to an embodiment. [Figure 7] FIG. 2 illustrates a mapping table for mapping MIP modes to general intra-prediction modes according to an embodiment. [Figure 8] FIG. 1 is a reference diagram for explaining a MIP mode according to one embodiment. [Figure 9] FIG. 1 is a reference diagram for explaining a MIP mode according to one embodiment. [Figure 10] A diagram showing the syntax of a coding unit according to one embodiment. [Figure 11] A diagram showing the syntax of a coding unit according to one embodiment. [Figure 12] A diagram showing the syntax of a coding unit according to one embodiment. [Figure 13] FIG. 2 illustrates a mapping table for mapping general intra-prediction modes to MIP modes according to one embodiment. [Figure 14] A diagram showing an MPM list configured in a specific MIP intra-prediction mode according to one embodiment. [Figure 15] 1 is a flowchart illustrating a method for encoding an intra-prediction mode using an MPM list according to an embodiment. [Figure 16]11 is a flowchart illustrating a method in which a decoding device performs decoding using an MPM list according to an embodiment. [Figure 17] 1 is a flowchart illustrating a method for generating an MPM list using a mapping method according to an embodiment. [Figure 18] 11 is a flowchart illustrating a method for generating an MPM list using a mapping method according to another embodiment. [Figure 19] 1 is a flowchart illustrating a method for generating an MPM list using a simplified mapping method according to one embodiment. [Figure 20] 11 is a flowchart illustrating a method in which an encoding device generates an MPM list using a simplified mapping method according to an embodiment. [Figure 21] 11 is a flowchart illustrating a method for generating an MPM list using a simplified mapping method in a decoding device according to an embodiment. [Figure 22] FIG. 20 shows coding performance data using the simplified mapping method of FIG. 19. [Figure 23] 11 is a flowchart illustrating a method for generating an MPM list using a simplified mapping method according to another embodiment. [Figure 24] FIG. 24 shows coding performance data using the simplified mapping method of FIG. 23. [Diagram 25] 11 is a flowchart illustrating a method for generating an MPM list using a mapping method according to another embodiment. [Figure 26] FIG. 13 illustrates coding performance data using a simplified mapping method according to another embodiment. [Figure 27] FIG. 1 illustrates a content streaming system to which an embodiment of the present disclosure can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0036] The present disclosure will be described in detail below with reference to the accompanying drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be embodied in various different forms and is not limited to the embodiments described herein.

[0037] In describing the embodiments of the present disclosure, if it is determined that a specific description of a known configuration or function may make the gist of the present disclosure unclear, the detailed description thereof will be omitted. In addition, in the drawings, parts that are not related to the description of the present disclosure are omitted, and similar parts are denoted by similar reference numerals.

[0038] In the present disclosure, when a certain component is "connected," "coupled," or "connected" to another component, this includes not only a direct connection relationship, but also an indirect connection relationship in which another component exists between them. Furthermore, when a certain component is described as "including" or "having" another component, this does not mean that the other component is excluded, but that the other component can be further included, unless otherwise specified.

[0039] In this disclosure, terms such as "first" and "second" are used only for the purpose of distinguishing one component from another component, and do not limit the order or importance of the components unless otherwise specified. Therefore, within the scope of this disclosure, a first component in one embodiment may be called a second component in another embodiment, and similarly, a second component in one embodiment may be called a first component in another embodiment.

[0040] In this disclosure, components that are distinguished from one another are used to clearly describe the characteristics of each component, and do not necessarily mean that the components are separate. In other words, multiple components may be integrated and configured as a single hardware or software unit, or one component may be distributed and configured as multiple hardware or software units. Thus, even if not otherwise stated, such integrated or distributed embodiments are also included in the scope of the present disclosure.

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

[0042] The present disclosure relates to image encoding and decoding, and terms used in this disclosure may have their ordinary meaning in the technical field to which the present disclosure belongs, unless they are newly defined in this disclosure.

[0043] In this disclosure, a "picture" generally means a unit indicating any one image in a particular time period, a slice / tile is a coding unit constituting a part of a picture, and one picture may be composed of one or more slices / tiles. Also, a slice / tile may include one or more coding tree units (CTUs).

[0044] In this disclosure, a "pixel" or a "pel" may refer to the smallest unit constituting one picture (or image). A term corresponding to a pixel may be a "sample." A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.

[0045] 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 and information related to the region. A unit may be used interchangeably with terms such as "sample array," "block," or "area," depending on the case. In a general case, an M×N block may include a set (or array) of samples or transform coefficients consisting of M columns and N rows.

[0046] In the present disclosure, a "current block" may refer to any one of a "current coding block," a "current coding unit," a "block to be coded," a "block to be decoded," or a "block to be processed." If prediction is performed, a "current block" may refer to a "current predicted block" or a "block to be predicted." If transformation (inverse transformation) / quantization (inverse quantization) is performed, a "current block" may refer to a "current transformed block" or a "block to be transformed." If filtering is performed, a "current block" may refer to a "block to be filtered."

[0047] In addition, in this disclosure, a "current block" may mean a "luma block of a current block" unless a chroma block is explicitly stated. A "chroma block of a current block" may be expressed by explicitly including an explicit statement of a chroma block, such as a "chroma block" or a "current chroma block."

[0048] In the present disclosure, " / " and "," can be interpreted as "and / or." For example, "A / B" and "A, B" can be interpreted as "A and / or B." Also, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."

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

[0050] Video Coding System Overview

[0051] FIG. 1 is a diagram illustrating a video coding system according to this disclosure.

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

[0053] The encoding device 10 according to an embodiment may include a video source generating unit 11, an encoding unit 12, and a transmitting unit 13. The decoding device 20 according to an embodiment may include a receiving unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 may be referred to as a video / image encoding unit, and the decoding unit 22 may be referred to as a video / image decoding unit. The transmitting unit 13 may be included in the encoding unit 12. The receiving unit 21 may be included in the decoding unit 22. The rendering unit 23 may include a display unit, which may be configured as a separate device or an external component.

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

[0055] The encoder 12 may encode the input video / image. The encoder 12 may perform a series of steps such as prediction, transformation, quantization, etc. for compression and encoding efficiency. The encoder 12 may output the encoded data (encoded video / image information) in a bitstream format.

[0056] The transmitting unit 13 may transmit the encoded video / image information or data output in a bitstream format to the receiving unit 21 of the decoding device 20 via a digital storage medium or a network in a file or streaming format. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit 13 may include elements for generating a media file via a predetermined file format and may include elements for transmitting via a broadcasting / communication network. The receiving unit 21 may extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit 22.

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

[0058] The rendering unit 23 can render the decoded video / images. The rendered video / images can be displayed via a display unit.

[0059] Overview of the image encoding device

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

[0061] As shown in Fig. 2, the image encoding device 100 may include an image division unit 110, a subtraction unit 115, a transformation unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse transformation unit 150, an addition unit 155, a filtering unit 160, a memory 170, an inter prediction unit 180, an intra prediction unit 185, and an entropy encoding unit 190. The inter prediction unit 180 and the intra prediction unit 185 may be collectively referred to as a "prediction unit." The transformation unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse transformation unit 150 may be included in a residual processing unit. The residual processing unit may further include a subtraction unit 115.

[0062] Depending on the embodiment, all or at least some of the components constituting the image encoding device 100 may be realized by a single hardware component (e.g., an encoder or a processor). Also, the memory 170 may include a decoded picture buffer (DPB) and may be realized by a digital storage medium.

[0063] The image division unit 110 may divide an input image (or picture, frame) input to the image encoding device 100 into one or more processing units. As an example, the processing units may be called coding units (CUs). The coding units may be obtained by recursively dividing a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / Binary-tree / Ternal-tree) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. For dividing the coding units, a quad-tree structure may be applied first, and a binary-tree structure and / or a ternary-tree structure may be applied later. A coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. The maximum coding unit may be used directly as the final coding unit, or a lower depth coding unit obtained by dividing the maximum coding unit may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration, which will be described later. As another example, a processing unit of the coding procedure may be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit may be divided or partitioned from the final coding unit, respectively. The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

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

[0065] The intra prediction unit 185 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block according to an intra prediction mode and / or an intra prediction technique. The intra prediction mode may include a plurality of non-directional modes and a plurality of 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 fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 185 may also determine a prediction mode to be applied to the current block using prediction modes applied to neighboring blocks.

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

[0067] The prediction unit may generate a prediction signal based on various prediction methods and / or prediction techniques, which will be described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of the current block, and may simultaneously apply intra prediction and inter prediction. A prediction method that simultaneously applies intra prediction and inter prediction for prediction of the current block may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of the current block. Intra block copy can be used for content image / video coding such as games, for example, as in screen content coding (SCC). IBC is a method of predicting a current block using an already restored reference block in a current picture that is located a predetermined distance away from the current block. When IBC is applied, the position of the reference block in the current picture may be coded as a vector (block vector) corresponding to the predetermined distance. IBC is basically performed in the current picture, but may be performed similarly to inter prediction in that a reference block is derived in the current picture. That is, the IBC may use at least one of the inter prediction techniques described in this disclosure.

[0068] The prediction signal generated by the prediction unit may be used to generate a restored signal or a residual signal. The subtraction unit 115 may subtract the prediction signal (predicted block, prediction sample array) output from the prediction unit from the input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array). The generated residual signal may be transmitted to the conversion unit 120.

[0069] The transform unit 120 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is represented by a graph. The CNT refers to a transform obtained based on a predicted signal generated using all previously reconstructed pixels. The transform process may be applied to pixel blocks having the same square size, or may be applied to blocks of variable size that are not square.

[0070] The quantization unit 130 may quantize the transform coefficients and transmit the quantized transform coefficients to the entropy coding unit 190. The entropy coding unit 190 may code the quantized signal (information on the quantized transform coefficients) and output the coded signal in a bitstream format. The information on the quantized transform coefficients may be referred to as residual information. The quantization unit 130 may rearrange the quantized transform coefficients in a block format into a one-dimensional vector format based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector format.

[0071] The entropy coding unit 190 may perform various coding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy coding unit 190 may also code information required for video / image restoration (e.g., values ​​of syntax elements, etc.) together with or separately from the quantized transform coefficients. The coded information (e.g., coded video / image information) may be transmitted or stored in a network abstraction layer (NAL) unit unit in a bitstream format. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may further include general constraint information. The signaling information, transmitted information and / or syntax elements referred to in this disclosure may be encoded through the above-mentioned encoding procedures and included in the bitstream.

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

[0073] The quantized transform coefficients output from the quantization unit 130 can be used to generate a residual signal. For example, the quantized transform coefficients are subjected to inverse quantization and inverse transformation via the inverse quantization unit 140 and the inverse transformation unit 150, so that a residual signal (residual block or residual sample) can be restored.

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

[0075] The filtering unit 160 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 160 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 170, specifically, in the DPB of the memory 170. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, and the like. The filtering unit 160 may generate various information related to filtering, as will be described later in the description of each filtering method, and transmit the information to the entropy coding unit 190. The information related to filtering may be coded by the entropy coding unit 190 and output in a bitstream format.

[0076] The modified reconstructed picture transmitted to the memory 170 may be used as a reference picture in the inter prediction unit 180. When inter prediction is applied through this, the image encoding device 100 may avoid a prediction mismatch between the image encoding device 100 and the image decoding device, and may also improve encoding efficiency.

[0077] The DPB in the memory 170 may store modified reconstructed pictures to be used as reference pictures in the inter prediction unit 180. The memory 170 may store motion information of blocks from which motion information in the current picture is derived (or coded) and / or motion information of already reconstructed intra-picture blocks. The stored motion information may be transmitted to the inter prediction unit 180 to be used as motion information of spatial surrounding blocks or motion information of temporal surrounding blocks. The memory 170 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 185.

[0078] Overview of the image decoding device

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

[0080] 3, the image decoding device 200 may include an entropy decoding unit 210, an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265. The inter prediction unit 260 and the intra prediction unit 265 may be collectively referred to as a "prediction unit." The inverse quantization unit 220 and the inverse transform unit 230 may be included in a residual processing unit.

[0081] All or at least some of the components constituting the image decoding device 200 may be realized by one hardware component (e.g., a decoder or a processor) depending on the embodiment. Also, the memory 170 may include a DPB and may be realized by a digital storage medium.

[0082] The image decoding device 200, which receives a bitstream including video / image information, can reconstruct an image by executing a process corresponding to the process performed by the image encoding device 100 of FIG. 2. For example, the image decoding device 200 can perform decoding using a processing unit applied in the image encoding device. Thus, the processing unit for decoding can be, for example, a coding unit. The coding unit can be a coding tree unit or can be obtained by dividing a maximum coding unit. Then, the reconstructed image signal decoded and output by the image decoding device 200 can be reproduced by a reproduction device (not shown).

[0083] The image decoding apparatus 200 may receive a signal output from the image encoding apparatus of FIG. 2 in the form of a bitstream. The received signal may be decoded via the entropy decoding unit 210. For example, the entropy decoding unit 210 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The image decoding apparatus may further use information on the parameter set and / or the general constraint information to decode an image. The signaling information, received information, and / or syntax elements referred to in the present disclosure may be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 210 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to the residual. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element from the bitstream, determine a context model using syntax element information to be decoded and decoded information of neighboring blocks and a block to be decoded, or information of a symbol / bin decoded in a previous step, predict the occurrence probability of the bin based on the determined context model, and perform arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model.Among the information decoded by the entropy decoding unit 210, information related to prediction is provided to a prediction unit (inter prediction unit 260 and intra prediction unit 265), and residual values ​​entropy-decoded by the entropy decoding unit 210, i.e., quantized transform coefficients and related parameter information, may be input to the inverse quantization unit 220. Also, among the information decoded by the entropy decoding unit 210, information related to filtering may be provided to the filtering unit 240. Meanwhile, a receiving unit (not shown) for receiving a signal output from the image encoding device may be further provided as an internal / external element of the image decoding device 200, or the receiving unit may be provided as a component of the entropy decoding unit 210.

[0084] Meanwhile, the image decoding device according to the present disclosure may be called a video / image / picture decoding device. The image decoding device 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 decoding unit 210, and the sample decoder may include at least one of an inverse quantization unit 220, an inverse transform unit 230, an adder 235, a filtering unit 240, a memory 250, an inter prediction unit 260, and an intra prediction unit 265.

[0085] The inverse quantization unit 220 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 220 may rearrange the quantized transform coefficients in a two-dimensional block format. In this case, the rearrangement may be performed based on the order of coefficient scanning performed in the image encoding device. The inverse quantization unit 220 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.

[0086] The inverse transform unit 230 can inversely transform the transform coefficients to obtain a residual signal (residual block, residual sample array).

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

[0088] The prediction unit can generate a prediction signal based on various prediction methods (techniques) described below, as has been described in the explanation of the prediction unit of the image encoding device 100.

[0089] The intra prediction unit 265 may predict the current block by referring to samples in the current picture. The description of the intra prediction unit 185 may be similarly applied to the intra prediction unit 265.

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

[0091] The adder 235 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 260 and / or the intra prediction unit 265). When there is no residual for a current block to be processed, such as when a skip mode is applied, the predicted block may be used as a reconstructed block. The description of the adder 155 may be similarly applied to the adder 235. The adder 235 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of a next current block to be processed in a current picture, and may also be used for inter prediction of a next picture after filtering as described below.

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

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

[0094] In this disclosure, the embodiments described for the filtering unit 160, inter prediction unit 180 and intra prediction unit 185 of the image encoding device 100 can also be applied in a similar or corresponding manner to the filtering unit 240, inter prediction unit 260 and intra prediction unit 265 of the image decoding device 200, respectively.

[0095] Partitioning Structure

[0096] The image encoding / decoding method according to the present disclosure may be performed based on a partitioning structure according to an embodiment. For example, procedures such as prediction, residual processing ((inverse) transform, (inverse) quantization, etc.), syntax element coding, filtering, etc. may be performed based on the CTU, CU (and / or TU, PU) derived based on the partitioning structure. The block partitioning procedure is performed in the image partitioning unit 110 of the encoding device described above, and partitioning-related information may be (encoded) processed by the entropy encoding unit 190 and transmitted to the decoding device in the form of a bitstream. The entropy decoding unit 210 of the decoding device may derive a block partitioning structure of the current picture based on the partitioning-related information obtained from the bitstream, and perform a series of procedures for image decoding based on the block partitioning structure (e.g., prediction, residual processing, block / picture reconstruction, in-loop filtering, etc.). The CU size and the TU size may be the same, or there may be multiple TUs in the CU area. Meanwhile, the CU size may generally indicate a luma component (sample) CB size. The TU size may generally indicate the luma component (sample) TB size. The chroma component (sample) CB or TB size may be derived based on the luma component (sample) CB / TB size according to the component ratio according to the chroma format (color format, for example, 4:4:4, 4:2:2, 4:2:0, etc.) of the picture / image. The TU size may be derived based on maxTbSize indicating the maximum available TB size. For example, if the CU size is larger than the maxTbSize, multiple TUs (TBs) of the maxTbSize may be derived from the CU, and transform / inverse transform may be performed in units of the TUs (TBs). Also, for example, if intra prediction is applied, the intra prediction mode / type may be derived in units of the CU (or CB), and the derivation of the surrounding reference sample and the prediction sample generation procedure may be performed in units of the TU (TB). In this case, one or multiple TUs (or TBs) may exist in one CU (or CB) area, and in this case, the multiple TUs (or TBs) may share the same intra prediction mode / type.

[0097] Also, in the encoding and decoding of an image according to the present disclosure, the image processing unit may have a hierarchical structure. For example, one picture may be divided into one or more tiles or tile groups. One tile group may include one or more tiles. One tile may include one or more CTUs. The CTU may be divided into one or more CUs as described above. A tile may be configured as a rectangular region including CTUs that are assembled in a specific row and a specific column in a picture. A tile group may include an integer number of tiles according to tile raster scanning in a picture. A tile group header may signal information / parameters applicable to the tile group. If an encoding / decoding device has a multi-core processor, encoding / decoding procedures for the tiles or tile groups may be processed in parallel. Here, the tile group may have any one of tile group types including an intra tile group (intra(I) tile group), a unidirectional predictive tile group (predictive(P) tile group), and a bi-predictive tile group (bi-predictive(B) tile group). For blocks in an I tile group, inter prediction is not used for prediction, and only intra prediction may be used. Of course, in this case, original sample values ​​may also be coded and signaled without prediction. For blocks in a P tile group, intra prediction or inter prediction may be used, and when inter prediction is used, only uni prediction may be used. Meanwhile, for blocks in a B tile group, intra prediction or inter prediction may be used, and when inter prediction is used, up to bi prediction may be used.

[0098] Also, a picture can be divided into one or more slices. A slice can be composed of an integer number of tiles or a collection of CTUs arranged in consecutive rows within a tile. Two slice modes can be supported: raster scan slice mode and square slice mode. In the raster scan slice mode, a slice can be composed of consecutive tiles in raster scan order within a picture as shown in FIG. 4. In the square slice mode, a slice can be composed of tiles in a picture grouped together in a square shape. The tiles within a square slice can be scanned according to the tile raster scan order within the slice.

[0099] In the encoding device, the tile / tile group, slice, maximum and minimum coding unit sizes can be determined according to the characteristics of the image (e.g., resolution) or taking into account coding efficiency or parallel processing, and information regarding them or information capable of deriving them can be included in the bitstream.

[0100] The decoder can obtain information indicating whether a slice, tile / tile group, or CTU in a tile of the current picture is divided into multiple coding units, etc. If such information is obtained (transmitted) only under certain conditions, efficiency can be improved.

[0101] The slice header or tile group header (tile group header syntax) may include information / parameters commonly applicable to the slices or tile groups. The APS (APS syntax) or PPS (PPS syntax) may include information / parameters commonly applicable to one or more pictures. The SPS (SPS syntax) may include information / parameters commonly applicable to one or more sequences. The VPS (VPS syntax) may include information / parameters commonly applicable to the entire video. In this specification, the higher level syntax may include at least one of the APS syntax, PPS syntax, SPS syntax, and VPS syntax.

[0102] Also, for example, information regarding the division and configuration of the tiles / tile groups can be configured in the encoding step via the higher level syntax and transmitted to a decoding device in the form of a bitstream.

[0103] Also, in encoding and decoding an image according to the present disclosure, the coding tree scheme may support luma and chroma component blocks to have separate block tree structures. When the luma and chroma blocks in one CTU have the same block tree structure, it may be represented as a single tree (SINGLE_TREE). When the luma and chroma blocks in one CTU have separate block tree structures, it may be represented as a dual tree (DUAL_TREE). In this case, the block tree type for the luma component may be referred to as DUAL_TREE_LUMA, and the block tree type for the chroma component may be referred to as DUAL_TREE_CHROMA. For P and B slices / tile groups, the luma and chroma CTBs in one CTU may be restricted to have the same coding tree structure. However, for I slices / tile groups, the luma and chroma blocks may have separate block tree structures from each other. If the individual block tree mode is applied, the luma CTB may be divided into CUs based on a specific coding tree structure, and the chroma CTB may be divided into chroma CUs based on another coding tree structure. For example, a CU in an I slice / tile group may be composed of a coding block of a luma component or a coding block of two chroma components, and a CU in a P or B slice / tile group may be composed of blocks of three color components. Hereinafter, in this disclosure, a slice may be referred to as a tile / tile group, and a tile / tile group may be referred to as a slice.

[0104] Overview of In-line Forecasting

[0105] Hereinafter, an intra prediction method according to an embodiment will be described. Intra prediction may refer to a prediction that generates a prediction sample for a current block based on a reference sample in a picture to which the current block belongs (hereinafter, current picture). When intra prediction is applied to the current block, neighboring reference samples used for intra 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 and bottom-left of the current block of size nW×nH, a total of 2×nW samples adjacent to the top boundary and top-right of the current block, and one sample adjacent to the top-left of the current block. Alternatively, the neighboring reference samples of the current block may include upper neighboring samples of multiple columns and left neighboring samples of multiple rows. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block having a size of nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block. Meanwhile, when an ISP to be described later is applied, the neighboring reference samples may be derived in units of sub-partitions.

[0106] Meanwhile, some of the neighboring reference samples of the current block may not yet be decoded or may not be available. In this case, the decoding apparatus may substitute unavailable samples with available samples to construct neighboring reference samples to be used for prediction. Alternatively, the decoding apparatus may construct neighboring reference samples to be used for prediction through interpolation of available samples.

[0107] When the neighboring reference samples are derived, (i) a prediction sample may be derived based on an average or an interpolation of neighboring reference samples of the current block, and (ii) the prediction sample may be derived based on a reference sample that exists in a specific (prediction) direction for a prediction sample among the neighboring reference samples of the current block. In the case of (i), it may be called a non-directional mode or a non-angular mode, and in the case of (ii), it may be called a directional mode or an angular mode. In addition, the prediction sample may be generated through an interpolation between the second neighboring sample and the first neighboring sample located in the opposite direction to the prediction direction of the intra prediction mode of the current block based on the prediction sample of the current block among the neighboring reference samples. The above case may be called a linear interpolation intra prediction (LIP). In addition, a chroma prediction sample may be generated based on a luma sample using a linear model. In this case, it may be called a LM mode. Also, a temporal prediction sample of the current block may be derived based on the filtered surrounding reference samples, and a prediction sample of the current block may be derived by weighting the temporal prediction sample and at least one reference sample derived according to the intra prediction mode among the conventional surrounding reference samples, i.e., unfiltered surrounding reference samples, and the weighted sum of the temporal prediction sample. The above case may be called Position Dependent Intra Prediction (PDPC). Also, a reference sample line with the highest prediction accuracy is selected from among multiple surrounding reference sample lines of the current block, and a prediction sample is derived using a reference sample located in a prediction direction on the selected line. In this case, intra prediction coding may be performed by signaling the reference sample line used to a decoding device. The above case may be called multi-reference line (MRL) intra prediction or MRL-based intra prediction.In addition, the current block is divided into vertical or horizontal sub-partitions and intra prediction is performed based on the same intra prediction mode, and surrounding reference samples can be derived and used in units of the sub-partitions. That is, in this case, the intra prediction mode for the current block is applied to the sub-partitions in the same manner, but the surrounding reference samples can be derived and used in units of the sub-partitions, thereby improving the intra prediction performance depending on the case. Such a prediction method can be called ISP (intra sub-partitions) or ISP-based intra prediction. In addition, when a prediction direction based on a prediction sample points between surrounding reference samples, that is, when the prediction direction points to a fractional sample position, a value of the prediction sample can be derived through interpolation of a plurality of reference samples located in the vicinity of the prediction direction (the vicinity of the fractional sample position). The above-mentioned intra prediction method can be called an intra prediction type, distinguished from an intra prediction mode. In addition, a matrix-weighted intra prediction (MIP) method may be applied, which performs intra prediction of the current block by generating a prediction signal for a subsampled pixel set of the current block using reconstructed neighboring pixels located to the left and top of the current block, and then performing vertical and horizontal interpolation using the generated prediction signal and neighboring sample values ​​to generate a prediction signal of the original size.

[0108] The intra prediction type may be referred to by various terms such as an intra prediction technique or an additional intra prediction mode. For example, the intra prediction type (or the additional intra prediction mode, etc.) may include at least one of the above-mentioned LIPO, PDPC, MRL, ISP, and MIP. The information on the intra prediction type may be encoded by an encoding device and included in a bitstream, thereby being signaled to a decoding device. The information on the intra prediction type may be realized in various forms such as flag information indicating whether each intra prediction type is applied or index information indicating one of various intra prediction types.

[0109] Meanwhile, post-processing filtering may be performed on the derived prediction samples as necessary. Specifically, the intra prediction procedure may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and an intra prediction mode / type-based prediction sample derivation step. Also, post-processing filtering may be performed on the derived prediction samples as necessary.

[0110] Hereinafter, a video / image encoding method based on intra prediction will be described. First, an encoding apparatus performs intra prediction on a current block. The encoding apparatus may derive an intra prediction mode / type for the current block, derive a neighboring reference sample of the current block, and generate a prediction sample in the current block based on the intra prediction mode / type and the neighboring reference sample. Herein, the procedure of determining the intra prediction mode / type, deriving the neighboring reference sample, and generating the prediction sample may be performed simultaneously, or any one of the procedures may be performed prior to the other procedures. Meanwhile, when a prediction sample filtering procedure to be described later is performed, the intra prediction unit 185 may further include a prediction sample filter unit. The encoding apparatus may determine a mode / type to be applied to the current block from among a plurality of intra prediction modes / types. The encoding apparatus may compare rate-distortion (RD) costs for the intra prediction modes / types to determine an optimal intra prediction mode / type for the current block.

[0111] Meanwhile, the encoding apparatus may also perform a predicted sample filtering procedure. The predicted sample filtering may be called post-filtering. The predicted sample filtering procedure may filter some or all of the predicted samples. In some cases, the predicted sample filtering procedure may be omitted.

[0112] The encoding apparatus may then generate residual samples for the current block based on the predicted samples, and may derive the residual samples by comparing original samples of the current block with the predicted samples based on a phase.

[0113] Then, the encoding device may encode image information including information on the intra prediction (prediction information) and residual information on the residual sample. The prediction information may include the intra prediction mode information and the intra prediction type information. The encoding device may output the encoded image information in a bitstream format. The output bitstream may be transmitted to a decoding device via a storage medium or a network.

[0114] The residual information may include a residual coding syntax, which will be described later. The encoding apparatus may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information on the quantized transform coefficients.

[0115] Meanwhile, as described above, the encoding apparatus may generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the encoding apparatus may further inverse quantize / inverse transform the quantized transform coefficients to derive (modified) residual samples. The reason for performing inverse quantization / inverse transform again after transforming / quantizing the residual samples is to derive the same residual samples as the residual samples derived from the decoding apparatus, as described above. The encoding apparatus may generate a reconstructed block including reconstructed samples for the current block based on the predicted samples and the (modified) residual samples. A reconstructed picture for the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering procedure or the like may further be applied to the reconstructed picture.

[0116] A video / image decoding method based on intra prediction will now be described, in which the decoding device may perform operations corresponding to those performed by the encoding device.

[0117] First, the decoding apparatus may derive an intra prediction mode / type for a current block based on received prediction information (intra prediction mode / type information). The decoding apparatus may derive neighboring reference samples of the current block. The decoding apparatus may generate prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples. In this case, the decoding apparatus may perform a prediction sample filtering procedure. The prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.

[0118] The decoding apparatus may generate a residual sample for the current block based on the received residual information. The decoding apparatus may generate a reconstructed sample for the current block based on the prediction sample and the residual sample, and derive a reconstructed block including the reconstructed sample. A reconstructed picture for the current picture may be generated based on the reconstructed block. An in-loop filtering procedure or the like may be further applied to the reconstructed picture.

[0119] The intra prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether a most probable mode (MPM) is applied to the current block or a remaining mode is applied. If the MPM is applied to the current block, the intra prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM candidate list or an MPM list. For example, the MPM candidate list may be configured to include intra prediction modes of neighboring blocks or a preset basic intra prediction mode. In addition, if the MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The decoding apparatus may determine an intra-prediction mode of the current block based on the intra-prediction mode information.

[0120] Meanwhile, when the above-mentioned MIP mode is applied, an MPM list for the MIP mode may be configured to determine the MIP mode of the current block. The MPM list for the MIP mode may be configured in the same manner as the above-mentioned MPM list for the intra mode is configured. For example, when the MIP mode is applied, the MPM candidate list for the MIP mode may be configured to include the MIP modes of neighboring blocks or a preset basic MIP mode. Furthermore, when the MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating any one of the remaining MIP modes excluding the MIP mode candidates (MPM candidates). The decoding apparatus may determine the MIP mode of the current block based on the intra prediction mode information.

[0121] Intra Prediction Mode

[0122] The intra prediction modes will be described in more detail below. Figure 5 is a diagram illustrating intra prediction directions according to an embodiment. In order to capture any edge direction presented in a natural video, as shown in Figure 5, the intra prediction modes can include two non-directional intra prediction modes and 65 directional intra prediction modes. The non-directional intra prediction modes can include a Planar intra prediction mode and a DC intra prediction mode, and the directional intra prediction modes can include intra prediction modes 2 to 66.

[0123] Meanwhile, the intra prediction modes may further include a cross-component linear model (CCLM) mode for chroma samples in addition to the above-mentioned intra prediction modes. The CCLM modes may be divided into L_CCLM, T_CCLM, and LT_CCLM depending on whether the left sample, the top sample, or both are considered for deriving the LM parameters, and may be applied only to the chroma components. For example, the intra prediction modes may be indexed according to the intra prediction mode value as shown in the following table.

[0124] [Table 1]

[0125] FIG. 6 is a diagram illustrating intra prediction directions according to another embodiment. Here, the dashed line direction indicates a wide-angle mode that is applied only to blocks that are not square. As shown in FIG. 6, in order to capture any edge direction presented in a natural video, the intra prediction modes according to an embodiment may include 93 directional intra prediction modes together with two non-directional intra prediction modes. The non-directional intra prediction modes may include a planar mode and a DC mode. The directional intra prediction modes may include intra prediction modes consisting of No. 2 to No. 80 and No. -1 to No. -14 as indicated by the arrows in FIG. 6. The planar mode may be represented as INTRA_PLANAR, and the DC mode may be represented as INTRA_DC. And, the directional intra prediction modes may be represented as INTRA_ANGULAR-14 to INTRA_ANGULAR-1 and INTRA_ANGULAR2 to INTRA_ANGULAR80.

[0126] Meanwhile, the intra prediction type (or additional intra prediction mode, etc.) may include at least one of the above-mentioned LIP, PDPC, MRL, ISP, and MIP. The intra prediction type may be indicated based on intra prediction type information, which may be realized in various forms. As an example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if so, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating a subpartition type when the ISP is applied, flag information indicating whether PDPC is applied, flag information indicating whether LIP is applied, and MIP flag information indicating whether MIP is applied.

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

[0128] Intra prediction for chroma blocks

[0129] When intra prediction is performed on a current block, prediction can be performed on a luma component block (luma block) and a chroma component block (chroma block) of the current block, in which case the intra prediction mode for the chroma block can be set separately from the intra prediction mode for the luma block.

[0130] For example, an intra prediction mode for a chroma block may be indicated based on intra chroma prediction mode information, and the intra chroma prediction mode information may be signaled in the form of an intra_chroma_pred_mode syntax element. As an example, the intra chroma prediction mode information may indicate any one of a planar mode, a DC mode, a vertical mode, a horizontal mode, a derived mode (DM), and a CCLM mode. Here, the planar mode may indicate an intra prediction mode of 0, the DC mode may indicate an intra prediction mode of 1, the vertical mode may indicate an intra prediction mode of 26, and the horizontal mode may indicate an intra prediction mode of 10. DM may also be referred to as a direct mode. CCLM may also be referred to as an LM.

[0131] Meanwhile, DM and CCLM are dependent intra prediction modes that predict a chroma block using information of a luma block. The DM may indicate a mode in which the same intra prediction mode as the intra prediction mode for the luma component is applied to the intra prediction mode for the chroma component. In addition, the CCLM may indicate an intra prediction mode in which a restored sample of a luma block is subsampled in the process of generating a prediction block for a chroma block, and a sample derived by applying CCLM parameters α and β to the subsampled sample is used as a prediction sample for the chroma block.

[0132] MPM list for intra prediction

[0133] When intra prediction is applied, the intra prediction mode applied to the current block may be determined using the intra prediction mode of the surrounding blocks. For example, the decoding apparatus may select one of the MPM candidates in the MPM list derived based on the intra prediction modes of the surrounding blocks (e.g., the left and / or upper surrounding blocks) of the current block and the additional candidate mode based on the MPM index (e.g., intra_luma_mpm_idx) received using the bitstream. In addition, the decoding apparatus may select one of the remaining intra prediction modes not included in the MPM candidates based on the remaining mode information (e.g., intra_luma_mpm_remainder). For example, whether the intra prediction mode applied to the current block is among the MPM candidates or among the remaining modes may be indicated based on the mpm flag (e.g., intra_luma_mpm_flag) to determine the intra prediction mode of the current block. A value of 1 of the mpm flag may indicate that the intra prediction mode for the current block is in the MPM list (candidate), and a value of 0 of the mpm flag may indicate that the intra prediction mode for the current block is not in the MPM list (candidate).

[0134] The mpm flag may be signaled in the form of an intra_luma_mpm_flag syntax element, the mpm index may be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information may be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. In one embodiment, the remaining intra prediction mode information may index the remaining intra prediction modes not included in the mpm list among all intra prediction modes in the order of prediction mode numbers, and may indicate one of them. The intra prediction mode may be an intra prediction mode for a luma component (sample). Hereinafter, the intra prediction mode information may include at least one of an mpm flag (e.g., intra_luma_mpm_flag), an mpm index (e.g., mpm_idx or intra_luma_mpm_idx), and remaining intra prediction mode information (e.g., rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In this specification, the MPM list may be referred to by various terms such as an MPM candidate list, a candModeList, etc.

[0135] The MPM list may include candidate intra prediction modes (MPM candidates) that are likely to be applied to the current block. The MPM list may be configured to include intra prediction modes of neighboring blocks, or may further include a predetermined intra prediction mode according to a predetermined method.

[0136] In one embodiment, in order to keep the complexity of MPM list generation low, an MPM list including three MPMs can be generated. For example, even if 67 intra prediction modes are used, the MPM list can include three MPM candidates. If the MPM list does not include an intra prediction mode for the current block, a remaining mode can be used. In this case, the remaining mode includes 64 remaining candidates, and remaining intra prediction mode information indicating one of the 64 remaining candidates can be signaled. For example, the remaining intra prediction mode information can include a 6-bit syntax element (e.g., rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element).

[0137] In one embodiment, neighboring intra modes, derived intra modes, and default intra modes can be considered to configure the MPM list. For example, the encoding device can use the prediction modes of neighboring blocks to encode the prediction mode of the current block.

[0138] For example, when the neighboring block is coded in an intra prediction mode, the coding device may check or guide the prediction mode of the neighboring block. For example, the coding device may determine the prediction mode of the current block based on the prediction mode of the left neighboring block and the prediction mode of the upper neighboring block, and may determine the prediction mode of the neighboring block as Most Probable Modes (MPM). In this regard, determining the MPM may be expressed as listing MPM (most probable modes) candidates or as forming an MPM list.

[0139] In one embodiment, the left peripheral block may indicate a block located at the top among peripheral blocks adjacent to a left boundary of the current block. Also, the upper peripheral block may indicate a block located at the leftmost among peripheral blocks adjacent to an upper boundary of the current block. The encoding apparatus may check whether a prediction mode of the left peripheral block is the same as a prediction mode of the upper peripheral block. The initial MPM list may be formed by performing a pruning process on intra prediction modes of the two neighboring blocks. The pruning process may be a process in which only prediction modes different from each other are included in the MPM list.

[0140] If the prediction mode of the left peripheral block and the prediction mode of the upper peripheral block are not the same, a first MPM may be set to the prediction mode of the left peripheral block, a second MPM may be set to the prediction mode of the upper peripheral block, and a third MPM may be set to any one of an intra planar mode, an intra DC mode, or an intra vertical mode (50th intra prediction mode). Specifically, if the intra prediction modes of the two peripheral blocks are different from each other, the two intra prediction modes may be set to the MPM, and one of the default intra modes may be added to the MPM list after a pruning check by the MPM. Here, the default intra mode may include an intra planar mode, an intra DC mode, and / or an intra vertical mode (50th intra prediction mode).

[0141] For example, if the prediction mode of the left peripheral block and the prediction mode of the upper peripheral block are not the same, the MPM list can be configured according to the following cases.

[0142] Case 1: If both the intra prediction mode of the left peripheral block and the intra prediction mode of the upper peripheral block are not infra-planar mode, the MPM list can be configured to include the intra prediction mode of the left peripheral block and the intra prediction mode and intra-planar mode of the upper peripheral block.

[0143] Case 2: If the conditions of Case 1 are not met, if both the intra prediction mode of the left peripheral block and the intra prediction mode of the upper peripheral block are not intra DC modes, the MPM list can be configured to include the intra prediction mode of the left peripheral block and the intra prediction mode and intra DC mode of the upper peripheral block.

[0144] Case 3: If the conditions of Case 2 are not met, the MPM list may be configured to include the intra prediction mode of the left surrounding block, the intra prediction mode of the upper surrounding block, and the intra vertical mode.

[0145] Meanwhile, if the prediction mode of the left peripheral block and the prediction mode of the upper peripheral block are the same, the encoding device may determine whether the prediction mode of the left peripheral block is smaller than 2. For example, the encoding device may determine whether the prediction mode of the left peripheral block is an intra planar mode, an intra DC mode, or a prediction mode having a direction pointing to a block located below the current block as shown in FIG 6.

[0146] If the prediction mode of the left neighboring block is less than 2, the first MPM can be set to intra planar mode, the second MPM can be set to intra DC mode, and the third MPM can be set to intra vertical mode (the 50th intra prediction mode).

[0147] On the other hand, if the prediction mode of the left peripheral block is not less than 2, the first MPM can be set to the prediction mode of the left peripheral block, the second MPM can be set to (prediction mode of the left peripheral block - 1), and the third MPM can be set to (prediction mode of the left peripheral block + 1).

[0148] For example, when the prediction mode of the left peripheral block is the same as the prediction mode of the upper peripheral block, the MPM list can be configured as described below.

[0149] Case 1: If the value of the intra prediction mode of the left neighboring block is less than 2, the MPM list may be configured to include an intra planar mode, an intra DC mode, and an intra vertical mode.

[0150] Case 2: If the conditions of Case 1 are not met, the MPM list can be configured to include an intra prediction mode of the left peripheral block, an intra prediction mode corresponding to a value of 2+((A+61)%64)), and an intra prediction mode corresponding to a value of 2+((A-1)%64), where the value of the intra prediction mode of the left peripheral block is A.

[0151] Meanwhile, an additional pruning process can be performed to remove duplicate modes so that only unique modes are included. Also, a 6-bit fixed length code can be used for entropy coding of the 64 non-MPM modes excluding the three MPMs. That is, an index indicating the 64 non-MPM modes can be entropy coded into a 6-bit fixed length code (6-bit FLC).

[0152] The encoding apparatus may then determine whether the optimal intra prediction mode to be applied to the current block belongs to the previously configured MPM candidates.

[0153] If the intra prediction mode of the current block belongs to an MPM candidate, the encoding device may encode an MPM flag and an MPM index. Here, the MPM flag may indicate whether the intra prediction mode of the current block is derived from a neighboring intra prediction block (i.e., the intra prediction mode of the current block belongs to an MPM), and the MPM index may indicate which MPM mode is applied as the intra prediction mode of the current block among the MPM candidates.

[0154] On the other hand, if the intra prediction mode of the current block does not belong to the MPM candidates, the encoding device may encode the intra prediction mode of the current block using a remaining mode.

[0155] Meanwhile, in one embodiment, the encoding device and the decoding device may also configure an MPM list including six MPMs. To generate the MPM list including six MPMs, a default MPM list may be considered. The default MPM list may be configured as follows, when the intra prediction mode value of the left peripheral block is A:

[0156] Default 6MPM List = {A, Planar (0) or DC (1), Vertical (50), HOR (18), VER-4 (46), VER+4 (54)}

[0157] Furthermore, the default 6MPM list may be updated to generate a 6MPM list by performing a pruning process on the intra modes of two adjacent blocks. For example, if the intra prediction modes of two adjacent blocks are identical to each other and the intra prediction modes of the two adjacent blocks have values ​​greater than the intra DC mode value 1, the 6MPM list may include the intra prediction mode of the left adjacent block, which is the default mode, the intra planar mode, and the intra DC mode, and may further include three derived modes derived by adding a predetermined offset value to the intra prediction mode of the adjacent block and performing a modular operation on the number of all intra prediction modes.

[0158] On the other hand, if the intra prediction modes of adjacent blocks are different from each other, the 6MPM list can be configured to include the intra prediction modes of the two adjacent blocks as the first two MPM modes, and the remaining four MPM modes can be derived from the default mode and the intra prediction modes of the adjacent blocks.

[0159] The above-mentioned MPM list construction method can be used when MIP is not applied to the current block. For example, the above-mentioned MPM list construction method can be used to derive an intra prediction mode used in LIP, PDPC, MRL, ISP intra prediction, or general intra prediction (non-directional intra prediction and directional intra prediction). However, the left peripheral block or the upper peripheral block can be coded based on the above-mentioned MIP. In this case, if the MIP mode number of the peripheral block (left peripheral block / upper peripheral block) to which MIP is applied is applied to the MPM list for the current block to which MIP is not applied, it may be incompatible by indicating an unintended intra prediction mode. Therefore, in such a case, the intra prediction mode of the peripheral block (left peripheral block / upper peripheral block) to which MIP is applied can be considered to be a DC mode or a Planar mode. Alternatively, as another example, the intra prediction mode of the peripheral block (left peripheral block / upper peripheral block) to which MIP is applied can be mapped to a general intra prediction mode based on a mapping table and used to construct the MPM list. In such a case, the mapping can be performed based on the block size type of the current block. For example, a mapping table according to an embodiment such as that shown in FIG. 7 can be used for the mapping.

[0160] In the table of FIG. 7, MIP IntraPredMode[xNbX][yNbX] indicates the MIP mode of the neighboring block (left neighboring block / upper neighboring block), and block size type MipSizeId indicates the block size type of the neighboring block or the current block. The numbers below the block size type values ​​0, 1, and 2 indicate the general intra prediction mode to which the MIP mode is mapped for each block size type. For example, if the height and width of the current block are each 4, the block size type may be 0, if both the height and width of the current block are 8 or less, the block size type may be 1, and otherwise the block size type may be 2.

[0161] Here, the general intra prediction mode is an intra prediction mode other than an MIP mode, and may refer to a non-directional intra prediction mode or a directional intra prediction mode. For example, if the block size type of the current block is 0 and the MIP mode number of the neighboring block is 10, the general intra prediction mode number to be mapped may be 18. However, the above mapping relationship is merely an example and may be changed.

[0162] Also, in one embodiment, the MPM list may not include the intra planar mode. To this end, information indicating whether the intra prediction mode of the current block is the intra planar mode may be separately signaled. If the prediction mode of the current block is not the intra planar mode, the MPM list may be generated to signal the intra prediction mode. When encoding the current block, the encoding device may signal the intra prediction mode of the current block to the decoding device using the MPM list generated as follows, and the decoding device may determine the intra mode of the current block using the MPM list generated as follows.

[0163] The MPM list may be determined based on the intra prediction modes of the neighboring blocks of the current block. For example, the MPM list may be determined based on the intra prediction modes of the upper and left neighboring blocks of the current block. For example, the encoding device and the decoding device may determine the MPM list based on a first intra prediction candidate determined based on the intra prediction mode of the left neighboring block and a second intra prediction candidate determined based on the intra prediction mode of the upper neighboring block.

[0164] Here, the upper peripheral block may be the rightmost block among the blocks adjacent to the upper side of the current block. The left peripheral block may be the bottommost block among the blocks adjacent to the left side of the current block. For example, if the coordinates of the current block are (xCb, yCb), the width of the current block is cbWidth, and the height of the current block is cbHeight, the coordinates of the left peripheral block may be (xCb-1, yCb+cbHeight-1) and the coordinates of the upper peripheral block may be (xCb+cbWidth-1, yCb-1).

[0165] The encoding device and the decoding device may determine the value of the first intra prediction candidate to be a value indicating an intra planar mode (e.g., 0) if the left peripheral block is an unavailable block, the prediction mode of the left peripheral block is not an intra prediction mode, or the prediction mode of the left peripheral block is an MIP mode. If the left peripheral block does not meet these conditions, the encoding device and the decoding device may determine the value of the first intra prediction candidate to be a value indicating the intra prediction mode of the left peripheral block.

[0166] In addition, the encoding device and the decoding device may determine the value of the second intra prediction candidate to be a value indicating an intra planar mode (e.g., 0) if the upper peripheral block is an unavailable block, the prediction mode of the upper peripheral block is not an intra prediction mode, or the prediction mode of the upper peripheral block is an MIP mode. If the upper peripheral block does not meet these conditions, the encoding device and the decoding device may determine the value of the second intra prediction candidate to be a value indicating the intra prediction mode of the upper peripheral block.

[0167] In one embodiment, the MPM list can be configured to include five candidate modes. In one embodiment, the MPM list can be configured according to the following cases. In the following description, the first intra prediction candidate is denoted as candIntraPredModeA, the second intra prediction candidate is denoted as candIntraPredModeB, and the MPM list is denoted as candModeList[x], where x can be an integer from 0 to 4.

[0168] Case 1: If the value of the first intra prediction candidate and the value of the second intra prediction candidate are identical and the value of the first intra prediction candidate is greater than 1 (e.g., not intra planar mode or intra DC mode), the MPM list candModeList[x] can be configured as follows:

[0169] candModeList[0]=candIntraPredModeA

[0170] candModeList[1]=2+((candIntraPredModeA+61)%64)

[0171] candModeList[2]=2+((candIntraPredModeA-1)%64)

[0172] candModeList[3]=2+((candIntraPredModeA+60)%64)

[0173] candModeList[4]=2+(candIntraPredModeA%64)

[0174] Case 2: If the conditions of Case 1 are not met, if the value of the first intra prediction candidate and the value of the second intra prediction candidate are not identical, and the value of the first intra prediction candidate or the value of the second intra prediction candidate is greater than 1 (e.g., not in intra planar mode or intra DC mode), the MPM list candModeList[x] can be configured as follows:

[0175] First, minAB and maxAB can be calculated as follows:

[0176] minAB=Min(candIntraPredModeA,candIntraPredModeB)

[0177] maxAB=Max(candIntraPredModeA,candIntraPredModeB)

[0178] When the values ​​of the first intra prediction candidate and the second intra prediction candidate are both greater than 1, the MPM lists candModeList[0] and candModeList[1] may be configured as follows:

[0179] candModeList[0]=candIntraPredModeA

[0180] candModeList[1]=candIntraPredModeB

[0181] In this case, if the value of maxAB-minAB is 1, candModeList[2] to candModeList[4] can be configured as follows.

[0182] candModeList[2]=2+((minAB+61)%64)

[0183] candModeList[3]=2+((maxAB-1)%64)

[0184] candModeList[4]=2+((minAB+60)%64)

[0185] On the other hand, if the value of maxAB-minAB is 62 or greater, candModeList[2] to candModeList[4] can be configured as follows.

[0186] candModeList[2]=2+((minAB-1)%64)

[0187] candModeList[3]=2+((maxAB+61)%64)

[0188] candModeList[4]=2+(minAB%64)

[0189] On the other hand, if the value of maxAB-minAB is 2, candModeList[2] to candModeList[4] can be configured as follows.

[0190] candModeList[2]=2+((minAB-1)%64)

[0191] candModeList[3]=2+((minAB+61)%64)

[0192] candModeList[4]=2+((maxAB-1)%64)

[0193] On the other hand, if the values ​​of maxAB-minAB do not satisfy the above condition, candModeList[2] to candModeList[4] can be configured as follows.

[0194] candModeList[2]=2+((minAB+61)%64)

[0195] candModeList[3]=2+((minAB-1)%64)

[0196] candModeList[4]=2+((maxAB+61)%64)

[0197] On the other hand, if the values ​​of the first intra prediction candidate and the second intra prediction candidate are not both greater than 1 and only one of the first intra prediction candidate and the second intra prediction candidate is greater than 1, the MPM list candModeList[x] can be configured as follows.

[0198] candModeList[0]=maxAB

[0199] candModeList[1]=2+((maxAB+61)%64)

[0200] candModeList[2]=2+((maxAB-1)%64)

[0201] candModeList[3]=2+((maxAB+60)%64)

[0202] candModeList[4]=2+(maxAB%64)

[0203] Case 3: If the conditions in Case 2 are not met, the MPM list candModeList[x] can be constructed as follows:

[0204] candModeList[0]=INTRA_DC

[0205] candModeList[1]=INTRA_ANGULAR50

[0206] candModeList[2]=INTRA_ANGULAR18

[0207] candModeList[3]=INTRA_ANGULAR46

[0208] candModeList[4]=INTRA_ANGULAR54

[0209] Overview of MIP

[0210] The matrix based intra prediction (MIP) mode can also be called an affine linear weighted intra prediction (ALWIP) mode, a linear weighted intra prediction (LWIP) mode, or a matrix weighted intra prediction (MWIP) mode.

[0211] When the MIP mode is applied to a current block, a predicted sample for the current block can be derived by i) using surrounding reference samples that have been subjected to an averaging step, ii) performing a matrix-vector-multiplication step, and iii) further performing horizontal / vertical interpolation steps as necessary.

[0212] The averaging step may be performed by averaging the values ​​of the surrounding samples. The averaging procedure may be performed by averaging each boundary surface to generate a total of four samples, two on the top and two on the left, if the width and width of the current block are four in pixels, as shown in FIG. 8(a), or by averaging each boundary surface to generate a total of eight samples, four on the top and four on the left, if the width and width of the current block are not four in pixels, as shown in FIG. 8(b).

[0213] The matrix vector multiplication step can be performed by multiplying the averaged samples by the matrix vector and then adding the offset vector, thereby generating a prediction signal for the subsampled pixel set of the original block. The size of the matrix and the offset vector can be determined by the width and width of the current block.

[0214] The horizontal / vertical interpolation step is a step of generating a prediction signal of the size of the original block from the subsampled prediction signal. As shown in FIG. 9, a prediction signal of the size of the original block can be generated by performing vertical and horizontal interpolation using the subsampled prediction signal and surrounding pixel values. FIG. 9 shows an embodiment in which MIP prediction is performed on an 8×8 block. In the case of an 8×8 block, a total of eight averaged samples can be generated as shown in FIG. 8(b). The eight averaged samples are multiplied by a matrix vector and an offset vector is added to generate 16 sample values ​​at even coordinate positions as shown in FIG. 9(a). Then, as shown in FIG. 9(b), vertical interpolation can be performed using the average value of the upper samples of the current block. Then, as shown in FIG. 9(c), horizontal interpolation can be performed using the left sample of the current block.

[0215] The intra prediction mode used for the MIP mode may be configured to be different from the intra prediction mode used in the above-mentioned LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction. The intra prediction mode for the MIP mode may be called MIP intra prediction mode, MIP prediction mode, or MIP mode. For example, a matrix and an offset used in the matrix vector multiplication may be set differently depending on the intra prediction mode for MIP. Here, the matrix may be called a (MIP) weight matrix, and the offset may be called a (MIP) offset vector or a (MIP) bias vector.

[0216] The above-mentioned intra prediction type information may include an MIP flag (e.g., intra_mip_flag) indicating whether an MIP mode is applied to the current block. If an MIP mode is applied to the current block (e.g., if the value of intra_mip_flag is 1), an MPM list for the MIP mode may be configured separately. In addition, the intra prediction type information may include an MIP MPM flag (e.g., intra_mip_mpm_flag) indicating whether an MPM list is used for an MIP mode, an MPM index (e.g., intra_mip_mpm_idx) indicating an MIP mode used for the current block in the MPM list, and remaining intra prediction mode information (e.g., intra_mip_mpm_remainder) used to directly indicate an MIP mode when the MIP mode of the current block is not used in the MPM list.

[0217] When the MIP mode is performed, various MIP modes can be set according to the matrix and offset that constitute the MIP. The number of intra prediction modes for MIP can be set differently based on the size of the current block. For example, i) if the height and width of the current block (e.g., CB or TB) are each 4, 35 intra prediction modes (i.e., intra prediction modes 0 to 34) are available, ii) if both the height and width of the current block are 8 or less, 19 intra prediction modes (i.e., intra prediction modes 0 to 18) are available, and iii) in other cases, 11 intra prediction modes (i.e., intra prediction modes 0 to 10) are available.

[0218] For example, when the height and width of the current block are each 4, the block size type is 0, when both the height and width of the current block are 8 or less, the block size type is 1, and otherwise, the block size type is 2. The number of intra prediction modes for MIP can be summarized as shown in the table below. However, this is merely an example, and the block size type and the number of available intra prediction modes can be changed.

[0219] [Table 2]

[0220] In one embodiment, information on the intra prediction mode / type of the current block may be coded and signaled at a level such as a CU (CU syntax), or may be implicitly determined according to conditions. In this case, some modes / types may be explicitly signaled, and the remaining modes may be implicitly derived. For example, the CU syntax may indicate information on the (intra) prediction mode / type as shown in Figures 10 to 12.

[0221] Here, pred_mode_flag may indicate a prediction mode of the current CU. For example, a value of 0 for pred_mode_flag may indicate that the current CU is encoded in an inter prediction mode. A value of 1 for pred_mode_flag may indicate that the current CU is encoded in an intra prediction mode.

[0222] pcm_flag[x0][y0] may indicate whether a PCM (pulse coding modulation) mode is applied to the current block. When a PCM mode is applied to the current block, prediction / transformation / quantization, etc. are not applied, and the value of the original sample in the current block may be coded and signaled. For example, pcm_flag[x0][y0] may indicate whether a pcm_sample syntax is present and a transform_tree() syntax is not present for a luma CU corresponding to a (x0, y0) position. For example, a value of 1 for pcm_flag[x0][y0] may indicate that a pcm_sample() syntax is present and a transform_tree() syntax is not present. A value of 0 for pcm_flag[x0][y0] may indicate that a pcm_sample() syntax is not present and a transform_tree() syntax is present.

[0223] The intra_mip_flag[x0][y0] may indicate whether the current block is predicted in MIP mode. For example, a first value (e.g., 0) of the intra_mip_flag[x0][y0] may indicate that the current block is not predicted in MIP mode. A second value (e.g., 1) of the intra_mip_flag[x0][y0] may indicate that the current block is predicted in MIP mode.

[0224] If intra_mip_flag[x0][y0] has a second value (e.g., 1), information regarding the MIP mode may be further obtained from the bitstream. For example, syntax elements intra_mip_mpm_flag[x0][y0], intra_mip_mpm_idx[x0][y0], and intra_mip_mpm_remainder[x0][y0], which are information indicating the MIP mode of the current block, may be further obtained from the bitstream. If an MIP prediction mode is applied to the current block, an MPM list for MIP may be configured, and the intra_mip_mpm_flag may indicate whether the MIP mode for the current block is present in the MPM list for MIP (or among the MPM candidates). The intra_mip_mpm_idx may indicate an index of a candidate in the MPM list to be used as the MIP prediction mode of the current block when the MIP prediction mode for the current block exists in the MPM list for the MIP (i.e., the value of intra_mip_mpm_flag is 1). The intra_mip_mpm_remainder may indicate the MIP prediction mode of the current block when the MIP prediction mode for the current block does not exist in the MPM list for the MIP (i.e., the value of intra_mip_mpm_flag is 0), and may indicate any one of the entire MIP prediction modes, or may indicate any one of the remaining modes excluding the candidate modes in the MPM list for the MIP among the entire MIP prediction modes, as the MIP prediction mode of the current block.

[0225] On the other hand, if intra_mip_flag[x0][y0] has a first value (e.g., 0), information on MIP is not obtained from the bitstream, and intra prediction information other than MIP may be obtained from the bitstream. In one embodiment, intra_luma_mpm_flag[x0][y0] indicating whether an MPM list for general intra prediction is generated may be obtained from the bitstream.

[0226] When an intra prediction mode is applied to the current block, an MPM list for it may be constructed, and intra_luma_mpm_flag may indicate whether the intra prediction mode for the current block is present in the MPM list (or present among the MPM candidates). For example, a first value (e.g., 0) of intra_luma_mpm_flag may indicate that the intra prediction mode for the current block is not present in the MPM list. A second value (e.g., 1) of intra_luma_mpm_flag may indicate that the intra prediction mode for the current block is present in the MPM list. If the intra_luma_mpm_flag value is 1, the intra_luma_not_planar_flag may be obtained from the bitstream.

[0227] The intra_luma_not_planar_flag may indicate whether the intra prediction mode of the current block is not planar mode. For example, a first value (e.g., 0) of the intra_luma_not_planar_flag may indicate that the intra prediction mode of the current block is planar mode. A second value (e.g., 1) of the intra_luma_not_planar_flag may indicate that the intra prediction mode of the current block is not planar mode.

[0228] The intra_luma_mpm_idx can be parsed and coded when the intra_luma_not_planar_flag is 'true' (i.e., a value of 1). In one embodiment, the planar mode can always be included as a candidate in the MPM list, but the planar mode can be excluded from the MPM list by first signaling the intra_luma_not_planar_flag as described above. In this case, a unified MPM list can be configured from the various intra prediction types (general intra prediction, MRL, ISP, LIP, etc.) described above. In this case, the number of candidates in the MPM list can be reduced to five. The intra_luma_mpm_idx can indicate a candidate to be used as the intra prediction mode of the current block among the candidates included in the MPM list from which the planar mode is excluded.

[0229] On the other hand, when the value of intra_luma_mpm_flag is 0, the intra_luma_mpm_remainder may be parsed / coded. The intra_luma_mpm_remainder may indicate one of all intra prediction modes as the intra prediction mode of the current block, or may indicate one of the remaining modes excluding the candidate modes in the MPM list as the intra prediction mode of the current block.

[0230] Configuring the MPM list in MIP

[0231] When MIP is applied to the current block, an MPM list for the current block to which MIP is applied can be separately configured. The MPM list can be called by various names such as an MIP MPM list (or an MPM list for MIP, candMipModeList) in order to distinguish it from an MPM list when MIP is not applied to the current block. Hereinafter, it will be referred to as an MIP MPM list for distinction, but it can also be called an MPM list.

[0232] The MIP MPM list may include n candidates, where n may be 3, for example. The MIP MPM list may be constructed based on a left peripheral block and an upper peripheral block of the current block. Here, the left peripheral block may be the block located at the top among the peripheral blocks adjacent to the left boundary of the current block. Also, the upper peripheral block may indicate the block located at the leftmost among the peripheral blocks adjacent to the upper boundary of the current block. For example, when the coordinates of the current block are (xCb, yCb), the coordinates of the left peripheral block may be (xCb-1, yCb) and the coordinates of the upper peripheral block may be (xCb, yCb-1). Alternatively, the left peripheral block may be the block located at the bottom among the peripheral blocks adjacent to the left boundary of the current block. Also, the upper peripheral block may indicate the block located at the rightmost among the peripheral blocks adjacent to the upper boundary of the current block.

[0233] When MIP is applied to the left peripheral block, a first candidate intra prediction mode may be set to be the same as the MIP intra prediction mode of the left peripheral block. Here, the first candidate intra prediction mode may be expressed as candMipModeA. Also, for example, when MIP is applied to the upper peripheral block, a second candidate intra prediction mode may be set to be the same as the MIP intra prediction mode of the upper peripheral block. Here, the second candidate intra prediction mode may be expressed as candMipModeB.

[0234] Meanwhile, the candidate intra prediction mode may be determined by comparing the size of the current block with the size of the neighboring blocks. For example, if MIP is applied to the left neighboring block and the block size type of the left neighboring block is the same as the block size type of the current block, a first candidate intra prediction mode (e.g., candMipModeA) may be set to be the same as the MIP intra prediction mode of the left neighboring block. Also, if MIP is applied to the upper neighboring block and the block size type of the upper neighboring block is the same as the block size type of the current block, a second candidate intra prediction mode (e.g., candMipModeB) may be set to be the same as the MIP intra prediction mode of the upper neighboring block.

[0235] Meanwhile, the left peripheral block or the upper peripheral block may be coded based on intra prediction other than MIP. For example, the left peripheral block or the upper peripheral block may be coded in another intra prediction mode other than MIP. In this case, it is not appropriate to use the general intra prediction mode number of the peripheral block to which MIP is not applied (e.g., the left peripheral block or the upper peripheral block) as a candidate intra mode for the current block to which MIP is applied. Therefore, in this case, as an example, the peripheral block to which MIP is not applied may be processed as being applied with a certain MIP intra prediction mode. For example, if MIP is not applied to a peripheral block, the MIP intra prediction mode of the peripheral block may be determined to be a specific MIP intra prediction mode value (e.g., 0, 1, or 2, etc.) to generate a MIP MPM list.

[0236] Alternatively, as another example, a general intra prediction mode of a neighboring block to which MIP is not applied may be mapped to a MIP intra prediction mode based on a mapping table and used to construct a MIP MPM list. In this case, the mapping may be performed based on the block size type of the current block. For example, the mapping table according to an embodiment shown in FIG. 13 may be used as the mapping table.

[0237] FIG. 13 illustrates an example of a mapping table for mapping a general intra prediction mode of a neighboring block to a MIP intra prediction mode. In the illustration of FIG. 13, IntraPredModeY[xNbX][yNbX] indicates an intra prediction mode of a neighboring block (left neighboring block / upper neighboring block). Here, the intra prediction mode of the neighboring block may be an intra prediction mode for a luma component (sample). Block size type MipSizeId indicates a block size type of a neighboring block or a current block. The numbers below the block size type values ​​0, 1, and 2 indicate the MIP intra prediction mode to which the general intra prediction mode is mapped for each block size type. Block size type 0 may indicate a case where a block has a 4×4 pixel size. Block size type 1 may indicate a case where a block has a 4×8, 8×4, or 8×8 pixel size. Block size type 2 may indicate a case where a block has a size larger than 8×8 pixel size.

[0238] In one embodiment, if the neighboring blocks (e.g., left neighboring block / upper neighboring block) are not available because they are located outside the current picture or outside the current tile / slice, or even if MIP is applied, a MIP intra prediction mode that is not available for the current block may be applied according to the block size type. In this case, predefined MIP intra prediction modes may be used as the first candidate intra prediction mode, the second candidate intra prediction mode, and the third candidate intra prediction mode. FIG. 14 is a table showing an example of a predetermined MIP intra prediction mode that can be used in such a case according to the size of the current block. For example, if all MIP intra prediction information of the neighboring blocks is not available, a MIP MPM list may be generated based on the size of the current block according to the example of FIG. 14.

[0239] In one embodiment, the MIP intra prediction mode of the surrounding block can be obtained. In this case, if the MIP intra prediction mode of the left surrounding block is different from the MIP intra prediction mode of the upper surrounding block, the MIP intra prediction mode of the left surrounding block can be set as a first candidate intra prediction mode. And, the MIP intra prediction mode of the upper surrounding block can be set as a second candidate intra prediction mode. Thus, the first candidate of the MIP MPM list (e.g., candMipModeList[0]) can be set as the MIP intra prediction mode of the left surrounding block, and the second candidate of the MIP MPM list (e.g., candMipModeList[1]) can be set as the MIP intra prediction mode of the upper surrounding block.

[0240] The order of intra prediction candidates in the MIP list can be changed. For example, the MIP intra prediction mode of the upper peripheral block can be included as the first candidate in the MIP MPM list (e.g., candMipModeList[0]), and the MIP intra prediction mode of the left peripheral block can be included as the second candidate in the MIP MPM list (e.g., candMipModeList[1]).

[0241] The third candidate intra prediction mode can be a predetermined MIP intra prediction mode according to Fig. 14. For example, the third candidate intra prediction mode in Fig. 14 can be used as the second candidate in the MIP MPM list (for example, candMipModeList[2]).

[0242] In another embodiment, the third candidate intra prediction mode may be determined as a MIP intra prediction mode that does not overlap with the first candidate intra prediction mode and the second candidate intra prediction mode. This may be determined according to the order of the MIP intra prediction modes shown in FIG. 14. For example, if the first candidate intra prediction mode of FIG. 14 is not used for the first and second candidates of the MIP MPM list, the first candidate intra prediction mode of FIG. 14 may be used as the third candidate of the MIP MPM list (e.g., candMipModeList[2]). Otherwise, for example, if the second candidate intra prediction mode of FIG. 15 is not used for the first and second candidates of the MIP MPM list, the second candidate intra prediction mode of FIG. 14 may be used as the third candidate of the MIP MPM list (e.g., candMipModeList[2]). Otherwise, the third candidate intra prediction mode of FIG. 14 may be used as the third candidate of the MIP MPM list (e.g., candMipModeList[2]).

[0243] Alternatively, if the MIP intra prediction mode of the left peripheral block and the MIP intra prediction mode of the upper peripheral block are the same, one of the MIP intra prediction mode of the left peripheral block and the MIP intra prediction mode of the upper peripheral block may be included as the first candidate of the MIP MPM list (e.g., candMipModeList[0]), and the second candidate of the MIP MPM list (e.g., candMipModeList[1]) and the third candidate of the MIP MPM list (e.g., candMipModeList[2]) may use a predetermined MIP intra prediction mode such as that shown in FIG. 15, as described above.

[0244] As described above, the MIP intra prediction mode of the current block may be derived based on the MIP MPM list. In this case, as described above, the MPM flag, MPM index, and remaining intra prediction mode information for the MIP may be called intra_mip_mpm_flag, intra_mip_mpm_idx, and intra_mip_mpm_remainder, respectively.

[0245] Intra prediction mode decision using MPM list

[0246] The intra-prediction mode signaling procedure in the encoding device and the intra-prediction mode decision procedure in the decoding device may be performed, for example, as follows.

[0247] 15 is a flowchart illustrating a method for encoding an intra-prediction mode using an MPM list. The encoding apparatus may configure an MPM list for a current block as described above (S1510).

[0248] Next, the encoding device may determine an intra prediction mode of the current block (S1520). The encoding device may perform prediction based on various intra prediction modes and may determine an optimal intra prediction mode based on rate-distortion optimization (RDO) based on the prediction. In one embodiment, the encoding device may determine the optimal intra prediction mode using only MPM candidates configured in the MPM list, or may determine the optimal intra prediction mode using not only the MPM candidates configured in the MPM list but also the remaining intra prediction modes. For example, if the intra prediction type of the current block is not a normal intra prediction type but a specific type (e.g., LIP, MRL, or ISP), the encoding device may determine the optimal intra prediction mode by considering only the MPM candidates as intra prediction mode candidates for the current block. In such a case, the intra prediction mode for the current block may be determined only from among the MPM candidates, and in such a case, the mpm flag may not be coded / signaled. In such a case, the decoding device can infer that the mpm flag is 1 without receiving any separate signaling of the mpm flag.

[0249] The encoding device may encode the intra prediction mode information and output it in a bitstream format (S1530). In one embodiment, the encoding device may signal whether the intra prediction mode of the current block is an intra planar mode by encoding information (e.g., intra_luma_not_planar_flag) indicating that the intra prediction mode of the current block is not an intra planar mode. If the intra prediction mode of the current block is an intra planar mode, the encoding device may set the value of intra_luma_not_planar_flag to a first value (e.g., 0). On the other hand, if the intra prediction mode of the current block is not an intra planar mode, the encoding device may set the value of intra_luma_not_planar_flag to a second value (e.g., 1).

[0250] Meanwhile, when the intra prediction mode of the current block is not the intra planar mode, the encoding device may determine and signal the intra prediction mode according to whether or not block-based Delta Pulse Code Modulation (BDPCM) is applied to the current block and the application direction. In one embodiment, when BDPCM is applied to the current block, the encoding device may determine the intra prediction mode according to the application direction of BDPCM. For example, the encoding device may determine the intra prediction mode as the horizontal or vertical mode in the same direction based on whether the application direction of BDPCM is one of the horizontal and vertical directions. In this case, the encoding device may signal the intra prediction mode of the current block by encoding and signaling information (intra_bdpcm_flag) indicating whether BDPCM is applied to the current block and information (intra_bdpcm_dir_flag) indicating the application direction of BDPCM. In this case, the signaling of the mpm flag may be omitted.

[0251] Meanwhile, when the prediction mode of the current block is neither an intra planar mode nor BDPCM is applied, the encoding device may encode intra prediction mode information including the above-mentioned mpm flag (e.g., intra_luma_mpm_flag), mpm index (e.g., intra_luma_mpm_idx) and / or remaining intra prediction mode information (e.g., intra_luma_mpm_remainder) to signal the intra prediction mode. In general, the mpm index and remaining intra prediction mode information are mutually alternative and may not be signaled simultaneously when indicating the intra prediction mode for one block. That is, the mpm flag value 1 and the mpm index may be signaled together, or the mpm flag value 0 and remaining intra prediction mode information may be signaled together. However, as described above, when a specific intra prediction type is applied to the current block, the mpm flag may not be signaled and only the mpm index may be signaled. That is, in this case, the intra prediction mode information may include only the mpm index.

[0252] Meanwhile, in general, if the intra prediction mode of the current block is one of the MPM candidates in the MPM list, the encoding device may generate an mpm index (e.g., intra_luma_mpm_idx) that indicates one of the MPM candidates. If the intra prediction mode of the current block is not in the MPM list, the encoding device may generate remaining intra prediction mode information (e.g., intra_luma_mpm_remainder) that indicates the same mode as the intra prediction mode of the current block among the remaining intra prediction modes not included in the MPM list. For example, when the encoding device encodes the intra prediction mode (e.g., IntraPredModeY) of the current block to intra_luma_mpm_remainder, it first subtracts 1 from IntraPredModeY, sorts the intra prediction modes belonging to the MPM list in descending order of the magnitude of the intra prediction mode values, and compares candModeList[0] to candModeList[4] with the value of IntraPredModeY. If the value of IntraPredModeY-1 is smaller than the value of candModeList[], it can determine the value of IntraPredModeY determined by subtracting the value of IntraPredModeY by one by one as intra_luma_mpm_remainder.

[0253] On the other hand, if the intra prediction mode of the current block is the MIP mode, the encoding apparatus may generate an MPM list for the MIP mode and encode the current block as described above. In this case, MPM encoding information for the MIP mode may be signaled. In this case, the MPM flag may be signaled as intra_mip_mpm_flag, the MPM index may be signaled as intra_mip_mpm_idx, and remaining intra prediction mode information may be signaled as intra_mip_mpm_remainder.

[0254] 16 is a flowchart illustrating a method for performing decoding using an MPM list by a decoding device according to an embodiment. The decoding device can determine an intra-prediction mode according to intra-prediction mode information determined and signaled by the encoding device.

[0255] 16, the decoding apparatus may obtain intra-prediction mode information from a bitstream (S1610). The intra-prediction mode information may include at least one of an mpm flag, an mpm index, and a remaining intra-prediction mode, as described above.

[0256] The decoding device may configure an MPM list (S1620). The MPM list may be configured in the same manner as the MPM list configured in the encoding device. That is, the MPM list may include intra-prediction modes of neighboring blocks, and may further include a specific intra-prediction mode according to a predetermined method.

[0257] In one embodiment, the decoding apparatus may determine whether the intra prediction mode of the current block is intra planar mode based on information indicating that the intra prediction mode of the current block is not intra planar mode (e.g., intra_luma_not_planar_flag). If the value of intra_luma_not_planar_flag is a first value (e.g., 0), the decoding apparatus may determine that the intra prediction mode of the current block is intra planar mode. On the other hand, if the value of intra_luma_not_planar_flag is a second value (e.g., 1), the decoding apparatus may determine that the intra prediction mode of the current block is not intra planar mode.

[0258] Meanwhile, when the intra prediction mode of the current block is not the intra planar mode, the decoding apparatus may determine the intra prediction mode according to whether or not block-based Delta Pulse Code Modulation (BDPCM) is applied to the current block and the application direction. In one embodiment, when information (intra_bdpcm_flag) indicating whether BDPCM is applied to the current block obtained from the bitstream indicates that BDPCM is applied, the decoding apparatus may determine one of the horizontal and vertical BDPCM application directions based on information (intra_bdpcm_dir_flag) indicating the application direction of BDPCM obtained from the bitstream. Then, the decoding apparatus may determine the intra prediction mode as the horizontal or vertical mode in the same direction as the determined BDPCM application direction.

[0259] Meanwhile, when the prediction mode of the current block is neither an intra planar mode nor BDPCM is applied, the decoding apparatus may generate an MPM list in the manner described above to determine an intra prediction mode. For example, the MPM list may be determined based on the intra prediction modes of neighboring blocks of the current block. The decoding apparatus may determine the MPM list based on the intra prediction modes of the upper and left neighboring blocks of the current block. For example, in one embodiment, the decoding apparatus may determine the MPM list based on a first intra prediction candidate determined based on the intra prediction mode of the left neighboring block and a second intra prediction candidate determined based on the intra prediction mode of the upper neighboring block.

[0260] The decoding apparatus may determine whether to determine an intra prediction mode of the current block using the MPM list (S1630). As an example, if the value of the mpm flag is 1, the decoding apparatus may derive a candidate indicated by the mpm index among MPM candidates in the MPM list as the intra prediction mode of the current block. For example, the decoding apparatus may determine the intra prediction mode of the current block according to a value of intra_luma_mpm_idx, which is an mpm index. For example, the decoding apparatus may determine candModeList[intra_luma_mpm_idx] as the intra prediction mode of the current block.

[0261] As another example, if the value of the mpm flag is 0, the decoding device may derive the intra prediction mode indicated by the remaining intra prediction mode information from among the remaining intra prediction modes not included in the MPM list as the intra prediction mode of the current block (S1640).

[0262] For example, the decoding apparatus may determine an intra prediction mode (e.g., IntraPredModeY) of the current block based on remaining intra prediction mode information (e.g., intra_luma_mpm_remainder) indicating the intra prediction mode of the current block. For example, the decoding apparatus may set the value of IntraPredModeY to intra_luma_mpm_remainder+1. Then, the decoding apparatus may determine the value of IntraPredModeY indicating the intra prediction mode of the current block by sorting the intra prediction modes belonging to the MPM list in ascending order of the magnitude of the intra prediction mode value, and by comparing candModeList[0] to candModeList[4] with the value of IntraPredModeY, if the value of IntraPredModeY is smaller than the value of candModeList[], by incrementing the value of IntraPredModeY by 1.

[0263] On the other hand, as another example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP, etc.), the decoding device may derive the candidate pointed to by the mpm index in the MPM list as the intra prediction mode of the current block without checking the mpm flag.

[0264] Meanwhile, if the intra prediction mode of the current block is the MIP mode, the decoding apparatus may generate an MPM list for the MIP mode and decode the current block as described above. At this time, MPM coding information for the MIP mode may be obtained through a bitstream. At this time, the MPM flag may be obtained using intra_mip_mpm_flag, the MPM index may be obtained using intra_mip_mpm_idx, and remaining intra prediction mode information may be obtained using intra_mip_mpm_remainder.

[0265] Mapping problem between MIP intra prediction modes and general intra prediction modes

[0266] As described above, in order to determine the intra prediction mode or MIP mode of the current block, an MPM list for a general intra prediction mode or an MPM list for MIP may be generated based on information of neighboring blocks. In this case, the neighboring blocks may include a left neighboring block and an upper neighboring block of the current block. Here, the general intra prediction mode refers to an intra prediction mode other than the MIP mode. For example, the general intra prediction mode may refer to an intra planar mode, an intra DC mode, and a directional intra prediction mode, which are non-directional intra prediction modes.

[0267] When the MIP mode is applied to the current block, but an intra prediction mode (general intra prediction mode) is applied to the surrounding blocks instead of the MIP mode, the intra prediction mode of the surrounding blocks needs to be mapped to the MIP mode in order to generate an MPM list for the current block using prediction information of the surrounding blocks. Also, when the general intra prediction mode is applied to the current block, but an MIP mode is applied to the surrounding blocks, the MIP mode of the surrounding blocks needs to be mapped to the general intra prediction mode in order to generate an MPM list for the current block using prediction information of the surrounding blocks.

[0268] However, since the MIP mode can have various numbers of prediction modes according to the luma block size as follows, it is difficult to perform 1:1 mapping between the general intra prediction mode and the MIP mode.

[0269] [Table 3]

[0270] Since the number of general intra prediction modes and the number of MIP modes are different, in order to perform mapping by interpolating between the two, the MIP mode and the general intra prediction mode may be mapped through a mapping table as shown in FIG. 7 and FIG. 13. For example, when referring to a neighboring block to generate an MPM list of a current block encoded in the general intra mode, if the intra prediction mode of the neighboring block is the MIP mode, the MPM list should be generated as shown in FIG. 17 in order to map the MIP mode of the neighboring block to the intra prediction mode. More specifically, the encoding device and the decoding device may determine that the prediction mode of the current block is the general intra prediction mode (S1710) and that the prediction mode of the neighboring block is the MIP mode (S1720) during the encoding and decoding process. If the prediction mode of the neighboring block is the MIP mode, the encoding device and the decoding device may determine whether the neighboring block is a 4×4 luma block (S1730). When the surrounding block is a 4×4 luma block, the encoding apparatus and the decoding apparatus may determine a general intra prediction mode corresponding to the MIP mode of the surrounding block by mapping the 35 MIP modes to 67 intra modes in FIG. 7 (S1740). When the surrounding block is not a 4×4 luma block, the encoding apparatus and the decoding apparatus may check whether the surrounding block is a 4×8, 8×4, or 8×8 luma block (S1750). When the surrounding block is a 4×8, 8×4, or 8×8 luma block, the encoding apparatus and the decoding apparatus may determine a general intra prediction mode corresponding to the MIP mode of the surrounding block by mapping the 19 MIP modes to 67 intra modes in FIG. 7 (S1760). Alternatively, if the surrounding block is not a 4x8, 8x4, or 8x8 luma block, the encoding and decoding devices may determine a general intra prediction mode corresponding to the MIP mode of the surrounding block according to the method of mapping the 11 MIP modes to 67 intra modes in FIG. 7 (S1770).Finally, the encoding and decoding devices may generate an MPM list for the current block in the determined general intra-prediction mode according to the method described above (S1780).

[0271] In a similar manner, when referring to neighboring blocks to generate an MPM list for a current block encoded in MIP mode, if the intra prediction mode of the neighboring blocks is a general intra prediction mode, steps S1810 to S1880 must be performed as shown in FIG. 18 to map the intra prediction mode of the neighboring blocks to MIP mode.

[0272] However, when performing the mapping in this manner, a correlation occurs between the MIP mode and the intra prediction mode, so the sizes of the current block and the surrounding blocks must be compared, and additional memory is required to store such a mapping table.

[0273] Mapping MIP intra prediction modes to general intra prediction modes

[0274] Hereinafter, a mapping method according to an embodiment will be described, which reduces the complexity of the mapping algorithm and saves memory for storing the mapping table by removing the correlation between the block size and the MIP mode and the intra prediction mode.

[0275] When mapping a MIP mode to a general intra prediction mode, the encoding and decoding apparatus according to an embodiment may determine the MIP mode to be a predetermined intra prediction mode without using a block size and a mapping table.

[0276] For example, when converting MIP modes into intra prediction modes, the encoding and decoding apparatus according to an embodiment can map all MIP modes into intra planar (PLANAR) modes.

[0277] Alternatively, when converting MIP modes into intra prediction modes, the encoding and decoding apparatus according to an embodiment may map all MIP modes to intra DC modes.

[0278] Alternatively, when converting MIP modes into intra prediction modes, the encoding and decoding apparatus according to an embodiment may map all MIP modes into intra vertical modes.

[0279] Alternatively, when converting MIP modes into intra prediction modes, the encoding and decoding apparatus according to an embodiment may map all MIP modes into intra horizontal modes.

[0280] In one embodiment, when searching for the intra prediction modes of surrounding blocks to generate an MPM list for determining the intra prediction mode of the current block, if MIP prediction is applied to the surrounding blocks, the intra prediction mode of the surrounding blocks can be induced to intra planar mode to generate the current block MPM list.

[0281] On the other hand, if the current block (or coding unit) includes a luma block and a chroma block, when configuring the intra prediction mode of the chroma block, if MIP prediction is applied to the luma block corresponding to the position of the chroma block, the intra prediction mode indicated by the DM mode (direct mode, using the luma block intra prediction mode corresponding to the chroma block) of the chroma block can be induced to intra planar mode.

[0282] By mapping the MIP modes to intra prediction modes in this manner, when the current block is encoded or decoded in the general intra prediction mode, the encoding device or the decoding device can simply determine all MIP modes as a predetermined general intra prediction mode when generating an MPM list, and can generate an MPM list based on the general intra prediction mode. As a result, the MPM list generation step previously described with reference to FIG. 17 can be simplified as shown in FIG. 19. Referring to FIG. 19, it can be seen that steps S1730 to S1780 in the conventional MPM list generation step described with reference to FIG. 17 are simplified to a step of determining a general intra prediction mode corresponding to the MIP mode (S1791) by mapping all MIP modes to a predetermined general intra prediction mode, and a step of generating an MPM list in the determined general intra prediction mode (S1792). Here, the predetermined general intra prediction mode may be any one of an intra planar mode, an intra DC mode, an intra vertical mode, and an intra horizontal mode.

[0283] Similarly, even when determining the intra prediction mode for the aforementioned chroma block, if the luma block corresponding to the chroma block is in MIP mode, the intra prediction mode corresponding to the luma block can be determined to be a predetermined general intra prediction mode without performing the size-based mapping as described above.

[0284] Hereinafter, an image encoding method performed by an encoding device according to an embodiment will be described with reference to Fig. 20. The encoding device according to an embodiment may include a memory and at least one processor, and the at least one processor may perform the following encoding method.

[0285] An encoding apparatus according to an embodiment may identify a prediction mode of a current block (S2010). When the prediction mode of the current block is an intra prediction mode, the encoding apparatus may determine a candidate intra prediction mode based on a prediction mode of a neighboring block located in the vicinity of the current block (S2020). The candidate intra prediction mode may include a first candidate intra prediction mode and a second candidate intra prediction mode. The first candidate intra prediction mode may be determined based on a prediction mode of a first neighboring block located in the vicinity of the current block, and the second candidate intra prediction mode may be determined based on a prediction mode of a second neighboring block located in the vicinity of the current block. Here, the first candidate intra prediction mode may be the first intra prediction candidate described above, and the second candidate intra prediction mode may be the second intra prediction candidate described above. For example, the encoding apparatus may determine a first candidate intra prediction mode (e.g., candIntraPredModeA) based on an intra prediction mode of a left neighboring block, and may determine a second candidate intra prediction mode (e.g., candIntraPredModeB) based on an intra prediction mode of an upper neighboring block.

[0286] In this case, when the prediction mode of the neighboring block is the MIP mode, the encoding apparatus may determine the candidate intra prediction mode of the neighboring block to be a predetermined intra prediction mode. Here, the predetermined intra prediction mode may be any one of an intra planar mode, an intra DC mode, an intra horizontal mode, and an intra vertical mode. For example, when the intra prediction mode of the left neighboring block is the MIP mode, the encoding apparatus may determine the first candidate intra prediction mode (e.g., candIntraPredModeA) to be any one of an intra planar mode, an intra DC mode, an intra horizontal mode, and an intra vertical mode. Alternatively, when the intra prediction mode of the upper neighboring block is the MIP mode, the encoding apparatus may determine the second candidate intra prediction mode (e.g., candIntraPredModeB) to be any one of an intra planar mode, an intra DC mode, an intra horizontal mode, and an intra vertical mode.

[0287] Next, the encoding apparatus may generate a candidate intra prediction mode list for the current block based on the candidate intra prediction mode (S2030). The candidate intra prediction mode list may be the MPM list described above. For example, the encoding apparatus may generate the candidate intra prediction mode list based on the first candidate intra prediction mode and the second candidate intra prediction mode as described above. In this case, if both the prediction mode of the first surrounding block and the prediction mode of the second surrounding block are MIP modes, the encoding apparatus may determine that the candidate intra prediction mode list includes a predetermined candidate intra prediction mode. Here, the predetermined candidate intra prediction mode may be at least one of a DC mode and a vertical mode.

[0288] Next, the encoding device may encode an intra-prediction mode indicator indicating an intra-prediction mode of the current block based on the candidate intra-prediction mode list (S2040). Here, the intra-prediction mode indicator may include an mpm flag signaled in the form of the above-mentioned intra_luma_mpm_flag syntax element, an mpm index signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and remaining intra-prediction mode information signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. The encoding device may generate a bitstream by encoding the intra-prediction mode indicator and transmit the bitstream to a decoding device.

[0289] Hereinafter, an image decoding method performed by a decoding device according to an embodiment will be described with reference to Fig. 21. The decoding device according to an embodiment may include a memory and at least one processor, and the at least one processor may perform the following decoding method.

[0290] First, a decoding apparatus according to an embodiment may identify a prediction mode of a current block (S2110). If the prediction mode of the current block is an intra prediction mode, the decoding apparatus may determine a candidate intra prediction mode for the current block based on prediction modes of neighboring blocks located around the current block (S2120).

[0291] When the prediction mode of the neighboring block is the MIP mode, the decoding apparatus may determine the candidate intra prediction mode to be a predetermined intra prediction mode, where the predetermined intra prediction mode may be any one of an intra planar mode, an intra DC mode, an intra horizontal mode, and an intra vertical mode.

[0292] The decoding device can determine whether the prediction mode of the neighboring block is the MIP mode based on the MIP mode indicator for the neighboring block. The MIP mode indicator is the above-mentioned MIP flag (e.g., intra_mip_flag), and the decoding device can obtain the MIP mode indicator from the bitstream.

[0293] The candidate intra prediction modes may include a first candidate intra prediction mode and a second candidate intra prediction mode. In this case, the first candidate intra prediction mode may be determined based on a prediction mode of a first neighboring block located in the vicinity of the current block. And, the second candidate intra prediction mode may be determined based on a prediction mode of a second neighboring block located in the vicinity of the current block.

[0294] Here, the first candidate intra prediction mode may be the first intra prediction candidate described above, and the second candidate intra prediction mode may be the second intra prediction candidate described above. For example, the decoding apparatus may determine the first candidate intra prediction mode (e.g., candIntraPredModeA) based on the intra prediction mode of the left peripheral block, and may determine the second candidate intra prediction mode (e.g., candIntraPredModeB) based on the intra prediction mode of the upper peripheral block.

[0295] For example, when the intra prediction mode of the left peripheral block is the MIP mode, the decoding apparatus may determine the first candidate intra prediction mode (e.g., candIntraPredModeA) to be any one of the intra planar mode, the intra DC mode, the intra horizontal mode, and the intra vertical mode. Alternatively, when the intra prediction mode of the upper peripheral block is the MIP mode, the decoding apparatus may determine the second candidate intra prediction mode (e.g., candIntraPredModeB) to be any one of the intra planar mode, the intra DC mode, the intra horizontal mode, and the intra vertical mode.

[0296] Then, the decoding apparatus may generate a candidate intra prediction mode list for the current block based on the candidate intra prediction mode (S2130). The candidate intra prediction mode list may be the MPM list described above. For example, the decoding apparatus may generate the candidate intra prediction mode list based on the first candidate intra prediction mode and the second candidate intra prediction mode as described above. In this case, if both the prediction mode of the first surrounding block and the prediction mode of the second surrounding block are MIP modes, the decoding apparatus may determine that the candidate intra prediction mode list includes a predetermined candidate intra prediction mode. Here, the predetermined candidate intra prediction mode may be at least one of a DC mode and a vertical mode.

[0297] In addition, the decoding device can generate a candidate intra prediction mode list including a value of the first candidate intra prediction mode when the first candidate intra prediction mode and the second candidate intra prediction mode are the same and the first candidate intra prediction mode is an intra prediction mode having a value greater than a prediction mode value indicating a DC mode.

[0298] In addition, the decoding device can generate a candidate intra prediction mode list including the second candidate intra prediction mode when the prediction mode of the first surrounding block is MIP mode, the first candidate intra prediction mode and the second candidate intra prediction mode are different from each other, and the second candidate intra prediction mode is an intra prediction mode having a value greater than a prediction mode value indicating DC mode.

[0299] The decoding apparatus may then determine an intra prediction mode of the current block based on the candidate intra prediction mode list (S2140). The decoding apparatus may determine one of the candidate intra prediction modes included in the candidate intra prediction mode list as the intra prediction mode of the current block based on the intra prediction mode indicator obtained from the bitstream. For example, the intra prediction mode indicator may be the above-mentioned mpm index, and may be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element via the bitstream.

[0300] In addition, the encoding apparatus according to an embodiment may encode the intra prediction mode of the chroma block according to the above-mentioned mapping of the MIP mode. The encoding apparatus according to an embodiment may use a DM mode to signal the intra prediction mode of the chroma block. In this case, the encoding apparatus may determine the intra prediction mode applied according to the DM mode as the intra prediction mode indicated by the reference mode. Here, the reference mode may be determined based on the prediction mode of the luma block corresponding to the chroma block, and may be identified by a parameter of lumaIntraPredMode or IntraPredModeY.

[0301] For example, the encoding device may determine the intra prediction mode of the luma block corresponding to the chroma block as the reference mode, thereby allowing the encoding device to determine the intra prediction mode of the chroma block determined to be the DM mode as the intra prediction mode of the luma block.

[0302] In this case, if the luma block is a luma block to which the MIP mode is applied, the encoding apparatus may determine the reference mode to be the planar mode instead of the MIP mode, thereby determining the intra prediction mode of the chroma block determined to be the DM mode as the intra planar mode.

[0303] Alternatively, if the MIP mode is not applied to the luma block, the encoding device may determine the reference mode based on the prediction mode of the luma block. For example, if the luma block is predicted in a predetermined mode, the encoding device may determine the reference mode as the intra DC mode. Here, the predetermined mode may include the IBC mode or other modes. Thus, the encoding device may determine the intra prediction mode of the chroma block determined to be in the DM mode as the intra DC mode.

[0304] The encoding device may then encode the intra prediction mode of the chroma block based on the reference mode. For example, when an intra planar mode is selected as an optimal prediction mode for encoding a chroma block and a prediction mode of a luma block corresponding to the chroma block is an MIP mode, the encoding device may encode information indicating that the intra prediction mode of the chroma block is an intra prediction mode identified according to the DM mode.

[0305] In addition, in accordance with the above encoding method, a decoding apparatus according to an embodiment may determine an intra prediction mode of a chroma block according to the above-mentioned MIP mode mapping. The decoding apparatus according to an embodiment may determine a reference mode for determining an intra prediction mode of a chroma block based on a prediction mode of a luma block corresponding to the chroma block. Here, the reference mode may be identified by a parameter of lumaIntraPredMode or IntraPredModeY.

[0306] In this case, if the luma block corresponding to the chroma block is a luma block to which the MIP mode is applied, the decoding apparatus may determine the reference mode to be the planar mode, thereby allowing the decoding apparatus to determine the intra prediction mode of the chroma block determined to be in the DM mode to be the intra planar mode.

[0307] Alternatively, if the MIP mode is not applied to the luma block, the decoding device may determine the reference mode based on the prediction mode of the luma block. For example, if the luma block is predicted in the IBC mode or another predetermined mode, the decoding device may determine the reference mode as the intra DC mode. Thus, the decoding device may determine the intra prediction mode of the chroma block determined to be the DM mode as the intra DC mode.

[0308] Alternatively, if the MIP mode is not applied to the luma block and the luma block is not predicted in the IBC mode or another predetermined mode, the decoding device may determine the reference mode as the intra prediction mode of the luma block, thereby allowing the decoding device to determine the intra prediction mode of the chroma block determined to be the DM mode as the intra prediction mode of the luma block.

[0309] The decoding apparatus may determine an intra prediction mode of the chroma block based on the reference mode. For example, when the intra prediction mode of the chroma mode is determined to be the DM mode, the decoding apparatus may determine the intra prediction mode of the chroma block as the intra prediction mode corresponding to the reference mode.

[0310] Accordingly, the encoding device and the decoding device do not need to compare the block sizes of the current block or the surrounding blocks even when the prediction mode of the surrounding blocks or the luma blocks referred to when the current block is encoded or decoded in the general intra mode is the MIP mode, thereby reducing the computation complexity. Furthermore, since there is no need to use a mapping table for mapping, the memory space efficiency can be improved.

[0311] FIG. 22 shows experimental data comparing the coding rate when the MPM list of the current block is generated by mapping all MIP modes to intra planar modes according to the mapping method of FIG. 19 described above when converting the MIP modes of the surrounding blocks to intra prediction modes, with the method using the mapping table described in FIG. 17. As shown in FIG. 22, it can be seen that there is no difference in the coding rate. That is, by applying the above method, it is possible to minimize the coding loss, reduce the complexity of the algorithm, and reduce the memory usage of the mapping table.

[0312] Mapping general intra prediction modes to MIP intra prediction modes

[0313] Hereinafter, a mapping method according to another embodiment will be described for reducing the complexity of the mapping algorithm and saving memory for storing the mapping table by removing the correlation between the block size and the MIP mode and intra prediction mode.

[0314] When mapping general intra prediction modes to MIP modes, the encoding and decoding apparatus according to an embodiment can determine all general intra prediction modes to be predetermined MIP modes without using a block size and a mapping table.

[0315] For example, when converting general intra prediction modes into MIP modes, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes to the 0th MIP mode.

[0316] Alternatively, when converting general intra prediction modes into MIP modes, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes to the first MIP mode.

[0317] Alternatively, when converting general intra prediction modes into MIP modes, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes into the third MIP mode.

[0318] Alternatively, when converting general intra prediction modes to MIP modes, the encoding and decoding apparatus according to one embodiment may map all general intra prediction modes to the MIP mode that has the highest probabilistic selection rate during the encoding or decoding process.

[0319] By mapping the MIP modes to the intra prediction modes in this manner, when the current block is encoded or decoded in the MIP mode, the encoding device or the decoding device can simply determine all general intra prediction modes as a predetermined MIP mode when generating an MPM list, and can generate an MPM list based on the MIP mode. As a result, the MPM list generation step previously described with reference to FIG. 18 can be simplified as shown in FIG. 23. Referring to FIG. 23, it can be seen that steps S1830 to S1880 in the conventional MPM list generation step described with reference to FIG. 18 are simplified to a step of determining an MIP mode corresponding to the general intra prediction mode (S1891) by mapping all general intra prediction modes to a predetermined MIP mode, and a step of generating an MPM list in the determined MIP mode (S1892). Here, the predetermined MIP mode may be any one of MIP mode 0, MIP mode 1, MIP mode 3, and an MIP mode having the highest probability of selection in the encoding or decoding process.

[0320] FIG. 24 shows experimental data comparing the coding rate when the MPM list for the MIP mode of the current block is generated by mapping all general intra prediction modes to the 0th MIP mode according to the above-mentioned mapping method in the case of converting the general intra prediction modes of the neighboring blocks to the MIP mode with the coding rate when the MPM list described with reference to FIG. 18 is generated. As shown in FIG. 24, it can be seen that there is no significant difference in the coding rate. That is, by applying the above-mentioned method, it is possible to achieve the effects of minimizing the coding loss, reducing the complexity of the algorithm, and reducing the memory usage of the mapping table.

[0321] Alternatively, the encoding and decoding apparatus according to an embodiment may convert the general intra prediction mode to the MIP mode using a simplified mapping table as shown in Table 4 below.

[0322] [Table 4]

[0323] For example, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes to MIP mode 17, 0, or 1 according to the size (MipSizeId) of the current block.

[0324] As mentioned above, size 0 of the current block may refer to a 4x4 luma block, size 1 of the current block may refer to a 4x8, 8x4, or 8x8 luma block, and size 2 of the current block may refer to a luma block larger than 8x8.

[0325] Alternatively, the encoding and decoding apparatus according to an embodiment may convert the general intra prediction mode to the MIP mode using a simplified mapping table as shown in Table 5 below.

[0326] [Table 5]

[0327] For example, the encoding and decoding apparatus according to an embodiment may map all general intra prediction modes to MIP modes 5, 0, or 6 according to the size (MipSizeId) of the current block. Alternatively, the encoding and decoding apparatus according to an embodiment may convert general intra prediction modes to MIP modes using a simplified mapping table as shown in Table 6 below.

[0328] [Table 6]

[0329] For example, the encoding device and the decoding device according to an embodiment may map all general intra prediction modes to the MIP mode having the highest probability of selection for each block size according to the size (MipSizeId) of the current block. The encoding device and the decoding device according to an embodiment may reduce the complexity of the algorithm by using the simplified mapping table as described above, but may perform more sophisticated mapping than the above mapping method that collectively maps all general intra prediction modes to the MIP mode without comparing block sizes, in terms of comparing block sizes.

[0330] How to generate an MPM list in MIP mode

[0331] As described above, when the prediction mode of the current block is the MIP mode, it is necessary to check the MIP modes of the neighboring blocks in order to generate the MPM list of the current block. Figure 25 is a flowchart illustrating a method of determining a candidate MIP mode for constructing an MPM list of a current block according to an embodiment.

[0332] Referring to FIG. 25, in one embodiment, even if the prediction mode of the neighboring block is the MIP mode (S2510), the encoding device and the decoding device may determine the MIP mode of the neighboring block as a candidate MIP mode for constructing the MPM list of the current block only if the number of MIP modes that the current block and the neighboring block can have is the same, i.e., the size of the current block and the size of the neighboring block are the same (S2520). For example, even if the prediction mode of the neighboring block is the MIP mode (S2510), if the number of MIP modes that the current block and the neighboring block can have is not the same, i.e., the size of the current block and the size of the neighboring block are not the same (S2520), the encoding device and the decoding device may determine the value of the candidate MIP mode for constructing the MPM list of the current block as -1 (S2540). The value of the candidate MIP mode -1 may indicate that the value of the MIP mode from the neighboring block cannot be utilized.

[0333] In addition, if the prediction mode of the surrounding block is not MIP mode (S2510), the encoding device and the decoding device can convert the general intra prediction mode to a candidate MIP mode according to Figure 18 (S2550), as previously described with reference to Figure 18.

[0334] As in the method of Figure 25, the encoding device and decoding device must constantly check the sizes of the current block and surrounding blocks in the process of referring to surrounding blocks to determine a candidate MIP mode for the current block, and if the prediction mode of the surrounding block is not MIP mode, mapping must be performed as described with reference to Figure 18, resulting in high computational complexity.

[0335] In order to reduce the computational complexity, the encoding device and the decoding device according to an embodiment may check whether the neighboring blocks are in MIP mode when generating an MPM list for a current block to be encoded or decoded in MIP mode, and may determine a candidate MIP mode accordingly. For example, the encoding device and the decoding device may set the candidate MIP mode to mode 0 when the encoding or decoding mode of the neighboring block is MIP mode. Alternatively, the encoding device and the decoding device may set the value of the MIP mode to -1 when the encoding or decoding mode of the neighboring block is not MIP mode. As a result, the encoding device and the decoding device only need to check whether the MIP mode is applied to the neighboring block, so that the algorithm for determining the candidate MIP mode can be simplified, and a mapping procedure for converting the neighboring block to the MIP mode when the neighboring block is in a general intra prediction mode can be omitted.

[0336] Meanwhile, the encoding device and the decoding device may determine the candidate MIP mode based on the size of the current block and the neighboring block to improve prediction accuracy. For example, when the current block is in MIP mode, the encoding device and the decoding device may determine the candidate MIP mode as mipMpmCand[sizeId][0] by referring to Table 7 below when referring to the neighboring blocks to generate the MPM list and the prediction mode of the neighboring blocks is MIP mode. sizeId may refer to the size of the neighboring blocks, sizeId0 may refer to a 4×4 luma block, sizeId1 may refer to a 4×8, 8×4, or 8×8 luma block, and sizeId2 may refer to a luma block larger than 8×8.

[0337] [Table 7]

[0338] For example, the encoding device and the decoding device may set the candidate MIP mode to No. 17 when the size of the surrounding blocks is 4×4, set the candidate MIP mode to No. 0 when the size of the surrounding blocks is 4×8, 8×4, or 8×8, and set the candidate mode to No. 1 for other blocks. In this way, the encoding device and the decoding device may improve the accuracy of the MPM mode by adaptively selecting a basic candidate MIP mode according to the size of the surrounding blocks. Alternatively, in order to reduce the computational complexity, the encoding device and the decoding device according to an embodiment may select a candidate MIP mode without considering the coding mode of the surrounding blocks, and generate an MPM list by using the selected candidate MIP mode as it is.

[0339] For example, when generating an MPM list for an MIP mode, the encoding device and the decoding device may determine the MPM list for the MIP mode (e.g., candMipModeList[]) fixedly as follows, without considering the coding mode of the neighboring blocks. For example, when generating three MIP MPM lists, x may have a value of 0 to 2, and candMipModeList[x] may be configured as follows with reference to Table 7. Here, sizeId indicates the size of the neighboring blocks, but the encoding device and the decoding device may determine sizeId according to the size of the current block in order to omit the process of referring to information about the neighboring blocks.

[0340] candMipModeList[0]=mipMpmCand[sizeId][0]

[0341] candMipModeList[1]=mipMpmCand[sizeId][1]

[0342] candMipModeList[2]=mipMpmCand[sizeId][2]

[0343] Fig. 26 shows experimental data comparing the coding rate when an image is coded by determining an MPM list for an MIP mode in a fixed manner as described above without considering the coding modes of surrounding blocks according to the above mapping method with the coding rate when an image is coded by generating an MPM list based on the candidate MIP modes determined by the method of Fig. 25. As shown in Fig. 26, there is no significant difference in coding rate. That is, by applying the above method, it is possible to minimize coding loss, reduce the complexity of the algorithm, and reduce memory usage for the mapping table.

[0344] In another embodiment, when generating an MPM list for an MIP mode, the encoding device and the decoding device may determine the MPM list for the MIP mode (e.g., candMipModeList[]) fixedly based on the mode selection probability as follows, without considering the coding mode of the neighboring block. For example, when generating three MIP MPM lists, x may have a value of 0 to 2, and candMipModeList[x] may be configured with reference to Table 8 as follows. In sortedmipMpmCand[sizeId][x], a candidate MIP mode may be stored for each block size based on the MIP mode selection probability. For example, in sortedmipMpmCand[sizeId][0], a candidate MIP mode with the highest selection frequency for the corresponding sizeId may be stored, and in sortedmipMpmCand[sizeId][1], a candidate MIP mode with the second highest selection frequency for the corresponding sizeId may be stored. In this case, sizeId indicates the size of the neighboring block, but the encoding device and the decoding device may determine sizeId according to the size of the current block in order to omit the process of referring to information on the neighboring block.

[0345] candMipModeList[0]=sortedmipMpmCand[sizeId][0]

[0346] candMipModeList[1]=sortedmipMpmCand[sizeId][1]

[0347] candMipModeList[2]=sortedmipMpmCand[sizeId][2]

[0348] [Table 8]

[0349] Application examples

[0350] Although the exemplary method of the present disclosure is expressed as a series of operations for clarity of explanation, this is not intended to limit the order in which the steps are performed, and each step may be performed simultaneously or in a different order, if necessary. To realize the method according to the present disclosure, the steps illustrated may include other steps, some steps may be omitted and the remaining steps may be omitted, or some steps may be omitted and additional steps may be included.

[0351] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) can perform the operation (step) to check the execution conditions or circumstances of the operation (step). For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the image encoding device or the image decoding device can perform the predetermined operation after performing an operation to check whether the predetermined condition is satisfied or not.

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

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

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

[0355] FIG. 27 is a diagram illustrating a content streaming system to which an embodiment of the present disclosure can be applied.

[0356] As shown in FIG. 27, 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.

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

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

[0359] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server can transmit 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 control commands / responses between devices in the content streaming system.

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

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

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

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

[0364] The embodiments according to the present disclosure can be used to encode / decode images.

Claims

1. An image decoding method performed by an image decoding device, comprising: identifying a prediction mode for a current block; determining whether the intra prediction mode of the current block is a matrix-based intra prediction (MIP) mode based on the prediction mode of the current block being an intra prediction mode; determining a candidate intra prediction mode for the current block based on prediction modes of neighboring blocks located around the current block when the intra prediction mode of the current block is not an MIP mode; generating a candidate intra-prediction mode list for the current block based on the candidate intra-prediction modes; determining an intra-prediction mode for the current block based on the candidate intra-prediction mode list; generating a predicted sample of the current block based on an intra-prediction mode of the current block; The candidate intra prediction mode is determined to be a predetermined intra prediction mode based on the prediction mode of the neighboring block being an MIP mode; determining, based on the neighboring blocks being unavailable, that the candidate intra-prediction mode is the predetermined intra-prediction mode; The candidate intra-prediction mode list is generated based on a first candidate intra-prediction mode and a second candidate intra-prediction mode; The first candidate intra prediction mode is determined based on a prediction mode of a first neighboring block located in a neighboring region of the current block, The second candidate intra prediction mode is determined based on a prediction mode of a second neighboring block located in a neighboring region of the current block, An image decoding method, in which the candidate intra prediction mode list is determined to include the second candidate intra prediction mode based on the prediction mode of the first surrounding block being an MIP mode, the first candidate intra prediction mode and the second candidate intra prediction mode being different from each other, and the second candidate intra prediction mode being an intra prediction mode having a value greater than a prediction mode value representing a DC mode.

2. The image decoding method according to claim 1 , wherein the predetermined intra prediction mode is a Planar mode.

3. determining whether the prediction mode of the surrounding block is a MIP mode based on a MIP mode indicator for the surrounding block; The image decoding method of claim 1 , wherein the MIP mode indicator is obtained from a bitstream.

4. 2. The image decoding method of claim 1, wherein the candidate intra-prediction mode list is determined to include a value of the first candidate intra-prediction mode based on the first candidate intra-prediction mode being the same as the second candidate intra-prediction mode and the first candidate intra-prediction mode being an intra-prediction mode having a value greater than a prediction mode value indicating a DC mode.

5. The image decoding method according to claim 1 , wherein the predetermined candidate intra-prediction modes include at least one of a DC mode and a vertical mode.

6. The image decoding method of claim 1, wherein the step of determining the intra-prediction mode of the current block based on the candidate intra-prediction mode list is performed by determining, based on an intra-prediction mode indicator obtained from a bitstream, one of the candidate intra-prediction modes included in the candidate intra-prediction mode list as the intra-prediction mode of the current block.

7. determining a reference mode for determining an intra-prediction mode of a chroma block corresponding to the current block; determining an intra-prediction mode for the chroma block based on the reference mode; the current block is a luma block, The image decoding method according to claim 1 , wherein the reference mode is determined to be a Planar mode based on the intra prediction mode of the current block being an MIP mode.

8. The image decoding method of claim 7 , wherein an intra-prediction mode of the chroma block is determined to be the reference mode.

9. The image decoding method of claim 8 , wherein the reference mode is determined based on an intra prediction mode of the current block that is not an MIP mode.

10. An image coding method performed by an image coding device, comprising: identifying a prediction mode for a current block; determining a candidate intra prediction mode based on prediction modes of neighboring blocks located in the periphery of the current block, based on the prediction mode of the current block being an intra prediction mode; generating a candidate intra-prediction mode list for the current block based on the candidate intra-prediction modes; and encoding an intra-prediction mode indicator indicating an intra-prediction mode of the current block based on the candidate intra-prediction mode list; A predicted sample of the current block is generated based on an intra-prediction mode of the current block; The candidate intra prediction mode is determined to be a predetermined intra prediction mode based on the prediction mode of the neighboring block being a matrix based intra prediction (MIP) mode; determining, based on the neighboring blocks being unavailable, that the candidate intra-prediction mode is the predetermined intra-prediction mode; The candidate intra-prediction mode list is generated based on a first candidate intra-prediction mode and a second candidate intra-prediction mode; The first candidate intra prediction mode is determined based on a prediction mode of a first neighboring block located in a neighboring region of the current block, The second candidate intra prediction mode is determined based on a prediction mode of a second neighboring block located in a neighboring region of the current block, An image encoding method, in which the candidate intra prediction mode list is determined to include the second candidate intra prediction mode based on the prediction mode of the first surrounding block being an MIP mode, the first candidate intra prediction mode and the second candidate intra prediction mode being different from each other, and the second candidate intra prediction mode being an intra prediction mode having a value greater than a prediction mode value representing a DC mode.

11. A method for transmitting a bitstream generated by an image coding method, comprising the steps of: identifying a prediction mode for a current block; determining a candidate intra prediction mode based on prediction modes of neighboring blocks located in the periphery of the current block, based on the prediction mode of the current block being an intra prediction mode; generating a candidate intra-prediction mode list for the current block based on the candidate intra-prediction modes; and encoding an intra-prediction mode indicator indicating an intra-prediction mode of the current block based on the candidate intra-prediction mode list; A predicted sample of the current block is generated based on an intra-prediction mode of the current block; The candidate intra prediction mode is determined to be a predetermined intra prediction mode based on the prediction mode of the neighboring block being a matrix based intra prediction (MIP) mode; determining, based on the neighboring blocks being unavailable, that the candidate intra-prediction mode is the predetermined intra-prediction mode; The candidate intra-prediction mode list is generated based on a first candidate intra-prediction mode and a second candidate intra-prediction mode; The first candidate intra prediction mode is determined based on a prediction mode of a first neighboring block located in a neighboring region of the current block, The second candidate intra prediction mode is determined based on a prediction mode of a second neighboring block located in a neighboring region of the current block, A method for transmitting a bitstream, in which it is determined that the candidate intra prediction mode list includes the second candidate intra prediction mode based on the prediction mode of the first surrounding block being an MIP mode, the first candidate intra prediction mode and the second candidate intra prediction mode being different from each other, and the second candidate intra prediction mode being an intra prediction mode having a value greater than a prediction mode value representing a DC mode.

Citation Information

Patent Citations

  • Simplified signaling method for affine linear weighted intra prediction mode

    WO2020205705A1

  • Affine linear weighted intra prediction in video coding

    WO2020227393A1