Intra prediction-based image encoding / decoding method, device, and recording medium for storing bitstream

WO2024147660A3PCT designated stage expired Publication Date: 2025-05-30LG ELECTRONICS INC
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/KR2024/000178
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-01-04
Filing Date
2024-01-04
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

The increasing demand for high-resolution, high-quality video data leads to a significant increase in the amount of information to be transmitted and stored, resulting in higher transmission and storage costs, necessitating highly efficient video compression technologies.

Method used

A video encoding/decoding method and device that improves encoding/decoding efficiency by generating and post-processing prediction blocks using samples from neighboring blocks, performing a weighted sum of prediction blocks based on intra prediction modes, and storing the resulting bitstream for efficient transmission and storage.

Benefits of technology

The method enhances encoding/decoding efficiency, reducing transmission and storage costs while maintaining high video quality by effectively utilizing neighboring block samples and intra prediction modes for prediction block generation and post-processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure KR2024000178_30052025_PF_FP_ABST
    Figure KR2024000178_30052025_PF_FP_ABST
Patent Text Reader

Abstract

An image encoding / decoding method and device are provided. An image decoding method according to the present disclosure may comprise the steps of: generating a first prediction block of a current block on the basis of an intra prediction mode of the current block; generating a second prediction block of the current block on the basis of an intra prediction mode of a neighboring block of the current block; and generating a final prediction block of the current block on the basis of the first prediction block and the second prediction block.
Need to check novelty before this filing date? Find Prior Art

Description

Video encoding / decoding method and device based on intra prediction and recording medium for storing bitstream

[0001] The present disclosure relates to a video encoding / decoding method, a device, and a recording medium for storing a bitstream, and more particularly, to a video encoding / decoding method and device based on intra prediction, and a recording medium for storing a bitstream generated by the video encoding method / device of the present disclosure.

[0002] Recently, demand for high-resolution, high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, has been increasing across various fields. As image data becomes higher resolution and higher quality, the amount of information transmitted, or bits, increases relative to conventional image data. This increase in information or bits transmitted leads to increased transmission and storage costs.

[0003] Accordingly, a highly efficient image compression technology is required to effectively transmit, store, and play high-resolution, high-quality image information.

[0004] The present disclosure aims to provide a video encoding / decoding method and device with improved encoding / decoding efficiency.

[0005] In addition, the present disclosure aims to provide a video encoding / decoding method and device for post-processing a prediction block using samples within a neighboring block adjacent to the current block.

[0006] In addition, the present disclosure aims to provide a video encoding / decoding method and device for post-processing a prediction block of a current block based on a prediction block generated using samples in neighboring blocks adjacent to the current block.

[0007] In addition, the present disclosure aims to provide a video encoding / decoding method and device that weights a prediction block generated using samples within a surrounding block and a prediction block generated based on an intra prediction mode of a current block.

[0008] In addition, the present disclosure aims to provide a non-transitory computer-readable recording medium that stores a bitstream generated by an image encoding method or device according to the present disclosure.

[0009] In addition, the present disclosure aims to provide a non-transitory computer-readable recording medium that stores a bitstream received and decoded by an image decoding device according to the present disclosure and used for restoring an image.

[0010] In addition, the present disclosure aims to provide a method for transmitting a bitstream generated by an image encoding method or device according to the present disclosure.

[0011] The technical problems to be achieved in the present disclosure are not limited to the technical problems mentioned above, and other technical problems not mentioned will be clearly understood by a person having ordinary skill in the technical field to which the present disclosure belongs from the description below.

[0012] According to one embodiment of the present disclosure, a method of decoding an image performed by an image decoding device may include: generating a first prediction block of a current block based on an intra prediction mode of the current block; generating a second prediction block of the current block based on an intra prediction mode of a neighboring block of the current block; and generating a final prediction block of the current block based on the first prediction block and the second prediction block.

[0013] According to one embodiment of the present disclosure, the peripheral block may be at least one of an upper peripheral block or a left peripheral block adjacent to the current block.

[0014] According to one embodiment of the present disclosure, the intra prediction mode of the surrounding block can be determined from intra prediction modes of samples included in the surrounding block.

[0015] According to one embodiment of the present disclosure, the intra prediction mode of the surrounding block can be determined in a predetermined order from the intra prediction modes of samples included in the surrounding block.

[0016] According to one embodiment of the present disclosure, the intra prediction mode of the surrounding block may be determined as a directional prediction mode among the intra prediction modes of samples included in the surrounding block.

[0017] According to one embodiment of the present disclosure, the intra prediction mode of the surrounding block may be determined as a directional prediction mode within a predetermined range among the intra prediction modes of samples included in the surrounding block.

[0018] According to one embodiment of the present disclosure, the intra prediction mode of the surrounding block can be determined based on a difference between the intra prediction mode of a sample included in the surrounding block and the intra prediction mode of the current block.

[0019] According to one embodiment of the present disclosure, based on the intra prediction modes of the samples included in the surrounding blocks being different, the second prediction block can be generated by weighting and combining a plurality of prediction blocks generated by the intra prediction modes of each of the samples.

[0020] According to one embodiment of the present disclosure, the step of generating the second prediction block may be performed based on the intra prediction mode of the current block being a directional prediction mode.

[0021] According to one embodiment of the present disclosure, the step of generating the second prediction block may be performed based on the size of the current block.

[0022] According to one embodiment of the present disclosure, the step of generating the second prediction block may be determined based on application information obtained from a bitstream.

[0023] According to one embodiment of the present disclosure, the method further comprises the steps of determining a first weight to be applied to the first prediction block and the step of determining a second weight to be applied to the second prediction block, wherein, based on the first weight and the second weight, the final prediction block is generated by weighting the first prediction block and the second prediction block, and the first weight and the second weight may be determined based on an x-coordinate of a sample included in the current block, a y-coordinate of a sample included in the current block, a size of the current block, a shape of the current block, or a template matching cost.

[0024] According to one embodiment of the present disclosure, a video encoding method performed by an video encoding device may include a step of generating a first prediction block of a current block based on an intra prediction mode of the current block, a step of generating a second prediction block of the current block based on an intra prediction mode of a neighboring block of the current block, and a step of generating a final prediction block of the current block based on the first prediction block and the second prediction block.

[0025] According to one embodiment of the present disclosure, there may be a computer-readable recording medium storing a bitstream generated by an image encoding method.

[0026] According to one embodiment of the present disclosure, in a method for transmitting a bitstream generated by an image encoding method, the image encoding method may include a step of generating a first prediction block of the current block based on an intra prediction mode of the current block, a step of generating a second prediction block of the current block based on an intra prediction mode of a neighboring block of the current block, and a step of generating a final prediction block of the current block based on the first prediction block and the second prediction block.

[0027] According to the present disclosure, a video encoding / decoding method and device with improved encoding / decoding efficiency can be provided.

[0028] In addition, according to the present disclosure, an image encoding / decoding method and device for post-processing a prediction block using samples within a neighboring block adjacent to a current block can be provided.

[0029] In addition, according to the present disclosure, a video encoding / decoding method and device for post-processing a prediction block of a current block based on a prediction block generated using samples in neighboring blocks adjacent to the current block can be provided.

[0030] In addition, according to the present disclosure, a video encoding / decoding method and device can be provided that weights a prediction block generated using samples within a surrounding block and a prediction block generated based on an intra prediction mode of a current block.

[0031] In addition, according to the present disclosure, a non-transitory computer-readable recording medium for storing a bitstream generated by an image encoding method or device according to the present disclosure can be provided.

[0032] In addition, according to the present disclosure, a non-transitory computer-readable recording medium can be provided that stores a bitstream received and decoded by an image decoding device according to the present disclosure and used for restoring an image.

[0033] Additionally, according to the present disclosure, a method for transmitting a bitstream generated by an image encoding method or device according to the present disclosure can be provided.

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

[0035] FIG. 1 is a diagram schematically illustrating a video coding system to which an embodiment according to the present disclosure can be applied.

[0036] FIG. 2 is a schematic diagram of an image encoding device to which an embodiment according to the present disclosure can be applied.

[0037] FIG. 3 is a schematic diagram illustrating an image decoding device to which an embodiment according to the present disclosure can be applied.

[0038] Figure 4 is a flowchart illustrating an intra prediction-based video / image encoding method.

[0039] FIG. 5 is a diagram exemplarily illustrating the configuration of an intra prediction unit according to the present disclosure.

[0040] Fig. 6 is a flowchart illustrating an intra prediction-based video / image decoding method.

[0041] FIG. 7 is a diagram exemplarily illustrating the configuration of an intra prediction unit according to the present disclosure.

[0042] FIGS. 8A and 8B are diagrams showing reference samples defined in PDPC (Position dependent intra prediction) applied to various prediction modes according to one embodiment of the present disclosure.

[0043] FIG. 9 is a diagram for explaining a template matching-based encoding / decoding method according to the present disclosure.

[0044] FIG. 10 is a diagram illustrating a post-processing method for an upper area of ​​a current block according to one embodiment of the present disclosure.

[0045] FIG. 11 is a diagram illustrating an upper region post-processing method according to one embodiment of the present disclosure.

[0046] FIG. 12 is a diagram illustrating a method for selecting an upper sample within an upper peripheral block according to one embodiment of the present disclosure.

[0047] FIG. 13 is a flowchart of an image encoding / decoding method according to one embodiment of the present disclosure.

[0048] FIG. 14 is a diagram illustrating a post-processing method for a left area of ​​a current block according to one embodiment of the present disclosure.

[0049] FIG. 15 is a diagram illustrating a left region post-processing method according to one embodiment of the present disclosure.

[0050] FIG. 16 is a diagram illustrating a method for selecting a left sample within a left peripheral block according to one embodiment of the present disclosure.

[0051] FIG. 17 is a flowchart of an image encoding / decoding method according to one embodiment of the present disclosure.

[0052] FIG. 18 is a diagram illustrating a post-processing method for an upper left area of ​​a current block according to one embodiment of the present disclosure.

[0053] FIG. 19 is a diagram illustrating a post-processing method for an upper left region according to one embodiment of the present disclosure.

[0054] FIG. 20 is a diagram illustrating a method for selecting samples within a left peripheral block and an upper peripheral block according to one embodiment of the present disclosure.

[0055] FIG. 21 is a flowchart of an image encoding / decoding method according to one embodiment of the present disclosure.

[0056] FIG. 22 is a flowchart of an image encoding / decoding method according to one embodiment of the present disclosure.

[0057] FIG. 23 is a diagram illustrating an example of a content streaming system to which an embodiment according to the disclosure can be applied.

[0058] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the attached drawings so that those skilled in the art can easily implement the present disclosure. However, the present disclosure may be implemented in various different forms and is not limited to the embodiments described herein.

[0059] In describing embodiments of the present disclosure, detailed descriptions of known configurations or functions will be omitted if they are deemed to obscure the gist of the present disclosure. Furthermore, portions unrelated to the description of the present disclosure in the drawings have been omitted, and similar portions have been designated with similar reference numerals.

[0060] In the present disclosure, when a component is said to be "connected," "coupled," or "connected" to another component, this may include not only a direct connection, but also an indirect connection in which another component exists in between. Furthermore, when a component is said to "include" or "have" another component, unless otherwise specifically stated, this does not exclude the other component, but rather implies that the other component may be included.

[0061] In this disclosure, terms such as first, second, etc. are used solely to distinguish one component from another, and do not limit the order or importance of components unless specifically stated otherwise. Accordingly, within the scope of this disclosure, a first component in one embodiment may be referred to as a second component in another embodiment, and similarly, a second component in one embodiment may be referred to as a first component in another embodiment.

[0062] In this disclosure, distinct components are used to clearly illustrate their respective characteristics, and do not necessarily imply that the components are separated. That is, multiple components may be integrated into a single hardware or software unit, or a single component may be distributed into multiple hardware or software units. Therefore, even if not specifically mentioned, such integrated or distributed embodiments are also included within the scope of this disclosure.

[0063] In the present disclosure, the components described in various embodiments are not necessarily essential components, and some may be optional components. Therefore, embodiments comprising a subset of the components described in one embodiment are also within the scope of the present disclosure. Furthermore, embodiments including other components in addition to the components described in various embodiments are also within the scope of the present disclosure.

[0064] The present disclosure relates to encoding and decoding of images, and terms used in the present disclosure may have their usual meanings commonly used in the technical field to which the present disclosure belongs, unless newly defined in the present disclosure.

[0065] In the present disclosure, “video” may mean a set of images over time.

[0066] In the present disclosure, a "picture" generally refers to a unit representing one image of a specific time period, and a slice / tile is a coding unit that constitutes a part of a picture, and a single picture may be composed of one or more slices / tiles. In addition, a slice / tile may include one or more coding tree units (CTUs).

[0067] In the present disclosure, "pixel" or "pel" may refer to the smallest unit that constitutes a picture (or image). Additionally, "sample" may be used as a term corresponding to a pixel. A sample may generally represent a pixel or a pixel value, and may represent only a pixel / pixel value of a luma component or only a pixel / pixel value of a chroma component.

[0068] In the present disclosure, 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. In some cases, the term "unit" may be used interchangeably with terms such as "sample array," "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.

[0069] In the present disclosure, the "current block" may mean one of the following: a "current coding block," a "current coding unit," a "block to be encoded," a "block to be decoded," or a "block to be processed." When prediction is performed, the "current block" may mean a "current prediction block" or a "block to be predicted." When transformation (inverse transformation) / quantization (inverse quantization) is performed, the "current block" may mean a "current transformation block" or a "block to be transformed." When filtering is performed, the "current block" may mean a "block to be filtered."

[0070] In the present disclosure, a "current block" may mean a block that includes both a luma component block and a chroma component block, or a "luma block of the current block," unless explicitly described as a chroma block. The luma component block of the current block may be explicitly expressed by including an explicit description of the luma component block, such as "luma block" or "current luma block." Additionally, the chroma component block of the current block may be explicitly expressed by including an explicit description of the chroma component block, such as "chroma block" or "current chroma block."

[0071] In this disclosure, " / " and "," can be interpreted as "and / or". For example, "A / B" and "A, B" can be interpreted as "A and / or B". Additionally, "A / B / C" and "A, B, C" can mean "at least one of A, B, and / or C."

[0072] In this disclosure, "or" may be interpreted as "and / or." For example, "A or B" may mean 1) "A" only, 2) "B" only, or 3) "A and B." Alternatively, "or" in this disclosure may mean "additionally or alternatively."

[0073] In this disclosure, "at least one of A, B, and C" may mean "only A," "only B," "only C," or "any and all combinations of A, B, and C." Additionally, "at least one of A, B, or C" or "at least one of A, B, and / or C" may mean "at least one of A, B, and C."

[0074] The parentheses used in this disclosure may mean "for example." For example, when "prediction (intra-prediction)" is indicated, "intra-prediction" may be suggested as an example of "prediction." In other words, "prediction" in this disclosure 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."

[0075] Overview of Video Coding Systems

[0076] FIG. 1 is a diagram schematically illustrating a video coding system to which an embodiment according to the present disclosure can be applied.

[0077] A video coding system according to one embodiment may include an encoding device (10) and a decoding device (20). The encoding device (10) may transmit encoded video and / or image information or data to the decoding device (20) in the form of a file or streaming through a digital storage medium or a network.

[0078] An encoding device (10) according to one embodiment may include a video source generation unit (11), an encoding unit (12), and a transmission unit (13). A decoding device (20) according to one embodiment may include a reception unit (21), a decoding unit (22), and a rendering unit (23). The encoding unit (12) may be referred to as a video / image encoding unit, and the decoding unit (22) may be referred to as a video / image decoding unit. The transmission unit (13) may be included in the encoding unit (12). The reception unit (21) may be included in the decoding unit (22). The rendering unit (23) may include a display unit, and the display unit may be configured as a separate device or an external component.

[0079] The video source generation unit (11) can obtain video / images through a process of capturing, synthesizing, or generating video / images. The video source generation unit (11) can include a video / image capture device and / or a video / image generation device. The video / image capture device can include, for example, one or more cameras, a video / image archive including previously captured video / images, etc. The video / image generation device can include, for example, a computer, a tablet, a smartphone, etc., and can (electronically) generate video / images. For example, a virtual video / image can be generated through a computer, etc., in which case the video / image capture process can be replaced with a process of generating related data.

[0080] The encoding unit (12) can encode input video / images. The encoding unit (12) can perform a series of procedures, such as prediction, transformation, and quantization, to improve compression and encoding efficiency. The encoding unit (12) can output encoded data (encoded video / image information) in the form of a bitstream.

[0081] The transmission unit (13) can obtain encoded video / image information or data output in the form of a bitstream, and transmit it to the reception unit (21) of the decoding device (20) or another external object through a digital storage medium or a network in the form of a file or streaming. The digital storage medium may include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmission unit (13) may include an element for generating a media file through a predetermined file format, and may include an element for transmission through a broadcasting / communication network. The transmission unit (13) may be provided as a separate transmission device from the encoding unit (120), and in this case, the transmission device may include at least one processor for obtaining encoded video / image information or data output in the form of a bitstream, and a transmission unit for transmitting it in the form of a file or streaming. The reception unit (21) can extract / receive the bitstream from the storage medium or network and transmit it to the decoding unit (22).

[0082] The decoding unit (22) can decode video / image by performing a series of procedures such as inverse quantization, inverse transformation, and prediction corresponding to the operation of the encoding unit (12).

[0083] The rendering unit (23) can render the decrypted video / image. The rendered video / image can be displayed through the display unit.

[0084] Overview of the video encoding device

[0085] FIG. 2 is a schematic diagram illustrating an image encoding device to which an embodiment according to the present disclosure can be applied.

[0086] As illustrated in FIG. 2, the image encoding device (100) may include an image segmentation unit (110), a subtraction unit (115), a transformation unit (120), a quantization unit (130), an inverse quantization unit (140), an inverse transformation unit (150), an addition unit (155), a filtering unit (160), a memory (170), an inter prediction unit (180), an intra prediction unit (185), and an entropy encoding unit (190). The inter prediction unit (180) and the intra prediction unit (185) may be collectively referred to as a “prediction unit.” The transformation unit (120), the quantization unit (130), the inverse quantization unit (140), and the inverse transformation unit (150) may be included in a residual processing unit. The residual processing unit may further include a subtraction unit (115).

[0087] All or at least some of the plurality of components constituting the video encoding device (100) may be implemented as a single hardware component (e.g., an encoder or a processor) according to an embodiment. In addition, the memory (170) may include a decoded picture buffer (DPB) and may be implemented by a digital storage medium.

[0088] The image segmentation unit (110) can segment an input image (or picture, frame) input to the image encoding device (100) into one or more processing units. For example, the processing unit may be called a coding unit (CU). The coding unit may be obtained by recursively segmenting a coding tree unit (CTU) or a largest coding unit (LCU) according to a QT / BT / TT (Quad-tree / binary-tree / ternary-tree) structure. For example, one coding unit may be segmented into a plurality of coding units of deeper depth based on a quad-tree structure, a binary-tree structure, and / or a ternary-tree structure. For segmenting the coding unit, the quad-tree structure may be applied first, and the binary-tree structure and / or the ternary-tree structure may be applied later. The coding procedure according to the present disclosure may be performed based on the final coding unit that is no longer segmented. The maximum coding unit can be used directly as the final coding unit, and the coding unit of the lower depth obtained by dividing the maximum coding unit can be used as the final concatenated unit. Here, the coding procedure may include procedures such as prediction, transformation, and / or restoration described below. As another example, the processing unit of the coding procedure may be a prediction unit (PU) or a transformation unit (TU). The prediction unit and the transformation unit may each be divided or partitioned from the final coding unit. The prediction unit may be a unit of sample prediction, and the transformation unit may be a unit that derives a transform coefficient and / or a unit that derives a residual signal from a transform coefficient.

[0089] The prediction unit (inter-prediction unit (180) or intra-prediction unit (185)) can perform prediction on a block to be processed (current block) and generate a predicted block including prediction samples for the current block. The prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block or CU unit. The prediction unit can generate various information regarding the prediction of the current block and transmit the information to the entropy encoding unit (190). The information regarding the prediction can be encoded by the entropy encoding unit (190) and output in the form of a bitstream.

[0090] The intra prediction unit (185) 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 away from it, depending on the intra prediction mode and / or intra prediction technique. The intra prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The non-directional modes may include, for example, a DC mode and a planar mode. The directional modes may include, for example, 33 directional prediction modes or 65 directional prediction modes, depending on the degree of detail in the prediction direction. However, this is merely an example, and a greater or lesser number of directional prediction modes may be used depending on the settings. The intra prediction unit (185) may also determine the prediction mode applied to the current block by using the prediction mode applied to the neighboring blocks.

[0091] The inter prediction unit (180) can derive a predicted 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 information on the inter prediction direction (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 from each other. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc. A reference picture including the above temporal neighboring blocks may be called a collocated picture (colPic). For example, the inter prediction unit (180) 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 (180) 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 current block can be signaled by using the motion vector of the surrounding blocks as the motion vector predictor and encoding the motion vector difference and an indicator for the motion vector predictor. The motion vector difference can mean the difference between the motion vector of the current block and the motion vector predictor.

[0092] The prediction unit can generate a prediction signal based on various prediction methods and / or prediction techniques described below. For example, the prediction unit can apply intra prediction or inter prediction to predict the current block, and can also apply intra prediction and inter prediction simultaneously. A prediction method that simultaneously applies intra prediction and inter prediction to predict the current block may be called combined inter and intra prediction (CIIP). In addition, the prediction unit may perform intra block copy (IBC) to predict the current block. Intra block copy can be used for video / image coding of content such as games, such as screen content coding (SCC). IBC is a method of predicting the current block using a previously restored reference block within the current picture located at a predetermined distance from the current block. When IBC is applied, the location of the reference block within the current picture can be encoded as a vector (block vector) corresponding to the predetermined distance. IBC basically performs prediction within the current picture, but can be performed similarly to inter prediction in that it derives reference blocks within the current picture. That is, IBC can utilize at least one of the inter prediction techniques described in the present disclosure.

[0093] The prediction signal generated through the prediction unit can be used to generate a restoration signal or a residual signal. The subtraction unit (115) can generate a residual signal (residual block, residual sample array) by subtracting the prediction signal (predicted block, predicted sample array) output from the prediction unit from the input image signal (original block, original sample array). The generated residual signal can be transmitted to the conversion unit (120).

[0094] The transform unit (120) 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 reconstructed pixels. The transform process can be applied to a pixel block having a square equal size, or can be applied to a block of a non-square variable size.

[0095] The quantization unit (130) can quantize the transform coefficients and transmit them to the entropy encoding unit (190). The entropy encoding unit (190) 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 (130) can rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a 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.

[0096] The entropy encoding unit (190) can perform various encoding methods, such as, for example, exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoding unit (190) can also encode, together or separately, information necessary for video / image restoration (e.g., values ​​of syntax elements) in addition to quantized transform coefficients. The encoded information (e.g., encoded video / image information) can be transmitted or stored in the form of a bitstream in the form of a network abstraction layer (NAL) unit. 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 signaling information, transmitted information and / or syntax elements mentioned in the present disclosure may be encoded through the encoding procedure described above and included in the bitstream.

[0097] The above 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 USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmission unit (not shown) for transmitting the signal output from the entropy encoding unit (190) and / or a storage unit (not shown) for storing the signal may be provided as an internal / external element of the video encoding device (100), or the transmission unit may be provided as a component of the entropy encoding unit (190).

[0098] The quantized transform coefficients output from the quantization unit (130) can be used to generate a residual signal. For example, by applying inverse quantization and inverse transformation to the quantized transform coefficients through the inverse quantization unit (140) and inverse transformation unit (150), a residual signal (residual block or residual samples) can be restored.

[0099] The addition unit (155) 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 (180) or the intra prediction unit (185). 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 the reconstructed block. The addition unit (155) can be called a reconstructor or a reconstructed block generation unit. The generated reconstructed signal can be used for intra prediction of the next block to be processed within the current picture, and can also be used for inter prediction of the next picture after filtering as described below.

[0100] Meanwhile, LMCS (luma mapping with chroma scaling) may be applied during the picture encoding and / or restoration process.

[0101] The filtering unit (160) can improve subjective / objective picture quality by applying filtering to the restoration signal. For example, the filtering unit (160) can apply various filtering methods to the restoration picture to generate a modified restoration picture, and store the modified restoration picture in the memory (170), specifically, in the DPB of the memory (170). The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc. The filtering unit (160) can generate various information regarding filtering and transmit the information to the entropy encoding unit (190), as described later in the description of each filtering method. The information regarding filtering may be encoded by the entropy encoding unit (190) and output in the form of a bitstream.

[0102] The modified restored picture transmitted to the memory (170) can be used as a reference picture in the inter prediction unit (180). Through this, when inter prediction is applied, the image encoding device (100) can avoid prediction mismatch between the image encoding device (100) and the image decoding device, and can also improve encoding efficiency.

[0103] The DPB in the memory (170) can store a modified reconstructed picture to be used as a reference picture in the inter prediction unit (180). The memory (170) 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 reconstructed. The stored motion information can be transferred to the inter prediction unit (180) to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory (170) can store reconstructed samples of reconstructed blocks in the current picture and transfer them to the intra prediction unit (185).

[0104] Video Decryption Device Overview

[0105] FIG. 3 is a schematic diagram illustrating an image decoding device to which an embodiment according to the present disclosure can be applied.

[0106] As illustrated in FIG. 3, the image decoding device (200) may be configured to include an entropy decoding unit (210), an inverse quantization unit (220), an inverse transformation unit (230), an addition unit (235), a filtering unit (240), a memory (250), an inter prediction unit (260), and an intra prediction unit (265). The inter prediction unit (260) and the intra prediction unit (265) may be collectively referred to as a “prediction unit.” The inverse quantization unit (220) and the inverse transformation unit (230) may be included in a residual processing unit.

[0107] All or at least some of the plurality of components constituting the video decoding device (200) may be implemented as a single hardware component (e.g., a decoder or processor) depending on the embodiment. In addition, the memory (170) may include a DPB and may be implemented by a digital storage medium.

[0108] The video decoding device (200) that receives a bitstream including video / image information can restore the image by performing a process corresponding to the process performed in the video encoding device (100) of FIG. 2. For example, the video decoding device (200) can perform decoding using a processing unit applied in the video encoding device. Therefore, the processing unit for decoding may be, for example, a coding unit. The coding unit may be a coding tree unit or may be obtained by dividing a maximum coding unit. In addition, the restored image signal decoded and output by the video decoding device (200) can be reproduced through a reproduction device (not shown).

[0109] The video decoding device (200) can receive a signal output from the video encoding device of FIG. 2 in the form of a bitstream. The received signal can be decoded through the entropy decoding unit (210). For example, the entropy decoding unit (210) 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 video decoding device may additionally use information on the parameter set and / or the general constraint information to decode the image. The signaling information, received information, and / or syntax elements mentioned in the present disclosure can be obtained from the bitstream by being decoded through the decoding procedure. For example, the entropy decoding unit (210) can decode information in the 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 the decoding information of the surrounding block and the decoding target block or the information of the symbol / bin 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 (210) is provided to the prediction unit (inter prediction unit (260) and intra prediction unit (265)), and the residual value on which entropy decoding is performed by the entropy decoding unit (210), i.e., quantized transform coefficients and related parameter information, can be input to the inverse quantization unit (220). In addition, information regarding filtering among the information decoded by the entropy decoding unit (210) can be provided to the filtering unit (240). Meanwhile, a receiving unit (not shown) that receives a signal output from an image encoding device may be additionally provided as an internal / external element of the image decoding device (200), or the receiving unit may be provided as a component of an entropy decoding unit (210).

[0110] Meanwhile, the video decoding device according to the present disclosure may be referred to as a video / video / picture decoding device. The video decoding device may include an information decoder (video / video / picture information decoder) and / or a sample decoder (video / video / picture sample decoder). The information decoder may include an entropy decoding unit (210), and the sample decoder may include at least one of an inverse quantization unit (220), an inverse transformation unit (230), an addition unit (235), a filtering unit (240), a memory (250), an inter prediction unit (260), and an intra prediction unit (265).

[0111] The inverse quantization unit (220) can inverse quantize the quantized transform coefficients and output the transform coefficients. The inverse quantization unit (220) 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 image encoding device. The inverse quantization unit (220) can perform inverse quantization on the quantized transform coefficients using quantization parameters (e.g., quantization step size information) and obtain transform coefficients.

[0112] In the inverse transform unit (230), the transform coefficients can be inversely transformed to obtain a residual signal (residual block, residual sample array).

[0113] The prediction unit can perform a prediction on the current block and generate a predicted block containing prediction samples for the current block. The prediction unit can determine whether intra-prediction or inter-prediction is applied to the current block based on the prediction information output from the entropy decoding unit (210), and can determine a specific intra / inter-prediction mode (prediction technique).

[0114] The fact that the prediction unit can generate a prediction signal based on various prediction methods (techniques) described below is the same as that mentioned in the description of the prediction unit of the image encoding device (100).

[0115] The intra prediction unit (265) can predict the current block by referring to samples within the current picture. The description of the intra prediction unit (185) can be equally applied to the intra prediction unit (265).

[0116] The inter prediction unit (260) can derive a predicted 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 information on the inter prediction direction (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 (260) 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 (techniques), and the information about the prediction can include information indicating the mode (technique) of inter prediction for the current block.

[0117] The addition unit (235) can generate a restoration signal (restored picture, restoration block, restoration sample array) by adding the acquired residual signal to the prediction signal (predicted block, prediction sample array) output from the prediction unit (including the inter prediction unit (260) and / or the intra prediction unit (265)). When there is no residual for the block to be processed, such as when the skip mode is applied, the predicted block can be used as the restoration block. The description of the addition unit (155) can be equally applied to the addition unit (235). The addition unit (235) can be called a restoration unit or a restoration block generation unit. The generated restoration signal can be used for intra prediction of the next block to be processed within the current picture, and can also be used for inter prediction of the next picture after going through filtering as described below.

[0118] The filtering unit (240) can improve subjective / objective image quality by applying filtering to the restored signal. For example, the filtering unit (240) can apply various filtering methods to the restored picture to generate a modified restored picture, and store the modified restored picture in the memory (250), specifically, in the DPB of the memory (250). The various filtering methods can include, for example, deblocking filtering, sample adaptive offset, adaptive loop filter, bilateral filter, etc.

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

[0120] In this specification, the embodiments described in the filtering unit (160), the inter prediction unit (180), and the intra prediction unit (185) of the image encoding device (100) can be applied to the filtering unit (240), the inter prediction unit (260), and the intra prediction unit (265) of the image decoding device (200) in the same or corresponding manner, respectively.

[0121] Overview of Intra Prediction

[0122] Hereinafter, intra prediction according to the present disclosure is described.

[0123] Intra prediction may refer to a prediction that generates prediction samples for a current block based on reference samples within a picture to which the current block belongs (hereinafter, referred to as the current picture). When intra prediction is applied to a current block, neighboring reference samples to be used for intra prediction of the current block may be derived. The neighboring reference samples of the current block may 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 neighboring reference samples of the current block may include upper neighboring samples of multiple columns and left neighboring samples of multiple rows. Additionally, the surrounding 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.

[0124] However, some of the surrounding reference samples of the current block may not yet be decoded or available. In this case, the decoder can construct the surrounding reference samples to be used for prediction by substituting the unavailable samples with available samples. Alternatively, the decoder can construct the surrounding reference samples to be used for prediction by interpolating the available samples.

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

[0126] In addition, the prediction sample may be generated through interpolation between a first surrounding sample located in the prediction direction of the intra prediction mode of the current block and a second surrounding sample located in the opposite direction based on the prediction target sample of the current block among the surrounding reference samples. The above-described case may be referred to as linear interpolation intra prediction (LIP).

[0127] Additionally, chroma prediction samples can be generated based on luma samples using a linear model. This case may be called LM (Linear Model) mode.

[0128] In addition, 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 the intra prediction mode among the existing peripheral reference samples, i.e., unfiltered peripheral reference samples, with the temporary prediction sample. This case may be called PDPC (Position dependent intra prediction).

[0129] In addition, a reference sample line with the highest prediction accuracy among the surrounding multiple reference sample lines of the current block can be selected, and a prediction sample can be derived using the reference samples located in the prediction direction of the selected line. At this time, information about the used reference sample line (e.g., intra_luma_ref_idx) can be encoded and signaled in the bitstream. This case may be called multi-reference line intra prediction (MRL) or MRL-based intra prediction. If MRL is not applied, reference samples can be derived from reference sample lines directly adjacent to the current block, and in this case, information about the reference sample line may not be signaled.

[0130] 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 for each subpartition. At this time, surrounding reference samples for intra prediction can be derived for each subpartition unit. That is, the reconstructed sample of the previous subpartition in the encoding / decoding order can be used as the surrounding reference sample of the current subpartition. In this case, the intra prediction mode for the current block is applied equally to the subpartitions, and by deriving and using surrounding reference samples for each subpartition unit, the intra prediction performance can be improved in some cases. This prediction method can be called intra sub-partitions (ISP) or ISP-based intra prediction.

[0131] The intra prediction techniques described above may be referred to by various terms, such as intra prediction types or additional intra prediction modes, to distinguish them from directional or non-directional intra prediction modes. For example, the intra prediction technique (intra prediction type or additional intra prediction mode, etc.) may include at least one of the above-described LIP, LM, PDPC, MRL, and ISP. A general intra prediction method excluding specific intra prediction types such as the above-described LIP, LM, 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 above-described specific intra prediction types are not applied, and prediction may be performed based on the above-described intra prediction mode. Meanwhile, post-processing filtering may be performed on the derived prediction samples, if necessary.

[0132] Specifically, the intra prediction procedure 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, if necessary.

[0133] Meanwhile, in addition to the intra prediction types described above, affine linear weighted intra prediction (ALWIP) may be used. The ALWIP may also be called linear weighted intra prediction (LWIP) or matrix weighted intra prediction (MIP or matrix based intra prediction). When the MIP is applied to the current block, prediction samples for the current block may be derived by i) performing a matrix-vector-multiplication procedure using surrounding reference samples on which an averaging procedure has been performed, ii) further performing a horizontal / vertical interpolation procedure as necessary. The intra prediction modes used for the MIP may be configured differently from the intra prediction modes used in the LIP, PDPC, MRL, ISP intra prediction, or normal intra prediction described above. The intra prediction mode for the MIP may be called a MIP intra prediction mode, a MIP prediction mode, or a MIP mode. For example, the metrics and offsets used in the matrix vector multiplication may be set differently depending on the intra prediction mode for the MIP. Here, the metrics may be referred to as (MIP) weight metrics, and the offset may be referred to as (MIP) offset vectors or (MIP) bias vectors. A specific MIP method will be described later.

[0134] The block restoration procedure based on intra prediction and the intra prediction unit within the encoding device are described below with reference to FIGS. 4 and 5.

[0135] Figure 4 is a flowchart illustrating an intra prediction-based video / image encoding method.

[0136] The encoding method of FIG. 4 can be performed by the video encoding device of FIG. 2. Specifically, step S410 can be performed by the intra prediction unit (185), and step S420 can be performed by the residual processing unit. Specifically, step S420 can be performed by the subtraction unit (115). Step S430 can be performed by the entropy encoding unit (190). The prediction information of step S430 is derived by the intra prediction unit (185), and the residual information of step S430 can be derived by the residual processing unit. The residual information is information about the residual samples. The residual information can 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 (120) of the image encoding device, and the transform coefficients can be derived as quantized transform coefficients through the quantization unit (130). Information about the quantized transform coefficients can be encoded in the entropy encoding unit (190) through a residual coding procedure.

[0137] An image encoding device can perform intra prediction on a current block (S410). The image encoding device can determine an intra prediction mode / type for the current block, derive peripheral reference samples of the current block, and then generate prediction samples within the current block based on the intra prediction mode / type and the peripheral reference samples. Here, the procedures of determining the intra prediction mode / type, deriving peripheral reference samples, and generating prediction samples may be performed simultaneously, or one procedure may be performed before the other.

[0138] FIG. 5 is a diagram exemplarily illustrating the configuration of an intra prediction unit (185) according to the present disclosure.

[0139] As illustrated in FIG. 5, the intra prediction unit (185) of the video encoding device may include an intra prediction mode / type determination unit (186), a reference sample derivation unit (187), and / or a prediction sample derivation unit (188). The intra prediction mode / type determination unit (186) may determine an intra prediction mode / type for the current block. The reference sample derivation unit (187) may derive surrounding reference samples of the current block. The prediction sample derivation unit (188) may derive prediction samples of the current block. Meanwhile, although not illustrated, when a prediction sample filtering procedure described below is performed, the intra prediction unit (185) may further include a prediction sample filtering unit (not illustrated).

[0140] The video encoding device can determine a mode / type to be applied to the current block among a plurality of intra prediction modes / types. The video encoding device can compare rate distortion costs (RD costs) for the intra prediction modes / types and determine an optimal intra prediction mode / type for the current block.

[0141] Meanwhile, the video encoding device may also perform a predictive sample filtering procedure. Predictive sample filtering may be referred to as post-filtering. Some or all of the predictive samples may be filtered through the predictive sample filtering procedure. In some cases, the predictive sample filtering procedure may be omitted.

[0142] Referring again to FIG. 4, the video encoding device can generate residual samples for the current block based on the predicted samples or the filtered predicted samples (S420). The video encoding device can derive the residual samples by subtracting the predicted samples from the original samples of the current block. In other words, the video encoding device can derive the residual sample value by subtracting the corresponding predicted sample value from the original sample value.

[0143] The video encoding device can encode video information including information about the intra prediction (prediction information) and residual information about the residual samples (S430). The prediction information can include the intra prediction mode information and / or the intra prediction technique information. The video encoding device can output the encoded video information in the form of a bitstream. The output bitstream can be transmitted to the video decoding device via a storage medium or a network.

[0144] The residual information may include the residual coding syntax described below. The video encoding device may transform / quantize the residual samples to derive quantized transform coefficients. The residual information may include information about the quantized transform coefficients.

[0145] Meanwhile, as described above, the video encoding device can generate a restored picture (including restored samples and restored blocks). To this end, the video encoding device 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 video decoding device. The video encoding device 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.

[0146] Fig. 6 is a flowchart illustrating an intra prediction-based video / image decoding method.

[0147] The image decoding device can perform an operation corresponding to an operation performed by the image encoding device.

[0148] The decoding method of FIG. 6 can be performed by the image decoding device of FIG. 3. Steps S610 to S630 can be performed by the intra prediction unit (265), and the prediction information of step S610 and the residual information of step S640 can be obtained from the bitstream by the entropy decoding unit (210). The residual processing unit of the image decoding device can derive residual samples for the current block based on the residual information (S640). Specifically, the inverse quantization unit (220) of the residual processing unit can derive transform coefficients by performing inverse quantization based on the quantized transform coefficients derived based on the residual information, and the inverse transform unit (230) of the residual processing unit can derive residual samples for the current block by performing inverse transformation on the transform coefficients. Step S650 can be performed by the addition unit (235) or the restoration unit.

[0149] Specifically, the video decoding device can derive an intra prediction mode / type for the current block based on the received prediction information (intra prediction mode / type information) (S610). In addition, the video decoding device can derive surrounding reference samples of the current block (S620). The video decoding device can generate prediction samples within the current block based on the intra prediction mode / type and the surrounding reference samples (S630). In this case, the video decoding device can perform a prediction sample filtering procedure. The prediction sample filtering may be referred to as post-filtering. Some or all of the prediction samples may be filtered by the prediction sample filtering procedure. In some cases, the prediction sample filtering procedure may be omitted.

[0150] The video decoding device can generate residual samples for the current block based on the received residual information (S640). The video decoding device can generate reconstructed samples for the current block based on the prediction samples and the residual samples, and derive a reconstructed block including the reconstructed samples (S650). 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.

[0151] FIG. 7 is a diagram exemplarily illustrating the configuration of an intra prediction unit (265) according to the present disclosure.

[0152] As illustrated in FIG. 7, the intra prediction unit (265) of the video decoding apparatus may include an intra prediction mode / type determination unit (266), a reference sample derivation unit (267), and a prediction sample derivation unit (268). The intra prediction mode / type determination unit (266) determines the intra prediction mode / type for the current block based on intra prediction mode / type information generated and signaled by the intra prediction mode / type determination unit (186) of the video encoding apparatus, and the reference sample derivation unit (266) may derive surrounding reference samples of the current block from a reconstructed reference region within the current picture. The prediction sample derivation unit (268) 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 (265) may further include a prediction sample filtering unit (not illustrated).

[0153] The intra prediction mode information may include flag information (e.g., intra_luma_mpm_flag) indicating, for example, whether the most probable mode (MPM) or the remaining mode is applied to the current block, and when 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 configured as an MPM candidate list or an MPM list. In addition, when the MPM is not applied to the current block, the intra prediction mode information may further include remaining mode information (e.g., intra_luma_mpm_remainder) indicating one of the remaining intra prediction modes excluding the intra prediction mode candidates (MPM candidates). The image decoding device may determine the intra prediction mode of the current block based on the intra prediction mode information.

[0154] In addition, the intra prediction technique information may be implemented in various forms. For example, the intra prediction technique information may include intra prediction technique index information indicating one of the intra prediction techniques. As another example, the intra prediction technique information may include at least one of 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 PDPC is applied, or flag information indicating whether LIP is applied. In addition, the intra prediction type information may include a MIP flag indicating whether MIP is applied to the current block. In the present disclosure, the ISP flag information may be referred to as an ISP application indicator.

[0155] The intra prediction mode information and / or the intra prediction technique information may be encoded / decoded using the coding method described in the present disclosure. For example, the intra prediction mode information and / or the intra prediction technique information may be encoded / decoded using entropy coding (e.g., CABAC, CAVLC) based on a truncated (rice) binary code.

[0156] Meanwhile, the intra prediction mode may further include a CCLM (cross-component linear model) mode for chroma samples in addition to the PLANAR mode, DC mode, and directional intra prediction modes. The CCLM mode may be divided into L_CCLM, T_CCLM, and LT_CCLM depending on whether left samples, upper samples, or both are considered for deriving CCLM parameters, and may only be applied to chroma components.

[0157] Intra prediction modes can be indexed, for example, as shown in Table 1 below.

[0158] Intra Prediction ModeAssociated name0INTRA_PLANAR1INTRA_DC2..66INTRA_ANGULAR2..INTRA_ANGULAR6681..83INTRA_LT_CCLM, INTRA_L_CCLM, INTRA_T_CCLM

[0159] Meanwhile, the intra prediction type (or additional intra prediction mode, etc.) may include at least one of the above-described 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 at least one of 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.

[0160] PDPC (Position Dependent intra Prediction) Overview

[0161] PDPC may represent an intra prediction method that performs filtering based on a filter for the PDPC to derive filtered reference samples, derives a temporary prediction sample of the current block based on an intra prediction mode of the current block and the filtered reference samples, and derives a prediction sample of the current block by weighting at least one reference sample derived according to the intra prediction mode among the existing reference samples, i.e., unfiltered reference samples, and the temporary prediction sample. Here, the predefined filter may be one of five 7-tap filters. Alternatively, the predefined filter may be one of a 3-tap filter, a 5-tap filter, and a 7-tap filter. The 3-tap filter, the 5-tap filter, and the 7-tap filter may represent a filter having 3 filter coefficients, a filter having 5 filter coefficients, and a filter having 7 filter coefficients, respectively.

[0162] For example, the prediction results of the intra planner mode can be further modified by PDPC.

[0163] Alternatively, as an example, the PDPC may be applied to an intra planar mode, an intra DC mode, a horizontal intra prediction mode, a vertical intra prediction mode, a bottom left intra prediction mode (i.e., a second intra prediction mode) and eight directional intra prediction modes adjacent to the bottom left intra prediction mode, a top right intra prediction mode and eight directional intra prediction modes adjacent to the top right intra prediction mode without separate signaling.

[0164] Specifically, when the above PDPC is applied, the predicted sample of (x,y) coordinates predicted based on a linear combination of the intra prediction mode and reference samples can be derived as in the following mathematical expression 1.

[0165]

[0166] Here, R_(x,-1) and R_(-1,y) represent the upper reference sample and the left reference sample located above and to the left of the current sample at the (x, y) coordinate, and R_(-1,-1) represents the upper left reference sample located at the upper left corner of the current block.

[0167] Meanwhile, when PDPC is applied to intra planar mode, intra DC mode, horizontal intra prediction mode, and vertical intra prediction mode, additional boundary filters such as the DC mode boundary filter or vertical / horizontal mode edge filter of the existing HEVC may not be required.

[0168] Figures 8a to 8d illustrate reference samples (R) defined in PDPC applied to various prediction modes. x,-1 , R -1,y , R -1,-1 ) is indicated.

[0169] Meanwhile, the weights of the PDPC can be derived based on the prediction modes. The weights of the PDPC can be derived as shown in Table 2 below.

[0170]

[0171] Position-dependent intra prediction combination (PDPC) generates prediction samples using reference samples according to the prediction mode, and then improves the prediction samples using surrounding reference samples. Instead of being applied to all intra prediction modes, PDPC is limited to the 65 directional intra prediction modes: Planar, DC, 2 (bottom-right mode), VDIA (top-left mode), Hor (horizontal mode), Ver (vertical mode), and the surrounding modes of 2 mode (modes 3 to 10), and the surrounding modes of VDIA mode (modes 58 to 65). Furthermore, rather than being applied to all prediction samples within the current block to be encoded, PDPC is applied variably depending on the block size.

[0172] Overview of TIMD (Template-based intra mode derivation)

[0173] For each intra prediction mode within the MPM, the sum of absolute transformed differences (SATD) between the predicted sample and the reconstructed sample of the template is calculated. The first two intra prediction modes with the smallest SATD are selected as the TIMD modes. These two TIMD modes are fused with weights, and this weighted intra prediction is used to encode the current CU. Position-dependent intra prediction combination (PDPC) can be included in the TIMD mode derivation process.

[0174] The costs of the two selected modes are compared with a threshold, and the two cost factors are applied in the test as follows.

[0175] costMode2 < 2*costMode1

[0176] If the above conditions are true, fusion is applied, otherwise only mode 1 is used.

[0177] The weights of the modes are calculated by their SATD costs as follows:

[0178] weight1 = costMode2 / (costMode1+ costMode2)

[0179] weight2 = 1 - weight1

[0180] Template matching(TM)

[0181] FIG. 9 is a diagram for explaining a template matching-based encoding / decoding method according to the present disclosure.

[0182] Template Matching (TM) is a motion vector derivation method performed at the decoder stage. It is a method that can refine the motion information of the current block by finding a template (hereinafter referred to as a “reference template”) within a reference picture that is most similar to a template (hereinafter referred to as a “current template”) adjacent to the current block (e.g., current coding unit, current CU). The current template may be an upper neighboring block and / or a left neighboring block of the current block, or a part of these neighboring blocks. In addition, the reference template may be determined to have the same size as the current template.

[0183] As illustrated in Fig. 9, once the initial motion vector of the current block is derived, a search for a better motion vector can be performed in a surrounding area of ​​the initial motion vector. For example, the range of the surrounding area where the search is performed can be within a [-8, +8]-pel search area centered on the initial motion vector. In addition, the size of the search step for performing the search can be determined based on the AMVR mode of the current block. In addition, template matching can also be performed continuously with the bilateral matching process in merge mode.

[0184] If the prediction mode of the current block is AMVP mode, a motion vector predictor candidate (MVP candidate) may be determined based on a template matching error. For example, a motion vector predictor candidate (MVP candidate) that minimizes the error between the current template and a reference template may be selected. Thereafter, template matching for improving a motion vector may be performed on the selected motion vector predictor candidate. At this time, template matching for improving a motion vector may not be performed on motion vector predictor candidates that are not selected.

[0185] More specifically, the improvement of the selected motion vector predictor candidate can be started from full-pel accuracy within the [-8, +8]-pel search region using an iterative diamond search. Alternatively, it can be started from 4-pel accuracy in the case of 4-pel AMVR mode. This can be followed by a search for half-pel and / or quarter-pel accuracy depending on the AMVR mode. According to the search process, the motion vector predictor candidate can maintain the same motion vector accuracy as indicated by the AMVR mode even after the template matching process. In the iterative search process, the search process is terminated if the difference between the previous minimum cost and the current minimum cost is less than an arbitrary threshold. The threshold can be equal to the area of ​​the block, i.e., the number of samples in the block. Table 3 shows examples of search patterns according to the AMVR mode and the merge mode accompanied by AMVR.

[0186]

[0187] If the prediction mode of the current block is merge mode, a similar search method can be applied to the merge candidate indicated by the merge index. As shown in Table 1 above, template matching can be performed up to 1 / 8-pel accuracy or can skip half-pel accuracy or lower, which can be determined depending on whether an alternative interpolation filter is used according to merge motion information. In this case, the alternative interpolation filter can be a filter used when AMVR is in half-pel mode. In addition, if template matching is available, depending on whether bilateral matching (BM) is available, the template matching can operate as an independent process, or can operate as an additional motion vector improvement process between block-based bilateral matching and sub-block-based bilateral matching. The availability of template matching and / or bilateral matching can be determined based on an availability condition check. The accuracy of the motion vector as described above can refer to the accuracy of the motion vector difference (MVD).

[0188] Hereinafter, a video encoding / decoding method according to one embodiment of the present disclosure will be described in detail.

[0189] The present disclosure relates to intra prediction. Specifically, the present disclosure relates to a method for post-processing a prediction block generated using a directional intra-picture prediction mode or a non-directional intra-picture prediction mode based on the intra-picture prediction mode of a neighboring block. By post-processing the prediction block of the current block based on the intra-picture prediction mode of the neighboring block, encoding efficiency can be improved.

[0190] In the Versatile Video Coding (VVC) video codec and the Enhanced Compression Model (ECM), encoding efficiency can be improved through post-processing, such as the Position Dependent Intra Prediction (PDPC) prediction method, on blocks generated through intra-picture prediction. The PDPC prediction method may be a method that applies pixel smoothing using surrounding reference samples based on the intra-picture prediction mode of the current block. PDPC prediction applies smoothing only using reference samples of the current block. Therefore, the PDPC prediction method may not be applied in the negative direction intra-picture prediction mode.

[0191] The present disclosure proposes a method for postprocessing a current block, considering the intra-screen prediction modes of neighboring blocks, to which intra-screen prediction has been applied. Because the method proposed in this disclosure performs postprocessing by considering the intra-screen prediction modes of neighboring blocks, it can adaptively perform postprocessing based on the pixel correlations of neighboring blocks. Furthermore, the present disclosure has the advantage of being able to perform postprocessing regardless of the intra-screen prediction mode of the current block.

[0192] Example 1

[0193] According to one embodiment of the present disclosure, a current block may be post-processed by considering the intra-screen prediction modes of neighboring blocks of the current block to which intra-screen prediction has been applied. That is, the current block may be post-processed based on the predicted block of the current block to which intra-screen prediction has been applied and the intra-screen prediction modes of neighboring blocks.

[0194] FIG. 10 is a diagram illustrating a method for post-processing an upper region of a current block according to an embodiment of the present disclosure. In order to post-process the upper region of the current block, the current block may be post-processed by performing a weighted sum on a prediction block generated by applying an intra-prediction mode of samples within an upper neighboring block to the current block and a prediction block generated based on the intra-prediction mode of the current block. At this time, the post-processing of the current block may be performed only on the upper N rows within the current block. N may be a natural number greater than or equal to 1 and less than or equal to the CTU size. For example, FIG. 10 illustrates an example in which post-processing is applied only to the upper two rows of an 8x8 block. However, the present disclosure is not limited thereto, and the post-processing of the current block may be performed on all samples within the current block.

[0195] FIG. 11 is a diagram illustrating an upper region post-processing method according to an embodiment of the present disclosure. Block 1110 of FIG. 11 may be a block predicted through an intra-screen prediction mode selected from a current block (i.e., a first prediction block). That is, block 1110 may be a prediction block generated using the intra-prediction mode of the current block (i.e., a first prediction block). Block 1120 may be a prediction block obtained by applying the intra-screen prediction mode of a neighboring block including an upper sample (1121) to the current block (i.e., a second prediction block). That is, block 1120 may be a prediction block generated by applying the intra-prediction mode of an upper sample (1121) included in a neighboring block to the current block (i.e., a second prediction block).

[0196] The 1130 block may be a prediction block (i.e., a final prediction block) to which post-processing has been newly applied through a weighted sum of the 1110 blocks and the 1120 blocks. The post-processing may be applied to the upper N rows within the current block. N may be a natural number greater than or equal to 1 and less than or equal to the CTU size. The 1130 block of Fig. 11 may be a block to which post-processing has been applied to the upper four rows within the current block. The top row, which is the darkest area in the 1130 block, may mean that the weight applied to the sample value of the sample within the 1120 block is the highest, and the weight applied to the sample value of the sample within the 1120 block may become smaller as it goes to the lower row. In other words, the weight applied to the sample value of the sample within the 1120 block may become smaller as it gets farther away from the upper surrounding block. However, the present disclosure is not limited thereto, and the post-processing of the current block may be performed on all samples within the current block.

[0197] The upper region post-processing according to the present disclosure can be calculated using the following mathematical expression 2.

[0198]

[0199] In mathematical expression 2, (x, y) denotes the coordinates of the sample within the block. pred(x, y) denotes the final prediction block to which post-processing is applied. pred_org(x, y) (i.e., the first prediction block) denotes a sample value predicted through the intra-prediction mode selected from the current block. That is, pred_org(x, y) denotes a sample value of a prediction sample generated using the intra-prediction mode of the current block. pred_above(x, y) (i.e., the second prediction block) denotes a pixel value obtained by applying intra-prediction to the current block using the intra-prediction mode of the upper neighboring block including the upper reference sample. That is, pred_above(x, y) denotes a sample value of a prediction sample of the current block generated using the intra-prediction mode of the upper sample included in the upper neighboring block of the current block. The intra-prediction mode used to generate pred_above(x, y) can be selected from among the intra-prediction modes of samples included in the upper neighboring block.

[0200] w0(x,y) represents the weight applied to pred_org(x,y). w1(x,y) represents the weight applied to pred_above(x,y). Since the sum of w0(x,y) and w1(x,y) is always 1, the relationship between w0(x,y) and w1(x,y) can always satisfy the following mathematical expression 3.

[0201]

[0202] FIG. 12 is a diagram illustrating a method for selecting an upper sample within an upper neighboring block according to an embodiment of the present disclosure. Block 1210 of FIG. 12 may be pred_above(x, y) generated using the intra prediction mode of an upper sample (1211) included in an upper neighboring block of the current block. Block 1220 may be pred_above(x, y) generated using the intra prediction mode of an upper-right sample (1221) included in an upper neighboring block of the current block.

[0203] The 1230 block may be a pred_above(x,y) generated using the intra prediction mode of the upper left sample (1231) included in the upper surrounding block of the current block. The 1240 block may be a pred_above(x,y) generated using the intra prediction mode of the upper center sample (1241) included in the upper surrounding block of the current block. The upper surrounding block referred to in the present disclosure may be a concept referring to all blocks located above the current block. In other words, both the upper left surrounding block and the upper right surrounding block of the current block may be included in the upper surrounding block.

[0204] When selecting an intra prediction mode from an upper neighboring block, if there are multiple intra prediction modes, there may be various ways to determine which intra prediction mode to select to generate pred_above(x,y). That is, there may be various ways to search samples within an upper neighboring block to determine which intra prediction mode of a sample among the samples contained in the upper neighboring block to use.

[0205] For example, the intra prediction mode for generating pred_above(x,y) may be selected in the order of the intra prediction modes of the upper sample (1211), the upper right sample (1221), the upper left sample (1231), and the upper center sample (1241). However, if the intra prediction mode of the current block and the intra prediction mode of the sample in the selected upper neighboring block are the same, the intra prediction mode of the corresponding sample may be excluded from selection. For example, if the intra prediction mode of the current block is the 34th directional mode and the intra prediction mode of the upper sample (1211) is also the 34th directional mode, the upper sample (1211) may be excluded from selection. In this case, the intra prediction mode of the next order upper right sample (1221) may be selected. The selection order of the samples included in the upper neighboring blocks is not limited to the above example and may be exchanged.

[0206] As another example, the intra prediction mode for generating pred_above(x,y) may be selected in the order of the intra prediction mode of the upper sample (1211), the upper right sample (1221), and the upper left sample (1231). However, if the intra prediction mode of the current block and the intra prediction mode of a sample in the selected upper neighboring block are the same, the intra prediction mode of the corresponding sample may be excluded from selection. The selection order of samples included in the upper neighboring block is not limited to the above example and may be interchanged.

[0207] As another example, the intra prediction mode for generating pred_above(x,y) may be selected as one of the intra prediction modes of all samples included in the upper neighboring block. In this case, the sample within the upper neighboring block for generating pred_above(x,y) may be determined as a selected sample by searching in the right direction starting from the upper left sample (1231). However, if the intra prediction mode of the current block and the intra prediction mode of the sample within the selected upper neighboring block are the same, the intra prediction mode of the corresponding sample may be excluded from selection.

[0208] As another example, the intra prediction mode for generating pred_above(x,y) may be selected as one of the intra prediction modes of all samples included in the upper neighboring block. In this case, the sample within the upper neighboring block for generating pred_above(x,y) may be determined as the selected sample by searching leftward starting from the upper-right sample (1221). However, if the intra prediction mode of the current block and the intra prediction mode of the sample within the selected upper neighboring block are the same, the intra prediction mode of the corresponding sample may be excluded from selection.

[0209] Even if the samples within the upper surrounding blocks are searched in the above manner, if there is no intra prediction mode different from the intra prediction mode of the current block, the post-processing method proposed in the present disclosure may not be applied.

[0210] According to one embodiment of the present disclosure, when searching for samples within an upper peripheral block, certain conditions may also be considered.

[0211] - When exploring samples within the upper peripheral block, non-directional modes (PLANAR mode, DC mode) are excluded.

[0212] - When searching for samples within the upper peripheral block, exclude MIP (Matrix-based Intra prediction) mode, ISP (Intra Sub-Partitions) mode, MRL (Multi-Reference Line) mode, SGPM (Spatial Geometric Partitioning Mode) mode CIIP (Combined Inter and Intra Prediction) mode, DIMD (Decoder side intra mode derivation) mode, TIMD (Template-based intra mode derivation) mode and / or IntraTemplatematching mode (the exclusion of the above modes can be applied independently, or multiple modes can be selected and applied).

[0213] - When exploring samples within the upper surrounding block, cross-component intra prediction mode is excluded.

[0214] - When exploring samples within the upper surrounding blocks, only intra prediction modes with directional modes of 50 to 80 are selected.

[0215] - When searching for samples within the upper surrounding block, only intra prediction modes with directional modes 34 to 80 are selected.

[0216] - When searching for samples within the upper surrounding block, only intra prediction modes with directional modes 19 to 80 are selected.

[0217] - The intra prediction mode of the current block is directional mode A, and the intra prediction mode of the sample in the upper neighboring block is selected only if B satisfies │AB│< K. For example, if K is 5 and A is mode 40, the intra prediction mode of the sample in the upper neighboring block can be selected only if it is directional mode 36 to 44. Here, K can be a fixed value, or it can be adaptively determined depending on the size, shape, etc. of the block.

[0218] The above specific conditions can be applied independently of each other, or multiple conditions can be selected and applied simultaneously. If there is no intra prediction mode among the intra prediction modes of the samples in the upper neighboring block that is different from the intra prediction mode of the current block, the post-processing method proposed in this embodiment may not be applied. If there are multiple intra prediction modes of the samples in the upper neighboring block that satisfy the above specific conditions, the samples in the upper neighboring block for generating pred_above(x, y) can be selected based on the search order described above.

[0219] Alternatively, when there are multiple intra prediction modes of samples in the upper neighboring block that satisfy a specific condition, prediction blocks may be generated based on each intra prediction mode, and then pred_above(x,y) may be generated by combining the respective prediction blocks. When there are N or more intra prediction modes of samples in the upper neighboring block, pred_above(x,y) may be generated by combining M prediction blocks generated based on the selected M intra prediction modes. Here, M and N are natural numbers greater than or equal to 2, and M may be a number equal to or less than N. The combination of the M prediction blocks may be performed by weighting the M prediction blocks. At this time, the weights applied to the M prediction blocks may be equal. Alternatively, the weights applied to the M prediction blocks may be determined based on the sum of absolute transformed differences (SATD) used in TIMD after applying TIMD using the surrounding reference sample template.

[0220] For example, if the intra prediction mode of the upper sample (1211) is directional mode 60 and the intra prediction mode of the upper left sample (1231) is directional mode 66, pred_above(x,y) can be generated by combining (weighting) a prediction block predicted by applying directional mode 60 to the current block and a prediction block predicted by applying directional mode 66 to the current block. At this time, the weights used for combination can be set equally or can be determined based on SATD used in TIMD.

[0221] In mathematical expression 3, w1(x,y) can be determined using mathematical expression 4 or mathematical expression 5 below.

[0222]

[0223]

[0224] In the case of mathematical expression 4, a constant weight N may be applied to w1 according to the y-coordinate of the prediction target sample in the current block. In the case of mathematical expression 5, w1 may decrease uniformly as the y-coordinate of the prediction target sample in the current block increases. In mathematical expressions 4 and 5, N and A may have specific fixed values, or may be adaptively determined according to the size and / or shape of the current block. For example, if N is 1 / 8 and A is 4, and the y-coordinate of the prediction target sample in the current block is 4, the weight (w1) is 1 / 8. If the y-coordinate of the prediction target sample in the current block is 1, the weight (w1) is 4 / 8 (= 1 / 2).

[0225] Alternatively, w1 may be determined in the same manner as wT and / or wL of PDPC. Alternatively, there may be various methods for obtaining w1, such as in Equation 6 below.

[0226]

[0227] The application of postprocessing proposed in this disclosure can be adaptively determined based on the intra prediction mode of the current block. Specifically, the application of postprocessing can be determined based on the following conditions.

[0228] - If the intra prediction mode of the current block is a non-directional prediction mode such as PLANAR mode or DC mode, the post-processing method proposed in this disclosure is not applied to the current block.

[0229] - If the intra prediction mode of the current block is MIP mode, ISP mode, MRL mode, SGPM mode CIIP mode, DIMD mode, TIMD mode and / or IntraTemplatematching mode, the post-processing method proposed in this disclosure is not applied to the current block.

[0230] - If the width x height value of the current block is less than or equal to K, the post-processing method proposed in this disclosure is not applied to the current block. In this case, K can be a value between 4 and 65536.

[0231] - If the width x height value of the current block is greater than or equal to K, the post-processing method proposed in this disclosure is not applied to the current block. In this case, K can be a value between 4 (= 2x2) and 65536 (= 256x256).

[0232] The conditions for determining whether to apply the above post-processing can be applied independently of each other, or multiple conditions can be selected and applied simultaneously.

[0233] Information indicating whether the post-processing method proposed in the present disclosure is applied (i.e., application information) can be signaled from HLS (high-level syntax) such as VPS (Video Parameter Set), SPS (Sequence Parameter Set), PPS (Picture Parameter Set), Picture Header, Slice Header, and DCI (Decoding Capability Information). Alternatively, information indicating whether the post-processing method is applied (i.e., application information) can be signaled by HLS (high-level syntax) such as VPS, SPS, PPS, Picture Header, Slice Header, and DCI. For example, when determining whether the post-processing method proposed in the present disclosure is applied on a PPS basis, information indicating whether the post-processing method is applied (i.e., application information) can be transmitted as PPS.

[0234] The post-processing method proposed in the present disclosure can adaptively determine whether to apply post-processing in the image decoding device (200) without signaling information that determines whether to apply the post-processing method, or can determine whether to apply post-processing by explicitly signaling information that determines whether to apply the post-processing method. For example, information that determines whether to apply post-processing in units of CTU or CU can be transmitted to the image decoding device (200) using a 1-bit flag. Alternatively, when the post-processing proposed in the present disclosure is to be applied based on a specific block size, shape, and / or the presence or absence of specific conditions, information that determines whether to apply the post-processing method can be transmitted to the image decoding device (200) using a 1-bit flag only in this case.

[0235] According to one embodiment of the present disclosure, information determining whether to apply post-processing to a coding unit may be adaptively signaled based on information determining whether to apply post-processing defined in HLS. For example, if the information determining whether to apply post-processing signaled in SPS is false, the post-processing process proposed in the present disclosure will not be applied to the coding unit, and the information determining whether to apply post-processing to the coding unit may not be transmitted.

[0236] FIG. 13 is a flowchart of a video encoding / decoding method according to an embodiment of the present disclosure. Referring to FIG. 13, the video encoding device (100) and / or the video decoding device (200) may generate a predictor of the current block based on the selected intra prediction mode of the current block (S1310). The generated predictor may be a first prediction block. Thereafter, the video encoding device (100) and / or the video decoding device (200) may determine whether post-processing may be applied (S1330). That is, the video encoding device (100) and / or the video decoding device (200) may determine whether a post-processing process may be applied to the current block. In the video decoding device (200), whether post-processing may be applied may be determined based on information indicating whether post-processing may be applied (i.e., application information). In this case, the information indicating whether post-processing may be applied may be information signaled from HLS.

[0237] If the post-processing process is applicable to the current block (YES in step S1330), the video encoding device (100) and / or the video decoding device (200) can generate a new predictor of the current block based on the intra prediction mode of the selected upper neighboring block (S1350). The generated new predictor may be a second prediction block. The video encoding device (100) and / or the video decoding device (200) can perform post-processing (S1370). Specifically, the video encoding device (100) and / or the video decoding device (200) can perform the post-processing process by weighting the predictor generated in step S1310 and the new predictor generated in step S1350.

[0238] If the post-processing process is not applicable to the current block (NO in step S1330), the image encoding device (100) and / or the image decoding device (200) may terminate the procedure without performing the post-processing process.

[0239] Example 2

[0240] This embodiment proposes a method for post-processing a current block by considering the intra-prediction modes of neighboring blocks of the current block to which intra-prediction has been applied. In other words, the current block can be post-processed by combining a prediction block of the current block to which intra-prediction has been applied and a prediction block generated based on the intra-prediction modes of neighboring blocks.

[0241] FIG. 14 is a diagram illustrating a post-processing method for a left region of a current block according to an embodiment of the present disclosure. In order to post-process the left region of the current block, the current block may be post-processed by performing a weighted sum on a prediction sample (or block) generated by applying the intra-prediction mode of samples in the left neighboring block to the current block and a prediction sample (or block) generated based on the intra-prediction mode of the current block. At this time, the post-processing of the current block may be performed only on the left N rows within the current block. N may be a natural number greater than or equal to 1 and less than or equal to the CTU size. For example, FIG. 14 illustrates an example in which post-processing is applied only to the left two rows of an 8x8 block. However, the present disclosure is not limited thereto, and the post-processing of the current block may be performed on all samples within the current block.

[0242] FIG. 15 is a diagram illustrating an upper region post-processing method according to an embodiment of the present disclosure. Block 1510 of FIG. 15 may be a block predicted through an intra-screen prediction mode selected from a current block (i.e., a first prediction block). That is, block 1510 may be a prediction block generated using an intra-prediction mode of the current block (i.e., a first prediction block). Block 1520 may be a prediction block obtained by applying an intra-prediction mode of a neighboring block including a left sample (1521) to the current block (i.e., a second prediction block). That is, block 1520 may be a prediction block generated by applying an intra-prediction mode of a left sample (1521) included in a neighboring block to the current block (i.e., a second prediction block).

[0243] Block 1530 may be a prediction block (i.e., a final prediction block) to which post-processing has been newly applied through a weighted sum of blocks 1510 and 1520. The post-processing may be applied to the left N rows within the current block. N may be a natural number greater than or equal to 1 and less than or equal to the CTU size. Block 1530 of Fig. 15 may be a block to which post-processing has been applied to the left four rows within the current block. The leftmost row, which is the darkest area in block 1530, may indicate that the weight applied to the sample value of the sample within block 1520 is high, and the weight applied to the sample value of the sample within block 1520 may gradually decrease as it goes to the right row. However, the present disclosure is not limited thereto, and post-processing of the current block may be performed on all samples within the current block.

[0244] Post-processing of the left region according to the present disclosure can be performed using the following mathematical expression 7.

[0245]

[0246] In mathematical expression 7, (x, y) denotes the coordinates of a sample within a block. pred(x, y) denotes the final prediction block to which post-processing is applied. pred_org(x, y) (i.e., the first prediction block) denotes a pixel value predicted through the intra-prediction mode selected from the current block. That is, pred_org(x, y) denotes a sample value of a prediction sample generated using the intra-prediction mode of the current block. pred_left(x, y) (i.e., the second prediction block) denotes a pixel value obtained by applying intra-prediction to the current block using the intra-prediction mode of the block containing the left reference sample. That is, pred_left(x, y) denotes a sample value of a prediction sample of the current block generated using the intra-prediction mode of the left sample included in the left neighboring block of the current block. The intra-prediction mode used to generate pred_left(x, y) may be selected from the intra-prediction modes of the samples included in the left neighboring blocks.

[0247] w0(x,y) represents the weight applied to pred_org(x,y). w1(x,y) represents the weight applied to pred_left(x,y). Since the sum of w0(x,y) and w1(x,y) is always 1, the relationship between w0(x,y) and w1(x,y) can always satisfy the following mathematical expression 8.

[0248]

[0249] FIG. 16 is a diagram illustrating a method for selecting a left sample within a left neighboring block according to an embodiment of the present disclosure. Block 1610 of FIG. 16 may be pred_left(x,y) generated using the intra prediction mode of the left sample (1611) included in the left neighboring block of the current block. Block 1620 may be pred_left(x,y) generated using the intra prediction mode of the lower left sample (1621) included in the left neighboring block of the current block.

[0250] The 1630 block may be a pred_left(x,y) generated using the intra prediction mode of the upper left sample (1631) included in the left neighboring block of the current block. The 1640 block may be a pred_left(x,y) generated using the intra prediction mode of the left center sample (1641) included in the left neighboring block of the current block. The left neighboring block referred to in the present disclosure may be a concept referring to all blocks located to the left of the current block. In other words, both the upper left neighboring block and the lower left neighboring block of the current block may be included in the left neighboring block.

[0251] When selecting an intra prediction mode from a left neighboring block, if there are multiple intra prediction modes, there may be various ways to determine which intra prediction mode to select to generate pred_left(x,y). That is, there may be various ways to search samples within the left neighboring block to determine which intra prediction mode of a sample among the samples contained in the left neighboring block to use.

[0252] For example, the intra prediction mode for generating pred_left(x,y) may be selected in the order of the intra prediction modes of the left sample (1611), the lower left sample (1621), the upper left sample (1631), and the left center sample (1641). However, if the intra prediction mode of the current block and the intra prediction mode of the sample in the selected left neighboring block are the same, the intra prediction mode of the corresponding sample may be excluded from selection. For example, if the intra prediction mode of the current block is the 18th directional mode and the intra prediction mode of the left sample (1611) is also the 18th directional mode, the left sample (1611) may be excluded from selection. In this case, the intra prediction mode of the next lower left sample (1621) may be selected. The selection order of the samples included in the left neighboring block is not limited to the above example and may be exchanged.

[0253] As another example, the intra prediction mode for generating pred_left(x,y) may be selected in the order of the intra prediction modes of the left sample (1611), the lower left sample (1621), and the upper left sample (1631). However, if the intra prediction mode of the current block and the intra prediction mode of a sample in the selected left neighboring block are the same, the intra prediction mode of the corresponding sample may be excluded from selection. The selection order of samples included in the left neighboring block is not limited to the above example and may be interchanged.

[0254] As another example, the intra prediction mode for generating pred_left(x,y) may be selected as one of the intra prediction modes of all samples included in the left neighboring block. In this case, the sample within the left neighboring block for generating pred_left(x,y) may be determined as the selected sample by searching downward starting from the upper left sample (1631). However, if the intra prediction mode of the current block and the intra prediction mode of the sample within the selected left neighboring block are the same, the intra prediction mode of the corresponding sample may be excluded from selection.

[0255] As another example, the intra prediction mode for generating pred_left(x,y) may be selected as one of the intra prediction modes of all samples included in the left neighboring block. In this case, the sample within the left neighboring block for generating pred_left(x,y) may be determined as the selected sample by searching upward starting from the lower left sample (1621). However, if the intra prediction mode of the current block and the intra prediction mode of the sample within the selected left neighboring block are the same, the intra prediction mode of the corresponding sample may be excluded from selection.

[0256] Even if the samples within the left peripheral block are searched in the above manner, if there is no intra prediction mode different from the intra prediction mode of the current block, the post-processing method proposed in the present disclosure may not be applied.

[0257] According to one embodiment of the present disclosure, when searching for samples within a left peripheral block, certain conditions may also be considered.

[0258] - When exploring samples within the left peripheral block, non-directional modes (PLANAR mode, DC mode) are excluded.

[0259] - When searching for samples within the left peripheral block, exclude MIP mode, ISP mode, MRL mode, SGPM mode CIIP mode, DIMD mode, TIMD mode and / or IntraTemplatematching mode (the exclusion of the above modes can be applied independently, or multiple modes can be selected and applied)

[0260] - When exploring samples within the left surrounding block, cross-component intra prediction mode is excluded.

[0261] - When searching for samples within the left surrounding block, only intra prediction modes with directional modes of -14 to 18 are selected.

[0262] - When searching for samples within the left surrounding block, only intra prediction modes with directional modes of -14 to 34 are selected.

[0263] - When searching for samples within the left surrounding block, only intra prediction modes with directional modes of -14 to 49 are selected.

[0264] - The intra prediction mode of the current block is directional mode A, and the intra prediction mode of the sample in the left neighboring block is selected only if B satisfies │AB│< K. For example, if K is 5 and A is mode 8, the intra prediction mode of the sample in the left neighboring block can be selected only if it is directional mode 4 to 12. Here, K can be a fixed value, or it can be adaptively determined depending on the size, shape, etc. of the block.

[0265] The above specific conditions can be applied independently of each other, or multiple conditions can be selected and applied simultaneously. If there is no intra prediction mode among the samples in the left neighboring block that is different from the intra prediction mode of the current block, the post-processing method proposed in this embodiment may not be applied. If there are multiple intra prediction modes of the samples in the left neighboring block that satisfy the above specific conditions, the samples in the left neighboring block for generating pred_left(x, y) can be selected based on the search order described above.

[0266] Alternatively, if there are multiple intra prediction modes of samples in the left neighboring block that satisfy a specific condition, pred_left(x,y) may be generated by generating prediction blocks based on each of the intra prediction modes and then combining the respective prediction blocks. If there are N or more intra prediction modes of samples in the left neighboring block, pred_left(x,y) may be generated by combining M prediction blocks generated based on the selected M intra prediction modes. Here, M and N are natural numbers greater than or equal to 2, and M may be a number equal to or less than N. The combination of the M prediction blocks may be performed by weighting the M prediction blocks. At this time, the weights applied to the M prediction blocks may be equal. Alternatively, the weights applied to the M prediction blocks may be determined based on SATD used in TIMD after applying TIMD using the neighboring reference sample template.

[0267] For example, if the intra prediction mode of the left sample (1611) is directional mode 18 and the intra prediction mode of the upper left sample (1631) is directional mode 34, pred_left(x,y) can be generated by combining (weighting) a prediction block predicted by applying directional mode 18 to the current block and a prediction block predicted by applying directional mode 34 to the current block. At this time, the weights used for combination can be set equally or can be determined based on SATD used in TIMD.

[0268] w1(x,y) in mathematical expression 8 can be determined using mathematical expression 9 or mathematical expression 10 below.

[0269]

[0270]

[0271] In the case of mathematical expression 9, a constant weight N may be applied to w1 according to the x-coordinate of the prediction target sample in the current block. In the case of mathematical expression 10, w1 may decrease uniformly as the x-coordinate of the prediction target sample in the current block increases. In mathematical expressions 9 and 10, N and A may have specific fixed values, or may be adaptively determined according to the size and / or shape of the current block. For example, if N is 1 / 8 and A is 4, and the x-coordinate of the prediction target sample in the current block is 4, the weight (w1) is 1 / 8. If the x-coordinate of the prediction target sample in the current block is 1, the weight (w1) is 4 / 8 (= 1 / 2).

[0272] Alternatively, w1 may be determined in the same manner as wT and / or wL of PDPC. Alternatively, there may be various methods for obtaining w1, such as in Equation 11 below.

[0273]

[0274] The application of postprocessing proposed in this disclosure can be adaptively determined based on the intra prediction mode of the current block. Specifically, the application of postprocessing can be determined based on the following conditions.

[0275] - If the intra prediction mode of the current block is a non-directional prediction mode such as PLANAR mode or DC mode, the post-processing method proposed in this disclosure is not applied to the current block.

[0276] - If the intra prediction mode of the current block is MIP mode, ISP mode, MRL mode, SGPM mode CIIP mode, DIMD mode, TIMD mode and / or IntraTemplatematching mode, the post-processing method proposed in this disclosure is not applied to the current block.

[0277] - If the width x height value of the current block is less than or equal to K, the post-processing method proposed in this disclosure is not applied to the current block. In this case, K can be a value between 4 and 65536.

[0278] - If the width x height value of the current block is greater than or equal to K, the post-processing method proposed in this disclosure is not applied to the current block. In this case, K can be a value between 4 and 65536.

[0279] The conditions for determining whether to apply the above post-processing can be applied independently of each other, or multiple conditions can be selected and applied simultaneously.

[0280] Information indicating whether the post-processing method proposed in this disclosure is applied (i.e., application information) can be signaled from HLS such as VPS, SPS, PPS, Picture Header, Slice Header, and DCI. Alternatively, information indicating whether the post-processing method is applied (i.e., application information) can be signaled from HLS such as VPS, SPS, PPS, Picture Header, Slice Header, and DCI. For example, when determining whether the post-processing method proposed in this disclosure is applied on a PPS basis, information indicating whether the post-processing method is applied (i.e., application information) can be transmitted to PPS.

[0281] The post-processing method proposed in the present disclosure can adaptively determine whether to apply post-processing in the image decoding device (200) without signaling information that determines whether to apply the post-processing method, or can determine whether to apply post-processing by explicitly signaling information that determines whether to apply the post-processing method. For example, information that determines whether to apply post-processing in units of CTU or CU can be transmitted to the image decoding device (200) using a 1-bit flag. Alternatively, when the post-processing proposed in the present disclosure is to be applied based on a specific block size, shape, and / or the presence or absence of specific conditions, information that determines whether to apply the post-processing method can be transmitted to the image decoding device (200) using a 1-bit flag only in this case.

[0282] According to one embodiment of the present disclosure, information determining whether to apply post-processing to a coding unit may be adaptively signaled based on information determining whether to apply post-processing defined in HLS. For example, if the information determining whether to apply post-processing signaled in SPS is false, the post-processing process proposed in the present disclosure will not be applied to the coding unit, and the information determining whether to apply post-processing to the coding unit may not be transmitted.

[0283] FIG. 17 is a flowchart of a video encoding / decoding method according to an embodiment of the present disclosure. Referring to FIG. 17, the video encoding device (100) and / or the video decoding device (200) may generate a predictor of the current block based on the selected intra prediction mode of the current block (S1710). The generated predictor may be a first prediction block. Thereafter, the video encoding device (100) and / or the video decoding device (200) may determine whether post-processing may be applied (S1730). That is, the video encoding device (100) and / or the video decoding device (200) may determine whether a post-processing process may be applied to the current block. In the video decoding device (200), whether post-processing may be applied may be determined based on information indicating whether post-processing may be applied (i.e., application information). In this case, the information indicating whether post-processing may be applied may be information signaled from HLS.

[0284] If the post-processing process is applicable to the current block (YES in step S1730), the video encoding device (100) and / or the video decoding device (200) can generate a new predictor of the current block based on the intra prediction mode of the selected left neighboring block (S1750). Here, the generated new predictor may be a second prediction block. The video encoding device (100) and / or the video decoding device (200) can perform post-processing (S1770). Specifically, the video encoding device (100) and / or the video decoding device (200) can perform the post-processing process by weighting the predictor generated in step S1710 and the new predictor generated in step S1750.

[0285] If the post-processing process is not applicable to the current block (NO in step S1730), the image encoding device (100) and / or the image decoding device (200) may terminate the procedure without performing the post-processing process.

[0286] Example 3

[0287] This embodiment proposes a method for post-processing a current block by considering the intra-prediction modes of neighboring blocks to which intra-prediction has been applied. That is, the current block can be post-processed by combining the predicted block of the current block to which intra-prediction has been applied with a predicted block generated based on the intra-prediction modes of neighboring blocks. In particular, this embodiment proposes a method for post-processing the upper and left regions of the current block.

[0288] FIG. 18 is a diagram illustrating a method for post-processing an upper left region of a current block according to an embodiment of the present disclosure. In order to post-process the upper region and the left region of the current block, the current block may be post-processed by performing a weighted sum on a prediction sample (or block) generated by applying the intra-prediction mode of the sample in the upper neighboring block and the intra-prediction mode of the sample in the left neighboring block to the current block and a prediction sample (or block) generated based on the intra-prediction mode of the current block. At this time, the post-processing of the current block may be performed only on the upper N rows and the left N rows in the current block. N may be a natural number greater than or equal to 1 and less than or equal to the CTU size. For example, FIG. 18 illustrates an example in which post-processing is applied only to the left two rows and the upper two rows of an 8x8 block. However, the present disclosure is not limited thereto, and the post-processing of the current block may be performed on all samples in the current block.

[0289] Post-processing of the left and upper regions according to the present disclosure can be performed using the following mathematical expression 12.

[0290]

[0291] In mathematical expression 12, (x, y) denotes the coordinates of a sample within a block. pred(x, y) denotes the final prediction block to which post-processing is applied. pred_org(x, y) denotes a pixel value predicted through the intra-prediction mode selected in the current block. That is, pred_org(x, y) denotes a sample value of a prediction sample generated using the intra-prediction mode of the current block. pred_above(x, y) denotes a pixel value obtained by applying intra-prediction to the current block using the intra-prediction mode of the block including the upper reference sample. That is, pred_above(x, y) denotes a sample value of a prediction sample of the current block generated using the intra-prediction mode of the upper sample included in the upper neighboring block of the current block. pred_above(x, y) can be generated using the same method as in Embodiment 1.

[0292] pred_left(x,y) refers to a pixel value obtained by applying intra prediction to the current block using the intra prediction mode of the block including the left reference sample. In other words, pred_left(x,y) refers to a sample value of a prediction sample of the current block generated using the intra prediction mode of the left sample included in the left neighboring block of the current block. The intra prediction mode used to generate pred_left(x,y) can be selected from among the intra prediction modes of the samples included in the left neighboring block. pred_left(x,y) can be generated using the same method as the method of Embodiment 2.

[0293] w0(x,y) represents the weight applied to pred_org(x,y). w1(x,y) represents the weight applied to pred_above(x,y). w2(x,y) represents the weight applied to pred_left(x,y). Since the sum of w0(x,y), w1(x,y), and w2(x,y) is always 1, the relationship between w0(x,y), w1(x,y), and w2(x,y) can always satisfy the following mathematical expression 13.

[0294]

[0295] w1(x,y) and w2(x,y) can be determined using Equation 14 or Equation 15 below.

[0296]

[0297]

[0298] In Equation 14, w1(x,y) can be determined as a constant weight N according to the y-coordinate of the prediction target sample within the current block. In Equation 15, w1(x,y) can decrease uniformly as the y-coordinate of the prediction target sample within the current block increases. In Equations 14 and 15, N and A can have specific fixed values, or can be adaptively changed according to the size and shape of the current block.

[0299] In Equation 14, w2(x,y) can be determined as a constant weight N according to the x-coordinate of the prediction target sample in the current block. In Equation 15, w2(x,y) can decrease uniformly as the x-coordinate of the prediction target sample in the current block increases. In Equations 14 and 15, N and B can have specific fixed values, or can be adaptively changed according to the size and shape of the current block.

[0300] Alternatively, w1(x,y) and w2(x,y) may be determined in the same manner as wT and / or wL of PDPC. Alternatively, there may be various methods for obtaining w1(x,y) and w2(x,y), as in Equations 16 and 17 below.

[0301]

[0302]

[0303] FIG. 19 is a diagram illustrating a post-processing method for an upper left region according to an embodiment of the present disclosure. Block 1910 of FIG. 19 may be a block predicted through an intra-screen prediction mode selected from a current block (i.e., a first prediction block). That is, block 1910 may be a prediction block generated using an intra-prediction mode of the current block (i.e., a first prediction block). Block 1920 may be a prediction block obtained by applying an intra-prediction mode of a neighboring block including a left sample (1921) to the current block (i.e., a second prediction block). That is, block 1920 may be a prediction block generated by applying an intra-prediction mode of a left sample (1921) included in a neighboring block to the current block (i.e., a second prediction block).

[0304] The 1930 block may be a prediction block (i.e., a final prediction block) to which new post-processing has been applied through a weighted sum of the 1910 and 1920 blocks. The post-processing may be applied to the left N rows and the upper N rows within the current block. N may be a natural number greater than or equal to 1 and less than or equal to the CTU size. The 1930 block of Fig. 19 may be a block to which post-processing has been applied to the left 4 rows and the upper 4 rows within the current block. The leftmost row and the uppermost row, which are the darkest areas in the 1930 block, may indicate that the weight applied to the sample values ​​of the samples within the 1920 block is high, and the weight applied to the sample values ​​of the samples within the 1920 block may gradually decrease as it goes to the lower right. However, the present disclosure is not limited thereto, and the post-processing of the current block may be performed on all samples within the current block.

[0305] A method of applying post-processing by integrating the upper region and the left region according to the present disclosure can be performed using the following mathematical expression 18.

[0306]

[0307] In mathematical expression 18, (x, y) denotes the coordinates of the sample within the block. pred(x, y) denotes the final prediction block to which post-processing is applied. pred_org(x, y) denotes the pixel value predicted through the intra-prediction mode selected in the current block. That is, pred_org(x, y) denotes the sample value of the prediction sample generated using the intra-prediction mode of the current block. pred_ref(x, y) denotes the pixel value obtained by applying intra-prediction to the current block using the intra-prediction mode of the block including the upper and left reference samples. That is, pred_ref(x, y) denotes the sample value of the prediction sample of the current block generated using the intra-prediction mode of the sample included in the upper and left neighboring blocks of the current block.

[0308] w0(x,y) represents the weight applied to pred_org(x,y). w1(x,y) represents the weight applied to pred_ref(x,y). Since the sum of w0(x,y) and w1(x,y) is always 1, the relationship between w0(x,y) and w1(x,y) can always satisfy the following mathematical expression 19.

[0309]

[0310] The intra prediction mode used to obtain pred_ref(x,y) in Equation 18 can be selected within blocks containing left and upper reference samples.

[0311] FIG. 20 is a diagram illustrating a method for selecting samples within a left neighboring block and an upper neighboring block according to an embodiment of the present disclosure. Block 2010 of FIG. 20 may be a pred_ref(x,y) generated using the intra prediction mode of a left sample (2011) included in a left neighboring block of the current block. Block 2020 may be a pred_ref(x,y) generated using the intra prediction mode of an upper sample (2021) included in an upper neighboring block of the current block.

[0312] The 2030 block may be a pred_ref(x,y) generated using the intra prediction mode of the lower left sample (2031) included in the left neighboring block of the current block. The 2040 block may be a pred_ref(x,y) generated using the intra prediction mode of the upper right sample (2041) included in the upper neighboring block of the current block. The 2050 block may be a pred_ref(x,y) generated using the intra prediction mode of the upper left sample (2051) included in the left neighboring block (or upper neighboring block) of the current block.

[0313] The term "left peripheral block" as used herein may refer to all blocks located to the left of the current block. That is, both the upper-left peripheral block and the lower-left peripheral block of the current block may be included in the left peripheral block. Furthermore, the term "upper peripheral block" as used herein may refer to all blocks located above the current block. That is, both the upper-left peripheral block and the upper-right peripheral block of the current block may be included in the upper peripheral block.

[0314] When selecting an intra prediction mode from the left neighboring block and the upper neighboring block, if there are various intra prediction modes, there may be various ways to determine which intra prediction mode to select to generate pred_ref(x,y). That is, there may be various ways to search samples within the left neighboring block and the upper neighboring block to determine which intra prediction mode of which sample among the samples contained in the left neighboring block and the upper neighboring block to use.

[0315] For example, the intra prediction mode for generating pred_ref(x,y) may be selected in the order of the intra prediction modes of the left sample (2011), the upper sample (2021), the lower left sample (2031), the upper right sample (2041), and the upper left sample (2051). However, if the intra prediction mode of the current block and the intra prediction mode of the sample in the selected left neighboring block or upper neighboring block are the same, the intra prediction mode of the corresponding sample may be excluded from selection. For example, if the intra prediction mode of the current block is the 18th directional mode and the intra prediction mode of the left sample (2011) is also the 18th directional mode, the left sample (2011) may be excluded from selection. In this case, the intra prediction mode of the upper sample (2021), which is the next order, may be selected. The order of selecting samples included in the left neighboring block and / or the upper neighboring block is not limited to the above example and may be interchanged.

[0316] Even if the samples within the left peripheral block and / or the upper peripheral block are searched in the above manner, if there is no intra prediction mode different from the intra prediction mode of the current block, the post-processing method proposed in the present disclosure may not be applied.

[0317] According to one embodiment of the present disclosure, when searching for samples within the left peripheral block and / or the upper peripheral block, certain conditions may also be considered.

[0318] - When searching for samples within the left peripheral block and / or the upper peripheral block, non-directional modes (PLANAR mode, DC mode) are excluded.

[0319] - When searching for samples within the left peripheral block and / or the upper peripheral block, MIP mode, ISP mode, MRL mode, SGPM mode CIIP mode, DIMD mode, TIMD mode and / or IntraTemplatematching mode are excluded (the exclusion of the above modes can be applied independently, or multiple modes can be selected and applied).

[0320] - When exploring samples within the left neighboring block and / or the upper neighboring block, cross-component intra prediction mode is excluded.

[0321] - When exploring samples within the upper surrounding blocks, only intra prediction modes with directional modes of 50 to 80 are selected.

[0322] - When searching for samples within the upper surrounding block, only intra prediction modes with directional modes 34 to 80 are selected.

[0323] - When searching for samples within the upper surrounding block, only intra prediction modes with directional modes 19 to 80 are selected.

[0324] - When searching for samples within the left surrounding block, only intra prediction modes with directional modes of -14 to 18 are selected.

[0325] - When searching for samples within the left surrounding block, only intra prediction modes with directional modes of -14 to 34 are selected.

[0326] - When searching for samples within the left surrounding block, only intra prediction modes with directional modes of -14 to 49 are selected.

[0327] - Selected only if the intra prediction mode of the current block is directional mode A, and the intra prediction mode of the sample in the left neighboring block or the upper neighboring block satisfies B │AB│< K. For example, if K is 5 and A is mode 8, the intra prediction mode of the sample in the left neighboring block or the upper neighboring block can be selected only if it is directional mode 4 to 12. Here, K can be a fixed value, or it can be adaptively determined according to the size, shape, etc. of the block.

[0328] The above specific conditions can be applied independently of each other, or multiple conditions can be selected and applied simultaneously. If there is no intra prediction mode different from the intra prediction mode of the current block among the intra prediction modes of the samples in the left neighboring block and / or the upper neighboring block, the post-processing method proposed in this embodiment may not be applied. If there are multiple intra prediction modes of the samples in the left neighboring block and / or the upper neighboring block that satisfy the above specific conditions, the samples in the left neighboring block and / or the upper neighboring block for generating pred_ref(x, y) can be selected based on the search order described above.

[0329] Alternatively, if there are multiple intra prediction modes of samples in the left neighboring block and / or the upper neighboring block that satisfy a specific condition, pred_ref(x,y) may be generated by combining the respective prediction blocks after prediction blocks are generated based on the respective intra prediction modes. If there are N or more intra prediction modes of samples in the left neighboring block and / or the upper neighboring block, pred_ref(x,y) may be generated by combining M prediction blocks generated based on the selected M intra prediction modes. Here, M and N are natural numbers greater than or equal to 2, and M may be a number equal to or less than N. The combination of the M prediction blocks may be performed by weighting the M prediction blocks. At this time, the weights applied to the M prediction blocks may be equal. Alternatively, the weights applied to the M prediction blocks may be determined based on SATD used in TIMD after applying TIMD using the surrounding reference sample template.

[0330] For example, if the intra prediction mode of the left sample (2011) is directional mode 6 and the intra prediction mode of the upper sample (2031) is directional mode 66, pred_ref(x,y) can be generated by combining (weighting) a prediction block predicted by applying directional mode 6 to the current block and a prediction block predicted by applying directional mode 66 to the current block. At this time, the weights used for combination can be set equally or can be determined based on SATD used in TIMD.

[0331] w1(x,y) in mathematical expression 19 can be determined using mathematical expression 20 below.

[0332]

[0333] In Equation 20, min(x, y) means the smaller value among the x, y coordinate values. In the first equation of Equation 20, w1(x, y) can be determined by a constant weight N according to the x-coordinate of the prediction target sample in the current block. In the second equation of Equation 20, w1(x, y) can decrease constantly as the x-coordinate of the prediction target sample in the current block increases. In Equation 20, N and A can have specific fixed values, or can be adaptively determined according to the size and / or shape of the current block. For example, if N is 1 / 8 and A is 4, and the coordinate of the prediction target sample in the current block is (4,5), min(x, y) becomes 4, and the weight (w1) becomes 1 / 8. If the coordinate of the target sample to be predicted in the current block is (3,1), min(x,y) becomes 1 and the weight (w1) becomes 4 / 8 (=1 / 2).

[0334] Alternatively, w1(x,y) may be determined in the same manner as wT and / or wL of PDPC. Alternatively, there may be various methods for obtaining w1(x,y), as in Equation 21 below.

[0335]

[0336] The application of postprocessing proposed in this disclosure can be adaptively determined based on the intra prediction mode of the current block. Specifically, the application of postprocessing can be determined based on the following conditions.

[0337] - If the intra prediction mode of the current block is a non-directional prediction mode such as PLANAR mode or DC mode, the post-processing method proposed in this disclosure is not applied to the current block.

[0338] - If the intra prediction mode of the current block is MIP mode, ISP mode, MRL mode, SGPM mode CIIP mode, DIMD mode, TIMD mode and / or IntraTemplatematching mode, the post-processing method proposed in this disclosure is not applied to the current block.

[0339] - If the width x height value of the current block is less than or equal to K, the post-processing method proposed in this disclosure is not applied to the current block. In this case, K can be a value between 4 and 65536.

[0340] - If the width x height value of the current block is greater than or equal to K, the post-processing method proposed in this disclosure is not applied to the current block. In this case, K can be a value between 4 and 65536.

[0341] The conditions for determining whether to apply the above post-processing can be applied independently of each other, or multiple conditions can be selected and applied simultaneously.

[0342] Information indicating whether the post-processing method proposed in this disclosure is applied (i.e., application information) can be signaled from HLS such as VPS, SPS, PPS, Picture Header, Slice Header, and DCI. Alternatively, information indicating whether the post-processing method is applied (i.e., application information) can be signaled from HLS such as VPS, SPS, PPS, Picture Header, Slice Header, and DCI. For example, when determining whether the post-processing method proposed in this disclosure is applied on a PPS basis, information indicating whether the post-processing method is applied (i.e., application information) can be transmitted to PPS.

[0343] The post-processing method proposed in the present disclosure can adaptively determine whether to apply post-processing in the image decoding device (200) without signaling information that determines whether to apply the post-processing method, or can determine whether to apply post-processing by explicitly signaling information that determines whether to apply the post-processing method. For example, information that determines whether to apply post-processing in units of CTU or CU can be transmitted to the image decoding device (200) using a 1-bit flag. Alternatively, when the post-processing proposed in the present disclosure is to be applied based on a specific block size, shape, and / or the presence or absence of specific conditions, information that determines whether to apply the post-processing method can be transmitted to the image decoding device (200) using a 1-bit flag only in this case.

[0344] According to one embodiment of the present disclosure, information determining whether to apply post-processing to a coding unit may be adaptively signaled based on information determining whether to apply post-processing defined in HLS. For example, if the information determining whether to apply post-processing signaled in SPS is false, the post-processing process proposed in the present disclosure will not be applied to the coding unit, and the information determining whether to apply post-processing to the coding unit may not be transmitted.

[0345] FIG. 21 is a flowchart of a video encoding / decoding method according to an embodiment of the present disclosure. Referring to FIG. 21, the video encoding device (100) and / or the video decoding device (200) may generate a predictor of the current block based on the selected intra prediction mode of the current block (S2110). The generated predictor may be a first prediction block. Thereafter, the video encoding device (100) and / or the video decoding device (200) may determine whether post-processing may be applied (S2130). That is, the video encoding device (100) and / or the video decoding device (200) may determine whether a post-processing process may be applied to the current block. In the video decoding device (200), whether post-processing may be applied may be determined based on information indicating whether post-processing may be applied (i.e., application information). In this case, the information indicating whether post-processing may be applied may be information signaled from HLS.

[0346] If the post-processing process is applicable to the current block (YES in step S2130), the video encoding device (100) and / or the video decoding device (200) can generate a new predictor of the current block based on the intra prediction mode of the selected left neighboring block or upper neighboring block (S2150). Here, the generated new predictor may be a second prediction block. The video encoding device (100) and / or the video decoding device (200) can perform post-processing (S2170). Specifically, the video encoding device (100) and / or the video decoding device (200) can perform the post-processing process by weighting the predictor generated in step S2110 and the new predictor generated in step S2150.

[0347] If the post-processing process is not applicable to the current block (NO in step S2130), the image encoding device (100) and / or the image decoding device (200) may terminate the procedure without performing the post-processing process.

[0348] FIG. 22 is a flowchart of a video encoding / decoding method according to an embodiment of the present disclosure. Referring to FIG. 22, the video encoding device (100) and / or the video decoding device (200) may generate a first prediction block of the current block based on the intra prediction mode of the current block (S2210). In addition, the video encoding device (100) and / or the video decoding device (200) may generate a second prediction block of the current block based on the intra prediction mode of a neighboring block of the current block (S2230). At this time, the neighboring block may be at least one of an upper neighboring block or a left neighboring block adjacent to the current block.

[0349] The term "left peripheral block" as used herein may refer to all blocks located to the left of the current block. That is, both the upper-left peripheral block and the lower-left peripheral block of the current block may be included in the left peripheral block. Furthermore, the term "upper peripheral block" as used herein may refer to all blocks located above the current block. That is, both the upper-left peripheral block and the upper-right peripheral block of the current block may be included in the upper peripheral block.

[0350] After generating the first prediction block and the second prediction block, the image encoding device (100) and / or the image decoding device (200) can generate the final prediction block of the current block based on the first prediction block and the second prediction block (S2250).

[0351] According to one embodiment of the present disclosure, the intra prediction mode of a neighboring block used to generate a second prediction block may be determined from the intra prediction modes of samples included in the neighboring block. At this time, the intra prediction mode of the neighboring block may be determined in a predetermined order from the intra prediction modes of the samples included in the neighboring block. The specific order (i.e., the search order) may be the same as that described in Embodiments 1 to 3. In addition, the intra prediction mode of the neighboring block may be determined as a directional prediction mode among the intra prediction modes of the samples included in the neighboring block. That is, if the intra prediction mode of the samples included in the neighboring block is not a directional prediction mode, the post-processing process proposed in the present disclosure may not be performed.

[0352] According to one embodiment of the present disclosure, the intra prediction mode of a neighboring block may be determined as a directional prediction mode within a predetermined range among the intra prediction modes of samples included in the neighboring block. That is, the intra prediction mode of a neighboring block may be limited to a directional prediction mode within a predetermined range among the intra prediction modes of samples included in the neighboring block.

[0353] According to one embodiment of the present disclosure, the intra prediction mode of a neighboring block may be determined based on a difference between the intra prediction mode of a sample included in the neighboring block and the intra prediction mode of the current block. Here, the difference between the intra prediction modes may refer to a difference in intra prediction mode values. That is, the intra prediction mode of a neighboring block may be determined based on a difference between the intra prediction mode value of a sample included in the neighboring block and the intra prediction mode value of the current block.

[0354] According to one embodiment of the present disclosure, based on the different intra prediction modes of samples included in the surrounding block, the second prediction block can be generated by weighting and combining a plurality of prediction blocks generated by the intra prediction modes of each of the samples. For example, if one of the intra prediction modes of the samples included in the surrounding block is prediction mode 18 and the other is prediction mode 60, the second prediction block can be generated by weighting and combining a prediction block generated based on prediction mode 18 and a prediction block generated based on prediction mode 60.

[0355] According to one embodiment of the present disclosure, step S2230 in FIG. 22 may be performed based on whether the intra prediction mode of the current block is a directional prediction mode. That is, the second prediction block may be generated based on whether the intra prediction mode of the current block is a directional prediction mode. If the intra prediction mode of the current block is not a directional prediction mode, the post-processing process proposed in the present disclosure may not be performed.

[0356] According to one embodiment of the present disclosure, step S2230 in FIG. 22 may be performed based on the size of the current block. That is, the second prediction block may be generated based on the size of the current block. If the size of the current block does not satisfy the required condition, the post-processing process proposed in the present disclosure may not be performed. For example, the second prediction block may be generated only when the width x height of the current block is equal to or greater than K. Here, K may be a value between 4 and 65536. Alternatively, the second prediction block may be generated only when the width x height of the current block is less than (or equal to) K. Here, K may be a value between 4 and 65536.

[0357] According to one embodiment of the present disclosure, the step of generating the second prediction block may be determined based on application information obtained from the bitstream. Here, the application information may indicate whether to apply a post-processing process to the current block. Furthermore, the application information may be obtained from the HLS within the bitstream.

[0358] According to one embodiment of the present disclosure, a final prediction block can be generated by weighting a first prediction block and a second prediction block. Specifically, the video encoding device (100) and / or the video decoding device (200) can determine a first weight applied to the first prediction block. In addition, the video encoding device (100) and / or the video decoding device (200) can determine a second weight applied to the second prediction block. Based on the determined first and second weights, the final prediction block can be generated by weighting the first prediction block and the second prediction block. The weighting of the first prediction block and the second prediction block can be performed using one of the equations (2), (7), or (18).

[0359] The first weight and the second weight may be determined based on the x-coordinate of the sample included in the current block, the y-coordinate of the sample included in the current block, the size of the current block, the shape of the current block, or the template matching cost. The first weight and the second weight may be determined using one of Equations 4 to 6, 9 to 11, 14 to 17, 20, or 21.

[0360] While the exemplary methods of this disclosure are presented as a series of operations for clarity of description, this is not intended to limit the order in which the steps are performed, and individual steps may be performed simultaneously or in different orders, if desired. To implement a method according to this disclosure, additional steps may be included in addition to the steps illustrated, some steps may be excluded and the remaining steps included, or some steps may be excluded and additional steps included.

[0361] In the present disclosure, a video encoding device or video decoding device performing a predetermined operation (step) may perform an operation (step) of checking the conditions or circumstances under which the operation (step) is performed. For example, if it is described that a predetermined operation is performed when a predetermined condition is satisfied, the video encoding device or video decoding device may perform an operation of checking whether the predetermined condition is satisfied and then perform the predetermined operation.

[0362] The various embodiments of the present disclosure are not intended to list all possible combinations but rather to illustrate representative aspects of the present disclosure, and the matters described in the various embodiments may be applied independently or in combination of two or more.

[0363] Additionally, various embodiments of the present disclosure may be implemented by hardware, firmware, software, or a combination thereof. In the case of hardware implementation, the embodiments may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general processors, controllers, microcontrollers, microprocessors, etc.

[0364] In addition, the video decoding device and the video encoding device to which the embodiments of the present disclosure are applied may be included in a multimedia broadcasting transmitting and receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video conversation device, a real-time communication device such as a video communication, a mobile streaming device, a storage medium, a camcorder, a video-on-demand (VoD) service providing device, an OTT (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, a video phone video device, and a medical video device, and may be used to process a video signal or a data signal. For example, the OTT (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), and the like.

[0365] FIG. 23 is a diagram illustrating an example of a content streaming system to which an embodiment according to the present disclosure can be applied.

[0366] As illustrated in FIG. 23, a content streaming system to which an embodiment of the present disclosure is applied may largely include an encoding server, a streaming server, a web server, a media storage, a user device, and a multimedia input device.

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

[0368] The above bitstream can be generated by an image encoding method and / or an image encoding device to which an embodiment of the present disclosure is applied, and the streaming server can temporarily store the bitstream during the process of transmitting or receiving the bitstream.

[0369] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server can act 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 can transmit multimedia data to the user. At this time, the content streaming system may include a separate control server, and in this case, the control server may control commands / responses between each device within the content streaming system.

[0370] The streaming server can receive content from a media repository and / or 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.

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

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

[0373] The scope of the present disclosure includes software or machine-executable instructions (e.g., operating systems, applications, firmware, programs, etc.) that cause operations according to the methods of various embodiments to be executed on a device or a computer, and a non-transitory computer-readable medium having such software or instructions stored thereon and executable on the device or computer.

[0374] Embodiments according to the present disclosure can be used to encode / decode images.

Claims

1. An image decoding method performed by an image decoding device, A step of generating a first prediction block of the current block based on an intra prediction mode of the current block; A step of generating a second prediction block of the current block based on an intra prediction mode of a surrounding block of the current block; and A step of generating a final prediction block of the current block based on the first prediction block and the second prediction block, How to decrypt video.

2. In paragraph 1, The above-mentioned surrounding block is at least one of the upper surrounding block or the left surrounding block adjacent to the current block, How to decrypt video.

3. In paragraph 1, The intra prediction mode of the above-mentioned surrounding block is determined from the intra prediction modes of the samples included in the above-mentioned surrounding block. How to decrypt video.

4. In paragraph 3, The intra prediction mode of the above-mentioned surrounding block is determined in a predetermined order from the intra prediction modes of the samples included in the above-mentioned surrounding block. How to decrypt video.

5. In paragraph 3, The intra prediction mode of the above-mentioned surrounding block is determined as a directional prediction mode among the intra prediction modes of the samples included in the above-mentioned surrounding block. How to decrypt video.

6. In paragraph 5, The intra prediction mode of the above-mentioned surrounding block is determined as a directional prediction mode within a predetermined range among the intra prediction modes of the samples included in the above-mentioned surrounding block. How to decrypt video.

7. In paragraph 5, The intra prediction mode of the above-mentioned surrounding block is determined based on the difference between the intra prediction mode of the sample included in the above-mentioned surrounding block and the intra prediction mode of the above-mentioned current block. How to decrypt video.

8. In paragraph 1, Based on the fact that the intra prediction modes of the samples included in the surrounding blocks are different, the second prediction block is generated by weighting a plurality of prediction blocks generated by the intra prediction modes of each of the samples. How to decrypt video.

9. In paragraph 1, The step of generating the second prediction block is performed based on the intra prediction mode of the current block being a directional prediction mode. How to decrypt video.

10. In paragraph 1, The step of generating the second prediction block is performed based on the size of the current block. How to decrypt video.

11. In paragraph 1, The step of generating the second prediction block is determined based on application information obtained from the bitstream. How to decrypt video.

12. In paragraph 1, a step of determining a first weight applied to the first prediction block; and Further comprising a step of determining a second weight applied to the second prediction block, Based on the first weight and the second weight, the final prediction block is generated by weighting the first prediction block and the second prediction block, The first weight and the second weight are determined based on the x-coordinate of the sample included in the current block, the y-coordinate of the sample included in the current block, the size of the current block, the shape of the current block, or the template matching cost. How to decrypt video.

13. An image encoding method performed by an image encoding device, A step of generating a first prediction block of the current block based on an intra prediction mode of the current block; A step of generating a second prediction block of the current block based on an intra prediction mode of a surrounding block of the current block; and A step of generating a final prediction block of the current block based on the first prediction block and the second prediction block, Video encoding method.

14. A computer-readable recording medium storing a bitstream generated by the image encoding method of Article 13.

15. A method for transmitting a bitstream generated by an image encoding method, wherein the image encoding method comprises: A step of generating a first prediction block of the current block based on an intra prediction mode of the current block; A step of generating a second prediction block of the current block based on an intra prediction mode of a surrounding block of the current block; and A step of generating a final prediction block of the current block based on the first prediction block and the second prediction block, Bitstream transmission method.

Citation Information

Patent Citations

  • HEVC encoding device and method for deciding intra prediction mode for the same

    KR101621358B1

  • Salt plant cultivation system

    KR1020220118822A

  • Strap dumbbells

    KR1020230170860A

  • A device, a method and a computer readable storage medium for industrial safety management

    KR1020240081730A

  • Gel-type hairdye using natural materials and its manufacturing method

    KR102170417B1