Image encoding / decoding method and apparatus simplifying mip mode mapping, and method of transmitting bitstream

By using a neighbor-block-based matrix prediction mode mapping method, the problem of increased information content in high-resolution and high-quality image encoding/decoding is solved, improving encoding/decoding efficiency and prediction efficiency, and achieving efficient bitstream transmission and storage.

CN114128265BActive Publication Date: 2025-10-28LG ELECTRONICS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202080050950.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-06-13
Filing Date
2020-06-15
Publication Date
2025-10-28
Estimated Expiration
2040-06-15

AI Technical Summary

Technical Problem

Existing technologies, in the process of encoding/decoding high-resolution and high-quality images, result in high transmission and storage costs due to the increased amount of information, as well as high prediction complexity.

Method used

A matrix prediction mode mapping method based on neighboring blocks is adopted. By determining the most probable mode (MPM) candidate of the current block, an MPM list is generated, and the prediction mode is identified based on the intra-frame prediction mode indicator, thereby reducing the prediction complexity.

Benefits of technology

It improves image encoding/decoding efficiency, reduces prediction complexity, and enables efficient bitstream transmission and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114128265B_ABST
    Figure CN114128265B_ABST
Patent Text Reader

Abstract

An image encoding / decoding method and apparatus are provided. An image decoding method performed by an image decoding apparatus includes: determining MPM (Most Probable Mode) candidates for the current block based on prediction modes of neighboring blocks surrounding the current block; generating an MPM list for the current block based on the MPM candidates; and determining an MPM candidate identified by an intra-prediction mode indicator from among a plurality of MPM candidates included in the MPM list as the prediction mode for the current block. The prediction mode based on either the current block or neighboring blocks is a matrix-based intra-prediction mode, which can determine the MPM candidate determined based on the prediction mode of neighboring blocks as a predetermined intra-prediction mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to an image encoding / decoding method and apparatus, and more specifically, to an image encoding / decoding method and apparatus using intra-frame prediction mode, and a method for transmitting a bitstream generated by the image encoding method / apparatus of this disclosure. Background Technology

[0002] Recently, there has been an increasing demand for high-resolution and high-quality images, such as high-definition (HD) and ultra-high-definition (UHD) images, across various fields. With the increase in image data resolution and quality, the amount of information or bits transmitted increases relatively compared to existing image data. This increase in the amount of information or bits transmitted leads to increased transmission and storage costs.

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

[0004] Technical issues

[0005] One object of this disclosure is to provide an image encoding / decoding method and apparatus with improved encoding / decoding efficiency.

[0006] Another objective of this disclosure is to provide an image encoding / decoding method and apparatus that can reduce prediction complexity by mapping matrix-based prediction patterns of neighboring blocks to a predetermined prediction pattern.

[0007] Another object of this disclosure is to provide a method for transmitting a bitstream generated by an image encoding method or apparatus according to this disclosure.

[0008] Another object of this disclosure is to provide a recording medium for storing bitstreams generated by an image encoding method or apparatus according to this disclosure.

[0009] Another object of this disclosure is to provide a recording medium for storing a bitstream received, decoded and used to reconstruct an image by an image decoding apparatus according to this disclosure.

[0010] The technical problems solved by this disclosure are not limited to those described above, and other technical problems not described herein will become apparent to those skilled in the art based on the following description.

[0011] Technical solution

[0012] An image decoding method performed by an image decoding apparatus according to one aspect of the present disclosure may include: determining MPM (most probable mode) candidates for the current block based on the prediction modes of neighboring blocks located around the current block; generating an MPM list for the current block based on the MPM candidates; and determining the MPM candidate identified by an intra-prediction mode indicator among a plurality of MPM candidates included in the MPM list as the prediction mode for the current block.

[0013] The prediction mode based on either the current block or a neighboring block is a matrix-based intra-prediction mode, which can determine the MPM candidate determined based on the prediction mode of the neighboring block as the predetermined intra-prediction mode.

[0014] Based on the prediction mode of the current block being a matrix-based intra-prediction mode and the prediction mode of neighboring blocks being a non-matrix-based intra-prediction mode, the MPM candidate determined by the prediction mode of neighboring blocks can be determined as a predetermined matrix-based intra-prediction mode.

[0015] A predetermined matrix-based intra-prediction mode can be identified by specifying a predetermined index for the matrix-based intra-prediction mode.

[0016] The predefined index can specify the matrix-based intra-prediction mode that is used most frequently among multiple matrix-based intra-prediction modes.

[0017] A predetermined matrix-based intra-frame prediction mode can be determined based on the size of the current block.

[0018] Based on the prediction mode of the current block being a non-matrix intra-prediction mode and the prediction mode of neighboring blocks being a matrix intra-prediction mode, the MPM candidate determined based on the prediction mode of neighboring blocks can be identified as a predetermined intra-prediction mode. The predetermined intra-prediction mode can be a planar mode.

[0019] An MPM list can be generated based on multiple MPM candidates, multiple MPM candidates can be determined based on multiple neighboring blocks, and all prediction patterns based on multiple neighboring blocks are matrix-based prediction patterns. The MPM list can be generated to include predetermined MPM candidates.

[0020] The pre-selected MPM candidate may include at least one of DC mode or vertical mode.

[0021] The image decoding method may include: determining a luma intra-prediction mode for determining the intra-prediction mode of the chroma block corresponding to the current block; determining the intra-prediction mode of the chroma block based on the luma intra-prediction mode; and determining the luma intra-prediction mode as a planar mode based on the fact that the current block is a matrix-based intra-prediction mode applied to the luma block. The intra-prediction mode of the chroma block can be determined as the luma intra-prediction mode.

[0022] Based on the fact that the current block is a luma block for which a non-matrix intra-prediction mode is applied, the luma intra-prediction mode can be determined based on the intra-prediction mode of the current block.

[0023] Additionally, an image decoding apparatus according to one aspect of this disclosure may include a memory and at least one processor. The at least one processor may: determine MPM (most probable mode) candidates for the current block based on prediction modes of neighboring blocks surrounding the current block; generate an MPM list for the current block based on the MPM candidates; and determine the MPM candidate identified by an intra-prediction mode indicator among a plurality of MPM candidates included in the MPM list as the prediction mode for the current block. The prediction mode based on either the current block or neighboring blocks is a matrix-based intra-prediction mode, which can determine the MPM candidate determined based on the prediction mode of neighboring blocks as a predetermined intra-prediction mode.

[0024] Additionally, an image encoding method performed by an image encoding apparatus according to one aspect of this disclosure may include: determining MPM (most probable mode) candidates for the current block based on prediction modes of neighboring blocks surrounding the current block; generating an MPM list for the current block based on the MPM candidates; and determining a prediction mode indicator for a specified prediction mode of the current block based on the MPM list.

[0025] The prediction mode based on either the current block or a neighboring block is a matrix-based intra-prediction mode, which can determine the MPM candidate determined based on the prediction mode of the neighboring block as the predetermined intra-prediction mode.

[0026] Based on the prediction mode of the current block being a matrix-based prediction mode and the prediction modes of neighboring blocks being non-matrix intra-frame prediction modes, the prediction mode candidate can be determined as a predetermined matrix-based prediction mode.

[0027] A predetermined matrix-based prediction pattern can be determined based on the size of the current block.

[0028] Based on the fact that the prediction mode of the current block is a non-matrix-based intra-prediction mode and the prediction modes of neighboring blocks are matrix-based prediction modes, the prediction mode candidate can be determined as a predetermined non-matrix-based intra-prediction mode.

[0029] A prediction mode list can be generated based on multiple prediction mode candidates. Multiple prediction mode candidates can be determined based on each neighboring block. The prediction mode based on each neighboring block is a matrix-based prediction mode. The prediction mode list can be generated to include predetermined prediction modes.

[0030] In addition, a transmission method according to another aspect of this disclosure can transmit a bit stream generated by the image encoding apparatus or image encoding method of this disclosure.

[0031] In addition, according to another aspect of this disclosure, a computer-readable recording medium can store a bitstream generated by the image encoding apparatus or image encoding method of this disclosure.

[0032] The features briefly summarized above with respect to this disclosure are merely exemplary aspects of the following detailed description of this disclosure and do not limit the scope of this disclosure.

[0033] Beneficial effects

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

[0035] In addition, according to this disclosure, an image encoding / decoding method and apparatus capable of reducing prediction complexity by mapping matrix-based prediction patterns of neighboring blocks to a predetermined prediction pattern can be provided.

[0036] Additionally, according to this disclosure, a method for transmitting a bit stream generated by an image encoding method or apparatus according to this disclosure can be provided.

[0037] Additionally, according to this disclosure, a recording medium for storing a bitstream generated by an image encoding method or apparatus according to this disclosure can be provided.

[0038] Additionally, according to this disclosure, a recording medium may be provided for storing a bitstream received, decoded, and used to reconstruct an image by an image decoding apparatus according to this disclosure.

[0039] Those skilled in the art will appreciate that the effects achievable through this disclosure are not limited to those specifically described above, and that other advantages of this disclosure will become clearer from the detailed description. Attached Figure Description

[0040] Figure 1 This is a view schematically illustrating a video compilation system to which embodiments of this disclosure are applicable.

[0041] Figure 2 This is a schematic view illustrating an image encoding apparatus to which embodiments of the present disclosure are applicable.

[0042] Figure 3 This is a schematic view illustrating an image decoding apparatus to which embodiments of the present disclosure are applicable.

[0043] Figure 4 This is a view illustrating the slice and tile structure according to an embodiment.

[0044] Figures 5 to 6 This is a view illustrating a directional intra-frame prediction mode according to an embodiment.

[0045] Figure 7 and Figure 8 This is a reference view illustrating the MIP pattern according to an embodiment.

[0046] Figure 9 It is a mapping table according to an embodiment for mapping MIP modes to normal intra-frame prediction modes.

[0047] Figures 10 to 12 This is a view illustrating the syntax of a compilation unit according to an embodiment.

[0048] Figure 13 This is a view illustrating a mapping table used to map normal intra-prediction modes to MIP modes according to an embodiment.

[0049] Figure 14 This is a view illustrating a list of MPMs configured in a predetermined MIP intra-frame prediction mode according to an embodiment.

[0050] Figure 15 This is a flowchart illustrating a method for encoding intra-frame prediction modes using an MPM list according to an embodiment.

[0051] Figure 16 This is a flowchart illustrating a method by which a decoding device performs decoding using an MPM list according to an embodiment.

[0052] Figure 17 This is a flowchart illustrating a method for generating an MPM list using a mapping method according to an embodiment.

[0053] Figure 18 This is a flowchart illustrating a method for generating an MPM list using a mapping method according to another embodiment.

[0054] Figure 19 This is a flowchart illustrating a method for generating an MPM list using a simplified mapping method according to an embodiment.

[0055] Figure 20 This is a flowchart illustrating a method for generating an MPM list using a simplified mapping method according to an embodiment.

[0056] Figure 21 This is a flowchart illustrating a method for generating an MPM list using a simplified mapping method according to an embodiment.

[0057] Figure 22 It is used as a diagram. Figure 19 A view of compilation performance data for a simplified mapping method.

[0058] Figure 23This is a flowchart illustrating a method for generating an MPM list using a simplified mapping approach according to another embodiment.

[0059] Figure 24 This is a flowchart illustrating another embodiment of generating an MPM list using a simplified mapping method according to an embodiment.

[0060] Figure 25 This is a flowchart illustrating another embodiment of generating an MPM list using a simplified mapping method by a decoding device according to an embodiment.

[0061] Figure 26 It is used as a diagram. Figure 23 A view of compilation performance data for a simplified mapping method.

[0062] Figure 27 This is a flowchart illustrating a method for generating an MPM list using a mapping method according to another embodiment.

[0063] Figure 28 This is a flowchart illustrating the compilation of performance data using a simplified mapping method according to another embodiment.

[0064] Figure 29 This is a view illustrating a content streaming system to which embodiments of this disclosure are applicable. Detailed Implementation

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

[0066] In describing this disclosure, detailed descriptions of relevant known functions or constructions will be omitted if they unnecessarily obscure the scope of this disclosure. In the accompanying drawings, portions irrelevant to the description of this disclosure are omitted, and similar reference numerals are assigned to similar portions.

[0067] In this disclosure, when a component is "connected," "coupled," or "linked" to another component, it may include not only direct connections but also indirect connections where intermediate components exist. Furthermore, when a component "comprises" or "has" other components, unless otherwise stated, it means that other components may be included, not excluded.

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

[0069] In this disclosure, the components are distinguished from each other to clearly describe each feature, but this does not mean that the components must be separate. That is, multiple components may be integrated into a single hardware or software unit, or a single component may be distributed and implemented across multiple hardware or software units. Therefore, unless otherwise specified, embodiments of integrated or distributed components are included within the scope of this disclosure.

[0070] In this disclosure, the components described in the various embodiments are not necessarily essential components, and some components may be optional. Therefore, embodiments comprising a subset of the components described in the embodiments are also included within the scope of this disclosure. Furthermore, embodiments that include other components besides those described in the various embodiments are also included within the scope of this disclosure.

[0071] This disclosure relates to the encoding and decoding of images. Unless redefined in this disclosure, the terms used herein may have the general meaning commonly used in the art to which this disclosure pertains.

[0072] In this disclosure, "image" generally refers to a unit representing an image within a specific time period, while a slice / tile is a coding unit that constitutes part of an image. An image can be composed of one or more slices / tiles. Furthermore, a slice / tile may include one or more compilation tree units (CTUs).

[0073] In this disclosure, "pixel" or "pixel" can refer to the smallest single element that constitutes a picture (or image). Additionally, "sample" can be used as a term corresponding to a pixel. A sample can generally represent a pixel or a pixel value, or it can represent only the pixel / pixel value of the luminance component or only the pixel / pixel value of the chrominance component.

[0074] In this disclosure, "unit" can refer to a basic unit of image processing. A unit may include at least one of a specific region of an image and information associated with that region. In some cases, the term "unit" may be used interchangeably with terms such as "sample array," "block," or "region." Generally, an M×N block may include a set (or array) of samples (or transform coefficients) with M columns and N rows.

[0075] In this disclosure, "current block" can mean one of "current compilation block," "current compilation unit," "compilation target block," "decoding target block," or "processing target block." When performing prediction, "current block" can mean "current prediction block" or "prediction target block." When performing transform (inverse transform) / quantization (dequantization), "current block" can mean "current transform block" or "transform target block." When performing filtering, "current block" can mean "filter target block."

[0076] Furthermore, in this disclosure, unless explicitly stated as a chroma block, "current block" may mean "the luminance block of the current block". "The chroma block of the current block" can be expressed by including an explicit description of a chroma block such as "chroma block" or "current chroma block".

[0077] In this disclosure, the forward slash " / " or "," can be interpreted as indicating "and / or". For example, "A / B" and "A, B" can mean "A and / or B". Furthermore, "A / B / C" and "A / B / C" can mean "at least one of A, B and / or C".

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

[0079] Video compilation system overview

[0080] Figure 1 This is a schematic view of a video compilation system according to this disclosure.

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

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

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

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

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

[0086] The decoding unit 22 can decode video / images by performing a series of processes corresponding to the operations of the compilation unit 12, such as dequantization, inverse transform, and prediction.

[0087] Renderer 23 can render decoded video / images. The rendered video / images can be displayed on a monitor.

[0088] Overview of Image Encoding Devices

[0089] Figure 2 This is a view schematically illustrating an image encoding apparatus to which embodiments of the present disclosure may be applied.

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

[0091] In some embodiments, all or at least some of the components of the image encoding apparatus 100 may be configured by a single hardware component (e.g., an encoder or a processor). Furthermore, the memory 170 may include a decoded image buffer (DPB) and may be configured by a digital storage medium.

[0092] Image partitioner 110 can partition an input image (or picture or frame) input to image encoding device 100 into one or more processing units. For example, a processing unit can be called a compilation unit (CU). A compilation unit can be obtained by recursively partitioning a compilation tree unit (CTU) or a maximum compilation unit (LCU) according to a quadtree-binary-tritree (QT / BT / TT) structure. For example, a compilation unit can be partitioned into multiple compilation units of greater depth based on a quadtree structure, a binary tree structure, and / or a ternary tree structure. For partitioning a compilation unit, a quadtree structure can be applied first, followed by a binary tree structure and / or a ternary tree structure. The compilation process according to this disclosure can be performed based on the final compilation unit that is no longer partitioned. The maximum compilation unit can be used as the final compilation unit, or a deeper compilation unit obtained by partitioning the maximum compilation unit can be used as the final compilation unit. Here, the compilation process can include prediction, transformation, and reconstruction processes, which will be described later. As another example, the processing unit of the compilation process can be a prediction unit (PU) or a transformation unit (TU). Prediction and transform units can be split or partitioned from the final compilation unit. The prediction unit can be a sample prediction unit, and the transform unit can be a unit for deriving transform coefficients and / or a unit for deriving residual signals from transform coefficients.

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

[0094] Intra-prediction unit 185 can predict the current block by referencing samples in the current image. Depending on the intra-prediction mode and / or intra-prediction technique, the reference samples may be located among the neighbors of the current block or may be placed separately. Intra-prediction modes may include multiple non-directional modes and multiple directional modes. Non-directional modes may include, for example, DC modes and planar modes. Depending on the level of detail in the prediction direction, directional modes may include, for example, 33 or 65 directional prediction modes. However, this is merely an example, and more or fewer directional prediction modes may be used depending on the settings. Intra-prediction unit 185 can determine the prediction mode to be applied to the current block by using prediction modes applied to neighboring blocks.

[0095] Inter-frame prediction unit 180 can derive the prediction block of the current block based on a reference block (reference sample array) specified by motion vectors on a reference image. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between neighboring blocks and the current block. Motion information may include motion vectors and reference image indices. Motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, neighboring blocks may include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. The reference image including the reference block and the reference image including the temporally neighboring block may be the same or different. The temporally neighboring block may be referred to as a juxtaposed reference block, a juxtaposed CU (colCU), etc. The reference image including the temporally neighboring block may be referred to as a juxtaposed image (colPic). For example, inter-frame prediction unit 180 can configure a motion information candidate list based on neighboring blocks and generate information specifying which candidate to use to derive the motion vector and / or reference image index of the current block. Inter-frame prediction can be performed based on various prediction modes. For example, in skip mode and merge mode, the inter-frame prediction unit 180 can use motion information from neighboring blocks as motion information for the current block. In skip mode, unlike merge mode, residual signals may not be transmitted. In motion vector prediction (MVP) mode, motion vectors from neighboring blocks can be used as motion vector predictors, and the motion vector of the current block can be signaled by encoding motion vector differences and indicators of the motion vector predictors. The motion vector difference can refer to the difference between the motion vector of the current block and the motion vector predictor.

[0096] The prediction unit can generate a prediction signal based on various prediction methods and techniques described below. For example, the prediction unit can apply not only intra-frame prediction or inter-frame prediction, but also both intra-frame prediction and inter-frame prediction simultaneously to predict the current block. A prediction method that simultaneously applies both intra-frame prediction and inter-frame prediction to predict the current block can be called Combined Inter-Frame and Intra-Frame Prediction (CIIP). Furthermore, the prediction unit can perform Intra-Frame Block Copy (IBC) to predict the current block. Intra-Frame Block Copy can be used for content image / video compilation, such as in games, for example, Screen Content Compilation (SCC). IBC is a method of predicting the current image using a previously reconstructed reference block in the current image at a predetermined distance from the current block. When IBC is applied, the position of the reference block in the current image can be encoded as a vector (block vector) corresponding to the predetermined distance. IBC essentially performs prediction in the current image, but can be performed similarly to inter-frame prediction because the reference block is derived within the current image. That is, IBC can use at least one of the inter-frame prediction techniques described in this disclosure. IBC essentially performs prediction in the current image, but can be performed similarly to inter-frame prediction because the reference block is derived within the current image. That is, IBC can use at least one of the inter-frame prediction techniques described in this disclosure.

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

[0098] Transformer 120 can generate transform coefficients by applying transform techniques to the residual signal. For example, the transform techniques may include at least one of Discrete Cosine Transform (DCT), Discrete Sine Transform (DST), Karhunen-Loève Transform (KLT), Graph-Based Transform (GBT), or Conditional Nonlinear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is represented graphically. CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. Furthermore, the transform processing can be applied to square pixel blocks of the same size or to blocks of variable size instead of square.

[0099] Quantizer 130 quantizes the transform coefficients and transmits them to entropy encoder 190. Entropy encoder 190 encodes the quantized signal (information about the quantized transform coefficients) and outputs a bitstream. The information about the quantized transform coefficients can be referred to as residual information. Quantizer 130 can rearrange the block-form quantized transform coefficients into a one-dimensional vector form based on the coefficient scan order, and generate information about the quantized transform coefficients based on the one-dimensional vector form of the quantized transform coefficients.

[0100] The entropy encoder 190 can perform various encoding methods, such as exponential Columbus coding, context-adaptive variable-length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoder 190 can encode, together or separately, the information required for video / image reconstruction (e.g., values ​​of syntax elements, etc.), excluding quantization transform coefficients. The encoded information (e.g., encoded video / image information) can be transmitted or stored in bitstream form at the Network Abstraction Layer (NAL) level. The video / image information may also include information about various parameter sets, such as adaptive parameter sets (APS), picture parameter sets (PPS), sequence parameter sets (SPS), or video parameter sets (VPS). Furthermore, the video / image information may also include general constraint information. The signaled information, transmitted information, and / or syntax elements described in this disclosure can be encoded and included in the bitstream through the above encoding process.

[0101] The bitstream can be transmitted over a network or stored in a digital storage medium. The network may include broadcast networks and / or communication networks, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. A transmitter (not shown) for transmitting the signal output from the entropy encoder 190 and / or a storage unit (not shown) for storing the signal may be included as internal / external components of the image encoding apparatus 100. Alternatively, a transmitter may be provided as a component of the entropy encoder 190.

[0102] The quantized transform coefficients output from quantizer 130 can be used to generate residual signals. For example, the residual signals (residual blocks or residual samples) can be reconstructed by applying dequantization and inverse transform to the quantized transform coefficients using dequantizer 140 and inverse transformer 150.

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

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

[0105] The modified reconstructed image transferred to memory 170 can be used as a reference image in inter-frame prediction unit 180. When inter-frame prediction is applied by image coding device 100, prediction mismatch between image coding device 100 and image decoding device can be avoided and coding efficiency can be improved.

[0106] The DPB of memory 170 can store modified reconstructed images for use as reference images in inter-frame prediction unit 180. Memory 170 can store motion information of blocks from which motion information in the current image is derived (or encoded) and / or motion information of already reconstructed blocks in the image. The stored motion information can be transmitted to inter-frame prediction unit 180 and used as motion information for spatially or temporally neighboring blocks. Memory 170 can store reconstructed samples of reconstructed blocks in the current image and can transmit the reconstructed samples to intra-frame prediction unit 185.

[0107] Image Decoding Device Overview

[0108] Figure 3 This is a schematic view illustrating an image decoding apparatus to which embodiments of the present disclosure may be applied.

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

[0110] According to an embodiment, all or at least some of the components of the image decoding device 200 may be configured by hardware components (e.g., a decoder or a processor). Furthermore, the memory 250 may include a decoded image buffer (DPB) or may be configured by a digital storage medium.

[0111] The image decoding device 200, having received a bitstream including video / image information, can perform operations related to... Figure 2 The image is reconstructed by processing corresponding to the processing performed by the image encoding apparatus 100. For example, the image decoding apparatus 200 can perform decoding using a processing unit applied in the image encoding apparatus. Therefore, the decoding processing unit can be, for example, a compilation unit. The compilation unit can be obtained by partitioning a compilation tree unit or a maximum compilation unit. The reconstructed image signal decoded and output by the image decoding apparatus 200 can be reproduced by a reproduction apparatus (not shown).

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

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

[0114] The dequantizer 220 can dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 220 can rearrange the quantized transform coefficients in the form of two-dimensional blocks. In this case, the rearrangement can be performed based on the coefficient scan order performed in the image encoding device. The dequantizer 220 can obtain the transform coefficients by performing dequantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information).

[0115] The inverse transformer 230 can perform inverse transformation on the transformation coefficients to obtain the residual signal (residual block, residual sample array).

[0116] The prediction unit can perform prediction on the current block and generate a prediction block that includes prediction samples of the current block. The prediction unit can determine whether to apply intra-frame prediction or inter-frame prediction to the current block based on information about the prediction output from the entropy decoder 210, and can determine a specific intra-frame / inter-frame prediction mode (prediction technique).

[0117] Similar to that described in the prediction unit of the image coding apparatus 100, the prediction unit can generate a prediction signal based on various prediction methods (techniques) described later.

[0118] Intra-prediction unit 265 can predict the current block by referring to samples in the current image. The description of intra-prediction unit 185 also applies to intra-prediction unit 265.

[0119] Inter-frame prediction unit 260 can derive the prediction block of the current block based on a reference block (reference sample array) specified by motion vectors on a reference image. In this case, to reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted on a block, sub-block, or sample basis based on the correlation of motion information between neighboring blocks and the current block. Motion information may include motion vectors and reference image indices. Motion information may also include inter-frame prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter-frame prediction, neighboring blocks may include spatially neighboring blocks existing in the current image and temporally neighboring blocks existing in the reference image. For example, inter-frame prediction unit 260 can configure a motion information candidate list based on neighboring blocks and derive the motion vector and / or reference image index of the current block based on the received candidate selection information. Inter-frame prediction can be performed based on various prediction modes, and the information about the prediction may include information indicating the inter-frame prediction mode of the current block.

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

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

[0122] The (modified) reconstructed image stored in the DPB of memory 250 can be used as a reference image in inter-frame prediction unit 260. Memory 250 can store motion information of blocks from which motion information in the current image is derived (or decoded) and / or motion information of already reconstructed blocks in the image. The stored motion information can be transmitted to inter-frame prediction unit 260 to be used as motion information for spatially or temporally neighboring blocks. Memory 250 can store reconstructed samples of reconstructed blocks in the current image and transmit the reconstructed samples to intra-frame prediction unit 265.

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

[0124] Partition structure

[0125] Image encoding / decoding methods according to this disclosure can be performed based on the partitioning structure according to the embodiments. For example, processes such as prediction, residual processing (inverse transform, dequantization, etc.), syntax element compilation, and filtering can be performed based on the CTU, CU (and / or TU or PU) derived from the partitioning structure. The block partitioning process can be performed by the image partitioner 110 of the above-described encoding device, and the partitioning-related information can be encoded (processed) by the entropy encoder 190 and sent to the decoding device in the form of a bitstream. The entropy decoder 210 of the decoding device can derive the block partitioning structure of the current image based on the partitioning-related information obtained from the bitstream, and based on this, a series of processes (e.g., prediction, residual processing, block / image reconstruction, in-loop filtering, etc.) can be performed for image decoding. The CU size and TU size can be the same, or multiple TUs can exist in the CU region. At the same time, the CU size can generally represent the luminance component (sample) CB size. The TU size can generally represent the luminance component (sample) TB size. The chroma component (sample) CB or TB size can be derived based on the component ratio of the chroma format (color format, such as 4:4:4, 4:2:2, 4:2:0, etc.) of the image / picture. The TU size can be derived based on a specified maximum available TB size, maxTbSize. For example, when the CU size is larger than maxTbSize, multiple TUs (TBs) of maxTbSize can be derived from the CU, and transforms / inverse transforms can be performed on a TU (TB) basis. Additionally, for example, when applying intra-frame prediction, the intra-frame prediction mode / type can be derived on a CU (or CB) basis, and the neighbor reference sample derivation and prediction sample generation process can be performed on a TU (or TB) basis. In this case, one or more TUs (or TBs) can exist within a CU (or CB) region, and multiple TUs (or TBs) can share the same intra-frame prediction mode / type.

[0126] Furthermore, in the image encoding and decoding according to this disclosure, the image processing unit can have a hierarchical structure. For example, an image can be partitioned into one or more tiles or tile groups. A tile group can include one or more tiles. A tile can include one or more CTUs. As mentioned above, a CTU can be partitioned into one or more CUs. A tile can be composed of a rectangular region comprising CTUs combined in a specific row and column in the image. A tile group can include an integer number of tiles according to a tile raster scan. The tile group header can signal information / parameters applicable to the corresponding tile group. When the encoding / decoding device has a multi-core processor, the encoding / decoding process for a tile or tile group can be executed in parallel. Here, the tile group can have one of the tile group types including intra-frame (I) tile groups, prediction (P) tile groups, and dual prediction (B) tile groups. For blocks in an I tile group, inter-frame prediction can be omitted and prediction can be performed using intra-frame prediction only. Of course, even in this case, it is possible to compile without prediction and signal the original sample values. For blocks in the P-block group, either intra-frame prediction or inter-frame prediction can be used, and unidirectional prediction alone can be used when using inter-frame prediction. Similarly, for blocks in the B-block group, either intra-frame prediction or inter-frame prediction can be used, and up to double prediction can be used when using inter-frame prediction.

[0127] Additionally, an image can be partitioned into one or more slices. A slice can consist of an integer number of tiles or a set of CTUs arranged consecutively in rows within a tile. Two tiling modes are supported: raster scan tiling and rectangular tiling. In raster scan tiling mode, a slice can consist of consecutive tiles existing in a raster scan order within an image, such as... Figure 4 As shown. In rectangular slice mode, a slice can be composed of tiles that exist in a rectangular shape within an image. The tiles in a rectangular slice can be scanned within the slice according to the tile raster scan order.

[0128] In the encoding apparatus, the size of the tile / tile group, slice, and the maximum and minimum compilation unit can be determined based on the characteristics of the image (e.g., resolution) and taking into account compilation efficiency or parallel processing, and information about it or information that can be derived from it can be included in the bitstream.

[0129] The decoder can obtain information about how slices, tiles / groups of tiles, or CTUs within a tile of the current image are partitioned into multiple compilation units. Efficiency can be improved when this information is obtained (sent) only under specific conditions.

[0130] A slice header or tile group header (tile group header syntax) may include information / parameters commonly applicable to slices or tile groups. APS (APS syntax) or PPS (PPS syntax) may include information / parameters commonly applicable to one or more images. SPS (SPS syntax) may include information / parameters commonly applicable to one or more sequences. VPS (VPS syntax) may include information / parameters commonly applicable to the entire video. In this disclosure, more advanced syntax may include at least one of APS syntax, PPS syntax, SPS syntax, or VPS syntax.

[0131] Additionally, for example, information about the partitioning and construction of pieces / piece groups can be built using a higher-level syntax during the encoding stage and sent as a bitstream to the decoding device.

[0132] Furthermore, in the image encoding / decoding according to this disclosure, the compile tree scheme can support luma and chroma component blocks to have separate block tree structures. The case where luma and chroma blocks in a CTU have the same block tree structure can be represented as SINGLE_TREE. The case where luma and chroma blocks in a CTU have separate block tree structures 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 slice / patch groups, the luma and chroma CTBs in a CTU can be restricted to having the same compile tree structure. However, for I slice / patch groups, luma and chroma blocks can have separate block tree structures. When applying a separate block tree mode, the luma CTB can be partitioned into CUs based on a specific compile tree structure, and the chroma CTB can be partitioned into chroma CUs based on another compile tree structure. For example, the CU in an I slice / tile group can consist of a compiled block of the luminance component or two compiled blocks of the chrominance components, and the CU in a P or B slice / tile group can consist of blocks of three color components. Hereinafter, in this disclosure, a slice can be referred to as a tile / tile group and a tile / tile group can be referred to as a slice.

[0133] Intra-frame prediction summary

[0134] The following describes an intra-frame prediction method according to an embodiment. Intra-frame prediction can instruct the generation of prediction samples for the current block based on reference samples in the image to which the current block belongs (hereinafter referred to as the current image). When intra-frame prediction is applied to the current block, neighboring reference samples to be used for intra-frame prediction of the current block can be derived. The neighboring reference samples of the current block may include samples adjacent to the left boundary of the current block with a size of nW x nH and a total of 2 x nH samples adjacent to the left bottom, samples adjacent to the top boundary of the current block and a total of 2 x nW samples adjacent to the right top and one sample adjacent to the left top of the current block. Alternatively, the neighboring reference samples of the current block may include multiple columns of top neighbor samples and multiple rows of left neighbor samples. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block with a size of nW x nH, a total of nW samples adjacent to the bottom boundary of the current block and one sample adjacent to the right bottom of the current block. Meanwhile, when the ISP, which will be described later, is applied, neighboring reference samples can be derived on a sub-partition basis.

[0135] On the other hand, some neighboring reference samples of the current block have not yet been decoded or may be unavailable. In this case, the decoding device can construct neighboring reference samples to be used for prediction by replacing unavailable samples with available samples. Alternatively, it can construct neighboring reference samples to be used for prediction by interpolation of available samples.

[0136] When neighboring reference samples are derived, (i) a predicted sample can be derived based on the average or interpolation of the neighboring reference samples of the current block, and (ii) a predicted sample can be derived based on a reference sample in the neighboring reference samples of the current block that exists in a specific (prediction) direction relative to the predicted sample. Case (i) can be referred to as non-directional mode or non-angular mode, and case (ii) can be referred to as directional mode or angular mode. Alternatively, a predicted sample can be generated by interpolation using a second neighboring sample and a first neighboring sample in the neighboring reference samples that are in the opposite direction to the prediction direction of the intra-prediction mode of the current block, based on the predicted sample of the current block. This can be referred to as Linear Interpolation Intra-Prediction (LIP). Additionally, a linear model can be used to generate chromaticity prediction samples based on luminance samples. This can be referred to as LM mode. Furthermore, a temporal predicted sample of the current block can be derived based on filtered neighboring reference samples, and the predicted sample of the current block can be derived by weighted summing the temporal predicted sample and at least one reference sample derived according to the intra-prediction mode from the existing neighboring reference samples, i.e., an unfiltered neighboring reference sample. This can be referred to as Position-Related Intra-Prediction (PDPC). Alternatively, the reference sample line with the highest prediction accuracy can be selected from multiple neighboring reference sample lines of the current block to derive the prediction sample using reference samples located in the prediction direction of the corresponding line. In this case, intra-frame prediction coding can be performed by indicating (using a signal) the reference sample line used to the decoding device. This can be called multi-reference line (MRL) intra-frame prediction or MRL-based intra-frame prediction. Furthermore, the current block can be divided into vertical or horizontal sub-partitions to perform intra-frame prediction based on the same intra-frame prediction mode, and neighboring reference samples can be derived and used on a sub-partition basis. That is, in this case, the intra-frame prediction mode of the current block is applied equally to the sub-partitions, and neighboring reference samples are derived and used on a sub-partition basis, thereby improving intra-frame prediction performance. Such a prediction method can be called intra-fractional (ISP) or ISP-based intra-frame prediction. Additionally, when the prediction direction based on the prediction sample indicates the space between neighboring reference samples—that is, when the prediction direction indicates the fractional sample position—the value of the prediction sample can be derived by interpolating multiple reference samples located around the prediction direction (around the fractional sample position). The above intra-prediction method can be referred to as an intra-prediction type to distinguish it from the intra-prediction mode. Furthermore, after generating a prediction signal for the subsampled pixel set of the current block using reconstructed neighboring pixels located to the left and top of the current block, the generated prediction signal and neighboring sample values ​​can be interpolated in the vertical and horizontal directions to generate a prediction signal with the original size. This allows matrix-weighted intra-prediction (MIP) to be applied to perform intra-prediction of the current block.

[0137] Intra-prediction types can be referred to by various terms such as intra-prediction schemes or additional intra-prediction modes. For example, an intra-prediction type (or additional intra-prediction mode) may include at least one of LIP, PDPC, MRL, ISP, or MIP. Information about the intra-prediction type can be encoded by the encoding device, included in the bitstream, and signaled to the decoding device. Information about the intra-prediction type can be implemented in various forms, such as flag information indicating whether each intra-prediction type is applied or index information indicating one of several intra-prediction types.

[0138] Additionally, post-filtering can be performed relative to the derived predicted samples when necessary. Specifically, the intra-frame prediction process may include an intra-frame prediction mode / type determination step, a neighboring reference sample derivation step, and a predicted sample derivation step based on the intra-frame prediction mode / type. Furthermore, post-filtering can be performed relative to the derived predicted samples when necessary.

[0139] The following describes a video / image coding method based on intra-frame prediction. First, the coding apparatus performs intra-frame prediction relative to the current block. The coding apparatus can derive the intra-frame prediction mode / type for the current block, derive neighboring reference samples for the current block, and generate prediction samples for the current block based on the intra-frame prediction mode / type and the neighboring reference samples. Here, the intra-frame prediction mode / type determination, neighboring reference sample derivation, and prediction sample generation processes can be performed simultaneously, or any one of these processes can be performed before the other processes. Simultaneously, when performing the prediction sample filtering process described below, the intra-frame predictor 185 may also include a prediction sample filter. The coding apparatus can determine the mode / type applicable to the current block from among multiple intra-frame prediction modes / types. The coding apparatus can compare the rate distortion (RD) costs of the intra-frame prediction modes / types and determine the optimal intra-frame prediction mode / type for the current block.

[0140] Simultaneously, the encoding device can perform a prediction sample filtering process. This prediction sample filtering can be called post-filtering. Through the prediction sample filtering process, some or all prediction samples can be filtered. In some cases, the prediction sample filtering process can be omitted.

[0141] 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 in terms of phase and derive the residual samples.

[0142] Next, the encoding device can encode image information including information about intra-frame prediction (prediction information) and residual information about residual samples. The prediction information may include intra-frame prediction mode information and intra-frame prediction type information. The encoding device can output the encoded image information as a bitstream. The output bitstream can be sent to the decoding device via a storage medium or network.

[0143] Residual information may include residual compilation syntax, which will be described later. The encoding device can transform / quantize the residual samples and derive quantization transform coefficients. Residual information may include information about the quantization transform coefficients.

[0144] Simultaneously, as described above, the encoding device can generate a reconstructed image (including reconstructed samples and reconstructed blocks). To this end, the encoding device can perform inverse quantization / inverse transform relative to the quantization transform coefficients and derive (modified) residual samples. The reason for transforming / quantizing the residual samples and then performing inverse quantization / inverse transform is to derive the same residual samples as those derived by the decoding device as described above. The encoding device can generate a reconstructed block including reconstructed samples of the current block based on the predicted samples and the (modified) residual samples. Based on the reconstructed blocks, a reconstructed image of the current image can be generated. As described above, the in-loop filtering process is applied to the reconstructed image.

[0145] The following describes a video / image coding method based on intra-frame prediction. The decoding device can perform operations corresponding to those performed by the encoding device.

[0146] First, the decoding device can derive the intra-prediction mode / type of the current block based on the received prediction information (intra-prediction mode / type information). The decoding device can then derive neighboring reference samples for the current block. Based on the intra-prediction mode / type and neighboring reference samples, the decoding device can generate prediction samples in the current block. In this case, the decoding device can perform a prediction sample filtering process. This prediction sample filtering can be called post-filtering. Through the prediction sample filtering process, some or all prediction samples can be filtered. In some cases, the prediction sample filtering process can be omitted.

[0147] The decoding device can generate residual samples for the current block based on the received residual information. It can also generate reconstructed samples for the current block based on the predicted samples and residual samples, and derive a reconstructed block including these samples. Based on the reconstructed block, a reconstructed image of the current image can be generated. In-loop filtering is also applied to the reconstructed image.

[0148] Intra-luma_mpm_flag may include, for example, flag information indicating whether the most probable mode (MPM) or remaining modes are applied to the current block. When an MPM is applied to the current block, the prediction mode information may also include index information (e.g., intra_luma_mpm_idx) indicating one of the intra-luma_mpm_candidates. The intra-luma_mpm_candidates can be configured as an MPM candidate list or an MPM list. For example, the MPM candidate list may include intra-luma_mpm_candidates of neighboring blocks or a preset basic intra-luma_mpm_candidate. Additionally, when an MPM is not applied to the current block, the intra-luma_mpm_remainder may also include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra-luma_mpm_candidates that were excluded from the intra-luma_mpm_candidates. The decoding apparatus can determine the intra-luma_mpm_candidate for the current block based on the intra-luma_mpm_candidate information.

[0149] Simultaneously, when applying the aforementioned MIP mode, the MPM list for the MIP mode can be configured to determine the MIP mode for the current block. The MPM list for the MIP mode can be configured in the same way as the MPM list for intra-frame modes. For example, when applying the MIP mode, the MPM candidate list for the MIP mode can be configured to include the MIP modes of neighboring blocks or a predetermined default MIP mode. Furthermore, when the MPM is not applied to the current block, the intra-frame prediction mode information can also include residual mode information (e.g., intra_luma_mpm_remainder) specifying one of the remaining MIP modes besides the MIP mode candidates (MPM candidates). The decoding device can determine the MIP mode for the current block based on the intra-frame prediction mode information.

[0150] Intra-prediction mode

[0151] The intra-prediction mode will be described in more detail below. Figure 5 The intra-frame prediction direction is shown according to an embodiment. This is to capture any edge directions presented in natural video, such as... Figure 5 As shown, intra-prediction modes can include two non-directional intra-prediction modes and 65 directional intra-prediction modes. Non-directional intra-prediction modes can include planar intra-prediction modes and DC intra-prediction modes, while directional intra-prediction modes can include intra-prediction modes 2 through 66.

[0152] In addition to the intra-prediction modes mentioned above, intra-prediction modes can also include the Cross-Component Linear Model (CCLM) mode for chroma samples. The CCLM mode can be segmented into L_CCLM, T_CCLM, and LT_CCLM depending on whether left samples, top samples, or both are considered for LM parameter derivation, and can be applied only to the chroma components. For example, intra-prediction modes can be indexed according to the intra-prediction mode values ​​shown in the table below.

[0153] [Table 1]

[0154] Intra-prediction mode Related names 0 INTRA_PLANAR 1 INTRA_DC 2..66 INTRA_ANGULAR2..INTRA_ANGULAR66 81..83 INTRA_LT_CCLM, INTRA_L_CCLM, INTRA_T_CCLM

[0155] Figure 6 The intra-frame prediction direction according to another embodiment is shown. Here, the dashed direction indicates a wide-angle mode applied only to non-square blocks. Figure 6 As shown, in order to capture any edge orientation presented in natural video, the intra-prediction modes according to embodiments may include two non-directional intra-prediction modes and 93 directional intra-prediction modes. The non-directional intra-prediction modes may include planar intra-prediction modes and DC intra-prediction modes, while the directional intra-prediction modes may include intra-prediction modes 2 through 80 and intra-prediction modes -1 through -14, as shown by... Figure 6 The arrows indicate this. Planar prediction modes can be represented by INTRA_PLANAR, and DC prediction modes can be represented by INTRA_DC. Additionally, directional intra-frame prediction modes can be represented by INTRA_ANGULAR-14 to INTRA_ANGULAR-1 and INTRA_ANGULAR2 to INTRA_ANGULAR80.

[0156] Simultaneously, the intra-prediction type (or additional intra-prediction mode) may include at least one of LIP, PDPC, MRL, ISP, or MIP. The intra-prediction type can be indicated based on intra-prediction type information, and this information can be implemented in various forms. For example, the intra-prediction type information may include intra-prediction type index information indicating one of the intra-prediction types. As another example, the intra-prediction type information may include at least one of the following: reference sample line information indicating whether MRL is applied to the current block and, if so, which reference sample line is used (e.g., intra_luma_ref_idx); ISP flag information indicating whether ISP is applied to the current block (e.g., intra_subpartitions_mode_flag); ISP type information indicating the segmentation type of the subpartition when ISP is applied (e.g., intra_subpartitions_split_flag); flag information indicating whether PDPC is applied; flag information indicating whether LIP is applied; or MIP flag information indicating whether MIP is applied.

[0157] The compilation methods described in this disclosure can be used to encode / decode intra-prediction mode information and / or intra-prediction type information. For example, intra-prediction mode information and / or intra-prediction type information can be encoded / decoded based on truncated (Rice) binary code using entropy compilation (e.g., CABAC, CAVLC).

[0158] When performing intra-prediction relative to the current block, prediction can be performed for both the luma component block (luminance block) and the chroma component block (chroma block) of the current block. In this case, the intra-prediction mode of the chroma block can be set separately from the intra-prediction mode of the luma block.

[0159] For example, the intra-prediction mode for the chroma block can be specified based on intra-chroma prediction mode information, and this information can be signaled using the `intra_chroma_pred_mode` syntax element. For instance, the intra-chroma prediction mode information can indicate one of the following: planar mode, DC mode, vertical mode, horizontal mode, derived mode (DM), and CCLM. Here, planar mode can indicate intra-prediction mode #0, DC mode can indicate intra-prediction mode #1, vertical mode can indicate intra-prediction mode #26, and horizontal mode can indicate intra-prediction mode #10. DM can also be referred to as direct mode. CCLM can be referred to as LM.

[0160] Meanwhile, DM and CCLM are subordinate intra-prediction modes used to predict chroma blocks using information about the luma block. DM can indicate that the same intra-prediction mode used for the luma component is applied to the intra-prediction mode used for the chroma component. Additionally, CCLM can indicate an intra-prediction mode that uses samples derived by subsampling the reconstructed samples of the luma block during the generation of the prediction block for the chroma block, and then applying CCLM parameters α and β to the subsampled samples as prediction samples for the chroma block.

[0161] Summary of Matrix-Based Intra-Frame Prediction

[0162] Matrix-based intra-prediction (MIP) mode can also be referred to as affine linear weighted intra-prediction (ALWIP) mode, linear weighted intra-prediction (LWIP) mode, or matrix weighted intra-prediction (MWIP) mode. Intra-prediction modes other than matrix-based prediction can be defined as non-matrix-based prediction modes. For example, non-matrix-based prediction modes can be called non-directional intra-prediction and directional intra-prediction. Hereinafter, the term "non-matrix-based prediction mode" can be used interchangeably with "intra-prediction mode" and "normal intra-prediction." Matrix-based prediction can be referred to as MIP mode.

[0163] When the MIP mode is applied to the current block, i) neighboring reference samples that have undergone an averaging step can be used, ii) matrix-vector multiplication steps can be performed, and iii) if necessary, horizontal / vertical interpolation can be further performed to derive the predicted samples for the current block.

[0164] The averaging step can be performed by averaging the values ​​of neighboring samples. When... Figure 7 As shown in (a), when the width of the current block is 4 pixels, the averaging process can be performed by averaging each boundary and generating a total of four samples, including two top samples and two left samples. However, when... Figure 7 As shown in (b), when the width of the current block and the width in pixels are not 4, the averaging step can be performed by taking the average of each boundary and generating a total of eight samples including four top samples and four left samples.

[0165] A matrix-vector multiplication step can be performed by multiplying the average sample by a matrix vector and then adding an offset vector, thereby generating a prediction signal for a subsampled pixel set of the original block. The size of the matrix and the offset vector can be determined based on the width and height of the current block.

[0166] The horizontal / vertical interpolation step is the step of generating a prediction signal of the original block size from the subsampled prediction signal. For example... Figure 8As shown, the original block-sized prediction signal can be generated by performing vertical and horizontal interpolation using the subsampled prediction signal and neighboring pixel values. Figure 8 An example of performing MIP prediction relative to an 8x8 block is shown. In the case of an 8x8 block, as... Figure 7 As shown in (b), a total of eight average samples can be generated. This is achieved by multiplying the eight average samples by the matrix vector and adding the offset vector, as follows: Figure 8 As shown in (a), 16 sample values ​​can be generated at even-numbered coordinate positions. Subsequently, as... Figure 8 As shown in (b), vertical interpolation can be performed using the average of the top samples of the current block. Subsequently, as... Figure 8 As shown in (c), horizontal interpolation can be performed using the left sample of the current block.

[0167] The intra prediction mode for MIP mode can be configured differently from the intra prediction modes used for LIP, PDPC, MRL, and ISP intra prediction or normal intra prediction. The intra prediction mode for MIP mode can be referred to as MIP intra prediction mode, MIP prediction mode, or MIP mode. For example, the matrix and offset used for matrix-vector multiplication can be set differently depending on the intra prediction mode used for MIP. 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 (MIP) bias vector.

[0168] The intra-prediction type information mentioned above may include a MIP flag (e.g., intra_mip_flag) specifying whether the MIP mode is applied to the current block. When the MIP mode is applied to the current block (e.g., the value of intra_mip_flag is 1), the MPM list for the MIP mode can be configured separately. Additionally, the intra-prediction type information may include a MIP MPM flag (e.g., intra_mip_mpm_flag) specifying whether the MPM list is used for the MIP mode, an MPM index (e.g., intra_mip_mpm_idx) specifying the MIP mode for the current block in the MPM list, and residual intra-prediction mode information (e.g., intra_mip_mpm_remainder) for directly specifying the MIP mode when the MIP mode for the current block is not used in the MPM list.

[0169] When executing MIP mode, various MIP modes can be set according to the matrix and offset configured for MIP. The number of intra-prediction modes used for MIP can be set differently 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 4, 35 intra-prediction modes (i.e., intra-prediction modes 0 to 34) may be available; ii) when the height and width of the current block are both less than or equal to 8, 19 intra-prediction modes (i.e., intra-prediction modes 0 to 18) may be available; iii) in other cases, 11 intra-prediction modes (i.e., intra-prediction modes 0 to 10) may be available.

[0170] For example, when the current block's height and width are 4, it's referred to as block size type 0. Conversely, the case where the current block's height and width are both less than or equal to 8 can be referred to as block size type 1, and all other cases as block size type 2. The number of intra-prediction modes used for MIP can be summarized as shown in the table below. However, this is just an example, and the block size type and the number of available intra-prediction modes can be changed.

[0171] [Table 2]

[0172]

[0173] In an embodiment, information about the intra-prediction mode / type of the current block can be compiled and signaled at a level such as the CU (CU syntax) or implicitly determined conditionally. In this case, this can be explicitly signaled for some modes / types and implicitly derived for the remaining modes. For example, the CU syntax can carry information about the (intra-)prediction mode / type, such as... Figures 10 to 12 As shown.

[0174] Here, `pred_mode_flag` can specify the prediction mode of the current CU. For example, a value of 0 for `pred_mode_flag` can specify that the current CU is encoded in inter-frame prediction mode. A value of 1 for `pred_mode_flag` can specify that the current CU is encoded in intra-frame prediction mode.

[0175] `pcm_flag[x0][y0]` specifies whether the Pulse Compilation Modulation (PCM) mode is applied to the current block. When the PCM mode is applied to the current block, the values ​​of the raw samples in the current block can be compiled and signaled without applying prediction / transformation / quantization. For example, for the luminance CU corresponding to the position (x0, y0), `pcm_flag[x0][y0]` can specify whether the `pcm_sample` syntax is present and whether the `transform_tree()` syntax is absent. For example, a value of 1 for `pcm_flag[x0][y0]` specifies that the `pcm_sample()` syntax is present but the `transform_tree()` syntax is absent. A value of 0 for `pcm_flag[x0][y0]` specifies that both the `pcm_sample()` syntax and the `transform_tree()` syntax are present.

[0176] The `intra_mip_flag[x0][y0]` parameter specifies whether the current block was predicted in MIP mode. For example, a first value (e.g., 0) of `intra_mip_flag[x0][y0]` specifies that the current block was not predicted in MIP mode. A second value (e.g., 1) of `intra_mip_flag[x0][y0]` specifies that the current block was predicted in MIP mode.

[0177] When intra_mip_flag[x0][y0] has a second value (e.g., 1), further information about the MIP mode can be obtained from the bitstream. For example, the intra_mip_mpm_flag[x0][y0], intra_mip_mpm_idx[x0][y0], and intra_mip_mpm_remainder[x0][y0] syntax elements that specify the MIP mode for the current block can be obtained from the bitstream. When the MIP prediction mode is applied to the current block, the MPM list for MIP can be configured, and intra_mip_mpm_flag can specify whether the MIP mode for the current block exists in the MPM list of MIP (or MPM candidates). intra_mip_mpm_idx can specify the index used as a candidate for the MIP prediction mode for the current block among the candidates in the MPM list when the MIP prediction mode for the current block exists in the MPM list for MIP (i.e., the value of intra_mip_mpm_flag is 1). The `intra_mip_mpm_remainder` option can specify the MIP prediction mode for the current block when there is no MIP prediction mode for the current block in the MPM list used for MIP (i.e., the value of `intra_mip_mpm_flag` is 0). It can specify any one of all MIP prediction modes or any of the remaining modes among all MIP prediction modes other than the candidate modes in the MPM list used for MIP as the MIP prediction mode for the current block.

[0178] Meanwhile, when intra_mip_flag[x0][y0] has a first value (e.g., 0), information about MIPs can be obtained from the bitstream, but intra-prediction information other than MIPs can be obtained from the bitstream. In an embodiment, intra_luma_mpm_flag[x0][y0] can be obtained from the bitstream to specify whether to generate a list of MPMs for normal intra-prediction.

[0179] When an intra-prediction mode is applied to the current block, the MPM list used for it can be configured. `intra_luma_mpm_flag` specifies whether an intra-prediction mode for the current block exists in the MPM list (or MPM candidates). For example, a first value of `intra_luma_mpm_flag` (e.g., 0) specifies that an intra-prediction mode for the current block does not exist in the MPM list. A second value of `intra_luma_mpm_flag` (e.g., 1) specifies that an intra-prediction mode for the current block exists in the MPM list. When the value of `intra_luma_mpm_flag` is 1, `intra_luma_not_planar_flag` can be obtained from the bitstream.

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

[0181] When `intra_luma_not_planar_flag` is 'true' (i.e., value 1), `intra_luma_mpm_idx` can be parsed and compiled. In the embodiment, planar modes can always be included as candidates in the MPM list. However, as described above, planar modes can be excluded from the MPM list by first signaling `intra_luma_not_planar_flag`, and in this case, a unified MPM list can be configured for the various intra-prediction types (normal intra-prediction, MRL, ISP, LIP, etc.). In this case, the number of candidates in the MPM list can be reduced to 5. `intra_luma_mpm_idx` can specify candidates to be used in the intra-prediction mode of the current block from among the candidates included in the MPM list from which planar modes have been excluded.

[0182] Additionally, when the value of intra_luma_mpm_flag is 0, intra_luma_mpm_remainder can be parsed / compiled. intra_luma_mpm_remainder can specify one of all intra prediction modes as the intra prediction mode for the current block, or it can specify any of the remaining modes in the MPM list other than the candidate modes as the intra prediction mode for the current block.

[0183] MPM List

[0184] When applying intra-prediction, the intra-prediction modes of neighboring blocks can be used to determine the intra-prediction mode applied to the current block. For example, the decoding device can select one of the MPM candidates from a list derived based on the intra-prediction modes and additional candidate modes of the current block's neighboring blocks (e.g., left and / or top neighboring blocks) using the MPM index received using the bitstream (e.g., intra_luma_mpm_idx). Alternatively, the decoding device can select one of the remaining intra-prediction modes not included in the MPM candidates based on residual mode information (e.g., intra_luma_mpm_remainder). For example, the intra-prediction mode of the current block can be determined based on an mpm flag (e.g., intra_luma_mpm_flag) indicating whether the intra-prediction mode applied to the current block is in an MPM candidate or a residual mode. A value of 1 for the mpm flag can indicate that the intra-prediction mode of the current block is in the MPM list (candidate), while a value of 0 for the mpm flag can indicate that the intra-prediction mode of the current block is not in the MPM list (candidate).

[0185] The MPM flag can be signaled using the `intra_luma_mpm_flag` syntax element, the MPM index can be signaled using the `mpm_idx` or `intra_luma_mpm_idx` syntax element, and the remaining intra-prediction mode information can be signaled using the `rem_intra_luma_pred_mode` or `intra_luma_mpm_remainder` syntax element. In an embodiment, the remaining intra-prediction mode information can specify one of the remaining intra-prediction modes not included in the MPM list of all intra-prediction modes and is indexed in order of prediction mode number. 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 following: an MPM flag (e.g., `intra_luma_mpm_flag`), an MPM index (e.g., `mpm_idx` or `intra_luma_mpm_idx`), or remaining intra-prediction mode information (e.g., `rem_intra_luma_pred_mode` or `intra_luma_mpm_remainder`). In this disclosure, the MPM list may be referred to by various terms such as MPM candidate list, candModeList, etc.

[0186] The MPM list can include candidate intra-prediction modes (MPM candidates) that are highly likely to be applied to the current block. The MPM list can be configured to include intra-prediction modes of neighboring blocks, and can be further configured to include predetermined intra-prediction modes according to a predetermined method.

[0187] In this embodiment, to keep the complexity of generating the MPM list low, an MPM list comprising three MPMs can be generated. For example, even when using 67 intra-prediction modes, the MPM list can include three MPM candidates. When the intra-prediction mode of the current block is not included in the MPM list, a residual mode can be used. In this case, the residual mode can include 64 residual candidates, and the residual intra-prediction mode information for one of the 64 residual candidates can be signaled. For example, the residual intra-prediction mode information can include 6-bit syntax elements (e.g., rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax elements).

[0188] In an embodiment, the MPM list can be configured by considering neighboring intra-frame modes, derived intra-frame modes, and a default intra-frame mode. For example, the encoding device can use the prediction modes of neighboring blocks to encode the prediction mode of the current block.

[0189] For example, when encoding neighboring blocks in intra-prediction mode, the encoding device can identify or derive the prediction modes of neighboring blocks. For instance, the encoding device can determine the prediction mode of the current block based on the prediction modes of the left neighboring block and the top neighboring block, and in this case, the prediction mode of the corresponding neighboring block can be determined as the most probable mode (MPM). In this respect, determining the MPM can be expressed as enumerating MPM candidates or configuring an MPM list.

[0190] In an embodiment, the left neighboring block can be specified as the topmost block of the neighboring blocks adjacent to the left boundary of the current block. Additionally, the top neighboring block can be specified as the leftmost block of the neighboring blocks adjacent to the top boundary of the current block. The encoding device can determine whether the prediction modes of the left neighboring block and the top neighboring block are the same. An initial MPM list can be formed by performing a pruning process on the intra-frame prediction modes of the two neighboring blocks. The pruning process can be performed such that only the different prediction modes are included in the MPM list.

[0191] If the prediction modes of the left neighboring block and the top neighboring block are different, the first MPM can be set to the prediction mode of the left neighboring block, the second MPM can be set to the prediction mode of the top neighboring block, and the third MPM can be set to one of the following: intra-plane mode, intra-DC mode, or intra-vertical mode (intra-prediction mode #50). Specifically, when the intra-prediction modes of two neighboring blocks are different from each other, two intra-prediction modes can be set to the MPM, and after passing the MPM trimming check, one of the default intra-prediction modes can be added to the MPM list. Here, the default intra-prediction mode can include intra-plane mode, intra-DC mode, and / or intra-vertical mode (intra-prediction mode #50).

[0192] For example, when the prediction modes of the left neighboring block and the top neighboring block are different, the MPM list can be configured according to the following conditions.

[0193] Case 1: If neither the intra-prediction mode of the left neighboring block nor the intra-prediction mode of the top neighboring block is an intra-plane mode, then the MPM list can be configured to include the intra-prediction mode blocks of the left neighboring block, the intra-prediction mode of the top neighboring block, and the intra-plane mode.

[0194] Case 2: When the conditions of Case 1 are not met, if neither the intra-prediction mode of the left neighboring block nor the intra-prediction mode of the top neighboring block is an intra-DC mode, the MPM list can be configured to include the intra-prediction mode of the left neighboring block, the intra-prediction mode of the top neighboring block, and the intra-DC mode.

[0195] Case 3: When the conditions of Case 2 are not met, the MPM list can be configured to include the intra-prediction mode of the left neighboring block, the intra-prediction mode of the top neighboring block, and the intra-vertical mode.

[0196] Simultaneously, when the prediction mode of the left neighboring block is the same as that of the top neighboring block, the coding device can determine whether the prediction mode of the left neighboring block is less than 2. For example, the coding device can determine whether the prediction mode of the left neighboring block is intra-plane mode, intra-DC mode, or something else. Figure 6 The prediction pattern shown indicates the directionality of the block located at the bottom of the current block.

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

[0198] Meanwhile, if the prediction mode of the left neighboring block is not less than 2, the first MPM can be set to the prediction mode of the left neighboring block, the second MPM can be set to (prediction mode of the left neighboring block - 1), and the third MPM can be set to (prediction mode of the left neighboring block + 1).

[0199] For example, when the prediction modes of the left neighboring block and the top neighboring block are the same, the MPM list can be configured as follows.

[0200] Case 1: When the value of the intra-prediction mode of the left neighboring block is less than 2, the MPM list can be configured to include intra-plane mode, intra-DC mode and intra-vertical mode.

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

[0202] Simultaneously, an additional pruning process to remove duplicate patterns can be performed, ensuring that only unique patterns are included. Furthermore, for entropy compilation of the 64 non-MPM patterns (excluding the three MPM patterns), a 6-bit fixed-length code can be used. That is, the index entropy indicating the 64 non-MPM patterns can be compiled into 6-bit fixed-length code (6-bit FLC).

[0203] In addition, the coding device can determine whether the best intra-prediction mode to be applied to the current block belongs to the MPM candidates configured above.

[0204] If the intra-prediction mode of the current block is an MPM candidate, the coding device can encode the MPM flag and the MPM index. Here, the MPM flag can specify whether the intra-prediction mode of the current block is derived from a neighboring intra-prediction block (that is, the intra-prediction mode of the current block belongs to MPM). In addition, the MPM index can specify which MPM mode among the MPM candidates is applied as the intra-prediction mode of the current block.

[0205] In contrast, if the intra-prediction mode of the current block is not an MPM candidate, the coding device can use the remaining modes to encode the intra-prediction mode of the current block.

[0206] Meanwhile, in this embodiment, the encoding and decoding devices can be configured with an MPM list including 6 MPMs. To generate an MPM list including 6 MPMs, a default MPM list can be considered. When the value of the intra-prediction mode of the left neighboring block is A, the default MPM list can be configured as follows.

[0207] Default 6MPM list = {A, plane(0) or DC(1), vertical(50), HOR(18), VER-4(46), VER+4(54)}

[0208] Furthermore, by performing a pruning process on the intra-modes of two neighboring blocks, the default 6-MPM list can be updated to generate a 6-MPM list. For example, when the intra-prediction modes of two neighboring blocks are the same and the values ​​of the intra-prediction modes of the two neighboring blocks are greater than the value of the intra-DC mode (1), the 6-MPM list can include the intra-prediction mode of the left neighboring block as the default mode, the intra-plane mode, and the intra-DC mode, and also includes three derived modes derived by adding a predetermined offset value to the intra-prediction modes of neighboring blocks and performing a modulo operation relative to the total number of intra-prediction modes.

[0209] Furthermore, when the intra-prediction modes of neighboring blocks differ from each other, the 6-MPM list can be configured by including the intra-prediction modes of two neighboring blocks as the first two MPM modes. The remaining four MPM modes can be derived from the default mode and the intra-prediction modes of neighboring blocks.

[0210] When the MIP is not applied to the current block, the MPM list configuration method described above can be used. For example, the MPM list configuration method described above can be used to derive the intra-prediction mode used in LIP, PDPC, MRL, ISP intra-prediction, or normal intra-prediction (non-directional intra-prediction and directional intra-prediction). However, the left neighbor block or top neighbor block can be compiled based on the MIP described above. In this case, if the MIP mode number of the neighbor block (left neighbor block / top neighbor block) with which the MIP is applied is applied unchanged to the MPM list of the current block without which the MIP is not applied, this may be inappropriate because it indicates an unintentional intra-prediction mode. Therefore, in this case, the intra-prediction mode of the neighbor block (left neighbor block / top neighbor block) with which the MIP is applied can be regarded as a DC mode or a plane mode. Alternatively, as another example, the intra-prediction mode of the neighbor block (left neighbor block / top neighbor block) with which the MIP is applied can be mapped to a normal intra-prediction mode based on a mapping table and used to configure the MPM list. In this case, the mapping can be performed based on the block size type of the current block. For example, the MIP can be... Figure 9 The mapping table shown according to the embodiment is used for mapping.

[0211] exist Figure 9 In the table, MIP IntraPredMode[xNbX][yNbX] specifies the MIP mode for neighboring blocks (left neighboring block / top neighboring block), and the block size type MipSizeId specifies the block size type for the neighboring block or the current block. The numbers below the block size type values ​​0, 1, and 2 indicate the normal intra-prediction mode to which the MIP mode is mapped for each block size type. For example, a case where the current block's height and width are 4 can be called block size type 0, a case where the current block's height and width are both equal to or less than 8 can be called block size type 1, and another case can be called block size type 2.

[0212] Here, normal intra-prediction mode is an intra-prediction mode other than MIP mode, and can refer to non-directional intra-prediction mode or directional intra-prediction mode. For example, when the block size type of the current block is 0 and the MIP mode number of the neighboring block is 10, the mapped normal intra-prediction mode number can be 18. However, the mapping relationship can be illustrative and can be changed.

[0213] Additionally, in this embodiment, the intra-plane mode may not be included in the MPM list. For this purpose, information regarding whether the intra-prediction mode of the current block is an intra-plane mode can be separately signaled. When the prediction mode of the current block is not an intra-plane mode, an MPM list can be generated to signal the intra-prediction mode. The encoding device can use the MPM list generated during encoding of the current block to signal the intra-prediction mode of the current block to the decoding device, and the decoding device can use the generated MPM list to determine the intra-panel mode of the current block.

[0214] The MPM list can be determined based on the intra-prediction modes of the current block's neighboring blocks. For example, the MPM list can be determined based on the intra-prediction modes of the current block's left and top neighboring blocks. For example, the encoding and decoding apparatus can determine the MPM list based on a first intra-prediction candidate determined based on the intra-prediction mode of the left neighboring block and a second intra-prediction candidate determined based on the intra-prediction mode of the top neighboring block.

[0215] Here, the top neighbor block can be the rightmost block among the top adjacent blocks of the current block. The left neighbor block can be the bottommost block among the left adjacent blocks 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 neighbor block can be (xCb-1, yCb+cbHeight-1), and the coordinates of the top neighbor block can be (xCb+cbWidth-1, yCb-1).

[0216] When the left neighboring block is unavailable, when the prediction mode of the left neighboring block is not an intra-prediction mode, or when the prediction mode of the left neighboring block is MIP mode, the encoding and decoding devices may determine the value of the first intra-prediction candidate to the value of the specified intra-plane mode (e.g., 0). When the left neighboring block does not meet such conditions, the encoding and decoding devices may determine the value of the first intra-prediction candidate to the value of the intra-prediction mode of the specified left neighboring block.

[0217] Additionally, when the top neighbor block is unavailable, when the top neighbor block's mode is not intra-prediction mode, or when the top neighbor block's prediction mode is MIP mode, the encoding and decoding devices may determine the value of the second intra-prediction candidate to be the value of the specified intra-plane mode (e.g., 0). When the top neighbor block does not meet such conditions, the encoding and decoding devices may determine the value of the second intra-prediction candidate to be the value of the specified top neighbor block's intra-prediction mode.

[0218] In this embodiment, the MPM list can be configured to include five candidate modes. In this embodiment, the MPM list can be configured as follows: Hereinafter, the first intra-frame prediction candidate is referred to as candIntraPredModeA, the second intra-frame prediction candidate is referred to as candIntraPredModeB, and the MPM list is referred to as candModeList[x]. Here, x can be an integer from 0 to 4.

[0219] 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 (e.g., when it is not intra-plane mode or intra-DC mode), the MPM list candModeList[x] can be configured as follows.

[0220] candModeList[0]=candIntraPredModeA

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

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

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

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

[0225] Case 2: If the conditions of Case 1 are not met, when the values ​​of the first intra-frame prediction candidate and the second intra-frame prediction candidate are different and the value of the first intra-frame prediction candidate or the value of the second intra-frame prediction candidate is greater than 1 (e.g., not intra-plane mode or intra-DC mode), the MPM list candModeList[x] can be configured as follows.

[0226] First, minAB and maxAB can be calculated as follows.

[0227] minAB=Min(candIntraPredModeA,candIntraPredModeB)

[0228] maxAB=Max(candIntraPredModeA,candIntraPredModeB)

[0229] When the values ​​of the first intra-frame prediction candidate and the second intra-frame prediction candidate are both greater than 1, the MPM lists candModeList[0] and candModeList[1] can be configured as follows.

[0230] candModeList[0]=candIntraPredModeA

[0231] candModeList[1]=candIntraPredModeB

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

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

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

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

[0236] Meanwhile, when the value of maxAB-minAB is equal to or greater than 62, candModeList[2] can be configured to candModeList[4] as follows.

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

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

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

[0240] Meanwhile, when the value of maxAB-minAB is 2, candModeList[2] to candModeList[4] can be configured as follows.

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

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

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

[0244] Meanwhile, when the value of maxAB-minAB does not meet the above conditions, candModeList[2] to candModeList[4] can be configured as follows.

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

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

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

[0248] Meanwhile, when the values ​​of the first intra-frame prediction candidate and the second intra-frame prediction candidate are both not greater than 1 and only one of the first intra-frame prediction candidate and the second intra-frame prediction candidate is greater than 1, the MPM list candModeList[x] can be configured as follows.

[0249] candModeList[0] = maxAB

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

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

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

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

[0254] Case 3: When the conditions of Case 2 are not met, the MPM list candModeList[x] can be configured as follows.

[0255] candModeList[0] = INTRA_DC

[0256] candModeList[1]=INTRA_ANGULAR50

[0257] candModeList[2]=INTRA_ANGULAR18

[0258] candModeList[3]=INTRA_ANGULAR46

[0259] candModeList[4]=INTRA_ANGULAR54

[0260] MPM list configuration in matrix-based intra-prediction mode

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

[0262] The MIP MPM list can include n candidates, and for example, n can be 3. The MIP MPM list can be configured based on the left and top neighboring blocks of the current block. Here, the left neighboring block can be the topmost block among the neighboring blocks adjacent to the left boundary of the current block. Additionally, the top neighboring block can indicate the leftmost block among the neighboring blocks adjacent to the top boundary of the current block. For example, when the coordinates of the current block are (xCb, yCb), the coordinates of the left neighboring block can be (xCb-1, yCb) and the coordinates of the top neighboring block can be (xCb, yCb-1). Alternatively, the left neighboring block can be the bottommost block among the neighboring blocks adjacent to the left boundary of the current block. Additionally, the top neighboring block can be the rightmost block among the neighboring blocks adjacent to the top boundary of the current block.

[0263] When MIP is applied to the left neighboring block, the first candidate intra-prediction mode can be set to the same as the MIP intra-prediction mode of the left neighboring block. Here, the first candidate intra-prediction mode can be expressed as candMipModeA. Alternatively, for example, when MIP is applied to the top neighboring block, the second candidate intra-prediction mode can be set to the same as the MIP intra-prediction mode of the top neighboring block. Here, the second candidate intra-prediction mode can be expressed as candMipModeB.

[0264] Simultaneously, candidate intra-prediction modes can be determined by comparing the sizes of the current block and neighboring blocks. For example, when MIP is applied to the left neighboring block and the block size type of the left neighboring block is the same as the block size type of the current block, 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 neighboring block. Additionally, when MIP is applied to the top neighboring block and the block size type of the top neighboring 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 top neighboring block.

[0265] Simultaneously, left or top neighbor blocks can be encoded based on intra-prediction other than MIP. For example, left or top neighbor blocks can be encoded using an intra-prediction mode other than MIP. In this case, it is inappropriate to use the normal intra-prediction mode number of neighbor blocks (e.g., left or top neighbor blocks) that do not apply MIP as a candidate intra-prediction mode for applying MIP without any change. Therefore, in this case, for example, processing can be performed by treating a predetermined MIP intra-prediction mode as if it were applied to neighbor blocks that do not apply MIP. For example, when MIP is not applied to a neighbor block, the MIP intra-prediction mode of the corresponding block can be determined as a specific MIP intra-prediction mode value (e.g., 0, 1, or 2), thereby generating a list of MIP MPMs.

[0266] Alternatively, as another example, the normal intra prediction mode of neighboring blocks that do not apply MIP can be mapped to the MIP intra prediction mode based on a mapping table to be used to configure 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 a mapping table, a mapping table could be used... Figure 13 The mapping table shown is based on an embodiment.

[0267] Figure 13 An embodiment of a mapping table for mapping normal intra-prediction modes of neighboring blocks to MIP intra-prediction modes is shown. Figure 13 As shown, IntraPredModeY[xNbX][yNbX] indicates the intra-prediction mode of the neighboring blocks (left neighboring block / top neighboring block). Here, the intra-prediction mode of the neighboring blocks can be the intra-prediction mode of the luma component (sample). Block size type MipSizeId indicates the block size type of the neighboring block or the current block. The numbers below the block size type values ​​0, 1, and 2 indicate the MIP intra-prediction mode to which the normal intra-prediction mode is mapped for each block size type. Block size type 0 can indicate the case where the block has a size of 4x4 pixels. Block size type 1 can indicate the case where the block has a size of 4x8, 8x4, or 8x8 pixels. Block size type 2 can indicate the case where the block size is greater than 8x8 pixels.

[0268] In an embodiment, a neighboring block (e.g., the left neighboring block / top neighboring block) may be unavailable because it is located outside the current image or outside the current tile / slice, or even if MIP has been applied, a MIP intra-prediction mode that is not available for the current block may be applied depending on the block size type. Alternatively, predefined MIP intra-prediction modes can be used as a first candidate intra-prediction mode, a second candidate intra-prediction mode, and a third candidate intra-prediction mode. Figure 14A table illustrating an embodiment of a predetermined MIP intra-prediction mode that can be used in this situation based on the size of the current block is provided. For example, when all MIP intra-prediction information for neighboring blocks is unavailable, it can be based on... Figure 14 The example generates a list of MIPMPMs based on the current block size.

[0269] In this embodiment, the MIP intra-prediction mode of neighboring blocks can be obtained. In this case, when the MIP intra-prediction mode of the left neighboring block is different from the MIP intra-prediction mode of the top neighboring block, the MIP intra-prediction mode of the left neighboring block can be set as the first candidate intra-prediction mode. In addition, the MIP intra-prediction mode of the top neighboring block can be set as the second candidate intra-prediction mode. Therefore, the first candidate of the MIP MPM list (e.g., candMipModeList[0]) can be set as the MIP intra-prediction mode of the left neighboring block, and the second candidate of the MIP MPM list (e.g., candMipModeList[1]) can be set as the MIP intra-prediction mode of the top neighboring block.

[0270] The order of intra-prediction candidates in the MIP list can be changed. For example, the MIP intra-prediction mode of the top neighboring block can be included as the first candidate of the MIP MPM list (e.g., candMipModeList[0]), while the MIP intra-prediction mode of the left neighboring block can be included as the second candidate of the MIP MPM list (e.g., candMipModeList[1]).

[0271] As the third candidate intra-frame prediction mode, it can be used according to Figure 14 The predefined MIP intra-prediction mode. For example, it can be... Figure 14 The third candidate intra-prediction mode is used as the second candidate for the MIP MPM list (e.g., candMipModeList[2]).

[0272] In another embodiment, the third candidate intra-frame prediction mode can be determined as not being compatible with the one that can be predicted based on the given information. Figure 14 The order of the MIP intra-prediction modes shown determines the overlapping MIP intra-prediction modes of the first and second candidate intra-prediction modes. For example, when the first and second candidates in the MIP MPM list are not used... Figure 14 When using the first candidate intra-frame prediction mode, you can Figure 14 The first candidate intra-prediction mode is used as the third candidate in the MIP MPM list (e.g., candMipModeList[2]). Otherwise, for example, when not used in the first and second candidates of the MIP MPM list Figure 15 When using the second candidate intra-frame prediction mode, it can be Figure 14 The second candidate intra-prediction mode is used as the third candidate in the MIP MPM list (e.g., candMipModeList[2]). Otherwise, it can be Figure 13 The third candidate intra-prediction mode is used as the third candidate for the MIP MPM list (e.g., candMipModeList[2]).

[0273] Alternatively, when the MIP intra-prediction mode of the left neighboring block and the MIP intra-prediction mode of the top neighboring block are the same, one of the MIP intra-prediction modes of the left neighboring block and the top neighboring block can be included as the first candidate of the MIP MPM list (e.g., candMipModeList[0]), and the second candidate of the MIP MPM list (e.g., candMipModeList[1]) and the third candidate of the MIP MPM list (e.g., candMipModeList[2]) can be used as described above. Figure 15 The predefined MIP intra-prediction mode is shown in the figure.

[0274] 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 mentioned above, the MPM flag that can be included in the intra-prediction mode information of 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.

[0275] Use the MPM list to determine the intra-prediction mode.

[0276] For example, the intra-frame prediction mode signaling process of the encoding device and the intra-frame prediction mode determination process of the decoding device can be performed as follows.

[0277] Figure 15 This is a flowchart illustrating a method for encoding intra-frame prediction modes using an MPM list. The encoding apparatus can configure the MPM list for the current block as described above (S1510).

[0278] Next, the encoding device can determine the intra-prediction mode for the current block (S1520). The encoding device can perform prediction based on various intra-prediction modes and determine the optimal intra-prediction mode based on rate distortion optimization (RDO). In an embodiment, the encoding device can determine the optimal intra-prediction mode using only MPM candidates configured in the MPM list, or it can determine the optimal intra-prediction mode by further using the remaining intra-prediction modes and the MPM candidates configured in the MPM list. For example, if the intra-prediction type of the current block is a specific type other than the normal intra-prediction type (e.g., LIP, MRL, or ISP), the encoding device can consider only MPM candidates as intra-prediction mode candidates for the current block to determine the optimal intra-prediction mode. In this case, the intra-prediction mode of the current block can be determined only based on the MPM candidates, and in this case, the MPM flag can be omitted from encoding / signaling. In this case, the decoding device can estimate that the MPM flag is 1 without separately receiving the MPM flag.

[0279] The encoding device can encode and output intra-prediction mode information in the form of a bitstream (S1530). In an embodiment, the encoding device can signal whether the intra-prediction mode of the current block is an intra-planar mode by encoding information specifying whether the intra-prediction mode of the current block is an intra-planar mode (e.g., intra_luma_not_planar_flag). When the intra-prediction mode of the current block is an intra-planar mode, the encoding device can set the value of intra_luma_not_planar_flag to a first value (e.g., 0). Simultaneously, when the intra-prediction mode of the current block is not an intra-planar mode, the encoding device can set the value of intra_luma_not_planar_flag to a second value (e.g., 1).

[0280] Simultaneously, when the intra-prediction mode of the current block is not an intra-plane mode, the encoding device can determine and signal the intra-prediction mode based on whether block-based incremental pulse code modulation (BDPCM) is applied to the current block and the application direction. In an embodiment, when BDPCM is applied to the current block, the encoding device can determine the intra-prediction mode based on the BDPCM application direction. For example, the encoding device can determine the intra-prediction mode as a horizontal or vertical mode in the same direction based on whether the BDPCM application direction is horizontal or vertical. Alternatively, in this case, the encoding device can signal the intra-prediction mode of the current block by encoding information specifying whether BDPCM is applied to the current block (intra_bdpcm_flag) and information specifying the BDPCM application direction (intra_bdpcm_dir_flag). In this case, the signaling of the MPM flag can be skipped.

[0281] Simultaneously, when the prediction mode of the current block is not intra-plane mode and BDPCM is not applied, the encoding device can encode intra-prediction mode information including the aforementioned MPM flag (e.g., intra_luma_mpm_flag), MPM index (e.g., intra_luma_mpm_idx), and / or remaining intra-prediction mode information (e.g., intra_luma_mpm_remainder) to signal the intra-prediction mode. Typically, the MPM index and remaining intra-prediction mode information are interchangeable and may not be signaled simultaneously when specifying the intra-prediction mode for a 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, as mentioned above, when a specific intra-prediction type is applied to the current block, the MPM flag may not be signaled, and only the MPM index can be signaled. That is, in this case, the intra-prediction mode information may include only the MPM index.

[0282] Additionally, typically, 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 specifying one of the MPM candidates (e.g., intra_luma_mpm_idx). If the intra-prediction mode of the current block does not exist in the MPM list, residual intra-prediction mode information (e.g., intra_luma_mpm_remainder) can be generated specifying a mode that is the same as the intra-prediction mode of the current block among the residual intra-prediction modes not included in the MPM list. For example, when the intra-prediction mode (e.g., IntraPredModeY) of the current block is encoded as intra_luma_mpm_remainder, the encoding device may first subtract 1 from IntraPredModeY, arrange the intra-prediction modes belonging to the MPM list in descending order according to the size of the intra-prediction mode values, and while comparing the values ​​of candModeList[0] to candModeList[4] with IntraPredModeY, the value of IntraPredModeY determined by decreasing the value of IntraPredModeY by 1 when the value of IntraPredModeY-1 is less than the value of candModeList[] is determined as intra_luma_mpm_remainder.

[0283] Simultaneously, when the intra-prediction mode of the current block is MIP mode, the encoding device can generate an MPM list for MIP mode and encode the current block as described above. In this case, the MPM encoding information for MIP mode can be signaled. Specifically, 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`.

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

[0285] refer to Figure 16 The decoding device can obtain intra-prediction mode information from the bitstream (S1610). The intra-prediction mode information may include at least one of the following as described above: the MPM flag, the MPM index, or the remaining intra-prediction mode.

[0286] The decoding device can configure an MPM list (S1620). The MPM list can be configured to be the same as the MPM list configured by the encoding device. That is, the MPM list can include intra-prediction modes of neighboring blocks, and also include specific intra-prediction modes according to a predetermined method.

[0287] In an embodiment, the decoding device can determine whether the intra-prediction mode of the current block is an intra-planar mode based on information specifying whether the intra-prediction mode of the current block is not an intra-planar mode (e.g., intra_luma_not_planar_flag). When the value of intra_luma_not_planar_flag is a first value (e.g., 0), the decoding device can determine that the intra-prediction mode of the current block is an intra-planar mode. Conversely, when the value of intra_luma_not_planar_flag is a second value (e.g., 1), the decoding device can determine that the intra-prediction mode of the current block is not an intra-planar mode.

[0288] Simultaneously, when the intra-prediction mode of the current block is not the intra-plane mode, the decoding device can determine the intra-prediction mode based on whether block-based incremental pulse code modulation (BDPCM) is applied to the current block and the application direction. In an embodiment, when the information (intra_bdpcm_flag) obtained from the bitstream specifies whether BDPCM is applied to the current block, indicating the application of BDPCM, the decoding device can determine at least one BDPCM application direction, either horizontal or vertical, based on the information (intra_bdpcm_dir_flag) specifying the application direction of BDPCM obtained from the bitstream. Furthermore, in the same direction as the determined BDPCM application direction, the intra-prediction mode can be determined as either horizontal or vertical.

[0289] Meanwhile, when the prediction mode of the current block is not an intra-plane mode and BDPCM is not applied, the decoding device can use the above method to generate an MPM list to determine the intra-prediction mode. For example, the MPM list can be determined based on the intra-prediction modes of the current block's neighboring blocks. The decoding device can determine the MPM list based on the intra-prediction modes of the current block's top neighboring block and left neighboring block. For example, in an embodiment, the decoding device can determine the MPM list based on a first intra-prediction candidate determined based on the intra-prediction mode of the left neighboring block and a second intra-prediction candidate determined based on the intra-prediction mode of the top neighboring block.

[0290] The decoding device can use the MPM list to determine whether to determine the intra-prediction mode for the current block (S1630). For example, when the value of the mpm flag is 1, the decoding device can derive the candidate specified by the mpm index from the MPM candidates in the MPM list as the intra-prediction mode for the current block. For example, the decoding device can determine the intra-prediction mode for the current block based on 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 for the current block.

[0291] As another example, when the value of the mpm flag is 0, the decoding device can export the intra-prediction mode specified by the remaining intra-prediction mode information from the remaining intra-prediction modes not included in the MPM list as the intra-prediction mode of the current block (S1640).

[0292] 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) of the intra-prediction mode of the specified current block. For example, the decoding device can set the value of IntraPredModeY to intra_luma_mpm_remainder+1. Thereafter, the decoding device can sort the intra-prediction modes belonging to the MPM list in ascending order according to the magnitude of the intra-prediction mode values, and while performing a comparison between the values ​​of candModeList[0] to candModeList[4] and ntraPredModeY, determine the value of IntraPredModeY of the intra-prediction mode of the specified current block by incrementing the value of IntraPredModeY by one when the value of IntraPredModeY is less than the value of candModeList[].

[0293] Meanwhile, as another example, when the intra-prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP), the decoding device can derive the candidate specified by the mpm index in the MPM list as the intra-prediction mode for the current block without checking the mpm flag.

[0294] Simultaneously, when the intra-prediction mode of the current block is MIP mode, the decoding device can generate an MPM list for MIP to decode the current block as described above. In this case, the MPM encoding information of the MIP mode can be obtained through the bitstream. In this case, the MPM flag can be obtained through `intra_mip_mpm_flag`, the MPM index can be obtained through `intra_mip_mpm_idx`, and the remaining intra-prediction mode information can be obtained through `intra_mip_mpm_remainder`.

[0295] Mapping between matrix-based intra-prediction mode and normal intra-prediction mode

[0296] As described above, to determine the MIP mode or intra-prediction mode of the current block, an MPM list for normal intra-prediction mode or an MIP list can be generated based on information about neighboring blocks. In this case, neighboring blocks can include the left neighboring block and the top neighboring block of the current block. Here, normal intra-prediction mode refers to an intra-prediction mode other than MIP mode. For example, normal intra-prediction mode can refer to intra-plane mode and intra-DC mode as non-directional intra-prediction modes, as well as directional intra-prediction mode.

[0297] When MIP mode is applied to the current block but a different intra-prediction mode (normal intra-prediction mode) is applied to neighboring blocks, the intra-prediction modes of the neighboring blocks need to be mapped to MIP mode so that the prediction information of the neighboring blocks can be used to generate the MPM list for the current block. Conversely, when normal intra-prediction mode is applied to the current block but MIP mode is applied to neighboring blocks, the MIP modes of the neighboring blocks need to be mapped to normal intra-prediction mode so that the prediction information of the neighboring blocks can be used to generate the MPM list for the current block.

[0298] However, the problem with MIP mode is that it can have a variety of prediction modes depending on the size of the luma block, making it difficult to map normal intra-prediction modes and MIP mode in a one-to-one correspondence.

[0299] [Table 3]

[0300] Brightness block size Number of MIP modes 4x4 brightness block 35 MIP modes 4x8, 8x4, 8x8 brightness blocks 19 MIP modes Other brightness blocks 11 MIP modes

[0301] Since the number of normal intra-prediction modes and the number of MIP modes are different, interpolation and mapping can be performed on them by... Figure 9 and Figure 13The mapping table shown is used to perform the mapping between MIP mode and normal intra-prediction mode. For example, when generating an MPM list for the current block encoded in normal intra-prediction mode by referencing neighboring blocks, if the intra-prediction mode of the neighboring blocks is MIP mode, then to map the MIP mode of the neighboring blocks to the intra-prediction mode, it should be done as follows: Figure 17 The MPM list is generated as shown. More specifically, during encoding and decoding, the encoding and decoding devices can identify that the prediction mode of the current block is normal intra-frame prediction mode (S1710) and that the prediction mode of neighboring blocks is MIP mode (S1720). When the prediction mode of a neighboring block is MIP mode, the encoding and decoding devices can check whether the neighboring block is a 4x4 luma block (S1730). When the neighboring block is a 4x4 luma block, the encoding and decoding devices can determine whether the block is a 4x4 luma block. Figure 9 The method of mapping 35 MIP modes to 67 intra-frame modes determines the normal intra-frame prediction mode corresponding to the MIP mode of the neighboring block (S1740). When the neighboring block is not a 4x4 luma block, the encoding and decoding devices can check whether the neighboring block is a 4x8, 8x4, or 8x8 luma block (S1750). When the neighboring block is a 4x8, 8x4, or 8x8 luma block, the encoding and decoding devices can determine the normal intra-frame prediction mode corresponding to the MIP mode of the neighboring block based on the mapping of 35 MIP modes to 67 intra-frame modes (S1740). Figure 9 The method of mapping 19 MIP modes to 67 intra-frame modes determines the normal intra-frame prediction mode corresponding to the MIP mode of the neighboring block (S1760). Alternatively, when the neighboring block is not a 4x8, 8x4, or 8x8 luma block, the encoding and decoding devices can determine the normal intra-frame prediction mode corresponding to the MIP mode of the neighboring block based on the method of mapping 19 MIP modes to 67 intra-frame modes (S1760). Figure 9 The method of mapping 11 MIP modes to 67 intra-frame modes determines the normal intra-frame prediction mode corresponding to the MIP modes of neighboring blocks (S1770). Finally, the encoding and decoding units can generate the MPM list of the current block using the determined normal intra-frame prediction mode according to the above method (S1780).

[0302] Similarly, when referencing neighboring blocks to generate an MPM list for the current block encoded in MIP mode, if the intra-prediction mode of the neighboring blocks is the normal intra-prediction mode, then... Figure 18 Perform steps S1810 to S1880 as shown to map the intra-prediction mode of neighboring blocks to the MIP mode.

[0303] More specifically, during the encoding and decoding process, the encoding and decoding devices can identify that the prediction mode of the current block is MIP mode (S1810) and that the prediction mode of the neighboring blocks is normal intra-frame prediction mode (S1820). When the prediction mode of the neighboring blocks is normal intra-frame prediction mode, the encoding and decoding devices can check whether the neighboring blocks are 4×4 luma blocks (S1830). When the neighboring blocks are 4×4 luma blocks, the encoding and decoding devices can determine whether the prediction mode of the neighboring blocks is normal intra-frame prediction mode. Figure 13 The method of mapping 67 normal intra-prediction modes to 35 MIP modes determines the MIP mode corresponding to the normal intra-prediction mode of the neighboring block (S1840). When the neighboring block is not a 4×4 luma block, the encoding and decoding devices can check whether the neighboring block is a 4×8, 8×4, or 8×8 luma block (S1850). When the neighboring block is a 4×8, 8×4, or 8×8 luma block, the encoding and decoding devices can determine the MIP mode corresponding to the normal intra-prediction mode of the neighboring block based on the mapping of 67 normal intra-prediction modes to 35 MIP modes (S1840). Figure 13 The mapping method, which maps 67 normal intra-prediction modes to 19 intra-prediction modes, determines the MIP mode corresponding to the normal intra-prediction mode of the neighboring block (S1860). Alternatively, when the neighboring block is not a 4×8, 8×4, or 8×8 luma block, the encoding and decoding devices can determine the MIP mode corresponding to the normal intra-prediction mode of the neighboring block based on the mapping method. Figure 13 The method of mapping 67 normal intra-prediction modes to 11 intra-prediction modes determines the MIP mode corresponding to the normal intra-prediction modes of neighboring blocks (S1870). Finally, the encoding and decoding units can generate the MPM list of the current block according to the determined MIP mode based on the above method (S1880).

[0304] However, when performing such a mapping, due to the correlation between the MIP mode and the intra-prediction mode, it is necessary to perform a comparison between the sizes of the current block and neighboring blocks, and additional memory is required to store such a mapping table.

[0305] Matrix-based mapping from intra-prediction mode to normal intra-prediction mode

[0306] The following describes a mapping method according to an embodiment for reducing the complexity of the mapping algorithm and saving memory for storing the mapping table by removing the correlation between block size and MIP mode and intra-frame prediction mode.

[0307] When the MIP mode is mapped to the normal intra-prediction mode, the encoding and decoding apparatus according to the embodiment can determine the MIP mode as a predetermined intra-prediction mode without using block size and mapping table.

[0308] For example, when the MIP mode is converted to the intra-prediction mode, the encoding and decoding apparatus according to the embodiment can map all MIP modes to the intra-plane mode.

[0309] Alternatively, when the MIP mode is converted to the intra-predictive mode, the encoding and decoding apparatus according to the embodiment can map all MIP modes to the intra-DC mode.

[0310] Alternatively, when the MIP mode is converted to the intra-prediction mode, the encoding and decoding apparatus according to the embodiment can map all MIP modes to the intra-vertical mode.

[0311] Alternatively, when the MIP mode is converted to the intra-prediction mode, the encoding and decoding apparatus according to the embodiment can map all MIP modes to the intra-level mode.

[0312] In an embodiment, in order to determine the intra-prediction mode of the current block, when searching for the intra-prediction modes of neighboring blocks to generate an MPM list, if MIP prediction is applied to neighboring blocks, the intra-prediction modes of neighboring blocks can be exported as intra-plane modes to generate the MPM list of the current block.

[0313] Meanwhile, when the current block (or compilation unit) includes a luma block and a chroma block, if the MIP prediction is applied to the luma block corresponding to the position of the chroma block when configuring the intra-prediction mode of the chroma block, the intra-prediction mode specified by the DM (direct mode, using the intra-prediction mode of the luma block corresponding to the chroma block) of the chroma block can be exported as the intra-plane mode.

[0314] By mapping MIP modes to intra-prediction modes, the encoding or decoding device can easily determine that all MIP modes are predetermined normal intra-prediction modes and generate the MPM list based on the corresponding normal intra-prediction mode when generating the MPM list while encoding or decoding the current block in normal intra-prediction mode. Therefore, it is possible to... Figure 19 Simplified reference as shown Figure 17 The steps for generating the MPM list are described. (Reference) Figure 19 In reference Figure 17 In the described MPM list generation steps, steps S1730 to S1780 can be simplified to step S1791, which determines the normal intra-prediction mode corresponding to the MIP mode when all MIP modes are mapped to a predetermined normal intra-prediction mode, and step S1792, which generates the MPM list according to the determined normal intra-prediction mode. Here, the predetermined normal intra-prediction mode can be any one of the intra-plane mode, intra-DC mode, intra-vertical mode, and intra-horizontal mode.

[0315] Similarly, even if the intra-prediction mode of the chroma block is determined as described above, when the luma block corresponding to the chroma block is in MIP mode, the intra-prediction mode corresponding to the luma block can be determined as a predetermined normal intra-prediction mode without performing mapping based on size.

[0316] The following will refer to Figure 20 An image encoding method performed by an encoding apparatus according to an embodiment is described. The encoding apparatus according to the embodiment may include a memory and at least one processor, and the following encoding method is performed by the at least one processor.

[0317] The encoding apparatus according to the embodiment can identify the prediction mode of the 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 surrounding the current block (S2020). The candidate intra-prediction mode may include a first candidate intra-prediction mode and a second candidate intra-prediction mode. The first candidate intra-prediction mode can be determined based on the prediction modes of the first neighboring blocks surrounding the current block, and the second candidate intra-prediction mode can be determined based on the prediction modes of the second neighboring blocks surrounding the current block. Here, the first candidate intra-prediction mode may be the aforementioned first intra-prediction candidate, and the second candidate intra-prediction mode may be the aforementioned second intra-prediction candidate. For example, the encoding apparatus can determine the first candidate intra-prediction mode (e.g., candIntraPredModeA) based on the intra-prediction mode of the left neighboring block and determine the second candidate intra-prediction mode (e.g., candIntraPredModeB) based on the intra-prediction mode of the top neighboring block.

[0318] In this scenario, when the prediction mode of a neighboring block is MIP mode, the coding device can determine the candidate intra-prediction mode of the corresponding neighboring block as a predetermined intra-prediction mode. Here, the predetermined intra-prediction mode can be any one of intra-plane mode, intra-DC mode, intra-horizontal mode, and intra-vertical mode. For example, when the intra-prediction mode of the left neighboring block is MIP mode, the coding device can determine the first candidate intra-prediction mode (e.g., candIntraPredModeA) as any one of intra-plane mode, intra-DC mode, intra-horizontal mode, and intra-vertical mode. Alternatively, when the intra-prediction mode of the top neighboring block is MIP mode, the coding device can determine the second candidate intra-prediction mode (e.g., candIntraPredModeB) as any one of intra-plane mode, intra-DC mode, intra-horizontal mode, and intra-vertical mode.

[0319] Next, the encoding device can generate a candidate intra-prediction mode list for the current block based on the candidate intra-prediction modes (S2030). The candidate intra-prediction mode list can be the MPM list described above. For example, the encoding device can generate the candidate intra-prediction mode list based on the first candidate intra-prediction mode and the second candidate intra-prediction mode as described above. In this case, when the prediction modes of the first neighboring block and the second neighboring block are both MIP modes, 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 DC mode or vertical mode.

[0320] Next, the encoding device can encode the intra-prediction mode indicator that indicates the intra-prediction mode of the current block based on the candidate intra-prediction mode list (S2040). Here, the intra-prediction mode indicator may include an MPM flag signaled in the form of an intra_luma_mpm_flag syntax element, an MPM index signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, or remaining intra-prediction mode information signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. The encoding device can generate a bitstream by encoding the intra-prediction mode indicator and send it to the decoding device.

[0321] The following will refer to Figure 21 An image decoding method performed by a decoding apparatus according to an embodiment is described. The decoding apparatus according to the embodiment may include a memory and at least one processor, and the following decoding method is performed by the at least one processor.

[0322] First, the decoding apparatus according to the 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 apparatus can determine the candidate intra-prediction mode of the current block based on the prediction modes of neighboring blocks located around the current block (S2120).

[0323] When the prediction mode of a neighboring block is MIP mode, the decoding device can determine the candidate intra-prediction mode as the predetermined intra-prediction mode. Here, the predetermined intra-prediction mode can be any one of intra-plane mode, intra-DC mode, intra-horizontal mode, and intra-vertical mode.

[0324] The decoding device can determine whether the prediction mode of a neighboring block is MIP mode based on the MIP mode indicator of the neighboring block. The MIP mode indicator can be the aforementioned MIP flag (e.g., intra_mip_flag), and the decoding device can obtain the MIP mode indicator from the bitstream.

[0325] The candidate intra-prediction mode may include a first candidate intra-prediction mode and a second candidate intra-prediction mode. In this case, the first candidate intra-prediction mode may be determined based on the prediction modes of the first neighboring blocks surrounding the current block, and the second candidate intra-prediction mode may be determined based on the prediction modes of the second neighboring blocks surrounding the current block.

[0326] 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 neighboring block and determine the second candidate intra-prediction mode (e.g., candIntraPredModeB) based on the intra-prediction mode of the top neighboring block.

[0327] For example, when the intra-prediction mode of the left neighboring block is MIP mode, the decoding device can determine the first candidate intra-prediction mode (e.g., candIntraPredModeA) as any one of intra-plane mode, intra-DC mode, intra-horizontal mode, and intra-vertical mode. Alternatively, when the intra-prediction mode of the top neighboring block is MIP mode, the decoding device can determine the second candidate intra-prediction mode (e.g., candIntraPredModeB) as any one of intra-plane mode, intra-DC mode, intra-horizontal mode, and intra-vertical mode.

[0328] Additionally, 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 MPM list described above. For example, the decoding device can generate the candidate intra-prediction mode list based on the first and second candidate intra-prediction modes as described above. In this case, when both the prediction modes of the first and second neighboring blocks are MIP modes, 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 DC mode or vertical mode.

[0329] In addition, 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 with a value greater than the prediction mode value of the specified DC mode, the decoding device can generate a candidate intra-prediction mode list including the value of the first candidate intra-prediction mode.

[0330] Additionally, when the prediction mode of the first neighboring block is MIP mode, the first candidate intra-prediction mode and the second candidate intra-prediction mode are different from each other, and the second candidate intra-prediction mode is an intra-prediction mode with a value greater 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.

[0331] Additionally, the decoding device can determine the intra-prediction mode of the current block based on a candidate intra-prediction mode list (S2140). The decoding device can determine any of the candidate intra-prediction modes included in the candidate intra-prediction mode list as the intra-prediction mode for the current block based on an intra-prediction mode indicator obtained from the bitstream. For example, the intra-prediction mode indicator can be the aforementioned MPM index, and can be signaled via the bitstream in the form of an MPM_IDX or Intra_Luma_MPM_IDX syntax element.

[0332] Furthermore, the encoding apparatus according to the embodiment can encode the intra-prediction mode of the chroma block according to the mapping of the MIP mode described above. The encoding apparatus according to the embodiment can use the DM mode to signal the intra-prediction mode of the chroma block. In this case, the encoding apparatus can determine the intra-prediction mode applied according to the DM mode as the intra-prediction mode specified 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 the reference mode can be identified by the parameters of lumaIntraPredMode or IntraPredModeY.

[0333] For example, the coding device can determine the intra-prediction mode of the luma block corresponding to the chroma block as the reference mode. Therefore, the coding device can determine the intra-prediction mode of the chroma block determined in DM mode as the intra-prediction mode of the luma block.

[0334] In this scenario, when the luma block is a luma block applying MIP mode, the encoding device can determine the reference mode as planar mode instead of MIP mode. Therefore, the encoding device can determine the intra-prediction mode of a chroma block that has already been determined as DM mode as intra-planar mode.

[0335] 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 predicting the luma block in a predetermined mode, the encoding device can determine the reference mode as the intra-DC mode. Here, the predetermined mode may include the IBC mode or other modes. Therefore, the encoding device can determine the intra-prediction mode of a chroma block that has been determined to be in DM mode as the intra-DC mode.

[0336] Additionally, the encoding device can encode the intra-prediction mode of the chroma block based on a reference mode. For example, the encoding device can select an intra-plane mode as the optimal prediction mode for encoding the chroma block, and when the prediction mode of the luma block corresponding to the chroma block is the MIP mode, the information indicating that the intra-prediction mode of the chroma block is the intra-prediction mode identified according to the DM mode is encoded.

[0337] Furthermore, consistent with the encoding method, the decoding apparatus according to the embodiment can determine the intra-prediction mode of the chroma block based on the mapping of the MIP mode described above. The decoding apparatus according to the 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 the parameters of lumaIntraPredMode or IntraPredModeY.

[0338] In this scenario, when the luma block corresponding to the chroma block is a luma block applying MIP mode, the decoding device can determine the reference mode as planar mode. Therefore, the decoding device can determine the intra-prediction mode of the chroma block, which has already been determined to be in DM mode, as intra-planar mode.

[0339] 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 IBC mode or another predetermined mode, the decoding device can determine the reference mode as intra-DC mode. Therefore, the decoding device can determine the intra-prediction mode of a chroma block that has been determined to be in DM mode as intra-DC mode.

[0340] Alternatively, when the MIP mode is not applied to the luma block and the luma block is not predicted in IBC mode or other predetermined modes, the decoding device may determine the reference mode as the intra-prediction mode for the luma block. Therefore, the decoding device may determine the intra-prediction mode of the chrominance block, which has already been determined as DM mode, as the intra-prediction mode for the luma block.

[0341] In addition, 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 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.

[0342] Therefore, even when the prediction mode of the reference luma block or neighboring block is MIP mode when encoding or decoding the current block in normal intra-frame mode, the encoding and decoding devices do not need to compare the size of the current block or neighboring blocks, thereby reducing computational complexity. Furthermore, since no mapping table is needed, memory space efficiency can be improved.

[0343] Figure 22 The experimental data is shown, and the experimental data is shown in relation to the use of Figure 17 The mapping table method shown is different from the method used when converting from MIP mode in neighboring blocks to intra-prediction mode. Figure 19 The mapping method maps all MIP modes to intra-plane modes to generate the MPM list for the current block at a certain coding rate. For example... Figure 22As shown, there is no difference in encoding rate. In other words, by applying the above method, the algorithm complexity can be reduced while minimizing encoding loss and decreasing the memory usage for the mapping table.

[0344] Mapping from normal intra-prediction mode to MIP intra-prediction mode

[0345] The following describes a mapping method according to another embodiment that reduces the complexity of the mapping algorithm and saves memory used to store the mapping table by removing the correlation between block size and MIP mode and intra-frame prediction mode.

[0346] When a normal intra-prediction mode is mapped to a MIP mode, the encoding and decoding apparatus according to the embodiment can determine all normal intra-prediction modes as predetermined MIP modes without using block size and mapping table.

[0347] For example, when a normal intra-frame prediction mode is converted to a MIP mode, the encoding and decoding apparatus according to the embodiment can map all normal intra-frame prediction modes to MIP mode #0.

[0348] Alternatively, when a normal intra-frame prediction mode is converted to a MIP mode, the encoding and decoding apparatus according to the embodiment can map all normal intra-frame prediction modes to MIP mode #1.

[0349] Alternatively, when a normal intra-frame prediction mode is converted to a MIP mode, the encoding and decoding apparatus according to the embodiment can map all normal intra-frame prediction modes to MIP mode #3.

[0350] Alternatively, when a normal intra-frame prediction mode is converted to a MIP mode, the encoding and decoding apparatus according to the embodiment can map all normal intra-frame prediction modes to the MIP mode with the most likely selected rate during the encoding or decoding process.

[0351] By mapping MIP modes to intra-prediction modes, the encoding or decoding device can simply determine all normal intra-prediction modes as predetermined MIP modes when generating the MPM list while encoding or decoding the current block in MIP mode, and generate the MPM list based on the corresponding MIP modes. Therefore, it is possible to... Figure 23 Simplified reference as shown Figure 18 The steps for generating the MPM list are described. (Reference) Figure 23 In reference Figure 18In the described MPM list generation steps, steps S1830 to S1880 can be simplified to step S1891 (S1891) of determining the MIP mode corresponding to the normal intra-frame prediction mode as all normal intra-frame prediction modes are mapped to predetermined MIP modes, and step S1892 (S1892) of generating the MPM list using the determined MIP mode. Here, the predetermined MIP mode can be any of #0, #1, #3, or the MIP mode with the most likely selected rate during encoding or decoding.

[0352] The following will refer to Figure 24 An image encoding method performed by an image encoding apparatus according to an embodiment is described. The image encoding apparatus according to an embodiment can determine the MPM candidate of the current block based on the prediction patterns of neighboring blocks located around the current block (S2410).

[0353] When the prediction mode of either the current block or a neighboring block is a matrix-based prediction mode (e.g., MIP mode), the coding device can determine the MPM candidate determined based on the prediction mode of the neighboring blocks as the predetermined intra-frame prediction mode.

[0354] For example, when the prediction mode of the current block is a matrix-based intra-prediction mode and the prediction modes of neighboring blocks are non-matrix intra-prediction modes (e.g., normal intra-prediction modes), the coding device can determine the MPM candidates determined based on the prediction modes of neighboring blocks as a predetermined matrix-based prediction mode. Here, the predetermined matrix-based intra-prediction mode can be determined based on the size of the current block as described above.

[0355] In this case, a predetermined matrix-based intra-prediction mode can be identified by specifying a predetermined index of the matrix-based intra-prediction mode, and this predetermined index can represent the matrix-based intra-prediction mode used most frequently among a plurality of matrix-based intra-prediction modes. For example, as mentioned above, the predetermined matrix-based intra-prediction mode can be #0, #1, #3, or any of the matrix-based intra-prediction modes with the most likely selected rate during encoding or decoding.

[0356] Meanwhile, when the prediction mode of the current block is based on a non-matrix intra-prediction mode and the prediction modes of neighboring blocks are based on matrix intra-prediction modes, the coding device can determine the MPM candidate based on the prediction modes of neighboring blocks as a predetermined intra-prediction mode. In this case, the predetermined intra-prediction mode can be any one of the planar mode, DC mode, vertical mode, and horizontal mode.

[0357] Simultaneously, the encoding device can determine multiple MPM candidates based on multiple neighboring blocks. Furthermore, the encoding device can determine an MPM list based on the multiple MPM candidates. In this case, when all prediction modes of the multiple neighboring blocks are matrix-based prediction modes, the encoding device can generate an MPM list to include predetermined MPM candidates. In this case, the predetermined MPM candidates may include at least one of DC modes or vertical modes.

[0358] Next, the encoding device can generate an MPM list for the current block based on the MPM candidates (S2420).

[0359] Finally, the encoding device can determine the prediction mode indicator for the specified prediction mode of the current block based on the MPM list (S2430).

[0360] Furthermore, in order to encode the intra-prediction mode of the chroma block corresponding to the current block into a DM mode, the encoding device can determine the intra-prediction mode specified by the DM mode. The encoding device can determine the luma intra-prediction mode used to encode the intra-prediction mode of the chroma block corresponding to the current block.

[0361] Here, the luma intra-prediction mode can be determined based on the prediction mode of the luma block corresponding to the chroma block, and can be identified by the parameters of lumaIntraPredMode or IntraPredModeY. For example, the luma intra-prediction mode can be used in the same manner as the reference mode described above.

[0362] In an embodiment, the encoding device may determine the luma intra-prediction mode based on whether the encoding mode of the current block is a matrix-based intra-prediction mode. For example, when the current block is a luma block to which a matrix-based intra-prediction mode is applied, the encoding device may determine the luma intra-prediction mode as a planar mode.

[0363] Alternatively, when the current block is a luma block for which a non-matrix intra-prediction mode is applied, the coding device may determine the luma intra-prediction mode based on the intra-prediction mode of the current block. For example, the coding device may determine the luma intra-prediction mode as the intra-prediction mode of the current block.

[0364] Next, the encoding device can determine the intra-prediction mode of the chroma block specified by the DM mode as the luma intra-prediction mode (e.g., the reference mode). Finally, the encoding device can select the optimal mode for performing intra-prediction of the chroma block. When the intra-prediction mode specified by the DM mode is selected as the optimal mode, the encoding device can encode the intra-prediction mode information of the chroma block that has been encoded in the intra-prediction mode specified by the DM mode and generate a bitstream, thereby signaling the corresponding information to the decoding device.

[0365] Figure 25 This is a flowchart illustrating an image decoding method performed by a decoding apparatus according to an embodiment. First, the decoding apparatus may determine the most probable mode (MPM) candidate for the current block based on the prediction modes of neighboring blocks located around the current block (S2510).

[0366] When the prediction mode of either the current block or a neighboring block is a matrix-based intra-prediction mode (e.g., MIP mode), the decoding device can determine the MPM candidate determined based on the prediction mode of the neighboring blocks as the predetermined intra-prediction mode.

[0367] For example, when the prediction mode of the current block is a matrix-based intra-prediction mode and the prediction mode of neighboring blocks is a non-matrix intra-prediction mode (e.g., a normal intra-prediction mode), the decoding device can determine the MPM candidate determined based on the prediction mode of neighboring blocks as a predetermined matrix-based intra-prediction mode. In this case, the predetermined matrix-based intra-prediction mode can be determined based on the size of the current block as described above.

[0368] In this case, a predetermined matrix-based intra-prediction mode can be identified by specifying a predetermined index of the matrix-based intra-prediction mode, and the predetermined index can represent the matrix-based intra-prediction mode used most frequently among a plurality of matrix-based intra-prediction modes. For example, as mentioned above, the predetermined matrix-based intra-prediction mode can be #0, #1, #3, or any of the matrix-based intra-prediction modes with the most likely selected rate during encoding or decoding.

[0369] Meanwhile, when the prediction mode of the current block is based on a non-matrix intra-prediction mode and the prediction mode of neighboring blocks is based on a matrix intra-prediction mode, the decoding device can determine the MPM candidate based on the prediction mode of neighboring blocks as a predetermined intra-prediction mode. In this case, the predetermined intra-prediction mode can be any one of the planar mode, DC mode, vertical mode, and horizontal mode.

[0370] Simultaneously, an MPM list can be generated based on multiple MPM candidates, and multiple MPM candidates can be determined based on multiple neighboring blocks. When all prediction modes of multiple neighboring blocks are matrix-based prediction modes, the decoding device can generate an MPM list to include predetermined MPM candidates. In this case, the predetermined MPM candidates may include at least one of DC mode or vertical mode.

[0371] Next, the decoding device can generate an MPM list for the current block based on the MPM candidates (S2520).

[0372] Next, the decoding device can determine the prediction mode of the current block as the MPM candidate identified by the intra-prediction mode indicator among the multiple MPM candidates included in the MPM list (S2530).

[0373] Additionally, the decoding device can determine the intra-prediction mode of the chroma block corresponding to the current block. The decoding device can also determine a luma intra-prediction mode used to determine the intra-prediction mode of the chroma block corresponding to the current block.

[0374] Here, the luma intra-prediction mode can be determined based on the prediction mode of the luma block corresponding to the chroma block, and can be identified by the parameters of lumaIntraPredMode or IntraPredModeY. For example, the luma intra-prediction mode can be used in the same manner as the reference mode described above.

[0375] In an embodiment, the decoding device may determine the luma intra-prediction mode based on whether the encoding mode of the current block is a matrix-based intra-prediction mode. For example, when the current block is a luma block to which a matrix-based intra-prediction mode is applied, the decoding device may determine the luma intra-prediction mode as a planar mode.

[0376] Alternatively, when the current block is a luma block for which a non-matrix intra-prediction mode is applied, the decoding device may determine the luma intra-prediction mode based on the intra-prediction mode of the current block.

[0377] Finally, the decoding device can determine the intra-prediction mode of the chroma block based on the luma intra-prediction mode. For example, the decoding device can determine the intra-prediction mode of the chroma block as the luma intra-prediction mode.

[0378] Figure 26 The experimental data is shown, and the experimental data is compared with the reference. Figure 18 The described coding rate when generating the MPM list is compared to the coding rate when the normal intra-prediction modes of neighboring blocks are converted to MIP modes, and all normal intra-prediction modes are mapped to MIP mode #0 according to the above mapping method to generate the MPM list for the current block's MIP mode. For example... Figure 26 As shown, there is no difference in encoding rate. In other words, by applying the above method, the algorithm complexity can be reduced while minimizing encoding loss and decreasing the memory usage for the mapping table.

[0379] Alternatively, the encoding and decoding apparatus according to the embodiments may use a simplified mapping table as shown in Table 4 below to convert the normal intra-frame prediction mode into MIP mode.

[0380] [Table 4]

[0381]

[0382] For example, the encoding and decoding apparatus according to the embodiment can map all normal intra-frame prediction modes to MIP mode #17, 0 or 1 based on the current block size (MipSizeId).

[0383] As mentioned above, the current block size 0 can refer to a 4x4 luminance block, the current block size 1 can refer to a 4x8, 8x4, or 8x8 luminance block, and the current block size 2 can refer to a luminance block larger than 8x8.

[0384] Alternatively, the encoding and decoding apparatus according to the embodiments may use a simplified mapping table as shown in Table 5 below to convert the normal intra-frame prediction mode into MIP mode.

[0385] [Table 5]

[0386]

[0387] For example, the encoding and decoding apparatus according to the embodiments can map all normal intra-prediction modes to MIP modes #5, 0, or 6 based on the current block size (MipSizeId). Alternatively, the encoding and decoding apparatus according to the embodiments can use a simplified mapping table as shown in Table 6 below to convert normal intra-prediction modes into MIP modes.

[0388] [Table 6]

[0389]

[0390] For example, the encoding and decoding apparatus according to the embodiment can map all normal intra-prediction modes to the MIP mode with the most likely selected rate for each block size, based on the current block size (MipSizeId). The encoding and decoding apparatus according to the embodiment can reduce algorithm complexity by using a simplified mapping table; however, in terms of block size comparison, a more complex mapping can be performed compared to the above-described mapping method that maps all normal intra-prediction modes to MIP modes without comparing block sizes.

[0391] Methods for generating MPM lists in MIP mode

[0392] As mentioned above, when the prediction mode of the current block is MIP mode, it is necessary to check the MIP modes of neighboring blocks to generate the MPM list of the current block. Figure 27 This is a flowchart illustrating a method for determining candidate MIP modes for configuring the MPM list of the current block according to an embodiment.

[0393] refer to Figure 27In this embodiment, even if the predicted mode of a neighboring block is a MIP mode (S2510), when the number of MIP modes that the current block and neighboring blocks can have is the same, that is, when the size of the current block and neighboring blocks is the same (S2520), the encoding and decoding devices can determine the MIP mode of the neighboring block as a candidate MIP mode for configuring the MPM list of the current block (S2530). For example, even if the predicted mode of a neighboring block is a MIP mode (S2510), when the number of MIP modes that the current block and neighboring blocks can have is different, that is, when the size of the current block and neighboring blocks is not the same (S2520), the encoding and decoding devices can determine the value of the candidate MIP mode for configuring the MPM list of the current block as -1 (S2540). The value of -1 for the candidate MIP mode can specify that the MIP mode value from the neighboring block cannot be used.

[0394] Additionally, when the prediction mode of neighboring blocks is not MIP mode (S2510), the encoding and decoding devices can proceed as described in the reference. Figure 18 As described Figure 18 Convert the normal intra-frame prediction mode into a candidate MIP mode (S2550).

[0395] As in Figure 27 Similar to the method described above, the encoding and decoding devices should always check the size of the current block and neighboring blocks when determining the candidate MIP mode for the current block by referring to neighboring blocks, and should do so as before when the predicted mode of a neighboring block is not a MIP mode. Figure 18 Performing the mapping as shown increases computational complexity.

[0396] To reduce computational complexity, the encoding and decoding apparatus according to the embodiment can check whether neighboring blocks are in MIP mode when generating the MPM list of the current block encoded or decoded in MIP mode, and determine candidate MIP modes accordingly. For example, when the encoding or decoding mode of a neighboring block is MIP mode, the encoding and decoding apparatus can set the candidate MIP mode to mode #0. Alternatively, when the encoding or decoding mode of a neighboring block is not MIP mode, the encoding and decoding apparatus can set the value of the MIP mode to -1. Therefore, since the encoding and decoding apparatus only need to check whether the MIP mode applies to neighboring blocks, the algorithm for determining candidate MIP modes can be simplified, and when a neighboring block is in normal intra-prediction mode, the mapping process for converting it to MIP mode can be skipped.

[0397] Simultaneously, the encoding and decoding devices can determine candidate MIP modes based on the size of the current block and neighboring blocks to improve prediction accuracy. For example, when the current block is in MIP mode, and the MPM list is generated by referring to neighboring blocks and the predicted mode of the neighboring blocks is MIP mode, the encoding and decoding devices can determine the candidate MIP mode as mipMpmCand[sizeId][0] by referring to Table 7 below. sizeId can refer to the size of the neighboring blocks; sizeId 0 can refer to a 4x4 luma block, sizeId 1 can refer to a 4x8, 8x4, or 8x8 luma block, and sizeId 2 can refer to a luma block larger than 8x8.

[0398] [Table 7]

[0399]

[0400] For example, the encoding and decoding devices can set the candidate MIP mode to #17 when the size of the neighboring block is 4x4, set the candidate MIP mode to #0 when the size of the neighboring block is 4x8, 8x4, or 8x8, and set the candidate MIP mode to #1 in other blocks. The encoding and decoding devices can improve the MPM mode accuracy by adaptively selecting a default candidate MIP mode based on the size of the neighboring blocks. Alternatively, to reduce computational complexity, the encoding and decoding devices according to the embodiment can select the candidate MIP mode without considering the encoding mode of the neighboring blocks and generate the MPM list by using it without change.

[0401] For example, when generating an MPM list for MIP mode, the encoding and decoding devices can determine the MPM list for MIP mode (e.g., candMipModeList[]) in a fixed manner, without considering the MIP mode of neighboring blocks. For example, when generating three MIP MPM lists, x can have values ​​from 0 to 2, so candMipModeList[x] can be configured with reference to Table 7 as follows. In this case, sizeId represents the size of neighboring blocks, but the encoding and decoding devices can determine sizeId based on the size of the current block in order to skip the process of referring to information about neighboring blocks.

[0402] candMipModeList[0]=mipMpmCand[sizeId][0]

[0403] candMipModeList[1]=mipMpmCand[sizeId][1]

[0404] candMipModeList[2]=mipMpmCand[sizeId][2]

[0405] Figure 28 The experimental data is shown, which is compared with the data obtained by means of... Figure 25 The coding rate when generating an MPM list to encode an image using the method determined by the candidate MIP modes is compared to the coding rate when the image is encoded by fixing the MPM list for the MIP modes as described above without considering the coding modes of neighboring blocks according to the above mapping method. Figure 28 As shown, there is no difference in encoding rate. In other words, by applying the above method, the algorithm complexity can be reduced while minimizing encoding loss and decreasing the memory usage for the mapping table.

[0406] In another embodiment, when generating an MPM list for MIP modes, the encoding and decoding devices can determine the MPM list for MIP modes (e.g., candMipModeList[]) based on the mode selection probability without considering the encoding modes 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 relative to Table 8 as follows. In sortedmipMpmCand[sizeId][x], candidate MIP modes can be stored for each block size based on the MIP mode selection probability. For example, the candidate MIP mode with the highest selection frequency in the corresponding sizeId can be stored in sortedmipMpmCand[sizeId][0], and the candidate MIP mode with the second highest selection frequency in the corresponding sizeId can be stored in sortedmipMpmCand[sizeId][1]. In this case, sizeId represents the size of neighboring blocks, but the encoding and decoding devices can determine sizeId based on the size of the current block in order to skip the process of referencing information about neighboring blocks.

[0407] candMipModeList[0]=sortedmipMpmCand[sizeId][0]

[0408] candMipModeList[1]=sortedmipMpmCand[sizeId][1]

[0409] candMipModeList[2]=sortedmipMpmCand[sizeId][2]

[0410] [Table 8]

[0411]

[0412] Application Examples

[0413] Although the exemplary methods of this disclosure described above are represented as a series of operations for clarity of description, they are not intended to limit the order in which the steps are performed, and these steps may be performed simultaneously or in different orders if necessary. To implement the method according to the invention, the described steps may further include other steps, including steps in addition to some steps, or may include additional steps in addition to some steps.

[0414] In this disclosure, the image encoding device or image decoding device that performs a predetermined operation (step) can perform an operation (step) that confirms the execution conditions or circumstances of the corresponding operation (step). For example, if it is described that a predetermined operation is performed when predetermined conditions are met, the image encoding device or image decoding device can perform the predetermined operation after determining whether the predetermined conditions are met.

[0415] The various embodiments disclosed herein are not a list of all possible combinations and are intended to describe representative aspects of the disclosure; the matters described in the various embodiments may be applied independently or in combination of two or more.

[0416] Various embodiments of this disclosure can be implemented in hardware, firmware, software, or a combination thereof. When this disclosure is implemented in hardware, it can be implemented using application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers, microprocessors, etc.

[0417] Furthermore, the image decoding and image encoding apparatuses applying embodiments of this disclosure can be included in multimedia broadcasting transmission and receiving devices, mobile communication terminals, home theater video devices, digital cinema video devices, surveillance cameras, video chat devices, real-time communication devices such as video communication, mobile streaming devices, storage media, cameras, video-on-demand (VoD) service providers, OTT video (over-the-top video) devices, internet streaming service providers, three-dimensional (3D) video devices, video telephony devices, medical video devices, etc., and can be used to process video signals or data signals. For example, OTT video devices can include game consoles, Blu-ray players, internet access televisions, home theater systems, smartphones, tablet PCs, digital video recorders (DVRs), etc.

[0418] Figure 29 This is a view illustrating a content streaming system to which embodiments of the present disclosure may be applied.

[0419] like Figure 29As shown, the content streaming system using embodiments of this disclosure may mainly include an encoding server, a streaming server, a network server, media storage, a user device, and a multimedia input device.

[0420] The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data to generate a bitstream and then sends the bitstream to the streaming server. As another example, when multimedia input devices such as smartphones, cameras, and camcorders generate the bitstream directly, the encoding server can be omitted.

[0421] The bitstream can be generated by the image encoding method or image encoding apparatus of the embodiments of this disclosure, and the streaming server can temporarily store the bitstream during the sending or receiving of the bitstream.

[0422] A streaming server sends multimedia data to a user device based on a user's request through a web server, and the web server acts as a medium for notifying the user of services. When a user requests a desired service from the web server, the web server can deliver it to the streaming server, and the streaming server can send the multimedia data to the user. In this scenario, the content streaming system may include a separate control server. In this case, the control server acts as a command / response controller between devices within the content streaming system.

[0423] A streaming server can receive content from media storage and / or encoding servers. For example, when content is received from an encoding server, it can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a predetermined period of time.

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

[0425] In a content streaming system, each server can operate as a distributed server, in which case the data received from each server can be distributed.

[0426] The scope of this disclosure includes software or executable commands (e.g., operating systems, applications, firmware, programs, etc.) for enabling the operation of methods according to various embodiments to be performed on a device or computer, and a non-transitory computer-readable medium having such software or commands stored thereon and executable on a device or computer.

[0427] Industrial applicability

[0428] The embodiments disclosed herein can be used to encode or decode images.

Claims

1. An image decoding method performed by an image decoding device, the image decoding method comprising: The most likely mode MPM candidate for the current block is determined based on the prediction patterns of neighboring blocks located around the current block; A list of MPMs for the current block is generated based on the MPM candidates; as well as The MPM candidate identified by the intra-prediction mode indicator among the multiple MPM candidates included in the MPM list is determined as the prediction mode for the current block. Wherein, the prediction mode based on either the current block or the neighboring blocks is a matrix-based intra-prediction mode, and the MPM candidate determined based on the prediction mode of the neighboring blocks is determined as a predetermined intra-prediction mode, and Wherein, without using a mapping table, the prediction mode based on the current block is a non-matrix intra-prediction mode and the prediction mode of the neighboring blocks is a matrix-based intra-prediction mode, the MPM candidate determined based on the prediction mode of the neighboring blocks is determined as a predetermined intra-prediction mode.

2. The image decoding method according to claim 1, wherein, The MPM candidate determined based on the prediction mode of the current block is a matrix-based intra-prediction mode and the prediction mode of the neighboring blocks is a non-matrix-based intra-prediction mode.

3. The image decoding method according to claim 2, wherein, The predetermined matrix-based intra-prediction mode is identified by specifying a predetermined index for the matrix-based intra-prediction mode.

4. The image decoding method according to claim 3, wherein, The predetermined index specifies the matrix-based intra-prediction mode that is used most frequently among a plurality of matrix-based intra-prediction modes.

5. The image decoding method according to claim 2, wherein, The predetermined matrix-based intra-frame prediction mode is determined based on the size of the current block.

6. The image decoding method according to claim 1, wherein, The predetermined intra-frame prediction mode is a planar mode.

7. The image decoding method according to claim 1, in, The MPM list is generated based on multiple MPM candidates. The plurality of MPM candidates are determined based on a plurality of neighboring blocks, and Among them, all prediction modes based on the multiple neighboring blocks are matrix-based prediction modes, and the MPM list is generated to include predetermined MPM candidates.

8. The image decoding method according to claim 7, wherein, The predetermined MPM candidate includes at least one of DC mode or vertical mode.

9. The image decoding method according to claim 1, comprising: Determine the intra-frame prediction mode for luminance, wherein the intra-frame prediction mode for luminance is used to determine the intra-frame prediction mode for chroma blocks corresponding to the current block; as well as The intra-prediction mode of the chroma block is determined based on the said intra-prediction mode of luma. Wherein, the current block is a luma block to which a matrix-based intra-frame prediction mode is applied, and the luma intra-frame prediction mode is determined to be a planar mode.

10. The image decoding method according to claim 9, wherein, The intra-frame prediction mode of the chroma block is determined to be the intra-frame prediction mode of the luminance.

11. The image decoding method according to claim 10, wherein, The current block is a luma block for which non-matrix intra-prediction is applied, and the luma intra-prediction mode is determined based on the intra-prediction mode of the current block.

12. An image encoding method performed by an image encoding device, the image encoding method comprising: The most likely mode MPM candidate for the current block is determined based on the prediction patterns of neighboring blocks located around the current block; A list of MPMs for the current block is generated based on the MPM candidates; as well as Based on the MPM list, a prediction mode indicator is determined that specifies the prediction mode for the current block. Wherein, the prediction mode based on either the current block or the neighboring blocks is a matrix-based intra-prediction mode, and the MPM candidate determined based on the prediction mode of the neighboring blocks is determined as a predetermined intra-prediction mode, and Wherein, without using a mapping table, the prediction mode based on the current block is a non-matrix intra-prediction mode and the prediction mode of the neighboring blocks is a matrix-based intra-prediction mode, the MPM candidate determined based on the prediction mode of the neighboring blocks is determined as a predetermined intra-prediction mode.

13. A method for transmitting a bitstream generated by an image encoding method, the image encoding method comprising: The most likely mode MPM candidate for the current block is determined based on the prediction patterns of neighboring blocks located around the current block; A list of MPMs for the current block is generated based on the MPM candidates; Based on the MPM list, a prediction mode indicator is determined to specify the prediction mode for the current block; as well as Send the bitstream including the prediction mode indicator. Wherein, the prediction mode based on either the current block or the neighboring blocks is a matrix-based intra-prediction mode, and the MPM candidate determined based on the prediction mode of the neighboring blocks is determined as a predetermined intra-prediction mode, and Wherein, without using a mapping table, the prediction mode based on the current block is a non-matrix intra-prediction mode and the prediction mode of the neighboring blocks is a matrix-based intra-prediction mode, the MPM candidate determined based on the prediction mode of the neighboring blocks is determined as a predetermined intra-prediction mode.