Image encoding / decoding method and apparatus, and recording medium storing bitstreams

By deriving and storing intra prediction modes and applying geometric segmentation with non-separable transforms, the method addresses inefficiencies in encoding high-resolution images, enhancing efficiency and accuracy in video compression.

WO2025170289A1PCT designated stage Publication Date: 2025-08-14LG ELECTRONICS INC
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2025/001636
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-02-05
Filing Date
2025-02-04
Publication Date
2025-08-14

AI Technical Summary

Technical Problem

Existing video encoding and decoding technologies face challenges in efficiently compressing and transmitting high-resolution, high-quality images, particularly in managing intra prediction modes and reducing residual data transmission bits, while maintaining prediction accuracy.

Method used

The method involves deriving and storing intra prediction modes for current blocks, utilizing geometric segmentation and virtual intra prediction modes, and applying non-separable transforms to improve encoding efficiency and reduce residual data transmission.

Benefits of technology

This approach enhances encoding efficiency by optimizing intra prediction modes and reducing residual data transmission, while improving prediction accuracy and managing memory space effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025001636_14082025_PF_FP_ABST
    Figure KR2025001636_14082025_PF_FP_ABST
Patent Text Reader

Abstract

An image decoding method and apparatus according to the present disclosure can derive an intra prediction mode for a current block, generate a prediction block of the current block on the basis of the intra prediction mode, generate a residual block of the current block on the basis of a predetermined transform kernel, and reconstruct the current block on the basis of the prediction block and the residual block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding / decoding method and device, and recording medium storing bitstream The present invention relates to a video encoding / decoding method and device, and a recording medium storing a bitstream. Recently, the demand for high-resolution, high-quality images, such as HD (High Definition) images and UHD (Ultra High Definition) images, is increasing in various application fields, and accordingly, high-efficiency image compression technologies are being discussed. There are various technologies for image compression, such as inter prediction technology that predicts pixel values included in the current picture from pictures before or after the current picture, intra prediction technology that predicts pixel values included in the current picture using pixel information within the current picture, and entropy encoding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance, and these technologies can be used to effectively compress and transmit or store image data. The present disclosure provides a method and device for deriving and storing an intra prediction mode according to a prediction mode of a current block. The present disclosure provides a block segmentation method and device based on a geometric segmentation mode. The present disclosure provides a method and apparatus for generating a prediction block based on a geometric segmentation mode. The present disclosure provides a method and device for generating a prediction block based on a CIIP mode. The present disclosure provides a method and apparatus for determining a transform kernel for non-separable transform. The video decoding method and device according to the present disclosure can derive an intra prediction mode for a current block, generate a prediction block of the current block based on the intra prediction mode, generate a residual block of the current block based on a predetermined transform kernel, and reconstruct the current block based on the prediction block and the residual block. In the image decoding method and device according to the present disclosure, all or part of the derived intra prediction mode may be stored in the current block. In the image decoding method and device according to the present disclosure, when the current block is a block encoded based on an intra mode, the intra prediction mode for the current block can be derived based on the intra prediction mode of a surrounding block. In the image decoding method and device according to the present disclosure, when the surrounding block is a block encoded in an inter mode, a virtual intra prediction mode may be derived for the surrounding block, and the derived virtual intra prediction mode may be set as the intra prediction mode of the surrounding block. In the video decoding method and device according to the present disclosure, the virtual intra prediction mode can be derived from a pre-defined intra prediction mode. In the image decoding method and device according to the present disclosure, the virtual intra prediction mode can be derived based on at least one of the DIMD mode and the TIMD mode. In the image decoding method and device according to the present disclosure, when the DIMD mode is applied to a reference block adjacent to the peripheral block, the virtual intra prediction mode can be derived based on the HoG (histogram of gradient) of the reference block. In the image decoding method and device according to the present disclosure, the virtual intra prediction mode can be derived based on at least one of the intra prediction modes of reference blocks adjacent to the surrounding block. In the video decoding method and device according to the present disclosure, when the IBC (intra block copy) mode is applied to the surrounding block, the intra prediction mode of the position indicated by the block vector of the surrounding block can be set to the virtual intra prediction mode. In the image decoding method and device according to the present disclosure, the intra prediction mode for the current block can be derived based on at least one of a DIMD mode or a TIMD mode. In the image decoding method and device according to the present disclosure, when the DIMD mode is applied to a reference block adjacent to the current block, the intra prediction mode for the current block can be derived based on the HoG (histogram of gradient) of the reference block. In the image decoding method and device according to the present disclosure, when the current block is a block encoded in an inter mode, a virtual intra prediction mode may be derived for the current block, and the derived virtual intra prediction mode may be set as the intra prediction mode of the current block. In the video decoding method and device according to the present disclosure, the current block is divided into two partitions based on a geometric division mode, and information regarding at least one of an angle or a position of a division line for the geometric division mode can be derived based on an intra prediction mode for the current block. In the image decoding method and device according to the present disclosure, the current block is divided into two partitions based on a geometric partitioning mode, and a prediction block for one of the two partitions can be generated based on the intra prediction mode. In the image decoding method and device according to the present disclosure, the prediction block of the current block is generated by a weighted sum between a first prediction block based on inter prediction and a second prediction block based on intra prediction, and the second prediction block can be generated based on an intra prediction mode derived for the current block. The video encoding method and device according to the present disclosure can derive an intra prediction mode for a current block, generate a prediction block of the current block based on the intra prediction mode, derive transform coefficients of the current block based on a residual block of the current block, and encode residual information regarding the transform coefficients of the current block. A computer-readable digital storage medium is provided having encoded video / image information stored thereon, which causes a decoding device according to the present disclosure to perform a video decoding method. A computer-readable digital storage medium storing video / image information generated by a video encoding method according to the present disclosure is provided. A method and device for transmitting video / image information generated by a video encoding method according to the present disclosure are provided. According to the present disclosure, by deriving / storing a virtual intra prediction mode, information that can be referenced by spatially / temporally adjacent blocks can be diversified, and encoding efficiency of intra prediction can be improved. According to the present disclosure, the encoding efficiency of intra prediction can be improved by enabling the use of an intra prediction mode that is more optimized for the current block. According to the present disclosure, memory space for storing intra prediction modes can be efficiently managed. According to the present disclosure, by applying a geometric segmentation mode combined with intra prediction, the accuracy of prediction can be improved and the amount of transmission bits of residual data can be reduced. According to the present disclosure, by improving the intra prediction method in CIIP mode, the accuracy of prediction can be improved and the transmission bit amount of residual data can be reduced. According to the present disclosure, by using a virtual intra prediction mode for a block encoded in an inter mode, encoding efficiency can be improved by inducing universal application of a non-separable transform. FIG. 1 illustrates a video / image coding system according to the present disclosure. FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video / image signal is performed. FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video / image signal is performed. FIG. 4 illustrates a decoding method performed by a decoding device (300) as an embodiment according to the present disclosure. FIG. 5 illustrates a schematic configuration of a decoding device (300) that performs a decoding method according to the present disclosure. FIG. 6 illustrates an encoding method performed by an encoding device (200) as an embodiment according to the present disclosure. FIG. 7 illustrates a schematic configuration of an encoding device (200) that performs an encoding method according to the present disclosure. FIG. 8 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied. The present disclosure may be modified in various ways and encompasses numerous embodiments. Specific embodiments are illustrated in the drawings and described in detail in the detailed description. However, this is not intended to limit the present disclosure to specific embodiments, but rather to encompass all modifications, equivalents, and alternatives falling within the spirit and technical scope of the present disclosure. Throughout the description of each drawing, similar reference numerals have been used to designate similar components. While terms such as "first" and "second" may be used to describe various components, these components should not be limited by these terms. These terms are used solely to distinguish one component from another. For example, without departing from the scope of the present disclosure, a first component could be referred to as a "second component," and similarly, a second component could also be referred to as a "first component." The term "and / or" includes a combination of multiple related items described herein or any of multiple related items described herein. When a component is referred to as being "connected" or "connected" to another component, it should be understood that it may be directly connected or connected to that other component, but that there may be other components intervening. Conversely, when a component is referred to as being "directly connected" or "connected" to another component, it should be understood that there are no other components intervening. The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present disclosure. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, it should be understood that the terms "comprise" or "have" indicate the presence of a feature, number, step, operation, component, part, or combination thereof described in the specification, but do not preclude the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof. The present disclosure relates to video / image coding. For example, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the versatile video coding (VVC) standard. In addition, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation of audio video coding standard (AVS2), or the next generation of video / image coding standards (e.g., H.267 or H.268). This specification presents various embodiments of video / image coding, and unless otherwise stated, the embodiments may be performed in combination with each other. In this specification, a video may refer to a set of images over time. A picture generally refers to a unit representing one image at a specific time point, and a slice / tile is a unit that constitutes part of a picture in coding. A slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more slices / tiles. A tile is a rectangular area consisting of multiple CTUs within a specific tile column and a specific tile row of a picture. A tile column is a rectangular area of CTUs that has a height equal to the height of the picture and a width specified by the syntax requirements of the picture parameter set. A tile row is a rectangular area of CTUs that has a height specified by the picture parameter set and a width equal to the width of the picture. CTUs within a tile are arranged consecutively according to the CTU raster scan, while tiles within a picture may be arranged consecutively according to the tile raster scan. A slice may contain an integer number of complete tiles or an integer number of contiguous complete CTU rows within a picture, which may be exclusively contained within a single NAL unit. Meanwhile, a picture may be divided into two or more subpictures. A subpicture may be a rectangular region of one or more slices within a picture. A pixel, or pel, can refer to the smallest unit that constitutes a picture (or image). Additionally, the term "sample" can be used as a counterpart to a pixel. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component. A unit may represent 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. In some cases, the term "unit" may be used interchangeably with terms such as "block" or "area." In general, an MxN block may include a set (or array) of samples (or sample array) or transform coefficients consisting of M columns and N rows. 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." As used herein, a slash ( / ) or a comma can mean "and / or." For example, "A / B" can mean "A and / or B." Accordingly, "A / B" can mean "only A," "only B," or "both A and B." For example, "A, B, C" can mean "A, B, or C." In this specification, "at least one of A and B" may mean "only A", "only B" or "both A and B". Additionally, in this specification, the expressions "at least one of A or B" or "at least one of A and / or B" may be interpreted identically to "at least one of A and B". Additionally, 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.” Additionally, “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.” Additionally, parentheses used herein may mean "for example." Specifically, when "prediction (intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction." In other words, "prediction" in this specification is not limited to "intra-prediction," and "intra-prediction" may be suggested as an example of "prediction." Furthermore, even when "prediction (i.e., intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction." Technical features individually described in a single drawing in this specification may be implemented individually or simultaneously. FIG. 1 illustrates a video / image coding system according to the present disclosure. Referring to FIG. 1, a video / image coding system may include a first device (source device) and a second device (receiving device). A source device can transmit encoded video / image information or data to a receiving device via a digital storage medium or a network in the form of a file or streaming. The source device may include a video source, an encoding device, and a transmitting device. The receiving device may include a receiving device, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may include a display unit, and the display unit may be configured as a separate device or an external component. A video source may obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source may include a video / image capture device and / or a video / image generation device. The video / image capture device may include one or more cameras, a video / image archive containing previously captured video / images, etc. The video / image generation device may include 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 of generating related data. An encoding device can encode input video / images. The encoding device can perform a series of procedures, such as prediction, transformation, and quantization, to improve compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream. The transmission unit can transmit encoded video / image information or data output in the form of a bitstream to the receiving unit of a receiving device via a digital storage medium or network in the form of a file or streaming. The digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit can include an element for generating a media file via a predetermined file format and an element for transmission via a broadcasting / communication network. The receiving unit can receive / extract the bitstream and transmit it to a decoding device. The decoding device can decode the video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding device. The renderer can render decoded video / images. The rendered video / images can be displayed through the display unit. FIG. 2 is a schematic block diagram of an encoding device to which an embodiment of the present disclosure can be applied and in which encoding of a video / image signal is performed. Referring to FIG. 2, the encoding device (200) may be configured to include an image partitioner (210), a prediction unit (predictor) 220, a residual processor (residual processor) 230, an entropy encoder (entropy encoder) 240, an adder (adder) 250, a filter (filter) 260, and a memory (memory) 270. The prediction unit (220) may include an inter prediction unit (221) and an intra prediction unit (222). The residual processor (230) may include a transformer (transformer) 232, a quantizer (quantizer) 233, a dequantizer (dequantizer) 234, and an inverse transformer (inverse transformer) 235. The residual processing unit (230) may further include a subtractor (231). The addition unit (250) may be called a reconstructor or a recontructed block generator. The image segmentation 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) described above may be configured by one or more hardware components (e.g., an encoding device chipset or 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 component may further include the memory (270) as an internal / external component. The image segmentation unit (210) can segment an input image (or picture, frame) input to the encoding device (200) into one or more processing units. For example, the processing unit may be called a coding unit (CU). In this case, the coding unit may be recursively segmented from a coding tree unit (CTU) or a largest coding unit (LCU) according to a QTBTTT (Quad-tree binary-tree ternary-tree) structure. For example, a single coding unit may be split into multiple coding units with deeper depths 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 the binary tree structure and / or the ternary structure may be applied later. Alternatively, the binary tree structure may be applied before the quad-tree structure. The coding procedure according to the present specification may be performed based on the final coding unit that is no longer split. In this case, based on coding efficiency according to image characteristics, etc., the largest coding unit may be used directly as the final coding unit, or, if necessary, the coding unit may be recursively split into coding units of lower depths, and the coding unit with the 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) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be split 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 a transform coefficient and / or a unit for deriving a residual signal from a transform coefficient. The term "unit" may be used interchangeably with terms such as "block" or "area" depending on the case. In general, an MxN block can represent a set of samples or transform coefficients consisting of M columns and N rows. A sample can generally represent a pixel or a pixel value, and can represent only the pixel / pixel value of the luminance component, or only the pixel / pixel value of the chrominance component. A sample can be used as a term corresponding to a pixel or pel in a picture (or image). The encoding device (200) can generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (prediction block, prediction sample array) output from an inter prediction unit (221) or an intra prediction unit (222) from an input video signal (original block, original sample array), and the generated residual signal is transmitted to a conversion unit (232). In this case, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input video signal (original block, original sample array) within the encoding device (200) may be called a subtraction unit (231). The prediction unit (220) can perform a prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including prediction samples for the current block. The prediction unit (220) can determine whether intra prediction or inter prediction is applied on a current block or CU basis. The prediction unit (220) can generate various information related to prediction, such as prediction mode information, as described later in the description of each prediction mode, and transmit the information to the entropy encoding unit (240). The information related to prediction can be encoded by the entropy encoding unit (240) and output in the form of a bitstream. The intra prediction unit (222) can 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 a certain distance away from the current block depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The non-directional mode may include at least one of a DC mode or a planar mode. The directional mode may include 33 directional modes or 65 directional modes depending on the degree of detail in the prediction direction. However, this is only an example, and a greater or lesser number of directional modes may be used depending on the settings. The intra prediction unit (222) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks. The inter prediction unit (221) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of motion information between neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring block can include a spatial neighboring block existing in the current picture and a temporal neighboring block existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The above temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and the reference pictures including the temporal neighboring blocks may be called collocated pictures (colPic). For example, the inter prediction unit (221) may construct a motion information candidate list based on the neighboring blocks, and generate information indicating which candidate is used to derive the motion vector and / or reference picture index of the current block. Inter prediction may be performed based on various prediction modes, and for example, in the case of skip mode and merge mode, the inter prediction unit (221) may use the motion information of the neighboring blocks as the motion information of the current block. In the case of skip mode, unlike the merge mode, a residual signal may not be transmitted.In the motion vector prediction (MVP) mode, the motion vector of the surrounding blocks is used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference. The prediction unit (220) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein. Palette mode can be viewed as an example of intra coding or intra prediction. When the palette mode is applied, sample values within a picture can be signaled based on information about the palette table and palette index. The prediction signal generated through the prediction unit (220) can be used to generate a restoration signal or a residual signal. The transform unit (232) can apply a transform technique to the residual signal to generate transform coefficients. For example, the transform technique can include at least one of a Discrete Cosine Transform (DCT), a Discrete Sine Transform (DST), a Karhunen-Loeve Transform (KLT), a Graph-Based Transform (GBT), or a Conditionally Non-linear Transform (CNT). Here, GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. CNT refers to a transform obtained based on generating a prediction signal using all previously restored pixels. In addition, the transform process can be applied to a pixel block having a square size and the same size, or can be applied to a block of a non-square variable size. The quantization unit (233) quantizes the transform coefficients and transmits them to the entropy encoding unit (240), and the entropy encoding unit (240) can encode the quantized signal (information about the quantized transform coefficients) and output it as a bitstream. The information about the quantized transform coefficients can be called residual information. The quantization unit (233) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on the coefficient scan order, and can also generate information about the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoding unit (240) can perform various encoding methods such as exponential Golomb, context-adaptive variable length coding (CAVLC), context-adaptive binary arithmetic coding (CABAC), etc. The entropy encoding unit (240) can also encode information necessary for video / image restoration (e.g., values of syntax elements, etc.) together or separately from quantized transform coefficients. Encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in units of NAL (network abstraction layer) units. 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. In the present specification, information and / or syntax elements transmitted / signaled from an encoding device to a decoding device may be included in the video / image information. The video / image information may be encoded through the above-described encoding procedure and included in the bitstream. The bitstream may be transmitted via a network or stored in a digital storage medium. Here, the network may include a broadcasting network and / or a communication network, and the digital storage medium may include various storage media, such as a USB, SD, CD, DVD, Blu-ray, HDD, or SSD. The signal output from the entropy encoding unit (240) may be configured as an internal / external element of the encoding device (200) by a transmitting unit (not shown) and / or a storing unit (not shown), or the transmitting unit may be included in the entropy encoding unit (240). The quantized transform coefficients output from the quantization unit (233) can be used to generate a prediction signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (234) and the inverse transform unit (235), a residual signal (residual block or residual samples) can be restored. The addition unit (250) can generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit (221) or the intra prediction unit (222). When there is no residual for the block to be processed, such as when skip mode is applied, the predicted block can be used as a reconstructed block. The addition unit (250) may be called a restoration unit or a reconstructed block generation unit. The generated restoration signal can be used for intra prediction of the next processing target block within the current picture, and can also be used for inter prediction of the next picture after filtering as described below. Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and / or restoration process. The filtering unit (260) can improve subjective / objective picture quality by applying filtering to the restoration signal. For example, the filtering unit (260) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and store the modified restoration picture in the memory (270), specifically, in the DPB of the memory (270). The various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (260) can generate various information regarding filtering and transmit it to the entropy encoding unit (240). The information regarding filtering can be encoded by the entropy encoding unit (240) and output in the form of a bitstream. The modified restored picture transmitted to the memory (270) can be used as a reference picture in the inter prediction unit (221). Through this, when inter prediction is applied, the encoding device can avoid prediction mismatch between the encoding device (200) and the decoding device, and can also improve encoding efficiency. The DPB of the memory (270) can store the modified restored picture to be used as a reference picture in the inter prediction unit (221). The memory (270) can store motion information of a block from which motion information is derived (or encoded) within the current picture and / or motion information of blocks within a picture that has already been restored. The stored motion information can be transferred 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) can store restored samples of restored blocks within the current picture and transfer them to the intra prediction unit (222). FIG. 3 is a schematic block diagram of a decoding device to which an embodiment of the present disclosure can be applied and in which decoding of a video / image signal is performed. Referring to 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-prediction unit (332) and an intra-prediction unit (331). The residual processor (320) may include a dequantizer (321) and an inverse transformer (321). The entropy decoding unit (310), residual processing unit (320), prediction unit (330), addition unit (340), and filtering unit (350) described above may be configured by a single hardware component (e.g., a decoding device chipset or processor) depending on the embodiment. In addition, the memory (360) may include a decoded picture buffer (DPB) and may be configured by a digital storage medium. The hardware component may further include the memory (360) as an internal / external component. When a bitstream including video / image information is input, the decoding device (300) can restore the image corresponding to the process in which the video / image information is processed in the encoding device of FIG. 2. For example, the decoding device (300) can derive units / blocks based on block division-related information obtained from the bitstream. The decoding device (300) can perform decoding using a processing unit applied in the encoding device. Accordingly, the processing unit for decoding may be a coding unit, and the coding unit may 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 may be derived from the coding unit. Then, the restored image signal decoded and output by the decoding device (300) can be reproduced through a reproduction device. The decoding device (300) can receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal can be decoded through the entropy decoding unit (310). For example, the entropy decoding unit (310) can parse the bitstream to derive information (e.g., video / image information) necessary for image restoration (or picture restoration). The video / image information 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 device can decode the picture further based on the information on the parameter set and / or the general constraint information. The signaling / received information and / or syntax elements described later in this specification can be decoded through the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit (310) can decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output the values of syntax elements required for image restoration and the quantized values of transform coefficients for residuals. More specifically, the CABAC entropy decoding method receives a bin corresponding to each syntax element in the bitstream, determines a context model using information of the syntax element to be decoded and decoding information of the surrounding and decoding target blocks or information of symbols / bins decoded in the previous step, and predicts the occurrence probability of the bin according to the determined context model to 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 can update the context model using the information of the decoded symbol / bin for the context model of the next symbol / bin after determining the context model. Information regarding prediction among the information decoded by the entropy decoding unit (310) is provided to the prediction unit (inter prediction unit (332) and intra prediction unit (331)), and residual values on which entropy decoding is performed by the entropy decoding unit (310), i.e., quantized transform coefficients and related parameter information, can be input to the residual processing unit (320). The residual processing unit (320) can derive a residual signal (residual block, residual samples, residual sample array). In addition, information regarding filtering among the information decoded by the entropy decoding unit (310) can be provided to the filtering unit (350). Meanwhile, a receiving unit (not shown) that receives a signal output from an encoding device may be further configured as an internal / external element of a decoding device (300), or the receiving unit may be a component of an entropy decoding unit (310). Meanwhile, a decoding device according to the present specification may be called a video / video / picture decoding device, and the decoding device may be divided into an information decoding device (video / video / picture information decoding device) and a sample decoding device (video / video / picture sample decoding device). The information decoding device may include the entropy decoding unit (310), and the sample decoding device may include at least one of the inverse quantization unit (321), the inverse transformation unit (322), the adding unit (340), the filtering unit (350), the memory (360), the inter prediction unit (332), and the intra prediction unit (331). The inverse quantization unit (321) can inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit (321) can rearrange the quantized transform coefficients into a two-dimensional block form. In this case, the rearrangement can be performed based on the coefficient scanning order performed in the encoding device. The inverse quantization unit (321) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients. In the inverse transform unit (322), the transform coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array). The prediction unit (320) can perform a prediction on the current block and generate a predicted block including prediction samples for the current block. The prediction unit (320) can determine whether intra-prediction or inter-prediction is applied to the current block based on the information regarding the prediction output from the entropy decoding unit (310), and can determine a specific intra / inter-prediction mode. The prediction unit (320) can generate a prediction signal based on various prediction methods described below. For example, the prediction unit (320) can apply intra prediction or inter prediction for prediction of a single block, and can also apply intra prediction and inter prediction simultaneously. This can be called combined inter and intra prediction (CIIP) mode. In addition, the prediction unit can be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode can be used for content image / video coding such as games, such as screen content coding (SCC). IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives a reference block within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described herein. Palette mode can be viewed as an example of intra coding or intra prediction. When palette mode is applied, information about the palette table and palette index may be included and signaled in the video / image information. The intra prediction unit (331) can predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The intra prediction unit (331) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks. The inter prediction unit (332) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit (332) can construct a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating an inter prediction mode for the current block. The addition unit (340) can generate a restoration signal (restored picture, restoration block, restoration sample array) by adding the acquired residual signal to the prediction signal (prediction block, prediction sample array) output from the prediction unit (including the inter-prediction unit (332) and / or intra-prediction unit (331)). When there is no residual for the block to be processed, such as when skip mode is applied, the prediction block can be used as the restoration block. The addition unit (340) may be referred to as a restoration unit or restoration block generation unit. The generated restoration signal may be used for intra prediction of the next processing target block within the current picture, may be output after filtering as described below, or may be used for inter prediction of the next picture. Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture decoding process. The filtering unit (350) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (350) can apply various filtering methods to the restored picture to generate a modified restored picture, and transmit the modified restored picture to the memory (360), specifically, to the DPB of the memory (360). The various filtering methods can include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The (corrected) reconstructed picture stored in the DPB of the memory (360) can be used as a reference picture in the inter prediction unit (332). The memory (360) can store motion information of a block from which motion information is derived (or decoded) in the current picture and / or motion information of blocks in a picture that has already been reconstructed. The stored motion information can be transferred to the inter prediction unit (332) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (360) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (331). In this specification, the embodiments described in the filtering unit (260), the inter prediction unit (221), and the intra prediction unit (222) of the encoding device (200) can be applied to the filtering unit (350), the inter prediction unit (332), and the intra prediction unit (331) of the decoding device (300) in the same or corresponding manner, respectively. FIG. 4 illustrates an image decoding method performed by a decoding device (300) as an embodiment according to the present disclosure. Referring to FIG. 4, an intra prediction mode can be derived for the current block (S400). According to the present disclosure, the current block may be a block encoded in intra mode. Alternatively, the current block may be a block encoded in inter mode. Even in the case of a block encoded in inter mode, an intra prediction mode may be utilized during encoding / decoding processes such as prediction and transformation, and for this purpose, an intra prediction mode may be derived for the current block. Hereinafter, a method for deriving an intra prediction mode based on the prediction mode of the current block will be described. 1. If the block is encoded in intra mode The intra prediction mode for the current block can be derived based on the intra prediction mode of the neighboring blocks. Here, the neighboring blocks may include blocks adjacent to the current block (i.e., adjacent neighboring blocks). The adjacent neighboring blocks may include at least one of an upper neighboring block, a left neighboring block, an upper-left neighboring block, an upper-right neighboring block, or a lower-left neighboring block. The neighboring blocks may include blocks that are not adjacent to the current block (i.e., non-adjacent neighboring blocks). Alternatively, the neighboring blocks may include blocks that are temporally adjacent to the current block (i.e., temporal neighboring blocks). Hereinafter, a method for deriving the intra prediction mode of a neighboring block based on whether the neighboring block is a block encoded in the intra mode will be described. If a neighboring block is a block encoded in an intra mode, the neighboring block may have an intra prediction mode, and the intra prediction mode may be stored in a predefined memory corresponding to the size of the neighboring block. The stored intra prediction mode may be referenced by spatially and / or temporally adjacent neighboring blocks. For example, if the neighboring block is a block encoded in a planar mode, 0 corresponding to the planar mode number may be stored in the memory corresponding to the neighboring block. If a neighboring block is a block encoded with an inter mode, the neighboring block may not have an intra prediction mode to be stored in memory. In this case, one or more virtual intra prediction modes (VIPMs) may be derived and stored for the neighboring block based on at least one of methods 1 to 6 described below. The VIPMs may be set as the intra prediction modes of the neighboring blocks. Alternatively, if multiple VIPMs are derived for the neighboring block, the top N VIPMs may be selected in ascending order of pre-defined costs, and the selected N VIPMs may be set as the intra prediction modes of the neighboring block. Here, N may be an integer of 1, 2, 3, 4, or a higher number. VIPM according to the present disclosure may refer to an intra prediction mode derived by considering encoding information of a corresponding block. Here, the encoding information may include at least one of characteristics of a spatial / temporal reference sample, mode information, motion information, an intra prediction mode of a spatial / temporal reference block, a split type, or a split direction. The encoding information may also include information derived through a combination of at least two of the above-described encoding information. In this way, even for a block that is not encoded in an intra mode, by deriving / storing a VIPM by considering the characteristics of the corresponding block, information that can be referenced by spatially / temporally adjacent blocks can be increased, thereby improving encoding efficiency. Method 1 If the surrounding block is a block encoded in an inter mode, a predefined intra prediction mode can be derived and stored as VIPM. Here, the predefined intra prediction mode may be a planar mode, which is defined identically in the encoding device and the decoding device. However, the present invention is not limited thereto, and the predefined intra prediction mode may also be a non-directional mode, such as a DC mode, or a directional mode, such as a horizontal mode or a vertical mode. Method 2 The VIPM according to the present disclosure can be derived based on the decoder-side intra mode derivation (DIMD) mode. Specifically, a predetermined filter may be applied to a previously reconstructed region adjacent to a neighboring block to calculate a gradient of sample values within the previously reconstructed region. Here, the gradient may be calculated based on at least one of a horizontal direction change amount or a vertical direction change amount. Alternatively, a predetermined filter may be applied to a prediction block (or a reconstructed block) of a neighboring block generated based on an inter mode to calculate the gradient of sample values. Based on the calculated gradient, an intra prediction mode corresponding to the gradient may be determined, and a predetermined amplitude value may be assigned to the intra prediction mode. Here, the amplitude value may be the sum of the magnitude of the horizontal direction change amount and the magnitude of the vertical direction change amount. The aforementioned process may be performed by moving horizontally and / or vertically for samples within the previously reconstructed region (or prediction block, reconstructed block), thereby obtaining an accumulated amplitude value for each intra prediction mode. The top N intra prediction modes can be selected in descending order of amplitude values assigned to the intra prediction modes, and the selected N intra prediction modes can be set as VIPM. N can be an integer of 1, 2, 3, 4, or a higher number. The filter can be a differential filter (e.g., a Sobel filter). Additionally, samples in a pre-reconstructed region (or a prediction block, a reconstructed block) to which the differential filter is applied can be an MxM block, or at least one of M sample columns or rows. The M can be an integer of 1, 2, 3, 4, or a higher number. In addition, the M can be variably determined based on the size of a current block, or can be a value pre-defined identically to an encoding device and a decoding device. Method 3 The VIPM according to the present disclosure can be derived based on a template-based intra mode derivation (TIMD) mode. Specifically, a cost for each of predetermined intra prediction modes can be calculated. Here, the cost can be calculated based on the difference between prediction samples of the template and reconstructed samples. The template may be a pre-reconstructed region adjacent to a neighboring block. The prediction samples of the template may be generated through intra prediction based on the predetermined intra prediction mode. The top N intra prediction modes in ascending order of the calculated costs can be selected, and the selected N intra prediction modes can be set as the VIPM. N can be an integer of 1, 2, 3, 4, or higher. Method 4 When the DIMD mode is applied to a block adjacent to a neighboring block (hereinafter referred to as a reference block), the reference block may store amplitude values (or histrogram of gradient, HoG) assigned to each intra prediction mode. In this case, the neighboring block may derive and store a VIPM by reusing the HoG of the reference block. At this time, the VIPM may be derived by reusing the HoG of one reference block, or the VIPM may be derived based on a combination of HoGs for two or more reference blocks (e.g., the average of the HoGs). When reusing the HoG, the top N intra prediction modes in descending order of the amplitude values assigned to each intra prediction mode may be set as the VIPM. Method 5 Intra prediction modes may be stored in blocks adjacent to a neighboring block (hereinafter referred to as reference blocks). In this case, a predetermined amplitude value may be assigned to the intra prediction mode of the reference block based on the size of the reference block. The top N intra prediction modes are selected in descending order of the amplitude values assigned to the intra prediction modes of the reference blocks, and the selected N intra prediction modes may be set as VIPM. N may be an integer of 1, 2, 3, 4, or a higher number. The size of the reference block may be defined by width, height, the product of width and height, the sum of width and height, the maximum / minimum value of width and height, or the ratio of width and height. The reference block is not limited to a block adjacent to a neighboring block, and a block not adjacent to a neighboring block may also be used as a reference block. At least one of the position or the number of the reference blocks may be identically predefined for an encoding device and a decoding device. Method 6 When the intra block copy (IBC) mode is applied to a neighboring block, the intra prediction mode of the position indicated by the block vector of the neighboring block may be set to VIPM. At this time, within the reference block indicated by the block vector, the intra prediction mode corresponding to the central position (width / 2, height / 2) of the reference block may be set to VIPM. Alternatively, the intra prediction mode of the subblock including the position indicated by the block vector may be set to VIPM. The VIPM derivation for the aforementioned neighboring blocks can be performed adaptively based on the size of the neighboring blocks. For example, if the size of the neighboring block is greater than a threshold, VIPM may not be derived for the neighboring block. In this case, the intra prediction mode of the neighboring block may be set to a predefined intra prediction mode (e.g., planar mode). Conversely, if the size of the neighboring block is less than or equal to the threshold, VIPM may be derived for the neighboring block based on the aforementioned method. The intra prediction mode of the current block can be derived based on a candidate list containing multiple candidate modes. One or more of the multiple candidate modes in the candidate list can be set as the intra prediction mode of the current block. A candidate index indicating one or more of the multiple candidate modes can be encoded and signaled via the bitstream. At least one of the multiple candidate modes can be derived based on a (virtual) intra prediction mode of a surrounding block. Here, the surrounding block may include at least one of a spatial surrounding block or a temporal surrounding block. The spatial surrounding block may include at least one of an adjacent surrounding block or a non-adjacent surrounding block. The adjacent surrounding block is a block that is spatially adjacent to the current block, and may include at least one of an upper surrounding block, a left surrounding block, an upper-left surrounding block, a lower-left surrounding block, or an upper-right surrounding block. The non-adjacent surrounding block may include a block that belongs to the same picture as the current block but was encoded / decoded before the current block and is not spatially adjacent to the current block. If a neighboring block is a block encoded in intra mode, the intra prediction mode used for intra prediction of the neighboring block may be stored. The intra prediction mode stored in the neighboring block may be set as a candidate mode. Alternatively, if the neighboring block is a block encoded in inter mode, a virtual intra prediction mode (VIPM) may be stored in the neighboring block. In this case, the VIPM stored in the neighboring block may be set as a candidate mode. The VIPM derivation method has been discussed above, and a redundant description will be omitted here. The following is an example of constructing a candidate list based on the intra prediction mode of surrounding blocks. This example assumes that the left and top neighboring blocks of the current block are referenced to construct the candidate list. The left neighboring block is a block encoded in intra mode, storing mode 18, while the top neighboring block is a block encoded in inter mode. The intra prediction mode (candIntraPredModeA) of the left neighboring block can be set to mode 18. Since the upper neighboring block is a block encoded in inter mode, the intra prediction mode (candIntraPredModeB) of the upper neighboring block can be set to VIPM. For example, when VIPM is derived according to the aforementioned method 1, the intra prediction mode of the upper neighboring block can be set to planar mode (i.e., mode 0). This corresponds to the case where the intra prediction mode of the left neighboring block and the intra prediction mode of the upper neighboring block are different, and one of them is a directional mode and the other is a non-directional mode. In this case, mode 18, candIntraPredModeA, may be added to the candidate list as a candidate mode. planar mode, candIntraPredModeB, may not be added to the candidate list. In addition, the candidate modes added to the candidate list may further include peripheral mode(s) of mode 18. The peripheral mode(s) may be derived by adding one or more offsets to mode 18. Here, the offset is defined identically in the encoding device and the decoding device, and may include at least one of 1, -1, 2, -2, 3, or -3. For example, the candidate list for the current block may be configured as in the following mathematical expression 1. [Mathematical Formula 1] candModeList

[0000] = maxAB candModeList

[0001] = 2 + ( ( maxAB + 61 ) % 64 ) candModeList

[0002] = 2 + ( ( maxAB - 1 ) % 64 ) candModeList

[0003] = 2 + ( ( maxAB + 60 ) % 64 ) candModeList

[0004] = 2 + ( maxAB % 64 ) In Equation 1, maxAB can be the maximum value between candIntraPredModeA and candIntraPredModeB. In Equation 1, the candidate list includes five candidate modes, but this is only an example, and the number of candidate modes constituting the candidate list is not limited to five. Alternatively, a VIPM may be derived according to any one of the above-described methods 2 to 6. If the VIPM is derived in mode 50, the intra prediction mode (candIntraPredModeB) of the upper neighboring block may be set to mode 50. This corresponds to the case where the intra prediction mode of the left neighboring block and the intra prediction mode of the upper neighboring block are different from each other and are both directional modes. In this case, mode 18, candIntraPredModeA, and mode 50, candIntraPredModeB, can be added to the candidate list as candidate modes. In addition, the candidate modes added to the candidate list may further include at least one peripheral mode(s) of mode 18 or mode 50. The peripheral mode(s) may be derived by adding one or more offsets to at least one of mode 18 or mode 50. Here, the offset is defined identically in the encoding device and the decoding device, and may include at least one of 1, -1, 2, -2, 3, or -3. For example, the candidate list for the current block may be configured as in the following mathematical expression 2. [Equation 2] candModeList

[0000] = candIntraPredModeA candModeList

[0001] = candIntraPredModeB candModeList

[0002] = 2 + ( ( minAB + 61 ) % 64 ) candModeList

[0003] = 2 + ( ( maxAB - 1 ) % 64 ) candModeList

[0004] = 2 + ( ( minAB + 60 ) % 64 ) In Equation 2, maxAB may be the maximum value between candIntraPredModeA and candIntraPredModeB. minAB may be the minimum value between candIntraPredModeA and candIntraPredModeB. In Equation 2, the candidate list includes five candidate modes, but this is only an example, and the number of candidate modes constituting the candidate list is not limited to five. If the surrounding block is a block encoded in inter mode and the intra prediction mode of the surrounding block is derived based on VIPM, the intra prediction mode of the surrounding block may be added to the candidate list in a low priority order. For example, the intra prediction mode of a surrounding block encoded based on the intra mode can be preferentially added to the candidate list, and then the intra prediction mode of a surrounding block encoded based on the inter mode can be added to the candidate list. The intra prediction mode of the current block may be derived based on a predetermined method. For example, the intra prediction mode derived based on the predetermined method may be set as the intra prediction mode of the current block. Alternatively, the intra prediction mode derived based on the predetermined method may be used as a candidate mode of the current block and, for this purpose, may be added to a candidate list of the current block. In this case, any one of a plurality of candidate modes included in the candidate list may be set as the intra prediction mode of the current block. A candidate index indicating any one of the plurality of candidate modes may be encoded and signaled through a bitstream. The predetermined method may include at least one of Methods 1 to 4 described below. Meanwhile, the derivation of the intra prediction mode according to the above-described method may be adaptively performed based on the size of the current block. For example, if the size of the current block is larger than a threshold, the intra prediction mode may not be derived based on the above-described method. In this case, the intra prediction mode of the current block may be set to a pre-defined intra prediction mode (e.g., planar mode). On the other hand, if the size of the current block is smaller than or equal to the threshold, the intra prediction mode may be derived for the current block based on the above-described method. Method 1 The intra prediction mode of the current block can be derived based on the decoder-side intra mode derivation (DIMD) mode. Specifically, a predetermined filter can be applied to a previously reconstructed region adjacent to the current block to calculate a gradient of sample values within the previously reconstructed region. Here, the gradient can be calculated based on at least one of a horizontal change amount or a vertical change amount. Based on the calculated gradient, an intra prediction mode corresponding to the gradient can be determined, and a predetermined amplitude value can be assigned to the intra prediction mode. Here, the amplitude value can be the sum of the magnitudes of the horizontal change amount and the vertical change amount. The aforementioned process can be performed by moving horizontally and / or vertically for samples within the previously reconstructed region, thereby obtaining an accumulated amplitude value for each intra prediction mode. The top N intra prediction modes can be selected in descending order of amplitude values assigned to the intra prediction modes, and the selected N intra prediction modes can be set as the intra prediction mode of the current block. N can be an integer of 1, 2, 3, 4, or a higher number. The filter can be a differential filter (e.g., a Sobel filter). Additionally, samples in a pre-reconstructed region (or prediction block, reconstructed block) to which the differential filter is applied can be an MxM block, or at least one of M sample columns or rows. The M can be an integer of 1, 2, 3, 4, or a higher number. In addition, the M can be variably determined based on the size of the current block, or can be a value pre-defined identically to the encoding device and the decoding device. Method 2 The intra prediction mode of the current block can be derived based on a template-based intra mode derivation (TIMD) mode. Specifically, a cost for each of the predetermined intra prediction modes can be calculated. Here, the cost can be calculated based on the difference between the prediction samples of the template and the reconstructed samples. The template can be a pre-reconstructed region adjacent to the current block. The prediction samples of the template can be generated through intra prediction based on the predetermined intra prediction mode. The top N intra prediction modes can be selected in ascending order of the calculated costs, and the selected N intra prediction modes can be set as the intra prediction mode of the current block. N can be an integer of 1, 2, 3, 4, or a higher number. Method 3 When the DIMD mode is applied to a block adjacent to the current block (hereinafter referred to as a reference block), the reference block may store amplitude values (or histrogram of gradient, HoG) assigned to each intra prediction mode. In this case, the current block may derive and store an intra prediction mode by reusing the HoG of the reference block. At this time, the intra prediction mode may be derived by reusing the HoG of one reference block, or the intra prediction mode may be derived based on a combination of HoGs for two or more reference blocks (e.g., an average of HoGs). When reusing HoGs, the top N intra prediction modes in descending order of the amplitude values assigned to each intra prediction mode may be set as the intra prediction mode of the current block. Method 4 Intra prediction modes may be stored in blocks adjacent to the current block (hereinafter referred to as reference blocks). In this case, a predetermined amplitude value may be assigned to the intra prediction mode of the reference block based on the size of the reference block. The top N intra prediction modes are selected in descending order of the amplitude values assigned to the intra prediction modes of the reference blocks, and the selected N intra prediction modes may be set as the intra prediction mode of the current block. N may be an integer of 1, 2, 3, 4, or a higher number. The size of the reference block may be defined by width, height, the product of width and height, the sum of width and height, the maximum / minimum value of width and height, or the ratio of width and height. The reference block is not limited to a block adjacent to the current block, and a block not adjacent to the current block may also be used as a reference block. At least one of the position or the number of the reference blocks may be identically predefined for an encoding device and a decoding device. 2. If the block is encoded in inter mode If the current block is a block encoded with an inter mode, the current block may not have an intra prediction mode to be stored in memory. In this case, one or more virtual intra prediction modes (VIPMs) may be derived and stored for the current block based on at least one of methods 1 to 7 described below. The VIPMs may be set as the intra prediction modes of the current block. Alternatively, if multiple VIPMs are derived for the current block, the top N VIPMs may be selected in ascending order of pre-defined costs, and the selected N VIPMs may be set as the intra prediction modes of the current block. Here, N may be an integer of 1, 2, 3, 4, or a higher number. VIPM according to the present disclosure may refer to an intra prediction mode derived by considering encoding information of a current block. Here, the encoding information may include at least one of a feature of a spatial / temporal reference sample, mode information, motion information, an intra prediction mode of a spatial / temporal reference block, a split type, or a split direction. The encoding information may also include information derived through a combination of at least two of the above-described encoding information. In this way, even for a block that is not encoded in an intra mode, by deriving / storing a VIPM by considering the characteristics of the block, information that can be referenced by spatially / temporally adjacent blocks can be increased, thereby improving encoding efficiency. Method 1 If the current block is a block encoded in an inter mode, a predefined intra prediction mode can be derived and stored as VIPM. Here, the predefined intra prediction mode may be a planar mode, which is defined identically in the encoding device and the decoding device. However, the present invention is not limited thereto, and the predefined intra prediction mode may also be a non-directional mode, such as a DC mode, or a directional mode, such as a horizontal mode or a vertical mode. Method 2 The VIPM according to the present disclosure can be derived based on the decoder-side intra mode derivation (DIMD) mode. Specifically, a predetermined filter may be applied to a previously reconstructed region adjacent to a current block to calculate a gradient of sample values within the previously reconstructed region. Here, the gradient may be calculated based on at least one of a horizontal change amount or a vertical change amount. Alternatively, a predetermined filter may be applied to a prediction block of a current block generated based on an inter mode to calculate the gradient of sample values within the prediction block. Based on the calculated gradient, an intra prediction mode corresponding to the gradient may be determined, and a predetermined amplitude value may be assigned to the intra prediction mode. Here, the amplitude value may be the sum of the magnitudes of the horizontal change amount and the vertical change amount. The aforementioned process may be performed by moving horizontally and / or vertically for samples within the previously reconstructed region (or prediction block), thereby obtaining an accumulated amplitude value for each intra prediction mode. The top N intra prediction modes can be selected in descending order of amplitude values assigned to the intra prediction modes, and the selected N intra prediction modes can be set as VIPM. N can be an integer of 1, 2, 3, 4, or a higher number. The filter can be a differential filter (e.g., a Sobel filter). Additionally, samples in a pre-reconstructed region (or a prediction block, a reconstructed block) to which the differential filter is applied can be an MxM block, or at least one of M sample columns or rows. The M can be an integer of 1, 2, 3, 4, or a higher number. In addition, the M can be variably determined based on the size of a current block, or can be a value pre-defined identically to an encoding device and a decoding device. Method 3 The VIPM according to the present disclosure can be derived based on a template-based intra mode derivation (TIMD) mode. Specifically, a cost for each of predetermined intra prediction modes can be calculated. Here, the cost can be calculated based on the difference between prediction samples of the template and reconstructed samples. The template can be a pre-reconstructed region adjacent to the current block. The prediction samples of the template can be generated through intra prediction based on the predetermined intra prediction mode. The top N intra prediction modes can be selected in ascending order of the calculated costs, and the selected N intra prediction modes can be set as the VIPM. N can be an integer of 1, 2, 3, 4, or higher. Method 4 When the DIMD mode is applied to a block adjacent to the current block (hereinafter referred to as a reference block), the reference block may store amplitude values (or histrogram of gradient, HoG) assigned to each intra prediction mode. In this case, the current block may derive and store a VIPM by reusing the HoG of the reference block. At this time, the VIPM may be derived by reusing the HoG of one reference block, or the VIPM may be derived based on a combination of HoGs for two or more reference blocks (e.g., an average of the HoGs). When reusing the HoG, the top N intra prediction modes in descending order of the amplitude values assigned to each intra prediction mode may be set as the VIPM. Method 5 Intra prediction modes may be stored in blocks adjacent to the current block (hereinafter referred to as reference blocks). In this case, a predetermined amplitude value may be assigned to the intra prediction mode of the reference block based on the size of the reference block. The top N intra prediction modes are selected in descending order of the amplitude values assigned to the intra prediction modes of the reference blocks, and the selected N intra prediction modes may be set as VIPM. N may be an integer of 1, 2, 3, 4, or more. The size of the reference block may be defined by width, height, the product of width and height, the sum of width and height, the maximum / minimum value of width and height, or the ratio of width and height. The reference block is not limited to a block adjacent to the current block, and a block not adjacent to the current block may also be used as a reference block. At least one of the position or the number of the reference blocks may be identically predefined for an encoding device and a decoding device. Method 6 When the Intra Block Copy (IBC) mode is applied to the current block, the intra prediction mode of the position indicated by the block vector of the current block may be set to VIPM. At this time, within the reference block indicated by the block vector, the intra prediction mode corresponding to the central position (width / 2, height / 2) of the reference block may be set to VIPM. Alternatively, the intra prediction mode of the subblock including the position indicated by the block vector may be set to VIPM. The VIPM derivation for the current block described above can be performed adaptively based on the size of the current block. For example, if the size of the current block is greater than a threshold, a VIPM may not be derived for the current block. In this case, the intra prediction mode of the current block may be set to a predefined intra prediction mode (e.g., planar mode). Conversely, if the size of the current block is less than or equal to the threshold, a VIPM may be derived for the current block based on the aforementioned method. Method 7 When a geometric partitioning mode (GPM) is applied to a current block, the current block can be partitioned into two partitions. An intra prediction mode for one of the two partitions (i.e., the first partition) can be derived based on VIPM. Here, the VIPM can be derived based on at least one operation among similarity, variance, or difference of samples in a prediction block generated for the other of the two partitions (i.e., the second partition). The prediction block for the second partition can be generated based on merge mode, AMVP mode, or IBC mode. For example, a predetermined filter may be applied to a prediction block generated for a second partition to calculate a gradient of sample values within the prediction block. Based on the calculated gradient, an intra prediction mode corresponding to the gradient may be determined, and a predetermined amplitude value may be assigned to the intra prediction mode. Here, the amplitude value may be the sum of the magnitude of the horizontal change amount and the magnitude of the vertical change amount. The above-described process may be performed while moving horizontally and / or vertically for samples within the prediction block for the second partition, thereby obtaining an accumulated amplitude value for each intra prediction mode. The top N intra prediction modes may be selected in descending order of the amplitude values assigned to the intra prediction modes, and the selected N intra prediction modes may be set to VIPM. N may be an integer of 1, 2, 3, 4, or a higher number. The filter may be a differential filter (e.g., a Sobel filter). In this way, by using VIPM for the current block, signaling of the intra prediction mode used in the GPM of the current block can be omitted, and signaling bits for the intra prediction mode can be reduced. Alternatively, the intra prediction mode of the first partition may be derived based on any one of the plurality of GPM candidates. Here, the plurality of GPM candidates may include at least one of a parallel mode, a perpendicular mode, a planar mode, or the VIPM described above. The parallel mode may use an intra prediction mode that is parallel to the angle of the segmentation line according to the GPM. That is, when the parallel mode is selected among the plurality of GPM candidates, the intra prediction mode that is parallel to the angle of the segmentation line may be derived as the intra prediction mode of the first partition. The perpendicular mode may use an intra prediction mode that is perpendicular to the angle of the segmentation line according to the GPM. That is, when the perpendicular mode is selected among the plurality of GPM candidates, the intra prediction mode that is perpendicular to the angle of the segmentation line may be derived as the intra prediction mode of the first partition. An index for specifying any one of the plurality of GPM candidates may be encoded and signaled through a bitstream. Multiple intra prediction modes may be derived for the first partition. For example, VIPM may be derived for the first partition. Additionally, at least one of the multiple GPM candidates may be derived as an intra prediction mode for the first partition. Here, the multiple GPM candidates may include at least one of a parallel mode, a vertical mode, or a planar mode. One or more indices for specifying at least one of the multiple GPM candidates may be encoded and signaled via the bitstream. Alternatively, the plurality of GPM candidates may be configured to include at least one of a parallel mode, a vertical mode, or a planar mode, and the VIPM. At least two of these plurality of GPM candidates may be derived as the intra prediction mode of the first partition. One or more indices for specifying at least two of the plurality of GPM candidates may be encoded and signaled via the bitstream. A plurality of GPM candidates can form a single GPM candidate list. When the GPM candidate list consists of N GPM candidates, the GPM candidates can be arranged in indices from 0 to (N-1) within the GPM candidate list, respectively. The GPM candidates in the GPM candidate list can be rearranged based on the VIPM derived for the first partition. In this case, one or more indices for specifying at least two of the plurality of GPM candidates can be encoded based on the indices of the rearranged GPM candidates and signaled through the bitstream. The rearrangement of the GPM candidates can be performed based on the similarity between the GPM candidates and the VIPM. A GPM candidate having a high similarity to the VIPM can be rearranged to a relatively smaller index value, and a GPM candidate having a low similarity to the VIPM can be rearranged to a relatively larger index value. The similarity can be determined based on the prediction direction between the GPM candidate and the VIPM, the difference in mode number between the GPM candidate and the VIPM, etc. For example, if the predicted direction of the GPM candidate and the VIPM are different (i.e., one of the GPM candidate and the VIPM has a vertical direction while the other has a horizontal direction), the two may be judged to have low similarity, otherwise, the two may be judged to have high similarity. Alternatively, even if the predicted direction of the GPM candidate and the VIPM are the same, the smaller the difference between the mode number of the GPM candidate and the mode number of the VIPM, the higher the similarity may be judged. By signaling the index based on the GPM candidates rearranged in this way, the number of bits required to signal the index can be efficiently reduced. The VIPM derived for the current block can be used to construct a candidate list for the current block. That is, the candidate list can include multiple candidate modes, and the multiple candidate modes can include the VIPM derived for the current block. At least one of the multiple candidate modes can be set as the intra prediction mode of the current block. A candidate index indicating at least one of the multiple candidate modes can be encoded and signaled via the bitstream. The intra prediction mode of the above-described induced neighboring blocks and / or the current block can be stored in the memory of the corresponding block. In this case, the intra prediction mode can be stored in units of NxN blocks. Here, N can be a pre-defined integer or a value signaled through a higher-level syntax. For example, N can be any one of 2, 4, 8, or 16. When N is 4, the intra prediction mode can be stored in units of 4x4 blocks. However, the present invention is not limited thereto, and the intra prediction mode can be stored in units of NxM blocks depending on at least one of the size or shape of the current block. Here, N and M can be different integers. Referring to FIG. 4, a prediction block of the current block can be generated based on the intra prediction mode of the current block (S410). When two or more intra prediction modes are derived for the current block, two or more prediction blocks can be derived respectively based on the two or more intra prediction modes, and a prediction block of the current block can be generated through a weighted sum of the derived prediction blocks. When multiple intra prediction modes are used in the prediction process of the current block, the multiple intra prediction modes used for the current block may be stored in the memory corresponding to the current block. Alternatively, considering memory usage, some mode(s) among the multiple intra prediction modes used for the current block may be selectively stored. Two or more stored intra prediction modes may be stored in different memories, which may be referenced by spatially / temporally adjacent blocks, thereby improving encoding efficiency. For example, the current block can generate M prediction blocks based on M intra prediction modes, and the final prediction block of the current block can be generated based on a weighted sum of the M prediction blocks. Considering the memory usage, some N intra prediction mode(s) among the M intra prediction modes can be selected and stored. Here, M is a predefined value and can be an integer of 2, 3, 4, or more. N is a predefined value and can be an integer of 1, 2, 3, or more. N can be less than or equal to M. For example, when N is 2, some intra prediction modes to be stored may be first and second intra prediction modes with high priorities among the M intra prediction modes. Here, indices of 0 to (M-1) may be assigned to the M intra prediction modes, respectively. At this time, the first and second intra prediction modes with high priorities may be intra prediction modes to which indices of 0 and 1 are assigned. Alternatively, the first and second intra prediction modes with high priorities may be the top two intra prediction modes in ascending order of costs for the M intra prediction modes. Alternatively, the first and second intra prediction modes with high priorities may be the top two intra prediction modes in descending order of amplitude values for the M intra prediction modes. Alternatively, some intra prediction modes among the M intra prediction modes may be reordered in consideration of the diversity of intra prediction directions. At this time, some of the intra prediction modes being stored may be the first and second intra prediction modes having higher priorities among the M reordered intra prediction modes. A plurality of intra prediction modes can be derived for a current block and used for prediction of the current block. Some of the intra prediction modes used for the current block can be stored. In this case, the intra prediction mode stored for the current block can further include non-directional modes that are not derived for the current block in addition to the some modes. For example, even if M intra prediction modes are used for prediction of the current block, two partial intra prediction modes can be stored for the current block (M>2). In this case, the two partial intra prediction modes can be a first intra prediction mode having a higher priority among the M intra prediction modes used for prediction of the current block and a planar mode (which is not included in the M intra prediction modes). When a final prediction block is generated through a weighted sum of prediction blocks derived based on multiple intra prediction modes, weight information for the weighted sum may be stored in the corresponding block. The weight information may be an index indicating any one of multiple weighting factors belonging to a pre-defined weighting factor set. Each weighting factor belonging to the weighting factor set may be composed of weights corresponding to multiple intra prediction modes (or weights applied to prediction blocks). For example, the weighting factor set may include weighting factors such as {4, 4}, {7, 1}, {4, 3, 1}, and {4, 2, 1, 1}. However, when all intra prediction modes used in the current block are stored, weight information for the current block may be stored, and otherwise (i.e., when some intra prediction mode(s) are stored), weight information for the current block may not be stored. If weight information is not stored, the weighting factor for the current block can be derived based on the costs for multiple intra prediction modes. Here, the costs can be calculated based on the aforementioned TIMD mode. The current block can be partitioned into two partitions based on a geometric partitioning mode (GPM). Information regarding at least one of an angle or a position of a partitioning line for the GPM can be signaled via a bitstream or derived based on an intra prediction mode derived for the current block. For example, indices specifying the angle and position of the partitioning line can be encoded and signaled via the bitstream. Alternatively, angle information (angleIdx) regarding the angle of the partitioning line and distance information (distanceIdx) regarding the position of the partitioning line can each be encoded and signaled via the bitstream. Alternatively, either the angle information or the distance information can be encoded and signaled via the bitstream, and the other can be derived based on an intra prediction mode (or VIPM) derived for the current block. For example, based on the VIPM for the current block, an angle identical to or most similar to the VIPM among the angles of the segmentation line pre-defined in the GPM can be selected, and angle information corresponding to the selected angle can be derived. Distance information specifying the location of the segmentation line can be encoded and signaled via the bitstream. In this way, when angular information is derived based on VIPM, the bits required to signal segmentation information for GPM can be effectively reduced compared to the case where the angle and position of the segmentation line are mapped to a single index and signaled. Both the method of deriving the angle information described above and the method of signaling the angle information can be defined in the encoding device and the decoding device, and either one can be selectively used. For example, a flag indicating whether a method of deriving angle information is applied can be explicitly signaled, and one of the method of deriving angle information and the method of signaling angle information can be selected based on the flag. The flag can be signaled at a higher level of at least one of a video parameter set (VPS), a sequence parameter set (SPS), an adaptive parameter set (APS), a picture parameter set (PPS), a picture header (PH), or a slice header (SH). Alternatively, the flag can be signaled at a lower level of at least one of a coding tree unit (CTU), a coding unit (CU), a prediction unit (PU), or a transform unit (TU). Alternatively, a first flag indicating whether a method of deriving angle information is activated can be signaled at a higher level. If the first flag indicates that a method of deriving angle information is activated, a second flag indicating whether a method of deriving angle information is applied can be signaled at a lower level. Alternatively, without explicit signaling of the flag, if the current block satisfies the same predefined condition for the encoding device and the decoding device, either one may be selected, otherwise the other may be selected. After checking the first flag indicating whether the method for deriving angle information is activated, it may be determined whether the predefined condition is satisfied only if the first flag indicates that the method for deriving angle information is activated. However, this is not limited to this, and in the encoding device and the decoding device, only the method of deriving the angle information described above may be defined, or only the method of signaling the angle information may be defined. When GPM is applied to the current block, the current block can be divided into first and second partitions. A prediction block can be generated for each of the first and second partitions, and a prediction block of the current block can be generated based on a weighted sum of the generated first and second prediction blocks. For convenience of explanation, the prediction blocks for the first and second partitions will be referred to as the first prediction block and the second prediction block. The first prediction block for the first partition can be generated by performing intra prediction based on the VIPM derived for the first partition. Two or more intra prediction modes can be derived for the first partition. In this case, two or more prediction blocks can be generated based on the two or more intra prediction modes, and the first prediction block of the first partition can be generated through a weighted sum of the generated prediction blocks. For example, a prediction block (predA) can be generated by performing intra prediction based on the VIPM derived for the first partition. A prediction block (predB) can be generated by performing intra prediction based on the GPM candidate selected for the first partition (e.g., parallel mode, vertical mode, or planar mode). In this case, the first prediction block for the first partition can be generated based on the weighted sum of predA and predB. Alternatively, the VIPM derived for the first partition may be used as a GPM candidate. In this case, intra prediction may be performed based on any one of the multiple GPM candidates (e.g., parallel mode, vertical mode, planar mode, or the VIPM derived for the first partition) to generate a predicted block (predA). Intra prediction may be performed based on another one of the multiple GPM candidates to generate a predicted block (predB). In this case, the first predicted block for the first partition may be generated based on a weighted sum of predA and predB. The prediction block for the second partition can be generated based on at least one of merge mode, AMVP mode, or IBC mode. The weights for weighted summation according to the present disclosure may be predefined values for each prediction block. Alternatively, costs may be calculated for one or more intra prediction modes derived for the first partition based on the TIMD mode, and weights for weighted summation may be determined based on the calculated costs. The current block may be a block encoded based on the combined intra-inter prediction (CIIP) mode. In this case, the prediction block of the current block may be generated as a weighted sum between a first prediction block based on inter-prediction and a second prediction block based on intra-prediction. Specifically, a merge index may be signaled for the current block. The merge index may indicate one of multiple merge candidates within a merge candidate list. Motion information for the current block may be derived based on the motion information of the merge candidate indicated by the merge index. Inter prediction may be performed based on the derived motion information to generate a first prediction block. Meanwhile, the second prediction block can be generated by performing intra prediction based on a predetermined intra prediction mode. Here, a given intra prediction mode can be set to a mode (e.g., planar mode) that is identically predefined for both the encoding device and the decoding device. In this case, signaling for the intra prediction mode is omitted, thereby reducing the signaling overhead for mode information. Alternatively, the given intra prediction mode may be set to any one of the intra prediction modes available to the current block. To this end, an index indicating any one of the available intra prediction modes may be encoded and signaled through the bitstream. This can improve the overall encoding efficiency by increasing the accuracy of intra prediction mode usage. Here, the available intra prediction modes may refer to all or a fixed number of intra prediction modes defined identically for the encoding device and the decoding device. Alternatively, the given intra prediction mode may be set to any one of a plurality of candidate modes belonging to the aforementioned candidate list. Alternatively, the given intra prediction mode may be set to a virtual intra prediction mode (VIPM) derived from S400. In this case, the use of an intra prediction mode optimized for the current block is enabled, thereby improving encoding efficiency. Furthermore, the bits of the mode information for signaling the intra prediction mode may be removed. If multiple VIPMs are derived for the current block to which the CIIP mode is applied, the current block may be restricted to have or use only one VIPM. Referring to Fig. 4, a residual block of the current block can be generated (S420). Residual information of a current block can be obtained from a bitstream. Transform coefficients can be derived based on the residual information. A residual block can be generated based on at least one of inverse quantization or inverse transformation of the transform coefficients. Here, the inverse transformation can be performed based on at least one of a separable transform and a non-separable transform. The non-separable transform can represent a low frequency non-separable transform (LFNST) and / or a non-separable primary transform (NSPT). The transform kernel for the above non-separable transformation can be determined based on the intra prediction mode of the current block. If the current block is a block encoded in inter mode, a virtual intra prediction mode (VIPM) can be derived for the current block as described above. The transform kernel for the non-separable transformation of the current block can be determined based on the VIPM. Referring to FIG. 4, the current block can be restored based on the prediction block and the residual block (S430). FIG. 5 illustrates a schematic configuration of a decoding device (300) that performs a decoding method according to the present disclosure. Referring to FIG. 5, the decoding device (300) may include a mode derivation unit (500), a prediction block generation unit (510), a residual block generation unit (520), and a restoration unit (530). The mode derivation unit (500) and the prediction block generation unit (510) may be provided in the intra prediction unit (331) of FIG. 3, and the residual block generation unit (520) may be provided in the residual processing unit (320) of FIG. 3. The mode derivation unit (500) can derive the intra prediction mode of the current block. The mode derivation unit (500) can derive the intra prediction mode based on the prediction mode of the current block, as described with reference to FIG. 4. The prediction block generation unit (510) can generate a prediction block of the current block based on the intra prediction mode of the current block, and the method for generating the prediction block is as described with reference to FIG. 4. The residual block generation unit (520) can generate a residual block of the current block, and the method for generating the residual block is as described with reference to FIG. 4. The restoration unit (530) can restore the current block based on the prediction block and residual block of the current block. FIG. 6 illustrates an encoding method performed by an encoding device (200) as an embodiment according to the present disclosure. Referring to FIG. 6, the intra prediction mode of the current block can be derived (S600). The intra prediction mode of the current block can be derived based on the prediction mode of the current block. If the current block is a block encoded in intra mode, the intra prediction mode of the current block can be derived based on the intra prediction modes of the surrounding blocks. The method for deriving the intra prediction modes of the surrounding blocks has been described with reference to FIG. 4, and any redundant description will be omitted here. Alternatively, if the current block is a block encoded in an intra mode, the intra prediction mode of the current block may be derived based on a candidate list including a plurality of candidate modes. One or more of the plurality of candidate modes in the candidate list may be set as the intra prediction mode of the current block. A candidate index indicating one or more candidate modes to be set as the intra prediction mode of the current block may be encoded in the bitstream. A method for deriving a plurality of candidate modes has been described with reference to FIG. 4, and a duplicate description thereof will be omitted herein. Alternatively, if the current block is a block encoded with an intra mode, the intra prediction mode of the current block may be derived based on a predetermined method. For example, the intra prediction mode derived based on the predetermined method may be set as the intra prediction mode of the current block. Alternatively, the intra prediction mode derived based on the predetermined method may be used as a candidate mode of the current block, and for this purpose, may be added to a candidate list of the current block. In this case, any one of a plurality of candidate modes in the candidate list may be set as the intra prediction mode of the current block. A candidate index indicating the candidate mode to be set as the intra prediction mode of the current block may be encoded in the bitstream. The predetermined method has been described with reference to FIG. 4, and a redundant description thereof will be omitted herein. If the current block is a block encoded in inter mode, one or more virtual intra prediction modes (VIPMs) can be derived for the current block, and the derived VIPMs can be set as the intra prediction modes of the current block. Alternatively, if multiple VIPMs are derived for the current block, the top N VIPMs in ascending order of pre-defined costs can be selected, and the selected N VIPMs can be set as the intra prediction modes of the current block. Here, N can be an integer of 1, 2, 3, 4, or a higher number. The method of deriving VIPMs has been described with reference to FIG. 4, and a redundant description thereof will be omitted here. Alternatively, if the current block is a block encoded in an inter mode, it may be used to construct a candidate list for the current block. That is, the candidate list may include a plurality of candidate modes, and the plurality of candidate modes may include VIPMs derived for the current block. At this time, at least one of the plurality of candidate modes may be set as the intra prediction mode of the current block. A candidate index indicating at least one of the plurality of candidate modes may be encoded in the bitstream. Referring to FIG. 6, a prediction block of the current block can be generated based on the intra prediction mode of the current block (S610). When two or more intra prediction modes are derived for the current block, two or more prediction blocks can be derived respectively based on the two or more intra prediction modes, and a prediction block of the current block can be generated through a weighted sum of the derived prediction blocks. Meanwhile, if multiple intra prediction modes are used in the prediction process of the current block, all or some of the multiple intra prediction modes used for the current block may be stored in the memory corresponding to the current block, as described with reference to FIG. 4. Furthermore, weighting information for the weighted sum of the prediction blocks may be stored, as described with reference to FIG. 4. The current block can be divided into two partitions based on a geometric partitioning mode (GPM). Information regarding at least one of the angle or position of the partitioning line for the GPM can be encoded in the bitstream or derived based on the intra prediction mode for the current block, as described with reference to FIG. 4. When GPM is applied to the current block, two prediction blocks can be generated for each of the two partitions obtained by dividing the current block, and a prediction block for the current block can be generated based on the weighted sum of the two generated prediction blocks. The prediction block for either of the two partitions can be generated based on intra prediction, as described with reference to FIG. 4. If the current block is a block encoded based on the combined intra-inter prediction (CIIP) mode, the prediction block of the current block can be generated as a weighted sum between the first prediction block based on inter-prediction and the second prediction block based on intra-prediction. The method for generating the first and second prediction blocks according to the CIIP mode is as described with reference to FIG. 4. Referring to FIG. 6, the transformation coefficients of the current block can be derived based on the residual block of the current block (S620). Specifically, a residual block of the current block can be generated based on a prediction block of the current block. Transform coefficients of the current block can be derived based on at least one of transformation or quantization of the residual block. Here, the transformation can be performed based on at least one of a separable transform and a non-separable transform. The non-separable transform can represent a low frequency non-separable transform (LFNST) and / or a non-separable primary transform (NSPT). The transform kernel for the above non-separable transformation can be determined based on the intra prediction mode of the current block. If the current block is a block encoded in inter mode, a virtual intra prediction mode (VIPM) can be derived for the current block as described above, and the transform kernel for the non-separable transformation of the current block can be determined based on the VIPM. Referring to FIG. 6, a bitstream can be generated by encoding residual information regarding the transform coefficients of the current block (S630). FIG. 7 illustrates a schematic configuration of an encoding device (200) that performs an encoding method according to the present disclosure. Referring to FIG. 7, the encoding device (200) may include a mode derivation unit (700), a prediction block generation unit (710), a transform coefficient derivation unit (720), and a residual information encoding unit (730). The mode derivation unit (700) and the prediction block generation unit (710) may be provided in the intra prediction unit (222) of FIG. 2, the transform coefficient derivation unit (720) may be provided in the residual processing unit (230) of FIG. 2, and the residual information encoding unit (730) may be provided in the entropy encoding unit (240). The mode derivation unit (700) can derive the intra prediction mode of the current block. The mode derivation unit (700) can derive the intra prediction mode based on the prediction mode of the current block, as described with reference to FIG. 4. The prediction block generation unit (710) can generate a prediction block of the current block based on the intra prediction mode of the current block, and the method for generating the prediction block is as described with reference to FIG. 4. The transform coefficient derivation unit (720) can derive transform coefficients of the current block based on the residual block of the current block. Specifically, the transform coefficient derivation unit (720) can derive transform coefficients based on at least one of transformation or quantization for the residual block, as described with reference to FIG. 6. The residual information encoding unit (730) can encode residual information regarding transform coefficients. In the embodiments described above, the methods are described based on a flowchart as a series of steps or blocks. However, the embodiments are not limited to the order of the steps, and some steps may occur in a different order or simultaneously with other steps described above. Furthermore, those skilled in the art will understand that the steps depicted in the flowchart are not exclusive, and other steps may be included, or one or more steps in the flowchart may be deleted without affecting the scope of the embodiments of this document. The method according to the embodiments of the present document described above can be implemented in the form of software, and the encoding device and / or decoding device according to the present document can be included in a device that performs image processing, such as a TV, a computer, a smartphone, a set-top box, a display device, etc. When the embodiments in this document are implemented as software, the above-described method can be implemented as a module (process, function, etc.) that performs the above-described function. The module can be stored in memory and executed by a processor. The memory can be internal or external to the processor and can be connected to the processor by various well-known means. The processor can include an application-specific integrated circuit (ASIC), another chipset, logic circuit, and / or data processing device. The memory can include a read-only memory (ROM), a random access memory (RAM), flash memory, a memory card, a storage medium, and / or other storage devices. That is, the embodiments described in this document can be implemented and performed on a processor, a microprocessor, a controller, or a chip. For example, the functional units illustrated in each drawing can be implemented and performed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information for implementation (e.g., information on instructions) or an algorithm can be stored on a digital storage medium. In addition, the decoding device and encoding device to which the embodiment(s) of the present specification are applied may be included in a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a VR (virtual reality) device, an AR (argumente reality) device, a video phone video device, a transportation terminal (ex. 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, the OTT (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), etc. In addition, the processing method to which the embodiment(s) of the present specification are applied can be produced in the form of a computer-executable program and can be stored in a computer-readable recording medium. Multimedia data having a data structure according to the embodiment(s) of the present specification can also be stored in a computer-readable recording medium. The computer-readable recording medium includes all types of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium can 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 includes a medium implemented in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bitstream generated by an encoding method can be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network. Additionally, the embodiments of the present disclosure may be implemented as a computer program product by program code, and the program code may be executed on a computer by the embodiments of the present disclosure. The program code may be stored on a computer-readable carrier. FIG. 8 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied. Referring to FIG. 8, a content streaming system to which the embodiment(s) of the present specification are applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device. The encoding server compresses content input from multimedia input devices such as smartphones, cameras, and camcorders into digital data, generates a bitstream, and transmits it to the streaming server. Alternatively, if multimedia input devices such as smartphones, cameras, and camcorders directly generate bitstreams, the encoding server may be omitted. The above bitstream can be generated by an encoding method or a bitstream generation method to which the embodiment(s) of the present specification are applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream. 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 an intermediary 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 the multimedia data to the user. At this time, the content streaming system may include a separate control server, in which case the control server controls commands / responses between each device within the content streaming system. The streaming server can receive content from a media repository and / or an encoding server. For example, when receiving content from the encoding server, the content can be received in real time. In this case, to provide a smooth streaming service, the streaming server can store the bitstream for a certain period of time. Examples of the user devices may include mobile phones, smart phones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation devices, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glasses, HMDs), digital TVs, desktop computers, digital signage, etc. Each server within the above content streaming system can be operated as a distributed server, in which case data received from each server can be processed in a distributed manner. The claims set forth in this specification may be combined in various ways. For example, the technical features of the method claims of this specification may be combined and implemented as a device, and the technical features of the device claims of this specification may be combined and implemented as a method. Furthermore, the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a device, and the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a method.

Claims

1. A step of deriving an intra prediction mode for the current block; A step of generating a prediction block of the current block based on the intra prediction mode; A step of generating a residual block of the current block based on a predetermined transformation kernel; and A method comprising the step of restoring the current block based on the predicted block and the residual block.

2. In paragraph 1, A method wherein all or part of the above-described derived intra prediction mode is stored in the current block.

3. In paragraph 1, A method wherein, if the current block is a block encoded based on an intra mode, the intra prediction mode for the current block is derived based on the intra prediction mode of a surrounding block.

4. In paragraph 3, If the above-mentioned surrounding block is a block encoded in inter mode, a virtual intra prediction mode is derived for the above-mentioned surrounding block, A method in which the above-described derived virtual intra prediction mode is set as the intra prediction mode of the surrounding block.

5. In paragraph 4, The above virtual intra prediction mode is a method derived from a pre-defined intra prediction mode.

6. In paragraph 4, A method wherein the above virtual intra prediction mode is derived based on at least one of a DIMD mode or a TIMD mode.

7. In paragraph 4, A method in which the virtual intra prediction mode is derived based on the HoG (histogram of gradient) of the reference block when the DIMD mode is applied to a reference block adjacent to the surrounding block.

8. In paragraph 4, A method in which the virtual intra prediction mode is derived based on at least one of the intra prediction modes of reference blocks adjacent to the surrounding block.

9. In paragraph 4, A method in which, when the IBC (intra block copy) mode is applied to the above-mentioned surrounding block, the intra prediction mode of the position indicated by the block vector of the above-mentioned surrounding block is set to the virtual intra prediction mode.

10. In paragraph 1, A method in which the intra prediction mode for the current block is derived based on at least one of a DIMD mode or a TIMD mode.

11. In paragraph 1, A method in which the intra prediction mode for the current block is derived based on the HoG (histogram of gradient) of the reference block when the DIMD mode is applied to a reference block adjacent to the current block.

12. In paragraph 1, If the current block is a block encoded in inter mode, a virtual intra prediction mode is derived for the current block, A method in which the above-described derived virtual intra prediction mode is set as the intra prediction mode of the current block.

13. In paragraph 1, The above current block is divided into two partitions based on the geometric partitioning mode, A method wherein information regarding at least one of an angle or a position of a segmentation line for the geometric segmentation mode is derived based on an intra prediction mode for the current block.

14. In paragraph 1, The above current block is divided into two partitions based on the geometric partitioning mode, A method wherein a prediction block for one of the above two partitions is generated based on the intra prediction mode.

15. In paragraph 1, The prediction block of the current block is generated as a weighted sum between a first prediction block based on inter prediction and a second prediction block based on intra prediction, A method wherein the second prediction block is generated based on an intra prediction mode derived for the current block.

16. A step of deriving an intra prediction mode for the current block; A step of generating a prediction block of the current block based on the intra prediction mode; A step of deriving transform coefficients of the current block based on a residual block of the current block; and A method comprising the step of encoding residual information regarding transform coefficients of the current block.

17. A computer-readable storage medium storing a bitstream generated by the method according to Article 16.

18. A step of obtaining a bitstream for image information; wherein the bitstream is generated based on a step of deriving an intra prediction mode for a current block, a step of generating a prediction block of the current block based on the intra prediction mode, a step of deriving transform coefficients of the current block based on a residual block of the current block, and a step of encoding residual information about the transform coefficients of the current block, and A method comprising the step of transmitting data including the bitstream.

Citation Information

Patent Citations

  • Display apparatus

    KR1020250009064A

  • Semiconductor devices including substrate structure

    KR1020250042997A

  • KR20190107581A