Intra prediction method and apparatus based on intra prediction mode derivation

The use of Decoder Side Intra Mode (DIMD) in video coding addresses the challenge of high data transmission and storage costs for high-resolution and immersive media by efficiently deriving intra prediction modes, thereby reducing the amount of transmitted data and improving compression efficiency.

JP2025501235APending Publication Date: 2025-01-17LG ELECTRONICS INC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
JP2024539512
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2021-12-30
Filing Date
2022-12-30
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality images and immersive media such as VR and AR content poses challenges in efficiently compressing, transmitting, and storing video data, leading to high transmission and storage costs due to the increased amount of information required, and there is a need to reduce the bits transmitted in signaling data for intra prediction modes.

Method used

A method and apparatus for video coding that utilizes Decoder Side Intra Mode (DIMD) to derive intra prediction modes, including obtaining a bitstream, deriving an intra prediction mode for the current block, and generating prediction samples based on whether DIMD is applied, which is used in encoding and decoding processes.

Benefits of technology

This approach reduces the amount of information transmitted and enhances the efficiency of video compression, making it suitable for high-resolution and immersive media, while maintaining image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025501235000001_ABST
    Figure 2025501235000001_ABST
Patent Text Reader

Abstract

According to the present disclosure, an image decoding method performed by a decoding device includes the steps of obtaining a bitstream including image information, deriving a Decoder Side Intra Mode Derivation (DIMD) mode for a current block, deriving an intra prediction mode for the current block, generating a prediction sample for the current block based on the intra prediction mode for the current block, and generating a reconstructed sample for the current block based on the prediction sample for the current block, wherein the intra prediction mode for the current block is derived based on whether the DIMD mode is applied to the current block.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This document relates to video coding techniques, and more particularly, to a method and apparatus for coding intra-prediction modes in a video coding system. [Background technology]

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

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

[0004] Therefore, there is a demand for a highly efficient image compression technology in order to effectively compress, transmit, store and play back high-resolution, high-quality image / video information having the above-mentioned various characteristics.

[0005] In addition, a technique for reducing the amount of information or bits transmitted in the process of signaling data for intra-prediction modes and deriving various intra-prediction modes is required. Summary of the Invention [Means for solving the problem]

[0006] According to an embodiment of the present document, there is provided a video decoding method performed by a decoding device, the decoding method including the steps of: obtaining a bitstream including video information, deriving a Decoder Side Intra Mode Derivation (DIMD) mode for a current block, deriving an intra prediction mode for the current block, generating prediction samples for the current block based on the intra prediction mode for the current block, and generating reconstructed samples for the current block based on the prediction samples for the current block, wherein the intra prediction mode for the current block is derived based on whether the DIMD mode is applied to the current block.

[0007] According to another embodiment of the present document, there is provided an encoding method performed by an encoding apparatus, the encoding method including the steps of: deriving a Decoder Side Intra Mode Derivation (DIMD) mode for a current block, determining an intra prediction mode for the current block, generating prediction samples for the current block based on the intra prediction mode for the current block, generating prediction related information based on the prediction samples for the current block, and encoding video information including the prediction related information, wherein the intra prediction mode for the current block is determined based on whether the DIMD mode is applied to the current block.

[0008] According to another embodiment of the present document, there is provided a computer-readable digital storage medium, the digital storage medium storing a bitstream generated by a specific method, the specific method including the steps of: deriving a Decoder Side Intra Mode Derivation (DIMD) mode for a current block, determining an intra prediction mode for the current block, generating prediction samples for the current block based on the intra prediction mode for the current block, generating prediction related information based on the prediction samples for the current block, and encoding video information including the prediction related information, wherein the intra prediction mode for the current block is determined based on whether the DIMD mode is applied to the current block.

[0009] According to another embodiment of the present document, there is provided a method for transmitting data for an image, the method including the steps of: deriving a Decoder Side Intra Mode Derivation (DIMD) mode for a current block; determining an intra prediction mode for the current block; generating prediction samples for the current block based on the intra prediction mode for the current block; generating prediction related information based on the prediction samples for the current block; and encoding image information including the prediction related information, wherein a bitstream is generated based on the steps of: generating a decoder side intra mode derivation (DIMD) mode for the current block; determining an intra prediction mode for the current block; generating prediction related information based on the prediction samples for the current block; and encoding image information including the prediction related information; and transmitting the data including the bitstream, wherein the intra prediction mode for the current block is determined based on whether the DIMD mode is applied to the current block.

[0010] According to another embodiment of the present document, a computer-readable digital storage medium is provided that stores encoded information or encoded video / image information that enables a decoding device to perform the video / image decoding method disclosed in at least one of the embodiments of the present document.

[0011] According to another embodiment of the present document, there is provided a method and apparatus for transmitting a bitstream generated by a video / image encoding method disclosed in at least one of the embodiments of the present document. [Brief description of the drawings]

[0012] [Figure 1] 1 illustrates generally an example of a video / image coding system that can be applied to embodiments of the present document; [Diagram 2] FIG. 1 is a diagram illustrating the configuration of a video / image encoding device that can be applied to an embodiment of this document. [Diagram 3] FIG. 1 is a diagram illustrating the configuration of a video / image decoding device that can be applied to an embodiment of this document. [Figure 4] 1 shows an exemplary hierarchical structure for coded video / images. [Diagram 5] 1 illustrates an example of a general intra-prediction based video encoding method to which the embodiments of this document can be applied. [Figure 6] 1 illustrates a schematic diagram of an intra prediction unit in an encoding device. [Figure 7] 1 illustrates an example of a general intra-prediction based video decoding method to which the embodiments of this document can be applied. [Figure 8] 2 illustrates a schematic diagram of an intra-prediction unit in a decoding device. [Figure 9] 1 illustrates an exemplary schematic intra-prediction procedure to which the embodiments of this document can be applied. [Figure 10] 1 illustrates an example of an intra-prediction mode to which the embodiment of this document can be applied. [Figure 11] 13 illustrates an example of a template used to derive an intra-prediction mode for a TIMD mode. [Figure 12] 13 illustrates an exemplary construction method of a Histogram of Gradients (HoG) used to derive an intra-prediction mode for a DIMD mode. [Figure 13] 13 illustrates an exemplary method for constructing a prediction block by applying a DIMD mode. [Figure 14] 1 illustrates a schematic diagram of an example video / image encoding method and associated components according to an embodiment of the present document; [Figure 15] 1 illustrates a schematic diagram of an example video / image encoding method and associated components according to an embodiment of the present document; [Figure 16] 1 illustrates a schematic diagram of an example of a video / image decoding method and related components according to an embodiment of the present document; [Figure 17] 1 illustrates a schematic diagram of an example of a video / image decoding method and related components according to an embodiment of the present document; [Figure 18] 1 illustrates an example of a content streaming system in which the embodiments disclosed herein can be applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

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

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

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

[0016] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document may be related to the versatile video coding (VVC) standard (ITU-T Rec. H.266), a next-generation video / image coding standard after VVC, or other video coding related standards (e.g., the High Efficiency Video Coding (HEVC) standard (ITU-T Rec. H.265), the essential video coding (EVC) standard, the AVS2 standard, etc.).

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

[0018] In this document, various embodiments relating to video / image coding are presented, which may be performed in combination with each other, unless otherwise stated.

[0019] In this document, video may refer to a collection of a series of images over time. A picture generally refers to a unit showing one image at a specific time, and a subpicture / slice / tile is a unit that constitutes a part of a picture in coding. A subpicture / slice / tile may include one or more coding tree units (CTUs). A picture may consist of one or more subpictures / slices / tiles. A picture may consist of one or more tile groups. A tile group may include one or more tiles. A brick may refer to a rectangular area of ​​a CTU row in a tile in a picture. A tile may be partitioned into multiple bricks, and each brick may consist of one or more CTU rows in the tile. A tile that is not partitioned into multiple bricks may also be called a brick. A brick scan may indicate a particular sequential ordering of CTUs partitioning a picture, where the CTUs may be aligned in a brick by a CTU raster scan, the bricks in a tile may be aligned consecutively by a raster scan of the bricks in the tile, and the tiles in a picture may be aligned consecutively by a raster scan of the tiles in the picture. A sub-picture may also indicate a rectangular region of one or more slices in a picture. That is, a sub-picture may include one or more slices that collectively cover a rectangular region of a picture. A tile is a specific tile column and a rectangular region of a CTU within the specific tile column. The tile column is a rectangular region of a CTU, where the rectangular region has a height equal to the height of the picture, and a width may be specified by a syntax element in a picture parameter set. The tile row is a rectangular region of a CTU, where the rectangular region has a width equal to the height of the picture, and a height is equal to the height of the picture, which is specified by a syntax element in a picture parameter set.A tile scan may indicate a particular sequential ordering of CTUs that partition a picture, and the CTUs may be consecutively aligned with a raster scan of CTUs within a tile, and tiles within a picture may be consecutively aligned with a raster scan of the tiles of the picture. A slice may contain an integer number of bricks of a picture, and the integer number of bricks may be contained in one NAL unit. A slice may consist of a number of complete tiles, or may be a continuous sequence of complete bricks of one tile. In this document, tile group and slice may be used interchangeably. For example, in this document, tile group / tile group header may be referred to as slice / slice header.

[0020] A pixel or a pel can mean the smallest unit that constitutes one picture (or image). A term corresponding to a pixel can also be used as a "sample." A sample can generally indicate a pixel or a pixel value, and can represent only a pixel / pixel value of a luma component, or can indicate only a pixel / pixel value of a chroma component.

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

[0022] As used herein, "A or B" can mean "only A," "only B," or "both A and B." In other words, as used herein, "A or B" can be interpreted as "A and / or B." For example, as used herein, "A, B or C" can mean "only A," "only B," "only C," or "any combination of A, B and C."

[0023] As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Thus, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C."

[0024] In this specification, "at least one of A and B" can mean "only A", "only B", or "both A and B". In addition, in this specification, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted as "at least one of A and B".

[0025] In addition, in this specification, "at least one of A, B and C" can mean "only A," "only B," "only C," or "any combination of A, B and C." In addition, "at least one of A, B or C" or "at least one of A, B and / or C" can mean "at least one of A, B and C."

[0026] Furthermore, parentheses used in the present specification may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction." In other words, "prediction" in the present specification is not limited to "intra prediction," and "intra prediction" is proposed as an example of "prediction." Also, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction."

[0027] In this specification, technical features described individually in one drawing can be realized individually or simultaneously.

[0028] The following drawings are created to explain a specific example of the present specification. The names of specific devices and names of specific signals / messages / fields described in the drawings are presented for illustrative purposes only, and the technical features of the present specification are not limited to the specific names used in the following drawings.

[0029] FIG. 1 illustrates a schematic diagram of an example of a video / image coding system to which this document can be applied.

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

[0031] The source device may include a video source, an encoding device, and a sending unit. The receiving device may include a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / 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 also include a display unit, which may be a separate device or an external component.

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

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

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

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

[0036] The renderer can render the decoded video / images. The rendered video / images can be displayed via a display unit.

[0037] 2 is a diagram for explaining the configuration of a video / image encoding device to which this document can be applied. Hereinafter, the video encoding device may include an image encoding device.

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

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

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

[0041] The subtraction unit 231 may subtract a prediction signal (predicted block, prediction sample, or prediction sample array) output from the prediction unit 220 from an input image signal (original block, original samples, or original sample array) to generate a residual signal (residual block, residual sample, or residual sample array), and the generated residual signal is transmitted to the conversion unit 232. The prediction unit 220 may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including a prediction sample for the current block. The prediction unit 220 may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as described below in the description of each prediction mode. The prediction information may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.

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

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

[0044] The prediction unit 220 may generate a prediction signal based on various prediction methods described below. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). The prediction unit may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for content image / moving image coding such as games, for example, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document.

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

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

[0047] The quantized transform coefficients output from the quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be reconstructed by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 250 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample, or reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the predictor 220. When there is no residual for the current block, such as when a skip mode is applied, the predicted block may be used as a reconstructed block. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.

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

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

[0050] The modified reconstructed picture transmitted to the memory 270 can be used as a reference picture in the inter prediction unit 280. When inter prediction is applied through this, the encoding device can avoid prediction mismatch between the encoding device 200 and the decoding device, and can also improve encoding efficiency.

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

[0052] FIG. 3 is a diagram illustrating a schematic configuration of a video / image decoding device to which this document can be applied.

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

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

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

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

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

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

[0059] The predictor may generate a prediction signal based on various prediction methods described below. For example, the predictor may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). The predictor may also perform intra block copy (IBC) for prediction of a block. The intra block copy may be used for content image / moving image coding such as games, for example, as in screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document.

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

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

[0062] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to the prediction signal (predicted block, predicted sample array) output from the prediction unit 330. When there is no residual for the current block, such as when the skip mode is applied, the predicted block may be used as the reconstructed block.

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

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

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

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

[0067] In this specification, the embodiments described for the prediction unit 330, inverse quantization unit 321, inverse transform unit 322, and filtering unit 350 of the decoding device 300 can be applied identically or correspondingly to the prediction unit 220, inverse quantization unit 234, inverse transform unit 235, and filtering unit 260 of the encoding device 200, respectively.

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

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

[0070] In this document, at least one of quantization / dequantization and / or transform / inverse transform may be omitted. If the quantization / dequantization is omitted, the quantized transform coefficients may be referred to as transform coefficients. If the transform / inverse transform is omitted, the transform coefficients may be referred to as coefficients or residual coefficients, or may still be referred to as transform coefficients for uniformity of expression. In addition, whether or not the transform / inverse transform is omitted may be signaled based on transform_skip_flag.

[0071] In this document, the quantized transform coefficients and the transform coefficients may be referred to as transform coefficients and scaled transform coefficients, respectively. In this case, the residual information may include information on the transform coefficient(s), and the information on the transform coefficient(s) may be signaled via a residual coding syntax. Transform coefficients may be derived based on the residual information (or information on the transform coefficient(s)), and scaled transform coefficients may be derived via an inverse transform (scaling) on ​​the transform coefficients. Residual samples may be derived based on an inverse transform (transform) on the scaled transform coefficients. This may be similarly applied / expressed in other parts of this document.

[0072] A prediction unit of an encoding device / decoding device may perform inter prediction in units of blocks to derive prediction samples. Inter prediction may indicate a prediction derived in a manner that is dependent on data elements (e.g., sample values ​​or motion information) of picture(s) other than the current picture. When inter prediction is applied to a current block, a predicted block (prediction sample array) for the current block may be derived based on a reference block (reference sample array) identified by a motion vector on a reference picture pointed to by a reference picture index. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, motion information of the current block may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between adjacent blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.) information. When inter prediction is applied, the neighboring blocks may include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring blocks may be the same or different. The temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and the reference picture including the temporal neighboring blocks may be called collocated pictures (colPic).For example, a motion information candidate list may be constructed based on neighboring blocks of the current block, and flag or index information indicating which candidate is selected (used) to derive a motion vector and / or a reference picture index of the current block may be signaled. Inter prediction may be performed based on various prediction modes, for example, in skip mode and merge mode, the motion information of the current block is the same as the motion information of the selected neighboring block. In skip mode, unlike merge mode, no residual signal is transmitted. In motion vector prediction (MVP) mode, the motion vector of the selected neighboring block may be used as a motion vector predictor, and a motion vector difference may be signaled. In this case, the motion vector of the current block may be derived using the sum of the motion vector predictor and the motion vector difference.

[0073] The motion information may include L0 motion information and / or L1 motion information depending on the inter prediction type (L0 prediction, L1 prediction, Bi prediction, etc.). A motion vector in the L0 direction may be referred to as an L0 motion vector or MVL0, and a motion vector in the L1 direction may be referred to as an L1 motion vector or MVL1. A prediction based on an L0 motion vector may be referred to as an L0 prediction, a prediction based on an L1 motion vector may be referred to as an L1 prediction, and a prediction based on both the L0 motion vector and the L1 motion vector may be referred to as a pairwise (Bi) prediction. Here, the L0 motion vector may indicate a motion vector associated with a reference picture list L0 (L0), and the L1 motion vector may indicate a motion vector associated with a reference picture list L1 (L1). The reference picture list L0 may include pictures that precede the current picture in output order as reference pictures, and the reference picture list L1 may include pictures that follow the current picture in output order. The previous picture may be referred to as a forward (reference) picture, and the following picture may be referred to as a backward (reference) picture. The reference picture list L0 may further include pictures subsequent to the current picture in output order as reference pictures. In this case, the previous picture may be indexed first in the reference picture list L0, and the subsequent picture may be indexed next. The reference picture list L1 may further include pictures subsequent to the current picture in output order as reference pictures. In this case, the subsequent picture may be indexed first in the reference picture list 1, and the previous picture may be indexed next. Here, the output order may correspond to a picture order count (POC) order.

[0074] FIG. 4 shows an exemplary hierarchical structure for coded video / pictures.

[0075] Referring to Figure 4, the coded video / image is divided into a VCL (video coding layer), which handles the video / image decoding process and itself, a lower system that transmits and stores the coded information, and a NAL (network abstraction layer), which exists between the VCL and the lower system and is responsible for network adaptation functions.

[0076] In VCL, it is possible to generate VCL data including compressed video data (slice data), or to generate parameter sets including information such as a Picture Parameter Set (PPS), a Sequence Parameter Set (SPS), and a Video Parameter Set (VPS), or a Supplemental Enhancement Information (SEI) message that is additionally required for the video decoding process.

[0077] In NAL, NAL units can be generated by adding header information (NAL unit header) to RBSP (Raw Byte Sequence Payload) generated by VCL. In this case, RBSP refers to slice data, parameter set, SEI message, etc. generated by VCL. The NAL unit header can include NAL unit type information identified by the RBSP data included in the NAL unit.

[0078] As shown, NAL units can be divided into VCL NAL units and non-VCL NAL units according to the RBSP generated in the VCL. The VCL NAL unit can refer to a NAL unit that contains information about an image (slice data), and the non-VCL NAL unit can refer to a NAL unit that contains information required to decode an image (parameter set or SEI message).

[0079] The above-mentioned VCL NAL unit and non-VCL NAL unit can be transmitted over a network with header information according to the data standard of the lower system. For example, the NAL unit can be transformed into a data format of a predetermined standard such as H.266 / VVC file format, RTP (Real-time Transport Protocol), TS (Transport Stream), etc., and transmitted over various networks.

[0080] As described above, the NAL unit type of an NAL unit can be identified by an RBSP data structure included in the NAL unit, and information regarding such NAL unit type can be stored and signaled in the NAL unit header.

[0081] For example, NAL units can be broadly classified into VCL NAL unit types and non-VCL NAL unit types depending on whether the NAL units include information about images (slice data). The VCL NAL unit types can be classified according to the nature and type of pictures included in the VCL NAL units, and the non-VCL NAL unit types can be classified according to the type of parameter sets.

[0082] The following is an example of a NAL unit type that is specified by the type of parameter set that the Non-VCL NAL unit type includes:

[0083] -APS (Adaptation Parameter Set) NAL unit: Type for NAL units containing APS

[0084] -VPS (Video Parameter Set) NAL unit: Type for NAL units containing VPS

[0085] -SPS (Sequence Parameter Set) NAL unit: Type for NAL units containing SPS

[0086] -PPS (Picture Parameter Set) NAL unit: Type for NAL units containing PPS

[0087] -DCI (Decoding Capability Information) NAL unit: Type for NAL units containing DCI

[0088] -PH (Picture header) NAL unit: Type for NAL unit containing PH

[0089] The above-mentioned NAL unit types have syntax information for the NAL unit types, and the syntax information can be stored in a NAL unit header and signaled. For example, the syntax information can be nal_unit_type, and the NAL unit type can be specified by the nal_unit_type value.

[0090] Meanwhile, as described above, one picture may include multiple slices, and one slice may include a slice header and slice data. In this case, one picture header may be added to multiple slices (slice header and slice data set) in one picture. The picture header (picture header syntax) may include information / parameters commonly applicable to the pictures. In this document, slices may be mixed with or replaced by tile groups. Also, slice headers in this document may be mixed with or replaced by type group headers.

[0091] The slice header (slice header syntax, slice header information) may include information / parameters commonly applicable to the slices. The APS (APS syntax) or PPS (PPS syntax) may include information / parameters commonly applicable to one or more slices or pictures. The SPS (SPS syntax) may include information / parameters commonly applicable to one or more sequences. The VPS (VPS syntax) may include information / parameters commonly applicable to multiple layers. The DCI (DCI syntax) may include information / parameters commonly applicable to all videos. The DCI may include information / parameters related to decoding capability. In this document, a high level syntax (HLS) may include at least one of the APS syntax, PPS syntax, SPS syntax, VPS syntax, DCI syntax, picture header syntax, and slice header syntax.

[0092] In this document, the image / video information encoded from an encoding device to a decoding device and signaled in the form of a bitstream may include information related to partitioning in a picture, intra / inter prediction information, residual information, in-loop filtering information, etc., as well as information included in the slice header, information included in the picture header, information included in the APS, information included in the PPS, information included in the SPS, information included in the VPS, and / or information included in the DCI. In addition, the image / video information may further include information of a NAL unit header.

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

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

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

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

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

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

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

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

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

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

[0103] Meanwhile, in addition to the above-mentioned intra prediction types, matrix based intra prediction (MIP) can be used as a method for intra prediction. MIP can be called Affine linear weighted intra prediction (ALWIP) or Matrix weighted intra prediction (MWIP).

[0104] When MIP is applied to a current block, a prediction sample for the current block may be derived by: i) using neighboring reference samples on which an averaging procedure has been performed; ii) performing a matrix-vector-multiplication procedure; and iii) further performing a horizontal / vertical interpolation procedure as necessary. The intra prediction mode used for the MIP may be configured to be different from the intra prediction mode used in the above-mentioned LIP, PDPC, MRL, and ISP intra prediction, or normal intra prediction.

[0105] The intra prediction mode for MIP may be referred to as an "affine linear weighted intra prediction mode" or a matrix-based intra prediction mode. For example, a matrix and an offset used in matrix vector multiplication may be set differently depending on the intra prediction mode for MIP. Here, the matrix may be referred to as an (affine) weight matrix, and the offset may be referred to as an (affine) offset vector or an (affine) bias vector. In this document, the intra prediction mode for MIP may be referred to as an MIP intra prediction mode, a linear weighted intra prediction mode, a matrix weighted intra prediction mode, or a matrix based intra prediction mode. A specific MIP method will be described later.

[0106] The following drawings are created to explain a specific example of the present document. The names of specific devices or specific terms or names (e.g., syntax names, etc.) described in the drawings are presented for illustrative purposes only, and the technical features of the present document are not limited to the specific names used in the following drawings.

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

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

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

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

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

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

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

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

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

[0116] 7 shows an example of a video decoding method based on a schematic intra prediction to which the embodiments of the present document can be applied, and FIG 8 shows a schematic intra prediction unit in a decoding device. The intra prediction unit in the decoding device of FIG 8 may be applied in the same or corresponding manner to the intra prediction unit 331 of the decoding device 300 of FIG 2 described above.

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

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

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

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

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

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

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

[0124] FIG. 9 exemplarily illustrates a schematic intra prediction procedure to which the embodiments of this document can be applied.

[0125] 9, as described above, the intra prediction procedure may include an intra prediction mode / type determination step, a neighboring reference sample derivation step, and an intra prediction execution (prediction sample generation) step. As described above, the intra prediction procedure may be performed in an encoding device and a decoding device. In this document, the coding device may include an encoding device and / or a decoding device.

[0126] The coding device may determine an intra-prediction mode / type (S900).

[0127] The coding apparatus may determine an intra prediction mode / type to be applied to the current block from among the various intra prediction modes / types described above, and may generate prediction related information. The prediction related information may include intra prediction mode information indicating an intra prediction mode to be applied to the current block and / or intra prediction type information indicating an intra prediction type to be applied to the current block. The decoding apparatus may determine the intra prediction mode / type to be applied to the current block based on the prediction related information.

[0128] The intra prediction mode information may include at least one of MPM flag information, non-planar flag information, MPM index information, and / or remaining mode (MPM remainder) information, as described above. The intra prediction type information may include reference sample line (MRL index) information (e.g., intra_luma_ref_idx), ISP flag information (e.g., intra_subpartitions_mode_flag), ISP type information (e.g., intra_subpartitions_split_flag), flag information indicating whether PDCP is applied, flag information indicating whether LIP is applied, and / or MIP flag information, as described above.

[0129] For example, when intra prediction is applied, the intra prediction mode applied to the current block may be determined using the intra prediction mode of a neighboring block. For example, the coding device may select one of the MPM candidates in an MPM (most probable mode) list derived based on the intra prediction mode of a neighboring block (e.g., a left and / or upper neighboring block) of the current block and / or an additional candidate mode based on the received MPM index, or may select one of the remaining intra prediction modes not included in the MPM candidates (and planar mode) based on MPM remainder information (remaining intra prediction mode information). The MPM list may be configured to include or not include a planar mode as a candidate. For example, if the mpm list includes a planar mode as a candidate, the MPM list may have six candidates, and if the MPM list does not include a planar mode as a candidate, the mpm list may have five candidates. If the MPM list does not include a planar mode as a candidate, a non-planar flag (e.g., intra_luma_not_planar_flag) indicating that the intra prediction mode of the current block is not a planar mode may be signaled. For example, the MPM flag may be signaled first, and the MPM index and the non-planar flag may be signaled if the value of the MPM flag is 1. Also, the MPM index may be signaled if the value of the non-planar flag is 1. Here, the fact that the MPM list is configured not to include a planar mode as a candidate does not mean that the planar mode is not MPM m, but rather that the planar mode is always considered in MPM, and therefore a flag (not planar flag) is signaled first to check whether it is a planar mode first.

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

[0131] If MIP is applied to the current block, a separate mpm flag (e.g., intra_mip_mpm_flag), mpm index (e.g., intra_mip_mpm_idx), and remaining intra-prediction mode information (e.g., intra_mip_mpm_remainder) for MIP may be signaled, and the not planar flag is not signaled.

[0132] That is, in general, when a block division is performed on an image, a current block to be coded and a neighboring block have similar image characteristics. Therefore, the current block and the neighboring blocks are highly likely to have the same or similar intra prediction mode. Therefore, an encoder can use the intra prediction mode of the neighboring block to encode the intra prediction mode of the current block.

[0133] A coding apparatus may configure a most probable modes (MPM) list for a current block. The MPM list may also be referred to as an MPM candidate list. Here, MPM may refer to a mode used to improve coding efficiency by considering similarity between a current block and an adjacent block during intra prediction mode coding. As described above, the MPM list may be configured to include a planar mode or may be configured to exclude a planar mode. For example, if the MPM list includes a planar mode, the number of candidates in the MPM list is six. And, if the MPM list does not include a planar mode, the number of candidates in the MPM list is five.

[0134] The encoding apparatus may perform prediction based on various intra prediction modes and may determine an optimal intra prediction mode based on rate-distortion optimization (RDO) based on the prediction. In this case, the encoding apparatus may determine the optimal intra prediction mode using only the MPM candidates and planar modes configured in the MPM list, or may determine the optimal intra prediction mode using not only the MPM candidates and planar modes configured in the MPM list but also the remaining intra prediction modes. Specifically, for example, if the intra prediction type of the current block is a specific type other than a normal intra prediction type (e.g., LIP, MRL, or ISP), the encoding apparatus may determine the optimal intra prediction mode by considering only the MPM candidates and planar modes as intra prediction mode candidates for the current block. That is, in this case, the intra prediction mode for the current block may be determined only among the MPM candidates and planar modes, and in this case, the mpm flag is not encoded / signaled. In this case, the decoding device can infer that the mpm flag is 1 without receiving separate signaling of the mpm flag.

[0135] Meanwhile, in general, if the intra prediction mode of the current block is not a planar mode but is one of the MPM candidates in the MPM list, the encoding device generates an mpm index (mpmidx) pointing to one of the MPM candidates. If the intra prediction mode of the current block is not in the MPM list, the encoding device generates MPM remainder information (remaining intra prediction mode information) pointing to a mode such as the intra prediction mode of the current block from the remaining intra prediction modes not included in the MPM list (and planar modes). The MPM remainder information may include, for example, an intra_luma_mpm_remainder syntax element.

[0136] The decoding apparatus obtains intra prediction mode information from a bitstream. The intra prediction mode information may include at least one of an MPM flag, a non-planar flag, an MPM index, and MPM remainder information (remaining intra prediction mode information), as described above. The decoding apparatus may configure an MPM list. The MPM list is configured to be the same as the MPM list configured by the encoding apparatus. That is, the MPM list may include intra prediction modes of neighboring blocks, and may further include a specific intra prediction mode according to a predetermined method.

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

[0138] As another example, if the value of the MPM flag is 0, the decoding device may derive the intra prediction mode pointed to by the remaining intra prediction mode information (which may be referred to as mpm remainder information) from among the remaining intra prediction modes not included in the MPM list and planar mode as the intra prediction mode of the current block. Meanwhile, as another example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP, etc.), the decoding device may derive the planar mode or a candidate pointed to by the MPM flag in the MPM list as the intra prediction mode of the current block without parsing / decoding / checking the MPM flag.

[0139] The coding apparatus derives neighboring reference samples of the current block (S910). When intra prediction is applied to the current block, neighboring reference samples used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may include a total of 2×nH samples adjacent to the left boundary and bottom-left of the current block having a size of nW×nH, a total of 2×nW samples adjacent to the top boundary and top-right of the current block, and one sample adjacent to the top-left of the current block. Alternatively, the neighboring reference samples of the current block may include upper neighboring samples of multiple columns and left neighboring samples of multiple rows. In addition, the neighboring reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block having a size of nW×nH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.

[0140] On the other hand, when MRL is applied (i.e., when the value of the MRL index is greater than 0), the neighboring reference samples may be located on the 1st or 2nd lines adjacent to the current block on the left / top side, not on the 0th line, and in this case, the number of neighboring reference samples may be further increased.On the other hand, when ISP is applied, the neighboring reference samples may be derived in sub-partition units.

[0141] The coding apparatus performs intra prediction on the current block to derive a prediction sample (S920). The coding apparatus may derive the prediction sample based on the intra prediction mode / type and the neighboring samples. The coding apparatus may derive a reference sample according to the intra prediction mode of the current block from neighboring reference samples of the current block, and may derive a prediction sample of the current block based on the reference sample.

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

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

[0144] Meanwhile, the coding apparatus can configure an MPM list including six MPM list candidates, and three types of modes can be considered.

[0145] -Default intra modes

[0146] -Neighbouring intra modes

[0147] -Derived intra modes

[0148] In this case, two neighboring blocks, for example a left neighboring block and an upper neighboring block, can be considered for the neighboring intra mode.

[0149] For example, a unified 6-MPM list may be used for an intra block regardless of whether a multi reference line (MRL) and an intra sub-partitions (ISP) coding tool are applied. Also, the MPM list may be configured based on a left adjacent block and an upper adjacent block. For example, when the mode of the left block is Left and the mode of the upper block is Above, the unified MPM list may be configured as follows. That is, when the intra prediction mode of the left adjacent block is Left and the intra prediction mode of the upper adjacent block is Above, the unified MPM list may be configured as follows. Here, V may represent a vertical intra prediction mode, and H may represent a horizontal intra prediction mode.

[0150] If no adjacent blocks are available, the corresponding intra mode is basically set to planar mode.

[0151] -If both Left and Above are in non-directional mode:

[0152] -The MPM list can consist of {Planar, DC, V, H, V-4, V+4}.

[0153] -If one of Left and Above is in directional mode and the other is in non-directional mode:

[0154] Of -Left and Above, the mode with the larger mode number is set as mode Max.

[0155] In this case, the MPM list can consist of {Planar, Max, Max-1, Max+1, Max-2, Max+2}.

[0156] -If both Left and Above are directional modes and are different directional modes:

[0157] Of -Left and Above, the mode with the larger mode number is set as mode Max.

[0158] Of -Left and Above, the mode with the smaller mode number is set as mode Min.

[0159] -If Max-Min value is 1:

[0160] -MPM list can consist of {Planar, Left, Above, Min-1, Max+1, Min-2}.

[0161] - Else, if the value of Max-Min is greater than or equal to 62:

[0162] -MPM list can consist of {Planar, Left, Above, Min+1, Max-1, Min+2}.

[0163] - Else, if Max-Min has the value 2:

[0164] -MPM list can consist of {Planar, Left, Above, Min+1, Min-1, Max+1}.

[0165] -If not:

[0166] -MPM list can consist of {Planar, Left, Above, Min-1, Min+1, Max-1}.

[0167] -If both Left and Above are directional modes and both are the same directional mode:

[0168] -The MPM list can consist of {Planar, Left, Left-1, Left+1, Left-2, Left+2}.

[0169] In addition, the first bin of the MPM index codeword can be CABAC context coded. A total of three contexts can be used depending on whether the current intra block is MRL enabled, ISP enabled, or a general intra block.

[0170] At this time, the above-mentioned MPM list construction method can be used when MIP is not applied to the current block. For example, the above-mentioned MPM list construction method can be used to derive an intra prediction mode used in LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction. Meanwhile, the left adjacent block or the upper adjacent block can be coded based on the above-mentioned MIP. That is, MIP can be applied when coding the left adjacent block or the upper adjacent block. In this case, it is not appropriate to use the MIP intra prediction mode number of the adjacent block (left adjacent block / upper adjacent block) to which MIP is applied as it is in the MPM list for the current block to which MIP is not applied. Therefore, in this case, as an example, the intra prediction mode of the adjacent block (left adjacent block / upper adjacent block) to which MIP is applied can be regarded as DC or planar mode. Or, as another example, the intra prediction mode of the adjacent block (left adjacent block / upper adjacent block) to which MIP is applied can be mapped to a general intra prediction mode based on a mapping table and used for MPM list construction. In this case, the mapping can be performed based on the block size type of the current block. For example, the mapping table can be shown as follows:

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

[0172] Referring to FIG. 10, the intra prediction modes may be classified into those having horizontal directionality and those having vertical directionality, with the 34th intra prediction mode having a left-up diagonal prediction direction as the center. H and V in FIG. 8 respectively mean horizontal directionality and vertical directionality, and the numbers from -32 to 32 indicate a displacement of 1 / 32 units on a sample grid position. The 2nd to 33rd intra prediction modes have horizontal directionality, and the 34th to 66th intra prediction modes have vertical directionality. The 18th and 50th intra prediction modes indicate horizontal and vertical intra prediction modes, respectively, and the 2nd intra prediction mode may be called a left-down diagonal intra prediction mode, the 34th intra prediction mode may be called a left-up diagonal intra prediction mode, and the 66th intra prediction mode may be called a right-up diagonal intra prediction mode.

[0173] Hereinafter, a template-based intra mode derivation (TIMD) mode, which is one method of intra prediction, will be described.

[0174] For example, the TIMD mode may be referred to as a Template-based Intra Mode Derivation mode, a Template Intra Mode Derivation mode, etc.

[0175] Also, for example, the TIMD mode may be referred to as a TIMD intra mode. Also, the TIMD mode may be referred to as a TIMD intra prediction mode or a TIMD prediction mode.

[0176] Also, for example, the intra modes in this document may be referred to as intra prediction modes, and the intra modes and intra prediction modes may be used interchangeably.

[0177] FIG. 11 exemplarily illustrates a template used to derive an intra-prediction mode for a TIMD mode.

[0178] When the TIMD mode is used, the decoder may derive the intra mode of the current CU using neighboring pixels previously decoded. For example, a prediction sample for a neighboring template may be derived based on neighboring reference samples of a neighboring template of the current block (or current CU), and the derived prediction sample for the neighboring template may be compared with a reconstructed sample of the neighboring template to derive the intra mode of the current block (or current CU). Specifically, the Sum of Absolute Transformed Difference (SATD) between the prediction sample derived based on the neighboring reference samples of the neighboring template and the reconstructed sample of the neighboring template may be derived, and then a mode having the minimum SATD may be selected as the intra mode of the current block.

[0179] For example, a predicted sample of a template can be derived based on adjacent reference samples located at the outer corners of the template, i.e., Reference of the template. After deriving the SATD between the derived predicted sample of the template and a restored sample of the template already derived in the restoration process, a mode having the minimum SATD can be selected as the intra mode of the current block. This method can be used since the template is an area that has already been restored in the decoding order.

[0180] Also, for example, after determining the SATD between the predicted sample and the reconstructed sample derived from the template region for each MPM candidate in the MPM list, the mode with the smallest SATD can be selected as the intra mode of the current block.

[0181] Alternatively, the two prediction modes having the smallest SATD may be selected, and the prediction blocks for the two prediction modes may be blended in a weighted sum manner to be used as the prediction block for the current block. That is, the prediction blocks for the prediction mode having the smallest SATD and the prediction mode having the next smallest SATD may be blended in a weighted sum manner to be used as the prediction block for the current block.

[0182] Meanwhile, the two modes with the smallest SATD cost can be used when blending with the weighting value used as weighted intra prediction for the current block. The method of blending the two selected modes can be applied when the following formula is satisfied.

[0183]

number

[0184] For example, if Equation 1 is true, then the two modes are blended to generate a prediction block; otherwise, only one mode having the smallest SATD may be selected.

[0185] In addition, the weight value when blending two predicted blocks can be calculated according to the following formula:

[0186]

number

[0187] where costMode1 is the SATD cost for mode 1 and costMode2 is the SATD cost for mode 2.

[0188] Hereinafter, a decoder side intra mode derivation (DIMD) mode, which is one method of intra prediction, will be described.

[0189] For example, a DIMD mode may be referred to as a Decoder Side Intra Mode Derivation mode, a Decoder Intra Mode Derivation mode, a Decoder Side Intra Prediction Mode, a Decoder Intra Prediction Mode, or the like.

[0190] Also, for example, the DIMD mode may be referred to as a DIMD intra mode. Also, the DIMD mode may be referred to as a DIMD intra prediction mode or a DIMD prediction mode.

[0191] For example, the DIMD mode can be used by inducing intra prediction modes in the encoder and decoder without directly transmitting intra prediction mode information. For example, horizontal and vertical gradients can be obtained from the second adjacent reference row and column, and a histogram of gradients (HoG) can be constructed from them.

[0192] FIG. 12 exemplarily illustrates a Histogram of Gradients (HoG) construction method used to derive an intra-prediction mode for a DIMD mode.

[0193] For example, (a) of Figure 12 exemplarily illustrates a template used to derive an intra-prediction mode for a DIMD mode, and (b) and (c) of Figure 12 illustrate a method of constructing HoG used to derive an intra-prediction mode for a DIMD mode.

[0194] For example, referring to (b) of FIG. 12, the HoG can be obtained by applying a Sobel filter using L-shaped columns and rows of three adjacent pixels of the current block. For example, if the boundaries of the blocks are in different CTUs, the adjacent pixels of the current block are not used in the texture analysis.

[0195] Meanwhile, the Sobel filter, which may also be called a Sobel operator, is an effective filter for detecting edges. When using a Sobel filter, two types of Sobel filters, a vertical Sobel filter and a horizontal Sobel filter, can be used.

[0196] FIG. 13 exemplarily illustrates a method for constructing a prediction block by applying the DIMD mode.

[0197] For example, referring to FIG. 13, two intra modes having the largest histogram amplitudes may be selected, and a final predicted block may be constructed by blending a predicted block predicted using the two modes with a planar mode. That is, an intra mode having the largest histogram amplitude and an intra mode having the second largest histogram amplitude may be selected, and a final predicted block may be constructed by blending a predicted block predicted using the two modes with a planar mode. At this time, weights for the modes may be derived from the histogram amplitude. Also, for example, DIMD flag information may be transmitted in units of blocks to confirm whether DIMD is available. At this time, the DIMD flag information may indicate whether a DIMD mode is applied.

[0198] For example, the weighting value for the intra mode with the largest histogram amplitude can be calculated via the following formula:

[0199]

number

[0200] Also, the weight value for the intra mode having the second largest histogram amplitude can be calculated according to the following formula:

[0201]

number

[0202] In addition, the weighting value for the planar mode can be calculated according to the following formula:

[0203]

number

[0204] Meanwhile, in order to implement an efficient intra-mode coding method, the following embodiments can be applied, each of which can be applied individually or in combination.

[0205] As an embodiment, a method for preventing the intra mode of the current block derived by DIMD from being selected multiple times by the coding mode is proposed. For example, DIMD can infer pixel directionality using information on adjacent pixels already coded of the current block and use this as the intra mode of the current block. At this time, various directions can be derived according to the gradient between adjacent pixels, and each gradient distribution can be classified into a gradient histogram (HoG) for the intra mode, and N pieces of direction information determined to be most similar through the HoG can be mapped to the intra mode and used.

[0206] For example, if all pixel values ​​of adjacent pixels are the same, it is not possible to derive a gradient, and thus the prediction mode of the current block may be selected as a non-directional mode.

[0207] Alternatively, for example, when the neighboring pixel relationship clearly indicates only one specific direction, one direction information may be derived. For example, after deriving the prediction mode, if two intra prediction modes are derived in the process of constructing a DIMD prediction block (N=2), weights may be calculated according to the amplitudes of gradients indicating the two prediction modes, and a fixed planar mode weight may be added to construct an intra prediction block using a weighted sum of the three modes.

[0208] On the other hand, if only one intra mode is derived (N=1), weighted summation with the planar prediction block is not performed, i.e., if only one DIMD mode is derived, weighted summation with the planar prediction block is not performed.

[0209] Also, if it is not possible to utilize neighboring pixels or the directionality of the neighboring blocks cannot be determined (N=0 or non-directional blocks), a default mode can be set, which is the planar mode.

[0210] For example, if the current block is coded in DIMD mode (a block with a DIMD flag of 1), the intra mode described above can be derived and a weighted sum can be performed between prediction blocks according to conditions to generate an intra prediction block. Alternatively, if the current block is not coded in DIMD mode, the intra mode derived through the DIMD process can be used as a prediction mode candidate for the current block. That is, it can be used as an MPM candidate for the current block, or can be used as part of the prediction candidates when the current block is in TIMD mode. That is, if the current block is not coded in DIMD mode, the intra mode derived through the DIMD process can be used as an MPM candidate for the current block, or can be used as part of the prediction candidates when deriving the TIMD mode for the current block.

[0211] Meanwhile, if the current block is coded in general intra mode without being selected in DIMD mode, if the neighboring pixels are located on unavailable block coordinates (picture, slice boundary, etc.) or if the prediction direction cannot be determined from the neighboring pixels, the planar mode, which is the default mode, may be selected. For example, according to the MPM configuration method, the runner mode may always be considered as the first candidate for MPM candidates. In this case, the planar mode derived in DIMD is always excluded from MPM candidates. That is, the planar mode may always be excluded from MPM candidates through the bruning process. Therefore, in this embodiment, it is proposed to specify the default mode of DIMD to another mode other than the planar mode.

[0212] For example, the default mode of DIMD is DC mode. In the case of DC mode, it is suitable to be considered as a non-directional mode when direction information cannot be inferred from adjacent pixels, which do not always belong to MPM candidates and are unlikely to overlap. In addition, when the prediction mode of DIMD is planar, there are cases where the planar mode can be selected in MPM even if the current block is not selected as a DIMD mode. In this case, the proposed method can prevent overlapping selection of inefficient coding modes.

[0213] Alternatively, for example, the default mode of the DIMD is a horizontal prediction mode or a vertical prediction mode. At this time, more efficient mode coding is possible by designating the most statistically frequent prediction mode in the intra mode information as the default mode. Alternatively, the default mode of the DIMD is one of the directional prediction modes.

[0214] Meanwhile, when only one directional intra mode is derived according to the gradient distribution of the neighboring pixels of the current block, the corresponding prediction mode is not weighted and summed with other prediction modes (e.g., planar mode, etc.). In addition, if the current block is not coded in DIMD mode, the DIMD prediction mode may be considered as a part of the MPM candidates when constructing the MPM. In this case, when the DIMD prediction mode is input to the MPM and selected as the final prediction mode, it has the effect of coding the same prediction mode with only a different mode (DIMD mode or MPM mode). Therefore, in order to prevent inefficient overlapping selection of coding modes, the following embodiment may be applied when performing intra prediction.

[0215] As an embodiment, a method of performing a weighted sum with a planar mode even when a DIMD prediction mode is derived from one directional prediction mode is proposed.

[0216] For example, the DIMD prediction mode may perform a weighted sum of 2 / 3 and the planar mode may perform a weighted sum of 1 / 3. Or, if the sum of the weights is scaled to 64, the DIMD prediction mode may have a weighted value of 43 and the planar mode may have a weighted value of 21. According to the above method, since the predicted block in the DIMD mode and the predicted block predicted in the DIMD prediction mode in the MPM when the DIMD mode is not in the DIMD mode are different blocks, the proposed method can prevent inefficient overlapping selection of coding modes. That is, when the DIMD prediction mode is derived in one directional prediction mode, the DIMD prediction mode and the planar mode can be weighted summed. As a result, since the predicted block in the DIMD mode and the predicted block derived in the DIMD prediction mode in the MPM can be different blocks, it is possible to prevent the same predicted block and perform efficient intra prediction.

[0217] In addition, as one embodiment, a method is proposed in which, when a DIMD prediction mode is derived in one directional prediction mode and a current block is not coded in the DIMD mode, the DIMD prediction mode is not input as a candidate mode in a candidate configuration process such as MPM, TIMD, etc. In other words, when a DIMD prediction mode is derived in one directional prediction mode and a current block is not coded in the DIMD mode, the DIMD prediction mode is not input as a candidate mode in a candidate configuration process such as MPM, TIMD, etc.

[0218] For example, if the DIMD prediction mode is derived in one directional prediction mode and the current block is not in the DIMD mode, the one directional prediction mode is not considered in the process of constructing an MPM candidate. Also, if the DIMD prediction mode is derived in one directional prediction mode and the current block is not in the DIMD mode, the one directional prediction mode is not considered in the process of deriving a TIMD mode. Thus, even if the current block is not in the DIMD mode, the DIMD prediction mode is not considered when constructing a MPM candidate or deriving a TIMD mode, so that inefficient overlapped coding mode selection can be prevented.

[0219] In addition, as one embodiment, a method is proposed in which a DIMD prediction mode is derived in one directional prediction mode, and if the current block is not coded in the DIMD mode, the DIMD prediction mode is not set as the prediction mode of the current block. That is, a method is proposed in which a DIMD prediction mode is derived in one directional prediction mode, and if the current block is not coded in the DIMD mode, the DIMD prediction mode is not set as the prediction mode of the current block.

[0220] For example, the DIMD prediction mode is not considered as an MPM candidate or a TIMD candidate, and is not included in the remaining mode, so that the overlapping coding method of the same mode can be completely prevented. That is, if the DIMD prediction mode is derived in one directional prediction mode and the current block is not in the DIMD mode, the DIMD prediction mode is not included in the remaining mode either. As a result, if the current block is not in the DIMD mode and the DIMD prediction mode is derived in one directional prediction mode, the DIMD prediction mode cannot be selected as the prediction mode of the current block, so that inefficient overlapping coding mode selection can be prevented.

[0221] 14 and 15 show a schematic diagram of an example video / image encoding method and associated components according to an embodiment of the present document.

[0222] The method disclosed in FIG. 14 may be performed by the encoding device disclosed in FIG. 2 or FIG. 15. Specifically, for example, S1400 to S1430 in FIG. 14 may be performed by the prediction unit 220 of the encoding device, and S1440 may be performed by the entropy encoding unit 240 of the encoding device. Also, although not shown in FIG. 14, a process of generating a residual sample based on a prediction sample for a current block and generating residual information based on the residual sample may be performed by the residual processing unit 230 of the encoding device, and a process of generating a bitstream from residual information or prediction related information may be performed by the entropy encoding unit 240 of the encoding device. The method disclosed in FIG. 14 may include the embodiments detailed in this document.

[0223] 14, an encoding apparatus derives a decoder side intra mode derivation (DIMD) mode for a current block (S1400). For example, the encoding apparatus may derive the DIMD mode for the current block according to the above-described embodiment.

[0224] The encoding apparatus determines an intra-prediction mode for a current block (S1410). For example, the encoding apparatus may determine the intra-prediction mode for the current block according to the above-described embodiment.

[0225] For example, the intra prediction mode for the current block may be determined based on whether the DIMD mode is applied to the current block.

[0226] When the DIMD mode is not applied to the current block, the default mode of the DIMD mode is one of a DC mode, a horizontal prediction mode, a vertical prediction mode, and a directional prediction mode.

[0227] For example, the DIMD mode may be derived as one directional intra mode, and the prediction mode may be derived by performing a weighted average based on the one directional intra mode and a planar mode based on the DIMD mode being applied to the current block. In this case, the intra prediction mode for the current block may be determined based on the prediction mode. Also, the weighting value for the one directional intra mode may be 2 / 3, the weighting value for the planar mode may be 1 / 3, and the weighting average may be performed using various weighting values.

[0228] In addition, the encoding apparatus may generate a Most Probable Mode (MPM) list including intra-prediction mode candidates for the current block.

[0229] For example, if the DIMD mode is derived as one directional intra mode and the DIMD mode is not applied to the current block, a prediction mode may be derived by performing a weighted average based on the one directional intra mode and a planar mode. In this case, the prediction mode may be included in the MPM list, and the intra prediction mode for the current block may be determined based on the MPM list.

[0230] Alternatively, the DIMD mode may be derived into one directional intra mode, and the one directional intra mode may not be included in the MPM list because the DIMD mode is not applied to the current block. In this case, the intra prediction mode for the current block may be determined based on the MPM list.

[0231] Also, for example, if the DIMD mode is derived to one directional intra mode and the DIMD mode is not applied to the current block, the one directional intra mode is not included in the MPM list. In this case, the image information includes remaining mode information, and a remaining intra prediction mode other than the intra prediction mode candidates and the one directional intra mode included in the MPM list can be derived based on the remaining mode information, and the intra prediction mode for the current block can be determined based on the remaining intra prediction mode. That is, if the DIMD mode is derived to one directional intra mode and the DIMD mode is not applied to the current block, the DIMD mode is not included in the MPM list and is not included in the remaining mode.

[0232] The decoding device can also derive the TIMD mode for the current block.

[0233] For example, if the DIMD mode is derived to one directional intra mode and the DIMD mode is not applied to the current block, the TIMD mode may be derived based on an intra prediction mode other than the one directional intra mode. In this case, the intra prediction mode for the current block may be determined based on the TIMD mode.

[0234] The encoding apparatus generates a prediction sample for the current block based on an intra-prediction mode for the current block (S1420). For example, the encoding apparatus may generate a prediction sample for the current block based on the intra-prediction mode for the current block according to the above-described embodiment.

[0235] The encoding apparatus generates prediction-related information based on the prediction sample for the current block (S1430). For example, the encoding apparatus may generate prediction-related information based on the prediction sample for the current block according to the above-described embodiment.

[0236] The encoding apparatus encodes the image information including the prediction-related information (S1440). For example, the image information including the prediction-related information may be encoded according to the above-described embodiments.

[0237] For example, the encoding apparatus may generate a prediction sample for the current block based on the determined intra prediction mode according to the above-described embodiment, and may derive a residual sample for the current block based on the prediction sample for the current block. The encoding apparatus may generate residual information based on the residual sample. The encoding apparatus may encode image information including remaining mode information and residual information for the current block according to the above-described embodiment.

[0238] 16 and 17 show a schematic diagram of an example of a video / image decoding method and associated components according to an embodiment of the present document.

[0239] The method disclosed in FIG. 16 may be performed by the decoding device disclosed in FIG. 3 or FIG. 17. Specifically, for example, S1600 in FIG. 16 may be performed by the entropy decoding unit 310 of the decoding device, S1610 to S1630 may be performed by the prediction unit 330 of the decoding device, and S1640 may be performed by the addition unit 340 of the decoding device. Also, although not shown in FIG. 16, the process of generating a residual sample may be performed by the residual processing unit 320 of the decoding device, and the process of generating a reconstructed sample based on the prediction sample and the residual sample may be performed by the addition unit of the decoding device. Also, the method disclosed in FIG. 16 may include the embodiments detailed in this document.

[0240] 16, a decoding device obtains a bitstream including video information (S1600). For example, the decoding device may obtain a bitstream including video information according to the above-described embodiments.

[0241] The decoding apparatus derives a decoder side intra mode derivation (DIMD) mode for the current block (S1610). For example, the decoding apparatus may derive the DIMD mode for the current block according to the above-described embodiments.

[0242] The decoding apparatus derives an intra-prediction mode for the current block (S1620). For example, the decoding apparatus may derive the intra-prediction mode for the current block according to the above-described embodiments.

[0243] For example, the intra prediction mode for the current block may be derived based on whether the DIMD mode is applied to the current block.

[0244] For example, if the DIMD mode is not applied to the current block, the default mode of the DIMD mode is one of a DC mode, a horizontal prediction mode, a vertical prediction mode, and a directional prediction mode.

[0245] For example, the DIMD mode may be derived as one directional intra mode, and the prediction mode may be derived by performing a weighted average based on the one directional intra mode and a planar mode based on the DIMD mode being applied to the current block. In this case, the intra prediction mode for the current block may be derived based on the prediction mode. Also, the weighting value for the one directional intra mode may be 2 / 3, the weighting value for the planar mode may be 1 / 3, and the weighting average may be performed using various weighting values.

[0246] In addition, the decoding apparatus may generate a Most Probable Mode (MPM) list including intra-prediction mode candidates for the current block.

[0247] For example, if the DIMD mode is derived as one directional intra mode and the DIMD mode is not applied to the current block, a prediction mode may be derived by performing a weighted average based on the one directional intra mode and a planar mode. In this case, the prediction mode may be included in the MPM list, and the intra prediction mode for the current block may be derived based on the MPM list.

[0248] Alternatively, the DIMD mode is derived into one directional intra mode, and the one directional intra mode is not included in the MPM list because the DIMD mode is not applied to the current block. In this case, the intra prediction mode for the current block can be derived based on the MPM list.

[0249] Also, for example, if the DIMD mode is derived to one directional intra mode and the DIMD mode is not applied to the current block, the one directional intra mode is not included in the MPM list. In this case, the image information includes remaining mode information, and a remaining intra prediction mode other than the intra prediction mode candidates and the one directional intra mode included in the MPM list can be derived based on the remaining mode information, and the intra prediction mode for the current block can be derived based on the remaining intra prediction mode. That is, if the DIMD mode is derived to one directional intra mode and the DIMD mode is not applied to the current block, the DIMD mode is not included in the MPM list and is not included in the remaining mode.

[0250] The decoding device can also derive the TIMD mode for the current block.

[0251] For example, if the DIMD mode is derived to one directional intra mode and the DIMD mode is not applied to the current block, the TIMD mode may be derived based on an intra prediction mode other than the one directional intra mode. In this case, the intra prediction mode for the current block may be derived based on the TIMD mode.

[0252] The decoding apparatus generates a prediction sample for the current block based on the intra-prediction mode for the current block (S1630). For example, the decoding apparatus may generate a prediction sample for the current block based on the intra-prediction mode for the current block according to the above-described embodiment.

[0253] The decoding apparatus generates reconstructed samples for the current block based on the predicted samples for the current block (S1640). For example, the decoding apparatus may generate reconstructed samples for the current block based on the predicted samples for the current block according to the above-described embodiments.

[0254] For example, the decoding apparatus may generate a reconstructed sample of the current block based on a predicted sample and a residual sample of the current block, where the residual sample may be derived based on residual-related information, and the residual-related information may be included in video information signaled via a bitstream or may be derived from the video information.

[0255] According to the aforementioned document, when a DIMD mode is not applied to the current block, the default mode of the DIMD mode is configured to be other than the planar mode, thereby enabling efficient intra prediction to be performed by using various candidate prediction modes when configuring MPM candidates for intra prediction.

[0256] According to another embodiment of the present document, when the DIMD mode is derived from one directional prediction mode, the prediction mode can be derived using a planar mode and a weighted average, thereby enabling efficient intra prediction to be performed by using various candidate prediction modes in constructing MPM candidates.

[0257] In addition, according to another embodiment of the present document, when a DIMD mode is derived as a single directional prediction mode and a DIMD mode is not applied to a current block, the DIMD mode is not considered as an MPM candidate or a TIMD mode candidate or a remaining mode candidate, thereby enabling intra prediction to be performed more efficiently and improving prediction accuracy.

[0258] The decoding apparatus may receive information about a residual for a current block if a residual sample for the current block exists. The information about the residual may include a transform coefficient related to the residual sample. The decoding apparatus may derive a residual sample (or a residual sample array) for the current block based on the residual information. Specifically, the decoding apparatus may derive a quantized transform coefficient based on the residual information. The quantized transform coefficient may have a one-dimensional vector form based on a coefficient scan order. The decoding apparatus may derive the transform coefficient based on a dequantization procedure for the quantized transform coefficient. The decoding apparatus may derive a residual sample based on the transform coefficient.

[0259] The decoding apparatus may generate a reconstructed sample based on an (intra) predicted sample and a residual sample, and may derive a reconstructed block or a reconstructed picture based on the reconstructed sample. Specifically, the decoding apparatus may generate a reconstructed sample based on a sum of an (intra) predicted sample and a residual sample. As described above, the decoding apparatus may then apply an in-loop filtering procedure, such as a deblocking filtering and / or SAO procedure, to the reconstructed picture as necessary to improve subjective / objective image quality.

[0260] For example, a decoding device may decode a bitstream or encoded information to obtain video information including all or a part of the above-mentioned information (or syntax elements), and the bitstream or encoded information may be stored in a computer-readable storage medium, and the above-mentioned decoding method may be performed.

[0261] In the above-described embodiments, the method is described based on a flow chart with a series of steps or blocks, but the embodiment is not limited to the order of steps, and a step may occur in a different order or simultaneously with different steps than described above. Also, a person skilled in the art can understand that the steps shown in the flow chart are not exclusive, and other steps may be included, or one or more steps of the flow chart may be deleted without affecting the scope of the embodiments of this document.

[0262] The methods according to the embodiments of the present document described above may be implemented in software form, and the encoding device and / or decoding device according to the present document may be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc.

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

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

[0265] In addition, the processing method to which the embodiment(s) of the present document are applied may be produced in the form of a program executed by a computer and may be stored in a computer-readable recording medium. In addition, multimedia data having a data structure according to the embodiment(s) of the present document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. In addition, the computer-readable recording medium may include a medium realized in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bit stream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.

[0266] Also, the embodiment(s) of the present document may be implemented in a computer program product by program code, the program code being executable by a computer according to the embodiment(s) of the present document. The program code may be stored on a computer readable carrier.

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

[0268] Referring to FIG. 18, a content streaming system to which the embodiments of this document are applied may broadly include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.

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

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

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

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

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

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

[0275] The claims described herein may be combined in various ways. For example, the technical features of the method claims herein may be combined and realized in an apparatus, and the technical features of the apparatus claims herein may be combined and realized in a method. Also, the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and realized in an apparatus, and the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and realized in a method.

Claims

1. 1. A video decoding method performed by a decoding device, comprising: obtaining a bitstream containing video information; deriving a Decoder Side Intra Mode Derivation (DIMD) mode for a current block; deriving an intra prediction mode for the current block; generating a prediction sample for the current block based on the intra-prediction mode for the current block; generating reconstructed samples for the current block based on the predicted samples for the current block; The image decoding method according to claim 1, further comprising deriving the intra prediction mode for the current block based on whether the DIMD mode is applied to the current block.

2. The DIMD mode is derived as one directional intra mode, and a prediction mode is derived based on performing a weighted average based on the one directional intra mode and a planar mode based on the DIMD mode being applied to the current block; The image decoding method of claim 1 , wherein the intra-prediction mode for the current block is derived based on the prediction mode.

3. 3. The method of claim 2, wherein a weighting value for the one directional intra mode is 2 / 3 and a weighting value for the planar mode is 1 / 3.

4. The method further includes constructing a Most Probable Mode (MPM) list including intra-prediction mode candidates for the current block, The DIMD mode is derived as one directional intra mode, and based on the DIMD mode not being applied to the current block, a prediction mode is derived based on performing a weighted average based on the one directional intra mode and a planar mode; the prediction mode is included in the MPM list, The image decoding method of claim 1, wherein the intra prediction mode for the current block is derived based on the MPM list.

5. The method further includes constructing a Most Probable Mode (MPM) list including intra-prediction mode candidates for the current block, The DIMD mode is derived into one directional intra mode and the one directional intra mode is not included in the MPM list because the DIMD mode is not applied to the current block; The image decoding method of claim 1, wherein the intra prediction mode for the current block is derived based on the MPM list.

6. The method further includes the step of deriving a template-based intra mode derivation (TIMD) mode for the current block; The DIMD mode is derived to one directional intra mode, and the TIMD mode is derived based on an intra prediction mode other than the one directional intra mode, based on the DIMD mode not being applied to the current block; The image decoding method of claim 1 , wherein the intra-prediction mode for the current block is derived based on the TIMD mode.

7. The video information includes remaining mode information, A remaining intra-prediction mode other than the intra-prediction mode candidates and the one directional intra-mode included in the MPM list is derived based on the remaining mode information; The image decoding method of claim 5, wherein the intra-prediction mode for the current block is derived based on the remaining intra-prediction mode.

8. 2. The image decoding method of claim 1, wherein, when the DIMD mode is not applied to the current block, a default mode of the DIMD mode is one of a DC mode, a horizontal prediction mode, a vertical prediction mode, and a directional prediction mode.

9. 1. A video encoding method performed by an encoding device, comprising: deriving a Decoder Side Intra Mode Derivation (DIMD) mode for a current block; determining an intra-prediction mode for the current block; generating a prediction sample for the current block based on the intra-prediction mode for the current block; generating prediction related information based on the prediction samples for the current block; encoding the video information including the prediction related information; The method of any one of claims 1 to 5, further comprising determining the intra prediction mode for the current block based on whether the DIMD mode is applied to the current block.

10. The DIMD mode is derived as one directional intra mode, and a prediction mode is derived based on performing a weighted average based on the one directional intra mode and a planar mode based on the DIMD mode being applied to the current block; The method of claim 9, wherein the intra prediction mode for the current block is determined based on the prediction mode.

11. 11. The method of claim 10, wherein a weighting value for the one directional intra mode is 2 / 3 and a weighting value for the planar mode is 1 / 3.

12. The method further includes constructing a Most Probable Mode (MPM) list including intra-prediction mode candidates for the current block, The DIMD mode is derived as one directional intra mode, and based on the DIMD mode not being applied to the current block, a prediction mode is derived based on performing a weighted average based on the one directional intra mode and a planar mode; the prediction mode is included in the MPM list, The image encoding method of claim 9, wherein the intra prediction mode for the current block is determined based on the MPM list.

13. The method further includes constructing a Most Probable Mode (MPM) list including intra-prediction mode candidates for the current block, The DIMD mode is derived into one directional intra mode and the one directional intra mode is not included in the MPM list because the DIMD mode is not applied to the current block; The image encoding method of claim 9, wherein the intra prediction mode for the current block is determined based on the MPM list.

14. The method further includes the step of deriving a template-based intra mode derivation (TIMD) mode for the current block; The DIMD mode is derived to one directional intra mode, and the TIMD mode is derived based on an intra prediction mode other than the one directional intra mode, based on the DIMD mode not being applied to the current block; The method of claim 9, wherein the intra prediction mode for the current block is determined based on the TIMD mode.

15. The video information includes remaining mode information, A remaining intra-prediction mode other than the intra-prediction mode candidates and the one directional intra-mode included in the MPM list is derived based on the remaining mode information; The method of claim 13, wherein the intra-prediction mode for the current block is determined based on the remaining intra-prediction mode.

16. 10. The image encoding method of claim 9, wherein, when the DIMD mode is not applied to the current block, a default mode of the DIMD mode is one of a DC mode, a horizontal prediction mode, a vertical prediction mode, and a directional prediction mode.

17. 10. A computer-readable storage medium storing a bitstream generated by the video encoding method of claim 9.

18. A method for transmitting data for an image, comprising: obtaining a bitstream for the image, the bitstream being generated through a step of: deriving a Decoder Side Intra Mode Derivation (DIMD) mode for a current block; determining an intra prediction mode for the current block; generating intra prediction samples for the current block based on the intra prediction mode for the current block; generating prediction related information based on the intra prediction samples for the current block; and encoding image information including the prediction related information; transmitting the data including the bitstream; The method of claim 1, wherein the intra prediction mode for the current block is determined based on whether the DIMD mode is applied to the current block.

Citation Information

Cited By

  • Apparatus, method, and computer program for video coding and decoding

    JP2025533159A