Image encoding / decoding method, apparatus, and method for transmitting a bitstream using a simplified MPM list generation method

The image encoding/decoding method addresses high-resolution image data efficiency challenges by mapping intra prediction modes to predetermined modes, enhancing encoding/decoding efficiency and reducing costs.

JP7698120B2Active Publication Date: 2025-06-24NOKIA TECHNOLOGIES OY

Patent Information

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

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality images leads to higher transmission and storage costs due to increased data volume, necessitating a more efficient image compression technique.

Method used

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

Benefits of technology

Improves encoding/decoding efficiency and reduces prediction complexity while enabling efficient transmission and storage of high-resolution images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007698120000009
    Figure 0007698120000009
  • Figure 0007698120000010
    Figure 0007698120000010
  • Figure 0007698120000011
    Figure 0007698120000011
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 for signaling an intra prediction mode, an apparatus, and a method for transmitting a bitstream generated by the image encoding method / apparatus of the present disclosure.

Background Art

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

[0003] Accordingly, there is a need for a highly efficient image compression technique for effectively transmitting, storing, and reproducing information of high-resolution, high-quality images.

Summary of the Invention

Problems 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 mode 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] Furthermore, an object of the present disclosure is to provide a recording medium storing a bitstream generated by an image encoding method or apparatus according to the present disclosure.

[0008] Furthermore, an object of the present disclosure is to provide a recording medium storing a bitstream received by an image decoding apparatus according to the present disclosure, decoded, and used for restoring an image.

[0009] The technical problems to be solved by the present disclosure are not limited to the above-described technical problems, and other technical problems not described above will be clearly understood by those of ordinary skill in the technical field to which the present disclosure pertains from the following description.

Means for Solving the Problems

[0010] An image decoding method performed by an image decoding apparatus according to an aspect of the present disclosure is an image decoding method performed by an image decoding apparatus, including: identifying a prediction mode of a current block; when the prediction mode of the current block is an intra prediction mode, identifying whether the intra prediction mode of the current block is a MIP (Matrix-based intra prediction) mode; when the intra prediction mode of the current block is not the MIP mode, determining a candidate intra prediction mode for the current block based on prediction modes of peripheral blocks 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 an intra prediction mode of the current block based on the candidate intra prediction mode list. When the prediction mode of the peripheral block is the 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 peripheral block is the MIP mode is determined based on the MIP mode indicator for the peripheral block, and the MIP mode indicator can be obtained from the bitstream.

[0012] 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 the prediction mode of a first peripheral block located around the current block, and the second candidate intra prediction mode can be determined based on the prediction mode of a second peripheral block located around the current block.

[0013] 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 the prediction mode value indicating the DC mode, the candidate intra prediction mode list can be determined to include the value of the first candidate intra prediction mode.

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

[0015] The predetermined candidate intra prediction mode can include at least one of the DC mode and the vertical mode.

[0016] When the prediction mode of the first peripheral block is the 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 the prediction mode value representing the DC mode, the candidate intra prediction mode list can 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, based on an intra prediction mode indicator obtained from a bitstream, any one of the candidate intra prediction modes included in the candidate intra prediction mode list as the intra prediction mode of the current block.

[0018] Further, the image decoding method may include a step of determining a reference mode for determining an intra prediction mode of a chroma block corresponding to the current block, and a step of determining the intra prediction mode of the chroma block based on the reference mode. At this time, the current block is a luma block, and when the intra prediction mode of the current block is the MIP mode, the reference mode may be determined to be the Planar mode.

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

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

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

[0022] Also, the image encoding method performed by the image encoding apparatus according to one aspect of the present disclosure can include a step of identifying a prediction mode of a current block, a step of determining a candidate intra prediction mode based on a prediction mode of a peripheral block located around the current block when the prediction mode of the current block is an intra prediction mode, a step of generating a candidate intra prediction mode list of the current block based on the candidate intra prediction mode, and a step of 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 peripheral block is a MIP (matrix based intra prediction) mode, the candidate intra prediction mode can be determined to be a predetermined intra prediction mode.

[0023] The predetermined intra prediction mode can 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. The first candidate intra prediction mode is determined based on a prediction mode of a first peripheral block located around the current block, and the second candidate intra prediction mode is determined based on a prediction mode of a second peripheral block located around the current block. However, when both the prediction mode of the first peripheral block and the prediction mode of the second peripheral block are MIP modes, the candidate intra prediction mode list can be determined to include a predetermined candidate intra prediction mode.

[0025] Also, the predetermined candidate intra prediction mode can include at least one of a DC mode and a vertical mode.

[0026] According to another aspect of the present disclosure, a transmission method can transmit a bitstream generated by the image encoding apparatus or the image encoding method of the present disclosure.

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

[0028] The features briefly summarized and described above about the present disclosure are merely exemplary aspects of the detailed description of the present disclosure to be described later, and do not limit the scope of the present disclosure.

Advantages 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] Also, according to the present disclosure, an image encoding / decoding method and apparatus capable of reducing prediction complexity by mapping the intra prediction mode of surrounding blocks to a predetermined prediction mode can be provided.

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

[0032] Also, 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] Also, according to the present disclosure, a recording medium storing a bitstream received by the image decoding apparatus according to the present disclosure, decoded, and used for image restoration can be provided.

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

Brief Description of the Drawings

[0035]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Figure 20

Figure 21

Figure 22

Figure 23

Figure 24

Figure 25

Figure 26

Figure 27

Embodiments for Carrying Out the Invention

[0036] Hereinafter, with reference to the accompanying drawings, embodiments of the present disclosure will be described in detail so that those having ordinary knowledge in the technical field to which the present disclosure pertains can easily implement them. However, the present disclosure can be realized in various different forms and is not limited to the embodiments described herein.

[0037] In describing the embodiments of the present disclosure, when it is determined that a specific description of a known configuration or function may obscure the gist of the present disclosure, the detailed description thereof will be omitted. In the drawings, parts not related to the description of the present disclosure are omitted, and the same reference numerals are given to the same parts.

[0038] In the present disclosure, when a certain component is “connected,” “coupled,” or “joined” to another component, this can include not only a direct connection relationship but also an indirect connection relationship in which another component exists between them. Also, when a certain component “includes” or “has” another component, this means that, unless otherwise stated to the contrary, it does not exclude other components but can further include other components.

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

[0040] In the present disclosure, components that are distinguished from each other are for clearly explaining their respective features and do not necessarily mean that the components are separated. That is, a plurality of components may be integrated and configured as one hardware or software unit, or one component may be distributed and configured as a plurality of hardware or software units. Therefore, even without separate mention, such integrated or distributed embodiments are also included in the scope of the present disclosure.

[0041] In the present disclosure, the components described in various embodiments do not necessarily mean essential components, and some may be optional components. Therefore, embodiments constituted by a subset of the components described in one embodiment are also included in the scope of the present disclosure. In addition, embodiments that further include other components in the components described in various embodiments are also included in the scope of the present disclosure.

[0042] The present disclosure relates to image encoding and decoding, and the terms used in the present disclosure can have the ordinary meanings in the technical field to which the present disclosure belongs unless newly defined in the present disclosure.

[0043] In the present disclosure, "picture" generally means a unit indicating any one image in a specific time period, and a slice / tile is an encoding unit constituting a part of a picture, and one picture can be constituted by one or more slices / tiles. In addition, a slice / tile can include one or more CTUs (coding tree units).

[0044] In the present disclosure, "pixel" or "pel" can mean the smallest unit constituting one picture (or image). In addition, the term "sample" can be used as a term corresponding to a pixel. A sample can generally indicate a pixel or a pixel value, and can also indicate only the pixel / pixel value of the luma component, or can also indicate only the pixel / pixel value of the chroma component.

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

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

[0047] Also, in the present disclosure, "current block" can mean "luma block of the current block" unless explicitly stated as a chroma block. "Chroma block of the current block" can be explicitly expressed including an explicit description of a chroma block such as "chroma block" or "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 the present 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 the present disclosure, "or" can mean "additionally or alternatively".

[0050] Overview of Video Coding System

[0051] FIG. 1 is a diagram showing a video coding system according to the present disclosure.

[0052] A video coding system according to an embodiment can include an encoding device 10 and a decoding device 20. The encoding device 10 can 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] An encoding device 10 according to an embodiment can include a video source generation unit 11, an encoding unit 12, and a transmission unit 13. A decoding device 20 according to an embodiment can include a reception unit 21, a decoding unit 22, and a rendering unit 23. The encoding unit 12 can be referred to as a video / image encoding unit, and the decoding unit 22 can be referred to as a video / image decoding unit. The transmission unit 13 can be included in the encoding unit 12. The reception unit 21 can be included in the decoding unit 22. The rendering unit 23 can also include a display unit, and the display unit can be configured as a separate device or an external component.

[0054] The video source generation unit 11 can acquire video / images through processes such as video / image capture, synthesis, or generation. The video source generation unit 11 can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, and a smartphone, etc., and can (electronically) generate video / images. For example, virtual video / images can be generated through a computer or the like. In this case, the video / image capture process can be replaced by a process in which related data is generated.

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

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

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

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

[0059] Overview of Image Encoding Device

[0060] FIG. 2 is a diagram schematically showing an image encoding apparatus to which an embodiment according to the present disclosure can be applied.

[0061] As shown in FIG. 2, the image encoding apparatus 100 can include an image dividing unit 110, a subtraction unit 115, a conversion unit 120, a quantization unit 130, an inverse quantization unit 140, an inverse conversion 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 can be collectively referred to as a "prediction unit". The conversion unit 120, the quantization unit 130, the inverse quantization unit 140, and the inverse conversion unit 150 can be included in a residual processing unit. The residual processing unit can further include the subtraction unit 115.

[0062] All or at least a part of the plurality of components constituting the image encoding apparatus 100 can be realized by one hardware component (for example, an encoder or a processor) according to an embodiment. Further, the memory 170 can include a DPB (decoded picture buffer) and can be realized by a digital storage medium.

[0063] The image segmentation unit 110 can 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 unit can be called a coding unit (CU). The coding unit can 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 / Ternary-tree) structure. For example, one coding unit can be divided into a plurality of coding units with a deeper depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For the division of the coding unit, the quadtree structure can be applied first, and the binary tree structure and / or the ternary tree structure can be applied later. Based on the final coding unit that cannot be divided further, the coding procedure according to the present disclosure can be performed. The largest coding unit can be immediately used as the final coding unit, and the coding units with a deeper depth obtained by dividing the largest coding unit can also be used as the final coding unit. Here, the coding procedure can include procedures such as prediction, transformation, and / or restoration described later. As another example, the processing unit of the coding procedure can be a prediction unit (PU) or a transform unit (TU). The prediction unit and the transform unit can be divided or partitioned from the final coding unit respectively. The prediction unit can be a unit of sample prediction, and the transform unit can 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) can perform prediction on a processing target block (current block) and generate a predicted block that includes prediction samples for the current block. The prediction unit can determine whether intra prediction is applied in units of the current block or CU, or whether inter prediction is applied. The prediction unit can generate various information related to the prediction of the current block and transmit it to the entropy encoding unit 190. The information related to the prediction can be encoded by the entropy encoding unit 190 and output in the form of a bitstream.

[0065] The intra prediction unit 185 can predict the current block by referring to samples within the current picture. The samples to be referred to can be located in the neighborhood of the current block or at a distance according to the intra prediction mode and / or intra prediction technique. The intra prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes can include, for example, the DC mode and the Planar mode. The directional modes can include, for example, 33 directional prediction modes or 65 directional prediction modes according to the degree of fineness of the prediction direction. However, this is only an example, and more or fewer directional prediction modes can be used based on the setting. The intra prediction unit 185 can also determine the prediction mode to be applied to the current block by using the prediction mode applied to the neighboring blocks.

[0066] The inter prediction unit 180 can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, neighboring blocks can include spatial neighboring blocks existing within the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different from each other. The temporal neighboring block can be called by names such as a collocated reference block, a collocated CU (colCU), etc. The reference picture including the temporal neighboring block can be called a collocated picture (colPic). For example, the inter prediction unit 180 can construct a motion information candidate list based on neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction can be performed based on various prediction modes. For example, in the case of the skip mode and the merge mode, the inter prediction unit 180 can use the motion information of neighboring blocks as the motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal cannot be transmitted.In the case of the motion information prediction (motion vector prediction, MVP) mode, the motion vectors of neighboring blocks are used as motion vector predictors, and the motion vector difference and an indicator for the motion vector predictor are encoded to signal the motion vector of the current block. 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 can generate a prediction signal based on various prediction methods and / or prediction techniques described later. For example, the prediction unit can apply intra prediction or inter prediction for the prediction of the current block, and can also apply intra prediction and inter prediction simultaneously. A prediction method that applies intra prediction and inter prediction simultaneously for the prediction of the current block can be called CIIP (combined inter and intra prediction). In addition, the prediction unit can also perform intra block copy (IBC) for the prediction of the current block. Intra block copy can be used for content image / video coding such as games, for example, like SCC (screen content coding). IBC is a method of predicting the current block using a restored reference block within the current picture at a position a predetermined distance away from the current block. When IBC is applied, the position of the reference block within the current picture can be encoded as a vector (block vector) corresponding to the predetermined distance. IBC basically performs prediction within the current picture, but can be performed in the same way as inter prediction in terms of deriving a reference block within the current picture. That is, IBC can use at least one of the inter prediction techniques described in the present disclosure.

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

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

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

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

[0072] The bitstream can be transmitted via a network or stored in a digital storage medium. Here, the network can include a broadcast network and / or a communication network, etc., and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmission unit (not shown) for transmitting and / or a storage unit (not shown) for storing the signal output from the entropy encoding unit 190 can be provided as internal / external elements of the image encoding apparatus 100, or the transmission unit can also 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, by applying inverse quantization and inverse transformation to the quantized transform coefficients via the inverse quantization unit 140 and the inverse transformation unit 150, a residual signal (residual block or residual sample) can be restored.

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

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

[0076] The modified restored picture transmitted to the memory 170 can be used as a reference picture by the inter prediction unit 180. When inter prediction is applied through this, the image encoding apparatus 100 can avoid prediction mismatches between the image encoding apparatus 100 and the image decoding apparatus, and can also improve the encoding efficiency.

[0077] The DPB in the memory 170 can save the modified restored picture for use as a reference picture by the inter prediction unit 180. The memory 170 can save the motion information of the block where the motion information in the current picture has been derived (or encoded) and / or the motion information of the block in the already restored picture. The saved motion information can be transmitted to the inter prediction unit 180 for utilization as the motion information of the spatial neighboring blocks or the motion information of the temporal neighboring blocks. The memory 170 can save the restored samples of the restored blocks in the current picture and transmit them to the intra prediction unit 185.

[0078] Overview of Image Decoding Device

[0079] FIG. 3 is a diagram schematically showing an image decoding apparatus to which an embodiment according to the present disclosure can be applied.

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

[0081] All or at least a part of a plurality of components constituting the image decoding apparatus 200 can be realized by one hardware component (for example, a decoder or a processor) according to an embodiment. Further, the memory 170 can include a DPB and can be realized by a digital storage medium.

[0082] The image decoding apparatus 200 that has received a bitstream including video / image information can execute a process corresponding to the process performed by the image encoding apparatus 100 in FIG. 2 to restore an image. For example, the image decoding apparatus 200 can perform decoding using the processing unit applied in the image encoding apparatus. Therefore, the decoding processing unit 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 restored image signal decoded and output via the image decoding apparatus 200 can be reproduced via a reproducing apparatus (not shown).

[0083] The image decoding device 200 can receive the signal output from the image encoding device in FIG. 2 in the form of a bitstream. The received signal can be decoded via the entropy decoding unit 210. For example, the entropy decoding unit 210 can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information can further include information regarding various parameter sets such as an Adaptive Parameter Set (APS), a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), or a Video Parameter Set (VPS). Also, the video / image information can further include general constraint information. The image decoding device can further use the information regarding the parameter set and / or the general constraint information to decode the image. The signaling information, the received information, and / or the syntax elements mentioned in this disclosure can be obtained from the bitstream by being decoded via the decoding procedure. For example, the entropy decoding unit 210 can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the value of the syntax element necessary for image restoration and the quantized value of the transform coefficient regarding the residual. More specifically, the CABAC entropy decoding method receives the bin corresponding to each syntax element from the bitstream, determines a context model using the syntax element information to be decoded, the information of the surrounding blocks and the decoded information of the block to be decoded, or the information of the symbol / bin decoded in the previous step, predicts the occurrence probability of the bin based on the determined context model, and performs arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. At this time, the CABAC entropy decoding method can update the context model using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model.Of the information decoded by the entropy decoding unit 210, the information related to prediction is provided to the prediction units (inter prediction unit 260 and intra prediction unit 265), and the residual values that have undergone entropy decoding in the entropy decoding unit 210, that is, the quantized transform coefficients and related parameter information, can be input to the inverse quantization unit 220. Also, of the information decoded by the entropy decoding unit 210, the information related to filtering can be provided to the filtering unit 240. On the other hand, a receiving unit (not shown) that receives the signal output from the image encoding device can be further provided as an internal / external element of the image decoding device 200, or the receiving unit can also be provided as a component of the entropy decoding unit 210.

[0084] On the other hand, the image decoding device according to the present disclosure can be called a video / image / picture decoding device. The image decoding device can also include an information decoder (video / image / picture information decoder) and / or a sample decoder (video / image / picture sample decoder). The information decoder can include the entropy decoding unit 210, and the sample decoder can include at least one of the inverse quantization unit 220, the inverse transform unit 230, the addition unit 235, the filtering unit 240, the memory 250, the inter prediction unit 260, and the intra prediction unit 265.

[0085] In the inverse quantization unit 220, the quantized transform coefficients can be inverse quantized to output the transform coefficients. The inverse quantization unit 220 can reorder the quantized transform coefficients in a two-dimensional block format. In this case, the reordering can be performed based on the coefficient scan order performed in the image encoding device. The inverse quantization unit 220 can perform inverse quantization on the quantized transform coefficients using a quantization parameter (for example, quantization step size information) to obtain the transform coefficients.

[0086] In the inverse conversion unit 230, the conversion coefficients can be inversely converted to obtain a residual signal (residual block, residual sample array).

[0087] The prediction unit can perform prediction on the current block and generate a predicted block including predicted samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit 210, and can 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, which is the same as described in the explanation of the prediction unit of the image encoding device 100.

[0089] The intra prediction unit 265 can predict the current block by referring to samples within the current picture. The explanation of the intra prediction unit 185 can be similarly applied to the intra prediction unit 265.

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

[0091] The adder 235 can generate a restored signal (restored picture, restored block, restored sample array) by adding the obtained residual signal to the predicted signal (predicted block, predicted sample array) output from the prediction unit (including the inter prediction unit 260 and / or the intra prediction unit 265). When there is no residual for the processing target block as in the case where the skip mode is applied, the predicted block can be used as the restored block. The description of the adder 155 can be similarly applied to the adder 235. The adder 235 can be called a restoration unit or a restored block generation unit. The generated restored signal can be used for intra prediction of the next processing target block in the current picture, and can also be used for inter prediction of the next picture after passing through filtering as described later.

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

[0093] The (modified) restored picture stored in the DPB of the memory 250 can be used as a reference picture in the inter prediction unit 260. The memory 250 can store the motion information of the block from which the motion information in the current picture was derived (or decoded) and / or the motion information of the block in the already restored picture. The stored motion information can be transmitted to the inter prediction unit 260 for utilization as the motion information of the spatial neighboring blocks or the motion information of the temporal neighboring blocks. The memory 250 can store the restored samples of the restored blocks in the current picture and can transmit them to the intra prediction unit 265.

[0094] In the present disclosure, the embodiments described in the filtering unit 160, the inter prediction unit 180, and the intra prediction unit 185 of the image encoding apparatus 100 can be applied to the filtering unit 240, the inter prediction unit 260, and the intra prediction unit 265 of the image decoding apparatus 200 in the same or corresponding manner.

[0095] Partitioning Structure

[0096] The image encoding / decoding method according to the present disclosure can be performed based on a partitioning structure according to an embodiment. For example, procedures such as prediction, residual processing ((inverse) transformation, (inverse) quantization, etc.), syntax element coding, filtering, etc. can be performed based on CTUs, CUs (and / or TUs, PUs) derived based on the partitioning structure. The block partitioning procedure is performed in the image division unit 110 of the encoding device described above, and partitioning-related information can 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 derives the block partitioning structure of the current picture based on the partitioning-related information obtained from the bitstream, and based on this, a series of procedures for image decoding (for example, prediction, residual processing, block / picture restoration, in-loop filtering, etc.) can be performed. The CU size and the TU size may be the same, or a plurality of TUs may exist within the CU region. On the other hand, the CU size can generally indicate the luma component (sample) CB size. The TU size can generally indicate the luma component (sample) TB size. The chroma component (sample) CB or TB size can be derived based on the luma component (sample) CB / TB size according to the component ratio according to the chroma format of the picture / image (color format, for example, 4:4:4, 4:2:2, 4:2:0, etc.). The TU size can be derived based on maxTbSize indicating the maximum available TB size. For example, when the CU size is larger than the maxTbSize, a plurality of TUs (TBs) of the maxTbSize are derived from the CU, and conversion / inverse conversion can be performed in units of the TUs (TBs). Also, for example, when intra prediction is applied, the intra prediction mode / type is derived in units of the CU (or CB), and the procedure for deriving peripheral reference samples and generating prediction samples can be performed in units of the TUs (TBs). In this case, one or a plurality of TUs (or TBs) can exist within one CU (or CB) region, and in this case, the plurality of TUs (or TBs) can 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 can have a hierarchical structure. For example, one picture can be divided into one or more tiles or tile groups. One tile group can include one or more tiles. One tile can include one or more CTUs. The CTU can be divided into one or more CUs as described above. A tile can be composed of a rectangular area including CTUs grouped in specific rows and specific columns within a picture. A tile group can include an integer number of tiles by raster scanning of tiles within a picture. A tile group header can signal information / parameters applicable to the tile group. When the encoding / decoding apparatus has a multi-core processor, the encoding / decoding procedure for the tile or tile group can be processed in parallel. Here, the tile group can have any one of the tile group types including an intra-tile group (intra(I) tile group), a predictive(P) tile group, and a bi-predictive(B) tile group. For blocks within an I tile group, for prediction, inter prediction is not used and only intra prediction can be used. Of course, in this case as well, it is also possible to code and signal the original sample values without prediction. For blocks within a P tile group, intra prediction or inter prediction can be used, and when inter prediction is used, only uni prediction can be used. On the other hand, for blocks within a B tile group, intra prediction or inter prediction can be used, and when inter prediction is used, up to maximum bi prediction can be used.

[0098] Also, one picture can be divided into one or more slices. A slice can be composed of an integer number of tiles, or can be composed of a set of CTUs arranged in a row continuously within one tile. Two modes of a slice can be supported. One is the raster scan slice mode, and the other is the square slice mode. In the raster scan slice mode, a slice can be composed of tiles that are consecutive in the raster scan order existing within one picture as shown in FIG. 4. In the square slice mode, a slice can be composed by collecting tiles existing within one picture in a square shape. Tiles within a square slice can be scanned in the tile raster scan order within the slice.

[0099] In an encoding device, according to characteristics of an image (e.g., resolution), or in consideration of coding efficiency or parallel processing, tile / tile group, slice, maximum and minimum coding unit sizes can be determined, and information regarding them or information that can be derived therefrom can be included in a bitstream.

[0100] In a decoder, information indicating whether a slice, tile / tile group, CTUs within a tile of the current picture are divided into a number of coding units, etc. can be obtained. Such information can be made more efficient if it is obtained (transmitted) only under specific conditions.

[0101] The slice header or tile group header (tile group header syntax) can include information / parameters that are commonly applicable to the slice or tile group. APS (APS syntax) or PPS (PPS syntax) can include information / parameters that are commonly applicable to one or more pictures. The SPS (SPS syntax) can include information / parameters that are commonly applicable to one or more sequences. The VPS (VPS syntax) can include information / parameters that are commonly applicable to the entire video. In this specification, the upper-level syntax can 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 tile / tile group, etc. can be configured at the encoding stage via the upper-level syntax and transmitted to the decoder in bitstream format.

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

[0104] Overview of Intra Prediction

[0105] Hereinafter, an intra prediction method according to an embodiment will be described. Intra prediction can indicate a prediction that generates prediction samples for a current block based on reference samples within the picture to which the current block belongs (hereinafter, the current picture). When intra prediction is applied to the current block, peripheral reference samples to be used for intra prediction of the current block can be derived. The peripheral reference samples of the current block include a total of 2×nH samples adjacent to the left boundary of the current block of size nW×nH and adjacent to the bottom-left side, samples adjacent to the top boundary of the current block, a total of 2×nW samples adjacent to the top-right side, and one sample adjacent to the top-left side of the current block. Alternatively, the peripheral reference samples of the current block can also include a plurality of columns of upper peripheral samples and a plurality of rows of left peripheral samples. Further, the peripheral reference samples of the current block can also include a total of nH samples adjacent to the right boundary of the current block of size nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right side of the current block. On the other hand, when the ISP described later is applied, the peripheral reference samples can be derived in sub-partition units.

[0106] On the other hand, some of the peripheral reference samples of the current block may not have been decoded yet or may not be available. In this case, the decoding device can substitute the unavailable samples with available samples to constitute the peripheral reference samples used for prediction. Alternatively, the peripheral reference samples used for prediction can be constituted through interpolation of available samples.

[0107] When a peripheral reference sample is derived, (i) a predicted sample can be derived based on the average or interpolation of neighboring reference samples of the current block, and (ii) for the predicted sample among the peripheral reference samples of the current block, the predicted sample can also be derived based on the reference samples existing in a specific (predicted) direction. In the case of (i), it can be called a non-directional mode or a non-angle mode, and in the case of (ii), it can be called a directional mode or an angular mode, respectively. Also, among the peripheral reference samples, based on the predicted sample of the current block, the predicted sample can be generated through interpolation between the second peripheral sample and the first peripheral sample located in the opposite direction of the prediction direction of the intra prediction mode of the current block. The above-mentioned case can be called linear interpolation intra prediction (LIP). Also, a chroma predicted sample can be generated based on luma samples using a linear model. In this case, it can be called the LM mode. Also, a temporary predicted sample of the current block is derived based on the filtered peripheral reference samples, and at least one reference sample derived according to the intra prediction mode among the conventional peripheral reference samples, that is, the non-filtered peripheral reference samples, and the temporary predicted sample are weighted and summed to derive the predicted sample of the current block. The above-mentioned case can be called PDPC (Position dependent intra prediction). Also, among the peripheral multiple reference sample lines of the current block, the reference sample line with the highest prediction accuracy is selected, and a predicted sample is derived using the reference sample located in the prediction direction on that line. At this time, intra prediction coding can be performed by a method of indicating (signaling) the used reference sample line to the decoder. The above-mentioned case can be called multi-reference line (MRL) intra prediction or MRL-based intra prediction.Also, the current block is divided into vertical or horizontal sub - partitions and intra - prediction is performed based on the same intra - prediction mode. However, the 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 identically to the sub - partitions, but by deriving and using the surrounding reference samples in units of the sub - partitions, the intra - prediction performance can be enhanced as appropriate. Such a prediction method can be called ISP (intra sub - partitions) or ISP - based intra - prediction. Also, when the prediction direction based on the prediction samples points between the surrounding reference samples, that is, when the prediction direction points to a fractional sample position, the value of the prediction sample can also be derived through interpolation of a plurality of reference samples located around the prediction direction (around the fractional sample position). The intra - prediction method described above can be called an intra - prediction type, distinguished from the intra - prediction mode. Also, after generating a prediction signal for the subsampled pixel set of the current block using the reconstructed surrounding pixels located on the left and upper sides of the current block, the generated prediction signal and the surrounding sample values are used to perform interpolation in the vertical and horizontal directions to generate a prediction signal of the original size, whereby MIP (Matrix - weighted Intra prediction) for performing intra - prediction of the current block can also be applied.

[0108] The intra - prediction type can be called by various terms such as intra - prediction techniques or additional intra - prediction modes. For example, the intra - prediction type (or additional intra - prediction mode, etc.) can include at least one of LIPO, PDPC, MRL, ISP, and MIP described above. Information regarding the intra - prediction type can be encoded by an encoding device and included in a bitstream, thereby being signaled to a decoding device. The information regarding the intra - prediction type can be realized in various forms such as flag information indicating the applicability of each intra - prediction type or index information indicating any one of various intra - prediction types.

[0109] On the other hand, post-processing filtering for the predicted samples derived as necessary can also be performed. Specifically, the intra prediction procedure can include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and an intra prediction mode / type-based predicted sample derivation step. Also, as necessary, a post-filtering step for the derived predicted samples can also be performed.

[0110] Hereinafter, a video / image encoding method based on intra prediction will be described. First, the encoding device performs intra prediction on the current block. The encoding device can derive an intra prediction mode / type for the current block and derive neighboring reference samples of the current block, and can generate predicted samples within the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the determination of the intra prediction mode / type, the derivation of the neighboring reference samples, and the generation procedure of the predicted samples may be performed simultaneously, or any one of the procedures may be performed prior to the other procedures. On the other hand, when the predicted sample filtering procedure described later is performed, the intra prediction unit 185 can further include a predicted sample filter unit. The encoding device can determine a mode / type applied to the current block among a plurality of intra prediction modes / types. The encoding device can compare the RD (rate-distortion) cost for the intra prediction mode / type and determine the optimal intra prediction mode / type for the current block.

[0111] On the other hand, the encoding device can also perform a predicted sample filtering procedure. The predicted sample filtering can be called post-filtering. By the predicted sample filtering procedure, some or all of the predicted samples can be filtered. In some cases, the predicted sample filtering procedure can be omitted.

[0112] Next, the encoding device can generate residual samples for the current block based on the predicted samples. The encoding device can compare the original samples of the current block with the predicted samples based on phase, and derive the residual samples.

[0113] Next, the encoding device can encode the image information including the information regarding the intra prediction (prediction information) and the residual information regarding the residual samples. The prediction information can include the intra prediction mode information and the intra prediction type information. The encoding device can output the encoded image information in the form of a bitstream. The output bitstream can be transmitted to the decoding device via a storage medium or a network.

[0114] The residual information can include a residual coding syntax to be described later. The encoding device can convert / quantize the residual samples and derive quantized transform coefficients. The residual information can include information regarding the quantized transform coefficients.

[0115] On the other hand, as described above, the encoding device can generate a reconstructed picture (including reconstructed samples and a reconstructed block). For this purpose, the encoding device can further perform inverse quantization / inverse transformation processing on the quantized transform coefficients to derive (corrected) residual samples. The reason for performing inverse quantization / inverse transformation again after converting / quantizing the residual samples in this way is to derive the same residual samples as the residual samples derived from the decoding device, as described above. The encoding device can generate a reconstructed block including reconstructed samples for the current block based on the predicted samples and the (corrected) residual samples. Based on the reconstructed block, a reconstructed picture for the current picture can be generated. As described above, in-loop filtering procedures and the like can be further applied to the reconstructed picture.

[0116] Hereinafter, a video / image decoding method based on intra prediction will be described. The decoding apparatus can perform operations corresponding to the operations performed by the encoding apparatus.

[0117] First, the decoding apparatus can derive an intra prediction mode / type for a current block based on received prediction information (intra prediction mode / type information). The decoding apparatus can derive peripheral reference samples of the current block. The decoding apparatus can generate prediction samples within the current block based on the intra prediction mode / type and the peripheral reference samples. In this case, the decoding apparatus can perform a prediction sample filtering procedure. The prediction sample filtering can be called post-filtering. By the prediction sample filtering procedure, some or all of the prediction samples can be filtered. In some cases, the prediction sample filtering procedure can be omitted.

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

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

[0120] On the one hand, when the above-described MIP mode is applied, an MPM list for the MIP mode can also be configured to determine the MIP mode of the current block. The MPM list for the MIP mode can be configured in the same way as the MPM list for the intra mode described above. For example, when the MIP mode is applied, the MPM candidate list for the MIP mode can be configured to include the MIP mode of the peripheral blocks or a preset basic MIP mode. Further, when the MPM is not applicable to the current block, the intra prediction mode information can further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating any one of the remaining MIP modes excluding the MIP mode candidate (MPM candidate). The decoding device can determine the MIP mode of the current block based on the intra prediction mode information.

[0121] Intra Prediction Mode

[0122] Hereinafter, the intra prediction mode will be described in more detail. FIG. 5 is a diagram showing an intra prediction direction according to an embodiment. In order to capture any edge direction presented in a natural video, as shown in FIG. 5, the intra prediction mode 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 numbered from 2 to 66.

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

[0124]

Table 1

[0125] FIG. 6 is a diagram showing an intra prediction direction according to another embodiment. Here, the broken line direction indicates a wide-angle mode applied only to blocks that are not squares. As shown in FIG. 6, in order to capture any edge direction presented in a natural video, the intra prediction mode according to one embodiment can include 93 directional intra prediction modes together with two non-directional intra prediction modes. The non-directional intra prediction modes can include a Planar mode and a DC mode. The directional intra prediction modes can include intra prediction modes composed of numbers 2 to 80 and -1 to -14 as shown by the arrows in FIG. 6. The Planar mode can be denoted as INTRA_PLANAR, and the DC mode can be denoted as INTRA_DC. And the directional intra prediction modes can be denoted as INTRA_ANGULAR - 14 to INTRA_ANGULAR - 1 and INTRA_ANGULAR2 to INTRA_ANGULAR80.

[0126] On the one hand, the intra prediction type (or additional intra prediction mode, etc.) can include at least one of the above-mentioned LIP, PDPC, MRL, ISP, and MIP. The intra prediction type can be indicated based on intra prediction type information, and the intra prediction type information can be realized in various forms. As an example, the intra prediction type information can include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information includes reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if applied, 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 the split type of subpartitions when the ISP is applied, flag information indicating whether PDPC is applied, or flag information indicating whether LIP is applied, and can include at least one of MIP flag information indicating whether MIP is applied.

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

[0128] Intra Prediction for Chroma Block

[0129] When intra prediction is performed on the current block, prediction can be performed on the luma component block (luma block) of the current block and prediction can be performed on the chroma component block (chroma block). In this 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, the intra prediction mode for the chroma block can be indicated based on intra chroma prediction mode information, and the intra chroma prediction mode information can be signaled in the form of the intra_chroma_pred_mode syntax element. As an example, the intra chroma prediction mode information can indicate any one of the Planar mode, DC mode, vertical mode, horizontal mode, DM (Derived Mode), and CCLM mode. Here, the Planar mode can indicate the 0th intra prediction mode, the DC mode can indicate the 1st intra prediction mode, the vertical mode can indicate the 26th intra prediction mode, and the horizontal mode can indicate the 10th intra prediction mode. DM can also be called direct mode. CCLM can also be called LM.

[0131] On the other hand, DM and CCLM are dependent intra prediction modes that predict the chroma block using the information of the luma block. The DM can 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. Also, the CCLM can indicate an intra prediction mode in which, after subsampling the restored samples of the luma block in the process of generating a prediction block for the chroma block, the samples derived by applying the CCLM parameters α and β to the subsampled samples are used as the prediction samples for the chroma block.

[0132] MPM List in Intra Prediction

[0133] When intra prediction is applied, the intra prediction mode applied to the current block can be determined using the intra prediction modes of the surrounding blocks. For example, the decoding device can select one of the MPM candidates in the MPM list derived based on the intra prediction modes of the surrounding blocks (e.g., left and / or upper surrounding blocks) of the current block and additional candidate modes, based on the MPM index (e.g., intra_luma_mpm_idx) received using the bitstream. Also, the decoding device can 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 in the MPM candidates or in the remaining modes can be indicated based on the mpm flag (e.g., intra_luma_mpm_flag) in order to determine the intra prediction mode of the current block. A value of 1 for the mpm flag can indicate that the intra prediction mode for the current block is in the MPM list (candidates), and a value of 0 for the mpm flag can indicate that the intra prediction mode for the current block is not in the MPM list (candidates).

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

[0135] The MPM list can 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 the intra prediction modes of neighboring blocks, or may be further configured to include predetermined intra prediction modes 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 when 67 intra prediction modes are used, the MPM list can include three MPM candidates. If the intra prediction mode for the current block is not included in the MPM list, the remaining modes can be used. In this case, the remaining modes include 64 remaining candidates, and the 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., the 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 construct 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 blocks are encoded in the intra prediction mode, the encoding device can check or derive the prediction modes of the neighboring blocks. For example, the encoding device can determine the prediction mode of the current block based on the prediction modes of the left neighboring block and the upper neighboring block, and at this time, the prediction modes of the neighboring blocks can be determined as MPM (Most Probable Modes). In this regard, determining the MPM can also be expressed as listing MPM (most probable modes) candidates or constructing an MPM list.

[0139] In one embodiment, the left peripheral block can indicate the uppermost block among the peripheral blocks adjacent to the left boundary of the current block. Also, the upper peripheral block can indicate the leftmost block among the peripheral blocks adjacent to the upper boundary of the current block. The encoding device can check whether the prediction mode of the left peripheral block is the same as that of the upper peripheral block. The initial MPM list can be formed by performing a pruning process on the intra prediction modes of the two adjacent blocks. The pruning process can be a process in which only different prediction modes are included in the MPM list.

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

[0141] For example, when the prediction mode of the left peripheral block is not the same as that of the upper peripheral block, the MPM list can be configured according to the following cases.

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

[0143] Case 2: When the condition of Case 1 is not satisfied and both the intra prediction mode of the left peripheral block and the intra prediction mode of the upper peripheral block are not the intra DC mode, the MPM list can be configured to include the intra prediction mode of the left peripheral block, the intra prediction mode of the upper peripheral block, and the intra DC mode.

[0144] Case 3: When the condition of Case 2 is not satisfied, the MPM list can be configured to include the intra prediction mode of the left peripheral block, the intra prediction mode of the upper peripheral block, and the intra vertical mode.

[0145] On the other hand, when the prediction mode of the left peripheral block and the prediction mode of the upper peripheral block are the same, the encoding device can check whether the prediction mode of the left peripheral block is smaller than 2. For example, the encoding device can check whether the prediction mode of the left peripheral block is the intra Planar mode, the intra DC mode, or a prediction mode having a directionality pointing to a block located below the current block as shown in FIG. 6.

[0146] If the prediction mode of the left peripheral block is smaller than 2, the first MPM can be set to the intra Planar mode, the second MPM can be set to the intra DC mode, and the third MPM can be set to the intra vertical mode (intra prediction mode No. 50).

[0147] On the one hand, when the prediction mode of the left peripheral block is not smaller 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 follows.

[0149] Case 1: When the value of the intra prediction mode of the left peripheral block is smaller than 2, the MPM list can be configured to include the intra Planar mode, the intra DC mode, and the intra vertical mode.

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

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

[0152] And the encoding device can determine whether the optimal intra prediction mode applied to the current block belongs to the previously configured MPM candidates.

[0153] If the intra prediction mode of the current block belongs to the MPM candidates, the encoding device can encode the MPM flag and the MPM index. Here, the MPM flag can indicate whether the intra prediction mode of the current block is derived from the surrounding intra prediction blocks (i.e., the intra prediction mode of the current block belongs within the MPM). Also, the MPM index can indicate which MPM mode is applied as the intra prediction mode of the current block among the said 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 can encode the intra prediction mode of the current block using the remaining mode.

[0155] On the one hand, in one embodiment, the encoding device and the decoding device can also configure an MPM list including six MPMs. To generate an MPM list including six MPMs, a default MPM list can be considered. The default MPM list can be configured as follows when the value of the intra prediction mode of the left surrounding 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, by performing a pruning process on the intra modes of two adjacent blocks, the default 6MPM list can be updated to generate a 6MPM list. For example, if the intra prediction modes of two adjacent blocks are the same as each other and the value of the intra prediction mode of two adjacent blocks is greater than the value 1 of the intra DC mode, the 6MPM list includes the intra prediction mode of the left adjacent block which is the default mode, the intra Planar mode and the intra DC mode. In addition to this, it can further include three induced modes induced by adding a predetermined offset value to the intra prediction mode of the adjacent block and performing modular arithmetic on the total number of 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 two adjacent blocks as the first two MPM modes. The remaining four MPM modes can be induced from the default mode and the intra prediction modes of adjacent blocks.

[0159] The above-described MPM list construction method can be used when MIP is not applied to the current block. For example, the above-described MPM list construction method can be used for deriving intra prediction modes used in LIP, PDPC, MRL, ISP intra prediction, and general intra prediction (non-directional intra prediction and directional intra prediction). However, the left peripheral block or the upper peripheral block can be encoded based on the above-described 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 directly 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 regarded as the DC mode or the 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 for constructing the MPM list. In such a case, the mapping can be performed based on the block size type of the current block. For example, for the mapping, a mapping table according to an embodiment as shown in FIG. 7 can be used.

[0160] In the table of FIG. 7, MIP IntraPredMode[xNbX][yNbX] indicates the MIP mode of the peripheral block (left peripheral block / upper peripheral block), and block size type MipSizeId indicates the block size type of the peripheral block or the current block. The numbers below the block size type values 0, 1, and 2 indicate the general intra prediction modes to which the MIP mode is mapped when each is the block size type. For example, the case where the height and width of the current block are each 4 can be defined as block size type 0, the case where both the height and width of the current block are 8 or less can be defined as block size type 1, and other cases can be defined as block size type 2.

[0161] Here, the general intra prediction mode is an intra prediction mode that is not the MIP mode, and can mean a non-directional intra prediction mode or a directional intra prediction mode. For example, when the block size type of the current block is 0 and the MIP mode number of the surrounding block is 10, the general intra prediction mode number to be mapped can be 18. However, the mapping relationship is for illustration and can be changed.

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

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

[0164] Here, the upper peripheral block can be the rightmost block among the blocks in contact with the upper side of the current block. The left peripheral block can be the lowermost block among the blocks in contact with the left side of the current block. For example, when 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 can be (xCb - 1, yCb + cbHeight - 1), and the coordinates of the upper peripheral block can be (xCb + cbWidth - 1, yCb - 1).

[0165] When the left peripheral block is an unavailable block, the prediction mode of the left peripheral block is not the intra prediction mode, or the prediction mode of the left peripheral block is the MIP mode, the encoding device and the decoding device can determine the value of the first intra prediction candidate as a value indicating the intra Planar mode (for example, 0). When the left peripheral block does not meet such conditions, the encoding device and the decoding device can determine the value of the first intra prediction candidate as a value indicating the intra prediction mode of the left peripheral block.

[0166] Also, when the upper peripheral block is an unavailable block, the prediction mode of the upper peripheral block is not the intra prediction mode, or the prediction mode of the upper peripheral block is the MIP mode, the encoding device and the decoding device can determine the value of the second intra prediction candidate as a value indicating the intra Planar mode (for example, 0). When the upper peripheral block does not meet such conditions, the encoding device and the decoding device can determine the value of the second intra prediction candidate as 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. Hereinafter, the first intra prediction candidate will be denoted as candIntraPredModeA, the second intra prediction candidate will be denoted as candIntraPredModeB, and the MPM list will be denoted as candModeList[x] for explanation. Here, x can be an integer from 0 to 4.

[0168] Case 1: When the value of the first intra prediction candidate is the same as the value of the second intra prediction candidate and the value of the first intra prediction candidate is greater than 1 (for example, when it is not the intra Planar mode or the 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: When the conditions of Case 1 are not met, the value of the first intra prediction candidate is not the same as the value of the second intra prediction candidate, and the value of the first intra prediction candidate or the value of the second intra prediction candidate is greater than 1 (for example, when it is not the intra Planar mode or the 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 both the values of the first intra prediction candidate and the second intra prediction candidate are greater than 1, the MPM list candModeList[0] and candModeList[1] can be configured as follows.

[0179] candModeList[0] = candIntraPredModeA

[0180] candModeList[1] = candIntraPredModeB

[0181] At this time, when 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, when the value of maxAB - minAB is 62 or more, 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, when 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, when the value of maxAB - minAB does not satisfy the above conditions, 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, when both the values of the first intra prediction candidate and the second intra prediction candidate are not greater than 1, and only one of the values 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 of Case 2 are not satisfied, the MPM list candModeList[x] can be configured 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 MIP (matrix based intra prediction) mode can also be called the ALWIP (affine linear weighted intra prediction) mode, the LWIP (linear weighted intra prediction) mode, or the MWIP (matrix weighted intra prediction) mode.

[0211] When the MIP mode is applied to the current block, the predicted samples for the current block can be derived by: i) using the neighboring reference samples for which an averaging step has been performed, ii) performing a matrix-vector-multiplication step, and iii) further performing a horizontal / vertical interpolation step if necessary.

[0212] The averaging step can be performed by averaging the values of the neighboring samples. As shown in FIG. 8(a), if the width and height of the current block are 4 in pixel units, the averaging procedure can be performed by taking the average of each boundary surface to generate a total of 4 samples, i.e., 2 samples on the upper side and 2 samples on the left side. As shown in FIG. 8(b), if the width and height of the current block are not 4 in pixel units, the averaging procedure can be performed by taking the average of each boundary surface to generate a total of 8 samples, i.e., 4 samples on the upper side and 4 samples on the left side.

[0213] The matrix-vector-multiplication step can be performed by multiplying the averaged samples by a matrix-vector and then adding an offset vector, thereby generating a prediction signal for the subsampled pixel set of the original block. The sizes of the matrix and the offset vector can be determined by the width and height 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, by performing vertical and horizontal interpolation using the subsampled prediction signal and the surrounding pixel values, a prediction signal of the size of the original block can be generated. FIG. 9 shows an example 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). By multiplying the eight averaged samples by a matrix vector and adding an offset vector, 16 sample values can be generated at even coordinate positions as shown in FIG. 9(a). Thereafter, as shown in FIG. 9(b), vertical interpolation can be performed using the average value of the upper samples of the current block. Thereafter, as shown in FIG. 9(c), horizontal interpolation can be performed using the left samples of the current block.

[0215] The intra prediction mode used for the MIP mode can be configured to be different from the intra prediction modes used in the above-described LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction. The intra prediction mode for the MIP mode can be referred to as the MIP intra prediction mode, the MIP prediction mode, or the MIP mode. For example, depending on the intra prediction mode for MIP, the matrix and offset used in the matrix vector multiplication can be set to be different. Here, the matrix can be referred to as the (MIP) weight matrix, and the offset can be referred to as the (MIP) offset vector or the (MIP) bias vector.

[0216] The above-mentioned intra prediction type information can include an MIP flag (e.g., intra_mip_flag) indicating whether the MIP mode is applied to the current block. When the MIP mode is applied to the current block (e.g., when the value of intra_mip_flag is 1), an MPM list for the MIP mode can be separately configured. Further, the intra prediction type information can include an MIP MPM flag (e.g., intra_mip_mpm_flag) indicating whether the MPM list is used for the MIP mode, an MPM index (e.g., intra_mip_mpm_idx) indicating the 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 indicate the direct 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 constituting the MIP. The number of intra prediction modes for MIP can be set to be different based on the size of the current block. For example, i) when 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) when 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 both 4, it is defined as block size type 0; when both the height and width of the current block are 8 or less, it is defined as block size type 1; and in other cases, it is defined as block size type 2. In this case, the number of intra prediction modes for MIP can be summarized as shown in the following table. However, this is just 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 regarding the intra prediction mode / type of the current block can be coded and signaled at a level such as CU (CU syntax), or can be implicitly determined according to conditions. In this case, for some modes / types, it can be explicitly signaled, and for some of the remaining modes, it can be implicitly derived. For example, the CU syntax can indicate information regarding the (intra) prediction mode / type as shown in FIGS. 10 to 12.

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

[0222] pcm_flag[x0][y0] can indicate whether the PCM (puls coding modulation) mode is applied to the current block. When the PCM mode is applied to the current block, prediction / transformation / quantization, etc. are not applied, and the values of the original samples within the current block can be coded and signaled. For example, pcm_flag[x0][y0] can indicate whether there is a pcm_sample syntax for the luma CU corresponding to the position (x0, y0) and whether there is no transfrom_tree() syntax. For example, the value 1 of pcm_flag[x0][y0] can indicate that there is a pcm_sample() syntax and there is no transform_tree() syntax. The value 0 of pcm_flag[x0][y0] can indicate that there is no pcm_sample() syntax and there is a transform_tree() syntax.

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

[0224] When intra_mip_flag[x0][y0] has a second value (e.g., 1), information for the MIP mode can be further obtained from the bitstream. For example, the 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, can be further obtained from the bitstream. When the MIP prediction mode is applied to the current block, an MPM list for MIP can be constructed, and the intra_mip_mpm_flag can indicate whether the MIP mode for the current block exists within the MPM list for MIP (or among the MPM candidates). The intra_mip_mpm_idx can indicate the index of the candidate used as the MIP prediction mode of the current block among the candidates within the MPM list when the MIP prediction mode for the current block exists within the MPM list for MIP (i.e., when the value of intra_mip_mpm_flag is 1). Intra_mip_mpm_remainder can indicate the MIP prediction mode of the current block when the MIP prediction mode for the current block does not exist within the MPM list for MIP of MIP (i.e., when the value of intra_mip_mpm_flag is 0), can indicate any one of the overall MIP prediction modes, or can indicate any one of the remaining modes excluding the candidate modes within the MPM list for MIP among the overall MIP prediction modes as the MIP prediction mode of the current block.

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

[0226] When an intra prediction mode is applied to a current block, an MPM list for that purpose can be configured, and intra_luma_mpm_flag can indicate whether the intra prediction mode for the current block exists in the MPM list (or among the MPM candidates). For example, the first value of intra_luma_mpm_flag (e.g., 0) can indicate that the intra prediction mode for the current block does not exist in the MPM list. The second value of intra_luma_mpm_flag (e.g., 1) can indicate that the intra prediction mode for the current block exists in the MPM list. When the intra_luma_mpm_flag value is 1, the intra_luma_not_planar_flag can be obtained from the bitstream.

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

[0228] The intra_luma_mpm_idx can be parsed and coded when the intra_luma_not_planar_flag is "true" (i.e., the value is 1). In one embodiment, the Planar mode can always enter the MPM list as a candidate. However, by signaling the intra_luma_not_planar_flag as described above first, the Planar mode can be excluded from the MPM list. In this case, a unified MPM list can be constructed 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 5. The intra_luma_mpm_idx can indicate a candidate among the candidates included in the MPM list from which the Planar mode is excluded and used as the intra prediction mode of the current block.

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

[0230] Configuration of 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 constructed. The MPM list can be called by various names such as MIP MPM list (or MPM list for MIP, candMipModeList) in order to distinguish it from the MPM list when MIP is not applied to the current block. Hereinafter, it is expressed as MIP MPM list for the sake of distinction, but it can be called the MPM list.

[0232] The MIP MPM list can include n candidates. For example, n can be 3. The MIP MPM list can be configured based on the left peripheral block and the upper peripheral block of the current block. Here, the left peripheral block can be the uppermost block among the peripheral blocks adjacent to the left boundary of the current block. Also, the upper peripheral block can indicate the leftmost block 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 adjacent block can be (xCb - 1, yCb), and the coordinates of the upper adjacent block can be (xCb, yCb - 1). Alternatively, the left peripheral block can also be the lowermost block among the peripheral blocks adjacent to the left boundary of the current block. Also, the upper peripheral block can also indicate the rightmost block among the peripheral blocks adjacent to the upper boundary of the current block.

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

[0234] On the other hand, it is also possible to determine a candidate intra prediction mode by comparing the size of the current block with the size of the surrounding blocks. For example, if MIP is applied to the left surrounding block and the block size type of the left surrounding block is the same as the block size type of the current block, the first candidate intra prediction mode (e.g., candMipModeA) can be set to be the same as the MIP intra prediction mode of the left surrounding block. Also, if MIP is applied to the upper surrounding block and the block size type of the upper surrounding block is the same as the block size type of the current block, the second candidate intra prediction mode (e.g., candMipModeB) can be set to be the same as the MIP intra prediction mode of the upper surrounding block.

[0235] On the other hand, the left surrounding block or the upper surrounding block can also be encoded based on an intra prediction other than MIP. For example, the left surrounding block or the upper surrounding block can be encoded in another intra prediction mode other than MIP. In this case, it is not appropriate to directly use the general intra prediction mode number of the surrounding block (e.g., the left surrounding block or the upper surrounding block) where MIP is not applied as the candidate intra mode for the current block where MIP is applied. Therefore, in this case, as an example, the surrounding block where MIP is not applied can be processed by considering that a predetermined MIP intra prediction mode is applied. For example, when MIP is not applied to the surrounding block, the MIP intra prediction mode of the surrounding block can be determined to be a specific MIP intra prediction mode value (e.g., 0, 1, or 2, etc.), and an MIP MPM list can be generated.

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

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

[0238] In one embodiment, if the peripheral block (e.g., left peripheral block / upper peripheral block) is not available because it is located outside the current picture or outside the current tile / slice, or if a MIP-internal prediction mode that is not available for the current block according to the block size type is applied even when MIP is applied. In this case, a predefined MIP-internal prediction mode can also 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 embodiment of a predetermined MIP-internal prediction mode that can be used in such a case according to the size of the current block. For example, if all of the MIP-internal prediction information of the peripheral blocks is not available, a MIP MPM list can be generated based on the size of the current block according to the example of FIG. 14.

[0239] In one embodiment, the MIP-internal prediction mode of the peripheral block can be obtained. At this time, if the MIP-internal prediction mode of the left peripheral block is different from the MIP-internal prediction mode of the upper peripheral block, the MIP-internal prediction mode of the left peripheral block can be set as the first candidate intra prediction mode. And the MIP-internal prediction mode of the upper peripheral block can be set as the second candidate intra prediction mode. Thereby, the first candidate (e.g., candMipModeList[0]) of the MIP MPM list can be set to the MIP-internal prediction mode of the left peripheral block, and the second candidate (e.g., candMipModeList[1]) of the MIP MPM list can be set to the MIP-internal prediction mode of the upper peripheral 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 (e.g., candMipModeList[0]) in the MIP MPM list, and the MIP intra prediction mode of the left peripheral block can be included as the second candidate (e.g., candMipModeList[1]) in the MIP MPM list.

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

[0242] In other embodiments, the third candidate intra prediction mode can be determined to be a MIP intra prediction mode that does not overlap with the first candidate intra prediction mode and the second candidate intra prediction mode. This can 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 in FIG. 14 is not used for the first candidate and the second candidate in the MIP MPM list, the first candidate intra prediction mode in FIG. 14 can be used as the third candidate (e.g., candMipModeList[2]) in the MIP MPM list. Otherwise, for example, if the second candidate intra prediction mode in FIG. 15 is not used for the first candidate and the second candidate in the MIP MPM list, the second candidate intra prediction mode in FIG. 14 can be used as the third candidate (e.g., candMipModeList[2]) in the MIP MPM list. Otherwise, the third candidate intra prediction mode in FIG. 14 can be used as the third candidate (e.g., candMipModeList[2]) in the MIP MPM list.

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

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

[0245] Determination of Intra Prediction Mode Using MPM List

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

[0247] FIG. 15 is a flowchart for explaining a method of encoding an intra prediction mode using an MPM list. The encoding device can configure an MPM list for the current block as described above (S1510).

[0248] Next, the encoding device can determine the intra prediction mode of the current block (S1520). The encoding device can perform prediction based on various intra prediction modes and can determine the optimal intra prediction mode based on rate-distortion optimization (RDO) based thereon. In one embodiment, the encoding device can also determine the optimal intra prediction mode using only the MPM candidates configured in the MPM list, or can further 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 can 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 can be determined only among the MPM candidates, and in such a case, it may not be necessary to encode / signal the mpm flag. The decoding device can estimate that the mpm flag is 1 without separately receiving the signaling of the mpm flag in such a case.

[0249] The symbolization device can symbolize the intra prediction mode information and output it in the form of a bitstream (S1530). In one embodiment, the symbolization device can signal whether the intra prediction mode of the current block is the intra Planar mode by symbolizing information (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not the intra Planar mode. When the intra prediction mode of the current block is the intra Planar mode, the symbolization device can set the value of intra_luma_not_planar_flag to a first value (e.g., 0). On the other hand, when the intra prediction mode of the current block is not the intra Planar mode, the symbolization device can set the value of intra_luma_not_planar_flag to a second value (e.g., 1).

[0250] On the other hand, when the intra prediction mode of the current block is not the intra Planar mode, the symbolization device can determine and signal the intra prediction mode according to whether 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 symbolization device can determine the intra prediction mode according to the application direction of BDPCM. For example, based on the application direction of BDPCM being either the horizontal direction or the vertical direction, the symbolization device can determine the intra prediction mode in the same direction as the horizontal or vertical mode. In such a case, the symbolization device can signal the intra prediction mode of the current block by symbolizing 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 such a case, the signaling of the mpm flag can be omitted.

[0251] On the one hand, when the prediction mode of the current block is neither the intra Planar mode nor BDPCM is applicable, in order to signal the intra prediction mode, the 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) can be encoded. Generally, the mpm index and the remaining intra prediction mode information are in an alternative relationship and cannot be signaled simultaneously when indicating the intra prediction mode for one block. That is, the mpm flag value 1 and the mpm index can be signaled together, or the mpm flag value 0 and the remaining intra prediction mode information can be signaled together. However, when a specific intra prediction type is applied to the current block as described above, the mpm flag may not be signaled and only the mpm index can be signaled. That is, in this case, the intra prediction mode information can also include only the mpm index.

[0252] On the one hand, generally, when the intra prediction mode of the current block is one of the MPM candidates in the MPM list, the encoding device can generate an mpm index (e.g., intra_luma_mpm_idx) that points to one of the MPM candidates. If the intra prediction mode of the current block is not in the MPM list, then among the remaining intra prediction modes not included in the MPM list, remaining intra prediction mode information (e.g., intra_luma_mpm_remainder) that points to the same mode as the intra prediction mode of the current block can be generated. For example, when the encoding device encodes the intra prediction mode (e.g., IntraPredModeY) of the current block into intra_luma_mpm_remainder, it first subtracts 1 from IntraPredModeY, sorts the intra prediction modes belonging to the MPM list in descending order according to the magnitude of the intra prediction mode values, and while comparing from candModeList[0] to candModeList[4] with the value of IntraPredModeY, if the value of IntraPredModeY - 1 is smaller than the value of candModeList[], the value of IntraPredModeY determined by decreasing the value of IntraPredModeY one by one can be determined as intra_luma_mpm_remainder.

[0253] On the other hand, when the intra prediction mode of the current block is the MIP mode, the encoding device can generate an MPM list for the MIP mode and encode the current block as described above. At this time, the MPM encoding information for the MIP mode can be signaled. At this time, the MPM flag can be signaled as intra_mip_mpm_flag, the MPM index as intra_mip_mpm_idx, and the remaining intra prediction mode information as intra_mip_mpm_remainder.

[0254] FIG. 16 is a flowchart for explaining a method in which a decoding apparatus performs decoding using an MPM list. The decoding apparatus can determine an intra prediction mode corresponding to the intra prediction mode information determined and signaled by the encoding apparatus.

[0255] Referring to FIG. 16, the decoding apparatus can obtain intra prediction mode information from a bitstream (S1610). As described above, the intra prediction mode information can include at least one of an mpm flag, an mpm index, and a remaining intra prediction mode.

[0256] The decoding apparatus can construct an MPM list (S1620). The MPM list can be constructed in the same manner as the MPM list constructed by the encoding apparatus. That is, the MPM list can include the intra prediction modes of neighboring blocks, or can further include specific intra prediction modes according to a predetermined method.

[0257] In one embodiment, the decoding apparatus can determine whether the intra prediction mode of the current block is an intra Planar mode based on information indicating whether the intra prediction mode of the current block is not an intra Planar mode (for example, intra_luma_not_planar_flag). When the value of intra_luma_not_planar_flag is a first value (for example, 0), the decoding apparatus can determine that the intra prediction mode of the current block is an intra Planar mode. On the other hand, when the value of intra_luma_not_planar_flag is a second value (for example, 1), the decoding apparatus can determine that the intra prediction mode of the current block is not an intra Planar mode.

[0258] On the one hand, when the intra prediction mode of the current block is not the intra Planar mode, the decoding device can determine the intra prediction mode according to whether block-based delta pulse code modulation (BDPCM) is applied to the current block and the application direction. In one embodiment, the decoding device determines whether information (intra_bdpcm_flag) indicating whether BDPCM is applied to the current block obtained from the bitstream indicates that BDPCM is applied. If so, based on the information (intra_bdpcm_dir_flag) indicating the application direction of BDPCM obtained from the bitstream, the decoding device can determine one of the horizontal direction and the vertical direction as the BDPCM application direction. Then, the intra prediction mode can be determined as the horizontal or vertical mode in the same direction as the determined BDPCM application direction.

[0259] On the other hand, when the prediction mode of the current block is neither the intra Planar mode nor BDPCM is applied, the decoding device can generate the MPM list in the manner described above in advance to determine the intra prediction mode. For example, the MPM list can be determined based on the intra prediction modes of the surrounding blocks of the current block. The decoding device can determine the MPM list based on the intra prediction modes of the upper surrounding block and the left surrounding block of the current block. For example, in one embodiment, the decoding device can determine the MPM list based on the first intra prediction candidate determined based on the intra prediction mode of the left surrounding block and the second intra prediction candidate determined based on the intra prediction mode of the upper surrounding block.

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

[0261] As another example, when the value of the mpm flag is 0, the decoding device can derive, as the intra prediction mode of the current block, the intra prediction mode pointed to by the remaining intra prediction mode information that is not included in the MPM list (S1640).

[0262] For example, the decoding device can determine the intra prediction mode (e.g., IntraPredModeY) of the current block based on the remaining intra prediction mode information (e.g., intra_luma_mpm_remainder) indicating the intra prediction mode of the current block. For example, the decoding device can set the value of IntraPredModeY to intra_luma_mpm_remainder + 1. Then, the decoding device sorts the intra prediction modes belonging to the MPM list in ascending order according to the magnitude of the intra prediction mode values, and while comparing from candModeList[0] to candModeList[4] with the value of IntraPredModeY, when the value of IntraPredModeY is smaller than the value of candModeList[], the value of IntraPredModeY can be incremented by 1 each time to determine the value of IntraPredModeY indicating the intra prediction mode of the current block.

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

[0264] On the other hand, when the intra prediction mode of the current block is the MIP mode, the decoding device can generate an MPM list for the MIP mode and decode the current block as described above. At this time, the MPM coding information for the MIP mode can be obtained via the bitstream. At this time, the MPM flag can be obtained using intra_mip_mpm_flag, the MPM index can be obtained using intra_mip_mpm_idx, and the remaining intra prediction mode information can be obtained using intra_mip_mpm_remainder.

[0265] Problem of Mapping between MIP Intra Prediction Mode and General Intra Prediction Mode

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

[0267] The MIP mode is currently applied to the current block. However, when the intra prediction mode (general intra prediction mode) instead of the MIP mode is applied to the surrounding blocks, it is necessary to map the intra prediction mode of the surrounding blocks to the MIP mode in order to generate the MPM list of the current block using the prediction information of the surrounding blocks. Also, when the general intra prediction mode is applied to the current block, but the MIP mode is applied to the surrounding blocks, it is necessary to map the MIP mode of the surrounding blocks to the general intra prediction mode in order to generate the MPM list of the current block using the prediction information of the surrounding blocks.

[0268] However, there is a problem that it is difficult to perform a one-to-one mapping between the general intra prediction mode and the MIP mode in that the MIP mode can have various numbers of prediction modes depending on the luma block size as follows.

[0269]

Table 3

[0270] Since the number of general intra prediction modes and the number of MIP modes are different in this way, in order to interpolate and map between these two, the mapping between the MIP mode and the general intra prediction mode can be performed via a mapping table as shown in FIGS. 7 and 13. For example, when referring to neighboring blocks to generate the MPM list of the current block encoded in the general intra mode, if the intra prediction mode of the neighboring block is the MIP mode, then as shown in FIG. 17, the MPM list must be generated to map the MIP mode of the neighboring block to the intra prediction mode. More specifically, the encoding device and the decoding device can identify 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 in the encoding and decoding processes (S1720). The encoding device and the decoding device can confirm whether the neighboring block is a 4×4 luma block when the prediction mode of the neighboring block is the MIP mode (S1730). When the neighboring block is a 4×4 luma block, the encoding device and the decoding device can determine the general intra prediction mode corresponding to the MIP mode of the neighboring block by the method of mapping 35 MIP modes in FIG. 7 to 67 intra modes (S1740). When the neighboring block is not a 4×4 luma block, the encoding device and the decoding device can confirm whether the neighboring block is a 4×8 or 8×4 or 8×8 luma block (S1750). When the neighboring block is a 4×8, 8×4 or 8×8 luma block, the encoding device and the decoding device can determine the general intra prediction mode corresponding to the MIP mode of the neighboring block by the method of mapping 19 MIP modes in FIG. 7 to 67 intra modes (S1760). Alternatively, when the neighboring block is not a 4×8, 8×4 or 8×8 luma block, the encoding device and the decoding device can determine the general intra prediction mode corresponding to the MIP mode of the neighboring block according to the method of mapping 11 MIP modes in FIG. 7 to 67 intra modes (S1770).Finally, the encoding device and the decoding device can generate the MPM list of the current block according to the method described above in the determined general intra prediction mode (S1780).

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

[0272] However, when performing such mapping, due to the correlation between the MIP mode and the intra prediction mode, the size comparison between the current block and the neighboring blocks must be performed, and additional memory for storing such a mapping table is required.

[0273] Mapping MIP Intra Prediction Mode to General Intra Prediction Mode

[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] The encoding device and the decoding device according to an embodiment can determine the MIP mode to a predetermined intra prediction mode without using the block size and the mapping table when mapping the MIP mode to the general intra prediction mode.

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

[0277] Alternatively, when converting the MIP mode to an intra prediction mode, the encoding device and the decoding device according to one embodiment can map all MIP modes to the intra DC mode.

[0278] Alternatively, when converting the MIP mode to an intra prediction mode, the encoding device and the decoding device according to one embodiment can map all MIP modes to the intra VERTICAL mode.

[0279] Alternatively, when converting the MIP mode to an intra prediction mode, the encoding device and the decoding device according to one embodiment can map all MIP modes to the intra HORIZONTAL mode.

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

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

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

[0283] Similarly, even when determining the intra prediction mode for the chroma block described above, if the luma block corresponding to the chroma block is in the MIP mode, the intra prediction mode corresponding to the luma block can be determined to a predetermined general intra prediction mode without performing the mapping according to the size 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 can include a memory and at least one processor, and the at least one processor can perform the following encoding method.

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

[0286] At this time, when the prediction mode of the peripheral block is the MIP mode, the encoding device can determine the candidate intra prediction mode of the peripheral block to a predetermined intra prediction mode. Here, the predetermined intra prediction mode can be any one of the intra Planar mode, the intra DC mode, the intra horizontal mode, and the intra vertical mode. For example, when the intra prediction mode of the left peripheral block is the MIP mode, the encoding device can determine the first candidate intra prediction mode (for example, candIntraPredModeA) to 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 encoding device can determine the second candidate intra prediction mode (for example, candIntraPredModeB) to any one of the intra Planar mode, the intra DC mode, the intra horizontal mode, and the intra vertical mode.

[0287] Next, the encoding device can generate a candidate intra prediction mode list of the current block based on the candidate intra prediction mode (S2030). The candidate intra prediction mode list can be the above-described MPM list. For example, the encoding device can generate a candidate intra prediction mode list based on the first candidate intra prediction mode and the second candidate intra prediction mode as described above. At this time, when both the prediction mode of the first peripheral block and the prediction mode of the second peripheral block are the MIP mode, the encoding device can determine that the candidate intra prediction mode list includes a predetermined candidate intra prediction mode. Here, the predetermined candidate intra prediction mode can be at least one of the DC mode and the vertical mode.

[0288] Next, the encoding device can encode an intra prediction mode indicator indicating the intra prediction mode of the current block based on the candidate intra prediction mode list (S2040). Here, the intra prediction mode indicator can include an mpm flag signaled in the form of the intra_luma_mpm_flag syntax element described above, an mpm index signaled in the form of the mpm_idx or intra_luma_mpm_idx syntax element, and remaining intra prediction mode information signaled in the form of the rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. The encoding device can generate a bitstream by encoding the intra prediction mode indicator and transmit this to the 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. A decoding device according to an embodiment can include a memory and at least one processor, and the at least one processor can perform the following decoding method.

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

[0291] When the prediction mode of the surrounding block is the MIP mode, the decoding device can determine the candidate intra prediction mode to a predetermined intra prediction mode. Here, the predetermined intra prediction mode can 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 peripheral block is the MIP mode based on the MIP mode indicator for the peripheral block. The MIP mode indicator is the aforementioned MIP flag (e.g., intra_mip_flag), and the decoding device can obtain the MIP mode indicator from the bit stream.

[0293] The candidate intra prediction modes can include a first candidate intra prediction mode and a second candidate intra prediction mode. At this time, the first candidate intra prediction mode can be determined based on the prediction mode of the first peripheral block located around the current block. And the second candidate intra prediction mode can be determined based on the prediction mode of the second peripheral block located around the current block.

[0294] Here, the first candidate intra prediction mode can be the aforementioned first intra prediction candidate, and the second candidate intra prediction mode can be the aforementioned second intra prediction candidate. For example, the decoding device can determine the first candidate intra prediction mode (e.g., candIntraPredModeA) based on the intra prediction mode of the left peripheral block, and 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 device can determine the first candidate intra prediction mode (e.g., candIntraPredModeA) to be any one of the intra Planar mode, intra DC mode, intra horizontal mode, and intra vertical mode. Alternatively, when the intra prediction mode of the upper peripheral block is the MIP mode, the decoding device can determine the second candidate intra prediction mode (e.g., candIntraPredModeB) to be any one of the intra Planar mode, intra DC mode, intra horizontal mode, and intra vertical mode.

[0296] Then, the decoding device can generate a candidate intra prediction mode list for the current block based on the candidate intra prediction modes (S2130). The candidate intra prediction mode list can be the above-described MPM list. For example, as described above, the decoding device can generate a candidate intra prediction mode list based on the first candidate intra prediction mode and the second candidate intra prediction mode. At this time, when both the prediction mode of the first peripheral block and the prediction mode of the second peripheral block are the MIP mode, the decoding device can determine that the candidate intra prediction mode list includes a predetermined candidate intra prediction mode. Here, the predetermined candidate intra prediction mode can be at least one of the DC mode and the vertical mode.

[0297] Also, 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 larger than the prediction mode value indicating the DC mode, the decoding device can generate a candidate intra prediction mode list including the value of the first candidate intra prediction mode.

[0298] Also, when the prediction mode of the first peripheral block is the 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 larger than the prediction mode value indicating the DC mode, the decoding device can generate a candidate intra prediction mode list including the second candidate intra prediction mode.

[0299] Then, the decoding device can determine the intra prediction mode of the current block based on the candidate intra prediction mode list (S2140). The decoding device can determine, as the intra prediction mode of the current block, any one of the candidate intra prediction modes included in the candidate intra prediction mode list based on the intra prediction mode indicator acquired from the bitstream. For example, the intra prediction mode indicator can be the above-described mpm index, and can be signaled in the form of the mpm_idx or intra_luma_mpm_idx syntax element via the bitstream.

[0300] Also, the encoding device according to an embodiment can encode the intra prediction mode of the chroma block according to the mapping of the MIP mode described above. The encoding device according to an embodiment can use the DM mode to signal the intra prediction mode of the chroma block. At this time, the encoding device can 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 can be determined based on the prediction mode of the luma block corresponding to the chroma block, and can be identified by the parameter of lumaIntraPredMode or IntraPredModeY.

[0301] For example, the encoding device can determine the intra prediction mode of the luma block corresponding to the chroma block as the reference mode. Thereby, the encoding device can determine the intra prediction mode of the chroma block determined for the DM mode as the intra prediction mode of the luma block.

[0302] At this time, when the luma block is a luma block to which the MIP mode is applied, the encoding device can determine to replace the reference mode with the Planar mode instead of the MIP mode. Thereby, the encoding device can determine the intra prediction mode of the chroma block determined to be in the DM mode as the intra Planar mode.

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

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

[0305] In addition, corresponding to the above encoding method, a decoding device according to an embodiment can determine the intra prediction mode of the chroma block according to the mapping of the MIP mode described above. A decoding device according to an embodiment can determine a reference mode for determining the intra prediction mode of the chroma block based on the prediction mode of the luma block corresponding to the chroma block. Here, the reference mode can be identified by parameters of lumaIntraPredMode or IntraPredModeY.

[0306] At this time, when the luma block corresponding to the chroma block is a luma block to which the MIP mode is applied, the decoding device can determine the reference mode as the Planar mode. Thereby, the decoding device can determine the intra prediction mode of the chroma block determined to be in the DM mode as the intra Planar mode.

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

[0308] Alternatively, when the MIP mode is not applied to the luma block and the luma block is not predicted in the IBC mode or other predetermined mode, the decoding device can determine the reference mode as the intra prediction mode of the luma block. Thereby, the decoding device can determine the intra prediction mode of the chroma block determined to be in the DM mode as the intra prediction mode of the luma block.

[0309] And the decoding device can determine the 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 device can determine the intra prediction mode of the chroma block as the intra prediction mode corresponding to the reference mode.

[0310] As a result, when the current block is encoded or decoded in the general intra mode and the prediction mode of the surrounding blocks or luma blocks referred to is the MIP mode, the encoding device and the decoding device do not need to compare the block sizes of the current block or the surrounding blocks, so that the operation complexity can be reduced, and the effect of reducing the operation complexity can be exerted. Further, in that there is no need to use a mapping table for mapping, the effect of enhancing the memory space efficiency can be exerted.

[0311] FIG. 22 shows experimental data obtained by comparing the coding rate when generating the MPM list of the current block by mapping all MIP modes to the intra Planar mode according to the mapping method of FIG. 19 described above, with the method using the mapping table described in FIG. 17, when converting the MIP mode of the surrounding blocks to the intra prediction mode. 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 Mode to MIP Intra Prediction Mode

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

[0314] An encoding device and a decoding device according to an embodiment can determine all general intra prediction modes to a predetermined MIP mode without using the block size and the mapping table when mapping the general intra prediction mode to the MIP mode.

[0315] For example, when the encoding device and the decoding device according to an embodiment convert the general intra prediction mode to the MIP mode, all the general intra prediction modes can be mapped to the 0th MIP mode.

[0316] Alternatively, when the encoding device and the decoding device according to an embodiment convert the general intra prediction mode to the MIP mode, all the general intra prediction modes can be mapped to the 1st MIP mode.

[0317] Alternatively, when the encoding device and the decoding device according to an embodiment convert the general intra prediction mode to the MIP mode, all the general intra prediction modes can be mapped to the 3rd MIP mode.

[0318] Alternatively, when the encoding device and the decoding device according to an embodiment convert the general intra prediction mode to the MIP mode, all the general intra prediction modes can be mapped to the MIP mode that shows the highest selection rate probabilistically during the encoding or decoding process.

[0319] By mapping the MIP mode to the intra prediction mode in this way, when generating the MPM list in the case where 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 to a predetermined MIP mode, and can generate the MPM list based on the MIP mode. As a result, the MPM list generation step described with reference to FIG. 18 can be simplified as shown in FIG. 23. Referring to FIG. 23, steps S1830 to S1880 in the MPM list generation step described with reference to the conventional FIG. 18 are all simplified to a step of determining the MIP mode corresponding to the general intra prediction mode by mapping all general intra prediction modes to a predetermined MIP mode (S1891) and a step of generating the MPM list in the determined MIP mode (S1892). Here, the predetermined MIP mode can be any one of the 0th MIP mode, the 1st MIP mode, the 3rd MIP mode, and the MIP mode showing the highest selection rate probabilistically in the encoding or decoding process.

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

[0321] Alternatively, the encoding device and the decoding device according to an embodiment can also 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, an encoding device and a decoding device according to an embodiment can map all general intra prediction modes to MIP mode 17, or MIP mode 0 or 1 according to the size (MipSizeId) of the current block.

[0324] As described above, a current block size of 0 means a 4×4 luma block, a current block size of 1 means a 4×8, 8×4, or 8×8 luma block, and a current block size of 2 can mean a luma block larger than 8×8.

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

[0326]

Table 5

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

[0328]

Table 6

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

[0330] Method for Generating MPM List of 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 surrounding blocks to generate the MPM list of the current block. FIG. 25 is a flowchart for explaining a candidate MIP mode determination method for configuring the MPM list of the current block according to an embodiment.

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

[0333] Also, if the prediction mode of the peripheral block is not the MIP mode (S2510), as described with reference to FIG. 18 previously, the general intra prediction mode can be converted into a candidate MIP mode according to FIG. 18 (S2550).

[0334] As in the method of FIG. 25, in the process of referring to the peripheral block to determine the candidate MIP mode of the current block, the encoder and the decoder must always check the sizes of the current block and the peripheral block. When the prediction mode of the peripheral block is not the MIP mode, mapping must be performed as described with reference to FIG. 18, which increases the computational complexity.

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

[0336] On the other hand, the encoding device and the decoding device can determine the candidate MIP mode based on the sizes of the current block and the surrounding blocks to improve the prediction accuracy. For example, when the current block is in the MIP mode, when referring to the surrounding blocks to generate the MPM list, if the prediction mode of the surrounding blocks is the MIP mode, the encoding device and the decoding device can determine the candidate MIP mode as mipMpmCand[sizeId][0] with reference to Table 7 below. sizeId represents the size of the surrounding block, sizeId0 represents a 4×4 luma block, sizeId1 represents 4×8, 8×4, and 8×8 luma blocks, and sizeId2 can represent a luma block larger than 8×8.

[0337]

Table 7

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

[0339] For example, when generating the MPM list for the MIP mode, the encoding device and the decoding device can fixedly determine the MPM list (for example, candMipModeList[]) for the MIP mode without considering the encoding mode of the peripheral block as follows. For example, when generating three MIP MPM lists, x can have values from 0 to 2, and candMipModeList[x] can be configured as follows with reference to Table 7. Here, sizeId indicates the size of the peripheral block, but the encoding device and the decoding device can also determine sizeId according to the size of the current block in order to omit the process of referring to the information of the peripheral block.

[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 encoding rate when an image is encoded by fixedly determining the MPM list for the MIP mode without considering the encoding mode of neighboring blocks according to the mapping method described above, with the case where an MPM list is generated based on candidate MIP modes determined by the method of FIG. 25 and the image is encoded. As shown in FIG. 26, it can be seen that there is no significant difference in the encoding rate. That is, by applying the above method, it is possible to minimize the encoding loss, reduce the algorithm complexity, and reduce the memory usage for the mapping table.

[0344] In another embodiment, when generating the MPM list for the MIP mode, the encoding device and the decoding device can fixedly determine the MPM list (e.g., candMipModeList[]) for the MIP mode based on the mode selection probability without considering the encoding mode of neighboring blocks as follows. For example, when generating three MIP MPM lists, x can have values from 0 to 2, and candMipModeList[x] can be configured as follows with reference to Table 8. In sortedmipMpmCand[sizeId][x], candidate MIP modes can be stored according to the block size based on the MIP mode selection probability. For example, in sortedmipMpmCand[sizeId][0], the candidate MIP mode with the highest selection frequency for the given sizeId is stored, and in sortedmipMpmCand[sizeId][1], the candidate MIP mode with the second highest selection frequency for the given sizeId can be stored. At this time, sizeId indicates the size of the neighboring block, but the encoding device and the decoding device can also determine sizeId according to the size of the current block in order to omit the process of referring to the information of 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 Example

[0350] Exemplary methods of the present disclosure are presented as a series of operations for clarity of explanation, which is not intended to limit the order in which the steps are performed. If necessary, each step can also be performed simultaneously or in a different order. To implement the method according to the present disclosure, it can further include other steps in addition to the exemplary steps, or include the remaining steps except for some steps, or include additional other steps except for some steps.

[0351] In the present disclosure, an image encoding device or an image decoding device that performs a predetermined operation (step) can perform an operation (step) of checking the execution conditions and situations of the operation (step). For example, when 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 operation of checking whether the predetermined condition is satisfied and then perform the predetermined operation.

[0352] The various embodiments of the present disclosure do not list all possible combinations, but are for explaining representative aspects of the present disclosure. The matters described in the various embodiments may be applied independently or in combinations of two or more.

[0353] In addition, various embodiments of the present disclosure can be implemented by hardware, firmware, software, or a combination thereof. In the case of implementation by hardware, it can be implemented by 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 can be included in a multimedia broadcast transceiver device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conferencing device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, an on-demand 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 phone video device, and a medical video device, etc., and can be used to process video signals or data signals. For example, as the over-the-top video (OTT) device, it can include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a Digital Video Recoder (DVR), etc.

[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 can generally 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, a camera, or a camcorder into digital data to generate a bitstream, and transmits the bitstream to the streaming server. As another example, when a multimedia input device such as a smartphone, a camera, or a camcorder directly generates a bitstream, the encoding server can be omitted.

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

[0359] The streaming server transmits multimedia data to a user device based on a user's request via the Web server, and the Web server can serve as a medium for informing the user of what services are available. When the user requests a desired service from the Web server, the Web server transmits the request to the streaming server, and the streaming server can transmit multimedia data to the user. At this time, the content streaming system can include a separate control server. In this case, the control server can control commands / responses between each device in the content streaming system.

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

[0361] Examples of the user device may include a mobile phone, a smart phone, a laptop computer, a digital broadcast terminal, a PDA (personal digital assistants), a PMP (portable multimedia player), a navigation device, a slate PC, a tablet PC, an ultrabook, a wearable device (e.g., a smartwatch, smart glass, HMD (head mounted display)), a digital TV, a desktop computer, a digital signage, and the like.

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

[0363] The scope of the present disclosure includes software or machine-executable commands (e.g., an operating system, an application, firmware, a program, etc.) that enable the operations of various embodiments to be executed on a device or a computer, and a non-transitory computer-readable medium on which such software or commands are stored and can be executed on the device or the computer.

Industrial Applicability

[0364] Examples according to the present disclosure are available for encoding / decoding images.

Claims

1. An image decoding method performed by an image decoding device, the image decoding method 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 the intra-prediction mode of the current block based on the candidate intra-prediction mode list; generating a predicted sample for the current block based on the intra-prediction mode of the current block; reconstructing the current block based on the predicted samples; determining that the candidate intra prediction mode is a predetermined intra prediction mode based on the prediction mode of the neighboring block being an MIP mode; determining that the candidate intra-prediction mode list has a predetermined candidate intra-prediction mode based on the prediction mode of the first surrounding block and the prediction mode of the second surrounding block being both MIP modes; An image decoding method, wherein, on the basis that the intra prediction mode of the current block is an MIP mode, the intra prediction mode of the current block is determined based on information indicating an MIP intra prediction 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. The image decoding method of claim 1, wherein a first candidate intra prediction mode determined based on the prediction mode of the first surrounding block and a second candidate intra prediction mode determined based on the prediction mode of the second surrounding block are identical, 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, and the candidate intra prediction mode list is determined to include the value of the first candidate intra prediction 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 or 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 to be 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 the 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 the intra prediction mode of the chroma block is determined to be the reference mode.

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

10. An image coding method performed by an image coding device, the image coding method 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; encoding an intra-prediction mode indicator indicating an intra-prediction mode of the current block based on the candidate intra-prediction mode list; generating a predicted sample for the current block based on the intra-prediction mode of the current block; reconstructing the current block based on the predicted samples; determining that the candidate intra prediction mode is a predetermined intra prediction mode based on the prediction mode of the neighboring block being a matrix-based intra prediction mode; determining that the candidate intra-prediction mode list has a predetermined candidate intra-prediction mode based on the prediction mode of the first surrounding block and the prediction mode of the second surrounding block being both MIP modes; An image encoding method, comprising: encoding information indicating an MIP intra prediction mode of the current block based on the intra prediction mode of the current block being an MIP mode.

11. 1. A method for transmitting a bitstream generated by an image coding method, the image coding method 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; encoding an intra-prediction mode indicator indicating an intra-prediction mode of the current block based on the candidate intra-prediction mode list; generating a predicted sample for the current block based on the intra-prediction mode of the current block; reconstructing the current block based on the predicted samples; determining that the candidate intra prediction mode is a predetermined intra prediction mode based on the prediction mode of the neighboring block being a matrix-based intra prediction mode; determining that the candidate intra-prediction mode list has a predetermined candidate intra-prediction mode based on the prediction mode of the first surrounding block and the prediction mode of the second surrounding block being both MIP modes; A method for transmitting a bitstream, wherein information indicating an MIP intra prediction mode of the current block is encoded based on the intra prediction mode of the current block being an MIP 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

Cited By

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

    JP2025120422A