Video coding method and apparatus for performing intra-prediction based on MRL (Multi-Resource Video)
The video coding method addresses the need for efficient compression of high-resolution images/videos by employing MRL-based intra-prediction and an MPM list with the DC mode, improving prediction accuracy and reducing complexity for enhanced coding efficiency.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2024-09-02
- Publication Date
- 2026-05-11
AI Technical Summary
The increasing demand for high-resolution and high-quality images/videos, including VR and AR content, necessitates a highly efficient image/video compression technology to reduce transmission and storage costs while improving prediction accuracy.
A video coding method and apparatus that utilizes Multi-Reference Line (MRL) based intra-prediction and constructs a Most Probable Mode (MPM) list, including the DC mode, to enhance video coding efficiency by improving prediction performance and reducing computational complexity.
This approach improves overall video compression efficiency by enhancing prediction accuracy and reducing complexity through efficient intra-prediction, particularly in constructing an MPM list that includes the DC mode in MRL-based intra-prediction.
Smart Images

Figure 0007856710000001 
Figure 0007856710000002 
Figure 0007856710000003
Abstract
Description
Technical Field
[0001] This document relates to video coding technology, and more particularly, to a video coding method and apparatus for performing intra prediction based on MRL (multi-reference line).
Background Art
[0002] In recent years, the demand for high-resolution and high-quality images / videos such as 4K or UHD (Ultra High Definition) images / videos of 8K or higher has been increasing in various fields. As the image / video data becomes higher in resolution and quality, the amount of information or bits to be transmitted relatively increases compared to the existing image / video data. Therefore, when transmitting image data using a medium such as an existing wired or wireless broadband line or storing image / video data using an existing storage medium, the transmission cost and storage cost increase.
[0003] Also, in recent years, the interest and demand for immersive media such as VR (Virtual Reality), AR (Artificial Reality) contents, and holograms have been increasing, and the broadcast of images / videos having image characteristics different from those of real images, such as game images, has been increasing.
[0004] Thus, there is a need for a highly efficient image / video compression technology to effectively compress, transmit, store, and reproduce the information of high-resolution and high-quality images / videos having various characteristics as described above.
Summary of the Invention
Problems to be Solved by the Invention
[0005] The technical problem of this document is to provide a method and apparatus for increasing video coding efficiency.
[0006] Another technical problem of this document is to provide an efficient intra prediction method and apparatus.
[0007] Another technical challenge addressed in this paper is to provide a method and apparatus for applying DC mode in multi-reference line (MRL) based intra-prediction and for constructing a Most Probable Mode (MPM) list that includes DC mode. [Means for solving the problem]
[0008] [Technical solution] According to one embodiment of this document, a video decoding method is provided that is performed by a decoding device. The method includes the steps of: configuring an MPM (Most Probable Mode) list that includes candidate intra-prediction modes for the current block; deriving an intra-prediction mode for the current block from the MPM list based on MPM index information that indicates an intra-prediction mode for the current block from 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 restored picture for the current block based on the prediction sample, wherein the step of configuring the MPM list is characterized in that, based on the case where the value of reference line index information indicating a reference line used for intra-prediction of the current block is not 0, a DC mode is derived as one of the candidate intra-prediction modes and included in the MPM list.
[0009] Another embodiment of this document provides a video encoding method performed by an encoding device. The method includes the steps of: configuring an MPM (Most Probable Mode) list including candidate intra-prediction modes for a current block; deriving an intra-prediction mode for the current block based on the candidate intra-prediction modes included in the MPM list; generating MPM index information that indicates the intra-prediction mode for the current block from among 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 step of configuring the MPM list is characterized in that, based on the case where the value of the reference line index information is not 0, a DC mode is derived as one of the candidate intra-prediction modes and included in the MPM list.
[0010] According to another embodiment of this invention, a computer-readable digital storage medium is provided, which stores encoded video information to perform the video decoding method described in claim 1. [Effects of the Invention]
[0011] According to this document, it is possible to improve the overall video compression efficiency.
[0012] According to this paper, overall coding efficiency can be improved by reducing computational complexity and improving prediction performance through efficient intra-prediction.
[0013] According to this document, by constructing an MPM list that includes DC mode in MRL-based intra-prediction and performing DC mode intra-prediction using MRL, the accuracy of predictions can be improved, thereby improving overall coding efficiency. [Brief explanation of the drawing]
[0014] [Figure 1] A schematic example of a video / image coding system that can be applied to the embodiments described in this document is provided below. [Figure 2] This figure schematically illustrates the configuration of a video / image encoding device that can be applied to the embodiments described in this document. [Figure 3] This figure schematically illustrates the configuration of a video / image decoding device that can be applied to the embodiments described in this document. [Figure 4] This document presents an example of a video encoding method based on a schematic intra-prediction, to which the embodiments described herein can be applied. [Figure 5] A schematic diagram of the intra-prediction unit within the encoding device is shown. [Figure 6] This document presents an example of a video decoding method based on a schematic intra-prediction, to which the embodiments described herein can be applied. [Figure 7] A schematic diagram of the intra-prediction unit within the decoding device is shown. [Figure 8] This document presents an example of an MPM mode-based intra-prediction method in an encoding device to which the embodiments described herein can be applied. [Figure 9] This document presents an example of an intra-prediction method for MPM mode-based decoding devices to which the embodiments described herein can be applied. [Figure 10] This document shows an example of an intra-prediction mode to which the embodiments described herein can be applied. [Figure 11] An example of a reference sample line for intra-prediction using multiple reference lines is shown. [Figure 12] This figure illustrates one embodiment of a method for deriving predicted samples in DC mode. [Figure 13] This figure illustrates another example of a method for deriving predicted samples in DC mode. [Figure 14]It is a flowchart schematically showing an encoding method that can be executed by an encoding device according to an embodiment of this document. [Figure 15] It is a flowchart schematically showing a decoding method that can be executed by a decoding device according to an embodiment of this document. [Figure 16] An example of a content streaming system to which the embodiments disclosed in this document can be applied is shown.
Modes for Carrying Out the Invention
[0015] This document can be modified in various ways, can have various embodiments, and specific embodiments will be illustrated in the drawings and described in detail. However, this is not intended to limit this document to specific embodiments. The terms commonly used in this specification are used merely to explain specific embodiments and are not used with the intention of limiting the technical idea of this document. Singular expressions include plural expressions unless the context clearly indicates otherwise. Terms such as "including" or "having" in this specification are intended to specify the existence of features, numbers, steps, operations, components, parts, or combinations thereof described in the specification, and it should be understood that the existence or possibility of addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof is not precluded in advance.
[0016] On the other hand, each configuration in the drawings described in this document is independently illustrated for the convenience of explaining different characteristic functions, and it does not mean that each configuration is implemented by separate hardware or separate software. For example, among each configuration, two or more configurations can be combined to form one configuration, and one configuration can also be divided into multiple configurations. Embodiments in which each configuration is integrated and / or separated are included in the scope of rights of this document as long as they do not deviate from the essence of this document.
[0017] Preferred embodiments of this document will be described in more detail below with reference to the attached drawings. Hereafter, the same reference numerals will be used for the same components in the drawings, and redundant descriptions of the same components may be omitted.
[0018] This document relates to video / image coding. For example, the methods / examples disclosed in this document can be applied to methods disclosed in the VVC (versatile video coding) standard, EVC (essential video coding) standard, AV1 (AOMedia Video 1) standard, AVS2 (2nd generation of audio video coding standard), or next-generation video / image coding standards (e.g., H.267 or H.268).
[0019] This document presents various embodiments of video / image coding, and unless otherwise noted, these embodiments can be combined and implemented together.
[0020] In this document, "video" can mean a collection of images over time. "Picture" generally refers to a unit representing a single image within a specific time period, and "slice" or "tile" is a unit that constitutes part of a picture in coding. A slice or tile can contain one or more CTUs (coding tree units). A single picture can consist of one or more slices or tiles. A single picture can consist of one or more tile groups. A tile group can contain one or more tiles. A brick can represent a rectangular region of CTU rows within a tile in a picture. A tile can be partitioned into multiple bricks, each of which consists of one or more CTU rows within the tile. Additionally, a tile that is not partitioned into multiple bricks may also be referred to as a brick.A brick scan can represent a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in a 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 can demonstrate a specific sequential ordering of CTUs partitioning a picture in which the CTUs are ordered consecutively in a 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 may contain 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 groups and slices may be used interchangeably. For example, in this document, a tile group / tile group header may be referred to as a slice / slice header.
[0021] A pixel or pel can refer to the smallest unit that makes up a picture (or image). Alternatively, the term "sample" can be used as a counterpart to pixel. A sample can generally represent a pixel or a pixel value, or it can represent only the pixel / pixel value of the luma component, or only the pixel / pixel value of the chroma component. Alternatively, a sample can refer to a pixel value in the spatial domain, and if such a pixel value is converted to the frequency domain, it can also refer to the conversion coefficient in the frequency domain.
[0022] A unit can represent a basic unit of image processing. A unit may include at least one of the following: a specific area of a picture and information related to that area. A unit can 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 general, an M×N block can include a sample (or sample array) consisting of M columns and N rows, or a set (or array) of transform coefficients.
[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". Similarly, "A, B, C" also means "at least one of A, B and / or C".
[0024] Additionally, in this document, "or" is interpreted as "and / or". For example, "A or B" can mean 1) "A" only, or 2) "B" only, or 3) "A and B". Another expression in this document is that "or" can mean "additionally or alternatively".
[0025] Figure 1 schematically shows an example of a video / image coding system that can be applied to the embodiments described in this document.
[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 can transmit encoded video / image information or data to the receiving device in file or streaming form via a digital storage medium or network.
[0027] The source device may include a video source, an encoding device, and a transmitter. The receiving device may include a receiver, a decoding device, and a renderer. The encoding device may be called a video / image encoding device, and the decoding device may be called a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, which may consist of a separate device or external component.
[0028] A video source can acquire video / images through processes such as video / image capture, synthesis, or generation. A video source may include video / image capture devices and / or video / image generation devices. Video / image capture devices may include, for example, one or more cameras, or video / image archives containing previously captured video / images. Video / image generation devices may include, for example, computers, tablets, and smartphones, and can generate video / images (electronically). For example, virtual video / images may be generated via a computer, in which case the video / image capture process can be replaced by the process of generating the relevant data.
[0029] An encoding device can encode input video / image data. For compression and coding efficiency, the encoding device can perform a series of steps, including prediction, transformation, and quantization. The encoded data (encoded video / image information) can be output in bitstream format.
[0030] The transmitting unit can transmit encoded video / image information or data output in bitstream format to the receiving unit of a receiving device via a digital storage medium or network in file or streaming format. The digital storage medium can include a variety of storage media such as USB, SD, CD, DVD, Blu-ray, HDD, and SSD. The transmitting unit may include elements for generating media files via a predetermined file format and may include elements for transmission over a broadcast / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device.
[0031] A decoding device can decode video / images by performing a series of steps, such as inverse quantization, inverse transformation, and prediction, corresponding to the operation of an encoding device.
[0032] The renderer can render the decoded video / image. The rendered video / image can be displayed via the display unit.
[0033] Figure 2 is a schematic diagram illustrating the configuration of a video / image encoding device that can be applied to the embodiments described in this document. Hereinafter, the term "video encoding device" may include an image encoding device.
[0034] As shown in Figure 2, the encoding device 200 can be configured to include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-prediction unit 221 and an intra-prediction unit 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 called a reconstructor or a reconstructed block generator. The image segmentation unit 210, prediction unit 220, residual processing unit 230, entropy encoding unit 240, addition unit 250, and filtering unit 260 described above can be configured by one or more hardware components (e.g., an encoder chipset or processor) depending on the embodiment. The memory 270 may also include a DPB (decoded picture buffer) 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 splitting unit 210 can split an input image (or picture, frame) input to the encoding device 200 into one or more processing units. For example, the processing units may be called coding units (CUs). In this case, the coding units can be recursively split from a coding tree unit (CTU) or the largest coding unit (LCU) using a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, one coding unit can be split into multiple coding units of 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, followed by the binary-tree structure and / or the ternary structure. Alternatively, the binary-tree structure may be applied first. The coding procedure according to this disclosure may be performed based on the final coding unit that is not further split. In this case, based on coding efficiency due to image characteristics, the largest coding unit can be used as the final coding unit, or, if necessary, the coding unit can be recursively divided into lower-depth coding units so that the optimally sized coding unit is 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 comprise a prediction unit (PU) or a transformation unit (TU). In this case, the prediction unit and the transformation unit can each be separated or partitioned from the final coding unit described above.The prediction unit may be a unit of sample prediction, and the conversion unit may be a unit for deriving conversion coefficients and / or a unit for deriving a residual signal from conversion coefficients.
[0036] The term "unit" can sometimes be used interchangeably with terms such as "block" or "area." Generally, an M×N block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and may represent only the luminance (luma) component pixel / pixel value, or only the chroma component pixel / pixel value. A sample can be used as the term corresponding to a single picture (or image) pixel or pel.
[0037] The encoding device 200 can generate a residual signal (residual block, residual sample array) by subtracting the prediction signal (predicted block, predicted sample array) output from the inter-prediction unit 221 or intra-prediction unit 222 from the input image signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as shown in the figure, the unit that subtracts the prediction signal (predicted block, predicted sample array) from the input image signal (original block, original sample array) within the encoder 200 can be called the subtraction unit 231. The prediction unit can make predictions for the block to be processed (hereinafter referred to as the current block) and generate a predicted block that includes the predicted sample for the current block. The prediction unit can determine whether intra-prediction or inter-prediction is applied on a current block or CU basis. The prediction unit can generate various prediction-related information, such as prediction mode information, and transmit it to the entropy encoding unit 240, as will be described later in the explanation of each prediction mode. Prediction information can be encoded by the entropy encoding unit 240 and output in bitstream format.
[0038] The intra-prediction unit 222 can predict the current block by referring to a sample in the current picture. The referenced sample can be located adjacent to the current block or at a distance, depending on the prediction mode. The prediction mode in intra-prediction can include multiple non-directional modes and multiple directional modes. Non-directional modes may include, for example, DC mode and Planar mode. Directional modes may include, for example, 33 or 65 directional prediction modes, depending on the degree of fineness of prediction direction. However, this is illustrative, and more or fewer directional prediction modes may be used depending on the settings. The intra-prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction modes applied to adjacent blocks.
[0039] The interprediction unit 221 can derive a predicted block relative to the current block based on a reference block (reference sample array) identified by motion vectors on the reference picture. In this case, in order to reduce the amount of motion information transmitted in interprediction mode, motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between adjacent blocks and the current block. The motion information may include motion vectors and reference picture indices. The motion information may further include interprediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of interprediction, adjacent blocks may include spatially adjacent blocks that exist in the current picture and temporally adjacent blocks that exist in the reference picture. The reference picture containing the reference block and the reference picture containing the temporally adjacent block may be the same or different. The temporally adjacent block may be called a collocated reference block, col CU, etc., and the reference picture containing the temporally adjacent block may be called a collocated picture (colPic). For example, the inter-prediction unit 221 can construct a motion information candidate list based on adjacent blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter-prediction can be performed based on various prediction modes, and for example, in skip mode and merge mode, the inter-prediction unit 221 can use the motion information of adjacent blocks as the motion information of the current block. In skip mode, unlike merge mode, a residual signal may not be transmitted.In motion vector prediction (MVP) mode, the motion vector of an adjacent block is used as a motion vector predictor, and the motion vector difference is signaled to indicate the motion vector of the current block.
[0040] The prediction unit 220 can generate prediction signals based on various prediction methods described later. For example, the prediction unit can apply intra-prediction or inter-prediction for predictions on a single block, and can also apply intra-prediction and inter-prediction simultaneously. This can be called combined inter and intra prediction (CIIP). The prediction unit can also base its predictions on an intra-block copy (IBC) prediction mode or a palette mode for predictions on a block. The IBC prediction mode or palette mode can be used for content image / video coding such as in games, for example, as in SCC (screen content coding). IBC basically performs predictions within the current picture, but can be performed similarly to inter-prediction in that it derives reference blocks within the current picture. That is, IBC can utilize at least one of the inter-prediction techniques described in this document. Palette mode can be considered an example of intra-coding or intra-prediction. When palette mode is applied, sample values within the picture can be signaled based on information about the palette table and palette index.
[0041] The prediction signal generated via the prediction unit (comprising the inter-prediction unit 221 and / or the intra-prediction unit 222) can be used to generate a reconstructed signal or a residual signal. The transformation unit 232 can generate transformation coefficients by applying a transformation technique to the residual signal. For example, the transformation technique may include at least one of the following: DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), KLT (Karhunen-Loeve Transform), GBT (Graph-Based Transform), or CNT (Conditionally Non-linear Transform). Here, GBT refers to a transformation obtained from a graph when attempting to represent the relationship information between pixels in a graph. CNT refers to a transformation obtained by generating a prediction signal using all previously reconstructed pixels and obtaining a transformation based on it. The transformation process can be applied to pixel blocks of the same size that are square, or to non-square blocks of variable size.
[0042] The quantization unit 233 quantizes the conversion coefficients and transmits them to the entropy encoding unit 240, which can encode the quantized signal (information about the quantized conversion coefficients) and output it as a bitstream. The information about the quantized conversion coefficients can be called residual information. The quantization unit 233 can rearrange the block-form quantized conversion coefficients into a one-dimensional vector form based on the coefficient scan order, and can also generate information about the quantized conversion coefficients based on the one-dimensional vector form of the quantized conversion coefficients. The entropy encoding unit 240 can perform various encoding methods, such as exponential Golomb, CAVLC (context-adaptive variable length coding), and CABAC (context-adaptive binary arithmetic coding). In addition to the quantized conversion coefficients, the entropy encoding unit 240 can also encode information necessary for video / image restoration (e.g., the values of syntax elements) together with or separately from the quantized conversion coefficients. Encoded information (e.g., encoded video / image information) can be transmitted or stored in bitstream form in units of NAL (network abstraction layer) units. The video / image information may further include information about various parameter sets, such as the adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). The video / image information may also further include general constraint information. In this document, information and / or syntax elements transmitted / signaled from the encoding device to the decoding device may be included in the video / image information.The video / image information can be encoded via the encoding procedure described above and included in the bitstream. The bitstream can be transmitted over a network or stored on a digital storage medium. Here, the network may include broadcast networks and / or communication networks, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The signal output from the entropy encoding unit 240 can be transmitted by a transmitting unit (not shown) and / or stored by a storage unit (not shown) which are configured as internal / external elements of the encoding device 200, or the transmitting unit may be included in the entropy encoding unit 240.
[0043] The quantized conversion coefficients output from the quantization unit 233 can be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) can be reconstructed by applying inverse quantization and inverse transformation to the quantized conversion coefficients via the inverse quantization unit 234 and the inverse transformation unit 235. The adder 155 can 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. If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the reconstructed block. The adder 250 can be called the reconstruction unit or reconstructed block generation unit. The generated reconstructed signal can be used for intra-prediction of the next block to be processed in the current picture, or, as described later, for inter-prediction of the next picture after filtering.
[0044] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture encoding and / or restoration process.
[0045] The filtering unit 260 can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit 260 can apply various filtering methods to the restored picture to generate a modified restored picture, and the modified restored picture can be stored in the memory 270, specifically in the DPB of the memory 270. The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, and bilateral filter. The filtering unit 260 can generate various filtering-related information and transmit it to the entropy encoding unit 240, as will be described later in the explanation of each filtering method. The filtering-related information can be encoded by the entropy encoding unit 240 and output in bitstream format.
[0046] The corrected restored picture sent to memory 270 can be used as a reference picture in the interpretation unit 221. When interpretation is applied via this, the encoding device can avoid prediction mismatches between the encoding device 100 and the decoding device, and can also improve encoding efficiency.
[0047] The DPB in memory 270 can store the corrected restored picture for use as a reference picture in the inter-prediction unit 221. Memory 270 can store motion information of blocks from which motion information in the current picture has been derived (or encoded) and / or motion information of blocks in the picture that have already been restored. The stored motion information can be transmitted to the inter-prediction unit 221 for use as motion information of spatially adjacent blocks or motion information of temporally adjacent blocks. Memory 270 can store restored samples of restored blocks in the current picture and transmit them to the intra-prediction unit 222.
[0048] Figure 3 is a schematic diagram illustrating the configuration of a video / image decoding device that can be applied to the embodiments described in this document.
[0049] As shown in Figure 3, the decoding device 300 can 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-prediction unit 331 and an intra-prediction unit 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. The entropy decoder 310, residual processor 320, predictor 330, adder 340, and filtering unit 350 described above can be configured by a single hardware component (e.g., a decoder chipset or processor) depending on the embodiment. The memory 360 may include a decoded picture buffer (DPB) and may also be configured by a digital storage medium. The aforementioned hardware component may also further include memory 360 as an internal / external component.
[0050] When a bitstream containing video / image information is input, the decoding device 300 can reconstruct the image in accordance with the process by which the video / image information was processed in the encoding device shown in Figure 3. For example, the decoding device 300 can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device 300 can perform decoding using the processing units applied in the encoding device. Therefore, the decoding processing unit can be, for example, a coding unit, which can be divided from a coding tree unit or a maximum coding unit according to a quad-tree structure, a binary tree structure, and / or a terminally tree structure. One or more conversion units can be derived from the coding unit. The reconstructed image signal decoded and output via the decoding device 300 can then be reproduced via a playback device.
[0051] The decoding device 300 can receive the signal output from the encoding device shown in Figure 3 in bitstream form, and the received signal can be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 can parse the bitstream to derive information necessary for image restoration (or picture restoration) (e.g., video / image information). The video / image information may further include information about various parameter sets, such as the adaptation parameter set (APS), picture parameter set (PPS), sequence parameter set (SPS), or video parameter set (VPS). The video / image information may also further include general constraint information. The decoding device can further decode the picture based on the parameter set information and / or the general constraint information. The signaling / received information and / or syntax elements described later in this document can be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 can decode information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements necessary for image reconstruction and the quantized values of conversion coefficients related to the residual. More specifically, the CABAC entropy decoding method receives bins corresponding to each syntax element in the bitstream, determines a context model using the syntax element information to be decoded and the decoding information of adjacent and decoded blocks or the symbol / bin information decoded in a previous step, predicts the probability of bin occurrence based on the determined context model, performs arithmetic decoding of the bins, and generates symbols corresponding to the values of each syntax element.In this case, the CABAC entropy decoding method can update the context model after determining the context model by utilizing the information of the decoded symbol / bin for the context model of the next symbol / bin. Of the information decoded by the entropy decoding unit 310, information related to prediction is provided to the prediction unit (inter-prediction unit 332 and intra-prediction unit 331), and the residual values that have been entropy decoded by the entropy decoding unit 310, i.e., quantized conversion coefficients and related parameter information, can be input to the residual processing unit 320. The residual processing unit 320 can derive residual signals (residual blocks, residual samples, residual sample arrays). In addition, of the information decoded by the entropy decoding unit 310, information related to filtering can be provided to the filtering unit 350. On the other hand, a receiving unit (not shown) that receives signals output from the encoding device can be further configured as an internal / external element of the decoding device 300, or the receiving unit can be a component of the entropy decoding unit 310. On the other hand, the decoding device relating to this document may be called a video / image / picture decoding device, and the decoding device may also 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, inverse transformation unit 322, addition unit 340, filtering unit 350, memory 360, inter-prediction unit 332, and intra-prediction unit 331.
[0052] The inverse quantization unit 321 can inverse quantize the quantized conversion coefficients and output the conversion coefficients. The inverse quantization unit 321 can rearrange the quantized transformation coefficients in a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scan order performed by the encoding device. The inverse quantization unit 321 can perform inverse quantization on the quantized transformation coefficients using quantization parameters (e.g., quantization step size information) to obtain the transformation coefficients.
[0053] In the inverse conversion unit 322, the conversion coefficients are inversely converted to obtain a residual signal (residual block, residual sample array).
[0054] The prediction unit can make predictions for the current block and generate a predicted block containing prediction samples for the current block. Based on the prediction information output from the entropy decoding unit 310, the prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block, and can determine a specific intra / inter-prediction mode.
[0055] The prediction unit 320 can generate prediction signals based on various prediction methods described later. For example, the prediction unit can apply intra-prediction or inter-prediction for prediction of a single block, and can also apply intra-prediction and inter-prediction simultaneously. This can be called combined inter and intra prediction (CIIP). The prediction unit can also base its prediction on an intra-block copy (IBC) prediction mode or on a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as in games, for example, as in SCC (screen content coding). IBC basically performs prediction within the current picture, but can be performed similarly to inter-prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter-prediction techniques described in this document. Palette mode can be considered an example of intra-coding or intra-prediction. When palette mode is applied, information about the palette table and palette index can be included in the video / image information and signaled.
[0056] The intra-prediction unit 331 can predict the current block by referring to a sample in the current picture. The referenced sample can be located adjacent to or far from the current block depending on the prediction mode. In intra-prediction, the prediction mode can include multiple non-directional modes and multiple directional modes. The intra-prediction unit 331 can also determine the prediction mode to be applied to the current block using the prediction modes applied to adjacent blocks.
[0057] The interprediction unit 332 can derive a predicted block for the current block based on a reference block (reference sample array) identified by motion vectors on the reference picture. In this case, to reduce the amount of motion information transmitted in interprediction mode, motion information can be predicted in blocks, subblocks, or samples based on the correlation of motion information between adjacent blocks and the current block. The motion information may include motion vectors and reference picture indices. The motion information may further include interprediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of interprediction, adjacent blocks may include spatially adjacent blocks that exist in the current picture and temporally adjacent blocks that exist in the reference picture. For example, the interprediction unit 332 can construct a motion information candidate list based on adjacent blocks and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Interprediction can be performed based on various prediction modes, and the prediction information may include information indicating the mode of interprediction for the current block.
[0058] The summing unit 340 can generate a restored signal (restored picture, restored block, restored sample array) by adding the acquired residual signal to the predicted signal (predicted block, predicted sample array) output from the prediction unit (which comprises an inter-prediction unit 332 and / or an intra-prediction unit 331). If there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as the restored block.
[0059] The summing unit 340 may be called the restoration unit or restoration block generation unit. The generated restoration signal can be used for intra-prediction of the next block to be processed in the current picture, and can be output after filtering as described later, or it can be used for intra-prediction of the next picture.
[0060] On the other hand, LMCS (luma mapping with chroma scaling) can also be applied during the picture decoding process.
[0061] The filtering unit 350 can apply filtering to the restored signal to improve subjective / objective image quality. For example, the filtering unit 350 can apply various filtering methods to the restored picture to generate a modified restored picture, and can transmit the modified restored picture to the memory 360, specifically to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, and bilateral filter.
[0062] The (modified) restored picture stored in the DPB of memory 360 can be used as a reference picture by the inter-prediction unit 332. Memory 360 can store motion information of blocks from which motion information in the current picture has been derived (or decoded) and / or motion information of blocks in the picture that have already been restored. The stored motion information can be transmitted to the inter-prediction unit 260 for use as motion information of spatially adjacent blocks or motion information of temporally adjacent blocks. Memory 360 can store restored samples of restored 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, the inter-prediction unit 221, and the intra-prediction unit 222 of the encoding device 100 can be applied identically or in a corresponding manner to the filtering unit 350, the inter-prediction unit 332, and the intra-prediction unit 331 of the decoding device 300, respectively.
[0064] On the other hand, as mentioned above, prediction is performed to improve compression efficiency when performing video coding. This makes it possible to generate a predicted block that includes predicted samples for the current block, which is the block to be coded. Here, the predicted block includes predicted samples in the spatial domain (or pixel domain). The predicted block is similarly derived by the encoding and decoding devices, and the encoding device can improve image coding efficiency by signaling the decoding device with information about the residual between the original block and the predicted block (residual information), which is not the original sample value of the original block itself. The decoding device can derive a residual block that includes residual samples based on the residual information, and can generate a restored block that includes restored samples by adding the residual block and the predicted block, and can generate a restored picture that includes the restored block.
[0065] The residual information can be generated through transformation and quantization procedures. For example, an encoding device can signal the relevant residual information (via a bitstream) to a decoding device by deriving a residual block between the original block and the predicted block, performing a transformation procedure on the residual samples (residual sample array) contained in the residual block to derive transformation coefficients, and performing a quantization procedure on the transformation coefficients to derive quantized transformation coefficients. Here, the residual information may include information such as the value information, position information, transformation technique, transformation kernel, and quantization parameters of the quantized transformation coefficients. The decoding device can derive a residual sample (or residual block) by performing an inverse quantization / inverse transformation procedure based on the residual information. The decoding device can generate a reconstructed picture based on the predicted block and the residual block. The encoding device can also derive a residual block by inverse quantization / inverse transformation of the quantized transformation coefficients for reference for subsequent interpretation of the picture, and generate a reconstructed picture based on this.
[0066] On the other hand, when intra-prediction is performed, the correlation between samples can be utilized, and the difference between the original block and the predicted block, i.e., the residual, can be obtained. The transformations and quantizations described above can be applied to the residual, thereby eliminating spatial redundancy. The encoding and decoding methods used in intra-prediction will be described in detail below.
[0067] Intra prediction refers to a prediction that generates prediction samples for the current block based on reference samples outside the current block within the picture containing the current block (hereinafter referred to as the current picture). Here, reference samples outside the current block can mean samples located adjacent to the current block. When intra prediction is applied to the current block, neighboring reference samples to be used for intra prediction of the current block can be derived.
[0068] For example, when the current block size (width × height) is nW × nH, the adjacent reference samples of the current block can include a total of 2 × nH samples adjacent to the left boundary of the current block and to the bottom left, a total of 2 × nW samples adjacent to the top boundary of the current block and to the top right, and one sample adjacent to the top left of the current block. Alternatively, the adjacent reference samples of the current block can also include upper adjacent samples in multiple columns and left adjacent samples in multiple rows. Furthermore, the adjacent reference samples of the current block can also include a total of nH samples adjacent to the right boundary of the current block of nW × nH size, 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 adjacent reference samples in the current block may not yet be decoded or available. In this case, the decoding device can substitute the unavailable samples with available samples to construct the adjacent reference samples used for prediction. Alternatively, it can construct the adjacent reference samples used for prediction through interpolation of available samples.
[0070] If adjacent reference samples are derived, (i) predicted samples can be derived based on the average or interpolation of adjacent reference samples in the current block, or (ii) predicted samples can be derived based on reference samples in the current block that are located in a specific (predicted) direction relative to the predicted samples. Case (i) can be applied when the intra-prediction mode is non-directional or non-angular mode, and case (ii) can be applied when the intra-prediction mode is directional or angular mode.
[0071] Furthermore, prediction samples can also be generated by interpolating between a first adjacent sample located in the prediction direction of the current block's intra-prediction mode and a second adjacent sample located in the opposite direction of the prediction direction, using the current block's prediction sample as a reference from the adjacent reference samples. In the above case, this can be called linear interpolation intra-prediction (LIP). Alternatively, chroma prediction samples can be generated based on chroma samples using a linear model. In this case, this can be called LM mode.
[0072] Alternatively, temporary predicted samples for the current block can be derived based on filtered neighboring reference samples, and the predicted samples for the current block can be derived by performing a weighted sum on these temporary predicted samples and existing neighboring reference samples, i.e., at least one reference sample derived by the intra-prediction mode from among the unfiltered neighboring reference samples. In the case described above, this can be called PDPC (Position dependent intra-prediction).
[0073] Furthermore, intra-predictive coding can be performed by selecting the reference sample line with the highest prediction accuracy from among the adjacent multi-reference sample lines in the current block, deriving a predicted sample using the reference sample located in the prediction direction on that line, and then instructing (signaling) the decoding device to use the reference sample line used. In the above case, it can be called multi-reference line (MRL) intra prediction or MRL-based intra prediction.
[0074] Furthermore, the current block can be divided into vertical or horizontal subpartitions, and intra-prediction can be performed based on the same intra-prediction mode, allowing adjacent reference samples to be derived and used on a subpartition basis. In other words, in this case, the intra-prediction mode for the current block is also applied to the subpartitions, and by deriving and using adjacent reference samples on a subpartition basis, intra-prediction performance can be improved in some cases. Such a prediction method can be called intra-subpartitions (ISP) or ISP-based intra-prediction.
[0075] The intra-prediction methods described above can be distinguished from intra-prediction modes and referred to as intra-prediction types. Intra-prediction types can be referred to by a variety of terms, such as intra-prediction techniques or additional intra-prediction modes. For example, an intra-prediction type (or additional intra-prediction mode, etc.) may include at least one of the aforementioned LIP, PDPC, MRL, and ISP. A general intra-prediction method that excludes specific intra-prediction types such as LIP, PDPC, MRL, and ISP can be called a normal intra-prediction type. Normal intra-prediction types can be generally applied when the aforementioned specific intra-prediction types are not applicable, and predictions can be performed based on the aforementioned intra-prediction modes. On the other hand, post-processing filtering can also be performed on the derived prediction samples as needed.
[0076] Figure 4 shows an example of a schematic intra-prediction-based video encoding method to which the embodiments of this document can be applied, and Figure 5 schematically shows an intra-prediction unit in an encoding device. The intra-prediction unit in the encoding device in Figure 5 can be applied to be identical to or corresponding to the intra-prediction unit 222 of the encoding device 200 in Figure 2 described above.
[0077] Referring to Figures 4 and 5, S400 can be performed by the intra-prediction unit 222 of the encoding device, and S410 can be performed by the residual processing unit 230 of the encoding device. Specifically, S410 can be performed by the subtraction unit 231 of the encoding device. In S420, the prediction information can be derived by the intra-prediction unit 222 and encoded by the entropy encoding unit 240. In S420, the residual information can be derived by the residual processing unit 230 and encoded by the entropy encoding unit 240. The residual information is information about the residual sample. The residual information may include information about the quantized conversion coefficients for the residual sample. As mentioned above, the residual sample is derived as a conversion coefficient via the conversion unit 232 of the encoding device, and the conversion coefficient can be derived as a quantized conversion coefficient via the quantization unit 233. Information about the quantized conversion coefficients can be encoded by the entropy encoding unit 240 via the residual coding procedure.
[0078] The encoding device performs intraprediction for the current block (S400). The encoding device can derive an intraprediction mode / type for the current block, derive adjacent reference samples for the current block, and generate predicted samples within the current block based on the intraprediction mode / type and adjacent reference samples. Here, the intraprediction mode / type determination, adjacent reference sample derivation, and predicted sample generation procedures may be performed simultaneously, or one procedure may be performed before the others.
[0079] For example, the intra-prediction unit 222 of the encoding device 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. The intra-prediction mode / type determination unit 222-1 determines the intra-prediction mode / type for the current block, the reference sample derivation unit 222-2 derives adjacent reference samples for the current block, and the prediction sample derivation unit 222-3 derives prediction samples for the current block. On the other hand, although not shown, if a prediction sample filtering procedure is performed, the intra-prediction unit 222 may further include a prediction sample filtering unit (not shown). The encoding device can determine which mode / type from among a plurality of intra-prediction modes / types is applicable to the current block. The encoding device can compare the RD costs for the intra-prediction modes / types and determine the optimal intra-prediction mode / type for the current block.
[0080] As mentioned above, the encoding device can also perform a predictive sample filtering procedure. This predictive sample filtering can be called post-filtering. The predictive sample filtering procedure can filter out some or all of the predictive samples. In some cases, the predictive sample filtering procedure can be omitted.
[0081] The encoding device generates a residual sample for the current block based on the (filtered) predicted sample (S410). The encoding device can derive the residual sample by comparing the predicted sample with the original sample of the current block based on phase.
[0082] The encoding device can encode video information including intra-prediction information (prediction information) and residual information regarding residual samples (S420). The prediction information may include intra-prediction mode information and intra-prediction type information. The residual information may include residual coding syntex. The encoding device can convert / quantize residual samples to derive quantized conversion coefficients. The residual information may include information regarding the quantized conversion coefficients.
[0083] The encoding device can output encoded video information in bitstream format. The output bitstream can be transmitted to a decoding device via a storage medium or a network.
[0084] As mentioned above, the encoding device can generate a restored picture (including restored samples and restored blocks). To do this, the encoding device can decrypt the quantized transformation coefficients again to derive (corrected) residual samples. The reason for decrypting / inverting the residual samples again after transformation / quantization is, as mentioned above, to derive the same residual samples as those derived by the decoding device. Based on the predicted samples and the (corrected) residual samples, the encoding device can generate a restored block containing restored samples for the current block. Based on the restored block, a restored picture for the current picture can be generated. As mentioned above, further procedures such as in-loop filtering can be applied to the restored picture.
[0085] Figure 6 shows an example of a schematic intra-prediction-based video decoding method to which the embodiments of this document can be applied, and Figure 7 shows a schematic intra-prediction unit in a decoding device. The intra-prediction unit in the decoding device shown in Figure 7 can be applied to the intra-prediction unit 331 of the decoding device 300 shown in Figure 3, either identically or in a corresponding manner.
[0086] Referring to Figures 6 and 7, the decoding device can perform operations corresponding to the operations performed by the encoding device described above. S600 to S620 can be performed by the intra-prediction unit 331 of the decoding device, and the prediction information in S600 and the residual information in S630 can be obtained from the bitstream by the entropy decoding unit 310 of the decoding device. The residual processing unit 320 of the decoding device can derive a residual sample for the current block based on the residual information. Specifically, the inverse quantization unit 321 of the residual processing unit 320 derives conversion coefficients by performing inverse quantization based on the quantized conversion coefficients derived from the residual information, and the inverse transformation unit 322 of the residual processing unit can derive a residual sample for the current block by performing an inverse transformation on the conversion coefficients. S640 can be performed by the addition unit 340 or the restoration unit of the decoding device.
[0087] The decoding device can derive the intra-prediction mode / type for the current block based on the received prediction information (intra-prediction mode / type information) (S600). The decoding device can derive the adjacent reference samples for the current block (S610). The decoding device generates prediction samples within the current block based on the intra-prediction mode / type and adjacent reference samples (S620). In this case, the decoding device can perform a prediction sample filtering procedure. Prediction sample filtering can be called post-filtering. The prediction sample filtering procedure can filter some or all of the prediction samples. In some cases, the prediction sample filtering procedure can be omitted.
[0088] The decoding device generates a residual sample for the current block based on the received residual information (S630). The decoding device can generate a restored sample for the current block based on the predicted sample and the residual sample, and derive a restored block containing the restored sample (S640). A restored picture for the current picture can be generated based on the restored block. As previously mentioned, in-loop filtering procedures and the like can be further applied to the restored 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. The intra-prediction mode / type determination unit 331-1 determines the intra-prediction mode / type for the current block based on the intra-prediction mode / type information acquired by the entropy decoding unit 310, the reference sample derivation unit 331-2 derives adjacent reference samples for the current block, and the prediction sample derivation unit 331-3 derives prediction samples for the current block. On the other hand, although not shown, if the prediction sample filtering procedure described above 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 MPM (most probable mode) or remaining mode is applied to the current block. In this case, if MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) pointing to one of the intra prediction mode candidates (MPM candidates). Intra-predictive mode candidates (MPM candidates) can consist of an MPM candidate list or an MPM list. Furthermore, if no MPM is currently applied to the block, the intra-predictive mode information may include remaining mode information (e.g., intra_luma_mpm_remainder) that points to one of the remaining intra-predictive modes after excluding the intra-predictive mode candidates (MPM candidates). The decoding device can determine the intra-predictive mode for the current block based on the intra-predictive mode information.
[0091] Furthermore, intra-prediction type information can be embodied in various forms. For example, intra-prediction type information may include intra-prediction type index information indicating one of the intra-prediction types. As another example, intra-prediction type information may include reference sample line information (e.g., intra_luma_ref_idx) indicating whether MRL is applied to the current block and, if so, which reference sample line is used; ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether ISP is applied to the current block; ISP type information (e.g., intra_subpartitions_split_flag) indicating the subpartition splitting type if ISP is applied; and at least one of the following flag information: flag information indicating whether PDCP is applicable or flag information indicating whether LIP is applicable. In addition, 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 described above can be encoded / decoded via the coding methods described in this document. For example, the intra-prediction mode information and / or intra-prediction type information described above can be encoded / decoded via entropy coding (e.g., CABAC, CAVLC) coding based on truncated (rice) binary code.
[0093] On the other hand, when intra-prediction is applied, the intra-prediction mode applied to the current block can be determined by utilizing the intra-prediction modes of adjacent blocks. For example, the decoding device can select one of the mpm candidates in the mpm (most probable mode) list derived based on the intra-prediction modes of the current block's adjacent blocks (e.g., left and / or upper adjacent blocks) and additional candidate modes, based on the received mpm index, or it can select one of the remaining intra-prediction modes not included in the mpm candidates (and planar modes), based on the remaining intra-prediction mode information. The mpm list may or may not include planar modes as candidates. For example, if the mpm list includes planar modes as candidates, it may have 6 candidates, and if the mpm list does not include planar modes as candidates, it may have 5 candidates. If the mpm list does not include planar mode as a candidate, a not-planar flag (e.g., intra_luma_not_planar_flag) may be signaled to indicate that the current intra-prediction mode of the block is not 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 fact that the mpm list is configured not to include planar modes as candidates does not mean that planar modes are not mpm, but rather that planar modes are always considered in mpm, so the flag (not-planar flag) is signaled first to check whether it is a planar mode.
[0094] For example, whether the intra-prediction mode currently applied to a block is within the MPM candidate (and planar mode) or within the remaining mode can be indicated by the MPM flag (e.g., intra_luma_mpm_flag). An MPM flag value of 1 indicates that the intra-prediction mode for the current block is within the MPM candidate (and planar mode), and an MPM flag value of 0 indicates that the intra-prediction mode for the current block is not within the MPM candidate (and planar mode). A not-planar flag value of 0 (e.g., intra_luma_not_planar_flag) indicates that the intra-prediction mode for the current block is planar mode, and a not-planar flag value of 1 indicates that the intra-prediction mode for the current block is not planar mode. The mpm index can be signaled in the form of the mpm_idx or intra_luma_mpm_idx syntex element, and the remaining intra-prediction mode information can be signaled in the form of the rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntex element. For example, the remaining intra-prediction mode information can point to one of the remaining intra-prediction modes that are not included in the mpm candidates (and planar modes) from the overall intra-prediction modes, indexed in order of prediction mode number. The intra-prediction mode is the intra-prediction mode for the luma component (sample). The intra-prediction mode information below may include at least one of the following: mpm flag (e.g., intra_luma_mpm_flag), not planar flag (e.g., intra_luma_not_planar_flag), mpm index (e.g., mpm_idx or intra_luma_mpm_idx), or 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 MPM candidate list, candModeList, etc.
[0095] Generally, when dividing video into blocks, the current block and adjacent blocks to be coded will have similar video characteristics. Therefore, the current block and adjacent blocks have a high probability of having the same or similar intra-prediction modes. Therefore, the encoder can utilize the intra-predictive modes of adjacent blocks to encode the intra-predictive mode of the current block. For example, the encoder / decoder can construct an MPM (most probable modes) list for the current block. The MPM list can also refer to a list of MPM candidates. Here, MPM can mean a mode used to improve coding efficiency by considering the similarity between the current block and adjacent blocks during intra-predictive mode coding.
[0096] Figure 8 shows an example of an MPM mode-based intra-prediction method in an encoding device to which the embodiments described in this document can be applied.
[0097] Referring to Figure 8, the encoding device configures an MPM list for the current block (S800). The MPM list can include candidate intra-prediction modes (MPM candidates) that are likely to be applied to the current block. The MPM list may also include intra-prediction modes for adjacent blocks, and may further include specific intra-prediction modes by a predetermined method. The specific method for configuring the MPM list will be described later.
[0098] The encoding device determines the intra-prediction mode for the current block (S810). The encoding device can perform predictions based on various intra-prediction modes and determine the optimal intra-prediction mode based on rate-distortion optimization (RDO) derived from these predictions. In this case, the encoding device may determine the optimal intra-prediction mode using only the MPM candidates and planar modes configured in the MPM list, or it may determine the 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 current block's intra-prediction type is a specific type other than the normal intra-prediction type (e.g., LIP, MRL, or ISP), the encoding device can 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 can 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 can estimate that the mpm flag is 1 without receiving separate signaling of the mpm flag.
[0100] Generally, if the current block's intra-prediction mode is not planar mode and is one of the MPM candidates in the MPM list, the encoding device generates an mpm index (mpm idx) pointing to one of the MPM candidates. If the current block's intra-prediction mode is not found in the MPM list, the device generates remaining intra-prediction mode information that points to the same mode as the current block's intra-prediction mode among the remaining intra-prediction modes not included in the MPM list (and planar mode).
[0101] The encoding device can encode the intra-prediction mode information and output it in bitstream format (S820). The intra-prediction mode information may include the aforementioned mpm flag, not planar flag, mpm index, and / or remaining intra-prediction mode information. Generally, the mpm index and the remaining intra-prediction mode information have an alternative relationship and are not signaled simultaneously when indicating the intra-prediction mode for a single block. That is, the mpm flag value of 1 and the not planar flag or mpm index may both be signaled, or the mpm flag value of 0 and the remaining intra-prediction mode information may both be signaled. However, as mentioned above, if 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] Figure 9 shows an example of an MPM mode-based intra-prediction method in a decoding device to which the embodiments of this document can be applied. The decoding device in Figure 9 can determine the intra-prediction mode in response to the intra-prediction mode information determined and signaled by the encoding device in Figure 8.
[0103] Referring to Figure 9, the decoding device obtains intra-prediction mode information from the bitstream (S900). As mentioned above, the intra-prediction mode information may include at least one of the following: mpm flag, not planar flag, mpm index, and remaining intra-prediction mode.
[0104] The decoding device configures the MPM list (S910). The MPM list is configured in the same way as the MPM list configured by the encoding device. That is, the MPM list may include intra-prediction modes of adjacent blocks, and may further include specific intra-prediction modes by a predetermined method. The specific method for configuring the MPM list will be described later.
[0105] Even if it is illustrated that S910 is executed after S900, this is merely an example, and S910 may be executed before or at the same time as S900.
[0106] The decoding device determines the intra-prediction mode of the current block based on the MPM list and intra-prediction mode information (S920).
[0107] For example, if the value of the mpm flag is 1, the decoding device can derive the planar mode as the intra-prediction mode for the current block (not based on the planar flag), or it can derive the candidate pointed to by the mpm index among the MPM candidates in the MPM list as the intra-prediction mode for the current block. Here, the MPM candidates may refer only to the candidates included in the MPM list, or they 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, if the value of the mpm flag is 0, the decoding device can derive the intra-prediction mode that the remaining intra-prediction mode information points to from among the remaining intra-prediction modes not included in the MPM list and 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), the decoding device may derive the intra-prediction mode of the current block from the planar mode or the candidate pointed to by the mpm index in the MPM list, without checking the mpm flag.
[0110] On the other hand, intra-prediction modes can include non-directional (or non-angular) intra-prediction modes and directional (or angular) intra-prediction modes. For example, the HEVC standard uses intra-prediction modes that include two non-directional and 33 directional modes. Non-directional modes can include planar intra-prediction mode (number 0) and DC intra-prediction mode (number 1), while directional modes can include intra-prediction modes (numbers 2 through 34). Planar intra-prediction modes can be called planar modes, and DC intra-prediction modes can be called DC modes.
[0111] Alternatively, to capture any edge direction presented in natural video, the directional intra-prediction modes can be expanded from the existing 33 to 65, as shown in Figure 10 below. In this case, the intra-prediction modes can include 2 non-directional intra-prediction modes and 65 directional intra-prediction modes. The non-directional intra-prediction modes can include the planar intra-prediction mode (mode 0) and the DC intra-prediction mode (mode 1), and the directional intra-prediction modes can include intra-prediction modes 2 through 66. The expanded directional intra-prediction modes can be applied to blocks of all sizes and to both luminous and chroma components. However, this is merely illustrative, and the embodiments described in this document can also be applied to cases with a different number of intra-prediction modes. In some cases, an additional 67th intra-prediction mode may be used, which may represent the linear model (LM) mode.
[0112] Figure 10 shows an example of an intra-prediction mode to which the embodiments described in this document can be applied.
[0113] Referring to Figure 10, intra-prediction modes can be divided into those with horizontal directionality and those with vertical directionality, centered around intra-prediction mode 34, which has a diagonal prediction direction pointing diagonally upward to the left. In Figure 10, H and V represent horizontal and vertical directionality, respectively, and the numbers -32 to 32 indicate a displacement of 1 / 32 units on the sample grid position. Intra-prediction modes 2 through 33 have horizontal directionality, while intra-prediction modes 34 through 66 have vertical directionality. Intra-prediction modes 18 and 50 represent horizontal intra-prediction modes and vertical intra-prediction modes, respectively. Intra-prediction mode 2 can be called the diagonal intra-prediction mode pointing diagonally downward to the left, intra-prediction mode 34 can be called the diagonal intra-prediction mode pointing diagonally upward to the left, and intra-prediction mode 66 can be called the diagonal intra-prediction mode pointing diagonally upward to the right.
[0114] On the other hand, intra-prediction can use MRL, which utilizes multiple reference lines. The MRL method can perform intra-prediction by 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] Figure 11 shows an example of reference sample lines for intra-prediction using multiple reference lines. The Block Unit in Figure 11 can refer to the current block.
[0116] In one embodiment, intra-prediction can use a reference sample adjacent to the current block (or the reference sample closest to the current block, i.e., a reference sample located at a distance of 0 samples from the current block) as the reference sample for prediction. In another embodiment, multiple reference line (MRL) intra-prediction is a method that uses a reference sample located at a distance of K samples (where K is an integer greater than or equal to 1) from the left and upper boundaries of the current block, and can have more options for the reference sample and more accurate prediction performance than intra-prediction that uses the reference sample closest to the current block (i.e., located at a distance of 0 samples). The reference sample of the current block may also be called the adjacent sample of the current block or the reference line sample of the current block, and the reference line sample may also be called a sample on the reference line.
[0117] Referring to Figure 11, the locations of adjacent reference samples located at distances of 0, 1, 2, and 3 samples from the current block can be called reference lines 0, 1, 2, and 3, respectively. Reference lines can also be called reference sample lines, reference sample rows, or reference sample columns, or simply lines, rows, or columns. Reference lines 0, 1, 2, and 3 can be located in order of proximity to the current block. As an example, multiple reference line intra-prediction can be performed based on reference lines 1 and 2. As another example, multiple reference line intra-prediction can be performed based on reference lines 1 and 3. However, the multiple reference line intra-prediction in this document is not necessarily limited to these examples.
[0118] Furthermore, intraprediction based on multiple reference lines (MRL) can signal reference line information to indicate which reference line will be used. For example, reference line information can be signaled in the form of an intra_luma_ref_idx syntax element. If the value of intra_luma_ref_idx is 0, it can indicate that the intraprediction will be performed using the reference sample that is first closest to the current block (i.e., located at a distance of 0 samples). If the value of intra_luma_ref_idx is 1, it can indicate that the intraprediction will be performed using the reference sample that is second closest to the current block (i.e., located at a distance of 1 sample). If the value of intra_luma_ref_idx is 2, it can indicate that the intraprediction will be performed using the reference sample that is third or fourth closest to the current block (i.e., located at a distance of 2 or 3 samples).
[0119] The following describes how to configure the MPM list and how to derive adjacent reference samples in DC mode to perform intra-prediction on a multi-reference line-based system.
[0120] Figure 12 illustrates one example of a method for deriving predicted samples in DC mode.
[0121] Figure 12 illustrates, for ease of explanation, the case where the reference sample closest to the current block (i.e., located at a distance of 0 samples) is used. Specifically, it illustrates the reference sample used in DC mode when the value of the reference line index information (e.g., intra_luma_ref_idx) is 0. The method disclosed in Figure 12 can also be applied in DC mode when the value of the reference line index information (e.g., intra_luma_ref_idx) is not 0.
[0122] Referring to Figure 12(a), if the current block is a square block (e.g., a 4x4 block) and the intra-prediction mode of the current block is DC mode, then adjacent reference samples used for intra-prediction in DC mode can be derived. In this case, adjacent reference samples can include left-side reference samples (E, F, G, H) located to the left of the current block and upper-side reference samples (A, B, C, D) located to the upper of the current block. In this case, the average can be calculated using the left-side reference samples (E, F, G, H) and upper-side reference samples (A, B, C, D), and the DC value (dcVal) can be derived based on the calculated average. The samples within the current block (shaded area in Figure 12(a)) can be filled with the DC value (dcVal). That is, samples filled with such DC value (dcVal) can be called prediction samples.
[0123] Referring to Figure 12(b), if the current block is a non-square block (e.g., an 8x4 block) and the intra-prediction mode of the current block is DC mode, then adjacent reference samples used for intra-prediction in DC mode can be derived. In this case, adjacent reference samples can include reference samples located on the longer side of the non-square block's width and height. In the case of an 8x4 block as shown in Figure 12(b), the width (i.e., horizontal) is greater, so the upper reference samples (A, B, C, D, E, F, G, H) located adjacent on the width side can be derived as adjacent reference samples. In this case, the average can be calculated using the upper reference samples (A, B, C, D, E, F, G, H), and the DC value (dcVal) can be derived based on the calculated average. The samples in the current block (shaded area in Figure 12(b)) can be filled with the DC value (dcVal). That is, samples filled with such DC value (dcVal) can be called prediction samples.
[0124] As mentioned earlier, unlike with square blocks, when calculating the average using all left-referenced and upper-referenced samples with non-square blocks, the number of values to divide is 2. n Since it is not in that form, a division operation must be used. To change such a division operation to a shift operation, as mentioned above, the DC value can be calculated using only the reference sample located on the longer side of the width and height of the non-square block.
[0125] In the embodiment shown in Figure 12, when the current block is a non-square block in DC mode, after comparing the width (i.e., horizontal length) and height (i.e., vertical length), the DC value is calculated using only the reference sample on the longer side, and this is derived as the predicted sample for the current block. This method does not use the reference sample on one side of the width and height (i.e., the side with the shorter length), so the accuracy of the prediction may be low. Therefore, below we will describe a method for generating a predicted sample by calculating the DC value using all left-side and upper-side reference samples when the current block is a non-square block. We will also describe a method for selecting reference samples (left-side and upper-side reference samples) so that the DC value can be calculated using a shift operation instead of a division operation. As one embodiment, for the width and height of a non-square block, the same number of reference samples as the number of adjacent reference samples on the shorter length side can be selected from the adjacent reference samples on the longer length side, and the DC value can be calculated using these. When selecting reference samples from the adjacent reference samples on the longer length side in this way as many times as the number of reference samples on the shorter length side, the total number of selected reference samples is 2 n Because it takes this form, the average value can be calculated using a shift operation.
[0126] Figure 13 illustrates another embodiment of the method for deriving predictive samples in DC mode. The method disclosed in Figure 13 shows how to select reference samples on the longer side of a non-square block by the number of reference samples on the shorter side of the width and height, and then select reference samples at different positions from each other from the reference samples on the longer side.
[0127] Furthermore, Figure 13 illustrates, for the sake of explanation, the case where the reference sample closest to the current block (i.e., located at a distance of 0 samples) is used. Specifically, it illustrates the reference sample used in DC mode when the value of the reference line index information (e.g., intra_luma_ref_idx) is 0. The method disclosed in Figure 13 can also be applied in DC mode when the value of the reference line index information (e.g., intra_luma_ref_idx) is not 0.
[0128] Referring to Figures 13(a) through (d), if the current block is a non-square block (e.g., an 8x4 block) and the intra-prediction mode of the current block is DC mode, then the adjacent reference samples used for intra-prediction in DC mode can be derived. In this case, the adjacent reference samples may include the same number of reference samples as the left reference samples from the left adjacent (I, J, K, L) located to the left adjacent of the current block and the upper adjacent (A, B, C, D, E, F, G, H) located to the upper adjacent of the current block.
[0129] For example, as shown in Figure 13(a), the reference samples at odd-numbered positions among the upper reference samples (A, B, C, D, E, F, G, H) can be sampled and selected in quantities equal to the number of left reference samples. That is, the reference samples at odd-numbered positions are the reference samples (A, C, E, G) selected by sampling two at a time from the first reference sample among the upper reference samples, in quantities equal to 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 these eight reference samples.
[0130] As another example, as shown in Figure 13(b), the reference samples at even-numbered positions among the upper reference samples (A, B, C, D, E, F, G, H) can be sampled and selected in quantities equal to the number of left-side reference samples. That is, the reference samples at even-numbered positions are the reference samples (B, D, F, H) selected by sampling two at a time from the second-position reference sample among the upper reference samples, in quantities equal to the number of left-side reference samples. In this case, the adjacent reference samples can include a total of eight reference samples (four left-side reference samples and four upper-side reference samples). The DC value can be derived by calculating the average of such a total of eight reference samples.
[0131] As another example, as shown in Figure 13(c), we can select reference samples (A, B, C, D) that are located consecutively from the first reference sample in the upper reference samples (A, B, C, D, E, F, G, H) by the number of left reference samples. In this case, the adjacent reference samples can include a total of 8 reference samples (4 left reference samples and 4 upper reference samples). The DC value can be derived by calculating the average of these 8 reference samples.
[0132] As another example, as shown in Figure 13(d), we can select reference samples (E, F, G, H) that are located consecutively to the left of the last reference sample among the upper reference samples (A, B, C, D, E, F, G, H) by the number of left reference samples. In this case, the adjacent reference samples can include a total of 8 reference samples (4 left reference samples and 4 upper reference samples). The DC value can be derived by calculating the average of such a total of 8 reference samples.
[0133] In the example shown in Figure 13, an 8x4 block was used as an example, but this is merely one example. The method described above can be applied to non-square blocks of various sizes to derive adjacent reference samples, and the DC value can be calculated based on these samples. For example, when the block is currently a 16x4 non-square block, four reference samples can be selected from four left-side reference samples and sixteen upper-side reference samples. In this case, when applying method (a) in Figure 13, four upper-side reference samples can be selected by sampling four samples from the first-position reference sample among the sixteen upper-side reference samples. Therefore, the DC value can be derived by calculating the average using the four left-side reference samples and the four sampled upper-side reference samples. The same method can be applied to the methods described in Figures 13(b), (c), and (d) to derive left-side and upper-side reference samples, and the DC value can be calculated based on the derived reference samples.
[0134] On the other hand, intra-prediction methods using multiple reference lines can only be applied to directional intra-prediction modes, excluding planar and DC modes. Therefore, when multiple reference lines are used, there is a limitation in that intra-prediction cannot be applied to non-directional modes, namely planar and DC modes. This paper proposes a method for performing DC mode intra-prediction with multiple reference lines by applying various methods for deriving adjacent reference samples in DC mode as described above.
[0135] As one embodiment, in multi-reference line-based intra-prediction, to reduce complexity, multi-reference lines can be applied only to candidate intra-prediction modes included in the MPM list, rather than to all intra-prediction modes. Therefore, when multi-reference line-based intra-prediction is applied, a DC mode can be added to the MPM list to execute the DC mode. That is, an existing MPM list for intra-prediction using multi-reference lines generates a total of six candidate intra-prediction modes, and these six generated candidate intra-prediction modes do not include planar mode or DC mode. However, according to this document, it is possible to add a DC mode to the candidate intra-prediction modes to configure the MPM list. As an example, a DC mode can be added without changing the number of candidate intra-prediction modes in the existing MPM list. In this case, a left-side mode, which is the candidate intra-prediction mode for the left-side adjacent block of the current block, and an upper-side mode, which is the candidate intra-prediction mode for the upper-side adjacent block of the current block, can be derived, and a candidate intra-prediction mode can be derived based on the left-side mode and the upper-side mode to configure the MPM list. At this time, one of the candidate intra-prediction modes can be derived as the DC mode.
[0136] In deriving one of the candidate intra-prediction modes as the DC mode, one example is to remove one of the candidate intra-prediction modes in the MPM list and add the DC mode. In this case, the method for removing a candidate intra-prediction mode from the MPM list is to remove the last-order candidate intra-prediction mode with the lowest probability of occurrence in the MPM list. However, this is only one example, and it is also possible to remove a candidate intra-prediction mode in any order, or to remove the first-order candidate intra-prediction mode in the MPM list, taking into account the frequency of occurrence of the DC mode. Furthermore, the method for adding the DC mode to the MPM list is to add the DC mode to the position where the previous mode was removed. For example, the DC mode can be added to the last position in the MPM list, or to the first position. Also, the position in the MPM list where the DC mode is added can be determined to be any position. That is, a candidate intra-prediction mode in any order can be removed from the candidate intra-prediction modes in the MPM list, and the DC mode can be positioned in any order.
[0137] As mentioned above, by adding DC modes to the MPM list, predictions can be performed using DC modes in intra-prediction based on multiple reference lines. In this case, predictions for DC modes included in the MPM list can use the various DC value prediction methods described in Figures 12 and 13.
[0138] Figure 14 is a schematic flowchart illustrating an encoding method that can be performed by an encoding device according to one embodiment of this document.
[0139] The method disclosed in Figure 14 can be performed by the encoding device 200 disclosed in Figure 2. Specifically, steps S1400 to S1420 in Figure 17 can be performed by the prediction unit 220 (specifically, the intra-prediction unit 222) disclosed in Figure 2, and steps S1420 to S1430 in Figure 17 can be performed by the entropy encoding unit 240 disclosed in Figure 2. Furthermore, the method disclosed in Figure 14 may include embodiments detailed in this document. Therefore, in Figure 14, specific explanations that overlap with the embodiments described above are omitted or simplified.
[0140] Referring to Figure 14, the encoding device can configure an MPM (Most Probable Mode) list that includes candidate intra-prediction modes for the current block (S1400).
[0141] As one embodiment, the encoding device can derive a left-side mode, which is a candidate intra-prediction mode for the left-side adjacent block of the current block, and an upper-side mode, which is a candidate intra-prediction mode for the upper-side adjacent block of the current block. Here, the left-side adjacent block can refer to the lowermost adjacent block among the left-side adjacent blocks located adjacent to the left of the current block, and the upper-side adjacent block can refer to the rightmost adjacent block among the upper-side adjacent blocks located adjacent to the upper 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, then the left-side adjacent block is the block containing the sample at coordinates (xN-1, yN+H-1), and the upper-side adjacent block is the block containing the sample at coordinates (xN+W-1, yN-1).
[0142] For example, if the left adjacent block is available and intraprediction is applied to the left adjacent block, the encoding device can derive the intraprediction mode of the left adjacent block as the left candidate intraprediction mode (i.e., the left mode). If the upper adjacent block is available, intraprediction is applied to the upper adjacent block, and the upper adjacent block is currently included in the CTU, the encoding device can derive the intraprediction mode of the upper adjacent block as the upper candidate intraprediction mode (i.e., the upper mode). Alternatively, if the left adjacent block is unavailable or intraprediction is not applied to the left adjacent block, the encoding device can derive the planar mode as the left mode. If the upper adjacent block is unavailable or intraprediction is not applied to the upper adjacent block, or the upper adjacent block is not currently included in the CTU, the encoding device can derive the planar mode as the upper mode.
[0143] The encoding device can derive candidate intra-prediction modes for the current block and construct an MPM list based on the left-side mode derived from the left-side adjacent block and the upper-side mode derived from the upper-side adjacent block. In this case, the MPM list may include the left-side mode and the upper-side mode, and may further include specific intra-prediction modes in a predetermined manner.
[0144] As an example, the encoding device can determine whether to apply multiple reference lines to the current block to perform intra-prediction, and the determination can derive a specific intra-prediction mode and include it in the MPM list. If multiple reference lines are applied to the current block to perform intra-prediction, the encoding device can generate and signal reference line index information. The reference line index information may include index values indicating the reference lines used for intra-prediction of the current block, and can be signaled, for example, in the form of the intra_luma_ref_idx syntax element described above. If the value of intra_luma_ref_idx is 0, it can indicate that intra-prediction will be performed using the reference sample closest to the current block (i.e., located at a distance of 0 samples). If the value of intra_luma_ref_idx is 1, it can indicate that intra-prediction will be performed using the reference sample second closest to the current block (i.e., located at a distance of 1 sample). If the value of intra_luma_ref_idx is 2, it can indicate that intra-prediction will be performed using the reference sample third or fourth closest to the current block (i.e., located at a distance of 2 or 3 samples).
[0145] For example, if the value of the reference line index information is not 0, the encoding device can derive a DC mode as one of the candidate intra-prediction modes, and can include the derived DC mode in the MPM list. In this case, the DC mode can be positioned in any order within the MPM list. Alternatively, the DC mode can be included in the first or last position in the MPM list, taking into account its frequency of occurrence.
[0146] The encoding device can derive the intra-prediction mode for the current block based on the candidate intra-prediction modes included in the MPM list (S1410).
[0147] As one embodiment, the encoding device can perform various intra-prediction modes on the current block to derive the intra-prediction mode with the optimal RD (rate-distortion) cost, and determine this as the intra-prediction mode for the current block. In this case, the encoding device can derive the optimal intra-prediction mode for the current block based on intra-prediction modes that include two non-directional intra-prediction modes and 65 intra-directional prediction modes. Alternatively, the encoding device can 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, if the number of candidates in the MPM list is 6, the MPM candidates include planar modes and candidate intra-prediction modes, and if the number of candidates in the MPM list is 5, 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 device can use the candidate intra-prediction modes included in the MPM list to derive the optimal intra-prediction mode for the current block. That is, in this case, the intra-prediction mode for the current block can only be determined from 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 device will not encode / signalize the MPM flag information. In this case, if the MPM flag information is not encoded / signalized, the value of the MPM flag information can be induced to be 1. As mentioned above, the MPM flag information can be represented in the form of the intra_luma_mpm_flag syntax element. For example, a value of intra_luma_mpm_flag of 1 indicates that the current block's intra prediction mode is selected from among the MPM candidate intra prediction modes (candidate intra prediction mode and / or planar mode), while a value of intra_luma_mpm_flag of 0 indicates that the current block's intra prediction mode is not selected from among the MPM candidate intra prediction modes (candidate intra prediction mode and / or planar mode).
[0149] The encoding device can generate MPM index information that indicates the intra-prediction mode for the current block from among the candidate intra-prediction modes included in the MPM list (S1420).
[0150] As one embodiment, 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 encoding device can generate an index value that indicates one of the candidate intra prediction modes in the MPM list and encode it with MPM index information. That is, 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 can be encoded / signaled.
[0151] For example, if the current block's intra-prediction mode is derived as a DC mode included in the MPM list, the MPM index information can be generated as an index value that points to the DC mode among the candidate intra-prediction modes included in the MPM list. In this case, if the DC mode is included first in the MPM list, the MPM index information can be encoded with an index value of 0. Alternatively, if the DC mode is included last in the MPM list, the MPM index information can be encoded with an index value n depending on the number of candidates in the MPM list (for example, n is 5 if there are 6 candidates, or n is 4 if there are 5 candidates).
[0152] Furthermore, the encoding device can perform intra-prediction based on the intra-prediction mode determined for the current block and generate prediction samples 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 device can derive adjacent reference samples to be 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 the DC value for the current block based on the adjacent reference samples, and generate prediction samples based on the DC value. In this case, the process of deriving adjacent reference samples can be applied to the various embodiments described above, which are explained in detail with reference to Figures 12 and 13.
[0153] In one embodiment, if the current block is a square block, the encoding device can derive adjacent reference samples including the left reference sample and the upper reference sample of the current block. In this case, the encoding device can derive adjacent reference samples based on reference line index information. For example, in this case, adjacent reference samples may include the left reference line (i.e., the left reference sample located at a distance of 0, 1, 2, or 3 samples) and the upper reference line (i.e., the 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 its width is greater than its height, the encoding device can derive adjacent reference samples by including the upper reference samples of the current block. For example, the upper reference samples may contain the same number of reference samples as the width of the current block. Another example is that the upper reference samples may contain the same number of reference samples as the left reference samples. Yet another example is that the upper reference samples may include approximately the same number of odd-numbered or even-numbered samples from the upper reference samples of the current block as the left reference samples. In this case, the encoding device can also derive adjacent reference samples based on reference line index information. For example, in this case, adjacent reference samples may include the upper reference lines indicated by the reference line index information (i.e., upper reference samples located at a distance of 0, 1, 2, or 3 samples).
[0155] Alternatively, if the current block is a non-square block and its width is less than its height, the encoding device can derive adjacent reference samples by including the left reference samples of the current block. For example, the left reference samples may contain the same number of reference samples as the height of the current block. Another example is that the left reference samples may contain the same number of reference samples as the upper reference samples. Yet another example is that the left reference samples may contain approximately the same number of samples as the upper reference samples by sampling the odd-numbered or even-numbered left reference samples of the current block. In this case, the encoding device can also derive adjacent reference samples based on reference line index information. For example, in this case, adjacent reference samples may include the left reference lines indicated by the reference line index information (i.e., left reference samples located at a distance of 0, 1, 2, or 3 samples).
[0156] Furthermore, the encoding device can derive a residual sample for the current block based on the predicted sample and the original sample of the current block. The encoding device can then generate residual information for the current block based on the residual sample and encode the video information containing the residual information. Here, the residual information may include information such as the values of the quantized conversion coefficients derived by performing conversion and quantization on the residual sample, position information, conversion technique, conversion kernel, and quantization parameters.
[0157] The encoding device can encode video information that includes at least one of the following: reference line index information or MPM index information (S1430).
[0158] As one embodiment, the encoding device can encode video information including reference line index information determined based on whether or not to apply intra-prediction of a multiple reference line base, and intra-prediction mode information of the current block derived based on the MPM list (e.g., MPM index information), and output it as a bitstream. The encoding device can also further derive and encode residual information, and output this in bitstream format.
[0159] The bitstream can be transmitted to a decoding device via a network or (digital) storage medium. Here, the network may include broadcast networks and / or communication networks, and the digital storage medium may include a variety of storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
[0160] The process of generating predicted samples for the current block described above can be performed by the intra-prediction unit 222 of the encoding device 200 disclosed in Figure 2, the process of deriving residual samples can be performed by the subtraction unit 231 of the encoding device 200 disclosed in Figure 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 device 200 disclosed in Figure 2.
[0161] Figure 15 is a schematic flowchart illustrating a decoding method that can be performed by a decoding device according to one embodiment of this document.
[0162] The method disclosed in Figure 15 can be performed by the decoding device 300 disclosed in Figure 3. Specifically, steps S1500 to S1520 in Figure 15 can be performed by the prediction unit 330 (specifically, the intra-prediction unit 331) disclosed in Figure 3, and step S1530 in Figure 15 can be performed by the residual processing unit 320 and / or adder 340 disclosed in Figure 3. Furthermore, the method disclosed in Figure 15 may include embodiments detailed in this document. Therefore, in Figure 15, specific explanations that overlap with the embodiments described above are omitted or simplified.
[0163] Referring to Figure 15, the decoding device can configure an MPM (Most Probable Mode) list that includes candidate intra-prediction modes for the current block (S1500).
[0164] As one embodiment, the decoding device can derive a left-side mode, which is a candidate intra-prediction mode for the left-side adjacent block of the current block, and an upper-side mode, which is a candidate intra-prediction mode for the upper-side adjacent block of the current block. Here, the left-side adjacent block can refer to the lowermost adjacent block among the left-side adjacent blocks located adjacent to the left of the current block, and the upper-side adjacent block can refer to the rightmost adjacent block among the upper-side adjacent blocks located adjacent to the upper 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, then the left-side adjacent block is the block containing the sample at coordinates (xN-1, yN+H-1), and the upper-side adjacent block is the block containing the sample at coordinates (xN+W-1, yN-1).
[0165] For example, if the left adjacent block is available and intraprediction is applied to the left adjacent block, the decoding device can derive the intraprediction mode of the left adjacent block as the left candidate intraprediction mode (i.e., the left mode). The decoding device can derive the intra-prediction mode of the upper adjacent block as the upper candidate intra-prediction mode (i.e., the upper mode) if the upper adjacent block is available, intra-prediction is applied to the upper adjacent block, and the upper adjacent block is currently included in the CTU. Alternatively, the decoding device can derive the planar mode as the left mode if the left adjacent block is unavailable or intra-prediction is not applied to the left adjacent block. The decoding device can derive the planar mode as the upper mode if the upper adjacent block is unavailable, intra-prediction is not applied to the upper adjacent block, or the upper adjacent block is currently not included in the CTU.
[0166] The decoding device can derive candidate intra-prediction modes for the current block and construct an MPM list based on the left-side mode derived from the left-side adjacent block and the upper-side mode derived from the upper-side adjacent block. In this case, the MPM list may include the left-side mode and the upper-side mode, and may further include specific intra-prediction modes in a predetermined manner.
[0167] As one embodiment, the decoding device can determine whether to perform intra-prediction by applying multiple reference lines to the current block, and the determination can derive a specific intra-prediction mode and include it in the MPM list. That is, the decoding device can determine whether to perform intra-prediction by obtaining reference line index information and applying multiple reference lines to the current block. The reference line index information may include an index value indicating the reference line to be used for intra-prediction of the current block, and can be signaled, for example, in the form of the intra_luma_ref_idx syntax element described above. If the value of intra_luma_ref_idx is 0, it can indicate that intra-prediction will be performed using the reference sample closest to the current block (i.e., located at a distance of 0 samples). If the value of intra_luma_ref_idx is 1, it can indicate that intra-prediction will be performed using the reference sample second closest to the current block (i.e., located at a distance of 1 sample). If the value of intra_luma_ref_idx is 2, it can indicate that intra-prediction will be performed using the reference sample third or fourth closest to the current block (i.e., located at a distance of 2 or 3 samples).
[0168] For example, if the value of the reference line index information is not 0, the decoding device can derive a DC mode as one of the candidate intra-prediction modes, and can include the derived DC mode in the MPM list. In this case, the DC mode can be positioned in any order within the MPM list. Alternatively, the DC mode can be included in the MPM list in the first or last position, taking into account its frequency of occurrence.
[0169] The decoding device 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, a decoding device can obtain intra-prediction mode information for the current block from a bitstream. The intra-prediction mode information is information for indicating the intra-prediction mode of the current block and may include MPM flag information, MPM index information, and remaining mode information.
[0171] In this case, if the value of the reference line index information is not 0, the MPM flag information is not signaled by the encoding device. When the MPM flag information is not signaled in this way, the decoding device can guide the value of the MPM flag information to 1. As mentioned above, the MPM flag information can be signaled in the form of the 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 indicates 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 can include candidate intra prediction modes and / or planar modes depending on the number of candidates in the MPM list. For example, if the MPM list has 6 candidates, the MPM candidates include planar mode and candidate intra-prediction mode. If the MPM list has 5 candidates, the MPM candidates include candidate intra-prediction mode.
[0172] Furthermore, 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 can be signaled by the encoding device. That is, the decoding device can obtain the MPM index information from the bitstream and decode it. As mentioned above, the MPM index information includes an index value that indicates the intra prediction mode for the current block from among the candidate intra prediction modes included in the MPM list, and can be represented, for example, in the form of an intra_luma_mpm_idx syntax element.
[0173] In other words, 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 decoding device can acquire and decode the MPM index information and derive the intra-prediction mode of the current block from the MPM list based on this.
[0174] For example, if the MPM index information indicates the DC mode among the candidate intra-prediction modes included in the MPM list, the decoding device can derive the DC mode as the intra-prediction mode for the current block. In this case, if the DC mode is included first in the MPM list, the MPM index information can be encoded and signaled with an index value of 0. Alternatively, if the DC mode is included last in the MPM list, the MPM index information can be encoded and signaled with an index value n depending on the number of candidates in the MPM list (for example, n is 5 if there are 6 candidates, or n is 4 if there are 5 candidates).
[0175] The decoding device can generate a prediction sample for the current block based on the intra prediction mode (S1520).
[0176] For example, if the current block's intra-prediction mode is derived as a DC mode included in the MPM list, the decoding device can derive adjacent reference samples to be used for the current block's DC mode based on whether the current block is a square block or a non-square block, calculate the DC value for the current block based on the adjacent reference samples, and generate prediction samples based on the DC value. In this case, the process of deriving adjacent reference samples can be applied to the various embodiments described above, which are explained in detail with reference to Figures 12 and 13.
[0177] In one embodiment, if the current block is a square block, the decoding device can derive adjacent reference samples including the left reference sample and the upper reference sample of the current block. In this case, the decoding device can derive adjacent reference samples based on reference line index information. For example, in this case, adjacent reference samples may include the left reference line (i.e., the left reference sample located at a distance of 0, 1, 2, or 3 samples) and the upper reference line (i.e., the 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 its width is greater than its height, the decoding device can derive adjacent reference samples by including the upper reference samples of the current block. For example, the upper reference samples may contain the same number of reference samples as the width of the current block. Another example is that the upper reference samples may contain the same number of reference samples as the left reference samples. Yet another example is that the upper reference samples may include approximately the same number of samples as the left reference samples by sampling the odd-numbered or even-numbered samples from the upper reference samples of the current block. In this case, the decoding device can derive adjacent reference samples based on the reference line index information. For example, in this case, adjacent reference samples may include upper reference lines indicated by the reference line index information (i.e., upper reference samples located at a distance of 0, 1, 2, or 3 samples).
[0179] Alternatively, if the current block is a non-square block and its width is less than its height, the decoding device can derive adjacent reference samples by including the left reference samples of the current block. For example, the left reference samples may contain the same number of reference samples as the height of the current block. Another example is that the left reference samples may contain the same number of reference samples as the upper reference samples. Yet another example is that the left reference samples may contain approximately the same number of odd-numbered or even-numbered samples from the left reference samples of the current block as the upper reference samples. In this case, the decoding device can also derive adjacent reference samples based on the reference line index information. For example, in this case, adjacent reference samples may include the left reference lines indicated by the reference line index information (i.e., left reference samples located at a distance of 0, 1, 2, or 3 samples).
[0180] The decoding device can generate a reconstructed picture for the current block based on the predicted sample (S1530).
[0181] In one embodiment, the decoding device can use the predicted sample as the reconstructed sample in prediction mode, or it can generate a reconstructed sample by adding a residual sample to the predicted sample.
[0182] The decoding device can receive information about the residual for the current block if a residual sample exists for the current block. The information about the residual may include conversion factors for the residual sample. Based on the residual information, the decoding device can derive a residual sample (or a residual sample array) for the current block. Based on the predicted sample and the residual sample, the decoding device can generate a reconstructed sample, and based on the reconstructed sample, can derive a reconstructed block or reconstructed picture. Thereafter, as described above, the decoding device may apply deblocking filtering and / or in-loop filtering procedures such as the SAO procedure to the reconstructed picture to improve subjective / objective image quality as needed.
[0183] In the embodiments described above, the method is explained based on a flowchart in a series of steps or blocks. However, the embodiments in this document are not limited to the order of the steps, and some steps may occur with other steps, in a different order, or simultaneously. Furthermore, those skilled in the art will understand that the steps shown in the flowchart are not exclusive, other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of this document.
[0184] The method described in this document above can be implemented in software form, and the encoding and / or decoding devices described in this document can be included in devices that perform video processing, such as TVs, computers, smartphones, set-top boxes, and display devices.
[0185] In this document, when embodiments are embodied in software, the methods described above can be embodied in modules (processes, functions, etc.) that perform the functions described above. These modules are stored in memory and can be executed by a processor. The memory may be internal or external to the processor and may be connected to the processor by a variety of well-known means. The processor may include an ASIC (application-specific integrated circuit), other chipsets, logic circuits, and / or data processing devices. The memory may include ROM (read-only memory), RAM (random access memory), flash memory, memory cards, storage media, and / or other storage devices. In other words, the embodiments described in this document can be embodied and executed on a processor, microprocessor, controller, or chip. For example, the functional units shown in each drawing can be embodied and executed on a computer, processor, microprocessor, controller, or chip. In this case, information on instructions or algorithms for implementation can be stored on a digital storage medium.
[0186] Furthermore, decoding and encoding devices to which this document applies may include multimedia broadcasting transceivers, mobile communication terminals, home cinema video equipment, digital cinema video equipment, surveillance cameras, video interaction devices, real-time communication devices such as video communications, mobile streaming devices, storage media, camcorders, video-on-demand (VoD) service providers, over-the-top (OTT) video equipment, internet streaming service providers, 3D video equipment, virtual reality (VR) equipment, argumentative reality (AR) equipment, image-phone video equipment, transportation terminals (e.g., vehicle terminals (including autonomous vehicles), airplane terminals, ship terminals, etc.), and medical video equipment, and may be used to process video signals or data signals. For example, over-the-top (OTT) video equipment may include game consoles, Blu-ray players, internet-connected TVs, home theater systems, smartphones, tablet PCs, and digital video recorders (DVRs).
[0187] Furthermore, the processing methods to which this document applies can be produced in the form of programs executed on a computer and stored on a computer-readable recording medium. Multimedia data having the data structure described in this document can also be stored on a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices that store data readable by a computer. The computer-readable recording medium can include, for example, Blu-ray discs (BDs), general-purpose serial buses (USB), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. The computer-readable recording medium also includes media embodied in the form of carrier waves (e.g., transmission over the Internet). Furthermore, bitstreams generated by encoding methods can be stored on a computer-readable recording medium or transmitted over a wireless network.
[0188] Furthermore, the embodiments described in this document can be embodied in a computer program product using program code, and the program code can be executed on a computer according to the embodiments described in this document. The program code can be stored on a computer-readable carrier.
[0189] Figure 16 shows an example of a content streaming system to which the embodiments disclosed in this document can be applied.
[0190] Referring to Figure 16, the content streaming system applicable to the embodiments of this document may broadly include an encoding server, a streaming server, a web server, a media storage facility, user equipment, and multimedia input devices.
[0191] The encoding server is responsible for compressing content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data to generate a bitstream, and then transmitting this bitstream to the streaming server. In other cases, if a multimedia input device such as a smartphone, camera, or camcorder directly generates the bitstream, the encoding server may be omitted.
[0192] The bitstream can be generated by an encoding method or bitstream generation method applicable to the embodiments of this document, and the streaming server can temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0193] The streaming server transmits multimedia data to user devices based on user requests via a web server, and the web server acts as an intermediary to inform users about available services. When a user requests a desired service from the web server, the web server transmits this 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, in which case the control server controls the commands and responses between the devices within the content streaming system.
[0194] The streaming server can receive content from a media storage and / or encoding server. For example, if it starts receiving content from the encoding server, it can receive the content in real time. In this case, in order to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time.
[0195] Examples of user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, PDAs (personal digital assistants), PMPs (portable multimedia players), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (such as smartwatches, smart glasses, HMDs (head-mounted displays)), digital TVs, desktop computers, and digital signage.
[0196] Each server within the aforementioned content streaming system can be operated as a distributed server, in which case the data received by each server can be processed in a distributed manner.
Claims
1. In a video decoding method performed by a decoding device, Currently, we are configuring an MPM (Most Probable Mode) list that includes candidate intra-prediction modes for the block, Based on the MPM index information that indicates the intra-prediction mode of the current block from among the candidate intra-prediction modes included in the MPM list, the intra-prediction mode of the current block is derived from the MPM list. To generate prediction samples for the current block based on the intra prediction mode, and This includes generating a restored picture based on the aforementioned predicted sample, Based on the fact that the value of the reference line index information indicating the reference line used for intra-prediction of the current block is not equal to 0, the value of the MPM flag information indicating whether the intra-prediction mode of the current block is selected from the candidate intra-prediction modes is derived to 1. Constructing the MPM list involves deriving the DC mode as one of the candidate intra-prediction modes in order to include the DC mode in the MPM list based on the fact that the value of the reference line index information is not equal to 0. The DC mode is on the first order of the MPM list, Based on the MPM flag information and the MPM index information indicating the DC mode among the candidate intra-prediction modes included in the MPM list, the DC mode is derived as the intra-prediction mode of the current block. Based on the fact that the value of the aforementioned reference line index information is not equal to 0, the reference line n is used to generate the predicted sample of the current block, where n is greater than 0. To generate prediction samples for the current block, The DC value for the current block is calculated using a specific reference sample among the reference samples in the reference line n of the current block, wherein the reference sample includes the left reference sample and the upper reference sample within the reference line n of the current block. The predicted sample is derived based on the DC value, Includes, The aforementioned specific reference sample is determined based on whether the current block is a square block or a non-square block. Based on the fact that the current block is the square block, the specific reference sample used to calculate the DC value includes 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 and does not include the left 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 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 and does not include the upper reference sample in the reference line n. A video decoding method characterized by the following features.
2. In a video encoding method performed by an encoding device, Deciding whether intra-prediction is currently applied to the block, This involves configuring an MPM (Most Probable Mode) list that includes candidate intra-prediction modes for the current block, The intra-prediction mode of the current block is derived based on the candidate intra-prediction modes included in the MPM list, To generate MPM index information that indicates the intra-prediction mode of the current block among the candidate intra-prediction modes included in the MPM list, Based on the intra prediction mode, generate prediction samples for the current block, and This includes encoding video information that includes at least one of the following: reference line index information indicating a reference line used for intra prediction of the current block and the MPM index information. Based on the fact that the value of the reference line index information is not equal to 0, the value of the MPM flag information indicating whether the intra prediction mode of the current block is selected from the candidate intra prediction modes is derived to 1. Constructing the MPM list involves deriving the DC mode as one of the candidate intra-prediction modes in order to include the DC mode in the MPM list based on the fact that the value of the reference line index information is not equal to 0. The DC mode is on the first order of the MPM list, Based on the fact that the intra prediction mode of the current block is derived as the DC mode included in 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 fact that the value of the reference line index information is not equal to 0, the reference line n is used to generate the predicted sample of the current block, and n is greater than 0. To generate prediction samples for the current block, Based on the application of the DC mode to the current block, the DC value for the current block is calculated using a specific reference sample among the reference samples in the reference line n of the current block, wherein the reference sample includes the left reference sample and the upper reference sample in the reference line n of the current block. The predicted sample is derived based on the DC value, Includes, The aforementioned specific reference sample is determined based on whether the current block is a square block or a non-square block. Based on the fact that the current block is the square block, the specific reference sample used to calculate the DC value includes 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 and does not include the left 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 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 and does not include the upper reference sample in the reference line n. A video encoding method characterized by the following features.
3. A non-temporary computer-readable digital storage medium, wherein a computer program and a bitstream are stored in the non-temporary computer-readable digital storage medium, and when the computer program is executed by a processor, a video encoding method is implemented to generate the bitstream, and the video encoding method is Deciding whether intra-prediction is currently applied to the block, This involves configuring an MPM (Most Probable Mode) list that includes candidate intra-prediction modes for the current block, The intra-prediction mode of the current block is derived based on the candidate intra-prediction modes included in the MPM list, To generate MPM index information that indicates the intra-prediction mode of the current block among the candidate intra-prediction modes included in the MPM list, Based on the intra prediction mode, generate prediction samples for the current block, and This includes encoding video information that includes at least one of the following: reference line index information indicating a reference line used for intra prediction of the current block and the MPM index information. Based on the fact that the value of the reference line index information is not equal to 0, the value of the MPM flag information indicating whether the intra prediction mode of the current block is selected from the candidate intra prediction modes is derived to 1. Constructing the MPM list involves deriving the DC mode as one of the candidate intra-prediction modes in order to include the DC mode in the MPM list based on the fact that the value of the reference line index information is not equal to 0. The DC mode is on the first order of the MPM list, Based on the fact that the intra prediction mode of the current block is derived as the DC mode included in 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 fact that the value of the reference line index information is not equal to 0, the reference line n is used to generate the predicted sample of the current block, and n is greater than 0. To generate prediction samples for the current block, Based on the application of the DC mode to the current block, the DC value for the current block is calculated using a specific reference sample among the reference samples in the reference line n of the current block, wherein the reference sample includes the left reference sample and the upper reference sample in the reference line n of the current block. The predicted sample is derived based on the DC value, Includes, The aforementioned specific reference sample is determined based on whether the current block is a square block or a non-square block. Based on the fact that the current block is the square block, the specific reference sample used to calculate the DC value includes 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 and does not include the left 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 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 and does not include the upper reference sample in the reference line n. A non-temporarily accessible, computer-readable digital storage medium characterized by the following features.