Method, computer-readable storage medium and transmission method
By sorting the MPM candidate list based on a histogram of neighboring blocks' intra prediction modes, the method addresses inefficiencies in encoding and decoding high-resolution images, enhancing coding efficiency through improved prediction mode accuracy.
Patent Information
- Application Number
- PCT/KR2025/008929
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-06-26
- Filing Date
- 2025-06-26
- Publication Date
- 2026-01-02
AI Technical Summary
Existing image compression technologies struggle to efficiently encode and decode high-resolution, high-quality images, particularly in constructing accurate prediction mode lists for intra prediction, leading to suboptimal coding efficiency.
The method involves constructing a Most Probable Mode (MPM) candidate list for a current block by sorting based on a histogram of intra prediction modes applied to neighboring blocks, improving the accuracy of the list for encoding and decoding still or moving images.
This approach enhances coding efficiency by utilizing surrounding information to create a more accurate MPM list, thereby improving the encoding and decoding processes for high-resolution, high-quality images.
Smart Images

Figure KR2025008929_02012026_PF_FP_ABST
Abstract
Description
Method, computer-readable storage medium and transmission method
[0001] The present disclosure relates to a method for encoding / decoding image information, a computer-readable storage medium for storing a bitstream, and a method for transmitting the 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 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 coding technology that assigns short codes to values with high frequency of appearance and long codes to values with low frequency of appearance, and these video compression technologies can be used to effectively compress and transmit or store video data.
[0004] Accordingly, a highly efficient image compression technology is required to effectively transmit, store, and play high-resolution, high-quality image information.
[0005] The present disclosure provides a method for improving coding efficiency by constructing a more accurate list by utilizing peripheral information when constructing an MPM list to perform on-screen encoding / decoding for still images or moving images, a computer-readable recording medium storing a bitstream, and a transmission method.
[0006] According to one embodiment, a method includes the steps of: obtaining prediction mode information from a bitstream; constructing a Most Probable Mode (MPM) candidate list for a current block; deriving an intra prediction mode for the current block based on at least one of the MPM list or the prediction mode information; and generating a reconstructed block for the current block based on the derived intra prediction mode; wherein the step of constructing the MPM list includes sorting the MPM list based on a histogram for intra prediction modes applied to neighboring blocks of the current block.
[0007] According to one embodiment, a method includes the steps of: constructing a Most Probable Mode (MPM) candidate list for a current block; determining an intra prediction mode for the current block; generating residual information for the current block based on the determined intra prediction mode; and encoding prediction mode information including information about the intra prediction mode and image information including the residual information; wherein the step of constructing the MPM list includes sorting the MPM list based on a histogram for intra prediction modes applied to neighboring blocks of the current block.
[0008] A computer-readable storage medium storing a bitstream generated by an encoding method according to one embodiment, the encoding method comprising: a step of constructing a Most Probable Mode (MPM) candidate list for a current block; a step of determining an intra prediction mode for the current block; a step of generating residual information for the current block based on the determined intra prediction mode; and a step of encoding prediction mode information including information about the intra prediction mode and image information including the residual information; wherein the step of constructing the MPM list includes sorting the MPM list based on a histogram for intra prediction modes applied to blocks adjacent to the current block.
[0009] A method for transmitting data for an image according to one embodiment comprises: generating a bitstream for the image, the bitstream comprising: a step of constructing a Most Probable Mode (MPM) candidate list for a current block; a step of determining an intra prediction mode for the current block; a step of generating residual information for the current block based on the determined intra prediction mode; and a step of encoding prediction mode information including information about the intra prediction mode and image information including the residual information; and a step of transmitting the data including the bitstream; wherein the step of constructing the MPM list includes sorting the MPM list based on a histogram for intra prediction modes applied to neighboring blocks of the current block.
[0010] According to the disclosed embodiment, when constructing an MPM list to perform in-screen encoding / decoding for still images or moving images, coding efficiency can be improved by constructing a more accurate list by utilizing surrounding information.
[0011] The effects that can be obtained from the present disclosure are not limited to the effects mentioned above, and other effects that are not mentioned will be clearly understood by a person having ordinary skill in the art to which the present disclosure pertains from the description below.
[0012] FIG. 1 illustrates a video / image coding system according to one embodiment.
[0013] FIG. 2 is a schematic block diagram of an encoding device to which the disclosed embodiment can be applied and in which encoding of a video / image signal is performed.
[0014] FIG. 3 is a schematic block diagram of a decoding device to which the disclosed embodiment can be applied and in which decoding of a video / image signal is performed.
[0015] FIG. 4 illustrates an example of a video / image decoding method to which the disclosed embodiment can be applied.
[0016] FIG. 5 illustrates an example of a video / image encoding method to which the disclosed embodiment can be applied.
[0017] Figure 6 illustrates an example hierarchical structure for a coded image according to one embodiment.
[0018] FIG. 7 is a flowchart illustrating a method of encoding an image based on intra prediction in an encoding method according to one embodiment.
[0019] Fig. 8 is a drawing showing the configuration of an encoding device used to perform the method of Fig. 7.
[0020] FIG. 9 is a flowchart illustrating a method of decoding an image based on intra prediction in a decoding method according to one embodiment.
[0021] Fig. 10 is a diagram showing the configuration of a decoding device used to perform the method of Fig. 9.
[0022] FIG. 11 is a flowchart illustrating an example of a method for signaling information about an intra prediction mode in an encoding method according to one embodiment.
[0023] FIG. 12 is a flowchart illustrating an example of a method for deriving an intra prediction mode in a decoding method according to one embodiment.
[0024] FIG. 13 is a flowchart illustrating in more detail an example of a method for deriving an intra prediction mode in a decoding method according to one embodiment.
[0025] Figure 14 is a schematic diagram illustrating a matrix-based intra prediction (MIP) process.
[0026] Figure 15 is a drawing showing a configuration method of HoG used in DIMD mode.
[0027] Fig. 16 is a flowchart illustrating an example of a decoding method according to one embodiment.
[0028] FIG. 17 is a diagram showing an example of the order of surrounding intra prediction modes considered when constructing an MPM list in a decoding method according to one embodiment.
[0029] Figure 18 is a diagram showing an example of the locations of adjacent blocks considered when constructing an MPM list.
[0030] Figure 19 is a diagram showing a template area used for intra mode derivation when DIMD is applied to adjacent blocks.
[0031] FIG. 20 is a diagram showing an example of the configuration order of a changed MPM list according to one embodiment.
[0032] Figure 21 is a flowchart illustrating an example of an encoding method according to one embodiment.
[0033] FIG. 22 is a flowchart of another example of a decoding method according to one embodiment.
[0034] Fig. 23 is a flowchart showing an example of a process for constructing an MPM list in a decoding method according to one embodiment.
[0035] Figure 24 is a diagram showing examples of cases that may occur when applying template-based sorting when constructing an MPM list.
[0036] Fig. 25 is a flowchart illustrating another example of an encoding method according to one embodiment.
[0037] FIG. 26 is a flowchart illustrating another example of a decoding method according to one embodiment.
[0038] Figure 27 is a diagram showing an example of the correlation between the current block and the surrounding blocks.
[0039] Figure 28 is a diagram showing an example of a histogram constructed by collecting intra mode information of surrounding blocks.
[0040] Figure 29 is a diagram showing an example of the correlation between the current block and surrounding blocks, and is a diagram showing an example of a case where the sizes of the surrounding blocks are different.
[0041] FIG. 30 is a diagram showing an example of a range of surrounding blocks set for histogram configuration in a decoding method according to one embodiment.
[0042] FIG. 31 is a flowchart illustrating another example of an encoding method according to one embodiment.
[0043] FIG. 32 is a diagram illustrating an example of a content streaming system to which the disclosed embodiment can be applied.
[0044] 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.
[0045] 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.
[0046] 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.
[0047] 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.
[0048] The flowchart described in this disclosure merely illustrates operations in order for convenience of explanation, and the embodiments are not limited to the order shown in the flowchart. The disclosed operations may be performed in a different order than that shown in the flowchart, and some operations may be performed simultaneously.
[0049] 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).
[0050] This specification presents various embodiments of video / image coding, and unless otherwise stated, the embodiments may be performed in combination with each other.
[0051] In this specification, 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.
[0052] 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.
[0053] 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.
[0054] In this specification, “A or B” can mean “only A,” “only B,” or “both A and B.” In other words, “A or B” in this specification can be interpreted as “A and / or B.” For example, “A, B or C” in this specification can mean “only A,” “only B,” “only C,” or “any combination of A, B, and C.”
[0055] 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."
[0056] 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.”
[0057] 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.”
[0058] 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."
[0059] Technical features individually described in a single drawing in this specification may be implemented individually or simultaneously.
[0060] FIG. 1 illustrates a video / image coding system according to one embodiment.
[0061] Referring to FIG. 1, a video / image coding system may include a first device (source device) and a second device (receiving device).
[0062] 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.
[0063] 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.
[0064] 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.
[0065] 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 a 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 storage medium can be a computer-readable storage medium. 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.
[0066] 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.
[0067] The renderer can render decoded video / images. The rendered video / images can be displayed through the display unit.
[0068] FIG. 2 is a schematic block diagram of an encoding device to which the disclosed embodiment can be applied and in which encoding of a video / image signal is performed.
[0069] 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.
[0070] 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 (PUs). For example, the processing units may be called coding units (CUs). In this case, the coding units 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.
[0071] 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.
[0072] 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.
[0073] 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 a pixel / pixel value of a luminance component or only a pixel / pixel value of a chrominance component. A sample can be used as a term corresponding to a pixel or pel of a picture (or image).
[0074] 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).
[0075] 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.
[0076] The intra prediction unit (222) can predict the current block by referring to samples within the current picture. The referenced samples, i.e., the reference 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 the DC mode or the 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 merely 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.
[0077] 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, sub-blocks, 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 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. Temporal neighboring blocks may be called collocated reference blocks, collocated CUs (colCUs), etc., and reference pictures including 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 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 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.
[0078] 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 to predict 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 perform an intra block copy (IBC) prediction mode to predict a block. The IBC prediction 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 use at least one of the inter prediction techniques described herein. The prediction signal generated through the prediction unit (220) can be used to generate a restored signal or a residual signal.
[0079] 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.
[0080] 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.
[0081] The entropy encoding unit (240) can perform various encoding methods, such as, for example, 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.
[0082] 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. For example, the storage medium may be a medium that stores the bitstream non-statutory.
[0083] A transmission unit (not shown) for transmitting a signal output from an entropy encoding unit (240) and / or a storage unit (not shown) for storing the signal may be configured as an internal / external element of the encoding device (200), or the transmission unit may be included in the entropy encoding unit (240).
[0084] 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.
[0085] 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 may include deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (260) can generate various information regarding filtering and transmit the information to the entropy encoding unit (240). The information regarding filtering may be encoded by the entropy encoding unit (240) and output in the form of a bitstream.
[0086] 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.
[0087] The DPB of the memory (270) can store the modified restored picture to be used as a reference picture in the inter prediction unit (221). The memory (270) can store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of blocks in 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 in the current picture and transfer them to the intra prediction unit (222).
[0088] Image information output in the form of a bitstream from the encoding device (200) can be transmitted to the decoding device (300) through the transmission unit.
[0089] FIG. 3 is a schematic block diagram of a decoding device to which the disclosed embodiment can be applied and in which decoding of a video / image signal is performed.
[0090] Image information transmitted in the form of a bitstream from the encoding device (200) can be received by the decoding device (300).
[0091] 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).
[0092] 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.
[0093] 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 by the decoding device (300) can be reproduced through a reproduction device.
[0094] 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 and obtained from the bitstream through the decoding procedure. 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).
[0095] 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).
[0096] 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.
[0097] In the inverse transform unit (322), the transform coefficients are inversely transformed to obtain a residual signal (residual block, residual sample array).
[0098] 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.
[0099] 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. The 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 signaled and included in the video / image information.
[0100] 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.
[0101] 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, sub-blocks, 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.
[0102] 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.
[0103] 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.
[0104] 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.
[0105] The (modified) reconstructed picture stored in the DPB of the memory (360) can be used as a reference picture in the inter prediction unit (332). The memory (360) can store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of blocks in an already reconstructed picture. The stored motion information can be transmitted 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 transmit them to the intra prediction unit (331).
[0106] 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.
[0107] FIG. 4 illustrates an example of a video / image decoding method to which the disclosed embodiment can be applied.
[0108] In image / video coding, the pictures that make up an image / video can be encoded / decoded according to a series of decoding orders. The picture order corresponding to the output order of the decoded pictures can be set differently from the decoding order, and based on this, not only forward prediction but also backward prediction can be performed during inter prediction.
[0109] In FIG. 4, S400 may be performed in the entropy decoding unit (310) of the aforementioned decoding device (300), S410 may be performed in the prediction unit (330), S420 may be performed in the residual processing unit (320), S430 may be performed in the addition unit (340), and S440 may be performed in the filtering unit (350). S400 may include a decoding procedure according to the present disclosure, S410 may include an inter / intra prediction procedure according to the present disclosure, S420 may include a residual processing procedure according to the present disclosure, S430 may include a block / picture restoration procedure according to the present disclosure, and S440 may include an in-loop filtering procedure according to the present disclosure.
[0110] Referring to FIG. 4, the decoding device obtains image / video information from a bitstream (S400), performs prediction based on the obtained image / video information (S410), and restores a picture through residual processing (S420), inverse quantization for quantized transform coefficients, and inverse transformation (S430).
[0111] A modified restored picture can be generated by applying an in-loop filtering procedure (S440) to a restored picture generated through the above restoration procedure, and the modified restored picture can be output as a decoded picture and can be stored in a buffer or memory of a decoding device to be used as a reference picture in an inter prediction procedure when decoding a next picture. In some cases, the in-loop filtering procedure can be omitted, in which case the restored picture can be output as a decoded picture and can be stored in a buffer or memory of a decoding device to be used as a reference picture in an inter prediction procedure when decoding a next picture.
[0112] The in-loop filtering procedure (S440) may include a deblocking filtering procedure, a sample adaptive offset (SAO) procedure, an adaptive loop filter (ALF) procedure, and / or a bi-lateral filter procedure, and some or all of them may be omitted. In addition, one or some of the deblocking filtering procedure, the sample adaptive offset (SAO) procedure, the adaptive loop filter (ALF) procedure, and the bi-lateral filter procedure may be sequentially applied, or all of them may be sequentially applied. For example, the SAO procedure may be performed after the deblocking filtering procedure is applied to the restored picture. Or, for example, the ALF procedure may be performed after the deblocking filtering procedure is applied to the restored picture. This may also be performed in an encoding device.
[0113] FIG. 5 illustrates an example of a video / image encoding method to which the disclosed embodiment can be applied.
[0114] In FIG. 5, the prediction step (S500) may be performed in the prediction unit (220) of the encoding device (200) described above, residual processing (S510) based on the prediction result may be performed in the residual processing unit (230), and the step (S520) of encoding image information including prediction information and residual information may be performed in the entropy encoding unit (240). S500 may include an inter / intra prediction procedure according to the present disclosure, S510 may include a residual processing procedure according to the present disclosure, and S520 may include an encoding procedure according to the present disclosure.
[0115] The encoding procedure may optionally include a procedure for encoding information for picture restoration (e.g., prediction information, residual information, partitioning information, etc.) and outputting it in the form of a bitstream, as well as a procedure for generating a restored picture for the current picture and a procedure for applying in-loop filtering to the restored picture.
[0116] The encoding device (200) can derive (corrected) residual samples from the quantized transform coefficients through the inverse quantization unit (234) and the inverse transformation unit (235), and can generate a restored picture based on the prediction samples and (corrected) residual samples, which are outputs of S500. The restored picture generated in this way can be the same as the restored picture generated by the decoding device (300) described above. A modified restored picture can be generated through an in-loop filtering procedure for the restored picture, which can be stored in a buffer or memory, and, as in the case of the decoding device, can be used as a reference picture in the inter prediction procedure when encoding a subsequent picture.
[0117] As described above, some or all of the in-loop filtering procedure may be omitted in some cases. When the in-loop filtering procedure is performed, (in-loop) filtering-related information (parameters) may be encoded by the entropy encoding unit (240) and output in the form of a bitstream, and the decoding device (300) may perform the in-loop filtering procedure in the same manner as the encoding device based on the filtering-related information.
[0118] Through this in-loop filtering procedure, noise occurring during image / video coding, such as blocking artifacts and ringing artifacts, can be reduced, and subjective / objective image quality can be improved. In addition, by performing the in-loop filtering procedure in both the encoding device (200) and the decoding device (300), the same prediction results can be derived from the encoding device (200) and the decoding device (300), thereby increasing the reliability of picture coding and reducing the amount of data that must be transmitted for picture coding.
[0119] As described above, the picture restoration procedure can be performed not only in the decoding device (300) but also in the encoding device (200). A restoration block can be generated based on intra-prediction / inter-prediction for each block, and a restoration picture including the restoration blocks can be generated. If the current picture / slice / tile group is an I picture / slice / tile group, the blocks included in the current picture / slice / tile group can be restored based only on intra-prediction. On the other hand, if the current picture / slice / tile group is a P or B picture / slice / tile group, the blocks included in the current picture / slice / tile group can be restored based on intra-prediction or inter-prediction. In this case, inter-prediction may be applied to some blocks in the current picture / slice / tile group, and intra-prediction may be applied to some remaining blocks.
[0120] The color component of a picture may include a luma component and a chroma component, and embodiments according to the present disclosure may be applied to the luma component and the chroma component unless explicitly limited in the present disclosure.
[0121] Figure 6 illustrates an example hierarchical structure for a coded image according to one embodiment.
[0122] Referring to Figure 6, the coded image is divided into a Video Coding Layer (VCL) that handles the decoding processing of the image and the image itself, a subsystem that transmits and stores the coded information, and a Network Abstraction Layer (NAL) that exists between the VCL and the subsystem and is responsible for network adaptation functions.
[0123] In VCL, VCL data containing compressed image data (slice data) can be generated, or a parameter set containing information such as a picture parameter set (PPS), a sequence parameter set (SPS), a video parameter set (VPS), etc., or an SEI (Supplemental Enhancement Information) message additionally required for the image decoding process can be generated.
[0124] In NAL, a NAL unit can be created by adding header information (NAL unit header) to an RBSP (Raw Byte Sequence Payload) generated from a VCL. At this time, RBSP refers to slice data, parameter sets, SEI messages, etc. generated from a VCL. The NAL unit header can include NAL unit type information that is specific to the RBSP data included in the NAL unit.
[0125] As illustrated in Fig. 6, NAL units can be divided into VCL NAL units and non-VCL NAL units according to the RBSP generated from VCL. A VCL NAL unit can refer to a NAL unit that contains information about a video (slice data), and a non-VCL NAL unit can refer to a NAL unit that contains information necessary for decoding a video (parameter set or SEI message).
[0126] The above-described VCL NAL units and non-VCL NAL units can be transmitted over a network by attaching header information according to the data specifications of the lower system. For example, NAL units can be transformed into data formats of a certain standard, such as the H.266 / VVC file format, RTP (Real-time Transport Protocol), TS (Transport Stream), etc., and transmitted over various networks.
[0127] As described above, a NAL unit can be specified as a NAL unit type according to the RBSP data structure included in the NAL unit, and information about the NAL unit type can be stored and signaled in the NAL unit header.
[0128] For example, depending on whether a NAL unit contains information about a picture (slice data), it can be broadly classified into VCL NAL unit types and Non-VCL NAL unit types. The VCL NAL unit type can be classified according to the nature and type of the picture contained in the VCL NAL unit, and the Non-VCL NAL unit type can be classified according to the type of parameter set, etc.
[0129] Below are examples of NAL unit types, specified by the type of parameter set included in the Non-VCL NAL unit type.
[0130] - APS (Adaptation Parameter Set) NAL unit: Type for NAL units containing APS
[0131] - DPS (Decoding Parameter Set) NAL unit: Type for NAL unit containing DPS
[0132] - VPS (Video Parameter Set) NAL unit: Type for NAL units containing VPS
[0133] - SPS (Sequence Parameter Set) NAL unit: Type for NAL units containing SPS
[0134] - PPS (Picture Parameter Set) NAL unit: Type for NAL units containing PPS
[0135] The above-described NAL unit types have syntax information for the NAL unit type, and the syntax information can be stored and signaled in the NAL unit header. For example, the syntax information can be nal_unit_type, and NAL unit types can be specified by the nal_unit_type value.
[0136] The slice header (slice header syntax, slice header information) may include information / parameters that are commonly applicable to the slices. The APS (APS syntax) or PPS (PPS syntax) may include information / parameters that are commonly applicable to one or more slices or pictures. The SPS (SPS syntax) may include information / parameters that are commonly applicable to one or more sequences. The VPS (VPS syntax) may include information / parameters that are commonly applicable to multiple layers. The DPS (DPS syntax) may include information / parameters that are commonly applicable to the entire video. The DPS may include information / parameters related to the concatenation of CVS (coded video sequence). In the present disclosure, the High Level Syntax (HLS) may include at least one of the APS syntax, PPS syntax, SPS syntax, VPS syntax, DPS syntax, or slice header syntax.
[0137] In the present disclosure, image / video information encoded in an image encoding device and signaled in the form of a bitstream may include information related to partitioning within a picture, intra / inter prediction information, residual information, in-loop filtering information, etc., and may also include information included in the slice header, information included in the APS, information included in the PPS, information included in the SPS, information included in the VPS, and / or information included in the DPS.
[0138] Meanwhile, the prediction unit (220, 330) of the encoding device (200) / decoding device (300) can derive a reference sample according to the intra prediction mode of the current block among the surrounding samples of the current block, and can generate a prediction sample of the current block based on the reference sample. Intra prediction can refer to a prediction that generates prediction samples for the current block based on reference samples in a picture to which the current block belongs (hereinafter, the current picture). When intra prediction is applied to the current block, surrounding reference samples to be used for intra prediction of the current block can be derived. The surrounding reference samples of the current block can include a sample adjacent to the left boundary of the current block of a size nWxnH and a total of 2xnH samples adjacent to the bottom-left, a sample adjacent to the top boundary of the current block and a total of 2xnW samples adjacent to the top-right, and one sample adjacent to the top-left of the current block. Alternatively, the peripheral reference samples of the current block may include upper peripheral samples of multiple columns and left peripheral samples of multiple rows. In addition, the peripheral reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of size nWxnH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0139] However, some of the surrounding reference samples of the current block may not yet have been decoded or may not be available. In this case, the decoding device (300) may construct surrounding reference samples to be used for prediction by substituting the unavailable samples with available samples. Alternatively, the surrounding reference samples to be used for prediction may be constructed through interpolation of available samples.
[0140] When neighboring reference samples are derived, (i) a prediction sample can be derived based on an average or interpolation of neighboring reference samples of the current block, and (ii) the prediction sample can be derived based on a reference sample existing in a specific (prediction) direction with respect to the prediction sample among the neighboring reference samples of the current block. The case of (i) can be called a non-directional mode or a non-angular mode, and the case of (ii) can be called a directional mode or an angular mode.
[0141] Additionally, linear interpolation intra prediction (LIP) may be applied to perform intra prediction on the current block by linearly interpolating prediction sample values generated based on the intra prediction mode of the current block.
[0142] Additionally, a temporary prediction sample of the current block may be derived based on filtered peripheral reference samples, and a prediction sample of the current block may be derived by weighting at least one reference sample derived according to an intra prediction mode among existing peripheral reference samples, i.e., unfiltered peripheral reference samples, and the temporary prediction sample. Such prediction may be referred to as Position Dependent Intra Prediction Combination (PDPC).
[0143] In addition, intra prediction encoding can be performed by selecting a reference sample line with the highest prediction accuracy among the surrounding multiple reference sample lines of the current block, deriving a prediction sample using the reference sample located in the prediction direction of the selected line, and then instructing (signaling) the used reference sample line to the decoding device. This case can be referred to as multi-reference line intra prediction (MRL) or MRL-based intra prediction.
[0144] Additionally, the current block can be divided into vertical or horizontal subpartitions, and intra prediction can be performed based on the same intra prediction mode, while peripheral reference samples can be derived and utilized for each subpartition. In other words, in this case, the intra prediction mode for the current block is applied equally to the subpartitions, but peripheral reference samples can be derived and utilized for each subpartition, thereby improving intra prediction performance in some cases. This prediction method can be called intra subpartitions (ISP) or ISP-based intra prediction.
[0145] In addition, if the prediction direction based on the prediction sample points between surrounding reference samples, that is, if the prediction direction points to a fractional sample location, the value of the prediction sample can also be derived through interpolation of multiple reference samples located around the prediction direction (around the fractional sample location).
[0146] Information about the intra prediction mode may be included in the prediction information encoded by the encoding device (200) and included in the bitstream and transmitted to the decoding device (300). Information about the intra prediction mode may be implemented and transmitted in various forms, such as flag information indicating whether each intra prediction mode is applied or index information indicating one of several intra prediction modes.
[0147] The intra prediction methods described above may be referred to as intra prediction types, to distinguish them from intra prediction modes. Furthermore, the intra prediction types may be referred to by various terms, such as intra prediction techniques, intra prediction tools, or additional intra prediction modes. For example, the intra prediction types (or additional intra prediction modes, etc.) may include at least one of the LIP, PDPC, MRL, and ISP described above. A general intra prediction method, excluding specific intra prediction types such as LIP, PDPC, MRL, and ISP, may be referred to as a normal intra prediction type. The normal intra prediction type may be generally applied when the specific intra prediction types described above are not applied, and prediction may be performed based on the intra prediction modes described above. Meanwhile, post-processing filtering may be performed on the derived prediction samples, if necessary.
[0148] The intra prediction process may include an intra prediction mode / type determination step, a surrounding reference sample derivation step, and an intra prediction mode / type-based prediction sample derivation step. Additionally, a post-processing filtering step may be performed on the derived prediction samples, as needed. This will be described in detail below.
[0149] FIG. 7 is a flowchart showing a method of encoding an image based on intra prediction in an encoding method according to one embodiment, and FIG. 8 is a diagram showing the configuration of an encoding device used to perform the method of FIG. 7.
[0150] Referring to FIGS. 7 and 8 together, step S1000 may be performed by the intra prediction unit (222) of the encoding device (200), and step S1010 may be performed by the residual processing unit (230) of the encoding device. Specifically, step S1010 may be performed by the subtraction unit (115) of the encoding device (200). In step S1020, prediction information may be derived by the intra prediction unit (222) and encoded by the entropy encoding unit (240). In step S1020, residual information may be derived by the residual processing unit (230) and encoded by the entropy encoding unit (240). The residual information is information about the residual samples. The residual information may include information about quantized transform coefficients for the residual samples. As described above, the residual samples are derived as transform coefficients through the transform unit (232) of the encoding device (200), and the transform coefficients can be derived as quantized transform coefficients through the quantization unit (233). Information about the quantized transform coefficients can be encoded in the entropy encoding unit (240) through a residual coding procedure.
[0151] The encoding device (200) can perform intra prediction on the current block (S1000). The encoding device (200) can derive an intra prediction mode / type for the current block, derive surrounding reference samples of the current block, and generate prediction samples within the current block based on the intra prediction mode / type and the surrounding reference samples. The prediction samples can constitute a prediction block. Here, the intra prediction mode / type determination, surrounding reference sample derivation, and prediction sample generation procedures may be performed simultaneously, or one procedure may be performed before the other. For example, the intra prediction unit (222) of the encoding device (200) may include an intra prediction mode / type determination unit (222a), a reference sample derivation unit (222b), and a prediction sample derivation unit (222c). The intra prediction mode / type determination unit (222a) may determine the intra prediction mode / type for the current block, the reference sample derivation unit (222b) may derive surrounding reference samples of the current block, and the prediction sample derivation unit (222c) may derive prediction samples of the current block. Meanwhile, although not shown, when the prediction sample filtering procedure described below is performed, the intra prediction unit (222) may further include a prediction sample filtering unit (not shown). The encoding device (200) may determine a mode / type to be applied to the current block among a plurality of intra prediction modes / types. The encoding device (200) may compare RD costs for the intra prediction modes / types to determine the optimal intra prediction mode / type for the current block.
[0152] Meanwhile, the encoding device (200) may also perform a prediction sample filtering procedure. The prediction sample filtering procedure may be referred to as post-filtering. Some or all of the prediction samples may be filtered through the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.
[0153] The encoding device (200) performs residual processing on the current block based on (filtered) prediction samples (S1010). Specifically, the encoding device (200) can compare the prediction samples with the original samples of the current block based on phase and derive residual samples.
[0154] The encoding device (200) can encode image information including information regarding the intra prediction (prediction information) and residual information regarding the residual samples (S1020). The prediction information can include the intra prediction mode information and / or the intra prediction type information. The encoding device (200) can output the encoded image information in the form of a bitstream. The output bitstream can be transmitted to the decoding device (300) via a storage medium or a network.
[0155] The residual information may include the residual coding syntax described below. The encoding device (200) may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.
[0156] Meanwhile, as described above, the encoding device (200) can generate a restored picture (including restored samples and restored blocks). To this end, the encoding device (200) can inversely quantize / inversely transform the quantized transform coefficients to derive (corrected) residual samples. The reason for performing inverse quantization / inverse transformation on the residual samples after transforming / quantizing them in this way is to derive residual samples that are identical to the residual samples derived from the decoding device (300) as described above. The encoding device (200) can generate a restored block including restored samples for the current block based on the predicted samples and the (corrected) residual samples. A restored picture for the current picture can be generated based on the restored block. As described above, an in-loop filtering procedure, etc. can be further applied to the restored picture.
[0157] FIG. 9 is a flowchart showing a method of decoding an image based on intra prediction in a decoding method according to one embodiment, and FIG. 10 is a diagram showing the configuration of a decoding device used to perform the method of FIG. 9.
[0158] The decoding device (300) can perform an operation corresponding to the operation performed in the encoding device (200).
[0159] Steps S1100 to S1120 may be performed by the intra prediction unit (331) of the decoding device (300), and the prediction information of step S1100 and the residual information of step S1130 may be obtained from the bitstream by the entropy decoding unit (310) of the decoding device (300). The residual processing unit (320) of the decoding device (300) may derive residual samples for the current block based on the residual information. Specifically, the inverse quantization unit (321) of the residual processing unit (320) may perform inverse quantization based on the quantized transform coefficients derived based on the residual information to derive transform coefficients, and the inverse transform unit (322) of the residual processing unit (320) may perform inverse transformation on the transform coefficients to derive residual samples for the current block. Step 1140 may be performed by the addition unit (340) or restoration unit of the decoding device (300).
[0160] Specifically, the decoding device (300) can derive an intra prediction mode / type for the current block based on the received prediction information (intra prediction mode / type information) (S1100). The decoding device (300) can derive surrounding reference samples of the current block (S1110). The decoding device (300) generates prediction samples within the current block based on the intra prediction mode / type and the surrounding reference samples (S1120). In this case, the decoding device (300) can perform a prediction sample filtering procedure. The prediction sample filtering procedure may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.
[0161] The decoding device (300) generates residual samples for the current block based on the received residual information. The decoding device (300) generates reconstructed samples for the current block based on the prediction samples and the residual samples, and can derive a reconstructed block including the reconstructed samples (S1130). A reconstructed picture for the current picture can be generated based on the reconstructed block. As described above, an in-loop filtering procedure, etc., can be further applied to the reconstructed picture.
[0162] Here, the intra prediction unit (331) of the decoding device (300) may include an intra prediction mode / type determination unit (331a), a reference sample derivation unit (331b), and a prediction sample derivation unit (331c). The intra prediction mode / type determination unit (331a) determines the intra prediction mode / type for the current block based on the intra prediction mode / type information generated and signaled by the intra prediction mode / type determination unit (222a) of the encoding device (200), the reference sample derivation unit (331b) may derive surrounding reference samples of the current block, and the prediction sample derivation unit (331c) may derive prediction samples of the current block. Meanwhile, although not illustrated, when the above-described prediction sample filtering procedure is performed, the intra prediction unit (331) may further include a prediction sample filtering unit (not illustrated).
[0163] The intra prediction mode information may include flag information (e.g., intra_luma_mpm_flag) indicating, for example, whether the most probable mode (MPM) is applied to the current block or the remaining mode is applied, and if the MPM is applied to the current block, the intra prediction mode information may further include index information (e.g., intra_luma_mpm_idx) indicating one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be composed of an MPM list. A list composed of MPM candidates may be referred to as an MPM list or an MPM candidate list.
[0164] Additionally, if MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the MPM candidates. The decoding device (300) may determine the intra prediction mode of the current block based on the intra prediction mode information.
[0165] In addition, the intra prediction type information can be implemented in various forms. For example, the intra prediction type information can include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information can include at least one of reference sample line information (e.g., intra_luma_ref_idx) indicating whether MRL is applied to the current block and, if so, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating the split type of subpartitions if ISP is applied, flag information indicating whether PDCP is applied, or flag information indicating whether LIP is applied. In addition, the intra prediction type information can include a MIP flag indicating whether MIP (Matrix-based Intra Prediction) is applied to the current block.
[0166] Intra prediction mode information and / or intra prediction type information may be encoded / decoded using the coding method described in the disclosed embodiment. For example, intra prediction mode information and / or intra prediction type information may be encoded / decoded using entropy coding (e.g., CABAC, CAVLC) based on a truncated (rice) binary code.
[0167] Below, we describe in more detail how to determine the intra prediction mode.
[0168] When intra prediction is applied, the intra prediction mode applied to the current block can be determined using the intra prediction mode of the surrounding blocks. For example, the decoding device (300) can select one of the MPM candidates within the MPM list derived based on the intra prediction mode of the surrounding blocks of the current block (e.g., the left and / or upper surrounding blocks) and additional candidate modes, based on the received MPM index.
[0169] Alternatively, one of the remaining intra prediction modes that are not included in the above mpm candidates (and planar modes) may be selected based on the remaining intra prediction mode information. The mpm list may be configured to include or not include a planar mode as a candidate. For example, if the mpm list includes a planar mode as a candidate, the mpm list may have six candidates, and if the mpm list does not include a planar mode as a candidate, the mpm list may have three candidates. If the mpm list does not include a planar mode as a candidate, a not planar flag (e.g., intra_luma_not_planar_flag) indicating whether the intra prediction mode of the current block is not a planar mode may be signaled. For example, the mpm flag may be signaled first, and then the mpm index and the not planar flag may be signaled if the value of the mpm flag is 1. Additionally, the mpm index may be signaled if the value of the not planar flag is 1. Here, the reason the mpm list is configured not to include planar mode as a candidate is not because planar mode is not mpm, but rather because planar mode is always considered as mpm, so a flag (not planar flag) is first signaled to check whether it is planar mode or not.
[0170] For example, whether the intra prediction mode applied to the current block is among the mpm candidates (and planar mode) or among the remaining mode can be indicated based on the mpm flag (e.g., intra_luma_mpm_flag). A value of 1 of the mpm flag can indicate that the intra prediction mode for the current block is among the mpm candidates (and planar mode), and a value of 0 of the mpm flag can indicate that the intra prediction mode for the current block is not among the mpm candidates (and planar mode). A value of 0 of the not planar flag (e.g., intra_luma_not_planar_flag) can indicate that the intra prediction mode for the current block is the planar mode, and a value of 1 of the not planar flag can indicate that the intra prediction mode for the current block is not the planar mode. The mpm index can be signaled in the form of mpm_idx or intra_luma_mpm_idx syntax element, and the remaining intra prediction mode information can be signaled in the form of rem_intra_luma_pred_mode or intra_luma_mpm_remainder syntax element. For example, the remaining intra prediction mode information can point to one of the remaining intra prediction modes that are not included in the mpm candidates (and planar modes) among all intra prediction modes by indexing them in the order of the prediction mode number. The intra prediction mode can be an intra prediction mode for the luma component (sample). Hereinafter, the intra prediction mode information may include at least one of an mpm flag (e.g., intra_luma_mpm_flag), a not planar flag (e.g., intra_luma_not_planar_flag), an mpm index (e.g., mpm_idx or intra_luma_mpm_idx), and remaining intra prediction mode information (rem_intra_luma_pred_mode or intra_luma_mpm_remainder).In the disclosed embodiment, the MPM list may be referred to by various terms such as MPM candidate list, candModeList, etc. When MIP is applied to the current block, a separate mpm flag for MIP (e.g. intra_mip_mpm_flag), mpm index (e.g. intra_mip_mpm_idx), and remaining intra prediction mode information (e.g. intra_mip_mpm_remainder) may be signaled, and the aforementioned not planar flag is not signaled.
[0171] The signaling procedure for intra prediction mode information in the encoding device (200) and the intra prediction mode determination procedure in the decoding device (300) can be performed, for example, as follows.
[0172] FIG. 11 is a flowchart illustrating an example of a method for signaling information about an intra prediction mode in an encoding method according to one embodiment.
[0173] Referring to FIG. 11, the encoding device (200) constructs an MPM list for the current block (S1300). As described above, the MPM list may include candidate intra-prediction modes (MPM candidates) likely to be applied to the current block. The MPM list may include intra-prediction modes of surrounding blocks, or may further include specific intra-prediction modes according to a predetermined method. A specific method for constructing the MPM list will be described later.
[0174] The encoding device (200) determines the intra prediction mode of the current block (S1310). The encoding device (200) can perform prediction based on various intra prediction modes, and can determine the optimal intra prediction mode based on rate-distortion optimization (RDO) based thereon. In this case, the encoding device (200) may determine the optimal intra prediction mode using only the MPM candidates and the planar mode included in the MPM list, or may determine the optimal intra prediction mode using not only the MPM candidates and the planar mode included in the MPM list but also the remaining intra prediction modes. As a specific example, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP) rather than the normal intra prediction type, the encoding device (200) may consider only the MPM candidates and the planar mode as intra prediction mode candidates for the current block to determine the optimal intra prediction mode. That is, in this case, the intra prediction mode for the current block can only be determined among the MPM candidates and the planar mode, and in this case, the MPM flag may not be encoded / signaled. In this case, the decoding device (300) can assume that the MPM flag is 1 without being separately signaled.
[0175] The encoding device (200) generates intra-prediction mode information based on the determined intra-prediction mode (S1320). The intra-prediction mode information may indicate information regarding the intra-prediction mode determined for the current block. For example, the intra-prediction mode information may include at least one of information indicating whether the intra-prediction mode applied to the current block is included in the MPM list (e.g., mpm flag), information indicating whether the planar mode is applied to the current block (e.g., not planar flag), an mpm index indicating the intra-prediction mode applied to the current block among the MPM list, or remaining intra-prediction mode information.
[0176] Specifically, if the intra prediction mode of the current block is not a planar mode but one of the MPM candidates in the MPM list, the encoding device (200) generates an MPM index (e.g., mpm idx) that points to one of the MPM candidates. If the intra prediction mode of the current block is not in the MPM list either, the encoding device generates remaining intra prediction mode information that points to a mode that is the same as the intra prediction mode of the current block among the remaining intra prediction modes that are not included in the MPM list (and the planar mode).
[0177] The encoding device (200) can encode intra prediction mode information (S1330) and output it in the form of a bitstream. In general, the mpm index and the remaining intra prediction mode information are not signaled simultaneously when indicating the intra prediction mode for one block because they have an alternative relationship. That is, the mpm flag value 1 and the not planar flag or the mpm index are signaled together, or the mpm flag value 0 and the remaining intra prediction mode information are signaled together. However, as described above, when a specific intra prediction type is applied to the current block, the mpm flag may not be signaled, and only the not planar flag and / or the mpm index may be signaled. That is, in this case, the intra prediction mode information may include only the not planar flag and / or the mpm index.
[0178] FIG. 12 is a flowchart illustrating an example of a method for deriving an intra prediction mode in a decoding method according to one embodiment.
[0179] The decoding device (300) can determine the intra prediction mode in response to the intra prediction mode information determined and signaled by the encoding device (200).
[0180] Referring to FIG. 12, the decoding device (300) obtains intra prediction mode information from the bitstream (S1400). The intra prediction mode information may include at least one of an MPM flag, a not-planar flag, an MPM index, or a remaining intra prediction mode, as described above.
[0181] The decoding device (300) constructs an MPM list (S1410). The MPM list is constructed in the same manner as the MPM list constructed in the encoding device (200) described above. That is, the MPM list may include intra prediction modes of surrounding blocks, or may further include specific intra prediction modes according to a predetermined method. A specific PM list construction method is described below.
[0182] Although step S1410 is shown as being performed after step S1400, this is an example, and step S1410 may be performed before step S1400 or may be performed simultaneously.
[0183] The decoding device (300) derives the intra prediction mode of the current block based on the MPM list and the intra prediction mode information (S1420). If the value of the mpm flag is 1, the decoding device (300) may derive the planar mode as the intra prediction mode of the current block (based on the not planar flag) or derive the candidate indicated by the mpm index among the MPM candidates in the MPM list as the intra prediction mode of the current block. If the value of the mpm flag is 0, the decoding device (300) may derive the intra prediction mode indicated by the remaining intra prediction mode information among the remaining intra prediction modes that are not included in the MPM list and the planar mode as the intra prediction mode of the current block. Meanwhile, if the intra prediction type of the current block is a specific type (e.g., LIP, MRL, or ISP, etc.), the decoding device (300) may also derive the candidate indicated by the mpm index in the planar mode or the MPM list as the intra prediction mode of the current block without checking the mpm flag. A specific intra prediction mode derivation procedure like this can be represented as in Fig. 13.
[0184] FIG. 13 is a flowchart illustrating in more detail an example of a method for deriving an intra prediction mode in a decoding method according to one embodiment.
[0185] The description of the step (S1500) in which the decoding device (300) obtains intra prediction mode information from the bitstream and the step (S1510) in which the decoding device (300) constructs the MPM list is the same as described above.
[0186] In deriving the intra prediction mode, if the mpm flag is 1, or a specific intra prediction type such as LIP, MRL, ISP, etc. is applied (example of S1521), and the not planar flag is 1 (example of S1522), the intra prediction mode of the current block can be determined based on the MPM list and mpm index (S1523).
[0187] If the not planar flag is not 1 (NO in S1522), the planar mode can be determined as the intra prediction mode of the current block (S1524).
[0188] If the mpm flag is not 1 (NO in S1521), the intra prediction mode of the current block can be determined from among the remaining intra prediction modes not included in the MPM list based on the remaining intra prediction mode information (S1525).
[0189] The not planar flag may be signaled when MRL does not apply to the current block (i.e., intra_luma_ref_idx = = 0), and may be omitted when MRL applies to the current block (i.e., intra_luma_ref_idx != 0). If the not planar flag is omitted, its value may be assumed to be 1 by the decoding device (300).
[0190] Meanwhile, the intra prediction modes can include two directional intra prediction modes and 65 directional intra prediction modes. The non-directional intra prediction modes can include the planar intra prediction mode and the DC intra prediction mode, and the directional intra prediction modes can include intra prediction modes 2 to 66. The extended directional intra prediction modes can be applied to blocks of all sizes and can be applied to both luma and chroma components.
[0191] In addition to the intra prediction modes described above, intra prediction modes may further include a cross-component linear model (CCLM) mode for chroma samples. CCLM modes can be categorized into LT_CCLM, L_CCLM, and T_CCLM, depending on whether left-side samples, upper-side samples, or both are considered for deriving LM parameters, and can only be applied to chroma components.
[0192] Intra prediction modes can be indexed, for example, as shown in Table 1 below.
[0193] [Table 1]
[0194]
[0195] Meanwhile, the intra prediction type (or additional intra prediction mode, etc.) may include at least one of the aforementioned LIP, PDPC, MRL, ISP, and MIP. The intra prediction type may be indicated based on intra prediction type information, and the intra prediction type information may be implemented in various forms. For example, the intra prediction type information may include intra prediction type index information indicating one of the intra prediction types. As another example, the intra prediction type information may include reference sample line information (e.g., intra_luma_ref_idx) indicating whether the MRL is applied to the current block and, if so, which reference sample line is used, ISP flag information (e.g., intra_subpartitions_mode_flag) indicating whether the ISP is applied to the current block, ISP type information (e.g., intra_subpartitions_split_flag) indicating a split type of subpartitions if the ISP is applied, flag information indicating whether PDCP is applied, or flag information indicating whether LIP is applied. Additionally, the intra prediction type information may include a MIP flag (or may be called intra_mip_flag) indicating whether MIP is applied to the current block.
[0196] Information regarding the intra prediction mode / type of the current block can be coded and signaled at the CU (CU syntax) level, or implicitly determined based on conditions. In this case, some modes / types may be explicitly signaled, while others may be implicitly derived.
[0197] For example, the CU syntax can carry information about (intra) prediction mode / type, etc., as disclosed in Table 2 below.
[0198] [Table 2]
[0199]
[0200]
[0201]
[0202]
[0203]
[0204] The syntax elements intra_luma_mpm_flag[ x0 ][ y0 ], intra_luma_not_planar_flag[ x0 ][ y0 ], intra_luma_mpm_idx[ x0 ][ y0 ], and intra_luma_mpm_remainder[ x0 ][ y0 ] are used to define the intra prediction mode for luma samples. That is, intra_luma_mpm_flag[ x0 ][ y0 ], intra_luma_not_planar_flag[ x0 ][ y0 ], intra_luma_mpm_idx[ x0 ][ y0 ], and intra_luma_mpm_remainder[ x0 ][ y0 ] can indicate the (regular or normal) intra prediction mode of the current block. This can be the intra prediction mode for the luma samples of the current block. Regular intra prediction mode or normal intra prediction mode can indicate an intra prediction mode when MIP is not applied to the current block and the current block is coded in the intra mode. In the embodiments described below, intra mode and intra prediction mode can be used interchangeably. When an intra prediction mode is applied to the current block (regular or normal), an MPM list can be configured, and intra_luma_mpm_flag can indicate whether the intra prediction mode for the current block exists in the MPM list (or exists among MPM candidates). When the intra_luma_mpm_flag value is 1, intra_luma_not_planar_flag can be parsed / coded, and intra_luma_not_planar_flag can indicate whether the intra prediction mode of the current block is not a planar mode.
[0205] As shown in Table 1 above, intra_luma_mpm_idx can be parsed and coded if the intra_luma_not_planar_flag is 'true' (i.e., value 1). In general, a planar mode can always be included as a candidate in the MPM list, but a planar mode can be excluded from the MPM list by signaling the intra_luma_not_planar_flag first as described above. In this case, a unified MPM list can be constructed from the various intra prediction types described above (general intra prediction, MRL, ISP, LIP, etc.).
[0206] If a planar mode is excluded from the MPM list, the number of MPM candidates in the MPM list can be reduced to 5. intra_luma_mpm_idx can indicate a candidate to be used as an intra prediction mode of the current block among the MPM candidates included in the MPM list from which the planar mode is excluded. If the intra_luma_mpm_flag value is 0, intra_luma_mpm_remainder can be parsed / coded. The intra_luma_mpm_remainder can indicate one mode among the remaining modes excluding the candidates in the MPM list from the intra prediction modes as the intra prediction mode of the current block.
[0207] Below, we describe the specific method for constructing the MPM list.
[0208] Typically, when an image is divided into multiple blocks, the current block to be coded and the neighboring blocks have similar image characteristics. Therefore, the current block and the neighboring blocks are likely to have identical or similar intra-prediction modes. Accordingly, the encoding device (200) can utilize the intra-prediction modes of the neighboring blocks to encode the intra-prediction mode of the current block.
[0209] For example, the encoding device (200) / decoding device (300) can configure an MPM list for the current block. Here, MPM may refer to a mode used to improve coding efficiency by considering the similarity between the current block and surrounding blocks during intra prediction mode coding. As described above, the MPM list may be configured to include a planar mode, or may be configured to exclude a planar mode. For example, if the MPM list includes a planar mode, the number of candidates in the MPM list may be 6. And, if the MPM list does not include a planar mode, the number of candidates in the MPM list may be 5.
[0210] The encoding device (200) / decoding device (300) can configure an MPM list including six MPM candidates.
[0211] The following types of modes can be considered to construct the MPM list.
[0212] - Default intra modes
[0213] - Neighbor intra modes
[0214] - Intra modes derived from surrounding inter modes (IPM modes)
[0215] - DIMD (Decoder-side intra mode derivation) modes
[0216] - Derived intra modes
[0217] For the above peripheral intra modes, peripheral blocks, such as the left peripheral block, the upper peripheral block, the lower left peripheral block, the upper right peripheral block, and the upper left peripheral block, may be considered. When utilizing the peripheral intra modes with MPM, the input order may vary depending on the size information of the current block. For example, if the height of a block is greater than or equal to the width of the block, the intra mode of the upper peripheral block may be considered first, and then the intra mode of the left peripheral block may be considered.
[0218] Even when neighboring blocks are coded in inter mode rather than intra mode, intra mode information can be obtained from the IPM buffer. If the position indicated by the motion vector of a neighboring inter block is in intra mode, i.e., if the block at that position is coded in intra mode, the corresponding intra mode can be stored in the IPM buffer. The intra mode stored in the IPM buffer can be used as the MPM mode of the neighboring block.
[0219] Additionally, it is possible to construct an MPM list using the DIMD described below. If the current block is not in DIMD mode, the intra mode derived from DIMD can be used as an MPM candidate.
[0220] As described above, if the MPM list does not include a planar mode, the planar mode is excluded from the MPM list, and the number of candidates in the MPM list can be set to 5.
[0221] The above-described MPM list construction method can be used when MIP is not applied to the current block. For example, the above-described MPM list construction method can be used to derive intra prediction modes used in LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction.
[0222] Figure 14 is a schematic diagram illustrating a matrix-based intra prediction (MIP) process.
[0223] Matrix-based intra prediction (MIP) is also known as affine linear weighted intra prediction (ALWIP) or matrix weighted intra prediction (MWIP). To predict samples within a rectangular block of equal width and height, MIP uses as input a row of reconstructed boundary samples on the left side of the block and a row of reconstructed boundary samples above the block. If reconstructed samples are unavailable, they are generated as in conventional intra prediction.
[0224] As illustrated in Fig. 14, the generation of a prediction signal can be accomplished through the following three steps.
[0225] 1. When W=H=4, 4 samples are extracted from the boundary samples by averaging, and in all other cases, 8 samples are extracted from the boundary samples by averaging.
[0226] 2. After performing matrix-vector multiplication with the averaged samples as input, an offset is added, resulting in a reduction in the prediction signal for the sub-sampled sample set from the original block (Matrix-Vector-Multiplication).
[0227] 3. The prediction signals at the remaining locations are generated through linear interpolation, which linearly interpolates one step in each direction from the prediction signals of the subsampled set (Interpolation).
[0228] The matrices and offset vectors required to generate prediction signals (prediction blocks or prediction samples) are taken from three sets of matrices: S0, S1, and S2. Set S0 contains 18 matrices, each with 16 rows and 4 columns. and 18 offset vectors, each with a size of 16. It consists of . The matrices and offset vectors of the set are used for blocks of 4x4 size. Set S1 consists of 10 matrices, each with 16 rows and 8 columns. and 10 offset vectors, each with a size of 16. It consists of . The matrices and offset vectors of the set are used for blocks of sizes 4x8, 8x4, and 8x8. Finally, set S2 consists of 6 matrices, each with 64 rows and 8 columns. and six offset vectors, each with a size of 64 It consists of the matrices and offset vectors of that set or some of these matrices and offset vectors are used for all other block shapes.
[0229] The total number of multiplications required to compute the matrix vector product is In other words, in MIP mode, up to 4 multiplications are required per sample.
[0230] Meanwhile, the left peripheral block or the upper peripheral block can be coded based on the above-described MIP. That is, MIP can be applied when coding the left peripheral block or the upper peripheral block. In this case, it is not appropriate to use the MIP intra prediction mode number of the peripheral block (left peripheral block / upper peripheral block) to which the MIP is applied as it is in the MPM list for the current block to which the MIP is not applied. For example, the intra prediction mode of the peripheral block (left peripheral block / upper peripheral block) to which the MIP is applied can be considered as DC or planar mode. As another example, the intra prediction mode of the peripheral block (left peripheral block / upper peripheral block) to which the MIP is applied can be mapped to a general intra prediction mode based on a mapping table and used to construct the MPM list. In this case, the mapping can be performed based on the block size type of the current block. For example, the mapping table can be represented as shown in Table 3 below.
[0231] [Table 3]
[0232]
[0233] Here, MIP IntraPredMode[ xNbX ][ yNbX ] represents the MIP intra prediction mode of the surrounding block (left surrounding block / upper surrounding block), and the block size type MipSizeId represents the block size type of the surrounding block or the current block. The numbers under the block size type values 0, 1, and 2 represent the general intra prediction mode to which the MIP intra prediction mode is mapped for each block size type.
[0234] For example, if the block size type of the current block is 0 and the MIP intra prediction mode number of the surrounding block is 10, the mapped general intra prediction mode number may be 18. However, the above mapping relationship is an example and may be changed.
[0235] When MIP is applied to the current block, a separate MPM list for the current block to which MIP is applied can be configured. The MPM list can be called by various names, such as MIP MPM list (or MPM list for MIP, candMipModeList), to distinguish it from the MPM list for cases where MIP is not applied to the current block. Hereinafter, for the sake of distinction, it is referred to as MIP MPM list, but of course, it can also be called MPM list.
[0236] The above MIP MPM candidate list may include n candidates, for example, n may be 3. The above MIP MPM candidate list may be constructed based on a left peripheral block and an upper peripheral block of the current block. Here, the left peripheral block may refer to the uppermost block among the peripheral blocks adjacent to the left boundary of the current block. In addition, the upper peripheral block may refer to the leftmost block among the peripheral blocks adjacent to the upper boundary of the current block.
[0237] For example, when MIP is applied to the left neighboring block (and the block size type of the left neighboring block is the same as the block size type of the current block), the first candidate intra prediction mode (or candMipModeA) may be set to be the same as the MIP intra prediction mode of the left neighboring block. Also, for example, when MIP is applied to the upper neighboring block (and the block size type of the upper neighboring block is the same as the block size type of the current block), the second candidate intra prediction mode (or cand-ipModeB) may be set to be the same as the MIP intra prediction mode of the upper neighboring block.
[0238] Meanwhile, the left neighboring block or the upper neighboring block may be coded based on intra prediction rather than MIP. That is, an intra prediction type other than MIP may be applied when coding the left neighboring block or the upper neighboring block. In this case, it is not appropriate to use the normal intra prediction mode number of the neighboring block (left neighboring block / upper neighboring block) to which MIP is not applied as a candidate intra mode for the current block to which MIP is applied. For example, the MIP intra prediction mode of the neighboring block (left neighboring block / upper neighboring block) to which MIP is not applied may be regarded as a MIP intra prediction mode of a specific value (e.g., 0, 1, or 2). As another example, the normal intra prediction mode of the neighboring block (left neighboring block / upper neighboring block) to which MIP is not applied may be mapped to the MIP intra prediction mode based on a mapping table and used to construct a MIP MPM candidate list. In this case, the mapping may be performed based on the block size type of the current block. For example, the mapping table may be represented as in Table 4 below.
[0239] [Table 4]
[0240]
[0241] Here, IntraPredModeY[ xNbX ][ yNbX ] represents the intra prediction mode of the surrounding block (left surrounding block / upper surrounding block). Here, the intra prediction mode of the surrounding block may be an intra prediction mode for the luma component (sample), i.e., a luma intra prediction mode. The block size type MipSizeId represents the block size type of the surrounding block or the current block. The numbers under the block size type values 0, 1, and 2 represent the MIP intra prediction mode to which the general intra prediction mode is mapped for each block size type.
[0242] Additionally, the above-mentioned surrounding blocks (e.g., left surrounding block / upper surrounding block) may not be available (e.g., located outside the current picture, located outside the current tile / slice, etc.), or even if MIP is applied, a MIP intra prediction mode that is not available to the current block may be used depending on the block size type. In this case, a specific MIP intra prediction mode predefined for the first candidate and / or the second candidate may be used as the first candidate intra prediction mode or the second candidate intra prediction mode. Additionally, a specific MIP intra prediction mode predefined for the third candidate may be used as the third candidate intra prediction mode.
[0243] For example, the above-described specific MIP intra prediction mode can be represented as shown in Table 5 below. The above-described specific MIP intra prediction mode can be called MIP default candidate modes.
[0244] [Table 5]
[0245]
[0246] The MIP MPM list can be constructed based on the first candidate intra prediction mode and the second candidate intra prediction mode. For example, when the first candidate intra prediction mode and the second candidate intra prediction mode are different, the first candidate intra prediction mode can be placed as the 0th candidate (ex. candMipModeList[0]) of the MIP MPM list, and the second candidate intra prediction mode can be placed as the 1st candidate (ex. candMipModeList[1]) of the MIP MPM list. The second candidate (ex. candMipModeList[2]) of the MIP MPM list can use the above-described predefined specific MIP intra prediction mode.
[0247] Alternatively, when the first candidate intra prediction mode and the second candidate intra prediction mode are the same, one of the first candidate intra prediction mode and the second candidate intra prediction mode can be inserted as the 0th candidate (ex. candMipModeList[0]) of the MIP MPM list, and the first candidate (ex. candMipModeList[1]) of the MIP MPM list and the second candidate (ex. candMipModeList[2]) of the MIP MPM list can use the above-described predefined specific MIP intra prediction modes.
[0248] As described above, the MIP intra prediction mode of the current block can be derived based on the MIP MPM list. In this case, the MPM flag that can be included in the intra prediction mode information for the MIP as described above can be called intra_mip_mpm_flag, the MPM index can be called intra_mip_mpm_idx, and the remaining intra prediction mode information can be called intra_mip_mpm_remainder. The procedure for deriving the MIP intra prediction mode from the MIP MPM list can be performed as described above.
[0249] The aforementioned DIMD (Decoder-side intra mode derivation) mode can be used by deriving intra prediction mode information at the encoder and decoder without directly transmitting it. First, horizontal and vertical gradients are derived from the second neighboring sample column and row, and a Histogram of Gradients (HoG) can be constructed from these.
[0250] Figure 15 is a drawing showing a configuration method of HoG used in DIMD mode.
[0251] Referring to Figure 15, the HoG can be obtained by applying a Sobel filter using L-shaped rows and columns of 3 pixels around the current block. If the block boundaries exist in different CTUs, they are not used for texture analysis.
[0252] Afterwards, up to five intra modes with the largest histogram amplitudes are selected, and the predicted blocks predicted using these modes are blended with the planar mode to form the final predicted block. The weights can be derived from the histogram amplitudes. Additionally, a DIMD flag is transmitted on a block-by-block basis to determine whether DIMD is being used.
[0253] For blocks of size WХH, the weights for each of the five derived modes are adjusted if the magnitude of the upper histogram is twice that of the left histogram, or vice versa. In these cases, the weights vary depending on the position and are calculated as follows:
[0254] If the upper histogram is twice as large as the left histogram,
[0255] [Formula 1]
[0256]
[0257] If the left histogram is twice as large as the upper histogram,
[0258] [Formula 2]
[0259]
[0260] Here, wDimd_i represents the unmodified uniform weight for the selected DIMD, and △_i is a predefined value that can be set to 10.
[0261] The DIMD chroma mode uses the DIMD derivation method to derive the chroma intra prediction mode of the current block based on the reconstructed Y, Cb, and Cr samples located in the second adjacent row and column. Specifically, the horizontal gradient and the vertical gradient are calculated for the reconstructed luma samples corresponding to the current chroma block and the reconstructed Cb and Cr samples, respectively, and a gradient histogram is constructed through this.
[0262] Afterwards, the intra prediction mode with the largest amplitude value of the histogram is used to perform chroma intra prediction of the current chroma block.
[0263] If the intra prediction mode derived from the DIMD chroma mode is identical to the intra prediction mode derived from the DM mode, the intra prediction mode with the second largest histogram amplitude value is used as the DIMD chroma mode. A CU-level flag is transmitted in the syntax to indicate whether the proposed DIMD chroma mode is applied.
[0264] Finally, for the WХH pair of the chroma CB to be predicted, pairs of vertical gradients and horizontal gradients are extracted from the second and third lines of the luma CB instead of the usual DIMD decoding reference sample set to construct a gradient histogram corresponding to the luma CB.
[0265] In TIMD (Template based intra mode derivation), the Sum of Absolute Transformed Difference (SATD) between the predicted block predicted from the template region and the actual reconstructed sample is calculated for the IPM intra modes of the surrounding adjacent intra blocks and inter blocks, and the mode with the smallest SATD is selected as the intra mode of the current block.
[0266] Alternatively, the two modes with the lowest SATD can be selected, and the prediction blocks for the two prediction modes can be blended using a weighted sum method to use them as the prediction block for the current block.
[0267] Blending two modes can be applied when the following conditions are met:
[0268] costMode2 < 2*costMode1.
[0269] If the above conditions are satisfied, the prediction block is generated by blending two modes, otherwise only one mode with the minimum SATD value can be selected.
[0270] The ratio of weights weight1 and weight 2 when blending two prediction blocks is as follows.
[0271] weight1 = costMode2 / (costMode1+ costMode2)
[0272] weight2 = 1 - weight1
[0273] Previously, we explained how to construct the MPM list. Below, we explain how to construct the SMPM (Secondary MPM) candidate list.
[0274] The encoding device (200) / decoding device (300) may also construct an SMPM list for the current block. The SMPM list may also be referred to as an SMPM list. In addition, the SMPM list may be constructed by excluding intra-modes that overlap with the MPM list. For example, if the MPM list includes mode 50, the SMPM list may not include mode 50.
[0275] For example, the encoding device (200) / decoding device (300) can compose a list with M SMPM candidates, where M can be 16. However, of course, the number of SMPM candidates can vary.
[0276] The following types of modes can be considered to construct the SMPM list.
[0277] - Default intra modes
[0278] - Neighbor intra modes
[0279] - Intra modes derived from surrounding inter modes (IPM modes)
[0280] - DIMD (Decoder-side intra mode derivation) modes
[0281] - Derived intra modes
[0282] For the above peripheral intra modes, peripheral blocks, such as the left peripheral block, the upper peripheral block, the lower left peripheral block, the upper right peripheral block, and the upper left peripheral block, may be considered. When utilizing the peripheral intra modes as SMPM candidates, the input order may vary depending on the size information of the current block. For example, if the block height is greater than or equal to the block width, the intra mode of the upper peripheral block may be considered first, and then the intra mode of the left peripheral block may be considered.
[0283] Even when neighboring blocks are coded in inter mode rather than intra mode, intra mode information can be obtained through the IPM buffer. If the intra mode is applied to the position indicated by the motion vector of a neighboring inter block, the corresponding intra mode can be stored in the IPM buffer. The intra mode stored in the IPM buffer can be used as a SMPM candidate for the neighboring block.
[0284] When intra prediction is applied to a current block, peripheral reference samples to be used for intra prediction of the current block can be derived. The peripheral reference samples of the current block may include a total of 2 x nH samples adjacent to the left boundary and bottom-left neighbors of the current block of a size nW x nH, a total of 2 x nW samples adjacent to the top boundary and top-right neighbors of the current block, and one sample adjacent to the top-left of the current block. Alternatively, the peripheral reference samples of the current block may include upper peripheral samples of multiple columns and left peripheral samples of multiple rows. In addition, the peripheral reference samples of the current block may include a total of nH samples adjacent to the right boundary of the current block of a size nW x nH, a total of nW samples adjacent to the bottom boundary of the current block, and one sample adjacent to the bottom-right of the current block.
[0285] Meanwhile, when the MRL described below is applied, reference samples may be located on lines 1 to 3, rather than line 0 adjacent to the current block on the left / upper side. In this case, the number of surrounding reference samples may increase. The specific areas and number of surrounding reference samples are described below.
[0286] When the ISP described below is applied, the surrounding reference samples can be derived in subpartition units.
[0287] Meanwhile, some of the surrounding reference samples of the current block may not yet be decoded or available. In this case, the decoding device (300) can construct surrounding reference samples to be used for prediction through interpolation of available samples.
[0288] Alternatively, if some of the surrounding reference samples of the current block have not yet been decoded or are not available, the decoding device (300) may construct surrounding reference samples to be used for prediction through extrapolation of the available samples. This may be done by substituting or padding pixels that have not yet been decoded or are not available with the last available sample while updating the referenceable samples with the latest samples, starting from the lower left and reaching the upper right reference sample.
[0289] As described above, when the intra prediction mode to be applied to the current block and the surrounding reference samples are derived, the prediction unit of the encoding device (200) / decoding device (300) can derive a reference sample according to the intra prediction mode of the current block among the surrounding reference samples of the current block, and can generate a prediction sample of the current block based on the reference sample.
[0290] As described above, (i) the prediction sample can be derived based on the average or interpolation of neighboring reference samples of the current block, and (ii) the prediction sample can also be derived based on reference samples existing in a specific (prediction) direction with respect to the prediction sample among the neighboring reference samples of the current block. The case of (i) can be called a non-directional mode or a non-angular mode, and the case of (ii) can be called a directional mode or an angular mode.
[0291] Additionally, a prediction sample may be generated by interpolating a second surrounding sample and a first surrounding sample, which are located in the opposite direction of the prediction direction of the intra prediction mode of the current block based on the prediction sample of the current block among surrounding reference samples. This method may be referred to as linear interpolation intra prediction (LIP).
[0292] Additionally, a temporary prediction sample of the current block can be derived based on filtered peripheral reference samples, and a prediction sample of the current block can be derived by weighting at least one reference sample derived according to the intra prediction mode among existing peripheral reference samples, i.e., unfiltered peripheral reference samples, and the temporary prediction sample. This method can be called Position Dependent Intra Prediction (PDPC).
[0293] In addition, intra prediction encoding can be performed by selecting a reference sample line with the highest prediction accuracy among the surrounding multiple reference sample lines of the current block, deriving a prediction sample using the reference sample located in the prediction direction of the selected line, and instructing (signaling) the reference sample line used at this time to a decoding device. This method may be called multi-reference line intra prediction (MRL) or MRL-based intra prediction.
[0294] In addition, the current block can be divided into vertical or horizontal subpartitions, and intra prediction can be performed based on the same intra prediction mode, while peripheral reference samples can be derived and utilized for each subpartition. That is, in this case, the intra prediction mode for the current block is applied equally to the subpartitions, and peripheral reference samples can be derived and utilized for each subpartition, thereby improving intra prediction performance in some cases. This prediction method can be called intra subpartitions (ISP) or ISP-based intra prediction.
[0295] If the prediction direction based on the prediction sample points between surrounding reference samples, that is, if the prediction direction points to a fractional sample location, the value of the prediction sample can also be derived through interpolation of multiple reference samples located around the prediction direction (around the fractional sample location).
[0296] As mentioned above, the intra prediction methods described above may be referred to as intra prediction types to distinguish them from the normal intra prediction mode or regular intra prediction mode described above. In addition, the intra prediction type may be referred to by various terms such as intra prediction technique, intra prediction tool, or additional intra prediction mode. For example, the intra prediction type (or additional intra prediction mode, etc.) may include at least one of the LIP, PDPC, MRL, and ISP described above. Information about the intra prediction type may be encoded in an encoding device and included in a bitstream to be signaled to a decoding device. In addition, information about the intra prediction type may be implemented in various forms such as flag information indicating whether each intra prediction type is applied or index information indicating one of multiple intra prediction types.
[0297] The MPM list for deriving the intra prediction mode described above may be configured differently depending on the intra prediction type. Alternatively, the MPM list may be configured in a common manner regardless of the intra prediction type.
[0298] Another example of an intra prediction type applicable to one embodiment is intra prediction fusion. Intra prediction fusion combines multiple predictors generated from different reference lines using a weighted averaging method to derive a predicted sample. In this process, multiple intra predictors are generated and then combined through weighted averaging. The process for deriving the predictors to be combined is as follows.
[0299] For angular intra prediction modes including single modes of TIMD and DIMD, the present method derives intra prediction by applying weights in the form of p_fusion = w_0·p_line + w_1·p_(line+1) using p_line, which is an intra prediction from a default reference line, and p_(line+1), which is a prediction from a line directly above the default reference line. Here, the weights can be set to w_0 = 3 / 4 and w_1 = 1 / 4.
[0300] For TIMD modes with blending applied, p_line is used in the first mode (w_0 = 1, w_1 = 0), and p_(line+1) is used in the second mode (w_0 = 0, w_1 = 1).
[0301] For DIMD mode with blending applied, the number of predictors used in the weighted average increases from 3 to 6.
[0302] Intra prediction combination can be applied to luma blocks with a block size greater than 16 when the angular intra mode has a non-integer slope (i.e., reference sample interpolation is required). This method is used with Multiple Reference Lines (MRL) and is not applicable to blocks encoded with Intra Sub-Partitions (ISP). Predictor Dependent Prediction Combination (PDPC) can be applied for intra prediction modes that use the reference line closest to the current block.
[0303] SGPM, similar to Inter GPM, consists of one partition mode and two associated intra prediction modes. If these modes were directly signaled in the bitstream, significant overhead would be incurred. To more efficiently represent the necessary partition and prediction information within the bitstream, a candidate list is used, with only the candidate indices signaled in the bitstream. Each candidate in the list can derive a combination of one partition mode and two intra prediction modes.
[0304] SGPM mode can be applied with limited block sizes as follows:
[0305] 4<=width<=64, 4<=height<=64, width <height*8, height<width*8, width*height> =32. That is, SGPM can also be applied to blocks of sizes 4x8, 8x4, 4x16, and 16x4.
[0306] Additionally, adaptive blending is possible. Assuming the original blending width in VVC and ECM is τ, the proposed adaptive SGPM blending can be described as follows:
[0307] - When min(width, height) is 4, 1 / 2 τ is selected.
[0308] - Otherwise, if min(width, height) is 8, τ is selected.
[0309] - Otherwise, if min(width, height) is 16, 2 τ is selected.
[0310] -Otherwise, if min(width, height) is 32, 4 τ is selected.
[0311] - In other cases, 8 τ is selected.
[0312] Of the 64 partition modes, 26 predefined partition modes are used.
[0313] For each partitioning mode, an IPM list for each part is derived. The size of the IPM list is 3. The IPM list derivation method reuses the method introduced in the inter-intra GPM, with the only difference being that the TIMD derivation mode is excluded.
[0314] The template size is set to 1. That is, the height of the top template part is 1, and the width of the left template part is 1.
[0315] The possible combinations of one split mode and two intra prediction modes are sorted in ascending order based on the Sum of Absolute Differences (SAD) between the predicted value and the reconstructed value of the template. The weights within the template are set to 1 or 0 depending on the split mode. The length of the candidate combination list is set to 16.
[0316] The TIMD-derived intra prediction modes (horizontal and vertical modes) are added to the IPM list and placed at the first position. The size of the IPM list is maintained at 3.
[0317] Template-based Multiple Reference Line Intra Prediction (TMRL) mode combines reference lines and prediction modes and constructs a candidate combination list using a template matching method. An index into the candidate combination list is encoded to indicate which reference line and prediction mode are used when encoding the current block. For non-TIMD regions, the typical Multiple Reference Line (MRL) mode is replaced by TMRL mode.
[0318] TMRL mode extends the reference line candidate list and the intra prediction mode candidate list. The extended reference line candidate list consists of {1, 3, 5, 7, 12}. The constraint on the top CTU row remains unchanged. The size of the intra prediction mode candidate list is 10. The composition of the intra prediction mode candidate list is similar to the Most Probable Mode (MPM) method, with the following differences:
[0319] - Planner mode is excluded from the intra prediction mode candidate list.
[0320] - DC mode is added after the modes of the five neighboring PUs (prediction units) and the DIMD modes if it is not included in the list.
[0321] - Compared to the angle modes included in the existing intra prediction mode candidate list, angle modes with delta angles from ±1 to ±4 are added.
[0322] Meanwhile, the precision of angle prediction is expanded from 65 to 129. Furthermore, non-adjacent locations are also added as candidates when constructing the intra candidate list. If the surrounding or non-adjacent blocks are encoded in SGPM or GPM mode, the intra mode of the corresponding block is replaced with the partitioning angles.
[0323] The TMRL candidates are composed as follows:
[0324] There are a total of 5 × 10 = 50 combinations of extended reference lines and allowed intra prediction modes. Since the extended reference lines start from reference line 1, the area covered by reference line 0 is used for template matching. For each template region, the Sum of Absolute Differences (SAD) cost between the predicted and reconstructed values generated from the 50 combinations is calculated. The 20 combinations with the lowest SAD costs are selected in ascending order to form the TMRL candidate list.
[0325] In TMR signaling, instead of directly encoding the reference line and intra mode, an index into a TMRL candidate list is encoded to indicate the combination of reference line and prediction mode used to encode the current block.
[0326] Hereinafter, partial MPM reordering according to available decoded reference samples is described. For the current luma coding block (luma CB), if none of the decoded reference samples above-right thereof are available, the last 6, 10, or 12 vertical positive intra prediction modes (including potential wide-angle modes) are tagged as “reserved”, based on the value of abs(floorLog2(W) - abs(floorLog2(H))) using the height (H) and width (W) of the current luma CB.
[0327] If none of the decoded reference samples at the bottom-left of the current luma CB are available, the first 6, 10, or 12 horizontal positive intra prediction modes (including the potential wide-angle mode) are tagged as “reserved”.
[0328] In the process of deriving the MPM (Most Probable Mode) list of the current luma CB, after adding the planar mode to the list, for each mode selected to predict the luma CB (“left (0)”, “top (1)”, “bottom left (2)”, “top right (3)”, “top left (4)”), if the mode is tagged as “reserved” and is not yet included in the “reserved list”, the mode is added to the “reserved list”. Otherwise, if it is not already in the current MPM list, it is added to the current MPM list. Then, the “reserved list” is added to the current MPM list. Finally, the remaining process of deriving the MPM list is performed.
[0329] Hereinafter, we describe how to construct a template-based intra MPM list. First, a general MPM list consisting of 22 items is constructed. Then, the first six items of this general MPM list are included in the PMPM (Primary MPM) list, and the remaining items form the SMPM (Secondary MPM) list. The first item of the general MPM list is always the planar mode. The remaining items are composed of the intra mode and DIMD mode derived from adjacent blocks, the directional mode obtained by adding an offset to the first two available directional modes of the adjacent block, and the default modes.
[0330] 1. The first item in the general MPM list is always planner mode.
[0331] 2. The following items consist of intra-modes and DIMD modes of adjacent blocks, sorted in ascending order of SAD cost. Up to five modes with the lowest SAD cost are added. The SAD cost is calculated based on the difference between the template prediction and the reconstructed sample.
[0332] 3. Modes with offsets added to the directional modes sorted by SAD cost are added to the general MPM list, and then default modes are added, completing the general MPM list consisting of 22 items.
[0333] When intra prediction is performed on the current block, prediction for the luma component block (luma block) of the current block and prediction for the chroma component block (chroma block) can be performed, and in this case, the intra prediction mode for the chroma component (chroma block) can be set separately from the intra prediction mode for the luma component (luma block).
[0334] For example, an intra prediction mode for a chroma component may be indicated based on intra chroma prediction mode information, and the intra chroma prediction mode information may be signaled in the form of an intra_chroma_pred_mode syntax element. As an example, the intra chroma prediction mode information may indicate one of candidate modes including at least one of a planar mode, a DC mode, a vertical mode, a horizontal mode, a DM, an L_CCLM, a T_CCLM, and a LT_CCLM mode. DM may be referred to as a direct mode, and CCLM may be referred to as LM.
[0335] Meanwhile, DM and CCLM are dependent intra prediction modes that use information from a luma block to predict a chroma block. DM may represent a mode in which the same intra prediction mode for the luma component is applied as the intra prediction mode for the chroma component. Furthermore, CCLM may represent an intra prediction mode in which, in the process of generating a prediction block for a chroma block, reconstructed samples of the luma block are subsampled, and then the CCLM parameters α and β are applied to the subsampled samples to use the resulting samples as prediction samples for the chroma block.
[0336] For example, Multiple Direct Modes (MDM) can be applied to the current chroma block.
[0337] Multiple Direct mode extends the existing single-mode DM mode to multiple modes. That is, when configuring the intra-prediction mode for a chrominance image, multiple DM modes are selected as follows:
[0338] - Intra prediction mode for CR, TL, TR, BL, and BR positions of the same luminance block
[0339] - Intra prediction mode of L, A, BL, AR, AL blocks, which are blocks surrounding the current color block.
[0340] - Planner, DC mode
[0341] - -1 or +1 angular mode to previously selected angular mode
[0342] - Vertical, Horizontal, 2, 34, 66, 10, 26 modes (in case of 65 direction mode)
[0343] - If 5 prediction modes are not selected, copy the previously selected mode and select it.
[0344] In addition, the CCLM mode may be applied to the current chroma block. The CCLM mode is an intra prediction mode that utilizes the correlation between a luma block and a chroma block corresponding to the luma block, and may represent a mode in which a linear model may be derived based on surrounding samples of the luma block and surrounding samples of the chroma block, and prediction samples of the chroma block may be derived based on the linear model and the reconstructed samples of the luma block. Specifically, when the CCLM mode is applied to the current chroma block, parameters for the linear model may be derived based on surrounding samples used for intra prediction of the current chroma block and surrounding samples used for intra prediction of the current luma block.
[0345] To reduce cross-component redundancy, the CCLM prediction mode is used, which predicts chroma samples based on reconstructed luma samples of the same CU using the following linear model:
[0346] For example, the above linear model can be expressed based on the following equation 3.
[0347] [Formula 3]
[0348]
[0349] Here, predc(i,j) may represent a prediction sample at the (i,j) coordinate of the current chroma block within the current CU, and recL'(i,j) may represent a reconstruction sample at the (i,j) coordinate of the current luma block within the CU. In addition, recL'(i,j) may represent a down-sampled reconstruction sample of the current luma block.
[0350] The CCLM parameters (α and β) are derived using up to four adjacent chroma samples and their corresponding downsampled luma samples. Assuming the current chroma block size is W × H, W′ and H′ are set as follows:
[0351] - When LM mode is applied: W′ = W, H′ = H
[0352] - When LM-A mode is applied: W′ = W + H
[0353] - When LM-L mode is applied: H′ = H + W
[0354] The upper adjacent positions are denoted as S[0, -1]…S[W′-1, -1], and the left adjacent positions are denoted as S[-1, 0]…S[-1, H′-1]. Then, four samples are selected as follows:
[0355] - When LM mode is applied and both top and left adjacent samples are available:
[0356] S[W′ / 4, -1], S[3W′ / 4, -1], S[-1, H′ / 4], S[-1, 3H′ / 4]
[0357] - When LM-A mode is applied or only top adjacent samples are available:
[0358] S[W′ / 8, -1], S[3W′ / 8, -1], S[5W′ / 8, -1], S[7W′ / 8, -1]
[0359] - When LM-L mode is applied or only left adjacent samples are available:
[0360] S[-1, H′ / 8], S[-1, 3H′ / 8], S[-1, 5H′ / 8], S[-1, 7H′ / 8]
[0361] The four adjacent luma samples corresponding to the selected location are downsampled and compared, and the two smaller values are x 0 A and x 1 In A, the two larger values are x 0 B and x1 is set to B. The corresponding chroma sample values are y 0 A, y 1 A, y 0 B, y 1 It is represented by B. After that, x A , x B , y A , y B is derived as follows: Equation 4:
[0362] [Formula 4]
[0363]
[0364] The linear model parameters α and β are calculated according to the following equation 5:
[0365] [Formula 5]
[0366]
[0367] The above template and left template described above can be used to compute linear model coefficients together, but can also be used individually in two other LM modes, LM_A mode and LM_L mode.
[0368] In LM_A mode, only the upper template is used to compute the linear model coefficients. To obtain more samples, the upper template is extended to (W+H). In LM_L mode, only the left template is used to compute the linear model coefficients. To obtain more samples, the left template is extended to (H+W).
[0369] For non-square blocks, the top template extends to W+W, and the left template extends to H+H.
[0370] To match the chroma sample positions in a 4:2:0 video sequence, luma samples are subjected to two types of downsampling filters to achieve a 2:1 downsampling ratio in both the horizontal and vertical directions. The choice of downsampling filter is specified by a flag at the SPS level.
[0371] For example, if the top reference line is located at the CTU boundary, only one luma line (the normal line buffer in intra prediction) is used to generate the downsampled luma samples.
[0372] This parameter calculation is performed as part of the decoding process and is not handled by a simple encoder search operation. Consequently, no syntax is used to pass the values of α and β to the decoder.
[0373] For chroma intra-mode coding, a total of eight intra-modes are allowed. These modes include five traditional intra-modes and three cross-component linear model modes (CCLM, LM_A, and LM_L). The signaling and derivation processes for the chroma modes are shown in Tables 1 and 2 below.
[0374] Chroma mode encoding directly depends on the intra prediction mode of the corresponding luma block. Since I-slices allow separate block partitioning structures for luma and chroma components, a single chroma block can correspond to multiple luma blocks. Therefore, for chroma DM mode, the intra prediction mode of the corresponding luma block, including the center position of the current chroma block, can be directly inherited.
[0375] Table 6 described below shows a mapping table for deriving an intra chroma prediction mode when CCLM is not available, and Table 7 shows a mapping table for deriving an intra prediction mode when CCLM is available. As shown in the tables, the intra chroma prediction mode can be determined based on the intra luma prediction mode for a luma block covering the center lower right sample of the current block or chroma block (e.g., when DUAL_TREE is applied) and the value of the signaled intra chroma prediction mode (intra_chroma_pred_mode) information. The indices of IntraPredModeC[ xCb ][ yCb ] derived in the tables below can correspond to the indices of the intra prediction modes described above.
[0376] [Table 6]
[0377]
[0378] [Table 7]
[0379]
[0380] Fig. 16 is a flowchart illustrating an example of a decoding method according to one embodiment.
[0381] A decoding method according to one embodiment can be performed by the decoding device (300) described above. In the embodiment described below, descriptions are made focusing on contents not described above to avoid redundant descriptions, and the description described below does not solely support the embodiment of the decoding method. Descriptions regarding the operation of the decoding device (300) described above and descriptions regarding the decoding method (e.g., FIGS. 4, 9, 12, 13, etc.) and descriptions regarding various prediction modes or prediction types can be equally applied to the embodiment of FIG. 16 as long as they do not conflict with each other.
[0382] Referring to FIG. 16, a decoding method according to one embodiment includes a step of obtaining prediction mode information from a bitstream (S1600), a step of constructing an MPM list for a current block (S1610), a step of deriving an intra prediction mode for the current block based on at least one of the MPM list or the prediction mode information (S1620), and a step of generating a reconstructed block for the current block based on the derived intra prediction mode (S1630).
[0383] Additionally, the step of configuring the MPM list (S1610) may include changing the order of the MPM list.
[0384] In the step (S1600) of obtaining prediction mode information from a bitstream, the prediction mode information may indicate information regarding the prediction mode of the current block. If the current block is an intra block to which the intra mode is applied, the prediction mode information may be intra prediction mode information.
[0385] As described above, the prediction mode information may include flag information (e.g., intra_luma_mpm_flag) indicating, for example, whether MPM or remaining mode is applied to the current block, and if MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) pointing to one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM list.
[0386] Additionally, if MPM is not applied to the current block, the prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the MPM candidates. The decoding device (300) may determine the intra prediction mode of the current block based on the prediction mode information.
[0387] The same explanation of the MPM list construction method described above may be applied to the step (S1610) of constructing the MPM list. To avoid duplication of explanation, the same explanation may be omitted here.
[0388] Meanwhile, the MPM list configured in step S1610 may include a Primary MPM list (PMPM list) or may include both a PMPM list and an SMPM candidate list (Secondary MPM list). For example, the size of the PMPM list may be 6, including the planar mode, and the size of the SMPM list may be 16. Accordingly, the size of the MPM list including both the PMPM list and the SMPM list may be 22. The size of each list may be a value defined in advance between the encoding device (200) and the decoding device (300).
[0389] FIG. 17 is a diagram showing an example of the order of surrounding intra prediction modes considered when constructing an MPM list in a decoding method according to one embodiment.
[0390] As illustrated in Fig. 17, an example of the MPM list configuration can be considered in the following order: planar mode → intra modes of adjacent blocks → DIMD modes → intra modes of non-adjacent surrounding blocks → intra modes derived from modes of the MPM list (+1, -1, +2, -2, ...), → default intra modes.
[0391] Additionally, the intra modes of adjacent blocks can be considered in the following order: left peripheral block intra mode → upper peripheral block intra mode → upper left peripheral block intra mode → upper right peripheral block intra mode → lower left peripheral block intra mode.
[0392] Intra prediction modes can be added to the MPM list in the above order until the size n (n is a natural number) of the MPM list is filled. In addition, when the MPM list includes both the PMPM list and the SMPM list, intra prediction modes can be added to the MPM list in the above order until the size n of the MPM list + the size m of the SMPM list (n and m are natural numbers) are filled. That is, a candidate list having a size of n+m can be constructed. As described above, n can be 6 and m can be 16, but the disclosed embodiment is not limited thereto, and may be any other value defined in advance between the encoding device (200) and the decoding device (300).
[0393] In this way, the order of intra prediction modes considered when constructing the MPM list can be defined in advance between the encoding device (200) and the decoding device (300), and it is also possible to change the order to a different order than the above. The change in the order of the MPM list will be described in detail later.
[0394] Figure 18 is a diagram showing an example of the locations of adjacent blocks considered when constructing an MPM list.
[0395] As illustrated in FIG. 17 described above, intra modes of adjacent blocks are considered when constructing an MPM list. At this time, the adjacent block may be a block at an adjacent position illustrated in FIG. 18. Specifically, the intra mode of the adjacent block may refer to an intra mode of a block including a left position relative to the current block, an intra mode of a block including an upper position, an intra mode of a block including an upper-left position, an intra mode of a block including an upper-right position, and an intra mode of a block including a lower-left position. However, these positions are merely examples, and the adjacent positions may be defined differently depending on the definition between the encoding device (200) and the decoding device (300).
[0396] As illustrated in the aforementioned Figure 17, the DIMD mode is considered when constructing the MPM list. Here, the intra mode added to the MPM list may refer to an intra mode induced by DIMD. It may include only one induced intra mode or multiple induced intra modes. For example, the encoding device (200) and the decoding device (300) may define the number in advance.
[0397] As illustrated in FIG. 17, the intra mode of non-adjacent blocks is considered when constructing the MPM list. At this time, the adjacent block may be a block at a non-adjacent position as illustrated in FIG. 18. That is, the intra mode of a non-adjacent block may refer to the intra mode of a block that is not adjacent to the current block, as illustrated in FIG. 18. The non-adjacent position may be defined according to an agreement between the encoding device (200) and the decoding device (300).
[0398] As illustrated in the aforementioned FIG. 17, the derived intra modes are considered when constructing the MPM list. Here, the derived intra modes may refer to the peripheral modes of the intra modes included in the MPM list. For example, when the included intra modes are {a, b, c, ...}, the derived intra modes may be a-1, a+1, a-2, a+2, a-3, a+3, b-1, b+1, b-2, b+2, b-3, b+3, c-1, c+1, c-2, c+2, c-3, c+3, ... This is just one example, and the derivation method, order, or range may be determined according to an agreement between the encoding device (200) and the decoding device (300).
[0399] Even if the MPM list is constructed in the order described above, if the intra modes are not filled to the size of the MPM list, they may be filled with the default intra mode, as illustrated in FIG. 17 described above. For example, the intra mode may include up to 87 encoding modes, including 20 wide angular modes and 65 general directional modes. In this case, the default intra mode can be DC_IDX, VER_IDX, HOR_IDX, VER_IDX - 4, VER_IDX + 4, HOR_IDX-4, HOR_IDX+4, VER_IDX - 8, VER_IDX + 8, HOR_IDX-8, HOR_IDX+8, VER_IDX - 12, VER_IDX + 12, HOR_IDX-12, HOR_IDX+12, 34, 66, 2, VER_IDX - 2, VER_IDX + 2, HOR_IDX-2. VER_IDX can mean a vertical direction mode (50), HOR_IDX can mean a horizontal direction mode (18), and modes 34 and 66 can mean modes of directions mapped to each number. This is an example, and a default mode can be defined according to an agreement between the encoding device (200) and the decoding device (300).
[0400] Meanwhile, according to the order of FIG. 17, if the adjacent block is a DIMD block, the MPM list is constructed using the intra mode of the adjacent DIMD block. The fact that the adjacent block is a DIMD block can indicate that DIMD has been applied to the adjacent block, i.e., that the adjacent block is coded with DIMD.
[0401] Figure 19 is a diagram showing a template area used for intra mode derivation when DIMD is applied to adjacent blocks.
[0402] Referring to (a) of Fig. 19, when DIMD is applied to an adjacent block of the current block, the template area applied to derive the intra mode of the adjacent block is the area indicated as the Neighboring DIMD template area, and referring to (b) of Fig. 19, the template area used to apply DIMD to the current block is the area indicated as the current DIMD template area. In this way, when the MPM list is constructed with the intra mode of the adjacent DIMD block, the MPM list is constructed with a mode derived using a template area far from the current block, as illustrated in (a) of Fig. 19. On the other hand, as illustrated in (b) of Fig. 19, a mode derived using a template area close to the current block may be more suitable for the current block.
[0403] Furthermore, even if the adjacent block is not a DIMD block, techniques that reorder based on error values in the template region, derive intra modes, or fuse multiple intra modes may have relatively low accuracy when applied to the current block. For example, even if the adjacent block is TIMD-coded, the DIMD of the current block may be more suitable than the intra mode of the adjacent block.
[0404] Accordingly, in a decoding method according to one embodiment, the pre-determined list configuration order (illustrated in FIG. 17) can be changed when configuring the MPM list (S1610). FIG. 20 is a diagram illustrating an example of the configuration order of the changed MPM list according to one embodiment.
[0405] Referring to Fig. 20, when constructing an MPM list according to the set order on the left, if there is an adjacent block coded with DIMD or TIMD among the adjacent blocks, the intra modes of the adjacent blocks excluding these can be considered in the next order of the planar mode, and then the DIMD mode can be considered first, and then the intra modes of the adjacent blocks coded with DIMD or TIMD can be considered.
[0406] As a specific example, if there is a DIMD-coded block among the adjacent blocks, the order of the MPM list can be changed to planar mode → intra modes of the adjacent block (excluding the DIMD-coded adjacent block) → DIMD modes → intra mode of the DIMD-coded adjacent block → intra modes of non-adjacent surrounding blocks → intra modes derived from the modes of the MPM list (+1, -1, +2, -2, ...) → default intra modes. There may be multiple DIMD-coded adjacent blocks around the current block. This case can also be applied equally to the above embodiment.
[0407] As another example, if the adjacent block is TIMD coded, the order of construction of the MPM list can be changed to planar mode → intra modes of the adjacent block (excluding the adjacent block coded with TIMD) → DIMD modes → intra mode of the adjacent block coded with TIMD → intra modes of non-adjacent surrounding blocks → intra modes derived from the modes of the MPM list (+1, -1, +2, -2, ...) → default intra modes.
[0408] Alternatively, multiple technologies may be considered together and changed. For example, if adjacent blocks are coded with DIMD and TIMD, the order of construction of the MPM list may be changed to planar mode → intra modes of adjacent blocks (excluding adjacent blocks coded with DIMD and TIMD) → DIMD modes → intra modes of adjacent blocks coded with DIMD and TIMD → intra modes of non-adjacent surrounding blocks → intra modes derived from the modes of the MPM list (+1, -1, +2, -2, ...) → default intra modes. At this time, when adding intra modes of adjacent blocks coded with DIMD and TIMD, the order between them may be defined in advance between the encoding device (200) and the decoding device (300). For example, when the search order is Left → Above → Above-Left → Above-Right → Left-Bottom, they may be added in the order of first appearance. Alternatively, a technology-specific priority can be established, with modes with higher priority being added first. For example, TIMD may have a higher priority than DIMD.
[0409] Alternatively, priorities can be set for each technology and the order of the MPM list can be changed according to the set priorities. For example, weights indicating priorities for each technology can be set, such as setting the weight (w) of regular mode to 4, the weight (w) of TMRL to 3, the weight (w) of TIMD to 2, and the weight (w) of SGPM to 1, and the weights can be added to the MPM list in descending order of weights. The weights indicating priorities for each technology can be defined between the encoding device (200) and the decoding device (300). For example, blocks coded using blending or multiple intra modes (such as DIMD, TIMD, and SGPM) may exhibit poor accuracy in MPM and / or SMPM that only use a single intra mode. Therefore, the weights can be set low for these technologies.
[0410] Alternatively, weights can be defined based on the selectivity of each technology. For example, assuming that DIMD has an average selectivity of 12%, TIMD 28%, TMRL 8%, and SGPM 7%, a mode with a high selectivity can be given a high weight based on this. In addition, these selectivities may vary from image to image, and may differ due to qp, etc. Accordingly, the encoding device (200) and the decoding device (300) can count the technologies selected for the current block and manage the selectivity in the form of a histogram, and set the weights based on this. The histogram can be initialized in units of specific units such as a picture, a slice, a CTU row, or a CTU. In addition, the order change can be defined in advance between the encoding device (200) and the decoding device (300) and applied only to some blocks. For example, the order can be changed only for the intra modes of adjacent blocks, and the order can be as follows. Planner mode → Intra modes of adjacent blocks (where the order changes according to priority) → DIMD modes → Intra modes of non-adjacent surrounding blocks → Intra modes derived from modes in the MPM list (+1, -1, +2, -2, ...) → Can be changed to default intra modes.
[0411] Alternatively, the order in which the MPM list is constructed can be changed by prioritizing each mode. For example, mode 18 (horizontal direction) can be given a weight of 4, mode 50 (vertical direction) can be given a weight of 3, modes 2 to 17 can be given a weight of 2, and modes 51 to 66 can be given a weight of 1, and the modes can be added to the MPM list in descending order of weight. The weights for each mode can be defined by an agreement between the encoding device (200) and the decoding device (300). For example, the weights can be defined based on the selectivity of each mode. For example, assuming that the DC mode, 50, 18, 46, 54, 14, 22, etc. have high selectivities on average, the mode with the high selectivity can be given a high weight based on this. In addition, these selectivities may vary depending on the image and may differ due to qp, etc. Accordingly, the encoding device (200) and the decoding device (300) can count the intra modes selected for the current block and manage the selection rate in the form of a histogram, and set the weights based on this. The histogram can be initialized in units of specific units such as a picture, a slice, a CTU row, or a CTU. In addition, the order change can be applied only to some blocks by defining it in advance between the encoder and the decoder. For example, the order can be changed only for the intra modes of adjacent blocks, and the order can be as follows. Planar mode → Intra modes of adjacent blocks (part where the order is changed according to priority) → DIMD modes → Intra modes of non-adjacent surrounding blocks → Intra modes derived from the modes of the MPM list (+1, -1, +2, -2, ...) → It can be changed to default intra modes.
[0412] Meanwhile, during the process of constructing the MPM list, if there are not enough reference samples to generate a prediction block in the intra mode of the surrounding blocks, i.e., if some of the reference samples are unavailable, they may be added later in the list rather than being added directly. For example, they may be added before the derived intra mode. The above embodiments related to changing the list order can be applied considering the partial MPM reordering described above. That is, the partial MPM reordering may be considered first, and then the list order change may be performed.
[0413] To indicate whether the order of the MPM list is changed, separate syntax information can be defined in high-level parameters such as VPS, SPS, APS, PPS, Picture Header, or Slice Header, and the order of the MPM list can be changed when the information has a specific value. For example, if the syntax value is 1, it can be determined that the order of the MPM list is changed. In this case, a syntax element indicating whether the order of the MPM list is changed can be included in the prediction mode information acquired from the bitstream.
[0414] Meanwhile, the reordering of the aforementioned MPM list may be applied in a limited manner depending on the size of the current block. For example, the reordering of the MPM list may be applied when the size of the current block (= width x height) is less than or equal to a reference value (K, where K is a natural number). Alternatively, it may also be applied when the size of the current block (= width x height) is greater than the reference value (K). For example, the reference value (K) may be 128, and may be set to a different value by being defined in advance by the encoding device (200) and the decoding device (300). In addition, the size of the current block may be given as a separate condition rather than a combined form of width and height. For example, the list reordering may be applied when the conditions width ≤ M and / or height ≤ N are satisfied, or when the conditions width > M and / or height > N are satisfied. (M and N are natural numbers and may be the same or different.)
[0415] Additionally, techniques that derive and utilize intra modes using template area error values, such as SGPM, TMRL, and TIMD, can construct lists by utilizing intra mode information of surrounding blocks, similar to constructing MPM lists. The above embodiments can also be applied to these techniques.
[0416] Figure 21 is a flowchart illustrating an example of an encoding method according to one embodiment.
[0417] An encoding method according to one embodiment can be performed by the encoding device (200) described above. In the embodiment described below, descriptions are made focusing on contents not described above to avoid redundant descriptions, and the description described below does not solely support the embodiment of the encoding method. The descriptions regarding the operation of the encoding device (200) described above, the descriptions regarding the encoding method (e.g., the descriptions regarding FIGS. 5, 7, 11, etc.), and the descriptions regarding various prediction modes or prediction types can be equally applied to the example of FIG. 21 as long as they do not conflict with each other.
[0418] Referring to FIG. 21, an encoding method according to one embodiment includes a step of configuring an MPM list (S1700), a step of determining an intra prediction mode for a current block (S1710), a step of generating residual information for the current block based on the determined intra prediction mode (S1720), and a step of encoding prediction mode information including information about the intra prediction mode and image information including the residual information (S1730).
[0419] Additionally, the step of configuring the MPM list (S1700) may include changing the order of the MPM list.
[0420] The description of the MPM list configuration in the embodiment of the decoding method described above can be equally applied to the MPM list configuration in the embodiment of the encoding method. The description of changing the order of the MPM list also applies equally.
[0421] Specifically, the MPM list configured in step S1700 may include a Primary MPM list (PMPM list) or may include both a PMPM list and an SMPM candidate list (Secondary MPM list). For example, the size of the PMPM list may be 6, including the planar mode, and the size of the SMPM list may be 16. Accordingly, the size of the MPM list including both the PMPM list and the SMPM list may be 22. The size of each list may be a value defined in advance between the encoding device (200) and the decoding device (300).
[0422] As illustrated in the aforementioned Figure 17, an example of the MPM list configuration can be considered in the following order: planar mode → intra modes of adjacent blocks → DIMD modes → intra modes of non-adjacent surrounding blocks → intra modes derived from modes of the MPM list (+1, -1, +2, -2, ...), → default intra modes.
[0423] Additionally, the intra modes of adjacent blocks can be considered in the following order: left peripheral block intra mode → upper peripheral block intra mode → upper left peripheral block intra mode → upper right peripheral block intra mode → lower left peripheral block intra mode.
[0424] Intra prediction modes can be added to the MPM list in the above order until the size n (n is a natural number) of the MPM list is filled. In addition, when the MPM list includes both the PMPM list and the SMPM list, intra prediction modes can be added to the MPM list in the above order until the size n of the MPM list + the size m of the SMPM list (n and m are natural numbers) are filled. That is, a candidate list having a size of n+m can be constructed. As described above, n can be 6 and m can be 16, but the disclosed embodiment is not limited thereto, and may be any other value defined in advance between the encoding device (200) and the decoding device (300).
[0425] In this way, the order of intra prediction modes considered when constructing the MPM list can be defined in advance between the encoding device (200) and the decoding device (300), and it is also possible to change the order to a different order than the above. The change in the order of the MPM list will be described in detail later.
[0426] When constructing an MPM list, the intra modes of adjacent blocks are considered. At this time, the adjacent block may be a block at an adjacent position as illustrated in FIG. 18 described above. Specifically, the intra mode of the adjacent block may refer to an intra mode of a block including a left position relative to the current block, an intra mode of a block including an upper position, an intra mode of a block including an upper-left position, an intra mode of a block including an upper-right position, and an intra mode of a block including a lower-left position. However, these positions are merely examples, and the adjacent positions may be defined differently depending on the definition between the encoding device (200) and the decoding device (300).
[0427] As illustrated in the aforementioned Figure 17, the DIMD mode is considered when constructing the MPM list. Here, the intra mode added to the MPM list may refer to an intra mode induced by DIMD. It may include only one induced intra mode or multiple induced intra modes. For example, the encoding device (200) and the decoding device (300) may define the number in advance.
[0428] As illustrated in FIG. 17 described above, the intra mode of non-adjacent blocks is considered when constructing the MPM list. At this time, the adjacent block may be a block at a non-adjacent position as illustrated in FIG. 18 described above. That is, the intra mode of a non-adjacent block may refer to the intra mode of a block that is not adjacent to the current block, as illustrated in FIG. 18. The non-adjacent position may be defined according to an agreement between the encoding device (200) and the decoding device (300).
[0429] As illustrated in the aforementioned FIG. 17, the derived intra modes are considered when constructing the MPM list. Here, the derived intra modes may refer to the peripheral modes of the intra modes included in the MPM list. For example, when the included intra modes are {a, b, c, 쪋}, the derived intra modes may be a-1, a+1, a-2, a+2, a-3, a+3, b-1, b+1, b-2, b+2, b-3, b+3, c-1, c+1, c-2, c+2, c-3, c+3, ... This is just one example, and the derivation method, order, or range may be determined according to an agreement between the encoding device (200) and the decoding device (300).
[0430] Even if the MPM list is configured in the order described above, if the intra modes are not filled to the size of the MPM list, they may be filled with the default intra mode, as illustrated in FIG. 17 described above. For example, the default intra mode may be DC_IDX, VER_IDX, HOR_IDX, VER_IDX - 4, VER_IDX + 4, HOR_IDX-4, HOR_IDX+4, VER_IDX - 8, VER_IDX + 8, HOR_IDX-8, HOR_IDX+8, VER_IDX - 12, VER_IDX + 12, HOR_IDX-12, HOR_IDX+12, 34, 66, 2, VER_IDX - 2, VER_IDX + 2, HOR_IDX-2. VER_IDX may refer to a vertical direction mode (50), HOR_IDX may refer to a horizontal direction mode (18), and modes 34 and 66 may refer to modes of directions mapped to each number. This is an example, and a default mode may be defined according to an agreement between an encoding device (200) and a decoding device (300).
[0431] Meanwhile, according to the order of FIG. 17 described above, if the adjacent block is a DIMD block, the MPM list is constructed using the intra mode of the adjacent DIMD block. The fact that the adjacent block is a DIMD block can indicate that DIMD has been applied to the adjacent block, i.e., that the adjacent block is coded with DIMD.
[0432] Referring to (a) of FIG. 19 described above, when DIMD is applied to an adjacent block of the current block, the template area applied to derive the intra mode of the adjacent block is the area indicated as the Neighboring DIMD template area, and referring to (b) of FIG. 19, the template area used to apply DIMD to the current block is the area indicated as the current DIMD template area. In this way, when the MPM list is constructed with the intra mode of the adjacent DIMD block, the MPM list is constructed with a mode derived using a template area far from the current block, as illustrated in (a) of FIG. 19. On the other hand, as illustrated in (b) of FIG. 19, a mode derived using a template area close to the current block may be more suitable for the current block.
[0433] Furthermore, even if the adjacent block is not a DIMD block, techniques that reorder based on error values in the template region, derive intra modes, or fuse multiple intra modes may have relatively low accuracy when applied to the current block. For example, even if the adjacent block is TIMD-coded, the DIMD of the current block may be more suitable than the intra mode of the adjacent block.
[0434] Therefore, in an encoding method according to one embodiment, the predetermined list configuration order can be changed when configuring the MPM list (S1710).
[0435] Referring to the above-described Figure 20, when constructing an MPM list according to the set order on the left, if there is an adjacent block coded with DIMD or TIMD among the adjacent blocks, the intra modes of the adjacent blocks excluding these can be considered in the next order of the planar mode, and then the DIMD mode can be considered first, and then the intra modes of the adjacent blocks coded with DIMD or TIMD can be considered.
[0436] As a specific example, if there is a DIMD-coded block among the adjacent blocks, the order of the MPM list can be changed to planar mode → intra modes of the adjacent block (excluding the DIMD-coded adjacent block) → DIMD modes → intra mode of the DIMD-coded adjacent block → intra modes of non-adjacent surrounding blocks → intra modes derived from the modes of the MPM list (+1, -1, +2, -2, ...) → default intra modes. There may be multiple DIMD-coded adjacent blocks around the current block. This case can also be applied equally to the above embodiment.
[0437] As another example, if the adjacent block is TIMD coded, the order of construction of the MPM list can be changed to planar mode → intra modes of the adjacent block (excluding the adjacent block coded with TIMD) → DIMD modes → intra mode of the adjacent block coded with TIMD → intra modes of non-adjacent surrounding blocks → intra modes derived from the modes of the MPM list (+1, -1, +2, -2, ...) → default intra modes.
[0438] Alternatively, multiple technologies may be considered together and changed. For example, if adjacent blocks are coded with DIMD and TIMD, the order of construction of the MPM list may be changed to planar mode → intra modes of adjacent blocks (excluding adjacent blocks coded with DIMD and TIMD) → DIMD modes → intra modes of adjacent blocks coded with DIMD and TIMD → intra modes of non-adjacent surrounding blocks → intra modes derived from the modes of the MPM list (+1, -1, +2, -2, ...) → default intra modes. At this time, when adding intra modes of adjacent blocks coded with DIMD and TIMD, the order between them may be defined in advance between the encoding device (200) and the decoding device (300). For example, when the search order is Left → Above → Above-Left → Above-Right → Left-Bottom, they may be added in the order of first appearance. Alternatively, a technology-specific priority can be established, with modes with higher priority being added first. For example, TIMD may have a higher priority than DIMD.
[0439] Alternatively, priorities can be set for each technology and the order of the MPM list can be changed according to the set priorities. For example, weights indicating priorities for each technology can be set, such as setting the weight (w) of regular mode to 4, the weight (w) of TMRL to 3, the weight (w) of TIMD to 2, and the weight (w) of SGPM to 1, and the weights can be added to the MPM list in descending order of weights. The weights indicating priorities for each technology can be defined between the encoding device (200) and the decoding device (300). For example, blocks coded using blending or multiple intra modes (such as DIMD, TIMD, and SGPM) may exhibit poor accuracy in MPM and / or SMPM that only use a single intra mode. Therefore, the weights can be set low for these technologies.
[0440] Alternatively, weights can be defined based on the selectivity of each technology. For example, assuming that DIMD has an average selectivity of 12%, TIMD 28%, TMRL 8%, and SGPM 7%, a mode with a high selectivity can be given a high weight based on this. In addition, these selectivities may vary from image to image, and may differ due to qp, etc. Accordingly, the encoding device (200) and the decoding device (300) can count the technologies selected for the current block and manage the selectivity in the form of a histogram, and set the weights based on this. The histogram can be initialized in units of specific units such as a picture, a slice, a CTU row, or a CTU. In addition, the order change can be defined in advance between the encoding device (200) and the decoding device (300) and applied only to some blocks. For example, the order can be changed only for the intra modes of adjacent blocks, and the order can be as follows. Planner mode → Intra modes of adjacent blocks (where the order changes according to priority) → DIMD modes → Intra modes of non-adjacent surrounding blocks → Intra modes derived from modes in the MPM list (+1, -1, +2, -2, ...) → Can be changed to default intra modes.
[0441] Alternatively, the order in which the MPM list is constructed can be changed by prioritizing each mode. For example, mode 18 (horizontal direction) can be given a weight of 4, mode 50 (vertical direction) can be given a weight of 3, modes 2 to 17 can be given a weight of 2, and modes 51 to 66 can be given a weight of 1, and the modes can be added to the MPM list in descending order of weight. The weights for each mode can be defined by an agreement between the encoding device (200) and the decoding device (300). For example, the weights can be defined based on the selectivity of each mode. For example, assuming that the DC mode, 50, 18, 46, 54, 14, 22, etc. have high selectivities on average, the mode with the high selectivity can be given a high weight based on this. In addition, these selectivities may vary depending on the image and may differ due to qp, etc. Accordingly, the encoding device (200) and the decoding device (300) can count the intra modes selected for the current block and manage the selection rate in the form of a histogram, and set the weights based on this. The histogram can be initialized in units of specific units such as a picture, a slice, a CTU row, or a CTU. In addition, the order change can be applied only to some blocks by defining it in advance between the encoder and the decoder. For example, the order can be changed only for the intra modes of adjacent blocks, and the order can be as follows. Planar mode → Intra modes of adjacent blocks (part where the order is changed according to priority) → DIMD modes → Intra modes of non-adjacent surrounding blocks → Intra modes derived from the modes of the MPM list (+1, -1, +2, -2, ...) → It can be changed to default intra modes.
[0442] Meanwhile, during the process of constructing the MPM list, if there are not enough reference samples to generate a prediction block in the intra mode of the surrounding blocks, i.e., if some of the reference samples are unavailable, they may be added later in the list rather than being added directly. For example, they may be added before the derived intra mode. The above embodiments related to changing the list order can be applied considering the partial MPM reordering described above. That is, the partial MPM reordering may be considered first, and then the list order change may be performed.
[0443] In order to indicate whether the order of the MPM list is changed, separate syntax information is defined in a high-level parameter such as VPS, SPS, APS, PPS, Picture Header, or Slice Header, and the order of the MPM list can be changed when the information has a specific value. For example, if the syntax value is 1, it can be determined that the order of the MPM list is changed. In this case, a syntax element indicating whether the order of the MPM list is changed can be included in the prediction mode information encoded in step S1730.
[0444] Meanwhile, the reordering of the aforementioned MPM list may be applied in a limited manner depending on the size of the current block. For example, the reordering of the MPM list may be applied when the size of the current block (= width x height) is less than or equal to a reference value (K, where K is a natural number). Alternatively, it may also be applied when the size of the current block (= width x height) is greater than the reference value (K). For example, the reference value (K) may be 128, and may be set to a different value by being defined in advance by the encoding device (200) and the decoding device (300). In addition, the size of the current block may be given as a separate condition rather than a combined form of width and height. For example, the list reordering may be applied when the conditions width ≤ M and / or height ≤ N are satisfied, or when the conditions width > M and / or height > N are satisfied. (M and N are natural numbers and may be the same or different.)
[0445] Additionally, techniques that derive and utilize intra modes using template area error values, such as SGPM, TMRL, and TIMD, can construct lists by utilizing intra mode information of surrounding blocks, similar to constructing MPM lists. The above embodiments can also be applied to these techniques.
[0446] FIG. 22 is a flowchart of another example of a decoding method according to one embodiment.
[0447] A decoding method according to one embodiment can be performed by the decoding device (300) described above. In the embodiment described below, descriptions are made focusing on contents not described above to avoid redundant descriptions, and the description described below does not solely support the embodiment of the decoding method. The descriptions regarding the operation of the decoding device (300) described above, the descriptions regarding the decoding method (e.g., FIGS. 4, 9, 12, 13, etc.), and the descriptions regarding various prediction modes or prediction types can be equally applied to the embodiment of FIG. 22 as long as they do not conflict with each other.
[0448] Referring to FIG. 22, a decoding method according to one embodiment includes a step of obtaining prediction mode information from a bitstream (S1800), a step of constructing an MPM list for a current block (S1810), a step of deriving an intra prediction mode for the current block based on at least one of the MPM list or the prediction mode information (S1820), and a step of generating a reconstructed block for the current block based on the derived intra prediction mode (S1830).
[0449] Additionally, the step of constructing the MPM list (S1810) may include performing template-based sorting on the MPM list.
[0450] In the step (S1800) of obtaining prediction mode information from a bitstream, the prediction mode information may indicate information regarding the prediction mode of the current block. If the current block is an intra block to which the intra mode is applied, the prediction mode information may be intra prediction mode information.
[0451] As described above, the prediction mode information may include flag information (e.g., intra_luma_mpm_flag) indicating, for example, whether MPM or remaining mode is applied to the current block, and if MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) pointing to one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM list.
[0452] Additionally, if MPM is not applied to the current block, the prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the MPM candidates. The decoding device (300) may determine the intra prediction mode of the current block based on the prediction mode information.
[0453] The description of the MPM list construction method described above may be applied equally to the step (S1810) of constructing the MPM list. For example, the descriptions of FIGS. 17 and 18 described above may be applied equally to the present embodiment. To avoid duplication of explanation, the same description may be omitted herein.
[0454] Fig. 23 is a flowchart showing an example of a process for constructing an MPM list in a decoding method according to one embodiment.
[0455] Referring to Figure 23, the MPM list can be constructed by adding intra modes in the order shown until the size n (n is a natural number) of the MPM list is filled.
[0456] When constructing an MPM list, intra modes can be added to the MPM list in the order shown in Fig. 23 until the size n of the MPM list + the size m of the SMPM list (m is a natural number) are filled. That is, a list having a size of n+m can be constructed, and the n in front can represent an MPM list and the m in the back can represent an SMPM list. For example, the size of the MPM list can be 6 including the planar mode. The size of the SMPM list can be 16. The size of each list is not limited to the values exemplified above, and may be determined to a different value according to an agreement between the encoding device (200) and the decoding device (300).
[0457] As illustrated in FIG. 23, a process of sorting the list may be included in the construction of the MPM list. In the present embodiment, sorting the list may mean reordering the list. For example, for the intra modes included in the list, an error value between a predicted block predicted from the template region and an actual reconstructed sample may be calculated, and then the intra modes may be sorted in order of the smallest error value. As an error calculation method, SAD (Sum of absolute difference), SATD (Sum of absolute transformed difference), SSE (Sum of squared error), MR-SAD (Mean-removed sum of absolute difference), MR-SSE (Mean-removed sum of squared error), MR-SATD (Mean-removed sum of absolute transformed difference), etc. may be used.
[0458] List sorting can be performed based on the size of the current block. For example, it can be performed when the size of the current block (= width x height) is less than or equal to K. For example, K can be 128, and the encoding device (200) and the decoding device (300) can also define it in advance and set it to another value. The condition for the size of the current block is not limited to the above example, and it can be performed when the size of the current block is greater than K, or a separate condition can be applied to each, rather than a combined form of width and height, as a condition for determining the size of the current block. In addition, the planar mode can be excluded from the sorting candidates. In addition, the number of intra modes to be sorted can be limited so as not to exceed a specific number. For example, it can be M excluding the planar mode. In an example, M can be 7. In addition, only N of the M sorted intra modes can be used. In an example, N can be 5. That is, among the seven sorted intra modes, only the five intra modes with smaller error values can be used. Thereafter, a process for obtaining "derived intra modes" for the five modes can be performed. M and N can be defined in advance by the encoding device (200) and the decoding device (300), and can be specified as values other than 7 and 5. If the MPM list is not filled with enough intra modes and M is smaller than N, N can be the same value as M. The K, M, N values and conditions applied to the MPM list sorting can be determined differently depending on the slice type. For example, in the case of I-Slice, K=128, M=7, N=5, and in the case of non-I-Slice, K=1024, M=21, N=5.
[0459] Meanwhile, since the aforementioned list sorting determines similarity with the current block based on the template area, the sorting result may not be accurate in some cases.
[0460] Figure 24 is a diagram showing examples of cases that may occur when applying template-based sorting when constructing an MPM list.
[0461] Referring to FIG. 24, (a) when texture information that is important for determining similarity with the current block, such as an edge, is outside the template area, (b) when the upper template of the current block has a high similarity with the current block and thus a small error value, but the left template has a low similarity with the current block and thus a large error value, (c) when the left template of the current block has a high similarity with the current block and thus a small error value, but the upper template has a low similarity with the current block and thus a large error value, this is the case. In these cases, even if it is the intra mode that is most suitable for the current block, the error value may be large, and the calculation result and the list sorting result may be inaccurate.
[0462] As an example of a method for resolving the problem of inaccurate list sorting results when the similarity between adjacent template regions and the current block is low, the template region for error calculation can be adaptively determined. For example, for the intra mode, which primarily uses reference samples located to the left of the current block, the error value can be calculated using only the left template region. Furthermore, for the intra mode, which primarily uses reference samples located above the current block, the error value can be calculated using only the upper template region.
[0463] For example, an intra mode that uses only the left template region may be modes 2 to 18. Additionally, an intra mode that uses only the upper template region may be modes 50 to 66. Other intra modes may use both the left and upper template regions. However, this is only one example applicable to a decoding method according to one embodiment, and the range of the template region defined for each intra mode may be defined in advance as a different range by the encoding device (200) and the decoding device (300).
[0464] Since different template areas can be used depending on the intra mode, the error value can be divided by the number of pixels in the template area used to calculate the error value in order to accurately compare the error value between intra modes. In other words, the comparison can be made by the average of the error values, and when the error value of intra mode i is cost(i), the average of the error value of intra mode i is expressed as cost(i) / N or cost(i)>>k, so that the error values between different intra modes can be compared. Here, N is the number of pixels in the template area, and k is 2. k =N can mean a value that satisfies N.
[0465] In addition, the size of the template area can be determined based on the size of the current block. For example, if the size of the current block (= width x height) is less than or equal to 128, the upper template area can use the width of the current block x 1, and the left template area can use 1 x the height of the current block. If the size of the current block is greater than 128, the upper template area can use the width of the current block x 2, and the left template area can use 2 x the height of the current block. The size of the template area determined here and the conditions for determining the size of the template area are only examples, and the encoding device (200) and the decoding device (300) may define in advance and determine other conditions and reference values.
[0466] Alternatively, the size of the template area may be determined based on the length of the current block. For example, if the height of the current block is less than or equal to 16, the left template area may use (1 x the height of the current block), and if the height of the current block is greater than 16, the left template area may use (2 x the height of the current block). The upper template area, which is determined according to the size of the width of the current block, may also be determined in the same manner as in the above example. For example, in the case of a 32x16 block, the left template area may have a size of 1x16, and the upper template area may have a size of 32x2. The conditions for the size of the template area determined here and the current block length that determines the template area size are merely examples, and the encoding device (200) and the decoding device (300) may define them in advance and determine them to different values.
[0467] In addition, the example can be applied in combination with the example of Fig. 16 described above. For example, template-based sorting can be performed according to the method described above for small blocks, and the order change of the MPM list described above can be applied to other blocks. For example, the template-based sorting method can be performed for blocks whose current block size is less than or equal to 128, and the order of the MPM list can be changed as in the example of Fig. 16 for blocks whose current block size is greater than 128. The block size and conditions for determining whether to apply template-based sorting or change the order of the MPM list can be configured in various combinations, and these can be defined in advance by the encoding device (200) and the decoding device (300). Alternatively, when there are multiple modes with the same error value during template-based sorting, the order can be changed by prioritizing the modes based on the example of Fig. 16.
[0468] Meanwhile, during the process of constructing the MPM list, if there are not enough reference samples to generate a prediction block in the intra mode of the surrounding blocks, i.e., if some of the reference samples are not available, they may be added later rather than being added directly to the list. For example, they may be added before the derived intra mode. The above embodiments related to template-based alignment can be applied by taking into account the partial MPM reordering described above. That is, the partial MPM reordering may be considered first, and then the template-based alignment may be performed.
[0469] In order to indicate whether the above-described template-based list sorting is performed, separate syntax information may be defined in a high level parameter such as VPS, SPS, APS, PPS, Picture Header, or Slice Header, and the template-based list sorting may be performed when the information has a specific value. For example, if the syntax value is 1, it may be determined that the template-based list sorting is performed. In this case, a syntax element indicating whether the template-based list sorting is performed may be included in the prediction mode information acquired from the bitstream.
[0470] Additionally, techniques that derive and utilize intra-modes using template area error values, such as SGPM, TMRL, and TIMD, can construct lists by utilizing intra-mode information from surrounding blocks, similar to constructing MPM and SMPM lists. These techniques can also be applied to the aforementioned template-based list sorting.
[0471] Figure 25 is a flowchart illustrating an example of an encoding method according to one embodiment.
[0472] An encoding method according to one embodiment can be performed by the encoding device (200) described above. In the embodiment described below, descriptions are made focusing on contents not described above to avoid redundant descriptions, and the description described below does not solely support the embodiment of the encoding method. The descriptions regarding the operation of the encoding device (200) described above, the descriptions regarding the encoding method (e.g., the descriptions regarding FIGS. 5, 7, 11, etc.), and the descriptions regarding various prediction modes or prediction types can be equally applied to the example of FIG. 25 as long as they do not conflict with each other.
[0473] Referring to FIG. 25, an encoding method according to one embodiment includes a step of configuring an MPM list (S1900), a step of determining an intra prediction mode for a current block (S1910), a step of generating residual information for the current block based on the determined intra prediction mode (S1920), and a step of encoding prediction mode information including information about the intra prediction mode and image information including the residual information (S1930).
[0474] Additionally, the step of constructing the MPM list (S1900) may include performing template-based sorting on the MPM list.
[0475] The description of the MPM list configuration in the embodiment of the decoding method described above can be equally applied to the MPM list configuration in the embodiment of the encoding method. The description of the sorting of the MPM list also applies equally.
[0476] Specifically, as an example of a method for addressing the problem of inaccurate list sorting results when the similarity between adjacent template regions and the current block is low, the template region for error calculation can be adaptively determined. For example, for an intra mode that primarily uses reference samples located to the left of the current block, the error value can be calculated using only the left template region. Furthermore, for an intra mode that primarily uses reference samples located above the current block, the error value can be calculated using only the upper template region.
[0477] For example, an intra mode that uses only the left template area may be modes 2 to 18. Additionally, an intra mode that uses only the upper template area may be modes 50 to 66. Other intra modes may use both the left and upper template areas. However, this is only one example applicable to an encoding method according to one embodiment, and the range of the template area defined for each intra mode may be defined in advance as a different range by the encoding device (200) and the decoding device (300).
[0478] Since different template areas can be used depending on the intra mode, the error value can be divided by the number of pixels in the template area used to calculate the error value in order to accurately compare the error value between intra modes. In other words, the comparison can be made by the average of the error values, and when the error value of intra mode i is cost(i), the average of the error value of intra mode i is expressed as cost(i) / N or cost(i)>>k, so that the error values between different intra modes can be compared. Here, N is the number of pixels in the template area, and k is 2. k =N can mean a value that satisfies N.
[0479] In addition, the size of the template area can be determined based on the size of the current block. For example, if the size of the current block (= width x height) is less than or equal to 128, the upper template area can use the width of the current block x 1, and the left template area can use 1 x the height of the current block. If the size of the current block is greater than 128, the upper template area can use the width of the current block x 2, and the left template area can use 2 x the height of the current block. The size of the template area determined here and the conditions for determining the size of the template area are only examples, and the encoding device (200) and the decoding device (300) may define in advance and determine other conditions and reference values.
[0480] Alternatively, the size of the template area may be determined based on the length of the current block. For example, if the height of the current block is less than or equal to 16, the left template area may use (1 x the height of the current block), and if the height of the current block is greater than 16, the left template area may use (2 x the height of the current block). The upper template area, which is determined according to the size of the width of the current block, may also be determined in the same manner as in the above example. For example, in the case of a 32x16 block, the left template area may have a size of 1x16, and the upper template area may have a size of 32x2. The conditions for the size of the template area determined here and the current block length that determine the template area size are merely examples, and the encoding device (200) and the decoding device (300) may define them in advance and determine them to different values.
[0481] In addition, the example can be applied in combination with the example of FIG. 21 described above. For example, template-based sorting can be performed according to the method described above for small blocks, and the order change of the MPM list described above can be applied to other blocks. For example, the template-based sorting method can be performed for blocks whose current block size is less than or equal to 128, and the order of the MPM list can be changed as in the example of FIG. 16 for blocks whose current block size is greater than 128. The block size and conditions for determining whether to apply template-based sorting or change the order of the MPM list can be configured in various combinations, and these can be defined in advance by the encoding device (200) and the decoding device (300). Alternatively, when there are multiple modes with the same error value during template-based sorting, the order can be changed by prioritizing the modes based on the example of FIG. 21.
[0482] Meanwhile, during the process of constructing the MPM list, if there are not enough reference samples to generate a prediction block in the intra mode of the surrounding blocks, i.e., if some of the reference samples are not available, they may be added later rather than being added directly to the list. For example, they may be added before the derived intra mode. The above embodiments related to template-based alignment can be applied by taking into account the partial MPM reordering described above. That is, the partial MPM reordering may be considered first, and then the template-based alignment may be performed.
[0483] In order to indicate whether the above-mentioned template-based list sorting is performed, separate syntax information may be defined in a high level parameter such as VPS, SPS, APS, PPS, Picture Header, or Slice Header, and the template-based list sorting may be performed when the information has a specific value. For example, if the syntax value is 1, it may be determined that the template-based list sorting is performed. In this case, a syntax element indicating whether the template-based list sorting is performed may be included in the prediction mode information encoded in step S1930.
[0484] Additionally, techniques that derive and utilize intra-modes using template area error values, such as SGPM, TMRL, and TIMD, can construct lists by utilizing intra-mode information from surrounding blocks, similar to constructing MPM and SMPM lists. These techniques can also be applied to the aforementioned template-based list sorting.
[0485] FIG. 26 is a flowchart illustrating another example of a decoding method according to one embodiment.
[0486] A decoding method according to one embodiment can be performed by the decoding device (300) described above. In the embodiment described below, descriptions are made focusing on contents not described above to avoid redundant descriptions, and the description described below does not solely support the embodiment of the decoding method. The descriptions regarding the operation of the decoding device (300) described above, the descriptions regarding the decoding method (e.g., FIGS. 4, 9, 12, 13, etc.), and the descriptions regarding various prediction modes or prediction types can be equally applied to the embodiment of FIG. 26 as long as they do not conflict with each other.
[0487] Referring to FIG. 26, a decoding method according to one embodiment includes a step of obtaining prediction mode information from a bitstream (S2000), a step of constructing an MPM list for a current block (S2010), a step of deriving an intra prediction mode for the current block based on at least one of the MPM list or the prediction mode information (S2020), and a step of generating a reconstructed block for the current block based on the derived intra prediction mode (S2030).
[0488] Additionally, the step of constructing the MPM list (S2010) may include performing histogram-based sorting on the MPM list.
[0489] In the step (S2200) of obtaining prediction mode information from a bitstream, the prediction mode information may indicate information regarding the prediction mode of the current block. If the current block is an intra block to which the intra mode is applied, the prediction mode information may be intra prediction mode information.
[0490] As described above, the prediction mode information may include flag information (e.g., intra_luma_mpm_flag) indicating, for example, whether MPM or remaining mode is applied to the current block, and if MPM is applied to the current block, the prediction mode information may further include index information (e.g., intra_luma_mpm_idx) pointing to one of the intra prediction mode candidates (MPM candidates). The intra prediction mode candidates (MPM candidates) may be configured as an MPM list.
[0491] Additionally, if MPM is not applied to the current block, the prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the MPM candidates. The decoding device (300) may determine the intra prediction mode of the current block based on the prediction mode information.
[0492] The description of the MPM list construction method described above can be applied equally to the step (S2410) of constructing the MPM list. For example, the descriptions of FIGS. 17 and 18 described above can be applied equally to the present embodiment. To avoid duplication of explanation, the same description may be omitted here.
[0493] Fig. 27 is a diagram showing an example of a correlation between a current block and surrounding blocks, and Fig. 28 is a diagram showing an example of a histogram constructed by collecting intra mode information of surrounding blocks.
[0494] The current block and surrounding blocks can be highly correlated. This is because when the image at the current block location has specific texture information (e.g., edges), surrounding blocks may also have the same or similar texture information. As illustrated in Figure 27, if a surrounding block is selected in mode 12, the current block is also likely to be selected in mode 12. Therefore, using information from surrounding blocks, the MPM list can be sorted in the order of the intra mode that best suits the current block.
[0495] For example, the number of intra modes applied to the surrounding blocks of the current block can be accumulated to form a histogram as illustrated in Fig. 28. For example, as in Equation 4 below, the number of intra modes applied to the surrounding blocks can be calculated by accumulating 1. Based on this, the MPM list can be sorted in order of intra modes with high values. a can be any positive integer, for example, 1.
[0496] [Formula 6]
[0497] Histogram[intra prediction mode] += a
[0498] Figure 29 is a diagram showing an example of the correlation between the current block and surrounding blocks, and is a diagram showing an example of a case where the sizes of the surrounding blocks are different.
[0499] The sizes of surrounding blocks can vary. As in the example of Figure 29, if the sizes of surrounding blocks are different, even though mode 12 is used in the widest area of the surrounding blocks, the number of modes 18 is greater, so the histogram cumulative value of mode 18 may be higher.
[0500] Therefore, according to an embodiment of the decoding method, a histogram can be constructed based on the sizes of the surrounding blocks of the current block. Specifically, the histogram can be constructed by accumulating the sizes (width * height), and the sizes of the surrounding blocks can be calculated by accumulating them in the intra mode of the surrounding blocks, as shown in Equation 7 below. Based on this, the MPM list can be sorted in order of the intra mode with the highest value.
[0501] [Formula 7]
[0502] Histogram[intra prediction mode] += width * height
[0503] Meanwhile, blocks coded using techniques such as DIMD, TIMD, and SGPM can store multiple intra modes because they are predicted using multiple intra modes. If multiple intra modes are stored in neighboring blocks, a histogram can be constructed based on the multiple stored intra prediction modes. For example, if neighboring blocks are in DIMD mode and five intra modes (mode 1 to mode 5) are used, the histogram can be accumulated as in Equation 8 or Equation 9 below. While DIMD is described as an example, the same method can be applied to other techniques that store multiple intra modes.
[0504] [Formula 8]
[0505] Histogram[mode 1] += width * height
[0506] Histogram[mode 2] += width * height
[0507] Histogram[mode 3] += width * height
[0508] Histogram[mode 4] += width * height
[0509] Histogram[mode 5] += width * height
[0510] [Formula 9]
[0511] Histogram[mode 1] += a
[0512] Histogram[mode 2] += a
[0513] Histogram[mode 3] += a
[0514] Histogram[mode 4] += a
[0515] Histogram[mode 5] += a
[0516] In addition, when multiple modes are blended, the weights of each mode may differ when generating a prediction block. In this case, histograms can be accumulated based on the weights of each of the multiple intra prediction modes applied to the surrounding blocks. For example, if the surrounding block is a DIMD mode, five modes (mode 1 to mode 5) are used, and the ratio of the weights applied to each mode is rate 1 to rate 5 (rate 1 + rate 2 + rate 3 + rate 4 + rate 5 = 1), the histograms can be accumulated as in Equation 8 or Equation 9 below. Although DIMD is described as an example, the same method can be applied to other technologies in which multiple intra modes are stored.
[0517] [Formula 10]
[0518] Histogram[mode 1] += width * height * rate 1
[0519] Histogram[mode 2] += width * height * rate 2
[0520] Histogram[mode 3] += width * height * rate 3
[0521] Histogram[mode 4] += width * height * rate 4
[0522] Histogram[mode 5] += width * height * rate 5
[0523] [Formula 11]
[0524] Histogram[mode 1] += a * rate 1
[0525] Histogram[mode 2] += a * rate 2
[0526] Histogram[mode 3] += a * rate 3
[0527] Histogram[mode 4] += a * rate 4
[0528] Histogram[mode 5] += a * rate 5
[0529] For example, the number of neighboring blocks used for histogram accumulation can be at most P. P can be, for example, 20. The neighboring blocks used for histogram accumulation can be both adjacent blocks and non-adjacent blocks. The positions of the neighboring blocks can be defined by an agreement between the encoding device (200) and the decoding device (300). In addition, the neighboring blocks used for histogram accumulation can be determined in order of proximity to the current block. For example, if P neighboring blocks are found, but a neighboring block closer to the current block exists during an additional search, that block can be included in the P blocks instead of the existing block with a longer distance.
[0530] FIG. 30 is a diagram showing an example of a range of surrounding blocks set for histogram configuration in a decoding method according to one embodiment.
[0531] Referring to a neighboring block that is too far away from the current block may result in poor correlation. Therefore, the search for neighboring blocks may be limited to a set range from the current block. For example, the search for neighboring blocks may be limited to a range where the sum of the x distance and the y distance from the upper left position of the current block is less than 64. Alternatively, as illustrated in FIG. 30, the search range may be limited by setting the values r1 to r4. For example, this may mean r1=2*W, r2=2*H, r3=2*W, r4=2*H. However, this is just one example, and other values may be determined by defining them in advance between the encoding device (200) and the decoding device (300).
[0532] Meanwhile, it is also possible for the above-described embodiments or examples to be combined with each other.
[0533] For example, the histogram-based MPM list sorting method described above can also be combined with the template-based MPM list sorting method described in FIG. 22. For example, depending on the size of the current block, the MPM list can be sorted based on the histogram or based on the template. Specifically, the template-based MPM list sorting described in FIG. 22 can be performed for small blocks for which the template-based sorting is relatively accurate, and the histogram-based MPM list sorting described in FIG. 26 can be applied to other blocks. That is, the MPM list can be sorted based on the template based on whether the size of the current block is less than or equal to a reference size, and the MPM list can be sorted based on the histogram based on whether the size of the current block exceeds the reference size. For example, the template-based MPM list sorting can be performed for blocks whose current block size is less than or equal to 128, and the histogram-based MPM list sorting can be performed for blocks whose current block size is greater than 128. However, this is just one example, and other combinations can be used depending on the block size and conditions, which can be defined in advance between the encoding device (200) and the decoding device (300).
[0534] In addition, it is also possible to combine the histogram-based MPM list sorting method described above with the MPM list ordering method described in FIG. 16. For example, depending on the size of the current block, the MPM list may be sorted based on the histogram, or a template-based candidate prediction mode (e.g., DIMD or TIMD) among the candidate prediction modes included in the MPM list may be changed to a lower priority. Specifically, the histogram-based sorting may be performed for small blocks, and the MPM list ordering method described in FIG. 16 may be performed for other blocks. That is, the MPM list may be sorted based on the histogram based on whether the size of the current block is smaller than or equal to a reference size, and a template-based candidate prediction mode (e.g., DIMD or TIMD) among the candidate prediction modes included in the MPM list may be changed to a lower priority based on whether the size of the current block exceeds the reference size. Alternatively, if there are multiple modes with the same histogram value during histogram-based sorting, the modes can be reordered by prioritizing them based on the reordering criteria described in Fig. 16. For example, if an adjacent block is a block coded with DIMD, the intra modes of the adjacent block can be reordered to a lower priority.
[0535] In addition, the MPM list can be configured by combining various methods such as changing the order of the MPM list, template-based MPM list sorting, and histogram-based MPM list sorting.
[0536] It is also possible to combine reordering of the MPM list with template-based MPM list sorting, or to combine reordering of the MPM list, template-based MPM list sorting, and histogram-based MPM list sorting. Such combinations can be predefined between the encoding device (200) and the decoding device (300).
[0537] Meanwhile, during the process of constructing the MPM list, if there are not enough reference samples to generate a prediction block in the intra mode of the surrounding blocks, i.e., if some of the reference samples are not available, they may be added later rather than being added directly to the list. For example, they may be added before the “derived intra mode.” The above embodiments related to MPM list sorting can be applied by taking into account the partial MPM reordering described above. That is, the partial MPM reordering may be considered first, and then the MPM list sorting may be performed.
[0538] Whether to sort the MPM list based on histogram can be determined by defining separate syntax information in high-level parameters such as VPS, SPS, APS, PPS, Picture Header, or Slice Header, and histogram-based MPM list sorting can be applied when the information has a specific value. For example, if the value of the syntax is 1, it can be determined to perform histogram-based MPM list sorting. In this case, a syntax element indicating whether to sort the MPM list based on histogram can be included in the prediction mode information acquired from the bitstream.
[0539] Additionally, techniques for deriving and utilizing intra modes using error values for template regions, such as SGPM, TMRL, and TIMD, can construct lists by utilizing intra mode information of surrounding blocks, similar to constructing MPM and SMPM lists. The above embodiments can also be applied to these techniques.
[0540] FIG. 31 is a flowchart illustrating another example of an encoding method according to one embodiment.
[0541] An encoding method according to one embodiment can be performed by the encoding device (200) described above. In the embodiment described below, descriptions are made focusing on contents not described above to avoid redundant descriptions, and the description described below does not solely support the embodiment of the encoding method. The descriptions regarding the operation of the encoding device (200) described above, the descriptions regarding the encoding method (e.g., the descriptions regarding FIGS. 5, 7, 11, etc.), and the descriptions regarding various prediction modes or prediction types can be equally applied to the example of FIG. 31 as long as they do not conflict with each other.
[0542] Referring to FIG. 31, an encoding method according to one embodiment includes a step of configuring an MPM list (S2100), a step of determining an intra prediction mode for a current block (S2110), a step of generating residual information for the current block based on the determined intra prediction mode (S2120), and a step of encoding prediction mode information including information about the intra prediction mode and image information including the residual information (S2130).
[0543] Additionally, the step of constructing the MPM list (S2100) may include performing histogram-based sorting on the MPM list.
[0544] The description of the MPM list configuration in the embodiment of the decoding method described above can be equally applied to the MPM list configuration in the embodiment of the encoding method. The description of the sorting of the MPM list also applies equally.
[0545] Specifically, the number of intra modes applied to the surrounding blocks of the current block can be accumulated to form a histogram as illustrated in FIG. 28 described above. For example, as in Equation 12 below, the number of intra modes applied to the surrounding blocks can be calculated to accumulate 1. Based on this, the MPM list can be sorted in order of intra modes with high values. a is any positive integer, for example, 1.
[0546] [Formula 12]
[0547] Histogram[intra prediction mode] += a
[0548] Meanwhile, the sizes of surrounding blocks may vary. When the sizes of surrounding blocks are different, as in the example of FIG. 29 described above, even though mode 12 is used in the widest area of the surrounding blocks, the number of modes 18 may be greater, resulting in a higher cumulative histogram value for mode 18.
[0549] Therefore, according to an embodiment of the encoding method, a histogram can be constructed based on the sizes of the surrounding blocks of the current block. Specifically, the histogram can be constructed by accumulating the sizes (width * height), and the sizes of the surrounding blocks can be calculated by accumulating them in the intra mode of the surrounding blocks, as shown in Equation 13 below. Based on this, the MPM list can be sorted in order of the intra mode with the highest value.
[0550] [Formula 13]
[0551] Histogram[intra prediction mode] += width * height
[0552] Meanwhile, blocks coded using techniques such as DIMD, TIMD, and SGPM can store multiple intra modes because they are predicted using multiple intra modes. If multiple intra modes are stored in neighboring blocks, a histogram can be constructed based on the multiple stored intra prediction modes. For example, if neighboring blocks are in DIMD mode and five intra modes (mode 1 to mode 5) are used, the histogram can be accumulated as in Equation 14 or Equation 15 below. While DIMD is described as an example, the same method can be applied to other techniques that store multiple intra modes.
[0553] [Formula 14]
[0554] Histogram[mode 1] += width * height
[0555] Histogram[mode 2] += width * height
[0556] Histogram[mode 3] += width * height
[0557] Histogram[mode 4] += width * height
[0558] Histogram[mode 5] += width * height
[0559] [Formula 15]
[0560] Histogram[mode 1] += a
[0561] Histogram[mode 2] += a
[0562] Histogram[mode 3] += a
[0563] Histogram[mode 4] += a
[0564] Histogram[mode 5] += a
[0565] In addition, when multiple modes are blended, the weights of each mode may differ when generating a prediction block. In this case, histograms can be accumulated based on the weights of each of the multiple intra prediction modes applied to the surrounding blocks. For example, if the surrounding block is a DIMD mode, five modes (mode 1 to mode 5) are used, and the ratio of the weights applied to each mode is rate 1 to rate 5 (rate 1 + rate 2 + rate 3 + rate 4 + rate 5 = 1), the histograms can be accumulated as in Equation 16 or Equation 17 below. Although DIMD is described as an example, the same method can be applied to other technologies in which multiple intra modes are stored.
[0566] [Formula 16]
[0567] Histogram[mode 1] += width * height * rate 1
[0568] Histogram[mode 2] += width * height * rate 2
[0569] Histogram[mode 3] += width * height * rate 3
[0570] Histogram[mode 4] += width * height * rate 4
[0571] Histogram[mode 5] += width * height * rate 5
[0572] [Formula 17]
[0573] Histogram[mode 1] += a * rate 1
[0574] Histogram[mode 2] += a * rate 2
[0575] Histogram[mode 3] += a * rate 3
[0576] Histogram[mode 4] += a * rate 4
[0577] Histogram[mode 5] += a * rate 5
[0578] For example, the number of neighboring blocks used for histogram accumulation can be at most P. P can be, for example, 20. The neighboring blocks used for histogram accumulation can be both adjacent blocks and non-adjacent blocks. The positions of the neighboring blocks can be defined by an agreement between the encoding device (200) and the decoding device (300). In addition, the neighboring blocks used for histogram accumulation can be determined in order of proximity to the current block. For example, if P neighboring blocks are found, but a neighboring block closer to the current block exists during an additional search, that block can be included in the P blocks instead of the existing block with a longer distance.
[0579] Meanwhile, referencing a neighboring block that is too far away from the current block may result in poor correlation. Therefore, the search for neighboring blocks may be limited to a set range from the current block. For example, the search for neighboring blocks may be limited to a range where the sum of the x distance and the y distance from the upper left position of the current block is less than 64. Alternatively, as illustrated in FIG. 30 described above, the search range may be limited by setting the values r1 to r4. For example, this may mean r1=2*W, r2=2*H, r3=2*W, and r4=2*H. However, this is just one example, and other values may be determined by defining them in advance between the encoding device (200) and the decoding device (300).
[0580] Meanwhile, it is also possible for the above-described embodiments or examples to be combined with each other.
[0581] For example, the histogram-based MPM list sorting method described above can also be combined with the template-based MPM list sorting method described in FIG. 25. For example, depending on the size of the current block, the MPM list can be sorted based on the histogram, or based on the template. Specifically, the template-based MPM list sorting described in FIG. 25 can be performed for small blocks for which the template-based sorting is relatively accurate, and the histogram-based MPM list sorting described in FIG. 31 can be applied to other blocks. That is, the MPM list can be sorted based on the template based on whether the size of the current block is less than or equal to a reference size, and the MPM list can be sorted based on the histogram based on whether the size of the current block exceeds the reference size. For example, the template-based MPM list sorting can be performed for blocks whose current block size is less than or equal to 128, and the histogram-based MPM list sorting can be performed for blocks whose current block size is greater than 128. However, this is just one example, and other combinations can be used depending on the block size and conditions, which can be defined in advance between the encoding device (200) and the decoding device (300).
[0582] In addition, it is also possible to combine the histogram-based MPM list sorting method described above with the MPM list ordering method described in FIG. 21. For example, depending on the size of the current block, the MPM list may be sorted based on the histogram, or a template-based candidate prediction mode (e.g., DIMD or TIMD) among the candidate prediction modes included in the MPM list may be changed to a lower priority. Specifically, the histogram-based sorting may be performed for small blocks, and the MPM list ordering method described in FIG. 21 may be performed for other blocks. That is, the MPM list may be sorted based on the histogram based on whether the size of the current block is smaller than or equal to a reference size, and a template-based candidate prediction mode (e.g., DIMD or TIMD) among the candidate prediction modes included in the MPM list may be changed to a lower priority based on whether the size of the current block exceeds the reference size. Alternatively, if there are multiple modes with the same histogram value during histogram-based sorting, the modes can be reordered by prioritizing them based on the reordering criteria described in Fig. 21. For example, if an adjacent block is a block coded with DIMD, the intra modes of the adjacent block can be reordered to a lower priority.
[0583] In addition, the MPM list can be configured by combining various methods such as changing the order of the MPM list, template-based MPM list sorting, and histogram-based MPM list sorting.
[0584] It is also possible to combine reordering of the MPM list with template-based MPM list sorting, or to combine reordering of the MPM list, template-based MPM list sorting, and histogram-based MPM list sorting. Such combinations can be predefined between the encoding device (200) and the decoding device (300).
[0585] Meanwhile, during the process of constructing the MPM list, if there are not enough reference samples to generate a prediction block in the intra mode of the surrounding blocks, i.e., if some of the reference samples are not available, they may be added later rather than being added directly to the list. For example, they may be added before the “derived intra mode.” The above embodiments related to MPM list sorting can be applied by taking into account the partial MPM reordering described above. That is, the partial MPM reordering may be considered first, and then the MPM list sorting may be performed.
[0586] Whether to perform histogram-based MPM list sorting can be determined by defining separate syntax information in high-level parameters such as VPS, SPS, APS, PPS, Picture Header, or Slice Header, and histogram-based MPM list sorting can be applied when the information has a specific value. For example, if the value of the syntax is 1, it can be determined to perform histogram-based MPM list sorting. In this case, a syntax element indicating whether to perform histogram-based list sorting can be included in the prediction mode information encoded in step S2130.
[0587] Additionally, techniques for deriving and utilizing intra modes using error values for template regions, such as SGPM, TMRL, and TIMD, can construct lists by utilizing intra mode information of surrounding blocks, similar to constructing MPM and SMPM lists. The above embodiments can also be applied to these techniques.
[0588] Up to now, the embodiments have been described separately for convenience of explanation, but as mentioned above, a combination of two or more embodiments is possible, and changes required by the combination of embodiments may also be included in the scope of the disclosed invention or disclosed embodiments.
[0589] Meanwhile, a computer-readable storage medium storing a bitstream generated by the encoding method described above may also be included in the scope of the disclosed embodiment.
[0590] Additionally, a method for transmitting a bitstream generated by the encoding method described above may also be included in the scope of the disclosed embodiment, and a transmission device for implementing such a transmission method may include at least one processor for generating a bitstream by the encoding method and a transmitter for transmitting the generated bitstream.
[0591] FIG. 32 is a diagram illustrating an example of a content streaming system to which the disclosed embodiment can be applied.
[0592] Referring to FIG. 32, 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.
[0593] 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.
[0594] 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.
[0595] 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.
[0596] 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.
[0597] 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.
[0598] 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.
[0599] 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.
[0600] Embodiments according to the present disclosure can be used to encode / decode images.
Claims
1. A step of obtaining prediction mode information from a bitstream; Step of constructing the MPM (Most Probable Mode) list for the current block; A step of deriving an intra prediction mode for the current block based on at least one of the MPM list or the prediction mode information; and A step of generating a restoration block for the current block based on the derived intra prediction mode; The steps for constructing the above MPM list are: A method comprising sorting the MPM list based on a histogram for intra prediction modes applied to neighboring blocks of the current block.
2. In paragraph 1, The steps for constructing the above MPM list are: A method comprising configuring the histogram by accumulating the number of intra prediction modes applied to the surrounding blocks.
3. In paragraph 1, The steps for constructing the above MPM list are: A method comprising constructing the histogram based on the size of the surrounding blocks.
4. In paragraph 1, The steps for constructing the above MPM list are: A method comprising configuring the histogram based on the plurality of intra prediction modes when there are multiple intra prediction modes applied to the surrounding blocks.
5. In paragraph 4, The steps for constructing the above MPM list are: A method comprising constructing the histogram based on the weights of each of a plurality of intra prediction modes applied to the surrounding blocks.
6. In paragraph 1, The steps for constructing the above MPM list are: A method comprising sorting the MPM list based on the histogram or sorting the MPM list based on a template, depending on the size of the current block.
7. In paragraph 6, The steps for constructing the above MPM list are: A decoding method comprising: sorting the MPM list based on the template based on whether the size of the current block is less than or equal to a reference size; and sorting the MPM list based on the histogram based on whether the size of the current block exceeds the reference size.
8. In paragraph 1, The steps for constructing the above MPM list are: A method comprising sorting the MPM list based on the histogram according to the size of the current block, or changing a template-based candidate prediction mode among the candidate prediction modes included in the MPM list to a lower priority.
9. In paragraph 8, The steps for constructing the above MPM list are: A method comprising: sorting the MPM list based on the histogram based on whether the size of the current block is less than or equal to a reference size; and changing a template-based candidate prediction mode among candidate prediction modes included in the MPM list to a lower priority based on whether the size of the current block exceeds the reference size.
10. Step of constructing a list of MPM (Most Probable Mode) candidates for the current block; A step of determining an intra prediction mode for the current block; A step of generating residual information for the current block based on the determined intra prediction mode; and A step of encoding image information including prediction mode information including information about the intra prediction mode and the residual information; The steps for constructing the above MPM list are: A method comprising sorting the MPM list based on a histogram for intra prediction modes applied to neighboring blocks of the current block.
11. In paragraph 10, The steps for constructing the above MPM list are: A method comprising configuring the histogram by accumulating the number of intra prediction modes applied to the surrounding blocks.
12. In paragraph 10, The steps for constructing the above MPM list are: A method comprising constructing the histogram based on the size of the surrounding blocks.
13. In paragraph 10, The steps for constructing the above MPM list are: A method comprising configuring the histogram based on the plurality of intra prediction modes when there are multiple intra prediction modes applied to the surrounding blocks.
14. In paragraph 13, The steps for constructing the above MPM list are: A method comprising constructing the histogram based on the weights of each of a plurality of intra prediction modes applied to the surrounding blocks.
15. In paragraph 10, The steps for constructing the above MPM list are: A method comprising sorting the MPM list based on the histogram or sorting the MPM list based on a template, depending on the size of the current block.
16. In paragraph 15, The steps for constructing the above MPM list are: A decoding method comprising: sorting the MPM list based on the template based on whether the size of the current block is less than or equal to a reference size; and sorting the MPM list based on the histogram based on whether the size of the current block exceeds the reference size.
17. In paragraph 10, The steps for constructing the above MPM list are: A method comprising sorting the MPM list based on the histogram according to the size of the current block, or changing a template-based candidate prediction mode among the candidate prediction modes included in the MPM list to a lower priority.
18. In paragraph 17, The steps for constructing the above MPM list are: A method comprising: sorting the MPM list based on the histogram based on whether the size of the current block is less than or equal to a reference size; and changing a template-based candidate prediction mode among candidate prediction modes included in the MPM list to a lower priority based on whether the size of the current block exceeds the reference size.
19. In a computer-readable storage medium storing a bitstream generated by an encoding method, The above encoding method is, A step for constructing a list of MPM (Most Probable Mode) candidates for the current block; A step of determining an intra prediction mode for the current block; A step of generating residual information for the current block based on the determined intra prediction mode; and A step of encoding image information including prediction mode information including information about the intra prediction mode and the residual information; The steps for constructing the above MPM list are: A computer-readable storage medium comprising sorting the MPM list based on a histogram for intra prediction modes applied to surrounding blocks of the current block.
20. In the method of transmitting data for video, A step of generating a bitstream for the image, wherein the bitstream is generated based on the steps of: configuring a Most Probable Mode (MPM) candidate list for a current block; determining an intra prediction mode for the current block; generating residual information for the current block based on the determined intra prediction mode; and encoding prediction mode information including information about the intra prediction mode and image information including the residual information; and A step of transmitting the data including the bitstream; The steps for constructing the above MPM list are: A transmission method comprising sorting the MPM list based on a histogram for intra prediction modes applied to neighboring blocks of the current block.
Citation Information
Patent Citations
Method of evaluating the degree of inflation of bubble gum and set used for method of evaluating the degree of inflation of bubble gum
KR1020250005879A
System and method for preventing unauthorized disclosure of secure printed material
KR1020250070275A
Server providing franchise store operation support platform and controlling method thereof
KR1020250166385A
Extrusion device for liquid composition storage tube
KR1020260012544A
Video encoding / decoding method and device
WO2023277602A1