Image coding method and apparatus for performing mrl-based intra prediction

By constructing a list of the most likely modes, including DC modes, and utilizing multi-reference line intra-frame prediction, the problem of low compression efficiency for high-resolution, high-quality images/videos is solved, achieving more efficient image/video compilation.

CN117201772BActive Publication Date: 2025-10-21GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311238635.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-01-13
Filing Date
2020-01-13
Publication Date
2025-10-21
Estimated Expiration
2040-01-13

AI Technical Summary

Technical Problem

Existing technologies are inefficient in high-resolution, high-quality image/video compression and cannot effectively utilize intra-frame prediction with multiple reference lines, leading to increased transmission and storage costs.

Method used

Construct a list of the most likely modes, including DC mode, derive the intra-prediction mode of the current block through multi-reference line intra-prediction, and encode reference line index information during the encoding process to improve prediction accuracy.

Benefits of technology

It improves image/video compression efficiency, reduces computational complexity, enhances prediction performance, and improves overall compilation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117201772B_ABST
    Figure CN117201772B_ABST
Patent Text Reader

Abstract

The disclosure relates to an image encoding method and apparatus for performing MRL-based intra prediction, an image decoding method including the steps of: configuring an MPM list including candidate intra prediction modes for a current block; deriving an intra prediction mode of the current block from the MPM list based on MPM index information indicating the intra prediction mode among the candidate intra prediction modes included in the MPM list for the current block; generating a prediction sample for the current block based on the intra prediction mode; and generating a reconstructed picture for the current block based on the prediction sample, wherein the step of configuring the MPM list includes, in a case where a value of reference line index information representing a reference line for intra prediction of the current block is not zero, deriving a DC mode as one mode among the candidate intra prediction modes and including the same in the MPM list.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application of the patent application with application number 202080012772.0 (PCT / KR2020 / 000570) submitted to the China Patent Office on August 5, 2021, with an international application date of January 13, 2020, and the invention name is “Image coding method and device for performing MRL-based intra-frame prediction”. Technical Field

[0002] The present disclosure relates to image coding technology, and more particularly, to a method and apparatus for performing multi-reference line (MRL)-based intra prediction. Background Art

[0003] Recently, there has been an increasing demand for high-resolution, high-quality images / videos, such as 4K or 8K ultra-high-definition (UHD) images / videos, in various fields. As image / video resolution or quality becomes higher, relatively more information or bits are transmitted compared to conventional image / video data. Therefore, if image / video data is transmitted via a medium such as an existing wired / wireless broadband line or stored in a conventional storage medium, the cost of transmission and storage is likely to increase.

[0004] In addition, there is growing interest and demand for virtual reality (VR) and artificial reality (AR) content, as well as immersive media such as holograms; and there is also growing broadcasting of images / videos that exhibit image / video characteristics that are different from actual images / videos (e.g., game images / videos).

[0005] Therefore, highly efficient image / video compression technology is required to effectively compress and transmit, store, or play high-resolution, high-quality images / videos exhibiting various characteristics as described above. Summary of the Invention

[0006] Technical issues

[0007] The technical purpose of the present disclosure is to provide a method and device for improving image coding efficiency.

[0008] Another technical objective of the present disclosure is to provide an efficient intra-frame prediction method and device.

[0009] Yet another technical objective of the present disclosure is to provide a method and apparatus for applying a DC mode to multi-reference line (MRL)-based intra prediction and constructing a most probable mode (MPM) list including the DC mode.

[0010] Technical Solution

[0011] According to one embodiment of the present disclosure, an image decoding method performed by a decoding device is provided. The method includes: constructing a most probable mode (MPM) list for a current block including candidate intra-frame prediction modes; deriving an intra-frame prediction mode of the current block from the MPM list based on MPM index information indicating the intra-frame prediction mode of the current block among the candidate intra-frame prediction modes included in the MPM list; generating a prediction sample for the current block based on the intra-frame prediction mode; and generating a reconstructed picture for the current block based on the prediction sample, wherein constructing the MPM list includes deriving a DC mode as one of the candidate intra-frame prediction modes based on a case where the value of reference line index information indicating a reference line used for intra-frame prediction of the current block is not equal to 0 to include the DC mode in the MPM list.

[0012] According to another embodiment of the present disclosure, an image encoding method performed by an encoding device is provided. The method includes: constructing a most probable mode (MPM) list including candidate intra-frame prediction modes for a current block; deriving an intra-frame prediction mode of the current block based on the candidate intra-frame prediction modes included in the MPM list; generating MPM index information indicating the intra-frame prediction mode of the current block among the candidate intra-frame prediction modes included in the MPM list; and encoding image information including at least one of reference line index information indicating a reference line for intra-frame prediction of the current block or MPM index information, wherein constructing the MPM list includes deriving a DC mode as one of the candidate intra-frame prediction modes based on a case where a value of the reference line index information is not equal to 0 to include the DC mode in the MPM list.

[0013] According to yet another embodiment of the present disclosure, there is provided a computer-readable digital storage medium storing encoded image information, the computer-readable digital storage medium enabling the image decoding method disclosed in claim 1 to be executed.

[0014] Beneficial effects

[0015] According to the present disclosure, overall image / video compression efficiency may be improved.

[0016] According to the present disclosure, computational complexity can be reduced and prediction performance can be improved through efficient intra prediction, thereby improving overall coding efficiency.

[0017] According to the present disclosure, by constructing an MPM list including a DC mode for MRL-based intra prediction and performing DC mode intra prediction using the MRL, prediction accuracy may be increased, thereby improving overall coding efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 An example of a video / image coding system to which embodiments of this document are applicable is illustrated.

[0019] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device to which the embodiments of this document are applicable.

[0020] Figure 3 : is a diagram for schematically explaining the configuration of a video / image decoding device to which the present disclosure is applied.

[0021] Figure 4 An example of an intra-frame prediction-based image encoding method to which the embodiments of the present disclosure are applicable is illustrated, and Figure 5 The diagram illustrates an intra-frame predictor in an encoding device.

[0022] Figure 6 An example of an intra-frame prediction-based image decoding method to which the embodiments of the present disclosure are applicable is illustrated, and Figure 7 The diagram illustrates an intra-frame predictor in a decoding device.

[0023] Figure 8 An example of an intra prediction method based on an MPM mode of an encoding device to which embodiments of the present disclosure are applicable is illustrated.

[0024] Figure 9 An example of an intra prediction method based on the MPM mode in a decoding device to which embodiments of the present disclosure are applicable is illustrated.

[0025] Figure 10 An example of an intra prediction mode to which the embodiments of the present disclosure are applicable is illustrated.

[0026] Figure 11 An example of reference sample lines used for intra prediction using multiple reference lines is illustrated.

[0027] Figure 12 One embodiment of a method for deriving prediction samples in DC mode is illustrated.

[0028] Figure 13 Another embodiment of a method for deriving prediction samples in DC mode is illustrated.

[0029] Figure 14 is a flowchart illustrating an encoding method that can be performed by an encoding device according to one embodiment of the present disclosure.

[0030] Figure 15 is a flowchart illustrating a decoding method that may be performed by a decoding device according to one embodiment of the present disclosure.

[0031] Figure 16 An example of a content streaming system to which embodiments of the present disclosure are applicable is illustrated. DETAILED DESCRIPTION

[0032] The present disclosure can be modified in various forms, and its specific embodiments will be described and illustrated in the accompanying drawings. However, these embodiments are not intended to limit the present disclosure. The terms used in the following description are only used to describe specific embodiments and are not intended to limit the present disclosure. Singular expressions include plural expressions as long as they are clearly interpreted differently. Terms such as "including" and "having" are intended to indicate the presence of features, quantities, steps, operations, elements, components, or combinations thereof used in the following description, so it should be understood that the possibility of the presence or addition of one or more different features, quantities, steps, operations, elements, components, or combinations thereof is not excluded.

[0033] In addition, the various configurations of the drawings described in this document are independent diagrams for the purpose of illustrating the functions of different features, and do not mean that the various configurations are implemented by different hardware or different software. For example, two or more configurations can be combined to form a single configuration, and a single configuration can also be divided into multiple configurations. Without departing from the main purpose of this document, embodiments in which the configurations are combined and / or separated are included within the scope of the claims.

[0034] Hereinafter, an example of the present embodiment will be described in detail with reference to the accompanying drawings. In addition, like reference numerals are used throughout the drawings to indicate like elements, and the same description of the like elements will be omitted.

[0035] This document relates to video / image coding. For example, the methods / implementations disclosed herein may be applied to methods disclosed in the Versatile Video Coding (VVC), Essential Video Coding (EVC) standard, AOMedia Video 1 (AV1), Audio Video Coding Standard 2 (AVS2), or next-generation video / image coding standards (e.g., H.267, H.268, etc.).

[0036] Various embodiments of video / image coding are proposed herein, and unless otherwise specified, the above embodiments may also be performed in combination with each other.

[0037] In this document, video may refer to a series of images over time. A picture generally refers to a unit representing an image at a specific time frame, and a slice / tile refers to a unit that constitutes a portion of a picture when compiled. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A tile may represent a rectangular area of ​​a CTU row within a tile in a picture (a tile may represent a rectangular area of ​​a CTU row within a tile in a picture). A tile may be divided into multiple tiles, each of which may be constructed using one or more CTU rows within the tile (a tile may be divided into multiple tiles, each of which may be composed of one or more CTU rows within the tile). A tile that is not divided into multiple tiles may also be referred to as a tile. Tile scanning may refer to a specific sequential ordering of CTUs that partition a picture, wherein the CTUs may be ordered in a CTU raster scan within the tile, and the tiles within a patch may be ordered contiguously in a raster scan of the tiles of the patch, and the tiles in the picture may be ordered contiguously in a raster scan of the tiles of the patch. (Tile scanning is a specific sequential ordering of CTUs that partition a picture, wherein the CTUs may be ordered contiguously in a CTU raster scan within the tile, the tiles within the patch may be ordered contiguously in a raster scan of the tiles of the patch, and the tiles in the picture may be ordered contiguously in a raster scan of the tiles of the picture.) A tile is a rectangular area of ​​CTUs within a specific tile column and a specific tile column. (A tile is a rectangular area of ​​CTUs within a specific tile column and a specific tile row in a picture.) A tile column is a rectangular area of ​​CTUs whose height is equal to the height of the picture and whose width may be specified by a syntax element in a picture parameter set. (A tile column is a rectangular area of ​​CTUs whose height is equal to the height of the picture and whose width may be specified by a syntax element in a picture parameter set.) A tile row is a rectangular region of CTUs whose width is specified by a syntax element in a picture parameter set and whose height may be equal to the height of the picture (a tile row is a rectangular region of CTUs whose height is specified by a syntax element in a picture parameter set and whose width is equal to the width of the picture). Patch scan may represent a specific sequential ordering of CTUs that partition a picture, and CTUs may be ordered contiguously in a raster scan of CTUs within a patch, while patches within a picture may be ordered contiguously in a raster scan of patches of a picture (patch scan is a specific sequential ordering of CTUs that partition a picture, where CTUs may be ordered contiguously in a raster scan of CTUs within a patch, while patches within a picture may be ordered contiguously in a raster scan of patches of a picture). A slice may include an integer number of tiles of a picture, and may include an integer number of tiles in a single NAL unit (a slice includes an integer number of tiles of a picture that may be exclusively included in a single NAL unit).A slice can be constructed from multiple complete tiles, or can be a continuous sequence of complete tiles of a tile (a slice can be composed of multiple complete tiles or a continuous sequence of complete tiles of just one tile). In this document, tile group and slice can be used interchangeably. For example, in this document, a tile group / tile group header can be referred to as a slice / slice header.

[0038] A pixel or picture element (pel) may refer to the smallest unit constituting a picture (or image). In addition, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only the pixel / pixel value of the luma component or only the pixel / pixel value of the chroma component.

[0039] A unit may represent a basic unit of image processing. A unit may include at least one of a specific area of ​​a picture and information related to the area. A unit may include a luminance block and two chrominance (e.g., cb, cr) blocks. In some cases, a unit may be used interchangeably with terms such as block or area. In general, an M×N block may include M columns and N rows of samples (or sample arrays) or a set (or array) of transform coefficients. Alternatively, a sample may refer to a pixel value in the spatial domain, and when such a pixel value is transformed into the frequency domain, it may refer to a transform coefficient in the frequency domain.

[0040] As used herein, the symbols “ / ” and “,” should be interpreted as indicating “and / or”. For example, the expression “A / B” is interpreted as “A and / or B”, and the expression “A, B” is interpreted as “A and / or B”. Additionally, the expression “A / B / C” means “at least one of A, B, and / or C”. Furthermore, the expression “A, B, C” also means “at least one of A, B, and / or C”. (As used herein, the terms “ / ” and “,” should be interpreted as indicating “and / or”. For example, the expression “A / B” may mean “A and / or B”. Additionally, “A, B” may mean “A and / or B”. Additionally, “A / B / C” may mean “at least one of A, B, and / or C”. Additionally, “A / B / C” may mean “at least one of A, B, and / or C”.)

[0041] Additionally, in this document, the term "or" should be interpreted as meaning "and / or". For example, the expression "A or B" may mean 1) only "A", 2) only "B", and / or 3) "both A and B". In other words, the term "or" herein may mean "additionally or alternatively". (Additionally, in this document, the term "or" should be interpreted as meaning "and / or". For example, the expression "A or B" may include 1) only A, 2) only B, and / or 3) both A and B. In other words, the term "or" herein should be interpreted as meaning "additionally or alternatively".)

[0042] Figure 1An example of a video / image coding system to which embodiments of this document are applicable is illustrated.

[0043] Reference Figure 1 The video / image coding system may include a source device and a receiving device. The source device may transmit the encoded video / image information or data in the form of a file or stream to the receiving device via a digital storage medium or a network.

[0044] 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 referred to as a video / image encoding device, and the decoding device may be referred to as 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, and the display may be configured as a separate device or an external component.

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

[0046] An encoding device encodes input video / images. For compression and coding efficiency, the encoding device performs a series of processes such as prediction, transformation, and quantization. The encoded data (encoded video / image information) is output as a bitstream.

[0047] The transmitter can transmit the encoded image / image information or data, output as a bitstream, in the form of a file or stream to a receiver of a receiving device via a digital storage medium or network. Digital storage media may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitter may include components for generating a media file in a predetermined file format and may also include components for transmission via a broadcast / communication network. The receiver may receive / extract the bitstream and transmit the received bitstream to a decoding device.

[0048] The decoding device may decode a video / image by performing a series of processes corresponding to the operations of the encoding device, such as dequantization, inverse transformation, and prediction.

[0049] The renderer may render the decoded video / image, and the rendered video / image may be displayed on a display.

[0050] Figure 2 is a diagram schematically illustrating a configuration of a video / image encoding device to which the embodiments of this document are applicable. Hereinafter, the so-called video encoding device may include an image encoding device.

[0051] Reference Figure 2 , the encoding device 200 includes an image segmenter 210, a predictor 220, a residual processor 230 and an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter-frame predictor 221 and an intra-frame predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may also include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. According to an embodiment, the image segmenter 210, the predictor 220, the residual processor 230, the entropy encoder 240, the adder 250, and the filter 260 may be configured by at least one hardware component (e.g., an encoder chipset or processor). In addition, the memory 270 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware components may also include the memory 270 as an internal / external component.

[0052] The image splitter 210 may split the input image (or picture or frame) input to the encoding device 200 into one or more processors. For example, a processor may be referred to as a coding unit (CU). In this case, the coding unit may be recursively split from a coding tree unit (CTU) or a largest coding unit (LCU) based on a quadtree, binary tree, and / or ternary tree (QTBTTT) structure. For example, a coding unit may be split into multiple coding units of increasing depth based on a quadtree structure, a binary tree structure, and / or a ternary structure. In this case, for example, the quadtree structure may be applied first, followed by the binary tree structure and / or ternary structure. Alternatively, the binary tree structure may be applied first. The coding process according to the present disclosure may be performed based on the final coding unit that is no longer split. In this case, the largest coding unit may be used as the final coding unit based on image characteristics, coding efficiency, and the like. Alternatively, if necessary, the coding unit may be recursively split into coding units of increasing depth, and the coding unit of the optimal size may be used as the final coding unit. Here, the coding process may include prediction, transformation, and reconstruction processes (described later). As another example, the processor may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may be split or partitioned from the final coding unit. The prediction unit may be a unit for sample prediction, and the transform unit may be a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.

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

[0054] In the encoding device 200, a prediction signal (prediction block, prediction sample array) output from the inter predictor 221 or the intra predictor 222 is subtracted from an input image signal (original block, original sample array) to generate a residual signal (residual block, residual sample array), and the generated residual signal is transmitted to the transformer 232. In this case, as shown, the unit in the encoder 200 that subtracts the prediction signal (prediction block, prediction sample array) from the input image signal (original block, original sample array) may be referred to as a subtractor 231. The predictor may perform prediction on a block to be processed (hereinafter referred to as the current block) and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction based on the current block or CU. As described later in the description of each prediction mode, the predictor may generate various types of information related to the prediction (e.g., prediction mode information) and transmit the generated information to the entropy encoder 240. The information regarding the prediction may be encoded in the entropy encoder 240 and output in the form of a bitstream.

[0055] The intra-frame predictor 222 can predict the current block with reference to samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or may be spaced apart. In intra-frame prediction, the prediction mode may include multiple non-directional modes and multiple directional modes. For example, the non-directional mode may include a DC mode and a planar mode. For example, depending on the level of detail of the prediction direction, the directional mode may include 33 directional prediction modes or 65 directional prediction modes. However, this is merely an example, and more or fewer directional prediction modes may be used depending on the settings. The intra-frame predictor 222 may use the prediction mode applied to the neighboring blocks to determine the prediction mode applied to the current block.

[0056] The inter-frame predictor 221 can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector in a reference picture. To reduce the amount of motion information transmitted in inter-frame prediction mode, motion information can be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. It can also include information about the inter-frame prediction direction (e.g., L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter-frame prediction, neighboring blocks can include spatially neighboring blocks in the current picture and temporally neighboring blocks in the reference picture. The reference picture containing the reference block and the reference picture containing the temporally neighboring block can be the same or different. Temporally neighboring blocks can be referred to as collocated reference blocks, collocated CUs (colCUs), etc., and the reference picture containing temporally neighboring blocks can be referred to as collocated pictures (colPics). For example, the inter-frame predictor 221 can configure a motion information candidate list based on the neighboring blocks and generate information indicating which candidate is used to derive the motion vector and / or reference picture index for the current block. Inter-frame prediction can be performed based on various prediction modes. For example, in the case of skip mode and merge mode, the inter-frame predictor 221 can use the motion information of the neighboring block as the motion information of the current block. In skip mode, unlike merge mode, a residual signal may not be transmitted. In the case of motion vector prediction (MVP) mode, the motion vector of the neighboring block may be used as a motion vector predictor, and the motion vector of the current block may be indicated by signaling the motion vector difference.

[0057] The predictor 220 may generate a prediction signal based on various prediction methods described below. For example, the predictor may apply not only intra prediction or inter prediction to predict a block, but also both intra prediction and inter prediction simultaneously. This may be referred to as combined inter and intra prediction (CIIP). In addition, the predictor may predict a block based on an intra block copy (IBC) prediction mode or a palette mode. The IBC prediction mode or palette mode may be used for content image / video coding, such as screen content coding (SCC), for games and the like. IBC essentially performs prediction within the current picture, but may be performed similarly to inter prediction, such that a reference block is derived within the current picture. That is, IBC may use at least one of the inter prediction techniques described herein. The palette mode may be considered an example of intra coding or intra prediction. When the palette mode is applied, the sample values ​​within the picture may be signaled based on information about a palette table and a palette index.

[0058] The prediction signal generated by the predictor (including the inter-frame predictor 221 and / or the intra-frame predictor 222) can be used to generate a reconstruction signal or a residual signal. The transformer 232 can generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loève transform (KLT), a graph-based transform (GBT), or a conditional nonlinear transform (CNT). Here, when the relationship information between pixels is represented by a graph, GBT means a transform obtained from the graph. CNT refers to a transform generated based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process can be applied to square pixel blocks of the same size or to blocks of variable size other than square.

[0059] The quantizer 233 may quantize the transform coefficients and send them to the entropy encoder 240. The entropy encoder 240 may encode the quantized signal (information about the quantized transform coefficients) and output a bitstream. The information about the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the block-type quantized transform coefficients into a one-dimensional vector form based on the coefficient scanning order and generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. This information about the transform coefficients may be generated. The entropy encoder 240 may perform various encoding methods such as exponential Golomb coding, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoder 240 may encode information required for video / image reconstruction (e.g., syntax element values) in addition to the quantized transform coefficients, either together or separately. The encoded information (e.g., encoded video / image information) may be transmitted or stored in units of NALs (Network Abstraction Layers) in the form of a bitstream. The video / image information may also include information about various parameter sets, such as an adaptive parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). Additionally, the video / image information may include general constraint information. Herein, 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 may be encoded using the encoding process described above and included in the bitstream. The bitstream may be transmitted via a network or stored in a digital storage medium. The network may include a broadcast network and / or a communication network, and the digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitter (not shown) that transmits the signal output from the entropy encoder 240 and / or a storage unit (not shown) that stores the signal may be included as internal / external components of the encoding device 200, or alternatively, the transmitter may be included in the entropy encoder 240.

[0060] The quantized transform coefficients output from the quantizer 233 can be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) can be reconstructed by applying dequantization and inverse transformation to the quantized transform coefficients via the dequantizer 234 and the inverse transformer 235. The adder 250 adds the reconstructed residual signal to the prediction signal output from the inter-frame predictor 221 or the intra-frame predictor 222 to generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array). If there is no residual for the block to be processed (for example, when skip mode is applied), the prediction block can be used as a reconstructed block. The adder 250 can be referred to as a reconstructor or a reconstructed block generator. As described below, the generated reconstructed signal can be used for intra-frame prediction of the next block to be processed in the current picture and can be used for inter-frame prediction of the next picture through filtering.

[0061] Furthermore, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.

[0062] The filter 260 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 260 can generate a modified reconstructed picture by applying various filtering methods to the reconstructed picture and store the modified reconstructed picture in the memory 270 (specifically, the DPB of the memory 270). For example, the various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filter 260 can generate various types of information related to filtering and send the generated information to the entropy encoder 240, as described later in the description of each filtering method. The information related to filtering can be encoded by the entropy encoder 240 and output in the form of a bitstream.

[0063] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter predictor 221. When inter prediction is applied by the encoding apparatus, prediction mismatch between the encoding apparatus 200 and the decoding apparatus may be avoided and coding efficiency may be improved.

[0064] The DPB of the memory 270 DPB can store a modified reconstructed picture used as a reference picture in the inter-frame predictor 221. The memory 270 can store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a reconstructed block in the picture. The stored motion information can be sent to the inter-frame predictor 221 and used as motion information of a spatially neighboring block or motion information of a temporally neighboring block. The memory 270 can store reconstructed samples of a reconstructed block in the current picture and can transmit the reconstructed samples to the intra-frame predictor 222.

[0065] Figure 3 : is a diagram for schematically explaining the configuration of a video / image decoding device to which the present disclosure is applied.

[0066] Reference Figure 3 , the decoding device 300 may 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-frame predictor 331 and an intra-frame predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. According to an embodiment, the entropy decoding 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured by a hardware component (e.g., a decoder chipset or processor). In addition, the memory 360 may include a decoded picture buffer (DPB) or may be configured by a digital storage medium. The hardware component may also include the memory 360 as an internal / external component.

[0067] When a bit stream including video / image information is input, the decoding apparatus 300 can reconstruct the bit stream corresponding to the bit stream in FIG. Figure 2 The video / image information is processed in the encoding device of the processing corresponding to the image. For example, the decoding device 300 can derive the unit / block based on the block partition related information obtained from the bitstream. The decoding device 300 can use the processor applied in the encoding device to perform decoding. Therefore, for example, the decoding processor can be a coding unit, and the coding unit can be divided from the coding tree unit or the maximum coding unit according to the quadtree structure, the binary tree structure and / or the ternary tree structure. One or more transform units can be derived from the coding unit. The reconstructed image signal decoded and output by the decoding device 300 can be reproduced by the reproduction device.

[0068] The decoding device 300 may receive Figure 2The received signal is output by the encoding device in the form of a bitstream, and the entropy decoder 310 can decode the received signal. For example, the entropy decoder 310 can parse the bitstream to derive information required for image reconstruction (or picture reconstruction) (e.g., video / image information). The video / image information may also include information about various parameter sets, such as the Adaptive Parameter Set (APS), Picture Parameter Set (PPS), Sequence Parameter Set (SPS), or Video Parameter Set (VPS). In addition, the video / image information may also include general constraint information. The decoding device may also decode the picture based on the parameter set information and / or general constraint information. The signaled / received information and / or syntax elements described later in this document can be decoded and obtained from the bitstream through a decoding process. For example, the entropy decoder 310 decodes the information in the bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and outputs the syntax elements required for image reconstruction and the quantized values ​​of the residual transform coefficients. More specifically, the CABAC entropy decoding method receives bins corresponding to various syntax elements in a bitstream, determines a context model using information about the target syntax element to be decoded, information about the decoded target block, or information about symbols / cells decoded in a previous stage, and performs arithmetic decoding on the bins by predicting the probability of their occurrence based on the determined context model, generating symbols corresponding to the values ​​of the respective syntax elements. In this case, after determining the context model, the CABAC entropy decoding method updates the context model by applying information from the decoded symbol / cell to the context model for the next symbol / cell. Information related to prediction, among the information decoded by the entropy decoder 310, can be provided to the predictor (inter-frame predictor 332 and intra-frame predictor 331), and residual values ​​(i.e., quantized transform coefficients and related parameter information) entropy-decoded in the entropy decoder 310 can be input to the residual processor 320. The residual processor 320 can derive a residual signal (residual block, residual sample, residual sample array). Furthermore, information related to filtering, among the information decoded by the entropy decoder 310, can be provided to the filter 350. In addition, a receiver (not shown) for receiving a signal output from the encoding device may also be configured as an internal / external element of the decoding device 300, or the receiver may be a component of the entropy decoder 310. In addition, the decoding device according to this document may be referred to as a video / image / picture decoding device, and the decoding device may be classified 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 decoder 310, and the sample decoder may include at least one of a dequantizer 321, an inverse transformer 322, an adder 340, a filter 350, a memory 360, an inter-frame predictor 332, and an intra-frame predictor 331.

[0069] The dequantizer 321 may dequantize the quantized transform coefficients and output the transform coefficients. The dequantizer 321 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement may be performed based on the coefficient scanning order performed in the encoding device. The dequantizer 321 may dequantize the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain the transform coefficients.

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

[0071] The predictor may perform prediction on the current block and generate a prediction block including prediction samples of the current block. The predictor may determine whether to apply intra prediction or inter prediction to the current block based on the information on prediction output from the entropy decoder 310 and may determine a specific intra / inter prediction mode.

[0072] The predictor 320 can generate prediction signals based on various prediction methods described below. For example, the predictor can apply not only intra prediction or inter prediction to predict a block, but also both intra and inter prediction simultaneously. This is referred to as combined inter and intra prediction (CIIP). Furthermore, the predictor can predict blocks based on intra block copy (IBC) prediction mode or palette mode. IBC prediction mode or palette mode can be used for content image / video coding, such as screen content coding (SCC), for gaming and other applications. IBC essentially performs prediction within the current picture, but can be performed similarly to inter prediction, deriving a reference block within the current picture. That is, IBC can use at least one of the inter prediction techniques described herein. 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 a palette table and palette index. The intra predictor 331 can reference samples in the current picture to predict the current block. Depending on the prediction mode, the referenced samples can be located near the current block or spaced apart. In intra prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The intra predictor 331 may determine a prediction mode applied to a current block using prediction modes applied to neighboring blocks.

[0073] The intra-frame predictor 331 can predict the current block by referencing samples in the current picture. Depending on the prediction mode, the referenced samples may be located near the current block or spaced apart. In intra-frame prediction, the prediction modes may include multiple non-directional modes and multiple directional modes. The intra-frame predictor 331 can use the prediction modes applied to neighboring blocks to determine the prediction mode applied to the current block.

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

[0075] The adder 340 can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the obtained residual signal to the prediction signal (prediction block, prediction sample array) output from the predictor (including the inter-frame predictor 332 and / or the intra-frame predictor 331). If there is no residual in the block to be processed, for example, when skip mode is applied, the prediction block can be used as the reconstructed block.

[0076] The adder 340 may be referred to as a reconstructor or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next block to be processed in the current picture, may be output through filtering as described below, or may be used for inter prediction of the next picture.

[0077] In addition, luma mapping with chroma scaling (LMCS) can be applied in the picture decoding process.

[0078] The filter 350 can improve the subjective / objective image quality by applying filtering to the reconstructed signal. For example, the filter 350 can generate a modified reconstructed image by applying various filtering methods to the reconstructed image and store the modified reconstructed image in the memory 360 (specifically, the DPB of the memory 360). For example, the various filtering methods may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

[0079] The (modified) reconstructed picture stored in the DPB of the memory 360 can be used as a reference picture in the inter-frame predictor 332. The memory 360 can store the motion information of the block from which the motion information in the current picture is derived (or decoded) and / or the motion information of the reconstructed block in the picture. The stored motion information can be sent to the inter-frame predictor 260 to be used as the motion information of the spatially adjacent block or the motion information of the temporally adjacent block. The memory 360 can store the reconstructed samples of the reconstructed block in the current picture and transmit the reconstructed samples to the intra-frame predictor 331.

[0080] In the present disclosure, the embodiments described in the filter 260, the inter-frame predictor 221, and the intra-frame predictor 222 of the encoding device 200 may be the same as or respectively applied to the filter 350, the inter-frame predictor 332, and the intra-frame predictor 331 of the decoding device 300. This also applies to the unit 332 and the intra-frame predictor 331.

[0081] As described above, when performing video coding, prediction is performed to enhance compression efficiency. A prediction block including prediction samples of a current block (i.e., a target coding block) can be generated by prediction. In this case, the prediction block includes prediction samples in the spatial domain (or pixel domain). The prediction block is derived identically in the encoding device and the decoding device. The encoding device can enhance image coding efficiency by signaling information (residual information) about the residual between the original block (rather than the original sample values ​​of the original block themselves) and the prediction block to the decoding device. The decoding device can derive a residual block including residual samples based on the residual information, generate a reconstructed block including reconstructed samples by adding the residual block and the prediction block, and generate a reconstructed picture including the reconstructed block.

[0082] Residual information can be generated through a transformation process and a quantization process. For example, the encoding device can derive a residual block between the original block and the prediction block, derive a transform coefficient by performing a transformation process on the residual samples (residual sample array) included in the residual block, derive a quantized transform coefficient by performing a quantization process on the transform coefficient, and can signal the relevant residual information (through a bitstream) to the decoding device. In this case, the residual information may include information such as value information, position information, transformation scheme, transformation kernel, and quantization parameter of the quantized transform coefficient. The decoding device can perform a dequantization / inverse transformation process based on the residual information and derive residual samples (or residual blocks). The decoding device can generate a reconstructed picture based on the prediction block and the residual block. In addition, the encoding device can derive a residual block by dequantizing / inverse transforming the quantized transform coefficient for reference in inter-frame prediction of a subsequent picture, and can generate a reconstructed picture.

[0083] Furthermore, when performing intra-frame prediction, correlation between samples can be exploited, and the difference between the original block and the predicted block, i.e., the residual, can be obtained. The aforementioned transform and quantization can be applied to the residual, thereby removing spatial redundancy. The following describes encoding and decoding methods using intra-frame prediction in detail.

[0084] Intra-frame prediction refers to the process of generating prediction samples for a current block based on external reference samples of the current block in a picture to which the current block belongs (hereinafter referred to as the current picture). Here, the external reference samples of the current block may refer to samples located near the current block. When intra-frame prediction is applied to the current block, neighboring reference samples to be used for intra-frame prediction of the current block may be derived.

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

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

[0087] When deriving neighboring reference samples, (i) the prediction sample may be derived based on an average or interpolation of neighboring reference samples of the current block, or (ii) the prediction sample may be derived based on a reference sample located in a specific (prediction) direction relative to the prediction sample among the neighboring reference samples of the current block. Case (i) is applicable when the intra prediction mode is a non-directional mode or a non-angular mode, whereas case (ii) is applicable when the intra prediction mode is a directional mode or an angular mode.

[0088] Alternatively, the prediction sample may be generated by interpolating between a first neighboring sample located in the prediction direction of the intra prediction mode of the current block and a second neighboring sample located in the opposite direction of the prediction direction based on the prediction sample of the current block among the neighboring reference samples. This situation can be referred to as linear interpolation intra prediction (LIP). Alternatively, a linear model may be used to generate chroma prediction samples based on luma samples. This situation may be referred to as LM mode.

[0089] Alternatively, a temporary prediction sample of the current block may be derived based on filtered neighboring reference samples, and a weighted sum of at least one reference sample derived according to an intra prediction mode among existing neighboring reference samples (i.e., unfiltered neighboring reference samples) and the temporary prediction sample may be used to derive the prediction sample of the current block. This may be referred to as position-dependent intra prediction (PDPC).

[0090] In addition, intra-frame prediction encoding can be performed by selecting a reference sample line with the highest prediction accuracy among multiple adjacent reference sample lines of the current block, using reference samples located in the prediction direction of the corresponding line to derive prediction samples, and indicating (signaling) the used reference sample line to the decoding device. The above situation can be called multi-reference line (MRL) intra-frame prediction or MRL-based intra-frame prediction.

[0091] In addition, the current block can be divided into vertical or horizontal sub-partitions to perform intra prediction in the same intra prediction mode, where neighboring reference samples can be derived and used in units of sub-partitions. In other words, although the intra prediction mode of the current block can be applied in the same manner to all sub-partitions, the intra prediction performance can be improved by deriving and using neighboring reference samples in units of sub-partitions depending on the situation. The above prediction method may be referred to as intra sub-partitioning (ISP) or ISP-based intra prediction.

[0092] Intra-frame prediction methods may be referred to as intra-frame prediction types to distinguish them from intra-frame prediction modes. Intra-frame prediction types may be referred to by various terms such as intra-frame prediction schemes or additional intra-frame prediction modes. For example, an intra-frame prediction type (or additional intra-frame prediction mode) may include at least one of LIP, PDPC, MRL, and ISP. General intra-frame prediction methods other than specific intra-frame prediction types such as LIP, PDPC, MRL, and ISP may be referred to as normal intra-frame prediction types. Normal intra-frame prediction types may generally be applied when a specific intra-frame prediction type is not applied, and prediction may be performed based on the intra-frame prediction mode. In addition, the derived prediction samples may be post-filtered as needed.

[0093] Figure 4 An example of an intra-frame prediction-based image encoding method to which the embodiments of the present disclosure are applicable is illustrated, and Figure 5 FIGURE 1 shows an intra-frame predictor in an encoding device. Figure 2 The intra-frame predictor 222 of the encoding device 200 is applied in the same manner or a corresponding manner Figure 5 Intra-frame predictor within the encoding device.

[0094] Reference Figure 4 and Figure 5, S400 may be performed by the intra-frame predictor 222 of the encoding device, and S410 may be performed by the residual processor 230 of the encoding device. More specifically, S410 may be performed by the subtractor 231 of the encoding device. In step S420, prediction information may be derived by the intra-frame predictor 222 and encoded by the entropy encoder 240. In step S420, residual information may be derived by the residual processor 230 and encoded by the entropy encoder 240. Residual information is information about residual samples. The residual information may include information about quantized transform coefficients for the residual samples. As described above, the residual samples may be derived as transform coefficients by the transformer 232 of the encoding device, and the transform coefficients may be derived as quantized transform coefficients by the quantizer 233. Information about the quantized transform coefficients may be encoded by the entropy encoder 240 through a residual coding process.

[0095] The encoding device performs intra prediction on the current block (S400). The encoding device may derive an intra prediction mode / type for the current block, derive neighboring reference samples for the current block, and generate prediction samples in the current block based on the intra prediction mode / type and the neighboring reference samples. Here, the processes of determining the intra prediction mode / type, deriving neighboring reference samples, and generating prediction samples may be performed simultaneously, or one process may be performed before the other.

[0096] For example, the intra-frame predictor 222 of the encoding device may include an intra-frame prediction mode / type determination unit 222-1, a reference sample derivation unit 222-2, and a prediction sample derivation unit 222-3; the intra-frame prediction mode / type determination unit 222-1 may determine the intra-frame prediction mode / type of the current block; the reference sample derivation unit 222-2 may derive neighboring reference samples of the current block; and the prediction sample derivation unit 222-3 may derive the prediction sample of the current block. Although not shown, when performing the prediction sample filtering process, the intra-frame predictor 222 may further include a prediction sample filter (not shown). The encoding device may determine the mode / type to be applied to the current block from among multiple intra-frame prediction modes / types. The encoding device may compare RD costs for the intra-frame prediction modes / types and determine the optimal intra-frame prediction mode / type for the current block.

[0097] As described above, the encoding device may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.

[0098] The encoding apparatus generates residual samples of the current block based on the (filtered) prediction samples S410. The encoding apparatus may compare the prediction samples with the original samples of the current block in terms of phase and derive the residual samples.

[0099] The encoding apparatus may encode image information including information about intra prediction (prediction information) and residual information about residual samples (S420). The prediction information may include intra prediction mode information and intra prediction type information. The residual information may include residual coding syntax. The encoding apparatus may derive quantized transform coefficients by transforming / quantizing the residual samples. The residual information may include information about the quantized transform coefficients.

[0100] The encoding device can output the encoded image information in the form of a bit stream, and the output bit stream can be delivered to the decoding device via a storage medium or a network.

[0101] As described above, the encoding device may generate a reconstructed picture (including reconstructed samples and reconstructed blocks). To this end, the encoding device may derive (modified) residual samples by applying dequantization / inverse transform to the quantized transform coefficients again. The reason why dequantization / inverse transform is performed again after transforming / quantizing the residual samples is to derive residual samples that are the same as the residual samples derived from the decoding device as described above. The encoding device may generate a reconstructed block including reconstructed samples of the current block based on the predicted samples and the (modified) residual samples. Based on the reconstructed block, a reconstructed picture of the current picture may be generated. As described above, a loop filtering process may be further applied to the reconstructed picture.

[0102] Figure 6 An example of an intra-frame prediction-based image decoding method to which the embodiments of the present disclosure are applicable is illustrated, and Figure 7 FIGURE 1 shows an intra-frame predictor in a decoding device. Figure 3 The intra-frame predictor 331 of the decoding device 300 is applied in the same manner or a corresponding manner Figure 7 Intra-frame predictor within a decoding device.

[0103] Reference Figure 6 and Figure 7 , the decoding device may perform operations corresponding to the operations performed in the encoding device. Steps S600 to S620 may be performed by the intra-frame predictor 331 of the decoding device, and the prediction information of S600 and the residual information of S630 may be obtained from the bitstream by the entropy decoder 310 of the decoding device. The residual processor 320 of the decoding device may derive residual samples of the current block based on the residual information. Specifically, the dequantizer 321 of the residual processor 320 may derive transform coefficients by performing dequantization based on the quantized transform coefficients derived based on the residual information and derive residual samples of the current block by performing inverse transform on the transform coefficients. Step S640 may be performed by the adder 340 or the reconstructor of the decoding device.

[0104] The decoding device may derive an intra prediction mode / type for the current block based on the received prediction information (intra prediction mode / type information) S600. The decoding device may derive neighboring 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 the neighboring reference samples S620. In this case, the decoding device may perform a prediction sample filtering process. Prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered through the prediction sample filtering process. In some cases, the prediction sample filtering process may be omitted.

[0105] The decoding device generates residual samples of the current block based on the received residual information (S630). The decoding device may generate reconstructed samples of the current block based on the predicted samples and the residual samples, and generate a reconstructed block including the reconstructed samples (S640). A reconstructed picture of the current picture may be generated based on the reconstructed block. As described above, a loop filtering process may be further applied to the reconstructed picture.

[0106] Here, the intra-frame predictor 331 of the decoding device may include an intra-frame prediction mode determination unit 331-1, a reference sample derivation unit 331-2, and a prediction sample derivation unit 331-3; the intra-frame prediction mode / type determination unit 331-1 may determine the intra-frame prediction mode / type of the current block based on the intra-frame prediction mode / type information obtained by the entropy decoder 310; the reference sample derivation unit 331-2 may derive the neighboring reference samples of the current block; and the prediction sample derivation unit 331-3 may derive the prediction sample of the current block. Although not shown, when performing the above-mentioned prediction sample filtering process, the intra-frame predictor 331 may further include a prediction sample filter (not shown).

[0107] The intra-frame prediction mode information may include, for example, flag information (e.g., intra_luma_mpm_flag) indicating whether the most probable mode (MPM) is applied to the current block or the residual mode is applied to the current block. When MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra-frame prediction mode candidates (MPM candidates). The intra-frame prediction mode candidates (MPM candidates) may include an MPM candidate list or an MPM list. In addition, when MPM is not applied to the current block, the intra-frame prediction mode information may further include residual mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra-frame prediction modes other than the intra-frame prediction mode candidates (MPM candidates). The decoding device may determine the intra-frame prediction mode of the current block based on the intra-frame prediction mode information.

[0108] In addition, the intra-frame prediction type information may be implemented in various forms. As an example, the intra-frame prediction type information may include intra-frame prediction type index information indicating one of the intra-frame prediction types. As another example, the intra-frame prediction type information may include at least one of the following: reference sample line information indicating whether MRL is applied to the current block and which reference sample line is used when applying MRL (e.g., intra_luma_ref_idx), ISP flag information indicating whether ISP is applied to the current block (e.g., intra_subpartitions_mode_flag), ISP type information indicating the split type of the sub-partition (e.g., intra_subpartitions_split_flag), flag information indicating whether PDCP is applied, or flag information indicating whether LIP is applied. In addition, the intra-frame prediction type information may include a MIP flag indicating whether MIP is applied to the current block.

[0109] The intra-frame prediction mode information and / or the intra-frame prediction type information may be encoded / decoded by the coding method described herein. For example, the intra-frame prediction mode information may be encoded / decoded by entropy coding (e.g., CABAC or CAVLC) based on truncated (Rice) binary code.

[0110] Furthermore, when intra prediction is applied, the intra prediction mode of a neighboring block may be used to determine the intra prediction mode to be applied to the current block. For example, the decoding device may select, based on the received mpm index, one of the mpm candidates in the mpm list derived based on the intra prediction modes of neighboring blocks (e.g., the left neighboring block and / or the upper neighboring block) of the current block and the additional candidate modes, or select one of the other remaining intra prediction modes not included in the mpm candidates (and the planar mode) based on the remaining intra prediction mode information. The mpm list may be constructed to include or exclude the planar mode as a candidate. For example, when the mpm list includes the planar mode as a candidate, the mpm list may have six candidates. Otherwise, the mpm list may have five candidates. When the mpm list does not include the planar mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is a planar mode may be signaled. For example, when the mpm flag is first signaled, the mpm index and the non-planar flag may be signaled when the value of the mpm flag is 1. In addition, the mpm index may be signaled when the value of the non-planar flag is 1. Here, constructing the mpm list so as not to include the planar mode as a candidate is first intended to check whether the intra prediction mode is the planar mode by signaling the non-planar flag, which is not intended to indicate that the planar mode is not mpm, but is intended to reflect the fact that the planar mode is always considered to be mpm.

[0111] For example, whether the intra prediction mode applied to the current block is included in the mpm candidates (and planar mode) or in the remaining modes may be indicated based on an mpm flag (e.g., intra_luma_mpm_flag). When the mpm flag is 1, it may indicate that the intra prediction mode of the current block is included in the mpm candidates (and planar mode), whereas when the mpm flag is 0, it indicates that the intra prediction mode block of the current block is not included in the mpm candidates (and planar mode). When the non-planar flag (e.g., intra_luma_not_planar_flag) is 0, it may indicate that the intra prediction mode of the current block is planar mode, whereas when the non-planar flag is 1, it may indicate that the intra prediction mode of the current block is not planar mode. The mpm index may be signaled in the form of an mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information may be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may be signaled in the form of a rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information may indicate one of the remaining intra prediction modes that is not included in the mpm candidates (and planar mode) among all intra prediction modes by indexing the remaining intra prediction modes in order of prediction mode numbers. The intra prediction mode may be related to a luma component (sample). Hereinafter, the intra prediction mode information may include at least one of an mpm flag (e.g., intra_luma_mpm_flag), a non-planar flag (e.g., intra_luma_not_planar_flag), an mpm index (e.g., mpm_idx or intra_luma_mpm_idx), and remaining intra prediction mode information (e.g., rem_intra_luma_pred_mode or intra_luma_mpm_remainder). In the present disclosure, the MPM list may be referred to by various terms such as an MPM candidate list or candModeList.

[0112] Typically, when block segmentation is performed on an image, the current block to be coded and the neighboring blocks have similar image characteristics. Therefore, there is a high probability that the current block and the neighboring blocks have the same or similar intra-frame prediction mode. Therefore, the encoder can use the intra-frame prediction mode of the neighboring block to encode the intra-frame prediction mode of the current block. For example, the encoder / decoder can configure a most probable mode (MPM) list for the current block. The MPM list can be referred to as an MPM candidate list. Here, MPM can refer to a mode used to improve coding efficiency by considering the similarity between the current block and the neighboring blocks when coding the intra-frame prediction mode.

[0113] Figure 8 An example of an intra prediction method based on an MPM mode of an encoding device to which embodiments of the present disclosure are applicable is illustrated.

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

[0115] The encoding device determines an intra prediction mode for the current block S810. The encoding device may perform prediction based on various intra prediction modes and determine an optimal intra prediction mode based on rate-distortion optimization (RDO) using the prediction. In this case, the encoding device may determine the optimal intra prediction mode using only the MPM candidates and the planar mode configured in the MPM list or further use the remaining intra prediction modes and the MPM candidates and the planar mode configured in the MPM list to determine the optimal intra prediction mode.

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

[0117] In general, when the intra prediction mode of the current block is not the planar mode but is one of the MPM candidates in the MPM list, the encoding device generates an mpm index (mpm idx) indicating one of the MPM candidates. If the intra prediction mode of the current block is not included in the MPM list, the encoding device generates remaining intra prediction mode information indicating the same mode as the intra prediction mode of the current block among the remaining intra prediction modes not included in the MPM list (and the planar mode).

[0118] The encoding device may encode the intra prediction mode information and output the encoded information in the form of a bitstream S820. The intra prediction mode information includes the above-mentioned mpm flag, non-plane flag, mpm index and / or remaining intra prediction mode information. Generally, the mpm index information and the remaining intra mode prediction mode information have an alternative relationship and are not signaled at the same time in indicating the intra prediction mode for a block. In other words, the mpm flag value 1 and the non-plane flag or the mpm index may be signaled together, or the mpm flag value 0 and the remaining intra prediction mode information may be signaled together. However, as described above, when a specific intra prediction type is applied to the current block, the mpm flag may not be signaled, but only the non-plane flag and / or the mpm index may be signaled. That is, in this case, the intra prediction mode information may include only the non-plane flag and / or the mpm index.

[0119] Figure 9 An example of an intra prediction method based on the MPM mode in a decoding device to which embodiments of the present disclosure are applicable is illustrated. Figure 9 The decoding device may respond to the Figure 8 The encoding device determines and signals the intra-frame prediction mode information to determine the intra-frame prediction mode.

[0120] Reference Figure 9 , the decoding apparatus obtains intra prediction mode information from the bitstream S900. As described above, the intra prediction mode information includes at least one of an mpm flag, a non-plane flag, an mpm index, and a remaining intra prediction mode.

[0121] The decoding device constructs an MPM list (S910). The MPM list is constructed in the same manner as the MPM list constructed by the encoding device. In other words, the MPM list may include intra prediction modes of neighboring blocks and may also include specific intra prediction modes according to a predetermined method. The specific method for constructing the MPM list will be described later.

[0122] Although step S910 is described as being executed after step S900 , the execution order is merely an example, and step S910 may be executed before step S900 or may be executed simultaneously with step S900 .

[0123] The decoding apparatus determines an intra prediction mode of a current block based on the MPM list and the intra prediction mode information S920.

[0124] As an example, when the value of the mpm flag is 1, the decoding apparatus may derive the planar mode as the intra prediction mode of the current block or derive the candidate indicated by the mpm index among the MPM candidates in the MPM list (based on the non-planar flag) as the intra prediction mode of the current block. Here, the MPM candidate may include only the candidates included in the MPM list, or in addition to the candidates included in the MPM list, also include the planar mode that can be applied to the case when the value of the MPM flag is 1.

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

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

[0127] In addition, the intra prediction mode may include a non-directional (or non-angle) intra prediction mode and a directional (or angle) intra prediction mode. For example, the HEVC standard uses intra prediction modes, including two non-directional prediction modes and 33 directional prediction modes. The non-directional prediction mode may include a plane intra prediction mode 0 and a DC intra prediction mode 1, while the directional prediction mode may include intra prediction modes 2 to 34. The plane intra prediction mode may be referred to as a plane mode, and the DC intra prediction mode may be referred to as a DC mode.

[0128] In order to capture the specific edge directions found in natural videos, the directional intra prediction modes can be expanded from the existing 33 modes to 65 modes, as will be described later. Figure 10In this case, the intra prediction mode may include two non-directional intra prediction modes and 65 angular intra prediction modes. The non-directional intra prediction mode may include a plane intra prediction mode number 0 and a DC intra prediction mode number 1, and the directional intra prediction mode may include intra prediction mode numbers 2 to 66. The extended directional intra prediction mode may be applied to blocks of all sizes and may be applied to both the luminance component and the chrominance component. However, the above description is merely an example, and embodiments of the present disclosure may also be applied to situations where the number of intra prediction modes is different from the example. Intra prediction mode number 67 may also be utilized depending on the situation, where intra prediction mode number 67 may represent a linear model (LM) mode.

[0129] Figure 10 An example of an intra prediction mode to which the embodiments of the present disclosure are applicable is illustrated.

[0130] Reference Figure 10 , the intra prediction mode having a horizontal directionality and the intra prediction mode having a vertical directionality can be distinguished from each other based on the intra prediction mode number 34 having the left-upward diagonal prediction direction. Figure 10 H and V represent horizontal and vertical directivities, respectively, and numbers from -32 to 32 represent displacements of 1 / 32 units on the sample grid position. Intra-prediction mode numbers 2 to 33 have horizontal directivities, and intra-prediction mode numbers 34 to 66 have vertical directivities. Intra-prediction mode number 18 and intra-prediction mode number 50 represent horizontal and vertical intra-prediction modes, respectively; intra-prediction mode number 2 can be referred to as a left-down diagonal intra-prediction mode, intra-prediction mode number 34 can be referred to as a left-up diagonal intra-prediction mode, and intra-prediction mode number 66 can be referred to as a right-up diagonal intra-prediction mode.

[0131] In addition, intra prediction may use MRL using multiple reference lines. The MRL method may perform intra prediction using neighboring samples located along a sample line separated by one to three samples from the top and / or left of the current block as reference samples.

[0132] Figure 11 An example of reference sample lines used for intra prediction using multiple reference lines is illustrated. Figure 11 The block unit may represent the current block.

[0133] In one embodiment, intra prediction may use reference samples adjacent to the current block (or reference samples closest to the current block, i.e., reference samples located at a sample distance of zero from the current block) as reference samples for prediction. In another embodiment, multi-reference line (MRL) intra prediction uses reference samples located at a sample distance of K (where K is an integer greater than or equal to 1) from the left and top boundaries of the current block, thereby providing more options for reference samples and providing more accurate prediction performance than intra prediction using reference samples closest to the current block (i.e., located at a sample distance of zero). Reference samples of the current block may be referred to as neighboring samples of the current block or reference line samples of the current block, and reference line samples may be referred to as samples on the reference line.

[0134] Reference Figure 11 , the positions of neighboring reference samples located at a distance of zero, one, two, and three samples from the current block may be referred to as reference lines 0, 1, 2, and 3, respectively. Reference lines may be indicated by reference sample lines, reference sample rows, or reference sample columns, or simply by lines, rows, or columns. Reference lines 0, 1, 2, and 3 may be positioned in the order closest to the current block. In one example, multi-reference line intra prediction may be performed using reference lines 1 and 2. In another example, multi-reference line intra prediction may be performed using reference lines 1 and 3. However, it should be noted that multi-reference line intra prediction in the present disclosure is not necessarily limited to the above examples.

[0135] In addition, MRL-based intra prediction can signal reference line information to indicate which reference line to use. For example, reference line information can be signaled in the form of an intra_luma_ref_idx syntax element. When the value of intra_luma_ref_idx is 0, it may indicate that the reference sample closest to the current block (i.e., the sample at a zero sample distance) is used to perform intra prediction. When intra_luma_ref_idx is 1, it may indicate that the second closest reference sample to the current block (i.e., the sample at a one sample distance) is used to perform intra prediction. When intra_luma_ref_idx is 2, it may indicate that the third or fourth closest reference sample to the current block (i.e., the sample at a two or three sample distance) is used to perform intra prediction.

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

[0137] Figure 12 One embodiment of a method for deriving prediction samples in DC mode is illustrated.

[0138] For convenience, Figure 12The description is given using an example in which a reference sample closest to the current block (ie, a sample located at a zero sample distance) is used. In other words, Figure 12 The reference samples used in DC mode when the value of the reference line index information (eg, intra_luma_ref_idx) is 0 are shown. When the value of the reference line index information (eg, intra_luma_ref_idx) is not 0, Figure 12 The method disclosed in is applied to DC mode in the same way.

[0139] Reference Figure 12 (a), when the current block is a square block (for example, a 4x4 block) and the intra prediction of the current block is a DC mode, neighboring reference samples for intra prediction in DC mode may be derived. At this time, the neighboring reference samples may include left reference samples (E, F, G, H) located in the left neighborhood of the current block and upper reference samples (A, B, C, D) located in the upper neighborhood of the current block. In this case, an average value is calculated using the left reference samples (E, F, G, H) and the upper reference samples (A, B, C, D), and a DC value (dcVal) may be derived based on the calculated average value. The current block (in Figure 12 The samples in the area filled with slashes in (a) of FIG. 3 may be filled with a DC value (dcVal). In other words, the samples filled with a DC value (dcVal) may be referred to as predicted samples.

[0140] Reference Figure 12 (b) of FIG5 , when the current block is a non-square block (e.g., an 8x4 block) and the intra prediction of the current block is a DC mode, neighboring reference samples for intra prediction in the DC mode may be derived. In this case, the neighboring reference samples may include reference samples located at the longer sides of the width and height of the non-square block. Figure 12 The width (i.e., horizontal length) of the 8x4 block shown in (b) of FIG has a large value, so the upper reference samples (A, B, C, D, E, F, G, and H) located in the neighborhood of the width side can be derived as adjacent reference samples. In this case, the average value is calculated using the upper reference samples (A, B, C, D, E, F, G, and H), and the DC value (dcVal) can be derived based on the calculated average value. The current block (in Figure 12 The samples in the area filled with slashes in (b) of FIG. 3 may be filled with a DC value (dcVal). In other words, the samples filled with a DC value (dcVal) may be referred to as predicted samples.

[0141] As described above, unlike square blocks, when all left reference samples and upper reference samples are used to calculate the average value for non-square blocks, since the divisor value does not have a value of 2 nIn order to change the division operation to a shift operation, as described above, the DC value can be calculated using reference samples located only on the longer sides of the width and height of the non-square block.

[0142] When the current block is a non-square block in DC mode, Figure 12 An embodiment compares the width (i.e., horizontal length) with the height (i.e., vertical length), uses reference samples on only the longer side to calculate the DC value, and derives the reference samples as prediction samples for the current block. Since the above method uses reference samples on only any one side of the width and height (i.e., the side with the longer length), the prediction accuracy may be degraded. Therefore, hereinafter, a method for generating prediction samples by calculating the DC value using all left reference samples and upper reference samples when the current block is a non-square block will be described. In addition, a method for selecting reference samples (left reference samples and upper reference samples) to calculate the DC value using a shift operation instead of a division operation will be described. In one embodiment, as many reference samples as the number of neighboring reference samples on the shorter side of the width and height of the non-square block are selected from the neighboring reference samples on the longer side, and the DC value is calculated using the selected neighboring reference samples. As described above, since when as many reference samples as the number of reference samples on the shorter side are selected from the neighboring reference samples on the longer side, the total number of selected reference samples has 2 n , so the shift operation can be used to calculate the average value.

[0143] Figure 13 Another embodiment of a method for deriving prediction samples in DC mode is illustrated. Figure 13 The method disclosed in selects as many reference samples as the number of reference samples on the shorter sides of the width and height of the non-square block from among the reference samples on the longer sides, but selects reference samples at different positions on the longer sides.

[0144] In addition, for convenience, Figure 13 The description is given using an example in which a reference sample closest to the current block (ie, a sample located at a zero sample distance) is used. In other words, Figure 13 The reference samples used in DC mode when the value of the reference line index information (eg, intra_luma_ref_idx) is 0 are shown. When the value of the reference line index information (eg, intra_luma_ref_idx) is not 0, Figure 13 The method disclosed in is applied to DC mode in the same way.

[0145] Reference Figure 13In (a) to (d), when the current block is a non-square block (for example, an 8x4 block) and the intra prediction of the current block is a DC mode, neighboring reference samples for intra prediction in the DC mode may be derived. In this case, the neighboring reference samples may include the same number of reference samples as the number of left reference samples from among the left reference samples (I, J, K, L) located in the left neighborhood of the current block and the upper reference samples (A, B, C, D, E, F, G, and H) located in the upper neighborhood of the current block.

[0146] For example, Figure 13 As shown in (a) of FIG. , the same number of reference samples as the number of left reference samples can be selected by sampling the upper reference samples (A, B, C, D, E, F, G, and H) at every odd-numbered position. In other words, the reference samples at the odd-numbered positions may refer to the reference samples (A, C, E, and G) obtained by sampling every other reference sample starting from the reference sample at the first position and selecting the same number of samples as the number of left reference samples from among the upper reference samples. In this case, the neighboring reference samples may include a total of 8 reference samples (four left reference samples and four upper reference samples). The DC value can be derived by calculating the average of the total 8 reference samples.

[0147] In another example, Figure 13 As shown in (b) of FIG, the same number of reference samples as the number of left reference samples can be selected by sampling the upper reference samples (A, B, C, D, E, F, G, and H) at every even-numbered position. In other words, the reference samples at the even-numbered positions may refer to the reference samples (B, D, F, and H) obtained by sampling every other reference sample starting from the reference sample at the second position and selecting the same number of samples as the number of left reference samples from among the upper reference samples. In this case, the neighboring reference samples may include a total of 8 reference samples (four left reference samples and four upper reference samples). The DC value can be derived by calculating the average of the total 8 reference samples.

[0148] In another example, Figure 13 As shown in (c) of FIG. 1 , as many reference samples as the number of left reference samples can be selected by sampling upper reference samples (A, B, C, D, E, F, G, and H) at consecutive positions (A, B, C, and D) starting from the first position of the upper reference sample. In this case, the neighboring reference samples may include a total of 8 reference samples (four left reference samples and four upper reference samples). The DC value can be derived by calculating the average of the total 8 reference samples.

[0149] In yet another example, Figure 13As shown in (d) of FIG, as many reference samples as the number of left reference samples can be selected by sampling upper reference samples (A, B, C, D, E, F, G, and H) at consecutive positions (E, F, G, H) starting from the last position of the upper reference sample. In this case, the neighboring reference samples may include a total of 8 reference samples (four left reference samples and four upper reference samples). The DC value can be derived by calculating the average of the total 8 reference samples.

[0150] Although Figure 13 The embodiment of the present invention is described using an 8x4 block, but the above description is only an example, and the above method can be applied to non-square blocks of various sizes to derive neighboring reference samples and calculate the DC value using the derived neighboring reference samples. As an example, when the current block is a 16x4 non-square block, four reference samples can be selected from four left reference samples and four reference samples can be selected from 16 upper reference samples. At this time, when applying Figure 13 When the method (a) is used, a total of four upper reference samples can be selected by sampling every four samples starting from the reference sample at the first position of the 16 upper reference samples. Therefore, the DC value can be derived by calculating the average value of the four left reference samples and the four sampled upper reference samples. The above operation can be applied in the same way to Figure 13 The methods illustrated in (b), (c) and (d) of are to derive left and upper reference samples and calculate DC values ​​based on the derived reference samples.

[0151] Furthermore, the intra prediction method using multiple reference lines can be applied only to directional intra prediction modes other than planar mode and DC mode. Therefore, there is a disadvantage in that multiple reference lines cannot be applied to intra prediction in planar mode and DC mode, which are non-directional modes. This article proposes a method for performing DC mode intra prediction using multiple reference lines by applying various methods for deriving neighboring reference samples in DC mode as described above.

[0152] In one embodiment, in order to reduce the complexity of intra-frame prediction based on multiple reference lines, multiple reference lines are not applied to all intra-frame prediction modes, but only to candidate intra-frame prediction modes included in the MPM list. Therefore, when intra-frame prediction based on MRL is applied, the DC mode can be added to the MPM list to perform the DC mode. In other words, the existing MPM list for intra-frame prediction using multiple reference lines generates a total of six candidate intra-frame prediction modes that do not include the planar mode and the DC mode. However, according to the present disclosure, the MPM list can be constructed by adding the DC mode to the candidate intra-frame prediction mode. As an example, the DC mode can be added without changing the number of candidate intra-frame prediction modes in the existing MPM list. In this case, the left mode as the candidate intra-frame prediction mode of the left neighboring block of the current block and the upper mode as the candidate intra-frame prediction mode of the upper neighboring block of the current block can be derived, and the MPM list can be constructed by deriving the candidate intra-frame prediction mode based on the left mode and the upper mode. At this time, one of the candidate intra-frame prediction modes can be derived as the DC mode.

[0153] According to one embodiment, when one of the candidate intra-frame prediction modes is derived as a DC mode, one of the candidate intra-frame prediction modes in the MPM list may be removed, and the DC mode may be added. In this case, the method for removing the candidate intra-frame prediction modes from the MPM list may remove the candidate intra-frame prediction mode with the lowest probability of occurrence, which is located at the end of the MPM list. However, the above description is merely an example, and candidate intra-frame prediction modes located at specific positions may be removed, or candidate intra-frame prediction modes located at the beginning of the MPM list may be removed based on the frequency of occurrence of the DC mode. Alternatively, the method for adding the DC mode to the MPM list may add the DC mode to the position in the MPM list from which the candidate intra-frame prediction mode was removed. For example, the DC mode may be added to the end of the MPM list or to the beginning of the MPM list. Furthermore, the position within the MPM list where the DC mode is added may be arbitrarily determined. In other words, candidate intra-frame prediction modes located at a specific order among the candidate intra-frame prediction modes in the MPM list may be removed, and the DC mode may be positioned at any position in the MPM list.

[0154] As described above, the DC mode can still be added to the MPM list to perform prediction using the DC mode in the MRL-based intra prediction. Figure 12 and Figure 13 Various methods for predicting DC values ​​are described.

[0155] Figure 14 is a flowchart illustrating an encoding method that can be performed by an encoding device according to one embodiment of the present disclosure.

[0156] Figure 14 The method disclosed in Figure 2 Specifically, steps S1400 to S1420 may be performed by the encoding device 200 disclosed in Figure 2 The predictor 220 disclosed in (more specifically, the intra predictor 222) is executed, and Figure 14 Steps S1420 to S1430 can be performed by Figure 2 The entropy encoder 240 disclosed in is executed. In addition, Figure 14 The method disclosed in the present invention may include the above-mentioned embodiments herein. Therefore, the descriptions overlapping with those of the above-mentioned embodiments will be omitted or simplified. Figure 14 Detailed description.

[0157] Reference Figure 14 , the encoding apparatus may configure a most probable mode (MPM) list including candidate intra prediction modes for the current block S1400.

[0158] In one embodiment, the encoding device may derive the left mode as the candidate intra-frame prediction mode of the left neighboring block of the current block and may derive the upper mode as the candidate intra-frame prediction mode of the upper neighboring block of the current block. Here, the left neighboring block may refer to the bottom neighboring block among the left neighboring blocks located adjacent to the left of the current block, and the upper neighboring block may refer to the rightmost neighboring block located adjacent to the upper edge of the current block. For example, if the size of the current block is WxH, the x component of the upper left sample position of the current block is x N and its y component is y N , then the left neighboring block may be (x N-1 ,y N+H-1 ) coordinates, and the upper neighboring block may be a block including (x N+W-1 ,y N-1 ) coordinates of the block of samples.

[0159] For example, when the left neighboring block is available and intra prediction is applied to the left neighboring block, the encoding device may derive the intra prediction mode of the left neighboring block as the left candidate intra prediction mode (i.e., left mode). When the upper neighboring block is available, intra prediction is applied to the upper neighboring block, and the upper neighboring block is included in the current CTU, the encoding device may derive the intra prediction mode of the upper neighboring block as the upper candidate intra prediction mode (i.e., upper mode). Alternatively, when the left neighboring block is not available or intra prediction is not applied to the left neighboring block, the encoding device may derive the plane mode as the left mode. When the upper neighboring block is not available, intra prediction is not applied to the upper neighboring block, or the upper neighboring block is not included in the current CTU, the encoding device may derive the plane mode as the upper mode.

[0160] The encoding device can construct an MPM list by deriving candidate intra prediction modes for the current block based on the left mode derived from the left neighboring block and the upper mode derived from the upper neighboring block. At this time, the MPM list may include the left mode and the upper mode and may also include a specific intra prediction mode according to a predetermined method.

[0161] In one embodiment, the encoding device may determine whether to perform intra prediction by applying multiple reference lines to the current block and may derive a specific intra prediction mode based on the determination and include the derived intra prediction mode in the MPM list. When intra prediction is performed by applying multiple reference lines to the current block, the encoding device may generate and signal reference line index information. The reference line index information may include an index value indicating a reference line used for intra prediction of the current block and may be signaled in the form of the above-mentioned intra_luma_ref_idx syntax element. When the value of intra_luma_ref_idx is 0, it may indicate that intra prediction is performed using the reference sample closest to the current block (i.e., the reference sample at a zero sample distance). When the value of intra_luma_ref_idx is 1, it may indicate that intra prediction is performed using the second closest reference sample to the current block (i.e., the reference sample at a one sample distance). When the value of intra_luma_ref_idx is 2, it may indicate that intra prediction is performed using a reference sample that is third or fourth nearest to the current block (ie, a reference sample at a distance of two or three samples).

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

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

[0164] In one embodiment, the encoding device may perform various intra prediction modes on the current block to derive an intra prediction mode with an optimal rate-distortion (RD) cost, and determine the derived intra prediction mode as the intra prediction mode of the current block. In this case, the encoding device may derive the optimal intra prediction mode for the current block based on an intra prediction mode including two non-directional intra prediction modes and 65 intra directional prediction modes. Alternatively, the encoding device may determine the optimal intra prediction mode using only the MPM candidates including the MPM list. Here, the MPM candidates may include candidate intra prediction modes and / or planar modes according to the number of candidates in the MPM list. For example, when the number of candidates in the MPM list is 6, the MPM candidates may include planar modes and candidate intra prediction modes, and when the number of candidates in the MPM list is 5, the MPM candidates may include candidate intra prediction modes.

[0165] For example, when the value of the reference line index information is not 0, the encoding device may derive the optimal intra prediction mode of the current block by using the MPM candidate intra prediction modes included in the MPM list. In other words, in this case, the intra prediction mode of the current block may be determined only from the candidate intra prediction modes (and planar modes) including the DC mode in the MPM list. In addition, when the value of the reference line index information is not 0, the encoding device may not encode / signal the MPM flag information. In this way, when the MPM flag information is not encoded / signaled, the value of the MPM flag information may be derived as 1. As described above, the MPM flag information may be expressed in the form of the intra_luma_mpm_flag syntax element. For example, when the value of intra_luma_mpm_flag is 1, it indicates that the intra prediction mode of the current block is selected from the MPM candidate intra prediction modes (candidate intra prediction modes and / or planar modes), and when the value of intra_luma_mpm_flag is 0, it may indicate that the intra prediction mode of the current block is not selected from the MPM candidate intra prediction modes (candidate intra prediction modes and / or planar modes).

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

[0167] In one embodiment, when the value of the reference line index information is not 0 and the value of the MPM flag information is derived as 1, the encoding device generates an index value indicating one of the candidate intra prediction modes in the MPM list and encodes the generated index value into the MPM index information. In other words, when the value of the reference line index information is not 0 and the value of the MPM flag information is derived as 1, the MPM index information may be encoded / signaled.

[0168] For example, when the intra prediction mode of the current block is derived as the DC mode included in the MPM list, MPM index information may be generated as an index value indicating the DC mode among the candidate intra prediction modes included in the MPM list. At this time, when the DC mode is included in the first order of the MPM list, the MPM index information may be encoded to have an index value of 0. Alternatively, when the DC mode is included in the last order of the MPM list, the MPM index information may be encoded to have an index value of n according to the number of candidates in the MPM list (for example, n is 5 when the number of candidates is 6, or n is 4 when the number of candidates is 5).

[0169] In addition, the encoding device may generate prediction samples for the current block by performing intra prediction based on the intra prediction mode determined for the current block. For example, when the intra prediction mode of the current block is derived as the DC mode included in the MPM list, the encoding device may derive neighboring reference samples of the DC mode for the current block based on whether the current block is a square block or a non-square block, calculate a DC value for the current block based on the neighboring reference samples, and generate prediction samples based on the DC value. At this time, the process of deriving neighboring reference samples may be applied to the referenced image. Figure 12 and Figure 13 The above various embodiments are described in detail.

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

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

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

[0173] In addition, the encoding device may derive residual samples of the current block based on the predicted samples of the current block and the original samples of the current block. In addition, the encoding device may generate residual information about the current block based on the residual samples and encode image information including the residual information. Here, the residual information may include information about quantized transform coefficients derived by performing transform and quantization on the residual samples, position information, transform technology, transform kernel, and quantization parameter.

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

[0175] In one embodiment, the encoding device may encode image information and output the encoded image information in the form of a bitstream, where the image information includes reference line index information determined based on whether MRL-based intra prediction is applied and intra prediction mode information of the current block derived based on the MPM list (e.g., MPM index information). In addition, the encoding device may also derive and encode residual information, and output the encoded residual information in the form of a bitstream.

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

[0177] The process of generating prediction samples for the current block can be done by Figure 2 The intra-frame predictor 222 of the encoding device 200 disclosed in the embodiment of the present invention is executed, and the process of deriving the residual sample can be performed by Figure 2 The subtractor 231 of the encoding device 200 disclosed in the embodiment of the present invention is executed, and the process of generating residual information and encoding it can be performed by Figure 2The residual processor 230 and the entropy encoder 240 of the encoding device 200 disclosed in the embodiment of the present invention are performed.

[0178] Figure 15 is a flowchart illustrating a decoding method that may be performed by a decoding device according to one embodiment of the present disclosure.

[0179] Figure 15 The method disclosed in Figure 3 Specifically, steps S1500 to S1520 may be performed by the decoding device 300 disclosed in Figure 3 The predictor 330 disclosed in (more specifically, the intra predictor 331) is executed, and Figure 15 The S1530 steps can be made by Figure 3 In addition, Figure 15 The method disclosed in the present invention may include the above-mentioned embodiments herein. Therefore, the descriptions overlapping with those of the above-mentioned embodiments will be omitted or simplified. Figure 15 Detailed description.

[0180] Reference Figure 15 , the decoding apparatus may configure a most probable mode (MPM) list including candidate intra prediction modes for the current block S1500.

[0181] In one embodiment, the decoding device may derive the left mode as the candidate intra-frame prediction mode of the left neighboring block of the current block and may derive the upper mode as the candidate intra-frame prediction mode of the upper neighboring block of the current block. Here, the left neighboring block may refer to the bottom neighboring block among the left neighboring blocks located adjacent to the left of the current block, and the upper neighboring block may refer to the rightmost neighboring block located adjacent to the upper edge of the current block. For example, if the size of the current block is WxH, the x component of the upper left sample position of the current block is x N , and its y component is y N , then the left neighboring block may be (x N-1 ,y N+H-1 ) coordinates, and the upper neighboring block may be a block including (x N+W-1, y N-1 ) coordinates of the block of samples.

[0182] For example, when the left neighboring block is available and intra prediction is applied to the left neighboring block, the decoding device may derive the intra prediction mode of the left neighboring block as the left candidate intra prediction mode (i.e., left mode). When the upper neighboring block is available, intra prediction is applied to the upper neighboring block, and the upper neighboring block is included in the current CTU, the decoding device may derive the intra prediction mode of the upper neighboring block as the upper candidate intra prediction mode (i.e., upper mode). Alternatively, when the left neighboring block is not available or intra prediction is not applied to the left neighboring block, the decoding device may derive the plane mode as the left mode. When the upper neighboring block is not available, intra prediction is not applied to the upper neighboring block, or the upper neighboring block is not included in the current CTU, the decoding device may derive the plane mode as the upper mode.

[0183] The decoding device can construct an MPM list by deriving candidate intra prediction modes for the current block based on the left mode derived from the left neighboring block and the upper mode derived from the upper neighboring block. At this time, the MPM list may include the left mode and the upper mode and may also include a specific intra prediction mode according to a predetermined method.

[0184] In one embodiment, the decoding device may determine whether to perform intra prediction by applying multiple reference lines to the current block, and may derive a specific intra prediction mode based on the determination and include the derived intra prediction mode in the MPM list. In other words, the decoding device may determine whether to perform intra prediction by applying multiple reference lines to the current block by obtaining reference line index information. The reference line index information may include an index value indicating a reference line used for intra prediction of the current block and may be signaled in the form of the above-mentioned intra_luma_ref_idx syntax element. When the value of intra_luma_ref_idx is 0, it may indicate that intra prediction is performed using the reference sample closest to the current block (i.e., the reference sample at a zero sample distance). When the value of intra_luma_ref_idx is 1, it may indicate that intra prediction is performed using the second closest reference sample to the current block (i.e., the reference sample at a one sample distance). When the value of intra_luma_ref_idx is 2, it may indicate that intra prediction is performed using a reference sample that is third or fourth nearest to the current block (ie, a reference sample at a distance of two or three samples).

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

[0186] The decoding apparatus may derive an intra prediction mode of the current block from the MPM list based on the MPM index information S1510.

[0187] In one embodiment, the decoding device may obtain intra prediction mode information of the current block from the bitstream. The intra prediction mode information indicates the intra prediction mode of the current block, including MPM flag information, MPM index information, and residual mode information.

[0188] At this time, when the value of the reference line index information is not 0, the encoding device may not signal the MPM flag information. In this way, when the MPM flag information is not signaled, the decoding device may derive the value of the MPM flag information as 1. As described above, the MPM flag information may be signaled in the form of the intra_luma_mpm_flag syntax element. For example, when the value of intra_luma_mpm_flag is 1, it indicates that the intra prediction mode of the current block is selected from the MPM candidate intra prediction mode (candidate intra prediction mode and / or plane mode), and when the value of intra_luma_mpm_flag is 0, it may indicate that the intra prediction mode of the current block is not selected from the MPM candidate intra prediction mode (candidate intra prediction mode and / or plane mode). Here, the MPM candidate intra prediction mode may include a candidate intra prediction mode and / or a plane mode depending on the number of candidates of the MPM list. For example, when the number of candidates of the MPM list is 6, the MPM candidates may include a planar mode and a candidate intra prediction mode, and when the number of candidates of the MPM list is 5, the MPM candidates may include a candidate intra prediction mode.

[0189] In addition, when the value of the reference line index information is not 0 and the value of the MPM flag information is derived as 1, the MPM index information may be signaled from the encoding device. In other words, the decoding device may obtain the MPM index information from the bitstream and decode the obtained bitstream. As described above, the MPM index information includes an index value indicating the intra prediction mode of the current block among the candidate intra prediction modes included in the MPM list. For example, the index value may be expressed in the form of the intra_luma_mpm_idx syntax element.

[0190] In other words, when the value of the reference line index information is not 0 and the value of the MPM flag information is derived to be 1, the decoding device can obtain the MPM index information and decode it and derive the intra-frame prediction mode of the current block from the MPM list based on the decoded MPM index information.

[0191] For example, when the MPM index information indicates the DC mode among the candidate intra prediction modes included in the MPM list, the decoding device may derive the intra prediction mode of the current block as the DC mode. At this time, when the DC mode is included in the first order of the MPM list, the MPM index information may be signaled by being encoded to have an index value of 0. Alternatively, when the DC mode is included in the last order of the MPM list, the MPM index information may be signaled by being encoded to have an index value of n according to the number of candidates in the MPM list (for example, n is 5 when the number of candidates is 6, or n is 4 when the number of candidates is 5).

[0192] The decoding apparatus may generate prediction samples for the current block based on the intra prediction mode S1520.

[0193] For example, when the intra prediction mode of the current block is derived as the DC mode included in the MPM list, the decoding device may derive neighboring reference samples for the DC mode of the current block based on whether the current block is a square block or a non-square block, calculate a DC value for the current block based on the neighboring reference samples, and generate a prediction sample based on the DC value. At this time, the process of deriving neighboring reference samples may be applied to the referenced Figure 12 and Figure 13 The above various embodiments are described in detail.

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

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

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

[0197] The decoding apparatus may generate a reconstructed picture for the current block based on the prediction sample S1530.

[0198] In one embodiment, the decoding device may directly use the predicted samples as reconstructed samples or generate reconstructed samples by adding residual samples to the predicted samples according to the prediction mode.

[0199] When residual samples exist for the current block, the decoding device may receive information about the residual of the current block. The information about the residual may include transform coefficients for the residual samples. The decoding device may derive residual samples (or a residual sample array) for the current block based on the residual information. The decoding device may generate reconstructed samples based on the predicted samples and the residual samples and derive a reconstructed block or a reconstructed picture based on the reconstructed samples. Thereafter, the decoding device may apply a loop filtering process, such as deblocking filtering and / or a SAO process, to the reconstructed picture as needed to enhance subjective / objective image quality as described above.

[0200] In the exemplary system described above, the method is described according to a flowchart using a series of steps and blocks. However, the present disclosure is not limited to a specific order of steps, and some steps may be performed together with different steps and in a different order than the above steps or simultaneously. In addition, it should be understood by those skilled in the art that the steps shown in the flowchart are not exclusive and other steps may be included, or one or more steps of the flowchart may be deleted without affecting the technical scope of the present disclosure.

[0201] The method according to the present disclosure may be implemented in the form of software, and the encoding device and / or decoding device according to the present disclosure may be included in devices that perform image processing, such as TVs, computers, smart phones, set-top boxes, and display devices.

[0202] When the embodiments of the present disclosure are implemented by software, the aforementioned method can be implemented by a module (process or function) that performs the aforementioned functions. The module can be stored in a memory and executed by a processor. The memory can be installed inside or outside the processor and can be connected to the processor via various well-known means. The processor may include an application-specific integrated circuit (ASIC), other chipsets, logic circuits and / or data processing devices. The memory may include a read-only memory (ROM), a random access memory (RAM), a flash memory, a memory card, a storage medium and / or other storage devices. In other words, the embodiments according to the present disclosure can be implemented and executed on a processor, a microprocessor, a controller or a chip. For example, the functional units illustrated in each figure can be implemented and executed on a computer, a processor, a microprocessor, a controller or a chip. In this case, information about the implementation (for example, information about instructions) or an algorithm can be stored in a digital storage medium.

[0203] In addition, the decoding device and encoding device to which the present disclosure is applied may be included in the following: a multimedia broadcast transceiver, a mobile communication terminal, a home theater video device, a digital theater video device, a surveillance camera, a video chat device, and a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camera, a video on demand (VoD) service provider, an over-the-air (OTT) video device, an Internet streaming service provider, a 3D video device, a virtual reality (VR) device, an augmented reality (AR) device, an image phone video device, a vehicle terminal (e.g., a vehicle (including an autonomous vehicle) terminal, an aircraft terminal, or a ship terminal) and a medical video device; and can be used to process image signals or data. For example, an OTT video device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smart phone, a tablet PC, and a digital video recorder (DVR).

[0204] In addition, the processing method to which the present disclosure is applied can be generated in the form of a program executed by a computer and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the present disclosure can also be stored in a computer-readable recording medium. Computer-readable recording media include all kinds of storage devices and distributed storage devices in which computer-readable data are stored. Computer-readable recording media may include, for example, Blu-ray discs (BDs), universal serial buses (USBs), ROMs, PROMs, EPROMs, EEPROMs, RAMs, CD-ROMs, magnetic tapes, floppy disks, and optical data storage devices. Computer-readable recording media also include media embodied in the form of carrier waves (e.g., transmission over the Internet). In addition, the bit stream generated by the encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0205] In addition, the embodiments of the present disclosure may be embodied as a computer program product based on program code, and the program code may be executed on a computer according to the embodiments of the present disclosure. The program code may be stored on a computer readable carrier.

[0206] Figure 16 represents an example of a content streaming system to which embodiments herein may be applied.

[0207] refer to Figure 16 The content streaming system to which the embodiments of this document are applied may generally include an encoding server, a streaming server, a network server, a media storage device, a user device, and a multimedia input device.

[0208] The encoding server is used to compress content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data, generate a bitstream, and transmit it to the streaming server. As another example, if the multimedia input device such as smartphones, cameras, and camcorders directly generates the bitstream, the encoding server can be omitted.

[0209] The bitstream may be generated by the encoding method or the bitstream generation method to which the embodiments of this document are applied, and the streaming server may temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0210] The streaming server transmits multimedia data to the user device via a network server based on the user's request. The network server serves as a tool for notifying the user of available services. When the user requests a desired service, the network server transfers the request to the streaming server, and the streaming server transmits the multimedia data to the user. In this regard, the content streaming system may include a separate control server, and in this case, the control server is used to control the commands and responses between the various devices in the content streaming system.

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

[0212] For example, user devices may include mobile phones, smart phones, laptop computers, digital broadcast terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation, tablet PCs, tablet PCs, ultrabooks, wearable devices (e.g., watch-type terminals (smart watches), glasses-type terminals (smart glasses), head-mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc.

[0213] Each server in the content streaming system may be operated as a distributed server, and in such case, data received by each server may be processed in a distributed manner.

Claims

1. A method for decoding an image, the method comprising: receiving a bitstream including prediction mode information and residual information; Determining to apply intra-frame prediction to the current block based on the prediction mode information; Constructing a most probable mode (MPM) list comprising candidate intra prediction modes for the current block; deriving the intra prediction mode of the current block from the MPM list based on MPM index information indicating the intra prediction mode of the current block among the candidate intra prediction modes included in the MPM list; deriving a prediction sample of the current block based on the intra prediction mode; generating a residual sample of the current block based on the residual information; as well as Generate a reconstructed picture based on the predicted samples and the residual samples, The constructing of the MPM list includes deriving a DC mode as one of the candidate intra prediction modes to include the DC mode in the MPM list based on a value of reference line index information indicating a reference line used for intra prediction of the current block being not equal to 0, wherein the DC mode is derived as the intra prediction mode of the current block based on the MPM index information indicating the DC mode among the candidate intra prediction modes included in the MPM list, The reference line n is used to generate the prediction sample of the current block based on the value of the reference line index information not being equal to 0, wherein n is greater than 0, and The generation of the prediction sample of the current block includes: calculating a DC value for the current block by using specific reference samples among reference samples in a reference line n of the current block, wherein the reference samples include a left reference sample and an above reference sample in a reference line n of the current block; and deriving the prediction sample based on the DC value, The specific reference sample is determined based on whether the current block is a square block or a non-square block, wherein, based on the current block being the square block, the specific reference samples used to calculate the DC value include both the left reference sample in the reference line n and the upper reference sample in the reference line n, wherein, based on the current block being the non-square block and the width of the current block being 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, and Wherein, based on the fact that the current block is the non-square block and the width of the current block is smaller 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.

2. A method for encoding an image, the method comprising: Determining to apply intra prediction to the current block; Constructing a most probable mode (MPM) list comprising candidate intra prediction modes for the 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 indicating the intra prediction mode of the current block among the candidate intra prediction modes included in the MPM list; generating prediction samples of the current block based on the intra prediction mode, generating residual samples of the current block based on the prediction samples; generating residual information based on the residual samples; as well as encoding image information, the image information including at least one of reference line index information indicating a reference line used for intra prediction of the current block, the MPM index information, or the residual information, The step of constructing the MPM list includes deriving the DC mode as one of the candidate intra prediction modes based on the value of the reference line index information being not equal to 0, so as to include the DC mode in the MPM list. wherein, based on the intra prediction mode of the current block being 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; Wherein, based on the value of the reference line index information not being equal to 0, the reference line n is used to generate the prediction sample of the current block, wherein n is greater than 0, and The generation of the prediction sample of the current block includes: calculating a DC value for the current block by using specific reference samples among reference samples in a reference line n of the current block based on the DC mode applied to the current block, wherein the reference samples include a left reference sample and an above reference sample in a reference line n of the current block; and deriving the prediction sample based on the DC value, The specific reference sample is determined based on whether the current block is a square block or a non-square block, wherein, based on the current block being the square block, the specific reference samples used to calculate the DC value include both the left reference sample in the reference line n and the upper reference sample in the reference line n, wherein, based on the current block being the non-square block and the width of the current block being 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 of the reference line n, and Wherein, based on the fact that the current block is the non-square block and the width of the current block is smaller 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.

3. A computer-readable storage medium having stored thereon a computer program / instruction and a bit stream, characterized in that: When the computer program / instructions are executed by a processor, the computer program / instructions implement the steps of the image encoding method according to claim 2 to generate the bit stream.

4. A method for transmitting image data, the method comprising: obtaining a bitstream of the image, wherein the bitstream is generated based on: determining to apply intra prediction to a current block, constructing a most probable mode (MPM) list including candidate intra prediction modes for the current block, deriving an intra prediction mode for the current block based on the candidate intra prediction modes included in the MPM list, generating MPM index information indicating the intra prediction mode of the current block among the candidate intra prediction modes included in the MPM list, generating prediction samples of the current block based on the intra prediction mode, generating residual samples of the current block based on the prediction samples, generating residual information based on the residual samples, and encoding image information, the image information including at least one of reference line index information, the MPM index information, or the residual information; and sending said data comprising said bitstream, The constructing of the MPM list includes deriving the DC mode as one of the candidate intra prediction modes based on the value of the reference line index information being not equal to 0, so as to include the DC mode in the MPM list. wherein, based on the intra prediction mode of the current block being 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; Wherein, based on the value of the reference line index information not being equal to 0, the reference line n is used to generate the prediction sample of the current block, wherein n is greater than 0, and The generation of the prediction sample of the current block includes: calculating a DC value for the current block by using specific reference samples among reference samples in a reference line n of the current block based on the DC mode applied to the current block, wherein the reference samples include a left reference sample and an above reference sample in a reference line n of the current block; and deriving the predicted sample based on the DC value, The specific reference sample is determined based on whether the current block is a square block or a non-square block, wherein, based on the current block being the square block, the specific reference samples used to calculate the DC value include both the left reference sample in the reference line n and the upper reference sample in the reference line n, wherein, based on the current block being the non-square block and the width of the current block being 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 of the reference line n, and Wherein, based on the fact that the current block is the non-square block and the width of the current block is smaller 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.

Citation Information

Patent Citations

  • Method and device for intra prediction

    CN108174206A

  • Implicit coding of reference line index used in intra prediction

    CN109196867A