Image encoding / decoding method and device, and recording medium storing bitstream

By deriving intra prediction modes based on template regions of current blocks and constructing candidate lists, the method improves encoding efficiency for high-resolution images, addressing the inefficiencies in existing image compression technologies.

WO2025216535A1PCT designated stage Publication Date: 2025-10-16LG ELECTRONICS INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2025/004751
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-09
Filing Date
2025-04-08
Publication Date
2025-10-16

AI Technical Summary

Technical Problem

Existing image compression technologies struggle to efficiently handle high-resolution, high-quality images, particularly in deriving optimal intra prediction modes for current blocks, leading to suboptimal encoding efficiency.

Method used

The method and device derive intra prediction modes (DIPMs) based on template regions of current blocks, construct candidate lists, and generate prediction blocks using these DIPMs, with the size of the template area determined by the current block's size or shape, and signal DIPM flags to improve encoding efficiency.

Benefits of technology

This approach enhances encoding efficiency by deriving more accurate DIPMs, improving the encoding efficiency of intra prediction and enabling efficient signaling of DIPM-related information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025004751_16102025_PF_FP_ABST
    Figure KR2025004751_16102025_PF_FP_ABST
Patent Text Reader

Abstract

An image decoding method and device according to the present disclosure may: derive derived intra prediction modes (DIPMs) on the basis of a template region of the current block; construct a candidate list on the basis of the DIPMs; generate a prediction block of the current block on the basis of the candidate list; and reconstruct the current block on the basis of the generated prediction block and a residual block of the current block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding / decoding method and device, and recording medium storing bitstream

[0001] The present invention relates to a video encoding / decoding method and device, and a recording medium storing a bitstream.

[0002] 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.

[0003] 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.

[0004] The present disclosure provides a method and device for inducing DIPM.

[0005] The present disclosure provides a method and device for configuring a template area for DIPM.

[0006] The present disclosure provides a signaling method and device for adaptive utilization of DIPM mode.

[0007] The image decoding method and device according to the present disclosure can derive DIPMs (derived intra prediction modes) based on a template region of a current block, construct a candidate list based on the DIPMs, generate a prediction block of the current block based on the candidate list, and restore the current block based on the prediction block and a residual block of the current block.

[0008] In the image decoding method and device according to the present disclosure, the size of the template area can be determined based on at least one of the size or shape of the current block.

[0009] In the video decoding method and device according to the present disclosure, the template area may include at least one of a first template area or a second template area. Here, the first template area may include an upper area, a left area, an upper left area, an upper right area, and a lower left area adjacent to the current block. The second template area may be composed of one or a combination of at least two of the upper area, the left area, the upper left area, the upper right area, and the lower left area adjacent to the current block.

[0010] In the image decoding method and device according to the present disclosure, the candidate list may include at least one of a first DIPM derived based on the first template area or a second DIPM derived based on the second template area.

[0011] In the video decoding method and device according to the present disclosure, the candidate list may further include a predetermined default mode.

[0012] In the video decoding method and device according to the present disclosure, the step of constructing the candidate list may include the step of sorting the DIPMs based on an error value for each of the DIPMs. In this case, the candidate list may be constructed based on the top M DIPMs in ascending order of the error values.

[0013] In the image decoding method and device according to the present disclosure, the error value can be derived based on the difference between the predicted value of the template region and the pre-reconstructed value of the template region.

[0014] In the image decoding method and device according to the present disclosure, the intra prediction mode of the current block can be derived based on any one of a plurality of DIPMs belonging to the candidate list.

[0015] In the video decoding method and device according to the present disclosure, any one of the plurality of DIPMs belonging to the candidate list can be determined based on a DIPM index signaled through a bitstream.

[0016] In the image decoding method and device according to the present disclosure, any one of the plurality of DIPMs belonging to the candidate list may be the first DIPM among the plurality of DIPMs belonging to the candidate list.

[0017] In the image decoding method and device according to the present disclosure, a step of determining whether the DIPM mode is applied to the current block based on the DIPM flag may be further included.

[0018] In the video decoding method and device according to the present disclosure, the DIPM flag may be signaled prior to at least one of MRL-related information, ISP-related information, or MPM-related information.

[0019] The video encoding method and device according to the present disclosure can derive DIPMs (derived intra prediction modes) based on a template region of a current block, construct a candidate list based on the DIPMs, generate a prediction block of the current block based on the candidate list, generate a residual block of the current block based on the prediction block of the current block, derive transform coefficients of the current block based on the residual block, and encode residual information regarding the transform coefficients.

[0020] A computer-readable digital storage medium is provided, which stores encoded video / image information that causes a decoding device according to the present disclosure to perform a video decoding method.

[0021] A computer-readable digital storage medium storing video / image information generated by a video encoding method according to the present disclosure is provided.

[0022] A method and device for transmitting video / image information generated by a video encoding method according to the present disclosure are provided.

[0023] According to the present disclosure, by deriving and utilizing DIPM, which is a mode more optimized for the current block, in an encoding device and a decoding device, the encoding efficiency of intra prediction can be improved.

[0024] According to the present disclosure, a more accurate DIPM can be derived based on various or variable template regions, thereby improving the encoding efficiency of intra prediction.

[0025] According to the present disclosure, DIPM-related information can be efficiently signaled.

[0026] FIG. 1 illustrates a video / image coding system according to the present disclosure.

[0027] 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.

[0028] 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.

[0029] FIG. 4 illustrates a decoding method performed by a decoding device (300) as an embodiment according to the present disclosure.

[0030] FIG. 5 and FIG. 6 illustrate a template area according to an MRL mode as an embodiment according to the present disclosure.

[0031] FIG. 7 illustrates an example of a method for obtaining an error value for sorting a candidate list according to the present disclosure.

[0032] FIG. 8 illustrates a schematic configuration of a decoding device (300) that performs a decoding method according to the present disclosure.

[0033] FIG. 9 illustrates an encoding method performed by an encoding device (200) as an embodiment according to the present disclosure.

[0034] Fig. 10 illustrates a schematic configuration of an encoding device (200) that performs an encoding method according to the present disclosure.

[0035] FIG. 11 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.

[0036] The image decoding method and device according to the present disclosure can derive DIPMs (derived intra prediction modes) based on a template region of a current block, construct a candidate list based on the DIPMs, generate a prediction block of the current block based on the candidate list, and restore the current block based on the prediction block and a residual block of the current block.

[0037] In the image decoding method and device according to the present disclosure, the size of the template area can be determined based on at least one of the size or shape of the current block.

[0038] In the video decoding method and device according to the present disclosure, the template area may include at least one of a first template area or a second template area. Here, the first template area may include an upper area, a left area, an upper left area, an upper right area, and a lower left area adjacent to the current block. The second template area may be composed of one or a combination of at least two of the upper area, the left area, the upper left area, the upper right area, and the lower left area adjacent to the current block.

[0039] In the image decoding method and device according to the present disclosure, the candidate list may include at least one of a first DIPM derived based on the first template area or a second DIPM derived based on the second template area.

[0040] In the video decoding method and device according to the present disclosure, the candidate list may further include a predetermined default mode.

[0041] In the video decoding method and device according to the present disclosure, the step of constructing the candidate list may include the step of sorting the DIPMs based on an error value for each of the DIPMs. In this case, the candidate list may be constructed based on the top M DIPMs in ascending order of the error values.

[0042] In the image decoding method and device according to the present disclosure, the error value can be derived based on the difference between the predicted value of the template region and the pre-reconstructed value of the template region.

[0043] In the image decoding method and device according to the present disclosure, the intra prediction mode of the current block can be derived based on any one of a plurality of DIPMs belonging to the candidate list.

[0044] In the video decoding method and device according to the present disclosure, any one of the plurality of DIPMs belonging to the candidate list can be determined based on a DIPM index signaled through a bitstream.

[0045] In the image decoding method and device according to the present disclosure, any one of the plurality of DIPMs belonging to the candidate list may be the first DIPM among the plurality of DIPMs belonging to the candidate list.

[0046] In the image decoding method and device according to the present disclosure, a step of determining whether the DIPM mode is applied to the current block based on the DIPM flag may be further included.

[0047] In the video decoding method and device according to the present disclosure, the DIPM flag may be signaled prior to at least one of MRL-related information, ISP-related information, or MPM-related information.

[0048] The video encoding method and device according to the present disclosure can derive DIPMs (derived intra prediction modes) based on a template region of a current block, construct a candidate list based on the DIPMs, generate a prediction block of the current block based on the candidate list, generate a residual block of the current block based on the prediction block of the current block, derive transform coefficients of the current block based on the residual block, and encode residual information regarding the transform coefficients.

[0049] A computer-readable digital storage medium is provided, which stores encoded video / image information that causes a decoding device according to the present disclosure to perform a video decoding method.

[0050] A computer-readable digital storage medium storing video / image information generated by a video encoding method according to the present disclosure is provided.

[0051] A method and device for transmitting video / image information generated by a video encoding method according to the present disclosure are provided.

[0052] 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.

[0053] 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.

[0054] 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.

[0055] 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.

[0056] 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 (AVN2), or the next generation of video / image coding standards (e.g., H.267 or H.268).

[0057] This specification presents various embodiments of video / image coding, and unless otherwise stated, the embodiments may be performed in combination with each other.

[0058] 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.

[0059] 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.

[0060] 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.

[0061] 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."

[0062] 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."

[0063] 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".

[0064] 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.”

[0065] 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."

[0066] Technical features individually described in a single drawing in this specification may be implemented individually or simultaneously.

[0067] FIG. 1 illustrates a video / image coding system according to the present disclosure.

[0068] Referring to FIG. 1, a video / image coding system may include a first device (source device) and a second device (receiving device).

[0069] 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.

[0070] 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.

[0071] 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.

[0072] 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.

[0073] 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.

[0074] The renderer can render decoded video / images. The rendered video / images can be displayed through the display unit.

[0075] 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.

[0076] 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.

[0077] 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.

[0078] 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.

[0079] 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.

[0080] 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).

[0081] 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).

[0082] 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.

[0083] 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 template region.

[0084] 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 the motion information between the template region 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 template region can include a spatial template region (spatial neighboring block) existing in the current picture and a temporal template region (temporal neighboring block) existing in the reference picture. The reference picture including the reference block and the reference picture including the temporal template region may be the same or different. The temporal template region may be called a collocated reference block, a collocated CU (colCU), etc., and a reference picture including the temporal template region may be called a collocated picture (colPic). For example, the inter prediction unit (221) may configure a motion information candidate list based on template regions, 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 template region 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 template area is used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.

[0085] 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.

[0086] 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.

[0087] 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.

[0088] 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.

[0089] 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).

[0090] 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.

[0091] 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.

[0092] 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.

[0093] 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 in the current picture is derived (or encoded) and / or motion information of blocks in an already restored picture. The stored motion information can be transferred to the inter prediction unit (221) to be used as motion information in a spatial template area or motion information in a temporal template area. The memory (270) can store restored samples of restored blocks in the current picture and transfer them to the intra prediction unit (222).

[0094] 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.

[0095] 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).

[0096] 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.

[0097] 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.

[0098] 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).

[0099] 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 addition unit (340), the filtering unit (350), the memory (360), the inter prediction unit (332), and the intra prediction unit (331).

[0100] 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.

[0101] In the inverse transform unit (322), the transform coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array).

[0102] 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.

[0103] 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.

[0104] 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 template region.

[0105] 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 template region 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 template region can include a spatial template region (spatial neighboring block) existing in the current picture and a temporal template region (temporal neighboring block) existing in the reference picture. For example, the inter prediction unit (332) can construct a motion information candidate list based on the template regions, 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.

[0106] 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.

[0107] 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.

[0108] 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.

[0109] The (modified) 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 an already reconstructed picture. The stored motion information can be transferred to the inter prediction unit (332) to be used as motion information of a spatial template area or motion information of a temporal template area. The memory (360) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (331).

[0110] 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.

[0111] FIG. 4 illustrates an image decoding method performed by a decoding device (300) as an embodiment according to the present disclosure.

[0112] Referring to FIG. 4, one or more derived intra prediction modes (DIPMs) can be derived based on the template region of the current block (S400).

[0113] The DIPM may be a mode derived based on the gradient of the pre-restored sample values ​​belonging to the template region of the current block. The DIPM according to the present disclosure may also be referred to as a virtual intra prediction mode (VIPM). The DIPM may be used as a candidate mode for deriving the intra prediction mode of the current block.

[0114] DIPM can be derived by determining the similarity between the distribution of pre-restored sample values ​​within the template region of the current block and the directionality of each intra prediction mode. To determine the similarity between the distribution of sample values ​​and the directionality of the intra prediction mode, a predetermined filter can be applied to the sample values ​​within the template region.

[0115] For example, a gradient of sample values ​​can be derived based on the ratio of horizontal and vertical changes. The derived gradient can be mapped to the most similar intra prediction mode. An amplitude value corresponding to the gradient can be assigned to the mapped intra prediction mode. This process can be applied to sample values ​​within the template region while moving horizontally and / or vertically, and a final accumulated amplitude value can be obtained for each intra prediction mode. Here, the amplitude value can be defined as the sum of the magnitude of the horizontal change and the magnitude of the vertical change. The top N intra prediction mode(s) in descending order of amplitude value can be set as DIPM(s).

[0116] A template region according to the present disclosure may refer to a region for inducing DIPM. One or more template regions may be defined for a current block. For example, an upper region (A) adjacent to the current block may be used as a template region. A left region (L) adjacent to the current block may be used as a template region. An upper left region (AL) adjacent to the current block may be used as a template region. An upper right region (AR) adjacent to the current block may be used as a template region. A lower left region (LB) adjacent to the current block may be used as a template region. Regions including the aforementioned A, L, AL, AR, and LB may be used as a template region, or a region composed of a combination of at least two of A, L, AL, AR, or LB may be used as a template region.

[0117] Assume that the width and height of the current block are W and H. At this time, the width and height of the upper area are W A Wow H A It can be. The width and height of the upper right area are W AR Wow H A It can be. The width and height of the upper left area are WL Wow H A It can be. The width and height of the left area are W L Wow H L It can be. The width and height of the lower left area are W L Wow H LB It can be. Here, W A may be an integer less than or equal to W. W AR can be an integer less than or equal to W. H A can be an integer of 1, 2, 3 or more. H L may be an integer less than or equal to H. H LB may be an integer less than or equal to H. W L can be an integer of 1, 2, 3 or more.

[0118] The template region can be pre-defined in the encoding and decoding devices, or the template region can be explicitly signaled.

[0119] The size of the template area may vary depending on the current block size. A smaller template area may be used for smaller blocks, and a larger template area may be used for larger blocks.

[0120] For example, if the current block is a 4x4 block, a region consisting of at least one of AL, A, or L can be used as a template region. If the current block is not a 4x4 block, a region including AL, A, AR, L, and LB can be used as a template region. Since the computational complexity required in the process of applying DIPM is directly related to the size of the template region, a template region of a relatively small size can be used for small blocks to reduce the computational complexity required for each sample.

[0121] If there are unavailable samples within the template region described above, the template region may not be used. Alternatively, if some samples within the template region are unavailable, only the available samples may be used. If a sample in an area adjacent to the current block exceeds the picture boundary, the sample may be determined to be an unavailable sample. If a sample in an area adjacent to the current block belongs to at least one slice, tile, or coding tree unit (CTU) different from the current block, the sample may be determined to be an unavailable sample. If a sample in an area adjacent to the current block exists beyond a virtual boundary, the sample may be determined to be an unavailable sample.

[0122] H, which determines the sizes of A, AR, L, LB, and AL, taking into account the shape of the current block (e.g., the ratio of width to height). A Wow W L The size of H can be determined differently. For example, for a 32x4 block, a relatively small value of H is used to minimize the computational complexity and memory increase required for the DIPM derivation process. A can be used and have relatively large values ​​of W L can be used. For example, H A can be 3, W L can be 4. This is just an example, and H can be based on other values ​​and / or other conditions. A Wow W L The size of may be determined.

[0123] H, which determines the sizes of A, AR, L, LB, and AL based on the size of the current block (e.g., the product of width and height). A Wow W L The size of H can be determined differently. For example, if the size of the current block is greater than or equal to 256, H A can be 4, W Lcan be 4. Or, if the current block size is less than or equal to 64, H A can be 3, W L can be 3. This is just an example, and H can be based on other values ​​and / or other conditions. A Wow W L The size of may be determined.

[0124] A combination of the above-described embodiments may also be possible. For example, if the current block size is 16, an area consisting of at least one of AL, A, or L may be used as a template area, and H A Wow W L can be 3 each. Or, if the size of the current block is 256, the area including AL, A, AR, L and LB can be used as a template area, and H A Wow W L can be 4 each. Alternatively, if the current block is a 4x16 block, the area including AL, A, AR, L and LB can be used as a template area, and H A can be 4, W L It can be 3 days.

[0125] The above-described embodiment has the heights of AL, A, and AR being H A , and the width of AL, L and LB is W L It relates to the same case. However, it is not limited thereto, and at least one of AL, A, or AR may have a different height from the other. At least one of AL, L, or LB may have a different width from the other.

[0126] In the process of obtaining the accumulated amplitude value for each intra prediction mode, when applying a differentiation filter, the amplitude value can be obtained by moving the sample value within the template region in the vertical or horizontal direction by 1 sample unit. The directionality within the template region may be determined in units of M samples rather than being precisely determined in units of samples. In order to reduce unnecessary computational complexity, a differentiation filter may be applied in units of M samples in the process of obtaining the amplitude value in the vertical or horizontal direction. Here, M may be an integer greater than or equal to 2. Alternatively, the sample unit to which the differentiation filter is applied may be determined differently depending on the location of the region constituting the template region. For example, a filter may be applied in units of 2 samples in A, AR, L, or LB, and a filter may be applied in units of 1 sample in AL.

[0127] A Sobel filter can be used as a differential filter to obtain the amount of change in the horizontal direction and the amount of change in the vertical direction. For example, a horizontal differential filter M x and vertical differential filter M y can be as follows: mathematical equations 1 to 3.

[0128] [Mathematical Formula 1]

[0129]

[0130] [Equation 2]

[0131]

[0132] [Equation 3]

[0133]

[0134] The differential filters in Equations 1 to 3 are merely examples, and other filters may be applied to determine the amount of variation in sample values. In addition to Equations 1 to 3, differential filters with different differential sizes and filter coefficients may also be used.

[0135] Information indicating a differential filter may be signaled. For example, any one of the differential filters in Equations 1 to 3 may be used based on the signaled information.

[0136] Alternatively, a predefined differential filter may be used in the encoding device and the decoding device without signaling information indicating the differential filter. For example, the differential filter of Equation 1 may be defined as being used. Alternatively, the differential filter of Equation 2 may be defined as being used. Alternatively, the differential filter of Equation 3 may be defined as being used.

[0137] The differential filter can be adaptively determined based on the size of the current block. For example, if the size of the current block is greater than or equal to 64, the differential filter of Equation 1 can be used, and otherwise, the differential filter of Equation 2 or 3 can be used.

[0138] Edges with abrupt brightness changes in the sample distribution within the template region can help predict directionality. Therefore, before calculating the amplitude values ​​for each intra prediction mode, a sharpening filter can be applied to samples within the template region to emphasize the edges. For example, a 3x3 sharpening filter (F) can be expressed as follows:

[0139] [Equation 4]

[0140]

[0141] The DIPM according to the present disclosure can be derived based on one or more template regions defined for the current block. Various DIPMs can be derived depending on which template region is used. For example, the following DIPMs can be derived based on the template region.

[0142] - Mode(1) All , Mode(2) All , Mode(3)All , Mode(4) All ,…

[0143] - Mode(1) L , Mode(2) L , Mode(3) L , Mode(4) L ,…

[0144] - Mode(1) L+LB , Mode(2) L+LB , Mode(3) L+LB , Mode(4) L+LB ,…

[0145] - Mode(1) L+LB+AL , Mode(2) L+LB+AL , Mode(3) L+LB+AL , Mode(4) L+LB+AL ,…

[0146] - Mode(1) A , Mode(2) A , Mode(3) A , Mode(4) A ,…

[0147] - Mode(1) A+AR , Mode(2) A+AR , Mode(3) A+AR , Mode(4) A+AR ,…

[0148] - Mode(1) A+AR+AL , Mode(2) A+AR+AL , Mode(3) A+AR+AL , Mode(4) A+AR+AL ,…

[0149] - Mode(1) AL , Mode(2) AL , Mode(3) AL , Mode(4) AL ,…

[0150] Here, Mode(K) All can mean a DIPM derived using the area including AL, A, AR, L, and LB as a template area. Mode(K) Lcan mean DIPM derived using L as template region. Mode(K) L+LB can mean a DIPM derived using the area including L and LB as a template area. Mode(K) L+LB+AL can mean a DIPM derived using the area including L, LB, and AL as a template area. Mode(K) A can mean DIPM derived using A as a template region. Mode(K) A+AR can mean a DIPM derived using the area including A and AR as a template area. Mode(K) A+AR+AL can mean a DIPM derived using the area including A, AR, and AL as a template area. Mode(K) AL may refer to a DIPM derived using AL as a template region. In addition, it goes without saying that a DIPM may be derived using a region including at least one of AL, A, AR, L, or LB as a template region. Mode(K) may refer to the Kth DIPM in descending order of amplitude value among the DIPMs derived based on the template region.

[0151] If a determined template region includes three regions (e.g., AL, A, and L), only template regions defined by a combination of one or more of the three regions (e.g., AL+A, AL+L, AL+A+L, etc.) may be allowed. Furthermore, if some samples are not available in a specific template region, it is natural that those samples will not be available either.

[0152] Based on the template area with the sharpening filter applied, the following DIPM can be derived.

[0153] - F_Mode(1) All , F_Mode(2) All , F_Mode(3) All, F_Mode(4) All ,…

[0154] - F_Mode(1) L , F_Mode(2) L , F_Mode(3) L , F_Mode(4) L ,…

[0155] - F_Mode(1) L+LB , F_Mode(2) L+LB , F_Mode(3) L+LB , F_Mode(4) L+LB ,…

[0156] - F_Mode(1) L+LB+AL , F_Mode(2) L+LB+AL , F_Mode(3) L+LB+AL , F_Mode(4) L+LB+AL ,…

[0157] - F_Mode(1) A , F_Mode(2) A , F_Mode(3) A , F_Mode(4) A ,…

[0158] - F_Mode(1) A+AR , F_Mode(2) A+AR , F_Mode(3) A+AR , F_Mode(4) A+AR ,…

[0159] - F_Mode(1) A+AR+AL , F_Mode(2) A+AR+AL , F_Mode(3) A+AR+AL , F_Mode(4) A+AR+AL ,…

[0160] - F_Mode(1) AL , F_Mode(2) AL , F_Mode(3) AL , F_Mode(4) AL ,…

[0161] 여기서, F_Mode(K) Allmay mean a DIPM derived using the areas including AL, A, AR, L, and LB as template areas. F_Mode(K) L can mean DIPM derived using L as template area. F_Mode(K) L+LB can mean a DIPM derived using the area including L and LB as a template area. F_Mode(K) L+LB+AL can mean a DIPM derived using the area including L, LB, and AL as a template area. F_Mode(K) A can mean DIPM derived using A as template area. F_Mode(K) A+AR can mean a DIPM derived using the area including A and AR as a template area. F_Mode(K) A+AR+AL can mean a DIPM derived using the area including A, AR, and AL as a template area. F_Mode(K) AL may refer to a DIPM derived using AL as a template region. In addition, it goes without saying that a DIPM may be derived using a region including at least one of AL, A, AR, L, or LB as a template region. F_Mode(K) may refer to the Kth DIPM in descending order of amplitude value among the DIPMs derived based on the template region.

[0162] If a determined template region includes three regions (e.g., AL, A, and L), only template regions defined by a combination of one or more of the three regions (e.g., AL+A, AL+L, AL+A+L, etc.) may be allowed. Furthermore, if some samples are not available in a specific template region, it is natural that those samples will not be available either.

[0163] Referring to FIG. 4, a candidate list for the current block can be constructed (S410).

[0164] A candidate list for the current block can be constructed based on the DIPM(s) derived from S400.

[0165] A candidate list according to the present disclosure may be configured as follows. The size of the candidate list may be M (M is a natural number). M may be a value predefined in the encoding device and the decoding device.

[0166] For example, the candidate list is derived from the DIPM (i.e., Mode(K)) based on the template region including AL, A, AR, L, and LB. All ) can be included. If M is 4, the candidate list is Mode(1) All , Mode(2) All , Mode(3) All and Mode(4) All may include. If M is 2, the candidate list is Mode(1) All and Mode(2) All may include.

[0167] Alternatively, the candidate list may include a DIPM derived based on a template region comprising one or a combination of at least two of AL, A, AR, L, or LB.

[0168] For example, the candidate list is derived from the DIPM (i.e., Mode(K)) based on the template region including A, L, and AL. AL+L+A ) can be included. If M is 4, the candidate list is Mode(1) A+L+AL , Mode(2) A+L+AL , Mode(3) A+L+AL and Mode(4) A+L+AL may include. If M is 2, the candidate list is Mode(1) A+L+AL and Mode(2) A+L+AL may include.

[0169] Alternatively, the candidate list may include DIPMs derived based on different template regions. That is, the candidate list may include at least one of X first DIPMs derived based on a first template region or Y second DIPMs derived based on a second template region. Here, the first template region may be a region including AL, A, AR, L, and LB. The second template region may be a region formed by a combination of one or at least two of AL, A, AR, L, or LB. X and Y may be integers greater than or equal to 1. X may be an integer greater than or equal to Y.

[0170] For example, if M is 4, the candidate list is Mode(1) All , Mode(2) All , Mode(1) A+AR+AL and Mode(1) L+LB+AL may include. Or, if M is 4, the candidate list is Mode(1) All , Mode(2) All , Mode(1) A+AR and Mode(1) L+LB may include. Or, if M is 4, the candidate list is Mode(1) All , Mode(1) A+AR , Mode(1) L+LB and F_Mode(1) All may include. Or, if M is 4, the candidate list is F_Mode(1) All , F_Mode(2) All , F_Mode(3) All and F_Mode(4) All may include. If M is 2, the candidate list is Mode(1) All and F_Mode(1) All may include.

[0171] When deriving DIPMs based on different template regions, the same DIPM may be derived. To improve encoding efficiency, DIPMs within the candidate list can be structured so that they do not overlap. The candidate list can be structured as follows to fill M non-overlapping DIPMs. For example, Mode(1) All , Mode(2) All , Mode(1) A+AR+AL , Mode(1) L+LB+AL , Mode(3) All and Mode(4) All The candidate list can be constructed to include:

[0172] The examples of composing the above candidate list are merely examples. The candidate list may include more DIPMs than those listed above.

[0173] During the process of constructing a candidate list, there may be cases where not all M DIPMs are filled. In this case, a default mode may be added to the candidate list. Multiple default modes may be defined, and they may be added to the candidate list in a pre-defined order. Furthermore, default modes may be added so as not to overlap with DIPMs already included in the candidate list. For example, default modes may be organized in order of highest selectivity. If 67 intra prediction modes are defined in the encoding device and the decoding device, the default modes may be as follows. This is an example of a default mode, and the number, construction order, etc. of default modes may be defined differently.

[0174] default mode ={ DC mode, Vertical mode, Horizontal mode, Vertical mode - 4, Vertical mode + 4, Horizontal mode - 4, Horizontal mode + 4, Vertical mode - 8, Vertical mode + 8, Horizontal mode - 8, Horizontal mode + 8, Vertical mode - 12, Vertical mode + 12, Horizontal mode - 12, Horizontal mode + 12, 34, 66, 2, Vertical mode - 2, Vertical mode + 2, Horizontal mode -2, Horizontal mode +2}

[0175] Through the process of S400, P DIPMs can be derived. Here, P can be greater than or equal to the size (M) of the candidate list. In this case, a candidate list including M DIPMs can be constructed based on the P DIPMs. Specifically, the method for constructing the candidate list can include a step of constructing P DIPMs, a step of sorting the P DIPMs, or a step of constructing a candidate list based on the top M DIPMs.

[0176] The step of configuring P DIPMs can configure P DIPMs among DIPMs derived for each template area.

[0177] - Mode(1) All , Mode(2) All , Mode(3) All , Mode(4) All ,…

[0178] - Mode(1) L , Mode(2) L , Mode(3) L , Mode(4) L ,…

[0179] - Mode(1) L+LB , Mode(2) L+LB , Mode(3) L+LB , Mode(4) L+LB ,…

[0180] - Mode(1) L+LB+AL , Mode(2) L+LB+AL , Mode(3) L+LB+AL , Mode(4) L+LB+AL ,…

[0181] - Mode(1) A , Mode(2) A , Mode(3) A , Mode(4) A ,…

[0182] - Mode(1) A+AR , Mode(2) A+AR , Mode(3) A+AR , Mode(4) A+AR ,…

[0183] - Mode(1) A+AR+AL , Mode(2) A+AR+AL , Mode(3) A+AR+AL , Mode(4) A+AR+AL ,…

[0184] - Mode(1) AL , Mode(2) AL , Mode(3) AL , Mode(4) AL ,…

[0185] - F_Mode(1) All , F_Mode(2) All , F_Mode(3) All , F_Mode(4) All ,…

[0186] - F_Mode(1) L , F_Mode(2) L , F_Mode(3) L , F_Mode(4) L ,…

[0187] - F_Mode(1) L+LB , F_Mode(2) L+LB, F_Mode(3) L+LB , F_Mode(4) L+LB ,…

[0188] - F_Mode(1) L+LB+AL , F_Mode(2) L+LB+AL , F_Mode(3) L+LB+AL , F_Mode(4) L+LB+AL ,…

[0189] - F_Mode(1) A , F_Mode(2) A , F_Mode(3) A , F_Mode(4) A ,…

[0190] - F_Mode(1) A+AR , F_Mode(2) A+AR , F_Mode(3) A+AR , F_Mode(4) A+AR ,…

[0191] - F_Mode(1) A+AR+AL , F_Mode(2) A+AR+AL , F_Mode(3) A+AR+AL , F_Mode(4) A+AR+AL ,…

[0192] - F_Mode(1) AL , F_Mode(2) AL , F_Mode(3) AL , F_Mode(4) AL ,…

[0193] For example, P DIPMs can be configured as follows. However, this is only an example, and P DIPMs can be defined as a promise between an encoding device and a decoding device.

[0194] P DIPM = {Mode(1) All , Mode(2) All , Mode(3) All , Mode(4) All , Mode(1) L+LB+AL , Mode(2) L+LB+AL , Mode(3) L+LB+AL , Mode(4) L+LB+AL, F_Mode(1) A+AR+AL , F_Mode(2) A+AR+AL , F_Mode(3) A+AR+AL , F_Mode(4) A+AR+AL , F_Mode(1) All , F_Mode(2) All , F_Mode(3) All , F_Mode(4) All}

[0195] P can be a value predefined between the encoding device and the decoding device. For example, P can have a value that is a multiple of M, such as (M*4) or (M*2). Alternatively, P can be the same value as M. Alternatively, P can be 20. This is just an example of P being set to a multiple of M or a fixed value, and it can be set to other values.

[0196] During the process of configuring P DIPMs, cases may arise where P DIPMs are not configured. In this case, the aforementioned default mode can be used to configure P DIPMs. In this case, the P DIPMs can be configured so that they do not overlap with each other.

[0197] In the step of sorting P DIPMs, the P DIPMs can be sorted based on a predetermined error value. The error value can be derived based on the difference between the predicted value of the template region and the base-reconstructed value of the template region. The error value can be calculated for each of the P DIPMs. The predicted value of the template region can be generated by performing intra prediction based on surrounding reference sample(s) of the template region and the DIPM.

[0198] For example, as illustrated in Fig. 7, a predicted value of a template area can be generated based on DIPM, which is a vertical mode, and an error value can be obtained based on the difference between the predicted value and the base-restored value.

[0199] To obtain the error value, error calculation methods such as SAD (Sum of difference), SATD (Sum of transformed difference), SSE (Sum of squared error), MR-SAD (Mean-removed sum of difference), MR-SSE (Mean-removed sum of squared error), and MR-SATD (Mean-removed sum of transformed difference) can be used.

[0200] The template region for obtaining the error value may be defined differently from the template region for deriving the DIPM. For example, H of the template region for obtaining the error value A Wow W L Each can be 1.

[0201] AL, A, and L can be used as template regions for calculating error values, or some of AL, A, or L can be used. For example, A and L can be used to calculate error values, but AL can be omitted. The region (or template region) containing unavailable samples can be omitted. Here, whether a sample is unavailable or not is as discussed above.

[0202] In the step of forming a candidate list based on the top M DIPMs, the candidate list can be formed based on the top M DIPMs in ascending order of error values ​​among the P DIPMs.

[0203] Referring to FIG. 4, a prediction block of the current block can be generated based on the candidate list (S420).

[0204] An intra prediction mode of the current block can be derived based on any one of multiple DIPMs in the candidate list. A prediction block of the current block can be generated based on the derived intra prediction mode.

[0205] A DIPM index indicating one of multiple DIPMs in the candidate list can be signaled through the bitstream. The intra prediction mode of the current block can be derived based on the DIPM indicated by the signaled DIPM index.

[0206] Alternatively, the intra prediction mode of the current block can be derived from the candidate list without signaling the DIPM index. For example, the first DIPM among multiple DIPMDs in the candidate list can be set as the intra prediction mode of the current block. Here, the first DIPM can mean the DIPM with the smallest index (e.g., 0) among the multiple DIPMs in the candidate list. Alternatively, the first DIPM can mean the DIPM with the smallest error value among the multiple DIPMs in the candidate list.

[0207] Referring to FIG. 4, the current block can be restored based on the prediction block and the residual block (S430).

[0208] Transform coefficients can be derived based on residual information signaled through the bitstream. A residual block can be generated by applying at least one of inverse quantization or inverse transformation to the derived transform coefficients. A reconstruction block of the current block can be generated based on the prediction block of the current block and the residual block.

[0209] The method of generating prediction blocks based on the aforementioned DIPM is called DIPM mode (or VIPM mode). This DIPM mode can be applied adaptively based on a DIPM flag indicating whether DIPM mode is applied. Below, we will examine how to signal the DIPM flag.

[0210] The DIPM flag can be signaled in the coding unit syntax corresponding to the current block. The coding unit syntax can define at least one of DIPM-related information, MRL-related information, ISP (intra subpartition prediction)-related information, or MPM-related information.

[0211] The DIPM-related information may include at least one of a DIPM flag indicating whether the DIPM mode is applied to the current block or a DIPM index indicating one of multiple DIPMs in the candidate list. For example, if the value of the DIPM flag is 1, this may indicate that the DIPM mode is applied, and if the value of the DIPM flag is 0, this may indicate that the DIPM mode is not applied.

[0212] The MRL-related information may include MRL index information regarding at least one reference sample line used for intra prediction of the current block among reference sample lines available for intra prediction.

[0213] ISP may be a mode that divides a current block into multiple subpartitions and performs intra prediction for each subpartition. ISP-related information may include at least one of an ISP flag indicating whether ISP is applied to the current block or a flag indicating the division direction of the current block.

[0214] The MPM-related information may include at least one of an MPM flag indicating whether the intra-prediction mode of the current block is derived based on an MPM candidate, a planar flag indicating whether the intra-prediction mode of the current block is a planar mode, an MPM index of any one of a plurality of MPM candidates belonging to an MPM list, or remaining mode information of any one of the remaining modes. For example, when the value of the MPM flag is 1, this may indicate that the intra-prediction mode of the current block is derived based on the MPM candidate, and when the value of the MPM flag is 0, this may indicate that the intra-prediction mode of the current block is not derived based on the MPM candidate. When the value of the planar flag is 0, this may indicate that the intra-prediction mode of the current block is a planar mode, and when the value of the planar flag is 1, this may indicate that the intra-prediction mode of the current block is not a planar mode.

[0215] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( intra_mip_flag ) {intra_mip_transposed_flag[ x0 ][ y0 ]ae(v)intra_mip_mode[ x0 ][ y0 ]ae(v)} else {if( sps_vipm_enabled_flag )intra_vipm_flag[ x0 ][ y0 ]ae(v)if ( intra_vipm_flag[ x0 ][ y0 ] )intra_vipm_idx[ )intra_luma_ref_idxae(v)...intra_luma_mpm_remainder[ x0 ][ y0 ]ae(v)}}...

[0216] According to Table 1, DIPM-related information may include a DIPM flag (intra_vipm_flag) and a DIPM index (intra_vipm_idx). DIPM-related information may be signaled before MRL-related information is signaled in the coding unit syntax.

[0217] The intra_vipm_flag can be signaled based on the DIPM enable flag (sps_vipm_enabled_flag). Here, the sps_vipm_enabled_flag can indicate whether the DIPM mode is enabled. For example, if the value of sps_vipm_enabled_flag is 1, this can indicate that the DIPM mode is enabled, and if the value of sps_vipm_enabled_flag is 0, this can indicate that the DIPM mode is not enabled. The intra_vipm_flag can be signaled based on the value of sps_vipm_enabled_flag being 1, and can not be signaled based on the value of sps_vipm_enabled_flag being 0.

[0218] intra_vipm_idx may be signaled based on the value of intra_vipm_flag being 1, or may not be signaled based on the value of intra_vipm_flag being 0.

[0219] The DIPM activation flag in Table 1 is assumed to be signaled in the SPS, but this is only an example. The DIPM activation flag may also be signaled in higher-level syntax, such as the picture parameter set, the picture header, or the slice header. The intra_luma_mpm_remainder according to Table 1 may correspond to the remaining mode information described above. In this case, the remaining modes may mean modes other than the MPM candidates in the MPM list, the planar mode, and the DIPMs in the candidate list.

[0220] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( intra_mip_flag ) {intra_mip_transposed_flag[ x0 ][ y0 ]ae(v)intra_mip_mode[ x0 ][ y0 ]ae(v)} else {if( sps_vipm_enabled_flag )intra_vipm_flag[ x0 ][ y0 ]ae(v)if ( intra_vipm_flag[ y0 ]ae(v)}}...

[0221] Table 2 shows cases where the DIPM index signaling is omitted. That is, DIPM-related information may include a DIPM flag but not a DIPM index. The omission of the DIPM index signaling may occur when the candidate list size is 1, or when the intra prediction mode of the current block can be derived from the candidate list through a predefined method between the encoding device and the decoding device. For example, the first DIPM in the candidate list can be selected and used without signaling the DIPM index.

[0222] DIPM-related information according to Table 2 can be signaled before MRL-related information is signaled in the coding unit syntax. intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, as discussed with reference to Table 1. Based on the value of intra_vipm_flag being 0, at least one of MRL-related information, intra subpartition prediction (ISP)-related information, or MPM-related information can be signaled.

[0223] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( sps_mrl_enabled_flag && ( ( y0 % CtbSizeY ) > 0 ) )intra_luma_ref_idx[ x0 ][ y0 ]ae(v)if ( sps_isp_enabled_flag && intra_luma_ref_idx[ x0 ][ y0 ] = = 0 &&( cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY ) &&( cbWidth * cbHeight > MinTbSizeY * MinTbSizeY ) )intra_subpartitions_mode_flag[ intra_subpartitions_mode_flag[ x0 ][ y0 ] = = 1 &&cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY )intra_subpartitions_split_flag[ x0 ][ y0 ]ae(v)if( sps_vipm_enabled_flag )intra_vipm_flag[ intra_vipm_flag[ x0 ][ y0 ] )intra_vipm_idx[ x0 ][ y0 ]ae(v)else {if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 &&intra_subpartitions_mode_flag[ y0 ]ae(v)...intra_luma_mpm_remainder[ x0 ][ y0 ]ae(v)}...

[0224] According to Table 3, DIPM-related information may include a DIPM flag (intra_vipm_flag) and a DIPM index (intra_vipm_idx).

[0225] DIPM-related information may be signaled after MRL-related information is signaled in the coding unit syntax. DIPM-related information may be signaled after ISP-related information is signaled in the coding unit syntax. This may be to apply MRL mode and / or ISP mode to the DIPM. DIPM-related information may be signaled before MPM-related information is signaled in the coding unit syntax.

[0226] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, and intra_vipm_idx can be signaled based on intra_vipm_flag, as seen in Table 1.

[0227] According to Table 3, MPM related information can be signaled based on the value of intra_vipm_flag being 0.

[0228] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( sps_mrl_enabled_flag && ( ( y0 % CtbSizeY ) > 0 ) )intra_luma_ref_idx[ x0 ][ y0 ]ae(v)if ( sps_isp_enabled_flag && intra_luma_ref_idx[ x0 ][ y0 ] = = 0 &&( cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY ) &&( cbWidth * cbHeight > MinTbSizeY * MinTbSizeY ) )intra_subpartitions_mode_flag[ intra_subpartitions_mode_flag[ x0 ][ y0 ] = = 1 &&cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY )intra_subpartitions_split_flag[ x0 ][ y0 ]ae(v)if( sps_vipm_enabled_flag )intra_vipm_flag[ intra_vipm_flag[ x0 ][ y0 ] = = 0 ) {if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 &&intra_subpartitions_mode_flag[ ]ae(v)...intra_luma_mpm_remainder[ x0 ][ y0 ]ae(v)}...

[0229] Table 4 shows cases where DIPM index signaling is omitted. Cases where DIPM index signaling is omitted are as discussed in Table 2.

[0230] DIPM-related information according to Table 4 may be signaled after MRL-related information is signaled in the coding unit syntax. DIPM-related information may be signaled after ISP-related information is signaled in the coding unit syntax. This may be to apply MRL mode and / or ISP mode to the DIPM. DIPM-related information may be signaled before MPM-related information is signaled in the coding unit syntax.

[0231] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, as seen in Table 1.

[0232] According to Table 4, MPM related information can be signaled based on the value of intra_vipm_flag being 0.

[0233] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( sps_vipm_enabled_flag )intra_vipm_flag[ x0 ][ y0 ]ae(v)if ( intra_vipm_flag[ x0 ][ y0 ] )intra_vipm_idx[ x0 ][ y0 ]ae(v)if( sps_mrl_enabled_flag && ( ( y0 % CtbSizeY ) > 0 ) )intra_luma_ref_idx[ x0 ][ y0 ]ae(v)if ( sps_isp_enabled_flag && intra_luma_ref_idx[ x0 ][ y0 ] = = 0 &&( cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY ) &&( cbWidth * cbHeight > MinTbSizeY * MinTbSizeY ) )intra_subpartitions_mode_flag[ x0 ][ y0 ]ae(v)if( intra_subpartitions_mode_flag[ x0 ][ y0 ] = = 1 &&cbWidth <= MaxTbSizeY && cbHeight <= MaxTbSizeY )intra_subpartitions_split_flag[ 0 )intra_luma_mpm_flag[ x0 ][ y0 ]ae(v)...intra_luma_mpm_remainder[ x0 ][ y0 ]ae(v)}...

[0234] According to Table 5, DIPM-related information may include a DIPM flag (intra_vipm_flag) and a DIPM index (intra_vipm_idx).

[0235] DIPM-related information can be signaled before MRL-related information. DIPM-related information can be signaled before ISP-related information. DIPM-related information can be signaled before MPM-related information. Since the selectivity of MRL and ISP modes may be lower than that of DIPM mode, MRL-related information and ISP-related information can be signaled before MRL and ISP-related information, taking this selectivity into account.

[0236] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, and intra_vipm_idx can be signaled based on intra_vipm_flag, as seen in Table 1.

[0237] According to Table 5, MPM-related information may be signaled based on the value of intra_vipm_flag being 0. At least one of MRL-related information or ISP-related information may be signaled regardless of the value of intra_vipm_flag.

[0238] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( sps_vipm_enabled_flag )intra_vipm_flag[ x0 ][ y0 ]ae(v)if( sps_mrl_enabled_flag && ( ( y0 % CtbSizeY ) > 0 ) )intra_luma_ref_idx[x0][y0]ae(v)if ( sps_isp_enabled_flag && intra_luma_ref_idx[ ) )intra_subpartitions_mode_flag[x0][ y0 ]ae(v)if( intra_subpartitions_mode_flag[ intra_vipm_flag[ x0 ][ y0 ] = = 0 )if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 &&intra_subpartitions_mode_flag[ y0 ]ae(v)}...

[0239] Table 6 shows cases where DIPM index signaling is omitted. Cases where DIPM index signaling is omitted are as discussed in Table 2.

[0240] DIPM-related information can be signaled before MRL-related information. DIPM-related information can be signaled before ISP-related information. DIPM-related information can be signaled before MPM-related information. Since the selectivity of MRL and ISP modes may be lower than that of DIPM mode, MRL-related information and ISP-related information can be signaled before MRL and ISP-related information, taking this selectivity into account.

[0241] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, as seen in Table 1.

[0242] According to Table 6, MPM-related information may be signaled based on the value of intra_vipm_flag being 0. At least one of MRL-related information or ISP-related information may be signaled regardless of the value of intra_vipm_flag.

[0243] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...intra_luma_mpm_flag[ x0 ][ y0 ]ae(v)if( intra_luma_mpm_flag[ x0 ][ y0 ] ) {if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 )intra_luma_not_planar_flag[ x0 ][ y0 ]ae(v)if( sps_vipm_enabled_flag && intra_luma_not_planar_flag[ x0 ][ y0 ] )intra_vipm_flag[ )intra_vipm_idx[ x0 ][ y0 ]ae(v)if ( intra_luma_not_planar_flag[ x0 ][ y0 ] && intra_vipm_flag[ x0 ][ y0 ] = = 0 )intra_luma_mpm_idx[ ]ae(v)}...

[0244] According to Table 7, DIPM-related information may include a DIPM flag (intra_vipm_flag) and a DIPM index (intra_vipm_idx).

[0245] The DIPM in the candidate list may be classified as a separate MPM candidate from the MPM candidates in the MPM list. In this case, DIPM-related information may be signaled after the MPM flag (intra_luma_mpm_flag) is signaled. For example, intra_vipm_flag may be signaled based on the value of intra_luma_mpm_flag being 1, and may not be signaled based on the value of intra_luma_mpm_flag being 0.

[0246] Since planar mode is a highly selective mode, DIPM-related information can be signaled after the planar flag (intra_luma_not_planar_flag) is signaled, as shown in Table 7. For example, intra_vipm_flag can be signaled based on the value of intra_luma_not_planar_flag being 1.

[0247] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, and intra_vipm_idx can be signaled based on intra_vipm_flag, as seen in Table 1.

[0248] According to Table 7, the MPM index (intra_luma_mpm_idx) can be signaled based on the value of intra_vipm_flag being 0. When the value of intra_vipm_flag is 0, the MPM list can be constructed based on the remaining modes excluding the DIPMs in the candidate list.

[0249] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...intra_luma_mpm_flag[ x0 ][ y0 ]ae(v)if( intra_luma_mpm_flag[ x0 ][ y0 ] ) {if( intra_luma_ref_idx[ x0 ][ y0 ] = = 0 )intra_luma_not_planar_flag[ x0 ][ y0 ]ae(v)if( sps_vipm_enabled_flag && intra_luma_not_planar_flag[ x0 ][ y0 ] )intra_vipm_flag[ intra_vipm_flag[ x0 ][ y0 ] = = 0 )intra_luma_mpm_idx[ x0 ][ y0 ]ae(v)}else...

[0250] Table 8 shows cases where DIPM index signaling is omitted. Cases where DIPM index signaling is omitted are as discussed in Table 2.

[0251] As seen in Table 7, intra_vipm_flag can be signaled based on the MPM flag (intra_luma_mpm_flag). Additionally, intra_vipm_flag can be signaled based on the planar flag (intra_luma_not_planar_flag).

[0252] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, as seen in Table 1.

[0253] According to Table 8, the MPM index (intra_luma_mpm_idx) can be signaled based on the value of intra_vipm_flag being 0. When the value of intra_vipm_flag is 0, the MPM list can be constructed based on the remaining modes excluding the DIPMs in the candidate list.

[0254] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( intra_luma_ref_idx[ sps_vipm_enabled_flag && intra_luma_mpm_flag [ x0 ][ y0 ] )intra_vipm_flag[ x0 ][ y0 ]ae(v)if ( intra_vipm_flag[ x0 ][ y0 ] )intra_vipm_idx[ intra_luma_mpm_flag [ x0 ][ y0 ] && intra_vipm_flag [

[0255] According to Table 9, DIPM-related information may include a DIPM flag (intra_vipm_flag) and a DIPM index (intra_vipm_idx).

[0256] DIPM related information can be signaled after the MPM flag (intra_luma_mpm_flag) is signaled. For example, intra_vipm_flag can be signaled based on the value of intra_luma_mpm_flag being 1, and can be not signaled based on the value of intra_luma_mpm_flag being 0.

[0257] The selectivity of DIPM mode may be higher than that of planar mode. Considering this, DIPM-related information may be signaled before the planar flag (intra_luma_not_planar_flag) is signaled.

[0258] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, and intra_vipm_idx can be signaled based on intra_vipm_flag, as seen in Table 1.

[0259] According to Table 9, intra_luma_not_planar_flag can be signaled based on the value of intra_vipm_flag being 0.

[0260] coding_unit( x0, y0, cbWidth, cbHeight, cqtDepth, treeType, modeType ) {Descriptor...if( intra_luma_ref_idx[ sps_vipm_enabled_flag && intra_luma_mpm_flag [ x0 ][ y0 ])intra_vipm_flag[ x0 ][ y0 ]ae(v)if ( intra_luma_mpm_flag [ x0 ][ y0 ] && intra_vipm_flag [ intra_luma_ref_idx[ x0 ][ y0 ] = = 0 )intra_luma_not_planar_flag[ x0 ][ y0 ]ae(v)...intra_luma_mpm_remainder[ x0 ][ y0 ]ae(v)}...

[0261] Table 10 shows cases where DIPM index signaling is omitted. Cases where DIPM index signaling is omitted are as discussed in Table 2.

[0262] The DIPM flag (intra_vipm_flag) may be signaled after the MPM flag (intra_luma_mpm_flag) is signaled. For example, intra_vipm_flag may be signaled based on the value of intra_luma_mpm_flag being 1, or may not be signaled based on the value of intra_luma_mpm_flag being 0. intra_vipm_flag may be signaled before the planar flag (intra_luma_not_planar_flag) is signaled.

[0263] intra_vipm_flag can be signaled based on sps_vipm_enabled_flag, as seen in Table 1.

[0264] According to Table 10, intra_luma_not_planar_flag can be signaled based on the value of intra_vipm_flag being 0.

[0265] The DIPM index can be binarized based on truncated binary coding, unary coding, golomb coding, exponential-golomb coding, truncated rice coding, or truncated unary coding. For example, if the candidate list size is 4 and truncated unary coding is used, the bins corresponding to each index can be as shown in Table 11 below. The binarized bins can be input to a regular coding engine or a bypass coding engine. Here, inputting to a regular coding engine can mean encoding based on context coding.

[0266] IndexBin string0011021103111

[0267] If the DIPM mode is not applied to the current block, at least one of the MPM index, the secondary MPM index, or the remaining mode information may be signaled. If the DIPM is not applied to the current block, this may mean that the VIPM in the candidate list is not selected as the intra prediction mode for the current block. In this case, the MPM list (including the secondary MPM list) and the non-MPM list may be configured so as not to overlap with the DIPM in the candidate list.

[0268] For example, a DIPM in the candidate list may not be included in the MPM list, the secondary MPM list, and the non-MPM list. That is, the MPM list may be configured so as not to overlap with a DIPM in the candidate list. In addition, the secondary MPM list may be configured so as not to overlap with a VIPM in the candidate list. In addition, the non-MPM list may be configured so as not to overlap with a VIPM in the candidate list. The non-MPM list may correspond to modes remaining except for the VIPM in the candidate list and the MPM candidates in the MPM list. For example, if a total of 67 intra prediction modes are defined, the size of the MPM list is 6, and the size of the candidate list is 4, the remaining mode information (intra_luma_mpm_remainder) may be changed to indicate any one of the 57 (= 67 - 6 - 4) modes.

[0269] This embodiment relates to a method for deriving a DIPM for a multi-reference line (MRL) mode. In conventional MRL mode, the intra prediction mode for the MRL mode can be set as an MPM candidate from an MPM list excluding the planar mode. However, since the MPM list is constructed based on the intra prediction modes of neighboring blocks adjacent to the current block, applying the corresponding intra prediction mode to the MRL mode may not be accurate. Rather, more accurate predictions may be possible when using an intra prediction mode that considers distant reference samples. For this purpose, the aforementioned DIPM can be derived and utilized.

[0270] When the MRL mode is applied to DIPM, the template area for DIPM can be defined to include a reference sample line according to the MRL mode. That is, the template area discussed with reference to FIG. 4 can be modified for the MRL mode. For example, the template area according to the MRL mode can be defined as shown in FIG. 5. Referring to FIG. 5, the template area can include adjacent samples in both directions based on the reference sample line according to the MRL mode.

[0271] Alternatively, unavailable samples may not be included in the template area. If samples further from the current block than the reference sample line are unavailable, the template area may be defined using available samples. For example, the template area may be defined as shown in Fig. 6. In Fig. 6, it is assumed that samples further from the reference sample line are unavailable, while samples closer than the reference sample line are available. In this case, the template area may be defined using only available samples.

[0272] As seen with reference to Fig. 4, the template area defined for the MRL mode can also be variably determined based on at least one of the size or shape of the current block. In addition, W A , W AR , H A , W L , H L , H LB It may have the same meaning as the variable defined in Example 1, and may be variably determined based on the size of the current block or the location of the corresponding area.

[0273] Alternatively, for some reference sample lines, DIPM can be derived by the method described with reference to FIG. 4 without setting a separate template area for the MRL mode. For example, a template area can be defined for reference sample lines 0 or 2 as in Example 1. Here, reference sample line 0 can represent a reference sample line adjacent to the current block. Reference sample line 2 can represent a reference sample line 2 samples away from the current block.

[0274] The size of the candidate list for cases where MRL mode is applied to DIPM may differ from the size of the candidate list for cases where MRL mode is not applied to DIPM. For example, the size of the candidate list for cases where MRL mode is applied may be 5. In other words, the number of DIPMs that can be included in the candidate list may be 5. The method for constructing the candidate list is as described with reference to Fig. 4.

[0275] FIG. 8 illustrates a schematic configuration of a decoding device (300) that performs a decoding method according to the present disclosure.

[0276] Referring to FIG. 8, the decoding device (300) may include a DIPM derivation unit (800), a candidate list construction unit (810), a prediction block generation unit (820), and a restoration unit (830). The DIPM derivation unit (800), the candidate list construction unit (810), and the prediction block generation unit (820) may be provided in the intra prediction unit (331) of FIG. 3.

[0277] The DIPM induction unit (800) can perform the DIPM induction process according to S400. The candidate list construction unit (810) can perform the candidate list construction process according to S410. The prediction block generation unit (820) can perform the prediction block generation process according to S420. The restoration unit (830) can perform the current block restoration process according to S430.

[0278] FIG. 9 illustrates an encoding method performed by an encoding device (200) as an embodiment according to the present disclosure.

[0279] One or more DIPMs can be derived based on the template area of ​​the current block (S900). The DIPM derivation method is as described with reference to FIG. 4.

[0280] A candidate list for the current block can be constructed based on the DIPM(s) derived from S900 (S910). The method for constructing the candidate list is as described with reference to FIG. 4.

[0281] A prediction block of the current block can be generated based on the candidate list configured in S910 (S920). That is, an intra prediction mode of the current block can be derived based on any one of a plurality of DIPMs included in the candidate list, and a prediction block of the current block can be generated based on the derived intra prediction mode. At this time, a DIPM index indicating any one of the plurality of DIPMs can be encoded in the bitstream. Alternatively, a first DIPM among a plurality of DIPMDs included in the candidate list can be set as the intra prediction mode of the current block, and encoding of the DIPM index can be omitted.

[0282] Transform coefficients of the current block can be derived based on the residual block of the current block (S930). The residual block of the current block can be generated based on the prediction block generated in S920. The transform coefficients can be derived by performing at least one of transformation or quantization on the residual block.

[0283] A bitstream can be generated by encoding residual information about the transform coefficients of the current block (S940).

[0284] Fig. 10 illustrates a schematic configuration of an encoding device (200) that performs an encoding method according to the present disclosure.

[0285] Referring to FIG. 10, the encoding device (200) may include a DIPM derivation unit (1000), a candidate list construction unit (1010), a prediction block generation unit (1020), a transform coefficient derivation unit (1030), and a residual information encoding unit (1040).

[0286] The DIPM derivation unit (1000), candidate list construction unit (1010), and prediction block generation unit (1020) may be provided in the intra prediction unit (222) of FIG. 2. The transform coefficient derivation unit (1030) may be provided in the residual processing unit (230) of FIG. 2. The residual information encoding unit (1040) may be provided in the entropy encoding unit (240).

[0287] The DIPM derivation unit (1000) can perform the DIPM derivation process according to S900. The candidate list construction unit (1010) can perform the candidate list construction process according to S910. The prediction block generation unit (1020) can perform the prediction block generation process according to S920. The transform coefficient derivation unit (1030) can perform the transform coefficient derivation process according to S930. The residual information encoding unit (1040) can perform the residual information encoding process according to S940.

[0288] 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.

[0289] 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.

[0290] 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.

[0291] 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.

[0292] 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.

[0293] 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.

[0294] FIG. 11 illustrates an example of a content streaming system to which embodiments of the present disclosure can be applied.

[0295] Referring to FIG. 11, 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.

[0296] 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.

[0297] 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.

[0298] 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.

[0299] 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.

[0300] 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.

[0301] 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.

[0302] 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 DIPMs (derived intra prediction modes) based on the template area of ​​the current block; A step of constructing a candidate list based on the above DIPMs; A step of generating a prediction block of the current block based on the candidate list; A method comprising the step of restoring a current block based on the predicted block and the residual block of the current block.

2. In paragraph 1, A method wherein the size of the template area is determined based on at least one of the size or shape of the current block.

3. In paragraph 1, The template area includes at least one of a first template area or a second template area, The first template area includes an upper area, a left area, an upper left area, an upper right area, and a lower left area adjacent to the current block, A method wherein the second template area is composed of one or a combination of at least two of an upper area, a left area, an upper left area, an upper right area, or a lower left area adjacent to the current block.

4. In paragraph 3, A method wherein the candidate list includes at least one of a first DIPM derived based on the first template area or a second DIPM derived based on the second template area.

5. In paragraph 1, A method wherein the above candidate list further includes a predetermined default mode.

6. In paragraph 1, The step of constructing the above candidate list includes the step of sorting the DIPMs based on the error value for each of the DIPMs, A method in which the above candidate list is constructed based on the top M DIPMs in ascending order of the above error values.

7. In paragraph 6, A method in which the above error value is derived based on the difference between the predicted value of the template area and the restored value of the template area.

8. In paragraph 1, A method in which an intra prediction mode of the current block is derived based on any one of a plurality of DIPMs belonging to the above candidate list.

9. In paragraph 8, A method wherein one of a plurality of DIPMs belonging to the above candidate list is determined based on a DIPM index signaled through a bitstream.

10. In paragraph 8, A method wherein any one of the plurality of DIPMs belonging to the above candidate list is the first DIPM among the plurality of DIPMs belonging to the above candidate list.

11. In paragraph 1, A method further comprising the step of determining whether DIPM mode is applied to the current block based on the DIPM flag.

12. In paragraph 11, A method wherein the DIPM flag is signaled prior to at least one of MRL-related information, ISP-related information, or MPM-related information.

13. A step of deriving DIPMs (derived intra prediction modes) based on the template area of ​​the current block; A step of constructing a candidate list based on the above DIPMs; A step of generating a prediction block of the current block based on the candidate list; A step of generating a residual block of the current block based on a prediction block of the current block; A step of deriving transform coefficients of the current block based on the residual block; and A method comprising a step of encoding residual information regarding the above transform coefficients.

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

15. A step of obtaining a bitstream for image information; wherein the bitstream is generated based on a step of deriving DIPMs (derived intra prediction modes) based on a template region of a current block, a step of constructing a candidate list based on the DIPMs, a step of generating a prediction block of the current block based on the candidate list, a step of generating a residual block of the current block based on the prediction block of the current block, a step of deriving transform coefficients of the current block based on the residual block, and a step of encoding residual information regarding the transform coefficients, and A method comprising the step of transmitting data including the bitstream.

Citation Information

Patent Citations

  • Image decoding device, image decoding method, and program

    JP2023074968A

  • Neighbor based signaling of intra prediction modes

    US20200195935A1

  • Image encoding / decoding method and device, and recording medium in which bitstream is stored

    US20220038682A1

  • Image encoding / decoding method and apparatus, and recording medium storing bitstream

    US20220182661A1

  • Template-based filtering for inter prediction

    WO2024002877A1