Video coding method and device for executing mrl-based intra prediction

The MRL-based intra prediction method enhances video coding efficiency by configuring an MPM list with DC mode, addressing the challenges of compressing high-resolution and immersive media formats, thereby reducing computational complexity and improving prediction performance.

JP2024167363AActive Publication Date: 2024-12-03GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024150916
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2019-01-13
Filing Date
2024-09-02
Publication Date
2024-12-03
Estimated Expiration
2040-01-13

AI Technical Summary

Technical Problem

Existing video coding technologies face challenges in efficiently compressing high-resolution and high-quality images/videos, particularly in immersive media formats like VR and AR, leading to increased transmission and storage costs.

Method used

A video coding method and apparatus utilizing MRL-based intra prediction, which includes configuring an MPM list with DC mode, to enhance video coding efficiency by deriving and encoding intra prediction modes effectively.

Benefits of technology

This approach increases overall video compression efficiency by reducing computational complexity and improving prediction performance through efficient intra-prediction, particularly in high-resolution and immersive media formats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024167363000001_ABST
    Figure 2024167363000001_ABST
Patent Text Reader

Abstract

To provide a method and device for increasing video coding efficiency.SOLUTION: A method includes steps of: configuring an MPM (Most Probable Mode) list including candidate intra prediction modes for a current block; deriving an intra prediction mode of the current block from the MPM list on the basis of MPM index information indicating the intra prediction mode for the current block among the candidate intra prediction modes included in the MPM list; generating prediction samples for the current block on the basis of the intra prediction mode; and generating a reconstructed picture for the current block on the basis of the prediction samples. The step for configuring the MPM list includes deriving a DC mode and including it in the MPM list as one mode among the candidate intra prediction modes on the basis of the case where the value of reference line index information representing a reference line to be used for the intra prediction of the current block is not zero.SELECTED DRAWING: Figure 15
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This document relates to a video coding technology, and more particularly, to a video coding method and apparatus for performing multi-reference line (MRL) based intra prediction. [Background technology]

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

[0003] In addition, in recent years, interest in and demand for immersive media such as virtual reality (VR), artificial reality (AR) content, and holograms has been increasing, and the broadcast of images / videos having different image characteristics from real images, such as game images, has been increasing.

[0004] Therefore, there is a demand for highly efficient image / video compression technology to effectively compress and transmit, store, and play back high-resolution, high-quality image / video information having the various characteristics described above. Summary of the Invention [Problem to be solved by the invention]

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

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

[0007] Another technical object of this document is to provide a method and apparatus for applying a DC mode in multi-reference line (MRL) based intra prediction and for constructing a Most Probable Mode (MPM) list including the DC mode. [Means for solving the problem]

[0008] [Technical solution] According to an embodiment of the present document, a video decoding method performed by a decoding device is provided. The method includes the steps of: constructing a Most Probable Mode (MPM) list including candidate intra prediction modes for a current block; deriving an intra prediction mode for the current block from the MPM list based on MPM index information indicating an intra prediction mode for the current block among the candidate intra prediction modes included in the MPM list; generating a prediction sample for the current block based on the intra prediction mode; and generating a reconstructed picture for the current block based on the prediction sample. The constructing the MPM list includes deriving a DC mode as one of the candidate intra prediction modes and including it in the MPM list based on a case where a value of reference line index information indicating a reference line used for intra prediction of the current block is not 0.

[0009] According to another embodiment of the present document, there is provided a video encoding method performed by an encoding apparatus, the method including the steps of: configuring a Most Probable Mode (MPM) list including candidate intra prediction modes for a current block; deriving an intra prediction mode of the current block based on the candidate intra prediction modes included in the MPM list; generating MPM index information indicating an intra prediction mode of the current block from the candidate intra prediction modes included in the MPM list; and encoding video information including at least one of reference line index information indicating a reference line used for intra prediction of the current block or the MPM index information, wherein the configuring of the MPM list includes deriving a DC mode as one of the candidate intra prediction modes and including the DC mode in the MPM list based on a case where a value of the reference line index information is not 0.

[0010] According to another embodiment of the present document, there is provided a computer-readable digital storage medium having encoded video information stored thereon, the digital storage medium being adapted to perform the video decoding method as recited in claim 1. Effect of the Invention

[0011] According to the document, it can improve the overall image / video compression efficiency.

[0012] According to this document, efficient intra prediction can reduce computational complexity and improve prediction performance, thereby improving overall coding efficiency.

[0013] According to this document, by configuring an MPM list including DC mode in MRL-based intra prediction and performing DC mode intra prediction using the MRL, it is possible to improve prediction accuracy, thereby improving overall coding efficiency. [Brief description of the drawings]

[0014] [Figure 1] 1 illustrates generally an example of a video / image coding system that can be applied to embodiments of the present document; [Diagram 2] FIG. 1 is a diagram illustrating the configuration of a video / image encoding device that can be applied to an embodiment of this document. [Diagram 3] FIG. 1 is a diagram illustrating the configuration of a video / image decoding device that can be applied to an embodiment of this document. [Figure 4] 1 illustrates an example of a general intra-prediction based video encoding method to which the embodiments of this document can be applied. [Diagram 5] 1 illustrates a schematic diagram of an intra prediction unit in an encoding device. [Figure 6] 1 illustrates an example of a general intra-prediction based video decoding method to which the embodiments of this document can be applied. [Figure 7] 2 illustrates a schematic diagram of an intra-prediction unit in a decoding device. [Figure 8] 1 illustrates an example of an MPM mode-based intra prediction method in an encoding device to which an embodiment of this document can be applied. [Figure 9] An example of an MPM mode-based intra prediction method in a decoding device to which an embodiment of this document can be applied is shown. [Figure 10] 1 illustrates an example of an intra-prediction mode to which the embodiment of this document can be applied. [Figure 11] 1 illustrates an example of reference sample lines for intra prediction using multiple reference lines. [Figure 12] FIG. 13 is a diagram for explaining an embodiment of a method for deriving predicted samples in DC mode. [Figure 13] FIG. 13 is a diagram for explaining another embodiment of a method for deriving a prediction sample in DC mode. [Figure 14]1 is a flow chart illustrating an encoding method that can be performed by an encoding device according to an embodiment of the present document. [Figure 15] 1 is a flow chart illustrating a decoding method that can be performed by a decoding device according to an embodiment of the present document. [Figure 16] 1 illustrates an example of a content streaming system in which the embodiments disclosed herein can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0015] This document may have various modifications and may have various embodiments, and a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to a specific embodiment. Terms commonly used in this specification are used merely to describe a specific embodiment, and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this specification, the terms "include" or "have" are intended to specify the presence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.

[0016] Meanwhile, each component in the drawings described in this document is illustrated independently for the convenience of explaining the different characteristic functions, and does not mean that each component is realized by separate hardware or software. For example, two or more components among the components may be combined to form one component, or one component may be divided into multiple components. An embodiment in which each component is integrated and / or separated is also included in the scope of the rights of this document as long as it does not deviate from the essence of this document.

[0017] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used for the same components in the drawings, and duplicated descriptions of the same components may be omitted.

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

[0019] This document presents various embodiments relating to video / image coding, which embodiments may also be implemented in combination with each other, unless otherwise stated.

[0020] In this document, a video may mean a collection of a series of images over time. A picture generally means a unit showing one image at a specific time, and a slice / tile is a unit constituting a part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A picture may be composed of one or more tile groups. A tile group may include 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 also be referred to as a brick.A brick scan can refer to 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 height specified by syntax elements in the picture parameter set and a width equal to the width 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 consist of either a number of complete tiles or only a consecutive sequence of complete bricks of one tile.In this document, tile group and slice can be used interchangeably. For example, in this document, tile group / tile group header can be called slice / slice header.

[0021] A pixel or a pel may refer to the smallest unit constituting one picture (or image). A term corresponding to a pixel may also be used as a "sample." A sample may generally refer to a pixel or a pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. Alternatively, a sample may refer to a pixel value in the spatial domain, or may refer to a transform coefficient in the frequency domain when such a pixel value is transformed into the frequency domain.

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

[0023] In this document, " / " 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" means "at least one of A, B, and / or C."

[0024] Additionally, in this document, "or" is to be interpreted as "and / or." For example, "A or B" can mean 1) "A" only, or 2) "B" only, or 3) "A and B." In other expressions, "or" in this document can mean "additionally or alternatively."

[0025] FIG. 1 illustrates a schematic diagram of an example of a video / image coding system to which embodiments of the present document can be applied.

[0026] Referring to Figure 1, a video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in a file or streaming form via a digital storage medium or a network.

[0027] The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / video encoding device, and the decoding device may be referred to as a video / video decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may also include a display unit, which may be a separate device or an external component.

[0028] A video source may acquire video / images through a video / image capture, synthesis, or generation process. A video source may include a video / image capture device and / or a video / image generation device. A video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device may include, for example, a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated via a computer, etc., in which case the video / image capture process may be replaced with a process in which related data is generated.

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

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

[0031] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, and prediction that correspond to the operations of the encoding device.

[0032] The renderer may render the decoded video / image, and the rendered video / image may be displayed via a display unit.

[0033] 2 is a diagram for illustrating a schematic configuration of a video / image encoding device that can be applied to an embodiment of the present document. Hereinafter, the video encoding device may include an image encoding device.

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

[0035] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree binary-tree ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quad-tree structure may be applied first, and then the binary tree structure and / or the ternary structure may be applied. Alternatively, the binary tree structure may be applied first. The coding procedure according to the present disclosure may be performed based on a final coding unit that is not further divided. In this case, the maximum coding unit may be used as the final coding unit based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as necessary, and a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may 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 may each be divided or partitioned from the final coding unit described above.The prediction unit may be a unit of sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

[0036] The unit may be used interchangeably with terms such as block or area. In general, an M×N block may refer to a collection of samples or transform coefficients consisting of M columns and N rows. A sample may generally refer to a pixel or pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. A sample may be used as a term that corresponds to a pixel or pel of one picture (or image).

[0037] The encoding apparatus 200 may generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction 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), and the generated residual signal is transmitted to the conversion unit 232. In this case, as illustrated, a unit in the encoder 200 that subtracts a prediction signal (predicted block, prediction sample array) from an input image signal (original block, original sample array) may be called a subtraction unit 231. The prediction unit may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of a current block or a CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction-related information can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

[0038] The intra prediction unit 222 can predict the current block by referring to samples in the current picture. The referenced samples can be located in the neighborhood of the current block or can be located far away depending on the prediction mode. In the intra prediction, the prediction mode can include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the settings. The intra prediction unit 222 may also determine a prediction mode to be applied to a current block using a prediction mode applied to a neighboring block.

[0039] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between a neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (col CU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 221 may generate information indicating which candidate is used to derive a motion vector and / or a reference picture index of the current block by forming a motion information candidate list based on neighboring blocks. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 221 may use motion information of a neighboring block as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring 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.

[0040] The prediction unit 220 may generate a prediction signal based on various prediction methods described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, or may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). In addition, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding such as games, for example, screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may utilize at least one of the inter prediction techniques described in this document. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, a sample value within a picture may be signaled based on information regarding a palette table and a palette index.

[0041] The prediction signal generated through the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a restored signal or may be used to generate a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is to be expressed as a graph. The CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same square size, and may also be applied to non-square variable-size blocks.

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

[0043] The quantized transform coefficients output from the quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be restored by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 155 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed 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 current block, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 250 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.

[0044] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or restoration.

[0045] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may 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 may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

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

[0047] The DPB of the memory 270 may store the modified reconstructed picture to be used as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.

[0048] FIG. 3 is a diagram illustrating a schematic configuration of a video / image decoding device that can be applied to an embodiment of this document.

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

[0050] If a bitstream including video / image information is input, the decoding apparatus 300 can restore an image corresponding to a process in which the video / image information is processed by the encoding apparatus of FIG. 3. For example, the decoding apparatus 300 can derive a unit / block based on block division related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied in the encoding apparatus. Thus, the processing unit for decoding can be, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximal coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. Then, the restored image signal decoded and output by the decoding apparatus 300 can be reproduced by a reproduction device.

[0051] The decoding apparatus 300 may receive a signal output from the encoding apparatus of FIG. 3 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding apparatus may further decode pictures based on information on the parameter set and / or the general constraint information. Signaling / received information and / or syntax elements described later in this document may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values ​​of syntax elements required for image restoration and quantized values ​​of transform coefficients related to residuals. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in a bitstream, determine a context model using syntax element information to be decoded and decoding information of adjacent and to-be-decoded blocks or symbol / bin information decoded in a previous step, predict the occurrence probability of bins according to the determined context model, and perform arithmetic decoding of the bins to generate symbols corresponding to the values ​​of each syntax element.In this case, the CABAC entropy decoding method may update the context model using information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Prediction information from the information decoded by the entropy decoding unit 310 is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values ​​entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). In addition, filtering information from the information decoded by the entropy decoding unit 310 may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) that receives a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document may be called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.

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

[0053] The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).

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

[0055] The prediction unit 320 may generate a prediction signal based on various prediction methods described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). In addition, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding such as games, for example, screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be considered as an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / image information and signaled.

[0056] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or may be located far away depending on a prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block using a prediction mode applied to a neighboring block.

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

[0058] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including an inter prediction unit 332 and / or an intra prediction unit 331). When there is no residual for a current block, such as when a skip mode is applied, the predicted block may be used as a reconstructed block.

[0059] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in a current picture, and may be output after filtering as described below, or may be used for inter prediction of a next picture.

[0060] Meanwhile, luma mapping with chroma scaling (LMCS) can be applied during the picture decoding process.

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

[0062] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 332. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 331.

[0063] In this specification, the embodiments described for the filtering unit 260, inter prediction unit 221, and intra prediction unit 222 of the encoding apparatus 100 may also be applied identically or correspondingly to the filtering unit 350, inter prediction unit 332, and intra prediction unit 331 of the decoding apparatus 300, respectively.

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

[0065] The residual information may be generated through a transform and quantization procedure. For example, the encoding apparatus may derive a residual block between the original block and the predicted block, perform a transform procedure on the residual samples (residual sample array) included in the residual block to derive transform coefficients, and perform a quantization procedure on the transform coefficients to derive quantized transform coefficients, and then signal the related residual information (through a bitstream) to the decoding apparatus. Here, the residual information may include information such as value information, position information, transform technique, transform kernel, and quantization parameter of the quantized transform coefficients. The decoding apparatus may derive a residual sample (or a residual block) by performing an inverse quantization / inverse transform procedure based on the residual information. The decoding apparatus may generate a reconstructed picture based on the predicted block and the residual block. In addition, the encoding apparatus may derive a residual block by inverse quantizing / inverse transforming the quantized transform coefficients for reference for inter-prediction of a future picture, and generate a reconstructed picture based on the residual block.

[0066] Meanwhile, when intra prediction is performed, correlation between samples can be used to obtain a difference between an original block and a predicted block, i.e., a residual. The above-mentioned transformation and quantization can be applied to the residual, and thus spatial redundancy can be removed. Hereinafter, an encoding method and a decoding method using intra prediction will be described in detail.

[0067] Intra prediction refers to a prediction that generates a prediction sample for a current block based on a reference sample outside the current block in a picture including the current block (hereinafter, the current picture). Here, the reference sample outside the current block may refer to a sample located adjacent to the current block. When intra prediction is applied to the current block, neighboring reference samples used for intra prediction of the current block may be derived.

[0068] For example, when the size (width x height) of the current block is nW x nH, the neighboring reference samples of the current block may include a total of 2 x nH samples adjacent to the left boundary and bottom-left of the current block, a total of 2 x nW samples adjacent to the top boundary and top-right of the current block, and one sample adjacent to the top-left of the current block. Alternatively, the neighboring reference samples of the current block may include upper neighboring samples of multiple columns and left neighboring samples of multiple rows. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block having a size of nW x nH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.

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

[0070] When the neighboring reference sample is derived, (i) the prediction sample may be derived based on an average or an interpolation of the neighboring reference samples of the current block, or (ii) the prediction sample may be derived based on a reference sample that exists in a specific (prediction) direction with respect to the prediction sample among the neighboring reference samples of the current block. In the case of (i), it may be applied when the intra prediction mode is a non-directional mode or a non-angular mode, and in the case of (ii), it may be applied when the intra prediction mode is a directional mode or an angular mode.

[0071] In addition, a prediction sample may be generated by interpolating a first adjacent sample located in a prediction direction of an intra prediction mode of the current block and a second adjacent sample located in an opposite direction to the prediction direction based on a prediction sample of the current block among the adjacent reference samples. The above case may be called linear interpolation intra prediction (LIP). A chroma prediction sample may also be generated based on a luma sample using a linear model. In this case, it may be called LM mode.

[0072] Also, a temporary prediction sample of the current block may be derived based on the filtered neighboring reference sample, and a prediction sample of the current block may be derived by weighting the temporary prediction sample and at least one reference sample derived according to an intra prediction mode among existing neighboring reference samples, i.e., non-filtered neighboring reference samples. The above case may be called Position Dependent Intra Prediction (PDPC).

[0073] Also, the reference sample line with the highest prediction accuracy is selected from the adjacent multiple reference sample lines of the current block, a prediction sample is derived using a reference sample located in the prediction direction of the corresponding line, and the reference sample line used is signaled to a decoding device, thereby performing intra prediction encoding. The above case can be called multi-reference line (MRL) intra prediction or MRL-based intra prediction.

[0074] Also, the current block may be divided into vertical or horizontal sub-partitions, intra prediction may be performed based on the same intra prediction mode, and adjacent reference samples may be derived and used in sub-partition units. That is, in this case, the intra prediction mode for the current block is applied to the sub-partitions in the same way, and adjacent reference samples may be derived and used in sub-partition units, thereby improving intra prediction performance in some cases. Such a prediction method may be called intra sub-partitions (ISP) or ISP-based intra prediction.

[0075] The above-mentioned intra prediction methods may be called intra prediction types, distinguished from intra prediction modes. The intra prediction types may be called various terms, such as intra prediction techniques or additional intra prediction modes. For example, the intra prediction types (or additional intra prediction modes, etc.) may include at least one of the above-mentioned LIP, PDPC, MRL, and ISP. A general intra prediction method excluding a specific intra prediction type, such as the LIP, PDPC, MRL, or ISP, may be called a normal intra prediction type. The normal intra prediction type may be generally applied when the above-mentioned specific intra prediction types are not applied, and prediction may be performed based on the above-mentioned intra prediction modes. Meanwhile, post-processing filtering may be performed on the derived prediction samples as necessary.

[0076] 4 shows an example of a video encoding method based on intra prediction to which the embodiments of the present document can be applied, and FIG 5 shows an intra prediction unit in an encoding device. The intra prediction unit in the encoding device of FIG 5 can be applied in the same or corresponding manner to the intra prediction unit 222 of the encoding device 200 of FIG 2 described above.

[0077] 4 and 5, S400 may be performed by the intra prediction unit 222 of the encoding apparatus, and S410 may be performed by the residual processing unit 230 of the encoding apparatus. Specifically, S410 may be performed by the subtraction unit 231 of the encoding apparatus. In S420, prediction information may be derived by the intra prediction unit 222 and encoded by the entropy encoding unit 240. In S420, residual information may be derived by the residual processing unit 230 and encoded by the entropy encoding unit 240. The residual information is information about a residual sample. The residual information may include information about a quantized transform coefficient for the residual sample. As described above, the residual sample may be derived as a transform coefficient through the transform unit 232 of the encoding apparatus, and the transform coefficient may be derived as a quantized transform coefficient through the quantization unit 233. Information about the quantized transform coefficient may be encoded in the entropy encoding unit 240 through a residual coding procedure.

[0078] The encoding apparatus performs intra prediction on a current block (S400). The encoding apparatus may derive an intra prediction mode / type for the current block, derive neighboring reference samples for the current block, and generate a prediction sample in the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the intra prediction mode / type determination, neighboring reference sample derivation, and prediction sample generation procedures may be performed simultaneously, or one procedure may be performed prior to the other procedures.

[0079] For example, the intra prediction unit 222 of the encoding apparatus may include an intra prediction mode / type determination unit 222-1, a reference sample derivation unit 222-2, and a prediction sample derivation unit 222-3, where the intra prediction mode / type determination unit 222-1 determines an intra prediction mode / type for a current block, the reference sample derivation unit 222-2 derives neighboring reference samples of the current block, and the prediction sample derivation unit 222-3 derives a prediction sample of the current block. Meanwhile, although not shown, if a prediction sample filtering procedure is performed, the intra prediction unit 222 may further include a prediction sample filter unit (not shown). The encoding apparatus may determine a mode / type to be applied to a current block from among a plurality of intra prediction modes / types. The encoding apparatus may compare RD costs for the intra prediction modes / types to determine an optimal intra prediction mode / type for the current block.

[0080] As described above, the encoding apparatus may also perform a predicted sample filtering procedure. The predicted sample filtering may be referred to as post-filtering. Some or all of the predicted samples may be filtered by the predicted sample filtering procedure. In some cases, the predicted sample filtering procedure may be omitted.

[0081] The encoding apparatus generates a residual sample for the current block based on the (filtered) predicted sample (S410). The encoding apparatus may derive the residual sample by comparing the predicted sample with the original sample of the current block based on the phase.

[0082] The encoding apparatus may encode video information including information related to intra prediction (prediction information) and residual information related to residual samples (S420). The prediction information may include intra prediction mode information and intra prediction type information. The residual information may include residual coding syntax. The encoding apparatus may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information on the quantized transform coefficients.

[0083] The encoding device can output the encoded video information in the form of a bitstream, and the output bitstream can be transmitted to a decoding device via a storage medium or a network.

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

[0085] FIG. 6 illustrates an example of a video decoding method based on schematic intra-prediction to which the embodiments of the present document can be applied, and FIG. 7 illustrates an intra-prediction unit in a decoding device. The intra predictor in the decoding apparatus of FIG. 7 may be applied in the same or corresponding manner to the intra predictor 331 of the decoding apparatus 300 of FIG.

[0086] 6 and 7, the decoding apparatus may perform operations corresponding to those performed by the encoding apparatus described above. S600 to S620 may be performed by an intra prediction unit 331 of the decoding apparatus, and prediction information of S600 and residual information of S630 may be obtained from a bitstream by an entropy decoding unit 310 of the decoding apparatus. The residual processing unit 320 of the decoding apparatus may derive a residual sample for a current block based on the residual information. Specifically, the inverse quantization unit 321 of the residual processing unit 320 may derive a transform coefficient by performing inverse quantization based on a quantized transform coefficient derived based on the residual information, and the inverse transform unit 322 of the residual processing unit may derive a residual sample for a current block by performing inverse transform on the transform coefficient. S640 may be performed by an adder 340 or a reconstruction unit of the decoding apparatus.

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

[0088] The decoding apparatus generates a residual sample for the current block based on the received residual information (S630). The decoding apparatus may generate a reconstructed sample for the current block based on the prediction sample and the residual sample, and derive a reconstructed block including the reconstructed sample (S640). A reconstructed picture for the current picture may be generated based on the reconstructed block. As described above, an in-loop filtering procedure may be further applied to the reconstructed picture.

[0089] Here, the intra prediction unit 331 of the decoding device may include an intra prediction mode / type determination unit 331-1, a reference sample derivation unit 331-2, and a prediction sample derivation unit 331-3, where the intra prediction mode / type determination unit 331-1 determines an intra prediction mode / type for a current block based on intra prediction mode / type information acquired by the entropy decoding unit 310, the reference sample derivation unit 331-2 derives neighboring reference samples of the current block, and the prediction sample derivation unit 331-3 derives a prediction sample of the current block. Meanwhile, although not shown, if the above-mentioned prediction sample filtering procedure is performed, the intra prediction unit 331 may further include a prediction sample filter unit (not shown).

[0090] The intra prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether a most probable mode (MPM) is applied to the current block or a remaining mode is applied. In this case, if the MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of intra prediction mode candidates (MPM candidates). Intra prediction mode candidates (MPM candidates) may be configured in an MPM candidate list or an MPM list. In addition, if MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The decoding device may determine the intra prediction mode of the current block based on the intra prediction mode information.

[0091] Also, the intra prediction type information may be implemented in various forms. As an example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether MRL is applied to the current block and which reference sample line is used if MRL is applied, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating a subpartition split type if ISP is applied, flag information indicating whether PDCP is applied, or flag information indicating whether LIP is applied. Also, the intra prediction type information may include an MIP flag indicating whether MIP is applied to the current block.

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

[0093] Meanwhile, when intra prediction is applied, the intra prediction mode applied to the current block may be determined using the intra prediction mode of the neighboring block. For example, the decoding apparatus may select one of the MPM candidates in an MPM (most probable mode) list derived based on the intra prediction mode of the neighboring block (e.g., the left and / or upper neighboring block) of the current block and an additional candidate mode based on the received MPM index, or may select one of the remaining intra prediction modes not included in the MPM candidates (and the planar mode) based on the remaining intra prediction mode information. The MPM list may be configured with or without the planar mode as a candidate. For example, if the MPM list includes the planar mode as a candidate, the MPM list may have six candidates, and if the MPM list does not include the planar mode as a candidate, the MPM list may have five candidates. If the mpm list does not include a planar mode as a candidate, a not planar flag (eg, intra_luma_not_planar_flag) may be signaled to indicate that the intra prediction mode of the current block is not a planar mode. For example, the mpm flag is signaled first, and the mpm index and not planar flag can be signaled if the value of the mpm flag is 1. Also, the mpm index can be signaled if the value of the not planar flag is 1. Here, the reason why the mpm list is configured not to include the planar mode as a candidate is not to mean that the planar mode is not mpm, but rather to signal the flag (not planar flag) first to check whether it is a planar mode first, since the planar mode is always considered in mpm.

[0094] For example, whether the intra prediction mode applied to the current block is among the mpm candidates (and planar mode) or among the remaining mode may be indicated based on the mpm flag (e.g., intra_luma_mpm_flag). A value of 1 of the mpm flag may indicate that the intra prediction mode for the current block is among the mpm candidates (and planar mode), and a value of 0 of the mpm flag may indicate that the intra prediction mode for the current block is not among the mpm candidates (and planar mode). A value of 0 of the not planar flag (e.g., intra_luma_not_planar_flag) may indicate that the intra prediction mode for the current block is planar mode, and a value of 1 of the not planar flag may indicate that the intra prediction mode for the current block is not planar mode. The mpm index may be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information may be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may index the remaining intra prediction modes not included in the mpm candidates (and planar modes) among all intra prediction modes in order of prediction mode number, and point to one of them. The intra prediction mode is an intra prediction mode for a luma component (sample). Hereinafter, the intra prediction mode information may include at least one of an mpm flag (e.g., intra_luma_mpm_flag), a not planar flag (e.g., intra_luma_not_planar_flag), an mpm index (e.g., mpm_idx or intra_luma_mpm_idx), and remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In this document, the MPM list may be referred to by various terms such as an MPM candidate list, a candModeList, etc.

[0095] In general, when an image is divided into blocks, a current block to be coded and a neighboring block have similar image characteristics, and therefore, there is a high probability that the current block and the neighboring block have the same or similar intra prediction mode. Therefore, the encoder may use the intra prediction mode of the neighboring block to encode the intra prediction mode of the current block. For example, the encoder / decoder may construct a most probable modes (MPM) list for the current block. The MPM list may also refer to an MPM candidate list. Here, the MPM may refer to a mode used to improve coding efficiency in consideration of similarity between the current block and the neighboring block during intra prediction mode coding.

[0096] FIG. 8 illustrates an example of an MPM mode-based intra prediction method in an encoding device to which an embodiment of this document can be applied.

[0097] Referring to Fig. 8, the encoding apparatus constructs an MPM list for a current block (S800). The MPM list may include candidate intra prediction modes (MPM candidates) that are likely to be applied to the current block. The MPM list may include intra prediction modes of neighboring blocks, and may further include a specific intra prediction mode according to a predetermined method. A specific method for constructing the MPM list will be described later.

[0098] The encoding apparatus determines an intra prediction mode of a current block (S810). The encoding apparatus may perform prediction based on various intra prediction modes and may determine an optimal intra prediction mode based on rate-distortion optimization (RDO) based on the prediction. In this case, the encoding apparatus may determine an optimal intra prediction mode using only the MPM candidates and planar modes configured in the MPM list, or may determine an optimal intra prediction mode using not only the MPM candidates and planar modes configured in the MPM list but also the remaining intra prediction modes.

[0099] Specifically, for example, if the intra prediction type of the current block is a specific type other than the normal intra prediction type (e.g., LIP, MRL, or ISP), the encoding device may determine the optimal intra prediction mode by considering only MPM candidates and planar modes as intra prediction mode candidates for the current block. That is, in this case, the intra prediction mode for the current block may be determined only from among the MPM candidates and planar modes, and in this case, the mpm flag is not encoded / signaled. In this case, the decoding device may estimate that the mpm flag is 1 without receiving a separate signal of the mpm flag.

[0100] In general, if the intra prediction mode of the current block is not a planar mode and is one of the MPM candidates in the MPM list, the encoding device generates an mpm index (mpm idx) that points to one of the MPM candidates. If the intra prediction mode of the current block is not in the MPM list, the encoding device generates remaining intra prediction mode information that points to the same mode as the intra prediction mode of the current block among the remaining intra prediction modes not included in the MPM list (and planar modes).

[0101] The encoding apparatus may encode the intra prediction mode information and output it in the form of a bitstream (S820). The intra prediction mode information may include the above-mentioned mpm flag, not planar flag, mpm index, and / or remaining intra prediction mode information. In general, the mpm index and the remaining intra prediction mode information are in an alternative relationship and are not signaled simultaneously to indicate the intra prediction mode for one block. That is, the mpm flag value 1 and the not planar flag or mpm index are signaled together, or the mpm flag value 0 and the remaining intra prediction mode information are signaled together. However, as described above, when a specific intra prediction type is applied to the current block, the mpm flag may not be signaled and only the not planar flag and / or mpm index may be signaled. That is, in this case, the intra prediction mode information may include only the not planar flag and / or mpm index.

[0102] 9 illustrates an example of an MPM mode-based intra prediction method in a decoding device to which an embodiment of the present document can be applied. The decoding device of FIG. 9 can determine an intra prediction mode in response to intra prediction mode information determined and signaled by the encoding device of FIG.

[0103] 9, a decoding apparatus obtains intra-prediction mode information from a bitstream (S900). As described above, the intra-prediction mode information may include at least one of an mpm flag, a not planar flag, an mpm index, and a remaining intra-prediction mode.

[0104] The decoding apparatus constructs an MPM list (S910). The MPM list is constructed in the same manner as the MPM list constructed in the encoding apparatus. That is, the MPM list may include intra-prediction modes of neighboring blocks, and may further include a specific intra-prediction mode according to a predetermined method. A specific method for constructing the MPM list will be described later.

[0105] Although S910 is illustrated as being performed after S900, this is by way of example only, and S910 may be performed prior to or simultaneously with S900.

[0106] The decoding apparatus determines the intra-prediction mode of the current block based on the MPM list and the intra-prediction mode information (S920).

[0107] For example, when the value of the mpm flag is 1, the decoding apparatus may derive a planar mode as the intra prediction mode of the current block (based on the not planar flag), or may derive a candidate pointed to by the mpm index among the MPM candidates in the MPM list as the intra prediction mode of the current block. Here, the MPM candidate may indicate only the candidates included in the MPM list, or may include not only the candidates included in the MPM list but also the planar mode that can be applied when the value of the mpm flag is 1.

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

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

[0110] Meanwhile, the intra prediction mode may include a non-directional (or non-angular) intra prediction mode and a directional (or angular) intra prediction mode. For example, the HEVC standard uses intra prediction modes including two non-directional prediction modes and 33 directional prediction modes. The non-directional prediction modes may include a planar intra prediction mode numbered 0 and a DC intra prediction mode numbered 1, and the directional prediction modes may include intra prediction modes numbered 2 to 34. The planar intra prediction mode may be referred to as a planar mode, and the DC intra prediction mode may be referred to as a DC mode.

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

[0112] FIG. 10 shows an example of an intra prediction mode to which the embodiments of this document can be applied.

[0113] Referring to FIG. 10, the intra prediction modes may be classified into those having horizontal directionality and those having vertical directionality, with respect to the 34th intra prediction mode having a left-up diagonal prediction direction. H and V in FIG. 10 respectively mean horizontal directionality and vertical directionality, and the numbers from -32 to 32 indicate a displacement of 1 / 32 units 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 and 50th intra prediction modes indicate horizontal and vertical intra prediction modes, respectively, and the 2nd intra prediction mode may be called a left-down diagonal intra prediction mode, the 34th intra prediction mode may be called a left-up diagonal intra prediction mode, and the 66th intra prediction mode may be called a right-up diagonal intra prediction mode.

[0114] Meanwhile, intra prediction can use MRL using multiple reference lines, in which intra prediction can be performed using adjacent samples located on sample lines one to three sample distances away from the upper and / or left side of the current block as reference samples.

[0115] 11 illustrates an example of a reference sample line for intra prediction using multiple reference lines. A block unit in FIG. 11 may indicate a current block.

[0116] In one embodiment, intra prediction can use a reference sample adjacent to the current block (or a reference sample closest to the current block, i.e., a reference sample located at a 0 sample distance from the current block) as a reference sample for prediction. In another embodiment, multiple reference line (MRL) intra prediction is a method that uses reference samples located at a K sample distance (K is an integer equal to or greater than 1) from the left and top boundaries of the current block, and can have more options for reference samples and more accurate prediction performance than intra prediction that uses a reference sample closest to the current block (i.e., located at a 0 sample distance). The reference samples of the current block can also be referred to as adjacent samples of the current block or reference line samples of the current block, and the reference line samples can also be referred to as samples on the reference line.

[0117] Referring to FIG. 11, the positions of adjacent reference samples located at 0, 1, 2, and 3 sample distances from the current block may be referred to as reference lines 0, 1, 2, and 3, respectively. The reference lines may be referred to as reference sample lines, reference sample rows, or reference sample columns, or may be simply referred to as lines, rows, or columns. The reference lines 0, 1, 2, and 3 may be located in order of proximity to the current block. As an example, multiple reference line intra prediction may be performed based on the reference lines 1 and 2. As another example, multiple reference line intra prediction may be performed based on the reference lines 1 and 3. However, the multiple reference line intra prediction of this document is not necessarily limited to these examples.

[0118] In addition, the multiple reference line (MRL) based intra prediction may signal reference line information for indicating which reference line is used. For example, the reference line information may be signaled in the form of an intra_luma_ref_idx syntax element. When the value of intra_luma_ref_idx is 0, it may indicate that intra prediction is performed using a reference sample that is closest to the current block (i.e., located at a distance of 0 samples). When the value of intra_luma_ref_idx is 1, it may indicate that intra prediction is performed using a reference sample that is second closest to the current block (i.e., located at a distance of 1 sample). When the value of intra_luma_ref_idx is 2, it may indicate that intra prediction is performed using a reference sample that is third or fourth closest to the current block (i.e., located at a distance of 2 or 3 samples).

[0119] Hereinafter, a method for constructing an MPM list when performing multiple reference line-based intra prediction and a method for performing intra prediction by deriving adjacent reference samples in DC mode will be described.

[0120] FIG. 12 is a diagram for explaining an embodiment of a method for deriving a predicted sample in DC mode.

[0121] For ease of explanation, a case where the reference sample closest to the current block (i.e., located at a distance of 0 samples) is used is illustrated in Fig. 12. That is, the reference sample used in DC mode is illustrated when the value of reference line index information (e.g., intra_luma_ref_idx) is 0. The method disclosed in Fig. 12 can also be applied to DC mode when the value of reference line index information (e.g., intra_luma_ref_idx) is not 0.

[0122] Referring to (a) of FIG. 12, when the current block is a square block (e.g., a 4×4 block) and the intra prediction mode of the current block is DC mode, adjacent reference samples used for intra prediction of DC mode may be derived. In this case, the adjacent reference samples may include left reference samples (E, F, G, H) located adjacent to the left side of the current block and upper reference samples (A, B, C, D) located adjacent to the upper side of the current block. In this case, an average is calculated using the left reference samples (E, F, G, H) and the upper reference samples (A, B, C, D), and a DC value (dcVal) may be derived based on the calculated average. Samples in the current block (hatched area in (a) of FIG. 12) may be filled with the DC value (dcVal). That is, the samples filled with such DC values ​​(dcVal) may be called predicted samples.

[0123] Referring to (b) of FIG. 12, when the current block is a non-square block (e.g., an 8×4 block) and the intra prediction mode of the current block is the DC mode, the adjacent reference sample used for intra prediction of the DC mode may be derived. In this case, the adjacent reference sample may include a reference sample located on the longer side of the width and height of the non-square block. In the case of an 8×4 block as shown in (b) of FIG. 12, the width (i.e., horizontal) has a larger value, so that the upper reference sample (A, B, C, D, E, F, G, H) located adjacent to the width side may be derived as the adjacent reference sample. In this case, an average may be calculated using the upper reference samples (A, B, C, D, E, F, G, H), and a DC value (dcVal) may be derived based on the calculated average. Samples in the current block (hatched area in (b) of FIG. 12) may be filled with the DC value (dcVal). That is, the sample filled with such a DC value (dcVal) may be called a prediction sample.

[0124] As mentioned above, unlike square blocks, when calculating the average using all the left and upper reference samples in non-square blocks, the division value is 2. n Since the square root of the non-square block is not in the form of , a division operation must be used. In order to change the division operation to a shift operation, as described above, the DC value can be calculated using only the reference samples located on the longer side of the width and height of the non-square block.

[0125] In the embodiment of FIG. 12, when the current block is a non-square block in the DC mode, the width (i.e., horizontal length) and height (i.e., vertical length) are compared, and then only the reference sample on the longer side is used to calculate the DC value, which is derived as a predicted sample of the current block. This method may have low prediction accuracy because it does not use the reference sample on one side (i.e., the side having the shorter length) of the width and height. Therefore, hereinafter, a method of calculating a DC value using all the left and upper reference samples to generate a predicted sample when the current block is a non-square block will be described. Also, a method of selecting reference samples (left and upper reference samples) so that the DC value can be calculated using a shift operation instead of a division operation will be described. As an example, the same number of reference samples as the number of adjacent reference samples on the shorter side of the width and height of the non-square block can be selected from the adjacent reference samples on the longer side, and the DC value can be calculated using the selected reference samples. In this way, when reference samples are selected from the adjacent reference samples on the longer side by the same number as the reference samples on the shorter side, the total number of selected reference samples is 2 n Since the data is in the form:

[0126] 13 is a diagram for explaining another embodiment of a method for deriving predicted samples in DC mode. The method disclosed in FIG. 13 shows a method for selecting reference samples on the longer side according to the number of reference samples on the shorter side among the width and height of a non-square block, and selecting reference samples at different positions from the reference samples on the longer side.

[0127] Also, for convenience of explanation, a case where the reference sample closest to the current block (i.e., located at a distance of 0 samples) is used is illustrated in Fig. 13. That is, the reference sample used in DC mode is illustrated when the value of reference line index information (e.g., intra_luma_ref_idx) is 0. The method disclosed in Fig. 13 can also be applied to DC mode when the value of reference line index information (e.g., intra_luma_ref_idx) is not 0.

[0128] 13(a) to (d), when a current block is a non-square block (e.g., an 8×4 block) and an intra prediction mode of the current block is a DC mode, neighboring reference samples used for intra prediction of the DC mode may be derived. In this case, the neighboring reference samples may include the same number of reference samples as the left reference samples among left reference samples (I, J, K, L) located adjacent to the left side of the current block and upper reference samples (A, B, C, D, E, F, G, H) located adjacent to the upper side of the current block.

[0129] For example, as shown in (a) of FIG. 13, the reference samples at odd positions among the upper reference samples (A, B, C, D, E, F, G, H) can be sampled and selected as many as the number of left reference samples. That is, the reference samples at odd positions are reference samples (A, C, E, G) selected by sampling two samples at a time starting from the reference sample at the first position among the upper reference samples and as many as the number of left reference samples. In this case, the adjacent reference samples can include a total of eight reference samples (four left reference samples and four upper reference samples). The DC value can be derived by calculating the average of all eight such reference samples.

[0130] As another example, as shown in FIG. 13(b), reference samples at even-numbered positions among the upper reference samples (A, B, C, D, E, F, G, H) may be sampled and selected as many as the number of left reference samples. That is, the reference samples at even-numbered positions are reference samples (B, D, F, H) selected by sampling two samples at a time starting from the reference sample at the second position among the upper reference samples and selected as many as the number of left reference samples. In this case, the adjacent reference samples may include a total of eight reference samples (four left reference samples and four upper reference samples). The DC value may be derived by calculating an average of such a total of eight reference samples.

[0131] As another example, as shown in (c) of FIG. 13, reference samples (A, B, C, D) located consecutively from the reference sample at the first position among the upper reference samples (A, B, C, D, E, F, G, H) by the number of reference samples on the left side can be selected. In this case, the adjacent reference samples can include a total of eight reference samples (four left reference samples and four upper reference samples). The DC value can be derived by calculating the average of such a total of eight reference samples.

[0132] As another example, as shown in (d) of FIG. 13, reference samples (E, F, G, H) located consecutively from the last reference sample among the upper reference samples (A, B, C, D, E, F, G, H) by the number of left reference samples may be selected. In this case, the adjacent reference samples may include a total of eight reference samples (four left reference samples and four upper reference samples). The DC value may be derived by calculating the average of such a total of eight reference samples.

[0133] In the embodiment of FIG. 13, an 8×4 block is illustrated, but this is merely an example, and the above-mentioned method can be applied to non-square blocks of various sizes to derive adjacent reference samples and calculate a DC value based on the adjacent reference samples. As an example, when the current block is a 16×4 non-square block, four reference samples can be selected from four left reference samples and 16 upper reference samples. In this case, when the method of FIG. 13 (a) is applied, four reference samples can be sampled from the first reference sample of the 16 upper reference samples, and a total of four upper reference samples can be selected. Therefore, a DC value can be derived by calculating an average using the four left reference samples and the four sampled upper reference samples. The same can be applied to the methods described in FIG. 13 (b), (c), and (d) to derive left reference samples and upper reference samples, and a DC value can be calculated based on the derived reference samples.

[0134] Meanwhile, the intra prediction method using multiple reference lines can only be applied to directional intra prediction modes excluding planar mode and DC mode. Therefore, when multiple reference lines are used, there is a limit where intra prediction of planar mode and DC mode, which are non-directional modes, cannot be applied. This document proposes a method of performing DC mode intra prediction with multiple reference lines by applying various methods of deriving adjacent reference samples in DC mode as described above.

[0135] As an embodiment, in order to reduce complexity, in the multi-reference line based intra prediction, the multi-reference line is not applied to all intra prediction modes, but may be applied only to the candidate intra prediction modes included in the MPM list. Therefore, when the multi-reference line based intra prediction is applied, the DC mode may be added to the MPM list to perform the DC mode. That is, the existing MPM list for intra prediction using the multi-reference line generates a total of six candidate intra prediction modes, and the six candidate intra prediction modes generated at this time do not include the planar mode and the DC mode. However, according to this document, the DC mode may be added to the candidate intra prediction modes to configure the MPM list. As an example, the DC mode may be added without changing the number of candidate intra prediction modes in the existing MPM list. In this case, the left mode, which is a candidate intra prediction mode for a left neighboring block of the current block, and the top mode, which is a candidate intra prediction mode for an upper neighboring block of the current block, may be derived, and the MPM list may be configured by deriving the candidate intra prediction mode based on the left mode and the top mode. In this case, one of the candidate intra prediction modes may be derived as the DC mode.

[0136] In deriving one of the candidate intra prediction modes as a DC mode, as an embodiment, one of the candidate intra prediction modes in the MPM list may be removed and a DC mode may be added. In this case, a method of removing a candidate intra prediction mode in the MPM list may remove a candidate intra prediction mode located in the last order with the lowest occurrence probability in the MPM list. However, this is merely an example, and a candidate intra prediction mode located in any order may be removed, or a candidate intra prediction mode located in the first order in the MPM list may be removed in consideration of the occurrence frequency of the DC mode. In addition, a method of adding a DC mode in the MPM list may add a DC mode to the removed position. For example, a DC mode may be added to the last order in the MPM list, or a DC mode may be added to the first order. In addition, a position to add a DC mode in the MPM list may be determined to be an arbitrary position. That is, a candidate intra prediction mode located in any order in the candidate intra prediction modes in the MPM list may be removed, and a DC mode may be placed in any order.

[0137] As described above, by adding a DC mode to the MPM list, prediction can be performed using the DC mode in multiple reference line-based intra prediction. In this case, prediction for the DC mode included in the MPM list can use various DC value prediction methods described in FIG. 12 and FIG. 13.

[0138] FIG. 14 is a flow chart that illustrates a schematic of an encoding method that can be performed by an encoding device according to an embodiment of the present document.

[0139] The method disclosed in FIG 14 may be performed by the encoding apparatus 200 disclosed in FIG 2. Specifically, steps S1400 to S1420 in FIG 17 may be performed by the prediction unit 220 (specifically, the intra prediction unit 222) disclosed in FIG 2, and steps S1420 to S1430 in FIG 17 may be performed by the entropy encoding unit 240 disclosed in FIG 2. In addition, the method disclosed in FIG 14 may include the embodiments described in detail in this document. Therefore, in FIG 14, detailed descriptions of contents overlapping with the above-mentioned embodiments will be omitted or simplified.

[0140] Referring to FIG. 14, an encoding apparatus may construct a Most Probable Mode (MPM) list including candidate intra-prediction modes for a current block (S1400).

[0141] In one embodiment, the encoding apparatus may derive a left mode, which is a candidate intra prediction mode for a left neighboring block of the current block, and derive an upper mode, which is a candidate intra prediction mode for an upper neighboring block of the current block. Here, the left neighboring block may indicate a neighboring block located at the bottom among the left neighboring blocks located adjacent to the left side of the current block, and the upper neighboring block may indicate a neighboring block located at the rightmost among the upper neighboring blocks located adjacent to the upper side of the current block. For example, if 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 neighboring block is a block including a sample at a coordinate (xN-1, yN+H-1), and the upper neighboring block is a block including a sample at a coordinate (xN+W-1, yN-1).

[0142] For example, the encoding apparatus may derive the intra prediction mode of the left neighboring block as a left candidate intra prediction mode (i.e., left mode) if the left neighboring block is available and intra prediction is applied to the left neighboring block. The encoding apparatus may derive the intra prediction mode of the upper neighboring block as an upper candidate intra prediction mode (i.e., top mode) if the upper neighboring block is available and intra prediction is applied to the upper neighboring block and the upper neighboring block is currently included in the CTU. Alternatively, the encoding apparatus may derive the planar mode as the left mode if the left neighboring block is not available or intra prediction is not applied to the left neighboring block. The encoding apparatus may derive the planar mode as the top mode if the upper neighboring block is not available or intra prediction is not applied to the upper neighboring block or the upper neighboring block is not currently included in the CTU.

[0143] The encoding apparatus may derive candidate intra-prediction modes for a current block based on a left mode derived from a left adjacent block and an upper mode derived from an upper adjacent block to construct an MPM list. In this case, the MPM list may include a left mode and an upper mode, and may further include a specific intra-prediction mode according to a predetermined method.

[0144] As an example, the encoding apparatus may determine whether to apply multiple reference lines to the current block to perform intra prediction, and may derive a specific intra prediction mode according to the determination and include it in the MPM list. When applying multiple reference lines to the current block to perform intra prediction, the encoding apparatus may generate and signal reference line index information. The reference line index information may include an index value indicating a reference line used for intra prediction of the current block, and may be signaled in the form of the intra_luma_ref_idx syntax element described above. When the value of intra_luma_ref_idx is 0, it may indicate that intra prediction is performed using a reference sample that is closest to the current block (i.e., located at a 0 sample distance). When the value of intra_luma_ref_idx is 1, it may indicate that intra prediction is performed using a reference sample that is second closest to the current block (i.e., located at a 1 sample distance). When the value of intra_luma_ref_idx is 2, it may indicate that intra prediction is performed using a reference sample that is third or fourth closest to the current block (i.e., located at a 2 or 3 sample distance).

[0145] For example, when the value of the reference line index information is not 0, the encoding apparatus may derive a DC mode as one of the candidate intra prediction modes and include the derived DC mode in the MPM list. In this case, the DC mode may be positioned in any order in the MPM list. Alternatively, the DC mode may be included in the first or last order in the MPM list in consideration of the frequency of occurrence.

[0146] The encoding apparatus may derive an intra-prediction mode of the current block based on the candidate intra-prediction modes included in the MPM list (S1410).

[0147] As an example, the encoding apparatus may perform various intra prediction modes on the current block, derive an intra prediction mode having an optimal rate-distortion (RD) cost, and determine the intra prediction mode as the intra prediction mode of the current block. In this case, the encoding apparatus may derive an optimal intra prediction mode for the current block based on the intra prediction modes including two non-directional intra prediction modes and 65 intra directional prediction modes. Alternatively, the encoding apparatus may determine the optimal intra prediction mode using only the MPM candidates configured in the MPM list. Here, the MPM candidates may include candidate intra prediction modes and / or planar modes depending on the number of candidates in the MPM list. For example, when the number of candidates in the MPM list is six, the MPM candidates include planar modes and candidate intra prediction modes, and when the number of candidates in the MPM list is five, the MPM candidates include candidate intra prediction modes.

[0148] For example, if the value of the reference line index information is not 0, the encoding apparatus may derive an optimal intra prediction mode for the current block using the MPM candidate intra prediction modes included in the MPM list. That is, in this case, the intra prediction mode for the current block may be determined only among the candidate intra prediction modes (and planar modes) including the DC mode in the MPM list. Also, if the value of the reference line index information is not 0, the encoding apparatus does not encode / signal the MPM flag information. In this way, if the MPM flag information is not encoded / signaled, the value of the MPM flag information may be induced to be 1. As described above, the MPM flag information may be expressed in the form of an intra_luma_mpm_flag syntax element. For example, if the value of intra_luma_mpm_flag is 1, it indicates that the intra prediction mode of the current block is selected from among the MPM candidate intra prediction modes (candidate intra prediction modes and / or planar modes), and if the value of intra_luma_mpm_flag is 0, it may indicate that the intra prediction mode of the current block is not selected from among the MPM candidate intra prediction modes (candidate intra prediction modes and / or planar modes).

[0149] The encoding apparatus may generate MPM index information indicating the intra-prediction mode of the current block from among the candidate intra-prediction modes included in the MPM list (S1420).

[0150] As an embodiment, the encoding apparatus may generate an index value indicating one of the candidate intra prediction modes in the MPM list and encode it with the MPM index information when the value of the reference line index information is not 0 and the value of the MPM flag information is induced to be 1. That is, when the value of the reference line index information is not 0 and the value of the MPM flag information is induced to be 1, the MPM index information may be encoded / signaled.

[0151] For example, when the intra prediction mode of the current block is derived as a DC mode included in the MPM list, the MPM index information may be generated as an index value indicating the DC mode among the candidate intra prediction modes included in the MPM list. In this case, when the DC mode is included in the first order in the MPM list, the MPM index information may be set to an index value of 0 and encoded. Alternatively, when the DC mode is included in the last order in the MPM list, the MPM index information may be set to an index value of n (e.g., n is 5 when the number of candidates is 6, or n is 4 when the number of candidates is 5) according to the number of candidates in the MPM list and encoded.

[0152] In addition, the encoding apparatus may perform intra prediction based on the intra prediction mode determined for the current block to generate a prediction sample for the current block. For example, if the intra prediction mode of the current block is derived as a DC mode included in the MPM list, the encoding apparatus may derive adjacent reference samples used for the DC mode of the current block based on whether the current block is a square block or a non-square block, calculate DC values ​​for the current block based on the adjacent reference samples, and generate a prediction sample based on the DC values. In this case, the process of deriving the adjacent reference samples may be applied to the various embodiments described above, which have been described in detail with reference to FIG. 12 and FIG. 13.

[0153] As an example, when the current block is a square block, the encoding apparatus may derive adjacent reference samples including a left reference sample of the current block and an upper reference sample of the current block. In this case, the encoding apparatus may derive adjacent reference samples based on reference line index information. For example, in this case, the adjacent reference samples may include a left reference line (i.e., a left reference sample located at a distance of 0, 1, 2, or 3 samples) and an upper reference line (i.e., an upper reference sample located at a distance of 0, 1, 2, or 3 samples) indicated by the reference line index information.

[0154] Alternatively, if the current block is a non-square block and the width of the current block is greater than the height, the encoding apparatus may derive adjacent reference samples including upper reference samples of the current block. As an example, the upper reference samples may include the same number of reference samples as the width of the current block. As another example, the upper reference samples may include the same number of reference samples as the left reference samples. As another example, the upper reference samples may include the same number of samples as the left reference samples by sampling odd-numbered samples or even-numbered samples among the upper reference samples of the current block. In this case, the encoding apparatus may derive adjacent reference samples based on the reference line index information. For example, in this case, the adjacent reference samples may include an upper reference line (i.e., an upper reference sample located at a distance of 0, 1, 2, or 3 samples) indicated by the reference line index information.

[0155] Alternatively, if the current block is a non-square block and the width of the current block is smaller than the height, the encoding apparatus may derive the neighboring reference sample by including the left reference sample of the current block. As an example, the left reference sample may include the same number of reference samples as the height of the current block. As another example, the left reference sample may include the same number of reference samples as the top reference sample. As another example, the left reference sample may include the same number of samples as the top reference sample by sampling odd-numbered samples or even-numbered samples among the left reference samples of the current block. In this case, the encoding apparatus may derive the neighboring reference sample based on the reference line index information. For example, in this case, the neighboring reference sample may include the left reference line indicated by the reference line index information (i.e., the left reference sample located at a distance of 0, 1, 2, or 3 samples).

[0156] In addition, the encoding apparatus may derive a residual sample for the current block based on a predicted sample of the current block and an original sample of the current block. The encoding apparatus may generate residual information for the current block based on the residual sample, and encode image information including the residual information. Here, the residual information may include information such as value information, position information, transformation technique, transformation kernel, and quantization parameter of quantized transform coefficients derived by performing transformation and quantization on the residual sample.

[0157] The encoding apparatus may encode image information including at least one of reference line index information or MPM index information (S1430).

[0158] As an embodiment, the encoding apparatus may encode image information including reference line index information determined based on whether or not to apply multiple reference line-based intra prediction and intra prediction mode information (e.g., MPM index information) of a current block derived based on an MPM list, as described above, and output the encoded image information as a bitstream. In addition, the encoding apparatus may further derive and encode residual information, and output the encoded image information in the form of a bitstream.

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

[0160] The process of generating a prediction sample for the current block described above can be performed by the intra prediction unit 222 of the encoding apparatus 200 disclosed in FIG. 2, the process of deriving a residual sample can be performed by the subtraction unit 231 of the encoding apparatus 200 disclosed in FIG. 2, and the process of generating and encoding residual information can be performed by the residual processing unit 230 and the entropy encoding unit 240 of the encoding apparatus 200 disclosed in FIG. 2.

[0161] FIG. 15 is a flow chart that illustrates a schematic diagram of a decoding method that can be performed by a decoding device according to an embodiment of the present document.

[0162] The method disclosed in FIG. 15 may be performed by the decoding apparatus 300 disclosed in FIG. 3. Specifically, steps S1500 to S1520 in FIG. 15 may be performed by the prediction unit 330 (specifically, the intra prediction unit 331) disclosed in FIG. 3, and step S1530 in FIG. 15 may be performed by the residual processing unit 320 and / or the addition unit 340 disclosed in FIG. 3. In addition, the method disclosed in FIG. 15 may include the embodiments described in detail in this document. Therefore, in FIG. 15, detailed descriptions of contents overlapping with the above-mentioned embodiments will be omitted or simplified.

[0163] Referring to FIG. 15, a decoding apparatus may construct a Most Probable Mode (MPM) list including candidate intra-prediction modes for a current block (S1500).

[0164] In one embodiment, the decoding apparatus may derive a left mode, which is a candidate intra prediction mode for a left neighboring block of the current block, and derive an upper mode, which is a candidate intra prediction mode for an upper neighboring block of the current block. Here, the left neighboring block may indicate a neighboring block located at the bottom among the left neighboring blocks located adjacent to the left side of the current block, and the upper neighboring block may indicate a neighboring block located at the rightmost among the upper neighboring blocks located adjacent to the upper side of the current block. For example, if 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 neighboring block is a block including a sample at a coordinate (xN-1, yN+H-1), and the upper neighboring block is a block including a sample at a coordinate (xN+W-1, yN-1).

[0165] For example, if a left neighboring block is available and intra prediction is applied to the left neighboring block, the decoding device may derive the intra prediction mode of the left neighboring block as a left candidate intra prediction mode (i.e., left mode). The decoding apparatus may derive the intra prediction mode of the upper neighboring block as an upper candidate intra prediction mode (i.e., top mode) if the upper neighboring block is available, intra prediction is applied to the upper neighboring block, and the upper neighboring block is currently included in the CTU. Alternatively, the decoding apparatus may derive the planar mode as the left mode if the left neighboring block is not available or intra prediction is not applied to the left neighboring block. The decoding apparatus may derive the planar mode as the top mode if the upper neighboring block is not available or intra prediction is not applied to the upper neighboring block, or the upper neighboring block is not currently included in the CTU.

[0166] The decoding apparatus may derive candidate intra-prediction modes for the current block based on a left mode derived from a left adjacent block and an upper mode derived from an upper adjacent block to construct an MPM list. In this case, the MPM list may include the left mode and the upper mode, and may further include a specific intra-prediction mode according to a predetermined method.

[0167] As an embodiment, the decoding apparatus may determine whether to perform intra prediction by applying multiple reference lines to the current block, and may derive a specific intra prediction mode according to the determination and include it in the MPM list. That is, the decoding apparatus may obtain reference line index information and determine whether to perform intra prediction by applying multiple reference lines to the current block. The reference line index information may include an index value indicating a reference line used for intra prediction of the current block, and may be signaled in the form of the intra_luma_ref_idx syntax element described above. When the value of intra_luma_ref_idx is 0, it may indicate that intra prediction is performed using a reference sample that is closest to the current block (i.e., located at a 0 sample distance). When the value of intra_luma_ref_idx is 1, it may indicate that intra prediction is performed using a reference sample that is second closest to the current block (i.e., located at a 1 sample distance). When the value of intra_luma_ref_idx is 2, it may indicate that intra prediction is performed using a reference sample that is third or fourth closest to the current block (i.e., located at a 2 or 3 sample distance).

[0168] For example, when the value of the reference line index information is not 0, the decoding apparatus may derive a DC mode as one of the candidate intra prediction modes and include the derived DC mode in the MPM list. In this case, the DC mode may be positioned in any order in the MPM list. Alternatively, the DC mode may be included in the first or last order in the MPM list in consideration of the frequency of occurrence.

[0169] The decoding apparatus can derive the intra-prediction mode of the current block from the MPM list based on the MPM index information (S1510).

[0170] In one embodiment, the decoding apparatus may obtain intra-prediction mode information for a current block from a bitstream. The intra-prediction mode information is information for indicating an intra-prediction mode of the current block, and may include MPM flag information, MPM index information, and remaining mode information.

[0171] At this time, if the value of the reference line index information is not 0, the MPM flag information is not signaled from the encoding apparatus. In this manner, if the MPM flag information is not signaled, the decoding apparatus may induce the value of the MPM flag information to be 1. As described above, the MPM flag information may be signaled in the form of an intra_luma_mpm_flag syntax element. For example, if the value of intra_luma_mpm_flag is 1, it may indicate that the intra prediction mode of the current block is selected from among the MPM candidate intra prediction modes (candidate intra prediction modes and / or planar modes), and if the value of intra_luma_mpm_flag is 0, it may indicate that the intra prediction mode of the current block is not selected from among the MPM candidate intra prediction modes (candidate intra prediction modes and / or planar modes). Here, the MPM candidate intra prediction modes may include the candidate intra prediction modes and / or planar modes depending on the number of candidates in the MPM list. For example, if the number of candidates in the MPM list is six, the MPM candidates include a planar mode and a candidate intra-prediction mode, and if the number of candidates in the MPM list is five, the MPM candidates include a candidate intra-prediction mode.

[0172] Also, if the value of the reference line index information is not 0 and the value of the MPM flag information is induced to be 1, the MPM index information may be signaled from the encoding device. That is, the decoding device may obtain and decode the MPM index information from the bitstream. As described above, the MPM index information includes an index value indicating an intra prediction mode for a current block among candidate intra prediction modes included in the MPM list, and may be expressed in the form of, for example, an intra_luma_mpm_idx syntax element.

[0173] That is, when the value of the reference line index information is not 0 and the value of the MPM flag information is induced to be 1, the decoding device obtains and decodes the MPM index information, and based on this, can derive the intra prediction mode of the current block from the MPM list.

[0174] For example, when the MPM index information indicates a DC mode among the candidate intra prediction modes included in the MPM list, the decoding apparatus may derive the DC mode as the intra prediction mode of the current block. In this case, when the DC mode is included in the first order in the MPM list, the MPM index information may be encoded and signaled with an index value of 0. Or, when the DC mode is included in the last order in the MPM list, the MPM index information may be encoded and signaled with an index value n (e.g., n is 5 when the number of candidates is 6, or n is 4 when the number of candidates is 5) according to the number of candidates in the MPM list.

[0175] The decoding apparatus may generate a prediction sample for the current block based on the intra-prediction mode (S1520).

[0176] For example, when the intra prediction mode of the current block is derived as a DC mode included in the MPM list, the decoding apparatus may derive adjacent reference samples used for the DC mode of the current block based on whether the current block is a square block or a non-square block, calculate DC values ​​for the current block based on the adjacent reference samples, and generate predicted samples based on the DC values. In this case, the process of deriving adjacent reference samples may be applied to the various embodiments described above, which have been described in detail with reference to FIG. 12 and FIG. 13.

[0177] As an example, when the current block is a square block, the decoding apparatus may derive adjacent reference samples including a left reference sample of the current block and an upper reference sample of the current block. At this time, the decoding apparatus may derive adjacent reference samples based on reference line index information. For example, in this case, the adjacent reference samples may include a left reference line (i.e., a left reference sample located at a distance of 0, 1, 2, or 3 samples) and an upper reference line (i.e., an upper reference sample located at a distance of 0, 1, 2, or 3 samples) indicated by the reference line index information.

[0178] Alternatively, if the current block is a non-square block and the width of the current block is greater than the height, the decoding apparatus may derive adjacent reference samples including upper reference samples of the current block. As an example, the upper reference samples may include the same number of reference samples as the width of the current block. As another example, the upper reference samples may include the same number of reference samples as the left reference samples. As another example, the upper reference samples may include the same number of left reference samples by sampling odd-numbered samples or even-numbered samples among the upper reference samples of the current block. In this case, the decoding apparatus may derive adjacent reference samples based on the reference line index information. For example, the adjacent reference samples may include an upper reference line (i.e., an upper reference sample located at a distance of 0, 1, 2, or 3 samples) indicated by the reference line index information.

[0179] Alternatively, if the current block is a non-square block and the width of the current block is smaller than the height, the decoding apparatus may derive the neighboring reference sample by including the left reference sample of the current block. As an example, the left reference sample may include the same number of reference samples as the height of the current block. As another example, the left reference sample may include the same number of reference samples as the top reference sample. As another example, the left reference sample may include the same number of samples as the top reference sample by sampling odd-numbered samples or even-numbered samples among the left reference samples of the current block. In this case, the decoding apparatus may derive the neighboring reference sample based on the reference line index information. For example, in this case, the neighboring reference sample may include the left reference line indicated by the reference line index information (i.e., the left reference sample located at a distance of 0, 1, 2, or 3 samples).

[0180] The decoding device may generate a reconstructed picture for the current block based on the predicted samples (S1530).

[0181] In one embodiment, the decoding apparatus may use a predicted sample as a reconstructed sample according to a prediction mode, or may generate a reconstructed sample by adding a residual sample to the predicted sample.

[0182] The decoding apparatus may receive information about a residual for a current block if a residual sample for the current block exists. The information about the residual may include a transform coefficient for the residual sample. The decoding apparatus may derive a residual sample (or a residual sample array) for the current block based on the residual information. The decoding apparatus may generate a reconstructed sample based on the prediction sample and the residual sample, and may derive a reconstructed block or a reconstructed picture based on the reconstructed sample. As described above, the decoding apparatus may then apply an in-loop filtering procedure, such as a deblocking filtering and / or an SAO procedure, to the reconstructed picture to improve subjective / objective picture quality, if necessary.

[0183] In the above embodiments, the method is described based on a flow chart with a series of steps or blocks, however, the embodiments herein are not limited to the order of steps and certain steps may occur in a different order or simultaneously with other steps than those described above. In addition, those skilled in the art will appreciate that the steps shown in the flow chart are not exclusive and other steps may be included or one or more steps of the flow chart may be deleted without affecting the scope of this document.

[0184] The method according to the present document described above may be embodied in software form, and the encoding device and / or decoding device according to the present document may be included in a device that performs video processing, such as a TV, a computer, a smartphone, a set-top box, or a display device.

[0185] In this document, when the embodiments are implemented in software, the methods described above may be implemented with modules (processes, functions, etc.) that perform the functions described above. The modules may be stored in a memory and executed by a processor. The memory may be internal or external to the processor and may be coupled to the processor in various well-known ways. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits, and / or data processing devices. The memory may include read-only memory (ROM), random access memory (RAM), flash memory, memory cards, storage media, and / or other storage devices. That is, the embodiments described in this document may be implemented and executed on a processor, microprocessor, controller, or chip. For example, the functional units illustrated in each drawing may be implemented and executed on a computer, processor, microprocessor, controller, or chip. In this case, information (eg, information on instructions) or algorithms for implementation may be stored on a digital storage medium.

[0186] In addition, the decoding device and encoding device to which this document is applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interactive device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (VoD) service providing device, an over-the-top video (OTT) device, an internet streaming service providing device, a three-dimensional (3D) video device, a virtual reality (VR) device, an argumente reality (AR) device, an image telephone video device, a vehicle terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, and may be used to process a video signal or a data signal. For example, an over-the-top video (OTT) device may include a game console, a Blu-ray player, an internet-connected TV, a home theater system, a smartphone, a tablet PC, a digital video recorder (DVR), etc.

[0187] In addition, the processing method to which this document is applied may be produced in the form of a program executed by a computer and may be stored in a computer-readable recording medium. In addition, multimedia data having a data structure according to this document may 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 computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium may include a medium embodied in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0188] Furthermore, the embodiments of the present document may be embodied in a computer program product having program code, the program code being executable by a computer in accordance with the embodiments of the present document. The program code may be stored on a computer readable carrier.

[0189] FIG. 16 illustrates an example of a content streaming system in which the embodiments disclosed herein can be applied.

[0190] Referring to FIG. 16, the content streaming system applied to the embodiments of this document can broadly include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.

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

[0192] The bitstream may be generated by an encoding method or a bitstream generation method applied to an embodiment of this document, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.

[0193] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as a medium to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server controls commands / responses between devices in the content streaming system.

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

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

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

Claims

1. 1. A video decoding method performed by a decoding device, comprising: constructing a Most Probable Mode (MPM) list including candidate intra-prediction modes for the current block; Deriving an intra prediction mode of the current block from the MPM list based on MPM index information indicating an intra prediction mode of the current block among the candidate intra prediction modes included in the MPM list; generating a prediction sample of the current block based on the intra-prediction mode; and generating a reconstructed picture based on the predicted samples; A value of MPM flag information indicating whether the intra prediction mode of the current block is selected from the candidate intra prediction modes is derived to be 1 based on a value of reference line index information indicating a reference line used for intra prediction of the current block being not equal to 0; Constructing the MPM list includes deriving the DC mode as one of the candidate intra-prediction modes for including the DC mode in the MPM list based on a value of the reference line index information not equal to 0; the DC mode is on the first order of the MPM list; The DC mode is derived as an intra prediction mode of the current block based on the MPM flag information and the MPM index information indicating a DC mode among the candidate intra prediction modes included in the MPM list; Based on the value of the reference line index information not being equal to 0, a reference line n is utilized to generate a prediction sample of the current block, where n is greater than 0; 2. A video decoding method comprising:

2. 4. Generating a predicted sample for the current block, comprising: Calculating a DC value for the current block using a particular reference sample among reference samples in a reference line n of the current block, the reference samples including a left reference sample and an upper reference sample in the reference line n of the current block; deriving the prediction sample based on the DC value; Including, 2. The video decoding method according to claim 1.

3. The specific reference sample is determined based on whether the current block is a square block or a non-square block; the specific reference samples used to calculate the DC value based on the current block being the square block include the left reference sample in the reference line n and the upper reference sample in the reference line n; Based on the fact that the current block is the non-square block and the width of the current block is greater than the height of the current block, the specific reference sample used to calculate the DC value includes the upper reference sample in the reference line n, but does not include the left reference sample in the reference line n; Based on the current block being the non-square block and the width of the current block being less than the height of the current block, the specific reference sample used to calculate the DC value includes the left reference sample in the reference line n, but does not include the upper reference sample in the reference line n.

2. The video decoding method according to claim 1.

4. 1. A video encoding method performed by an encoding device, comprising: determining that intra prediction is applied to a current block; constructing a Most Probable Mode (MPM) list including candidate intra-prediction modes for the current block; deriving an intra prediction mode of the current block based on the candidate intra prediction modes included in the MPM list; generating MPM index information indicating an intra-prediction mode of the current block among the candidate intra-prediction modes included in the MPM list; generating a predicted sample for the current block based on the intra-prediction mode; and encoding image information including at least one of reference line index information indicating a reference line used for intra prediction of the current block and the MPM index information; A value of MPM flag information indicating whether an intra prediction mode of the current block is selected from the candidate intra prediction modes is derived to be 1 based on the value of the reference line index information not being equal to 0; Constructing the MPM list includes deriving the DC mode as one of the candidate intra-prediction modes for inclusion in the MPM list based on a value of the reference line index information not equal to 0; the DC mode is on the first order of the MPM list; The MPM index information is generated as an index value indicating the DC mode among the candidate intra prediction modes included in the MPM list based on the intra prediction mode of the current block being derived as the DC mode included in the MPM list; Based on the value of the reference line index information not being equal to 0, a reference line n is utilized to generate a predicted sample of the current block, the n being greater than 0; 13. A video encoding method comprising:

5. 4. Generating a predicted sample for the current block, comprising: calculating a DC value for the current block using a particular reference sample among reference samples in a reference line n of the current block based on the DC mode being applied to the current block, the reference samples including a left reference sample and an upper reference sample in the reference line n of the current block; deriving the prediction sample based on the DC value; Including, 5. The video encoding method of claim 4.

6. The specific reference sample is determined based on whether the current block is a square block or a non-square block; the specific reference samples used to calculate the DC value based on the current block being the square block include the left reference sample in the reference line n and the upper reference sample in the reference line n; Based on the fact that the current block is the non-square block and the width of the current block is greater than the height of the current block, the specific reference sample used to calculate the DC value includes the upper reference sample in the reference line n, but does not include the left reference sample in the reference line n; Based on the current block being the non-square block and the width of the current block being less than the height of the current block, the specific reference sample used to calculate the DC value includes the left reference sample in the reference line n, but does not include the upper reference sample in the reference line n.

6. The video encoding method of claim 5.

7. A non-transitory computer-readable digital storage medium storing a bitstream generated by a method, the method comprising: determining that intra prediction is applied to a current block; constructing a Most Probable Mode (MPM) list including candidate intra-prediction modes for the current block; deriving an intra prediction mode of the current block based on the candidate intra prediction modes included in the MPM list; generating MPM index information indicating an intra-prediction mode of the current block among the candidate intra-prediction modes included in the MPM list; generating a predicted sample of the current block based on the intra-prediction mode; and encoding image information including at least one of reference line index information indicating a reference line used for intra prediction of the current block and the MPM index information; A value of MPM flag information indicating whether an intra prediction mode of the current block is selected from the candidate intra prediction modes is derived to be 1 based on the value of the reference line index information not being equal to 0; Constructing the MPM list includes deriving the DC mode as one of the candidate intra-prediction modes for inclusion in the MPM list based on a value of the reference line index information not equal to 0; the DC mode is on the first order of the MPM list; The MPM index information is generated as an index value indicating the DC mode among the candidate intra prediction modes included in the MPM list based on the intra prediction mode of the current block being derived as the DC mode included in the MPM list; Based on the value of the reference line index information not being equal to 0, a reference line n is utilized to generate a predicted sample of the current block, the n being greater than 0; A non-transitory computer-readable digital storage medium comprising:

8. 4. Generating a predicted sample for the current block, comprising: calculating a DC value for the current block using a particular reference sample among reference samples in a reference line n of the current block based on the DC mode being applied to the current block, the reference samples including a left reference sample and an upper reference sample in the reference line n of the current block; deriving the prediction sample based on the DC value; Including, 8. The non-transitory computer-readable digital storage medium of claim 7.

9. The specific reference sample is determined based on whether the current block is a square block or a non-square block; the specific reference samples used to calculate the DC value based on the current block being the square block include the left reference sample in the reference line n and the upper reference sample in the reference line n; Based on the fact that the current block is the non-square block and the width of the current block is greater than the height of the current block, the specific reference sample used to calculate the DC value includes the upper reference sample in the reference line n, but does not include the left reference sample in the reference line n; Based on the current block being the non-square block and the width of the current block being less than the height of the current block, the specific reference sample used to calculate the DC value includes the left reference sample in the reference line n, but does not include the upper reference sample in the reference line n.

9. The non-transitory computer-readable digital storage medium of claim 8.

Citation Information

Patent Citations

  • Intra-prediction with multiple reference lines

    WO2018205950A1

  • Method and device for encoding / decoding image, and recording medium in which bitstream is stored

    WO2019009540A1