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

The matrix-based intra prediction method optimizes image encoding/decoding for high-resolution images by deriving modes from candidate lists and applying non-separable transforms, addressing efficiency and complexity challenges in existing technologies.

WO2025159493A1PCT designated stage expired Publication Date: 2025-07-31LG ELECTRONICS INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2025/001223
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-17
Filing Date
2025-01-22
Publication Date
2025-07-31

AI Technical Summary

Technical Problem

Existing image compression technologies face challenges in efficiently encoding and decoding high-resolution, high-quality images while maintaining encoding performance and reducing complexity, particularly in handling intra prediction modes for video encoding/decoding.

Method used

The method employs a matrix-based intra prediction (MIP) approach that includes a regular and alternative MIP method, deriving intra prediction modes based on candidate lists and applying non-separable transforms to blocks, adjusting reference region sizes and matrix kernels, and using downsampling and upsampling techniques to optimize encoding efficiency and accuracy.

Benefits of technology

This approach reduces transmission bit amounts of residual data, improves encoding efficiency, and enhances prediction accuracy by considering block characteristics and surrounding blocks, while managing memory effectively.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2025001223_31072025_PF_FP_ABST
    Figure KR2025001223_31072025_PF_FP_ABST
Patent Text Reader

Abstract

In an image decoding method and apparatus according to the present disclosure, an intra-prediction mode of the current block may be derived, a prediction block of the current block may be generated on the basis of whether the intra-prediction mode is a mode to which an alternative MIP method can be applied, a residual block of the current block may be generated, and the current block may be reconstructed on the basis of the prediction block and the residual block.
Need to check novelty before this filing date? Find Prior Art

Description

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

[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 an intra prediction method and device based on a regular or alternative MIP method.

[0005] The present disclosure provides a transformation method and device for a block to which a regular or alternative MIP method is applied.

[0006] The present disclosure provides a method and device for deriving an intra prediction mode that takes into account the characteristics of surrounding blocks.

[0007] The video decoding method and device according to the present disclosure can derive an intra prediction mode of a current block, generate a prediction block of the current block based on whether the intra prediction mode is a mode to which an alternative MIP method is applicable, generate a residual block of the current block, and reconstruct the current block based on the prediction block and the residual block.

[0008] In the video decoding method and device according to the present disclosure, the intra prediction mode of the current block can be derived based on a candidate list including a plurality of candidate modes. Here, at least one of the plurality of candidate modes can be derived based on at least one of whether a block adjacent to the current block is a block to which the alternative MIP method can be applied, whether an intra prediction mode of the adjacent block corresponds to a mode to which the alternative MIP method can be applied, or whether the alternative MIP method is applied to the adjacent block.

[0009] 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 either the DIMD method or the TIMD method.

[0010] In the video decoding method and device according to the present disclosure, when the intra prediction mode of the current block is derived based on the TIMD method, the intra prediction mode is derived based on a cost for each of the candidate modes, and the cost can be calculated based on a difference between prediction samples of the template and restoration samples. Here, prediction samples of the template corresponding to the candidate mode to which the alternative MIP method is applicable can be derived using the alternative MIP method.

[0011] In the image decoding method and device according to the present disclosure, when the intra prediction mode is a mode to which the alternative MIP method is applicable, the prediction block can be generated based on a predetermined reference region and matrix kernel.

[0012] In the image decoding method and device according to the present disclosure, the prediction block can be generated based on the steps of performing downsampling on the reference region, applying the matrix kernel to samples of the downsampled reference region to derive prediction samples, and performing upsampling based on the prediction samples.

[0013] In the image decoding method and device according to the present disclosure, the number of reference sample lines belonging to the reference area may be different based on the size of the current block.

[0014] In the image decoding method and device according to the present disclosure, the length of the reference sample line belonging to the reference area may be different based on the size of the current block.

[0015] In the image decoding method and device according to the present disclosure, reference sample filtering can be performed on at least one reference sample line belonging to the reference region based on whether the current block satisfies a predetermined condition.

[0016] In the image decoding method and device according to the present disclosure, the downsampling ratio for the reference region, the number of inputs of the matrix kernel, or the number of outputs of the matrix kernel can be determined based on the size of the current block.

[0017] In the video decoding method and device according to the present disclosure, if the intra prediction mode is a mode to which the alternative MIP method is applicable, the prediction block may be generated based on a weighted sum of a first prediction block and a second prediction block for the current block. Here, the first prediction block may be generated based on the alternative MIP method, and the second prediction block may be generated based on the intra prediction mode.

[0018] In the image decoding method and device according to the present disclosure, the residual block of the current block can be generated based on a non-separable transform for the transform coefficients of the current block.

[0019] In the image decoding method and device according to the present disclosure, when the alternative MIP method is applied to the current block, the transform kernel for the non-separable transform can be determined based on the intra prediction mode or non-directional mode of the current block.

[0020] In the video encoding method and device according to the present disclosure, an intra prediction mode of a current block can be derived, a prediction block of the current block can be generated based on whether the intra prediction mode is a mode to which an alternative MIP method can be applied, transform coefficients of the current block can be derived based on a residual block of the current block, and residual information about the transform coefficients can be encoded.

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

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

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

[0024] By performing intra prediction based on a regular or alternative MIP method according to the present disclosure, the transmission bit amount of residual data can be reduced while improving the accuracy of prediction.

[0025] According to the present disclosure, encoding performance can be maintained while reducing the complexity of intra prediction by adjusting the size of the reference region for an alternative MIP method or downsampling samples within the reference region.

[0026] According to the present disclosure, memory can be efficiently managed by adjusting the size of the matrix kernel for a regular or alternative MIP method.

[0027] According to the present disclosure, the encoding efficiency of residual data can be improved by applying a non-separable transformation to a block to which a regular or alternative MIP method is applied.

[0028] According to the present disclosure, a more accurate intra prediction mode can be derived by considering the characteristics of a current block and / or surrounding blocks, and the efficiency of intra prediction can be improved by configuring various candidate modes.

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

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

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

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

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

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

[0035] FIG. 7 illustrates a schematic configuration of an encoding device (200) that performs an encoding method according to the present disclosure.

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

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

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

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

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

[0041] The present disclosure relates to video / image coding. For example, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the versatile video coding (VVC) standard. In addition, the methods / embodiments disclosed in this specification can be applied to methods disclosed in the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the second generation of audio video coding standard (AVS2), or the next generation of video / image coding standards (e.g., H.267 or H.268).

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[0068] The intra prediction unit (222) can predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The non-directional mode may include at least one of a DC mode or a planar mode. The directional mode may include 33 directional modes or 65 directional modes depending on the degree of detail in the prediction direction. However, this is only an example, and a greater or lesser number of directional modes may be used depending on the settings. The intra prediction unit (222) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

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

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

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

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

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

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

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

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

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

[0078] The DPB of the memory (270) can store the modified restored picture to be used as a reference picture in the inter prediction unit (221). The memory (270) can store motion information of a block from which motion information is derived (or encoded) within the current picture and / or motion information of blocks within a picture that has already been restored. The stored motion information can be transferred to the inter prediction unit (221) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (270) can store restored samples of restored blocks within the current picture and transfer them to the intra prediction unit (222).

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

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

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

[0082] 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 of 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 through the decoding device (300) can be reproduced through a reproduction device.

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

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

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

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

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

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

[0089] The intra prediction unit (331) can predict the current block by referring to samples within the current picture. The referenced samples may be located in the neighborhood of the current block, or may be located a certain distance away from the current block, depending on the prediction mode. In intra prediction, the prediction modes may include one or more non-directional modes and multiple directional modes. The intra prediction unit (331) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0090] The inter prediction unit (332) can derive a prediction block for the current block based on a reference block (reference sample array) specified by a motion vector on a reference picture. At this time, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information can be predicted in units of blocks, subblocks, or samples based on the correlation of the motion information between the neighboring blocks and the current block. The motion information can include a motion vector and a reference picture index. The motion information can further include inter prediction direction information (L0 prediction, L1 prediction, Bi prediction, etc.). In the case of inter prediction, the neighboring blocks can include spatial neighboring blocks existing in the current picture and temporal neighboring blocks existing in the reference picture. For example, the inter prediction unit (332) can construct a motion information candidate list based on the neighboring blocks, and derive the motion vector and / or reference picture index of the current block based on the received candidate selection information. Inter prediction can be performed based on various prediction modes, and information about the prediction can include information indicating an inter prediction mode for the current block.

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

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

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

[0094] The (corrected) reconstructed picture stored in the DPB of the memory (360) can be used as a reference picture in the inter prediction unit (332). The memory (360) can store motion information of a block from which motion information is derived (or decoded) in the current picture and / or motion information of blocks in a picture that has already been reconstructed. The stored motion information can be transferred to the inter prediction unit (332) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (360) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (331).

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

[0096] The matrix-based intra prediction (MIP) method according to the present disclosure can be divided into two methods.

[0097] One method may be a method of applying a matrix kernel to samples of a predetermined (downsampled) reference region to derive prediction samples, and performing upsampling based on the derived prediction samples to generate a prediction block of a current block. A plurality of matrix kernels for a regular MIP method may be defined in an encoding device and a decoding device, and any one of the plurality of matrix kernels may be selected based on a predetermined MIP mode. The MIP mode may be derived based on mode information signaled through a bitstream.

[0098] Another method may be to first derive an intra prediction mode for the current block, and then apply a matrix kernel to samples of a predetermined reference region when the intra prediction mode corresponds to a specific mode to derive prediction samples of the current block. A plurality of matrix kernels for alternative MIP methods may be defined in the encoding device and the decoding device, and any one of the plurality of matrix kernels may be selected based on a predetermined MIP mode. The MIP mode may be set to the intra prediction mode derived for the current block. Alternatively, the MIP mode may be derived based on mode information signaled through a bitstream.

[0099] Hereinafter, the former MIP method will be referred to as the regular MIP method, and the latter MIP method will be referred to as the replacing MIP method. Furthermore, for the sake of convenience of explanation, the MIP method will be examined based on the replacing MIP method. However, it should be understood that various embodiments of the replacing MIP method can be applied equally or similarly to the regular MIP method.

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

[0101] Referring to FIG. 4, the intra prediction mode of the current block can be derived (S400). The intra prediction mode of the current block can be derived based on at least one of the embodiments described below.

[0102] Example 1

[0103] When performing directional intra prediction, the intra prediction modes of neighboring blocks can be explored to derive candidate modes for the current block, and the candidate modes for the current block can be derived by considering the intra prediction modes of these neighboring blocks. However, blocks encoded using the MIP method have different characteristics than blocks encoded using the directional intra prediction mode, requiring different measures. The aforementioned alternative MIP method requires further consideration because it has a conventional directional intra prediction mode.

[0104] Candidate modes can be derived from neighboring blocks adjacent to the current block, and a candidate list including the candidate modes can be generated. The neighboring blocks may include at least one of the upper neighboring block, the left neighboring block, the upper-right neighboring block, the lower-left neighboring block, or the upper-left neighboring block.

[0105] If a neighboring block is a block encoded using the intra mode, the neighboring block may have an intra prediction mode, and the intra prediction mode of the neighboring block may be set as a candidate mode. If the neighboring block is a block encoded using the regular MIP method or the alternative MIP method, a method for deriving a candidate mode from the neighboring block may be proposed as follows.

[0106] If a neighboring block is a block to which an alternative MIP method can be applied, the intra prediction mode of the neighboring block may be set to a candidate mode. A block to which an alternative MIP method can be applied may refer to a block having a size smaller than or equal to a predetermined threshold size, and may be understood as being replaced with the same meaning hereinafter. For example, if the width and height of a block are smaller than or equal to 16, the block may be a block to which an alternative MIP method can be applied. However, this is merely an example, and the threshold size may be 32, 64, or larger.

[0107] If a neighboring block is a block to which the alternative MIP method cannot be applied and the intra prediction mode of the neighboring block does not correspond to a mode to which the alternative MIP method can be applied, the intra prediction mode of the neighboring block may be set as a candidate mode. The mode to which the alternative MIP method can be applied may be defined as an intra prediction mode having at least one number among 0, 1, or (2+4*k), and may be understood to be replaced with the same meaning hereinafter. k may be one or more integers in the range of 0 to 16.

[0108] If a neighboring block is a block to which the alternative MIP method cannot be applied and the intra prediction mode of the neighboring block corresponds to a mode to which the alternative MIP method can be applied, a neighboring mode of the intra prediction mode of the neighboring block may be set as a candidate mode. For example, the neighboring mode may be derived by adding or subtracting a predetermined offset (e.g., 1, 2, or 3) to the intra prediction mode of the neighboring block. The neighboring mode may not correspond to a mode to which the alternative MIP method can be applied.

[0109] The candidate mode derivation method described above can be applied when the current block is a block to which an alternative MIP method can be applied.

[0110] Alternatively, if the surrounding block is a block to which the alternative MIP method cannot be applied, the intra prediction mode of the surrounding block may be set to the candidate mode.

[0111] If a surrounding block is a block to which an alternative MIP method can be applied and the intra prediction mode of the surrounding block does not correspond to a mode to which the alternative MIP method can be applied, the intra prediction mode of the surrounding block can be set to a candidate mode.

[0112] If a surrounding block is a block to which the alternative MIP method can be applied and the intra prediction mode of the surrounding block corresponds to a mode to which the alternative MIP method can be applied, the planar mode (or mode 0) can be set as the candidate mode instead of the intra prediction mode of the surrounding block.

[0113] If a surrounding block is a block to which the alternative MIP method can be applied and the intra prediction mode of the surrounding block corresponds to a mode to which the alternative MIP method can be applied, the DC mode (or mode 1) can be set as a candidate mode instead of the intra prediction mode of the surrounding block.

[0114] If a neighboring block is a block to which an alternative MIP method can be applied and the intra prediction mode of the neighboring block corresponds to a mode to which the alternative MIP method can be applied, a virtual intra prediction mode (VIPM) can be derived for the neighboring block, and the derived VIPM can be set as a candidate mode. The VIPM can be derived using a method identical to or similar to the DIMD method or the TIMD method. Through this, an optimal intra prediction mode other than a mode to which the alternative MIP method can be applied can be used as a candidate mode.

[0115] For example, a predetermined filter may be applied to a reconstructed block (or a prediction block, a surrounding area) of a surrounding block to calculate a gradient value in the horizontal and / or vertical direction for each of the predetermined intra prediction modes. The top N intra prediction modes in descending order of the calculated gradient values ​​may be set as the VIPM of the surrounding block. Alternatively, a cost may be calculated for each of the predetermined candidate modes. In this case, the cost may be calculated based on the difference between the prediction samples and the reconstructed samples of the template of the surrounding block. The prediction samples of the template may be derived based on the candidate mode. The top N candidate modes in ascending order of the calculated costs may be set as the VIPM of the surrounding block. N may be an integer of 1, 2, or a greater number.

[0116] The candidate mode derivation method described above can be applied when the current block is a block to which the alternative MIP method cannot be applied.

[0117] Alternatively, if an alternative MIP method is applied to a surrounding block, the planar mode (or mode 0) may be set as the candidate mode instead of the intra prediction mode of the surrounding block.

[0118] When an alternative MIP method is applied to a surrounding block, the DC mode (or mode 1) can be set as a candidate mode instead of the intra prediction mode of the surrounding block.

[0119] When an alternative MIP method is applied to a neighboring block, the intra prediction mode or MIP mode of the neighboring block may be set as a candidate mode. As described above, the MIP mode may be set as a pre-derived intra prediction mode for the neighboring block or may be derived based on mode information signaled from the bitstream. The MIP mode may be used to specify any one of a plurality of matrix kernels for MIP.

[0120] When an alternative MIP method is applied to a surrounding block, a VIPM can be derived for the surrounding block, and the derived VIPM can be set as a candidate mode.

[0121] The aforementioned candidate mode derivation method can be applied regardless of whether the current block and / or surrounding blocks are blocks to which the alternative MIP method can be applied.

[0122] Any one of the multiple candidate modes in the above candidate list can be set as the intra prediction mode of the current block. To this end, an index specifying any one of the multiple candidate modes can be signaled. Alternatively, the DIMD method or TIMD method described below can be applied based on the multiple candidate modes to set any one of the multiple candidate modes as the intra prediction mode of the current block.

[0123] Meanwhile, the intra prediction mode for the chrominance component of the current block (hereinafter referred to as the chrominance block) can be derived based on the intra prediction mode of the luminance block corresponding to the chrominance block. However, if the regular MIP method or the alternative MIP method is applied to the luminance block, the intra prediction mode of the luminance block can be set as follows.

[0124] When the regular MIP method or the alternative MIP method is applied to the luminance block, the intra prediction mode of the luminance block can be set to the planar mode (or mode 0).

[0125] When the regular MIP method or the alternative MIP method is applied to the luminance block, the intra prediction mode of the luminance block can be set to DC mode (or mode 1).

[0126] When the regular MIP method or the alternative MIP method is applied to the luminance block, the intra prediction mode of the luminance block may be set to the MIP mode or may be set to the same as the derived intra prediction mode for the luminance block.

[0127] When a regular MIP method or an alternative MIP method is applied to a luminance block, a VIPM can be derived for the luminance block, and the derived VIPM can be set as an intra prediction mode of the luminance block.

[0128] Example 2

[0129] The intra prediction mode of the current block can be derived based on the decoder side intra mode derivation (DIMD) method.

[0130] Specifically, a predetermined filter may be applied to a surrounding area of ​​a current block to derive horizontal and / or vertical gradient values ​​for each of predetermined intra prediction modes, and one or more intra prediction modes may be derived for the current block based on the derived gradient values. For example, the top N intra prediction modes in descending order of the derived gradient values ​​may be set as the intra prediction modes of the current block. Here, N may be an integer of 1, 2, or a higher number.

[0131] The above-described intra prediction modes may include directional modes excluding modes to which the aforementioned alternative MIP method is applicable. Alternatively, the above-described intra prediction modes may include directional modes excluding non-directional modes (e.g., at least one of planar mode or DC mode). Alternatively, the above-described intra prediction modes may include non-directional modes and directional modes.

[0132] Example 3

[0133] The intra prediction mode of the current block can be derived based on the template-based intra mode derivation (TIMD) method.

[0134] Specifically, a cost may be calculated for each of the candidate modes for TIMD. The candidate modes may include non-directional modes and directional modes that are identically predefined for the encoding device and the decoding device. Alternatively, the cost may be calculated for candidate modes belonging to a candidate list of the current block. The candidate modes in the candidate list may be generated based on the intra prediction modes of the surrounding blocks, as described in Embodiment 1. Alternatively, the cost may be calculated only for the top N candidate modes in ascending order of index among the candidate modes belonging to the candidate list. N may be a value identically predefined for the encoding device and the decoding device (e.g., an integer of 2, 3, or more). The candidate modes may be restricted so that no modes to which an alternative MIP method is applicable are included.

[0135] The above cost can be calculated based on the difference between the predicted samples and the restored samples of the template. In this case, if the candidate mode corresponds to a mode to which the alternative MIP method can be applied, the predicted samples of the template can be derived based on a pre-defined default mode instead of the candidate mode. The default mode can be a planar mode or a DC mode. Alternatively, if the candidate mode corresponds to a mode to which the alternative MIP method can be applied, the predicted samples of the template can be derived based on the candidate mode. Alternatively, if the candidate mode corresponds to a mode to which the alternative MIP method can be applied, the predicted samples of the template can also be derived based on the alternative MIP method.

[0136] One or more candidate modes can be selected based on the calculated costs for the above candidate modes. An intra prediction mode of the current block can be derived based on the selected one or more candidate modes.

[0137] Referring to FIG. 4, a prediction block of the current block can be generated based on the intra prediction mode of the current block (S410).

[0138] The prediction block of the current block can be generated based on whether the intra prediction mode of the current block corresponds to a mode to which an alternative MIP method is applicable.

[0139] If the intra prediction mode of the current block does not correspond to a mode to which the alternative MIP method is applicable, a prediction block of the current block can be generated based on the intra prediction mode and predetermined reference samples.

[0140] On the other hand, if the intra prediction mode of the current block corresponds to a mode to which the alternative MIP method can be applied, a prediction block of the current block can be generated based on a predetermined reference region and a matrix kernel. The reference region is a region adjacent to the current block and may include at least one of an upper reference region or a left reference region. Here, the upper reference region may be composed of one or more reference sample lines. The width (W0) of the upper reference region may mean the length of the reference sample line or the length of the upper reference region, and the height (H0) of the upper reference region may mean the number of reference sample lines belonging to the upper reference region. Similarly, the left reference region may be composed of one or more reference sample lines. The width (W1) of the left reference region may mean the number of reference sample lines belonging to the left reference region, and the height (H1) of the left reference region may mean the length of the reference sample line or the length of the left reference region.

[0141] For example, the lengths of the upper and left reference regions can be defined as (2*W) and (2*H), where W and H can represent the width and height of the current block, respectively. The upper and left reference regions can be downsampled to have a length of (2*K). Here, K is an integer that is a multiple of 2, such as 2, 4, 8, 16, 32, 64, 128, 256, or 512. Prediction samples can be derived by applying a matrix kernel to samples of the downsampled reference regions. The derived prediction samples can have the size of the downsampled current block. The derived prediction samples can be assigned to a specific location within the current block. Upsampling can be performed based on the prediction samples at the specific location to generate a prediction block of the current block. The upsampling can be performed by applying a vertical or horizontal interpolation filter to the prediction samples at the specific location. A prediction block can be generated using the above-described method even if at least one of the width or height of the current block is greater than or equal to 32.

[0142] For example, assume that K is 16 and the current block is a 64x32 block. In this case, the upper reference region can be downsampled to have a length of (2*16), and the left reference region can be downsampled to have a length of (2*16). This allows the input length (or input size) of the matrix kernel applied to the 16x16 block to be matched. A 16x16 prediction block can be derived by applying the matrix kernel to the samples of the downsampled upper and left reference regions. The derived 16x16 prediction block can be upsampled to generate a 64x32 prediction block.

[0143] Alternatively, the lengths of the upper and left reference regions can be defined as W and H, where W and H can represent the width and height of the current block, respectively. The upper and left reference regions can be downsampled to have a length of (2*K), where K is an integer that is a multiple of 2, such as 2, 4, 8, 16, 32, 64, 128, 256, or 512. Prediction samples can be derived by applying a matrix kernel to samples of the downsampled reference regions. The derived prediction samples can have the size of the downsampled current block. The derived prediction samples can be assigned to a specific location within the current block. Upsampling can be performed based on the prediction samples at the specific location to generate a prediction block of the current block. The upsampling can be performed by applying a vertical or horizontal interpolation filter to the prediction samples at the specific location. A prediction block can be generated using the above-described method even if at least one of the width or height of the current block is greater than or equal to 32.

[0144] For example, assume that K is 16 and the current block is a 64x32 block. In this case, the upper reference region can be downsampled to have a length of (2*16), and since the length of the left reference region is equal to (2*16), the left reference region may not be downsampled. This allows the input length (or input size) of the matrix kernel applied to the 16x16 block to be matched. A 16x16 prediction block can be derived by applying the matrix kernel to the samples of the downsampled upper and left reference regions. A 64x32 prediction block can be generated by upsampling the derived 16x16 prediction block.

[0145] Through the above-described method, an alternative MIP method using a matrix kernel of limited size can be efficiently applied to blocks of various sizes.

[0146] The number of reference sample lines belonging to a reference area may vary based on the size of the current block.

[0147] For example, if the width of the current block is less than or equal to the first threshold, the number of reference sample lines belonging to the upper reference area may be X, otherwise, the number of reference sample lines belonging to the upper reference area may be Y. If the height of the current block is less than or equal to the first threshold, the number of reference sample lines belonging to the left reference area may be X, otherwise, the number of reference sample lines belonging to the left reference area may be Y. Here, the first threshold is a value that is identically predefined for the encoding device and the decoding device, and may be an integer that is a multiple of 2, such as 4, 8, 16, 32, 64, 128, 256, or 512. X and Y may be integers that are 1, 2, 3, 4, or higher, and X and Y may be different integers. In this example, the block size is divided into two sections and a different number of reference sample lines is used for each section. However, this is only an example, and the block size may be divided into three or more sections, and a different number of reference sample lines may be used for each section.

[0148] Alternatively, the length of a reference sample line belonging to a reference area may vary based on the size of the current block.

[0149] For example, if the width (W) of the current block is less than or equal to the second threshold, the length of the reference sample line belonging to the upper reference area may be (W*X), otherwise, the length of the reference sample line belonging to the upper reference area may be (W*Y). If the height (H) of the current block is less than or equal to the second threshold, the length of the reference sample line belonging to the left reference area may be (H*X), otherwise, the length of the reference sample line belonging to the left reference area may be (H*Y). Here, the second threshold may be a value that is predefined equally in the encoding device and the decoding device, and may be an integer that is a multiple of 2, such as 4, 8, 16, 32, 64, 128, 256, or 512. The second threshold may be the same as or different from the first threshold. X and Y can be real numbers such as 1, 1.5, 2, 2.5 or more, and X and Y can be real numbers each other. In this example, the block size is divided into two sections and reference sample lines of different lengths are used for each section, but this is only an example, and the block size can be divided into three or more sections and reference sample lines of different lengths can be used for each section.

[0150] When the alternative MIP method is applied to the current block, reference sample filtering may be restricted from being performed on reference sample lines belonging to the reference area. Alternatively, reference sample filtering may be performed on at least one reference sample line belonging to the reference area based on whether the current block satisfies a reference sample filtering condition. Here, the reference sample filtering condition may include at least one of the following conditions 1 to 4.

[0151] (Condition 1) The index of the reference sample line is 0.

[0152] (Condition 2) The product of the width and height of the current block is greater than 32.

[0153] (Condition 3) The component type of the current block is a luminance component.

[0154] (Condition 4) The intra prediction mode of the current block is a mode to which reference sample filtering can be applied. Here, the mode to which reference sample filtering can be applied is a mode that is identically pre-defined for the encoding device and the decoding device, and may be a mode corresponding to at least one number among 0, -14, -12, -10, -6, 2, 34, 66, 72, 76, 78, or 80.

[0155] For example, when the replacement MIP method is applied to the current block, it can be determined whether the previously described reference sample filtering condition is satisfied by replacing the pre-derived intra prediction mode for the current block with the planar mode (or mode 0). That is, assuming that the remaining conditions except for condition 4 are satisfied, reference sample filtering can be performed because condition 4 is satisfied as the pre-derived intra prediction mode for the current block is replaced with the planar mode.

[0156] Alternatively, when an alternative MIP method is applied to the current block, it can be determined whether the aforementioned reference sample filtering condition is satisfied based on the pre-derived intra prediction mode for the current block. That is, assuming that the remaining conditions except for condition 4 are satisfied, if the pre-derived intra prediction mode for the current block corresponds to a mode to which reference sample filtering can be applied, reference sample filtering can be performed.

[0157] Unlike the regular MIP method, the alternative MIP method may not apply downsampling and upsampling to the input and output samples during the matrix operation process. In this case, the memory for the matrix kernel may be very large. For example, when the alternative MIP method is applied to a 32x32 block, 128 inputs are required if one reference sample line is used as the input of the matrix kernel, 256 inputs are required if two reference sample lines are used as the input of the matrix kernel, and 1024 outputs are required for the matrix kernel. Therefore, the size of the matrix kernel for this becomes 128x1024 or 256x1024, and a very large memory is required to store it. Below, a method is proposed to reduce the size of the matrix kernel by adjusting the number of inputs and / or outputs of the matrix kernel.

[0158] For example, for all block sizes to which the alternative MIP method can be applied, a matrix kernel with the same number of inputs can be used. If the number of samples in the reference region for the alternative MIP method is greater than the number of inputs to the matrix kernel, the samples in the reference region can be downsampled to the same number as the number of inputs to the matrix kernel. The number of inputs to the matrix kernel can be N, and N can be an integer that is a multiple of 2. For example, if N is 16, downsampling can be applied to samples in the reference region of the current block so that the number of reference samples input to the matrix kernel becomes 16.

[0159] Alternatively, the number of inputs to the matrix kernel can be adaptively determined based on the size of the current block. For example, if the width and height of the current block are less than or equal to 8, a matrix kernel with 16 inputs can be used. If the number of samples in the reference region is greater than 16, the samples in the reference region can be downsampled to 16 samples, which is the same as the number of inputs to the matrix kernel. Alternatively, if the width and height of the current block are greater than 8 and less than or equal to 16, a matrix kernel with 64 inputs can be used. If the number of samples in the reference region is greater than 64, the samples in the reference region can be downsampled to 64 samples, which is the same as the number of inputs to the matrix kernel. Alternatively, if the width and height of the current block are greater than 16, a matrix kernel with 128 inputs can be used. If the number of samples in the reference region is greater than 128, the samples in the reference region can be downsampled to 128 samples, which is the same as the number of inputs to the matrix kernel.

[0160] Alternatively, for all block sizes to which the alternative MIP method can be applied, the samples in the reference region can be downsampled with the same downsampling ratio. The same downsampling ratio of M can be applied, and M can be an integer greater than 0 or a real number. For example, if M is 2, the downsampling ratio can be 2:1. That is, when the samples in the reference region are downsampled with a downsampling ratio of 2, the number of inputs to the matrix kernel can be half the number of samples in the reference region.

[0161] Alternatively, the downsampling ratio can be adaptively determined based on the size of the current block. For example, if the product of the width and height of the current block is less than or equal to 64, a 2:1 downsampling ratio can be applied. If the product of the width and height of the current block is greater than 64, a 3:1 downsampling ratio can be applied.

[0162] For all block sizes to which the alternative MIP method can be applied, a matrix kernel with the same number of outputs can be used. Through matrix operations, the same number of prediction samples as the number of outputs can be output. If the total number of samples belonging to the current block is greater than the number of outputs, upsampling can be performed based on the output prediction samples to generate a prediction block of the current block. The number of outputs of the matrix kernel can be N, and N can be an integer that is a multiple of 2. For example, if N is 16, the number of prediction samples output through the matrix operation can be 16. In addition, if the total number of samples belonging to the current block is greater than 16, a prediction block of the current block can be generated by applying a horizontal or vertical interpolation filter based on the 16 prediction samples.

[0163] Alternatively, the same downsampling ratio can be applied to all block sizes to which the alternative MIP method can be applied. For this purpose, the number of outputs of the matrix kernel can be adaptively determined based on the size of the current block. That is, when the same upsampling ratio of M is applied, the number of outputs of the matrix kernel can be (the total number of samples belonging to the current block / M). M can be an integer greater than 0 or a real number. For example, when M is 2, the upsampling ratio can be 1:2. The number of prediction samples output through the matrix operation can be half of the total number of samples belonging to the current block. Based on the output prediction samples, upsampling can be performed with an upsampling ratio of 2 to generate a prediction block of the current block.

[0164] Alternatively, the number of outputs of the matrix kernel can be adaptively determined based on the size of the current block. Here, the size can be defined as the width, height, the ratio of the width and height, the product of the width and height, or the maximum / minimum of the width and height.

[0165] For example, if the total number of samples belonging to the current block is less than or equal to X, the output number of the matrix kernel can be (the total number of samples belonging to the current block / N). On the other hand, if the total number of samples belonging to the current block is greater than X, the output number of the matrix kernel can be (the total number of samples belonging to the current block / M). Through matrix operation, the same number of prediction samples as the output number can be output, and upsampling can be performed based on the output prediction samples to generate the prediction block of the current block.

[0166] Alternatively, if the total number of samples belonging to the current block is less than or equal to X, the number of outputs of the matrix kernel may be N, otherwise, the number of outputs of the matrix kernel may be M. N and M may be different integers.

[0167] The downsampling and upsampling methods used in the present disclosure are not limited to a specific method, and it goes without saying that conventional methods can be applied. In the present disclosure, downsampling or upsampling can be used to adjust the number of inputs and / or outputs of the matrix kernel, but is not limited thereto. For example, instead of downsampling the samples of the reference region to the same number as the number of inputs of the matrix kernel, samples at specific locations within the reference region can be selected as many as the number of inputs, and the selected samples can be input to the matrix kernel. For example, when the samples of the reference region are arranged in one dimension to form a reference sample array, samples from the first to the Nth (N corresponds to the number of inputs) can be selected. Alternatively, samples at locations spaced apart at regular intervals in the reference sample array can also be selected.

[0168] The final prediction block of the current block may be generated through a weighted sum of a prediction block (hereinafter referred to as a first prediction block) generated through the aforementioned method or an alternative MIP method and a prediction block (hereinafter referred to as a second prediction block) generated based on an intra prediction mode derived for the current block. The intra prediction mode derived for the current block may correspond to the intra prediction mode derived in S400 described above.

[0169] When the derived intra prediction mode is a directional mode, weighted sum with the second prediction block may be applied, and when the derived intra prediction mode is a non-directional mode (e.g., at least one of a planar mode or a DC mode), weighted sum with the second prediction block may not be applied. Alternatively, when the derived intra prediction mode is a directional mode, weighted sum with the second prediction block may not be applied, and when the derived intra prediction mode is a non-directional mode, weighted sum with the second prediction block may be applied. Alternatively, weighted sum with the second prediction block may be applied regardless of whether the derived intra prediction mode is a directional mode.

[0170] For example, if the intra prediction mode for the 4x4 current block is derived as mode 6, a first prediction block can be generated by performing MIP based on the matrix kernel corresponding to mode 6. Additionally, a second prediction block can be generated by performing intra prediction based on mode 6. A final prediction block can be generated based on a weighted sum of the first and second prediction blocks for the current block.

[0171] The weighted sum of the first and second prediction blocks can be defined as in the following mathematical expression 1.

[0172]

[0173] In mathematical expression 1, pred denotes a final prediction block, pred_mip_N denotes a first prediction block generated through an alternative MIP method based on the Nth mode, and pred_directional_N denotes a second prediction block generated through intra prediction based on the Nth mode. w0 denotes a weight applied to the first prediction block, and w1 denotes a weight applied to the second prediction block. By applying w0 and w1 to prediction samples at the same location within the first and second prediction blocks, the final prediction sample at the corresponding location can be generated.

[0174] The above weights may be fixed values ​​that are identically pre-defined for the encoding device and the decoding device. For example, the ratio of w0 and w1 may be 1:1. Alternatively, the ratio of w0 and w1 may be 3:1 or 1:3. Alternatively, the weights may be variably determined based on encoding information of the current block, which encoding information is as described above. Alternatively, as described in Embodiment 2, a gradient value may be calculated for an intra prediction mode by applying a predetermined filter to a surrounding area of ​​the current block, and the weights may be variably determined based on the gradient value of the intra prediction mode. Alternatively, as described in Embodiment 3, a cost may be calculated for an intra prediction mode, and the weights may be variably derived based on the cost of the intra prediction mode.

[0175] Intra-prediction fusion can be adaptively applied to the current block based on whether an alternative MIP method is applicable to the current block. For example, if an alternative MIP method is applicable to the current block, intra-prediction fusion may not be applied to the current block. Otherwise, intra-prediction fusion may be applied to the current block.

[0176] When the alternative MIP method is applicable to the current block, it may mean that the intra prediction mode of the current block corresponds to a mode to which the alternative MIP method is applicable. The modes to which the alternative MIP method is applicable are as discussed above. Alternatively, when the alternative MIP method is applicable to the current block, it may mean that the current block is a block to which the alternative MIP method can be applied. A block to which the alternative MIP method can be applied means a block having a size smaller than or equal to a predetermined threshold size, as discussed above. Alternatively, when the alternative MIP method is applicable to the current block, it may be understood as a case in which the alternative MIP method is applied to the current block.

[0177] When intra prediction fusion according to the present disclosure is applied, a plurality of prediction blocks may be generated based on a pre-derived intra prediction mode for a current block, and a final prediction block of the current block may be generated based on a weighted sum of the plurality of prediction blocks. Here, the plurality of prediction blocks may be each generated based on different reference sample lines. For example, a first prediction block may be generated based on an adjacent reference sample line of the current block, and a second prediction block may be generated based on a non-adjacent reference sample line of the current block. The final prediction block may be generated based on a weighted sum of the generated first and second prediction blocks.

[0178] The intra prediction mode of the current block may be derived based on the DIMD method. In this case, the application of the alternative MIP method to the current block may be restricted.

[0179] For example, if the intra prediction mode of the current block is derived based on the DIMD method, intra prediction can be performed based on the intra prediction mode to generate a prediction block of the current block.

[0180] Alternatively, if the intra prediction mode of the current block is derived based on the DIMD method, the prediction block of the current block can be generated based on whether the intra prediction mode corresponds to a mode to which the alternative MIP method is applicable.

[0181] For example, if the intra prediction mode of the current block corresponds to a mode to which the alternative MIP method is applicable, MIP may not be performed based on the matrix kernel corresponding to the intra prediction mode to generate a prediction block of the current block. Instead, intra prediction may be performed based on a predefined default mode (e.g., planar mode or DC mode) to generate a prediction block of the current block. On the other hand, if the intra prediction mode of the current block does not correspond to a mode to which the alternative MIP method is applicable, intra prediction may be performed based on the intra prediction mode to generate a prediction block of the current block. Alternatively, if the intra prediction mode of the current block corresponds to a mode to which the alternative MIP method is applicable, intra prediction may be performed based on a neighboring mode of the intra prediction mode to generate a prediction block of the current block. Here, the neighboring mode may be derived by adding or subtracting a predetermined offset (e.g., 1 or 2) to the intra prediction mode derived based on the DIMD method. On the other hand, if the intra prediction mode of the current block does not correspond to a mode to which the alternative MIP method is applicable, the prediction block of the current block can be generated by performing intra prediction based on the intra prediction mode.

[0182] Alternatively, an alternative MIP method may be allowed for the current block even if the intra prediction mode of the current block is derived based on the DIMD method.

[0183] For example, if the intra prediction mode derived based on the DIMD method corresponds to a mode to which the alternative MIP method can be applied, a matrix kernel corresponding to the intra prediction mode derived based on the DIMD method can be selected, and MIP can be performed based on the selected matrix kernel to generate a prediction block of the current block. On the other hand, if the intra prediction mode derived based on the DIMD method does not correspond to a mode to which the alternative MIP method can be applied, intra prediction can be performed based on the corresponding intra prediction mode to generate a prediction block of the current block.

[0184] The present disclosure proposes a method for applying a position-dependent prediction combination (PDPC) to a current block to which an alternative MIP method has been applied. The PDPC according to the present disclosure can be applied to at least one of the prediction block of the current block, the first and / or second prediction blocks, or the final prediction block.

[0185] For example, if the predicted block of the current block is generated using the alternative MIP method described above, PDPC may not be applied to the current block.

[0186] Alternatively, if the prediction block of the current block is generated through the alternative MIP method described above, the current block may be subjected to a PDPC corresponding to the planar mode or the DC mode.

[0187] For example, a prediction sample of a current block may be corrected based on a weighted sum with at least two reference samples. Here, the reference samples may include at least one of a first reference sample located on the same horizontal line as the prediction sample or a second reference sample located on the same vertical line as the prediction sample, which are surrounding samples of the current block. A weight for the weighted sum may be derived based on at least one of a position of the prediction sample or a size of the current block. A first weight applied to the first reference sample may be derived based on at least one of a distance from a left boundary of the current block to the prediction sample (or an x-coordinate of the prediction sample) or a size of the current block. A second weight applied to the second reference sample may be derived based on at least one of a distance from a top boundary of the current block to the prediction sample (or a y-coordinate of the prediction sample) or a size of the current block. A third weight applied to the prediction sample may be derived based on the first and second weights.

[0188] Alternatively, if the prediction block of the current block is generated via the alternative MIP method described above, a PDPC corresponding to the intra prediction mode (or MIP mode) derived for the current block may be applied.

[0189] For example, if the derived intra prediction mode is a planar mode or a DC mode, the prediction sample of the current block can be corrected using the method described above.

[0190] When the derived intra prediction mode is a horizontal mode, the prediction sample of the current block can be corrected based on a weighted sum with at least one reference sample. Here, the reference sample can be derived based on at least one of an upper peripheral sample located on the same vertical line as the prediction sample or an upper left peripheral sample adjacent to the current block. A weight for the weighted sum can be derived based on at least one of a position of the prediction sample or a size of the current block. A first weight applied to the reference sample can be derived based on at least one of a distance from an upper boundary of the current block to the prediction sample (or a y-coordinate of the prediction sample) or a size of the current block. A second weight applied to the prediction sample can be derived based on the first weight.

[0191] When the derived intra prediction mode is a vertical mode, the prediction sample of the current block can be corrected based on a weighted sum with at least one reference sample. Here, the reference sample can be derived based on at least one of a left peripheral sample located on the same horizontal line as the prediction sample or a left upper peripheral sample adjacent to the current block. A weight for the weighted sum can be derived based on at least one of a position of the prediction sample or a size of the current block. A first weight applied to the reference sample can be derived based on at least one of a distance from a left border of the current block to the prediction sample (or an x-coordinate of the prediction sample) or a size of the current block. A second weight applied to the prediction sample can be derived based on the first weight.

[0192] If the derived intra prediction mode corresponds to a directional mode (excluding vertical and horizontal modes), the prediction sample of the current block can be corrected based on a weighted sum with at least one reference sample. Here, the reference sample may be a peripheral sample of the current block, which may be a sample located in the reverse direction of the prediction direction according to the directional mode. A weight for the weighted sum may be derived based on at least one of a position of the prediction sample or a size of the current block. If the reference sample is a left peripheral sample of the current block, a first weight applied to the reference sample may be derived based on at least one of a distance from a left boundary of the current block to the prediction sample (or an x-coordinate of the prediction sample), a height of the current block, or an angle of the directional mode. A second weight applied to the prediction sample may be derived based on the first weight. If the above reference sample is a sample around the top of the current block, the first weight applied to the reference sample may be derived based on at least one of the distance from the top boundary of the current block to the prediction sample (or the y-coordinate of the prediction sample), the width of the current block, or the angle of the directional mode. The second weight applied to the prediction sample may be derived based on the first weight.

[0193] Referring to Fig. 4, a residual block of the current block can be generated (S420).

[0194] Residual information of the current block can be obtained from a bitstream. Transform coefficients can be derived based on the residual information. A residual block of the current block can be generated based on a non-separable transform of the transform coefficients. The non-separable transform can represent a low frequency non-separable transform (LFNST) and / or a non-separable primary transform (NSPT).

[0195] The transformation kernel for the above non-separable transformation can be determined based on the intra prediction mode of the current block.

[0196] For example, a table defining a mapping relationship between an intra prediction mode and a transformation set may be defined in an encoding device and a decoding device. Each transformation set may include one or more transformation kernels. Based on the table, a transformation set mapped to an intra prediction mode of a current block may be specified. Any one of the one or more transformation kernels belonging to the specified transformation set may be set as a transformation kernel for the non-separable transformation.

[0197] When an alternative MIP method is applied to the current block, the pre-derived intra prediction mode for the current block may be replaced with a planar mode (or mode 0), and then a transformation set corresponding to the planar mode may be selected. One or more transformation kernels belonging to the selected transformation set may be set as a transformation kernel for a non-separable transformation of the current block.

[0198] Alternatively, if an alternative MIP method is applied to the current block, the pre-derived intra prediction mode for the current block may be replaced with the DC mode (or mode 1), and then a transform set corresponding to the DC mode may be selected. Any one or more transform kernels belonging to the selected transform set may be set as a transform kernel for the non-separable transform of the current block.

[0199] Alternatively, if an alternative MIP method is applied to the current block, a transform set corresponding to the derived intra prediction mode or MIP mode for the current block can be selected. Any one or more transform kernels belonging to the selected transform set can be set as a transform kernel for the non-separable transform of the current block.

[0200] Alternatively, if an alternative MIP method is applied to the current block, a VIPM can be derived for the current block. For example, a predetermined filter can be applied to a prediction block (or a surrounding area) of the current block to calculate horizontal and / or vertical gradient values ​​for each of the predetermined intra prediction modes. The top N intra prediction modes in descending order of the calculated gradient values ​​can be set as the VIPM of the current block. Alternatively, a cost for each of the predetermined candidate modes can be calculated. In this case, the cost can be calculated based on the difference between the prediction samples and the reconstructed samples of the template of the current block. The prediction samples of the template can be derived based on the candidate modes. The top N candidate modes in ascending order of the calculated costs can be set as the VIPM of the current block. N can be an integer of 1, 2, or a higher number. A transform set corresponding to the VIPM of the current block can be selected. Any one or more transformation kernels belonging to the above selected transformation set can be set as a transformation kernel for non-separable transformation of the current block.

[0201] The residual block of the current block can be generated based on a primary transform and / or a secondary transform for the above transform coefficients. The primary transform may correspond to a non-separable transform or a separable transform, and the secondary transform may correspond to a non-separable transform.

[0202] The transform type for the first transform can be determined based on the encoding information of the current block and / or surrounding blocks described above. The transform kernel for the second transform can be determined based on the encoding information of the current block and / or surrounding blocks. Here, the encoding information can include at least one of whether an alternative MIP method (or a regular MIP method) is applied, width, height, number of samples in a block, position of a sub-block within a block, explicitly signaled syntax elements, or statistical characteristics of samples within a block.

[0203] For example, when an alternative MIP method (or a regular MIP method) is applied to the current block, the transformation type for the first transformation of the current block can be determined based on MTS (multiple transform selection). Here, MTS can be a method of selectively using any one of a plurality of pre-defined transformation types for each of the vertical and horizontal directions. The selection can be performed based on an explicitly signaled MTS index or based on the encoding information described above.

[0204] When the alternative MIP method (or the regular MIP method) is applied to the current block, the transformation kernel for the secondary transformation of the current block can be determined as any one of a plurality of transformation kernels belonging to a predetermined transformation set. In this case, the transformation set can be set as a transformation set mapped to a planar mode.

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

[0206] When applying the aforementioned alternative MIP method to all or part of the sizes of coding blocks that are identically defined in the encoding device and the decoding device, the alternative MIP method may be defined in a way that replaces the existing intra prediction mode, or may be defined as a mode separate from the existing intra prediction mode. If defined as a separate mode, a flag indicating whether the alternative MIP method is applied may be additionally signaled.

[0207] The MIP mode in the regular MIP method and / or the alternative MIP method can be selected based on encoding information of the current block and / or neighboring blocks. The encoding information can include at least one of a prediction mode (e.g., intra mode, inter mode), a width, a height, a number of samples in a block, a position of a sub-block within a block, explicitly signaled syntax elements (e.g., mode information), statistical characteristics of samples within a block, or whether a secondary transform is applied.

[0208] The above mode information can be binarized using an appropriate binarization method. Context modeling can be applied to the bins of the mode information. Considering the total number of MIP modes, the mode information can be binarized using methods such as truncated binary, truncated unary, or fixed-length.

[0209] Whether or not the proposed method according to the present disclosure is applicable or applicable can be signaled in HLS (high-level syntax) such as VPS, SPS, PPS, Picture Header, Slice Header, DCI, etc. For example, in order to determine whether or not the proposed method is applicable or applicable on a PPS basis and to quickly perform an initialization process for a MIP process (e.g., MIP matrix loading and buffer management required for MIP) to increase the efficiency of the codec system, information regarding whether or not the proposed method is applicable or applicable can be signaled on a PPS basis.

[0210] Whether the proposed method according to the present disclosure applies can be determined without signaling additional information to the decoding device. Alternatively, additional information regarding whether the proposed method applies can be signaled. For example, a 1-bit flag indicating whether the proposed method applies can be signaled on a CTU or CU basis.

[0211] The proposed method according to the present disclosure may be used only when the MIP method or the regular MIP method is defined as applicable in HLS. Furthermore, the applicability of the proposed method may be determined through signaling of additional information within the MIP method.

[0212] If the proposed method is determined to be applicable, a 1-bit flag indicating whether the proposed method is applicable may be signaled. Here, the applicability of the proposed method may be determined based on whether a specific block size / shape or specific conditions are met. For example, if the height of the current block is more than four times its width, the proposed method may be determined to be inapplicable to the current block, and accordingly, no additional information indicating whether the proposed method is applicable to the current block may be signaled.

[0213] Whether a proposed method is applied to the current block may be implicitly determined based on whether the current block satisfies certain conditions.

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

[0215] Referring to FIG. 5, the decoding device (300) may include a mode derivation unit (500), a prediction block generation unit (510), a residual block generation unit (520), and a restoration unit (530). The mode derivation unit (500) and the prediction block generation unit (510) may be provided in the intra prediction unit (331) of FIG. 3, and the residual block generation unit (520) may be provided in the residual processing unit (320) of FIG. 3.

[0216] The mode derivation unit (500) can derive the intra prediction mode of the current block. The mode derivation unit (500) can derive the intra prediction mode of the current block based on a candidate list including multiple candidate modes. Alternatively, the mode derivation unit (500) can also derive the intra prediction mode of the current block based on the DIMD method or the TIMD method. These have been described with reference to FIG. 4, and any redundant description thereof will be omitted herein.

[0217] The prediction block generation unit (510) can generate a prediction block of the current block based on the intra prediction mode of the current block, and the method for generating the prediction block is as described with reference to FIG. 4.

[0218] The residual block generation unit (520) can generate a residual block of the current block, and the method for generating the residual block is as described with reference to FIG. 4.

[0219] The restoration unit (530) can restore the current block based on the prediction block and residual block of the current block.

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

[0221] Referring to FIG. 6, the intra prediction mode of the current block can be derived (S600). The intra prediction mode of the current block can be derived based on at least one of the aforementioned embodiments 1 to 3, and any redundant descriptions will be omitted herein.

[0222] Referring to FIG. 6, a prediction block of the current block can be generated based on the intra prediction mode of the current block (S610). The method for generating the prediction block of the current block is the same as that described with reference to FIG. 4, and any redundant description will be omitted here.

[0223] Referring to FIG. 6, the transformation coefficients of the current block can be derived based on the residual block of the current block (S620).

[0224] Specifically, a residual block of the current block can be generated based on the prediction block of the current block. Transform coefficients of the current block can be derived based on a non-separable transform of the residual block. The non-separable transform can represent a low frequency non-separable transform (LFNST) and / or a non-separable primary transform (NSPT).

[0225] The transformation kernel for the above non-separable transformation can be determined based on the intra prediction mode of the current block. The method for determining the transformation kernel for the current block to which the alternative MIP method is applied is as described with reference to FIG. 4, and any redundant description will be omitted here.

[0226] Transform coefficients can be derived based on the primary transform and / or secondary transform of the residual block of the current block. Here, the primary transform may correspond to a non-separable transform or a separable transform, and the secondary transform may correspond to a non-separable transform. The method for determining the transform type for the primary and secondary transforms is as described with reference to Fig. 4, and a duplicate description will be omitted here.

[0227] Referring to FIG. 6, a bitstream can be generated by encoding residual information regarding the transform coefficients of the current block (S630).

[0228] FIG. 7 illustrates a schematic configuration of an encoding device (200) that performs an encoding method according to the present disclosure.

[0229] Referring to FIG. 7, the encoding device (200) may include a mode derivation unit (700), a prediction block generation unit (710), a transform coefficient derivation unit (720), and a residual information encoding unit (730). The mode derivation unit (700) and the prediction block generation unit (710) may be provided in the intra prediction unit (222) of FIG. 2, the transform coefficient derivation unit (720) may be provided in the residual processing unit (230) of FIG. 2, and the residual information encoding unit (730) may be provided in the entropy encoding unit (240).

[0230] The mode derivation unit (700) can derive the intra prediction mode of the current block. The mode derivation unit (700) can derive the intra prediction mode of the current block based on at least one of the above-described embodiments 1 to 3, and any duplicate descriptions will be omitted here.

[0231] The prediction block generation unit (710) can generate a prediction block of the current block based on the intra prediction mode of the current block. The method for generating the prediction block of the current block is as described with reference to FIG. 4, and any duplicate description will be omitted here.

[0232] The transform coefficient derivation unit (720) can derive transform coefficients of the current block based on the residual block of the current block. Specifically, the transform coefficient derivation unit (720) can derive transform coefficients based on a non-separable transform for the residual block. Alternatively, the transform coefficient derivation unit (720) can also derive transform coefficients based on a primary transform and / or secondary transform for the residual block.

[0233] The residual information encoding unit (730) can encode residual information regarding transform coefficients.

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

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

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

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

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

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

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

[0241] Referring to FIG. 8, a content streaming system to which the embodiment(s) of the present specification are applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

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

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

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

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

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

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

[0248] The claims set forth in this specification may be combined in various ways. For example, the technical features of the method claims of this specification may be combined and implemented as a device, and the technical features of the device claims of this specification may be combined and implemented as a method. Furthermore, the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a device, and the technical features of the method claims and the technical features of the device claims of this specification may be combined and implemented as a method.

Claims

1. A step of deriving an intra prediction mode of the current block; A step of generating a prediction block of the current block based on whether the intra prediction mode is a mode to which an alternative MIP method is applicable; A step of generating a residual block of the current block; and A method comprising the step of restoring the current block based on the predicted block and the residual block.

2. In paragraph 1, The intra prediction mode of the current block is derived based on a candidate list including multiple candidate modes, A method wherein at least one of the plurality of candidate modes is derived based on at least one of whether a neighboring block of the current block is a block to which the alternative MIP method can be applied, whether an intra prediction mode of the neighboring block corresponds to a mode to which the alternative MIP method can be applied, or whether the alternative MIP method is applied to the neighboring block.

3. In paragraph 1, A method in which the intra prediction mode of the current block is derived based on either the DIMD method or the TIMD method.

4. In paragraph 3, When the intra prediction mode of the current block is derived based on the TIMD method, the intra prediction mode is derived based on the cost for each of the candidate modes, The above cost is calculated based on the difference between the predicted samples of the template and the restored samples, A method wherein the prediction samples of the template corresponding to the candidate mode to which the alternative MIP method is applicable are derived by the alternative MIP method.

5. In paragraph 1, A method in which, when the intra prediction mode is a mode to which the alternative MIP method is applicable, the prediction block is generated based on a predetermined reference region and matrix kernel.

6. In paragraph 5, The step of generating the above prediction block is: A step of performing downsampling on the above reference area; A step of applying the matrix kernel to samples of the downsampled reference area to derive prediction samples; and A method comprising the step of performing upsampling based on the above prediction samples.

7. In paragraph 5, The number of reference sample lines belonging to the above reference area is different based on the size of the current block.

8. In paragraph 5, The length of the reference sample line belonging to the above reference area is different based on the size of the current block.

9. In paragraph 5, A method in which reference sample filtering is performed on at least one reference sample line belonging to the reference area based on whether the current block satisfies a predetermined condition.

10. In paragraph 6, A method wherein the downsampling ratio for the reference area, the number of inputs to the matrix kernel, or the number of outputs of the matrix kernel are determined based on the size of the current block.

11. In paragraph 1, If the intra prediction mode is a mode to which the alternative MIP method is applicable, the prediction block is generated based on a weighted sum of a first prediction block and a second prediction block for the current block, A method wherein the first prediction block is generated based on the alternative MIP method, and the second prediction block is generated based on the intra prediction mode.

12. In paragraph 1, The residual block of the current block is generated based on a non-separable transformation of the transform coefficients of the current block, A method in which, when the alternative MIP method is applied to the current block, the transformation kernel for the non-separable transformation is determined based on the intra prediction mode or non-directional mode of the current block.

13. A step of deriving an intra prediction mode of the current block; A step of generating a prediction block of the current block based on whether the intra prediction mode is a mode to which an alternative MIP method is applicable; A step of deriving transform coefficients of the current block based on a residual block of the current block; and A method comprising the step of encoding residual information regarding the above transformation 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 the steps of: deriving an intra prediction mode of a current block; generating a prediction block of the current block based on whether the intra prediction mode is a mode to which an alternative MIP method is applicable; deriving transform coefficients of the current block based on a residual block of the current block; and encoding residual information about the transform coefficients. A method comprising the step of transmitting data including the bitstream.

Citation Information

Patent Citations

  • Electronic device including opening and closing member

    KR1020230061014A

  • Strap dumbbells

    KR1020230170860A

  • Method, apparatus, system and computer program for providing online service capable of selecting real name authentication in registration process

    KR1020250071687A

  • KR20230169959A