Intra Prediction-Based Image Coding Method and Apparatus Using an MPM List

The image decoding method addresses the challenge of compressing high-resolution images/videos by deriving MPM candidates from surrounding blocks to improve intra prediction efficiency, resulting in enhanced compression efficiency and reduced computational complexity.

JP7691537B2Active Publication Date: 2025-06-11BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024004609
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2018-10-09
Filing Date
2024-01-16
Publication Date
2025-06-11
Estimated Expiration
2039-10-04

AI Technical Summary

Technical Problem

The increasing demand for high-resolution and high-quality images/videos, such as 4K or 8K UHD, poses a challenge in efficiently compressing, transmitting, storing, and reproducing these images/videos due to the higher amount of information required.

Method used

An image decoding method and apparatus that derive MPM (Most Probable Mode) candidates for the current block based on surrounding blocks to form an MPM list, and use this list to determine an intra prediction mode for the current block, thereby reducing signaling overhead and improving coding efficiency.

Benefits of technology

The proposed method enhances overall image/video compression efficiency, reduces computational complexity, and improves the accuracy of the MPM list for representing intra prediction modes, leading to better coding efficiency and reduced signaling overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007691537000017
    Figure 0007691537000017
  • Figure 0007691537000018
    Figure 0007691537000018
  • Figure 0007691537000019
    Figure 0007691537000019
Patent Text Reader

Abstract

To provide an image decoding method.SOLUTION: An image decoding method according to this document includes: constructing a most probable mode (MPM) list by deriving MPM candidates for a current block based on a neighboring block adjacent to the current block; deriving an intra prediction mode for the current block based on the MPM list; generating predicted samples by performing prediction for the current block based on the intra prediction mode; and generating a reconstructed picture for the current block based on the predicted samples.SELECTED DRAWING: Figure 16
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to image coding technology, and more particularly, to an image decoding method and apparatus using intra prediction based on an MPM list.

Background Art

[0002] In recent years, the demand for high-resolution and high-quality images / videos such as 4K or 8K and above UHD (Ultra High Definition) images / videos has been increasing in various fields. As the image / video data becomes higher in resolution and quality, the amount of information or bits to be transmitted relatively increases compared to the existing image / video data. Therefore, when transmitting image data using a medium such as an existing wired or wireless broadband line or storing image / video data using an existing storage medium, the transmission cost and storage cost increase.

[0003] In addition, in recent years, the interest and demand for immersive media such as VR (Virtual Reality), AR (Artificial Reality) contents, and holograms have been increasing, and the broadcast of images / videos having image characteristics different from those of real images, such as game images, has been increasing.

[0004] Accordingly, there is a need for a highly efficient image / video compression technology to effectively compress, transmit, store, and reproduce the information of high-resolution and high-quality images / videos having various characteristics as described above.

Summary of the Invention

Problems to be Solved by the Invention

[0005] The technical problem of this document is to provide a method and apparatus for increasing image coding efficiency.

[0006] Another technical problem of this document is to provide an efficient intra prediction method and apparatus.

[0007] Still another technical problem of this document is to provide an image coding method and apparatus for deriving an MPM list for efficient intra prediction.

[0008] Still another technical problem of this document is to provide an image coding method and apparatus capable of reducing signaling overhead by efficiently coding information related to intra prediction.

Means for Solving the Problems

[0009] According to an embodiment of this document, an image decoding method performed by a decoding device is provided. The method includes steps of deriving MPM (Most Probable Mode) candidates for the current block based on surrounding blocks located around the current block to form an MPM list, deriving an intra prediction mode for the current block based on the MPM list, performing a prediction for the current block based on the intra prediction mode to generate a prediction sample, and generating a reconstructed picture for the current block based on the prediction sample. The step of deriving the intra prediction mode for the current block includes steps of obtaining MPM flag information indicating whether an intra prediction mode for the current block is included among the MPM candidates in the MPM list, when it is determined that the intra prediction mode for the current block is not included among the MPM candidates in the MPM list based on the MPM flag information, obtaining remaining mode information indicating the intra prediction mode for the current block among the remaining intra prediction modes excluding the MPM candidates, and deriving the intra prediction mode for the current block based on the remaining mode information, wherein the remaining mode information is obtained based on a binarization process.

[0010] According to another embodiment of the present document, an image encoding method performed by an encoding device is provided. The method includes steps of deriving MPM (Most Probable Mode) candidates for the current block based on surrounding blocks located around the current block to form an MPM list, determining an intra prediction mode for the current block, performing a prediction for the current block based on the intra prediction mode to generate a prediction sample, and encoding image information including the intra prediction mode information for the current block. The step of determining the intra prediction mode for the current block includes generating MPM flag information based on whether the intra prediction mode for the current block is included among the MPM candidates in the MPM list, and when it is determined that the intra prediction mode for the current block is not included among the MPM candidates in the MPM list based on the MPM flag information, generating remaining mode information indicating the intra prediction mode for the current block among the remaining intra prediction modes excluding the MPM candidates. The MPM flag information and the remaining mode information are included in and encoded with the intra prediction mode information, and the remaining mode information is encoded based on a binarization process.

Advantages of the Invention

[0011] According to the present document, the overall image / video compression efficiency can be improved.

[0012] According to the present document, the computational complexity can be reduced through efficient intra prediction, and the overall coding efficiency can be improved.

[0013] According to this document, considering the increase in the number of intra prediction modes, the MPM list can be efficiently constructed, and the accuracy of the MPM list for representing the intra prediction mode of the current block can be improved, thereby improving the overall coding efficiency.

[0014] According to this document, since information regarding the intra prediction mode can be efficiently coded, the signaling overhead can be reduced.

Brief Description of the Drawings

[0015]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

Figure 17

Embodiments for Carrying Out the Invention

[0016] This document can be modified in various ways and can have various embodiments. Specific embodiments are illustrated in the drawings and will be described in detail. However, this is not intended to limit this document to specific embodiments. The terms commonly used in this specification are used only to describe specific embodiments and are not intended to limit the technical idea of this document. Singular expressions include plural expressions unless the context clearly indicates otherwise. Terms such as "including" or "having" in this specification are intended to specify the existence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and it should be understood that the existence or addition possibility of one or more other features, numbers, steps, operations, components, parts, or combinations thereof, etc., is not precluded in advance.

[0017] On the one hand, each component in the drawings described in this document is independently illustrated for the convenience of explaining different characteristic functions and the like, and it does not mean that each component is realized by separate hardware or separate software. For example, among the components, two or more components can be combined to form one component, and one component can also be divided into a plurality of components. Embodiments in which the components are integrated and / or separated are included in the scope of rights of this document as long as they do not depart from the essence of this document.

[0018] Hereinafter, with reference to the accompanying drawings, the preferred embodiments of this document will be described in more detail. Hereinafter, for the same components on the drawings, the same reference numerals are used, and duplicate descriptions for the same components can be omitted.

[0019] FIG. 1 schematically shows an example of a video / image coding system that can be applied to an embodiment of this document.

[0020] As shown in FIG. 1, the video / image coding system can include a first device (source device) and a second device (receiver device). The source device can transmit encoded video / image information or data in a file or streaming form to the receiver device via a digital storage medium or a network.

[0021] The source device can include a video source, an encoding device, and a transmission unit. The receiver device can include a reception unit, a decoding device, and a renderer. The encoding device can be called a video / image encoding device, and the decoding device can be called a video / image decoding device. A transmitter can be included in the encoding device. A receiver can be included in the decoding device. The renderer can include a display unit, and the display unit can also be composed of a separate device or an external component.

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

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

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

[0025] The decoding device can decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, prediction, etc. corresponding to the operation of the encoding device.

[0026] The renderer can render the decoded video / image. The rendered video / image can be displayed via the display unit.

[0027] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to the methods disclosed in the VVC (versatile video coding) standard, EVC (essential video coding) standard, AV1 (AOMedia Video 1) standard, AVS2 (2nd generation of audio video coding standard), or next-generation video / image coding standards (such as H.267 or H.268, etc.).

[0028] This document presents various embodiments related to video / image coding, and unless otherwise stated, the embodiments can be combined with each other.

[0029] In this document, "video" can mean a collection of a series of images etc. as time flows. "Picture" generally means a unit representing one image in a specific time period, and "slice" / "tile" is a unit that constitutes a part of a picture in coding. A slice / tile can contain one or more CTUs (Coding Tree Units). One picture can be composed of one or more slices / tiles. One picture can be composed of one or more tile groups. One tile group can contain one or more tiles. A brick may represent a rectangular region of CTU rows within a tile in a picture. A tile may be partitioned into multiple bricks, each of which consisting of one or more CTU rows within the tile. A tile that is not partitioned into multiple bricks may be also referred to as a brick.A brick scan can represent a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a brick, bricks within a tile are ordered consecutively in a raster scan of the bricks of the tile, and tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A tile is a rectangular region of CTUs within a particular tile column and a particular tile row in a picture. The tile column is a rectangular region of CTUs having a height equal to the height of the picture and a width specified by syntax elements in the picture parameter set.The tile row is a rectangular region of CTUs having a width specified by syntax elements in the picture parameter set and a height equal to the height of the picture. A tile scan is a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in CTU raster scan in a tile whereas tiles in a picture are ordered consecutively in a raster scan of the tiles of the picture. A slice includes an integer number of bricks of a picture that may be exclusively contained in a single NAL unit. A slice may consists of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile.In this document, tile groups and slices can be used interchangeably. For example, in this document, a tile group / tile group header can be referred to as a slice / slice header.

[0030] A pixel or pel can mean the smallest unit that makes up one picture (or image). Also, as a term corresponding to a pixel, "sample" can be used. A sample can generally represent a pixel or the value of a pixel, can represent only the pixel / pixel value of the luma component, or can also represent only the pixel / pixel value of the chroma component. Or, a sample can mean the pixel value in the spatial domain, and if such a pixel value is converted to the frequency domain, it can also mean the conversion coefficient in the frequency domain.

[0031] A unit can represent the basic unit of image processing. A unit can include at least one of a specific region of a picture and information related to that region. One unit can include one luma block and two chroma (e.g., cb, cr) blocks. A unit can, in some cases, be used interchangeably with terms such as block or area. In a general case, an M×N block can include a set (or array) of samples (or sample array) consisting of M columns and N rows, or a set (or array) of transform coefficients.

[0032] In this document, the terms “ / ” and “、” are interpreted as “and / or.” For example, “A / B” is interpreted as “A and / or B,” and “A、B” is interpreted as “A and / or B.” Additionally, “A / B / C” means “at least one of A, B, and / or C.” Also, “A、B、C” also means “at least one of A, B, and / or C.”

[0033] Further, in this document, the term “or” is interpreted as “and / or.” For example, “A or B” can mean 1) only “A,” 2) only “B,” or 3) “A and B.” In other words, the “or” in this document can mean “additionally or alternatively.”

[0034] FIG. 2 is a diagram schematically illustrating the configuration of a video / image encoding apparatus that can be applied to the embodiments of this document. Hereinafter, the video encoding apparatus can include an image encoding apparatus.

[0035] As shown in FIG. 2, the encoding apparatus 200 can be configured to include an image partitioner (210), a predictor (220), a residual processor (230), an entropy encoder (240), an adder (250), a filtering unit (filter, 260), and a memory (memory, 270). The predictor 220 can include an inter-prediction unit 221 and an intra-prediction unit 222. The residual processor 230 can include a transformer (232), a quantizer (233), a dequantizer (234), and an inverse transformer (235). The residual processor 230 can further include a subtractor (231). The adder 250 can be called a reconstructor or a reconstructed block generator. The above-described image partitioner 210, predictor 220, residual processor 230, entropy encoder 240, adder 250, and filtering unit 260 can be configured by one or more hardware components (e.g., an encoder chipset or a processor) according to the embodiment. Also, the memory 270 can include a DPB (decoded picture buffer) and can also be configured by a digital storage medium. The hardware component can further include the memory 270 as an internal / external component.

[0036] The image segmentation unit 210 can divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing unit can be called a coding unit (CU). In this case, the coding unit can be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) by a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, one coding unit can be divided into a plurality of coding units with a deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure can be applied first, and the binary-tree structure and / or the ternary structure can be applied later. Or, the binary-tree structure can also be applied first. The coding procedure according to this document can be performed based on the final coding unit that cannot be further divided. In this case, based on the coding efficiency according to the image characteristics, etc., the largest coding unit can be used as the final coding unit as it is, or, if necessary, the coding unit can be recursively divided into coding units with a deeper depth, and the coding unit with the optimal size can be used as the final coding unit. Here, the coding procedure can include procedures such as prediction, transformation, and restoration described later. As another example, the processing unit can further include a prediction unit (PU: Prediction Unit) or a transform unit (TU: Transform Unit). In this case, the prediction unit and the transform unit can be divided or partitioned from the above-described final coding unit, respectively.The prediction unit may be a unit of sample prediction, and the conversion unit may be a unit for deriving a conversion coefficient and / or a unit for deriving a residual signal from the conversion coefficient.

[0037] The term "unit" can, in some cases, be used interchangeably with terms such as "block" or "area". In general, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luma component, or only the pixel / pixel value of the chroma component. A sample can be used as a term corresponding to a pixel or a pel for one picture (or image).

[0038] The encoding device 200 can subtract a prediction signal (predicted block, predicted sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, the unit that subtracts the prediction signal (predicted block, predicted sample array) from the input image signal (original block, original sample array) within the encoding device 200 can be called the subtraction unit 231. The prediction unit can perform prediction on a processing target block (hereinafter referred to as the current block) and generate a predicted block including predicted samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit can generate various pieces of information related to prediction, such as prediction mode information, and transmit them to the entropy encoding unit 240 as described later in the description of each prediction mode. The information related to prediction can be encoded by the entropy encoding unit 240 and output in the form of a bit stream.

[0039] The intra prediction unit 222 can predict the current block by referring to samples within the current picture. The samples to be referred to can be located in the vicinity (neighbor) of the current block depending on the prediction mode, or can also be located far away. In intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes can include, for example, the DC mode and the Planar Mode. The directional modes can include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the degree of fineness of the prediction direction. However, this is an example, and a greater or lesser number of directional prediction modes can be used depending on the setting. The intra prediction unit 222 can also determine the prediction mode to be applied to the current block using the prediction mode applied to the surrounding blocks.

[0040] The inter prediction unit 221 can derive a predicted block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of the motion information between the peripheral block and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the peripheral block can include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block can be the same or different. The temporal neighboring block can be called by names such as a collocated reference block and a collocated CU (colCU), and the reference picture including the temporal neighboring block can also be called a collocated picture (colPic). For example, the inter prediction unit 221 can construct a motion information candidate list based on the peripheral block and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction can be performed based on various prediction modes. For example, in the case of the skip mode and the merge mode, the inter prediction unit 221 can use the motion information of the peripheral block as the motion information of the current block. In the case of the skip mode, unlike the merge mode, the residual signal may not be transmitted.In the case of the motion information prediction (motion vector prediction, MVP) mode, the motion vector of the surrounding block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0041] The prediction unit 220 can generate a prediction signal based on various prediction methods described later. For example, for the prediction of one block, the prediction unit can apply not only intra prediction or inter prediction, but also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). Also, the prediction unit can be based on the intra block copy (IBC) prediction mode for the prediction of the block, or can be based on the palette mode. The IBC prediction mode or the palette mode can be used for content image / video coding such as games, for example, like SCC (screen content coding). IBC basically performs prediction within the current picture, but can be performed in the same way as inter prediction in terms of deriving a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, the sample values in the picture can be signaled based on the information regarding the palette table and the palette index.

[0042] The prediction signal generated via the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) can be used to generate a restored signal or can be used to generate a residual signal. The conversion unit 232 can generate transform coefficients by applying a conversion technique to the residual signal. For example, the conversion technique can include at least one of DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT means a conversion obtained from this graph when the relationship information between pixels is represented by a graph. CNT means a conversion obtained based on generating a prediction signal using all previously reconstructed pixels. Also, the conversion process can be applied to a pixel block having the same size of a square and can also be applied to a non-square, variable-size block.

[0043] The quantization unit 233 quantizes the transform coefficients and transmits them to the entropy encoding unit 240. The entropy encoding unit 240 can encode the quantized signal (information regarding the quantized transform coefficients) and output it as a bitstream. The information regarding the quantized transform coefficients can be referred to as residual information. The quantization unit 233 can reorder the block-form quantized transform coefficients in a one-dimensional vector form based on the coefficient scan order, and can also generate the information regarding the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit 240 can perform various encoding methods such as, for example, exponential Golomb, CAVLC (context-adaptive variable length coding), CABAC (context-adaptive binary arithmetic coding), etc. The entropy encoding unit 240 can encode, together or separately, in addition to the quantized transform coefficients, information necessary for video / image restoration (e.g., values of syntax elements, etc.). The encoded information (e.g., encoded video / image information) can be transmitted or stored in units of NAL (network abstraction layer) units in bitstream form. The video / image information can further include information regarding various parameter sets such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Also, the video / image information can further include general constraint information. In this document, the information and / or syntax elements transmitted / signaled from the encoding device to the decoding device can be included in the video / image information. The video / image information can be encoded through the above-described encoding procedure and included in the bitstream.The bitstream can be transmitted via a network or stored in a digital storage medium. Here, the network can include a broadcast network and / or a communication network, etc., and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The signal output from the entropy encoding unit 240 can be configured as an internal / external element of the encoding device 200 by a transmission unit (not shown) for transmission and / or a storage unit (not shown) for storage, or the transmission unit can also be included in the entropy encoding unit 240.

[0044] The quantized transform coefficients output from the quantization unit 233 can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients via the inverse quantization unit 234 and the inverse transformation unit 235, a residual signal (residual block or residual sample) can be restored. The addition unit 155 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the restored residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the block to be processed, as in the case where the skip mode is applied, the predicted block can be used as the reconstructed block. The addition unit 250 can be called a restoration unit or a reconstructed block generation unit. The generated reconstructed signal can be used for intra prediction of the next block to be processed within the current picture and, as will be described later, can also be used for inter prediction of the next picture after passing through filtering.

[0045] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture encoding and / or restoration process.

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

[0047] The modified restored picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 221. The encoding device can avoid prediction mismatches between the encoding device 200 and the decoding device and improve the encoding efficiency when inter prediction is applied through this.

[0048] The DPB of the memory 270 can store the modified restored picture for use as a reference picture in the inter prediction unit 221. The memory 270 can store the motion information of the block where the motion information in the current picture was derived (or encoded) and / or the motion information of the block in the already restored picture. The stored motion information can be transmitted to the inter prediction unit 221 for utilization as the motion information of the spatial neighboring blocks or the motion information of the temporal neighboring blocks. The memory 270 can store the restored samples of the restored blocks in the current picture and transmit them to the intra prediction unit 222.

[0049] FIG. 3 is a diagram schematically illustrating the configuration of a video / image decoding apparatus that can be applied to an embodiment of the present document.

[0050] As shown in FIG. 3, the decoding apparatus 300 can be configured to include an entropy decoder (310), a residual processor (320), a predictor (330), an adder (340), a filtering unit (filter, 350), and a memory (memoery, 360). The predictor 330 can include an inter-prediction unit 332 and an intra-prediction unit 331. The residual processor 320 can include a dequantizer (321) and an inverse transformer (322). The above-described entropy decoder 310, residual processor 320, predictor 330, adder 340, and filtering unit 350 can be configured by one hardware component (e.g., a decoder chipset or a processor) according to an embodiment. Also, the memory 360 can include a DPB (decoded picture buffer) and can also be configured by a digital storage medium. The hardware component can further include the memory 360 as an internal / external component.

[0051] If a bitstream including video / image information is input, the decoding device 300 can restore an image corresponding to the process in which the video / image information was processed by the encoding device in FIG. 2. For example, the decoding device 300 can derive units / blocks based on block partitioning related information obtained from the bitstream. The decoding device 300 can perform decoding using the processing units applied in the encoding device. Therefore, the processing unit for decoding can be, for example, a coding unit, and the coding unit can be divided according to a quad-tree structure, a binary tree structure, and / or a ternary tree structure from a coding tree unit or a maximum coding unit. One or more transform units can be derived from the coding unit. Then, the restored image signal decoded and output via the decoding device 300 can be played back via a playback device.

[0052] The decoding device 300 can receive the signal output from the encoding device in FIG. 2 in the form of a bitstream, and the received signal can be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information can further include information regarding various parameter sets such as an Adaptation Parameter Set (APS), a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), or a Video Parameter Set (VPS). Also, the video / image information can further include general constraint information. The decoding device can further decode a picture based on the information regarding the parameter set and / or the general constraint information. The signaling / received information and / or syntax elements described later in this document can be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 can decode the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the value of the syntax element necessary for image restoration and the quantized value of the transform coefficient regarding the residual. More specifically, the CABAC entropy decoding method receives the bin corresponding to each syntax element in the bitstream, determines a context model using the syntax element information to be decoded, the information of the surrounding and the block to be decoded, or the information of the symbol / bin decoded in the previous step, predicts the occurrence probability of the bin according to the determined context model, and performs arithmetic decoding of the bin to generate a symbol corresponding to the value of each syntax element. At this time, the CABAC entropy decoding method can update the context model using the information of the symbol / bin decoded for the context model of the next symbol / bin after determining the context model.Of the information decoded by the entropy decoding unit 310, the information related to prediction is provided to the prediction unit (inter prediction unit 332 and intra prediction unit 331), and the residual value obtained by performing entropy decoding in the entropy decoding unit 310, that is, the quantized transform coefficient and related parameter information, can be input to the residual processing unit 320. The residual processing unit 320 can derive a residual signal (residual block, residual sample, residual sample array). Also, of the information decoded by the entropy decoding unit 310, the information related to filtering can be provided to the filtering unit 350. On the other hand, a receiving unit (not shown) that receives the signal output from the encoding device can be further configured as an internal / external element of the decoding device 300, or the receiving unit can be a component of the entropy decoding unit 310. On the other hand, the decoding device according to this document can be called a video / image / picture decoding device, and the decoding device can be classified into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder can include the entropy decoding unit 310, and the sample decoder can include at least one of the inverse quantization unit 321, inverse transform unit 322, addition unit 340, filtering unit 350, memory 360, inter prediction unit 332, and intra prediction unit 331.

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

[0054] In the inverse conversion unit 322, the conversion coefficients are inversely converted to obtain a residual signal (residual block, residual sample array).

[0055] The prediction unit can perform prediction on the current block and generate a predicted block including predicted samples for the current block. The prediction unit can determine whether intra prediction or inter prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit 310, and can determine a specific intra / inter prediction mode.

[0056] The prediction unit 320 can generate a prediction signal based on various prediction methods described later. For example, the prediction unit can apply not only intra prediction or inter prediction for predicting one block, but also can apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP). Also, the prediction unit can be based on the intra block copy (IBC) prediction mode or the palette mode for predicting a block. The IBC prediction mode or the palette mode can be used for content image / video coding such as games, for example, like SCC (screen content coding). IBC basically performs prediction within the current picture, but can be performed in the same way as inter prediction in terms of deriving a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in this document. The palette mode can be regarded as an example of intra coding or intra prediction. When the palette mode is applied, information regarding the palette table and the palette index can be included in and signaled in the video / image information.

[0057] The Intra Prediction Unit 331 can predict the current block by referring to samples within the current picture. The samples to be referred can be located in the neighborhood of the current block according to the prediction mode, or can also be located remotely. In intra prediction, the prediction mode can include a plurality of non - directional modes and a plurality of directional modes. The Intra Prediction Unit 331 can also determine the prediction mode to be applied to the current block by using the prediction mode applied to the neighboring blocks.

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

[0059] The adder 340 can generate a restored signal (restored picture, restored block, restored sample array) by adding the acquired residual signal to the predicted signal (predicted block, predicted sample array) output from the prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for the block to be processed, as in the case where the skip mode is applied, the predicted block can be used as the restored block.

[0060] The adder 340 can be referred to as a restoration unit or a restored block generation unit. The generated restored signal can be used for intra prediction of the next block to be processed in the current picture, can be output after filtering as described later, or can also be used for inter prediction of the next picture.

[0061] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture decoding process.

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

[0063] The (corrected) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter prediction unit 332. The memory 360 can store the motion information of the block from which the motion information in the current picture has been derived (or decoded) and / or the motion information of the blocks in the already reconstructed picture. The stored motion information can be transmitted to the inter prediction unit 332 for utilization as the motion information of spatially neighboring blocks or temporally neighboring blocks. The memory 360 can store the reconstructed samples of the reconstructed blocks in the current picture and can transmit them to the intra prediction unit 331.

[0064] In this specification, the embodiments described in the filtering unit 260, the inter prediction unit 221, and the intra prediction unit 222 of the encoding device 200 can be applied identically or correspondingly to the filtering unit 350, the inter prediction unit 332, and the intra prediction unit 331 of the decoding device 300, respectively.

[0065] As described above, in performing video coding, prediction is performed to improve the compression efficiency. Through this, a predicted block including prediction samples for the current block, which is the block to be coded, can be generated. Here, the predicted block includes prediction samples in the spatial domain (or pixel domain). The predicted block is derived in the same way in the encoding device and the decoding device, and the encoding device can improve the image coding efficiency by signaling to the decoding device information (residual information) regarding the residual between the original block and the predicted block, which is not the original sample value of the original block itself. The decoding device can derive a residual block including residual samples based on the residual information, and can generate a reconstructed block including the reconstructed samples by combining the residual block and the predicted block, and can generate a reconstructed picture including the reconstructed block.

[0066] The residual information can be generated through conversion and quantization procedures. For example, an encoding device can derive a residual block between the original block and the predicted block, perform a conversion procedure on the residual samples (residual sample array) included in the residual block to derive conversion coefficients, perform a quantization procedure on the conversion coefficients to derive quantized conversion coefficients, and signal the related residual information (via a bitstream) to a decoding device. Here, the residual information can include information such as the value information, position information, conversion technique, conversion kernel, quantization parameter, etc. of the quantized conversion coefficients. The decoding device can perform an inverse quantization / inverse conversion procedure based on the residual information to derive residual samples (or a residual block). The decoding device can generate a restored picture based on the predicted block and the residual block. The encoding device can further, afterwards, inverse quantize / inverse transform the quantized conversion coefficients to derive a residual block for reference for inter-prediction of a picture, and generate a restored picture based on this.

[0067] FIG. 4 shows an example of an image encoding method performed by a video encoding device.

[0068] As shown in FIG. 4, the image encoding method can include block partitioning, intra / inter prediction, transform, quantization, and entropy encoding processes. For example, the current picture can be divided into a plurality of blocks, a predicted block of the current block can be generated through intra / inter prediction, and a residual block of the current block can be generated through subtraction between the input block of the current block and the predicted block. Then, a coefficient block, that is, the transform coefficient of the current block, can be generated through transform on the residual block. The transform coefficient can be quantized and entropy encoded and stored in a bitstream.

[0069] FIG. 5 shows an example of an image decoding method performed by a decoding device.

[0070] As shown in FIG. 5, the image decoding method can include entropy decoding, inverse quantization, inverse transform, and intra / inter prediction processes. For example, in the decoding device, the reverse process of the above-described encoding method can be performed. Specifically, the quantized transform coefficient can be obtained through entropy decoding on the bitstream, and the coefficient block of the current block, that is, the transform coefficient, can be obtained through the inverse quantization process on the quantized transform coefficient. The residual block of the current block can be derived through inverse transform on the transform coefficient, and the reconstructed block of the current block can be derived through addition between the predicted block of the current block derived through intra / inter prediction and the residual block.

[0071] On the one hand, when intra prediction is performed, the correlation between samples can be utilized, and the difference between the original block and the predicted block, i.e., the residual, can be obtained. The above-mentioned transformation and quantization can be applied to the residual, through which spatial redundancy can be removed. Hereinafter, the encoding method and decoding method using intra prediction will be specifically described.

[0072] Intra prediction refers to a prediction that generates prediction samples for a current block based on reference samples outside the current block within a picture (hereinafter referred to as the current picture) including the current block. Here, the reference samples outside the current block can refer to samples located around the current block. When intra prediction is applied to the current block, neighboring reference samples used for intra prediction of the current block can be derived.

[0073] For example, when the size (width × height) of the current block is nW × nH, the neighboring reference samples of the current block can include a total of 2 × nH samples adjacent to the left boundary of the current block and adjacent to the bottom - left, samples adjacent to the top boundary of the current block, and a total of 2 × nW samples adjacent to the top - right, and 1 sample adjacent to the top - left of the current block. Or, the neighboring reference samples of the current block can also include a plurality of rows of upper neighboring samples and a plurality of columns of left neighboring samples. Also, the neighboring reference samples of the current block can include a total of nH samples adjacent to the right boundary of the current block with a size of nW × nH, a total of nW samples adjacent to the bottom boundary of the current block, and 1 sample adjacent to the bottom - right of the current block.

[0074] However, some of the neighboring reference samples of the current block may not have been decoded yet or may not be available. In this case, the decoding device can substitute the unavailable samples with available samples and configure the neighboring reference samples used for prediction. Alternatively, the neighboring reference samples used for prediction can be configured through interpolation of the available samples.

[0075] When the 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 also be derived based on the reference samples existing in a specific (prediction) direction with respect to the predicted sample among the neighboring reference samples of the current block. In the case of (i), it can be applied when the intra prediction mode is a non-directional mode or a non-angle mode, and in the case of (ii), it can be applied when the intra prediction mode is a directional mode or an angular mode.

[0076] Also, among the peripheral reference samples, a prediction sample can be generated through interpolation between a first peripheral sample located in the prediction direction of the intra prediction mode of the current block based on the prediction sample of the current block and a second peripheral sample corresponding to the first peripheral sample. The second peripheral sample can be a sample located in the direction opposite to the prediction direction of the intra prediction mode of the current block. In the above-described case, it can be called linear interpolation intra prediction (LIP). Also, a temporary prediction sample of the current block is derived based on the filtered peripheral reference samples, and a prediction sample of the current block can be derived by performing a weighted sum of at least one reference sample derived by the intra prediction mode and the temporary prediction sample among the existing peripheral reference samples, that is, the peripheral reference samples that have not been filtered. In the above-described case, it can be called PDPC (Position dependent intra prediction). On the other hand, post-filtering of the derived prediction sample can be performed as needed.

[0077] Specifically, the intra prediction procedure can include an intra prediction mode determination step, a peripheral reference sample derivation step, and an intra prediction mode-based prediction sample derivation step. Also, a post-filtering step for the derived prediction sample can be performed as needed.

[0078] FIG. 6 shows an example of an image encoding method based on intra prediction, and FIG. 7 schematically shows an intra prediction unit in an encoding device. The intra prediction unit in the encoding device of FIG. 7 can be applied to be identical or corresponding to the intra prediction unit 222 of the encoding device 200 in FIG. 2 described above.

[0079] As shown in FIGS. 6 and 7, S600 can be performed by the intra prediction unit 222 of the encoding device, and S610 can be performed by the residual processing unit 230 of the encoding device. Specifically, S610 can be performed by the subtraction unit 231 of the encoding device. In S620, the prediction information can be derived by the intra prediction unit 222 and encoded by the entropy encoding unit 240. In S620, the residual information can be derived by the residual processing unit 230 and encoded by the entropy encoding unit 240. The residual information is information regarding the residual samples. The residual information can include information regarding the quantized transform coefficients for the residual samples. As described above, the residual samples can be derived as transform coefficients via the transform unit 232 of the encoding device, and the transform coefficients can be derived as quantized transform coefficients via the quantization unit 233. The information regarding the quantized transform coefficients can be encoded by the entropy encoding unit 240 via the residual coding procedure.

[0080] The encoding device can perform intra prediction on the current block (S600). The encoding device can derive an intra prediction mode for the current block, derive peripheral reference samples of the current block, and generate prediction samples within the current block based on the intra prediction mode and the peripheral reference samples. Here, the intra prediction mode determination, peripheral reference sample derivation, and prediction sample generation procedures can be performed simultaneously, or any one of the procedures can be performed prior to the other procedures.

[0081] As one embodiment, the intra prediction unit 222 of the encoding device may include a prediction mode determination unit 223, a reference sample derivation unit 224, and a prediction sample derivation unit 225. The prediction mode determination unit 223 determines the intra prediction mode for the current block, the reference sample derivation unit 224 derives the peripheral reference samples of the current block, and the prediction sample derivation unit 225 can derive the prediction samples of the current block. On the other hand, although not shown in the figure, when the prediction sample filtering procedure described later is performed, the intra prediction unit 222 may further include a prediction sample filter unit (not shown). The encoding device can determine the mode to be applied to the current block among a plurality of intra prediction modes. The encoding device can compare the RD cost for the intra prediction mode and determine the optimal intra prediction mode for the current block.

[0082] As described above, the encoding device can also perform a prediction sample filtering procedure. Prediction sample filtering can be called post-filtering. Some or all of the prediction samples can be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure can be omitted.

[0083] The encoding device can generate residual samples for the current block based on the (filtered) prediction samples (S610). The encoding device can encode image information including prediction mode information representing the intra prediction mode and residual information regarding the residual samples (S620). The encoded image information can be output in the form of a bitstream. The output bitstream can be transmitted to the decoding device via a storage medium or a network.

[0084] As described above, the encoding device can generate a reconstructed picture (including reconstructed samples and reconstructed blocks) based on predicted samples and residual samples. This is to derive from the encoding device the same prediction result as that performed by the decoding device, and through this, the coding efficiency can be improved. Also, as described above, an in-loop filtering procedure or the like can be further applied to the reconstructed picture.

[0085] FIG. 8 shows an example of an intra prediction-based image decoding method, and FIG. 9 schematically shows an intra prediction unit in the decoding device. The intra prediction unit in the decoding device shown in FIG. 9 can be applied to be identical or corresponding to the intra prediction unit 331 of the decoding device 300 shown in FIG. 3 described above.

[0086] As shown in FIGS. 8 and 9, the decoding device can perform operations corresponding to the operations performed by the encoding device described above. The decoding device can perform a prediction for the current block based on the received prediction information and derive predicted samples.

[0087] S800 to S820 can be performed by the intra prediction unit 331 of the decoding device, and the residual information of S830 can be obtained from the bitstream by the entropy decoding unit 310 of the decoding device. The residual processing unit 320 of the decoding device can derive residual samples for the current block based on the residual information. Specifically, the inverse quantization unit 321 of the residual processing unit performs inverse quantization based on the quantized transform coefficients derived based on the residual information to derive transform coefficients, and the inverse transform unit 322 of the residual processing unit 320 can perform an inverse transform on the transform coefficients to derive residual samples for the current block. S840 can be performed by the addition unit 340 or the restoration unit of the decoding device.

[0088] The decoding device can derive an intra prediction mode for the current block based on the received prediction mode information (S800). The decoding device can derive the peripheral reference samples of the current block (S810). The decoding device can generate prediction samples within the current block based on the intra prediction mode and the peripheral reference samples (S820). In this case, the decoding device can perform a prediction sample filtering procedure. Prediction sample filtering can be referred to as post-filtering. Some or all of the prediction samples can be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure can be omitted.

[0089] The decoding device can generate residual samples for the current block based on the received residual information (S830). The decoding device can generate restored samples for the current block based on the (filtered) prediction samples and the residual samples, and generate a restored picture based on this (S840).

[0090] As an embodiment, the intra prediction unit 331 of the decoding device can include a prediction mode determination unit 333, a reference sample derivation unit 334, and a prediction sample derivation unit 335. The prediction mode determination unit 333 determines the intra prediction mode for the current block based on the prediction mode information received by the prediction mode determination unit 223 of the encoding device. The reference sample derivation unit 334 derives the peripheral reference samples of the current block, and the prediction sample derivation unit 335 can derive the prediction samples of the current block. On the other hand, for example, although not shown in the figure, when the above-described prediction sample filtering procedure is performed, the intra prediction unit 331 can further include a prediction sample filter unit (not shown).

[0091] On the one hand, when performing intra prediction, prediction mode information can be determined according to whether the Most Probable Mode (MPM) is applied to the current block. For example, the prediction mode information can include flag information (ex.prev_intra_luma_pred_flag) indicating whether the MPM (Most Probable Mode) is applied to the current block or whether the remaining mode is applied. When the MPM is applied to the current block, the prediction mode information can further include index information (ex.mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). At this time, the intra prediction mode candidates (MPM candidates) can be composed of an MPM candidate list or an MPM list. When the MPM is not applied to the current block, the prediction mode information can further include remaining mode information (ex.rem_inra_luma_pred_mode) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The decoding device can determine the intra prediction mode of the current block based on the prediction mode information. At this time, the prediction mode information can be encoded / decoded through the coding method described later. For example, the prediction mode information can be encoded / decoded through entropy coding (ex.CABAC, CAVLC) based on the truncated (rice) binary code.

[0092] Also, when intra prediction is applied, in determining prediction mode information, the intra prediction mode applied to the current block can be determined using the intra prediction modes of neighboring blocks. For example, the decoding device can derive MPM (Most Probable Mode) candidates based on the intra prediction modes of the left block and the upper block of the current block, and can select one of the MPM candidates based on the MPM index (e.g., mpm_idx). Alternatively, one of the remaining intra prediction modes not included in the MPM candidates can be selected based on the remaining intra prediction mode information (e.g., rem_inra_luma_pred_mode). The MPM index can be signaled in the form of the mpm_idx syntax element, and the remaining intra prediction mode information can be signaled in the form of the rem_intra_luma_pred_mode syntax element. For example, the remaining intra prediction mode information can index the remaining intra prediction modes not included in the MPM candidates in ascending order of prediction mode numbers and point to one of them.

[0093] The intra prediction mode can include a non-directional (or non-angular) intra prediction mode and a directional (or angular) intra prediction mode. For example, in the HEVC standard, an intra prediction mode including two non-directional prediction modes and 33 directional prediction modes is used. The non-directional prediction modes can include the planar intra prediction mode numbered 0 and the DC intra prediction mode numbered 1, and the directional prediction modes can include the intra prediction modes numbered 2 to 34. The planar intra prediction mode can be called the planar mode, and the DC intra prediction mode can be called the DC mode.

[0094] Alternatively, in order to capture any edge direction presented in a natural video, the directional intra prediction mode can be extended from the existing 33 to 65, as shown in FIG. 10 described below. In this case, the intra prediction mode can include two non-directional intra prediction modes and 65 directional intra prediction modes. The non-directional intra prediction modes can include the planar intra prediction mode numbered 0 and the DC intra prediction mode numbered 1, and the directional intra prediction modes can include the intra prediction modes numbered 2 to 66. The extended directional intra prediction modes can be applied to blocks of all sizes and can be applied to both the luma component and the chroma component. However, this is an example, and the embodiments of this document can also be applied when the number of intra prediction modes is different. Optionally, an intra prediction mode numbered 67 can be further used, and the intra prediction mode numbered 67 can represent the LM (linear model) mode.

[0095] FIG. 10 exemplarily shows 65 directional intra prediction modes.

[0096] As shown in FIG. 10, intra prediction modes having horizontal directionality and intra prediction modes having vertical directionality can be classified centering on the 34th intra prediction mode having a diagonal prediction direction toward the upper left. In FIG. 10, H and V respectively represent horizontal directionality and vertical directionality, and the numbers from -32 to 32 represent displacements in 1 / 32 unit on a sample grid position. The 2nd to 33rd intra prediction modes have horizontal directionality, and the 34th to 66th intra prediction modes have vertical directionality. The 18th intra prediction mode and the 50th intra prediction mode respectively represent a horizontal intra prediction mode and a vertical intra prediction mode. The 2nd intra prediction mode can be called a diagonal intra prediction mode toward the lower left, the 34th intra prediction mode can be called a diagonal intra prediction mode toward the upper left, and the 66th intra prediction mode can be called a diagonal intra prediction mode toward the upper right.

[0097] As described above, generally when block division is performed on a picture, the current block to be coded and the surrounding blocks come to have similar image characteristics. Therefore, the probability that the current block and the surrounding blocks are identical to each other or have similar intra prediction modes is high. Due to such image characteristics, the intra prediction mode of the current block can be derived using the intra prediction mode of the surrounding blocks. This can be referred to as MPM (Most Probable Modes). That is, MPM can mean a mode used to improve coding efficiency in consideration of the similarity between the current block and the surrounding blocks during intra prediction mode coding.

[0098] For example, an encoding / decoding device can construct a MPM (Most Probable Modes) list for a current block. The MPM list can also be referred to as an MPM candidate list. At this time, considering the complexity of MPM list generation, an MPM list including predetermined MPM candidates can be constructed. For example, the MPM list can include 3 MPM candidates, 5 MPM candidates, or 6 MPM candidates. As an embodiment, the MPM list can include MPM candidates derived based on the intra prediction mode of neighboring blocks, the derived intra prediction mode, and / or the default intra prediction mode. Here, when deriving MPM candidates from neighboring blocks, the encoding device / decoding device searches for the neighboring blocks of the current block according to a specific order, derives the intra prediction mode of the neighboring blocks, and can use this as an MPM candidate based on the derived order. For example, the neighboring blocks can include at least one of the left neighboring block, upper neighboring block, lower left neighboring block, upper right neighboring block, and upper left neighboring block of the current block. If the intra prediction mode for the current block is not included among the MPM candidates in the MPM list, a remaining mode can be used. In this case, the remaining mode is a mode that uses the remaining intra prediction modes excluding the MPM candidates among all the intra prediction modes, and the remaining intra prediction mode information can be coded and signaled. The remaining intra prediction mode information can be information indicating the intra prediction mode applied to the current block among the remaining intra prediction modes excluding the MPM candidates. For example, when using 67 intra prediction modes, the remaining intra prediction mode information can include a 6-bit syntax element (e.g., the rem_intra_luma_pred_mode syntax element).

[0099] As described above, in the HEVC standard, 35 intra prediction modes are used during intra prediction. In this case, an MPM list including three MPM candidates is configured. Here, the three MPM candidates can be derived based on the intra prediction modes of the neighboring blocks F and G. The neighboring blocks of the current block including the neighboring blocks F and G can be as described below.

[0100] FIG. 11 exemplarily shows the neighboring blocks of the current block.

[0101] As shown in FIG. 11, the neighboring blocks of the current block can include neighboring block A, neighboring block B, neighboring block C, neighboring block D, neighboring block E, neighboring block F, and / or neighboring block G.

[0102] Here, neighboring block A can represent the neighboring block located at the upper left of the upper left sample position of the current block. Neighboring block B can represent the neighboring block located at the upper side of the upper right sample position of the current block. Neighboring block C can represent the neighboring block located at the upper right of the upper right sample position of the current block. Neighboring block D can represent the neighboring block located at the left side of the lower left sample position of the current block. Neighboring block E can represent the neighboring block located at the lower left of the lower left sample position of the current block. Neighboring block G can represent the neighboring block located at the upper side of the upper left sample position of the current block. Neighboring block F can represent the neighboring block located at the left side of the upper left sample position of the current block.

[0103] For example, when the size of the current block is W×H and the x component of the top-left sample position of the current block is 0 and the y component is 0, the neighboring block A is a block including the sample at the (-1, -1) left mark, the neighboring block B is a block including the sample at the (W - 1, -1) left mark, the neighboring block C is a block including the sample at the (W, -1) left mark, the neighboring block D is a block including the sample at the (-1, H - 1) left mark, the neighboring block E is a block including the sample at the (-1, H) left mark, the neighboring block F is a block including the sample at the (-1, 0) left mark, and the neighboring block G can be a block including the sample at the (0, -1) left mark.

[0104] According to the HEVC standard, three MPM candidates can be derived based on the intra prediction mode of the neighboring block F and the intra prediction mode of the neighboring block G. For example, the intra prediction mode of the neighboring block F and the intra prediction mode of the neighboring block G can be derived. On the other hand, in the following cases, the intra prediction mode of the neighboring block F or the intra prediction mode of the neighboring block G can be derived as the DC intra prediction mode.

[0105] 1) When the neighboring block F or the neighboring block G is not available

[0106] 2) When the neighboring block F or the neighboring block G is not coded in the intra prediction mode (i.e., when the neighboring block F or the neighboring block G is not an intra coded block)

[0107] 3) When the neighboring block F or the neighboring block G is outside the current coding tree unit (CTU)

[0108] As described above, when the intra prediction mode of the neighboring block F or the intra prediction mode of the neighboring block G is determined, the three MPM candidates can be derived as shown in Table 1 below.

[0109]

Table 1

[0110] Table 1 illustratively shows a schematic algorithm (i.e., pseudo code) that constitutes an MPM list. By referring to Table 1, it can be determined whether the intra prediction mode of peripheral block F and the intra prediction mode of peripheral block G are the same.

[0111] If the intra prediction mode of peripheral block F and the intra prediction mode of peripheral block G are the same, and the mode number of the intra prediction mode of peripheral block F is less than 2, the MPM list of the current block can be derived as MPM list 1. That is, if the intra prediction mode of peripheral block F and the intra prediction mode of peripheral block G are the same, and the intra prediction mode of peripheral block F is the 0th intra prediction mode or the 1st intra prediction mode, the MPM list of the current block can be derived as MPM list 1. Here, MPM list 1 can represent an MPM list composed of MPM candidates {F, F - 1, F + 1}. F can represent the intra prediction mode of peripheral block F, F - 1 can represent the intra prediction mode whose mode number is the value obtained by subtracting 1 from the mode number of the intra prediction mode of peripheral block F, and F + 1 can represent the intra prediction mode whose mode number is the value obtained by adding 1 to the mode number of the intra prediction mode of peripheral block F. For example, if the intra prediction mode of peripheral block F is the Nth intra prediction mode, MPM list 1 can be composed of an MPM list that includes the Nth intra prediction mode, the (N - 1)th intra prediction mode, and the (N + 1)th intra prediction mode as MPM candidates.

[0112] Also, when the intra prediction mode of the peripheral block F and the intra prediction mode of the peripheral block G are the same and the mode number of the intra prediction mode of the peripheral block F is not less than 2, the MPM list of the current block can be derived as MPM list 2.

[0113] Also, when the intra prediction mode of the peripheral block F and the intra prediction mode of the peripheral block G are not the same and the intra prediction modes of the peripheral block F and the peripheral block G are not planar intra prediction modes, the MPM list of the current block can be derived as MPM list 3.

[0114] Also, when the intra prediction mode of the peripheral block F and the intra prediction mode of the peripheral block G are not the same and the sum of the mode numbers of the intra prediction mode of the peripheral block F and the intra prediction mode of the peripheral block G is less than 2, the MPM list of the current block can be derived as MPM list 4.

[0115] Also, when the intra prediction mode of the peripheral block F and the intra prediction mode of the peripheral block G are not the same and at least one of the intra prediction modes of the peripheral block F and the peripheral block G is a planar intra prediction mode and the sum of the mode numbers of the intra prediction mode of the peripheral block F and the intra prediction mode of the peripheral block G is not less than 2, the MPM list of the current block can be derived as MPM list 5.

[0116] On the one hand, as the number of intra prediction modes increases, the number of MPM candidates needs to be increased. Thus, the number of MPM candidates can vary depending on the number of intra prediction modes. Generally, as the number of intra prediction modes increases, the number of MPM candidates can increase. However, it is not always the case that as the number of intra prediction modes increases, the number of MPM candidates increases. For example, when there are 35 intra prediction modes or 67 intra prediction modes, depending on the design, it can have various numbers of MPM candidates such as 3, 4, 5, or 6.

[0117] For example, a 6MPM list configuration can be performed. That is, an MPM list including 6 MPM candidates can be configured. For example, the 6MPM list configuration can perform a process of searching for the positions of various surrounding blocks and a continuous pruning check process for excluding the same intra prediction mode. As an example, the order of configuring 6 MPM candidates can be as follows.

[0118] Surrounding block D, surrounding block B, planar intra prediction mode, DC intra prediction mode, surrounding block E, surrounding block C, and surrounding block A.

[0119] That is, the intra prediction mode of surrounding block D, the intra prediction mode of surrounding block B, the planar intra prediction mode, the DC intra prediction mode, the intra prediction mode of surrounding block E, the intra prediction mode of surrounding block C, and the intra prediction mode of surrounding block A can be derived as MPM candidates in this order, and if it is the same as the already derived intra prediction mode, it may not be derived as an MPM candidate.

[0120] Also, when the MPM list does not include the MPM candidates of the maximum candidate number, that is, when the number of derived MPM candidates is smaller than the maximum candidate number, the directional intra prediction mode adjacent to the derived MPM candidate and the predefined default intra prediction mode can be considered as MPM candidates, and the pruning check processes can be performed together. Here, the directional intra prediction mode adjacent to the MPM candidate can represent the intra prediction mode whose mode number is adjacent to the MPM candidate. The above-mentioned peripheral block search and continuous pruning check are advantageous for bit transmission rate saving, but can increase the number of hardware operation cycles for the MPM list configuration of each block. The worst scenario may be that a 3840×2160 4K image may be divided into 4×4 size blocks for intra prediction, and in this case, the increased hardware operation cycles for each 4×4 size block can be importantly considered for throughput. On the other hand, when the peripheral block coded for inter prediction knows the intra prediction mode of the peripheral block, the intra prediction mode of the peripheral block can be used for the MPM list configuration.

[0121] As described above, when constructing the MPM list, the encoding device determines the best intra prediction mode by simultaneously optimizing the bit rate and distortion, and can code the determined best intra prediction mode as a bit stream. The decoding device can parse (decode) the intra prediction mode included in the bit stream and perform intra prediction based on the parsed intra prediction mode. However, in order to minimize the signaling overhead as the number of intra prediction modes increases, efficient intra mode coding is required. The MPM list is constructed using the neighboring intra prediction modes of the blocks coded in both the encoding device and the decoding device. At this time, when the best intra prediction mode is one of the candidates in the MPM list, the overhead can be minimized by signaling the MPM index. The length of the MPM list and the method of constructing the MPM list can vary depending on the algorithm.

[0122] However, when 67 intra prediction modes are used for intra prediction, the MPM list including the existing three MPM candidates may not be sufficient to represent the diversity of the multiple intra prediction modes. In addition, the 6MPM list construction scheme including the neighboring block search and pruning check processes is too complex and may affect the processing volume. Accordingly, the embodiments of this document propose an efficient MPM list construction scheme having an appropriate balance between complexity and coding efficiency.

[0123] FIG. 12 and FIG. 13 are flowcharts schematically showing a method of constructing an MPM list for a current block.

[0124] As shown in FIGS. 12 and 13, an MPM list for a current block including k MPM candidates can be configured. Here, k can represent the length of the MPM list, that is, the number of MPM candidates included in the MPM list. According to the embodiments disclosed in FIGS. 12 and 13, five efficient MPM lists (MPM list 1 to MPM list 5) can be configured based on five conditions. That is, based on the five conditions, one of the five MPM lists can be derived as the MPM list for the current block. The MPM list can be an independent list as shown in FIG. 12, or can also be a list having a partially shared portion as shown in FIG. 13. As shown in FIG. 13, if a shared partial list is used, a duplication process can be avoided. The five conditions can be modeled such that the sum of the probabilities of all the conditions is 1.

[0125] FIG. 14 is a flowchart showing an embodiment of a method for configuring an MPM list for a current block.

[0126] In FIG. 14, an example of a method for efficiently configuring an MPM list for a current block including k MPM candidates based on peripheral blocks located around the current block is illustratively shown. For example, k can be 6, and among the five efficient lists, five conditions can be used to configure the MPM list for the current block. In FIG. 14, L can represent the intra prediction mode of the peripheral block B shown in FIG. 11 described above, and A can represent the intra prediction mode of the peripheral block D shown in FIG. 11 described above. Or, conversely, L can represent the intra prediction mode of the peripheral block D shown in FIG. 11 described above, and A can represent the intra prediction mode of the peripheral block B shown in FIG. 11 described above. In FIG. 14, the "!" symbol is a logical negation operator and can be referred to as a "not" operator that converts a value that is not true to a true value or vice versa. For example, what is denoted as!7 can represent a 0 value, and what is denoted as!0 can represent a 1 value.

[0127] As shown in FIG. 14, the encoding / decoding device can check a condition 1 for determining whether L and A are the same (S1400). That is, the encoding / decoding device can determine whether L and A are in the same intra prediction mode. The condition 1 can be a condition for determining whether "L == A".

[0128] When L and A are in the same intra prediction mode (that is, when the condition 1 is satisfied), the encoding / decoding device can check a condition 2 for determining whether L (or A) is in the directional intra prediction mode (S1405). That is, the encoding / decoding device can determine whether L and A are the same and whether the mode number of L (or A) is greater than the mode number of the DC mode. The condition 2 can be a condition for determining whether "L > DC_idx".

[0129] When the condition 2 is satisfied, the encoding / decoding device can derive MPM list 1 as the MPM list for the current block (S1410). When the condition 2 is not satisfied, the encoding / decoding device can derive MPM list 2 as the MPM list for the current block (S1415).

[0130] Here, MPM list 1 can be configured as shown in Table 2 below, and MPM list 2 can be configured as shown in Table 3 below.

[0131]

Table 2

[0132]

Table 3

[0133] Referring to Table 2 and Table 3 above, MPM list 1 can include the first MPM candidate (mpm[0]) to the sixth MPM candidate (mpm[5]) as shown in Table 2, and MPM list 2 can include the first MPM candidate (mpm[0]) to the sixth MPM candidate (mpm[5]) as shown in Table 3. Here, the first to sixth MPM candidates can each represent an intra prediction mode (i.e., mode number) indicated by MPM index values 0 to 5. For example, the first MPM candidate represents the intra prediction mode assigned to mpm[0] and can be indicated by the value 0 of the MPM index.

[0134] When L and A are not in the same intra prediction mode (i.e., when condition 1 is not satisfied), the encoding / decoding device can derive a partially shared MPM list 1 (S1420).

[0135] Here, the partially shared MPM list 1 can be configured as shown in Table 4 below.

[0136]

Table 4

[0137] Referring to Table 4 above, the partially shared MPM list 1 can include a first MPM candidate (mpm[0]) representing L and a second MPM candidate (mpm[1]) representing A. That is, when L and A are not the same, the encoding / decoding device can add L and A to the MPM list previously. Therefore, the MPM lists 3, 4, and 5 described later can be configured to partially include the first MPM candidate (mpm[0]) and the second MPM candidate (mpm[1]) as in Table 4 above. Here, when deriving the first MPM candidate (mpm[0]) and the second MPM candidate (mpm[1]), the size of the mode number between L and A can be compared to determine the MPM index order. For example, referring to Table 4 above, when the mode number of L is larger than that of A, the max_idx value indicating L can be set to 0, and the min_idx value indicating A can be set to 1. When the mode number of L is smaller than that of A, the max_idx and min_idx values can be set oppositely to the above.

[0138] Next, the encoding / decoding device can check condition 3 for determining whether both L and A are in the directional intra prediction mode (S1425). That is, the encoding / decoding device can determine whether L and A are not the same and whether the mode numbers of L and A are larger than the DC mode number. Condition 3 can be a condition for determining whether it is "L>DC_idx AND A>DC_idx".

[0139] When both L and A have mode numbers larger than the DC mode (that is, when condition 3 is satisfied), the encoding / decoding device can derive a partially shared MPM list 2 (S1440).

[0140] Here, the partially shared MPM list 2 can be configured as shown in Table 5 below.

[0141]

Table 5

[0142] Referring to Table 5 above, the partially shared MPM list 2 can include a third MPM candidate (mpm[2]) representing the planar mode and a fourth MPM candidate (mpm[3]) representing the DC mode. That is, satisfying Condition 3 means that since both L and A are in the directional intra prediction mode, the encoding / decoding device, after the first MPM candidate (mpm[0]=L) and the second MPM candidate (mpm[1]=A) included in the partially shared MPM list 1 described in Table 4 above, can add the planar mode and the DC mode, which are not in the directional intra prediction mode, as the third MPM candidate (mpm[2]) and the fourth MPM candidate (mpm[3]) to the MPM list. Therefore, the MPM lists 4 and 5 described later can be configured to partially include the third MPM candidate (mpm[2]) and the fourth MPM candidate (mpm[3]) as in Table 5, together with the first MPM candidate (mpm[0]) and the second MPM candidate (mpm[1]) as in Table 4.

[0143] Next, the encoding / decoding device can check Condition 4, which is to determine whether the difference between the mode number of L and the mode number of A is neither 64 nor 1 (S1445). Condition 4 can be a condition for determining whether "diff!=64 AND diff!=1".

[0144] For example, the difference (diff) between the mode number of L and the mode number of A can be calculated as in the formula shown in Table 5 above. Here, diff can be the result of subtracting the smaller value from the larger value between the mode number of L and the mode number of A.

[0145] At this time, if Condition 4 is satisfied, the encoding / decoding device can derive MPM list 5 as the MPM list for the current block (S1455). If Condition 4 is not satisfied, the encoding / decoding device can derive MPM list 4 as the MPM list for the current block (S1450).

[0146] Here, the MPM list 4 can be configured as shown in Table 6 below, and the MPM list 5 can be configured as shown in Table 7 below.

[0147]

Table 6

[0148]

Table 7

[0149] Each of the MPM list 4 in Table 6 and the MPM list 5 in Table 7 can be configured to include the fifth MPM candidate (mpm[4]) and the sixth MPM candidate (mpm[5]) together with the first to fourth MPM candidates (mpm[0] to mpm[3]) described in Tables 4 and 5.

[0150] On the other hand, in step S1425, when at least one of L and A is in the non-directional intra prediction mode (that is, when condition 3 is not satisfied), the encoding / decoding device can check condition 5 for determining whether only one of L and A is in the non-directional intra prediction mode (S1430). That is, the encoding / decoding device can determine whether at least one of L and A is less than or equal to the DC mode number and whether the sum of the mode numbers of L and A is 2 or more. Condition 5 can be a condition for determining whether "L + A >= 2".

[0151] When the sum of the mode numbers of L and A is 2 or more (that is, when condition 5 is satisfied), the encoding / decoding device can derive the MPM list 3 as the MPM list for the current block (S1435).

[0152] Here, the MPM list 3 can be configured as shown in Table 8 below.

[0153]

Table 8

[0154] Referring to Table 8 above, the MPM list 3 can be configured to include the third to sixth MPM candidates (mpm[2] to mpm[5]) together with the first MPM candidate (mpm[0]) and the second MPM candidate (mpm[1]) described in Table 4. Here, satisfying Condition 5 can mean that either one of L and A is in the directional prediction mode and the remaining one is in the non-directional prediction mode. Therefore, the MPM list 3 can include the non-directional prediction mode as the third MPM candidate (mpm[2]) after the first and second MPM candidates. For example, if either one of L and A that is in the non-directional mode is the planar mode, the third MPM candidate (mpm[2]) can be derived as the DC mode, or if either one of L and A that is in the non-directional mode is the DC mode, the third MPM candidate (mpm[2]) can be derived as the planar mode.

[0155] When the sum of the mode numbers of L and A is less than 2 (i.e., when Condition 5 is not satisfied), the encoding / decoding device can derive the MPM list 2 as the MPM list for the current block (S1415). In this case, both L and A can be in the non-directional prediction mode.

[0156] Here, the MPM list 2 can be as shown in Table 3 above. Referring to Table 3, since both L and A are in the non-directional prediction mode, the MPM list 2 can derive the planar mode and the DC mode as the first MPM candidate (mpm[0]) and the second MPM candidate (mpm[1]), respectively. The remaining third to sixth MPM candidates (mpm[2] to mpm[5]) can be derived as shown in Table 3.

[0157] In Tables 2 to 8 above, (Directional Intra Prediction Mode +1), (Directional Intra Prediction Mode -1), (Directional Intra Prediction Mode +2), (Directional Intra Prediction Mode -2), etc. can be mathematically added or subtracted. However, in some cases, they may not be simply calculated mathematically. For example, by adding or subtracting the Directional Intra Prediction Mode, it can become a non-directional Intra Prediction Mode in which the consistency of the neighboring Intra Prediction Mode is not maintained, or it can exceed the maximum available Intra Prediction Mode index. For example, the value obtained by subtracting 1 from the Directional Intra Prediction Mode can be derived to Intra Mode 1 representing the DC index (DC Mode). Adding 1 to the 66th Directional Intra Prediction Mode results in 67, which exceeds the index 66 of the maximum available Intra Mode. Therefore, as follows, the operation of adding and subtracting modes using modular arithmetic (denoted by %) can be restricted. That is, it can prevent the derivation of a value representing a non-directional Intra Prediction Mode in which consistency is not maintained, or the derivation of a value exceeding the maximum available Intra Mode index. For example, adding (adding) and subtracting (subtracting) modes using modular arithmetic can be derived as shown in Table 9 below.

[0158]

Table 9

[0159] The method of constructing the MPM list in the above-described embodiments can be performed by an encoding / decoding device. At this time, when constructing the MPM list, the encoding device can derive the optimal intra prediction mode applied to the current block and determine whether the derived optimal intra prediction mode belongs to an MPM list including MPM candidates configured in a manner as in the above-described embodiments. If the intra prediction mode of the current block belongs to the MPM list including MPM candidates, the encoding device can encode the MPM flag and the MPM index. Here, the MPM flag can indicate whether the intra prediction mode of the current block belongs to the MPM list (i.e., MPM candidates). The MPM index can represent which MPM mode is applied as the intra prediction mode of the current block among the MPM candidates included in the MPM list. On the contrary, if the intra prediction mode of the current block does not belong to the MPM list including MPM candidates, the encoding device can encode the intra prediction mode of the current block.

[0160] Similar to the encoding device, the decoding device can construct the MPM list by applying a method as in the above-described embodiments. Then, the decoding device can receive the MPM flag from the encoding device and use it to confirm whether the intra prediction mode applied to the current block is included in the MPM list (i.e., MPM candidates). If the intra prediction mode applied to the current block is included in the MPM list (i.e., MPM candidates), the decoding device can derive the intra prediction mode applied to the current block using the MPM index received from the encoding device. On the contrary, if the intra prediction mode applied to the current block is not included in the MPM list (i.e., MPM candidates), the decoding device can derive the intra prediction mode applied to the current block using a prediction mode index (or remaining prediction mode index; remaining mode information) that indicates a specific prediction mode among the remaining prediction modes excluding the MPM candidates.

[0161] In the following, a method for constructing an extended MPM list having a similar complexity compared to an MPM list including three MPM candidates is proposed. The extended MPM list refers to including more than three MPM candidates, and for example, can include three, four, five, or six MPM candidates. In the proposed method described later, an embodiment of generating an MPM list including six MPM candidates using two neighboring intra prediction modes (left neighboring intra prediction mode and upper neighboring intra prediction mode) will be described. Here, the left neighboring intra prediction mode (LEFT) can represent the intra prediction mode of the neighboring block D in FIG. 11 described above, and the upper neighboring intra prediction mode (ABOVE) can represent the intra prediction mode of the neighboring block B in FIG. 11 described above.

[0162] When constructing the MPM list, using three MPM candidates has advantages in terms of simplicity and processing volume. However, the existing method of using six MPM candidates can increase the complexity because it includes the process of searching for the positions of various neighboring blocks, the continuous pruning process, each step for generating the MPM list, line buffer requirements, and parsing dependent attributes. Therefore, a solution that can obtain advantages in terms of complexity and processing volume is proposed even when using six MPM candidates, similar to the method of using three MPM candidates.

[0163] As one embodiment, the MPM list can be constructed by an algorithm (i.e., pseudo code) as shown in Table 10 below.

[0164]

Table 10

[0165] Referring to Table 10 above, an MPM list for the current block can be generated based on LEFT and ABOVE, which are the neighboring intra prediction modes. Here, LEFT can represent the intra prediction mode of neighboring block D in FIG. 11 described above, and ABOVE can represent the intra prediction mode of neighboring block B in FIG. 11 described above. Also, neighboring block D can represent the lowermost left neighboring block among the left neighboring blocks adjacent to the left side of the current block, and neighboring block B can represent the rightmost upper neighboring block among the neighboring blocks adjacent to the upper side of the current block.

[0166] Specifically, the intra prediction modes of LEFT and ABOVE can be derived. Then, based on the intra prediction modes of LEFT and ABOVE, the MPM list (i.e., MPM candidates) for the current block can be set to MPM_ordering_0. At this time, if LEFT and ABOVE are the same and the mode number of LEFT is greater than or equal to the DC mode, the MPM list (i.e., MPM candidates) for the current block can be set to MPM_ordering_1. Or, if LEFT and ABOVE are not the same, the mode number of LEFT is greater than the DC mode, and the mode number of ABOVE is greater than the DC mode, the MPM list (i.e., MPM candidates) for the current block can be set to MPM_ordering_2. Or, if LEFT and ABOVE are not the same, at least one of the mode numbers of LEFT and ABOVE is not greater than the DC mode, and the sum of the mode numbers of LEFT and ABOVE is greater than the DC mode, the MPM list (i.e., MPM candidates) for the current block can be set to MPM_ordering_3.

[0167] Here, MPM_ordering_0, MPM_ordering_1, MPM_ordering_2, and MPM_ordering_3 can be configured to include MPM candidates according to a predetermined order as described in FIGS. 12 to 14 above.

[0168] Also, when one of the remaining intra prediction modes excluding the MPM candidates derived as described above is the intra prediction mode applied to the current block, the MPM coding of the current block can be performed based on the remaining mode information. Such remaining mode information can be encoded / decoded by applying truncated binary coding.

[0169] As another embodiment, an MPM list can be configured by an algorithm (i.e., spec) as shown in Table 11 below.

[0170]

Table 11-1

[0171]

Table 11-2

[0172]

Table 11-3

[0173] Referring to Table 11 above, candidate intra prediction modes can be derived based on the neighboring blocks of the current block, and an MPM list for the current block can be configured based on the candidate intra prediction modes. The candidate intra prediction modes can include a candidate intra prediction mode A and a candidate intra prediction mode B.

[0174] For example, when at least one of the conditions described below is true (i.e., when at least one of the conditions described below is satisfied), the candidate intra prediction mode A can be set to the planar intra prediction mode.

[0175] · Neighboring block A is not available

[0176] · Intra prediction is not applied to the peripheral block A

[0177] Here, the peripheral block A can be the left peripheral block of the current block. The left peripheral block can be the lowermost left peripheral block among the left peripheral blocks adjacent to the current block. For example, when the size of the current block is cbWidth × cbHeight, and the x component of the top - left sample position of the current block is xCb and the y component is yCb, the peripheral block A can be the block including the sample at the left - bottom (xCb - 1, yCb+cbHeight - 1). On the other hand, the peripheral block A can represent the peripheral block D in FIG. 11 described above.

[0178] When not all of the above conditions are true (i.e., when not all of the above conditions are satisfied), the candidate intra prediction mode A can be set to the intra prediction mode of the peripheral block A.

[0179] Also, for example, when at least one of the conditions described later is true (i.e., when at least one of the conditions described later is satisfied), the candidate intra prediction mode B can be set to the planar intra prediction mode.

[0180] · The peripheral block B is not available

[0181] · Intra prediction is not applied to the peripheral block B

[0182] · yCb - 1 is smaller than ((yCb >> CtbLog2SizeY) << CtbLog2SizeY)

[0183] Here, the peripheral block B can be the upper peripheral block of the current block. The upper peripheral block can be the rightmost upper peripheral block among the upper peripheral blocks adjacent to the current block. For example, if the size of the current block is cbWidth×cbHeight, and the x component of the top-left sample position of the current block is xCb and the y component is yCb, the peripheral block B can be a block including the sample at the left mark of (xCb + cbWidth - 1, yCb - 1). On the other hand, CtbLog2SizeY can represent the size of the current CTU, and ((yCb >> CtbLog2SizeY) << CtbLog2SizeY) can represent the left mark of the upper boundary of the current CTU. That is, when yCb - 1 is smaller than ((yCb >> CtbLog2SizeY) << CtbLog2SizeY), it can represent the case where the peripheral block B is outside the range of the current CTU. That is, the above-mentioned condition can represent the case where the peripheral block B is outside the range of the current CTU.

[0184] When not all of the above conditions are true (i.e., when not all of the above conditions are satisfied), the candidate intra prediction mode B can be set to the intra prediction mode of the peripheral block B.

[0185] When the candidate intra prediction mode is derived, the MPM list of the current block can be configured like the first MPM list. The first MPM list can be composed of a first MPM candidate representing the candidate intra prediction mode A, a second MPM candidate representing the intra prediction mode of the value obtained by operating the candidate intra prediction mode A with a logical negation operator, a third MPM candidate representing the intra prediction mode No. 50, a fourth MPM candidate representing the intra prediction mode No. 18, a fifth MPM candidate representing the intra prediction mode No. 46, and a sixth MPM candidate representing the intra prediction mode No. 54.

[0186] Thereafter, it can be determined whether the candidate intra prediction mode B is the same as the candidate intra prediction mode A.

[0187] At this time, when candidate intra prediction mode B and candidate intra prediction mode A are the same, it can be determined whether candidate intra prediction mode A is greater than 1. If candidate intra prediction mode A is greater than 1, the MPM list of the current block can be configured like the second MPM list. The second MPM list can be composed of a first MPM candidate representing candidate intra prediction mode A, a second MPM candidate representing the planar intra prediction mode, a third MPM candidate representing the DC intra prediction mode, a fourth MPM candidate representing the intra prediction mode derived as 2 + ((candIntraPredModeA + 62) % 65), a fifth MPM candidate representing the intra prediction mode derived as 2 + ((candIntraPredModeA - 1) % 65), and a sixth MPM candidate representing the intra prediction mode derived as 2 + ((candIntraPredModeA + 61) % 65).

[0188] Or, when candidate intra prediction mode B and candidate intra prediction mode A are not the same, first, the first MPM candidate and the second MPM candidate of the current block can be derived. The first MPM candidate can be derived as candidate intra prediction mode A, and the second MPM candidate can be derived as candidate intra prediction mode B. Then, biggerIdx can be set. If the first MPM candidate is greater than the second MPM candidate, biggerIdx can be derived as 0, and if the first MPM candidate is not greater than the second MPM candidate, biggerIdx can be derived as 1.

[0189] Next, it can be determined whether candidate intra prediction mode A and candidate intra prediction mode B are greater than 1 (that is, it can be determined whether the mode number of candidate intra prediction mode A and the mode number of candidate intra prediction mode B are greater than 1). At this time, if candidate intra prediction mode A and candidate intra prediction mode B are greater than 1, the third MPM candidate and the fourth MPM candidate of the current block can be derived. The third MPM candidate can be derived as the planar intra prediction mode, and the fourth MPM candidate can be derived as the DC intra prediction mode.

[0190] Next, it can be determined whether the difference (diff) between the MPM candidate pointed to by the MPM index having the value of biggerIdx and the MPM candidate pointed to by the MPM index having the value obtained by performing a logical negation operation on biggerIdx (i.e.,!biggerIdx) is neither 64 nor 1.

[0191] When the difference is neither 64 nor 1, the fifth and sixth MPM candidates of the current block can be derived. The fifth MPM candidate can be derived as the intra prediction mode derived as 2 + ((candModeList[biggerIdx] + 62) % 65), and the sixth MPM candidate can be derived as the intra prediction mode derived as 2 + ((candModeList[biggerIdx] - 1) % 65).

[0192] Or, when the difference is 64 or 1, the fifth and sixth MPM candidates of the current block can be derived. The fifth MPM candidate can be derived as the intra prediction mode derived as 2 + ((candModeList[biggerIdx] + 61) % 65), and the sixth MPM candidate can be derived as the intra prediction mode derived as 2 + (candModeList[biggerIdx] % 65).

[0193] On the other hand, when the sum of candidate intra prediction mode A and candidate intra prediction mode B is greater than or equal to 2, the third MPM candidate, fourth MPM candidate, fifth MPM candidate, and sixth MPM candidate of the current block can be derived. The third MPM candidate is derived as an intra prediction mode which is a value obtained by performing a logical NOT operation on an MPM candidate pointed to by an MPM index having a value obtained by performing a logical NOT operation on biggerIdx (i.e.,!biggerIdx). The fourth MPM candidate is derived as an intra prediction mode obtained as 2 + ((candModeList[biggerIdx] + 62) % 65). The fifth MPM candidate can be derived as an intra prediction mode obtained as 2 + ((candModeList[biggerIdx] - 1) % 65), and the sixth MPM candidate can be derived as an intra prediction mode obtained as 2 + ((candModeList[biggerIdx] + 61) % 65).

[0194] An intra prediction mode for the current block can be derived based on the MPM list including the MPM candidates derived as described above. Based on the derived intra prediction mode, prediction of the current block can be performed to generate predicted samples.

[0195] At this time, when deriving the intra prediction mode for the current block, if the MPM flag (e.g., intra_luma_mpm_flag in Table 11 above) is 1, among the MPM candidates derived as described above, the MPM candidate pointed to by the MPM index (e.g., intra_luma_mpm_idx in Table 11 above) can be derived as the intra prediction mode of the current block. Or, if the MPM flag (e.g., intra_luma_mpm_flag in Table 11 above) is 0, it can be derived as the intra prediction mode of the current block based on the remaining mode (e.g., intra_luma_mpm_remainder in Table 11 above) pointing to one of the remaining intra prediction modes excluding the MPM candidates derived as described above.

[0196] As described above, the intra prediction mode information for the current block can be coded into the values of syntax elements and signaled. Here, the intra prediction mode information is information necessary for intra prediction for the current block, and may include the above-described MPM flag, MPM index, remaining modes, and the like. When coding the intra prediction mode information, various binarization processes can be applied by each syntax element.

[0197] Here, binarization can mean a set of bin strings for all possible values of a syntax element. Also, the binarization process can mean a procedure that uniquely maps all possible values of a syntax element to a set of bin strings. A bin can mean a single-digit binary number, for example, each of "0" and "1" can be called one bin. A bin string can mean a binary sequence composed of bins, and can be, for example, a continuous binary number such as "01".

[0198] As one embodiment, the syntax elements of the intra prediction mode information and the corresponding binarization can be as shown in Table 12 below.

[0199]

Table 12-1

[0200]

Table 12-2

[0201] Referring to Table 12 above, the syntax element "intra_luma_mpm_flag" representing the MPM flag can be encoded / decoded by applying the FL (fixed - length) binarization process. The syntax element "intra_luma_mpm_idx" representing the MPM index can be encoded / decoded by applying the TR (truncated rice) binarization process. The syntax element "intra_luma_mpm_remainder" representing the remaining mode can be encoded / decoded by applying the TB (Truncated Binary) binarization process.

[0202] According to the embodiments of this document, as described above, the existing 35 intra - prediction modes can be extended and 67 intra - prediction modes can be used. In this case, when coding the intra - prediction mode information, 6 bits may be required for the syntax element representing the remaining mode. However, depending on the coding method (i.e., the binarization method), the number of bits of the syntax element representing the remaining mode can also be saved. That is, as shown in Table 12 above, by performing the TB (Truncated Binary) binarization process during the coding of the syntax element representing the remaining mode, the number of bits can be saved and the coding efficiency can be improved.

[0203] As an embodiment, the syntax element representing the remaining mode can undergo the TB (Truncated Binary) binarization process as shown in Table 13 below.

[0204]

Table 13

[0205] Referring to Table 13 above, when a syntax element (intra_luma_mpm_remainder) representing the remaining mode is input, a TB (Truncated Binary) coded value of the syntax element (intra_luma_mpm_remainder) can be output based on TB coding. First, the range of possible values of the syntax element (intra_luma_mpm_remainder) can be determined, and this range of the syntax element (intra_luma_mpm_remainder) can be between 0 and cMax. cMax can represent the maximum value that the syntax element (intra_luma_mpm_remainder) can have and can be greater than or equal to 1. The TB coded value (TB bit string) for the value of the syntax element (intra_luma_mpm_remainder) can be derived based on the algorithm in Table 13 above. For example, in the case of the syntax element (intra_luma_mpm_remainder) representing the remaining mode in Table 12 above, since cMax is 60, this syntax element (intra_luma_mpm_remainder) can be represented using 6 bits. However, when binary coding the value of the syntax element (intra_luma_mpm_remainder) representing the remaining mode based on TB coding such as the algorithm in Table 13 above, binary coding can be performed using a number of bits less than 6 bits depending on the value of the syntax element (intra_luma_mpm_remainder). For example, the syntax element (intra_luma_mpm_remainder) representing the remaining mode can be variably generated from 1 bit to 5 bits according to the value of the syntax element and coded using TB coding.

[0206] FIG. 15 is a flowchart schematically showing an encoding method that can be performed by an encoding apparatus according to an embodiment of the present document.

[0207] The method disclosed in FIG. 15 can be performed by the encoding device 200 disclosed in FIG. 2. Specifically, steps S1500 to S1520 in FIG. 15 can be performed by the prediction unit 220 and the intra prediction unit 222 disclosed in FIG. 2, and step S1530 in FIG. 15 can be performed by the entropy encoding unit 240 disclosed in FIG. 2. Also, the method disclosed in FIG. 15 can include the embodiments described above in this specification. Therefore, in FIG. 15, specific descriptions or simplifications are omitted for the content overlapping with the above-described embodiments.

[0208] As shown in FIG. 15, the encoding device can derive MPM (Most Probable Mode) candidates for the current block based on the surrounding blocks located around the current block and configure an MPM list (S1500).

[0209] Here, the surrounding blocks can include the surrounding block A, surrounding block B, surrounding block C, surrounding block D, surrounding block E, surrounding block F, and / or surrounding block G shown in FIG. 11 described above.

[0210] As an embodiment, when configuring the MPM list, two surrounding blocks can be used. For example, surrounding block D and surrounding block B can be used. Surrounding block D can represent the lowermost left surrounding block among the left surrounding blocks adjacent to the left side of the current block, and surrounding block B can represent the rightmost upper surrounding block among the surrounding blocks adjacent to the upper side of the current block.

[0211] The encoding device can derive a first MPM candidate based on the first surrounding block (surrounding block D) and derive a second MPM candidate based on the second surrounding block (surrounding block B).

[0212] For example, when the first peripheral block is available and intra prediction is applied to the first peripheral block, the first MPM candidate can be derived as the intra prediction mode of the first peripheral block. When the first peripheral block is not available or intra prediction is not applied to the first peripheral block, the first MPM candidate can be derived as the planar intra prediction mode.

[0213] Also, for example, when the second peripheral block is available, intra prediction is applied to the second peripheral block, and the second peripheral block is included in the current CTU, the second MPM candidate can be derived as the intra prediction mode of the second peripheral block. When the second peripheral block is not available, or intra prediction is not applied to the second peripheral block, or the second peripheral block is not included in the current CTU, the second MPM candidate can be derived as the planar intra prediction mode.

[0214] The encoding device can configure an MPM list based on the first MPM candidate and the second MPM candidate derived as described above. At this time, the remaining MPM candidates can be derived including the first MPM candidate and the second MPM candidate according to the number of candidates in the MPM list. As described above, the number of candidates included in the MPM list can differ depending on the algorithm and can be, for example, 3, 4, 5, 6, etc. Also, as described above, additional MPM candidates can be derived according to determined conditions based on the first MPM candidate derived from the first peripheral block and the second MPM candidate derived from the second peripheral block.

[0215] For example, the encoding device can determine whether the first MPM candidate and the second MPM candidate are the same, and can determine whether the mode number of the first MPM candidate or the second MPM candidate is greater than the mode number of the DC mode. At this time, if the first MPM candidate and the second MPM candidate are not the same, the encoding device can determine whether both the first MPM candidate and the second MPM candidate are greater than the DC mode, or whether any one of the two is greater than the DC mode. Also, when both the first MPM candidate and the second MPM candidate are greater than the DC mode, the encoding device can make a determination based on the difference between the mode numbers of the first MPM candidate and the second MPM candidate (for example, whether the mode number difference between the two candidates is 1, greater than 2 or 62, the same, etc.). In this way, the encoding device can configure the MPM list differently according to whether the above conditions are satisfied based on the first MPM candidate and the second MPM candidate. As an example, the MPM list can include six MPM candidates. In this case, six MPM candidates can be derived including the first MPM candidate and the second MPM candidate based on whether the above conditions are satisfied. At this time, the six MPM candidates can be mapped corresponding to index values from 0 to 5 and can be indicated within the MPM list based on the index values. Therefore, the encoding device can indicate any one of the MPM candidates in the MPM list by signaling the index information.

[0216] The process of deriving MPM candidates based on the surrounding blocks of the current block described above and generating the MPM list is one example, and the MPM list can be configured in various ways considering coding efficiency. Also, various embodiments for configuring the MPM list described in this document can be applied to the process of generating the MPM list. Since this has been described in detail with reference to FIGS. 12 to 14 and Tables 1 to 13, the description is omitted in this embodiment.

[0217] The encoding device can determine the intra prediction mode for the current block (S1510).

[0218] As one embodiment, the encoding device can perform various intra prediction modes on the current block to derive an intra prediction mode having an optimal rate-distortion (RD) cost, and can determine this as the intra prediction mode of the current block. At this time, the encoding device can derive an optimal intra prediction mode for the current block based on the intra prediction mode including two non-directional intra prediction modes and 65 intra-directional prediction modes. The 67 intra prediction modes are as described above with reference to FIG. 10.

[0219] Then, the encoding device can generate information regarding the intra prediction mode of the current block. The information regarding the intra prediction mode is information for instructing the intra prediction mode of the current block, and can include MPM flag information, MPM index information, remaining mode information, and the like.

[0220] As one embodiment, the encoding device can determine whether the determined intra prediction mode of the current block is included in the MPM candidates in the MPM list, and can generate MPM flag information according to the determination result. For example, when the intra prediction mode for the current block is included among the MPM candidates in the MPM list, the encoding device can set the MPM flag information to 1. Or, when the intra prediction mode for the current block is not included among the MPM candidates in the MPM list, the encoding device can set the MPM flag information to 0.

[0221] Also, when the intra prediction mode for the current block is included among the MPM candidates in the MPM list, the encoding device can generate MPM index information indicating the intra prediction mode for the current block among the MPM candidates. For example, when the MPM list is configured to include six MPM candidates, the MPM index information can be index values from 0 to 5.

[0222] If the intra prediction mode for the current block is not included among the MPM candidates in the MPM list, the encoding apparatus can generate remaining mode information that indicates the intra prediction mode for the current block from among the remaining intra prediction modes excluding the MPM candidates. For example, as described above, when using 67 intra prediction modes and configuring the MPM list to include 6 MPM candidates, the remaining intra prediction modes can include 61 modes obtained by subtracting the number of MPM candidates from the total number of intra prediction modes. Therefore, the remaining mode information can be represented by index values from 0 to 60.

[0223] The encoding apparatus can perform intra prediction based on the intra prediction mode determined for the current block to generate prediction samples for the current block (S1520).

[0224] As one embodiment, the encoding apparatus can derive at least one of the surrounding samples of the current block based on the intra prediction mode, and generate prediction samples based on the surrounding samples. Here, the surrounding samples can include the upper left corner surrounding samples, upper surrounding samples, and left surrounding samples of the current block. For example, when the size of the current block is W×H, and the x component of the top-left sample position of the current block is xN and the y component is yN, the left surrounding samples can be p[xN - 1][yN] to p[xN - 1][2H + yN - 1], the upper left corner surrounding sample can be p[xN - 1][yN - 1], and the upper surrounding samples can be p[xN][yN - 1] to p[2W + xN - 1][yN - 1].

[0225] The encoding apparatus can encode image information including information regarding the intra prediction mode for the current block (S1530).

[0226] That is, the encoding device can generate information related to the intra prediction mode including at least one of the above-described MPM flag information, MPM index information, and remaining mode information, and can encode these.

[0227] As described above, since the intra prediction mode is extended to 67, more bits are required to represent the remaining mode information. Thus, in order to improve coding efficiency, a TB (Truncated Binary) binarization method can be used when encoding the remaining mode information.

[0228] As one embodiment, the encoding device can encode the above-described MPM flag information, MPM index information, and remaining mode information based on a binarization process. At this time, the binarization process can be performed based on predetermined binarization type information for the MPM flag information, MPM index information, and remaining mode information, which can be as shown in Table 12 described above. According to Table 12, the remaining mode information is predefined in the TB (Truncated Binary) binarization type.

[0229] As described above, the MPM candidates can be derived based on 67 intra prediction modes including 2 non-directional intra prediction modes and 65 directional intra prediction modes. Therefore, the remaining mode information can be represented by the value of a syntax element, which is indication information for the intra prediction mode derived based on the remaining intra prediction modes after excluding the number of MPM candidates (for example, 6) from the 67 intra prediction modes. As an example, the value of the syntax element representing the remaining mode information can be represented by an index value (e.g., values from 0 to 60) for indicating 61 intra prediction modes.

[0230] As an embodiment, the value of the syntax element representing the remaining mode information can be derived by performing a TB (Truncated Binary) binarization process based on the algorithm in Table 13 described above. As described above, the remaining mode information is represented by the value of the syntax element, and as described in Table 12 above, the maximum range (cMax) of the value of the syntax element for the remaining mode information can be 60. Therefore, according to the algorithm in Table 13, when the value of the syntax element representing the remaining mode information is smaller than a specific value derived based on the number of remaining intra prediction modes excluding the MPM candidates (i.e., cMax), the value of the syntax element representing the remaining mode information can be a value derived using a variable number of bits from 1 bit to 5 bits based on the TB (Truncated Binary) binarization process. In the opposite case, the value of the syntax element representing the remaining mode information can be derived as a 6-bit value based on the TB (Truncated Binary) binarization process. By applying the TB (Truncated Binary) binarization process to the remaining mode information as in Table 13, the number of bits can be saved according to the value of the syntax element.

[0231] Also, although not shown in the figure, for example, the encoding device can derive a residual sample for the current block based on the original sample and the predicted sample for the current block, and can generate information regarding the residual for the current block based on the residual sample. Then, the encoding device can encode the image information including the information regarding the residual and output it in the form of a bitstream.

[0232] The bitstream can be transmitted to the decoding device via a network or a (digital) storage medium. Here, the network can include a broadcast network and / or a communication network, etc., and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.

[0233] The process of deriving the residual sample for the current block described above can be performed by the subtraction unit 231 of the encoding device 200 disclosed in FIG. 2, and the process of generating information regarding the residual can be performed by the conversion unit 232 of the encoding device 200 disclosed in FIG. 2. The process of encoding the image information including the information regarding the residual can be performed by the entropy encoding unit 240 of the encoding device 200 disclosed in FIG. 2.

[0234] FIG. 16 is a flowchart schematically showing a decoding method that can be performed by a decoding device according to an embodiment of the present document.

[0235] The method disclosed in FIG. 16 can be performed by the decoding device 300 disclosed in FIG. 3. Specifically, steps S1600 to S1620 in FIG. 16 can be performed by the prediction unit 330 and the intra prediction unit 331 disclosed in FIG. 3, and step S1630 in FIG. 16 can be performed by the addition unit 340 disclosed in FIG. 3. Also, step S1610 in FIG. 16 can be performed by the entropy decoding unit 310 disclosed in FIG. 3. Also, the method disclosed in FIG. 16 can include the embodiments described above in this specification. Therefore, in FIG. 16, specific descriptions or simplifications are omitted regarding the content overlapping with the above-described embodiments.

[0236] As shown in FIG. 16, the decoding device can derive MPM (Most Probable Mode) candidates for the current block based on the peripheral blocks located around the current block and configure an MPM list (S1600).

[0237] Here, the peripheral blocks can include the peripheral blocks A, B, C, D, E, F, and / or G shown in FIG. 11 described above.

[0238] As one embodiment, when constructing the MPM list, two peripheral blocks can be used. For example, peripheral block D and peripheral block B can be used. Peripheral block D can represent the lowermost left peripheral block among the left peripheral blocks adjacent to the left side of the current block, and peripheral block B can represent the rightmost upper peripheral block among the upper peripheral blocks adjacent to the upper side of the current block.

[0239] The decoding device can derive a first MPM candidate based on the first peripheral block (peripheral block D) and derive a second MPM candidate based on the second peripheral block (peripheral block B).

[0240] For example, when the first peripheral block is available and intra prediction is applied to the first peripheral block, the first MPM candidate can be derived as the intra prediction mode of the first peripheral block. When the first peripheral block is not available or intra prediction is not applied to the first peripheral block, the first MPM candidate can be derived as the planar intra prediction mode.

[0241] Also, for example, when the second peripheral block is available, intra prediction is applied to the second peripheral block, and the second peripheral block is included in the current CTU, the second MPM candidate can be derived as the intra prediction mode of the second peripheral block. When the second peripheral block is not available, or intra prediction is not applied to the second peripheral block, or the second peripheral block is not included in the current CTU, the second MPM candidate can be derived as the planar intra prediction mode.

[0242] The decoding device can construct an MPM list based on the first MPM candidate and the second MPM candidate derived as described above. At this time, depending on the number of candidates in the MPM list, the remaining MPM candidates can be derived including the first MPM candidate and the second MPM candidate. As described above, the number of candidates included in the MPM list can vary depending on the algorithm and can be, for example, 3, 4, 5, 6, etc. Also, as described above, additional MPM candidates can be derived based on the determined conditions based on the first MPM candidate derived from the first peripheral block and the second MPM candidate derived from the second peripheral block.

[0243] For example, the decoding device can determine whether the first MPM candidate and the second MPM candidate are the same, and can determine whether the mode number of the first MPM candidate or the second MPM candidate is greater than the mode number of the DC mode. At this time, if the first MPM candidate and the second MPM candidate are not the same, the decoding device can determine whether both the first MPM candidate and the second MPM candidate are greater than the DC mode, or whether either one of the two is greater than the DC mode. Also, when both the first MPM candidate and the second MPM candidate are greater than the DC mode, the decoding device can make a determination based on the difference between the mode numbers of the first MPM candidate and the second MPM candidate (for example, whether the mode number difference between the two candidates is 1, greater than 2 or 62, the same, etc.). In this way, the decoding device can configure the MPM list differently depending on whether the above conditions are satisfied based on the first MPM candidate and the second MPM candidate. As an example, the MPM list can include 6 MPM candidates. In this case, 6 MPM candidates can be derived including the first MPM candidate and the second MPM candidate based on whether the above conditions are satisfied. At this time, the 6 MPM candidates can be mapped corresponding to index values from 0 to 5 and can be indicated within the MPM list based on the index value. Therefore, the decoding device can determine which candidate among the MPM candidates in the MPM list to indicate based on the index information signaled from the encoding device.

[0244] The process of deriving MPM candidates based on the neighboring blocks of the current block described above and generating an MPM list is one example, and the MPM list can be configured in various ways considering coding efficiency. Also, in the process of generating the MPM list, various embodiments for configuring the MPM list described in this document can be applied, and since this has been described in detail with reference to FIGS. 12 to 14 and Tables 1 to 13, the description will be omitted in this embodiment.

[0245] The decoding device can derive an intra prediction mode for the current block based on the MPM list (S1610).

[0246] As one embodiment, the decoding device can obtain information regarding the intra prediction mode for the current block from the bitstream. The information regarding the intra prediction mode is information for indicating the intra prediction mode of the current block, and can include MPM flag information, MPM index information, remaining mode information, and the like.

[0247] First, the decoding device can obtain MPM flag information indicating whether the intra prediction mode for the current block is included among the MPM candidates in the MPM list. Then, the decoding device can obtain MPM index information or remaining mode information based on the MPM flag information.

[0248] For example, when the MPM flag information represents 1, the decoding device can determine that the intra prediction mode for the current block is included among the MPM candidates in the MPM list. In this case, the decoding device can obtain MPM index information indicating the intra prediction mode for the current block among the MPM candidates. The decoding device can derive the MPM candidate indicated by the MPM index information in the MPM list as the intra prediction mode for the current block.

[0249] When the MPM flag information represents 0, the decoding device can determine that among the MPM candidates in the MPM list, the intra prediction mode for the current block is not included. In this case, among the remaining intra prediction modes excluding the MPM candidates, the decoding device can obtain the remaining mode information that indicates the intra prediction mode for the current block. The decoding device can derive the intra prediction mode indicated by the remaining mode information as the intra prediction mode for the current block.

[0250] As described above, since the intra prediction mode is extended to 67, more bits are required to represent the remaining mode information. Thus, in order to improve coding efficiency, the remaining mode information can be obtained by being decoded based on the TB (Truncated Binary) binarization method.

[0251] As an embodiment, the decoding device can decode the above-described MPM flag information, MPM index information, and remaining mode information based on the binarization process. At this time, the binarization process can be performed based on the predefined binarization type information for the MPM flag information, MPM index information, and remaining mode information, which can be as shown in Table 12 described above. According to Table 12, the remaining mode information is predefined in the TB (Truncated Binary) binarization type.

[0252] As described above, the MPM candidates can be derived based on 67 intra prediction modes including two non - directional intra prediction modes and 65 directional intra prediction modes. Therefore, the remaining mode information can represent, as a syntax element value, the indication information for the intra prediction modes derived based on the remaining intra prediction modes after excluding the number of MPM candidates (e.g., 6) from the 67 intra prediction modes. As an example, the value of the syntax element representing the remaining mode information can be expressed as an index value (e.g., values from 0 to 60) for indicating 61 intra prediction modes.

[0253] In one embodiment, the value of the syntax element representing the remaining mode information can be derived by performing a TB (Truncated Binary) binarization process based on the algorithm in Table 13 described above. As described above, the remaining mode information is represented by the value of the syntax element, and as described in Table 12, the maximum range (cMax) of the value of the syntax element for the remaining mode information can be 60. Therefore, according to the algorithm in Table 13, when the value of the syntax element representing the remaining mode information is smaller than a specific value derived based on the number of remaining intra prediction modes (i.e., cMax) after excluding the MPM candidates, the value of the syntax element representing the remaining mode information can be a value derived using a variable number of bits from 1 bit to 5 bits based on the TB (Truncated Binary) binarization process. In the opposite case, the value of the syntax element representing the remaining mode information can be derived as a 6 - bit value based on the TB (Truncated Binary) binarization process. By applying the TB (Truncated Binary) binarization process to the remaining mode information as in Table 13, the number of bits can be saved according to the value of the syntax element.

[0254] The decoding device can perform intra prediction based on the intra prediction mode derived for the current block to generate prediction samples for the current block (S1620).

[0255] As one embodiment, the decoding device can derive at least one of the peripheral samples of the current block based on the intra prediction mode, and can generate prediction samples based on the peripheral samples. Here, the peripheral samples can include the upper left corner peripheral samples, the upper peripheral samples, and the left peripheral samples of the current block. For example, when the size of the current block is W×H, and the x component of the top-left sample position of the current block is xN and the y component is yN, the left peripheral samples can be p[xN - 1][yN] to p[xN - 1][2H + yN - 1], the upper left corner peripheral sample can be p[xN - 1][yN - 1], and the upper peripheral samples can be p[xN][yN - 1] to p[2W + xN - 1][yN - 1].

[0256] The decoding device can generate a reconstructed picture for the current block based on the prediction samples (S1630).

[0257] As one embodiment, the decoding device can use the prediction samples as they are as the reconstructed samples, or can also generate the reconstructed samples by adding the residual samples to the prediction samples.

[0258] If there are residual samples for the current block, the decoding device can receive information regarding the residual for the current block. The information regarding the residual can include transform coefficients regarding the residual samples. The decoding device can derive the residual samples (or, a residual sample array) for the current block based on the residual information. The decoding device can generate restored samples based on the predicted samples and the residual samples, and can derive a restored block or a restored picture based on the restored samples. Thereafter, as described above, the decoding device can apply an in-loop filtering procedure, such as deblocking filtering and / or SAO procedure, to the restored picture in order to improve subjective / objective picture quality as necessary.

[0259] In the above-described embodiments, the method etc. has been described based on a sequence diagram as a series of steps or blocks, but the embodiments of this document are not limited to the order of steps etc., and a certain step can occur in a different order or simultaneously with steps different from the above. Also, those skilled in the art will understand that the steps shown in the sequence diagram are not exclusive, and other steps can be included, or one or more of the steps in the sequence diagram can be deleted without affecting the scope of this document.

[0260] The method according to the above-described document can be implemented in software form, and the encoding device and / or decoding device according to this document can be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.

[0261] When an embodiment is realized by software in this document, the above-described method can be realized by modules (processes, functions, etc.) that perform the above-described functions. The modules can be stored in a memory and executed by a processor. The memory can be inside or outside the processor and can be connected to the processor by various well-known means. The processor can include an ASIC (application-specific integrated circuit), other chip sets, logic circuits, and / or data processing devices. The memory can include a ROM (read-only memory), a RAM (random access memory), a flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in this document can be realized and performed on a processor, a microprocessor, a controller, or a chip. For example, the functional units illustrated in each drawing can be realized and performed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information for realization (e.g., information on instructions) or an algorithm can be stored in a digital storage medium.

[0262] In addition, the decoding device and encoding device to which this document is applicable can be included in multimedia broadcast transmission / reception devices, mobile communication terminals, home cinema video devices, digital cinema video devices, surveillance cameras, video intercom devices, real-time communication devices such as video communication, mobile streaming devices, storage media, camcorders, pay-per-view (VoD) service providing devices, over-the-top (OTT) video devices, Internet streaming service providing devices, three-dimensional (3D) video devices, virtual reality (VR) devices, augmented reality (AR) devices, picture phone video devices, transportation means terminals (e.g., vehicle (including autonomous driving vehicle) terminals, airplane terminals, ship terminals, etc.), and medical video devices, etc., and can be used to process video signals or data signals. For example, in an over-the-top (OTT) video device, it can include game consoles, Blu-ray players, Internet-connected TVs, home theater systems, smartphones, tablet PCs, digital video recorders (DVRs), etc.

[0263] In addition, the processing method to which this document is applied can be produced in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to this document can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which data that can be read by a computer is stored. The computer-readable recording medium can include, for example, Blu-ray Disc (BD), Universal Serial Bus (USB), ROM, PROM, EPROM, EEPROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices. Also, the computer-readable recording medium includes a medium realized in the form of a carrier wave (for example, transmission via the Internet). Further, a bitstream generated by an encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0264] In addition, the embodiments of this document can be realized by a computer program product with program code, and the program code can be performed by a computer according to the embodiments of this document. The program code can be stored on a carrier readable by a computer.

[0265] FIG. 17 shows an example of a content streaming system to which the embodiments disclosed in this document can be applied.

[0266] As shown in FIG. 17, the content streaming system to which the embodiments of this document are applied can generally include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.

[0267] The encoding server compresses the content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream, and plays the role of sending this to the streaming server. As another example, when a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server can be omitted.

[0268] The bitstream can be generated by an encoding method or a bitstream generation method applied to the embodiments of this document, and the streaming server can temporarily store the bitstream in the process of sending or receiving the bitstream.

[0269] The streaming server sends multimedia data to the user device based on a user request via a web server, and the web server plays the role of a medium for informing the user of what services there are. If the user requests a desired service from the web server, the web server transmits this to the streaming server, and the streaming server sends multimedia data to the user. At this time, the content streaming system can include another control server, and in this case, the control server plays the role of controlling commands / responses between each device within the content streaming system.

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

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

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

Claims

1. An image decoding method performed by a decoding device, receiving a bitstream including prediction mode information and residual information; determining, based on the prediction mode information, to apply intra prediction to a current block; deriving Most Probable Mode (MPM) candidates for a current block based on neighboring blocks located around the current block, and constructing an MPM list, the neighboring blocks including a left neighboring block and an upper neighboring block; deriving an intra prediction mode for the current block based on the MPM list; performing prediction on the current block based on the intra prediction mode to generate a prediction sample; deriving quantized transform coefficients for the current block based on the residual information; deriving transform coefficients for the current block based on the quantized transform coefficients; generating a residual sample for the current block based on the transform coefficients; generating a reconstructed picture for the current block based on the predicted samples and the residual samples; The step of constructing the MPM list includes: Checking condition 1 whether the left peripheral block and the upper peripheral block are in the same intra-prediction mode; checking condition 2 whether the number of modes of the left peripheral block is greater than the number of modes of a DC mode based on whether condition 1 is satisfied; checking condition 3 whether the number of modes of the left peripheral block and the number of modes of the upper peripheral block are greater than the number of modes of a DC mode when condition 1 is not satisfied; If the condition 3 is satisfied, a check is made to see if the difference between the number of modes of the left peripheral block and the number of modes of the upper peripheral block is equal to 1; checking condition 5 whether one of the mode number of the left peripheral block and the mode number of the upper peripheral block is greater than the mode number of the DC mode based on the case where condition 3 is not satisfied; and configuring the MPM list based on at least one of the conditions 1 to 5; The step of deriving an intra prediction mode for the current block includes: obtaining MPM flag information related to whether an intra prediction mode for the current block is included in the MPM candidates; obtaining remaining mode information indicating an intra prediction mode for the current block among remaining intra prediction modes other than the MPM candidates based on the MPM flag information; deriving an intra prediction mode for the current block based on the remaining mode information; Including, the remaining mode information is obtained based on a value of the MPM flag information being equal to 0; The remaining mode information is obtained based on a TB (Truncated Binary) binarization process, The step of deriving a Most Probable Mode (MPM) candidate for the current block based on neighboring blocks located around the current block includes: if the left peripheral block is available and intra prediction is applied to the left peripheral block, a first MPM candidate is derived as an intra prediction mode of the left peripheral block; if the left surrounding block is not available or the intra prediction is not applied to the left surrounding block, the first MPM candidate is derived as a planar intra prediction mode; If the upper peripheral block is available, the intra prediction is applied to the upper peripheral block, and the upper peripheral block is included in the current coding tree unit, a second MPM candidate is derived as an intra prediction mode of the upper peripheral block; If the upper peripheral block is not available, or the intra prediction is not applied to the upper peripheral block, or the upper peripheral block is not included in the current coding tree unit, the second MPM candidate is derived as the planar intra prediction mode.

2. An image encoding method performed by an encoding device, comprising: determining that intra prediction is applied to a current block; deriving Most Probable Mode (MPM) candidates for a current block based on neighboring blocks located around the current block, and constructing an MPM list, the neighboring blocks including a left neighboring block and an upper neighboring block; determining an intra-prediction mode for the current block; generating prediction mode information based on the intra prediction being applied to the current block; generating a prediction sample for the current block based on the intra-prediction mode for the current block; generating a residual sample for the current block based on the predicted sample; deriving transform coefficients for the current block based on the residual samples; deriving quantized transform coefficients based on the transform coefficients; generating residual information based on the quantized transform coefficients; encoding image information including the prediction mode information and the residual information; The step of constructing the MPM list includes: Whether the left peripheral block and the upper peripheral block are in the same intra-prediction mode A step of checking condition 1; checking condition 2 whether the number of modes of the left peripheral block is greater than the number of modes of a DC mode based on whether condition 1 is satisfied; checking condition 3 whether the number of modes of the left peripheral block and the number of modes of the upper peripheral block are greater than the number of modes of a DC mode when condition 1 is not satisfied; If the condition 3 is satisfied, a check is made to see if the difference between the number of modes of the left peripheral block and the number of modes of the upper peripheral block is equal to 1; checking condition 5 whether one of the mode number of the left peripheral block and the mode number of the upper peripheral block is greater than the mode number of the DC mode based on the case where condition 3 is not satisfied; and configuring the MPM list based on at least one of the conditions 1 to 5; The step of determining an intra-prediction mode for the current block includes: generating MPM flag information based on whether an intra prediction mode for the current block is included in the MPM candidates; generating remaining mode information indicating an intra prediction mode for the current block among remaining intra prediction modes other than the MPM candidates based on the MPM flag information; the remaining mode information is generated based on a value of the MPM flag information being equal to 0; The MPM flag information and the remaining mode information are encoded; The remaining mode information is encoded based on a binarization process type; The step of deriving a Most Probable Mode (MPM) candidate for the current block based on neighboring blocks located around the current block includes: if the left peripheral block is available and intra prediction is applied to the left peripheral block, a first MPM candidate is derived as an intra prediction mode of the left peripheral block; if the left surrounding block is not available or the intra prediction is not applied to the left surrounding block, the first MPM candidate is derived as a planar intra prediction mode; If the upper peripheral block is available, the intra prediction is applied to the upper peripheral block, and the upper peripheral block is included in the current coding tree unit, a second MPM candidate is derived as an intra prediction mode of the upper peripheral block; If the upper surrounding block is not available, or the intra prediction is not applied to the upper surrounding block, or the upper surrounding block is not included in the current coding tree unit, the second MPM candidate is derived as the planar intra prediction mode.

3. 1. A method for transmitting data for image information, comprising: obtaining a bitstream of said image information including prediction mode information and residual information; transmitting the data including a bitstream of the image information including the prediction mode information and the residual information; The bitstream is generated based on determining to apply intra prediction to a current block, deriving Most Probable Mode (MPM) candidates for the current block based on neighboring blocks located around the current block, and constructing an MPM list; the peripheral blocks include a left peripheral block and an upper peripheral block, determining an intra prediction mode for the current block, generating prediction mode information based on the intra prediction being applied to the current block, generating a prediction sample for the current block based on the intra prediction mode for the current block, generating a residual sample for the current block based on the prediction sample, deriving a transform coefficient for the current block based on the residual sample, deriving a quantized transform coefficient based on the transform coefficient, generating residual information based on the quantized transform coefficient, and encoding the image information including the prediction mode information and the residual information; The MPM list is constructed based on checking condition 1 whether the left peripheral block and the upper peripheral block are in the same intra-prediction mode; If the condition 1 is satisfied, check the condition 2 as to whether the number of modes of the left peripheral block is greater than the number of modes of the DC mode; If the condition 1 is not satisfied, check condition 3 whether the number of modes of the left peripheral block and the number of modes of the upper peripheral block are greater than the number of modes of the DC mode; If the condition 3 is satisfied, check the condition 4 whether the mode number of the left peripheral block and the mode number of the upper peripheral block are equal to 1; If the condition 3 is not satisfied, check condition 5 whether one of the number of modes of the left peripheral block and the number of modes of the upper peripheral block is greater than the number of modes of the DC mode; Configuring the MPM list based on at least one of the conditions 1 to 5; The intra prediction mode for the current block is generating MPM flag information based on whether the intra prediction mode for the current block is included in the MPM candidates; and generating remaining mode information for indicating the intra prediction mode for the current block among remaining intra prediction modes excluding the MPM candidates based on the MPM flag information; the remaining mode information is generated based on a value of the MPM flag information being equal to 0; The MPM flag information and the remaining mode information are encoded; The re-maining mode information is stored in the binarization process. ss) type, The bitstream may include determining to apply intra prediction to a current block, and deriving a Most Probable Mode (MPM) candidate for the current block based on neighboring blocks located around the current block, if the left peripheral block is available and intra prediction is applied to the left peripheral block, a first MPM candidate is derived as an intra prediction mode of the left peripheral block; if the left surrounding block is not available or the intra prediction is not applied to the left surrounding block, the first MPM candidate is derived as a planar intra prediction mode; If the upper peripheral block is available, the intra prediction is applied to the upper peripheral block, and the upper peripheral block is included in the current coding tree unit, a second MPM candidate is derived as an intra prediction mode of the upper peripheral block; If the upper peripheral block is not available, or the intra prediction is not applied to the upper peripheral block, or the upper peripheral block is not included in the current coding tree unit, the second MPM candidate is derived as the planar intra prediction mode.

Citation Information

Patent Citations

  • Method and apparatus for intra prediction using non-square blocks

    US20140140404A1

  • Intra prediction mode mapping method and device using the method

    WO2013109066A1

  • Intra prediction and intra mode coding

    WO2016205684A1

  • Video signal processing method and apparatus

    WO2019083284A1